Commit a80b68a
committed
feat(core): make AmplifyOutputsData and all nested types public
Remove @_spi(InternalAmplifyConfiguration) from AmplifyOutputsData and
all nested structs, enums, and type aliases. Make all internal
initializers public so customers can programmatically construct
configuration without requiring a special SPI import.
This enables:
- Programmatic configuration construction for testing and dynamic
environments using just `import Amplify`
- Runtime inspection of resolved configuration (e.g., reading the
configured region or user pool ID)
- Direct use of `Amplify.configure(_: AmplifyOutputsData)` without SPI
Usage examples:
import Amplify
// Construct configuration programmatically
let config = AmplifyOutputsData(
version: "1",
auth: .init(
awsRegion: "us-east-1",
userPoolId: "us-east-1_abc",
userPoolClientId: "client123"
),
storage: .init(
awsRegion: "us-east-1",
bucketName: "my-bucket"
)
)
try Amplify.configure(config)
// Inspect resolved configuration
let outputs = try AmplifyOutputs.amplifyOutputs.resolveConfiguration()
print(outputs.auth?.userPoolId)
print(outputs.storage?.bucketName)1 parent 85957a3 commit a80b68a
52 files changed
Lines changed: 316 additions & 93 deletions
File tree
- AmplifyPlugins
- API
- Sources/AWSAPIPlugin
- Configuration
- Tests
- APIHostApp
- AWSAPIPluginFunctionalTests
- AWSAPIPluginGen2GraphQLTests
- AWSAPIPluginTests
- Analytics
- Sources/AWSPinpointAnalyticsPlugin
- Configuration
- Tests/AWSPinpointAnalyticsPluginUnitTests
- Configuration
- Auth
- Sources/AWSCognitoAuthPlugin
- StateMachine/CodeGen/Data
- Support/Helpers
- Tests
- AWSCognitoAuthPluginUnitTests
- ConfigurationTests
- Support
- AuthHostApp/AuthIntegrationTests
- Core
- AWSPluginsCoreTests/API
- AWSPluginsCore/API
- DataStore/Tests/AWSDataStorePluginTests/Core
- Geo
- Sources/AWSLocationGeoPlugin
- Configuration
- Tests/AWSLocationGeoPluginTests
- Configuration
- Support/Constants
- Internal/Sources/InternalAWSPinpoint/Configuration
- Notifications/Push
- Sources/AWSPinpointPushNotificationsPlugin
- Tests/AWSPinpointPushNotificationsPluginUnitTests
- Predictions
- AWSPredictionsPlugin
- CoreMLPredictionsPlugin
- Tests
- AWSPredictionsPluginUnitTests/ConfigurationTests
- CoreMLPredictionsPluginUnitTests
- Storage
- Sources/AWSS3StoragePlugin
- Tests
- AWSS3StoragePluginTests
- StorageHostApp/AWSS3StoragePluginIntegrationTests
- AmplifyTests
- CategoryTests
- API
- Analytics
- Auth
- DataStore
- Geo
- Hub
- Logging
- Notifications/Push
- Predictions
- Storage
- CoreTests
- Amplify/Core/Configuration
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | | - | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | | - | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
54 | 51 | | |
55 | 52 | | |
56 | 53 | | |
57 | | - | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
| |||
63 | 59 | | |
64 | 60 | | |
65 | 61 | | |
66 | | - | |
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
| |||
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
76 | | - | |
77 | 71 | | |
78 | 72 | | |
79 | 73 | | |
80 | 74 | | |
81 | 75 | | |
82 | | - | |
83 | 76 | | |
84 | 77 | | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
88 | | - | |
| 81 | + | |
89 | 82 | | |
90 | 83 | | |
91 | 84 | | |
| |||
115 | 108 | | |
116 | 109 | | |
117 | 110 | | |
118 | | - | |
119 | | - | |
| 111 | + | |
120 | 112 | | |
121 | 113 | | |
122 | 114 | | |
| |||
125 | 117 | | |
126 | 118 | | |
127 | 119 | | |
128 | | - | |
129 | | - | |
| 120 | + | |
130 | 121 | | |
131 | 122 | | |
132 | 123 | | |
133 | 124 | | |
134 | 125 | | |
135 | | - | |
136 | 126 | | |
137 | 127 | | |
138 | 128 | | |
139 | 129 | | |
140 | | - | |
141 | | - | |
| 130 | + | |
142 | 131 | | |
143 | 132 | | |
144 | 133 | | |
145 | 134 | | |
146 | | - | |
147 | 135 | | |
148 | 136 | | |
149 | 137 | | |
150 | 138 | | |
151 | 139 | | |
152 | | - | |
153 | 140 | | |
154 | 141 | | |
155 | 142 | | |
156 | 143 | | |
157 | 144 | | |
158 | | - | |
159 | | - | |
| 145 | + | |
160 | 146 | | |
161 | 147 | | |
162 | 148 | | |
| |||
169 | 155 | | |
170 | 156 | | |
171 | 157 | | |
172 | | - | |
173 | | - | |
| 158 | + | |
174 | 159 | | |
175 | 160 | | |
176 | 161 | | |
177 | 162 | | |
178 | 163 | | |
179 | | - | |
180 | | - | |
| 164 | + | |
181 | 165 | | |
182 | 166 | | |
183 | 167 | | |
184 | 168 | | |
185 | | - | |
186 | 169 | | |
187 | 170 | | |
188 | 171 | | |
189 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
190 | 179 | | |
191 | 180 | | |
192 | | - | |
193 | | - | |
| 181 | + | |
194 | 182 | | |
195 | 183 | | |
196 | 184 | | |
| |||
201 | 189 | | |
202 | 190 | | |
203 | 191 | | |
204 | | - | |
205 | | - | |
| 192 | + | |
206 | 193 | | |
207 | | - | |
208 | | - | |
| 194 | + | |
209 | 195 | | |
210 | | - | |
211 | | - | |
| 196 | + | |
212 | 197 | | |
213 | 198 | | |
214 | 199 | | |
| |||
229 | 214 | | |
230 | 215 | | |
231 | 216 | | |
232 | | - | |
233 | | - | |
| 217 | + | |
234 | 218 | | |
235 | 219 | | |
236 | 220 | | |
237 | 221 | | |
238 | 222 | | |
239 | 223 | | |
240 | 224 | | |
241 | | - | |
242 | | - | |
| 225 | + | |
243 | 226 | | |
244 | 227 | | |
245 | 228 | | |
246 | 229 | | |
247 | 230 | | |
248 | 231 | | |
249 | 232 | | |
250 | | - | |
251 | | - | |
| 233 | + | |
252 | 234 | | |
253 | 235 | | |
254 | 236 | | |
| |||
276 | 258 | | |
277 | 259 | | |
278 | 260 | | |
279 | | - | |
280 | | - | |
| 261 | + | |
281 | 262 | | |
282 | 263 | | |
283 | 264 | | |
| |||
336 | 317 | | |
337 | 318 | | |
338 | 319 | | |
339 | | - | |
340 | | - | |
| 320 | + | |
341 | 321 | | |
342 | 322 | | |
343 | 323 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments