Skip to content

Commit ac8cef7

Browse files
committed
chore: move use case into WireDomainPkg - WPB-10347 (#2393)
1 parent 978a7fd commit ac8cef7

File tree

31 files changed

+113
-225
lines changed

31 files changed

+113
-225
lines changed

WireDomain/Package.swift

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,16 @@ let package = Package(
77
name: "WireDomainPackage",
88
platforms: [.iOS(.v16), .macOS(.v12)],
99
products: [
10-
.library(name: "WireDomainAPI", targets: ["WireDomainAPI"]),
11-
.library(name: "WireDomainPackage", targets: ["WireDomainPkg"]),
12-
.library(name: "WireDomainPackageSupport", targets: ["WireDomainPkgSupport"])
10+
.library(name: "WireDomainPackage", targets: ["WireDomainPkg"])
1311
],
1412
dependencies: [
15-
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0"),
16-
.package(path: "../WirePlugins"),
17-
.package(name: "WireAPI", path: "../WireAPI"),
18-
.package(name: "WireAnalytics", path: "../WireAnalytics"),
19-
.package(name: "WireFoundation", path: "../WireFoundation")
13+
.package(url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0")
2014
],
2115
targets: [
22-
.target(
23-
name: "WireDomainAPI",
24-
path: "./Sources/WireDomainAPI"
25-
),
2616
.target(
2717
name: "WireDomainPkg",
28-
dependencies: ["WireAPI", "WireAnalytics"],
29-
path: "./Sources/Package"
30-
),
31-
.target(
32-
name: "WireDomainPkgSupport",
33-
dependencies: ["WireDomainPkg"],
34-
path: "./Sources/PackageSupport",
35-
plugins: [
36-
.plugin(name: "SourceryPlugin", package: "WirePlugins")
37-
]
38-
),
39-
.testTarget(
40-
name: "WireDomainPkgTests",
41-
dependencies: [
42-
"WireDomainPkg",
43-
.product(name: "WireTestingPackage", package: "WireFoundation")
44-
],
45-
path: "./Tests/PackageTests"
18+
path: "./Sources/WireDomain",
19+
sources: ["./UseCases/Protocols/IndividualToTeamMigrationUseCaseProtocol.swift"]
4620
)
4721
]
4822
)

WireDomain/Project/TestPlans/AllTests.xctestplan

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

WireDomain/Sources/Package/Documentation.docc/Documentation.md

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

WireDomain/Sources/Package/Placeholder.swift

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

WireDomain/Sources/PackageSupport/Sourcery/AutoMockable.stencil

Lines changed: 0 additions & 1 deletion
This file was deleted.

WireDomain/Sources/PackageSupport/Sourcery/sourcery.yml

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

WireDomain/Sources/PackageSupport/WireDomainPackage.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
//
1818

1919
import Foundation
20-
@preconcurrency import WireAPI
21-
@preconcurrency import WireDataModel
22-
import WireDomainAPI
20+
import WireAPI
21+
import WireDataModel
22+
import WireDomainPkg
2323
import WireLogging
2424
import WireSystem
2525

26-
public struct IndividualToTeamMigrationUseCaseImplementation: IndividualToTeamMigrationUseCase {
26+
public struct IndividualToTeamMigrationUseCase: IndividualToTeamMigrationUseCaseProtocol {
2727

2828
private let accountsAPI: AccountsAPI
2929
private let context: NSManagedObjectContext

WireDomain/Sources/WireDomainAPI/UseCases/IndividualToTeamMigrationUseCase.swift renamed to WireDomain/Sources/WireDomain/UseCases/Protocols/IndividualToTeamMigrationUseCaseProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public struct IndividualToTeamMigrationResult: Sendable {
3535

3636
// sourcery: AutoMockable
3737
/// Sends a request to the backend to migrate the user to a team.
38-
public protocol IndividualToTeamMigrationUseCase: Sendable {
38+
public protocol IndividualToTeamMigrationUseCaseProtocol: Sendable {
3939
func invoke(teamName: String) async throws -> IndividualToTeamMigrationResult
4040
}

WireDomain/Sources/WireDomainSupport/Sourcery/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ templates:
55
output:
66
./generated
77
args:
8-
autoMockableImports: ["WireAPI", "WireDataModel"]
8+
autoMockableImports: ["WireAPI", "WireDataModel", "WireDomainPkg"]
99
autoMockableTestableImports: ["WireDomain"]

WireDomain/Sources/WireDomainSupport/Sourcery/generated/AutoMockable.generated.swift

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WireDomain/Tests/PackageTests/PlaceholderTests.swift

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

WireDomain/Tests/TestPlans/AllTests.xctestplan

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"configurations" : [
33
{
4-
"id" : "F5BC5855-65E0-4C6D-BEC0-97FFF7D13461",
4+
"id" : "9D1D0475-9029-44FF-9FE3-BECDF3815511",
55
"name" : "Configuration 1",
66
"options" : {
77

@@ -23,18 +23,21 @@
2323
"language" : "en",
2424
"region" : "DE",
2525
"targetForVariableExpansion" : {
26-
"containerPath" : "container:WireDomain",
27-
"identifier" : "WireDomainPkgTests",
28-
"name" : "WireDomainPkgTests"
26+
"containerPath" : "container:WireDomain Project.xcodeproj",
27+
"identifier" : "01D0DCAF2C1C8C880076CB1C",
28+
"name" : "WireDomainTests"
2929
},
3030
"testExecutionOrdering" : "random"
3131
},
3232
"testTargets" : [
3333
{
34+
"skippedTests" : [
35+
"PullAllConversationsSyncTests\/testPull_LegacyIdentifiers()"
36+
],
3437
"target" : {
35-
"containerPath" : "container:",
36-
"identifier" : "WireDomainPkgTests",
37-
"name" : "WireDomainPkgTests"
38+
"containerPath" : "container:WireDomain Project.xcodeproj",
39+
"identifier" : "01D0DCAF2C1C8C880076CB1C",
40+
"name" : "WireDomainTests"
3841
}
3942
}
4043
],

WireDomain/Tests/WireDomainTests/Event Decryption/MLSMessageDecryptorTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import WireDataModel
2020
import WireDataModelSupport
2121
import XCTest
22+
2223
@testable import WireAPI
2324
@testable import WireDomain
2425
@testable import WireDomainSupport

0 commit comments

Comments
 (0)