@quadnix/octo-build 0.1.0 → 0.2.0
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/README.md +108 -21
- package/dist/commands/apply/apply.command.js +32 -38
- package/dist/commands/apply/apply.command.js.map +1 -1
- package/dist/commands/commit/commit.command.d.ts +4 -3
- package/dist/commands/commit/commit.command.js +31 -44
- package/dist/commands/commit/commit.command.js.map +1 -1
- package/dist/commands/create-app/generator-octo-app-template/generators/app/index.js +15 -6
- package/dist/commands/create-app/generator-octo-app-template/generators/app/index.js.map +1 -1
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/README.md.ejs +25 -16
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/gitignore.ejs +3 -2
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/src/aws-dynamodb-service/octo.yaml.ejs +1 -1
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/src/aws-ecs-server/octo.yaml.ejs +14 -16
- package/dist/commands/create-app/generator-octo-app-template/generators/app/templates/src/aws-s3-website/octo.yaml.ejs +11 -3
- package/dist/commands/create-model/generator-octo-model-template/generators/app/templates/models/model/model.ts.ejs +38 -0
- package/dist/commands/generate/generate.command.d.ts +3 -1
- package/dist/commands/generate/generate.command.js +12 -12
- package/dist/commands/generate/generate.command.js.map +1 -1
- package/dist/commands/get-response/get-response.command.js +3 -3
- package/dist/commands/get-response/get-response.command.js.map +1 -1
- package/dist/commands/lock/lock.command.d.ts +8 -3
- package/dist/commands/lock/lock.command.js +16 -13
- package/dist/commands/lock/lock.command.js.map +1 -1
- package/dist/commands/run-action/run-action.command.js +4 -10
- package/dist/commands/run-action/run-action.command.js.map +1 -1
- package/dist/commands/unlock/unlock.command.d.ts +5 -5
- package/dist/commands/unlock/unlock.command.js +15 -31
- package/dist/commands/unlock/unlock.command.js.map +1 -1
- package/dist/commands/validate/validate.command.d.ts +1 -1
- package/dist/commands/validate/validate.command.js +9 -15
- package/dist/commands/validate/validate.command.js.map +1 -1
- package/dist/resources/octo-v1.schema.json +25 -11
- package/dist/utilities/definition/yaml/yaml-definition.utility.d.ts +15 -13
- package/dist/utilities/definition/yaml/yaml-definition.utility.js +38 -22
- package/dist/utilities/definition/yaml/yaml-definition.utility.js.map +1 -1
- package/dist/utilities/octo/octo.utility.d.ts +62 -45
- package/dist/utilities/octo/octo.utility.js +162 -128
- package/dist/utilities/octo/octo.utility.js.map +1 -1
- package/package.json +5 -3
|
@@ -23,7 +23,7 @@ terraform:
|
|
|
23
23
|
|
|
24
24
|
settings:
|
|
25
25
|
listeners:
|
|
26
|
-
- type:
|
|
26
|
+
- type: JournalEventListener
|
|
27
27
|
- type: LoggingEventListener
|
|
28
28
|
|
|
29
29
|
stateProvider:
|
|
@@ -35,16 +35,16 @@ imports:
|
|
|
35
35
|
importPath: "@quadnix/octo-aws-cdk/modules/app/simple-app"
|
|
36
36
|
- className: AwsIniAccountModule
|
|
37
37
|
importPath: "@quadnix/octo-aws-cdk/modules/account/aws-ini-account"
|
|
38
|
-
- className:
|
|
39
|
-
importPath: "@quadnix/octo-aws-cdk/modules/deployment/aws-
|
|
38
|
+
- className: AwsDeploymentModule
|
|
39
|
+
importPath: "@quadnix/octo-aws-cdk/modules/deployment/aws-deployment"
|
|
40
40
|
- className: AwsEcsEnvironmentModule
|
|
41
41
|
importPath: "@quadnix/octo-aws-cdk/modules/environment/aws-ecs-environment"
|
|
42
42
|
- className: AwsEcsExecutionModule
|
|
43
43
|
importPath: "@quadnix/octo-aws-cdk/modules/execution/aws-ecs-execution"
|
|
44
44
|
- className: AwsMultiAzRegionModule
|
|
45
45
|
importPath: "@quadnix/octo-aws-cdk/modules/region/aws-multi-az-region"
|
|
46
|
-
- className:
|
|
47
|
-
importPath: "@quadnix/octo-aws-cdk/modules/server/aws-
|
|
46
|
+
- className: AwsServerModule
|
|
47
|
+
importPath: "@quadnix/octo-aws-cdk/modules/server/aws-server"
|
|
48
48
|
- className: AwsEcsAlbServiceModule
|
|
49
49
|
importPath: "@quadnix/octo-aws-cdk/modules/service/aws-ecs-alb-service"
|
|
50
50
|
- className: AwsSimpleSubnetModule
|
|
@@ -73,24 +73,22 @@ modules:
|
|
|
73
73
|
vpcCidrBlock: 10.0.0.0/16
|
|
74
74
|
|
|
75
75
|
- moduleId: backend-server-module
|
|
76
|
-
moduleClass:
|
|
76
|
+
moduleClass: AwsServerModule
|
|
77
77
|
moduleInputs:
|
|
78
78
|
account: "${{account-module.model.account}}"
|
|
79
79
|
serverKey: backend
|
|
80
80
|
|
|
81
81
|
- moduleId: backend-deployment-v1-module
|
|
82
|
-
moduleClass:
|
|
82
|
+
moduleClass: AwsDeploymentModule
|
|
83
83
|
moduleInputs:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
image:
|
|
87
|
-
command: node webserver
|
|
88
|
-
ports:
|
|
89
|
-
- containerPort: 80
|
|
90
|
-
protocol: tcp
|
|
91
|
-
uri: docker.io/ealen/echo-server:0.9.2
|
|
92
|
-
memory: 512
|
|
84
|
+
command: [node, webserver]
|
|
85
|
+
cpu: 256
|
|
93
86
|
deploymentTag: v1
|
|
87
|
+
imageUri: docker.io/ealen/echo-server:0.9.2
|
|
88
|
+
memory: 512
|
|
89
|
+
ports:
|
|
90
|
+
- containerPort: 80
|
|
91
|
+
protocol: tcp
|
|
94
92
|
server: "${{backend-server-module.model.server}}"
|
|
95
93
|
|
|
96
94
|
- moduleId: qa-environment-module
|
|
@@ -26,7 +26,7 @@ terraform:
|
|
|
26
26
|
|
|
27
27
|
settings:
|
|
28
28
|
listeners:
|
|
29
|
-
- type:
|
|
29
|
+
- type: JournalEventListener
|
|
30
30
|
- type: LoggingEventListener
|
|
31
31
|
|
|
32
32
|
stateProvider:
|
|
@@ -38,6 +38,8 @@ imports:
|
|
|
38
38
|
importPath: "@quadnix/octo-aws-cdk/modules/app/simple-app"
|
|
39
39
|
- className: AwsIniAccountModule
|
|
40
40
|
importPath: "@quadnix/octo-aws-cdk/modules/account/aws-ini-account"
|
|
41
|
+
- className: AwsServerlessRegionModule
|
|
42
|
+
importPath: "@quadnix/octo-aws-cdk/modules/region/aws-serverless-region"
|
|
41
43
|
- className: AwsS3StaticWebsiteServiceModule
|
|
42
44
|
importPath: "@quadnix/octo-aws-cdk/modules/service/aws-s3-static-website-service"
|
|
43
45
|
|
|
@@ -53,10 +55,16 @@ modules:
|
|
|
53
55
|
accountId: "${env.AWS_ACCOUNT_ID}"
|
|
54
56
|
app: "${{app-module.model.app}}"
|
|
55
57
|
|
|
58
|
+
- moduleId: region-module
|
|
59
|
+
moduleClass: AwsServerlessRegionModule
|
|
60
|
+
moduleInputs:
|
|
61
|
+
account: "${{account-module.model.account}}"
|
|
62
|
+
name: aws-s3-website
|
|
63
|
+
regionId: aws-us-east-1
|
|
64
|
+
|
|
56
65
|
- moduleId: s3-website-service-module
|
|
57
66
|
moduleClass: AwsS3StaticWebsiteServiceModule
|
|
58
67
|
moduleInputs:
|
|
59
|
-
account: "${{account-module.model.account}}"
|
|
60
|
-
awsRegionId: us-east-1
|
|
61
68
|
bucketName: "${env.AWS_S3_WEBSITE_BUCKET_NAME}"
|
|
62
69
|
directoryPath: website
|
|
70
|
+
region: "${{region-module.model.region}}"
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
<%# A service is built with its parents, type and label, and carries them through synth() and unSynth(). -%>
|
|
2
|
+
<% if (modelType === 'service') { -%>
|
|
3
|
+
import { type AModel, Model, Service, ServiceType } from '@quadnix/octo';
|
|
4
|
+
import { <%= moduleNamePascal %>Schema } from './<%= moduleName %>.schema.js';
|
|
5
|
+
|
|
6
|
+
@Model<<%= moduleNamePascal %>>('<%= packageName %>', 'service', <%= moduleNamePascal %>Schema)
|
|
7
|
+
export class <%= moduleNamePascal %> extends Service {
|
|
8
|
+
// Fix me: Add properties specific to your module.
|
|
9
|
+
private readonly customProperty: string;
|
|
10
|
+
|
|
11
|
+
// Fix me: Update constructor to take properties as inputs.
|
|
12
|
+
constructor(customProperty: string, parents: AModel<any, any>[]) {
|
|
13
|
+
// Fix me: Initialize model with the correct ID, the nodes it sits under, its type and its label.
|
|
14
|
+
super(customProperty, parents, ServiceType.OTHER, '<%= moduleName %>');
|
|
15
|
+
|
|
16
|
+
// Fix me: Initialize module-specific properties.
|
|
17
|
+
this.customProperty = customProperty;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
override synth(): <%= moduleNamePascal %>Schema {
|
|
21
|
+
// Fix me: Return serialized schema.
|
|
22
|
+
return {
|
|
23
|
+
...super.synth(),
|
|
24
|
+
customProperty: this.customProperty,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static override async unSynth(
|
|
29
|
+
service: <%= moduleNamePascal %>Schema,
|
|
30
|
+
deReferenceContext: (context: string) => Promise<AModel<any, any>>,
|
|
31
|
+
): Promise<<%= moduleNamePascal %>> {
|
|
32
|
+
// Fix me: Return unserialized instance of <%= moduleNamePascal %>.
|
|
33
|
+
const parents = await Promise.all(service.parents.map((p) => deReferenceContext(p.context)));
|
|
34
|
+
return new <%= moduleNamePascal %>(service.customProperty, parents);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
<% } else { -%>
|
|
1
38
|
<%# Sorted for the same reason as the schema's imports: `App` sorts before `Model`, `Service` after. -%>
|
|
2
39
|
<% const modelImports = ['Model', modelTypePascal].sort().join(', '); -%>
|
|
3
40
|
import { <%= modelImports %> } from '@quadnix/octo';
|
|
@@ -29,3 +66,4 @@ export class <%= moduleNamePascal %> extends <%= modelTypePascal %> {
|
|
|
29
66
|
return new <%= moduleNamePascal %>(<%= modelType %>.customProperty);
|
|
30
67
|
}
|
|
31
68
|
}
|
|
69
|
+
<% } -%>
|
|
@@ -3,7 +3,9 @@ type GenerateCommandArguments = {
|
|
|
3
3
|
outputDir: string;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
|
-
* Step 1 of the octo lifecycle. See
|
|
6
|
+
* Step 1 of the octo lifecycle. See `Octo.generate()`.
|
|
7
|
+
*
|
|
8
|
+
* The state is refreshed before octo boots, because booting is what reads it.
|
|
7
9
|
*/
|
|
8
10
|
export declare const generateCommand: {
|
|
9
11
|
builder: (yargs: Argv) => Argv;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { resolve } from 'path';
|
|
2
|
-
import {
|
|
2
|
+
import { Container, StateManagementService } from '@quadnix/octo';
|
|
3
|
+
import { OctoUtility } from '../../utilities/octo/octo.utility.js';
|
|
3
4
|
/**
|
|
4
|
-
* Step 1 of the octo lifecycle. See
|
|
5
|
+
* Step 1 of the octo lifecycle. See `Octo.generate()`.
|
|
6
|
+
*
|
|
7
|
+
* The state is refreshed before octo boots, because booting is what reads it.
|
|
5
8
|
*/
|
|
6
9
|
export const generateCommand = {
|
|
7
10
|
builder: (yargs) => {
|
|
@@ -17,19 +20,16 @@ export const generateCommand = {
|
|
|
17
20
|
describe: 'Step 1: generate Terragrunt module folders representing the full desired infrastructure.',
|
|
18
21
|
handler: async (argv) => {
|
|
19
22
|
const { outputDir } = argv;
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
await OctoUtility.runCommand('generate', async () => {
|
|
24
|
+
await OctoUtility.bootStateProvider();
|
|
25
|
+
await (await Container.getInstance().get(StateManagementService)).refreshState();
|
|
26
|
+
const { app, octo } = await OctoUtility.bootOcto();
|
|
22
27
|
const resolvedOutputDir = resolve(process.cwd(), outputDir);
|
|
23
28
|
await octo.generate(app, { outputDir: resolvedOutputDir });
|
|
24
29
|
// Nothing is printed here. The listeners report what was written and that the mode finished,
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
catch (error) {
|
|
30
|
-
reportError(error);
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
30
|
+
// on stderr, and failures reach stderr via `reportError`. Generate has no output of its own, so
|
|
31
|
+
// stdout stays empty.
|
|
32
|
+
});
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
//# sourceMappingURL=generate.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.command.js","sourceRoot":"","sources":["../../../src/commands/generate/generate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.command.js","sourceRoot":"","sources":["../../../src/commands/generate/generate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMnE;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;YAC/B,KAAK,EAAE,GAAG;YACV,YAAY,EAAE,IAAI;YAClB,WAAW,EACT,2GAA2G;gBAC3G,2FAA2F;YAC7F,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,0FAA0F;IACpG,OAAO,EAAE,KAAK,EAAE,IAAkD,EAAiB,EAAE;QACnF,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;QAE3B,MAAM,WAAW,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE;YAClD,MAAM,WAAW,CAAC,iBAAiB,EAAE,CAAC;YACtC,MAAM,CAAC,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC;YAEjF,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YAEnD,MAAM,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,CAAC,CAAC;YAC5D,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;YAE3D,6FAA6F;YAC7F,gGAAgG;YAChG,sBAAsB;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Container, StateManagementService } from '@quadnix/octo';
|
|
2
|
-
import {
|
|
2
|
+
import { OctoUtility } from '../../utilities/octo/octo.utility.js';
|
|
3
3
|
/**
|
|
4
4
|
* Prints a resource's recorded response as JSON.
|
|
5
5
|
*
|
|
@@ -20,7 +20,7 @@ export const getResponseCommand = {
|
|
|
20
20
|
handler: async (argv) => {
|
|
21
21
|
const { resourceId } = argv;
|
|
22
22
|
try {
|
|
23
|
-
await bootStateProvider();
|
|
23
|
+
await OctoUtility.bootStateProvider();
|
|
24
24
|
const stateManagementService = await Container.getInstance().get(StateManagementService);
|
|
25
25
|
const response = await stateManagementService.getResourceResponse(resourceId);
|
|
26
26
|
if (!response) {
|
|
@@ -31,7 +31,7 @@ export const getResponseCommand = {
|
|
|
31
31
|
process.stdout.write(JSON.stringify(response));
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
|
-
reportError(error);
|
|
34
|
+
OctoUtility.reportError(error);
|
|
35
35
|
process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-response.command.js","sourceRoot":"","sources":["../../../src/commands/get-response/get-response.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAElE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-response.command.js","sourceRoot":"","sources":["../../../src/commands/get-response/get-response.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE;YAChC,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,sFAAsF;IAChG,OAAO,EAAE,KAAK,EAAE,IAAqD,EAAiB,EAAE;QACtF,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC;YACH,MAAM,WAAW,CAAC,iBAAiB,EAAE,CAAC;YACtC,MAAM,sBAAsB,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YAEzF,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;YAC9E,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,MAAM,IAAI,KAAK,CACb,sCAAsC,UAAU,KAAK;oBACnD,yFAAyF,CAC5F,CAAC;YACJ,CAAC;YAED,qFAAqF;YACrF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { Argv } from 'yargs';
|
|
1
|
+
import type { ArgumentsCamelCase, Argv } from 'yargs';
|
|
2
|
+
type LockCommandArguments = {
|
|
3
|
+
lockId?: string;
|
|
4
|
+
};
|
|
2
5
|
/**
|
|
3
|
-
* Takes the app lock, which `apply` and `commit` both require.
|
|
6
|
+
* Takes the app lock, which `apply` and `commit` both require. With `--lockId`, resumes the run
|
|
7
|
+
* already holding that lock, which is how a run that died is finished.
|
|
4
8
|
*
|
|
5
9
|
* The lock id is the only thing printed on stdout, so a shell can capture it:
|
|
6
10
|
* `LOCK_ID=$(octo lock)`. Everything else goes to stderr.
|
|
@@ -9,5 +13,6 @@ export declare const lockCommand: {
|
|
|
9
13
|
builder: (yargs: Argv) => Argv;
|
|
10
14
|
command: string;
|
|
11
15
|
describe: string;
|
|
12
|
-
handler: () => Promise<void>;
|
|
16
|
+
handler: (argv: ArgumentsCamelCase<LockCommandArguments>) => Promise<void>;
|
|
13
17
|
};
|
|
18
|
+
export {};
|
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { Container, StateManagementService } from '@quadnix/octo';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import {
|
|
3
|
+
import { OctoUtility } from '../../utilities/octo/octo.utility.js';
|
|
4
4
|
/**
|
|
5
|
-
* Takes the app lock, which `apply` and `commit` both require.
|
|
5
|
+
* Takes the app lock, which `apply` and `commit` both require. With `--lockId`, resumes the run
|
|
6
|
+
* already holding that lock, which is how a run that died is finished.
|
|
6
7
|
*
|
|
7
8
|
* The lock id is the only thing printed on stdout, so a shell can capture it:
|
|
8
9
|
* `LOCK_ID=$(octo lock)`. Everything else goes to stderr.
|
|
9
10
|
*/
|
|
10
11
|
export const lockCommand = {
|
|
11
|
-
builder: (yargs) =>
|
|
12
|
+
builder: (yargs) => {
|
|
13
|
+
return yargs.option('lockId', {
|
|
14
|
+
demandOption: false,
|
|
15
|
+
description: 'Resume the run holding this lock ID instead of taking a new lock. Stop that run first.',
|
|
16
|
+
type: 'string',
|
|
17
|
+
});
|
|
18
|
+
},
|
|
12
19
|
command: 'lock',
|
|
13
20
|
describe: 'Take the app state lock, printing its ID. Required before apply and commit.',
|
|
14
|
-
handler: async () => {
|
|
15
|
-
|
|
16
|
-
await bootStateProvider();
|
|
21
|
+
handler: async (argv) => {
|
|
22
|
+
await OctoUtility.runCommand('lock', async () => {
|
|
23
|
+
await OctoUtility.bootStateProvider();
|
|
17
24
|
const stateManagementService = await Container.getInstance().get(StateManagementService);
|
|
18
|
-
const { lockId } = await stateManagementService.lockApp();
|
|
19
|
-
console.error(chalk.green('App is locked.'));
|
|
25
|
+
const { lockId } = await stateManagementService.lockApp(argv.lockId);
|
|
26
|
+
console.error(chalk.green(argv.lockId ? 'App lock is resumed.' : 'App is locked.'));
|
|
20
27
|
console.log(lockId);
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
reportError(error);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
28
|
+
});
|
|
26
29
|
},
|
|
27
30
|
};
|
|
28
31
|
//# sourceMappingURL=lock.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lock.command.js","sourceRoot":"","sources":["../../../src/commands/lock/lock.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"lock.command.js","sourceRoot":"","sources":["../../../src/commands/lock/lock.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC5B,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,wFAAwF;YACrG,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,6EAA6E;IACvF,OAAO,EAAE,KAAK,EAAE,IAA8C,EAAiB,EAAE;QAC/E,MAAM,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE;YAC9C,MAAM,WAAW,CAAC,iBAAiB,EAAE,CAAC;YACtC,MAAM,sBAAsB,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YAEzF,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAErE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACpF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OctoUtility } from '../../utilities/octo/octo.utility.js';
|
|
2
2
|
export const runActionCommand = {
|
|
3
3
|
builder: (yargs) => {
|
|
4
4
|
return yargs
|
|
@@ -18,7 +18,7 @@ export const runActionCommand = {
|
|
|
18
18
|
describe: 'Run a single resource action. Invoked by Terraform mid-apply for an external resource.',
|
|
19
19
|
handler: async (argv) => {
|
|
20
20
|
const { input, resourceId } = argv;
|
|
21
|
-
|
|
21
|
+
await OctoUtility.runCommand('run-action', async () => {
|
|
22
22
|
const inputs = {};
|
|
23
23
|
for (const entry of input ?? []) {
|
|
24
24
|
const separatorIndex = entry.indexOf('=');
|
|
@@ -27,20 +27,14 @@ export const runActionCommand = {
|
|
|
27
27
|
}
|
|
28
28
|
inputs[entry.slice(0, separatorIndex)] = entry.slice(separatorIndex + 1);
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
// boot output and route this command's own diagnostics to stderr.
|
|
32
|
-
const { app, octo } = await bootOcto({ quietStdout: true });
|
|
30
|
+
const { app, octo } = await OctoUtility.bootOcto();
|
|
33
31
|
const result = await octo.runAction(app, {
|
|
34
32
|
inputs,
|
|
35
33
|
resourceId,
|
|
36
34
|
});
|
|
37
35
|
// stdout carries ONLY the response JSON — terraform's `data "external"` consumes it.
|
|
38
36
|
process.stdout.write(JSON.stringify(result.response));
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
reportError(error);
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
37
|
+
});
|
|
44
38
|
},
|
|
45
39
|
};
|
|
46
40
|
//# sourceMappingURL=run-action.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-action.command.js","sourceRoot":"","sources":["../../../src/commands/run-action/run-action.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"run-action.command.js","sourceRoot":"","sources":["../../../src/commands/run-action/run-action.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAOnE,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK;aACT,MAAM,CAAC,YAAY,EAAE;YACpB,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,iDAAiD;YAC9D,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,OAAO,EAAE;YACf,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,iFAAiF;YAC9F,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,YAAY;IACrB,QAAQ,EAAE,wFAAwF;IAClG,OAAO,EAAE,KAAK,EAAE,IAAmD,EAAiB,EAAE;QACpF,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAEnC,MAAM,WAAW,CAAC,UAAU,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,MAAM,GAA2B,EAAE,CAAC;YAC1C,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;gBAChC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC1C,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CAAC,oBAAoB,KAAK,uDAAuD,CAAC,CAAC;gBACpG,CAAC;gBACD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;YAC3E,CAAC;YAED,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YAEnD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE;gBACvC,MAAM;gBACN,UAAU;aACX,CAAC,CAAC;YAEH,qFAAqF;YACrF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ArgumentsCamelCase, Argv } from 'yargs';
|
|
2
2
|
type UnlockCommandArguments = {
|
|
3
|
-
|
|
4
|
-
lockId?: string;
|
|
3
|
+
lockId: string;
|
|
5
4
|
};
|
|
6
5
|
/**
|
|
7
|
-
*
|
|
6
|
+
* Finishes a run as it stands and releases its lock.
|
|
8
7
|
*
|
|
9
|
-
* A
|
|
10
|
-
*
|
|
8
|
+
* A successful `commit` releases its own lock, so this is for a run that will not reach one - a run
|
|
9
|
+
* that never applied, or one somebody finished by hand. With a remote state provider, releasing
|
|
10
|
+
* seals what the run wrote.
|
|
11
11
|
*/
|
|
12
12
|
export declare const unlockCommand: {
|
|
13
13
|
builder: (yargs: Argv) => Argv;
|
|
@@ -1,51 +1,35 @@
|
|
|
1
1
|
import { Container, StateManagementService } from '@quadnix/octo';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import {
|
|
3
|
+
import { OctoUtility } from '../../utilities/octo/octo.utility.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Finishes a run as it stands and releases its lock.
|
|
6
6
|
*
|
|
7
|
-
* A
|
|
8
|
-
*
|
|
7
|
+
* A successful `commit` releases its own lock, so this is for a run that will not reach one - a run
|
|
8
|
+
* that never applied, or one somebody finished by hand. With a remote state provider, releasing
|
|
9
|
+
* seals what the run wrote.
|
|
9
10
|
*/
|
|
10
11
|
export const unlockCommand = {
|
|
11
12
|
builder: (yargs) => {
|
|
12
|
-
return yargs
|
|
13
|
-
|
|
14
|
-
demandOption: false,
|
|
13
|
+
return yargs.option('lockId', {
|
|
14
|
+
demandOption: true,
|
|
15
15
|
description: 'The lock ID to release, as printed by `octo lock`.',
|
|
16
16
|
type: 'string',
|
|
17
|
-
})
|
|
18
|
-
.option('force', {
|
|
19
|
-
default: false,
|
|
20
|
-
demandOption: false,
|
|
21
|
-
description: 'Release whatever lock is held, without knowing its ID. For a run that died holding one.',
|
|
22
|
-
type: 'boolean',
|
|
23
17
|
});
|
|
24
18
|
},
|
|
25
19
|
command: 'unlock',
|
|
26
|
-
describe: '
|
|
20
|
+
describe: 'Finish a run as it stands, releasing its app state lock.',
|
|
27
21
|
handler: async (argv) => {
|
|
28
|
-
const {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
throw new Error('Either --lockId or --force is required to unlock!');
|
|
32
|
-
}
|
|
33
|
-
await bootStateProvider();
|
|
22
|
+
const { lockId } = argv;
|
|
23
|
+
await OctoUtility.runCommand('unlock', async () => {
|
|
24
|
+
await OctoUtility.bootStateProvider();
|
|
34
25
|
const stateManagementService = await Container.getInstance().get(StateManagementService);
|
|
35
|
-
|
|
36
|
-
// lost with the run that took it.
|
|
37
|
-
const existingLockId = await stateManagementService.getAppLock();
|
|
38
|
-
if (!existingLockId) {
|
|
26
|
+
if (!(await stateManagementService.getAppLock())) {
|
|
39
27
|
console.error(chalk.green('App is already unlocked.'));
|
|
40
28
|
return;
|
|
41
29
|
}
|
|
42
|
-
await stateManagementService.unlockApp(
|
|
43
|
-
console.error(chalk.green(`App was unlocked, releasing lock ID "${
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
reportError(error);
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
30
|
+
await stateManagementService.unlockApp(lockId);
|
|
31
|
+
console.error(chalk.green(`App was unlocked, releasing lock ID "${lockId}".`));
|
|
32
|
+
});
|
|
49
33
|
},
|
|
50
34
|
};
|
|
51
35
|
//# sourceMappingURL=unlock.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unlock.command.js","sourceRoot":"","sources":["../../../src/commands/unlock/unlock.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"unlock.command.js","sourceRoot":"","sources":["../../../src/commands/unlock/unlock.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC5B,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,0DAA0D;IACpE,OAAO,EAAE,KAAK,EAAE,IAAgD,EAAiB,EAAE;QACjF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAExB,MAAM,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;YAChD,MAAM,WAAW,CAAC,iBAAiB,EAAE,CAAC;YACtC,MAAM,sBAAsB,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YAEzF,IAAI,CAAC,CAAC,MAAM,sBAAsB,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC;gBACjD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBACvD,OAAO;YACT,CAAC;YAED,MAAM,sBAAsB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,wCAAwC,MAAM,IAAI,CAAC,CAAC,CAAC;QACjF,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -6,7 +6,7 @@ type ValidateCommandArguments = {
|
|
|
6
6
|
timeoutInMs?: number;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
|
-
* Step 2 of the octo lifecycle. See
|
|
9
|
+
* Step 2 of the octo lifecycle. See `Octo.validate()`.
|
|
10
10
|
*/
|
|
11
11
|
export declare const validateCommand: {
|
|
12
12
|
builder: (yargs: Argv) => Argv;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { resolve } from 'path';
|
|
2
2
|
import { Container, TerraformUtility } from '@quadnix/octo';
|
|
3
|
-
import
|
|
4
|
-
import { bootOcto, prepareCallbackEnvironment, reportError } from '../../utilities/octo/octo.utility.js';
|
|
3
|
+
import { OctoUtility } from '../../utilities/octo/octo.utility.js';
|
|
5
4
|
/**
|
|
6
|
-
* Step 2 of the octo lifecycle. See
|
|
5
|
+
* Step 2 of the octo lifecycle. See `Octo.validate()`.
|
|
7
6
|
*/
|
|
8
7
|
export const validateCommand = {
|
|
9
8
|
builder: (yargs) => {
|
|
@@ -34,10 +33,10 @@ export const validateCommand = {
|
|
|
34
33
|
handler: async (argv) => {
|
|
35
34
|
const { terraformBinary, terragruntBinary, terragruntDir, timeoutInMs } = argv;
|
|
36
35
|
const resolvedDir = resolve(process.cwd(), terragruntDir);
|
|
37
|
-
|
|
36
|
+
await OctoUtility.runCommand('validate', async () => {
|
|
38
37
|
// A plan reads every `data "external"`, and each one shells back out to `octo get-response`.
|
|
39
|
-
prepareCallbackEnvironment();
|
|
40
|
-
const { app, octo } = await bootOcto();
|
|
38
|
+
OctoUtility.prepareCallbackEnvironment();
|
|
39
|
+
const { app, octo } = await OctoUtility.bootOcto();
|
|
41
40
|
const terraformUtility = await Container.getInstance().get(TerraformUtility, {
|
|
42
41
|
args: [{ terraformBinary, terragruntBinary, timeoutInMs }, true],
|
|
43
42
|
});
|
|
@@ -52,17 +51,12 @@ export const validateCommand = {
|
|
|
52
51
|
// findings to act on, not exit codes.
|
|
53
52
|
//
|
|
54
53
|
// The verdict itself is not printed here - the listeners render the report, drift included,
|
|
55
|
-
// on
|
|
56
|
-
//
|
|
54
|
+
// on stderr. What is left is the exit code, which is the CLI's own job, and the failure line on
|
|
55
|
+
// stderr.
|
|
57
56
|
if (report.failures.length > 0) {
|
|
58
|
-
|
|
59
|
-
process.exit(1);
|
|
57
|
+
throw new Error('Validation could not complete!');
|
|
60
58
|
}
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
reportError(error);
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}
|
|
59
|
+
});
|
|
66
60
|
},
|
|
67
61
|
};
|
|
68
62
|
//# sourceMappingURL=validate.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.command.js","sourceRoot":"","sources":["../../../src/commands/validate/validate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.command.js","sourceRoot":"","sources":["../../../src/commands/validate/validate.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AASnE;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC,KAAW,EAAQ,EAAE;QAC7B,OAAO,KAAK;aACT,MAAM,CAAC,eAAe,EAAE;YACvB,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,0DAA0D;YACvE,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,iBAAiB,EAAE;YACzB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,gFAAgF;YAC7F,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,kBAAkB,EAAE;YAC1B,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,gDAAgD;YAC7D,IAAI,EAAE,QAAQ;SACf,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,QAAQ;SACf,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,8EAA8E;IACxF,OAAO,EAAE,KAAK,EAAE,IAAkD,EAAiB,EAAE;QACnF,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QAC/E,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC;QAE1D,MAAM,WAAW,CAAC,UAAU,CAAC,UAAU,EAAE,KAAK,IAAI,EAAE;YAClD,6FAA6F;YAC7F,WAAW,CAAC,0BAA0B,EAAE,CAAC;YAEzC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YACnD,MAAM,gBAAgB,GAAG,MAAM,SAAS,CAAC,WAAW,EAAE,CAAC,GAAG,CAAwB,gBAAgB,EAAE;gBAClG,IAAI,EAAE,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC;aACjE,CAAC,CAAC;YAEH,+FAA+F;YAC/F,iGAAiG;YACjG,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YAE5E,0FAA0F;YAC1F,6FAA6F;YAC7F,6CAA6C;YAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;YAEpD,wFAAwF;YACxF,sCAAsC;YACtC,EAAE;YACF,4FAA4F;YAC5F,gGAAgG;YAChG,UAAU;YACV,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -81,11 +81,8 @@
|
|
|
81
81
|
{
|
|
82
82
|
"additionalProperties": false,
|
|
83
83
|
"properties": {
|
|
84
|
-
"reportDir": {
|
|
85
|
-
"type": "string"
|
|
86
|
-
},
|
|
87
84
|
"type": {
|
|
88
|
-
"const": "
|
|
85
|
+
"const": "JournalEventListener",
|
|
89
86
|
"type": "string"
|
|
90
87
|
}
|
|
91
88
|
},
|
|
@@ -119,32 +116,49 @@
|
|
|
119
116
|
{
|
|
120
117
|
"additionalProperties": false,
|
|
121
118
|
"properties": {
|
|
122
|
-
"encryptionKey": {
|
|
123
|
-
"type": "string"
|
|
124
|
-
},
|
|
125
119
|
"statePath": {
|
|
126
120
|
"type": "string"
|
|
127
121
|
},
|
|
128
122
|
"type": {
|
|
129
|
-
"const": "
|
|
123
|
+
"const": "LocalStateProvider",
|
|
130
124
|
"type": "string"
|
|
131
125
|
}
|
|
132
126
|
},
|
|
133
|
-
"required": ["
|
|
127
|
+
"required": ["type", "statePath"],
|
|
134
128
|
"type": "object"
|
|
135
129
|
},
|
|
136
130
|
{
|
|
137
131
|
"additionalProperties": false,
|
|
138
132
|
"properties": {
|
|
133
|
+
"appId": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"checkInIntervalInSeconds": {
|
|
137
|
+
"maximum": 60,
|
|
138
|
+
"minimum": 5,
|
|
139
|
+
"type": "integer"
|
|
140
|
+
},
|
|
141
|
+
"lockContext": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"organizationId": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"sessionId": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
},
|
|
150
|
+
"stateManagementServiceUrl": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
139
153
|
"statePath": {
|
|
140
154
|
"type": "string"
|
|
141
155
|
},
|
|
142
156
|
"type": {
|
|
143
|
-
"const": "
|
|
157
|
+
"const": "RemoteStateProvider",
|
|
144
158
|
"type": "string"
|
|
145
159
|
}
|
|
146
160
|
},
|
|
147
|
-
"required": ["
|
|
161
|
+
"required": ["appId", "organizationId", "sessionId", "stateManagementServiceUrl", "statePath", "type"],
|
|
148
162
|
"type": "object"
|
|
149
163
|
},
|
|
150
164
|
{
|