Skip to content

Commit 8e43cc5

Browse files
authored
Rename DataStoreCategoryPlugin to DataStorePlugin (#222)
1 parent 9d7fead commit 8e43cc5

16 files changed

+40
-40
lines changed

AmplifyPlugins.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Pod::Spec.new do |s|
3131
ss.dependency 'Starscream', '~> 3.0.2'
3232
end
3333

34-
s.subspec 'AWSDataStoreCategoryPlugin' do |ss|
34+
s.subspec 'AWSDataStorePlugin' do |ss|
3535
ss.source_files = 'AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/**/*.swift'
3636
ss.dependency 'AWSPluginsCore', AMPLIFY_VERSION
3737
ss.dependency 'SQLite.swift', '~> 0.12.0'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Amplify
99
import AWSPluginsCore
1010

11-
extension AWSDataStoreCategoryPlugin: DataStoreBaseBehavior {
11+
extension AWSDataStorePlugin: DataStoreBaseBehavior {
1212

1313
public func save<M: Model>(_ model: M,
1414
completion: @escaping DataStoreCallback<M>) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Amplify
99
import Combine
1010

11-
extension AWSDataStoreCategoryPlugin: DataStoreSubscribeBehavior {
11+
extension AWSDataStorePlugin: DataStoreSubscribeBehavior {
1212
@available(iOS 13.0, *)
1313
public func publisher<M: Model>(for modelType: M.Type)
1414
-> AnyPublisher<MutationEvent, DataStoreError> {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
import Amplify
99

10-
extension AWSDataStoreCategoryPlugin: DefaultLogger { }
10+
extension AWSDataStorePlugin: DefaultLogger { }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import Amplify
99

10-
final public class AWSDataStoreCategoryPlugin: DataStoreCategoryPlugin {
10+
final public class AWSDataStorePlugin: DataStoreCategoryPlugin {
1111

12-
public var key: PluginKey = "awsDataStoreCategoryPlugin"
12+
public var key: PluginKey = "awsDataStorePlugin"
1313

1414
/// `true` if any models are syncable. Resolved during configuration phase
1515
var isSyncEnabled: Bool

AmplifyPlugins/DataStore/AWSDataStoreCategoryPlugin/Sync/RemoteSyncEngine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class RemoteSyncEngine: RemoteSyncEngineBehavior {
4949
self.outgoingMutationQueue = outgoingMutationQueue
5050

5151
self.syncQueue = OperationQueue()
52-
syncQueue.name = "com.amazonaws.Amplify.\(AWSDataStoreCategoryPlugin.self).CloudSyncEngine"
52+
syncQueue.name = "com.amazonaws.Amplify.\(AWSDataStorePlugin.self).CloudSyncEngine"
5353
syncQueue.maxConcurrentOperationCount = 1
5454
}
5555

AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginIntegrationTests/TestSupport/SyncEngineIntegrationTestBase.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class SyncEngineIntegrationTestBase: XCTestCase {
2626
// swiftlint:disable force_try
2727
// swiftlint:disable force_cast
2828
var storageAdapter: SQLiteStorageEngineAdapter {
29-
let plugin = try! Amplify.DataStore.getPlugin(for: "awsDataStoreCategoryPlugin") as! AWSDataStoreCategoryPlugin
29+
let plugin = try! Amplify.DataStore.getPlugin(for: "awsDataStorePlugin") as! AWSDataStorePlugin
3030
let storageEngine = plugin.storageEngine as! StorageEngine
3131
let storageAdapter = storageEngine.storageAdapter as! SQLiteStorageEngineAdapter
3232
return storageAdapter
@@ -56,14 +56,14 @@ class SyncEngineIntegrationTestBase: XCTestCase {
5656
])
5757

5858
let dataStoreConfig = DataStoreCategoryConfiguration(plugins: [
59-
"awsDataStoreCategoryPlugin": true
59+
"awsDataStorePlugin": true
6060
])
6161

6262
amplifyConfig = AmplifyConfiguration(api: apiConfig, dataStore: dataStoreConfig)
6363

6464
do {
6565
try Amplify.add(plugin: AWSAPIPlugin())
66-
try Amplify.add(plugin: AWSDataStoreCategoryPlugin(modelRegistration: TestModelRegistration()))
66+
try Amplify.add(plugin: AWSDataStorePlugin(modelRegistration: TestModelRegistration()))
6767
} catch {
6868
XCTFail(String(describing: error))
6969
return

AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginTests/Sync/APICategoryDependencyTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ extension APICategoryDependencyTests {
7373
isSyncEnabled: true)
7474

7575
let dataStorePublisher = DataStorePublisher()
76-
let dataStorePlugin = AWSDataStoreCategoryPlugin(modelRegistration: TestModelRegistration(),
76+
let dataStorePlugin = AWSDataStorePlugin(modelRegistration: TestModelRegistration(),
7777
storageEngine: storageEngine,
7878
dataStorePublisher: dataStorePublisher)
7979
try Amplify.add(plugin: dataStorePlugin)
8080

8181
let dataStoreConfig = DataStoreCategoryConfiguration(plugins: [
82-
"awsDataStoreCategoryPlugin": true
82+
"awsDataStorePlugin": true
8383
])
8484

8585
let amplifyConfig = AmplifyConfiguration(dataStore: dataStoreConfig)

AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginTests/Sync/AWSMutationEventIngesterTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class AWSMutationEventIngesterTests: XCTestCase {
2525
])
2626

2727
let dataStoreConfig = DataStoreCategoryConfiguration(plugins: [
28-
"awsDataStoreCategoryPlugin": true
28+
"awsDataStorePlugin": true
2929
])
3030

3131
let amplifyConfig = AmplifyConfiguration(api: apiConfig, dataStore: dataStoreConfig)
@@ -44,7 +44,7 @@ class AWSMutationEventIngesterTests: XCTestCase {
4444
isSyncEnabled: true)
4545

4646
let publisher = DataStorePublisher()
47-
let dataStorePlugin = AWSDataStoreCategoryPlugin(modelRegistration: TestModelRegistration(),
47+
let dataStorePlugin = AWSDataStorePlugin(modelRegistration: TestModelRegistration(),
4848
storageEngine: storageEngine,
4949
dataStorePublisher: publisher)
5050

AmplifyPlugins/DataStore/AWSDataStoreCategoryPluginTests/Sync/LocalSubscriptionTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ class LocalSubscriptionTests: XCTestCase {
4747
}
4848

4949
let dataStorePublisher = DataStorePublisher()
50-
let dataStorePlugin = AWSDataStoreCategoryPlugin(modelRegistration: TestModelRegistration(),
50+
let dataStorePlugin = AWSDataStorePlugin(modelRegistration: TestModelRegistration(),
5151
storageEngine: storageEngine,
5252
dataStorePublisher: dataStorePublisher)
5353

5454
let dataStoreConfig = DataStoreCategoryConfiguration(plugins: [
55-
"awsDataStoreCategoryPlugin": true
55+
"awsDataStorePlugin": true
5656
])
5757

5858
// Since these tests use syncable models, we have to set up an API category also

0 commit comments

Comments
 (0)