44import Foundation
55import PackageDescription
66
7- var dependencies : [ Package . Dependency ] = [
8- . package ( url: " https://github.com/pointfreeco/swift-snapshot-testing " , from: " 1.8.1 " ) ,
9- . package ( url: " https://github.com/pointfreeco/xctest-dynamic-overlay " , from: " 1.0.0 " ) ,
10- . package ( url: " https://github.com/pointfreeco/swift-concurrency-extras " , from: " 1.0.0 " ) ,
11- . package ( url: " https://github.com/apple/swift-crypto.git " , " 1.0.0 " ..< " 4.0.0 " ) ,
12- . package ( url: " https://github.com/pointfreeco/swift-custom-dump " , from: " 1.0.0 " ) ,
13- ]
14-
15- var goTrueDependencies : [ Target . Dependency ] = [
16- " _Helpers " ,
17- . product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
18- . product( name: " Crypto " , package : " swift-crypto " ) ,
19- ]
20-
21- #if !os(Windows) && !os(Linux)
22- dependencies += [
23- . package ( url: " https://github.com/kishikawakatsumi/KeychainAccess " , from: " 4.2.2 " ) ,
24- ]
25- goTrueDependencies += [
26- . product( name: " KeychainAccess " , package : " KeychainAccess " ) ,
27- ]
28- #endif
29-
307let package = Package (
318 name: " Supabase " ,
329 platforms: [
@@ -37,17 +14,21 @@ let package = Package(
3714 . tvOS( . v13) ,
3815 ] ,
3916 products: [
40- . library( name: " Functions " , targets: [ " Functions " ] ) ,
4117 . library( name: " Auth " , targets: [ " Auth " ] ) ,
18+ . library( name: " Functions " , targets: [ " Functions " ] ) ,
4219 . library( name: " PostgREST " , targets: [ " PostgREST " ] ) ,
4320 . library( name: " Realtime " , targets: [ " Realtime " ] ) ,
4421 . library( name: " Storage " , targets: [ " Storage " ] ) ,
45- . library(
46- name: " Supabase " ,
47- targets: [ " Supabase " , " Functions " , " PostgREST " , " Auth " , " Realtime " , " Storage " ]
48- ) ,
22+ . library( name: " Supabase " , targets: [ " Supabase " , " Functions " , " PostgREST " , " Auth " , " Realtime " , " Storage " ] ) ,
23+ ] ,
24+ dependencies: [
25+ . package ( url: " https://github.com/apple/swift-crypto.git " , " 1.0.0 " ..< " 4.0.0 " ) ,
26+ . package ( url: " https://github.com/pointfreeco/swift-concurrency-extras " , from: " 1.0.0 " ) ,
27+ . package ( url: " https://github.com/pointfreeco/swift-custom-dump " , from: " 1.0.0 " ) ,
28+ . package ( url: " https://github.com/pointfreeco/swift-snapshot-testing " , from: " 1.8.1 " ) ,
29+ . package ( url: " https://github.com/pointfreeco/xctest-dynamic-overlay " , from: " 1.0.0 " ) ,
30+ . package ( url: " https://github.com/kishikawakatsumi/KeychainAccess " , from: " 4.2.2 " ) ,
4931 ] ,
50- dependencies: dependencies,
5132 targets: [
5233 . target(
5334 name: " _Helpers " ,
@@ -58,53 +39,66 @@ let package = Package(
5839 . testTarget(
5940 name: " _HelpersTests " ,
6041 dependencies: [
61- " _Helpers " ,
6242 . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
43+ " _Helpers " ,
6344 ]
6445 ) ,
65- . target( name: " Functions " , dependencies: [ " _Helpers " ] ) ,
66- . testTarget(
67- name: " FunctionsTests " ,
46+ . target(
47+ name: " Auth " ,
6848 dependencies: [
69- " Functions " ,
70- " TestHelpers " ,
7149 . product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
72- . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
73- . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
50+ . product( name: " Crypto " , package : " swift-crypto " ) ,
51+ . product(
52+ name: " KeychainAccess " ,
53+ package : " KeychainAccess " ,
54+ condition: . when(
55+ platforms: [ . macOS, . iOS, . macCatalyst, . visionOS, . tvOS, . watchOS]
56+ )
57+ ) ,
58+ " _Helpers " ,
7459 ]
7560 ) ,
7661 . testTarget(
77- name: " IntegrationTests " ,
62+ name: " AuthTests " ,
7863 dependencies: [
7964 . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
65+ . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
8066 . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
81- . product( name: " InlineSnapshotTesting " , package : " swift-snapshot-testing " ) ,
8267 " _Helpers " ,
8368 " Auth " ,
8469 " TestHelpers " ,
85- " PostgREST " ,
86- " Realtime " ,
87- " Storage " ,
88- ]
70+ ] ,
71+ exclude: [
72+ " __Snapshots__ " ,
73+ ] ,
74+ resources: [ . process( " Resources " ) ]
8975 ) ,
90- . target(
91- name: " Auth " ,
92- dependencies: goTrueDependencies
76+ . target( name: " Functions " , dependencies: [ " _Helpers " ] ) ,
77+ . testTarget(
78+ name: " FunctionsTests " ,
79+ dependencies: [
80+ . product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
81+ . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
82+ . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
83+ " Functions " ,
84+ " TestHelpers " ,
85+ ] ,
86+ exclude: [ " __Snapshots__ " ]
9387 ) ,
9488 . testTarget(
95- name: " AuthTests " ,
89+ name: " IntegrationTests " ,
9690 dependencies: [
9791 . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
98- . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
92+ . product( name: " InlineSnapshotTesting " , package : " swift-snapshot-testing " ) ,
9993 . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
10094 " _Helpers " ,
10195 " Auth " ,
96+ " PostgREST " ,
97+ " Realtime " ,
98+ " Storage " ,
10299 " TestHelpers " ,
103100 ] ,
104- exclude: [
105- " __Snapshots__ " ,
106- ] ,
107- resources: [ . process( " Resources " ) ]
101+ resources: [ . process( " Fixtures " ) ]
108102 ) ,
109103 . target(
110104 name: " PostgREST " ,
@@ -116,9 +110,9 @@ let package = Package(
116110 . testTarget(
117111 name: " PostgRESTTests " ,
118112 dependencies: [
119- " PostgREST " ,
120- " _Helpers " ,
121113 . product( name: " SnapshotTesting " , package : " swift-snapshot-testing " ) ,
114+ " _Helpers " ,
115+ " PostgREST " ,
122116 ] ,
123117 exclude: [ " __Snapshots__ " ]
124118 ) ,
@@ -132,37 +126,37 @@ let package = Package(
132126 . testTarget(
133127 name: " RealtimeTests " ,
134128 dependencies: [
135- " Realtime " ,
129+ . product ( name : " CustomDump " , package : " swift-custom-dump " ) ,
136130 " PostgREST " ,
131+ " Realtime " ,
137132 " TestHelpers " ,
138- . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
139133 ]
140134 ) ,
141135 . target( name: " Storage " , dependencies: [ " _Helpers " ] ) ,
142136 . testTarget(
143137 name: " StorageTests " ,
144138 dependencies: [
145- " Storage " ,
146- . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
147139 . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
140+ . product( name: " XCTestDynamicOverlay " , package : " xctest-dynamic-overlay " ) ,
141+ " Storage " ,
148142 ]
149143 ) ,
150144 . target(
151145 name: " Supabase " ,
152146 dependencies: [
153147 . product( name: " ConcurrencyExtras " , package : " swift-concurrency-extras " ) ,
154148 " Auth " ,
155- " Storage " ,
156- " Realtime " ,
157- " PostgREST " ,
158149 " Functions " ,
150+ " PostgREST " ,
151+ " Realtime " ,
152+ " Storage " ,
159153 ]
160154 ) ,
161155 . testTarget(
162156 name: " SupabaseTests " ,
163157 dependencies: [
164- " Supabase " ,
165158 . product( name: " CustomDump " , package : " swift-custom-dump " ) ,
159+ " Supabase " ,
166160 ]
167161 ) ,
168162 . target(
0 commit comments