@reventlessdev/reventless-aws 3.0.0-alpha.344 → 3.0.0-alpha.346
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 +36 -0
- package/package.json +15 -12
- package/run-provision-accounts.mjs +3 -0
- package/run-provision-admin.mjs +3 -0
- package/scripts/ProvisionAccounts.res +325 -0
- package/scripts/ProvisionAccounts.res.mjs +337 -0
- package/scripts/ProvisionAdmin.res +275 -0
- package/scripts/ProvisionAdmin.res.mjs +289 -0
- package/scripts/ProvisionCognito.res +149 -0
- package/scripts/ProvisionCognito.res.mjs +98 -0
- package/scripts/ProvisionIdentity.res +84 -14
- package/scripts/ProvisionIdentity.res.mjs +72 -7
- package/scripts/ProvisionProvider.res +104 -0
- package/scripts/ProvisionProvider.res.mjs +123 -0
- package/src/Platform.res +358 -329
- package/src/Platform.res.mjs +24 -12
- package/src/Platform_Casts.res +13 -4
- package/src/Platform_Stack.res +119 -9
- package/src/Platform_Stack.res.mjs +42 -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/Auth/Auth_LoginIdentifier.res +66 -0
- package/src/adapter/Auth/Auth_LoginIdentifier.res.mjs +70 -0
- package/src/adapter/Auth/Auth_SignUpMode.res +78 -0
- package/src/adapter/Auth/Auth_SignUpMode.res.mjs +56 -0
- 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 +23 -11
- package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res.mjs +5 -1
- 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 +80 -109
- package/src/components/Api/AppSync_Adapter.res.mjs +26 -60
- package/src/components/Api/AppSync_SdlDecorate.res +118 -31
- package/src/components/Api/AppSync_SdlDecorate.res.mjs +45 -0
- 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 +286 -224
- package/tests/AppSync_AdapterTest.res.mjs +69 -0
- 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/Auth_LoginIdentifierTest.res +51 -0
- package/tests/Auth_LoginIdentifierTest.res.mjs +51 -0
- package/tests/Auth_SignUpModeTest.res +56 -0
- package/tests/Auth_SignUpModeTest.res.mjs +53 -0
- 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/ProvisionAccountsTest.res +142 -0
- package/tests/ProvisionAccountsTest.res.mjs +153 -0
- package/tests/ProvisionAdminTest.res +55 -0
- package/tests/ProvisionAdminTest.res.mjs +66 -0
- package/tests/ProvisionIdentityTest.res +91 -9
- package/tests/ProvisionIdentityTest.res.mjs +66 -1
- 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 +35 -8
- package/tests/Util_OwnerScopeEnvTest.res.mjs +13 -0
- 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
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
4
4
|
import * as Stdlib_Result from "@rescript/runtime/lib/es6/Stdlib_Result.js";
|
|
5
|
+
import * as Auth_SignUpMode$ReventlessAws from "../src/adapter/Auth/Auth_SignUpMode.res.mjs";
|
|
5
6
|
import * as ProvisionIdentity$ReventlessAws from "../scripts/ProvisionIdentity.res.mjs";
|
|
7
|
+
import * as Auth_LoginIdentifier$ReventlessAws from "../src/adapter/Auth/Auth_LoginIdentifier.res.mjs";
|
|
6
8
|
|
|
7
9
|
globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
8
10
|
globalThis.test("no arguments means adopt-or-create the default name", () => {
|
|
@@ -11,6 +13,8 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
11
13
|
_0: {
|
|
12
14
|
poolName: ProvisionIdentity$ReventlessAws.defaultPoolName,
|
|
13
15
|
providerId: undefined,
|
|
16
|
+
loginIdentifier: "Email",
|
|
17
|
+
signUpMode: "AdminOnly",
|
|
14
18
|
help: false
|
|
15
19
|
}
|
|
16
20
|
});
|
|
@@ -24,6 +28,8 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
24
28
|
_0: {
|
|
25
29
|
poolName: ProvisionIdentity$ReventlessAws.defaultPoolName,
|
|
26
30
|
providerId: "eu-west-1_AbCdEfGhI",
|
|
31
|
+
loginIdentifier: "Email",
|
|
32
|
+
signUpMode: "AdminOnly",
|
|
27
33
|
help: false
|
|
28
34
|
}
|
|
29
35
|
});
|
|
@@ -37,6 +43,8 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
37
43
|
_0: {
|
|
38
44
|
poolName: "examples-dev",
|
|
39
45
|
providerId: undefined,
|
|
46
|
+
loginIdentifier: "Email",
|
|
47
|
+
signUpMode: "AdminOnly",
|
|
40
48
|
help: false
|
|
41
49
|
}
|
|
42
50
|
});
|
|
@@ -52,10 +60,48 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
52
60
|
_0: {
|
|
53
61
|
poolName: "ignored",
|
|
54
62
|
providerId: "eu-west-1_x",
|
|
63
|
+
loginIdentifier: "Email",
|
|
64
|
+
signUpMode: "AdminOnly",
|
|
55
65
|
help: false
|
|
56
66
|
}
|
|
57
67
|
});
|
|
58
68
|
});
|
|
69
|
+
globalThis.test("--login-identifier picks the sign-in attribute", () => {
|
|
70
|
+
globalThis.expect(Stdlib_Result.map(ProvisionIdentity$ReventlessAws.parseArgs([
|
|
71
|
+
"--login-identifier",
|
|
72
|
+
"emailOrPhone"
|
|
73
|
+
]), a => a.loginIdentifier)).toEqual({
|
|
74
|
+
TAG: "Ok",
|
|
75
|
+
_0: "EmailOrPhone"
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
globalThis.test("an unrecognised sign-in attribute is refused, never defaulted", () => {
|
|
79
|
+
globalThis.expect(Stdlib_Result.isError(ProvisionIdentity$ReventlessAws.parseArgs([
|
|
80
|
+
"--login-identifier",
|
|
81
|
+
"e-mail"
|
|
82
|
+
]))).toBe(true);
|
|
83
|
+
});
|
|
84
|
+
globalThis.test("--sign-up-mode opens the pool to self-registration", () => {
|
|
85
|
+
globalThis.expect(Stdlib_Result.map(ProvisionIdentity$ReventlessAws.parseArgs([
|
|
86
|
+
"--sign-up-mode",
|
|
87
|
+
"selfService"
|
|
88
|
+
]), a => a.signUpMode)).toEqual({
|
|
89
|
+
TAG: "Ok",
|
|
90
|
+
_0: "SelfService"
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
globalThis.test("an unrecognised sign-up mode is refused, never defaulted", () => {
|
|
94
|
+
globalThis.expect(Stdlib_Result.isError(ProvisionIdentity$ReventlessAws.parseArgs([
|
|
95
|
+
"--sign-up-mode",
|
|
96
|
+
"self-service"
|
|
97
|
+
]))).toBe(true);
|
|
98
|
+
});
|
|
99
|
+
globalThis.test("sign-up mode defaults to admin-only, so an existing pool is unchanged", () => {
|
|
100
|
+
globalThis.expect(Stdlib_Result.map(ProvisionIdentity$ReventlessAws.parseArgs([]), a => a.signUpMode)).toEqual({
|
|
101
|
+
TAG: "Ok",
|
|
102
|
+
_0: "AdminOnly"
|
|
103
|
+
});
|
|
104
|
+
});
|
|
59
105
|
globalThis.test("a misspelled flag is refused, not ignored", () => {
|
|
60
106
|
globalThis.expect(ProvisionIdentity$ReventlessAws.parseArgs([
|
|
61
107
|
"--provider_id",
|
|
@@ -77,6 +123,12 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
77
123
|
_0: "--name needs a value"
|
|
78
124
|
});
|
|
79
125
|
});
|
|
126
|
+
globalThis.test("--login-identifier with no value is refused too", () => {
|
|
127
|
+
globalThis.expect(ProvisionIdentity$ReventlessAws.parseArgs(["--login-identifier"])).toEqual({
|
|
128
|
+
TAG: "Error",
|
|
129
|
+
_0: "--login-identifier needs a value"
|
|
130
|
+
});
|
|
131
|
+
});
|
|
80
132
|
globalThis.test("--help and -h both ask for the usage text", () => {
|
|
81
133
|
globalThis.expect([
|
|
82
134
|
Stdlib_Result.map(ProvisionIdentity$ReventlessAws.parseArgs(["--help"]), a => a.help),
|
|
@@ -104,7 +156,7 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
104
156
|
});
|
|
105
157
|
|
|
106
158
|
globalThis.describe("ProvisionIdentity.poolSettings", () => {
|
|
107
|
-
let settings = ProvisionIdentity$ReventlessAws.poolSettings("MyIdentity");
|
|
159
|
+
let settings = ProvisionIdentity$ReventlessAws.poolSettings("MyIdentity", Auth_LoginIdentifier$ReventlessAws.default, Auth_SignUpMode$ReventlessAws.default);
|
|
108
160
|
globalThis.test("carries the name it was asked for", () => {
|
|
109
161
|
globalThis.expect(settings.PoolName).toBe("MyIdentity");
|
|
110
162
|
});
|
|
@@ -119,6 +171,19 @@ globalThis.describe("ProvisionIdentity.poolSettings", () => {
|
|
|
119
171
|
true
|
|
120
172
|
]);
|
|
121
173
|
});
|
|
174
|
+
globalThis.test("a phone pool is created signing in on phone_number", () => {
|
|
175
|
+
globalThis.expect(ProvisionIdentity$ReventlessAws.poolSettings("MyIdentity", "Phone", Auth_SignUpMode$ReventlessAws.default).UsernameAttributes).toEqual(["phone_number"]);
|
|
176
|
+
});
|
|
177
|
+
globalThis.test("selfService clears allowAdminCreateUserOnly, adminOnly sets it", () => {
|
|
178
|
+
let openPool = ProvisionIdentity$ReventlessAws.poolSettings("MyIdentity", Auth_LoginIdentifier$ReventlessAws.default, "SelfService");
|
|
179
|
+
globalThis.expect([
|
|
180
|
+
Stdlib_Option.flatMap(openPool.AdminCreateUserConfig, c => c.AllowAdminCreateUserOnly),
|
|
181
|
+
Stdlib_Option.flatMap(settings.AdminCreateUserConfig, c => c.AllowAdminCreateUserOnly)
|
|
182
|
+
]).toEqual([
|
|
183
|
+
false,
|
|
184
|
+
true
|
|
185
|
+
]);
|
|
186
|
+
});
|
|
122
187
|
globalThis.test("keeps the 12-character password policy", () => {
|
|
123
188
|
globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(settings.Policies, p => p.PasswordPolicy), p => p.MinimumLength)).toEqual(12);
|
|
124
189
|
});
|
|
@@ -26,10 +26,12 @@ describe("the derived owner index", () => {
|
|
|
26
26
|
testSync("is provisioned projecting every attribute", () => {
|
|
27
27
|
let gsis = QueryDbStorage_DynamoDb.globalSecondaryIndexes([ownerIndex])->unwrap
|
|
28
28
|
expect(
|
|
29
|
-
gsis->Array.map(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
gsis->Array.map(
|
|
30
|
+
g => {
|
|
31
|
+
let g = g->unwrap
|
|
32
|
+
(g.name, g.hashKey, g.rangeKey, g.projectionType)
|
|
33
|
+
},
|
|
34
|
+
),
|
|
33
35
|
)->toEqual([("_owner", "customerId", Some("id"), PulumiAws.DynamoDb.Table.ALL)])
|
|
34
36
|
})
|
|
35
37
|
|
|
@@ -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)
|