diff --git a/.gitignore b/.gitignore index 300d9787a0a..5d7563028c6 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ SmokeTests/ # VS Code config files .vscode/ -# Allow the AWSSDKSwiftCLI Package.resolved +# Allow the AWSSDKSwiftCLI & SPRCLI Package.resolved # while excluding all other Package.resolved files !/AWSSDKSwiftCLI/Package.resolved +!/SPRCLI/Package.resolved diff --git a/.swiftlint.yml b/.swiftlint.yml index 6066cb298a1..7ec51439cb0 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -1,10 +1,10 @@ included: - - Sources/Core/AWSClientRuntime/Sources - - Sources/Core/AWSSDKChecksums/Sources - - Sources/Core/AWSSDKCommon/Sources - - Sources/Core/AWSSDKEventStreamsAuth/Sources - - Sources/Core/AWSSDKHTTPAuth/Sources - - Sources/Core/AWSSDKIdentity/Sources + - Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources + - Sources/Core/aws-sdk-swift.AWSSDKChecksums/Sources + - Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources + - Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources + - Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources + - Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources analyzer_rules: - unused_import diff --git a/AWSSDKSwiftCLI/Sources/AWSCLIUtils/Process+Utils.swift b/AWSSDKSwiftCLI/Sources/AWSCLIUtils/Process+Utils.swift index 4c499e4a86c..eba04052123 100644 --- a/AWSSDKSwiftCLI/Sources/AWSCLIUtils/Process+Utils.swift +++ b/AWSSDKSwiftCLI/Sources/AWSCLIUtils/Process+Utils.swift @@ -42,6 +42,9 @@ public func _run(_ process: Process) throws { #if DEBUG if let testRunner = ProcessRunner.testRunner { try testRunner.run(process) + if let pipe = process.standardOutput as? Pipe { + try pipe.fileHandleForWriting.close() + } return } #endif diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GenerateDocIndex.swift b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GenerateDocIndex.swift index 9b2ddc1739f..c55e85efbea 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GenerateDocIndex.swift +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GenerateDocIndex.swift @@ -70,7 +70,9 @@ struct GenerateDocIndexCommand: ParsableCommand { log("Resolving services...") let resolvedServices: [String] log("Using list of services that exist within Sources/Services") - resolvedServices = try FileManager.default.enabledServices() + resolvedServices = try FileManager.default + .enabledServices() + .map { "\($0.trimmingPrefix("aws-sdk-swift."))" } log("Resolved list of services: \(resolvedServices.count)") return resolvedServices } diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GeneratePackageManifest.swift b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GeneratePackageManifest.swift index 376b0cf8c36..4263fc29739 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GeneratePackageManifest.swift +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Commands/AWSSDKSwiftCLI/Subcommands/GeneratePackageManifest.swift @@ -38,6 +38,7 @@ struct GeneratePackageManifestCommand: ParsableCommand { func run() throws { let generatePackageManifest = GeneratePackageManifest.standard( repoPath: repoPath, + packageScope: nil, packageFileName: packageFileName, clientRuntimeVersion: clientRuntimeVersion, crtVersion: crtVersion, @@ -54,6 +55,8 @@ struct GeneratePackageManifestCommand: ParsableCommand { struct GeneratePackageManifest { /// The path to the package repository let repoPath: String + /// The package scope. Used for Swift Package Registry. + let packageScope: String? /// The name of the package manifest file, usually `Package.swift` let packageFileName: String /// The version to set for the ClientRuntime dependency @@ -69,6 +72,7 @@ struct GeneratePackageManifest { let excludeRuntimeTests: Bool typealias BuildPackageManifest = ( + _ packageScope: String, _ clientRuntimeVersion: Version, _ crtVersion: Version, _ services: [PackageManifestBuilder.Service] @@ -90,10 +94,11 @@ struct GeneratePackageManifest { /// /// - Returns: The contents of the generated package manifest. func generatePackageManifestContents() throws -> String { + let packageScope = try resolvePackageScope() let versions = try resolveVersions() - let services = try resolveServices().map { PackageManifestBuilder.Service(name: $0) } + let services = try resolveServices(packageScope: packageScope).map { PackageManifestBuilder.Service(name: $0) } log("Creating package manifest contents...") - let contents = try buildPackageManifest(versions.clientRuntime, versions.crt, services) + let contents = try buildPackageManifest(packageScope, versions.clientRuntime, versions.crt, services) log("Successfully created package manifest contents") return contents } @@ -112,6 +117,21 @@ struct GeneratePackageManifest { log("Successfully saved package manifest to \(packageFileName)") } + func resolvePackageScope() throws -> String { + log("Resolving package scope...") + if let packageScope { + log("Using package scope provided: \(packageScope)") + return packageScope + } + let filename = "Package.scope" + let data = try FileManager.default.loadContents(atPath: filename) + guard let scope = String(data: data, encoding: .utf8) else { + throw Error("Package scope in file \(filename) is not valid UTF-8") + } + log("Using package scope loaded from file \(filename): \(scope)") + return scope + } + /// Returns the versions for ClientRuntime and CRT. /// If explcit versions are provided by the command, then this returns the specified versions. /// Otherwise, this returns the versions defined in `packageDependencies.plist`. @@ -163,7 +183,7 @@ struct GeneratePackageManifest { /// Otherwise, this returns the list of services that exist within `Sources/Services` /// /// - Returns: The list of services to include in the package manifest - func resolveServices() throws -> [String] { + func resolveServices(packageScope: String) throws -> [String] { log("Resolving services...") let resolvedServices: [String] if let services = self.services { @@ -174,7 +194,7 @@ struct GeneratePackageManifest { resolvedServices = try FileManager.default.enabledServices() } log("Resolved list of services: \(resolvedServices.count)") - return resolvedServices + return resolvedServices.map { $0.trimmingPrefix("\(packageScope).") }.map(String.init) } } @@ -194,6 +214,7 @@ extension GeneratePackageManifest { /// - Returns: the standard package manifest generator static func standard( repoPath: String, + packageScope: String? = nil, packageFileName: String, clientRuntimeVersion: Version? = nil, crtVersion: Version? = nil, @@ -203,13 +224,15 @@ extension GeneratePackageManifest { ) -> Self { GeneratePackageManifest( repoPath: repoPath, + packageScope: packageScope, packageFileName: packageFileName, clientRuntimeVersion: clientRuntimeVersion, crtVersion: crtVersion, services: services, excludeRuntimeTests: excludeRuntimeTests - ) { _clientRuntimeVersion, _crtVersion, _services in + ) { _packageScope, _clientRuntimeVersion, _crtVersion, _services in let builder = PackageManifestBuilder( + packageScope: _packageScope, clientRuntimeVersion: _clientRuntimeVersion, crtVersion: _crtVersion, services: _services, diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Models/PackageManifestBuilder.swift b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Models/PackageManifestBuilder.swift index a8a8ba68936..d6af608b41a 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Models/PackageManifestBuilder.swift +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Models/PackageManifestBuilder.swift @@ -14,14 +14,16 @@ struct PackageManifestBuilder { let name: String } + let packageScope: String let clientRuntimeVersion: Version let crtVersion: Version let services: [Service] let excludeRuntimeTests: Bool let prefixContents: () throws -> String let basePackageContents: () throws -> String - + init( + packageScope: String, clientRuntimeVersion: Version, crtVersion: Version, services: [Service], @@ -29,6 +31,7 @@ struct PackageManifestBuilder { prefixContents: @escaping () throws -> String, basePackageContents: @escaping () throws -> String ) { + self.packageScope = packageScope self.clientRuntimeVersion = clientRuntimeVersion self.crtVersion = crtVersion self.services = services @@ -38,12 +41,14 @@ struct PackageManifestBuilder { } init( + packageScope: String, clientRuntimeVersion: Version, crtVersion: Version, services: [Service], excludeRuntimeTests: Bool ) { self.init( + packageScope: packageScope, clientRuntimeVersion: clientRuntimeVersion, crtVersion: crtVersion, services: services, @@ -93,6 +98,9 @@ struct PackageManifestBuilder { // Add the generated content that defines the dependencies' versions buildDependencies(), "", + // Add the package scope + buildPackageScope(), + "", // Remove the runtime tests if needed buildRuntimeTests(), "", @@ -119,6 +127,10 @@ struct PackageManifestBuilder { """ } + private func buildPackageScope() -> String { + "let packageScope = \(packageScope.wrappedInQuotes())" + } + private func buildRuntimeTests() -> String { "let excludeRuntimeUnitTests = \(excludeRuntimeTests)" } diff --git a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt index 56028fa8da4..9c01a31ad53 100644 --- a/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt +++ b/AWSSDKSwiftCLI/Sources/AWSSDKSwiftCLI/Resources/Package.Base.txt @@ -105,7 +105,7 @@ private var runtimeTargets: [Target] { .awsSDKHTTPAuth, .awsSDKIdentity ], - path: "Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime", + path: "Sources/Core/\("AWSClientRuntime".withScope)/Sources/AWSClientRuntime", resources: [ .process("Resources"), ] @@ -113,27 +113,27 @@ private var runtimeTargets: [Target] { .target( name: "AWSSDKCommon", dependencies: [.crt], - path: "Sources/Core/AWSSDKCommon/Sources" + path: "Sources/Core/\("AWSSDKCommon".withScope)/Sources" ), .target( name: "AWSSDKEventStreamsAuth", dependencies: [.smithyEventStreamsAPI, .smithyEventStreamsAuthAPI, .smithyEventStreams, .crt, .clientRuntime, "AWSSDKHTTPAuth"], - path: "Sources/Core/AWSSDKEventStreamsAuth/Sources" + path: "Sources/Core/\("AWSSDKEventStreamsAuth".withScope)/Sources" ), .target( name: "AWSSDKHTTPAuth", dependencies: [.crt, .smithy, .clientRuntime, .smithyHTTPAuth, "AWSSDKIdentity", "AWSSDKChecksums"], - path: "Sources/Core/AWSSDKHTTPAuth/Sources" + path: "Sources/Core/\("AWSSDKHTTPAuth".withScope)/Sources" ), .target( name: "AWSSDKIdentity", dependencies: [.crt, .smithy, .clientRuntime, .smithyIdentity, .smithyIdentityAPI, .smithyHTTPAPI, .awsSDKCommon], - path: "Sources/Core/AWSSDKIdentity/Sources" + path: "Sources/Core/\("AWSSDKIdentity".withScope)/Sources" ), .target( name: "AWSSDKChecksums", dependencies: [.crt, .smithy, .clientRuntime, .smithyChecksumsAPI, .smithyChecksums, .smithyHTTPAPI], - path: "Sources/Core/AWSSDKChecksums/Sources" + path: "Sources/Core/\("AWSSDKChecksums".withScope)/Sources" ) ] } @@ -144,23 +144,23 @@ private var runtimeTestTargets: [Target] { .testTarget( name: "AWSClientRuntimeTests", dependencies: [.awsClientRuntime, .clientRuntime, .smithyTestUtils, .awsSDKCommon], - path: "Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests", + path: "Sources/Core/\("AWSClientRuntime".withScope)/Tests/AWSClientRuntimeTests", resources: [.process("Resources")] ), .testTarget( name: "AWSSDKEventStreamsAuthTests", dependencies: ["AWSClientRuntime", "AWSSDKEventStreamsAuth", .smithyStreams, .smithyTestUtils], - path: "Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests" + path: "Sources/Core/\("AWSSDKEventStreamsAuth".withScope)/Tests/AWSSDKEventStreamsAuthTests" ), .testTarget( name: "AWSSDKHTTPAuthTests", dependencies: ["AWSSDKHTTPAuth", "AWSClientRuntime", "AWSSDKEventStreamsAuth", .crt, .clientRuntime, .smithyTestUtils], - path: "Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests" + path: "Sources/Core/\("AWSSDKHTTPAuth".withScope)/Tests/AWSSDKHTTPAuthTests" ), .testTarget( name: "AWSSDKIdentityTests", dependencies: [.smithy, .smithyIdentity, "AWSSDKIdentity", .awsClientRuntime], - path: "Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests", + path: "Sources/Core/\("AWSSDKIdentity".withScope)/Tests/AWSSDKIdentityTests", resources: [.process("Resources")] ), ] @@ -189,7 +189,7 @@ private func target(_ service: String) -> Target { .awsSDKEventStreamsAuth, .awsSDKChecksums, ], - path: "Sources/Services/\(service)/Sources/\(service)" + path: "Sources/Services/\(service.withScope)/Sources/\(service)" ) } @@ -198,6 +198,14 @@ private func unitTestTarget(_ service: String) -> Target { return .testTarget( name: "\(testName)", dependencies: [.clientRuntime, .awsClientRuntime, .byName(name: service), .smithyTestUtils], - path: "Sources/Services/\(service)/Tests/\(testName)" + path: "Sources/Services/\(service.withScope)/Tests/\(testName)" ) } + +private extension String { + + var withScope: String { + guard !packageScope.isEmpty else { return self } + return "\(packageScope).\(self)" + } +} diff --git a/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Commands/GeneratePackageManifestTests.swift b/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Commands/GeneratePackageManifestTests.swift index a0bc5b4cb02..15209c2ac53 100644 --- a/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Commands/GeneratePackageManifestTests.swift +++ b/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Commands/GeneratePackageManifestTests.swift @@ -42,6 +42,7 @@ class GeneratePackageManifestTests: CLITestCase { // MARK: Golden Path func testGoldenPath() throws { + let packageScope = "abc-def-ghi" let clientRuntimeVersion = "1.2.3" let crtVersion = "3.2.1" let services = ["EC2", "S3"] @@ -51,12 +52,12 @@ class GeneratePackageManifestTests: CLITestCase { ) createServiceFolders(services) - let subject = GeneratePackageManifest.mock(buildPackageManifest: { _clientRuntimeVersion, _crtVersion, services in - "\(_clientRuntimeVersion)-\(_crtVersion)-\(services.map(\.name).joined(separator: "-"))" + let subject = GeneratePackageManifest.mock(packageScope: packageScope, buildPackageManifest: { _packageScope, _clientRuntimeVersion, _crtVersion, services in + "\(_packageScope)-\(_clientRuntimeVersion)-\(_crtVersion)-\(services.map(\.name).joined(separator: "-"))" }) try! subject.run() let result = try! String(contentsOfFile: "Package.swift", encoding: .utf8) - XCTAssertEqual(result, "1.2.3-3.2.1-EC2-S3") + XCTAssertEqual(result, "abc-def-ghi-1.2.3-3.2.1-EC2-S3") } // MARK: resolveVersions() @@ -89,18 +90,20 @@ class GeneratePackageManifestTests: CLITestCase { // MARK: resolveServices() func testResolveServicesRetrievesServicesFromDisk() { + let packageScope = "" let services = ["EC2", "S3"] createServiceFolders(services) let subject = GeneratePackageManifest.mock() - let result = try! subject.resolveServices() + let result = try! subject.resolveServices(packageScope: packageScope) XCTAssertEqual(result, services) } func testResolveServicesWithExplicitServices() { + let packageScope = "" let services = ["One", "Two", "Three"] let subject = GeneratePackageManifest.mock(services: services) - let result = try! subject.resolveServices() + let result = try! subject.resolveServices(packageScope: packageScope) XCTAssertEqual(result, services) } } @@ -110,15 +113,16 @@ class GeneratePackageManifestTests: CLITestCase { extension GeneratePackageManifest { static func mock( repoPath: String = ".", + packageScope: String = "", packageFileName: String = "Package.swift", clientRuntimeVersion: Version? = nil, crtVersion: Version? = nil, services: [String]? = nil, excludeRuntimeTests: Bool = false, - buildPackageManifest: @escaping BuildPackageManifest = { (_,_,_) throws -> String in "" } + buildPackageManifest: @escaping BuildPackageManifest = { (_,_,_,_) throws -> String in "" } ) -> GeneratePackageManifest { GeneratePackageManifest( - repoPath: repoPath, + repoPath: repoPath, packageScope: packageScope, packageFileName: packageFileName, clientRuntimeVersion: clientRuntimeVersion, crtVersion: crtVersion, diff --git a/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Models/PackageManifestBuilderTests.swift b/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Models/PackageManifestBuilderTests.swift index ecb12da89a5..efa155a4efe 100644 --- a/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Models/PackageManifestBuilderTests.swift +++ b/AWSSDKSwiftCLI/Tests/AWSSDKSwiftCLITests/Models/PackageManifestBuilderTests.swift @@ -17,6 +17,8 @@ class PackageManifestBuilderTests: XCTestCase { let clientRuntimeVersion: Version = "1.2.3" let crtVersion: Version = "4.5.6" +let packageScope = "abc-def-ghi" + let excludeRuntimeUnitTests = false let serviceTargets: [String] = [ @@ -32,6 +34,7 @@ let serviceTargets: [String] = [ func testBuild() throws { let subject = try PackageManifestBuilder( + packageScope: "abc-def-ghi", clientRuntimeVersion: .init("1.2.3"), crtVersion: .init("4.5.6"), services: ["A","B","C","D","E"].map { PackageManifestBuilder.Service(name: $0) }, diff --git a/Package.scope b/Package.scope new file mode 100644 index 00000000000..f57647c1ee8 --- /dev/null +++ b/Package.scope @@ -0,0 +1 @@ +aws-sdk-swift \ No newline at end of file diff --git a/Package.swift b/Package.swift index f8614528d0c..d560a1644e6 100644 --- a/Package.swift +++ b/Package.swift @@ -18,6 +18,8 @@ import PackageDescription let clientRuntimeVersion: Version = "0.89.0" let crtVersion: Version = "0.37.0" +let packageScope = "aws-sdk-swift" + let excludeRuntimeUnitTests = false let serviceTargets: [String] = [ @@ -519,7 +521,7 @@ private var runtimeTargets: [Target] { .awsSDKHTTPAuth, .awsSDKIdentity ], - path: "Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime", + path: "Sources/Core/\("AWSClientRuntime".withScope)/Sources/AWSClientRuntime", resources: [ .process("Resources"), ] @@ -527,27 +529,27 @@ private var runtimeTargets: [Target] { .target( name: "AWSSDKCommon", dependencies: [.crt], - path: "Sources/Core/AWSSDKCommon/Sources" + path: "Sources/Core/\("AWSSDKCommon".withScope)/Sources" ), .target( name: "AWSSDKEventStreamsAuth", dependencies: [.smithyEventStreamsAPI, .smithyEventStreamsAuthAPI, .smithyEventStreams, .crt, .clientRuntime, "AWSSDKHTTPAuth"], - path: "Sources/Core/AWSSDKEventStreamsAuth/Sources" + path: "Sources/Core/\("AWSSDKEventStreamsAuth".withScope)/Sources" ), .target( name: "AWSSDKHTTPAuth", dependencies: [.crt, .smithy, .clientRuntime, .smithyHTTPAuth, "AWSSDKIdentity", "AWSSDKChecksums"], - path: "Sources/Core/AWSSDKHTTPAuth/Sources" + path: "Sources/Core/\("AWSSDKHTTPAuth".withScope)/Sources" ), .target( name: "AWSSDKIdentity", dependencies: [.crt, .smithy, .clientRuntime, .smithyIdentity, .smithyIdentityAPI, .smithyHTTPAPI, .awsSDKCommon], - path: "Sources/Core/AWSSDKIdentity/Sources" + path: "Sources/Core/\("AWSSDKIdentity".withScope)/Sources" ), .target( name: "AWSSDKChecksums", dependencies: [.crt, .smithy, .clientRuntime, .smithyChecksumsAPI, .smithyChecksums, .smithyHTTPAPI], - path: "Sources/Core/AWSSDKChecksums/Sources" + path: "Sources/Core/\("AWSSDKChecksums".withScope)/Sources" ) ] } @@ -558,23 +560,23 @@ private var runtimeTestTargets: [Target] { .testTarget( name: "AWSClientRuntimeTests", dependencies: [.awsClientRuntime, .clientRuntime, .smithyTestUtils, .awsSDKCommon], - path: "Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests", + path: "Sources/Core/\("AWSClientRuntime".withScope)/Tests/AWSClientRuntimeTests", resources: [.process("Resources")] ), .testTarget( name: "AWSSDKEventStreamsAuthTests", dependencies: ["AWSClientRuntime", "AWSSDKEventStreamsAuth", .smithyStreams, .smithyTestUtils], - path: "Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests" + path: "Sources/Core/\("AWSSDKEventStreamsAuth".withScope)/Tests/AWSSDKEventStreamsAuthTests" ), .testTarget( name: "AWSSDKHTTPAuthTests", dependencies: ["AWSSDKHTTPAuth", "AWSClientRuntime", "AWSSDKEventStreamsAuth", .crt, .clientRuntime, .smithyTestUtils], - path: "Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests" + path: "Sources/Core/\("AWSSDKHTTPAuth".withScope)/Tests/AWSSDKHTTPAuthTests" ), .testTarget( name: "AWSSDKIdentityTests", dependencies: [.smithy, .smithyIdentity, "AWSSDKIdentity", .awsClientRuntime], - path: "Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests", + path: "Sources/Core/\("AWSSDKIdentity".withScope)/Tests/AWSSDKIdentityTests", resources: [.process("Resources")] ), ] @@ -603,7 +605,7 @@ private func target(_ service: String) -> Target { .awsSDKEventStreamsAuth, .awsSDKChecksums, ], - path: "Sources/Services/\(service)/Sources/\(service)" + path: "Sources/Services/\(service.withScope)/Sources/\(service)" ) } @@ -612,6 +614,14 @@ private func unitTestTarget(_ service: String) -> Target { return .testTarget( name: "\(testName)", dependencies: [.clientRuntime, .awsClientRuntime, .byName(name: service), .smithyTestUtils], - path: "Sources/Services/\(service)/Tests/\(testName)" + path: "Sources/Services/\(service.withScope)/Tests/\(testName)" ) } + +private extension String { + + var withScope: String { + guard !packageScope.isEmpty else { return self } + return "\(packageScope).\(self)" + } +} diff --git a/SPRCLI/Package.resolved b/SPRCLI/Package.resolved new file mode 100644 index 00000000000..971d51ba6ba --- /dev/null +++ b/SPRCLI/Package.resolved @@ -0,0 +1,50 @@ +{ + "pins" : [ + { + "identity" : "aws-crt-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/awslabs/aws-crt-swift", + "state" : { + "revision" : "3f844bef042cc0a4c3381f7090414ce3f9a7e935", + "version" : "0.37.0" + } + }, + { + "identity" : "aws-sdk-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/awslabs/aws-sdk-swift", + "state" : { + "revision" : "54a459ed4d9af2cb2d8e6fdcd96b72543bebb88a", + "version" : "1.0.33" + } + }, + { + "identity" : "smithy-swift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/smithy-lang/smithy-swift", + "state" : { + "revision" : "0d4d3eae8cfb04f3e0cbc4e7740e7344cc9fac55", + "version" : "0.87.0" + } + }, + { + "identity" : "swift-argument-parser", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-argument-parser", + "state" : { + "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", + "version" : "1.4.0" + } + }, + { + "identity" : "swift-log", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-log.git", + "state" : { + "revision" : "9cb486020ebf03bfa5b5df985387a14a98744537", + "version" : "1.6.1" + } + } + ], + "version" : 2 +} diff --git a/SPRCLI/Sources/SPR/Configurable.swift b/SPRCLI/Sources/SPR/Configurable.swift new file mode 100644 index 00000000000..dd38710047a --- /dev/null +++ b/SPRCLI/Sources/SPR/Configurable.swift @@ -0,0 +1,36 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import ClientRuntime +import Foundation +import AWSCLIUtils + +public protocol Configurable { + var bucket: String { get set } + var region: String { get set } + var distributionID: String? { get set } +} + +public extension Configurable { + + mutating func setOptions() async throws { + await SDKLoggingSystem().initialize(logLevel: .error) + let env = ProcessInfo.processInfo.environment + if bucket.isEmpty { + bucket = env["AWS_SDK_SPR_BUCKET"] ?? "" + } + if region.isEmpty { + region = env["AWS_SDK_SPR_REGION"] ?? "us-east-1" + } + distributionID = resolvedDistributionID(from: distributionID) + } +} + +func resolvedDistributionID(from distributionID: String?) -> String? { + let env = ProcessInfo.processInfo.environment + return distributionID ?? env["AWS_SDK_SPR_DISTRIBUTION_ID"] +} diff --git a/SPRCLI/Sources/SPR/Invalidate.swift b/SPRCLI/Sources/SPR/Invalidate.swift index 6c3be477e3c..6e0db13cff2 100644 --- a/SPRCLI/Sources/SPR/Invalidate.swift +++ b/SPRCLI/Sources/SPR/Invalidate.swift @@ -12,14 +12,19 @@ import AWSCloudFront extension SPRPublisher { public static func invalidate(region: String, distributionID: String?, invalidations: [String]) async throws { - let cloudFrontClient = try CloudFrontClient(region: region) - let resolvedDistributionID = resolvedDistributionID(from: distributionID) - guard let resolvedDistributionID, !resolvedDistributionID.isEmpty else { - throw Error("CloudFront DistributionID not provided") + if let distributionID { + print("Finishing & invalidating \(invalidations.count) package lists.") + let cloudFrontClient = try CloudFrontClient(region: region) + let resolvedDistributionID = resolvedDistributionID(from: distributionID) + guard let resolvedDistributionID, !resolvedDistributionID.isEmpty else { + throw Error("CloudFront DistributionID not provided") + } + let invalidationPaths = invalidations.map { "/\($0)" } + let invalidationBatch = CloudFrontClientTypes.InvalidationBatch(callerReference: UUID().uuidString, paths: CloudFrontClientTypes.Paths(items: invalidationPaths, quantity: invalidationPaths.count)) + let input = CreateInvalidationInput(distributionId: distributionID, invalidationBatch: invalidationBatch) + _ = try await cloudFrontClient.createInvalidation(input: input) + } else { + print("Distribution ID not provided, skipping invalidation.") } - let invalidationPaths = invalidations.map { "/\($0)" } - let invalidationBatch = CloudFrontClientTypes.InvalidationBatch(callerReference: UUID().uuidString, paths: CloudFrontClientTypes.Paths(items: invalidationPaths, quantity: invalidationPaths.count)) - let input = CreateInvalidationInput(distributionId: distributionID, invalidationBatch: invalidationBatch) - _ = try await cloudFrontClient.createInvalidation(input: input) } } diff --git a/SPRCLI/Sources/SPR/SPRPublisher.swift b/SPRCLI/Sources/SPR/SPRPublisher.swift index c9798f8413e..c2974b61a23 100644 --- a/SPRCLI/Sources/SPR/SPRPublisher.swift +++ b/SPRCLI/Sources/SPR/SPRPublisher.swift @@ -6,6 +6,7 @@ // import Foundation +import AWSCLIUtils import ClientRuntime public struct SPRPublisher { @@ -14,9 +15,9 @@ public struct SPRPublisher { public var name: String public var version: String public var path: String - public var region: String = "" - public var bucket: String? - public var url: String + public var region: String + public var bucket: String + public var url: URL public var distributionID: String? public var replace = false @@ -33,7 +34,14 @@ public struct SPRPublisher { url: String, distributionID: String?, replace: Bool - ) { + ) throws { + let env = ProcessInfo.processInfo.environment + guard let url = URL(string: url) else { + throw Error("`url` param is not a valid URL") + } + guard let bucket = bucket ?? env["AWS_SDK_SPR_BUCKET"], !bucket.isEmpty else { + throw Error("`bucket` param was not provided") + } self.scope = scope self.name = name self.version = version @@ -46,7 +54,6 @@ public struct SPRPublisher { } public mutating func run() async throws { - await setOptions() print(" Verifying package... ", terminator: "") try verifyPackage() print("[done]") @@ -64,10 +71,13 @@ public struct SPRPublisher { print("[done]") } + var keyPrefix: [String] { + url.pathComponents.filter { $0 != "/" } + } + private mutating func setOptions() async { await SDKLoggingSystem().initialize(logLevel: .error) let env = ProcessInfo.processInfo.environment - bucket = bucket ?? env["AWS_SDK_SPR_BUCKET"] if region.isEmpty { region = env["AWS_SDK_SPR_REGION"] ?? "us-east-1" } diff --git a/SPRCLI/Sources/SPR/UpdateList.swift b/SPRCLI/Sources/SPR/UpdateList.swift index 40769c6c958..86783b859c3 100644 --- a/SPRCLI/Sources/SPR/UpdateList.swift +++ b/SPRCLI/Sources/SPR/UpdateList.swift @@ -49,20 +49,17 @@ extension SPRPublisher { jsonEncoder.outputFormatting = [.prettyPrinted, .sortedKeys] let data = try jsonEncoder.encode(list) let body = ByteStream.data(data) - let input = PutObjectInput(body: body, bucket: bucket, contentType: "application/json", key: listKey) + let input = PutObjectInput(body: body, bucket: bucket, cacheControl: "public, no-cache", contentType: "application/json", key: listKey) _ = try await s3Client.putObject(input: input) } var listKey: String { - "\(scope)/\(name)" + (keyPrefix + [scope, name]).joined(separator: "/") } private var releaseURL: URL { get throws { - guard let baseURL = URL(string: url) else { - throw Error("URL is invalid") - } - return baseURL + return url .appendingPathComponent(scope) .appendingPathComponent(name) .appendingPathComponent(version) diff --git a/SPRCLI/Sources/SPR/UploadArchive.swift b/SPRCLI/Sources/SPR/UploadArchive.swift index edf53311983..1eb22185553 100644 --- a/SPRCLI/Sources/SPR/UploadArchive.swift +++ b/SPRCLI/Sources/SPR/UploadArchive.swift @@ -50,11 +50,11 @@ extension SPRPublisher { let fileHandle = try FileHandle(forReadingFrom: archiveFileURL) let stream = FileStream(fileHandle: fileHandle) let body = ByteStream.stream(stream) - let input = PutObjectInput(body: body, bucket: bucket, contentType: "application/zip", key: archiveKey) + let input = PutObjectInput(body: body, bucket: bucket, cacheControl: "public, immutable", contentType: "application/zip", key: archiveKey) _ = try await s3Client.putObject(input: input) } private var archiveKey: String { - "\(scope)/\(name)/\(version).zip" + (keyPrefix + [scope, name, "\(version).zip"]).joined(separator: "/") } } diff --git a/SPRCLI/Sources/SPR/UploadManifest.swift b/SPRCLI/Sources/SPR/UploadManifest.swift index 13ad90d68da..d846eb95a12 100644 --- a/SPRCLI/Sources/SPR/UploadManifest.swift +++ b/SPRCLI/Sources/SPR/UploadManifest.swift @@ -38,11 +38,11 @@ extension SPRPublisher { let fileHandle = try FileHandle(forReadingFrom: manifestFileURL) let stream = FileStream(fileHandle: fileHandle) let body = ByteStream.stream(stream) - let input = PutObjectInput(body: body, bucket: bucket, contentType: "text/x-swift", key: manifestKey) + let input = PutObjectInput(body: body, bucket: bucket, cacheControl: "public, immutable", contentType: "text/x-swift", key: manifestKey) _ = try await s3Client.putObject(input: input) } private var manifestKey: String { - "\(scope)/\(name)/\(version)/Package.swift" + (keyPrefix + [scope, name, version, "Package.swift"]).joined(separator: "/") } } diff --git a/SPRCLI/Sources/SPR/UploadMetadata.swift b/SPRCLI/Sources/SPR/UploadMetadata.swift index 3e192320df1..6e85d636ddd 100644 --- a/SPRCLI/Sources/SPR/UploadMetadata.swift +++ b/SPRCLI/Sources/SPR/UploadMetadata.swift @@ -38,14 +38,10 @@ extension SPRPublisher { jsonEncoder.outputFormatting = [.prettyPrinted, .sortedKeys] let data = try jsonEncoder.encode(metadata) let body = ByteStream.data(data) - let input = PutObjectInput(body: body, bucket: bucket, contentType: "application/json", key: metadataKey) + let input = PutObjectInput(body: body, bucket: bucket, cacheControl: "public, max-age=3600, immutable", contentType: "application/json", key: metadataKey) _ = try await s3Client.putObject(input: input) } - private var metadataKey: String { - "\(scope)/\(name)/\(version)" - } - private func createMetadata() -> PackageInfo { let formatter = ISO8601DateFormatter() let now = formatter.string(from: Date()) @@ -55,4 +51,8 @@ extension SPRPublisher { let metadata = PackageInfo.Metadata(author: author, description: "A Swift package, what can I say?", licenseURL: nil, originalPublicationTime: now, readmeURL: nil, repositoryURLs: nil) return PackageInfo(id: "\(scope).\(name)", version: version, resources: [resource], metadata: metadata, publishedAt: now) } + + private var metadataKey: String { + (keyPrefix + [scope, name, version]).joined(separator: "/") + } } diff --git a/SPRCLI/Sources/spr-multi-publish/SPRMultiPublish.swift b/SPRCLI/Sources/spr-multi-publish/SPRMultiPublish.swift index 60ac67f8805..189f8991ece 100644 --- a/SPRCLI/Sources/spr-multi-publish/SPRMultiPublish.swift +++ b/SPRCLI/Sources/spr-multi-publish/SPRMultiPublish.swift @@ -11,7 +11,7 @@ import SPR import AWSCLIUtils @main -struct SPRMultiPublish: AsyncParsableCommand { +struct SPRMultiPublish: AsyncParsableCommand, Configurable { static var configuration = CommandConfiguration( commandName: "spr-multi-publish", @@ -29,7 +29,7 @@ struct SPRMultiPublish: AsyncParsableCommand { var region: String = "" @Option(help: "The bucket name for the S3 bucket hosting the Registry. Alternate to this option, the bucket may be obtained from environment var AWS_SDK_SPR_BUCKET.") - var bucket: String? + var bucket: String = "" @Option(help: "The base URL for the registry.") var url: String @@ -41,13 +41,14 @@ struct SPRMultiPublish: AsyncParsableCommand { var replace = false mutating func run() async throws { + try await setOptions() let start = Date() let allPackages = try runtimePackages + serviceClientPackages var allInvalidations = [String]() do { for (name, path) in allPackages { print("Package: \(name)") - var publisher = SPRPublisher( + var publisher = try SPRPublisher( scope: scope, name: name, version: version, @@ -62,10 +63,10 @@ struct SPRMultiPublish: AsyncParsableCommand { allInvalidations.append(contentsOf: publisher.invalidations) print("") } - try await invalidate(allInvalidations) + try await SPRPublisher.invalidate(region: region, distributionID: distributionID, invalidations: allInvalidations) } catch { try printError("Error caught while publishing.") - try await invalidate(allInvalidations) + try await SPRPublisher.invalidate(region: region, distributionID: distributionID, invalidations: allInvalidations) throw error } @@ -73,20 +74,14 @@ struct SPRMultiPublish: AsyncParsableCommand { print("Time elapsed: \(String(format: "%.2f", elapsed)) sec") } - private func invalidate(_ invalidations: [String]) async throws { - print("Finishing & invalidating \(invalidations.count) package lists.") - try await SPRPublisher.invalidate(region: region, distributionID: distributionID, invalidations: invalidations) - } - private var runtimePackages: [(String, String)] { return [ - ("smithy-swift", "../../smithy-swift/"), - awsRuntimePackage("AWSClientRuntime"), - awsRuntimePackage("AWSSDKChecksums"), - awsRuntimePackage("AWSSDKCommon"), - awsRuntimePackage("AWSSDKEventStreamsAuth"), - awsRuntimePackage("AWSSDKHTTPAuth"), - awsRuntimePackage("AWSSDKIdentity"), + awsRuntimePackage("aws-sdk-swift.AWSClientRuntime"), + awsRuntimePackage("aws-sdk-swift.AWSSDKChecksums"), + awsRuntimePackage("aws-sdk-swift.AWSSDKCommon"), + awsRuntimePackage("aws-sdk-swift.AWSSDKEventStreamsAuth"), + awsRuntimePackage("aws-sdk-swift.AWSSDKHTTPAuth"), + awsRuntimePackage("aws-sdk-swift.AWSSDKIdentity"), ] } @@ -100,11 +95,11 @@ struct SPRMultiPublish: AsyncParsableCommand { } } - private func awsRuntimePackage(_ name: String) -> (String, String) { - return (name, "../Sources/Core/\(name)/") + private func awsRuntimePackage(_ directory: String) -> (String, String) { + return (directory.removePrefix("\(scope)."), "../Sources/Core/\(directory)/") } - private func serviceClientPackage(_ name: String) -> (String, String) { - return (name, "../Sources/Services/\(name)/") + private func serviceClientPackage(_ directory: String) -> (String, String) { + return (directory.removePrefix("\(scope)."), "../Sources/Services/\(directory)/") } } diff --git a/SPRCLI/Sources/spr-publish/SPRPublish.swift b/SPRCLI/Sources/spr-publish/SPRPublish.swift index e19c4c49e8a..320a2d92996 100644 --- a/SPRCLI/Sources/spr-publish/SPRPublish.swift +++ b/SPRCLI/Sources/spr-publish/SPRPublish.swift @@ -10,7 +10,7 @@ import ArgumentParser import SPR @main -struct SPRPublish: AsyncParsableCommand { +struct SPRPublish: AsyncParsableCommand, Configurable { static var configuration = CommandConfiguration( commandName: "spr-publish", @@ -34,7 +34,7 @@ struct SPRPublish: AsyncParsableCommand { var region: String = "" @Option(help: "The bucket name for the S3 bucket hosting the Registry. Alternate to this option, the bucket may be obtained from environment var AWS_SDK_SPR_BUCKET.") - public var bucket: String? + public var bucket: String @Option(help: "The base URL for the registry.") var url: String @@ -46,9 +46,10 @@ struct SPRPublish: AsyncParsableCommand { var replace = false mutating func run() async throws { + try await setOptions() let start = Date() print("Package: \(name)") - var publisher = SPRPublisher( + var publisher = try SPRPublisher( scope: scope, name: name, version: version, diff --git a/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md b/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md index a4cf3fa2356..ba72660870d 100644 --- a/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md +++ b/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md @@ -58,17 +58,17 @@ This SDK is open-source. Code is available on Github [here](https://github.com/ ## AWS Runtime Module Documentation -[AWSClientRuntime](../../../../../swift/api/awsclientruntime/latest) +[aws-sdk-swift.AWSClientRuntime](../../../../../swift/api/aws-sdk-swift.awsclientruntime/latest) -[AWSSDKChecksums](../../../../../swift/api/awssdkchecksums/latest) +[aws-sdk-swift.AWSSDKChecksums](../../../../../swift/api/aws-sdk-swift.awssdkchecksums/latest) -[AWSSDKCommon](../../../../../swift/api/awssdkcommon/latest) +[aws-sdk-swift.AWSSDKCommon](../../../../../swift/api/aws-sdk-swift.awssdkcommon/latest) -[AWSSDKEventStreamsAuth](../../../../../swift/api/awssdkeventstreamsauth/latest) +[aws-sdk-swift.AWSSDKEventStreamsAuth](../../../../../swift/api/aws-sdk-swift.awssdkeventstreamsauth/latest) -[AWSSDKHTTPAuth](../../../../../swift/api/awssdkhttpauth/latest) +[aws-sdk-swift.AWSSDKHTTPAuth](../../../../../swift/api/aws-sdk-swift.awssdkhttpauth/latest) -[AWSSDKIdentity](../../../../../swift/api/awssdkidentity/latest) +[aws-sdk-swift.AWSSDKIdentity](../../../../../swift/api/aws-sdk-swift.awssdkidentity/latest) ## Service Documentation diff --git a/Sources/Core/aws-sdk-swift.AWSClientRuntime/.swiftpm/configuration/registries.json b/Sources/Core/aws-sdk-swift.AWSClientRuntime/.swiftpm/configuration/registries.json new file mode 100644 index 00000000000..1e6eb155702 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSClientRuntime/.swiftpm/configuration/registries.json @@ -0,0 +1,18 @@ +{ + "registries" : { + "aws-sdk-swift" : { + "supportsAvailability" : false, + "url" : "https://sdk.amazonaws.com/swift/registry/" + } + }, + "security": { + "scopeOverrides": { + "aws-sdk-swift": { + "signing": { + "onUnsigned": "silentAllow" + } + } + } + }, + "version" : 1 +} diff --git a/Sources/Core/AWSClientRuntime/Package.swift.txt b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Package.swift similarity index 61% rename from Sources/Core/AWSClientRuntime/Package.swift.txt rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Package.swift index 6ff028b3ac0..020fa65765e 100644 --- a/Sources/Core/AWSClientRuntime/Package.swift.txt +++ b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Package.swift @@ -2,6 +2,10 @@ import PackageDescription +let sdkVersion: Version = "0.15.1" +let smithySwiftVersion: Version = "0.54.0" +let crtVersion: Version = "0.32.0" + let package = Package( name: "AWSClientRuntime", platforms: [ @@ -14,22 +18,22 @@ let package = Package( .library(name: "AWSClientRuntime", targets: ["AWSClientRuntime"]), ], dependencies: [ - .package(id: "aws-sdk-swift.AWSSDKCommon", from: "0.0.1"), - .package(id: "aws-sdk-swift.AWSSDKHTTPAuth", from: "0.0.1"), - .package(id: "aws-sdk-swift.AWSSDKIdentity", from: "0.0.1"), - .package(url: "https://github.com/awslabs/aws-crt-swift", exact: "0.30.0"), - .package(id: "aws-sdk-swift.smithy-swift", from: "0.0.1"), + .package(id: "aws-sdk-swift.AWSSDKCommon", exact: sdkVersion), + .package(id: "aws-sdk-swift.AWSSDKHTTPAuth", exact: sdkVersion), + .package(id: "aws-sdk-swift.AWSSDKIdentity", exact: sdkVersion), + .package(url: "https://github.com/awslabs/aws-crt-swift", exact: crtVersion), + .package(url: "https://github.com/awslabs/smithy-swift", exact: smithySwiftVersion), ], targets: [ .target( name: "AWSClientRuntime", dependencies: [ .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyRetriesAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyRetries", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyEventStreamsAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyEventStreamsAuthAPI", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "SmithyRetriesAPI", package: "smithy-swift"), + .product(name: "SmithyRetries", package: "smithy-swift"), + .product(name: "SmithyEventStreamsAPI", package: "smithy-swift"), + .product(name: "SmithyEventStreamsAuthAPI", package: "smithy-swift"), .product(name: "AWSSDKCommon", package: "aws-sdk-swift.AWSSDKCommon"), .product(name: "AWSSDKHTTPAuth", package: "aws-sdk-swift.AWSSDKHTTPAuth"), .product(name: "AWSSDKIdentity", package: "aws-sdk-swift.AWSSDKIdentity"), @@ -40,8 +44,8 @@ let package = Package( name: "AWSClientRuntimeTests", dependencies: [ "AWSClientRuntime", - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyTestUtil", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "SmithyTestUtil", package: "smithy-swift"), .product(name: "AWSSDKCommon", package: "aws-sdk-swift.AWSSDKCommon"), ], resources: [.process("Resources")] diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/AWSClientConfigDefaultsProvider.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSDefaultClientConfiguration.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSDefaultClientConfiguration.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSDefaultClientConfiguration.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSDefaultClientConfiguration.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSRegionClientConfiguration.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSRegionClientConfiguration.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSRegionClientConfiguration.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Config/AWSRegionClientConfiguration.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/FieldResolver.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Config/FieldResolver.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Config/FieldResolver.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Config/FieldResolver.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpoint.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpoint.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpoint.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSEndpoint.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSPartitionDefinition.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSPartitionDefinition.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSPartitionDefinition.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/AWSPartitionDefinition.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/EndpointResolverMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Partition.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Partition.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Partition.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/Partition.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/ServiceEndpointMetadata+Extension.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/ServiceEndpointMetadata+Extension.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/ServiceEndpointMetadata+Extension.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Endpoints/ServiceEndpointMetadata+Extension.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Environment.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Environment.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Environment.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Environment.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSS3ServiceError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSS3ServiceError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSS3ServiceError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSS3ServiceError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSServiceError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSServiceError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSServiceError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/AWSServiceError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/InvalidAccessKeyId.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/InvalidAccessKeyId.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/InvalidAccessKeyId.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/InvalidAccessKeyId.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/UnknownAWSHTTPErrorCandidate.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/UnknownAWSHTTPErrorCandidate.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/UnknownAWSHTTPErrorCandidate.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/Candidates/UnknownAWSHTTPErrorCandidate.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/UnknownAWSHTTPServiceError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/UnknownAWSHTTPServiceError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Errors/UnknownAWSHTTPServiceError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Errors/UnknownAWSHTTPServiceError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/HTTP/HttpResponse+AWS.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/HTTP/HttpResponse+AWS.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/HTTP/HttpResponse+AWS.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/HTTP/HttpResponse+AWS.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSClient.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSClient.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSClient.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSClient.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSConfig.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSConfig.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSConfig.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/IMDS/IMDSConfig.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AWSS3ErrorWith200StatusXMLMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkInvocationIdMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/AmzSdkRequestMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsRequestMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/FlexibleChecksumsResponseMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Route53TrimHostedZoneMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/Sha256TreeHashMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/UserAgentMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Middlewares/XAmzTargetMiddleware.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Plugins/DefaultAWSClientPlugin.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Plugins/DefaultAWSClientPlugin.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Plugins/DefaultAWSClientPlugin.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Plugins/DefaultAWSClientPlugin.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Plugins/RegionPlugin.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Plugins/RegionPlugin.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Plugins/RegionPlugin.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Plugins/RegionPlugin.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/Data+Extension.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/Data+Extension.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/Data+Extension.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/Data+Extension.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/String+Extension.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/String+Extension.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/String+Extension.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/String+Extension.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/TimeInterval+Extension.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/TimeInterval+Extension.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/TimeInterval+Extension.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/PrimitiveExtensions/TimeInterval+Extension.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AWSJSONError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AwsQueryCompatibleErrorDetails.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AwsQueryCompatibleErrorDetails.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AwsQueryCompatibleErrorDetails.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSJSON/AwsQueryCompatibleErrorDetails.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSQuery/AWSQueryError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSQuery/AWSQueryError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSQuery/AWSQueryError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/AWSQuery/AWSQueryError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/Ec2Query/EC2QueryError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/Ec2Query/EC2QueryError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/Ec2Query/EC2QueryError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/Ec2Query/EC2QueryError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestJSON/RestJSONError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestJSON/RestJSONError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestJSON/RestJSONError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestJSON/RestJSONError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestXML/RestXMLError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestXML/RestXMLError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestXML/RestXMLError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Protocols/RestXML/RestXMLError.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/DefaultRegionResolver.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/DefaultRegionResolver.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/DefaultRegionResolver.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/DefaultRegionResolver.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/EnvironmentRegionProvider.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/EnvironmentRegionProvider.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/EnvironmentRegionProvider.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/EnvironmentRegionProvider.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/IMDSRegionProvider.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/IMDSRegionProvider.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/IMDSRegionProvider.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/IMDSRegionProvider.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/ProfileRegionProvider.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/ProfileRegionProvider.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/ProfileRegionProvider.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/ProfileRegionProvider.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionProvider.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionProvider.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionProvider.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionProvider.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionResolver.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionResolver.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionResolver.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Regions/RegionResolver.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Resources/PrivacyInfo.xcprivacy b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Resources/PrivacyInfo.xcprivacy rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Resources/PrivacyInfo.xcprivacy diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Resources/sdk-partitions.json b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Resources/sdk-partitions.json similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Resources/sdk-partitions.json rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Resources/sdk-partitions.json diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryConfig.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryConfig.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryConfig.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryConfig.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryErrorInfoProvider.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryErrorInfoProvider.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryErrorInfoProvider.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryErrorInfoProvider.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryMode.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryMode.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryMode.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Retry/AWSRetryMode.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/APIMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/APIMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/APIMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/APIMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AWSUserAgentMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AWSUserAgentMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AWSUserAgentMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AWSUserAgentMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AdditionalMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AdditionalMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AdditionalMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AdditionalMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDConfig.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDConfig.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDConfig.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDConfig.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/AppIDMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/BusinessMetrics.swift diff --git a/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ConfigMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ConfigMetadata.swift new file mode 100644 index 00000000000..999d242299f --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ConfigMetadata.swift @@ -0,0 +1,24 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +struct ConfigMetadata { + let type: ConfigMetadataType +} + +extension ConfigMetadata: CustomStringConvertible { + + var description: String { + switch type { + case .retry(let mode): + return "cfg/retry-mode#\(mode.rawValue.userAgentToken)" + } + } +} + +enum ConfigMetadataType { + case retry(AWSRetryMode) +} diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ExecutionEnvMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ExecutionEnvMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ExecutionEnvMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/ExecutionEnvMetadata.swift diff --git a/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FeatureMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FeatureMetadata.swift new file mode 100644 index 00000000000..2086df90b57 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FeatureMetadata.swift @@ -0,0 +1,29 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +struct FeatureMetadata { + let feature: String + let version: String? + let additionalMetadata: [AdditionalMetadata] + + init(feature: String, version: String? = nil, additionalMetadata: [AdditionalMetadata] = []) { + self.feature = feature + self.version = version + self.additionalMetadata = additionalMetadata + } + } + +extension FeatureMetadata: CustomStringConvertible { + + var description: String { + var description = "ft/\(feature.userAgentToken)" + if let version = version, !version.isEmpty { + description += "#\(version.userAgentToken)" + } + return description + } +} diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FrameworkMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FrameworkMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FrameworkMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/FrameworkMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/InternalMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/InternalMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/InternalMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/InternalMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/LanguageMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/LanguageMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/LanguageMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/LanguageMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/OSMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/OSMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/OSMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/OSMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/SDKMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/SDKMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/SDKMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/SDKMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/UserAgentMetadata.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/UserAgentMetadata.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/UserAgentMetadata.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/UserAgent/UserAgentMetadata.swift diff --git a/Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Utils.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Utils.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Sources/AWSClientRuntime/Utils.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Sources/AWSClientRuntime/Utils.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Config/FieldResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Config/FieldResolverTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Config/FieldResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Config/FieldResolverTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/DataExtensionTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/DataExtensionTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/DataExtensionTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/DataExtensionTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/EndpointsTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/EndpointsTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/EndpointsTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Endpoints/EndpointsTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/FileBasedConfiguration/FileBasedConfigurationTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/FileBasedConfiguration/FileBasedConfigurationTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/FileBasedConfiguration/FileBasedConfigurationTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/FileBasedConfiguration/FileBasedConfigurationTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/FlexibleChecksumsMiddlewareTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/FlexibleChecksumsMiddlewareTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/FlexibleChecksumsMiddlewareTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/FlexibleChecksumsMiddlewareTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/Sha256TreeHashMiddlewareTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/Sha256TreeHashMiddlewareTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/Sha256TreeHashMiddlewareTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Middlewares/Sha256TreeHashMiddlewareTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AWSJSONErrorTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AWSJSONErrorTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AWSJSONErrorTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AWSJSONErrorTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AwsQueryCompatibleErrorDetailsTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AwsQueryCompatibleErrorDetailsTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AwsQueryCompatibleErrorDetailsTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/AWSJSON/AwsQueryCompatibleErrorDetailsTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/Ec2Query/Ec2ErrorRequestIdTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/Ec2Query/Ec2ErrorRequestIdTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/Ec2Query/Ec2ErrorRequestIdTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/Ec2Query/Ec2ErrorRequestIdTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/RestJSON/RestJSONErrorTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/RestJSON/RestJSONErrorTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/RestJSON/RestJSONErrorTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Protocols/RestJSON/RestJSONErrorTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/DefaultRegionResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/DefaultRegionResolverTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/DefaultRegionResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/DefaultRegionResolverTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/ProfileRegionProviderTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/ProfileRegionProviderTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/ProfileRegionProviderTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Regions/ProfileRegionProviderTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/app_id_config_tests b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/app_id_config_tests similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/app_id_config_tests rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/app_id_config_tests diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/field_resolver_tests b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/field_resolver_tests similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/field_resolver_tests rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/field_resolver_tests diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/file_based_config_tests b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/file_based_config_tests similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/file_based_config_tests rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/file_based_config_tests diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/profile_region_provider_tests b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/profile_region_provider_tests similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/profile_region_provider_tests rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/profile_region_provider_tests diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/retry_config_tests b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/retry_config_tests similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/retry_config_tests rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Resources/retry_config_tests diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryConfigTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryConfigTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryConfigTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryConfigTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryErrorInfoProviderTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryErrorInfoProviderTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryErrorInfoProviderTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryErrorInfoProviderTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryIntegrationTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryIntegrationTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryIntegrationTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/Retry/AWSRetryIntegrationTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/TestError.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/TestError.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/TestError.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/TestError.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/APIMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/APIMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/APIMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/APIMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AWSUserAgentMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AWSUserAgentMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AWSUserAgentMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AWSUserAgentMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDConfigTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDConfigTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDConfigTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDConfigTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/AppIDMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/BusinessMetricsTests.swift diff --git a/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ConfigMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ConfigMetadataTests.swift new file mode 100644 index 00000000000..b78601f2e2d --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ConfigMetadataTests.swift @@ -0,0 +1,27 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +@testable import AWSClientRuntime +import XCTest + +class ConfigMetadataTests: XCTestCase { + + func test_description_returnsCorrectMetadataForRetry() { + let subject = ConfigMetadata(type: .retry(.legacy)) + XCTAssertEqual(subject.description, "cfg/retry-mode#legacy") + } + + func test_description_returnsCorrectMetadataForStandard() { + let subject = ConfigMetadata(type: .retry(.standard)) + XCTAssertEqual(subject.description, "cfg/retry-mode#standard") + } + + func test_description_returnsCorrectMetadataForAdaptive() { + let subject = ConfigMetadata(type: .retry(.adaptive)) + XCTAssertEqual(subject.description, "cfg/retry-mode#adaptive") + } +} diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ExecutionEnvMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ExecutionEnvMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ExecutionEnvMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/ExecutionEnvMetadataTests.swift diff --git a/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FeatureMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FeatureMetadataTests.swift new file mode 100644 index 00000000000..227ee6cf540 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FeatureMetadataTests.swift @@ -0,0 +1,27 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +@testable import AWSClientRuntime +import XCTest + +class FeatureMetadataTests: XCTestCase { + + func test_description_sanitizedFeatureNameAndVersion() { + let subject = FeatureMetadata(feature: "🤡 Car", version: "7.8.🤡") + XCTAssertEqual(subject.description, "ft/--Car#7.8.-") + } + + func test_description_omitsVersionIfVersionIsOmitted() { + let subject = FeatureMetadata(feature: "🤡 Car") + XCTAssertEqual(subject.description, "ft/--Car") + } + + func test_description_omitsVersionIfVersionIsEmptyString() { + let subject = FeatureMetadata(feature: "🤡 Car", version: "") + XCTAssertEqual(subject.description, "ft/--Car") + } +} diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FrameworkMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FrameworkMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FrameworkMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/FrameworkMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/InternalMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/InternalMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/InternalMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/InternalMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/LanguageMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/LanguageMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/LanguageMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/LanguageMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/OSMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/OSMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/OSMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/OSMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/SDKMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/SDKMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/SDKMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/SDKMetadataTests.swift diff --git a/Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/UserAgentMetadataTests.swift b/Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/UserAgentMetadataTests.swift similarity index 100% rename from Sources/Core/AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/UserAgentMetadataTests.swift rename to Sources/Core/aws-sdk-swift.AWSClientRuntime/Tests/AWSClientRuntimeTests/UserAgent/UserAgentMetadataTests.swift diff --git a/Sources/Core/aws-sdk-swift.AWSSDKChecksums/.swiftpm/configuration/registries.json b/Sources/Core/aws-sdk-swift.AWSSDKChecksums/.swiftpm/configuration/registries.json new file mode 100644 index 00000000000..1e6eb155702 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSSDKChecksums/.swiftpm/configuration/registries.json @@ -0,0 +1,18 @@ +{ + "registries" : { + "aws-sdk-swift" : { + "supportsAvailability" : false, + "url" : "https://sdk.amazonaws.com/swift/registry/" + } + }, + "security": { + "scopeOverrides": { + "aws-sdk-swift": { + "signing": { + "onUnsigned": "silentAllow" + } + } + } + }, + "version" : 1 +} diff --git a/Sources/Core/AWSSDKChecksums/Package.swift.txt b/Sources/Core/aws-sdk-swift.AWSSDKChecksums/Package.swift similarity index 51% rename from Sources/Core/AWSSDKChecksums/Package.swift.txt rename to Sources/Core/aws-sdk-swift.AWSSDKChecksums/Package.swift index 999e4d8a110..517aded5f32 100644 --- a/Sources/Core/AWSSDKChecksums/Package.swift.txt +++ b/Sources/Core/aws-sdk-swift.AWSSDKChecksums/Package.swift @@ -2,6 +2,10 @@ import PackageDescription +let sdkVersion: Version = "0.15.1" +let smithySwiftVersion: Version = "0.54.0" +let crtVersion: Version = "0.32.0" + let package = Package( name: "AWSSDKChecksums", platforms: [ @@ -14,20 +18,20 @@ let package = Package( .library(name: "AWSSDKChecksums", targets: ["AWSSDKChecksums"]), ], dependencies: [ - .package(id: "aws-sdk-swift.AWSSDKCommon", from: "0.0.1"), - .package(url: "https://github.com/awslabs/aws-crt-swift", exact: "0.30.0"), - .package(id: "aws-sdk-swift.smithy-swift", from: "0.0.1"), + .package(id: "aws-sdk-swift.AWSSDKCommon", exact: sdkVersion), + .package(url: "https://github.com/awslabs/aws-crt-swift", exact: crtVersion), + .package(url: "https://github.com/awslabs/smithy-swift", exact: smithySwiftVersion), ], targets: [ .target( name: "AWSSDKChecksums", dependencies: [ .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "Smithy", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyHTTPAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyIdentityAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyIdentity", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "Smithy", package: "smithy-swift"), + .product(name: "SmithyHTTPAPI", package: "smithy-swift"), + .product(name: "SmithyIdentityAPI", package: "smithy-swift"), + .product(name: "SmithyIdentity", package: "smithy-swift"), .product(name: "AWSSDKCommon", package: "aws-sdk-swift.AWSSDKCommon"), ] ), diff --git a/Sources/Core/AWSSDKChecksums/Sources/AWSSDKChecksums/AWSChunkedUtil.swift b/Sources/Core/aws-sdk-swift.AWSSDKChecksums/Sources/AWSSDKChecksums/AWSChunkedUtil.swift similarity index 100% rename from Sources/Core/AWSSDKChecksums/Sources/AWSSDKChecksums/AWSChunkedUtil.swift rename to Sources/Core/aws-sdk-swift.AWSSDKChecksums/Sources/AWSSDKChecksums/AWSChunkedUtil.swift diff --git a/Sources/Core/aws-sdk-swift.AWSSDKCommon/.swiftpm/configuration/registries.json b/Sources/Core/aws-sdk-swift.AWSSDKCommon/.swiftpm/configuration/registries.json new file mode 100644 index 00000000000..1e6eb155702 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSSDKCommon/.swiftpm/configuration/registries.json @@ -0,0 +1,18 @@ +{ + "registries" : { + "aws-sdk-swift" : { + "supportsAvailability" : false, + "url" : "https://sdk.amazonaws.com/swift/registry/" + } + }, + "security": { + "scopeOverrides": { + "aws-sdk-swift": { + "signing": { + "onUnsigned": "silentAllow" + } + } + } + }, + "version" : 1 +} diff --git a/Sources/Core/AWSSDKCommon/Package.swift.txt b/Sources/Core/aws-sdk-swift.AWSSDKCommon/Package.swift similarity index 81% rename from Sources/Core/AWSSDKCommon/Package.swift.txt rename to Sources/Core/aws-sdk-swift.AWSSDKCommon/Package.swift index 37e3a8b9101..85df34e9ca2 100644 --- a/Sources/Core/AWSSDKCommon/Package.swift.txt +++ b/Sources/Core/aws-sdk-swift.AWSSDKCommon/Package.swift @@ -2,6 +2,10 @@ import PackageDescription +let sdkVersion: Version = "0.15.1" +let smithySwiftVersion: Version = "0.54.0" +let crtVersion: Version = "0.32.0" + let package = Package( name: "AWSSDKCommon", platforms: [ @@ -14,7 +18,7 @@ let package = Package( .library(name: "AWSSDKCommon", targets: ["AWSSDKCommon"]), ], dependencies: [ - .package(url: "https://github.com/awslabs/aws-crt-swift", exact: "0.30.0"), + .package(url: "https://github.com/awslabs/aws-crt-swift", exact: crtVersion), ], targets: [ .target( diff --git a/Sources/Core/AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/CRTFileBasedConfiguration.swift b/Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/CRTFileBasedConfiguration.swift similarity index 100% rename from Sources/Core/AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/CRTFileBasedConfiguration.swift rename to Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/CRTFileBasedConfiguration.swift diff --git a/Sources/Core/AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfiguration.swift b/Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfiguration.swift similarity index 100% rename from Sources/Core/AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfiguration.swift rename to Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfiguration.swift diff --git a/Sources/Core/AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfigurationKeys.swift b/Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfigurationKeys.swift similarity index 100% rename from Sources/Core/AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfigurationKeys.swift rename to Sources/Core/aws-sdk-swift.AWSSDKCommon/Sources/AWSSDKCommon/FileBasedConfiguration/FileBasedConfigurationKeys.swift diff --git a/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/.swiftpm/configuration/registries.json b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/.swiftpm/configuration/registries.json new file mode 100644 index 00000000000..1e6eb155702 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/.swiftpm/configuration/registries.json @@ -0,0 +1,18 @@ +{ + "registries" : { + "aws-sdk-swift" : { + "supportsAvailability" : false, + "url" : "https://sdk.amazonaws.com/swift/registry/" + } + }, + "security": { + "scopeOverrides": { + "aws-sdk-swift": { + "signing": { + "onUnsigned": "silentAllow" + } + } + } + }, + "version" : 1 +} diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Package.swift.txt b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Package.swift similarity index 60% rename from Sources/Core/AWSSDKEventStreamsAuth/Package.swift.txt rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Package.swift index e112cd9014b..5faff0bc2ab 100644 --- a/Sources/Core/AWSSDKEventStreamsAuth/Package.swift.txt +++ b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Package.swift @@ -2,6 +2,10 @@ import PackageDescription +let sdkVersion: Version = "0.15.1" +let smithySwiftVersion: Version = "0.54.0" +let crtVersion: Version = "0.32.0" + let package = Package( name: "AWSSDKEventStreamsAuth", platforms: [ @@ -14,26 +18,26 @@ let package = Package( .library(name: "AWSSDKEventStreamsAuth", targets: ["AWSSDKEventStreamsAuth"]), ], dependencies: [ - .package(id: "aws-sdk-swift.AWSSDKHTTPAuth", from: "0.0.1"), - .package(url: "https://github.com/awslabs/aws-crt-swift", exact: "0.30.0"), - .package(id: "aws-sdk-swift.smithy-swift", from: "0.0.1"), + .package(id: "aws-sdk-swift.AWSSDKHTTPAuth", exact: sdkVersion), + .package(url: "https://github.com/awslabs/aws-crt-swift", exact: crtVersion), + .package(url: "https://github.com/awslabs/smithy-swift", exact: smithySwiftVersion), ], targets: [ .target( name: "AWSSDKEventStreamsAuth", dependencies: [ .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyEventStreamsAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyEventStreamsAuthAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyEventStreams", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "SmithyEventStreamsAPI", package: "smithy-swift"), + .product(name: "SmithyEventStreamsAuthAPI", package: "smithy-swift"), + .product(name: "SmithyEventStreams", package: "smithy-swift"), .product(name: "AWSSDKHTTPAuth", package: "aws-sdk-swift.AWSSDKHTTPAuth"), ] ), .testTarget(name: "AWSSDKEventStreamsAuthTests", dependencies: [ "AWSSDKEventStreamsAuth", - .product(name: "SmithyStreams", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyTestUtil", package: "aws-sdk-swift.smithy-swift"), + .product(name: "SmithyStreams", package: "smithy-swift"), + .product(name: "SmithyTestUtil", package: "smithy-swift"), ]), ] ) diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSMessageSigner.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSMessageSigner.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSMessageSigner.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSMessageSigner.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSSigV4Signer+EventStreams.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSSigV4Signer+EventStreams.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSSigV4Signer+EventStreams.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/AWSSigV4Signer+EventStreams.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+AWSEventStreamsAuth.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+AWSEventStreamsAuth.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+AWSEventStreamsAuth.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+AWSEventStreamsAuth.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+Signing.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+Signing.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+Signing.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/Context+Signing.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/String+hexaData.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/String+hexaData.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/String+hexaData.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Sources/AWSSSDKEventStreamsAuth/String+hexaData.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageDecoderStreamTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageDecoderStreamTests.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageDecoderStreamTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageDecoderStreamTests.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageEncoderStreamTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageEncoderStreamTests.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageEncoderStreamTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/AWSMessageEncoderStreamTests.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/EventStreamTestData.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/EventStreamTestData.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/EventStreamTestData.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/EventStreamTestData.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/SigV4EventSigningTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/SigV4EventSigningTests.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/SigV4EventSigningTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/SigV4EventSigningTests.swift diff --git a/Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/TestCustomAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/TestCustomAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/TestCustomAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKEventStreamsAuth/Tests/AWSSDKEventStreamsAuthTests/TestCustomAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/.swiftpm/configuration/registries.json b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/.swiftpm/configuration/registries.json new file mode 100644 index 00000000000..1e6eb155702 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/.swiftpm/configuration/registries.json @@ -0,0 +1,18 @@ +{ + "registries" : { + "aws-sdk-swift" : { + "supportsAvailability" : false, + "url" : "https://sdk.amazonaws.com/swift/registry/" + } + }, + "security": { + "scopeOverrides": { + "aws-sdk-swift": { + "signing": { + "onUnsigned": "silentAllow" + } + } + } + }, + "version" : 1 +} diff --git a/Sources/Core/AWSSDKHTTPAuth/Package.swift.txt b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Package.swift similarity index 58% rename from Sources/Core/AWSSDKHTTPAuth/Package.swift.txt rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Package.swift index 76728defcc9..7037d544eba 100644 --- a/Sources/Core/AWSSDKHTTPAuth/Package.swift.txt +++ b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Package.swift @@ -2,6 +2,10 @@ import PackageDescription +let sdkVersion: Version = "0.15.1" +let smithySwiftVersion: Version = "0.54.0" +let crtVersion: Version = "0.32.0" + let package = Package( name: "AWSSDKHTTPAuth", platforms: [ @@ -14,19 +18,19 @@ let package = Package( .library(name: "AWSSDKHTTPAuth", targets: ["AWSSDKHTTPAuth"]), ], dependencies: [ - .package(id: "aws-sdk-swift.AWSSDKIdentity", from: "0.0.1"), - .package(id: "aws-sdk-swift.AWSSDKChecksums", from: "0.0.1"), - .package(url: "https://github.com/awslabs/aws-crt-swift", exact: "0.30.0"), - .package(id: "aws-sdk-swift.smithy-swift", from: "0.0.1"), + .package(id: "aws-sdk-swift.AWSSDKIdentity", exact: sdkVersion), + .package(id: "aws-sdk-swift.AWSSDKChecksums", exact: sdkVersion), + .package(url: "https://github.com/awslabs/aws-crt-swift", exact: crtVersion), + .package(url: "https://github.com/awslabs/smithy-swift", exact: smithySwiftVersion), ], targets: [ .target( name: "AWSSDKHTTPAuth", dependencies: [ .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "Smithy", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyHTTPAuth", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "Smithy", package: "smithy-swift"), + .product(name: "SmithyHTTPAuth", package: "smithy-swift"), .product(name: "AWSSDKIdentity", package: "aws-sdk-swift.AWSSDKIdentity"), .product(name: "AWSSDKChecksums", package: "aws-sdk-swift.AWSSDKChecksums"), ] @@ -36,8 +40,8 @@ let package = Package( dependencies: [ "AWSSDKHTTPAuth", .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyTestUtil", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "SmithyTestUtil", package: "smithy-swift"), ] ), ] diff --git a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/AWSSigV4Signer.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/AWSSigV4Signer.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/AWSSigV4Signer.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/AWSSigV4Signer.swift diff --git a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/CustomSigningPropertiesSetter.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/CustomSigningPropertiesSetter.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/CustomSigningPropertiesSetter.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/CustomSigningPropertiesSetter.swift diff --git a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AAuthScheme.swift diff --git a/Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Sources/AWSSDKHTTPAuth/SigV4AuthScheme.swift diff --git a/Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/CustomSigningPropertiesSetterTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/CustomSigningPropertiesSetterTests.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/CustomSigningPropertiesSetterTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/CustomSigningPropertiesSetterTests.swift diff --git a/Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4AuthSchemeTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4AuthSchemeTests.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4AuthSchemeTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4AuthSchemeTests.swift diff --git a/Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4SigningTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4SigningTests.swift similarity index 100% rename from Sources/Core/AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4SigningTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKHTTPAuth/Tests/AWSSDKHTTPAuthTests/SigV4SigningTests.swift diff --git a/Sources/Core/aws-sdk-swift.AWSSDKIdentity/.swiftpm/configuration/registries.json b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/.swiftpm/configuration/registries.json new file mode 100644 index 00000000000..1e6eb155702 --- /dev/null +++ b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/.swiftpm/configuration/registries.json @@ -0,0 +1,18 @@ +{ + "registries" : { + "aws-sdk-swift" : { + "supportsAvailability" : false, + "url" : "https://sdk.amazonaws.com/swift/registry/" + } + }, + "security": { + "scopeOverrides": { + "aws-sdk-swift": { + "signing": { + "onUnsigned": "silentAllow" + } + } + } + }, + "version" : 1 +} diff --git a/Sources/Core/AWSSDKIdentity/Package.swift.txt b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Package.swift similarity index 51% rename from Sources/Core/AWSSDKIdentity/Package.swift.txt rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Package.swift index 0a7f692819e..ca789b74ba9 100644 --- a/Sources/Core/AWSSDKIdentity/Package.swift.txt +++ b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Package.swift @@ -2,6 +2,10 @@ import PackageDescription +let sdkVersion: Version = "0.15.1" +let smithySwiftVersion: Version = "0.54.0" +let crtVersion: Version = "0.32.0" + let package = Package( name: "AWSSDKIdentity", platforms: [ @@ -14,20 +18,20 @@ let package = Package( .library(name: "AWSSDKIdentity", targets: ["AWSSDKIdentity"]), ], dependencies: [ - .package(id: "aws-sdk-swift.AWSSDKCommon", from: "0.0.1"), - .package(url: "https://github.com/awslabs/aws-crt-swift", exact: "0.30.0"), - .package(id: "aws-sdk-swift.smithy-swift", from: "0.0.1"), + .package(id: "aws-sdk-swift.AWSSDKCommon", exact: sdkVersion), + .package(url: "https://github.com/awslabs/aws-crt-swift", exact: crtVersion), + .package(url: "https://github.com/awslabs/smithy-swift", exact: smithySwiftVersion), ], targets: [ .target( name: "AWSSDKIdentity", dependencies: [ .product(name: "AwsCommonRuntimeKit", package: "aws-crt-swift"), - .product(name: "ClientRuntime", package: "aws-sdk-swift.smithy-swift"), - .product(name: "Smithy", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyHTTPAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyIdentityAPI", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyIdentity", package: "aws-sdk-swift.smithy-swift"), + .product(name: "ClientRuntime", package: "smithy-swift"), + .product(name: "Smithy", package: "smithy-swift"), + .product(name: "SmithyHTTPAPI", package: "smithy-swift"), + .product(name: "SmithyIdentityAPI", package: "smithy-swift"), + .product(name: "SmithyIdentity", package: "smithy-swift"), .product(name: "AWSSDKCommon", package: "aws-sdk-swift.AWSSDKCommon"), ] ), @@ -35,8 +39,8 @@ let package = Package( name: "AWSSDKIdentityTests", dependencies: [ "AWSSDKIdentity", - .product(name: "Smithy", package: "aws-sdk-swift.smithy-swift"), - .product(name: "SmithyIdentity", package: "aws-sdk-swift.smithy-swift"), + .product(name: "Smithy", package: "smithy-swift"), + .product(name: "SmithyIdentity", package: "smithy-swift"), ] ), ] diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentity.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentity.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentity.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentity.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/DefaultBearerTokenIdentityResolverChain.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/DefaultBearerTokenIdentityResolverChain.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/DefaultBearerTokenIdentityResolverChain.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/DefaultBearerTokenIdentityResolverChain.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/SSOBearerTokenIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/SSOBearerTokenIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/SSOBearerTokenIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/BearerTokenIdentityResolvers/SSOBearerTokenIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/CachedAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/CachedAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/CachedAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/CachedAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/CustomAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/CustomAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/CustomAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/CustomAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/DefaultAWSCredentialIdentityResolverChain.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/DefaultAWSCredentialIdentityResolverChain.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/DefaultAWSCredentialIdentityResolverChain.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/DefaultAWSCredentialIdentityResolverChain.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/ECSAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/ECSAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/ECSAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/ECSAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/EnvironmentAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/EnvironmentAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/EnvironmentAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/EnvironmentAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/IMDSAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/IMDSAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/IMDSAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/IMDSAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/ProcessAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/ProcessAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/ProcessAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/ProcessAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/ProfileAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/ProfileAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/ProfileAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/ProfileAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/SSOAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/SSOAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/SSOAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/SSOAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/STSAssumeRoleAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/STSAssumeRoleAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/STSAssumeRoleAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/STSAssumeRoleAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/STSWebIdentityAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/STSWebIdentityAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/STSWebIdentityAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/STSWebIdentityAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/StaticAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/StaticAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Sources/AWSSDKIdentity/AWSCredentialIdentityResolvers/StaticAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Sources/AWSSDKIdentity/StaticAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/CachedAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/CachedAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/CachedAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/CachedAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/DefaultAWSCredentialIdentityResolverChainTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/DefaultAWSCredentialIdentityResolverChainTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/DefaultAWSCredentialIdentityResolverChainTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/DefaultAWSCredentialIdentityResolverChainTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ECSAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ECSAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ECSAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ECSAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/EnvironmentAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/EnvironmentAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/EnvironmentAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/EnvironmentAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProcessAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProcessAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProcessAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProcessAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProfileAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProfileAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProfileAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/ProfileAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/SSOAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/SSOAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/SSOAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/SSOAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityResolverTests/STSAssumeRoleAWSCredentialIdentityResolverTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/AWSCredentialIdentityTests.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Mocks/MockAWSCredentialIdentityResolver.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Mocks/MockAWSCredentialIdentityResolver.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Mocks/MockAWSCredentialIdentityResolver.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Mocks/MockAWSCredentialIdentityResolver.swift diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.json b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.json similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.json rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/a94a8fe5ccb19ba61c4c0873d391e987982fbbd3.json diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config_with_process b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config_with_process similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config_with_process rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/config_with_process diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/credentials b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/credentials similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/credentials rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/credentials diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/sso_tests b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/sso_tests similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/sso_tests rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/sso_tests diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/test_token.txt b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/test_token.txt similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/test_token.txt rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/Resources/test_token.txt diff --git a/Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/BearerTokenIdentityResolverTests/SSOBearerTokenIdentitiyResolverTests.swift b/Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/SSOBearerTokenIdentityResolverTests.swift similarity index 100% rename from Sources/Core/AWSSDKIdentity/Tests/AWSSDKIdentityTests/BearerTokenIdentityResolverTests/SSOBearerTokenIdentitiyResolverTests.swift rename to Sources/Core/aws-sdk-swift.AWSSDKIdentity/Tests/AWSSDKIdentityTests/SSOBearerTokenIdentityResolverTests.swift diff --git a/codegen/sdk-codegen/build.gradle.kts b/codegen/sdk-codegen/build.gradle.kts index 56e67030113..d11854a7695 100644 --- a/codegen/sdk-codegen/build.gradle.kts +++ b/codegen/sdk-codegen/build.gradle.kts @@ -166,30 +166,38 @@ fun discoverServices(): List { val discoveredServices: List by lazy { discoverServices() } val packageVersion = rootProject.file("Package.version.next").readText(Charset.forName("UTF-8")).trim() +val packageScope = rootProject.file("Package.scope").readText(Charset.forName("UTF-8")) + +val AwsService.scopedPackageName: String + get() = packageName.takeIf { packageScope.isEmpty() } ?: (packageScope + "." + packageName) val AwsService.outputDir: String get() = project.file("${project.buildDir}/smithyprojections/${project.name}/${projectionName}/swift-codegen").absolutePath val AwsService.sourcesDir: String get(){ - return rootProject.file("Sources/Services/$packageName").absolutePath + return rootProject.file("Sources/Services/$scopedPackageName").absolutePath } /** * Service specific model extras */ val AwsService.modelExtrasDir: String - get() = rootProject.file("Tests/AdditionalServiceTests/$packageName/models").absolutePath + get() = rootProject.file("Tests/AdditionalServiceTests/$scopedPackageName/models").absolutePath task("stageSdks") { group = "codegen" description = "relocate generated SDK artifacts from build directory to correct locations" doLast { + val withManifests = project.properties["withManifests"] != null discoveredServices.forEach { logger.info("copying ${it.outputDir} source to ${it.sourcesDir}") copy { from(it.outputDir) into(it.sourcesDir) + if (!withManifests) { + exclude("Package.swift") + } exclude { details -> // Exclude `SmokeTests` directory details.file.name.endsWith("SmokeTests") diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSSwiftDependency.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSSwiftDependency.kt index 0d1dcdcf80a..253e009f0ca 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSSwiftDependency.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSSwiftDependency.kt @@ -4,45 +4,26 @@ */ package software.amazon.smithy.aws.swift.codegen import software.amazon.smithy.swift.codegen.SwiftDependency +import software.amazon.smithy.swift.codegen.SwiftDependency.DistributionMethod class AWSSwiftDependency { companion object { - val AWS_SDK_IDENTITY = SwiftDependency( - "AWSSDKIdentity", - "main", - "0.0.1", - "aws-sdk-swift", - "../../../aws-sdk-swift", - "AWSSDKIdentity", - SwiftDependency.DistributionMethod.SPR, - ) - val AWS_SDK_HTTP_AUTH = SwiftDependency( - "AWSSDKHTTPAuth", - "main", - "0.0.1", - "aws-sdk-swift", - "../../../aws-sdk-swift", - "AWSSDKHTTPAuth", - SwiftDependency.DistributionMethod.SPR, - ) - val AWS_SDK_EVENT_STREAMS_AUTH = SwiftDependency( - "AWSSDKEventStreamsAuth", - "main", - "0.0.1", - "aws-sdk-swift", - "../../../aws-sdk-swift", - "AWSSDKEventStreamsAuth", - SwiftDependency.DistributionMethod.SPR, - ) - val AWS_CLIENT_RUNTIME = SwiftDependency( - "AWSClientRuntime", - "main", - "0.0.1", - "aws-sdk-swift", - "../../../aws-sdk-swift", - "AWSClientRuntime", - SwiftDependency.DistributionMethod.SPR, - ) + val AWS_SDK_IDENTITY = awsTargetNamed("AWSSDKIdentity") + val AWS_SDK_HTTP_AUTH = awsTargetNamed("AWSSDKHTTPAuth") + val AWS_SDK_EVENT_STREAMS_AUTH = awsTargetNamed("AWSSDKEventStreamsAuth") + val AWS_CLIENT_RUNTIME = awsTargetNamed("AWSClientRuntime") + + private fun awsTargetNamed(name: String): SwiftDependency { + return SwiftDependency( + name, + "main", + "0.15.1", + "aws-sdk-swift", + "../../../aws-sdk-swift", + name, + DistributionMethod.SPR, + ) + } } } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftintegrations/RegistryConfigIntegration.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftintegrations/RegistryConfigIntegration.kt index 2c49b72c557..688187b7378 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftintegrations/RegistryConfigIntegration.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/swiftintegrations/RegistryConfigIntegration.kt @@ -22,17 +22,17 @@ class RegistryConfigIntegration : SwiftIntegration { "registries" : { "aws-sdk-swift" : { "supportsAvailability" : false, - "url" : "https://d1b0xmm48lrxf5.cloudfront.net/" + "url" : "https://sdk.amazonaws.com/swift/registry/" } }, "security": { "scopeOverrides": { "aws-sdk-swift": { - "signing": { - "onUnsigned": "silentAllow" + "signing": { + "onUnsigned": "silentAllow" + } } } - } }, "version" : 1 } diff --git a/scripts/codegen.sh b/scripts/codegen.sh index 53e38550e87..3c7088dc7d7 100755 --- a/scripts/codegen.sh +++ b/scripts/codegen.sh @@ -29,7 +29,7 @@ rm -rf SmokeTests/* ./gradlew -p codegen/sdk-codegen build # Move generated Swift code into place in the Sources/ dir -./gradlew -p codegen/sdk-codegen stageSdks +./gradlew -p codegen/sdk-codegen stageSdks -PwithManifests # Regenerate the package manifest and doc index, with args passed into this script cd AWSSDKSwiftCLI diff --git a/scripts/manifestgen.sh b/scripts/manifestgen.sh new file mode 100755 index 00000000000..9ca0d3d3bbb --- /dev/null +++ b/scripts/manifestgen.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# Stop on any failed step of this script +set -eo pipefail + +# Regenerates the SDK package manifest. For use during development only. + +# May be used on Mac or Linux. +# When run on Mac, kills Xcode before codegen & restarts it after. + +# Run this script from the SDK project root directory. + +# If on Mac, quit Xcode so it doesn't get overwhelmed by source file changes. +if [ -x "$(command -v osascript)" ]; then + osascript -e 'quit app "Xcode"' +fi + +# Regenerate the package manifest and doc index, with args passed into this script +cd AWSSDKSwiftCLI +unset AWS_SWIFT_SDK_USE_LOCAL_DEPS +swift run AWSSDKSwiftCLI generate-package-manifest "$@" .. +swift run AWSSDKSwiftCLI generate-doc-index .. +cd .. + +# If on Mac, open Xcode to the newly refreshed SDK +if [ -x "$(command -v osascript)" ]; then + open -a Xcode +fi