From a2cf85a91a311ddebb31a0241598253c07fd9a2c Mon Sep 17 00:00:00 2001 From: Di Wu Date: Fri, 17 May 2024 10:49:11 -0700 Subject: [PATCH] rename package name to InternalAmplifyNetwork --- .../xcschemes/Amplify-Package.xcscheme | 19 ++++++++++--------- .../AppSyncRealTimeClient.swift | 2 +- .../AppSyncRealTimeSubscription.swift | 2 +- .../AppSyncWebSocketClientProtocol.swift | 2 +- .../APIKeyAuthInterceptor.swift | 2 +- .../AuthTokenInterceptor.swift | 2 +- .../IAMAuthInterceptor.swift | 2 +- .../AppSyncRealTimeClientFactory.swift | 2 +- .../AppSyncRealTimeClientTests.swift | 2 +- .../AppSyncRealTimeClientTests.swift | 2 +- .../Mocks/MockSubscription.swift | 2 +- .../WebSocket/RetryWithJitterTests.swift | 2 +- .../WebSocket/WebSocketClientTests.swift | 2 +- Package.swift | 8 ++++---- 14 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme index 08c2c9efc2..c13ed00ec0 100644 --- a/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme +++ b/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme @@ -751,6 +751,16 @@ ReferencedContainer = "container:"> + + + + - - - - diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift index d791c3920a..dcab347d96 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeClient.swift @@ -9,7 +9,7 @@ import Foundation import Combine import Amplify -@_spi(WebSocket) @_spi(RetryWithJitter) import AmplifyNetwork +@_spi(WebSocket) @_spi(RetryWithJitter) import InternalAmplifyNetwork protocol AppSyncRealTimeClientProtocol { func connect() async throws diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift index a9c01c58bf..2997311b7b 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncRealTimeSubscription.swift @@ -9,7 +9,7 @@ import Foundation import Combine import Amplify -@_spi(RetryWithJitter) import AmplifyNetwork +@_spi(RetryWithJitter) import InternalAmplifyNetwork /** AppSyncRealTimeSubscription reprensents one realtime subscription to AppSync realtime server. diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift index 2f43414296..8969aaa1e3 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/AppSyncRealTimeClient/AppSyncWebSocketClientProtocol.swift @@ -8,7 +8,7 @@ import Foundation import Combine -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork protocol AppSyncWebSocketClientProtocol: AnyObject { var isConnected: Bool { get async } diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/APIKeyAuthInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/APIKeyAuthInterceptor.swift index a2d122d50b..7174bfd414 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/APIKeyAuthInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/APIKeyAuthInterceptor.swift @@ -8,7 +8,7 @@ import Foundation import Amplify -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork class APIKeyAuthInterceptor { private let apiKey: String diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/AuthTokenInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/AuthTokenInterceptor.swift index b72c3310c4..c5ed1b50e7 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/AuthTokenInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/AuthTokenInterceptor.swift @@ -7,7 +7,7 @@ import Foundation import Amplify -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork /// General purpose authenticatication subscriptions interceptor for providers whose only /// requirement is to provide an authentication token via the "Authorization" header diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift index cad6e5d4ec..41d4aa26b6 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/Interceptor/SubscriptionInterceptor/IAMAuthInterceptor.swift @@ -10,7 +10,7 @@ import Amplify import AWSClientRuntime import ClientRuntime import AWSPluginsCore -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork class IAMAuthInterceptor { diff --git a/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift b/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift index 24ebb1d03f..3f8a7a5d5e 100644 --- a/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift +++ b/AmplifyPlugins/API/Sources/AWSAPIPlugin/SubscriptionFactory/AppSyncRealTimeClientFactory.swift @@ -10,7 +10,7 @@ import Foundation import Amplify import Combine import AWSPluginsCore -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork protocol AppSyncRealTimeClientFactoryProtocol { diff --git a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/AppSyncRealTimeClientTests.swift b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/AppSyncRealTimeClientTests.swift index 3687fe969a..3966917b5e 100644 --- a/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/AppSyncRealTimeClientTests.swift +++ b/AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginFunctionalTests/AppSyncRealTimeClientTests.swift @@ -11,7 +11,7 @@ import Combine @testable import Amplify @testable import AWSAPIPlugin @testable import AWSPluginsCore -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork class AppSyncRealTimeClientTests: XCTestCase { let subscriptionRequest = """ diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift index 3232fb3281..dc68e851cc 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/AppSyncRealTimeClient/AppSyncRealTimeClientTests.swift @@ -10,7 +10,7 @@ import XCTest import Combine import Amplify @testable import AWSAPIPlugin -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork class AppSyncRealTimeClientTests: XCTestCase { diff --git a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift index ce698cd3ff..9840a28170 100644 --- a/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift +++ b/AmplifyPlugins/API/Tests/AWSAPIPluginTests/Mocks/MockSubscription.swift @@ -11,7 +11,7 @@ import Amplify import Combine @testable import AWSAPIPlugin @testable import AWSPluginsCore -@_spi(WebSocket) import AmplifyNetwork +@_spi(WebSocket) import InternalAmplifyNetwork struct MockSubscriptionConnectionFactory: AppSyncRealTimeClientFactoryProtocol { diff --git a/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/RetryWithJitterTests.swift b/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/RetryWithJitterTests.swift index b7a023be44..d1bbe4a22c 100644 --- a/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/RetryWithJitterTests.swift +++ b/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/RetryWithJitterTests.swift @@ -8,7 +8,7 @@ import XCTest @testable import AWSPluginsCore -@testable @_spi(RetryWithJitter) import AmplifyNetwork +@testable @_spi(RetryWithJitter) import InternalAmplifyNetwork class RetryWithJitterTests: XCTestCase { struct TestError: Error { diff --git a/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/WebSocketClientTests.swift b/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/WebSocketClientTests.swift index be05e55443..51b7a2e8f9 100644 --- a/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/WebSocketClientTests.swift +++ b/AmplifyPlugins/Internal/Tests/NetworkTests/WebSocket/WebSocketClientTests.swift @@ -9,7 +9,7 @@ import XCTest import Combine @testable import AWSPluginsCore -@testable @_spi(WebSocket) @_spi(NetworkReachability) import AmplifyNetwork +@testable @_spi(WebSocket) @_spi(NetworkReachability) import InternalAmplifyNetwork fileprivate let timeout: TimeInterval = 5 diff --git a/Package.swift b/Package.swift index 38de745653..bc4ce0b4a5 100644 --- a/Package.swift +++ b/Package.swift @@ -116,7 +116,7 @@ let apiTargets: [Target] = [ dependencies: [ .target(name: "Amplify"), .target(name: "AWSPluginsCore"), - .target(name: "AmplifyNetwork") + .target(name: "InternalAmplifyNetwork") ], path: "AmplifyPlugins/API/Sources/AWSAPIPlugin", exclude: [ @@ -318,17 +318,17 @@ let internalPinpointTargets: [Target] = [ let internalNetworkingTargets: [Target] = [ .target( - name: "AmplifyNetwork", + name: "InternalAmplifyNetwork", dependencies: [ .target(name: "Amplify") ], path: "AmplifyPlugins/Internal/Sources/Network" ), .testTarget( - name: "AmplifyNetworkUnitTests", + name: "InternalAmplifyNetworkUnitTests", dependencies: [ "AmplifyTestCommon", - "AmplifyNetwork" + "InternalAmplifyNetwork" ], path: "AmplifyPlugins/Internal/Tests/NetworkTests" )