@reventlessdev/reventless-aws 3.0.0-alpha.343 → 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 +15 -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 +144 -67
- package/src/util/Util_Bundle.res.mjs +64 -13
- 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 +41 -3
- package/tests/Util_BundleDependencyClosureTest.res.mjs +11 -0
- 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
package/src/Platform.res.mjs
CHANGED
|
@@ -687,7 +687,8 @@ function MakeWithConfig(Config) {
|
|
|
687
687
|
};
|
|
688
688
|
let provisionPgChangeFeedRelay = () => {
|
|
689
689
|
let feedTargets = (connectionConfig, logName, feed, isClassic) => Stdlib_Array.filterMap(PgProjectionFeed$ReventlessAws.getFeedQueues(), fq => {
|
|
690
|
-
|
|
690
|
+
let included = isClassic ? fq.includeClassic : fq.includeDcb;
|
|
691
|
+
if (included) {
|
|
691
692
|
return {
|
|
692
693
|
connectionConfig: connectionConfig,
|
|
693
694
|
logName: logName,
|
|
@@ -2086,7 +2087,8 @@ function Make($star) {
|
|
|
2086
2087
|
};
|
|
2087
2088
|
let provisionPgChangeFeedRelay = () => {
|
|
2088
2089
|
let feedTargets = (connectionConfig, logName, feed, isClassic) => Stdlib_Array.filterMap(PgProjectionFeed$ReventlessAws.getFeedQueues(), fq => {
|
|
2089
|
-
|
|
2090
|
+
let included = isClassic ? fq.includeClassic : fq.includeDcb;
|
|
2091
|
+
if (included) {
|
|
2090
2092
|
return {
|
|
2091
2093
|
connectionConfig: connectionConfig,
|
|
2092
2094
|
logName: logName,
|
package/src/Platform_Casts.res
CHANGED
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
// The "proper" fix — `inboundAppSyncResolverParams<'runtimeParts>` — would
|
|
46
46
|
// require propagating `'runtimeParts` through `platformHooks`, `Plugin_Builder`,
|
|
47
47
|
// and `Admin`.
|
|
48
|
-
external asLambdaRuntime: ReventlessCore.Runtime.environment<
|
|
48
|
+
external asLambdaRuntime: ReventlessCore.Runtime.environment<
|
|
49
|
+
unknown,
|
|
50
|
+
> => ReventlessCore.Runtime.environment<Util.Lambda.runtimeParts> = "%identity"
|
|
49
51
|
|
|
50
52
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
51
53
|
// CAST 2 — hook callback arguments (unknown → concrete component types)
|
|
@@ -62,8 +64,13 @@ external asLambdaRuntime: ReventlessCore.Runtime.environment<unknown> => Reventl
|
|
|
62
64
|
// `reventless-core` cannot import `DcbEventLog.component`, `CommandTopic.component`,
|
|
63
65
|
// or `CommandTopic_Adapter.remoteChannel`. The AWS platform registers these
|
|
64
66
|
// callbacks and is the only caller, always passing the correct concrete value.
|
|
65
|
-
external asDcbEventLogComponent: unknown => ReventlessCore.Component.t<
|
|
66
|
-
|
|
67
|
+
external asDcbEventLogComponent: unknown => ReventlessCore.Component.t<
|
|
68
|
+
unit,
|
|
69
|
+
ReventlessCore.DcbEventLog.outputs,
|
|
70
|
+
unit,
|
|
71
|
+
> = "%identity"
|
|
72
|
+
external asDcbCommandTopicComponent: unknown => ReventlessCore.CommandTopic.component<unit> =
|
|
73
|
+
"%identity"
|
|
67
74
|
external asDcbEventLog: unknown => ReventlessCore.DcbEventLog.component = "%identity"
|
|
68
75
|
external asRemoteChannel: unknown => ReventlessCore.CommandTopic_Adapter.remoteChannel = "%identity"
|
|
69
76
|
|
|
@@ -103,4 +110,6 @@ external asSqsChannelParts: 'a => Util.SQS.channelParts = "%identity"
|
|
|
103
110
|
// level — it is a mismatch between ReScript's JS boxing convention and Pulumi's
|
|
104
111
|
// Proxy-based lazy evaluation model.
|
|
105
112
|
external _toUnknown: 'a => unknown = "%identity"
|
|
106
|
-
let wrapHookedValue: 'a => ReventlessCore.Plugin_Helpers.hookedValue<unknown> = x => {
|
|
113
|
+
let wrapHookedValue: 'a => ReventlessCore.Plugin_Helpers.hookedValue<unknown> = x => {
|
|
114
|
+
val: x->_toUnknown,
|
|
115
|
+
}
|
|
@@ -17,7 +17,9 @@ let sha256hex = (data: string): string =>
|
|
|
17
17
|
let hmacFromStr = (key: string, data: string): NodeCrypto.buffer =>
|
|
18
18
|
NodeCrypto.createHmac("sha256", key)->NodeCrypto.hmacUpdate(data)->NodeCrypto.hmacDigestBuffer
|
|
19
19
|
let hmacFromBuf = (key: NodeCrypto.buffer, data: string): NodeCrypto.buffer =>
|
|
20
|
-
NodeCrypto.createHmacFromBuffer("sha256", key)
|
|
20
|
+
NodeCrypto.createHmacFromBuffer("sha256", key)
|
|
21
|
+
->NodeCrypto.hmacUpdate(data)
|
|
22
|
+
->NodeCrypto.hmacDigestBuffer
|
|
21
23
|
|
|
22
24
|
// ── SigV4 ───────────────────────────────────────────────────────────────────
|
|
23
25
|
|
|
@@ -71,7 +73,10 @@ let signedHeaders = (
|
|
|
71
73
|
let kRegion = hmacFromBuf(kDate, region)
|
|
72
74
|
let kService = hmacFromBuf(kRegion, "appsync")
|
|
73
75
|
let kSigning = hmacFromBuf(kService, "aws4_request")
|
|
74
|
-
let signature =
|
|
76
|
+
let signature =
|
|
77
|
+
NodeCrypto.createHmacFromBuffer("sha256", kSigning)
|
|
78
|
+
->NodeCrypto.hmacUpdate(stringToSign)
|
|
79
|
+
->NodeCrypto.hmacDigest("hex")
|
|
75
80
|
|
|
76
81
|
let authorization = `AWS4-HMAC-SHA256 Credential=${creds.accessKeyId}/${scope}, SignedHeaders=${signedHeaderList}, Signature=${signature}`
|
|
77
82
|
let out = Dict.fromArray(sorted)
|
|
@@ -115,5 +120,4 @@ let postEvent = async (
|
|
|
115
120
|
|
|
116
121
|
// AppSync Events channel segments allow only [A-Za-z0-9-]; anything else
|
|
117
122
|
// collapses to `-`. Mirrors the UI's AutoLive.normalizeSegment.
|
|
118
|
-
let pathSegment = (value: string): string =>
|
|
119
|
-
value->String.replaceRegExp(%re("/[^A-Za-z0-9-]/g"), "-")
|
|
123
|
+
let pathSegment = (value: string): string => value->String.replaceRegExp(/[^A-Za-z0-9-]/g, "-")
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
installed, subscribe goes through the API-level auth modes only
|
|
44
44
|
(single-tenant open-core case).
|
|
45
45
|
*/
|
|
46
|
-
|
|
47
46
|
module Api = PulumiAws.AwsNative.AppSync.Api
|
|
48
47
|
module ChannelNamespace = PulumiAws.AwsNative.AppSync.ChannelNamespace
|
|
49
48
|
|
|
@@ -158,15 +157,18 @@ let make = (
|
|
|
158
157
|
let subscribeAuth = subscribeAuthRef.contents
|
|
159
158
|
let codeHandlersInput: option<Pulumi.Input.t<string>> =
|
|
160
159
|
subscribeAuth->Option.map(c => c.codeHandlers->Pulumi.Input.make)
|
|
161
|
-
let handlerConfigsInput: option<
|
|
162
|
-
|
|
160
|
+
let handlerConfigsInput: option<
|
|
161
|
+
Pulumi.Input.t<ChannelNamespace.handlerConfigsArgs>,
|
|
162
|
+
> = subscribeAuth->Option.map(c =>
|
|
163
|
+
{
|
|
163
164
|
ChannelNamespace.onSubscribe: {
|
|
164
165
|
ChannelNamespace.behavior: ChannelNamespace.handlerBehaviorCode->Pulumi.Input.make,
|
|
165
166
|
integration: {
|
|
166
167
|
ChannelNamespace.dataSourceName: c.dataSourceName,
|
|
167
168
|
}->Pulumi.Input.make,
|
|
168
169
|
}->Pulumi.Input.make,
|
|
169
|
-
}->Pulumi.Input.make
|
|
170
|
+
}->Pulumi.Input.make
|
|
171
|
+
)
|
|
170
172
|
let defaultNamespace = ChannelNamespace.make(
|
|
171
173
|
~name=name ++ "DefaultNS",
|
|
172
174
|
~args={
|
|
@@ -182,14 +184,12 @@ let make = (
|
|
|
182
184
|
// API-level `defaultPublishAuthModes` (IAM-only), so authenticated browsers
|
|
183
185
|
// can publish ephemeral payloads on `/client/**` while `/default/**` change
|
|
184
186
|
// descriptors stay Lambda-only.
|
|
185
|
-
let clientAuthModes: Pulumi.Input.t<
|
|
186
|
-
array<Pulumi.Input.t<ChannelNamespace.authMode>>,
|
|
187
|
-
> =
|
|
187
|
+
let clientAuthModes: Pulumi.Input.t<array<Pulumi.Input.t<ChannelNamespace.authMode>>> =
|
|
188
188
|
[
|
|
189
|
-
(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
->Pulumi.Input.make,
|
|
189
|
+
(
|
|
190
|
+
{authType: Api.amazonCognitoUserPools->Pulumi.Input.make}: ChannelNamespace.authMode
|
|
191
|
+
)->Pulumi.Input.make,
|
|
192
|
+
({authType: Api.awsIam->Pulumi.Input.make}: ChannelNamespace.authMode)->Pulumi.Input.make,
|
|
193
193
|
]->Pulumi.Input.make
|
|
194
194
|
let clientNamespace = ChannelNamespace.make(
|
|
195
195
|
~name=name ++ "ClientNS",
|
|
@@ -208,6 +208,4 @@ let make = (
|
|
|
208
208
|
/** HTTP endpoint URL for use as Lambda `APPSYNC_ENDPOINT` env var.
|
|
209
209
|
Constructs `https://{dns.http}` from the raw domain name in the API output. */
|
|
210
210
|
let httpEndpoint = (eventsApi: t): Pulumi.Output.t<string> =>
|
|
211
|
-
eventsApi.api.dns->Pulumi.Output.apply(dns =>
|
|
212
|
-
"https://" ++ dns.http->Option.getOr("")
|
|
213
|
-
)
|
|
211
|
+
eventsApi.api.dns->Pulumi.Output.apply(dns => "https://" ++ dns.http->Option.getOr(""))
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
`PulumiAws.AppSync.Resolver` that uses `@pulumi/aws-native` (Cloud Control
|
|
3
3
|
API) so the CFN handler can internally wait out schema -> resolver
|
|
4
4
|
propagation. See docs/plans/done/appsync-resolver-aws-native.md. */
|
|
5
|
-
|
|
6
5
|
module Native = PulumiAws.AwsNative.AppSync.Resolver
|
|
7
6
|
module Functions = PulumiAws.AppSync.Resolver.Functions
|
|
8
7
|
|
|
@@ -28,7 +27,7 @@ let makeUnitJsResolver = (
|
|
|
28
27
|
code,
|
|
29
28
|
runtime: Native.appsyncJs->Pulumi.Input.make,
|
|
30
29
|
},
|
|
31
|
-
~opts
|
|
30
|
+
~opts,
|
|
32
31
|
)
|
|
33
32
|
|
|
34
33
|
let makeSubscriptionResolverCode = (~filter: option<string>): string => {
|
|
@@ -62,7 +61,7 @@ let makeSubscriptionResolver = (
|
|
|
62
61
|
code: makeSubscriptionResolverCode(~filter=subscriptionFilter)->Pulumi.Input.make,
|
|
63
62
|
runtime: Native.appsyncJs->Pulumi.Input.make,
|
|
64
63
|
},
|
|
65
|
-
~opts
|
|
64
|
+
~opts,
|
|
66
65
|
)
|
|
67
66
|
|
|
68
67
|
let makePipelineJsResolver = (
|
|
@@ -89,5 +88,5 @@ let makePipelineJsResolver = (
|
|
|
89
88
|
}: Native.pipelineConfig
|
|
90
89
|
)->Pulumi.Input.make,
|
|
91
90
|
},
|
|
92
|
-
~opts
|
|
91
|
+
~opts,
|
|
93
92
|
)
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
adopted in-place on first deploy (no delete+recreate).
|
|
18
18
|
|
|
19
19
|
See docs/plans/done/appsync-resolver-aws-native-retry.md. */
|
|
20
|
-
|
|
21
|
-
// ── AWS SDK bindings ─────────────────────────────────────────────────────────
|
|
20
|
+
let // ── AWS SDK bindings ─────────────────────────────────────────────────────────
|
|
22
21
|
//
|
|
23
22
|
// Pulumi dynamic providers serialise the provider object (and its captured
|
|
24
23
|
// closure of imports) into stack state. A static `@module("@aws-sdk/client-appsync")`
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
// so the SDK module is NOT part of the captured closure. Each provider method
|
|
32
31
|
// resolves the SDK on first use and caches an initialised client.
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
log = ReventlessCore.Logger.fromEnv()
|
|
35
34
|
|
|
36
35
|
type appSyncClient
|
|
37
36
|
|
|
@@ -231,11 +230,12 @@ let rec runWithRaceRetry = async (
|
|
|
231
230
|
let msg = jsExn->Option.flatMap(JsExn.message)->Option.getOr("(no message)")
|
|
232
231
|
let isRetryable =
|
|
233
232
|
attempt < maxAttempts &&
|
|
234
|
-
|
|
233
|
+
jsExn->Option.mapOr(false, e => isFieldNotFoundError(e) || isSchemaAlteringError(e))
|
|
235
234
|
if isRetryable {
|
|
236
235
|
log.info(
|
|
237
236
|
~comp="AppSync_Resolver_Retrying",
|
|
238
|
-
`attempt ${(attempt + 1)
|
|
237
|
+
`attempt ${(attempt + 1)
|
|
238
|
+
->Int.toString}/${maxAttempts->Int.toString} failed, retrying in ${delayMs->Int.toString}ms: ${name}: ${msg}`,
|
|
239
239
|
)
|
|
240
240
|
let _ = await Promise.make((resolve, _) => setTimeout(resolve, delayMs)->ignore)
|
|
241
241
|
let nextDelay = delayMs * 2
|
|
@@ -353,65 +353,62 @@ let makeOuts = (resolverArn: string, inputs: providerInputs): createOuts => {
|
|
|
353
353
|
let create = async (inputs: providerInputs): createResult => {
|
|
354
354
|
let sdk = await getSdk()
|
|
355
355
|
let client = await getClient()
|
|
356
|
-
let arn =
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
| Some(e) => jsThrow(e)
|
|
377
|
-
| None => throw(exn)
|
|
378
|
-
}
|
|
356
|
+
let arn = try {
|
|
357
|
+
await runWithRaceRetry(() =>
|
|
358
|
+
client
|
|
359
|
+
->sendCreate(newOf1(sdk.createCtor, inputs->buildSdkInput))
|
|
360
|
+
->Promise.thenResolve(extractArn)
|
|
361
|
+
)
|
|
362
|
+
} catch {
|
|
363
|
+
| exn =>
|
|
364
|
+
// If the resolver already exists (AppSync / Pulumi state divergence from a
|
|
365
|
+
// previous partial deploy), update it to match desired config and adopt its ARN.
|
|
366
|
+
// This makes create idempotent and lets stuck stacks recover without manual intervention.
|
|
367
|
+
let handled = exn->JsExn.fromException->Option.mapOr(false, isAlreadyExistsError)
|
|
368
|
+
if handled {
|
|
369
|
+
let resp = await client->sendUpdate(newOf1(sdk.updateCtor, inputs->buildSdkInput))
|
|
370
|
+
extractArn(resp)
|
|
371
|
+
} else {
|
|
372
|
+
let jsExn = exn->JsExn.fromException
|
|
373
|
+
switch jsExn {
|
|
374
|
+
| Some(e) => jsThrow(e)
|
|
375
|
+
| None => throw(exn)
|
|
379
376
|
}
|
|
380
377
|
}
|
|
378
|
+
}
|
|
381
379
|
{id: arn, outs: makeOuts(arn, inputs)}
|
|
382
380
|
}
|
|
383
381
|
|
|
384
382
|
let update = async (id: string, _olds: providerInputs, news: providerInputs): updateResult => {
|
|
385
383
|
let sdk = await getSdk()
|
|
386
384
|
let client = await getClient()
|
|
387
|
-
let arn =
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
385
|
+
let arn = try {
|
|
386
|
+
let _ = await runWithRaceRetry(() =>
|
|
387
|
+
client->sendUpdate(newOf1(sdk.updateCtor, news->buildSdkInput))
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
// ARN is stable across updates — reuse the existing id
|
|
391
|
+
id
|
|
392
|
+
} catch {
|
|
393
|
+
| exn =>
|
|
394
|
+
// If the resolver was deleted from AppSync (e.g. by a schema replacement),
|
|
395
|
+
// fall back to CreateResolver so the resource is transparently recreated.
|
|
396
|
+
let handled = exn->JsExn.fromException->Option.mapOr(false, isAlreadyDeletedError)
|
|
397
|
+
if handled {
|
|
398
|
+
let resp = await runWithRaceRetry(() =>
|
|
399
|
+
client
|
|
400
|
+
->sendCreate(newOf1(sdk.createCtor, news->buildSdkInput))
|
|
401
|
+
->Promise.thenResolve(extractArn)
|
|
391
402
|
)
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
let handled =
|
|
399
|
-
exn->JsExn.fromException->Option.mapOr(false, isAlreadyDeletedError)
|
|
400
|
-
if handled {
|
|
401
|
-
let resp = await runWithRaceRetry(() =>
|
|
402
|
-
client
|
|
403
|
-
->sendCreate(newOf1(sdk.createCtor, news->buildSdkInput))
|
|
404
|
-
->Promise.thenResolve(extractArn)
|
|
405
|
-
)
|
|
406
|
-
resp
|
|
407
|
-
} else {
|
|
408
|
-
let jsExn = exn->JsExn.fromException
|
|
409
|
-
switch jsExn {
|
|
410
|
-
| Some(e) => jsThrow(e)
|
|
411
|
-
| None => throw(exn)
|
|
412
|
-
}
|
|
403
|
+
resp
|
|
404
|
+
} else {
|
|
405
|
+
let jsExn = exn->JsExn.fromException
|
|
406
|
+
switch jsExn {
|
|
407
|
+
| Some(e) => jsThrow(e)
|
|
408
|
+
| None => throw(exn)
|
|
413
409
|
}
|
|
414
410
|
}
|
|
411
|
+
}
|
|
415
412
|
{outs: makeOuts(arn, news)}
|
|
416
413
|
}
|
|
417
414
|
|
|
@@ -451,13 +448,28 @@ let isDefined: string => bool = %raw(`x => x !== undefined && x !== null`)
|
|
|
451
448
|
/** Returns `true` for fields whose change requires delete+recreate.
|
|
452
449
|
AppSync does not allow renaming the API, type, field, or kind in-place. */
|
|
453
450
|
let diff_ = (_id: string, olds: providerInputs, news: providerInputs): diffResult => {
|
|
454
|
-
let replaces =
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
451
|
+
let replaces = [
|
|
452
|
+
if isDefined(olds.apiId) && olds.apiId != news.apiId {
|
|
453
|
+
Some("apiId")
|
|
454
|
+
} else {
|
|
455
|
+
None
|
|
456
|
+
},
|
|
457
|
+
if isDefined(olds.typeName) && olds.typeName != news.typeName {
|
|
458
|
+
Some("typeName")
|
|
459
|
+
} else {
|
|
460
|
+
None
|
|
461
|
+
},
|
|
462
|
+
if isDefined(olds.fieldName) && olds.fieldName != news.fieldName {
|
|
463
|
+
Some("fieldName")
|
|
464
|
+
} else {
|
|
465
|
+
None
|
|
466
|
+
},
|
|
467
|
+
if isDefined(olds.kind) && olds.kind != news.kind {
|
|
468
|
+
Some("kind")
|
|
469
|
+
} else {
|
|
470
|
+
None
|
|
471
|
+
},
|
|
472
|
+
]->Array.filterMap(x => x)
|
|
461
473
|
// For in-place update detection (non-replace changes): compare as-is.
|
|
462
474
|
// If olds is from old state (missing fields), this may trigger an unnecessary
|
|
463
475
|
// update, but that is safe — the update simply re-applies the resolver.
|
|
@@ -541,8 +553,7 @@ type constructorProps = {
|
|
|
541
553
|
// Use the explicit /index.js path because @pulumi/pulumi/dynamic is a
|
|
542
554
|
// directory import not resolvable in ESM mode.
|
|
543
555
|
@module("@pulumi/pulumi/dynamic/index.js") @new
|
|
544
|
-
external _newResource: ('provider, string, 'props, Pulumi.CustomResourceOptions.t) => t =
|
|
545
|
-
"Resource"
|
|
556
|
+
external _newResource: ('provider, string, 'props, Pulumi.CustomResourceOptions.t) => t = "Resource"
|
|
546
557
|
|
|
547
558
|
let makeResolver = (
|
|
548
559
|
~name: string,
|
|
@@ -551,11 +562,7 @@ let makeResolver = (
|
|
|
551
562
|
): t => {
|
|
552
563
|
// Always include an alias for the aws-native resource previously in state —
|
|
553
564
|
// prevents delete+recreate on first deploy (in-place adoption).
|
|
554
|
-
let migrationAlias = Pulumi.Alias.make(
|
|
555
|
-
~type_="aws-native:appsync/resolver:Resolver",
|
|
556
|
-
~name,
|
|
557
|
-
(),
|
|
558
|
-
)
|
|
565
|
+
let migrationAlias = Pulumi.Alias.make(~type_="aws-native:appsync/resolver:Resolver", ~name, ())
|
|
559
566
|
let finalOpts: Pulumi.CustomResourceOptions.t = switch opts {
|
|
560
567
|
| Some(o) => {...o, aliases: [migrationAlias]}
|
|
561
568
|
| None => {aliases: [migrationAlias]}
|
|
@@ -576,7 +583,8 @@ let makeSubscriptionResolverCode = (~filter: option<string>): string =>
|
|
|
576
583
|
export function response(ctx) {
|
|
577
584
|
return ctx.result;
|
|
578
585
|
}`
|
|
579
|
-
| Some(f) =>
|
|
586
|
+
| Some(f) =>
|
|
587
|
+
`export function request(ctx) {
|
|
580
588
|
extensions.setSubscriptionFilter(${f});
|
|
581
589
|
return {};
|
|
582
590
|
}
|
|
@@ -584,7 +592,7 @@ export function response(ctx) {
|
|
|
584
592
|
export function response(ctx) {
|
|
585
593
|
return ctx.result;
|
|
586
594
|
}`
|
|
587
|
-
}
|
|
595
|
+
}
|
|
588
596
|
|
|
589
597
|
let makeSubscriptionResolver = (
|
|
590
598
|
~name,
|
|
@@ -623,7 +631,7 @@ let makeUnitJsResolver = (
|
|
|
623
631
|
apiId: api->Pulumi.Output.flatMap(a => a.id)->Pulumi.Output.asInput,
|
|
624
632
|
typeName: type_,
|
|
625
633
|
fieldName: field,
|
|
626
|
-
dataSourceName
|
|
634
|
+
dataSourceName,
|
|
627
635
|
kind: "UNIT"->Pulumi.Input.make,
|
|
628
636
|
code,
|
|
629
637
|
},
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
state, and `Effect` (used by the in-process `AppSync_Error` retry) fails
|
|
34
34
|
that serialisation, so the SDK is lazily imported and the backoff loop is
|
|
35
35
|
hand-rolled here. */
|
|
36
|
-
|
|
37
36
|
let log = ReventlessCore.Logger.fromEnv()
|
|
38
37
|
|
|
39
38
|
// ── AWS SDK bindings (lazily imported — see AppSync_Resolver_Retrying) ─────────
|
|
@@ -187,17 +186,23 @@ let rec runWithRetry = async (
|
|
|
187
186
|
let name = jsExn->Option.flatMap(exnName)->Option.getOr("(no name)")
|
|
188
187
|
let msg = jsExn->Option.flatMap(JsExn.message)->Option.getOr("(no message)")
|
|
189
188
|
let isRetryable =
|
|
190
|
-
attempt < maxAttempts &&
|
|
191
|
-
jsExn->Option.mapOr(false, isRetryableAssociationError)
|
|
189
|
+
attempt < maxAttempts && jsExn->Option.mapOr(false, isRetryableAssociationError)
|
|
192
190
|
if isRetryable {
|
|
193
191
|
log.info(
|
|
194
192
|
~comp="AppSync_SourceApiAssociation_Retrying",
|
|
195
|
-
`attempt ${(attempt + 1)
|
|
193
|
+
`attempt ${(attempt + 1)
|
|
194
|
+
->Int.toString}/${maxAttempts->Int.toString} failed, retrying in ${delayMs->Int.toString}ms: ${name}: ${msg}`,
|
|
196
195
|
)
|
|
197
196
|
let _ = await Promise.make((resolve, _) => setTimeout(resolve, delayMs)->ignore)
|
|
198
197
|
let nextDelay = delayMs * 2
|
|
199
198
|
let cappedDelay = nextDelay > maxDelayMs ? maxDelayMs : nextDelay
|
|
200
|
-
await runWithRetry(
|
|
199
|
+
await runWithRetry(
|
|
200
|
+
~attempt=attempt + 1,
|
|
201
|
+
~maxAttempts,
|
|
202
|
+
~delayMs=cappedDelay,
|
|
203
|
+
~maxDelayMs,
|
|
204
|
+
makeCall,
|
|
205
|
+
)
|
|
201
206
|
} else {
|
|
202
207
|
if attempt > 0 {
|
|
203
208
|
log.warn(
|
|
@@ -286,9 +291,7 @@ let extractIds = (resp: createResult): (string, string) =>
|
|
|
286
291
|
switch resp.sourceApiAssociation {
|
|
287
292
|
| Some({associationArn: ?Some(arn), associationId: ?Some(aid)}) => (arn, aid)
|
|
288
293
|
| _ =>
|
|
289
|
-
JsError.throwWithMessage(
|
|
290
|
-
"AssociateSourceGraphqlApi returned no associationArn / associationId",
|
|
291
|
-
)
|
|
294
|
+
JsError.throwWithMessage("AssociateSourceGraphqlApi returned no associationArn / associationId")
|
|
292
295
|
}
|
|
293
296
|
|
|
294
297
|
let create = async (inputs: providerInputs): createResultOut => {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
type ddbClient
|
|
14
14
|
type docClient
|
|
15
|
-
@module("@aws-sdk/client-dynamodb") @new
|
|
15
|
+
@module("@aws-sdk/client-dynamodb") @new
|
|
16
|
+
external makeDdbClient: unit => ddbClient = "DynamoDBClient"
|
|
16
17
|
@module("@aws-sdk/lib-dynamodb") @scope("DynamoDBDocumentClient")
|
|
17
18
|
external docFrom: ddbClient => docClient = "from"
|
|
18
19
|
|
|
@@ -25,7 +26,8 @@ type scanInput = {
|
|
|
25
26
|
@as("ExpressionAttributeValues") expressionAttributeValues?: dict<JSON.t>,
|
|
26
27
|
}
|
|
27
28
|
type scanCommand
|
|
28
|
-
@module("@aws-sdk/lib-dynamodb") @new
|
|
29
|
+
@module("@aws-sdk/lib-dynamodb") @new
|
|
30
|
+
external makeScanCommand: scanInput => scanCommand = "ScanCommand"
|
|
29
31
|
type scanOutput = {
|
|
30
32
|
@as("Items") items?: array<dict<JSON.t>>,
|
|
31
33
|
@as("LastEvaluatedKey") lastEvaluatedKey?: JSON.t,
|
|
@@ -46,17 +48,16 @@ let scanAll = async (
|
|
|
46
48
|
let startKey = ref(None)
|
|
47
49
|
let more = ref(true)
|
|
48
50
|
while more.contents {
|
|
49
|
-
let out =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
)
|
|
51
|
+
let out = await doc->send(
|
|
52
|
+
makeScanCommand({
|
|
53
|
+
tableName,
|
|
54
|
+
limit: 1000,
|
|
55
|
+
exclusiveStartKey: ?startKey.contents,
|
|
56
|
+
?filterExpression,
|
|
57
|
+
?expressionAttributeNames,
|
|
58
|
+
?expressionAttributeValues,
|
|
59
|
+
}),
|
|
60
|
+
)
|
|
60
61
|
out.items->Option.forEach(is => is->Array.forEach(i => items->Array.push(i)))
|
|
61
62
|
switch out.lastEvaluatedKey {
|
|
62
63
|
| Some(k) => startKey := Some(k)
|
|
@@ -76,7 +77,7 @@ let scanAll = async (
|
|
|
76
77
|
// numeric segments compared as numbers, others lexically). Mirrors the platform
|
|
77
78
|
// invariant "one version per plugin at a time" ordering. Returns 1/-1/0.
|
|
78
79
|
let compareVersions = (a: string, b: string): int => {
|
|
79
|
-
let norm = s => s->String.replaceRegExp(
|
|
80
|
+
let norm = s => s->String.replaceRegExp(/[-+]/g, ".")->String.split(".")
|
|
80
81
|
let pa = norm(a)
|
|
81
82
|
let pb = norm(b)
|
|
82
83
|
let len = Math.Int.max(pa->Array.length, pb->Array.length)
|
|
@@ -205,7 +205,10 @@ let make = (
|
|
|
205
205
|
// 4096-byte UpdateFunctionConfiguration limit. Its content participates in
|
|
206
206
|
// `sourceCodeHash`, so a change to the admin structure redeploys the code.
|
|
207
207
|
let packageDirs = Dict.fromArray([
|
|
208
|
-
(
|
|
208
|
+
(
|
|
209
|
+
"@reventlessdev/reventless-aws",
|
|
210
|
+
Util_Bundle.resolvePackageRoot("@reventlessdev/reventless-aws"),
|
|
211
|
+
),
|
|
209
212
|
])
|
|
210
213
|
let {code, sourceCodeHash} = Util_Bundle.buildCodeArchive(
|
|
211
214
|
~entryPointModule="@reventlessdev/reventless-aws/src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res.mjs",
|
|
@@ -245,7 +248,12 @@ let make = (
|
|
|
245
248
|
memorySize: 512->Pulumi.Input.make,
|
|
246
249
|
timeout: 30->Pulumi.Input.make,
|
|
247
250
|
layers,
|
|
248
|
-
tags: AWS.Tags.make(
|
|
251
|
+
tags: AWS.Tags.make(
|
|
252
|
+
~name=name ++ "Lambda",
|
|
253
|
+
~kind=ReventlessCore.ComponentType.Platform,
|
|
254
|
+
~role=Runtime,
|
|
255
|
+
~scope=Platform,
|
|
256
|
+
),
|
|
249
257
|
environment: (
|
|
250
258
|
{
|
|
251
259
|
Lambda.Function.variables: Dict.fromArray([
|