@ankhorage/infra 7.1.107 → 7.2.1
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 +12 -0
- package/README.md +1 -1
- package/dist/capabilities/index.d.ts +83 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/index.js +68 -0
- package/dist/capabilities/index.js.map +1 -0
- package/dist/cli/commands/destroy.js +1 -2
- package/dist/cli/commands/destroy.js.map +1 -1
- package/dist/cli/commands/down.d.ts.map +1 -1
- package/dist/cli/commands/down.js +1 -2
- package/dist/cli/commands/down.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +1 -2
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/outputs.d.ts.map +1 -1
- package/dist/cli/commands/outputs.js +1 -2
- package/dist/cli/commands/outputs.js.map +1 -1
- package/dist/cli/commands/plan.d.ts.map +1 -1
- package/dist/cli/commands/plan.js +1 -2
- package/dist/cli/commands/plan.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +1 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/up.d.ts.map +1 -1
- package/dist/cli/commands/up.js +1 -2
- package/dist/cli/commands/up.js.map +1 -1
- package/dist/cli/commands/validate.d.ts.map +1 -1
- package/dist/cli/commands/validate.js +1 -2
- package/dist/cli/commands/validate.js.map +1 -1
- package/dist/cli/createInfraRuntimeProvider.d.ts.map +1 -1
- package/dist/cli/createInfraRuntimeProvider.js +3 -2
- package/dist/cli/createInfraRuntimeProvider.js.map +1 -1
- package/dist/constants.d.ts +81 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -11
- package/dist/constants.js.map +1 -1
- package/dist/metadata/index.d.ts +1 -1
- package/dist/metadata/index.d.ts.map +1 -1
- package/dist/metadata/index.js +1 -1
- package/dist/metadata/index.js.map +1 -1
- package/dist/types/infraCli.d.ts +2 -2
- package/dist/types/infraCli.d.ts.map +1 -1
- package/dist/types/infraCli.js.map +1 -1
- package/package.json +131 -14
- package/src/capabilities/index.test.ts +17 -0
- package/src/capabilities/index.ts +71 -0
- package/src/cli/commands/destroy.ts +2 -2
- package/src/cli/commands/down.ts +3 -2
- package/src/cli/commands/generate.ts +3 -2
- package/src/cli/commands/outputs.ts +3 -2
- package/src/cli/commands/plan.ts +3 -2
- package/src/cli/commands/status.ts +3 -2
- package/src/cli/commands/up.ts +3 -2
- package/src/cli/commands/validate.ts +3 -2
- package/src/cli/createInfraRuntimeProvider.ts +3 -7
- package/src/cli/index.test.ts +3 -11
- package/src/commands.test.ts +4 -0
- package/src/constants.ts +3 -17
- package/src/metadata/index.ts +0 -1
- package/src/package.test.ts +21 -23
- package/src/types/infraCli.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/infra
|
|
2
2
|
|
|
3
|
+
## 7.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d2fc7b8: Update dependencies: `@ankhorage/contracts`, `@ankhorage/local`, `@ankhorage/minikube`.
|
|
8
|
+
|
|
9
|
+
## 7.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- d766993: feat(capabilities): publish canonical Infra lifecycle capability descriptors
|
|
14
|
+
|
|
3
15
|
## 7.1.107
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
# INFRA
|
|
5
5
|
|
|
6
|
-
         
|
|
7
7
|
|
|
8
8
|
Executable infra provider and standalone CLI for Ankhorage project workflows.
|
|
9
9
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*** Publish Infra's executable lifecycle operations for Ankh discovery and bindings. */
|
|
2
|
+
export declare const CAPABILITIES: readonly [{
|
|
3
|
+
readonly id: "infra.validate";
|
|
4
|
+
readonly owner: "@ankhorage/infra";
|
|
5
|
+
readonly access: readonly ["invoke"];
|
|
6
|
+
readonly binding: {
|
|
7
|
+
readonly kind: "action";
|
|
8
|
+
readonly bindableAs: readonly ["target"];
|
|
9
|
+
};
|
|
10
|
+
readonly label: "Validate infrastructure";
|
|
11
|
+
readonly description: "Validate the manifest, credentials, compatibility, and selected infrastructure adapters.";
|
|
12
|
+
}, {
|
|
13
|
+
readonly id: "infra.plan";
|
|
14
|
+
readonly owner: "@ankhorage/infra";
|
|
15
|
+
readonly access: readonly ["invoke"];
|
|
16
|
+
readonly binding: {
|
|
17
|
+
readonly kind: "action";
|
|
18
|
+
readonly bindableAs: readonly ["target"];
|
|
19
|
+
};
|
|
20
|
+
readonly label: "Plan infrastructure";
|
|
21
|
+
readonly description: "Calculate the infrastructure changes required for the selected environment.";
|
|
22
|
+
}, {
|
|
23
|
+
readonly id: "infra.generate";
|
|
24
|
+
readonly owner: "@ankhorage/infra";
|
|
25
|
+
readonly access: readonly ["invoke"];
|
|
26
|
+
readonly binding: {
|
|
27
|
+
readonly kind: "action";
|
|
28
|
+
readonly bindableAs: readonly ["target"];
|
|
29
|
+
};
|
|
30
|
+
readonly label: "Generate infrastructure";
|
|
31
|
+
readonly description: "Generate infrastructure artifacts for the selected environment.";
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: "infra.up";
|
|
34
|
+
readonly owner: "@ankhorage/infra";
|
|
35
|
+
readonly access: readonly ["invoke"];
|
|
36
|
+
readonly binding: {
|
|
37
|
+
readonly kind: "action";
|
|
38
|
+
readonly bindableAs: readonly ["target"];
|
|
39
|
+
};
|
|
40
|
+
readonly label: "Start infrastructure";
|
|
41
|
+
readonly description: "Ensure and reconcile the selected infrastructure environment.";
|
|
42
|
+
}, {
|
|
43
|
+
readonly id: "infra.status";
|
|
44
|
+
readonly owner: "@ankhorage/infra";
|
|
45
|
+
readonly access: readonly ["invoke"];
|
|
46
|
+
readonly binding: {
|
|
47
|
+
readonly kind: "action";
|
|
48
|
+
readonly bindableAs: readonly ["target"];
|
|
49
|
+
};
|
|
50
|
+
readonly label: "Get infrastructure status";
|
|
51
|
+
readonly description: "Inspect the current status of the selected infrastructure environment.";
|
|
52
|
+
}, {
|
|
53
|
+
readonly id: "infra.outputs";
|
|
54
|
+
readonly owner: "@ankhorage/infra";
|
|
55
|
+
readonly access: readonly ["invoke"];
|
|
56
|
+
readonly binding: {
|
|
57
|
+
readonly kind: "action";
|
|
58
|
+
readonly bindableAs: readonly ["target"];
|
|
59
|
+
};
|
|
60
|
+
readonly label: "Get infrastructure outputs";
|
|
61
|
+
readonly description: "Read generated public and referenced outputs for the selected infrastructure environment.";
|
|
62
|
+
}, {
|
|
63
|
+
readonly id: "infra.down";
|
|
64
|
+
readonly owner: "@ankhorage/infra";
|
|
65
|
+
readonly access: readonly ["invoke"];
|
|
66
|
+
readonly binding: {
|
|
67
|
+
readonly kind: "action";
|
|
68
|
+
readonly bindableAs: readonly ["target"];
|
|
69
|
+
};
|
|
70
|
+
readonly label: "Stop infrastructure";
|
|
71
|
+
readonly description: "Suspend the selected infrastructure environment while retaining its state.";
|
|
72
|
+
}, {
|
|
73
|
+
readonly id: "infra.destroy";
|
|
74
|
+
readonly owner: "@ankhorage/infra";
|
|
75
|
+
readonly access: readonly ["invoke"];
|
|
76
|
+
readonly binding: {
|
|
77
|
+
readonly kind: "action";
|
|
78
|
+
readonly bindableAs: readonly ["target"];
|
|
79
|
+
};
|
|
80
|
+
readonly label: "Destroy infrastructure";
|
|
81
|
+
readonly description: "Destroy the selected infrastructure environment after explicit confirmation.";
|
|
82
|
+
}];
|
|
83
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmEiB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*** Publish Infra's executable lifecycle operations for Ankh discovery and bindings. */
|
|
2
|
+
export const CAPABILITIES = [
|
|
3
|
+
{
|
|
4
|
+
id: 'infra.validate',
|
|
5
|
+
owner: '@ankhorage/infra',
|
|
6
|
+
access: ['invoke'],
|
|
7
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
8
|
+
label: 'Validate infrastructure',
|
|
9
|
+
description: 'Validate the manifest, credentials, compatibility, and selected infrastructure adapters.',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: 'infra.plan',
|
|
13
|
+
owner: '@ankhorage/infra',
|
|
14
|
+
access: ['invoke'],
|
|
15
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
16
|
+
label: 'Plan infrastructure',
|
|
17
|
+
description: 'Calculate the infrastructure changes required for the selected environment.',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 'infra.generate',
|
|
21
|
+
owner: '@ankhorage/infra',
|
|
22
|
+
access: ['invoke'],
|
|
23
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
24
|
+
label: 'Generate infrastructure',
|
|
25
|
+
description: 'Generate infrastructure artifacts for the selected environment.',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'infra.up',
|
|
29
|
+
owner: '@ankhorage/infra',
|
|
30
|
+
access: ['invoke'],
|
|
31
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
32
|
+
label: 'Start infrastructure',
|
|
33
|
+
description: 'Ensure and reconcile the selected infrastructure environment.',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'infra.status',
|
|
37
|
+
owner: '@ankhorage/infra',
|
|
38
|
+
access: ['invoke'],
|
|
39
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
40
|
+
label: 'Get infrastructure status',
|
|
41
|
+
description: 'Inspect the current status of the selected infrastructure environment.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'infra.outputs',
|
|
45
|
+
owner: '@ankhorage/infra',
|
|
46
|
+
access: ['invoke'],
|
|
47
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
48
|
+
label: 'Get infrastructure outputs',
|
|
49
|
+
description: 'Read generated public and referenced outputs for the selected infrastructure environment.',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'infra.down',
|
|
53
|
+
owner: '@ankhorage/infra',
|
|
54
|
+
access: ['invoke'],
|
|
55
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
56
|
+
label: 'Stop infrastructure',
|
|
57
|
+
description: 'Suspend the selected infrastructure environment while retaining its state.',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'infra.destroy',
|
|
61
|
+
owner: '@ankhorage/infra',
|
|
62
|
+
access: ['invoke'],
|
|
63
|
+
binding: { kind: 'action', bindableAs: ['target'] },
|
|
64
|
+
label: 'Destroy infrastructure',
|
|
65
|
+
description: 'Destroy the selected infrastructure environment after explicit confirmation.',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/capabilities/index.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;QACE,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,0FAA0F;KAC7F;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,6EAA6E;KAC3F;IACD;QACE,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,iEAAiE;KAC/E;IACD;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,+DAA+D;KAC7E;IACD;QACE,EAAE,EAAE,cAAc;QAClB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,wEAAwE;KACtF;IACD;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,4BAA4B;QACnC,WAAW,EACT,2FAA2F;KAC9F;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,4EAA4E;KAC1F;IACD;QACE,EAAE,EAAE,eAAe;QACnB,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,CAAC,QAAQ,CAAC;QAClB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,QAAQ,CAAC,EAAE;QACnD,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,8EAA8E;KAC5F;CACuC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\n/*** Publish Infra's executable lifecycle operations for Ankh discovery and bindings. */\nexport const CAPABILITIES = [\n {\n id: 'infra.validate',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Validate infrastructure',\n description:\n 'Validate the manifest, credentials, compatibility, and selected infrastructure adapters.',\n },\n {\n id: 'infra.plan',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Plan infrastructure',\n description: 'Calculate the infrastructure changes required for the selected environment.',\n },\n {\n id: 'infra.generate',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Generate infrastructure',\n description: 'Generate infrastructure artifacts for the selected environment.',\n },\n {\n id: 'infra.up',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Start infrastructure',\n description: 'Ensure and reconcile the selected infrastructure environment.',\n },\n {\n id: 'infra.status',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Get infrastructure status',\n description: 'Inspect the current status of the selected infrastructure environment.',\n },\n {\n id: 'infra.outputs',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Get infrastructure outputs',\n description:\n 'Read generated public and referenced outputs for the selected infrastructure environment.',\n },\n {\n id: 'infra.down',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Stop infrastructure',\n description: 'Suspend the selected infrastructure environment while retaining its state.',\n },\n {\n id: 'infra.destroy',\n owner: '@ankhorage/infra',\n access: ['invoke'],\n binding: { kind: 'action', bindableAs: ['target'] },\n label: 'Destroy infrastructure',\n description: 'Destroy the selected infrastructure environment after explicit confirmation.',\n },\n] as const satisfies readonly Capability[];\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { resolveInfraPersistence } from '../utils/resolveInfraPersistence.js';
|
|
@@ -7,7 +6,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
7
6
|
export const destroy = {
|
|
8
7
|
standaloneName: 'destroy',
|
|
9
8
|
path: ['destroy'],
|
|
10
|
-
capability:
|
|
9
|
+
capability: 'infra.destroy',
|
|
11
10
|
summary: 'Destroy exact owned resources behind explicit confirmation.',
|
|
12
11
|
async run(request, services) {
|
|
13
12
|
const operation = await prepareInfraCommandOperationAsync(request, services, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destroy.js","sourceRoot":"","sources":["../../../src/cli/commands/destroy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"destroy.js","sourceRoot":"","sources":["../../../src/cli/commands/destroy.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,+FAA+F;AAC/F,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE,SAAS;IACzB,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,UAAU,EAAE,eAA0C;IACtD,OAAO,EAAE,6DAA6D;IACtE,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;QACnF,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QACtE,MAAM,YAAY,GAAG,GAAG,SAAS,CAAC,OAAO,CAAC,SAAS,IAAI,WAAW,EAAE,CAAC;QACrE,IAAI,OAAO,CAAC,SAAS,CAAC,YAAY,KAAK,YAAY,EAAE,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,oCAAoC,YAAY,GAAG,CAAC,CAAC;QACvE,CAAC;QACD,MAAM,cAAc,GAAiC;YACnD,GAAG,SAAS,CAAC,SAAS;YACtB,WAAW;YACX,YAAY,EAAE,EAAE,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,WAAW,EAAE;YACrE,WAAW,EAAE,uBAAuB,CAClC,SAAS,CAAC,KAAK,EAAE,MAAM,EACvB,OAAO,CAAC,SAAS,CAAC,eAAe,CAClC;SACF,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,cAAc,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QACzF,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC1F,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;YACjC,MAAM,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YACvE,MAAM,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAC/E,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE;gBACvD,aAAa,EAAE,CAAC;gBAChB,OAAO,EAAE,SAAS,CAAC,OAAO;gBAC1B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;aAC5B,CAAC,CAAC;QACL,CAAC;QACD,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YAC9D,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;YACrC,iBAAiB,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,CAAC;SAC9D,CAAC,CAAC;QACH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC;AAE5C,mEAAmE;AACnE,SAAS,kBAAkB,CAAC,KAAmC;IAC7D,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IAC5F,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\nimport type { AppEnvironmentId } from '@ankhorage/contracts/environments';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport type { InfraDestroyOperationRequest } from '../../types/infraOrchestration.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { resolveInfraPersistence } from '../utils/resolveInfraPersistence.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define exact-scope destruction behind environment and persistent-resource confirmation. */\nexport const destroy = {\n standaloneName: 'destroy',\n path: ['destroy'],\n capability: 'infra.destroy' satisfies Capability['id'],\n summary: 'Destroy exact owned resources behind explicit confirmation.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services, true);\n const environment = requireEnvironment(request.arguments.environment);\n const confirmation = `${operation.project.projectId}:${environment}`;\n if (request.arguments.confirmation !== confirmation) {\n throw new Error(`Infra destroy requires --confirm ${confirmation}.`);\n }\n const destroyRequest: InfraDestroyOperationRequest = {\n ...operation.operation,\n environment,\n confirmation: { projectId: operation.project.projectId, environment },\n persistence: resolveInfraPersistence(\n operation.state?.ledger,\n request.arguments.deleteResources,\n ),\n };\n const result = await services.operations.destroy(destroyRequest, operation.dependencies);\n requireInfraSuccess(result, request.context);\n await services.writeArtifacts(operation.project.projectPath, [], operation.state?.ledger);\n if (result.value.ledger === null) {\n await services.removeState(operation.project.projectPath, environment);\n await services.removeCredentials(operation.project.projectPath, environment);\n } else {\n await services.writeState(operation.project.projectPath, {\n schemaVersion: 1,\n desired: operation.desired,\n ledger: result.value.ledger,\n });\n }\n writeInfraStructured(request.context, request.arguments.format, {\n environment: result.value.environment,\n retainedResources: result.value.ledger?.resources.length ?? 0,\n });\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n\n/*** Require the explicit destroy environment after CLI parsing. */\nfunction requireEnvironment(value: AppEnvironmentId | undefined): AppEnvironmentId {\n if (value === undefined) throw new Error('Infra destroy requires an explicit environment.');\n return value;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"down.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/down.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"down.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/down.ts"],"names":[],"mappings":"AAOA,kFAAkF;AAClF,eAAO,MAAM,IAAI;;;;;;;;CAoB0B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
@@ -6,7 +5,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
6
5
|
export const down = {
|
|
7
6
|
standaloneName: 'down',
|
|
8
7
|
path: ['down'],
|
|
9
|
-
capability:
|
|
8
|
+
capability: 'infra.down',
|
|
10
9
|
summary: 'Reversibly suspend runtime workloads while retaining persistent data.',
|
|
11
10
|
async run(request, services) {
|
|
12
11
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"down.js","sourceRoot":"","sources":["../../../src/cli/commands/down.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"down.js","sourceRoot":"","sources":["../../../src/cli/commands/down.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,kFAAkF;AAClF,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,cAAc,EAAE,MAAM;IACtB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,EAAE,YAAuC;IACnD,OAAO,EAAE,uEAAuE;IAChF,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3F,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE;YACvD,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YAC9D,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;YACrC,KAAK,EAAE,SAAS;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define reversible runtime suspension while retaining persistent resources. */\nexport const down = {\n standaloneName: 'down',\n path: ['down'],\n capability: 'infra.down' satisfies Capability['id'],\n summary: 'Reversibly suspend runtime workloads while retaining persistent data.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = await services.operations.down(operation.operation, operation.dependencies);\n requireInfraSuccess(result, request.context);\n await services.writeState(operation.project.projectPath, {\n schemaVersion: 1,\n desired: operation.desired,\n ledger: result.value.ledger,\n });\n writeInfraStructured(request.context, request.arguments.format, {\n environment: result.value.environment,\n state: 'stopped',\n });\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAOA,oFAAoF;AACpF,eAAO,MAAM,QAAQ;;;;;;;;CA0BsB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
@@ -6,7 +5,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
6
5
|
export const generate = {
|
|
7
6
|
standaloneName: 'generate',
|
|
8
7
|
path: ['generate'],
|
|
9
|
-
capability:
|
|
8
|
+
capability: 'infra.generate',
|
|
10
9
|
summary: 'Generate deterministic review artifacts without remote side effects.',
|
|
11
10
|
async run(request, services) {
|
|
12
11
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/cli/commands/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,oFAAoF;AACpF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc,EAAE,UAAU;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,gBAA2C;IACvD,OAAO,EAAE,sEAAsE;IAC/E,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QAC/F,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,cAAc,CAC3C,SAAS,CAAC,OAAO,CAAC,WAAW,EAC7B,MAAM,CAAC,KAAK,CAAC,SAAS,EACtB,SAAS,CAAC,KAAK,EAAE,MAAM,CACxB,CAAC;QACF,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE;YACvD,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YAC9D,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;YACrC,GAAG,OAAO;YACV,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;SAC1D,CAAC,CAAC;QACH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define deterministic review-artifact generation without remote side effects. */\nexport const generate = {\n standaloneName: 'generate',\n path: ['generate'],\n capability: 'infra.generate' satisfies Capability['id'],\n summary: 'Generate deterministic review artifacts without remote side effects.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = await services.operations.generate(operation.operation, operation.dependencies);\n requireInfraSuccess(result, request.context);\n const written = await services.writeArtifacts(\n operation.project.projectPath,\n result.value.artifacts,\n operation.state?.ledger,\n );\n await services.writeState(operation.project.projectPath, {\n schemaVersion: 1,\n desired: operation.desired,\n ledger: result.value.ledger,\n });\n writeInfraStructured(request.context, request.arguments.format, {\n environment: result.value.environment,\n ...written,\n artifacts: result.value.artifacts.map(({ path }) => path),\n });\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/outputs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/outputs.ts"],"names":[],"mappings":"AAQA,oEAAoE;AACpE,eAAO,MAAM,OAAO;;;;;;;;CAgBuB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraEnvironmentOutputs } from '../utils/writeInfraEnvironmentOutputs.js';
|
|
@@ -7,7 +6,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
7
6
|
export const outputs = {
|
|
8
7
|
standaloneName: 'outputs',
|
|
9
8
|
path: ['outputs'],
|
|
10
|
-
capability:
|
|
9
|
+
capability: 'infra.outputs',
|
|
11
10
|
summary: 'Print safe public outputs and secret references.',
|
|
12
11
|
async run(request, services) {
|
|
13
12
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../src/cli/commands/outputs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../src/cli/commands/outputs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,oEAAoE;AACpE,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE,SAAS;IACzB,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,UAAU,EAAE,eAA0C;IACtD,OAAO,EAAE,kDAAkD;IAC3D,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAChE,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YACvC,4BAA4B,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAChF,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraEnvironmentOutputs } from '../utils/writeInfraEnvironmentOutputs.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define safe public-output and secret-reference presentation. */\nexport const outputs = {\n standaloneName: 'outputs',\n path: ['outputs'],\n capability: 'infra.outputs' satisfies Capability['id'],\n summary: 'Print safe public outputs and secret references.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = services.operations.outputs(operation.operation);\n requireInfraSuccess(result, request.context);\n if (request.arguments.format === 'env') {\n writeInfraEnvironmentOutputs(request.context, result.value.outputs);\n } else {\n writeInfraStructured(request.context, request.arguments.format, result.value);\n }\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AAOA,4EAA4E;AAC5E,eAAO,MAAM,IAAI;;;;;;;;CAY0B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
@@ -6,7 +5,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
6
5
|
export const plan = {
|
|
7
6
|
standaloneName: 'plan',
|
|
8
7
|
path: ['plan'],
|
|
9
|
-
capability:
|
|
8
|
+
capability: 'infra.plan',
|
|
10
9
|
summary: 'Print an ordered side-effect-free infrastructure plan.',
|
|
11
10
|
async run(request, services) {
|
|
12
11
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/cli/commands/plan.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,4EAA4E;AAC5E,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,cAAc,EAAE,MAAM;IACtB,IAAI,EAAE,CAAC,MAAM,CAAC;IACd,UAAU,EAAE,YAAuC;IACnD,OAAO,EAAE,wDAAwD;IACjE,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3F,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9E,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define the ordered side-effect-free infrastructure planning command. */\nexport const plan = {\n standaloneName: 'plan',\n path: ['plan'],\n capability: 'infra.plan' satisfies Capability['id'],\n summary: 'Print an ordered side-effect-free infrastructure plan.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = await services.operations.plan(operation.operation, operation.dependencies);\n requireInfraSuccess(result, request.context);\n writeInfraStructured(request.context, request.arguments.format, result.value);\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAOA,+DAA+D;AAC/D,eAAO,MAAM,MAAM;;;;;;;;CAYwB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
@@ -6,7 +5,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
6
5
|
export const status = {
|
|
7
6
|
standaloneName: 'status',
|
|
8
7
|
path: ['status'],
|
|
9
|
-
capability:
|
|
8
|
+
capability: 'infra.status',
|
|
10
9
|
summary: 'Aggregate provider-neutral environment status.',
|
|
11
10
|
async run(request, services) {
|
|
12
11
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/cli/commands/status.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,+DAA+D;AAC/D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,cAAc,EAAE,QAAQ;IACxB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,UAAU,EAAE,cAAyC;IACrD,OAAO,EAAE,gDAAgD;IACzD,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QAC7F,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9E,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define provider-neutral environment status aggregation. */\nexport const status = {\n standaloneName: 'status',\n path: ['status'],\n capability: 'infra.status' satisfies Capability['id'],\n summary: 'Aggregate provider-neutral environment status.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = await services.operations.status(operation.operation, operation.dependencies);\n requireInfraSuccess(result, request.context);\n writeInfraStructured(request.context, request.arguments.format, result.value);\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/up.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/up.ts"],"names":[],"mappings":"AAOA,kEAAkE;AAClE,eAAO,MAAM,EAAE;;;;;;;;CA0B4B,CAAC"}
|
package/dist/cli/commands/up.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
@@ -6,7 +5,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
6
5
|
export const up = {
|
|
7
6
|
standaloneName: 'up',
|
|
8
7
|
path: ['up'],
|
|
9
|
-
capability:
|
|
8
|
+
capability: 'infra.up',
|
|
10
9
|
summary: 'Idempotently ensure and reconcile the selected environment.',
|
|
11
10
|
async run(request, services) {
|
|
12
11
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.js","sourceRoot":"","sources":["../../../src/cli/commands/up.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"up.js","sourceRoot":"","sources":["../../../src/cli/commands/up.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,kEAAkE;AAClE,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,cAAc,EAAE,IAAI;IACpB,IAAI,EAAE,CAAC,IAAI,CAAC;IACZ,UAAU,EAAE,UAAqC;IACjD,OAAO,EAAE,6DAA6D;IACtE,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QACzF,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE;YACvD,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,MAAM,QAAQ,CAAC,uBAAuB,CACpC,SAAS,CAAC,OAAO,CAAC,WAAW,EAC7B,MAAM,CAAC,KAAK,CAAC,WAAW,EACxB,MAAM,CAAC,KAAK,CAAC,OAAO,CACrB,CAAC;QACF,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YAC9D,WAAW,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;YACrC,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM;YACxC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;SAC9B,CAAC,CAAC;QACH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define idempotent environment creation and reconciliation. */\nexport const up = {\n standaloneName: 'up',\n path: ['up'],\n capability: 'infra.up' satisfies Capability['id'],\n summary: 'Idempotently ensure and reconcile the selected environment.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = await services.operations.up(operation.operation, operation.dependencies);\n requireInfraSuccess(result, request.context);\n await services.writeState(operation.project.projectPath, {\n schemaVersion: 1,\n desired: operation.desired,\n ledger: result.value.ledger,\n });\n await services.writeEnvironmentOutputs(\n operation.project.projectPath,\n result.value.environment,\n result.value.outputs,\n );\n writeInfraStructured(request.context, request.arguments.format, {\n environment: result.value.environment,\n resources: result.value.resources.length,\n outputs: result.value.outputs,\n });\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/validate.ts"],"names":[],"mappings":"AAOA,+FAA+F;AAC/F,eAAO,MAAM,QAAQ;;;;;;;;CAYsB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { INFRA_CAPABILITIES } from '../../constants.js';
|
|
2
1
|
import { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';
|
|
3
2
|
import { requireInfraSuccess } from '../utils/requireInfraSuccess.js';
|
|
4
3
|
import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
@@ -6,7 +5,7 @@ import { writeInfraStructured } from '../utils/writeInfraStructured.js';
|
|
|
6
5
|
export const validate = {
|
|
7
6
|
standaloneName: 'validate',
|
|
8
7
|
path: ['validate'],
|
|
9
|
-
capability:
|
|
8
|
+
capability: 'infra.validate',
|
|
10
9
|
summary: 'Validate manifest, compatibility, credentials and selected adapters.',
|
|
11
10
|
async run(request, services) {
|
|
12
11
|
const operation = await prepareInfraCommandOperationAsync(request, services);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/cli/commands/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/cli/commands/validate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAExE,+FAA+F;AAC/F,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc,EAAE,UAAU;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,gBAA2C;IACvD,OAAO,EAAE,sEAAsE;IAC/E,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ;QACzB,MAAM,SAAS,GAAG,MAAM,iCAAiC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QAC/F,mBAAmB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,oBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAC9E,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACzB,CAAC;CACwC,CAAC","sourcesContent":["import type { Capability } from '@ankhorage/contracts/capabilities';\n\nimport type { InfraCommandDefinition } from '../../types/infraCli.js';\nimport { prepareInfraCommandOperationAsync } from '../utils/prepareInfraCommandOperationAsync.js';\nimport { requireInfraSuccess } from '../utils/requireInfraSuccess.js';\nimport { writeInfraStructured } from '../utils/writeInfraStructured.js';\n\n/*** Define the manifest, compatibility, credential and selected-adapter validation command. */\nexport const validate = {\n standaloneName: 'validate',\n path: ['validate'],\n capability: 'infra.validate' satisfies Capability['id'],\n summary: 'Validate manifest, compatibility, credentials and selected adapters.',\n async run(request, services) {\n const operation = await prepareInfraCommandOperationAsync(request, services);\n const result = await services.operations.validate(operation.operation, operation.dependencies);\n requireInfraSuccess(result, request.context);\n writeInfraStructured(request.context, request.arguments.format, result.value);\n return { exitCode: 0 };\n },\n} as const satisfies InfraCommandDefinition;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createInfraRuntimeProvider.d.ts","sourceRoot":"","sources":["../../src/cli/createInfraRuntimeProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"createInfraRuntimeProvider.d.ts","sourceRoot":"","sources":["../../src/cli/createInfraRuntimeProvider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAIlE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAK9E,gFAAgF;AAChF,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,iCAAsC,GAC9C,0BAA0B,CAkB5B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CAPABILITIES } from '../capabilities/index.js';
|
|
2
|
+
import { INFRA_COMMAND_CATEGORY, INFRA_PACKAGE_NAME, INFRA_PACKAGE_VERSION } from '../constants.js';
|
|
2
3
|
import { INFRA_COMMANDS } from './constants.js';
|
|
3
4
|
import { createProviderCommandDescriptors } from './createProviderCommandDescriptors.js';
|
|
4
5
|
import { runInfraCommandAsync } from './runInfraCommandAsync.js';
|
|
@@ -9,7 +10,7 @@ export function createInfraRuntimeProvider(options = {}) {
|
|
|
9
10
|
id: INFRA_PACKAGE_NAME,
|
|
10
11
|
category: INFRA_COMMAND_CATEGORY,
|
|
11
12
|
version: INFRA_PACKAGE_VERSION,
|
|
12
|
-
capabilities:
|
|
13
|
+
capabilities: CAPABILITIES,
|
|
13
14
|
commands: createProviderCommandDescriptors(),
|
|
14
15
|
handlers: INFRA_COMMANDS.map((command) => ({
|
|
15
16
|
path: command.path,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createInfraRuntimeProvider.js","sourceRoot":"","sources":["../../src/cli/createInfraRuntimeProvider.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"createInfraRuntimeProvider.js","sourceRoot":"","sources":["../../src/cli/createInfraRuntimeProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAEpG,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,gFAAgF;AAChF,MAAM,UAAU,0BAA0B,CACxC,UAA6C,EAAE;IAE/C,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,oBAAoB,CAAC;IACtE,OAAO;QACL,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,sBAAsB;QAChC,OAAO,EAAE,qBAAqB;QAC9B,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,gCAAgC,EAAE;QAC5C,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACzC,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,CAAC,OAAO;gBACb,OAAO,cAAc,CACnB,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EACzD,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAC/B,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;KACiC,CAAC;AACzC,CAAC","sourcesContent":["import type { AnkhRuntimeCommandProvider } from '@ankhorage/ankh';\n\nimport { CAPABILITIES } from '../capabilities/index.js';\nimport { INFRA_COMMAND_CATEGORY, INFRA_PACKAGE_NAME, INFRA_PACKAGE_VERSION } from '../constants.js';\nimport type { CreateInfraRuntimeProviderOptions } from '../types/infraCli.js';\nimport { INFRA_COMMANDS } from './constants.js';\nimport { createProviderCommandDescriptors } from './createProviderCommandDescriptors.js';\nimport { runInfraCommandAsync } from './runInfraCommandAsync.js';\n\n/*** Compose the canonical Infra command surface as an Ankh runtime provider. */\nexport function createInfraRuntimeProvider(\n options: CreateInfraRuntimeProviderOptions = {},\n): AnkhRuntimeCommandProvider {\n const runCommandImpl = options.runCommandImpl ?? runInfraCommandAsync;\n return {\n id: INFRA_PACKAGE_NAME,\n category: INFRA_COMMAND_CATEGORY,\n version: INFRA_PACKAGE_VERSION,\n capabilities: CAPABILITIES,\n commands: createProviderCommandDescriptors(),\n handlers: INFRA_COMMANDS.map((command) => ({\n path: command.path,\n handler(request) {\n return runCommandImpl(\n { argv: request.argv, command, context: request.context },\n { services: options.services },\n );\n },\n })),\n } satisfies AnkhRuntimeCommandProvider;\n}\n"]}
|