@reventlessdev/reventless-core 3.0.0-alpha.202 → 3.0.0-alpha.203

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.203 (2026-08-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ * **core:** run the offload hook at graph-construction, not inside .apply ([5a102f1](https://github.com/ReventlessDev/reventless-core/commit/5a102f149d6d218cdeeb28dbf9bded1d6fb1252e))
11
+
12
+
6
13
  # 3.0.0-alpha.202 (2026-08-02)
7
14
 
8
15
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/reventless-core",
3
- "version": "3.0.0-alpha.202",
3
+ "version": "3.0.0-alpha.203",
4
4
  "description": "Core package for Reventless framework",
5
5
  "license": "Apache-2.0",
6
6
  "jest": {
@@ -29,16 +29,16 @@
29
29
  "sury": "11.0.0-alpha.4",
30
30
  "uuid": "^13.0.0",
31
31
  "@reventlessdev/rescript-effect": "0.1.0-alpha.32",
32
+ "@reventlessdev/rescript-fast-csv": "2.0.0-alpha.1",
32
33
  "@reventlessdev/rescript-hash-object": "1.2.0-alpha.14",
33
- "@reventlessdev/rescript-fast-csv": "2.0.0-alpha.0",
34
34
  "@reventlessdev/rescript-jest": "1.0.0-alpha.10",
35
- "@reventlessdev/rescript-node": "2.0.0-alpha.0",
35
+ "@reventlessdev/rescript-node": "2.0.0-alpha.1",
36
36
  "@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.18",
37
+ "@reventlessdev/rescript-ssh2": "2.0.0-alpha.1",
38
+ "@reventlessdev/reventless-infra": "3.0.0-alpha.120",
39
+ "@reventlessdev/reventless-interop": "3.0.0-alpha.30",
37
40
  "@reventlessdev/rescript-uuid": "2.0.0-alpha.0",
38
- "@reventlessdev/rescript-ssh2": "2.0.0-alpha.0",
39
- "@reventlessdev/reventless-infra": "3.0.0-alpha.119",
40
- "@reventlessdev/reventless-spec": "3.0.0-alpha.94",
41
- "@reventlessdev/reventless-interop": "3.0.0-alpha.30"
41
+ "@reventlessdev/reventless-spec": "3.0.0-alpha.95"
42
42
  },
43
43
  "devDependencies": {
44
44
  "rescript": "12.3.0",
@@ -606,6 +606,32 @@ module Make = (
606
606
  | None => Pulumi.Output.make()
607
607
  }
608
608
 
609
+ // Offload the two large pluginDefinition fields at deploy time when a
610
+ // provider offers an object store (AWS writes a content-addressed object
611
+ // and returns a reference); unset locally, so they stay Inline. Computed
612
+ // HERE, at graph-construction time — both values are concrete and the hook
613
+ // (which creates the object resource) MUST run outside the Pulumi.Output.apply
614
+ // below: a resource cannot be created inside .apply, and an apply callback is
615
+ // skipped entirely on `pulumi preview` when its inputs are still unknown.
616
+ // Unconditional: these fields are always large enough to be worth offloading.
617
+ let toPayload = (value, ~schema, ~store) =>
618
+ switch Plugin_Helpers.offloadHook.contents {
619
+ | Some(hook) =>
620
+ Reventless.Offload.Offloaded(
621
+ hook(~store, ~bytes=value->S.reverseConvertToJsonStringOrThrow(schema)),
622
+ )
623
+ | None => Reventless.Offload.Inline(value)
624
+ }
625
+ let apiSchemaFragmentPayload = toPayload(
626
+ apiSchemaFragment,
627
+ ~schema=Reventless.Plugin.apiSchemaFragmentSchema,
628
+ ~store="pluginApiFragments",
629
+ )
630
+ let structurePayload =
631
+ pluginStructure->Option.map(s =>
632
+ toPayload(s, ~schema=Reventless.Plugin.pluginStructureSchema, ~store="pluginStructures")
633
+ )
634
+
609
635
  (
610
636
  (interstackAdminExtensionPoints, localAdminResolvedEP, schemaPushed)->Pulumi.Output.all3,
611
637
  aggregateResources->Pulumi.Output.allDict,
@@ -738,31 +764,6 @@ module Make = (
738
764
  // so reading it inside the async callback would always yield "Domain".
739
765
  let capturedDeployTarget = Spec.hooks.deployTarget.contents
740
766
 
741
- // Offload the two large pluginDefinition fields at deploy time when a
742
- // provider offers an object store (AWS writes a content-addressed object
743
- // and returns a reference); unset locally, so they stay Inline. Both
744
- // values are concrete here, so the hook — and the object write it does —
745
- // runs at graph-construction time, before the Pulumi.Output.apply below
746
- // (a resource cannot be created inside .apply). Unconditional: these
747
- // fields are always large enough to be worth offloading.
748
- let toPayload = (value, ~schema, ~store) =>
749
- switch Plugin_Helpers.offloadHook.contents {
750
- | Some(hook) =>
751
- Reventless.Offload.Offloaded(
752
- hook(~store, ~bytes=value->S.reverseConvertToJsonStringOrThrow(schema)),
753
- )
754
- | None => Reventless.Offload.Inline(value)
755
- }
756
- let apiSchemaFragmentPayload = toPayload(
757
- apiSchemaFragment,
758
- ~schema=Reventless.Plugin.apiSchemaFragmentSchema,
759
- ~store="pluginApiFragments",
760
- )
761
- let structurePayload =
762
- pluginStructure->Option.map(s =>
763
- toPayload(s, ~schema=Reventless.Plugin.pluginStructureSchema, ~store="pluginStructures")
764
- )
765
-
766
767
  // DCB EventLog definition — Some when this plugin has a DcbEventLog
767
768
  // component, None otherwise. Admin's manageSubscriptions reads this to
768
769
  // provision cross-plugin SNS subscriptions from peer plugins' DCB
@@ -421,6 +421,22 @@ function Make(Spec) {
421
421
  });
422
422
  let pushSchema = Spec.hooks.preResolversSchemaHook;
423
423
  let schemaPushed = pushSchema !== undefined ? pushSchema(extra$1, version, apiSchemaFragment) : Pulumi.output();
424
+ let toPayload = (value, schema, store) => {
425
+ let hook = Plugin_Helpers$ReventlessCore.offloadHook.contents;
426
+ if (hook !== undefined) {
427
+ return {
428
+ TAG: "Offloaded",
429
+ _0: hook(store, S.reverseConvertToJsonStringOrThrow(value, schema, undefined))
430
+ };
431
+ } else {
432
+ return {
433
+ TAG: "Inline",
434
+ _0: value
435
+ };
436
+ }
437
+ };
438
+ let apiSchemaFragmentPayload = toPayload(apiSchemaFragment, Plugin$Reventless.apiSchemaFragmentSchema, "pluginApiFragments");
439
+ let structurePayload = Stdlib_Option.map(pluginStructure, s => toPayload(s, Plugin$Reventless.pluginStructureSchema, "pluginStructures"));
424
440
  let builderOutputs = Pulumi.all([
425
441
  Pulumi.all([
426
442
  interstackAdminExtensionPoints,
@@ -487,22 +503,6 @@ function Make(Spec) {
487
503
  let match$3 = EventCollectorHelper.make(childName, eventTopics, opts);
488
504
  let eventCollector = match$3[0];
489
505
  let capturedDeployTarget = Spec.hooks.deployTarget.contents;
490
- let toPayload = (value, schema, store) => {
491
- let hook = Plugin_Helpers$ReventlessCore.offloadHook.contents;
492
- if (hook !== undefined) {
493
- return {
494
- TAG: "Offloaded",
495
- _0: hook(store, S.reverseConvertToJsonStringOrThrow(value, schema, undefined))
496
- };
497
- } else {
498
- return {
499
- TAG: "Inline",
500
- _0: value
501
- };
502
- }
503
- };
504
- let apiSchemaFragmentPayload = toPayload(apiSchemaFragment, Plugin$Reventless.apiSchemaFragmentSchema, "pluginApiFragments");
505
- let structurePayload = Stdlib_Option.map(pluginStructure, s => toPayload(s, Plugin$Reventless.pluginStructureSchema, "pluginStructures"));
506
506
  let dcbOutputs$1 = dcbResult.dcbEventLogOutputs;
507
507
  let dcbEventLogDef;
508
508
  if (dcbOutputs$1 !== undefined) {