@reventlessdev/reventless-aws 3.0.0-alpha.303 → 3.0.0-alpha.304
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.304 (2026-08-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **aws:** ship the DCB slice registry in the archive, not the environment ([3cda4cb](https://github.com/ReventlessDev/reventless-core/commit/3cda4cb780848598a436ab8e80843cf15a4d22b6))
|
|
11
|
+
|
|
12
|
+
|
|
6
13
|
# 3.0.0-alpha.303 (2026-08-16)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/reventless-aws",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.304",
|
|
4
4
|
"description": "AWS adapters for Reventless",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"@aws-sdk/s3-request-presigner": "3.970.0",
|
|
13
13
|
"sury": "11.0.0-alpha.4",
|
|
14
14
|
"uuid": "^13.0.0",
|
|
15
|
-
"@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.11",
|
|
16
15
|
"@reventlessdev/rescript-effect": "0.1.0-alpha.32",
|
|
17
16
|
"@reventlessdev/rescript-jest": "1.0.0-alpha.10",
|
|
18
|
-
"@reventlessdev/rescript-
|
|
17
|
+
"@reventlessdev/rescript-aws-sdk": "3.0.0-alpha.11",
|
|
19
18
|
"@reventlessdev/rescript-pulumi-aws": "2.4.0-alpha.77",
|
|
20
|
-
"@reventlessdev/rescript-
|
|
19
|
+
"@reventlessdev/rescript-node": "2.0.0-alpha.7",
|
|
20
|
+
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
|
|
21
21
|
"@reventlessdev/reventless-core": "3.0.0-alpha.237",
|
|
22
|
+
"@reventlessdev/rescript-uuid": "2.0.0-alpha.0",
|
|
22
23
|
"@reventlessdev/reventless-infra": "3.0.0-alpha.143",
|
|
23
24
|
"@reventlessdev/reventless-interop": "3.0.0-alpha.31",
|
|
24
|
-
"@reventlessdev/rescript-pulumi-pulumi": "2.3.0-alpha.19",
|
|
25
25
|
"@reventlessdev/reventless-postgres": "3.0.0-alpha.101",
|
|
26
26
|
"@reventlessdev/reventless-spec": "3.0.0-alpha.115"
|
|
27
27
|
},
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
// builds shared DcbEventLog operations and per-slice handlers keyed by command type name.
|
|
4
4
|
// Dual routing: AppSync direct invocation and SQS CommandTopic events.
|
|
5
5
|
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import { join } from "node:path";
|
|
6
8
|
import * as Chunk from "effect/Chunk";
|
|
7
9
|
import * as Effect from "effect/Effect";
|
|
8
10
|
import * as Stream from "effect/Stream";
|
|
@@ -245,6 +247,16 @@ async function buildHandler() {
|
|
|
245
247
|
// Lambda always sets HANDLER_CONFIG; the production path is unchanged.
|
|
246
248
|
if (!configStr) return [null, null, undefined, undefined];
|
|
247
249
|
const config = JSON.parse(configStr);
|
|
250
|
+
// The slice registry rides in the archive, not the environment — two module
|
|
251
|
+
// specifiers per slice outgrow Lambda's 4KB env-var ceiling (see the asset in
|
|
252
|
+
// StateChangeSliceRuntime_Builder_Single). An inline registry still wins, so a
|
|
253
|
+
// caller that supplies one — every test that drives a config directly — needs
|
|
254
|
+
// no asset on disk. process.cwd() is /var/task, where the archive unpacks.
|
|
255
|
+
if (config.stateChangeSliceModules === undefined) {
|
|
256
|
+
config.stateChangeSliceModules = JSON.parse(
|
|
257
|
+
readFileSync(join(process.cwd(), "sliceModules.json"), "utf-8"),
|
|
258
|
+
);
|
|
259
|
+
}
|
|
248
260
|
return buildHandlersForConfig(config, { loadModule: dynamicImport });
|
|
249
261
|
}
|
|
250
262
|
|
|
@@ -113,9 +113,16 @@ let forDcbCommandTopic = (
|
|
|
113
113
|
envVars->Dict.set("LOG_LEVEL", level->Pulumi.Output.make->Pulumi.Output.asInput)
|
|
114
114
|
)
|
|
115
115
|
|
|
116
|
-
//
|
|
116
|
+
// The slice registry: an array of {spec, behavior} objects so the entry point
|
|
117
117
|
// can dynamically import both modules and apply the curried StateChangeSlice_Callback.Make
|
|
118
118
|
// functor (Make(Spec)(Behavior)).
|
|
119
|
+
//
|
|
120
|
+
// Shipped as a `sliceModules.json` asset rather than inline in HANDLER_CONFIG.
|
|
121
|
+
// Two absolute module specifiers per slice is the one term here that grows
|
|
122
|
+
// with the plugin, and a plugin with a dozen-odd slices carries enough of
|
|
123
|
+
// them to pass Lambda's 4KB UpdateFunctionConfiguration ceiling on the whole
|
|
124
|
+
// environment — the same wall `pluginDefinition` hit in PluginRuntime_Builder,
|
|
125
|
+
// and it fails at deploy with the registry already committed to the stack.
|
|
119
126
|
let sliceModulesJson =
|
|
120
127
|
slicePaths
|
|
121
128
|
->Array.map(((specPath, behaviorPath)) => {
|
|
@@ -172,7 +179,7 @@ let forDcbCommandTopic = (
|
|
|
172
179
|
Pulumi.Output.all4((dcbTableName, queue.id, pgConnectionFragment, inboundFragment))
|
|
173
180
|
->Pulumi.Output.apply(((table, queueUrl, pgFragment, inbFragment)) => {
|
|
174
181
|
let pluginNameJson = pluginName->JSON.stringifyAny->Option.getOr(`""`)
|
|
175
|
-
`{"dcbEventLogTableName":"${table}","queueUrl":"${queueUrl}","pluginName":${pluginNameJson}
|
|
182
|
+
`{"dcbEventLogTableName":"${table}","queueUrl":"${queueUrl}","pluginName":${pluginNameJson}${pgFragment}${inbFragment}}`
|
|
176
183
|
})
|
|
177
184
|
envVars->Dict.set("HANDLER_CONFIG", handlerConfigJson->Pulumi.Output.asInput)
|
|
178
185
|
|
|
@@ -205,9 +212,16 @@ let forDcbCommandTopic = (
|
|
|
205
212
|
Util_Bundle.resolvePackageRoot("@reventlessdev/reventless-core"),
|
|
206
213
|
)
|
|
207
214
|
|
|
215
|
+
// Carries no Pulumi Output, so the archive is still built synchronously —
|
|
216
|
+
// the audit table names that do are in the inbound fragment, which stays in
|
|
217
|
+
// HANDLER_CONFIG.
|
|
218
|
+
let extraStringAssets = Dict.make()
|
|
219
|
+
extraStringAssets->Dict.set("sliceModules.json", `[${sliceModulesJson}]`)
|
|
220
|
+
|
|
208
221
|
let {code, sourceCodeHash} = Util_Bundle.buildCodeArchive(
|
|
209
222
|
~entryPointModule="@reventlessdev/reventless-aws/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs",
|
|
210
223
|
~packageDirs,
|
|
224
|
+
~extraStringAssets,
|
|
211
225
|
)
|
|
212
226
|
|
|
213
227
|
cfg.sqsBatchSize->Option.forEach(CommandTopicChannel.SQS.setBatchSize)
|
|
@@ -79,7 +79,7 @@ function forDcbCommandTopic(slicePaths, inboundSlicesOpt, dcbTableName, pluginNa
|
|
|
79
79
|
inboundFragment
|
|
80
80
|
]).apply(param => {
|
|
81
81
|
let pluginNameJson = Stdlib_Option.getOr(JSON.stringify(pluginName), `""`);
|
|
82
|
-
return `{"dcbEventLogTableName":"` + param[0] + `","queueUrl":"` + param[1] + `","pluginName":` + pluginNameJson +
|
|
82
|
+
return `{"dcbEventLogTableName":"` + param[0] + `","queueUrl":"` + param[1] + `","pluginName":` + pluginNameJson + param[2] + param[3] + `}`;
|
|
83
83
|
});
|
|
84
84
|
envVars["HANDLER_CONFIG"] = handlerConfigJson;
|
|
85
85
|
let packageDirs = {};
|
|
@@ -97,7 +97,9 @@ function forDcbCommandTopic(slicePaths, inboundSlicesOpt, dcbTableName, pluginNa
|
|
|
97
97
|
});
|
|
98
98
|
packageDirs["@reventlessdev/reventless-aws"] = Util_Bundle$ReventlessAws.resolvePackageRoot(undefined, "@reventlessdev/reventless-aws");
|
|
99
99
|
packageDirs["@reventlessdev/reventless-core"] = Util_Bundle$ReventlessAws.resolvePackageRoot(undefined, "@reventlessdev/reventless-core");
|
|
100
|
-
let
|
|
100
|
+
let extraStringAssets = {};
|
|
101
|
+
extraStringAssets["sliceModules.json"] = `[` + sliceModulesJson + `]`;
|
|
102
|
+
let match = Util_Bundle$ReventlessAws.buildCodeArchive("@reventlessdev/reventless-aws/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs", packageDirs, extraStringAssets, undefined);
|
|
101
103
|
Stdlib_Option.forEach(cfg.sqsBatchSize, CommandTopicChannel_SQS$ReventlessAws.setBatchSize);
|
|
102
104
|
let vpcConfig = pgSelection !== undefined ? pgSelection.securityGroupId.apply(sgId => ({
|
|
103
105
|
subnetIds: pgSelection.subnetIds,
|