@reventlessdev/reventless-aws 3.0.0-alpha.344 → 3.0.0-alpha.345
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 +8 -0
- package/package.json +11 -11
- package/scripts/ProvisionIdentity.res +8 -3
- package/src/Platform.res +327 -328
- package/src/Platform.res.mjs +4 -2
- package/src/Platform_Casts.res +13 -4
- package/src/adapter/Api/AppSyncEventsSigner_Ops.res +8 -4
- package/src/adapter/Api/AppSync_EventsApi.res +12 -14
- package/src/adapter/Api/AppSync_Resolver_Native.res +3 -4
- package/src/adapter/Api/AppSync_Resolver_Retrying.res +78 -70
- package/src/adapter/Api/AppSync_SourceApiAssociation_Retrying.res +11 -8
- package/src/adapter/Api/Platform_AdminScan_Ops.res +15 -14
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda.res +10 -2
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res +40 -50
- package/src/adapter/Api/Platform_UIFragments_Lambda.res +39 -32
- package/src/adapter/Api/Platform_UIFragments_Lambda_Ops.res +5 -2
- package/src/adapter/Auth/Auth_ActiveRolePoolAttachment.res +0 -1
- package/src/adapter/Auth/Auth_ActiveRoleStore.res +1 -2
- package/src/adapter/Auth/Auth_ActiveRoleStore_Schema.res +1 -4
- package/src/adapter/Auth/Auth_ActiveRoleTrigger_Ops.res +5 -2
- package/src/adapter/Auth/Auth_Cognito.res +3 -9
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync.res +1 -4
- package/src/adapter/CommandGenerator/CommandGeneratorResolvers_AppSync_NoOp.res +3 -1
- package/src/adapter/CommandGenerator/InboundTranslationResolvers_AppSync.res +1 -4
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS.res +7 -4
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Async.res +6 -1
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_FIFO.res +7 -4
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Runtime.res +24 -18
- package/src/adapter/CommandTopic/CommandTopicChannel_SQS_Sync.res +9 -4
- package/src/adapter/CommandTopic/CommandTopicRegistry.res +1 -4
- package/src/adapter/Counter/CounterHandler_DynamoDbStream.res +15 -15
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb.res +9 -5
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res +179 -213
- package/src/adapter/EventCollector/EventCollectorChannel_DynamoDbStream.res +5 -5
- package/src/adapter/EventCollector/EventCollectorChannel_Helpers.res +6 -2
- package/src/adapter/EventCollector/EventCollectorChannel_SQS.res +14 -7
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_FIFO.res +14 -7
- package/src/adapter/EventCollector/EventCollectorChannel_SQS_Runtime.res +6 -3
- package/src/adapter/EventLog/EventLogStorage_DynamoDbStream.res +6 -1
- package/src/adapter/EventLog/EventLogStorage_DynamoDb_Runtime.res +13 -17
- package/src/adapter/EventLog/EventLogStorage_Postgres.res +7 -4
- package/src/adapter/EventLogSubscription/EventLogSubscription_AppSync.res +12 -7
- package/src/adapter/EventLogSubscription/EventLogSubscription_AppSync_Ops.res +4 -2
- package/src/adapter/EventTopic/EventTopicPublisher_DynamoDbStream.res +3 -2
- package/src/adapter/EventTopic/EventTopicPublisher_SNS.res +20 -12
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_FIFO.res +21 -9
- package/src/adapter/EventTopic/EventTopicPublisher_SNS_Runtime.res +5 -3
- package/src/adapter/Geocoder/Geocoder_AwsLocation_Resolver.res +6 -3
- package/src/adapter/Mcp/MCP_Lambda.res +31 -46
- package/src/adapter/Messaging/Messaging_Ses_Backend.res +11 -7
- package/src/adapter/Messaging/Messaging_Ses_Backend.res.mjs +2 -4
- package/src/adapter/Monitoring/Monitoring_CloudWatch.res +16 -16
- package/src/adapter/Postgres/PgChangeFeedRelay_Builder.res +5 -10
- package/src/adapter/Postgres/PgChangeFeedRelay_Runtime.res +4 -2
- package/src/adapter/Postgres/PgConnection.res +6 -5
- package/src/adapter/Postgres/PgMigration_Builder.res +4 -8
- package/src/adapter/Postgres/PgRuntime.res +4 -7
- package/src/adapter/QueryDb/PgQueryResolver_Builder.res +9 -11
- package/src/adapter/QueryDb/PgQueryResolver_Lambda.res +22 -21
- package/src/adapter/QueryDb/QueryDbResolvers_AppSync.res +114 -111
- package/src/adapter/QueryDb/QueryDbResolvers_Lambda.res +1 -7
- package/src/adapter/QueryDb/QueryDbStorage.res +4 -2
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb.res +23 -24
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDbStream.res +8 -2
- package/src/adapter/QueryDb/QueryDbStorage_DynamoDb_Runtime.res +71 -73
- package/src/adapter/QueryDb/QueryDbStorage_Postgres.res +5 -2
- package/src/adapter/QueryDb/QueryInterceptor_Provisioning.res +1 -4
- package/src/adapter/QueryEngine/QueryEngine_DynamoDb.res +8 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +73 -81
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res +72 -78
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate.res +44 -67
- package/src/adapter/Runtime/AggregateRuntime_Builder_PerAggregate_Async.res +44 -67
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single.res +53 -82
- package/src/adapter/Runtime/AggregateRuntime_Builder_Single_Async.res +47 -77
- package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res +18 -11
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res +80 -97
- package/src/adapter/Runtime/CounterEntryPoint_Ops.res +2 -7
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res +16 -10
- package/src/adapter/Runtime/EventCollectorEntryPoint_Ops.res +24 -15
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_PerEventCollector.res +17 -37
- package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +31 -57
- package/src/adapter/Runtime/EventMapperEntryPoint_Ops.res +18 -24
- package/src/adapter/Runtime/ExtensionPointEntryPoint_Ops.res +1 -5
- package/src/adapter/Runtime/ExtensionPointRuntime_Builder_PerExtensionPoint.res +4 -3
- package/src/adapter/Runtime/HeartbeatEntryPoint.res +0 -1
- package/src/adapter/Runtime/PgChangeFeedRelayEntryPoint.res +4 -2
- package/src/adapter/Runtime/PgMigrationEntryPoint.res +0 -1
- package/src/adapter/Runtime/PgQueryResolverEntryPoint_Ops.res +3 -2
- package/src/adapter/Runtime/PluginExtensionPointEntryPoint.res +1 -2
- package/src/adapter/Runtime/ProjectionEntryPoint_Ops.res +4 -5
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +22 -10
- package/src/adapter/Runtime/RuntimeExtensionEntryPoint_Ops.res +8 -2
- package/src/adapter/Runtime/SideEffectHandlerRuntime_Builder_Single.res +14 -31
- package/src/adapter/Runtime/StateChangeSliceRuntime_Builder_Single.res +16 -17
- package/src/adapter/Runtime/StateViewSliceEntryPoint_Ops.res +10 -9
- package/src/adapter/Runtime/StateViewSliceRuntime_Builder_Single.res +46 -52
- package/src/adapter/Runtime/StreamRoutedEntryPoint_Ops.res +36 -41
- package/src/adapter/Runtime/TaskBucketEntryPoint_Ops.res +31 -37
- package/src/adapter/Runtime/TaskRuntime_Builder_PerBucket.res +6 -7
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents.res +4 -6
- package/src/adapter/ScheduledPublisher/ScheduledPublisher_CloudWatchEvents_Runtime.res +2 -6
- package/src/adapter/StateTopic/StateTopic_AppSync.res +21 -16
- package/src/adapter/StateTopic/StateTopic_AppSync_Ops.res +36 -32
- package/src/adapter/Task/TaskBucket_S3.res +6 -1
- package/src/adapter/Upload/Upload_Claim_S3.res +17 -20
- package/src/adapter/Upload/Upload_Claim_S3_Ops.res +5 -2
- package/src/adapter/Upload/Upload_Presign_S3.res +51 -49
- package/src/capability/Capability_Geocoding_AwsLocation.res +4 -1
- package/src/capability/Capability_Messaging.res +4 -5
- package/src/capability/Capability_Messaging_Ses.res +3 -1
- package/src/capability/Capability_ObjectStore_S3.res +1 -7
- package/src/components/Api/AppSync_Adapter.res +28 -41
- package/src/components/Api/AppSync_SdlDecorate.res +38 -30
- package/src/components/AutomationSlice_Builder.res +6 -4
- package/src/components/ExtensionPoint_Builder.res +9 -10
- package/src/components/InboundTranslationSlice_Builder.res +7 -8
- package/src/components/OutboundTranslationSlice_Builder.res +14 -8
- package/src/components/OutboundTranslationSlice_Builder.res.mjs +1 -1
- package/src/components/SideEffectHandler_Single.res +4 -4
- package/src/components/StateViewSlice_Builder.res +6 -4
- package/src/components/StateViewSlice_Builder_Stream.res +6 -4
- package/src/components/Task_Builder_PerBucket.res +10 -11
- package/src/plugin/cloner/ClonerRunner_Fargate.res +3 -10
- package/src/plugin/cloner/ClonerRunner_Fargate_Runtime.res +1 -4
- package/src/plugin/heartbeat/HeartbeatRunner_CloudWatchEvents.res +5 -5
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res +19 -21
- package/src/plugin/runtime/PluginRuntime_Builder.res +167 -188
- package/src/plugin/runtime/Util_PluginMessage_Runtime.res +6 -5
- package/src/plugin/stack/Plugin_Stack.res +104 -103
- package/src/util/Util_AlarmSpec.res +2 -1
- package/src/util/Util_AppSync.res +8 -2
- package/src/util/Util_AppSync_Caller.res +15 -14
- package/src/util/Util_Bundle.res +46 -42
- package/src/util/Util_CognitoGroupUser_Runtime.res +32 -34
- package/src/util/Util_Cognito_Runtime.res +11 -7
- package/src/util/Util_DeadLetterQueue.res +12 -2
- package/src/util/Util_DynamoDb.res +5 -3
- package/src/util/Util_DynamoDbStream.res +7 -3
- package/src/util/Util_DynamoDbStream_Runtime.res +1 -2
- package/src/util/Util_DynamoDb_Runtime.res +23 -41
- package/src/util/Util_HostUiDomain.res +6 -1
- package/src/util/Util_Kinesis_Runtime.res +10 -11
- package/src/util/Util_Lambda.res +12 -5
- package/src/util/Util_LambdaEnvBudget.res +5 -5
- package/src/util/Util_LambdaLogging.res +1 -2
- package/src/util/Util_LogGroup_Adopting.res +1 -4
- package/src/util/Util_ResourceNaming.res +1 -2
- package/src/util/Util_SNS.res +8 -3
- package/src/util/Util_SNS_FIFO.res +1 -1
- package/src/util/Util_SNS_Runtime.res +11 -10
- package/src/util/Util_SQS.res +4 -2
- package/src/util/Util_SQS_FIFO.res +5 -2
- package/src/util/Util_SQS_Runtime.res +37 -36
- package/src/util/Util_ShellConfig.res +3 -2
- package/src/util/Util_StaticBundle.res +1 -3
- package/src/util/Util_StoreLayout.res +4 -1
- package/tests/AWS_TagsTest.res +16 -5
- package/tests/AppSyncEventsSigner_OpsTest.res +11 -2
- package/tests/AppSync_AdapterTest.res +203 -224
- package/tests/AppSync_Resolver_RetryingTest.res +64 -44
- package/tests/AppSync_RetirementNarrowingTest.res +59 -46
- package/tests/AppSync_SdlDecorateTest.res +22 -20
- package/tests/AppSync_SourceApiAssociation_RetryingTest.res +40 -22
- package/tests/Auth_ActiveRolePoolAttachmentTest.res +114 -107
- package/tests/Auth_ActiveRoleStoreTest.res +12 -9
- package/tests/Auth_ActiveRoleStore_SchemaTest.res +2 -1
- package/tests/Auth_ActiveRoleTrigger_OpsTest.res +20 -16
- package/tests/Auth_CognitoTest.res +31 -46
- package/tests/AutomationSliceEntryPoint_OpsTest.res +69 -67
- package/tests/BakeConvergenceTest.res +22 -25
- package/tests/Capability_MessagingTest.res +28 -12
- package/tests/CommandTopicQueuePolicyTest.res +1 -2
- package/tests/CounterEntryPoint_OpsTest.res +3 -7
- package/tests/DcbEventLogStorage_DynamoDb_RuntimeTest.res +306 -210
- package/tests/EventCollectorConnectLambdaPreviewTest.res +14 -7
- package/tests/EventCollectorEntryPoint_OpsTest.res +12 -4
- package/tests/EventCollectorPluginDefinitionAssetTest.res +18 -11
- package/tests/EventCollectorReadyGateTest.res +5 -4
- package/tests/EventLogStorage_DynamoDb_RuntimeTest.res +1 -2
- package/tests/EventMapperEntryPoint_OpsTest.res +1 -3
- package/tests/ExtensionPointEntryPoint_OpsTest.res +1 -4
- package/tests/HandlerFactoryDispatchTest.res +97 -70
- package/tests/MCP_LambdaTest.res +16 -27
- package/tests/PgChangeFeedRelay_IntegrationTest.res +123 -93
- package/tests/PgChangeFeedRelay_RuntimeTest.res +13 -10
- package/tests/PgMigrationEntryPoint_IntegrationTest.res +0 -1
- package/tests/PgPipeline_IntegrationTest.res +80 -66
- package/tests/PgQueryDbUnion_IntegrationTest.res +1 -2
- package/tests/PgQueryResolverEntryPoint_OpsTest.res +2 -6
- package/tests/PgQueryResolver_LambdaTest.res +41 -24
- package/tests/Platform_AdminScan_OpsTest.res +4 -1
- package/tests/Platform_ComponentDefinitions_Lambda_OpsTest.res +137 -129
- package/tests/ProjectionEntryPoint_DisplayNameTest.res +7 -3
- package/tests/ProjectionEntryPoint_UnionStampTest.res +3 -2
- package/tests/ProvisionIdentityTest.res +2 -6
- package/tests/QueryDbOwnerIndexTableTest.res +6 -4
- package/tests/QueryDbResolvers_AppSyncTest.res +23 -16
- package/tests/QueryInterceptor_LambdaTest.res +11 -13
- package/tests/ReadModelEntryPoint_OpsTest.res +43 -41
- package/tests/RuntimeExtensionEntryPoint_OpsTest.res +4 -3
- package/tests/SideEffectEntryPoint_OpsTest.res +23 -18
- package/tests/StateChangeDescriptorParityTest.res +28 -26
- package/tests/StateTopicKeySchemaTest.res +18 -15
- package/tests/StateViewSliceEntryPoint_OpsTest.res +55 -44
- package/tests/TaskBucketEntryPoint_OpsTest.res +13 -13
- package/tests/Upload_ClaimTest.res +3 -3
- package/tests/Util_AwsErrorTest.res +4 -7
- package/tests/Util_BundleDependencyClosureTest.res +15 -3
- package/tests/Util_BundleEsmLoaderTest.res +3 -3
- package/tests/Util_BundleResolveTest.res +4 -6
- package/tests/Util_BundleRuntimeExtensionTest.res +17 -18
- package/tests/Util_DcbMetricsTest.res +6 -6
- package/tests/Util_DynamoDbStreamTest.res +4 -5
- package/tests/Util_DynamoDbTest.res +3 -2
- package/tests/Util_LambdaEnvBudgetTest.res +22 -18
- package/tests/Util_LambdaLoggingTest.res +9 -8
- package/tests/Util_LogGroup_AdoptingTest.res +10 -5
- package/tests/Util_LogRetentionTest.res +6 -2
- package/tests/Util_OwnerScopeEnvTest.res +10 -8
- package/tests/Util_SQS_RuntimeTest.res +5 -7
- package/tests/Util_ShellConfigTest.res +7 -17
- package/tests/Util_StaticBundleTest.res +3 -8
- package/tests/Util_StoreLayoutTest.res +17 -12
- package/tests/integration/AggregateEntryPoint_IntegrationTest.res +1 -4
- package/tests/integration/DcbCommandTopicEntryPoint_IntegrationTest.res +15 -15
- package/tests/integration/DcbEventLogStorage_DynamoDb_IntegrationTest.res +296 -232
- package/tests/integration/DcbIntegrationHarness.res +8 -8
- package/tests/integration/EpCompositeSlice.res +16 -8
- package/tests/integration/QueryDbUnion_DynamoDb_IntegrationTest.res +8 -10
- package/tests/integration/StateViewSliceEntryPoint_IntegrationTest.res +10 -10
- package/tests/integration/SvsTestSlice_Projection.res +1 -3
- package/tests/util/Util_AlarmSpecTest.res +62 -49
|
@@ -20,21 +20,27 @@ describe("QueryDbResolvers_AppSync.internalRowRequiredAttr", () => {
|
|
|
20
20
|
})
|
|
21
21
|
|
|
22
22
|
describe("AppSync_Resolver_Retrying.Functions.listAllItemsConnection", () => {
|
|
23
|
-
testSync(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
testSync(
|
|
24
|
+
"with ~requireAttribute emits an attribute_exists filter that excludes internal rows",
|
|
25
|
+
() => {
|
|
26
|
+
let code =
|
|
27
|
+
AppSync_Resolver_Retrying.Functions.listAllItemsConnection(
|
|
28
|
+
~labelField="name",
|
|
29
|
+
~requireAttribute="name",
|
|
30
|
+
)->codeOf
|
|
31
|
+
expect(code->String.includes("attribute_exists(#name)"))->toBe(true)
|
|
32
|
+
expect(code->String.includes("names['#name'] = 'name'"))->toBe(true)
|
|
33
|
+
},
|
|
34
|
+
)
|
|
32
35
|
|
|
33
|
-
testSync(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
testSync(
|
|
37
|
+
"without ~requireAttribute emits no attribute_exists filter (default read models unchanged)",
|
|
38
|
+
() => {
|
|
39
|
+
let code =
|
|
40
|
+
AppSync_Resolver_Retrying.Functions.listAllItemsConnection(~labelField="name")->codeOf
|
|
41
|
+
expect(code->String.includes("attribute_exists"))->toBe(false)
|
|
42
|
+
},
|
|
43
|
+
)
|
|
38
44
|
})
|
|
39
45
|
|
|
40
46
|
// Tripwires for the Scan connection's paging. The behaviour itself is exercised
|
|
@@ -56,8 +62,9 @@ describe("listAllItemsConnection — paging", () => {
|
|
|
56
62
|
expect(
|
|
57
63
|
code->String.includes("parts.length > 0 ? ((_backward ? _upTo : _first + _from) > 1000"),
|
|
58
64
|
)->toBe(true)
|
|
59
|
-
expect(
|
|
60
|
-
|
|
65
|
+
expect(
|
|
66
|
+
code->String.includes("const _page = _backward ? _rest : _rest.slice(0, _first);"),
|
|
67
|
+
)->toBe(true)
|
|
61
68
|
expect(code->String.includes("hasNextPage: _more || !!_next,"))->toBe(true)
|
|
62
69
|
})
|
|
63
70
|
|
|
@@ -54,14 +54,12 @@ describe("interceptor handler", () => {
|
|
|
54
54
|
|
|
55
55
|
testPromise("an allowing hook is consulted and the read proceeds", async () => {
|
|
56
56
|
let seen = ref([])
|
|
57
|
-
QueryDb_Callback.registerQueryInterceptor(
|
|
58
|
-
~identity as _,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
QueryDb_Callback.Allow
|
|
64
|
-
})
|
|
57
|
+
QueryDb_Callback.registerQueryInterceptor(
|
|
58
|
+
async (~identity as _, ~readModelName, ~args as _) => {
|
|
59
|
+
seen := seen.contents->Array.concat([readModelName])
|
|
60
|
+
QueryDb_Callback.Allow
|
|
61
|
+
},
|
|
62
|
+
)
|
|
65
63
|
let allowed = await QueryInterceptor_Lambda.handler(read(~readModelName="Order"), context)
|
|
66
64
|
expect((allowed, seen.contents))->toEqual((true, ["Order"]))
|
|
67
65
|
})
|
|
@@ -70,11 +68,11 @@ describe("interceptor handler", () => {
|
|
|
70
68
|
// The refusal has to surface as a thrown error: the pipeline's response
|
|
71
69
|
// function turns `ctx.error` into a GraphQL field error, and a returned
|
|
72
70
|
// `false` would read as a successful read of nothing.
|
|
73
|
-
QueryDb_Callback.registerQueryInterceptor(
|
|
74
|
-
~identity as _,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
71
|
+
QueryDb_Callback.registerQueryInterceptor(
|
|
72
|
+
async (~identity as _, ~readModelName as _, ~args as _) => QueryDb_Callback.Deny(
|
|
73
|
+
"over the allowance",
|
|
74
|
+
),
|
|
75
|
+
)
|
|
78
76
|
let message = try {
|
|
79
77
|
let _ = await QueryInterceptor_Lambda.handler(read(), context)
|
|
80
78
|
"did not throw"
|
|
@@ -18,32 +18,33 @@ describe("ReadModelEntryPoint_Ops.parseHandlerConfig", () => {
|
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
testSync("decodes a full entry incl. attribution and Postgres fields", () => {
|
|
21
|
-
let config =
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
let config =
|
|
22
|
+
obj([
|
|
23
|
+
(
|
|
24
|
+
"handlers",
|
|
25
|
+
JSON.Encode.array([
|
|
26
|
+
obj([
|
|
27
|
+
("specModule", str("@x/spec/src/ReadModel/Products.res.mjs")),
|
|
28
|
+
("mappingsModule", str("@x/spec/src/ReadModel/Products_Projections.res.mjs")),
|
|
29
|
+
("queryDbTableName", str("Products-abc")),
|
|
30
|
+
("sourceUrn", str("arn:aws:sqs:eu-west-1:1:q")),
|
|
31
|
+
("comp", str("EventCollector(ProductsEC)")),
|
|
32
|
+
("plugin", str("Catalog")),
|
|
33
|
+
("stateTopicName", str("catalogProducts")),
|
|
34
|
+
(
|
|
35
|
+
"pgConnection",
|
|
36
|
+
obj([
|
|
37
|
+
("host", str("db.local")),
|
|
38
|
+
("port", JSON.Encode.int(5432)),
|
|
39
|
+
("database", str("app")),
|
|
40
|
+
("username", str("master")),
|
|
41
|
+
("secretArn", str("arn:secret")),
|
|
42
|
+
]),
|
|
43
|
+
),
|
|
44
|
+
]),
|
|
43
45
|
]),
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
])->JSON.stringify
|
|
46
|
+
),
|
|
47
|
+
])->JSON.stringify
|
|
47
48
|
let entries = ReadModelEntryPoint_Ops.parseHandlerConfig(config)
|
|
48
49
|
expect(entries->Array.length)->toBe(1)
|
|
49
50
|
let e = entries->Array.getUnsafe(0)
|
|
@@ -65,20 +66,21 @@ describe("ReadModelEntryPoint_Ops.parseHandlerConfig", () => {
|
|
|
65
66
|
})
|
|
66
67
|
|
|
67
68
|
testSync("optional fields default to None; null pgConnection maps to None", () => {
|
|
68
|
-
let config =
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
let config =
|
|
70
|
+
obj([
|
|
71
|
+
(
|
|
72
|
+
"handlers",
|
|
73
|
+
JSON.Encode.array([
|
|
74
|
+
obj([
|
|
75
|
+
("specModule", str("a.res.mjs")),
|
|
76
|
+
("mappingsModule", str("b.res.mjs")),
|
|
77
|
+
("queryDbTableName", str("t")),
|
|
78
|
+
("sourceUrn", str("u")),
|
|
79
|
+
("pgConnection", JSON.Null),
|
|
80
|
+
]),
|
|
78
81
|
]),
|
|
79
|
-
|
|
80
|
-
)
|
|
81
|
-
])->JSON.stringify
|
|
82
|
+
),
|
|
83
|
+
])->JSON.stringify
|
|
82
84
|
let e = ReadModelEntryPoint_Ops.parseHandlerConfig(config)->Array.getUnsafe(0)
|
|
83
85
|
expect(e.comp->Option.isNone)->toBe(true)
|
|
84
86
|
expect(e.plugin->Option.isNone)->toBe(true)
|
|
@@ -99,9 +101,9 @@ describe("ReadModelEntryPoint_Ops.injectId", () => {
|
|
|
99
101
|
|
|
100
102
|
testSync("passes non-object states through unchanged", () => {
|
|
101
103
|
expect(ReadModelEntryPoint_Ops.injectId("p-1", str("scalar")))->toEqual(str("scalar"))
|
|
102
|
-
expect(
|
|
103
|
-
|
|
104
|
-
)
|
|
104
|
+
expect(ReadModelEntryPoint_Ops.injectId("p-1", JSON.Encode.array([str("a")])))->toEqual(
|
|
105
|
+
JSON.Encode.array([str("a")]),
|
|
106
|
+
)
|
|
105
107
|
expect(ReadModelEntryPoint_Ops.injectId("p-1", JSON.Null))->toEqual(JSON.Null)
|
|
106
108
|
})
|
|
107
109
|
})
|
|
@@ -99,9 +99,10 @@ describe("RuntimeExtensionEntryPoint_Ops.fire", () => {
|
|
|
99
99
|
// ComponentType and the layer's. Firing under a guessed kind would silently
|
|
100
100
|
// attach a kind-routing extension to the wrong runtime.
|
|
101
101
|
let seen: array<string> = []
|
|
102
|
-
let config =
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
let config =
|
|
103
|
+
RuntimeExtensionEntryPoint_Ops.parseConfig(
|
|
104
|
+
Some(`{"modules":["a"],"runtimeKind":"SomethingNewer","component":"X"}`),
|
|
105
|
+
)->Option.getOrThrow
|
|
105
106
|
|
|
106
107
|
RuntimeExtensionEntryPoint_Ops.fire(config, [recordingHook("tracing", seen)])
|
|
107
108
|
|
|
@@ -16,23 +16,27 @@ describe("SideEffectEntryPoint_Ops.parseHandlerConfig", () => {
|
|
|
16
16
|
})
|
|
17
17
|
|
|
18
18
|
testSync("decodes handlers incl. attribution fields", () => {
|
|
19
|
-
let config =
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
let config =
|
|
20
|
+
obj([
|
|
21
|
+
(
|
|
22
|
+
"handlers",
|
|
23
|
+
JSON.Encode.array([
|
|
24
|
+
obj([
|
|
25
|
+
(
|
|
26
|
+
"sideEffectModules",
|
|
27
|
+
JSON.Encode.array([str("@x/p/src/A.res.mjs"), str("@x/p/src/B.res.mjs")]),
|
|
28
|
+
),
|
|
29
|
+
("sourceUrn", str("arn:stream-1")),
|
|
30
|
+
("comp", str("SideEffectHandler(Mailer)")),
|
|
31
|
+
("plugin", str("Ordering")),
|
|
32
|
+
]),
|
|
33
|
+
obj([
|
|
34
|
+
("sideEffectModules", JSON.Encode.array([str("@x/p/src/C.res.mjs")])),
|
|
35
|
+
("sourceUrn", str("arn:stream-2")),
|
|
36
|
+
]),
|
|
28
37
|
]),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
("sourceUrn", str("arn:stream-2")),
|
|
32
|
-
]),
|
|
33
|
-
]),
|
|
34
|
-
),
|
|
35
|
-
])->JSON.stringify
|
|
38
|
+
),
|
|
39
|
+
])->JSON.stringify
|
|
36
40
|
let entries = SideEffectEntryPoint_Ops.parseHandlerConfig(config)
|
|
37
41
|
expect(entries->Array.length)->toBe(2)
|
|
38
42
|
let first = entries->Array.getUnsafe(0)
|
|
@@ -70,8 +74,9 @@ describe("SideEffectEntryPoint_Ops.makeRegisteredHandler", () => {
|
|
|
70
74
|
comp: Some("SideEffectHandler(Mailer)"),
|
|
71
75
|
plugin: Some("Ordering"),
|
|
72
76
|
}
|
|
73
|
-
let registered = SideEffectEntryPoint_Ops.makeRegisteredHandler(
|
|
74
|
-
|
|
77
|
+
let registered = SideEffectEntryPoint_Ops.makeRegisteredHandler(
|
|
78
|
+
entry,
|
|
79
|
+
_stream => Effect.succeed(),
|
|
75
80
|
)
|
|
76
81
|
expect(registered.comp)->toEqual(Some("SideEffectHandler(Mailer)"))
|
|
77
82
|
expect(registered.plugin)->toEqual(Some("Ordering"))
|
|
@@ -30,16 +30,17 @@ describe("state-change descriptor parity", () => {
|
|
|
30
30
|
let cases = await buildAll()
|
|
31
31
|
// A silent zero-case run would pass while asserting nothing.
|
|
32
32
|
expect(cases->Array.length)->toBe(11)
|
|
33
|
-
cases->Array.forEach(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
cases->Array.forEach(
|
|
34
|
+
c => {
|
|
35
|
+
expect((c.name, c.relay))->toEqual((c.name, c.local))
|
|
36
|
+
expect((c.name, c.postgres))->toEqual((c.name, c.local))
|
|
37
|
+
},
|
|
38
|
+
)
|
|
37
39
|
})
|
|
38
40
|
|
|
39
41
|
testAsync("a save carries the row, a delete carries none", async () => {
|
|
40
42
|
let cases = await buildAll()
|
|
41
|
-
let stateOf = (d: JSON.t) =>
|
|
42
|
-
d->JSON.Decode.object->Option.flatMap(o => o->Dict.get("state"))
|
|
43
|
+
let stateOf = (d: JSON.t) => d->JSON.Decode.object->Option.flatMap(o => o->Dict.get("state"))
|
|
43
44
|
let byName = name => cases->Array.find(c => c.name == name)
|
|
44
45
|
|
|
45
46
|
switch byName("single-key save with updatedAt") {
|
|
@@ -102,26 +103,27 @@ describe("state-change descriptor parity", () => {
|
|
|
102
103
|
[
|
|
103
104
|
"row in the first retired state degrades to metadata only",
|
|
104
105
|
"row in the second retired state degrades to metadata only",
|
|
105
|
-
]->Array.forEach(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
name,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
name,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
name,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
106
|
+
]->Array.forEach(
|
|
107
|
+
name =>
|
|
108
|
+
switch byName(name) {
|
|
109
|
+
| Some(c) =>
|
|
110
|
+
expect((name, keyOf(c.local, "state"), keyOf(c.local, "sortKeyValue")))->toEqual((
|
|
111
|
+
name,
|
|
112
|
+
None,
|
|
113
|
+
None,
|
|
114
|
+
))
|
|
115
|
+
expect((name, keyOf(c.relay, "state"), keyOf(c.relay, "sortKeyValue")))->toEqual((
|
|
116
|
+
name,
|
|
117
|
+
None,
|
|
118
|
+
None,
|
|
119
|
+
))
|
|
120
|
+
expect((name, keyOf(c.postgres, "state"), keyOf(c.postgres, "sortKeyValue")))->toEqual((
|
|
121
|
+
name,
|
|
122
|
+
None,
|
|
123
|
+
None,
|
|
124
|
+
))
|
|
125
|
+
| None => expect(name ++ " missing")->toBe("present")
|
|
126
|
+
},
|
|
125
127
|
)
|
|
126
128
|
|
|
127
129
|
// The control for the state form: a live state on the same lifecycle, so an
|
|
@@ -16,32 +16,35 @@ let capture = f =>
|
|
|
16
16
|
|
|
17
17
|
describe("StateTopic_AppSync_Helpers.checkPartitionKeyName", () => {
|
|
18
18
|
testSync("accepts the framework convention", () => {
|
|
19
|
-
let thrown = capture(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
let thrown = capture(
|
|
20
|
+
() =>
|
|
21
|
+
StateTopic_AppSync_Helpers.checkPartitionKeyName(
|
|
22
|
+
~tableName="PlatformUsageLedger-1a2b3c4",
|
|
23
|
+
~partitionKeyName="id",
|
|
24
|
+
),
|
|
24
25
|
)
|
|
25
26
|
expect(thrown)->toEqual(None)
|
|
26
27
|
})
|
|
27
28
|
|
|
28
29
|
testSync("rejects a table keyed on anything else", () => {
|
|
29
|
-
let thrown = capture(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
let thrown = capture(
|
|
31
|
+
() =>
|
|
32
|
+
StateTopic_AppSync_Helpers.checkPartitionKeyName(
|
|
33
|
+
~tableName="PlatformUsageLedger-1a2b3c4",
|
|
34
|
+
~partitionKeyName="pluginId",
|
|
35
|
+
),
|
|
34
36
|
)
|
|
35
37
|
expect(thrown->Option.isSome)->toBe(true)
|
|
36
38
|
})
|
|
37
39
|
|
|
38
40
|
testSync("names the table and its actual key in the message", () => {
|
|
39
41
|
let message =
|
|
40
|
-
capture(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
capture(
|
|
43
|
+
() =>
|
|
44
|
+
StateTopic_AppSync_Helpers.checkPartitionKeyName(
|
|
45
|
+
~tableName="PlatformUsageLedger-1a2b3c4",
|
|
46
|
+
~partitionKeyName="pluginId",
|
|
47
|
+
),
|
|
45
48
|
)->Option.getOr("")
|
|
46
49
|
expect(message->String.includes("PlatformUsageLedger-1a2b3c4"))->toBe(true)
|
|
47
50
|
expect(message->String.includes("pluginId"))->toBe(true)
|
|
@@ -33,34 +33,39 @@ describe("StateViewSliceEntryPoint_Ops.parseHandlerConfig", () => {
|
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
testSync("expands compact-v2 entries against shared base/sourceUrn/pgConnection", () => {
|
|
36
|
-
let config =
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
("host", str("db.local")),
|
|
44
|
-
("port", JSON.Encode.int(5432)),
|
|
45
|
-
("database", str("app")),
|
|
46
|
-
("username", str("master")),
|
|
47
|
-
("secretArn", str("arn:secret")),
|
|
48
|
-
]),
|
|
49
|
-
),
|
|
50
|
-
(
|
|
51
|
-
"handlers",
|
|
52
|
-
JSON.Encode.array([
|
|
53
|
-
obj([("s", str("Carts.res.mjs")), ("p", str("Carts_Projection.res.mjs")), ("q", str("qdb_Carts"))]),
|
|
36
|
+
let config =
|
|
37
|
+
obj([
|
|
38
|
+
("v", JSON.Encode.int(2)),
|
|
39
|
+
("base", str("@x/plugin/src/StateViewSlice/")),
|
|
40
|
+
("sourceUrn", str("arn:shared")),
|
|
41
|
+
(
|
|
42
|
+
"pgConnection",
|
|
54
43
|
obj([
|
|
55
|
-
("
|
|
56
|
-
("
|
|
57
|
-
("
|
|
58
|
-
("
|
|
59
|
-
("
|
|
44
|
+
("host", str("db.local")),
|
|
45
|
+
("port", JSON.Encode.int(5432)),
|
|
46
|
+
("database", str("app")),
|
|
47
|
+
("username", str("master")),
|
|
48
|
+
("secretArn", str("arn:secret")),
|
|
60
49
|
]),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
),
|
|
51
|
+
(
|
|
52
|
+
"handlers",
|
|
53
|
+
JSON.Encode.array([
|
|
54
|
+
obj([
|
|
55
|
+
("s", str("Carts.res.mjs")),
|
|
56
|
+
("p", str("Carts_Projection.res.mjs")),
|
|
57
|
+
("q", str("qdb_Carts")),
|
|
58
|
+
]),
|
|
59
|
+
obj([
|
|
60
|
+
("s", str("Totals.res.mjs")),
|
|
61
|
+
("p", str("Totals_Projection.res.mjs")),
|
|
62
|
+
("q", str("qdb_Totals")),
|
|
63
|
+
("u", str("arn:override")),
|
|
64
|
+
("t", str("cartTotals")),
|
|
65
|
+
]),
|
|
66
|
+
]),
|
|
67
|
+
),
|
|
68
|
+
])->JSON.stringify
|
|
64
69
|
let entries = StateViewSliceEntryPoint_Ops.parseHandlerConfig(config)
|
|
65
70
|
expect(entries->Array.length)->toBe(2)
|
|
66
71
|
let first = entries->Array.getUnsafe(0)
|
|
@@ -76,21 +81,22 @@ describe("StateViewSliceEntryPoint_Ops.parseHandlerConfig", () => {
|
|
|
76
81
|
})
|
|
77
82
|
|
|
78
83
|
testSync("passes legacy full-key entries through with per-entry fields", () => {
|
|
79
|
-
let config =
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
let config =
|
|
85
|
+
obj([
|
|
86
|
+
("base", str("ignored/")),
|
|
87
|
+
("sourceUrn", str("arn:shared")),
|
|
88
|
+
(
|
|
89
|
+
"handlers",
|
|
90
|
+
JSON.Encode.array([
|
|
91
|
+
obj([
|
|
92
|
+
("specModule", str("full/Carts.res.mjs")),
|
|
93
|
+
("projectionModule", str("full/Carts_Projection.res.mjs")),
|
|
94
|
+
("queryDbTableName", str("qdb_Carts")),
|
|
95
|
+
("sourceUrn", str("arn:own")),
|
|
96
|
+
]),
|
|
90
97
|
]),
|
|
91
|
-
|
|
92
|
-
)
|
|
93
|
-
])->JSON.stringify
|
|
98
|
+
),
|
|
99
|
+
])->JSON.stringify
|
|
94
100
|
let e = StateViewSliceEntryPoint_Ops.parseHandlerConfig(config)->Array.getUnsafe(0)
|
|
95
101
|
// Legacy entries are NOT base-prefixed and keep their own sourceUrn.
|
|
96
102
|
expect(e.specModule)->toBe("full/Carts.res.mjs")
|
|
@@ -142,9 +148,9 @@ describe("StateViewSliceEntryPoint_Ops.makeJsonEventsHandler", () => {
|
|
|
142
148
|
|
|
143
149
|
// String-typed consumed events keep the pipeline test independent of any
|
|
144
150
|
// real slice: each event value becomes the row id, `recordedAt` the state.
|
|
145
|
-
let project = (
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
let project = ({event, recordedAt, _}: Reventless.StateViewSlice.consumed<string>): array<
|
|
152
|
+
Reventless.Projection.action<string, JSON.t>,
|
|
153
|
+
> => [Set(event, str(recordedAt))]
|
|
148
154
|
|
|
149
155
|
test("decodes envelopes, projects, and runs actions against the ops", async () => {
|
|
150
156
|
let saved = []
|
|
@@ -205,7 +211,12 @@ describe("StateViewSliceEntryPoint_Ops.makeJsonEventsHandler", () => {
|
|
|
205
211
|
"row-1",
|
|
206
212
|
obj([
|
|
207
213
|
("lifecycle", str("Placed")),
|
|
208
|
-
(
|
|
214
|
+
(
|
|
215
|
+
"trail",
|
|
216
|
+
JSON.Encode.array([
|
|
217
|
+
obj([("state", str("Placed")), ("at", str("2026-03-02T09:00:00Z"))]),
|
|
218
|
+
]),
|
|
219
|
+
),
|
|
209
220
|
]),
|
|
210
221
|
),
|
|
211
222
|
])
|
|
@@ -11,7 +11,6 @@ open JestGlobals
|
|
|
11
11
|
let str = JSON.Encode.string
|
|
12
12
|
let obj = pairs => JSON.Encode.object(Dict.fromArray(pairs))
|
|
13
13
|
|
|
14
|
-
|
|
15
14
|
describe("TaskBucketEntryPoint_Ops.parseHandlerConfig", () => {
|
|
16
15
|
testSync("empty raw config decodes to empty defaults", () => {
|
|
17
16
|
let c = TaskBucketEntryPoint_Ops.parseHandlerConfig("")
|
|
@@ -21,18 +20,19 @@ describe("TaskBucketEntryPoint_Ops.parseHandlerConfig", () => {
|
|
|
21
20
|
})
|
|
22
21
|
|
|
23
22
|
testSync("decodes callbackModule, publishToAggregates, and scheduler env names", () => {
|
|
24
|
-
let config =
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
let config =
|
|
24
|
+
obj([
|
|
25
|
+
("callbackModule", str("@x/plugin/src/Task/ImportCatalog.res.mjs")),
|
|
26
|
+
("publishToAggregates", obj([("Product", str("PTA_Product_QUEUE_URL"))])),
|
|
27
|
+
(
|
|
28
|
+
"scheduler",
|
|
29
|
+
obj([
|
|
30
|
+
("roleArnEnv", str("SCHEDULER_ROLE_ARN")),
|
|
31
|
+
("targetArnEnv", str("SCHEDULER_TARGET_ARN")),
|
|
32
|
+
("targetNameEnv", str("SCHEDULER_TARGET_NAME")),
|
|
33
|
+
]),
|
|
34
|
+
),
|
|
35
|
+
])->JSON.stringify
|
|
36
36
|
let c = TaskBucketEntryPoint_Ops.parseHandlerConfig(config)
|
|
37
37
|
expect(c.callbackModule)->toBe("@x/plugin/src/Task/ImportCatalog.res.mjs")
|
|
38
38
|
expect(c.publishToAggregates->Dict.get("Product"))->toEqual(Some("PTA_Product_QUEUE_URL"))
|
|
@@ -29,9 +29,9 @@ describe("Upload_Claim_S3_Ops.tableNameFromEventSourceArn", () => {
|
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
testSync("returns None for an ARN that is not a table stream", () =>
|
|
32
|
-
expect(
|
|
33
|
-
|
|
34
|
-
)
|
|
32
|
+
expect(
|
|
33
|
+
Ops.tableNameFromEventSourceArn("arn:aws:sqs:eu-west-1:123456789012:SomeQueue"),
|
|
34
|
+
)->toEqual(None)
|
|
35
35
|
)
|
|
36
36
|
})
|
|
37
37
|
|
|
@@ -52,9 +52,7 @@ describe("Util_AwsError.isNotFound", () => {
|
|
|
52
52
|
// the original guard tested, and it is false for the real error.
|
|
53
53
|
testSync("...and its message does not carry the code, which is why", () =>
|
|
54
54
|
expect(
|
|
55
|
-
AwsError.describe(dynamoNotFound)->String.includes(
|
|
56
|
-
"Requested resource not found",
|
|
57
|
-
),
|
|
55
|
+
AwsError.describe(dynamoNotFound)->String.includes("Requested resource not found"),
|
|
58
56
|
)->toBe(true)
|
|
59
57
|
)
|
|
60
58
|
|
|
@@ -118,10 +116,9 @@ describe("Util_AwsError.describe", () => {
|
|
|
118
116
|
// failure with another.
|
|
119
117
|
testSync("every shape yields something an operator can read", () =>
|
|
120
118
|
expect(
|
|
121
|
-
[
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
]->Array.every(e => AwsError.describe(e)->String.length > 0),
|
|
119
|
+
[awsError(~name="X", ~message="y"), Not_found]->Array.every(
|
|
120
|
+
e => AwsError.describe(e)->String.length > 0,
|
|
121
|
+
),
|
|
125
122
|
)->toBe(true)
|
|
126
123
|
)
|
|
127
124
|
})
|
|
@@ -62,8 +62,17 @@ export const rule = () => Rules.check();
|
|
|
62
62
|
),
|
|
63
63
|
],
|
|
64
64
|
)
|
|
65
|
-
let _ = writePkg(
|
|
66
|
-
|
|
65
|
+
let _ = writePkg(
|
|
66
|
+
~root=rulesRoot,
|
|
67
|
+
~name=rulesName,
|
|
68
|
+
[
|
|
69
|
+
(
|
|
70
|
+
"src/Rules.res.mjs",
|
|
71
|
+
`export const check = () => true;
|
|
72
|
+
`,
|
|
73
|
+
),
|
|
74
|
+
],
|
|
75
|
+
)
|
|
67
76
|
|
|
68
77
|
let closureOf = (packageDirs: dict<string>) => {
|
|
69
78
|
Util_Bundle.addImportedPackageClosure(packageDirs)
|
|
@@ -130,7 +139,10 @@ describe("Util_Bundle — bundled user packages carry their imports", () => {
|
|
|
130
139
|
// Walking reventless-aws would reach its deploy-time-only imports (the
|
|
131
140
|
// @pulumi bindings) and add tens of megabytes to every archive.
|
|
132
141
|
let packageDirs = Dict.fromArray([
|
|
133
|
-
(
|
|
142
|
+
(
|
|
143
|
+
"@reventlessdev/reventless-aws",
|
|
144
|
+
Util_Bundle.resolvePackageRoot("@reventlessdev/reventless-aws"),
|
|
145
|
+
),
|
|
134
146
|
])
|
|
135
147
|
expect(closureOf(packageDirs)->Dict.keysToArray->Array.length)->toBe(1)
|
|
136
148
|
})
|