Skip to content

Commit 8aabc70

Browse files
[PM-21602] refactor: Consolidate CoreData helpers in BitwardenKit (#1579)
1 parent 6c0891a commit 8aabc70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+36
-923
lines changed

AuthenticatorBridgeKit/AuthenticatorBridgeItemData.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import BitwardenKit
12
import CoreData
23
import Foundation
34

@@ -47,7 +48,7 @@ extension AuthenticatorBridgeItemData: ManagedUserObject {
4748
/// - id: The id to match in the predicate
4849
/// - Returns: The NSPredicate for searching/filtering by userId and id
4950
///
50-
static func userIdAndIdPredicate(userId: String, id: String) -> NSPredicate {
51+
public static func userIdAndIdPredicate(userId: String, id: String) -> NSPredicate {
5152
NSPredicate(
5253
format: "%K == %@ AND %K == %@",
5354
#keyPath(AuthenticatorBridgeItemData.userId),
@@ -62,7 +63,7 @@ extension AuthenticatorBridgeItemData: ManagedUserObject {
6263
/// - Parameter userId: The userId to match in the predicate
6364
/// - Returns: The NSPredicate for searching/filtering by userId
6465
///
65-
static func userIdPredicate(userId: String) -> NSPredicate {
66+
public static func userIdPredicate(userId: String) -> NSPredicate {
6667
NSPredicate(format: "%K == %@", #keyPath(AuthenticatorBridgeItemData.userId), userId)
6768
}
6869

@@ -72,7 +73,7 @@ extension AuthenticatorBridgeItemData: ManagedUserObject {
7273
/// - value: the `AuthenticatorBridgeItemDataModel` to use in updating the object
7374
/// - userId: userId to update this object with.
7475
///
75-
func update(with value: AuthenticatorBridgeItemDataModel, userId: String) throws {
76+
public func update(with value: AuthenticatorBridgeItemDataModel, userId: String) throws {
7677
id = value.id
7778
model = value
7879
self.userId = userId

AuthenticatorBridgeKit/AuthenticatorBridgeItemService.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import BitwardenKit
12
import Combine
23
import Foundation
34

AuthenticatorBridgeKit/CodableModelData.swift

Lines changed: 0 additions & 40 deletions
This file was deleted.

AuthenticatorBridgeKit/ManagedObject.swift

Lines changed: 0 additions & 78 deletions
This file was deleted.

AuthenticatorBridgeKit/ManagedUserObject.swift

Lines changed: 0 additions & 74 deletions
This file was deleted.

AuthenticatorBridgeKit/NSManagedObjectContext+Extension.swift

Lines changed: 0 additions & 52 deletions
This file was deleted.

AuthenticatorBridgeKit/Tests/ManagedObjectTests.swift

Lines changed: 0 additions & 24 deletions
This file was deleted.

AuthenticatorBridgeKit/Tests/PublisherAsyncTests.swift

Lines changed: 0 additions & 60 deletions
This file was deleted.

AuthenticatorShared/Core/Platform/Extentions/Logger+Bitwarden.swift

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)