@reventlessdev/reventless-aws 3.0.0-alpha.396 → 3.0.0-alpha.398
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 +40 -0
- package/package.json +8 -8
- package/scripts/BakeManifest.res +15 -15
- package/scripts/DeployApp.res +8 -9
- package/scripts/DeployApp.res.mjs +4 -13
- package/scripts/DeployManifest.res +4 -5
- package/scripts/DeployManifest.res.mjs +0 -1
- package/scripts/ProvisionAccounts.res +41 -33
- package/scripts/ProvisionAccounts.res.mjs +6 -9
- package/scripts/ProvisionAdmin.res +10 -10
- package/scripts/ProvisionIdentity.res +2 -2
- package/scripts/ResolveEnvironment.res +3 -3
- package/src/Platform.res +6 -4
- package/src/Platform.res.mjs +6 -4
- package/src/Platform_ProvidedGroups.res +4 -4
- package/src/Platform_Stack.res +2 -3
- package/src/Platform_Stack.res.mjs +1 -2
- package/src/adapter/Api/AppSyncEventsSigner_Ops.res +2 -2
- package/src/adapter/Api/AppSync_EventsApi.res +2 -2
- package/src/adapter/Api/Platform_ComponentDefinitions_Lambda_Ops.res +6 -6
- package/src/adapter/Auth/Auth_ActiveRoleTrigger.res +15 -8
- package/src/adapter/Auth/Auth_ActiveRoleTrigger.res.mjs +7 -7
- package/src/adapter/Auth/Auth_IdentityStore.res +41 -2
- package/src/adapter/Auth/Auth_IdentityStore.res.mjs +42 -3
- package/src/adapter/DcbEventLog/DcbBackend.res +3 -3
- package/src/adapter/DcbEventLog/DcbBackend.res.mjs +1 -3
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res +11 -9
- package/src/adapter/DcbEventLog/DcbEventLogStorage_DynamoDb_Runtime.res.mjs +4 -6
- package/src/adapter/EventLog/EventLogBackend.res +3 -3
- package/src/adapter/EventLog/EventLogBackend.res.mjs +1 -3
- package/src/adapter/Geocoder/Geocoder_AwsLocation_Backend.res +1 -1
- package/src/adapter/QueryDb/PgQueryResolver_Lambda.res +5 -5
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +2 -2
- package/src/adapter/Runtime/AggregateRuntime_Builder_Micro_Async.res +2 -2
- package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res +32 -32
- package/src/adapter/Runtime/AutomationSliceEntryPoint_Ops.res.mjs +4 -3
- package/src/adapter/Runtime/AutomationSliceRuntime_Builder_Single.res +6 -6
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res +16 -5
- package/src/adapter/Runtime/DcbCommandTopicEntryPoint_Ops.res.mjs +3 -3
- package/src/adapter/Runtime/EventCollectorEntryPoint_Ops.res +5 -5
- package/src/adapter/Runtime/PgQueryResolverEntryPoint_Ops.res +24 -18
- package/src/adapter/Runtime/ReadModelEntryPoint_Ops.res +16 -14
- package/src/adapter/Runtime/RuntimeEnvironment_Lambda.res +2 -2
- package/src/adapter/Runtime/RuntimeExtensionEntryPoint_Ops.res +4 -4
- package/src/adapter/Runtime/SideEffectEntryPoint_Ops.res +4 -4
- package/src/adapter/Runtime/StateViewSliceEntryPoint_Ops.res +9 -9
- package/src/adapter/Runtime/TaskBucketEntryPoint_Ops.res +11 -9
- package/src/components/Api/AppSync_Adapter.res +4 -4
- package/src/components/InboundTranslationSlice_Builder.res +19 -0
- package/src/components/InboundTranslationSlice_Builder.res.mjs +12 -2
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res +4 -7
- package/src/plugin/runtime/PluginExtensionPointRuntime_Builder.res.mjs +1 -4
- package/src/plugin/runtime/PluginRuntime_Builder.res +17 -26
- package/src/plugin/runtime/PluginRuntime_Builder.res.mjs +7 -22
- package/tests/AppSyncEventsSigner_OpsTest.res +1 -1
- package/tests/AppSync_AdapterTest.res +4 -4
- package/tests/AppSync_AdapterTest.res.mjs +4 -8
- package/tests/Auth_ActiveRoleStoreTest.res +1 -1
- package/tests/Auth_ActiveRoleTrigger_OpsTest.res +1 -1
- package/tests/AutomationSliceEntryPoint_OpsTest.res +0 -2
- package/tests/AutomationSliceEntryPoint_OpsTest.res.mjs +3 -6
- package/tests/BakeConvergenceTest.res +1 -8
- package/tests/BakeConvergenceTest.res.mjs +3 -23
- package/tests/BakeManifestTest.res +5 -10
- package/tests/BakeManifestTest.res.mjs +1 -6
- package/tests/CommandLineTest.res +3 -3
- package/tests/DeployAppTest.res +3 -4
- package/tests/DeployAppTest.res.mjs +6 -15
- package/tests/EpInboundTestSlice.res +1 -0
- package/tests/EpInboundTestSlice.res.mjs +3 -0
- package/tests/EventCollectorPluginDefinitionAssetTest.res +1 -2
- package/tests/EventCollectorPluginDefinitionAssetTest.res.mjs +11 -21
- package/tests/IdentityProvider_Cognito_BackendTest.res +0 -3
- package/tests/IdentityProvider_Cognito_BackendTest.res.mjs +0 -3
- package/tests/PgQueryResolver_LambdaTest.res +6 -10
- package/tests/PgQueryResolver_LambdaTest.res.mjs +4 -34
- package/tests/Platform_ProvidedGroupsTest.res +2 -2
- package/tests/Platform_ProvidedGroupsTest.res.mjs +1 -2
- package/tests/ProvisionAccountsTest.res +5 -10
- package/tests/ProvisionAccountsTest.res.mjs +0 -9
- package/tests/ProvisionAdminTest.res +4 -9
- package/tests/ProvisionAdminTest.res.mjs +0 -7
- package/tests/ProvisionIdentityTest.res +2 -4
- package/tests/ProvisionIdentityTest.res.mjs +0 -2
- package/tests/SideEffectEntryPoint_OpsTest.res +2 -2
- package/tests/Util_ShellConfigTest.res +3 -3
- package/tests/Util_ShellConfigTest.res.mjs +1 -2
|
@@ -9,7 +9,6 @@ globalThis.describe("DeployApp.parseArgs", () => {
|
|
|
9
9
|
TAG: "Ok",
|
|
10
10
|
_0: {
|
|
11
11
|
command: "Up",
|
|
12
|
-
manifest: undefined,
|
|
13
12
|
stack: "dev",
|
|
14
13
|
help: false
|
|
15
14
|
}
|
|
@@ -79,27 +78,19 @@ globalThis.describe("DeployApp stacks and layer", () => {
|
|
|
79
78
|
dir: "/app/platform-aws",
|
|
80
79
|
projectName: "shop-platform-aws",
|
|
81
80
|
program: "/app/platform-aws/src/Main.res.mjs",
|
|
82
|
-
stackDefaults: project_stackDefaults
|
|
83
|
-
region: undefined
|
|
81
|
+
stackDefaults: project_stackDefaults
|
|
84
82
|
};
|
|
85
83
|
globalThis.test("a stack the manifest puts in another region is refused", () => {
|
|
86
|
-
let
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
label: "ingest",
|
|
90
|
-
dir: "/app/platform-aws",
|
|
91
|
-
projectName: "shop-platform-aws",
|
|
92
|
-
program: "/app/platform-aws/src/Main.res.mjs",
|
|
93
|
-
stackDefaults: ingest_stackDefaults,
|
|
94
|
-
region: ingest_region
|
|
95
|
-
};
|
|
84
|
+
let newrecord = {...project};
|
|
85
|
+
newrecord.region = "eu-central-1";
|
|
86
|
+
newrecord.label = "ingest";
|
|
96
87
|
globalThis.expect(DeployApp$ReventlessAws.regionProblems([
|
|
97
88
|
project,
|
|
98
|
-
|
|
89
|
+
newrecord
|
|
99
90
|
], "eu-west-1").length).toBe(1);
|
|
100
91
|
globalThis.expect(DeployApp$ReventlessAws.regionProblems([
|
|
101
92
|
project,
|
|
102
|
-
|
|
93
|
+
newrecord
|
|
103
94
|
], "eu-central-1")).toEqual([]);
|
|
104
95
|
});
|
|
105
96
|
globalThis.test("a new stack gets the app's defaults, then the region and the try-out flag", () => {
|
|
@@ -12,6 +12,8 @@ let commandSchema = Sury.$schema(s => ({
|
|
|
12
12
|
thingId: s.m(Sury.string)
|
|
13
13
|
}));
|
|
14
14
|
|
|
15
|
+
let capabilityNeeds = [];
|
|
16
|
+
|
|
15
17
|
function authorizationOf(param) {
|
|
16
18
|
return {
|
|
17
19
|
TAG: "AllowRoles",
|
|
@@ -36,6 +38,7 @@ export {
|
|
|
36
38
|
commandSchema,
|
|
37
39
|
targetName,
|
|
38
40
|
externalSystem,
|
|
41
|
+
capabilityNeeds,
|
|
39
42
|
endpoint,
|
|
40
43
|
authorizationOf,
|
|
41
44
|
}
|
|
@@ -31,29 +31,17 @@ let offloadedFragment = {
|
|
|
31
31
|
},
|
|
32
32
|
apiTarget: "Domain",
|
|
33
33
|
structure: undefined,
|
|
34
|
-
dcbEventLog: undefined,
|
|
35
34
|
kind: "Domain"
|
|
36
35
|
};
|
|
37
36
|
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
apiSchemaFragment: {
|
|
47
|
-
TAG: "Inline",
|
|
48
|
-
_0: {
|
|
49
|
-
encoded: "{\"types\":[]}",
|
|
50
|
-
protocol: "1"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
apiTarget: offloadedFragment.apiTarget,
|
|
54
|
-
structure: offloadedFragment.structure,
|
|
55
|
-
dcbEventLog: offloadedFragment.dcbEventLog,
|
|
56
|
-
kind: offloadedFragment.kind
|
|
37
|
+
let newrecord = {...offloadedFragment};
|
|
38
|
+
|
|
39
|
+
newrecord.apiSchemaFragment = {
|
|
40
|
+
TAG: "Inline",
|
|
41
|
+
_0: {
|
|
42
|
+
encoded: "{\"types\":[]}",
|
|
43
|
+
protocol: "1"
|
|
44
|
+
}
|
|
57
45
|
};
|
|
58
46
|
|
|
59
47
|
function writeAsset(def) {
|
|
@@ -100,7 +88,7 @@ globalThis.describe("pluginDefinition.json write/read symmetry", () => {
|
|
|
100
88
|
globalThis.test("a definition read back from the asset can be published to the Connect handshake", () => {
|
|
101
89
|
[
|
|
102
90
|
offloadedFragment,
|
|
103
|
-
|
|
91
|
+
newrecord
|
|
104
92
|
].forEach(def => {
|
|
105
93
|
let published = Util_Sury$Reventless.toJson({
|
|
106
94
|
TAG: "ConnectPlugin",
|
|
@@ -126,6 +114,8 @@ globalThis.describe("pluginDefinition.json write/read symmetry", () => {
|
|
|
126
114
|
});
|
|
127
115
|
});
|
|
128
116
|
|
|
117
|
+
let inlineFragment = newrecord;
|
|
118
|
+
|
|
129
119
|
export {
|
|
130
120
|
offloadedFragment,
|
|
131
121
|
inlineFragment,
|
|
@@ -289,11 +289,8 @@ describe("AutomationSliceRuntime_Builder_Single.declaresIdentityProvider", () =>
|
|
|
289
289
|
callbackType: "outbound",
|
|
290
290
|
queryDbTableName: Pulumi.Output.make(""),
|
|
291
291
|
queryDbResources: [],
|
|
292
|
-
context: None,
|
|
293
292
|
sourceTopics: Dict.make(),
|
|
294
293
|
consumesDcbLog: true,
|
|
295
|
-
commandTargetName: None,
|
|
296
|
-
schedule: None,
|
|
297
294
|
schedulesResources: [],
|
|
298
295
|
capabilityNeeds: needs,
|
|
299
296
|
}
|
|
@@ -407,11 +407,8 @@ globalThis.describe("AutomationSliceRuntime_Builder_Single.declaresIdentityProvi
|
|
|
407
407
|
callbackType: "outbound",
|
|
408
408
|
queryDbTableName: Pulumi.output(""),
|
|
409
409
|
queryDbResources: [],
|
|
410
|
-
context: undefined,
|
|
411
410
|
sourceTopics: {},
|
|
412
411
|
consumesDcbLog: true,
|
|
413
|
-
commandTargetName: undefined,
|
|
414
|
-
schedule: undefined,
|
|
415
412
|
schedulesResources: [],
|
|
416
413
|
capabilityNeeds: needs
|
|
417
414
|
});
|
|
@@ -104,16 +104,16 @@ let makeBinding = (
|
|
|
104
104
|
indexes: [
|
|
105
105
|
{index: "byStatus", type_: "S", idField: "status", projectionType: Reventless.ReadModel.ALL},
|
|
106
106
|
],
|
|
107
|
-
subIdField,
|
|
107
|
+
?subIdField,
|
|
108
108
|
capability,
|
|
109
109
|
labelField: "name",
|
|
110
110
|
includeIdParam: true,
|
|
111
111
|
authorization,
|
|
112
|
-
ownerField,
|
|
113
|
-
retiredField,
|
|
114
|
-
retiredValues,
|
|
112
|
+
?ownerField,
|
|
113
|
+
?retiredField,
|
|
114
|
+
?retiredValues,
|
|
115
115
|
namedWhenRetired,
|
|
116
|
-
imageSource,
|
|
116
|
+
?imageSource,
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
let mkPayload = (
|
|
@@ -695,16 +695,12 @@ let geoBinding = (): PgQueryResolver_Lambda.binding => {
|
|
|
695
695
|
indexes: [
|
|
696
696
|
{index: "byStatus", type_: "S", idField: "status", projectionType: Reventless.ReadModel.ALL},
|
|
697
697
|
],
|
|
698
|
-
subIdField:
|
|
698
|
+
subIdField: "lineNo",
|
|
699
699
|
capability,
|
|
700
700
|
labelField: "name",
|
|
701
701
|
includeIdParam: true,
|
|
702
702
|
authorization: Reventless.Authorization.AllowAnonymous,
|
|
703
|
-
ownerField: None,
|
|
704
|
-
retiredField: None,
|
|
705
|
-
retiredValues: None,
|
|
706
703
|
namedWhenRetired: false,
|
|
707
|
-
imageSource: None,
|
|
708
704
|
}
|
|
709
705
|
|
|
710
706
|
// The member type of the first row a door answers with, whatever shape it took.
|
|
@@ -414,37 +414,11 @@ globalThis.describe("PgQueryResolver_Lambda.dispatch", () => {
|
|
|
414
414
|
delete: 0,
|
|
415
415
|
deleteBatch: 0
|
|
416
416
|
};
|
|
417
|
-
let
|
|
418
|
-
|
|
419
|
-
let authBinding_indexes = init.indexes;
|
|
420
|
-
let authBinding_subIdField = init.subIdField;
|
|
421
|
-
let authBinding_capability = init.capability;
|
|
422
|
-
let authBinding_labelField = init.labelField;
|
|
423
|
-
let authBinding_includeIdParam = init.includeIdParam;
|
|
424
|
-
let authBinding_authorization = init.authorization;
|
|
425
|
-
let authBinding_ownerField = init.ownerField;
|
|
426
|
-
let authBinding_retiredField = init.retiredField;
|
|
427
|
-
let authBinding_retiredValues = init.retiredValues;
|
|
428
|
-
let authBinding_namedWhenRetired = init.namedWhenRetired;
|
|
429
|
-
let authBinding_imageSource = init.imageSource;
|
|
430
|
-
let authBinding = {
|
|
431
|
-
ops: authOps,
|
|
432
|
-
pushdowns: authBinding_pushdowns,
|
|
433
|
-
indexes: authBinding_indexes,
|
|
434
|
-
subIdField: authBinding_subIdField,
|
|
435
|
-
capability: authBinding_capability,
|
|
436
|
-
labelField: authBinding_labelField,
|
|
437
|
-
includeIdParam: authBinding_includeIdParam,
|
|
438
|
-
authorization: authBinding_authorization,
|
|
439
|
-
ownerField: authBinding_ownerField,
|
|
440
|
-
retiredField: authBinding_retiredField,
|
|
441
|
-
retiredValues: authBinding_retiredValues,
|
|
442
|
-
namedWhenRetired: authBinding_namedWhenRetired,
|
|
443
|
-
imageSource: authBinding_imageSource
|
|
444
|
-
};
|
|
417
|
+
let newrecord = {...makeBinding(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined)};
|
|
418
|
+
newrecord.ops = authOps;
|
|
445
419
|
let lookupAuth = name => {
|
|
446
420
|
if (name === "AuthTable") {
|
|
447
|
-
return
|
|
421
|
+
return newrecord;
|
|
448
422
|
}
|
|
449
423
|
};
|
|
450
424
|
let ident = (username, groups) => ({
|
|
@@ -710,11 +684,7 @@ function geoBinding() {
|
|
|
710
684
|
labelField: "name",
|
|
711
685
|
includeIdParam: true,
|
|
712
686
|
authorization: "AllowAnonymous",
|
|
713
|
-
|
|
714
|
-
retiredField: undefined,
|
|
715
|
-
retiredValues: undefined,
|
|
716
|
-
namedWhenRetired: false,
|
|
717
|
-
imageSource: undefined
|
|
687
|
+
namedWhenRetired: false
|
|
718
688
|
};
|
|
719
689
|
}
|
|
720
690
|
|
|
@@ -34,7 +34,7 @@ describe("Platform_ProvidedGroups.poolFromExports", () => {
|
|
|
34
34
|
("identityProviderId", JSON.Encode.string("p1")),
|
|
35
35
|
("identityProviderRegion", JSON.Encode.string("eu-west-1")),
|
|
36
36
|
]),
|
|
37
|
-
)->toEqual(Some({Platform_ProvidedGroups.id: "p1", region:
|
|
37
|
+
)->toEqual(Some({Platform_ProvidedGroups.id: "p1", region: "eu-west-1"}))
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
testSync("reads them nested under default, as an ESM platform exports them", () =>
|
|
@@ -45,7 +45,7 @@ describe("Platform_ProvidedGroups.poolFromExports", () => {
|
|
|
45
45
|
JSON.Encode.object(Dict.fromArray([("cognitoUserPoolId", JSON.Encode.string("p-old"))])),
|
|
46
46
|
),
|
|
47
47
|
]),
|
|
48
|
-
)->toEqual(Some({Platform_ProvidedGroups.id: "p-old"
|
|
48
|
+
)->toEqual(Some({Platform_ProvidedGroups.id: "p-old"}))
|
|
49
49
|
)
|
|
50
50
|
|
|
51
51
|
testSync("no pool id is no pool to list", () => expect(from([]))->toEqual(None))
|
|
@@ -15,9 +15,7 @@ module Provision = ProvisionAccounts
|
|
|
15
15
|
|
|
16
16
|
describe("ProvisionAccounts.parseArgs", () => {
|
|
17
17
|
testSync("no arguments leaves every choice unanswered", () =>
|
|
18
|
-
expect(Provision.parseArgs([]))->toEqual(
|
|
19
|
-
Ok({Provision.providerId: None, stack: None, file: None, help: false}),
|
|
20
|
-
)
|
|
18
|
+
expect(Provision.parseArgs([]))->toEqual(Ok({Provision.providerId: ?None, help: false}))
|
|
21
19
|
)
|
|
22
20
|
|
|
23
21
|
testSync("a pool and a manifest parse", () =>
|
|
@@ -25,9 +23,8 @@ describe("ProvisionAccounts.parseArgs", () => {
|
|
|
25
23
|
Provision.parseArgs(["--provider-id", "eu-west-1_AbCdEfGhI", "--file", "cast.yaml"]),
|
|
26
24
|
)->toEqual(
|
|
27
25
|
Ok({
|
|
28
|
-
Provision.providerId:
|
|
29
|
-
|
|
30
|
-
file: Some("cast.yaml"),
|
|
26
|
+
Provision.providerId: "eu-west-1_AbCdEfGhI",
|
|
27
|
+
file: "cast.yaml",
|
|
31
28
|
help: false,
|
|
32
29
|
}),
|
|
33
30
|
)
|
|
@@ -35,7 +32,7 @@ describe("ProvisionAccounts.parseArgs", () => {
|
|
|
35
32
|
|
|
36
33
|
testSync("--stack picks the deployment to read the pool id from", () =>
|
|
37
34
|
expect(Provision.parseArgs(["--stack", "beta"]))->toEqual(
|
|
38
|
-
Ok({Provision.providerId: None, stack:
|
|
35
|
+
Ok({Provision.providerId: ?None, stack: "beta", help: false}),
|
|
39
36
|
)
|
|
40
37
|
)
|
|
41
38
|
|
|
@@ -54,9 +51,7 @@ describe("ProvisionAccounts.parseArgs", () => {
|
|
|
54
51
|
)
|
|
55
52
|
|
|
56
53
|
testSync("-h asks for the usage", () =>
|
|
57
|
-
expect(Provision.parseArgs(["-h"]))->toEqual(
|
|
58
|
-
Ok({Provision.providerId: None, stack: None, file: None, help: true}),
|
|
59
|
-
)
|
|
54
|
+
expect(Provision.parseArgs(["-h"]))->toEqual(Ok({Provision.providerId: ?None, help: true}))
|
|
60
55
|
)
|
|
61
56
|
})
|
|
62
57
|
|
|
@@ -13,9 +13,6 @@ globalThis.describe("ProvisionAccounts.parseArgs", () => {
|
|
|
13
13
|
globalThis.expect(ProvisionAccounts$ReventlessAws.parseArgs([])).toEqual({
|
|
14
14
|
TAG: "Ok",
|
|
15
15
|
_0: {
|
|
16
|
-
providerId: undefined,
|
|
17
|
-
stack: undefined,
|
|
18
|
-
file: undefined,
|
|
19
16
|
help: false
|
|
20
17
|
}
|
|
21
18
|
});
|
|
@@ -30,7 +27,6 @@ globalThis.describe("ProvisionAccounts.parseArgs", () => {
|
|
|
30
27
|
TAG: "Ok",
|
|
31
28
|
_0: {
|
|
32
29
|
providerId: "eu-west-1_AbCdEfGhI",
|
|
33
|
-
stack: undefined,
|
|
34
30
|
file: "cast.yaml",
|
|
35
31
|
help: false
|
|
36
32
|
}
|
|
@@ -43,9 +39,7 @@ globalThis.describe("ProvisionAccounts.parseArgs", () => {
|
|
|
43
39
|
])).toEqual({
|
|
44
40
|
TAG: "Ok",
|
|
45
41
|
_0: {
|
|
46
|
-
providerId: undefined,
|
|
47
42
|
stack: "beta",
|
|
48
|
-
file: undefined,
|
|
49
43
|
help: false
|
|
50
44
|
}
|
|
51
45
|
});
|
|
@@ -69,9 +63,6 @@ globalThis.describe("ProvisionAccounts.parseArgs", () => {
|
|
|
69
63
|
globalThis.expect(ProvisionAccounts$ReventlessAws.parseArgs(["-h"])).toEqual({
|
|
70
64
|
TAG: "Ok",
|
|
71
65
|
_0: {
|
|
72
|
-
providerId: undefined,
|
|
73
|
-
stack: undefined,
|
|
74
|
-
file: undefined,
|
|
75
66
|
help: true
|
|
76
67
|
}
|
|
77
68
|
});
|
|
@@ -19,18 +19,15 @@ describe("ProvisionAdmin.parseArgs", () => {
|
|
|
19
19
|
Provision.parseArgs(["--provider-id", "eu-west-1_AbCdEfGhI", "--email", "me@example.com"]),
|
|
20
20
|
)->toEqual(
|
|
21
21
|
Ok({
|
|
22
|
-
Provision.providerId:
|
|
23
|
-
|
|
24
|
-
email: Some("me@example.com"),
|
|
22
|
+
Provision.providerId: "eu-west-1_AbCdEfGhI",
|
|
23
|
+
email: "me@example.com",
|
|
25
24
|
help: false,
|
|
26
25
|
}),
|
|
27
26
|
)
|
|
28
27
|
)
|
|
29
28
|
|
|
30
29
|
testSync("no arguments leaves both unanswered", () =>
|
|
31
|
-
expect(Provision.parseArgs([]))->toEqual(
|
|
32
|
-
Ok({Provision.providerId: None, stack: None, email: None, help: false}),
|
|
33
|
-
)
|
|
30
|
+
expect(Provision.parseArgs([]))->toEqual(Ok({Provision.providerId: ?None, help: false}))
|
|
34
31
|
)
|
|
35
32
|
|
|
36
33
|
// The reason unknown flags refuse rather than being skipped: a typo'd
|
|
@@ -48,8 +45,6 @@ describe("ProvisionAdmin.parseArgs", () => {
|
|
|
48
45
|
)
|
|
49
46
|
|
|
50
47
|
testSync("-h asks for the usage", () =>
|
|
51
|
-
expect(Provision.parseArgs(["-h"]))->toEqual(
|
|
52
|
-
Ok({Provision.providerId: None, stack: None, email: None, help: true}),
|
|
53
|
-
)
|
|
48
|
+
expect(Provision.parseArgs(["-h"]))->toEqual(Ok({Provision.providerId: ?None, help: true}))
|
|
54
49
|
)
|
|
55
50
|
})
|
|
@@ -13,7 +13,6 @@ globalThis.describe("ProvisionAdmin.parseArgs", () => {
|
|
|
13
13
|
TAG: "Ok",
|
|
14
14
|
_0: {
|
|
15
15
|
providerId: "eu-west-1_AbCdEfGhI",
|
|
16
|
-
stack: undefined,
|
|
17
16
|
email: "me@example.com",
|
|
18
17
|
help: false
|
|
19
18
|
}
|
|
@@ -23,9 +22,6 @@ globalThis.describe("ProvisionAdmin.parseArgs", () => {
|
|
|
23
22
|
globalThis.expect(ProvisionAdmin$ReventlessAws.parseArgs([])).toEqual({
|
|
24
23
|
TAG: "Ok",
|
|
25
24
|
_0: {
|
|
26
|
-
providerId: undefined,
|
|
27
|
-
stack: undefined,
|
|
28
|
-
email: undefined,
|
|
29
25
|
help: false
|
|
30
26
|
}
|
|
31
27
|
});
|
|
@@ -49,9 +45,6 @@ globalThis.describe("ProvisionAdmin.parseArgs", () => {
|
|
|
49
45
|
globalThis.expect(ProvisionAdmin$ReventlessAws.parseArgs(["-h"])).toEqual({
|
|
50
46
|
TAG: "Ok",
|
|
51
47
|
_0: {
|
|
52
|
-
providerId: undefined,
|
|
53
|
-
stack: undefined,
|
|
54
|
-
email: undefined,
|
|
55
48
|
help: true
|
|
56
49
|
}
|
|
57
50
|
});
|
|
@@ -15,7 +15,6 @@ describe("ProvisionIdentity.parseArgs", () => {
|
|
|
15
15
|
expect(Provision.parseArgs([]))->toEqual(
|
|
16
16
|
Ok({
|
|
17
17
|
Provision.poolName: Provision.defaultPoolName,
|
|
18
|
-
providerId: None,
|
|
19
18
|
loginIdentifier: Auth_LoginIdentifier.Email,
|
|
20
19
|
signUpMode: Auth_SignUpMode.AdminOnly,
|
|
21
20
|
help: false,
|
|
@@ -27,7 +26,7 @@ describe("ProvisionIdentity.parseArgs", () => {
|
|
|
27
26
|
expect(Provision.parseArgs(["--provider-id", "eu-west-1_AbCdEfGhI"]))->toEqual(
|
|
28
27
|
Ok({
|
|
29
28
|
Provision.poolName: Provision.defaultPoolName,
|
|
30
|
-
providerId:
|
|
29
|
+
providerId: "eu-west-1_AbCdEfGhI",
|
|
31
30
|
loginIdentifier: Auth_LoginIdentifier.Email,
|
|
32
31
|
signUpMode: Auth_SignUpMode.AdminOnly,
|
|
33
32
|
help: false,
|
|
@@ -39,7 +38,6 @@ describe("ProvisionIdentity.parseArgs", () => {
|
|
|
39
38
|
expect(Provision.parseArgs(["--name", "examples-dev"]))->toEqual(
|
|
40
39
|
Ok({
|
|
41
40
|
Provision.poolName: "examples-dev",
|
|
42
|
-
providerId: None,
|
|
43
41
|
loginIdentifier: Auth_LoginIdentifier.Email,
|
|
44
42
|
signUpMode: Auth_SignUpMode.AdminOnly,
|
|
45
43
|
help: false,
|
|
@@ -51,7 +49,7 @@ describe("ProvisionIdentity.parseArgs", () => {
|
|
|
51
49
|
expect(Provision.parseArgs(["--name", "ignored", "--provider-id", "eu-west-1_x"]))->toEqual(
|
|
52
50
|
Ok({
|
|
53
51
|
Provision.poolName: "ignored",
|
|
54
|
-
providerId:
|
|
52
|
+
providerId: "eu-west-1_x",
|
|
55
53
|
loginIdentifier: Auth_LoginIdentifier.Email,
|
|
56
54
|
signUpMode: Auth_SignUpMode.AdminOnly,
|
|
57
55
|
help: false,
|
|
@@ -12,7 +12,6 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
12
12
|
TAG: "Ok",
|
|
13
13
|
_0: {
|
|
14
14
|
poolName: ProvisionIdentity$ReventlessAws.defaultPoolName,
|
|
15
|
-
providerId: undefined,
|
|
16
15
|
loginIdentifier: "Email",
|
|
17
16
|
signUpMode: "AdminOnly",
|
|
18
17
|
help: false
|
|
@@ -42,7 +41,6 @@ globalThis.describe("ProvisionIdentity.parseArgs", () => {
|
|
|
42
41
|
TAG: "Ok",
|
|
43
42
|
_0: {
|
|
44
43
|
poolName: "examples-dev",
|
|
45
|
-
providerId: undefined,
|
|
46
44
|
loginIdentifier: "Email",
|
|
47
45
|
signUpMode: "AdminOnly",
|
|
48
46
|
help: false
|
|
@@ -71,8 +71,8 @@ describe("SideEffectEntryPoint_Ops.makeRegisteredHandler", () => {
|
|
|
71
71
|
let entry: SideEffectEntryPoint_Ops.handlerEntry = {
|
|
72
72
|
sourceUrn: "arn:stream-1",
|
|
73
73
|
sideEffectModules: [],
|
|
74
|
-
comp:
|
|
75
|
-
plugin:
|
|
74
|
+
comp: "SideEffectHandler(Mailer)",
|
|
75
|
+
plugin: "Ordering",
|
|
76
76
|
}
|
|
77
77
|
let registered = SideEffectEntryPoint_Ops.makeRegisteredHandler(
|
|
78
78
|
entry,
|
|
@@ -230,7 +230,7 @@ describe("Util_ShellConfig.fields — journeys", () => {
|
|
|
230
230
|
// went missing shows as a badge rather than as nothing.
|
|
231
231
|
describe("Util_ShellConfig.fields — environment", () => {
|
|
232
232
|
testSync("the name and the purpose follow the computed keys", () => {
|
|
233
|
-
let out = Util_ShellConfig.fields(~computed, ~environment={name: "test", purpose:
|
|
233
|
+
let out = Util_ShellConfig.fields(~computed, ~environment={name: "test", purpose: "test"})
|
|
234
234
|
expect(out->Dict.keysToArray)->toEqual([
|
|
235
235
|
"apiEndpoint",
|
|
236
236
|
"region",
|
|
@@ -244,7 +244,7 @@ describe("Util_ShellConfig.fields — environment", () => {
|
|
|
244
244
|
})
|
|
245
245
|
|
|
246
246
|
testSync("an unknown purpose leaves its key out", () => {
|
|
247
|
-
let out = Util_ShellConfig.fields(~computed, ~environment={name: "alpha"
|
|
247
|
+
let out = Util_ShellConfig.fields(~computed, ~environment={name: "alpha"})
|
|
248
248
|
expect(out->Dict.get("environmentPurpose")->Option.isNone)->toBe(true)
|
|
249
249
|
})
|
|
250
250
|
|
|
@@ -252,7 +252,7 @@ describe("Util_ShellConfig.fields — environment", () => {
|
|
|
252
252
|
let failure = try {
|
|
253
253
|
let _ = Util_ShellConfig.fields(
|
|
254
254
|
~computed,
|
|
255
|
-
~environment={name: "prod", purpose:
|
|
255
|
+
~environment={name: "prod", purpose: "production"},
|
|
256
256
|
~shellConfig=Dict.fromArray([("environment", JSON.Encode.string("staging"))]),
|
|
257
257
|
)
|
|
258
258
|
None
|
|
@@ -269,8 +269,7 @@ globalThis.describe("Util_ShellConfig.fields — environment", () => {
|
|
|
269
269
|
});
|
|
270
270
|
globalThis.test("an unknown purpose leaves its key out", () => {
|
|
271
271
|
let out = Util_ShellConfig$ReventlessAws.fields(computed, {
|
|
272
|
-
name: "alpha"
|
|
273
|
-
purpose: undefined
|
|
272
|
+
name: "alpha"
|
|
274
273
|
}, undefined, undefined, undefined, undefined);
|
|
275
274
|
globalThis.expect(Stdlib_Option.isNone(out["environmentPurpose"])).toBe(true);
|
|
276
275
|
});
|