@reventlessdev/reventless-aws 3.0.0-alpha.393 → 3.0.0-alpha.394

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 3.0.0-alpha.394 (2026-10-22)
7
+
8
+ ### Features
9
+
10
+ * **local:** the local platform provisions an identity provider over the accounts file ([1a46867](https://github.com/ReventlessDev/reventless-core/commit/1a46867ac391b3b4a2d6973606d782547190dcb8))
11
+
12
+
6
13
  # 3.0.0-alpha.393 (2026-10-21)
7
14
 
8
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-aws",
3
- "version": "3.0.0-alpha.393",
3
+ "version": "3.0.0-alpha.394",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "bin": {
@@ -30,11 +30,11 @@
30
30
  "@reventlessdev/rescript-pulumi-pulumi": "3.0.0-alpha.0",
31
31
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.1",
32
32
  "@reventlessdev/rescript-web": "1.0.0-alpha.8",
33
- "@reventlessdev/reventless-infra": "3.0.0-alpha.201",
34
- "@reventlessdev/reventless-postgres": "3.0.0-alpha.168",
33
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.202",
34
+ "@reventlessdev/reventless-core": "3.0.0-alpha.305",
35
+ "@reventlessdev/reventless-postgres": "3.0.0-alpha.169",
35
36
  "@reventlessdev/reventless-interop": "3.0.0-alpha.42",
36
- "@reventlessdev/reventless-spec": "3.0.0-alpha.173",
37
- "@reventlessdev/reventless-core": "3.0.0-alpha.304"
37
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.174"
38
38
  },
39
39
  "devDependencies": {
40
40
  "rescript": "12.3.1",
package/src/Platform.res CHANGED
@@ -1287,6 +1287,10 @@ module MakeWithConfig = (
1287
1287
  // door: unlike geocoding, a browser has no business sending mail from the
1288
1288
  // deployment's identity. Unset ⇒ no export, no grant.
1289
1289
  messagingSender?: ReventlessInfra.Platform.messagingSender,
1290
+ // Ignored here: an in-process provider cannot reach a Lambda, and no
1291
+ // pool-backed handle exists yet. The deploy gate refuses a plugin that
1292
+ // declares the need, naming this.
1293
+ identityProvider?: Reventless.IdentityProvider.t,
1290
1294
  // Optional object store for direct-to-S3 uploads, as returned by
1291
1295
  // `Capability_ObjectStore_S3.make`. When set, the deploy registers it with
1292
1296
  // the platform's one Upload service (`Upload_Presign_S3`) under the `uploads`
@@ -2375,7 +2379,7 @@ module MakeWithConfig = (
2375
2379
  ->Pulumi.Output.apply((((domainEp, platformEp, poolId, clientId), eventsEpOpt)) => {
2376
2380
  // `authMode` stays `"cognito"`: it is a value naming which provider
2377
2381
  // authenticates this deployment, and that is true. The identity *keys*
2378
- // travel under both spellings — see [Util_ShellConfig.identityFields].
2382
+ // are provider-neutral — see [Util_ShellConfig.identityFields].
2379
2383
  let computed =
2380
2384
  [
2381
2385
  ("apiEndpoint", JSON.Encode.string(domainEp)),
@@ -32,31 +32,20 @@ let modeOptions = (mode: Platform.viewMode): array<(string, JSON.t)> =>
32
32
  }
33
33
 
34
34
  /**
35
- The identity fields a shell reads, under **both** spellings.
35
+ The identity fields a shell reads. The concept is not AWS-specific, so a second
36
+ cloud's adapter meets the same names.
36
37
 
37
- 🚨 **Both, and not as a sequenced rename.** `identityProvider*` is what these
38
- become — the concept is not AWS-specific, so a second cloud's adapter should meet
39
- the same names. `cognito*` is what every shipped shell reads today.
38
+ The `cognitoUserPoolId` / `cognitoClientId` pair travelled beside these through
39
+ the rename, because a shell reads `config.json` at runtime and a bundle that
40
+ cannot find its client id gets `None` and a login that silently fails. It went
41
+ once every pinned shell read these names (host shell 3.0.0-alpha.122 and later).
40
42
 
41
- A shell reads `config.json` at runtime and CloudFront serves the previous bundle
42
- until someone invalidates it, so switching the keys in one deploy leaves a window
43
- where the served bundle and the served config disagree. `cognitoClientId` is read
44
- into an `option`: a bundle that cannot find its key does not error, it gets
45
- `None`, and login, silent refresh and token refresh all quietly fall through —
46
- the window is a total auth outage that reports nothing.
47
-
48
- Writing both removes the ordering dependency rather than managing it: any bundle,
49
- old or new or stale in a CDN, finds one it understands. The `cognito*` pair goes
50
- once the shell that prefers the other is the pinned one.
51
-
52
- Here rather than inline at the call site so the pairing is one fact in one place,
53
- and so the property can be asserted without a deploy.
43
+ Here rather than inline at the call site so the key set is one fact in one place,
44
+ and so it can be asserted without a deploy.
54
45
  */
55
46
  let identityFields = (~providerId: string, ~clientId: string): array<(string, JSON.t)> => [
56
47
  ("identityProviderId", JSON.Encode.string(providerId)),
57
48
  ("identityProviderClientId", JSON.Encode.string(clientId)),
58
- ("cognitoUserPoolId", JSON.Encode.string(providerId)),
59
- ("cognitoClientId", JSON.Encode.string(clientId)),
60
49
  ]
61
50
 
62
51
  /**
@@ -43,14 +43,6 @@ function identityFields(providerId, clientId) {
43
43
  [
44
44
  "identityProviderClientId",
45
45
  clientId
46
- ],
47
- [
48
- "cognitoUserPoolId",
49
- providerId
50
- ],
51
- [
52
- "cognitoClientId",
53
- clientId
54
46
  ]
55
47
  ];
56
48
  }
@@ -298,50 +298,25 @@ describe("Util_ShellConfig.fields — shellConfig passthrough", () => {
298
298
  })
299
299
  })
300
300
 
301
- // 🚨 The identity keys travel under both spellings through the rename. A shell
302
- // reads config.json at runtime and CloudFront serves the previous bundle until
303
- // someone invalidates it, so switching them in one deploy leaves a window where
304
- // the served bundle and the served config disagree — and `cognitoClientId` is
305
- // read into an option, so a bundle that cannot find its key does not error, it
306
- // gets `None` and login silently stops working.
307
- //
308
- // These assert the property that removes that window, not the spelling.
301
+ // A shell reads config.json at runtime, and `identityProviderClientId` is read
302
+ // into an option: a bundle that cannot find it gets `None` and a login that
303
+ // silently stops working. These assert the key set, so a rename cannot slip out
304
+ // in a refactor without a test naming it.
309
305
  describe("Util_ShellConfig.identityFields", () => {
310
306
  let fields = Util_ShellConfig.identityFields(~providerId="eu-west-1_x", ~clientId="7cl13nt")
311
307
  let get = key => fields->Array.find(((k, _)) => k == key)->Option.map(((_, v)) => v)
312
308
 
313
- testSync("the new spelling is present", () =>
309
+ testSync("the identity keys carry the pool and the client", () =>
314
310
  expect((get("identityProviderId"), get("identityProviderClientId")))->toEqual((
315
311
  Some(JSON.Encode.string("eu-west-1_x")),
316
312
  Some(JSON.Encode.string("7cl13nt")),
317
313
  ))
318
314
  )
319
315
 
320
- // Not "still" — deliberately. Every shipped shell reads these, and dropping
321
- // them is a later release gated on the pinned bundle, not on this one.
322
- testSync("the deprecated spelling is present too", () =>
323
- expect((get("cognitoUserPoolId"), get("cognitoClientId")))->toEqual((
324
- Some(JSON.Encode.string("eu-west-1_x")),
325
- Some(JSON.Encode.string("7cl13nt")),
326
- ))
327
- )
328
-
329
- // The whole point: a bundle reading either name gets the same answer. Two keys
330
- // carrying different values would be worse than one key, not better.
331
- testSync("both spellings carry identical values", () =>
332
- expect((
333
- get("identityProviderId") == get("cognitoUserPoolId"),
334
- get("identityProviderClientId") == get("cognitoClientId"),
335
- ))->toEqual((true, true))
336
- )
337
-
338
- // The client id is the load-bearing one — it is what the shell's auth provider
339
- // branches on. The pool id is currently discarded by the shell, which is
340
- // exactly why a `cognito*` sweep is dangerous: the safe one gives no warning.
316
+ // The transitional `cognito*` pair is gone: every pinned shell reads the
317
+ // names above, and a reader that still wants the old ones is the defect.
341
318
  testSync("nothing else sneaks into the identity field set", () =>
342
319
  expect(fields->Array.map(((k, _)) => k)->Array.toSorted(String.compare))->toEqual([
343
- "cognitoClientId",
344
- "cognitoUserPoolId",
345
320
  "identityProviderClientId",
346
321
  "identityProviderId",
347
322
  ])