@reventlessdev/reventless-aws 3.0.0-alpha.305 → 3.0.0-alpha.307
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 +21 -0
- package/package.json +8 -8
- package/src/Platform.res +1 -1
- package/src/adapter/Api/AppSync_Resolver_Native.res +1 -1
- package/src/adapter/Api/AppSync_Resolver_Retrying.res +2 -2
- package/src/adapter/Auth/Auth_ActiveRolePoolAttachment.res +69 -11
- package/src/adapter/Auth/Auth_ActiveRolePoolAttachment.res.mjs +19 -1
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res +2 -2
- package/src/adapter/DcbEventLog/DcbEventLogStorage_Postgres.res +1 -1
- package/src/adapter/EventLog/EventLogStorage_DynamoDb_Runtime.res +1 -1
- package/src/adapter/Postgres/PgChangeFeedRelay_Runtime.res +1 -1
- package/src/adapter/Postgres/PgProjectionFeed.res +1 -1
- package/src/adapter/QueryDb/PgQueryResolver_Lambda.res +64 -0
- package/src/adapter/QueryDb/PgQueryResolver_Lambda.res.mjs +54 -2
- package/src/adapter/QueryDb/QueryDbBackend.res +1 -1
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync.res +138 -46
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync.res.mjs +25 -21
- package/src/adapter/QueryDb/QueryDbResolvers_Lambda.res +19 -11
- package/src/adapter/QueryDb/QueryDbResolvers_Lambda.res.mjs +11 -10
- package/src/adapter/QueryEngine/QueryEngine_DynamoDb.res +1 -1
- package/src/adapter/Runtime/AggregateEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/AggregateEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/AutomationSliceEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/CounterEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/CounterEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint.mjs +44 -6
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/EventCollectorEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/EventCollectorEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/EventMapperEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/EventMapperEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/ExtensionPointEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/ExtensionPointEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/PgQueryResolverEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/PgQueryResolverEntryPoint_Ops.res +7 -1
- package/src/adapter/Runtime/PgQueryResolverEntryPoint_Ops.res.mjs +2 -1
- package/src/adapter/Runtime/PluginExtensionPointEntryPoint.res +1 -1
- package/src/adapter/Runtime/ProjectionEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/QueryDbEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/ReadModelEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/ReadModelEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +1 -1
- package/src/adapter/Runtime/SideEffectEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/SideEffectEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/StateViewSliceEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/StateViewSliceEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/StreamRoutedEntryPoint_Ops.res +1 -1
- package/src/adapter/Runtime/TaskBucketEntryPoint.mjs +1 -1
- package/src/adapter/Runtime/TaskBucketEntryPoint_Ops.res +1 -1
- package/src/util/Util_Bundle.res +1 -1
- package/src/util/Util_DynamoDbStream_Runtime.res +1 -1
- package/tests/AWS_TagsTest.res +2 -2
- package/tests/AppSync_RetirementNarrowingTest.res +272 -0
- package/tests/AppSync_RetirementNarrowingTest.res.mjs +193 -0
- package/tests/Auth_ActiveRolePoolAttachmentTest.res +140 -1
- package/tests/Auth_ActiveRolePoolAttachmentTest.res.mjs +117 -2
- package/tests/DcbEventLogStorage_DynamoDb_RuntimeTest.res +2 -2
- package/tests/EventLogStorage_DynamoDb_RuntimeTest.res +1 -1
- package/tests/PgQueryResolver_LambdaTest.res +2 -0
- package/tests/PgQueryResolver_LambdaTest.res.mjs +34 -30
- package/tests/QueryDbResolvers_AppSyncTest.res +2 -2
- package/tests/Util_BundleEsmLoaderTest.res +1 -1
- package/tests/Util_BundleRuntimeExtensionTest.res +1 -1
- package/tests/integration/AggregateEntryPoint_IntegrationTest.res +1 -1
- package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res +1 -1
- package/tests/integration/DcbEventLogStorage_DynamoDb_IntegrationTest.res +2 -2
|
@@ -27,7 +27,7 @@ import { handleQueueEvent, publishJsons as sqsPublishJsons } from "@reventlessde
|
|
|
27
27
|
// Typed cold-start core — scope/partitionTag derivation, storage-ops wiring, and
|
|
28
28
|
// per-slice handler building (functor + decode + handleCommands), all
|
|
29
29
|
// compiler-checked against the framework signatures (see the module header and
|
|
30
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md).
|
|
30
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md).
|
|
31
31
|
import { deriveScope, commandTypeNames, makeStorageOps, buildSliceHandler, buildInboundReceiver } from "./DcbCommandTopicEntryPoint_Ops.res.mjs";
|
|
32
32
|
import { makeDynamoQueryDbOps } from "./QueryDbEntryPoint_Ops.res.mjs";
|
|
33
33
|
|
|
@@ -95,6 +95,7 @@ export async function buildHandlersForConfig(config, opts = {}) {
|
|
|
95
95
|
);
|
|
96
96
|
|
|
97
97
|
const handlersByType = {};
|
|
98
|
+
const commandSchemasByType = {};
|
|
98
99
|
const sharedDcbEventLogOps = dcbEventLogOperationsMake({
|
|
99
100
|
name: config.pluginName,
|
|
100
101
|
// Mirrors DcbEventLog_Builder.res's `name ++ "DcbEventLog"` — the
|
|
@@ -119,6 +120,19 @@ export async function buildHandlersForConfig(config, opts = {}) {
|
|
|
119
120
|
);
|
|
120
121
|
for (const typeName of commandTypeNames(patchedSpec)) {
|
|
121
122
|
handlersByType[typeName] = jsonHandler;
|
|
123
|
+
// The schema this command's owner fields are read from. Kept beside the
|
|
124
|
+
// handler because the two answer the same question — "which slice is this
|
|
125
|
+
// command?" — and a command routed to a handler but not to a schema is
|
|
126
|
+
// exactly the state that stamps nothing while looking like it worked.
|
|
127
|
+
if (commandSchemasByType[typeName] !== undefined) {
|
|
128
|
+
log.error(
|
|
129
|
+
"two DCB slices declare the command \"" + typeName + "\"; owner stamping " +
|
|
130
|
+
"resolves a command by that name alone and cannot tell them apart",
|
|
131
|
+
{ comp: "DcbCommandTopicRuntime" },
|
|
132
|
+
);
|
|
133
|
+
} else {
|
|
134
|
+
commandSchemasByType[typeName] = patchedSpec.commandSchema;
|
|
135
|
+
}
|
|
122
136
|
}
|
|
123
137
|
});
|
|
124
138
|
|
|
@@ -191,9 +205,7 @@ export async function buildHandlersForConfig(config, opts = {}) {
|
|
|
191
205
|
// Sync (default): inline-dispatch the command via the same composite handler
|
|
192
206
|
// that Route 2 uses, so the AppSync resolver gets a typed Accepted/Rejected
|
|
193
207
|
// outcome. Async: undefined → makeCommandGenerator falls back to publishJsons
|
|
194
|
-
// and returns Pending.
|
|
195
|
-
// already validated input against the SDL — per-slice schemas reapply inside
|
|
196
|
-
// the typed core's buildSliceHandler decode.
|
|
208
|
+
// and returns Pending.
|
|
197
209
|
const publishJsonsAndWait = DISPATCH_MODE === "async"
|
|
198
210
|
? undefined
|
|
199
211
|
: (jsons) => runInlineAndCollect(jsons, compositeJsonCommandsHandler);
|
|
@@ -202,14 +214,31 @@ export async function buildHandlersForConfig(config, opts = {}) {
|
|
|
202
214
|
// the framework signature. stripIdFromParams=false: DCB slices may declare a
|
|
203
215
|
// literal `id` field as part of the command schema (composite partition keys
|
|
204
216
|
// etc.) — don't strip it.
|
|
205
|
-
|
|
217
|
+
//
|
|
218
|
+
// One generator per command, differing only in the schema. This used to be a
|
|
219
|
+
// single generator built on the permissive `jsonSchema`, on the still-true
|
|
220
|
+
// grounds that AppSync has already validated input against the SDL and that
|
|
221
|
+
// per-slice schemas reapply inside `buildSliceHandler`'s decode. What that
|
|
222
|
+
// reasoning did not cover is that the schema is also where `makeGenerateCommand`
|
|
223
|
+
// reads a command's `@owner` fields from: given `S.json` it finds none, for every
|
|
224
|
+
// command, and the write keeps whatever owner the CLIENT sent. Validation was
|
|
225
|
+
// never the only job.
|
|
226
|
+
const makeGeneratorFor = (commandSchema) => makeCommandGenerator(
|
|
206
227
|
publishJsons,
|
|
207
228
|
publishJsonsAndWait,
|
|
208
229
|
config.pluginName,
|
|
209
|
-
|
|
230
|
+
commandSchema,
|
|
210
231
|
"StateChangeSlice",
|
|
211
232
|
false,
|
|
212
233
|
);
|
|
234
|
+
const generatorsByType = {};
|
|
235
|
+
for (const typeName of Object.keys(commandSchemasByType)) {
|
|
236
|
+
generatorsByType[typeName] = makeGeneratorFor(commandSchemasByType[typeName]);
|
|
237
|
+
}
|
|
238
|
+
// A command no loaded slice claims keeps the permissive generator — what every
|
|
239
|
+
// command got before this change — so anything reaching this handler by another
|
|
240
|
+
// route behaves as it did. It also cannot stamp, hence the warning.
|
|
241
|
+
const generateFallback = makeGeneratorFor(jsonSchema);
|
|
213
242
|
|
|
214
243
|
const cmdGenHandler = (event) => {
|
|
215
244
|
// CommandGenerator.meta declares ip as array<string> (X-Forwarded-For chain).
|
|
@@ -225,6 +254,15 @@ export async function buildHandlersForConfig(config, opts = {}) {
|
|
|
225
254
|
groups: [],
|
|
226
255
|
provider: { TAG: "Custom", _0: "aws" },
|
|
227
256
|
};
|
|
257
|
+
let generateCommand = generatorsByType[event.command];
|
|
258
|
+
if (generateCommand === undefined) {
|
|
259
|
+
log.warn(
|
|
260
|
+
"no DCB slice declares the command \"" + event.command + "\"; dispatching " +
|
|
261
|
+
"without an owner stamp, so any @owner field keeps the value the caller sent",
|
|
262
|
+
{ comp: "DcbCommandTopicRuntime" },
|
|
263
|
+
);
|
|
264
|
+
generateCommand = generateFallback;
|
|
265
|
+
}
|
|
228
266
|
return generateCommand({ ...event, meta, identity });
|
|
229
267
|
};
|
|
230
268
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the DCB CommandTopic Lambda entry point.
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md).
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md).
|
|
4
4
|
// The `.mjs` shell owns the one boundary that is inherently untyped: reading
|
|
5
5
|
// `HANDLER_CONFIG` and dynamically `import()`-ing user Spec/Behavior modules at
|
|
6
6
|
// cold start, whose types are unknowable here. Everything below is compiler-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// driven entirely by HANDLER_CONFIG.
|
|
4
4
|
//
|
|
5
5
|
// Thin untyped shell ("typed core, thin shell" —
|
|
6
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
6
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
7
|
// seams that are inherently untyped — the dynamic `import()` of EP/extension/spec
|
|
8
8
|
// modules named in HANDLER_CONFIG and the functor applications consuming those
|
|
9
9
|
// runtime-loaded modules. Everything else (config parse/validation, the Plugin-RM
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the Plugin EventCollector Lambda entry point.
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
4
|
// EventCollectorEntryPoint.mjs owns ONLY the untyped seams — the dynamic
|
|
5
5
|
// `import()` of EP/extension/spec modules named in HANDLER_CONFIG and the
|
|
6
6
|
// functor applications consuming those runtime-loaded modules
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// wires EventMapper_Callback.MakeCounterHandler + MakeEventCollectorHandler.
|
|
4
4
|
//
|
|
5
5
|
// Thin untyped shell ("typed core, thin shell" —
|
|
6
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
6
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
7
|
// seams that are inherently untyped — the dynamic `import()` of the
|
|
8
8
|
// target-spec/mappings modules named in HANDLER_CONFIG, the shape fix-ups on
|
|
9
9
|
// those runtime-loaded modules (patchSpecId / patchMappingsSourceIds), and the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the EventMapper Lambda entry point (Micro mode).
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
4
|
// EventMapperEntryPoint.mjs keeps only the untyped seam — the dynamic
|
|
5
5
|
// `import()` of the target-spec/mappings modules named in HANDLER_CONFIG, the
|
|
6
6
|
// `patchSpecId` / mapping-Source-Id fix-ups, and the
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// routes SQS events through handleQueueEvent.
|
|
5
5
|
//
|
|
6
6
|
// Thin untyped shell ("typed core, thin shell" —
|
|
7
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
8
8
|
// seams that are inherently untyped — the dynamic `import()` of the
|
|
9
9
|
// spec/mappings modules named in HANDLER_CONFIG, the `patchSpecId` fix-up, and
|
|
10
10
|
// the two functor applications consuming them. The callback config,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Typed cold-start core for the (per-extension-point) ExtensionPoint Lambda
|
|
2
2
|
// entry point.
|
|
3
3
|
//
|
|
4
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
5
5
|
// ExtensionPointEntryPoint.mjs keeps only the untyped seam — the dynamic
|
|
6
6
|
// `import()` of the spec/mappings modules named in HANDLER_CONFIG, the
|
|
7
7
|
// `patchSpecId` fix-up, and the ExtensionPoint_Callback.Make /
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// PgQueryResolver_Lambda.dispatch routes.
|
|
10
10
|
//
|
|
11
11
|
// Thin untyped shell ("typed core, thin shell" —
|
|
12
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
12
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
13
13
|
// seams that are inherently untyped — the dynamic `import()` of the spec
|
|
14
14
|
// packages named in QUERY_RESOLVER_CONFIG, the `patchSpecId` fix-up, and the
|
|
15
15
|
// reads of the runtime-loaded modules' exports. QUERY_RESOLVER_CONFIG parsing,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Typed cold-start core for the shared PgQueryResolver Lambda entry point
|
|
2
2
|
// (B3.2b).
|
|
3
3
|
//
|
|
4
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
5
5
|
// PgQueryResolverEntryPoint.mjs keeps only the untyped seam — the dynamic
|
|
6
6
|
// `import()` of each spec package named in QUERY_RESOLVER_CONFIG, the
|
|
7
7
|
// `patchSpecId` fix-up, and the reads of the runtime-loaded module's exports
|
|
@@ -163,6 +163,12 @@ let registerBinding = (
|
|
|
163
163
|
->Reventless.StateAnnotations.getSpec
|
|
164
164
|
->Option.flatMap(a => a.retired)
|
|
165
165
|
->Option.flatMap(r => r.values),
|
|
166
|
+
// Read off the retirement rather than from a second annotation: a record
|
|
167
|
+
// cannot declare the reach of a retirement it does not have.
|
|
168
|
+
namedWhenRetired: spec.stateSchema
|
|
169
|
+
->Reventless.StateAnnotations.getSpec
|
|
170
|
+
->Option.flatMap(a => a.retired)
|
|
171
|
+
->Option.mapOr(false, r => r.namedWhenRetired),
|
|
166
172
|
},
|
|
167
173
|
)
|
|
168
174
|
logDebug("registered resolver binding for " ++ entry.readModelName, {comp: "PgQueryResolver"})
|
|
@@ -77,7 +77,8 @@ function registerBinding(pushdowns, pgConnection, entry, spec) {
|
|
|
77
77
|
authorization: spec.authorization,
|
|
78
78
|
ownerField: Owner$Reventless.fieldNames(spec.stateSchema)[0],
|
|
79
79
|
retiredField: Stdlib_Option.map(Stdlib_Option.flatMap(StateAnnotations$Reventless.getSpec(spec.stateSchema), a => a.retired), r => r.field),
|
|
80
|
-
retiredValues: Stdlib_Option.flatMap(Stdlib_Option.flatMap(StateAnnotations$Reventless.getSpec(spec.stateSchema), a => a.retired), r => r.values)
|
|
80
|
+
retiredValues: Stdlib_Option.flatMap(Stdlib_Option.flatMap(StateAnnotations$Reventless.getSpec(spec.stateSchema), a => a.retired), r => r.values),
|
|
81
|
+
namedWhenRetired: Stdlib_Option.mapOr(Stdlib_Option.flatMap(StateAnnotations$Reventless.getSpec(spec.stateSchema), a => a.retired), false, r => r.namedWhenRetired)
|
|
81
82
|
});
|
|
82
83
|
HandlerFactoryHelpersMjs.log.debug("registered resolver binding for " + entry.readModelName, {
|
|
83
84
|
comp: "PgQueryResolver"
|
|
@@ -95,7 +95,7 @@ module Mappings = {
|
|
|
95
95
|
// Parity with the former shell: only the Plugin lifecycle mapping. The
|
|
96
96
|
// in-process wiring (PluginExtensionPoint_Builder) additionally registers
|
|
97
97
|
// PluginExtensionPoint_UiFragment.Mapping — divergence tracked in
|
|
98
|
-
// docs/plans/entry-point-rescript-conversion.md.
|
|
98
|
+
// docs/plans/done/entry-point-rescript-conversion.md.
|
|
99
99
|
let mappings: array<module(Mapping)> = [module(PluginMappingInstance.Mapping)]
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Typed QueryDb-assembly core shared by the two projection Lambda entry points
|
|
2
2
|
// (ReadModelEntryPoint.mjs, StateViewSliceEntryPoint.mjs).
|
|
3
3
|
//
|
|
4
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
5
5
|
// both shells build the QueryDb operation set (DynamoDB or Postgres, live-update
|
|
6
6
|
// wrapped) for each projection from spec-module reads; that machinery lives
|
|
7
7
|
// here, fully type-checked. The routed dispatch boundary they share (with the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Typed cold-start core shared by the QueryDb-backed entry-point shells
|
|
2
2
|
// (ReadModelEntryPoint.mjs, StateViewSliceEntryPoint.mjs).
|
|
3
3
|
//
|
|
4
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md).
|
|
4
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md).
|
|
5
5
|
// The DynamoDB QueryDb operations were built in each shell with seven positional
|
|
6
6
|
// `load(table)` / `save(table)` / … calls into the compiled runtime, assembled
|
|
7
7
|
// into an object the shell then passes to the ReadModel/StateViewSlice callback
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// wires ReadModel_Callback.Make, builds handler map keyed by source URN.
|
|
4
4
|
//
|
|
5
5
|
// Thin untyped shell ("typed core, thin shell" —
|
|
6
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
6
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
7
|
// seams that are inherently untyped — the dynamic `import()` of spec/mappings
|
|
8
8
|
// modules named in HANDLER_CONFIG, the shape fix-ups on those runtime-loaded
|
|
9
9
|
// modules (patchSpecId / fixMappingsModule), and the ReadModel_Callback.Make
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the ReadModel Lambda entry point.
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
4
|
// ReadModelEntryPoint.mjs keeps only the untyped seams — the dynamic `import()`
|
|
5
5
|
// of spec/mappings modules named in HANDLER_CONFIG, the `patchSpecId` /
|
|
6
6
|
// `fixMappingsModule` shape fix-ups on those runtime-loaded modules, and the
|
|
@@ -354,7 +354,7 @@ let makeFromCodeAsset: (
|
|
|
354
354
|
|
|
355
355
|
// Announce the provisioned execution unit to the Monitoring registry. No-op
|
|
356
356
|
// unless a deploy program registered a backend via Monitoring.use — see
|
|
357
|
-
// docs/plans/monitoring-hook-seam.md.
|
|
357
|
+
// docs/plans/done/monitoring-hook-seam.md.
|
|
358
358
|
ReventlessCore.Monitoring.notify(~kind=unitKind, ~name, ~component=lambdaResource)
|
|
359
359
|
|
|
360
360
|
{
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// wires SideEffectHandler_Callback.Make, builds handler map keyed by source URN.
|
|
4
4
|
//
|
|
5
5
|
// Thin untyped shell ("typed core, thin shell" —
|
|
6
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
6
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
7
|
// seams that are inherently untyped — the dynamic `import()` of the side-effect
|
|
8
8
|
// modules named in HANDLER_CONFIG and the SideEffectHandler_Callback.Make
|
|
9
9
|
// functor application consuming them. HANDLER_CONFIG parsing and handler
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the SideEffectHandler Lambda entry point.
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
4
|
// SideEffectEntryPoint.mjs keeps only the untyped seam — the dynamic `import()`
|
|
5
5
|
// of the side-effect modules named in HANDLER_CONFIG and the
|
|
6
6
|
// SideEffectHandler_Callback.Make functor application consuming them.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// source URN.
|
|
5
5
|
//
|
|
6
6
|
// Thin untyped shell ("typed core, thin shell" —
|
|
7
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
8
8
|
// inherently-untyped seam — the dynamic `import()` of spec/projection modules
|
|
9
9
|
// named in HANDLER_CONFIG and the reads of their exports. Everything else
|
|
10
10
|
// (HANDLER_CONFIG parsing incl. the compact-v2 expansion, the QueryDb operation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the StateViewSlice Lambda entry point.
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
4
|
// StateViewSliceEntryPoint.mjs keeps only the inherently-untyped seam — the
|
|
5
5
|
// dynamic `import()` of spec/projection modules named in HANDLER_CONFIG and the
|
|
6
6
|
// reads of their exports. HANDLER_CONFIG parsing (including the compact-v2
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// points (ReadModelEntryPoint.mjs, StateViewSliceEntryPoint.mjs,
|
|
3
3
|
// AutomationSliceEntryPoint.mjs).
|
|
4
4
|
//
|
|
5
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
5
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
6
6
|
// all three shells route DynamoDB-stream / SQS-feed records to per-source-URN
|
|
7
7
|
// handler lists with per-handler log attribution — machinery the `.mjs` files
|
|
8
8
|
// previously duplicated verbatim. It lives here so every co-hosted component
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Events schedules).
|
|
5
5
|
//
|
|
6
6
|
// Thin untyped shell ("typed core, thin shell" —
|
|
7
|
-
// docs/plans/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
7
|
+
// docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md): this file owns ONLY the
|
|
8
8
|
// inherently-untyped seam — the dynamic `import()` of the callback module named
|
|
9
9
|
// in HANDLER_CONFIG and the read of its `callback` export. Everything else
|
|
10
10
|
// (HANDLER_CONFIG parsing, S3-event handling via TaskBucket_S3_Runtime, the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed cold-start core for the TaskBucket Lambda entry point.
|
|
2
2
|
//
|
|
3
|
-
// The "typed core, thin shell" split (docs/plans/minimize-lambda-entrypoint-mjs-shell.md):
|
|
3
|
+
// The "typed core, thin shell" split (docs/plans/done/minimize-lambda-entrypoint-mjs-shell.md):
|
|
4
4
|
// TaskBucketEntryPoint.mjs keeps only the inherently-untyped seam — the
|
|
5
5
|
// dynamic `import()` of the task callback module named in HANDLER_CONFIG and
|
|
6
6
|
// the read of its `callback` export. HANDLER_CONFIG parsing, the S3-event →
|
package/src/util/Util_Bundle.res
CHANGED
|
@@ -122,7 +122,7 @@ let hashString = (str: string): string =>
|
|
|
122
122
|
// (set on the Lambda env by RuntimeEnvironment_Lambda.makeFromCodeAsset). Shipped
|
|
123
123
|
// at the root of every code archive; NODE_OPTIONS=--import points Node at
|
|
124
124
|
// register-hook.mjs. Validated on a Node 22.17.1 rig; see
|
|
125
|
-
// docs/plans/deployed-lambda-esm-self-containment.md.
|
|
125
|
+
// docs/plans/done/deployed-lambda-esm-self-containment.md.
|
|
126
126
|
let registerHookFileName = "register-hook.mjs"
|
|
127
127
|
let layerResolverFileName = "layer-resolver.mjs"
|
|
128
128
|
|
|
@@ -5,7 +5,7 @@ type result =
|
|
|
5
5
|
| Invalid
|
|
6
6
|
|
|
7
7
|
// Returns None for rows that aren't events — e.g. DCB FENCE rows and aggregate
|
|
8
|
-
// snapshot rows (position = "SNAPSHOT"; docs/plans/aggregate-snapshotting.md),
|
|
8
|
+
// snapshot rows (position = "SNAPSHOT"; docs/plans/done/aggregate-snapshotting.md),
|
|
9
9
|
// neither of which has an `event` column. The caller filters these out via
|
|
10
10
|
// `Invalid` rather than synthesising a bogus event that sury would later reject.
|
|
11
11
|
let buildJsonEvent' = dict => {
|
package/tests/AWS_TagsTest.res
CHANGED
|
@@ -3,7 +3,7 @@ open JestGlobals
|
|
|
3
3
|
// Guards the resource-attribution tag schema. A downstream inventory answers
|
|
4
4
|
// "which model component owns this resource, in what role, at what scope" purely
|
|
5
5
|
// from these keys, so the key set and its namespacing are load-bearing.
|
|
6
|
-
// See docs/plans/resource-attribution-tag-schema.md.
|
|
6
|
+
// See docs/plans/done/resource-attribution-tag-schema.md.
|
|
7
7
|
|
|
8
8
|
module Attribution = ReventlessCore.ResourceAttribution
|
|
9
9
|
|
|
@@ -95,7 +95,7 @@ describe("AWS_Tags — owner overrides the piece adapter's own kind", () => {
|
|
|
95
95
|
// The piece adapters pass their OWN ComponentType as ~kind, which names the
|
|
96
96
|
// piece and so collapses onto ~role. A QueryDb is instantiated by six different
|
|
97
97
|
// component kinds, so without the owner a reader cannot tell a ReadModel's
|
|
98
|
-
// table from a StateViewSlice's. See docs/plans/resource-attribution-owner-kind.md.
|
|
98
|
+
// table from a StateViewSlice's. See docs/plans/done/resource-attribution-owner-kind.md.
|
|
99
99
|
let queryDbTagsFor = (~owner=?) =>
|
|
100
100
|
AWS_Tags.make(
|
|
101
101
|
~name="ProductsQueryDb",
|