@empire-builder-kit/nx 1.0.0-rc.2 → 1.0.0-rc.21
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/executors.json +10 -0
- package/package.json +4 -4
- package/src/cli/output.js +1 -1
- package/src/developer-agent/model.js +4 -4
- package/src/developer-agent/model.js.map +1 -1
- package/src/developer-agent/operation-registry.js +67 -10
- package/src/developer-agent/operation-registry.js.map +1 -1
- package/src/developer-agent/planning.js +7 -9
- package/src/developer-agent/planning.js.map +1 -1
- package/src/developer-agent/workspace-inspection.js +12 -0
- package/src/developer-agent/workspace-inspection.js.map +1 -1
- package/src/executors/blueprint-trust/blueprint-trust.js +6 -0
- package/src/executors/blueprint-trust/blueprint-trust.js.map +1 -1
- package/src/executors/deployment-plan/deployment-plan.js +5 -0
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +2 -0
- package/src/executors/foundation-preflight/foundation-preflight.js +6 -2
- package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
- package/src/executors/foundation-preflight/schema.json +10 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +2 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +2 -1
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
- package/src/executors/foundation-profile-preflight/schema.json +19 -3
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +229 -5
- package/src/executors/infrastructure-plan/infrastructure-plan.js +2298 -175
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
- package/src/executors/infrastructure-plan/schema.json +16 -0
- package/src/executors/local-deploy/fixtures/local-deploy-state-machine.mjs +53 -0
- package/src/executors/local-deploy/local-approval.d.ts +23 -0
- package/src/executors/local-deploy/local-approval.js +43 -0
- package/src/executors/local-deploy/local-approval.js.map +1 -0
- package/src/executors/local-deploy/local-deploy.d.ts +69 -0
- package/src/executors/local-deploy/local-deploy.js +911 -0
- package/src/executors/local-deploy/local-deploy.js.map +1 -0
- package/src/executors/local-deploy/schema.json +42 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +3 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +94 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -0
- package/src/executors/router-waf-rehearsal/schema.json +9 -0
- package/src/executors/secret-metadata/schema.json +5 -0
- package/src/executors/secret-metadata/secret-metadata.d.ts +12 -1
- package/src/executors/secret-metadata/secret-metadata.js +68 -16
- package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
- package/src/executors/sst-lifecycle/logging-preflight.d.ts +5 -0
- package/src/executors/sst-lifecycle/logging-preflight.js +23 -13
- package/src/executors/sst-lifecycle/logging-preflight.js.map +1 -1
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +8 -1
- package/src/executors/sst-lifecycle/run-sst-command.js +144 -12
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
- package/src/executors/sst-lifecycle/schema.json +13 -1
- package/src/executors/sst-lifecycle/sst-environment-source.d.ts +25 -0
- package/src/executors/sst-lifecycle/sst-environment-source.js +213 -0
- package/src/executors/sst-lifecycle/sst-environment-source.js.map +1 -0
- package/src/foundation/index.d.ts +2 -0
- package/src/foundation/index.js +2 -0
- package/src/foundation/index.js.map +1 -1
- package/src/foundation/logging-preflight.js +1 -1
- package/src/foundation/logging-preflight.js.map +1 -1
- package/src/foundation/logging.d.ts +3 -1
- package/src/foundation/logging.js +1 -1
- package/src/foundation/logging.js.map +1 -1
- package/src/foundation/partial-state.d.ts +10 -0
- package/src/foundation/partial-state.js +21 -0
- package/src/foundation/partial-state.js.map +1 -0
- package/src/foundation/router-waf.d.ts +98 -0
- package/src/foundation/router-waf.js +401 -0
- package/src/foundation/router-waf.js.map +1 -0
- package/src/generators/function/function.js +2 -1
- package/src/generators/function/function.js.map +1 -1
- package/src/generators/post-generation-install.d.ts +1 -0
- package/src/generators/post-generation-install.js +134 -67
- package/src/generators/post-generation-install.js.map +1 -1
- package/src/generators/preset/generator.js +23 -3
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +7 -0
- package/src/generators/preset/schema.json +47 -0
- package/src/generators/preset/tool-versions.d.ts +5 -5
- package/src/generators/preset/tool-versions.js +4 -4
- package/src/generators/preset/workspace-files-ci-acceptance.d.ts +1 -0
- package/src/generators/preset/workspace-files-ci-acceptance.js +791 -0
- package/src/generators/preset/workspace-files-ci-acceptance.js.map +1 -0
- package/src/generators/preset/workspace-files-developer-agent.d.ts +2 -0
- package/src/generators/preset/workspace-files-developer-agent.js +25 -11
- package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
- package/src/generators/preset/workspace-files-foundation-workload-roles.js +5 -2
- package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +1 -1
- package/src/generators/preset/workspace-files-performance-load.js +2 -1
- package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
- package/src/generators/preset/workspace-files-workload-role-baseline.js +254 -42
- package/src/generators/preset/workspace-files-workload-role-baseline.js.map +1 -1
- package/src/generators/preset/workspace-files.d.ts +8 -4
- package/src/generators/preset/workspace-files.js +1039 -68
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +65 -3
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/repository-policy/schema.d.ts +6 -0
- package/src/generators/repository-policy/schema.json +46 -0
- package/src/generators/slice/built-in-plan-api-files.js +2 -1
- package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +19 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-files.js +16 -5
- package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-retention-job-files.js +10 -6
- package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +25 -10
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-foundation-files.js +2 -3
- package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +364 -29
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +67 -11
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-metadata-files.js +1 -0
- package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-operations-files.js +442 -5
- package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-performance-files.d.ts +2 -1
- package/src/generators/slice/built-in-plan-performance-files.js +41 -47
- package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-project-files.js +14 -1
- package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-release-files.js +235 -56
- package/src/generators/slice/built-in-plan-release-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +92 -5
- package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +13 -0
- package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js +5 -2
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
- package/src/generators/slice/built-in-plan.d.ts +2 -1
- package/src/generators/slice/built-in-plan.js +8 -5
- package/src/generators/slice/built-in-plan.js.map +1 -1
- package/src/generators/slice/slice.js +11 -3
- package/src/generators/slice/slice.js.map +1 -1
- package/src/generators/upgrade/upgrade.js +35 -0
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/generators/workload/frozen-container.d.ts +3 -2
- package/src/generators/workload/frozen-container.js +6 -4
- package/src/generators/workload/frozen-container.js.map +1 -1
- package/src/generators/workload/workload.js +2 -2
- package/src/generators/workload/workload.js.map +1 -1
- package/src/git-policy/github-bootstrap.d.ts +3 -1
- package/src/git-policy/github-bootstrap.js +22 -5
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/git-policy/routing.d.ts +2 -0
- package/src/git-policy/routing.js +12 -1
- package/src/git-policy/routing.js.map +1 -1
- package/src/infrastructure-change/local-capability.d.ts +73 -0
- package/src/infrastructure-change/local-capability.js +114 -0
- package/src/infrastructure-change/local-capability.js.map +1 -0
- package/src/infrastructure-change/model.d.ts +25 -4
- package/src/infrastructure-change/model.js +1 -0
- package/src/infrastructure-change/model.js.map +1 -1
- package/src/infrastructure-change/normalize.d.ts +4 -0
- package/src/infrastructure-change/normalize.js +47 -7
- package/src/infrastructure-change/normalize.js.map +1 -1
- package/src/infrastructure-change/plan.d.ts +30 -3
- package/src/infrastructure-change/plan.js +323 -13
- package/src/infrastructure-change/plan.js.map +1 -1
- package/src/infrastructure-change/risk.d.ts +3 -1
- package/src/infrastructure-change/risk.js +96 -16
- package/src/infrastructure-change/risk.js.map +1 -1
- package/src/local-dev/environment-inspector.d.ts +1 -0
- package/src/local-dev/environment-inspector.js +21 -9
- package/src/local-dev/environment-inspector.js.map +1 -1
- package/src/local-dev/private-state.d.ts +2 -0
- package/src/local-dev/private-state.js +3 -1
- package/src/local-dev/private-state.js.map +1 -1
- package/src/performance/cost-controls.d.ts +5 -3
- package/src/performance/cost-controls.js +30 -24
- package/src/performance/cost-controls.js.map +1 -1
- package/src/performance/model.d.ts +1 -1
- package/src/performance/model.js +0 -2
- package/src/performance/model.js.map +1 -1
- package/src/performance/test-fixtures.js +0 -2
- package/src/performance/test-fixtures.js.map +1 -1
- package/src/release/source-authority.d.ts +1 -0
- package/src/release/source-authority.js +136 -9
- package/src/release/source-authority.js.map +1 -1
- package/src/repository-policy/deployment-plan.d.ts +4 -1
- package/src/repository-policy/deployment-plan.js +8 -0
- package/src/repository-policy/deployment-plan.js.map +1 -1
- package/src/repository-policy/foundation-profile.js +1 -2
- package/src/repository-policy/foundation-profile.js.map +1 -1
- package/src/repository-policy/policy.d.ts +25 -1
- package/src/repository-policy/policy.js +145 -4
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/performance-policy-v1.json +0 -2
- package/src/schemas/repository-policy-v1.json +41 -0
- package/src/secrets/operator.js +22 -4
- package/src/secrets/operator.js.map +1 -1
- package/src/secrets/verification.js +9 -1
- package/src/secrets/verification.js.map +1 -1
- package/src/sst-environment-source-format.d.ts +3 -0
- package/src/sst-environment-source-format.js +179 -0
- package/src/sst-environment-source-format.js.map +1 -0
- package/src/supply-chain/blueprint-trust-git.js +72 -21
- package/src/supply-chain/blueprint-trust-git.js.map +1 -1
- package/src/supply-chain/blueprint-verification-authority.js +55 -3
- package/src/supply-chain/blueprint-verification-authority.js.map +1 -1
- package/src/supply-chain/blueprint-verification-execution.js +17 -2
- package/src/supply-chain/blueprint-verification-execution.js.map +1 -1
- package/src/supply-chain/build-output.d.ts +7 -1
- package/src/supply-chain/build-output.js +160 -20
- package/src/supply-chain/build-output.js.map +1 -1
- package/src/supply-chain/generated-command.js +131 -43
- package/src/supply-chain/generated-command.js.map +1 -1
- package/src/supply-chain/generated-container-release-command.js +187 -38
- package/src/supply-chain/generated-container-release-command.js.map +1 -1
- package/src/supply-chain/generated-ecr-collector-command.js +12 -2
- package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
- package/src/supply-chain/generated-scanner-command.js +114 -54
- package/src/supply-chain/generated-scanner-command.js.map +1 -1
- package/src/supply-chain/inventory.d.ts +17 -0
- package/src/supply-chain/inventory.js +114 -3
- package/src/supply-chain/inventory.js.map +1 -1
- package/src/supply-chain/pnpm-toolchain-authority.d.ts +4 -3
- package/src/supply-chain/pnpm-toolchain-authority.js +20 -34
- package/src/supply-chain/pnpm-toolchain-authority.js.map +1 -1
- package/src/supply-chain/policy.js +4 -1
- package/src/supply-chain/policy.js.map +1 -1
- package/src/supply-chain/sbom.d.ts +1 -1
- package/src/supply-chain/sbom.js +30 -5
- package/src/supply-chain/sbom.js.map +1 -1
- package/src/supply-chain/scanner.js +10 -1
- package/src/supply-chain/scanner.js.map +1 -1
- package/src/workload-roles/account-baseline.d.ts +11 -0
- package/src/workload-roles/account-baseline.js +253 -16
- package/src/workload-roles/account-baseline.js.map +1 -1
- package/src/workload-roles/authority.d.ts +3 -1
- package/src/workload-roles/authority.js +48 -2
- package/src/workload-roles/authority.js.map +1 -1
- package/src/workload-roles/aws-s3-state.js +27 -0
- package/src/workload-roles/aws-s3-state.js.map +1 -1
- package/src/workload-roles/boundary.d.ts +2 -1
- package/src/workload-roles/boundary.js +9 -2
- package/src/workload-roles/boundary.js.map +1 -1
- package/src/workload-roles/handler.js +52 -24
- package/src/workload-roles/handler.js.map +1 -1
- package/src/workload-roles/injection.js +1 -1
- package/src/workload-roles/injection.js.map +1 -1
- package/src/workload-roles/provisioner.js +12 -4
- package/src/workload-roles/provisioner.js.map +1 -1
- package/src/workload-roles/registration.d.ts +1 -0
- package/src/workload-roles/registration.js +5 -0
- package/src/workload-roles/registration.js.map +1 -1
- package/src/workload-roles/stage-boundary.js +1 -1
- package/src/workload-roles/stage-boundary.js.map +1 -1
- package/src/workload-roles/standard-slice.js +1 -0
- package/src/workload-roles/standard-slice.js.map +1 -1
|
@@ -18,6 +18,22 @@
|
|
|
18
18
|
"type": "string",
|
|
19
19
|
"enum": ["consumer", "foundation"]
|
|
20
20
|
},
|
|
21
|
+
"expectedRoleArn": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^arn:(aws|aws-us-gov|aws-cn):iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_/-]{1,512}$",
|
|
24
|
+
"description": "Exact temporary-session IAM role expected for local governed planning."
|
|
25
|
+
},
|
|
26
|
+
"profile": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"maxLength": 128,
|
|
30
|
+
"description": "Optional AWS shared-config profile used to obtain temporary federated credentials."
|
|
31
|
+
},
|
|
32
|
+
"region": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-z]{2}(-gov)?-[a-z]+-[0-9]$",
|
|
35
|
+
"description": "Exact AWS Region used by EBK control-plane preflights. This must match the committed deployment Region."
|
|
36
|
+
},
|
|
21
37
|
"action": {
|
|
22
38
|
"type": "string",
|
|
23
39
|
"enum": ["deploy", "refresh", "remove"],
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
2
|
+
|
|
3
|
+
const [statePath, target, action] = process.argv.slice(2);
|
|
4
|
+
if (!statePath || !target || !action) {
|
|
5
|
+
process.stderr.write('statePath, target, and action are required\n');
|
|
6
|
+
process.exit(2);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const [project, operation] = target.split(':');
|
|
10
|
+
const state = JSON.parse(readFileSync(statePath, 'utf8'));
|
|
11
|
+
const projectState = state.projects?.[project];
|
|
12
|
+
if (
|
|
13
|
+
!projectState ||
|
|
14
|
+
!['infrastructure-plan', 'deploy', 'refresh'].includes(operation)
|
|
15
|
+
) {
|
|
16
|
+
process.stderr.write(`unsupported state-machine target: ${target}\n`);
|
|
17
|
+
process.exit(2);
|
|
18
|
+
}
|
|
19
|
+
if (operation === 'infrastructure-plan' && projectState.planFailure) {
|
|
20
|
+
process.stderr.write(`${projectState.planFailure}\n`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
if (operation !== 'infrastructure-plan' && projectState.interrupt) {
|
|
24
|
+
process.stderr.write(`interrupted ${target}\n`);
|
|
25
|
+
process.exit(130);
|
|
26
|
+
}
|
|
27
|
+
if (operation !== 'infrastructure-plan') {
|
|
28
|
+
projectState.observed = projectState.desired;
|
|
29
|
+
}
|
|
30
|
+
state.calls ??= [];
|
|
31
|
+
state.calls.push({ action, target });
|
|
32
|
+
const temporaryPath = `${statePath}.next`;
|
|
33
|
+
writeFileSync(temporaryPath, `${JSON.stringify(state)}\n`, { mode: 0o600 });
|
|
34
|
+
renameSync(temporaryPath, statePath);
|
|
35
|
+
process.stdout.write(
|
|
36
|
+
`${JSON.stringify({
|
|
37
|
+
desired: projectState.desired,
|
|
38
|
+
noOp: projectState.desired === projectState.observed,
|
|
39
|
+
observed: projectState.observed,
|
|
40
|
+
project,
|
|
41
|
+
providerReadOnly:
|
|
42
|
+
operation === 'infrastructure-plan' &&
|
|
43
|
+
projectState.providerReadOnly === true,
|
|
44
|
+
providerReadCopies:
|
|
45
|
+
operation === 'infrastructure-plan' &&
|
|
46
|
+
projectState.providerReadOnly === true
|
|
47
|
+
? (projectState.providerReadCopies ?? 1)
|
|
48
|
+
: 0,
|
|
49
|
+
reviewRequired:
|
|
50
|
+
operation === 'infrastructure-plan' &&
|
|
51
|
+
projectState.desired !== projectState.observed,
|
|
52
|
+
})}\n`,
|
|
53
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReadStream, WriteStream } from 'node:tty';
|
|
2
|
+
export interface LocalMutationApprovalRequest {
|
|
3
|
+
action: 'deploy' | 'refresh';
|
|
4
|
+
challenge: string;
|
|
5
|
+
planDigest: string;
|
|
6
|
+
project: string;
|
|
7
|
+
stage: 'development' | 'staging' | 'production';
|
|
8
|
+
}
|
|
9
|
+
export type LocalMutationApprover = (request: LocalMutationApprovalRequest) => Promise<boolean>;
|
|
10
|
+
export declare class LocalMutationApprovalUnavailableError extends Error {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
interface LocalApprovalTerminal {
|
|
14
|
+
input: ReadStream;
|
|
15
|
+
output: WriteStream;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates the public, non-secret operator acknowledgement used by deploy-local
|
|
19
|
+
* and refresh-local. This is an active-operator boundary, not an independent
|
|
20
|
+
* human-review claim: an authorized agent controlling a real TTY may answer it.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createTtyLocalMutationApprover(terminal?: LocalApprovalTerminal): LocalMutationApprover;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LocalMutationApprovalUnavailableError = void 0;
|
|
4
|
+
exports.createTtyLocalMutationApprover = createTtyLocalMutationApprover;
|
|
5
|
+
const promises_1 = require("node:readline/promises");
|
|
6
|
+
class LocalMutationApprovalUnavailableError extends Error {
|
|
7
|
+
constructor() {
|
|
8
|
+
super('Local infrastructure mutation requires an interactive TTY operated by a human or authorized agent.');
|
|
9
|
+
this.name = 'LocalMutationApprovalUnavailableError';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.LocalMutationApprovalUnavailableError = LocalMutationApprovalUnavailableError;
|
|
13
|
+
/**
|
|
14
|
+
* Creates the public, non-secret operator acknowledgement used by deploy-local
|
|
15
|
+
* and refresh-local. This is an active-operator boundary, not an independent
|
|
16
|
+
* human-review claim: an authorized agent controlling a real TTY may answer it.
|
|
17
|
+
*/
|
|
18
|
+
function createTtyLocalMutationApprover(terminal = {
|
|
19
|
+
input: process.stdin,
|
|
20
|
+
output: process.stderr,
|
|
21
|
+
}) {
|
|
22
|
+
return async ({ challenge }) => {
|
|
23
|
+
if (!terminal.input.isTTY || !terminal.output.isTTY) {
|
|
24
|
+
throw new LocalMutationApprovalUnavailableError();
|
|
25
|
+
}
|
|
26
|
+
const prompt = (0, promises_1.createInterface)({
|
|
27
|
+
input: terminal.input,
|
|
28
|
+
output: terminal.output,
|
|
29
|
+
terminal: true,
|
|
30
|
+
});
|
|
31
|
+
try {
|
|
32
|
+
const response = await prompt.question(`Type ${challenge} to acknowledge the current plan: `);
|
|
33
|
+
return response === challenge;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
throw new LocalMutationApprovalUnavailableError();
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
prompt.close();
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=local-approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-approval.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/local-deploy/local-approval.ts"],"names":[],"mappings":";;;AAkCA,wEA0BC;AA5DD,qDAAyD;AAezD,MAAa,qCAAsC,SAAQ,KAAK;IAC9D;QACE,KAAK,CACH,oGAAoG,CACrG,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,uCAAuC,CAAC;IACtD,CAAC;CACF;AAPD,sFAOC;AAOD;;;;GAIG;AACH,SAAgB,8BAA8B,CAC5C,WAAkC;IAChC,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,MAAM,EAAE,OAAO,CAAC,MAAM;CACvB;IAED,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7B,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YACpD,MAAM,IAAI,qCAAqC,EAAE,CAAC;QACpD,CAAC;QACD,MAAM,MAAM,GAAG,IAAA,0BAAe,EAAC;YAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,QAAQ,CACpC,QAAQ,SAAS,oCAAoC,CACtD,CAAC;YACF,OAAO,QAAQ,KAAK,SAAS,CAAC;QAChC,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,qCAAqC,EAAE,CAAC;QACpD,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { spawnSync } from 'node:child_process';
|
|
2
|
+
import { GetParameterCommand, PutParameterCommand } from '@aws-sdk/client-ssm';
|
|
3
|
+
import { type ExecutorContext, type PromiseExecutor } from '@nx/devkit';
|
|
4
|
+
import { type InfrastructurePlanV1 } from '../../infrastructure-change/index.js';
|
|
5
|
+
import { type CanonicalDeploymentStage } from '../../repository-policy/index.js';
|
|
6
|
+
import { type LocalMutationApprover } from './local-approval.js';
|
|
7
|
+
interface LocalDeployOptions {
|
|
8
|
+
action?: 'deploy' | 'refresh';
|
|
9
|
+
confirmation?: string;
|
|
10
|
+
expectedRoleArn: string;
|
|
11
|
+
phase?: 'foundation-bootstrap' | 'full-stage';
|
|
12
|
+
profile?: string;
|
|
13
|
+
stage: CanonicalDeploymentStage;
|
|
14
|
+
}
|
|
15
|
+
interface LocalDeployDependencies {
|
|
16
|
+
approve?: LocalMutationApprover;
|
|
17
|
+
backend?: (input: {
|
|
18
|
+
account: string;
|
|
19
|
+
applications: readonly string[];
|
|
20
|
+
profile?: string;
|
|
21
|
+
region: string;
|
|
22
|
+
stage: CanonicalDeploymentStage;
|
|
23
|
+
}) => Promise<LocalSstBackendAuthority>;
|
|
24
|
+
now?: () => Date;
|
|
25
|
+
run?: typeof spawnSync;
|
|
26
|
+
caller?: (region: string) => Promise<{
|
|
27
|
+
Account?: string;
|
|
28
|
+
Arn?: string;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
interface LocalSstBackendAuthority {
|
|
32
|
+
authorityDigest: string;
|
|
33
|
+
createdApplications: readonly string[];
|
|
34
|
+
stateBucketArn: string;
|
|
35
|
+
}
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare function prepareLocalSstBackend(input: {
|
|
38
|
+
account: string;
|
|
39
|
+
applications: readonly string[];
|
|
40
|
+
profile?: string;
|
|
41
|
+
region: string;
|
|
42
|
+
stage: CanonicalDeploymentStage;
|
|
43
|
+
}, dependencies?: {
|
|
44
|
+
passphrase?: () => string;
|
|
45
|
+
send?: (command: GetParameterCommand | PutParameterCommand) => Promise<{
|
|
46
|
+
Parameter?: {
|
|
47
|
+
Name?: string;
|
|
48
|
+
Type?: string;
|
|
49
|
+
Value?: string;
|
|
50
|
+
Version?: number;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
}): Promise<LocalSstBackendAuthority>;
|
|
54
|
+
/** @internal */
|
|
55
|
+
export declare function localPlanSummaryDigest(input: {
|
|
56
|
+
action?: 'deploy' | 'refresh';
|
|
57
|
+
account: string;
|
|
58
|
+
orderedProjects: readonly string[];
|
|
59
|
+
phase: 'foundation-bootstrap' | 'full-stage';
|
|
60
|
+
plans: Readonly<Record<string, InfrastructurePlanV1>>;
|
|
61
|
+
region: string;
|
|
62
|
+
sourceCommit: string;
|
|
63
|
+
stage: CanonicalDeploymentStage;
|
|
64
|
+
}): string;
|
|
65
|
+
export declare function runLocalDeploy(options: LocalDeployOptions, context: ExecutorContext, dependencies?: LocalDeployDependencies): Promise<{
|
|
66
|
+
success: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
declare const executor: PromiseExecutor<LocalDeployOptions>;
|
|
69
|
+
export default executor;
|