@reventlessdev/reventless-aws 3.0.0-alpha.311 → 3.0.0-alpha.312

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.312 (2026-08-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **aws:** build the platform's definition asset from the shared value ([c0e432d](https://github.com/ReventlessDev/reventless-core/commit/c0e432d98d96af3ff4c305b62f658ae102c5d142))
11
+
12
+
6
13
  # 3.0.0-alpha.311 (2026-08-19)
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.311",
3
+ "version": "3.0.0-alpha.312",
4
4
  "description": "AWS adapters for Reventless",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -13,17 +13,17 @@
13
13
  "sury": "11.0.0-rc.1",
14
14
  "uuid": "^13.0.0",
15
15
  "@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.12",
16
- "@reventlessdev/rescript-node": "2.0.0-alpha.8",
16
+ "@reventlessdev/rescript-effect": "0.1.0-alpha.32",
17
17
  "@reventlessdev/rescript-jest": "1.0.0-alpha.10",
18
+ "@reventlessdev/rescript-node": "2.0.0-alpha.8",
18
19
  "@reventlessdev/rescript-pulumi-aws": "3.0.0-alpha.1",
19
- "@reventlessdev/rescript-effect": "0.1.0-alpha.32",
20
20
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
21
21
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.0",
22
- "@reventlessdev/reventless-core": "3.0.0-alpha.240",
23
- "@reventlessdev/reventless-interop": "3.0.0-alpha.32",
22
+ "@reventlessdev/reventless-core": "3.0.0-alpha.241",
23
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.146",
24
+ "@reventlessdev/reventless-postgres": "3.0.0-alpha.105",
24
25
  "@reventlessdev/reventless-spec": "3.0.0-alpha.118",
25
- "@reventlessdev/reventless-postgres": "3.0.0-alpha.104",
26
- "@reventlessdev/reventless-infra": "3.0.0-alpha.146"
26
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.32"
27
27
  },
28
28
  "devDependencies": {
29
29
  "rescript": "12.3.0",
@@ -683,8 +683,12 @@ let loadPluginDefinition = (): Reventless.Plugin.pluginDefinition =>
683
683
  ->Reventless.Util_Sury.fromJsonString(Reventless.Plugin.pluginDefinitionSchema)
684
684
  } catch {
685
685
  | exn =>
686
+ // Util_Sury.exnMessage, not the local one: sury raises S.Exn, which is not a
687
+ // JsExn, so the local reader yields "unknown error" and loses the field path —
688
+ // the whole diagnosis for a decode failure here.
686
689
  JsError.throwWithMessage(
687
- "Failed to load pluginDefinition.json from asset zip: " ++ exnMessage(exn),
690
+ "Failed to load pluginDefinition.json from asset zip: " ++
691
+ Reventless.Util_Sury.exnMessage(exn),
688
692
  )
689
693
  }
690
694
 
@@ -524,7 +524,7 @@ function loadPluginDefinition() {
524
524
  return Util_Sury$Reventless.fromJsonString(Nodefs.readFileSync(assetPath("pluginDefinition.json"), "utf8"), Plugin$Reventless.pluginDefinitionSchema);
525
525
  } catch (raw_exn) {
526
526
  let exn = Primitive_exceptions.internalToException(raw_exn);
527
- return Stdlib_JsError.throwWithMessage("Failed to load pluginDefinition.json from asset zip: " + exnMessage(exn));
527
+ return Stdlib_JsError.throwWithMessage("Failed to load pluginDefinition.json from asset zip: " + Util_Sury$Reventless.exnMessage(exn, undefined));
528
528
  }
529
529
  }
530
530
 
@@ -268,12 +268,13 @@ module Make = (
268
268
  // keeps the JSON shape consistent so the entry point can parse uniformly.
269
269
  let synthesizeAdminContext = (): ReventlessCore.Plugin_Helpers.eventCollectorContext => {
270
270
  let config = configRef.contents
271
- // Stable JSON literal matches Reventless.Plugin.pluginDefinitionSchema
272
- // (optional fields encoded as null via js_nullable). Must stay byte-aligned with
273
- // the ReScript-built twin in `Platform_Admin.construct`'s `fakePluginDefinition`.
274
- let platformId = ReventlessCore.Platform_Admin_Structure.pluginId
271
+ // Encoded from the one placeholder value, through the same schema the entry
272
+ // point decodes with. It was a hand-written JSON literal, which drifted: the
273
+ // schema gained `dcbEventLog` and `kind` and the literal did not follow.
275
274
  let fakePluginDefinitionJson =
276
- `{"id":"${platformId}@INTERNAL","name":"${platformId}","version":"INTERNAL","extensionPoints":[],"extensions":[],"eventCollector":"NOT-SET","extensionProtocols":[],"apiSchemaFragment":null,"apiTarget":null,"structure":null}`->Pulumi.Output.make
275
+ ReventlessCore.Platform_Admin_Structure.internalPluginDefinition
276
+ ->Reventless.Util_Sury.toJsonString(Reventless.Plugin.pluginDefinitionSchema)
277
+ ->Pulumi.Output.make
277
278
  let adminEpEventTopicArn = switch config.eventTopicArn {
278
279
  | Some(arn) => arn
279
280
  | None => Pulumi.Output.make("NOT_AVAILABLE")
@@ -5,6 +5,8 @@ import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
5
5
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
6
6
  import * as Pulumi from "@pulumi/pulumi";
7
7
  import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.js";
8
+ import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
9
+ import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
8
10
  import * as Logger$ReventlessCore from "@reventlessdev/reventless-core/src/util/Logger.res.mjs";
9
11
  import * as Component$ReventlessCore from "@reventlessdev/reventless-core/src/components/Component.res.mjs";
10
12
  import * as DcbBackend$ReventlessAws from "../../adapter/DcbEventLog/DcbBackend.res.mjs";
@@ -202,7 +204,7 @@ function Make(EventCollectorChannel) {
202
204
  };
203
205
  let synthesizeAdminContext = () => {
204
206
  let config = configRef.contents;
205
- let fakePluginDefinitionJson = Pulumi.output(`{"id":"` + Platform_Admin_Structure$ReventlessCore.pluginId + `@INTERNAL","name":"` + Platform_Admin_Structure$ReventlessCore.pluginId + `","version":"INTERNAL","extensionPoints":[],"extensions":[],"eventCollector":"NOT-SET","extensionProtocols":[],"apiSchemaFragment":null,"apiTarget":null,"structure":null}`);
207
+ let fakePluginDefinitionJson = Pulumi.output(Util_Sury$Reventless.toJsonString(Platform_Admin_Structure$ReventlessCore.internalPluginDefinition, Plugin$Reventless.pluginDefinitionSchema, undefined));
206
208
  let arn = config.eventTopicArn;
207
209
  let adminEpEventTopicArn = arn !== undefined ? arn : Pulumi.output("NOT_AVAILABLE");
208
210
  return {
@@ -101,4 +101,15 @@ describe("pluginDefinition.json write/read symmetry", () => {
101
101
  expect(def.structure->Option.isNone)->toBe(true)
102
102
  expect(def.dcbEventLog->Option.isNone)->toBe(true)
103
103
  })
104
+
105
+ // The platform's own EventCollector ships a placeholder rather than a real
106
+ // definition — the admin IS the Plugin extension point — but it is read back on
107
+ // this same path, so it has to satisfy the same schema. Its asset used to be a
108
+ // hand-written JSON literal in PluginRuntime_Builder and fell two fields behind
109
+ // (dcbEventLog, kind) with nothing to notice.
110
+ testSync("the platform's own placeholder asset survives the same round trip", () => {
111
+ let def = ReventlessCore.Platform_Admin_Structure.internalPluginDefinition->writeAsset->readAsset
112
+ expect(def.id)->toBe(ReventlessCore.Platform_Admin_Structure.pluginId ++ "@INTERNAL")
113
+ expect(def.kind)->toBe(Reventless.Plugin.Domain)
114
+ })
104
115
  })
@@ -8,6 +8,7 @@ import * as Stdlib_JSON from "@rescript/runtime/lib/es6/Stdlib_JSON.js";
8
8
  import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
9
9
  import * as Plugin$Reventless from "@reventlessdev/reventless-spec/src/components/Plugin.res.mjs";
10
10
  import * as Util_Sury$Reventless from "@reventlessdev/reventless-spec/src/util/Util_Sury.res.mjs";
11
+ import * as Platform_Admin_Structure$ReventlessCore from "@reventlessdev/reventless-core/src/admin/Platform_Admin_Structure.res.mjs";
11
12
  import * as PluginExtensionPointSpec$ReventlessInfra from "@reventlessdev/reventless-infra/src/types/PluginExtensionPointSpec.res.mjs";
12
13
  import * as EventCollectorEntryPoint_Ops$ReventlessAws from "../src/adapter/Runtime/EventCollectorEntryPoint_Ops.res.mjs";
13
14
 
@@ -118,6 +119,11 @@ globalThis.describe("pluginDefinition.json write/read symmetry", () => {
118
119
  globalThis.expect(Stdlib_Option.isNone(def.structure)).toBe(true);
119
120
  globalThis.expect(Stdlib_Option.isNone(def.dcbEventLog)).toBe(true);
120
121
  });
122
+ globalThis.test("the platform's own placeholder asset survives the same round trip", () => {
123
+ let def = readAsset(Util_Sury$Reventless.toJsonString(Platform_Admin_Structure$ReventlessCore.internalPluginDefinition, Plugin$Reventless.pluginDefinitionSchema, undefined));
124
+ globalThis.expect(def.id).toBe(Platform_Admin_Structure$ReventlessCore.pluginId + "@INTERNAL");
125
+ globalThis.expect(def.kind).toBe("Domain");
126
+ });
121
127
  });
122
128
 
123
129
  export {