Skip to content

Commit

Permalink
change _spi to _implementationOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
5d committed Mar 28, 2024
1 parent 6c99824 commit 559147e
Show file tree
Hide file tree
Showing 26 changed files with 20 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import Combine
import Amplify
@_spi(WebSocket) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

protocol AppSyncRealTimeClientProtocol {
func connect() async throws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import Combine
import Amplify
@_spi(WebSocket) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

/**
AppSyncRealTimeSubscription reprensents one realtime subscription to AppSync realtime server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation
import Combine
@_spi(WebSocket) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

protocol AppSyncWebSocketClientProtocol: AnyObject {
var isConnected: Bool { get async }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation
import Amplify
@_spi(WebSocket) @_spi(AppSyncRTC) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

class APIKeyAuthInterceptor {
private let apiKey: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation
import Amplify
@_spi(WebSocket) @_spi(AppSyncRTC) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

/// General purpose authenticatication subscriptions interceptor for providers whose only
/// requirement is to provide an authentication token via the "Authorization" header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Amplify
import AWSClientRuntime
import ClientRuntime
import AWSPluginsCore
@_spi(WebSocket) @_spi(AppSyncRTC) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

class IAMAuthInterceptor {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Amplify
import Foundation
import AWSPluginsCore
import Combine
@_spi(AppSyncRTC) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

public class AWSGraphQLSubscriptionTaskRunner<R: Decodable>: InternalTaskRunner, InternalTaskAsyncThrowingSequence, InternalTaskThrowingChannel {
public typealias Request = GraphQLOperationRequest<R>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import Amplify
import Combine
import AWSPluginsCore
@_spi(WebSocket) @_spi(AppSyncRTC) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork


protocol AppSyncRealTimeClientFactoryProtocol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Combine
@testable import Amplify
@testable import AWSAPIPlugin
@testable import AWSPluginsCore
@testable @_spi(WebSocket) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork

class AppSyncRealTimeClientTests: XCTestCase {
let subscriptionRequest = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import XCTest
import Combine
import Amplify
@testable import AWSAPIPlugin
@_spi(WebSocket) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

class AppSyncRealTimeClientTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import XCTest
import Amplify
@testable import AWSAPIPlugin
@testable @_spi(AppSyncRTC) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork

class APIKeyAuthInterceptorTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import XCTest
import Amplify
@testable import AWSAPIPlugin
@testable import AWSPluginsCore
@testable @_spi(WebSocket) @_spi(AppSyncRTC) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork

class CognitoAuthInterceptorTests: XCTestCase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Amplify
import Combine
@testable import AWSAPIPlugin
@testable import AWSPluginsCore
@testable @_spi(WebSocket) @_spi(AppSyncRTC) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork

struct MockSubscriptionConnectionFactory: AppSyncRealTimeClientFactoryProtocol {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import XCTest
@testable import Amplify
@testable import AWSAPIPlugin
@testable import AmplifyTestCommon
@testable @_spi(WebSocket) import AWSPluginsCore
@testable import AWSPluginsCore
@testable import AWSPluginsTestCommon

// swiftlint:disable:next type_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import XCTest
import Amplify
@testable import AmplifyTestCommon
@testable import AWSAPIPlugin
@testable @_spi(AppSyncRTC) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork
@_implementationOnly import AmplifyAsyncTesting

class GraphQLSubscribeCombineTests: OperationTestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import XCTest
import Amplify
@testable import AmplifyTestCommon
@testable import AWSAPIPlugin
@testable @_spi(AppSyncRTC) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork
@_implementationOnly import AmplifyAsyncTesting

class GraphQLSubscribeTasksTests: OperationTestBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import XCTest
@testable import Amplify
@testable import AmplifyTestCommon
@testable import AWSAPIPlugin
@testable @_spi(AppSyncRTC) import AmplifyNetwork
@testable @_implementationOnly import AmplifyNetwork

class GraphQLSubscribeTests: OperationTestBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import XCTest
import Combine
import Amplify
@testable import AWSAPIPlugin
@_spi(AppSyncRTC) import AmplifyNetwork
@_implementationOnly import AmplifyNetwork

class DataStoreLargeNumberModelsSubscriptionTests: SyncEngineIntegrationTestBase {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import Network
import Combine

@_spi(WebSocket)
public final class AmplifyNetworkMonitor {

public enum State {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import Foundation

@_spi(WebSocket)
public actor RetryWithJitter {
public enum Error: Swift.Error {
case maxRetryExceeded([Swift.Error])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import Combine
WebSocketClient wraps URLSessionWebSocketTask and offers
an abstraction of the data stream in the form of WebSocketEvent.
*/
@_spi(WebSocket)
public final actor WebSocketClient: NSObject {
public enum Error: Swift.Error {
case connectionLost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import Foundation

@_spi(WebSocket)
public enum WebSocketEvent {
case connected
case disconnected(URLSessionWebSocketTask.CloseCode, String?)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import Foundation

@_spi(WebSocket)
public protocol WebSocketInterceptor {
func interceptConnection(url: URL) async -> URL
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import Foundation
import Combine

@_spi(WebSocket)
public protocol WebSocketNetworkMonitorProtocol {
var publisher: AnyPublisher<(AmplifyNetworkMonitor.State, AmplifyNetworkMonitor.State), Never> { get }
func updateState(_ nextState: AmplifyNetworkMonitor.State) async
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


import XCTest
@testable @_spi(WebSocket) import AWSPluginsCore
@testable import AWSPluginsCore

class RetryWithJitterTests: XCTestCase {
struct TestError: Error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import XCTest
import Combine
@testable @_spi(WebSocket) import AWSPluginsCore
@testable import AWSPluginsCore

fileprivate let timeout: TimeInterval = 5

Expand Down

0 comments on commit 559147e

Please sign in to comment.