-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from MFB-Technologies-Inc/feature/refactor-file…
…-structure Feature/refactor file structure
- Loading branch information
Showing
28 changed files
with
395 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// swift-tools-version: 5.8 | ||
// swift-tools-version: 5.9 | ||
|
||
import PackageDescription | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// AZDeleteRequest.swift | ||
// azure-devops-swift | ||
// | ||
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
import Foundation | ||
import HTTPTypes | ||
|
||
public protocol AZDeleteRequest: AZRequest {} | ||
|
||
extension AZDeleteRequest { | ||
public var method: HTTPRequest.Method { .delete } | ||
public func body(encoder _: some JSONEncoder) throws -> Data? { | ||
nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// AZGetRequest.swift | ||
// azure-devops-swift | ||
// | ||
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
import Foundation | ||
import HTTPTypes | ||
|
||
public protocol AZGetRequest: AZRequest {} | ||
|
||
extension AZGetRequest { | ||
public var method: HTTPRequest.Method { .get } | ||
public func body(encoder _: some JSONEncoder) throws -> Data? { | ||
nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// AZPostRequest.swift | ||
// azure-devops-swift | ||
// | ||
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
import HTTPTypes | ||
|
||
public protocol AZPostRequest: AZRequest {} | ||
|
||
extension AZPostRequest { | ||
public var method: HTTPRequest.Method { .post } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// AZPutRequest.swift | ||
// azure-devops-swift | ||
// | ||
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
import HTTPTypes | ||
|
||
public protocol AZPutRequest: AZRequest {} | ||
|
||
extension AZPutRequest { | ||
public var method: HTTPRequest.Method { .put } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// AZPipeline+Configuration.swift | ||
// azure-devops-swift | ||
// | ||
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
extension AZPipeline { | ||
public struct Configuration: Hashable, Sendable, Codable { | ||
public var type: ConfigurationType | ||
public var repository: ConfigurationRepository? | ||
public var path: String? | ||
|
||
public init(type: ConfigurationType, repository: ConfigurationRepository? = nil, path: String? = nil) { | ||
self.type = type | ||
self.repository = repository | ||
self.path = path | ||
} | ||
|
||
public static let designerHyphenJson: Self = Configuration(type: .designerHyphenJson) | ||
public static let designerJson: Self = Configuration(type: .designerJson) | ||
public static let justInTime: Self = Configuration(type: .justInTime) | ||
public static let unknown: Self = Configuration(type: .unknown) | ||
public static func yaml(path: String, repository: ConfigurationRepository, type _: ConfigurationType) -> Self { | ||
self.init( | ||
type: .yaml, | ||
repository: repository, | ||
path: path | ||
) | ||
} | ||
} | ||
|
||
public enum ConfigurationType: String, Hashable, Sendable, CaseIterable, Codable { | ||
case designerHyphenJson | ||
case designerJson | ||
case justInTime | ||
case unknown | ||
case yaml | ||
} | ||
|
||
public struct ConfigurationRepository: Hashable, Sendable, Codable { | ||
public let id: AZRepositoryId | ||
public let type: RepositoryType | ||
|
||
public init(id: AZRepositoryId, type: RepositoryType) { | ||
self.id = id | ||
self.type = type | ||
} | ||
} | ||
|
||
public enum RepositoryType: String, Hashable, Sendable, Codable { | ||
case azureReposGit | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Pipelines+Json.swift | ||
// azure-devops-swift | ||
// | ||
// Copyright © 2023 MFB Technologies, Inc. All rights reserved. | ||
// | ||
// This source code is licensed under the MIT license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
|
||
import AZCoreFixtures | ||
|
||
extension AZFixtures.Pipelines { | ||
public enum Json {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.