@empire-builder-kit/nx 1.0.0-rc.30 → 1.0.0-rc.32
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 +8 -3
- package/package.json +14 -7
- package/src/aws/child-environment.d.ts +10 -0
- package/src/aws/child-environment.js +77 -0
- package/src/aws/child-environment.js.map +1 -0
- package/src/aws/identity.d.ts +13 -0
- package/src/aws/identity.js +41 -0
- package/src/aws/identity.js.map +1 -0
- package/src/aws-authority/index.d.ts +1 -0
- package/src/aws-authority/index.js +5 -0
- package/src/aws-authority/index.js.map +1 -0
- package/src/aws-authority/stage-authority.d.ts +240 -0
- package/src/aws-authority/stage-authority.js +2968 -0
- package/src/aws-authority/stage-authority.js.map +1 -0
- package/src/cli/main.d.ts +2 -0
- package/src/cli/main.js +11 -0
- package/src/cli/main.js.map +1 -1
- package/src/developer-agent/generator-planning.js +4 -4
- package/src/developer-agent/generator-planning.js.map +1 -1
- package/src/developer-agent/operation-registry.js +14 -6
- package/src/developer-agent/operation-registry.js.map +1 -1
- package/src/developer-agent/workspace-inspection.js +11 -2
- package/src/developer-agent/workspace-inspection.js.map +1 -1
- package/src/executors/deployment-plan/deployment-plan.js +1 -1
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +0 -1
- package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
- package/src/executors/foundation-preflight/schema.json +0 -5
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +12 -3
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +95 -32
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
- package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +64 -0
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js +221 -0
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +1 -0
- package/src/executors/foundation-profile-preflight/schema.json +1 -6
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +11 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +44 -21
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -1
- package/src/executors/foundation-remove-preflight/schema.json +6 -1
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/github-bootstrap/schema.json +7 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +27 -369
- package/src/executors/infrastructure-plan/infrastructure-plan.js +237 -5470
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
- package/src/executors/infrastructure-plan/schema.json +8 -64
- package/src/executors/local-deploy/federated-credential-transport.d.ts +48 -0
- package/src/executors/local-deploy/federated-credential-transport.js +252 -0
- package/src/executors/local-deploy/federated-credential-transport.js.map +1 -0
- package/src/executors/local-deploy/local-approval.d.ts +4 -9
- package/src/executors/local-deploy/local-approval.js +3 -7
- package/src/executors/local-deploy/local-approval.js.map +1 -1
- package/src/executors/local-deploy/local-deploy.d.ts +60 -43
- package/src/executors/local-deploy/local-deploy.js +955 -804
- package/src/executors/local-deploy/local-deploy.js.map +1 -1
- package/src/executors/local-deploy/schema.json +3 -20
- package/src/executors/refresh/refresh.js +2 -2
- package/src/executors/refresh/refresh.js.map +1 -1
- package/src/executors/remove/remove.js +2 -2
- package/src/executors/remove/remove.js.map +1 -1
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +27 -1
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +907 -22
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
- package/src/executors/router-waf-rehearsal/schema.json +17 -2
- package/src/executors/secret-initialize/schema.json +42 -0
- package/src/executors/secret-initialize/secret-initialize.d.ts +32 -0
- package/src/executors/secret-initialize/secret-initialize.js +243 -0
- package/src/executors/secret-initialize/secret-initialize.js.map +1 -0
- package/src/executors/secret-metadata/secret-metadata.d.ts +4 -1
- package/src/executors/secret-metadata/secret-metadata.js +76 -29
- package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
- package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +53 -0
- package/src/executors/sst-lifecycle/generated-secret-retirement.js +192 -0
- package/src/executors/sst-lifecycle/generated-secret-retirement.js.map +1 -0
- package/src/executors/sst-lifecycle/governed-native-operation.d.ts +46 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js +153 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js.map +1 -0
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +27 -7
- package/src/executors/sst-lifecycle/run-sst-command.js +474 -89
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
- package/src/executors/sst-lifecycle/schema.json +0 -5
- package/src/executors/sst-lifecycle/secret-preflight.d.ts +2 -0
- package/src/executors/sst-lifecycle/secret-preflight.js +13 -7
- package/src/executors/sst-lifecycle/secret-preflight.js.map +1 -1
- package/src/executors/unlock/unlock.js +2 -2
- package/src/executors/unlock/unlock.js.map +1 -1
- package/src/foundation/provision-logical-database.js +2 -0
- package/src/foundation/provision-logical-database.js.map +1 -1
- package/src/foundation/router-waf-rate-rehearsal.d.ts +97 -0
- package/src/foundation/router-waf-rate-rehearsal.js +210 -0
- package/src/foundation/router-waf-rate-rehearsal.js.map +1 -0
- package/src/foundation/router-waf.d.ts +59 -9
- package/src/foundation/router-waf.js +427 -32
- package/src/foundation/router-waf.js.map +1 -1
- package/src/foundation/stages.d.ts +1 -0
- package/src/foundation/stages.js +11 -0
- package/src/foundation/stages.js.map +1 -1
- package/src/generators/formatting.d.ts +8 -0
- package/src/generators/formatting.js +118 -0
- package/src/generators/formatting.js.map +1 -0
- package/src/generators/function/function.js +37 -17
- package/src/generators/function/function.js.map +1 -1
- package/src/generators/post-generation-install.js +2 -2
- package/src/generators/post-generation-install.js.map +1 -1
- package/src/generators/preset/generator.js +28 -8
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +3 -0
- package/src/generators/preset/schema.json +5 -5
- package/src/generators/preset/workspace-files-developer-agent.js +15 -7
- package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
- package/src/generators/preset/workspace-files-ecr-inspector.d.ts +18 -0
- package/src/generators/preset/workspace-files-ecr-inspector.js +298 -0
- package/src/generators/preset/workspace-files-ecr-inspector.js.map +1 -0
- package/src/generators/preset/workspace-files-performance-cost.d.ts +2 -2
- package/src/generators/preset/workspace-files-performance-cost.js +8 -8
- package/src/generators/preset/workspace-files-performance-cost.js.map +1 -1
- package/src/generators/preset/workspace-files-performance-load.d.ts +1 -1
- package/src/generators/preset/workspace-files-performance-load.js +29 -24
- package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
- package/src/generators/preset/workspace-files-stage-authority.d.ts +6 -0
- package/src/generators/preset/workspace-files-stage-authority.js +479 -0
- package/src/generators/preset/workspace-files-stage-authority.js.map +1 -0
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +40 -0
- package/src/generators/preset/workspace-files-thin-deploy.js +1500 -0
- package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -0
- package/src/generators/preset/workspace-files-thin-docs.d.ts +5 -0
- package/src/generators/preset/workspace-files-thin-docs.js +240 -0
- package/src/generators/preset/workspace-files-thin-docs.js.map +1 -0
- package/src/generators/preset/workspace-files-thin-release.d.ts +14 -0
- package/src/generators/preset/workspace-files-thin-release.js +26 -0
- package/src/generators/preset/workspace-files-thin-release.js.map +1 -0
- package/src/generators/preset/workspace-files.d.ts +2 -1
- package/src/generators/preset/workspace-files.js +448 -680
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +149 -19
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/repository-policy/schema.d.ts +2 -0
- package/src/generators/repository-policy/schema.json +11 -1
- package/src/generators/repository-policy/tree-policy.d.ts +3 -0
- package/src/generators/repository-policy/tree-policy.js +25 -0
- package/src/generators/repository-policy/tree-policy.js.map +1 -0
- package/src/generators/slice/built-in-plan-api-files.js +1 -0
- package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-async-work-files.js +41 -0
- package/src/generators/slice/built-in-plan-async-work-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +6 -0
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +5 -31
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-data-files.js +89 -30
- package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +19 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +21 -3
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +20 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-foundation-files.js +3 -5
- package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-frontend-files.js +5 -1
- package/src/generators/slice/built-in-plan-frontend-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +199 -188
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-metadata-files.js +13 -0
- package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +307 -0
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-operations-files.js +65 -51
- package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-performance-files.js +97 -19
- package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-project-files.js +9 -68
- package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.js +87 -76
- package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +94 -47
- package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-thin-release-files.d.ts +11 -0
- package/src/generators/slice/built-in-plan-thin-release-files.js +129 -0
- package/src/generators/slice/built-in-plan-thin-release-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-verification-files.js +6 -2
- package/src/generators/slice/built-in-plan-verification-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +4 -2
- package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js +26 -4
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
- package/src/generators/slice/built-in-plan.d.ts +1 -0
- package/src/generators/slice/built-in-plan.js +28 -11
- package/src/generators/slice/built-in-plan.js.map +1 -1
- package/src/generators/slice/slice.js +30 -32
- package/src/generators/slice/slice.js.map +1 -1
- package/src/generators/upgrade/upgrade.d.ts +1 -1
- package/src/generators/upgrade/upgrade.js +200 -48
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/generators/workload/performance-registration.d.ts +1 -0
- package/src/generators/workload/performance-registration.js +9 -11
- package/src/generators/workload/performance-registration.js.map +1 -1
- package/src/generators/workload/service-performance-files.d.ts +1 -0
- package/src/generators/workload/service-performance-files.js +27 -7
- package/src/generators/workload/service-performance-files.js.map +1 -1
- package/src/generators/workload/workload.d.ts +1 -1
- package/src/generators/workload/workload.js +55 -28
- package/src/generators/workload/workload.js.map +1 -1
- package/src/git-policy/github-bootstrap.d.ts +28 -7
- package/src/git-policy/github-bootstrap.js +205 -163
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/local-dev/private-state.d.ts +3 -0
- package/src/local-dev/private-state.js +17 -5
- package/src/local-dev/private-state.js.map +1 -1
- package/src/local-dev/tls.js +5 -1
- package/src/local-dev/tls.js.map +1 -1
- package/src/performance/cost-collection.d.ts +1 -1
- package/src/performance/cost-collection.js +4 -2
- package/src/performance/cost-collection.js.map +1 -1
- package/src/performance/cost-controls.d.ts +3 -1
- package/src/performance/cost-controls.js +9 -4
- package/src/performance/cost-controls.js.map +1 -1
- package/src/performance/evidence.d.ts +1 -1
- package/src/performance/evidence.js +5 -3
- package/src/performance/evidence.js.map +1 -1
- package/src/performance/load-safety.js +5 -3
- package/src/performance/load-safety.js.map +1 -1
- package/src/performance/model.d.ts +2 -2
- package/src/performance/model.js +4 -3
- package/src/performance/model.js.map +1 -1
- package/src/release/index.d.ts +0 -2
- package/src/release/index.js +0 -2
- package/src/release/index.js.map +1 -1
- package/src/release/source-authority.d.ts +4 -5
- package/src/release/source-authority.js +13 -123
- package/src/release/source-authority.js.map +1 -1
- package/src/repository-policy/aurora-preflight.d.ts +1 -1
- package/src/repository-policy/aurora-preflight.js +4 -1
- package/src/repository-policy/aurora-preflight.js.map +1 -1
- package/src/repository-policy/policy.d.ts +21 -2
- package/src/repository-policy/policy.js +290 -25
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/performance-policy-v1.json +3 -1
- package/src/schemas/repository-policy-v1.json +46 -2
- package/src/secrets/adapters.d.ts +7 -2
- package/src/secrets/adapters.js +34 -3
- package/src/secrets/adapters.js.map +1 -1
- package/src/secrets/aws-control-plane.d.ts +10 -1
- package/src/secrets/aws-control-plane.js +67 -0
- package/src/secrets/aws-control-plane.js.map +1 -1
- package/src/secrets/generated-aws-control-plane.d.ts +23 -0
- package/src/secrets/generated-aws-control-plane.js +259 -0
- package/src/secrets/generated-aws-control-plane.js.map +1 -0
- package/src/secrets/metadata.js +38 -10
- package/src/secrets/metadata.js.map +1 -1
- package/src/secrets/model.d.ts +8 -1
- package/src/secrets/model.js +24 -3
- package/src/secrets/model.js.map +1 -1
- package/src/secrets/operator.d.ts +89 -3
- package/src/secrets/operator.js +422 -9
- package/src/secrets/operator.js.map +1 -1
- package/src/secrets/registry.d.ts +2 -1
- package/src/secrets/registry.js +18 -1
- package/src/secrets/registry.js.map +1 -1
- package/src/secrets/workload-access.js +10 -2
- package/src/secrets/workload-access.js.map +1 -1
- package/src/supply-chain/action-pins.js +61 -7
- package/src/supply-chain/action-pins.js.map +1 -1
- package/src/supply-chain/build-output-bounds.d.ts +2 -0
- package/src/supply-chain/build-output-bounds.js +12 -0
- package/src/supply-chain/build-output-bounds.js.map +1 -0
- package/src/supply-chain/build-output.js +2 -4
- package/src/supply-chain/build-output.js.map +1 -1
- package/src/supply-chain/ecr-scanning.d.ts +5 -3
- package/src/supply-chain/ecr-scanning.js +11 -7
- package/src/supply-chain/ecr-scanning.js.map +1 -1
- package/src/supply-chain/ecs-deployed-image.d.ts +5 -3
- package/src/supply-chain/ecs-deployed-image.js +6 -4
- package/src/supply-chain/ecs-deployed-image.js.map +1 -1
- package/src/supply-chain/generated-container-release-command.js +849 -44
- package/src/supply-chain/generated-container-release-command.js.map +1 -1
- package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -1
- package/src/supply-chain/generated-ecr-collector-command.js +188 -91
- package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
- package/src/supply-chain/generated-files.js +4 -3
- package/src/supply-chain/generated-files.js.map +1 -1
- package/src/supply-chain/index.d.ts +1 -1
- package/src/supply-chain/index.js +2 -1
- package/src/supply-chain/index.js.map +1 -1
- package/src/workload-roles/index.d.ts +10 -17
- package/src/workload-roles/index.js +5 -18
- package/src/workload-roles/index.js.map +1 -1
- package/src/workspace-deployment/identity.d.ts +3 -0
- package/src/workspace-deployment/identity.js +22 -0
- package/src/workspace-deployment/identity.js.map +1 -0
- package/src/workspace-deployment/index.d.ts +3 -0
- package/src/workspace-deployment/index.js +7 -0
- package/src/workspace-deployment/index.js.map +1 -0
- package/src/workspace-deployment/migration-evidence.d.ts +29 -0
- package/src/workspace-deployment/migration-evidence.js +83 -0
- package/src/workspace-deployment/migration-evidence.js.map +1 -0
- package/src/workspace-deployment/migration.d.ts +27 -0
- package/src/workspace-deployment/migration.js +109 -0
- package/src/workspace-deployment/migration.js.map +1 -0
- package/src/workspace-deployment/ownership.d.ts +81 -0
- package/src/workspace-deployment/ownership.js +381 -0
- package/src/workspace-deployment/ownership.js.map +1 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.evaluateFoundationRemoval = evaluateFoundationRemoval;
|
|
4
4
|
exports.productSliceRegistrationName = productSliceRegistrationName;
|
|
5
|
+
exports.inspectProductSliceRegistrations = inspectProductSliceRegistrations;
|
|
6
|
+
exports.runFoundationRemovePreflight = runFoundationRemovePreflight;
|
|
5
7
|
const client_ssm_1 = require("@aws-sdk/client-ssm");
|
|
6
8
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
7
9
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -28,42 +30,63 @@ function productSliceRegistrationName(foundationStage, parameterName) {
|
|
|
28
30
|
? relativeName
|
|
29
31
|
: `[unrecognized registration] ${parameterName}`;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
async function inspectProductSliceRegistrations(foundationStage, fetchPage) {
|
|
34
|
+
const registrations = [];
|
|
35
|
+
const prefix = `${(0, discovery_js_1.productSliceRegistrationRoot)(foundationStage)}/`;
|
|
36
|
+
let nextToken;
|
|
37
|
+
do {
|
|
38
|
+
const response = await fetchPage({
|
|
39
|
+
...(nextToken ? { NextToken: nextToken } : {}),
|
|
40
|
+
ParameterFilters: [
|
|
41
|
+
{
|
|
42
|
+
Key: 'Name',
|
|
43
|
+
Option: 'BeginsWith',
|
|
44
|
+
Values: [prefix],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
});
|
|
48
|
+
registrations.push(...(response.Parameters ?? []).map(({ Name }) => productSliceRegistrationName(foundationStage, Name)));
|
|
49
|
+
nextToken = response.NextToken;
|
|
50
|
+
} while (nextToken);
|
|
51
|
+
return registrations.sort();
|
|
52
|
+
}
|
|
53
|
+
async function runFoundationRemovePreflight(options, dependencies = {}) {
|
|
32
54
|
const region = options.region?.trim() ||
|
|
33
55
|
process.env.AWS_REGION?.trim() ||
|
|
34
56
|
process.env.AWS_DEFAULT_REGION?.trim();
|
|
35
|
-
const client =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
57
|
+
const client = dependencies.sendCommand
|
|
58
|
+
? undefined
|
|
59
|
+
: new client_ssm_1.SSMClient({
|
|
60
|
+
...(options.profile
|
|
61
|
+
? { credentials: (0, credential_providers_1.fromIni)({ profile: options.profile }) }
|
|
62
|
+
: {}),
|
|
63
|
+
...(region ? { region } : {}),
|
|
64
|
+
});
|
|
65
|
+
const sendCommand = dependencies.sendCommand ??
|
|
66
|
+
(async (command) => {
|
|
67
|
+
if (!client) {
|
|
68
|
+
throw new Error('SSM client is unavailable.');
|
|
69
|
+
}
|
|
70
|
+
return client.send(command);
|
|
71
|
+
});
|
|
72
|
+
let registrations;
|
|
43
73
|
try {
|
|
44
|
-
|
|
45
|
-
const response = await client.send(new client_ssm_1.GetParametersByPathCommand({
|
|
46
|
-
NextToken: nextToken,
|
|
47
|
-
Path: (0, discovery_js_1.productSliceRegistrationRoot)(options.stage),
|
|
48
|
-
Recursive: true,
|
|
49
|
-
}));
|
|
50
|
-
registrations.push(...(response.Parameters ?? []).map(({ Name }) => productSliceRegistrationName(options.stage, Name)));
|
|
51
|
-
nextToken = response.NextToken;
|
|
52
|
-
} while (nextToken);
|
|
74
|
+
registrations = await inspectProductSliceRegistrations(options.stage, (input) => sendCommand(new client_ssm_1.DescribeParametersCommand(input)));
|
|
53
75
|
}
|
|
54
76
|
catch (error) {
|
|
55
77
|
devkit_1.logger.error(`[foundation-remove-preflight] foundationStage=${options.stage}: unable to inspect Product Slice registrations. ${error instanceof Error ? error.message : String(error)}`);
|
|
56
78
|
return { success: false };
|
|
57
79
|
}
|
|
58
80
|
finally {
|
|
59
|
-
client
|
|
81
|
+
client?.destroy();
|
|
60
82
|
}
|
|
61
|
-
const result = evaluateFoundationRemoval(options.stage, registrations
|
|
83
|
+
const result = evaluateFoundationRemoval(options.stage, registrations);
|
|
62
84
|
if (result.success)
|
|
63
85
|
devkit_1.logger.info(result.message);
|
|
64
86
|
else
|
|
65
87
|
devkit_1.logger.error(result.message);
|
|
66
88
|
return { success: result.success };
|
|
67
|
-
}
|
|
89
|
+
}
|
|
90
|
+
const executor = (options) => runFoundationRemovePreflight(options);
|
|
68
91
|
exports.default = executor;
|
|
69
92
|
//# sourceMappingURL=foundation-remove-preflight.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation-remove-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-remove-preflight/foundation-remove-preflight.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"foundation-remove-preflight.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/foundation-remove-preflight/foundation-remove-preflight.ts"],"names":[],"mappings":";;AAiBA,8DAcC;AAED,oEAYC;AAaD,4EA4BC;AAED,oEA2CC;AAnID,oDAK6B;AAC7B,wEAAwD;AACxD,uCAA0D;AAC1D,gEAA6E;AAS7E,SAAgB,yBAAyB,CACvC,eAAuB,EACvB,iBAAoC;IAEpC,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,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AC;QACH,aAAa,GAAG,MAAM,gCAAgC,CACpD,OAAO,CAAC,KAAK,EACb,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,sCAAyB,CAAC,KAAK,CAAC,CAAC,CAC7D,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CACV,iDAAiD,OAAO,CAAC,KAAK,oDAAoD,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAC3K,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,OAAO,EAAE,CAAC;IACpB,CAAC;IAED,MAAM,MAAM,GAAG,yBAAyB,CAAC,OAAO,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;IACvE,IAAI,MAAM,CAAC,OAAO;QAAE,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;;QAC3C,eAAM,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;AACrC,CAAC;AAED,MAAM,QAAQ,GAAsD,CAAC,OAAO,EAAE,EAAE,CAC9E,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAExC,kBAAe,QAAQ,CAAC"}
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
"default": "development"
|
|
12
12
|
},
|
|
13
13
|
"region": { "type": "string" },
|
|
14
|
-
"profile": { "type": "string" }
|
|
14
|
+
"profile": { "type": "string" },
|
|
15
|
+
"expectedRoleArn": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^arn:(aws|aws-us-gov|aws-cn):iam::[0-9]{12}:role/[A-Za-z0-9+=,.@_/-]{1,512}$",
|
|
18
|
+
"description": "Exact stage deployment role forwarded to the governed remove executor. The preflight accepts but does not consume this authority input."
|
|
19
|
+
}
|
|
15
20
|
},
|
|
16
21
|
"required": ["stage"]
|
|
17
22
|
}
|
|
@@ -14,6 +14,7 @@ const executor = async (options, context) => {
|
|
|
14
14
|
const report = await (0, index_js_1.runGitHubBootstrap)({
|
|
15
15
|
apply: options.apply === true,
|
|
16
16
|
deploymentProfile: policy.deploymentProfile,
|
|
17
|
+
immutableOidcTrustAcknowledgement: options.immutableOidcTrustAcknowledgement,
|
|
17
18
|
npmPrereleaseReviewerIds: parseReviewerIds(options.npmPrereleaseReviewerIds),
|
|
18
19
|
productionApprovalMode: policy.productionApproval.mode,
|
|
19
20
|
productionReviewerIds: parseReviewerIds(options.productionReviewerIds),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-bootstrap.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/github-bootstrap/github-bootstrap.ts"],"names":[],"mappings":";;AAAA,uCAA0D;AAC1D,wDAA+D;AAC/D,+DAAiF;
|
|
1
|
+
{"version":3,"file":"github-bootstrap.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/executors/github-bootstrap/github-bootstrap.ts"],"names":[],"mappings":";;AAAA,uCAA0D;AAC1D,wDAA+D;AAC/D,+DAAiF;AAUjF,SAAS,gBAAgB,CAAC,KAAyB;IACjD,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAC9B,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,QAAQ,GAAoD,KAAK,EACrE,OAAO,EACP,OAAO,EACP,EAAE;IACF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAA,wCAA6B,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3D,MAAM,MAAM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GitHub bootstrap",
|
|
5
|
-
"description": "Report or explicitly apply protected repository rules and
|
|
5
|
+
"description": "Report or explicitly apply protected repository rules, environments, and the default immutable GitHub OIDC repository subject without creating secrets, branches, or credentials.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
"default": false,
|
|
17
17
|
"description": "Apply the reported GitHub settings. Omit for the default read-only report."
|
|
18
18
|
},
|
|
19
|
+
"immutableOidcTrustAcknowledgement": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^aws-trust-ready:repo:",
|
|
22
|
+
"maxLength": 512,
|
|
23
|
+
"description": "Required only when --apply would enable GitHub's immutable repository OIDC subject. Supply aws-trust-ready:<reported repositoryIdentity.subjectPrefix> only after the matching AWS trusts have been applied, read back, and verified."
|
|
24
|
+
},
|
|
19
25
|
"npmPrereleaseReviewerIds": {
|
|
20
26
|
"type": "string",
|
|
21
27
|
"pattern": "^[1-9][0-9]*(,[1-9][0-9]*)*$",
|
|
@@ -1,378 +1,36 @@
|
|
|
1
1
|
import { type ExecutorContext, type PromiseExecutor } from '@nx/devkit';
|
|
2
|
-
import {
|
|
3
|
-
import { type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
operation?: 'finalize-convergence' | 'plan';
|
|
12
|
-
operationalEvidencePath?: string;
|
|
13
|
-
pendingConvergencePath?: string;
|
|
14
|
-
smokeBindingPath?: string;
|
|
15
|
-
smokeEvidencePath?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface InfrastructureResourceObservationCoverage {
|
|
18
|
-
adapter: 'aws-resource-groups-tagging-api' | 'none' | 'sst-pulumi-refresh-preview' | 'sst-pulumi-refresh-preview+aws-secrets-manager-version-stages';
|
|
19
|
-
arnDigest: string | null;
|
|
20
|
-
coveredProperties: readonly string[];
|
|
21
|
-
type: string;
|
|
22
|
-
unobservedMaterialProperties: readonly string[];
|
|
23
|
-
urn: string;
|
|
24
|
-
}
|
|
25
|
-
interface DriftEvidence {
|
|
26
|
-
coverage: readonly InfrastructureResourceObservationCoverage[];
|
|
27
|
-
digest: string;
|
|
28
|
-
expiresAt: string;
|
|
29
|
-
generatedAt: string;
|
|
30
|
-
status: InfrastructureDriftStatus;
|
|
31
|
-
}
|
|
32
|
-
interface RefreshPreviewDiagnosticResource {
|
|
33
|
-
changeBasis: readonly ('detailedDiff' | 'diffs' | 'old-new')[];
|
|
34
|
-
changedPropertyPaths: readonly string[];
|
|
35
|
-
logicalId: string;
|
|
36
|
-
resourceType: string;
|
|
37
|
-
}
|
|
38
|
-
interface RefreshPreviewExternalLookupNormalization {
|
|
39
|
-
changedPropertyPath: '/inputs/name' | '/inputs/tags/Name';
|
|
40
|
-
logicalId: string;
|
|
41
|
-
resourceType: string;
|
|
42
|
-
}
|
|
43
|
-
interface RefreshPreviewExternalFrameworkTagObservation {
|
|
44
|
-
changedPropertyPaths: readonly string[];
|
|
45
|
-
logicalId: string;
|
|
46
|
-
providerReadLogicalId: string;
|
|
47
|
-
resourceType: string;
|
|
48
|
-
}
|
|
49
|
-
interface RefreshPreviewDiagnostics {
|
|
50
|
-
authorityMode: 'ordinary-and-refresh-separated' | 'refresh-reconciliation';
|
|
51
|
-
command: {
|
|
52
|
-
errorCode: string | null;
|
|
53
|
-
signal: string | null;
|
|
54
|
-
status: number | null;
|
|
55
|
-
stderrBytes: number;
|
|
56
|
-
stdoutBytes: number;
|
|
57
|
-
};
|
|
58
|
-
commandSucceeded: boolean;
|
|
59
|
-
complete: boolean;
|
|
60
|
-
entryCounts: {
|
|
61
|
-
desired: number;
|
|
62
|
-
externalFrameworkTagObserved: number;
|
|
63
|
-
externalLookupNormalized: number;
|
|
64
|
-
inertSame: number;
|
|
65
|
-
refresh: number;
|
|
66
|
-
rejectedSame: number;
|
|
67
|
-
};
|
|
68
|
-
providerRefreshSeparated: boolean;
|
|
69
|
-
ordinaryDesired: {
|
|
70
|
-
complete: boolean;
|
|
71
|
-
failureCounts: Readonly<Record<string, number>>;
|
|
72
|
-
resourceCount: number;
|
|
73
|
-
};
|
|
74
|
-
postRefreshDesired: {
|
|
75
|
-
complete: boolean;
|
|
76
|
-
failureCounts: Readonly<Record<string, number>>;
|
|
77
|
-
operationCounts: Readonly<Record<string, number>>;
|
|
78
|
-
resourceCount: number;
|
|
79
|
-
};
|
|
80
|
-
digest: string;
|
|
81
|
-
kind: 'ebk-infrastructure-refresh-preview-diagnostics';
|
|
82
|
-
externalFrameworkTagObservations: readonly RefreshPreviewExternalFrameworkTagObservation[];
|
|
83
|
-
externalLookupNormalizations: readonly RefreshPreviewExternalLookupNormalization[];
|
|
84
|
-
resources: readonly RefreshPreviewDiagnosticResource[];
|
|
85
|
-
schemaVersion: 7;
|
|
86
|
-
}
|
|
87
|
-
export interface InfrastructureObservation {
|
|
88
|
-
callInventory: readonly string[];
|
|
89
|
-
drift: DriftEvidence;
|
|
90
|
-
observerArnDigest: string;
|
|
91
|
-
resources?: readonly InfrastructureObservedResource[];
|
|
92
|
-
state: InfrastructureStateIdentityV1;
|
|
93
|
-
}
|
|
94
|
-
export interface InfrastructureObservedResource {
|
|
95
|
-
dependencyDigests: readonly string[];
|
|
96
|
-
logicalId: string;
|
|
97
|
-
physicalArn?: string;
|
|
98
|
-
physicalId?: string;
|
|
99
|
-
physicalSelector?: Readonly<Record<string, string>>;
|
|
100
|
-
physicalIdentityDigest: string | null;
|
|
101
|
-
protected: boolean | null;
|
|
102
|
-
resourceType: string;
|
|
103
|
-
retainedOnDelete: boolean | null;
|
|
104
|
-
urnDigest: string;
|
|
105
|
-
}
|
|
106
|
-
interface ReviewedApprovalFile {
|
|
107
|
-
approval: InfrastructureApprovalRecordV1;
|
|
108
|
-
governance?: unknown;
|
|
109
|
-
planned: InfrastructurePlanV1;
|
|
110
|
-
}
|
|
111
|
-
interface CommandResult {
|
|
112
|
-
error?: NodeJS.ErrnoException;
|
|
113
|
-
signal?: NodeJS.Signals | null;
|
|
114
|
-
status: number | null;
|
|
115
|
-
stderr: string;
|
|
116
|
-
stdout: string;
|
|
117
|
-
}
|
|
118
|
-
export interface InfrastructurePlanExecutorDependencies {
|
|
119
|
-
localCapability?: (input: Parameters<typeof consumeLocalMutationCapability>[0]) => void;
|
|
120
|
-
now?: () => Date;
|
|
121
|
-
observe?: (input: {
|
|
122
|
-
action: InfrastructureMutationAction;
|
|
123
|
-
backendBootstrapDigest: string;
|
|
124
|
-
childEnvironment: NodeJS.ProcessEnv;
|
|
125
|
-
environment: NodeJS.ProcessEnv;
|
|
126
|
-
invocation: SstCommandInvocation;
|
|
127
|
-
now: Date;
|
|
128
|
-
ordinaryDiff: NormalizedSstDiffV1;
|
|
129
|
-
project: string;
|
|
130
|
-
sourceCommit: string;
|
|
131
|
-
spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
|
|
132
|
-
toolVersion: string;
|
|
133
|
-
}) => InfrastructureObservation;
|
|
134
|
-
spawn?: (executable: string, args: readonly string[], options: {
|
|
135
|
-
cwd: string;
|
|
136
|
-
encoding: 'utf8';
|
|
137
|
-
env: NodeJS.ProcessEnv;
|
|
138
|
-
maxBuffer: number;
|
|
139
|
-
shell: false;
|
|
140
|
-
}) => CommandResult;
|
|
141
|
-
}
|
|
142
|
-
export declare const MAX_SST_DIFF_JSON_BYTES: number;
|
|
143
|
-
interface InfrastructureBuildArtifactEntry {
|
|
144
|
-
digest: string;
|
|
145
|
-
path: string;
|
|
146
|
-
size: number;
|
|
147
|
-
}
|
|
148
|
-
interface InfrastructureBuildArtifactMaterial {
|
|
149
|
-
digest: string;
|
|
150
|
-
entries: readonly InfrastructureBuildArtifactEntry[];
|
|
151
|
-
kind: 'ebk-infrastructure-build-artifacts';
|
|
152
|
-
schemaVersion: 1;
|
|
153
|
-
}
|
|
154
|
-
/** @internal */
|
|
155
|
-
export declare function collectInfrastructureBuildArtifacts(projectRoot: string): InfrastructureBuildArtifactMaterial;
|
|
156
|
-
/** @internal */
|
|
157
|
-
export declare function infrastructureConfigurationMetadataDigest(input: {
|
|
158
|
-
buildArtifactDigest: string;
|
|
159
|
-
configurationInputs: readonly {
|
|
160
|
-
contents: string;
|
|
161
|
-
path: string;
|
|
162
|
-
}[];
|
|
163
|
-
releaseCandidateDigest: string;
|
|
164
|
-
}): string;
|
|
165
|
-
type StandardRemoveProbeKind = 'aws-cloud-control' | 'aws-events-target' | 'aws-iam-role-policy' | 'aws-kms-retained' | 'aws-lambda-event-invoke-config' | 'aws-lambda-permission' | 'aws-logs-data-protection-policy' | 'aws-s3-retained' | 'aws-s3-object' | 'aws-secrets-manager-secret' | 'aws-sqs-queue-policy' | 'aws-ssm-parameter';
|
|
166
|
-
interface StandardRemoveProbe {
|
|
167
|
-
identifier: string;
|
|
168
|
-
kind: StandardRemoveProbeKind;
|
|
169
|
-
protectionProfile?: string;
|
|
170
|
-
selector?: Readonly<Record<string, string>>;
|
|
171
|
-
typeName?: string;
|
|
172
|
-
}
|
|
173
|
-
export declare function matchesExpectedAssumedRoleArn(account: string, callerArn: string, expectedRoleArn: string): boolean;
|
|
174
|
-
export declare function localProductionConfirmation(input: {
|
|
175
|
-
action: InfrastructureMutationAction;
|
|
176
|
-
accountId: string;
|
|
177
|
-
region: string;
|
|
178
|
-
sourceCommit: string;
|
|
179
|
-
}): string;
|
|
180
|
-
export declare function revalidateLocalUnlockCallerAuthority(input: {
|
|
181
|
-
environment?: NodeJS.ProcessEnv;
|
|
182
|
-
invocation: SstCommandInvocation;
|
|
2
|
+
import { spawn, spawnSync } from 'node:child_process';
|
|
3
|
+
import { type CanonicalDeploymentStage } from '../../repository-policy/index.js';
|
|
4
|
+
import { createLocalFederatedCredentialTransport } from '../local-deploy/federated-credential-transport.js';
|
|
5
|
+
import { localWorkingTreeDigest } from '../local-deploy/local-deploy.js';
|
|
6
|
+
import { assertWorkspaceStageOwnershipForWorkspace } from '../../workspace-deployment/index.js';
|
|
7
|
+
export { matchesExpectedAssumedRoleArn } from '../../aws/identity.js';
|
|
8
|
+
export interface InfrastructurePlanExecutorOptions {
|
|
9
|
+
cwd?: string;
|
|
10
|
+
expectedRoleArn?: string;
|
|
183
11
|
profile?: string;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Reads the Pulumi StepEventStateMetadata `new.id` emitted by SST's pinned
|
|
189
|
-
* JSON diff for imports. Only its digest leaves this private boundary.
|
|
190
|
-
*/
|
|
191
|
-
export declare function extractPrivateImportIdentifierDigests(diffStdout: string, diff: NormalizedSstDiffV1): Readonly<Record<string, string>>;
|
|
192
|
-
/** @internal */
|
|
193
|
-
export declare function releaseCandidateBinding(input: {
|
|
194
|
-
project: string;
|
|
195
|
-
projectRoot: string;
|
|
196
|
-
repository: string;
|
|
197
|
-
sourceCommit: string;
|
|
198
|
-
workspaceRoot: string;
|
|
199
|
-
}): {
|
|
200
|
-
digest: string;
|
|
201
|
-
path: string;
|
|
202
|
-
};
|
|
203
|
-
/** @internal */
|
|
204
|
-
export declare function approvalCandidateSourceCommit(context: ExecutorContext, options: InfrastructurePlanExecutorOptions, environment: NodeJS.ProcessEnv): string | undefined;
|
|
205
|
-
/** @internal */
|
|
206
|
-
export declare function createCandidateBoundSstChildEnvironment(environment: NodeJS.ProcessEnv, invocationEnvironment: SstCommandInvocation['environment'], candidateSourceCommit: string): NodeJS.ProcessEnv;
|
|
207
|
-
interface PulumiStateResource {
|
|
208
|
-
custom?: unknown;
|
|
209
|
-
dependencies?: unknown;
|
|
210
|
-
external?: unknown;
|
|
211
|
-
id?: unknown;
|
|
212
|
-
inputs?: unknown;
|
|
213
|
-
outputs?: unknown;
|
|
214
|
-
parent?: unknown;
|
|
215
|
-
provider?: unknown;
|
|
216
|
-
protect?: unknown;
|
|
217
|
-
retainOnDelete?: unknown;
|
|
218
|
-
type?: unknown;
|
|
219
|
-
urn?: unknown;
|
|
12
|
+
region?: string;
|
|
13
|
+
stage: CanonicalDeploymentStage;
|
|
14
|
+
stageMode: 'consumer' | 'foundation';
|
|
220
15
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
invocation: SstCommandInvocation;
|
|
234
|
-
ordinaryDiff: NormalizedSstDiffV1;
|
|
235
|
-
spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
|
|
236
|
-
stateResources?: readonly PulumiStateResource[];
|
|
237
|
-
toolVersion: string;
|
|
238
|
-
childEnvironment: NodeJS.ProcessEnv;
|
|
239
|
-
}): {
|
|
240
|
-
commandSucceeded: boolean;
|
|
241
|
-
complete: boolean;
|
|
242
|
-
diagnostics: RefreshPreviewDiagnostics;
|
|
243
|
-
providerRefreshSeparated: boolean;
|
|
244
|
-
digest: string;
|
|
245
|
-
drift: NormalizedSstDiffV1;
|
|
246
|
-
observedRefreshUrns: readonly string[];
|
|
247
|
-
rawDrift: string;
|
|
248
|
-
stderr: string;
|
|
249
|
-
};
|
|
250
|
-
/** @internal */
|
|
251
|
-
export declare function requiresIamMutationAnalysis(_action: InfrastructureMutationAction, resource: NormalizedSstDiffV1['resources'][number]): boolean;
|
|
252
|
-
export declare function standardRemoveProbeForResource(resource: InfrastructureObservedResource): StandardRemoveProbe;
|
|
253
|
-
interface StandardRemoveProbeResult {
|
|
254
|
-
present: boolean;
|
|
255
|
-
protectionDigest: string | null;
|
|
16
|
+
interface InfrastructurePlanDependencies {
|
|
17
|
+
createTransport?: typeof createLocalFederatedCredentialTransport;
|
|
18
|
+
environment?: NodeJS.ProcessEnv;
|
|
19
|
+
identifyGithubCaller?: (region: string) => Promise<{
|
|
20
|
+
Account?: string;
|
|
21
|
+
Arn?: string;
|
|
22
|
+
}>;
|
|
23
|
+
ownership?: typeof assertWorkspaceStageOwnershipForWorkspace;
|
|
24
|
+
readSource?: typeof localWorkingTreeDigest;
|
|
25
|
+
platform?: NodeJS.Platform;
|
|
26
|
+
run?: typeof spawnSync;
|
|
27
|
+
spawnChild?: typeof spawn;
|
|
256
28
|
}
|
|
257
|
-
export declare function probeStandardRemoveResource(input: {
|
|
258
|
-
childEnvironment: NodeJS.ProcessEnv;
|
|
259
|
-
invocation: SstCommandInvocation;
|
|
260
|
-
probe: StandardRemoveProbe;
|
|
261
|
-
spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
|
|
262
|
-
}): StandardRemoveProbeResult;
|
|
263
|
-
export declare function observeInfrastructureState(input: {
|
|
264
|
-
action: InfrastructureMutationAction;
|
|
265
|
-
backendBootstrapDigest: string;
|
|
266
|
-
childEnvironment: NodeJS.ProcessEnv;
|
|
267
|
-
environment: NodeJS.ProcessEnv;
|
|
268
|
-
invocation: SstCommandInvocation;
|
|
269
|
-
now: Date;
|
|
270
|
-
ordinaryDiff: NormalizedSstDiffV1;
|
|
271
|
-
project: string;
|
|
272
|
-
sourceCommit: string;
|
|
273
|
-
spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
|
|
274
|
-
toolVersion: string;
|
|
275
|
-
}): InfrastructureObservation;
|
|
276
|
-
/** @internal */
|
|
277
|
-
export declare function actionRisk(risk: InfrastructureRiskAssessmentV1, action: InfrastructureMutationAction, options?: Readonly<{
|
|
278
|
-
diffComplete?: boolean;
|
|
279
|
-
}>): InfrastructureRiskAssessmentV1;
|
|
280
|
-
export declare function validateGovernanceEvidence(reviewed: {
|
|
281
|
-
approval?: InfrastructureApprovalRecordV1;
|
|
282
|
-
governance?: unknown;
|
|
283
|
-
} | undefined, plan: InfrastructurePlanV1, observedResources?: readonly InfrastructureObservedResource[], importIdentifierDigests?: Readonly<Record<string, string>>, adoptedImportPolicy?: InfrastructureRiskPolicyV1['adoptedImports']): Readonly<Record<string, string>>;
|
|
284
|
-
/** @internal */
|
|
285
|
-
export declare function createLocalPlanApprovalRecord(input: {
|
|
286
|
-
context: ExecutorContext;
|
|
287
|
-
environment: NodeJS.ProcessEnv;
|
|
288
|
-
now: Date;
|
|
289
|
-
plan: InfrastructurePlanV1;
|
|
290
|
-
}): InfrastructureApprovalRecordV1 | undefined;
|
|
291
|
-
/** @internal */
|
|
292
|
-
export declare function hasUnreviewableLocalPlanBlock(plan: InfrastructurePlanV1): boolean;
|
|
293
|
-
/** @internal */
|
|
294
|
-
export declare function createLocalRefreshGovernanceReview(input: {
|
|
295
|
-
approval: InfrastructureApprovalRecordV1;
|
|
296
|
-
environment: NodeJS.ProcessEnv;
|
|
297
|
-
plan: InfrastructurePlanV1;
|
|
298
|
-
}): ReviewedApprovalFile | undefined;
|
|
299
|
-
/** @internal */
|
|
300
|
-
export declare function createLocalDeployGovernanceReview(input: {
|
|
301
|
-
approval: InfrastructureApprovalRecordV1;
|
|
302
|
-
environment: NodeJS.ProcessEnv;
|
|
303
|
-
plan: InfrastructurePlanV1;
|
|
304
|
-
}): ReviewedApprovalFile | undefined;
|
|
305
29
|
/**
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* the project mutation executor consumes one invocation-scoped capability and
|
|
309
|
-
* rechecks source, artifacts, credentials, policy, state identity, and lock
|
|
310
|
-
* immediately before spawn without claiming provider-preview replay.
|
|
311
|
-
*
|
|
312
|
-
* @internal
|
|
30
|
+
* Run SST's native diff as advisory output. The result is intentionally not
|
|
31
|
+
* normalized, retained, or used as later mutation authority.
|
|
313
32
|
*/
|
|
314
|
-
export declare function
|
|
315
|
-
context: ExecutorContext;
|
|
316
|
-
environment: NodeJS.ProcessEnv;
|
|
317
|
-
now: Date;
|
|
318
|
-
plan: InfrastructurePlanV1;
|
|
319
|
-
}): InfrastructureAuthorizationEvidenceV1;
|
|
320
|
-
/** @internal */
|
|
321
|
-
export declare function requiresGovernanceValidation(input: {
|
|
322
|
-
action: InfrastructureMutationAction;
|
|
323
|
-
adoptedImportCount: number;
|
|
324
|
-
hasApproval: boolean;
|
|
325
|
-
}): boolean;
|
|
326
|
-
/** @internal */
|
|
327
|
-
export declare function isLocalPlanReviewPending(input: {
|
|
328
|
-
context: ExecutorContext;
|
|
329
|
-
environment: NodeJS.ProcessEnv;
|
|
330
|
-
plan: InfrastructurePlanV1;
|
|
331
|
-
validation: InfrastructureAuthorizationEvidenceV1['validation'];
|
|
332
|
-
}): boolean;
|
|
333
|
-
interface LocalMutationStateObservation {
|
|
334
|
-
actorArn: string;
|
|
335
|
-
exportedState: unknown;
|
|
336
|
-
identity: InfrastructureStateIdentityV1;
|
|
337
|
-
resourceCount: number;
|
|
338
|
-
}
|
|
339
|
-
/** @internal */
|
|
340
|
-
export declare function observeLocalMutationStateIdentity(input: {
|
|
341
|
-
backendBootstrapDigest: string;
|
|
342
|
-
childEnvironment: NodeJS.ProcessEnv;
|
|
343
|
-
environment: NodeJS.ProcessEnv;
|
|
344
|
-
invocation: SstCommandInvocation;
|
|
345
|
-
now: Date;
|
|
346
|
-
project: string;
|
|
347
|
-
sourceCommit: string;
|
|
348
|
-
spawn: NonNullable<InfrastructurePlanExecutorDependencies['spawn']>;
|
|
349
|
-
}): LocalMutationStateObservation;
|
|
350
|
-
/** @internal */
|
|
351
|
-
export declare function retainLocalRefreshStateBackup(input: {
|
|
352
|
-
context: ExecutorContext;
|
|
353
|
-
now: Date;
|
|
354
|
-
observation: LocalMutationStateObservation;
|
|
355
|
-
plan: InfrastructurePlanV1;
|
|
356
|
-
project: string;
|
|
357
|
-
}): void;
|
|
358
|
-
declare function consumeLocalMutationCapability(input: {
|
|
359
|
-
action: Extract<InfrastructureMutationAction, 'deploy' | 'refresh'>;
|
|
360
|
-
authorizationContents: string;
|
|
361
|
-
context: ExecutorContext;
|
|
362
|
-
dependencies: InfrastructurePlanExecutorDependencies;
|
|
363
|
-
environment: NodeJS.ProcessEnv;
|
|
364
|
-
invocation: SstCommandInvocation;
|
|
365
|
-
now: Date;
|
|
366
|
-
options: InfrastructurePlanExecutorOptions;
|
|
367
|
-
plan: InfrastructurePlanV1;
|
|
368
|
-
planContents: string;
|
|
369
|
-
}): void;
|
|
370
|
-
export declare function runInfrastructurePlanExecutor(options: InfrastructurePlanExecutorOptions, context: ExecutorContext, environment?: NodeJS.ProcessEnv, dependencies?: InfrastructurePlanExecutorDependencies): Promise<{
|
|
371
|
-
success: boolean;
|
|
372
|
-
}>;
|
|
373
|
-
export declare function revalidateInfrastructureMutationAuthorization(action: InfrastructureMutationAction, options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, environment?: NodeJS.ProcessEnv, dependencies?: InfrastructurePlanExecutorDependencies): Promise<void>;
|
|
374
|
-
export declare function recordInfrastructureMutationConvergence(action: InfrastructureMutationAction, options: SstLifecycleOptions, context: ExecutorContext, invocation: SstCommandInvocation, applySucceeded: boolean, environment?: NodeJS.ProcessEnv, dependencies?: InfrastructurePlanExecutorDependencies): Promise<boolean>;
|
|
375
|
-
export declare function finalizeInfrastructureMutationConvergence(options: InfrastructurePlanExecutorOptions, context: ExecutorContext, environment?: NodeJS.ProcessEnv, dependencies?: Pick<InfrastructurePlanExecutorDependencies, 'now'>): Promise<{
|
|
33
|
+
export declare function runInfrastructurePlanExecutor(options: InfrastructurePlanExecutorOptions, context: ExecutorContext, dependencies?: InfrastructurePlanDependencies): Promise<{
|
|
376
34
|
success: boolean;
|
|
377
35
|
}>;
|
|
378
36
|
declare const executor: PromiseExecutor<InfrastructurePlanExecutorOptions>;
|