@empire-builder-kit/nx 1.0.0-rc.38 → 1.0.0-rc.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/executors.json +5 -0
- package/generators.json +10 -0
- package/package.json +20 -3
- package/src/aws-authority/index.d.ts +1 -0
- package/src/aws-authority/index.js +1 -0
- package/src/aws-authority/lambda-policy-ordering.d.ts +38 -0
- package/src/aws-authority/lambda-policy-ordering.js +56 -0
- package/src/aws-authority/stage-authority.d.ts +11 -3
- package/src/aws-authority/stage-authority.js +615 -29
- package/src/blueprints/external-sandbox.js +21 -9
- package/src/blueprints/manifest.d.ts +1 -1
- package/src/blueprints/resolver.js +28 -15
- package/src/cli/bootstrap.d.ts +1 -1
- package/src/cli/deploy-runtime.d.ts +6 -0
- package/src/cli/deploy-runtime.js +58 -0
- package/src/cli/dev-command.d.ts +16 -4
- package/src/cli/dev-command.js +63 -0
- package/src/cli/main.d.ts +7 -1
- package/src/cli/main.js +128 -20
- package/src/cli/output.d.ts +1 -1
- package/src/developer-agent/context.js +41 -9
- package/src/developer-agent/generator-planning.js +16 -2
- package/src/developer-agent/git-inspection.d.ts +6 -2
- package/src/developer-agent/git-inspection.js +78 -6
- package/src/developer-agent/model.d.ts +4 -2
- package/src/developer-agent/operation-registry.d.ts +5 -0
- package/src/developer-agent/operation-registry.js +179 -23
- package/src/developer-agent/preview-changes.d.ts +2 -0
- package/src/developer-agent/preview-changes.js +14 -2
- package/src/developer-agent/preview-source.js +3 -0
- package/src/developer-agent/validation.js +20 -8
- package/src/developer-agent/workspace-inspection.js +37 -3
- package/src/executors/deployment-plan/deployment-plan.d.ts +2 -0
- package/src/executors/deployment-plan/deployment-plan.js +51 -4
- package/src/executors/dev-doctor/dev-doctor.js +13 -6
- package/src/executors/dev-task-cleanup/dev-task-cleanup.d.ts +23 -0
- package/src/executors/dev-task-cleanup/dev-task-cleanup.js +145 -0
- package/src/executors/dev-task-cleanup/schema.json +9 -0
- package/src/executors/dev-task-cleanup/task-stack-absence.d.ts +27 -0
- package/src/executors/dev-task-cleanup/task-stack-absence.js +281 -0
- package/src/executors/dev-task-cleanup/task-stack-checkpoint.d.ts +12 -0
- package/src/executors/dev-task-cleanup/task-stack-checkpoint.js +92 -0
- package/src/executors/fleet/fleet.js +1 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +28 -1
- package/src/executors/local-deploy/local-deploy.d.ts +8 -1
- package/src/executors/local-deploy/local-deploy.js +97 -24
- package/src/executors/local-deploy/schema.json +8 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +30 -18
- package/src/executors/sst-lifecycle/governed-native-operation.d.ts +2 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js +9 -0
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +5 -0
- package/src/executors/sst-lifecycle/run-sst-command.js +220 -32
- package/src/executors/sst-lifecycle/sst-environment-source.d.ts +8 -0
- package/src/executors/sst-lifecycle/sst-environment-source.js +54 -0
- package/src/executors/sst-lifecycle/task-unlock.d.ts +15 -0
- package/src/executors/sst-lifecycle/task-unlock.js +126 -0
- package/src/foundation/capability-plan.d.ts +43 -0
- package/src/foundation/capability-plan.js +168 -0
- package/src/foundation/discovery.d.ts +14 -11
- package/src/foundation/discovery.js +32 -6
- package/src/foundation/index.d.ts +1 -0
- package/src/foundation/index.js +1 -0
- package/src/foundation/local-database-contract.d.ts +20 -0
- package/src/foundation/local-database-contract.js +262 -13
- package/src/foundation/local-private-smoke-access.d.ts +20 -0
- package/src/foundation/local-private-smoke-access.js +197 -0
- package/src/foundation/preflight.js +37 -18
- package/src/foundation/private-smoke-access.js +10 -2
- package/src/foundation/private-smoke-admission.d.ts +3 -1
- package/src/foundation/private-smoke-admission.js +29 -8
- package/src/foundation/private-smoke-control-plane.js +17 -6
- package/src/foundation/provision-database-bindings.d.ts +5 -0
- package/src/foundation/provision-database-bindings.js +41 -8
- package/src/foundation/provision-logical-database.js +13 -8
- package/src/foundation/requirements.d.ts +3 -3
- package/src/foundation/requirements.js +24 -12
- package/src/foundation/router-waf.d.ts +1 -0
- package/src/foundation/router-waf.js +14 -1
- package/src/generators/blueprint/blueprint.d.ts +5 -0
- package/src/generators/blueprint/blueprint.js +102 -0
- package/src/generators/blueprint/files.d.ts +6 -0
- package/src/generators/blueprint/files.js +217 -0
- package/src/generators/blueprint/schema.d.ts +4 -0
- package/src/generators/blueprint/schema.json +18 -0
- package/src/generators/formatting.js +24 -1
- package/src/generators/logging-registry.d.ts +2 -0
- package/src/generators/logging-registry.js +22 -0
- package/src/generators/preset/workspace-files-adopter-skills.d.ts +7 -0
- package/src/generators/preset/workspace-files-adopter-skills.js +301 -0
- package/src/generators/preset/workspace-files-ci-install.d.ts +2 -0
- package/src/generators/preset/workspace-files-ci-install.js +196 -0
- package/src/generators/preset/workspace-files-developer-agent.js +40 -13
- package/src/generators/preset/workspace-files-performance-load.js +8 -0
- package/src/generators/preset/workspace-files-stage-authority.js +40 -1
- package/src/generators/preset/workspace-files-thin-deploy.js +66 -34
- package/src/generators/preset/workspace-files-thin-docs.js +64 -18
- package/src/generators/preset/workspace-files.d.ts +4 -0
- package/src/generators/preset/workspace-files.js +159 -91
- package/src/generators/repository-policy/repository-policy.js +37 -0
- package/src/generators/slice/built-in-plan-api-contract-files.js +42 -7
- package/src/generators/slice/built-in-plan-api-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-api-files.js +47 -389
- package/src/generators/slice/built-in-plan-async-work-files.js +19 -1912
- package/src/generators/slice/built-in-plan-authorization-files.js +92 -329
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +36 -2
- package/src/generators/slice/built-in-plan-authorization-storage.d.ts +3 -0
- package/src/generators/slice/built-in-plan-authorization-storage.js +119 -0
- package/src/generators/slice/built-in-plan-background-work-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-background-work-files.js +15 -5
- package/src/generators/slice/built-in-plan-data-deletion-files.js +2 -830
- package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-data-files.js +61 -1164
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js +53 -28
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +18 -2
- package/src/generators/slice/built-in-plan-data-retention-job-files.js +7 -2446
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +30 -6
- package/src/generators/slice/built-in-plan-data-rights-files.js +6 -4482
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +4 -15
- package/src/generators/slice/built-in-plan-foundation-files.d.ts +2 -1
- package/src/generators/slice/built-in-plan-foundation-files.js +34 -10
- package/src/generators/slice/built-in-plan-frontend-files.js +2 -2
- package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +180 -522
- package/src/generators/slice/built-in-plan-key-value-cleanup.d.ts +4 -0
- package/src/generators/slice/built-in-plan-key-value-cleanup.js +100 -0
- package/src/generators/slice/built-in-plan-key-value-consumer.d.ts +4 -0
- package/src/generators/slice/built-in-plan-key-value-consumer.js +151 -0
- package/src/generators/slice/built-in-plan-key-value-deletion.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-deletion.js +377 -0
- package/src/generators/slice/built-in-plan-key-value-delivery.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-delivery.js +120 -0
- package/src/generators/slice/built-in-plan-key-value-export.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-export.js +595 -0
- package/src/generators/slice/built-in-plan-key-value-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-files.js +31 -0
- package/src/generators/slice/built-in-plan-key-value-holds.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-holds.js +189 -0
- package/src/generators/slice/built-in-plan-key-value-infrastructure.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-infrastructure.js +102 -0
- package/src/generators/slice/built-in-plan-key-value-performance.d.ts +5 -0
- package/src/generators/slice/built-in-plan-key-value-performance.js +530 -0
- package/src/generators/slice/built-in-plan-key-value-provider.d.ts +4 -0
- package/src/generators/slice/built-in-plan-key-value-provider.js +366 -0
- package/src/generators/slice/built-in-plan-key-value-records.d.ts +3 -0
- package/src/generators/slice/built-in-plan-key-value-records.js +232 -0
- package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.js +103 -0
- package/src/generators/slice/built-in-plan-key-value-retention-job-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-job-files.js +160 -0
- package/src/generators/slice/built-in-plan-key-value-retention-maintenance.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-maintenance.js +329 -0
- package/src/generators/slice/built-in-plan-key-value-retention-worker.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-worker.js +477 -0
- package/src/generators/slice/built-in-plan-key-value-retention.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention.js +184 -0
- package/src/generators/slice/built-in-plan-metadata-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-metadata-files.js +140 -28
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +36 -19
- package/src/generators/slice/built-in-plan-operations-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-operations-files.js +89 -50
- package/src/generators/slice/built-in-plan-performance-files.js +84 -1010
- package/src/generators/slice/built-in-plan-project-files.js +116 -67
- package/src/generators/slice/built-in-plan-release-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-release-files.js +64 -15
- package/src/generators/slice/built-in-plan-reliability-files.js +54 -28
- package/src/generators/slice/built-in-plan-shared.d.ts +3 -1
- package/src/generators/slice/built-in-plan-shared.js +40 -18
- package/src/generators/slice/built-in-plan-sql-events.d.ts +2 -0
- package/src/generators/slice/built-in-plan-sql-events.js +257 -0
- package/src/generators/slice/built-in-plan-testing-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +184 -132
- package/src/generators/slice/built-in-plan-testing-persistence-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-testing-persistence-files.js +178 -0
- package/src/generators/slice/built-in-plan-thin-release-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-thin-release-files.js +35 -2
- package/src/generators/slice/built-in-plan-verification-files.js +70 -0
- package/src/generators/slice/built-in-plan-web-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +191 -14
- package/src/generators/slice/built-in-plan-workload-role-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js +113 -274
- package/src/generators/slice/built-in-plan.d.ts +9 -1
- package/src/generators/slice/built-in-plan.js +49 -21
- package/src/generators/slice/data-policy-review-seed.d.ts +2 -0
- package/src/generators/slice/data-policy-review-seed.js +22 -0
- package/src/generators/slice/deployed-smoke-readiness.d.ts +2 -0
- package/src/generators/slice/deployed-smoke-readiness.js +214 -0
- package/src/generators/slice/local-source-identity.d.ts +2 -0
- package/src/generators/slice/local-source-identity.js +31 -0
- package/src/generators/slice/persistence-contract.d.ts +14 -0
- package/src/generators/slice/persistence-contract.js +32 -0
- package/src/generators/slice/slice.js +29 -24
- package/src/generators/sql/schema.d.ts +7 -0
- package/src/generators/sql/schema.json +38 -0
- package/src/generators/sql/sql.d.ts +6 -0
- package/src/generators/sql/sql.js +53 -0
- package/src/generators/upgrade/sql-seeded-reconciliation.d.ts +2 -0
- package/src/generators/upgrade/sql-seeded-reconciliation.js +170 -0
- package/src/generators/upgrade/upgrade.d.ts +2 -0
- package/src/generators/upgrade/upgrade.js +136 -9
- package/src/generators/workload/workload.js +51 -2
- package/src/local-dev/browser-verification.d.ts +37 -0
- package/src/local-dev/browser-verification.js +281 -0
- package/src/local-dev/contracts.d.ts +10 -1
- package/src/local-dev/contracts.js +114 -13
- package/src/local-dev/dev-command-core.js +24 -5
- package/src/local-dev/docker-credential-health.d.ts +14 -0
- package/src/local-dev/docker-credential-health.js +94 -0
- package/src/local-dev/environment-inspector.d.ts +7 -0
- package/src/local-dev/environment-inspector.js +42 -15
- package/src/local-dev/environment-state.js +2 -2
- package/src/local-dev/errors.d.ts +1 -1
- package/src/local-dev/errors.js +2 -0
- package/src/local-dev/fleet-client.js +2 -2
- package/src/local-dev/fleet-configuration.js +57 -25
- package/src/local-dev/fleet-inventory.js +46 -18
- package/src/local-dev/fleet-ipc.d.ts +7 -0
- package/src/local-dev/fleet-ipc.js +14 -2
- package/src/local-dev/fleet-launcher.d.ts +6 -0
- package/src/local-dev/fleet-launcher.js +14 -2
- package/src/local-dev/fleet-logs.js +50 -22
- package/src/local-dev/fleet-process.d.ts +20 -1
- package/src/local-dev/fleet-process.js +197 -41
- package/src/local-dev/fleet-runner-evidence.d.ts +5 -0
- package/src/local-dev/fleet-runner-evidence.js +56 -0
- package/src/local-dev/fleet-runtime.js +268 -229
- package/src/local-dev/fleet-session.d.ts +2 -0
- package/src/local-dev/fleet-session.js +28 -11
- package/src/local-dev/fleet-slice-runner-daemon.js +4 -0
- package/src/local-dev/fleet-state.d.ts +5 -2
- package/src/local-dev/fleet-state.js +25 -4
- package/src/local-dev/fleet-supervisor.d.ts +3 -0
- package/src/local-dev/fleet-supervisor.js +66 -11
- package/src/local-dev/fleet-web-start.d.ts +12 -0
- package/src/local-dev/fleet-web-start.js +48 -0
- package/src/local-dev/identity.js +3 -14
- package/src/local-dev/index.d.ts +1 -0
- package/src/local-dev/index.js +1 -0
- package/src/local-dev/native-completion.d.ts +9 -0
- package/src/local-dev/native-completion.js +130 -0
- package/src/local-dev/nx-workspace.d.ts +4 -2
- package/src/local-dev/nx-workspace.js +11 -6
- package/src/local-dev/personal-stage.d.ts +4 -5
- package/src/local-dev/personal-stage.js +6 -54
- package/src/local-dev/port-claims.d.ts +13 -0
- package/src/local-dev/port-claims.js +46 -0
- package/src/local-dev/ports.d.ts +14 -2
- package/src/local-dev/ports.js +78 -3
- package/src/local-dev/private-state.d.ts +6 -0
- package/src/local-dev/private-state.js +126 -34
- package/src/local-dev/process-group.d.ts +4 -0
- package/src/local-dev/process-group.js +29 -0
- package/src/local-dev/process-identity.d.ts +8 -0
- package/src/local-dev/process-identity.js +31 -1
- package/src/local-dev/proxy.js +11 -12
- package/src/local-dev/runtime-paths.js +1 -1
- package/src/local-dev/slice-claim.js +1 -1
- package/src/local-dev/slice-runner.d.ts +15 -6
- package/src/local-dev/slice-runner.js +189 -54
- package/src/local-dev/task-attachment.d.ts +17 -0
- package/src/local-dev/task-attachment.js +73 -0
- package/src/local-dev/task-authority.d.ts +10 -0
- package/src/local-dev/task-authority.js +27 -0
- package/src/local-dev/task-identity.d.ts +33 -0
- package/src/local-dev/task-identity.js +418 -0
- package/src/local-dev/task-native-writer.d.ts +18 -0
- package/src/local-dev/task-native-writer.js +329 -0
- package/src/local-dev/tls.js +3 -1
- package/src/local-dev/web-launch.d.ts +9 -0
- package/src/local-dev/web-launch.js +130 -0
- package/src/ownership/composition.d.ts +2 -1
- package/src/ownership/composition.js +1 -0
- package/src/performance/scenario.d.ts +22 -0
- package/src/performance/scenario.js +100 -92
- package/src/repository-policy/deployment-plan.d.ts +2 -2
- package/src/repository-policy/deployment-plan.js +2 -1
- package/src/repository-policy/policy.js +38 -3
- package/src/schemas/blueprint-v1.json +5 -4
- package/src/schemas/foundation-requirement-v1.json +5 -4
- package/src/schemas/testing-evidence-result-v1.json +1 -1
- package/src/secrets/operator.d.ts +3 -1
- package/src/secrets/operator.js +22 -3
- package/src/sst-environment-source-format.d.ts +3 -0
- package/src/sst-environment-source-format.js +20 -0
- package/src/supply-chain/blueprint-trust-git.js +13 -3
- package/src/supply-chain/build-output.js +15 -0
- package/src/supply-chain/generated-blueprint-trust-command.js +18 -1
- package/src/testing-evidence/fixture-scope.d.ts +2 -1
- package/src/testing-evidence/fixture-scope.js +4 -2
- package/src/testing-evidence/result.d.ts +2 -1
- package/src/testing-evidence/result.js +18 -4
- package/src/workload-roles/standard-slice.js +2 -3
- package/src/api-contract/baseline-update.js.map +0 -1
- package/src/api-contract/compatibility.js.map +0 -1
- package/src/api-contract/contract-graph.js.map +0 -1
- package/src/api-contract/evidence.js.map +0 -1
- package/src/api-contract/index.js.map +0 -1
- package/src/api-contract/model.fixtures.d.ts +0 -2
- package/src/api-contract/model.fixtures.js +0 -81
- package/src/api-contract/model.fixtures.js.map +0 -1
- package/src/api-contract/model.js.map +0 -1
- package/src/api-contract/rollout.js.map +0 -1
- package/src/authorization/compatibility.js.map +0 -1
- package/src/authorization/index.js.map +0 -1
- package/src/aws/child-environment.js.map +0 -1
- package/src/aws/identity.js.map +0 -1
- package/src/aws-authority/index.js.map +0 -1
- package/src/aws-authority/stage-authority.js.map +0 -1
- package/src/blueprints/execution.js.map +0 -1
- package/src/blueprints/external-sandbox.js.map +0 -1
- package/src/blueprints/index.js.map +0 -1
- package/src/blueprints/inputs.js.map +0 -1
- package/src/blueprints/manifest.js.map +0 -1
- package/src/blueprints/resolver.js.map +0 -1
- package/src/blueprints/transitions.js.map +0 -1
- package/src/cli/agent-command.js.map +0 -1
- package/src/cli/agent-runtime.js.map +0 -1
- package/src/cli/blueprint-authority.js.map +0 -1
- package/src/cli/blueprint-command.js.map +0 -1
- package/src/cli/bootstrap.js.map +0 -1
- package/src/cli/dev-command.js.map +0 -1
- package/src/cli/main.js.map +0 -1
- package/src/cli/output.js.map +0 -1
- package/src/cli/personal-secret-runtime.js.map +0 -1
- package/src/cli/secret-terminal.js.map +0 -1
- package/src/container-images.js.map +0 -1
- package/src/data-lifecycle/index.js.map +0 -1
- package/src/data-lifecycle/model.fixtures.d.ts +0 -2
- package/src/data-lifecycle/model.fixtures.js +0 -244
- package/src/data-lifecycle/model.fixtures.js.map +0 -1
- package/src/data-lifecycle/model.js.map +0 -1
- package/src/data-lifecycle/sensitive-artifacts.js.map +0 -1
- package/src/data-lifecycle/validation.js.map +0 -1
- package/src/database-retirement/contract.js.map +0 -1
- package/src/database-retirement/index.js.map +0 -1
- package/src/deterministic-order.js.map +0 -1
- package/src/developer-agent/context.js.map +0 -1
- package/src/developer-agent/generator-planning.js.map +0 -1
- package/src/developer-agent/generator-preview.js.map +0 -1
- package/src/developer-agent/git-inspection.js.map +0 -1
- package/src/developer-agent/handoff.js.map +0 -1
- package/src/developer-agent/index.js.map +0 -1
- package/src/developer-agent/model.js.map +0 -1
- package/src/developer-agent/operation-registry.js.map +0 -1
- package/src/developer-agent/ordering.js.map +0 -1
- package/src/developer-agent/planning.js.map +0 -1
- package/src/developer-agent/preview-changes.js.map +0 -1
- package/src/developer-agent/preview-source.js.map +0 -1
- package/src/developer-agent/validation.js.map +0 -1
- package/src/developer-agent/workspace-inspection.js.map +0 -1
- package/src/developer-agent/workspace-path.js.map +0 -1
- package/src/executors/blueprint-trust/blueprint-trust.js.map +0 -1
- package/src/executors/blueprint-verification/blueprint-verification.js.map +0 -1
- package/src/executors/deploy/deploy.js.map +0 -1
- package/src/executors/deployment-plan/deployment-plan.js.map +0 -1
- package/src/executors/dev/dev.js.map +0 -1
- package/src/executors/dev-doctor/dev-doctor.js.map +0 -1
- package/src/executors/dev-setup/dev-setup.js.map +0 -1
- package/src/executors/developer-context/developer-context.js.map +0 -1
- package/src/executors/fleet/fleet.js.map +0 -1
- package/src/executors/foundation-preflight/foundation-preflight.js.map +0 -1
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +0 -1
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +0 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +0 -1
- package/src/executors/github-bootstrap/github-bootstrap.js.map +0 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +0 -1
- package/src/executors/local-deploy/federated-credential-transport.js.map +0 -1
- package/src/executors/local-deploy/fixtures/local-deploy-state-machine.mjs +0 -53
- package/src/executors/local-deploy/local-approval.js.map +0 -1
- package/src/executors/local-deploy/local-deploy.js.map +0 -1
- package/src/executors/refresh/refresh.js.map +0 -1
- package/src/executors/remove/remove.js.map +0 -1
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +0 -1
- package/src/executors/secret-guardrails/secret-guardrails.js.map +0 -1
- package/src/executors/secret-initialize/secret-initialize.js.map +0 -1
- package/src/executors/secret-metadata/secret-metadata.js.map +0 -1
- package/src/executors/sst-lifecycle/generated-secret-retirement.js.map +0 -1
- package/src/executors/sst-lifecycle/governed-native-operation.js.map +0 -1
- package/src/executors/sst-lifecycle/logging-preflight.js.map +0 -1
- package/src/executors/sst-lifecycle/run-sst-command.js.map +0 -1
- package/src/executors/sst-lifecycle/secret-preflight.js.map +0 -1
- package/src/executors/sst-lifecycle/sst-environment-source.js.map +0 -1
- package/src/executors/unlock/unlock.js.map +0 -1
- package/src/executors/work-markers/work-markers.js.map +0 -1
- package/src/foundation/discovery.js.map +0 -1
- package/src/foundation/index.js.map +0 -1
- package/src/foundation/local-database-contract.js.map +0 -1
- package/src/foundation/logging-preflight.js.map +0 -1
- package/src/foundation/logging.js.map +0 -1
- package/src/foundation/partial-state.js.map +0 -1
- package/src/foundation/preflight.js.map +0 -1
- package/src/foundation/private-smoke-access.js.map +0 -1
- package/src/foundation/private-smoke-admission.js.map +0 -1
- package/src/foundation/private-smoke-control-plane.js.map +0 -1
- package/src/foundation/provision-database-bindings.js.map +0 -1
- package/src/foundation/provision-logical-database.js.map +0 -1
- package/src/foundation/requirements.js.map +0 -1
- package/src/foundation/router-origin-proof.js.map +0 -1
- package/src/foundation/router-waf-rate-rehearsal.js.map +0 -1
- package/src/foundation/router-waf.js.map +0 -1
- package/src/foundation/stages.js.map +0 -1
- package/src/frontend-security/index.js.map +0 -1
- package/src/frontend-security/security-headers.js.map +0 -1
- package/src/generators/feature-registry.js.map +0 -1
- package/src/generators/formatting.js.map +0 -1
- package/src/generators/function/function.js.map +0 -1
- package/src/generators/job/job.js.map +0 -1
- package/src/generators/logging-registry.js.map +0 -1
- package/src/generators/post-generation-install.js.map +0 -1
- package/src/generators/preset/dependency-overrides.js.map +0 -1
- package/src/generators/preset/generator.js.map +0 -1
- package/src/generators/preset/tool-versions.js.map +0 -1
- package/src/generators/preset/workspace-files-ci-acceptance.js.map +0 -1
- package/src/generators/preset/workspace-files-developer-agent.js.map +0 -1
- package/src/generators/preset/workspace-files-ecr-inspector.js.map +0 -1
- package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +0 -1
- package/src/generators/preset/workspace-files-performance-cost.js.map +0 -1
- package/src/generators/preset/workspace-files-performance-load.js.map +0 -1
- package/src/generators/preset/workspace-files-stage-authority.js.map +0 -1
- package/src/generators/preset/workspace-files-thin-deploy.js.map +0 -1
- package/src/generators/preset/workspace-files-thin-docs.js.map +0 -1
- package/src/generators/preset/workspace-files-thin-release.js.map +0 -1
- package/src/generators/preset/workspace-files-workload-role-baseline.js.map +0 -1
- package/src/generators/preset/workspace-files.js.map +0 -1
- package/src/generators/repository-policy/repository-policy.js.map +0 -1
- package/src/generators/repository-policy/tree-policy.js.map +0 -1
- package/src/generators/service/service.js.map +0 -1
- package/src/generators/slice/built-in-plan-api-contract-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-api-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-async-work-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-authorization-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-background-work-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-deletion-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-rights-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-foundation-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-frontend-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-metadata-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-operations-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-performance-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-project-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-release-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-reliability-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-shared.js.map +0 -1
- package/src/generators/slice/built-in-plan-testing-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-thin-release-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-verification-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-web-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +0 -1
- package/src/generators/slice/built-in-plan.js.map +0 -1
- package/src/generators/slice/slice.js.map +0 -1
- package/src/generators/upgrade/upgrade.js.map +0 -1
- package/src/generators/workload/frozen-container.js.map +0 -1
- package/src/generators/workload/performance-registration.js.map +0 -1
- package/src/generators/workload/reliability-registration.js.map +0 -1
- package/src/generators/workload/service-performance-files.js.map +0 -1
- package/src/generators/workload/workload.js.map +0 -1
- package/src/git-policy/action-pins.js.map +0 -1
- package/src/git-policy/github-bootstrap.js.map +0 -1
- package/src/git-policy/index.js.map +0 -1
- package/src/git-policy/routing.js.map +0 -1
- package/src/index.js.map +0 -1
- package/src/infrastructure-change/convergence.js.map +0 -1
- package/src/infrastructure-change/drift.js.map +0 -1
- package/src/infrastructure-change/index.js.map +0 -1
- package/src/infrastructure-change/local-capability.js.map +0 -1
- package/src/infrastructure-change/model.js.map +0 -1
- package/src/infrastructure-change/normalize.js.map +0 -1
- package/src/infrastructure-change/plan.js.map +0 -1
- package/src/infrastructure-change/risk.js.map +0 -1
- package/src/infrastructure-change/summary.js.map +0 -1
- package/src/local-dev/context-discovery.js.map +0 -1
- package/src/local-dev/contract-validation.js.map +0 -1
- package/src/local-dev/contracts.js.map +0 -1
- package/src/local-dev/control-contract.js.map +0 -1
- package/src/local-dev/dev-command-core.js.map +0 -1
- package/src/local-dev/effects.js.map +0 -1
- package/src/local-dev/environment-inspector.js.map +0 -1
- package/src/local-dev/environment-state.js.map +0 -1
- package/src/local-dev/errors.js.map +0 -1
- package/src/local-dev/fleet-client.js.map +0 -1
- package/src/local-dev/fleet-configuration.js.map +0 -1
- package/src/local-dev/fleet-inventory.js.map +0 -1
- package/src/local-dev/fleet-ipc.js.map +0 -1
- package/src/local-dev/fleet-launcher.js.map +0 -1
- package/src/local-dev/fleet-lock.js.map +0 -1
- package/src/local-dev/fleet-logs.js.map +0 -1
- package/src/local-dev/fleet-process.js.map +0 -1
- package/src/local-dev/fleet-runtime.js.map +0 -1
- package/src/local-dev/fleet-session.js.map +0 -1
- package/src/local-dev/fleet-slice-runner-daemon.js.map +0 -1
- package/src/local-dev/fleet-startup.js.map +0 -1
- package/src/local-dev/fleet-state.js.map +0 -1
- package/src/local-dev/fleet-supervisor-daemon.js.map +0 -1
- package/src/local-dev/fleet-supervisor.js.map +0 -1
- package/src/local-dev/gateway-daemon.js.map +0 -1
- package/src/local-dev/gateway.js.map +0 -1
- package/src/local-dev/identity.js.map +0 -1
- package/src/local-dev/index.js.map +0 -1
- package/src/local-dev/local-context.js.map +0 -1
- package/src/local-dev/nx-workspace.js.map +0 -1
- package/src/local-dev/personal-secret-ledger.js.map +0 -1
- package/src/local-dev/personal-stage.js.map +0 -1
- package/src/local-dev/portless.js.map +0 -1
- package/src/local-dev/ports.js.map +0 -1
- package/src/local-dev/private-state.js.map +0 -1
- package/src/local-dev/process-identity.js.map +0 -1
- package/src/local-dev/proxy.js.map +0 -1
- package/src/local-dev/runtime-paths.js.map +0 -1
- package/src/local-dev/secret-slice-claim.js.map +0 -1
- package/src/local-dev/slice-claim.js.map +0 -1
- package/src/local-dev/slice-runner.js.map +0 -1
- package/src/local-dev/tls.js.map +0 -1
- package/src/ownership/composition.js.map +0 -1
- package/src/ownership/foundation-record.js.map +0 -1
- package/src/ownership/hash.js.map +0 -1
- package/src/ownership/index.js.map +0 -1
- package/src/ownership/json-ownership.js.map +0 -1
- package/src/ownership/record.js.map +0 -1
- package/src/ownership/workspace-record.js.map +0 -1
- package/src/performance/cost-collection.js.map +0 -1
- package/src/performance/cost-controls.js.map +0 -1
- package/src/performance/evidence.js.map +0 -1
- package/src/performance/index.js.map +0 -1
- package/src/performance/load-safety.js.map +0 -1
- package/src/performance/model.js.map +0 -1
- package/src/performance/pr-artifact-budget.js.map +0 -1
- package/src/performance/runner.js.map +0 -1
- package/src/performance/scenario-endpoint.js.map +0 -1
- package/src/performance/scenario.js.map +0 -1
- package/src/performance/test-fixtures.d.ts +0 -7
- package/src/performance/test-fixtures.js +0 -167
- package/src/performance/test-fixtures.js.map +0 -1
- package/src/performance/unit-cost.js.map +0 -1
- package/src/release/index.js.map +0 -1
- package/src/release/lifecycle.js.map +0 -1
- package/src/release/manifest.js.map +0 -1
- package/src/release/rollout.js.map +0 -1
- package/src/release/source-authority.js.map +0 -1
- package/src/repository-policy/aurora-preflight.js.map +0 -1
- package/src/repository-policy/capacity-migration.js.map +0 -1
- package/src/repository-policy/deployment-plan.js.map +0 -1
- package/src/repository-policy/foundation-profile.js.map +0 -1
- package/src/repository-policy/index.js.map +0 -1
- package/src/repository-policy/policy.js.map +0 -1
- package/src/secrets/adapters.js.map +0 -1
- package/src/secrets/aws-control-plane.js.map +0 -1
- package/src/secrets/declaration-verification.js.map +0 -1
- package/src/secrets/generated-aws-control-plane.js.map +0 -1
- package/src/secrets/guardrails.js.map +0 -1
- package/src/secrets/index.js.map +0 -1
- package/src/secrets/metadata.js.map +0 -1
- package/src/secrets/model.js.map +0 -1
- package/src/secrets/operator.js.map +0 -1
- package/src/secrets/permissions.js.map +0 -1
- package/src/secrets/personal-command.js.map +0 -1
- package/src/secrets/personal-ledger.js.map +0 -1
- package/src/secrets/registry.js.map +0 -1
- package/src/secrets/verification.js.map +0 -1
- package/src/secrets/workload-access.js.map +0 -1
- package/src/sst-environment-source-format.js.map +0 -1
- package/src/supply-chain/action-pins.js.map +0 -1
- package/src/supply-chain/blueprint-trust-git.js.map +0 -1
- package/src/supply-chain/blueprint-trust-process.js.map +0 -1
- package/src/supply-chain/blueprint-trust.js.map +0 -1
- package/src/supply-chain/blueprint-verification-authority.js.map +0 -1
- package/src/supply-chain/blueprint-verification-execution.js.map +0 -1
- package/src/supply-chain/build-output-bounds.js.map +0 -1
- package/src/supply-chain/build-output.js.map +0 -1
- package/src/supply-chain/common.js.map +0 -1
- package/src/supply-chain/container-artifact-contract.js.map +0 -1
- package/src/supply-chain/container-release.js.map +0 -1
- package/src/supply-chain/ecr-applicability.js.map +0 -1
- package/src/supply-chain/ecr-scanning.js.map +0 -1
- package/src/supply-chain/ecs-deployed-image.js.map +0 -1
- package/src/supply-chain/errors.js.map +0 -1
- package/src/supply-chain/generated-blueprint-trust-command.js.map +0 -1
- package/src/supply-chain/generated-command.js.map +0 -1
- package/src/supply-chain/generated-container-release-command.js.map +0 -1
- package/src/supply-chain/generated-ecr-collector-command.js.map +0 -1
- package/src/supply-chain/generated-files.js.map +0 -1
- package/src/supply-chain/generated-scanner-command.js.map +0 -1
- package/src/supply-chain/index.js.map +0 -1
- package/src/supply-chain/inventory.js.map +0 -1
- package/src/supply-chain/license-expression.js.map +0 -1
- package/src/supply-chain/pnpm-toolchain-authority.js.map +0 -1
- package/src/supply-chain/policy.js.map +0 -1
- package/src/supply-chain/publication.js.map +0 -1
- package/src/supply-chain/sbom.js.map +0 -1
- package/src/supply-chain/scanner.js.map +0 -1
- package/src/supply-chain/vendored-source.js.map +0 -1
- package/src/testing-evidence/fixture-scope.js.map +0 -1
- package/src/testing-evidence/index.js.map +0 -1
- package/src/testing-evidence/quarantine.js.map +0 -1
- package/src/testing-evidence/result.js.map +0 -1
- package/src/testing-evidence/runner-adapter.js.map +0 -1
- package/src/testing-evidence/sensitive-artifacts.js.map +0 -1
- package/src/validation.js.map +0 -1
- package/src/work-markers/index.js.map +0 -1
- package/src/work-markers/work-markers.js.map +0 -1
- package/src/workload-roles/account-baseline.js.map +0 -1
- package/src/workload-roles/authority.js.map +0 -1
- package/src/workload-roles/aws-adapter.js.map +0 -1
- package/src/workload-roles/aws-internal-handler.js.map +0 -1
- package/src/workload-roles/aws-s3-state.js.map +0 -1
- package/src/workload-roles/aws-sdk-control-plane.js.map +0 -1
- package/src/workload-roles/boundary.js.map +0 -1
- package/src/workload-roles/convergence.js.map +0 -1
- package/src/workload-roles/effective-policy.js.map +0 -1
- package/src/workload-roles/handler.js.map +0 -1
- package/src/workload-roles/history.js.map +0 -1
- package/src/workload-roles/index.js.map +0 -1
- package/src/workload-roles/injection.js.map +0 -1
- package/src/workload-roles/manifest.js.map +0 -1
- package/src/workload-roles/provisioner.js.map +0 -1
- package/src/workload-roles/registration.js.map +0 -1
- package/src/workload-roles/stage-boundary.js.map +0 -1
- package/src/workload-roles/standard-slice.js.map +0 -1
- package/src/workspace-deployment/affected-lifecycle.js.map +0 -1
- package/src/workspace-deployment/identity.js.map +0 -1
- package/src/workspace-deployment/index.js.map +0 -1
- package/src/workspace-deployment/migration-evidence.js.map +0 -1
- package/src/workspace-deployment/migration.js.map +0 -1
- package/src/workspace-deployment/ownership.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NativeTaskCheckpointError = void 0;
|
|
4
|
+
exports.verifyRemovedTaskCheckpoint = verifyRemovedTaskCheckpoint;
|
|
5
|
+
const client_s3_1 = require("@aws-sdk/client-s3");
|
|
6
|
+
const MAX_CHECKPOINT_BYTES = 8 * 1024 * 1024;
|
|
7
|
+
class NativeTaskCheckpointError extends Error {
|
|
8
|
+
}
|
|
9
|
+
exports.NativeTaskCheckpointError = NativeTaskCheckpointError;
|
|
10
|
+
function refuse(reason) {
|
|
11
|
+
throw new NativeTaskCheckpointError(`Native task cleanup is incomplete: ${reason}.`);
|
|
12
|
+
}
|
|
13
|
+
function object(value) {
|
|
14
|
+
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Read-only postcondition for the pinned SST checkpoint envelope. It does not
|
|
18
|
+
* decrypt, retain, repair, or infer physical identities from resource contents.
|
|
19
|
+
* An empty checkpoint is necessary, not independent physical-absence proof.
|
|
20
|
+
*/
|
|
21
|
+
async function verifyRemovedTaskCheckpoint(s3, owner, key, stack, signal) {
|
|
22
|
+
try {
|
|
23
|
+
const result = await s3.send(new client_s3_1.GetObjectCommand({ ...owner, Key: key }), {
|
|
24
|
+
abortSignal: signal,
|
|
25
|
+
});
|
|
26
|
+
const body = result.Body;
|
|
27
|
+
if (!body ||
|
|
28
|
+
!('destroy' in body) ||
|
|
29
|
+
typeof body.destroy !== 'function' ||
|
|
30
|
+
!(Symbol.asyncIterator in body))
|
|
31
|
+
refuse('the checkpoint stream is unavailable');
|
|
32
|
+
const stream = body;
|
|
33
|
+
const abort = () => stream.destroy();
|
|
34
|
+
signal.addEventListener('abort', abort, { once: true });
|
|
35
|
+
let bytes;
|
|
36
|
+
try {
|
|
37
|
+
if (!Number.isSafeInteger(result.ContentLength) ||
|
|
38
|
+
!result.ContentLength ||
|
|
39
|
+
result.ContentLength < 0 ||
|
|
40
|
+
result.ContentLength > MAX_CHECKPOINT_BYTES ||
|
|
41
|
+
!result.VersionId ||
|
|
42
|
+
result.VersionId === 'null' ||
|
|
43
|
+
!result.ETag)
|
|
44
|
+
refuse('the checkpoint size or version is unsupported');
|
|
45
|
+
signal.throwIfAborted();
|
|
46
|
+
let size = 0;
|
|
47
|
+
const chunks = [];
|
|
48
|
+
for await (const chunk of stream) {
|
|
49
|
+
signal.throwIfAborted();
|
|
50
|
+
if (!(chunk instanceof Uint8Array))
|
|
51
|
+
refuse('the checkpoint stream is malformed');
|
|
52
|
+
size += chunk.byteLength;
|
|
53
|
+
if (size > MAX_CHECKPOINT_BYTES || size > result.ContentLength)
|
|
54
|
+
refuse('the checkpoint exceeded its bounded size');
|
|
55
|
+
chunks.push(Buffer.from(chunk));
|
|
56
|
+
}
|
|
57
|
+
signal.throwIfAborted();
|
|
58
|
+
if (size !== result.ContentLength)
|
|
59
|
+
refuse('the checkpoint read was incomplete');
|
|
60
|
+
bytes = Buffer.concat(chunks);
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
signal.removeEventListener('abort', abort);
|
|
64
|
+
stream.destroy();
|
|
65
|
+
}
|
|
66
|
+
// Parse errors and SDK errors must never include checkpoint or secret data.
|
|
67
|
+
const value = JSON.parse(bytes.toString('utf8'));
|
|
68
|
+
if (!object(value) ||
|
|
69
|
+
value.version !== 3 ||
|
|
70
|
+
!object(value.checkpoint) ||
|
|
71
|
+
value.checkpoint.stack !== stack ||
|
|
72
|
+
!object(value.checkpoint.latest))
|
|
73
|
+
refuse('the checkpoint format or exact stack identity differs');
|
|
74
|
+
for (const field of ['resources', 'pending_operations']) {
|
|
75
|
+
const entries = value.checkpoint.latest[field];
|
|
76
|
+
// The native serializer omits empty collections after complete removal.
|
|
77
|
+
if (entries !== undefined && !Array.isArray(entries))
|
|
78
|
+
refuse('the checkpoint collections are malformed');
|
|
79
|
+
if (Array.isArray(entries) && entries.length > 0)
|
|
80
|
+
refuse(`${entries.length} ${field === 'resources' ? 'resource records' : 'pending operations'} remain; preserve native diagnostics and resolve the interrupted operation before retrying task cleanup`);
|
|
81
|
+
}
|
|
82
|
+
const current = await s3.send(new client_s3_1.HeadObjectCommand({ ...owner, Key: key, IfMatch: result.ETag }), { abortSignal: signal });
|
|
83
|
+
if (current.VersionId !== result.VersionId || current.ETag !== result.ETag)
|
|
84
|
+
refuse('the checkpoint changed during verification');
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
if (error instanceof NativeTaskCheckpointError)
|
|
88
|
+
throw error;
|
|
89
|
+
refuse('the required checkpoint read or validation failed');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=task-stack-checkpoint.js.map
|
|
@@ -87,7 +87,7 @@ const executor = async (options, context) => {
|
|
|
87
87
|
try {
|
|
88
88
|
const command = fleetExecutorCommand(options);
|
|
89
89
|
const plan = await (0, nx_workspace_js_1.loadWorkspaceFleetPlan)();
|
|
90
|
-
const identity = (0, personal_stage_js_1.createPersonalStageResolver)().resolve();
|
|
90
|
+
const identity = (0, personal_stage_js_1.createPersonalStageResolver)().resolve(context.root);
|
|
91
91
|
const gitCommonDirectory = (0, fleet_launcher_js_1.resolveGitCommonDirectory)(context.root);
|
|
92
92
|
const saved = (0, local_context_js_1.readSavedLocalDevContext)(gitCommonDirectory);
|
|
93
93
|
if (saved.kind === 'invalid') {
|
|
@@ -8,6 +8,8 @@ const client_ssm_1 = require("@aws-sdk/client-ssm");
|
|
|
8
8
|
const credential_providers_1 = require("@aws-sdk/credential-providers");
|
|
9
9
|
const devkit_1 = require("@nx/devkit");
|
|
10
10
|
const discovery_js_1 = require("../../foundation/discovery.js");
|
|
11
|
+
const stages_js_1 = require("../../foundation/stages.js");
|
|
12
|
+
const index_js_1 = require("../../repository-policy/index.js");
|
|
11
13
|
function evaluateFoundationRemoval(foundationStage, registrationNames) {
|
|
12
14
|
if (registrationNames.length === 0) {
|
|
13
15
|
return {
|
|
@@ -87,6 +89,31 @@ async function runFoundationRemovePreflight(options, dependencies = {}) {
|
|
|
87
89
|
devkit_1.logger.error(result.message);
|
|
88
90
|
return { success: result.success };
|
|
89
91
|
}
|
|
90
|
-
const executor = (options) =>
|
|
92
|
+
const executor = async (options, context) => {
|
|
93
|
+
try {
|
|
94
|
+
const policy = (0, index_js_1.readRepositoryOperatingPolicy)(context.root);
|
|
95
|
+
const stage = (0, stages_js_1.requireFoundationStage)(options.stage);
|
|
96
|
+
if (!(0, index_js_1.isActiveDeploymentStage)(policy.deploymentProfile, stage)) {
|
|
97
|
+
throw new Error(`Foundation stage ${stage} is inactive for ${policy.deploymentProfile}.`);
|
|
98
|
+
}
|
|
99
|
+
const region = (0, index_js_1.configuredDeploymentRegion)(policy.deploymentRegion);
|
|
100
|
+
// The dependency executes before the remove child derives its environment.
|
|
101
|
+
// Bind this read to the same committed Region, never the operator's default.
|
|
102
|
+
for (const requested of [
|
|
103
|
+
options.region,
|
|
104
|
+
process.env.AWS_REGION,
|
|
105
|
+
process.env.AWS_DEFAULT_REGION,
|
|
106
|
+
]) {
|
|
107
|
+
if (requested?.trim() && requested.trim() !== region) {
|
|
108
|
+
throw new Error(`Requested Region ${requested.trim()} differs from committed deployment Region ${region}.`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return await runFoundationRemovePreflight({ ...options, region, stage });
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
devkit_1.logger.error(`[foundation-remove-preflight] ${error instanceof Error ? error.message : String(error)}`);
|
|
115
|
+
return { success: false };
|
|
116
|
+
}
|
|
117
|
+
};
|
|
91
118
|
exports.default = executor;
|
|
92
119
|
//# sourceMappingURL=foundation-remove-preflight.js.map
|
|
@@ -7,6 +7,7 @@ import { createLocalFederatedCredentialTransport } from './federated-credential-
|
|
|
7
7
|
import { type LocalMutationApprover } from './local-approval.js';
|
|
8
8
|
import { assertWorkspaceStageOwnershipForWorkspace } from '../../workspace-deployment/index.js';
|
|
9
9
|
import { runGithubPrivateSmoke } from '../../foundation/private-smoke-access.js';
|
|
10
|
+
import { runLocalPrivateSmoke } from '../../foundation/local-private-smoke-access.js';
|
|
10
11
|
interface LocalDeployOptions {
|
|
11
12
|
/** Newest successful deployment receipt on this branch (protected runs). */
|
|
12
13
|
baselineReceipt?: string;
|
|
@@ -16,6 +17,8 @@ interface LocalDeployOptions {
|
|
|
16
17
|
/** affected: skip Slices unchanged since the baseline; full: deploy all. */
|
|
17
18
|
lifecycleScope?: LifecycleMode;
|
|
18
19
|
profile?: string;
|
|
20
|
+
/** Local explicit selection; never a protected full-stage baseline. */
|
|
21
|
+
slices?: string[];
|
|
19
22
|
stage: CanonicalDeploymentStage;
|
|
20
23
|
}
|
|
21
24
|
interface LocalDeployDependencies {
|
|
@@ -33,6 +36,7 @@ interface LocalDeployDependencies {
|
|
|
33
36
|
run?: typeof spawnSync;
|
|
34
37
|
spawnChild?: typeof spawn;
|
|
35
38
|
privateSmoke?: typeof runGithubPrivateSmoke;
|
|
39
|
+
localPrivateSmoke?: typeof runLocalPrivateSmoke;
|
|
36
40
|
}
|
|
37
41
|
interface ProjectDescriptor {
|
|
38
42
|
name: string;
|
|
@@ -61,6 +65,7 @@ export interface DeploymentReceipt {
|
|
|
61
65
|
phase: string;
|
|
62
66
|
mutationStatus: 'not-attempted' | 'may-have-changed';
|
|
63
67
|
nextAction: string;
|
|
68
|
+
secondaryPhases?: readonly ['source-reconciliation'];
|
|
64
69
|
};
|
|
65
70
|
kind: 'ebk-deployment-receipt';
|
|
66
71
|
lifecycleScope?: LifecycleScope;
|
|
@@ -69,6 +74,8 @@ export interface DeploymentReceipt {
|
|
|
69
74
|
profile: RepositoryOperatingPolicy['deploymentProfile'];
|
|
70
75
|
region: string;
|
|
71
76
|
schemaVersion: 1;
|
|
77
|
+
/** Present only for explicit local selection, not complete-stage acceptance. */
|
|
78
|
+
selectedSlices?: readonly string[];
|
|
72
79
|
smoke: Readonly<Record<string, 'not-applicable' | 'passed' | 'unchanged-since-baseline'>>;
|
|
73
80
|
source: {
|
|
74
81
|
clean: boolean;
|
|
@@ -97,7 +104,7 @@ declare function attestLocalContainerBinding(input: {
|
|
|
97
104
|
export declare function deployedSourceCommit(sourceCommit: string, environment?: NodeJS.ProcessEnv): string;
|
|
98
105
|
/** Determine the one native deployment order. Foundation is always first and
|
|
99
106
|
* production Slice admission remains a committed policy decision. */
|
|
100
|
-
export declare function localDeploymentProjectOrder(policy: RepositoryOperatingPolicy, context: ExecutorContext, stage: CanonicalDeploymentStage): string[];
|
|
107
|
+
export declare function localDeploymentProjectOrder(policy: RepositoryOperatingPolicy, context: ExecutorContext, stage: CanonicalDeploymentStage, requestedSlices?: readonly string[]): string[];
|
|
101
108
|
export declare function runLocalDeploy(options: LocalDeployOptions, context: ExecutorContext, dependencies?: LocalDeployDependencies): Promise<{
|
|
102
109
|
success: boolean;
|
|
103
110
|
}>;
|
|
@@ -24,6 +24,8 @@ const container_release_js_1 = require("../../supply-chain/container-release.js"
|
|
|
24
24
|
const run_sst_command_js_1 = require("../sst-lifecycle/run-sst-command.js");
|
|
25
25
|
const index_js_3 = require("../../workspace-deployment/index.js");
|
|
26
26
|
const private_smoke_access_js_1 = require("../../foundation/private-smoke-access.js");
|
|
27
|
+
const local_private_smoke_access_js_1 = require("../../foundation/local-private-smoke-access.js");
|
|
28
|
+
const sst_environment_source_js_1 = require("../sst-lifecycle/sst-environment-source.js");
|
|
27
29
|
const SHA = /^[a-f0-9]{40,64}$/u;
|
|
28
30
|
const ROLE = /^arn:(aws|aws-us-gov|aws-cn):iam::\d{12}:role\/[A-Za-z0-9+=,.@_/-]{1,512}$/u;
|
|
29
31
|
const MAX_LOCAL_RELEASE_CANDIDATE_FILE_BYTES = 64 * 1024;
|
|
@@ -471,6 +473,7 @@ function validateBaselineReceipt(value) {
|
|
|
471
473
|
const record = value;
|
|
472
474
|
if (!record ||
|
|
473
475
|
typeof record !== 'object' ||
|
|
476
|
+
Object.prototype.hasOwnProperty.call(record, 'selectedSlices') ||
|
|
474
477
|
record.kind !== 'ebk-deployment-receipt' ||
|
|
475
478
|
record.schemaVersion !== 1 ||
|
|
476
479
|
typeof record.outcome !== 'string' ||
|
|
@@ -497,7 +500,7 @@ function validateBaselineReceipt(value) {
|
|
|
497
500
|
}
|
|
498
501
|
/** Determine the one native deployment order. Foundation is always first and
|
|
499
502
|
* production Slice admission remains a committed policy decision. */
|
|
500
|
-
function localDeploymentProjectOrder(policy, context, stage) {
|
|
503
|
+
function localDeploymentProjectOrder(policy, context, stage, requestedSlices) {
|
|
501
504
|
if (!(0, index_js_2.isActiveDeploymentStage)(policy.deploymentProfile, stage)) {
|
|
502
505
|
throw new Error(`Deployment stage ${stage} is inactive for the ${policy.deploymentProfile} deployment profile.`);
|
|
503
506
|
}
|
|
@@ -519,12 +522,28 @@ function localDeploymentProjectOrder(policy, context, stage) {
|
|
|
519
522
|
throw new Error(`Registered Product Slices lack an explicit production policy: ${missing.join(', ')}.`);
|
|
520
523
|
}
|
|
521
524
|
}
|
|
522
|
-
const
|
|
525
|
+
const eligibleSlices = stage === 'production'
|
|
523
526
|
? slices.filter(({ name }) => {
|
|
524
527
|
const status = policy.slices[name]?.productionStatus;
|
|
525
528
|
return status === 'pilot' || status === 'ready';
|
|
526
529
|
})
|
|
527
530
|
: slices;
|
|
531
|
+
if (requestedSlices !== undefined &&
|
|
532
|
+
(!Array.isArray(requestedSlices) ||
|
|
533
|
+
requestedSlices.length === 0 ||
|
|
534
|
+
requestedSlices.length > 64 ||
|
|
535
|
+
new Set(requestedSlices).size !== requestedSlices.length ||
|
|
536
|
+
requestedSlices.some((name) => typeof name !== 'string' || !/^[a-z0-9][a-z0-9-]{0,62}$/.test(name)))) {
|
|
537
|
+
throw new Error('Local deployment Slice selection must contain unique, bounded Slice names.');
|
|
538
|
+
}
|
|
539
|
+
for (const name of requestedSlices ?? []) {
|
|
540
|
+
if (!eligibleSlices.some((slice) => slice.name === name)) {
|
|
541
|
+
throw new Error(`Selected Slice ${name} is not deployable in ${stage}; inspect its project and committed production policy.`);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
const selectedSlices = requestedSlices === undefined
|
|
545
|
+
? eligibleSlices
|
|
546
|
+
: eligibleSlices.filter(({ name }) => requestedSlices.includes(name));
|
|
528
547
|
const selected = [
|
|
529
548
|
{ kind: 'foundation', name: foundations[0]?.name ?? '' },
|
|
530
549
|
...selectedSlices.map(({ name }) => ({ kind: 'slice', name })),
|
|
@@ -582,6 +601,12 @@ function invalidatePriorReceipt(root) {
|
|
|
582
601
|
throw new Error('Prior deployment receipt invalidation failed.');
|
|
583
602
|
}
|
|
584
603
|
}
|
|
604
|
+
class NativeChildReconciliationError extends Error {
|
|
605
|
+
constructor(primary, reconciliation) {
|
|
606
|
+
const describe = (error) => error instanceof Error ? error.message : String(error);
|
|
607
|
+
super(`${describe(primary)}; source reconciliation also failed: ${describe(reconciliation)}`);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
585
610
|
async function runNxTarget(input) {
|
|
586
611
|
const forwarded = [
|
|
587
612
|
`--stage=${input.stage}`,
|
|
@@ -596,27 +621,52 @@ async function runNxTarget(input) {
|
|
|
596
621
|
'--',
|
|
597
622
|
...forwarded,
|
|
598
623
|
];
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
:
|
|
624
|
+
const projectRoot = input.context.projectsConfigurations?.projects[input.project]?.root;
|
|
625
|
+
if (!projectRoot)
|
|
626
|
+
throw new Error(`Deployment project ${input.project} lacks its source root.`);
|
|
627
|
+
const nextSource = (0, sst_environment_source_js_1.captureNextEnvironmentSource)({
|
|
628
|
+
projectRoot: confinedWorkspacePath(input.context.root, projectRoot),
|
|
629
|
+
workspaceRoot: input.context.root,
|
|
630
|
+
});
|
|
631
|
+
let primaryFailure;
|
|
632
|
+
try {
|
|
633
|
+
const result = input.runSync
|
|
634
|
+
? input.runSync(process.execPath, args, {
|
|
635
|
+
cwd: input.context.root,
|
|
636
|
+
env: input.environment,
|
|
637
|
+
shell: false,
|
|
638
|
+
stdio: 'inherit',
|
|
639
|
+
})
|
|
640
|
+
: await (0, run_sst_command_js_1.runGovernedChildProcess)({
|
|
641
|
+
args,
|
|
642
|
+
cwd: input.context.root,
|
|
643
|
+
environment: input.environment,
|
|
644
|
+
executable: process.execPath,
|
|
645
|
+
...(input.spawnChild ? { spawnChild: input.spawnChild } : {}),
|
|
646
|
+
});
|
|
647
|
+
if (result.error || result.signal || result.status !== 0) {
|
|
648
|
+
throw new Error(result.error
|
|
649
|
+
? `${input.target} failed for ${input.project}: ${result.error.message}`
|
|
650
|
+
: result.signal
|
|
651
|
+
? `${input.target} failed for ${input.project} with signal ${result.signal}.`
|
|
652
|
+
: `${input.target} failed for ${input.project} with status ${result.status ?? 'unknown'}.`);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
catch (error) {
|
|
656
|
+
primaryFailure = { error };
|
|
657
|
+
}
|
|
658
|
+
// Reconcile after every settled child, retaining its error until cleanup ends.
|
|
659
|
+
// Native Next may run in an Nx dependency before the SST executor starts.
|
|
660
|
+
try {
|
|
661
|
+
(0, sst_environment_source_js_1.reconcileNextEnvironmentSource)(nextSource, input.context.root);
|
|
662
|
+
}
|
|
663
|
+
catch (error) {
|
|
664
|
+
if (primaryFailure)
|
|
665
|
+
throw new NativeChildReconciliationError(primaryFailure.error, error);
|
|
666
|
+
throw error;
|
|
619
667
|
}
|
|
668
|
+
if (primaryFailure)
|
|
669
|
+
throw primaryFailure.error;
|
|
620
670
|
}
|
|
621
671
|
function productionConfirmation(account, region, commit) {
|
|
622
672
|
return `deploy:production:${account}:${region}:${commit}`;
|
|
@@ -669,6 +719,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
669
719
|
const migrations = {};
|
|
670
720
|
const smoke = {};
|
|
671
721
|
let lifecycleScope;
|
|
722
|
+
let selectedSlices;
|
|
672
723
|
let account = '';
|
|
673
724
|
let actor = '';
|
|
674
725
|
let policy;
|
|
@@ -700,6 +751,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
700
751
|
profile: policy.deploymentProfile,
|
|
701
752
|
region,
|
|
702
753
|
schemaVersion: 1,
|
|
754
|
+
...(selectedSlices ? { selectedSlices } : {}),
|
|
703
755
|
smoke,
|
|
704
756
|
source,
|
|
705
757
|
stage: options.stage,
|
|
@@ -735,6 +787,13 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
735
787
|
if (options.expectedRoleArn !== expectedRoleArn) {
|
|
736
788
|
throw new Error(`Deployment role must equal the committed ${options.stage} stage authority role ${expectedRoleArn}.`);
|
|
737
789
|
}
|
|
790
|
+
if (options.slices !== undefined &&
|
|
791
|
+
(githubAuthority || options.lifecycleScope === 'affected')) {
|
|
792
|
+
throw new Error('Explicit Slice selection is local-only and cannot be combined with affected lifecycle or protected GitHub deployment.');
|
|
793
|
+
}
|
|
794
|
+
const orderedProjects = localDeploymentProjectOrder(policy, context, options.stage, options.slices);
|
|
795
|
+
if (options.slices)
|
|
796
|
+
selectedSlices = orderedProjects.slice(1);
|
|
738
797
|
const identity = localWorkingTreeDigest(context.root, run);
|
|
739
798
|
source = {
|
|
740
799
|
clean: identity.clean,
|
|
@@ -809,7 +868,6 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
809
868
|
throw new Error('Local production deployment acknowledgement was declined.');
|
|
810
869
|
}
|
|
811
870
|
}
|
|
812
|
-
const orderedProjects = localDeploymentProjectOrder(policy, context, options.stage);
|
|
813
871
|
lifecycleScope = resolveLifecycleScope({
|
|
814
872
|
context,
|
|
815
873
|
frameworkVersion: frameworkVersion(context.root),
|
|
@@ -1148,7 +1206,19 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1148
1206
|
});
|
|
1149
1207
|
}
|
|
1150
1208
|
else {
|
|
1151
|
-
|
|
1209
|
+
if (!transport)
|
|
1210
|
+
throw new Error('Local smoke requires the verified federated transport.');
|
|
1211
|
+
await (dependencies.localPrivateSmoke ?? local_private_smoke_access_js_1.runLocalPrivateSmoke)({
|
|
1212
|
+
account,
|
|
1213
|
+
deploymentProfile: policy.deploymentProfile,
|
|
1214
|
+
root: context.root,
|
|
1215
|
+
source: source.commit,
|
|
1216
|
+
stage: options.stage,
|
|
1217
|
+
url: smokeTarget.webUrl,
|
|
1218
|
+
workspace: JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(context.root, 'package.json'), 'utf8')).name,
|
|
1219
|
+
credentialEnvironment: transport.childEnvironment({}),
|
|
1220
|
+
run: runSmoke,
|
|
1221
|
+
});
|
|
1152
1222
|
}
|
|
1153
1223
|
children.push({
|
|
1154
1224
|
completedAt: now().toISOString(),
|
|
@@ -1261,6 +1331,9 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1261
1331
|
failure = {
|
|
1262
1332
|
project,
|
|
1263
1333
|
operation: 'deploy',
|
|
1334
|
+
...(error instanceof NativeChildReconciliationError
|
|
1335
|
+
? { secondaryPhases: ['source-reconciliation'] }
|
|
1336
|
+
: {}),
|
|
1264
1337
|
phase: finalPhase === 'credential-cleanup'
|
|
1265
1338
|
? finalPhase
|
|
1266
1339
|
: (failedChild?.target ?? finalPhase),
|
|
@@ -20,6 +20,14 @@
|
|
|
20
20
|
"minLength": 1,
|
|
21
21
|
"maxLength": 128
|
|
22
22
|
},
|
|
23
|
+
"slices": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,62}$" },
|
|
26
|
+
"minItems": 1,
|
|
27
|
+
"maxItems": 64,
|
|
28
|
+
"uniqueItems": true,
|
|
29
|
+
"description": "Local-only explicit Slice selection. Foundation still deploys first; omitted means every eligible Slice. A selected deployment is not full-stage acceptance."
|
|
30
|
+
},
|
|
23
31
|
"lifecycleScope": {
|
|
24
32
|
"type": "string",
|
|
25
33
|
"enum": ["affected", "full"],
|
|
@@ -329,8 +329,9 @@ function normalizedLiveRules(input) {
|
|
|
329
329
|
const orStatement = liveRecord(nested.OrStatement, 'StageIpAllowlist OR statement');
|
|
330
330
|
exactLiveKeys(orStatement, ['Statements'], 'StageIpAllowlist OR statement');
|
|
331
331
|
if (!Array.isArray(orStatement.Statements) ||
|
|
332
|
-
orStatement.Statements.length
|
|
333
|
-
|
|
332
|
+
orStatement.Statements.length < 2 ||
|
|
333
|
+
orStatement.Statements.length > 3) {
|
|
334
|
+
throw new Error('StageIpAllowlist OR statement must contain the exact generated baseline and smoke references.');
|
|
334
335
|
}
|
|
335
336
|
const references = orStatement.Statements.map((item, referenceIndex) => {
|
|
336
337
|
const wrapper = liveRecord(item, `StageIpAllowlist reference ${referenceIndex}`);
|
|
@@ -438,11 +439,6 @@ function normalizedLiveRules(input) {
|
|
|
438
439
|
});
|
|
439
440
|
return { ipSetArns, rules };
|
|
440
441
|
}
|
|
441
|
-
function admittedCidrs(cidrs, admittedCidr) {
|
|
442
|
-
return admittedCidr && !cidrs.includes(admittedCidr)
|
|
443
|
-
? [...cidrs, admittedCidr]
|
|
444
|
-
: cidrs;
|
|
445
|
-
}
|
|
446
442
|
function requiredIdentityTags(input) {
|
|
447
443
|
return {
|
|
448
444
|
'ebk:managed-by': 'empire-builder-kit',
|
|
@@ -475,24 +471,37 @@ async function attestIpSet(input) {
|
|
|
475
471
|
}
|
|
476
472
|
const name = arn[3] ?? '';
|
|
477
473
|
const id = arn[4] ?? '';
|
|
474
|
+
const smoke = name ===
|
|
475
|
+
`foundation-${input.expectedTags['ebk:stage']}-router-smoke-access`;
|
|
478
476
|
const [ipSetResult, tagsResult] = await Promise.all([
|
|
479
477
|
input.waf.send(new client_wafv2_1.GetIPSetCommand({ Id: id, Name: name, Scope: 'CLOUDFRONT' })),
|
|
480
478
|
input.waf.send(new client_wafv2_1.ListTagsForResourceCommand({ ResourceARN: input.arn })),
|
|
481
479
|
]);
|
|
482
480
|
const ipSet = ipSetResult.IPSet;
|
|
483
|
-
const expectedCidrs =
|
|
484
|
-
? input.
|
|
485
|
-
|
|
481
|
+
const expectedCidrs = smoke
|
|
482
|
+
? input.admittedCidr
|
|
483
|
+
? [input.admittedCidr]
|
|
484
|
+
: []
|
|
485
|
+
: ipSet?.IPAddressVersion === 'IPV4'
|
|
486
|
+
? input.expectedIpv4Cidrs
|
|
487
|
+
: input.expectedIpv6Cidrs;
|
|
486
488
|
if (ipSet?.ARN !== input.arn ||
|
|
487
489
|
ipSet.Id !== id ||
|
|
488
490
|
ipSet.Name !== name ||
|
|
491
|
+
(smoke && ipSet.IPAddressVersion !== 'IPV4') ||
|
|
489
492
|
(ipSet.IPAddressVersion !== 'IPV4' && ipSet.IPAddressVersion !== 'IPV6') ||
|
|
490
493
|
JSON.stringify([...(ipSet.Addresses ?? [])].sort()) !==
|
|
491
494
|
JSON.stringify([...expectedCidrs].sort())) {
|
|
492
495
|
throw new Error('Live Router WAF IP set identity, address family, or exact CIDRs differ from the generated plan.');
|
|
493
496
|
}
|
|
494
|
-
|
|
495
|
-
|
|
497
|
+
const expectedTags = smoke
|
|
498
|
+
? {
|
|
499
|
+
...Object.fromEntries(Object.entries(input.expectedTags).filter(([key]) => key !== 'ebk:policy-digest')),
|
|
500
|
+
'ebk:purpose': 'private-smoke-access',
|
|
501
|
+
}
|
|
502
|
+
: input.expectedTags;
|
|
503
|
+
attestWafTags(tagsResult, input.arn, expectedTags, 'Router WAF IP set');
|
|
504
|
+
return smoke ? 'SMOKE' : ipSet.IPAddressVersion;
|
|
496
505
|
}
|
|
497
506
|
async function attestLoggingConfiguration(input) {
|
|
498
507
|
let configuration;
|
|
@@ -610,7 +619,8 @@ async function attestRouterWafBaseline(input) {
|
|
|
610
619
|
stage: input.stage,
|
|
611
620
|
});
|
|
612
621
|
const expectedIpSetCount = Number(input.plan.ipv4Cidrs.length > 0) +
|
|
613
|
-
Number(input.plan.ipv6Cidrs.length > 0)
|
|
622
|
+
Number(input.plan.ipv6Cidrs.length > 0) +
|
|
623
|
+
1;
|
|
614
624
|
if (normalized.ipSetArns.length !== expectedIpSetCount) {
|
|
615
625
|
throw new Error('Live StageIpAllowlist has an unexpected number of generated IP set references.');
|
|
616
626
|
}
|
|
@@ -621,10 +631,9 @@ async function attestRouterWafBaseline(input) {
|
|
|
621
631
|
const version = await attestIpSet({
|
|
622
632
|
accountId: input.accountId,
|
|
623
633
|
arn: ipSetArn,
|
|
624
|
-
|
|
625
|
-
//
|
|
626
|
-
|
|
627
|
-
expectedIpv4Cidrs: admittedCidrs(input.plan.ipv4Cidrs, input.admittedCidr),
|
|
634
|
+
...(input.admittedCidr ? { admittedCidr: input.admittedCidr } : {}),
|
|
635
|
+
// Admission owns only the separate smoke set. Baselines stay exact.
|
|
636
|
+
expectedIpv4Cidrs: input.plan.ipv4Cidrs,
|
|
628
637
|
expectedIpv6Cidrs: input.plan.ipv6Cidrs,
|
|
629
638
|
expectedTags,
|
|
630
639
|
waf: input.waf,
|
|
@@ -633,11 +642,14 @@ async function attestRouterWafBaseline(input) {
|
|
|
633
642
|
}));
|
|
634
643
|
const ipv4Arn = ipSetResults.find(({ version }) => version === 'IPV4')?.arn;
|
|
635
644
|
const ipv6Arn = ipSetResults.find(({ version }) => version === 'IPV6')?.arn;
|
|
636
|
-
|
|
645
|
+
const smokeArn = ipSetResults.find(({ version }) => version === 'SMOKE')?.arn;
|
|
646
|
+
if (!smokeArn ||
|
|
647
|
+
Boolean(ipv4Arn) !== Boolean(input.plan.ipv4Cidrs.length) ||
|
|
637
648
|
Boolean(ipv6Arn) !== Boolean(input.plan.ipv6Cidrs.length)) {
|
|
638
649
|
throw new Error('Live Router WAF IP set address families differ from the generated plan.');
|
|
639
650
|
}
|
|
640
651
|
const expectedRules = (0, index_js_1.createRouterWafRules)(input.plan, {
|
|
652
|
+
smokeArn,
|
|
641
653
|
...(ipv4Arn ? { ipv4Arn } : {}),
|
|
642
654
|
...(ipv6Arn ? { ipv6Arn } : {}),
|
|
643
655
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReadStream, WriteStream } from 'node:tty';
|
|
2
2
|
import { type ExecutorContext } from '@nx/devkit';
|
|
3
3
|
import { createLocalFederatedCredentialTransport } from '../local-deploy/federated-credential-transport.js';
|
|
4
|
+
import { type TaskUnlockDependencies } from './task-unlock.js';
|
|
4
5
|
import { type SstLifecycleCommand, type SstLifecycleOptions } from './run-sst-command.js';
|
|
5
6
|
export type GovernedNativeOperation = 'refresh' | 'remove' | 'unlock';
|
|
6
7
|
export interface GovernedNativeOperationApprovalRequest {
|
|
@@ -25,6 +26,7 @@ type NativeRunner = (command: SstLifecycleCommand, options: SstLifecycleOptions,
|
|
|
25
26
|
success: boolean;
|
|
26
27
|
}>;
|
|
27
28
|
export interface GovernedNativeOperationDependencies {
|
|
29
|
+
taskUnlock?: Pick<TaskUnlockDependencies, 'authority' | 'writers'>;
|
|
28
30
|
approve?: GovernedNativeOperationApprover;
|
|
29
31
|
createTransport?: typeof createLocalFederatedCredentialTransport;
|
|
30
32
|
environment?: NodeJS.ProcessEnv;
|
|
@@ -8,6 +8,7 @@ const index_js_1 = require("../../aws-authority/index.js");
|
|
|
8
8
|
const index_js_2 = require("../../repository-policy/index.js");
|
|
9
9
|
const federated_credential_transport_js_1 = require("../local-deploy/federated-credential-transport.js");
|
|
10
10
|
const local_deploy_js_1 = require("../local-deploy/local-deploy.js");
|
|
11
|
+
const task_unlock_js_1 = require("./task-unlock.js");
|
|
11
12
|
const run_sst_command_js_1 = require("./run-sst-command.js");
|
|
12
13
|
const SHA = /^[a-f0-9]{40,64}$/u;
|
|
13
14
|
function partitionForRegion(region) {
|
|
@@ -61,6 +62,14 @@ function createTtyGovernedNativeOperationApprover(terminal = {
|
|
|
61
62
|
* acknowledgement. GitHub OIDC proceeds through the existing native path.
|
|
62
63
|
*/
|
|
63
64
|
async function runGovernedNativeOperation(command, options, context, dependencies = {}) {
|
|
65
|
+
if (command === 'unlock' && options.stage?.startsWith('personal-')) {
|
|
66
|
+
return (0, task_unlock_js_1.runCurrentTaskUnlock)(options, context, {
|
|
67
|
+
...dependencies.taskUnlock,
|
|
68
|
+
createTransport: dependencies.createTransport,
|
|
69
|
+
environment: dependencies.environment,
|
|
70
|
+
run: dependencies.run,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
64
73
|
try {
|
|
65
74
|
(0, run_sst_command_js_1.assertGovernedAwsLifecyclePlatform)(dependencies.platform);
|
|
66
75
|
}
|
|
@@ -5,6 +5,7 @@ import { type PersonalStageResolver } from '../../local-dev/personal-stage.js';
|
|
|
5
5
|
import { type DeploymentProfile } from '../../repository-policy/index.js';
|
|
6
6
|
import { assertWorkspaceStageOwnershipForWorkspace } from '../../workspace-deployment/index.js';
|
|
7
7
|
import { preflightSliceSecretMetadata } from './secret-preflight.js';
|
|
8
|
+
import { acquireTaskNativeWriterLease, type TaskNativeWriterEffects } from '../../local-dev/task-native-writer.js';
|
|
8
9
|
import { initializeProtectedDeploymentSecrets } from '../secret-initialize/secret-initialize.js';
|
|
9
10
|
import { retireGeneratedSecretsAfterSliceRemove } from './generated-secret-retirement.js';
|
|
10
11
|
export type SstLifecycleCommand = 'deploy' | 'dev' | 'refresh' | 'remove' | 'unlock';
|
|
@@ -32,6 +33,8 @@ export interface SstCommandInvocation {
|
|
|
32
33
|
EBK_LOCAL_SOURCE_TREE?: string;
|
|
33
34
|
EBK_PRODUCTION_FOUNDATION_PROFILE?: string;
|
|
34
35
|
EBK_SOURCE_COMMIT?: string;
|
|
36
|
+
EBK_NX_TASK_CLEANUP?: string;
|
|
37
|
+
EBK_NX_TASK_UNLOCK?: string;
|
|
35
38
|
};
|
|
36
39
|
executable: string;
|
|
37
40
|
}
|
|
@@ -46,6 +49,8 @@ interface SstLifecycleRuntimeDependencies extends SstLifecyclePreflightDependenc
|
|
|
46
49
|
generatedSecretRetirement?: typeof retireGeneratedSecretsAfterSliceRemove;
|
|
47
50
|
platform?: NodeJS.Platform;
|
|
48
51
|
spawnChild?: typeof spawn;
|
|
52
|
+
taskNativeWriterEffects?: TaskNativeWriterEffects;
|
|
53
|
+
acquireTaskWriter?: typeof acquireTaskNativeWriterLease;
|
|
49
54
|
}
|
|
50
55
|
export declare function assertGovernedAwsLifecyclePlatform(platform?: NodeJS.Platform): void;
|
|
51
56
|
export interface GovernedChildProcessResult {
|