@empire-builder-kit/nx 1.0.0-rc.47 → 1.0.0-rc.48
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 +14 -169
- package/executors.json +24 -79
- package/generators.json +8 -18
- package/package.json +13 -71
- package/src/aws/identity.d.ts +1 -1
- package/src/aws-authority/boundary-transforms.d.ts +9 -0
- package/src/aws-authority/boundary-transforms.js +78 -0
- package/src/aws-authority/contracts.d.ts +116 -0
- package/src/aws-authority/contracts.js +40 -0
- package/src/aws-authority/deployment-guardrails.d.ts +4 -0
- package/src/aws-authority/deployment-guardrails.js +543 -0
- package/src/aws-authority/deployment-policy-groups.d.ts +3 -0
- package/src/aws-authority/deployment-policy-groups.js +299 -0
- package/src/aws-authority/deployment-resources.d.ts +64 -0
- package/src/aws-authority/deployment-resources.js +265 -0
- package/src/aws-authority/deployment-services.d.ts +3 -0
- package/src/aws-authority/deployment-services.js +717 -0
- package/src/aws-authority/development-authority.d.ts +11 -0
- package/src/aws-authority/development-authority.js +160 -0
- package/src/aws-authority/guardrail-actions.d.ts +87 -0
- package/src/aws-authority/guardrail-actions.js +463 -0
- package/src/aws-authority/policy-document.d.ts +15 -0
- package/src/aws-authority/policy-document.js +264 -0
- package/src/aws-authority/runtime-boundary.d.ts +7 -0
- package/src/aws-authority/runtime-boundary.js +211 -0
- package/src/aws-authority/service-actions.d.ts +96 -0
- package/src/aws-authority/service-actions.js +512 -0
- package/src/aws-authority/stage-authority.d.ts +6 -272
- package/src/aws-authority/stage-authority.js +109 -3609
- package/src/aws-authority/stage-identity.d.ts +6 -0
- package/src/aws-authority/stage-identity.js +134 -0
- package/src/cli/bootstrap.d.ts +0 -20
- package/src/cli/bootstrap.js +2 -153
- package/src/cli/dev-command.d.ts +2 -4
- package/src/cli/dev-command.js +1 -19
- package/src/cli/main.d.ts +0 -4
- package/src/cli/main.js +22 -80
- package/src/cli/output.d.ts +2 -4
- package/src/cli/output.js +2 -8
- package/src/executors/deployment-plan/deployment-plan.d.ts +0 -2
- package/src/executors/deployment-plan/deployment-plan.js +3 -68
- package/src/executors/dev-doctor/dev-doctor.js +2 -2
- package/src/executors/local-deploy/deployed-smoke.d.ts +12 -0
- package/src/executors/local-deploy/deployed-smoke.js +115 -0
- package/src/executors/local-deploy/deployment-authority.d.ts +24 -0
- package/src/executors/local-deploy/deployment-authority.js +81 -0
- package/src/executors/local-deploy/deployment-child.d.ts +18 -0
- package/src/executors/local-deploy/deployment-child.js +77 -0
- package/src/executors/local-deploy/deployment-contracts.d.ts +96 -0
- package/src/executors/local-deploy/deployment-contracts.js +3 -0
- package/src/executors/local-deploy/deployment-projects.d.ts +4 -0
- package/src/executors/local-deploy/deployment-projects.js +16 -0
- package/src/executors/local-deploy/deployment-receipt.d.ts +4 -0
- package/src/executors/local-deploy/deployment-receipt.js +55 -0
- package/src/executors/local-deploy/deployment-scope.d.ts +17 -0
- package/src/executors/local-deploy/deployment-scope.js +239 -0
- package/src/executors/local-deploy/deployment-source.d.ts +13 -0
- package/src/executors/local-deploy/deployment-source.js +86 -0
- package/src/executors/local-deploy/local-deploy.d.ts +5 -121
- package/src/executors/local-deploy/local-deploy.js +55 -936
- package/src/executors/sst-lifecycle/governed-child-process.d.ts +27 -0
- package/src/executors/sst-lifecycle/governed-child-process.js +277 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js +4 -10
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +4 -85
- package/src/executors/sst-lifecycle/run-sst-command.js +28 -834
- package/src/executors/sst-lifecycle/sst-contracts.d.ts +44 -0
- package/src/executors/sst-lifecycle/sst-contracts.js +3 -0
- package/src/executors/sst-lifecycle/sst-invocation.d.ts +17 -0
- package/src/executors/sst-lifecycle/sst-invocation.js +502 -0
- package/src/executors/sst-lifecycle/task-unlock.js +3 -3
- package/src/foundation/discovery.d.ts +1 -5
- package/src/foundation/discovery.js +0 -2
- package/src/foundation/index.d.ts +0 -2
- package/src/foundation/index.js +0 -9
- package/src/foundation/local-private-smoke-access.d.ts +6 -15
- package/src/foundation/local-private-smoke-access.js +8 -192
- package/src/foundation/observability.d.ts +16 -26
- package/src/foundation/observability.js +34 -135
- package/src/foundation/preflight.js +0 -14
- package/src/foundation/private-smoke-access.d.ts +7 -14
- package/src/foundation/private-smoke-access.js +4 -126
- package/src/foundation/root-site-workspace.d.ts +35 -0
- package/src/foundation/root-site-workspace.js +80 -0
- package/src/foundation/root-site.d.ts +8 -7
- package/src/foundation/root-site.js +17 -9
- package/src/generators/formatting.js +5 -4
- package/src/generators/function/function.d.ts +9 -5
- package/src/generators/function/function.js +106 -136
- package/src/generators/function/schema.json +2 -2
- package/src/generators/function-access/function-access.d.ts +0 -6
- package/src/generators/function-access/function-access.js +41 -109
- package/src/generators/observability-policy.js +1 -2
- package/src/{supply-chain → generators}/pnpm-toolchain-authority.d.ts +3 -3
- package/src/{supply-chain → generators}/pnpm-toolchain-authority.js +12 -12
- package/src/generators/post-generation-install.d.ts +1 -8
- package/src/generators/post-generation-install.js +11 -139
- package/src/generators/preset/dependency-overrides.d.ts +13 -19
- package/src/generators/preset/dependency-overrides.js +12 -56
- package/src/generators/preset/generator.js +0 -3
- package/src/generators/preset/workspace-files-foundation-infra.d.ts +6 -0
- package/src/generators/preset/workspace-files-foundation-infra.js +586 -0
- package/src/generators/preset/workspace-files-foundation-readme.d.ts +5 -0
- package/src/generators/preset/workspace-files-foundation-readme.js +90 -0
- package/src/generators/preset/workspace-files-foundation.d.ts +3 -0
- package/src/generators/preset/workspace-files-foundation.js +170 -0
- package/src/generators/preset/workspace-files-ownership.d.ts +9 -0
- package/src/generators/preset/workspace-files-ownership.js +124 -0
- package/src/generators/preset/workspace-files-root-config.d.ts +32 -0
- package/src/generators/preset/workspace-files-root-config.js +356 -0
- package/src/generators/preset/workspace-files-root-docs.d.ts +5 -0
- package/src/generators/preset/workspace-files-root-docs.js +109 -0
- package/src/generators/preset/workspace-files-shared.d.ts +18 -0
- package/src/generators/preset/workspace-files-shared.js +7 -0
- package/src/generators/preset/workspace-files-workflows.d.ts +39 -0
- package/src/generators/preset/workspace-files-workflows.js +306 -0
- package/src/generators/preset/workspace-files-workspace-health.d.ts +6 -0
- package/src/generators/preset/workspace-files-workspace-health.js +148 -0
- package/src/generators/preset/workspace-files.d.ts +10 -24
- package/src/generators/preset/workspace-files.js +48 -10705
- package/src/generators/site/built-in-site-documentation-files.d.ts +2 -1
- package/src/generators/site/built-in-site-documentation-files.js +15 -56
- package/src/generators/site/built-in-site-files.d.ts +4 -1
- package/src/generators/site/built-in-site-files.js +12 -11
- package/src/generators/site/built-in-site-infrastructure-files.d.ts +2 -1
- package/src/generators/site/built-in-site-infrastructure-files.js +46 -206
- package/src/generators/site/built-in-site-plan.d.ts +5 -1
- package/src/generators/site/built-in-site-plan.js +7 -5
- package/src/generators/site/built-in-site-project-files.d.ts +10 -2
- package/src/generators/site/built-in-site-project-files.js +131 -177
- package/src/generators/site/built-in-site-script-files.d.ts +2 -0
- package/src/generators/site/built-in-site-script-files.js +76 -280
- package/src/generators/site/built-in-site-shared.d.ts +64 -4
- package/src/generators/site/built-in-site-shared.js +307 -14
- package/src/generators/site/built-in-site-sst-config-files.d.ts +2 -1
- package/src/generators/site/built-in-site-sst-config-files.js +90 -22
- package/src/generators/site/built-in-site-web-files.d.ts +2 -1
- package/src/generators/site/built-in-site-web-files.js +19 -225
- package/src/generators/site/schema.d.ts +5 -0
- package/src/generators/site/schema.json +6 -0
- package/src/generators/site/site.d.ts +0 -8
- package/src/generators/site/site.js +17 -85
- package/src/generators/slice/built-in-plan-api-files.d.ts +1 -2
- package/src/generators/slice/built-in-plan-api-files.js +30 -890
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +57 -1851
- package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +5 -2
- package/src/generators/slice/built-in-plan-infrastructure-files.js +80 -3272
- package/src/generators/slice/built-in-plan-key-value-files.d.ts +3 -2
- package/src/generators/slice/built-in-plan-key-value-files.js +3 -21
- package/src/generators/slice/built-in-plan-project-files.d.ts +5 -3
- package/src/generators/slice/built-in-plan-project-files.js +79 -897
- package/src/generators/slice/built-in-plan-shared.d.ts +3 -18
- package/src/generators/slice/built-in-plan-shared.js +4 -57
- package/src/generators/slice/built-in-plan-web-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +14 -540
- package/src/generators/slice/built-in-plan.d.ts +2 -3
- package/src/generators/slice/built-in-plan.js +79 -277
- package/src/{developer-agent/preview-changes.d.ts → generators/slice/generation-tree.d.ts} +1 -5
- package/src/generators/slice/generation-tree.js +161 -0
- package/src/generators/slice/schema.json +12 -4
- package/src/generators/slice/slice-config.d.ts +7 -0
- package/src/generators/slice/slice-config.js +125 -0
- package/src/generators/slice/slice.js +29 -261
- package/src/generators/slice/sql-bootstrap.d.ts +1 -0
- package/src/generators/slice/sql-bootstrap.js +505 -0
- package/src/generators/slice/sql-client.d.ts +1 -0
- package/src/generators/slice/sql-client.js +107 -0
- package/src/generators/slice/sql-infrastructure.d.ts +1 -0
- package/src/generators/slice/sql-infrastructure.js +225 -0
- package/src/generators/slice/sql-logging.d.ts +1 -0
- package/src/generators/slice/sql-logging.js +266 -0
- package/src/generators/slice/sql-migration.d.ts +2 -0
- package/src/generators/slice/sql-migration.js +202 -0
- package/src/generators/slice/standard-slice-contract.d.ts +25 -0
- package/src/generators/slice/standard-slice-contract.js +64 -0
- package/src/generators/sql/schema.json +1 -1
- package/src/generators/sql/sql.d.ts +1 -1
- package/src/generators/sql/sql.js +13 -7
- package/src/generators/upgrade/framework-package-upgrade.d.ts +4 -27
- package/src/generators/upgrade/framework-package-upgrade.js +16 -39
- package/src/generators/upgrade/framework-packages.d.ts +25 -0
- package/src/generators/upgrade/framework-packages.js +138 -0
- package/src/generators/upgrade/function-authentication-notice.d.ts +10 -18
- package/src/generators/upgrade/function-authentication-notice.js +24 -44
- package/src/generators/upgrade/schema.d.ts +0 -3
- package/src/generators/upgrade/schema.json +6 -16
- package/src/generators/upgrade/slice-compositions.d.ts +20 -0
- package/src/generators/upgrade/slice-compositions.js +100 -0
- package/src/generators/upgrade/slice-upgrade-guidance.d.ts +19 -0
- package/src/generators/upgrade/slice-upgrade-guidance.js +50 -0
- package/src/generators/upgrade/slice-upgrade.d.ts +4 -0
- package/src/generators/upgrade/slice-upgrade.js +231 -0
- package/src/generators/upgrade/upgrade-plan.d.ts +10 -13
- package/src/generators/upgrade/upgrade-plan.js +33 -197
- package/src/generators/upgrade/upgrade-preflight.d.ts +20 -0
- package/src/generators/upgrade/upgrade-preflight.js +64 -0
- package/src/generators/upgrade/upgrade.d.ts +8 -53
- package/src/generators/upgrade/upgrade.js +23 -1571
- package/src/generators/workload/schema.json +2 -2
- package/src/generators/workload/workload.d.ts +11 -11
- package/src/generators/workload/workload.js +166 -1255
- package/src/index.d.ts +0 -5
- package/src/index.js +0 -5
- package/src/local-dev/browser-verification.d.ts +0 -7
- package/src/local-dev/browser-verification.js +0 -136
- package/src/local-dev/contracts.d.ts +6 -0
- package/src/local-dev/contracts.js +17 -9
- package/src/local-dev/environment-checks.d.ts +126 -0
- package/src/local-dev/environment-checks.js +81 -0
- package/src/local-dev/environment-inspector.d.ts +3 -124
- package/src/local-dev/environment-inspector.js +9 -148
- package/src/local-dev/private-state.d.ts +1 -0
- package/src/local-dev/private-state.js +19 -23
- package/src/local-dev/process-identity.js +4 -2
- package/src/local-dev/slice-runner-child.d.ts +37 -0
- package/src/local-dev/slice-runner-child.js +127 -0
- package/src/local-dev/slice-runner-recovery.d.ts +32 -0
- package/src/local-dev/slice-runner-recovery.js +216 -0
- package/src/local-dev/slice-runner-state.d.ts +82 -0
- package/src/local-dev/slice-runner-state.js +265 -0
- package/src/local-dev/slice-runner.d.ts +4 -117
- package/src/local-dev/slice-runner.js +59 -594
- package/src/local-dev/tls.js +8 -97
- package/src/ownership/index.d.ts +1 -0
- package/src/ownership/index.js +6 -0
- package/src/ownership/pnpm-workspace.d.ts +77 -0
- package/src/ownership/pnpm-workspace.js +225 -0
- package/src/ownership/site-record.d.ts +8 -0
- package/src/ownership/site-record.js +17 -2
- package/src/repository-policy/capacity-migration.d.ts +1 -1
- package/src/repository-policy/capacity-migration.js +1 -1
- package/src/repository-policy/foundation-router.d.ts +17 -0
- package/src/repository-policy/foundation-router.js +44 -0
- package/src/repository-policy/index.d.ts +2 -0
- package/src/repository-policy/index.js +2 -0
- package/src/repository-policy/policy-accounts.d.ts +22 -0
- package/src/repository-policy/policy-accounts.js +134 -0
- package/src/repository-policy/policy-files.d.ts +8 -0
- package/src/repository-policy/policy-files.js +201 -0
- package/src/repository-policy/policy-internal.d.ts +2 -0
- package/src/repository-policy/policy-internal.js +11 -0
- package/src/repository-policy/policy-model.d.ts +95 -0
- package/src/repository-policy/policy-model.js +42 -0
- package/src/repository-policy/policy-validation.d.ts +4 -0
- package/src/repository-policy/policy-validation.js +308 -0
- package/src/repository-policy/policy.d.ts +5 -120
- package/src/repository-policy/policy.js +34 -662
- package/src/repository-policy/public-dns.d.ts +4 -0
- package/src/repository-policy/public-dns.js +102 -5
- package/src/{generators/repository-policy → repository-policy}/tree-policy.d.ts +1 -1
- package/src/{generators/repository-policy → repository-policy}/tree-policy.js +5 -5
- package/src/schemas/repository-policy-v1.json +40 -3
- package/src/secrets/index.d.ts +0 -5
- package/src/secrets/index.js +0 -5
- package/src/slice-infra/index.d.ts +57 -0
- package/src/slice-infra/index.js +117 -0
- package/src/slice-scripts/build.d.ts +27 -0
- package/src/slice-scripts/build.js +120 -0
- package/src/slice-scripts/database.d.ts +87 -0
- package/src/slice-scripts/database.js +328 -0
- package/src/slice-scripts/index.d.ts +11 -0
- package/src/slice-scripts/index.js +23 -0
- package/src/slice-scripts/root-site-routes.d.ts +11 -0
- package/src/slice-scripts/root-site-routes.js +83 -0
- package/src/slice-scripts/sql-migration-engine.mjs +180 -0
- package/src/workload-roles/effective-policy.d.ts +0 -37
- package/src/workload-roles/effective-policy.js +1 -174
- package/src/workload-roles/standard-slice.d.ts +2 -19
- package/src/workload-roles/standard-slice.js +3 -129
- package/src/api-contract/baseline-update.d.ts +0 -82
- package/src/api-contract/baseline-update.js +0 -225
- package/src/api-contract/compatibility.d.ts +0 -30
- package/src/api-contract/compatibility.js +0 -643
- package/src/api-contract/contract-graph.d.ts +0 -35
- package/src/api-contract/contract-graph.js +0 -141
- package/src/api-contract/evidence.d.ts +0 -23
- package/src/api-contract/evidence.js +0 -87
- package/src/api-contract/index.d.ts +0 -6
- package/src/api-contract/index.js +0 -10
- package/src/api-contract/model.d.ts +0 -144
- package/src/api-contract/model.js +0 -993
- package/src/api-contract/rollout.d.ts +0 -32
- package/src/api-contract/rollout.js +0 -88
- package/src/authorization/compatibility.d.ts +0 -62
- package/src/authorization/compatibility.js +0 -175
- package/src/authorization/index.d.ts +0 -1
- package/src/authorization/index.js +0 -5
- package/src/blueprints/execution.d.ts +0 -55
- package/src/blueprints/execution.js +0 -329
- package/src/blueprints/external-sandbox.d.ts +0 -53
- package/src/blueprints/external-sandbox.js +0 -1194
- package/src/blueprints/index.d.ts +0 -5
- package/src/blueprints/index.js +0 -9
- package/src/blueprints/inputs.d.ts +0 -43
- package/src/blueprints/inputs.js +0 -103
- package/src/blueprints/manifest.d.ts +0 -281
- package/src/blueprints/manifest.js +0 -424
- package/src/blueprints/resolver.d.ts +0 -37
- package/src/blueprints/resolver.js +0 -387
- package/src/blueprints/transitions.d.ts +0 -20
- package/src/blueprints/transitions.js +0 -61
- package/src/cli/agent-command.d.ts +0 -30
- package/src/cli/agent-command.js +0 -204
- package/src/cli/agent-runtime.d.ts +0 -25
- package/src/cli/agent-runtime.js +0 -498
- package/src/cli/blueprint-authority.d.ts +0 -9
- package/src/cli/blueprint-authority.js +0 -43
- package/src/cli/blueprint-command.d.ts +0 -24
- package/src/cli/blueprint-command.js +0 -63
- package/src/data-lifecycle/index.d.ts +0 -3
- package/src/data-lifecycle/index.js +0 -7
- package/src/data-lifecycle/model.d.ts +0 -172
- package/src/data-lifecycle/model.js +0 -95
- package/src/data-lifecycle/sensitive-artifacts.d.ts +0 -28
- package/src/data-lifecycle/sensitive-artifacts.js +0 -146
- package/src/data-lifecycle/validation.d.ts +0 -32
- package/src/data-lifecycle/validation.js +0 -837
- package/src/database-retirement/contract.d.ts +0 -68
- package/src/database-retirement/contract.js +0 -166
- package/src/database-retirement/index.d.ts +0 -1
- package/src/database-retirement/index.js +0 -5
- package/src/developer-agent/context.d.ts +0 -57
- package/src/developer-agent/context.js +0 -662
- package/src/developer-agent/generator-planning.d.ts +0 -34
- package/src/developer-agent/generator-planning.js +0 -759
- package/src/developer-agent/generator-preview.d.ts +0 -8
- package/src/developer-agent/generator-preview.js +0 -650
- package/src/developer-agent/git-inspection.d.ts +0 -112
- package/src/developer-agent/git-inspection.js +0 -887
- package/src/developer-agent/handoff.d.ts +0 -43
- package/src/developer-agent/handoff.js +0 -713
- package/src/developer-agent/index.d.ts +0 -10
- package/src/developer-agent/index.js +0 -14
- package/src/developer-agent/model.d.ts +0 -497
- package/src/developer-agent/model.js +0 -144
- package/src/developer-agent/operation-registry.d.ts +0 -61
- package/src/developer-agent/operation-registry.js +0 -1591
- package/src/developer-agent/ordering.d.ts +0 -9
- package/src/developer-agent/ordering.js +0 -15
- package/src/developer-agent/planning.d.ts +0 -25
- package/src/developer-agent/planning.js +0 -481
- package/src/developer-agent/preview-changes.js +0 -225
- package/src/developer-agent/preview-source.d.ts +0 -2
- package/src/developer-agent/preview-source.js +0 -19
- package/src/developer-agent/validation.d.ts +0 -30
- package/src/developer-agent/validation.js +0 -2729
- package/src/developer-agent/workspace-inspection.d.ts +0 -20
- package/src/developer-agent/workspace-inspection.js +0 -1236
- package/src/developer-agent/workspace-path.d.ts +0 -6
- package/src/developer-agent/workspace-path.js +0 -22
- package/src/executors/blueprint-trust/blueprint-trust.d.ts +0 -29
- package/src/executors/blueprint-trust/blueprint-trust.js +0 -121
- package/src/executors/blueprint-trust/schema.json +0 -27
- package/src/executors/blueprint-verification/blueprint-verification.d.ts +0 -13
- package/src/executors/blueprint-verification/blueprint-verification.js +0 -110
- package/src/executors/blueprint-verification/schema.json +0 -44
- package/src/executors/developer-context/developer-context.d.ts +0 -38
- package/src/executors/developer-context/developer-context.js +0 -78
- package/src/executors/developer-context/schema.json +0 -87
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +0 -19
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +0 -105
- package/src/executors/foundation-profile-preflight/schema.json +0 -32
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +0 -13
- package/src/executors/github-bootstrap/github-bootstrap.js +0 -62
- package/src/executors/github-bootstrap/schema.json +0 -50
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +0 -37
- package/src/executors/infrastructure-plan/infrastructure-plan.js +0 -275
- package/src/executors/infrastructure-plan/schema.json +0 -38
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +0 -42
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +0 -1229
- package/src/executors/router-waf-rehearsal/schema.json +0 -29
- package/src/executors/secret-guardrails/schema.json +0 -6
- package/src/executors/secret-guardrails/secret-guardrails.d.ts +0 -3
- package/src/executors/secret-guardrails/secret-guardrails.js +0 -44
- package/src/executors/secret-initialize/schema.json +0 -42
- package/src/executors/secret-initialize/secret-initialize.d.ts +0 -34
- package/src/executors/secret-initialize/secret-initialize.js +0 -297
- package/src/executors/secret-metadata/schema.json +0 -36
- package/src/executors/secret-metadata/secret-metadata.d.ts +0 -46
- package/src/executors/secret-metadata/secret-metadata.js +0 -230
- package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +0 -53
- package/src/executors/sst-lifecycle/generated-secret-retirement.js +0 -192
- package/src/executors/sst-lifecycle/logging-preflight.d.ts +0 -22
- package/src/executors/sst-lifecycle/logging-preflight.js +0 -217
- package/src/executors/sst-lifecycle/secret-preflight.d.ts +0 -27
- package/src/executors/sst-lifecycle/secret-preflight.js +0 -125
- package/src/executors/work-markers/schema.json +0 -14
- package/src/executors/work-markers/work-markers.d.ts +0 -6
- package/src/executors/work-markers/work-markers.js +0 -20
- package/src/foundation/cost-estimate.d.ts +0 -175
- package/src/foundation/cost-estimate.js +0 -706
- package/src/foundation/private-smoke-admission.d.ts +0 -45
- package/src/foundation/private-smoke-admission.js +0 -180
- package/src/foundation/private-smoke-control-plane.d.ts +0 -18
- package/src/foundation/private-smoke-control-plane.js +0 -184
- package/src/foundation/root-site-readiness.d.ts +0 -27
- package/src/foundation/root-site-readiness.js +0 -78
- package/src/foundation/router-waf-rate-rehearsal.d.ts +0 -97
- package/src/foundation/router-waf-rate-rehearsal.js +0 -210
- package/src/foundation/router-waf.d.ts +0 -149
- package/src/foundation/router-waf.js +0 -809
- package/src/frontend-security/index.d.ts +0 -1
- package/src/frontend-security/index.js +0 -5
- package/src/frontend-security/security-headers.d.ts +0 -50
- package/src/frontend-security/security-headers.js +0 -418
- package/src/generators/blueprint/blueprint.d.ts +0 -5
- package/src/generators/blueprint/blueprint.js +0 -102
- package/src/generators/blueprint/files.d.ts +0 -6
- package/src/generators/blueprint/files.js +0 -217
- package/src/generators/blueprint/schema.d.ts +0 -4
- package/src/generators/blueprint/schema.json +0 -18
- package/src/generators/feature-registry.d.ts +0 -13
- package/src/generators/feature-registry.js +0 -73
- package/src/generators/function/function-registration.d.ts +0 -24
- package/src/generators/function/function-registration.js +0 -66
- package/src/generators/observability-infrastructure.d.ts +0 -2
- package/src/generators/observability-infrastructure.js +0 -31
- package/src/generators/preset/workspace-files-adopter-skills.d.ts +0 -7
- package/src/generators/preset/workspace-files-adopter-skills.js +0 -359
- package/src/generators/preset/workspace-files-agent-development.d.ts +0 -9
- package/src/generators/preset/workspace-files-agent-development.js +0 -42
- package/src/generators/preset/workspace-files-ci-acceptance.d.ts +0 -1
- package/src/generators/preset/workspace-files-ci-acceptance.js +0 -791
- package/src/generators/preset/workspace-files-ci-install.d.ts +0 -2
- package/src/generators/preset/workspace-files-ci-install.js +0 -196
- package/src/generators/preset/workspace-files-developer-agent.d.ts +0 -16
- package/src/generators/preset/workspace-files-developer-agent.js +0 -644
- package/src/generators/preset/workspace-files-ecr-inspector.d.ts +0 -18
- package/src/generators/preset/workspace-files-ecr-inspector.js +0 -298
- package/src/generators/preset/workspace-files-foundation-workload-roles.d.ts +0 -6
- package/src/generators/preset/workspace-files-foundation-workload-roles.js +0 -409
- package/src/generators/preset/workspace-files-performance-cost.d.ts +0 -66
- package/src/generators/preset/workspace-files-performance-cost.js +0 -866
- package/src/generators/preset/workspace-files-performance-load.d.ts +0 -73
- package/src/generators/preset/workspace-files-performance-load.js +0 -815
- package/src/generators/preset/workspace-files-shared-operation-claims.d.ts +0 -10
- package/src/generators/preset/workspace-files-shared-operation-claims.js +0 -59
- package/src/generators/preset/workspace-files-stage-authority.d.ts +0 -6
- package/src/generators/preset/workspace-files-stage-authority.js +0 -586
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +0 -76
- package/src/generators/preset/workspace-files-thin-deploy.js +0 -2563
- package/src/generators/preset/workspace-files-thin-docs.d.ts +0 -7
- package/src/generators/preset/workspace-files-thin-docs.js +0 -386
- package/src/generators/preset/workspace-files-thin-release.d.ts +0 -14
- package/src/generators/preset/workspace-files-thin-release.js +0 -26
- package/src/generators/preset/workspace-files-workload-role-baseline.d.ts +0 -9
- package/src/generators/preset/workspace-files-workload-role-baseline.js +0 -1314
- package/src/generators/repository-policy/repository-policy.d.ts +0 -4
- package/src/generators/repository-policy/repository-policy.js +0 -294
- package/src/generators/repository-policy/schema.d.ts +0 -30
- package/src/generators/repository-policy/schema.json +0 -127
- package/src/generators/site/built-in-site-smoke-files.d.ts +0 -2
- package/src/generators/site/built-in-site-smoke-files.js +0 -37
- package/src/generators/slice/built-in-plan-alarm-identity.d.ts +0 -182
- package/src/generators/slice/built-in-plan-alarm-identity.js +0 -209
- package/src/generators/slice/built-in-plan-api-contract-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-api-contract-files.js +0 -2848
- package/src/generators/slice/built-in-plan-async-work-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-async-work-files.js +0 -6118
- package/src/generators/slice/built-in-plan-authorization-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-authorization-files.js +0 -2082
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +0 -1301
- package/src/generators/slice/built-in-plan-authorization-storage.d.ts +0 -3
- package/src/generators/slice/built-in-plan-authorization-storage.js +0 -119
- package/src/generators/slice/built-in-plan-background-work-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-background-work-files.js +0 -99
- package/src/generators/slice/built-in-plan-data-deletion-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-deletion-files.js +0 -273
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +0 -223
- package/src/generators/slice/built-in-plan-data-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-files.js +0 -618
- package/src/generators/slice/built-in-plan-data-lifecycle-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js +0 -775
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +0 -863
- package/src/generators/slice/built-in-plan-data-retention-job-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-retention-job-files.js +0 -169
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +0 -186
- package/src/generators/slice/built-in-plan-data-rights-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-data-rights-files.js +0 -152
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +0 -508
- package/src/generators/slice/built-in-plan-event-contract-literal.d.ts +0 -6
- package/src/generators/slice/built-in-plan-event-contract-literal.js +0 -52
- package/src/generators/slice/built-in-plan-foundation-files.d.ts +0 -15
- package/src/generators/slice/built-in-plan-foundation-files.js +0 -314
- package/src/generators/slice/built-in-plan-frontend-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-frontend-files.js +0 -1975
- package/src/generators/slice/built-in-plan-frontend-header-proof.d.ts +0 -6
- package/src/generators/slice/built-in-plan-frontend-header-proof.js +0 -282
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +0 -373
- package/src/generators/slice/built-in-plan-key-value-cleanup.d.ts +0 -4
- package/src/generators/slice/built-in-plan-key-value-cleanup.js +0 -101
- package/src/generators/slice/built-in-plan-key-value-consumer.d.ts +0 -4
- package/src/generators/slice/built-in-plan-key-value-consumer.js +0 -151
- package/src/generators/slice/built-in-plan-key-value-deletion.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-deletion.js +0 -377
- package/src/generators/slice/built-in-plan-key-value-delivery.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-delivery.js +0 -137
- package/src/generators/slice/built-in-plan-key-value-export.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-export.js +0 -595
- package/src/generators/slice/built-in-plan-key-value-holds.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-holds.js +0 -189
- package/src/generators/slice/built-in-plan-key-value-infrastructure.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-infrastructure.js +0 -102
- package/src/generators/slice/built-in-plan-key-value-performance.d.ts +0 -5
- package/src/generators/slice/built-in-plan-key-value-performance.js +0 -530
- package/src/generators/slice/built-in-plan-key-value-provider.d.ts +0 -4
- package/src/generators/slice/built-in-plan-key-value-provider.js +0 -366
- package/src/generators/slice/built-in-plan-key-value-records.d.ts +0 -3
- package/src/generators/slice/built-in-plan-key-value-records.js +0 -232
- package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.js +0 -103
- package/src/generators/slice/built-in-plan-key-value-retention-job-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-retention-job-files.js +0 -160
- package/src/generators/slice/built-in-plan-key-value-retention-maintenance.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-retention-maintenance.js +0 -329
- package/src/generators/slice/built-in-plan-key-value-retention-worker.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-retention-worker.js +0 -477
- package/src/generators/slice/built-in-plan-key-value-retention.d.ts +0 -2
- package/src/generators/slice/built-in-plan-key-value-retention.js +0 -184
- package/src/generators/slice/built-in-plan-log-group-helpers.d.ts +0 -29
- package/src/generators/slice/built-in-plan-log-group-helpers.js +0 -130
- package/src/generators/slice/built-in-plan-metadata-files.d.ts +0 -3
- package/src/generators/slice/built-in-plan-metadata-files.js +0 -401
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +0 -324
- package/src/generators/slice/built-in-plan-next-build-authority.d.ts +0 -5
- package/src/generators/slice/built-in-plan-next-build-authority.js +0 -124
- package/src/generators/slice/built-in-plan-operations-files.d.ts +0 -8
- package/src/generators/slice/built-in-plan-operations-files.js +0 -1106
- package/src/generators/slice/built-in-plan-performance-files.d.ts +0 -4
- package/src/generators/slice/built-in-plan-performance-files.js +0 -2444
- package/src/generators/slice/built-in-plan-release-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-release-files.js +0 -6585
- package/src/generators/slice/built-in-plan-reliability-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-reliability-files.js +0 -4728
- package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-secret-runtime-files.js +0 -1015
- package/src/generators/slice/built-in-plan-sql-events.d.ts +0 -2
- package/src/generators/slice/built-in-plan-sql-events.js +0 -276
- package/src/generators/slice/built-in-plan-testing-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-testing-files.js +0 -2618
- package/src/generators/slice/built-in-plan-testing-persistence-event-files.d.ts +0 -7
- package/src/generators/slice/built-in-plan-testing-persistence-event-files.js +0 -487
- package/src/generators/slice/built-in-plan-testing-persistence-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-testing-persistence-files.js +0 -180
- package/src/generators/slice/built-in-plan-thin-release-files.d.ts +0 -11
- package/src/generators/slice/built-in-plan-thin-release-files.js +0 -162
- package/src/generators/slice/built-in-plan-verification-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-verification-files.js +0 -442
- package/src/generators/slice/built-in-plan-workload-role-files.d.ts +0 -2
- package/src/generators/slice/built-in-plan-workload-role-files.js +0 -2220
- package/src/generators/slice/data-policy-review-seed.d.ts +0 -2
- package/src/generators/slice/data-policy-review-seed.js +0 -22
- package/src/generators/slice/deployed-smoke-diagnostics.d.ts +0 -35
- package/src/generators/slice/deployed-smoke-diagnostics.js +0 -189
- package/src/generators/slice/deployed-smoke-readiness.d.ts +0 -9
- package/src/generators/slice/deployed-smoke-readiness.js +0 -309
- package/src/generators/slice/local-source-identity.d.ts +0 -2
- package/src/generators/slice/local-source-identity.js +0 -31
- package/src/generators/slice/pnpm-launch-script.d.ts +0 -13
- package/src/generators/slice/pnpm-launch-script.js +0 -28
- package/src/generators/upgrade/custom-domain-notice.d.ts +0 -19
- package/src/generators/upgrade/custom-domain-notice.js +0 -38
- package/src/generators/upgrade/external-blueprint-compositions.d.ts +0 -84
- package/src/generators/upgrade/external-blueprint-compositions.js +0 -478
- package/src/generators/upgrade/sql-seeded-reconciliation.d.ts +0 -2
- package/src/generators/upgrade/sql-seeded-reconciliation.js +0 -170
- package/src/generators/workload/performance-registration.d.ts +0 -33
- package/src/generators/workload/performance-registration.js +0 -224
- package/src/generators/workload/reliability-registration.d.ts +0 -16
- package/src/generators/workload/reliability-registration.js +0 -150
- package/src/generators/workload/service-performance-files.d.ts +0 -5
- package/src/generators/workload/service-performance-files.js +0 -1883
- package/src/git-policy/action-pins.d.ts +0 -43
- package/src/git-policy/action-pins.js +0 -50
- package/src/git-policy/github-bootstrap.d.ts +0 -95
- package/src/git-policy/github-bootstrap.js +0 -1250
- package/src/git-policy/index.d.ts +0 -3
- package/src/git-policy/index.js +0 -7
- package/src/git-policy/routing.d.ts +0 -21
- package/src/git-policy/routing.js +0 -138
- package/src/infrastructure-change/convergence.d.ts +0 -13
- package/src/infrastructure-change/convergence.js +0 -85
- package/src/infrastructure-change/drift.d.ts +0 -13
- package/src/infrastructure-change/drift.js +0 -112
- package/src/infrastructure-change/index.d.ts +0 -7
- package/src/infrastructure-change/index.js +0 -11
- package/src/infrastructure-change/local-capability.d.ts +0 -73
- package/src/infrastructure-change/local-capability.js +0 -114
- package/src/infrastructure-change/model.d.ts +0 -274
- package/src/infrastructure-change/model.js +0 -29
- package/src/infrastructure-change/normalize.d.ts +0 -16
- package/src/infrastructure-change/normalize.js +0 -285
- package/src/infrastructure-change/plan.d.ts +0 -67
- package/src/infrastructure-change/plan.js +0 -671
- package/src/infrastructure-change/risk.d.ts +0 -9
- package/src/infrastructure-change/risk.js +0 -349
- package/src/infrastructure-change/summary.d.ts +0 -20
- package/src/infrastructure-change/summary.js +0 -130
- package/src/performance/cost-collection.d.ts +0 -225
- package/src/performance/cost-collection.js +0 -827
- package/src/performance/cost-controls.d.ts +0 -135
- package/src/performance/cost-controls.js +0 -347
- package/src/performance/evidence.d.ts +0 -140
- package/src/performance/evidence.js +0 -601
- package/src/performance/index.d.ts +0 -10
- package/src/performance/index.js +0 -14
- package/src/performance/load-safety.d.ts +0 -84
- package/src/performance/load-safety.js +0 -348
- package/src/performance/model.d.ts +0 -129
- package/src/performance/model.js +0 -451
- package/src/performance/pr-artifact-budget.d.ts +0 -42
- package/src/performance/pr-artifact-budget.js +0 -151
- package/src/performance/runner.d.ts +0 -75
- package/src/performance/runner.js +0 -227
- package/src/performance/scenario-endpoint.d.ts +0 -1
- package/src/performance/scenario-endpoint.js +0 -5
- package/src/performance/scenario.d.ts +0 -215
- package/src/performance/scenario.js +0 -744
- package/src/performance/unit-cost.d.ts +0 -105
- package/src/performance/unit-cost.js +0 -364
- package/src/release/index.d.ts +0 -2
- package/src/release/index.js +0 -6
- package/src/release/lifecycle.d.ts +0 -132
- package/src/release/lifecycle.js +0 -411
- package/src/release/manifest.d.ts +0 -148
- package/src/release/manifest.js +0 -503
- package/src/release/rollout.d.ts +0 -170
- package/src/release/rollout.js +0 -578
- package/src/release/source-authority.d.ts +0 -19
- package/src/release/source-authority.js +0 -212
- package/src/schemas/aggregate-count-evidence-v1.json +0 -135
- package/src/schemas/api-contract-baseline-v1.json +0 -674
- package/src/schemas/api-contract-compatibility-report-v1.json +0 -126
- package/src/schemas/aws-billing-actual-evidence-v1.json +0 -407
- package/src/schemas/blueprint-input-schema-v1.json +0 -23
- package/src/schemas/blueprint-v1.json +0 -188
- package/src/schemas/data-lifecycle-policy-v1.json +0 -517
- package/src/schemas/performance-policy-v1.json +0 -335
- package/src/schemas/testing-evidence-quarantine-v1.json +0 -168
- package/src/schemas/testing-evidence-result-v1.json +0 -319
- package/src/secrets/aws-control-plane.d.ts +0 -29
- package/src/secrets/aws-control-plane.js +0 -322
- package/src/secrets/generated-aws-control-plane.d.ts +0 -33
- package/src/secrets/generated-aws-control-plane.js +0 -322
- package/src/secrets/guardrails.d.ts +0 -26
- package/src/secrets/guardrails.js +0 -328
- package/src/secrets/metadata.d.ts +0 -48
- package/src/secrets/metadata.js +0 -199
- package/src/secrets/operator.d.ts +0 -190
- package/src/secrets/operator.js +0 -701
- package/src/secrets/verification.d.ts +0 -18
- package/src/secrets/verification.js +0 -152
- package/src/supply-chain/action-pins.d.ts +0 -26
- package/src/supply-chain/action-pins.js +0 -262
- package/src/supply-chain/blueprint-trust-git.d.ts +0 -130
- package/src/supply-chain/blueprint-trust-git.js +0 -1666
- package/src/supply-chain/blueprint-trust-process.d.ts +0 -4
- package/src/supply-chain/blueprint-trust-process.js +0 -88
- package/src/supply-chain/blueprint-trust.d.ts +0 -354
- package/src/supply-chain/blueprint-trust.js +0 -1558
- package/src/supply-chain/blueprint-verification-authority.d.ts +0 -62
- package/src/supply-chain/blueprint-verification-authority.js +0 -679
- package/src/supply-chain/blueprint-verification-execution.d.ts +0 -68
- package/src/supply-chain/blueprint-verification-execution.js +0 -639
- package/src/supply-chain/build-output-bounds.d.ts +0 -2
- package/src/supply-chain/build-output-bounds.js +0 -12
- package/src/supply-chain/build-output.d.ts +0 -41
- package/src/supply-chain/build-output.js +0 -551
- package/src/supply-chain/common.d.ts +0 -21
- package/src/supply-chain/common.js +0 -107
- package/src/supply-chain/container-artifact-contract.d.ts +0 -23
- package/src/supply-chain/container-artifact-contract.js +0 -208
- package/src/supply-chain/container-release.d.ts +0 -119
- package/src/supply-chain/container-release.js +0 -496
- package/src/supply-chain/ecr-applicability.d.ts +0 -19
- package/src/supply-chain/ecr-applicability.js +0 -103
- package/src/supply-chain/ecr-scanning.d.ts +0 -85
- package/src/supply-chain/ecr-scanning.js +0 -325
- package/src/supply-chain/ecs-deployed-image.d.ts +0 -87
- package/src/supply-chain/ecs-deployed-image.js +0 -302
- package/src/supply-chain/errors.d.ts +0 -6
- package/src/supply-chain/errors.js +0 -15
- package/src/supply-chain/generated-blueprint-trust-command.d.ts +0 -4
- package/src/supply-chain/generated-blueprint-trust-command.js +0 -1394
- package/src/supply-chain/generated-command.d.ts +0 -1
- package/src/supply-chain/generated-command.js +0 -775
- package/src/supply-chain/generated-container-release-command.d.ts +0 -16
- package/src/supply-chain/generated-container-release-command.js +0 -3248
- package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -20
- package/src/supply-chain/generated-ecr-collector-command.js +0 -1445
- package/src/supply-chain/generated-files.d.ts +0 -13
- package/src/supply-chain/generated-files.js +0 -421
- package/src/supply-chain/generated-scanner-command.d.ts +0 -1
- package/src/supply-chain/generated-scanner-command.js +0 -778
- package/src/supply-chain/index.d.ts +0 -28
- package/src/supply-chain/index.js +0 -36
- package/src/supply-chain/inventory.d.ts +0 -96
- package/src/supply-chain/inventory.js +0 -828
- package/src/supply-chain/license-expression.d.ts +0 -7
- package/src/supply-chain/license-expression.js +0 -128
- package/src/supply-chain/policy.d.ts +0 -105
- package/src/supply-chain/policy.js +0 -304
- package/src/supply-chain/publication.d.ts +0 -48
- package/src/supply-chain/publication.js +0 -85
- package/src/supply-chain/sbom.d.ts +0 -228
- package/src/supply-chain/sbom.js +0 -913
- package/src/supply-chain/scanner.d.ts +0 -77
- package/src/supply-chain/scanner.js +0 -514
- package/src/supply-chain/vendored-source.d.ts +0 -95
- package/src/supply-chain/vendored-source.js +0 -315
- package/src/testing-evidence/fixture-scope.d.ts +0 -53
- package/src/testing-evidence/fixture-scope.js +0 -142
- package/src/testing-evidence/index.d.ts +0 -5
- package/src/testing-evidence/index.js +0 -9
- package/src/testing-evidence/quarantine.d.ts +0 -48
- package/src/testing-evidence/quarantine.js +0 -253
- package/src/testing-evidence/result.d.ts +0 -109
- package/src/testing-evidence/result.js +0 -585
- package/src/testing-evidence/runner-adapter.d.ts +0 -51
- package/src/testing-evidence/runner-adapter.js +0 -288
- package/src/testing-evidence/sensitive-artifacts.d.ts +0 -13
- package/src/testing-evidence/sensitive-artifacts.js +0 -93
- package/src/work-markers/index.d.ts +0 -1
- package/src/work-markers/index.js +0 -5
- package/src/work-markers/work-markers.d.ts +0 -39
- package/src/work-markers/work-markers.js +0 -363
- package/src/workload-roles/account-baseline.d.ts +0 -143
- package/src/workload-roles/account-baseline.js +0 -980
- package/src/workload-roles/authority.d.ts +0 -40
- package/src/workload-roles/authority.js +0 -202
- package/src/workload-roles/aws-adapter.d.ts +0 -99
- package/src/workload-roles/aws-adapter.js +0 -416
- package/src/workload-roles/aws-internal-handler.d.ts +0 -27
- package/src/workload-roles/aws-internal-handler.js +0 -58
- package/src/workload-roles/aws-s3-state.d.ts +0 -52
- package/src/workload-roles/aws-s3-state.js +0 -191
- package/src/workload-roles/aws-sdk-control-plane.d.ts +0 -12
- package/src/workload-roles/aws-sdk-control-plane.js +0 -291
- package/src/workload-roles/boundary.d.ts +0 -34
- package/src/workload-roles/boundary.js +0 -137
- package/src/workload-roles/convergence.d.ts +0 -66
- package/src/workload-roles/convergence.js +0 -186
- package/src/workload-roles/handler.d.ts +0 -43
- package/src/workload-roles/handler.js +0 -158
- package/src/workload-roles/history.d.ts +0 -47
- package/src/workload-roles/history.js +0 -324
- package/src/workload-roles/injection.d.ts +0 -119
- package/src/workload-roles/injection.js +0 -495
- package/src/workload-roles/manifest.d.ts +0 -54
- package/src/workload-roles/manifest.js +0 -343
- package/src/workload-roles/provisioner.d.ts +0 -70
- package/src/workload-roles/provisioner.js +0 -239
- package/src/workload-roles/registration.d.ts +0 -102
- package/src/workload-roles/registration.js +0 -462
- package/src/workload-roles/stage-boundary.d.ts +0 -31
- package/src/workload-roles/stage-boundary.js +0 -208
- /package/src/executors/{foundation-profile-preflight → local-deploy}/production-database-safeguard.d.ts +0 -0
- /package/src/executors/{foundation-profile-preflight → local-deploy}/production-database-safeguard.js +0 -0
|
@@ -1,825 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.localWorkingTreeDigest =
|
|
4
|
-
exports.readDeployedSiteSmokeTarget = readDeployedSiteSmokeTarget;
|
|
5
|
-
exports.deployedSmokeEnvironment = deployedSmokeEnvironment;
|
|
6
|
-
exports.deployedSourceCommit = deployedSourceCommit;
|
|
7
|
-
exports.localDeploymentProjectOrder = localDeploymentProjectOrder;
|
|
3
|
+
exports.localWorkingTreeDigest = exports.localDeploymentProjectOrder = exports.deployedSourceCommit = exports.readDeployedSiteSmokeTarget = exports.deployedSmokeEnvironment = void 0;
|
|
8
4
|
exports.runLocalDeploy = runLocalDeploy;
|
|
9
|
-
const
|
|
5
|
+
const stage_identity_js_1 = require("../../aws-authority/stage-identity.js");
|
|
6
|
+
const devkit_1 = require("@nx/devkit");
|
|
10
7
|
const node_child_process_1 = require("node:child_process");
|
|
11
8
|
const node_fs_1 = require("node:fs");
|
|
12
9
|
const node_path_1 = require("node:path");
|
|
13
|
-
const devkit_1 = require("@nx/devkit");
|
|
14
|
-
const client_sts_1 = require("@aws-sdk/client-sts");
|
|
15
10
|
const index_js_1 = require("../../aws-authority/index.js");
|
|
16
|
-
const capacity_migration_js_1 = require("../../repository-policy/capacity-migration.js");
|
|
17
|
-
const affected_lifecycle_js_1 = require("../../workspace-deployment/affected-lifecycle.js");
|
|
18
11
|
const child_environment_js_1 = require("../../aws/child-environment.js");
|
|
19
12
|
const identity_js_1 = require("../../aws/identity.js");
|
|
13
|
+
const local_private_smoke_access_js_1 = require("../../foundation/local-private-smoke-access.js");
|
|
14
|
+
const private_smoke_access_js_1 = require("../../foundation/private-smoke-access.js");
|
|
15
|
+
const capacity_migration_js_1 = require("../../repository-policy/capacity-migration.js");
|
|
20
16
|
const index_js_2 = require("../../repository-policy/index.js");
|
|
21
|
-
const
|
|
22
|
-
const
|
|
17
|
+
const index_js_3 = require("../../workspace-deployment/index.js");
|
|
18
|
+
const governed_child_process_js_1 = require("../sst-lifecycle/governed-child-process.js");
|
|
19
|
+
const deployed_smoke_js_1 = require("./deployed-smoke.js");
|
|
20
|
+
const deployment_authority_js_1 = require("./deployment-authority.js");
|
|
21
|
+
const deployment_child_js_1 = require("./deployment-child.js");
|
|
22
|
+
const deployment_projects_js_1 = require("./deployment-projects.js");
|
|
23
|
+
const deployment_receipt_js_1 = require("./deployment-receipt.js");
|
|
24
|
+
const deployment_scope_js_1 = require("./deployment-scope.js");
|
|
25
|
+
const deployment_source_js_1 = require("./deployment-source.js");
|
|
23
26
|
const federated_credential_transport_js_1 = require("./federated-credential-transport.js");
|
|
24
27
|
const local_approval_js_1 = require("./local-approval.js");
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const index_js_3 = require("../../workspace-deployment/index.js");
|
|
28
|
-
const private_smoke_access_js_1 = require("../../foundation/private-smoke-access.js");
|
|
29
|
-
const local_private_smoke_access_js_1 = require("../../foundation/local-private-smoke-access.js");
|
|
30
|
-
const capability_plan_js_1 = require("../../foundation/capability-plan.js");
|
|
31
|
-
const root_site_js_1 = require("../../foundation/root-site.js");
|
|
32
|
-
const sst_environment_source_js_1 = require("../sst-lifecycle/sst-environment-source.js");
|
|
33
|
-
const SHA = /^[a-f0-9]{40,64}$/u;
|
|
34
|
-
const ROLE = /^arn:(aws|aws-us-gov|aws-cn):iam::\d{12}:role\/[A-Za-z0-9+=,.@_/-]{1,512}$/u;
|
|
35
|
-
const MAX_LOCAL_RELEASE_CANDIDATE_FILE_BYTES = 64 * 1024;
|
|
36
|
-
const MAX_LOCAL_RELEASE_ARTIFACTS_BYTES = 64 * 1024 * 1024;
|
|
37
|
-
const MAX_LOCAL_RELEASE_CANDIDATE_FILES = 32;
|
|
38
|
-
const MAX_LOCAL_RELEASE_CANDIDATE_BYTES = MAX_LOCAL_RELEASE_ARTIFACTS_BYTES +
|
|
39
|
-
(MAX_LOCAL_RELEASE_CANDIDATE_FILES - 1) *
|
|
40
|
-
MAX_LOCAL_RELEASE_CANDIDATE_FILE_BYTES;
|
|
41
|
-
function partitionForRegion(region) {
|
|
42
|
-
if (region.startsWith('cn-'))
|
|
43
|
-
return 'aws-cn';
|
|
44
|
-
if (region.startsWith('us-gov-'))
|
|
45
|
-
return 'aws-us-gov';
|
|
46
|
-
return 'aws';
|
|
47
|
-
}
|
|
48
|
-
function git(root, args, run) {
|
|
49
|
-
const result = run('git', args, {
|
|
50
|
-
cwd: root,
|
|
51
|
-
encoding: 'utf8',
|
|
52
|
-
env: process.env,
|
|
53
|
-
maxBuffer: 32 * 1024 * 1024,
|
|
54
|
-
shell: false,
|
|
55
|
-
});
|
|
56
|
-
if (result.status !== 0) {
|
|
57
|
-
throw new Error(`Local deployment Git preflight failed: ${String(result.stderr).trim()}`);
|
|
58
|
-
}
|
|
59
|
-
return String(result.stdout);
|
|
60
|
-
}
|
|
61
|
-
function confinedWorkspacePath(root, candidate) {
|
|
62
|
-
if (!candidate || (0, node_path_1.isAbsolute)(candidate) || candidate.includes('\0')) {
|
|
63
|
-
throw new Error('Working-tree inventory contains an invalid path.');
|
|
64
|
-
}
|
|
65
|
-
const absolute = (0, node_path_1.join)(root, candidate);
|
|
66
|
-
const confined = (0, node_path_1.relative)(root, absolute);
|
|
67
|
-
if (confined === '..' || confined.startsWith('../') || (0, node_path_1.isAbsolute)(confined)) {
|
|
68
|
-
throw new Error('Working-tree inventory escapes the workspace.');
|
|
69
|
-
}
|
|
70
|
-
return absolute;
|
|
71
|
-
}
|
|
72
|
-
/** Bind a development deployment to the exact tracked diff and untracked
|
|
73
|
-
* source bytes without requiring a commit. Ignored caches and build output are
|
|
74
|
-
* intentionally outside this identity. */
|
|
75
|
-
function localWorkingTreeDigest(root, run = node_child_process_1.spawnSync) {
|
|
76
|
-
const commit = git(root, ['rev-parse', 'HEAD'], run).trim();
|
|
77
|
-
if (!SHA.test(commit)) {
|
|
78
|
-
throw new Error('Local deployment could not resolve one exact Git HEAD.');
|
|
79
|
-
}
|
|
80
|
-
const status = git(root, ['status', '--porcelain=v1', '--untracked-files=all'], run);
|
|
81
|
-
const trackedDiff = git(root, ['diff', '--binary', 'HEAD'], run);
|
|
82
|
-
const untracked = git(root, ['ls-files', '--others', '--exclude-standard', '-z'], run)
|
|
83
|
-
.split('\0')
|
|
84
|
-
.filter(Boolean)
|
|
85
|
-
.sort();
|
|
86
|
-
const hash = (0, node_crypto_1.createHash)('sha256');
|
|
87
|
-
hash.update('ebk-working-tree-v1\0');
|
|
88
|
-
hash.update(commit);
|
|
89
|
-
hash.update('\0');
|
|
90
|
-
hash.update(status);
|
|
91
|
-
hash.update('\0');
|
|
92
|
-
hash.update(trackedDiff);
|
|
93
|
-
hash.update('\0');
|
|
94
|
-
for (const path of untracked) {
|
|
95
|
-
const absolute = confinedWorkspacePath(root, path);
|
|
96
|
-
const stat = (0, node_fs_1.lstatSync)(absolute);
|
|
97
|
-
hash.update(path);
|
|
98
|
-
hash.update('\0');
|
|
99
|
-
if (stat.isSymbolicLink()) {
|
|
100
|
-
hash.update('symlink\0');
|
|
101
|
-
hash.update((0, node_fs_1.readlinkSync)(absolute));
|
|
102
|
-
}
|
|
103
|
-
else if (stat.isFile()) {
|
|
104
|
-
hash.update('file\0');
|
|
105
|
-
hash.update((0, node_fs_1.readFileSync)(absolute));
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
throw new Error(`Untracked deployment source ${path} is not a regular file or symbolic link.`);
|
|
109
|
-
}
|
|
110
|
-
hash.update('\0');
|
|
111
|
-
}
|
|
112
|
-
return { clean: status === '', commit, digest: hash.digest('hex') };
|
|
113
|
-
}
|
|
114
|
-
function assertDeploymentSourceUnchanged(root, expected, run) {
|
|
115
|
-
const current = localWorkingTreeDigest(root, run);
|
|
116
|
-
if (current.clean !== expected.clean ||
|
|
117
|
-
current.commit !== expected.commit ||
|
|
118
|
-
current.digest !== expected.workingTreeDigest) {
|
|
119
|
-
throw new Error('Deployment source changed after lifecycle authority was established; downstream execution is blocked.');
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
function projectDescriptors(context) {
|
|
123
|
-
return Object.entries(context.projectsConfigurations?.projects ?? {}).map(([name, configuration]) => ({
|
|
124
|
-
name,
|
|
125
|
-
root: configuration.root,
|
|
126
|
-
tags: configuration.tags ?? [],
|
|
127
|
-
targets: configuration.targets ?? {},
|
|
128
|
-
}));
|
|
129
|
-
}
|
|
130
|
-
function supportsTarget(project, target) {
|
|
131
|
-
return Object.prototype.hasOwnProperty.call(project.targets, target);
|
|
132
|
-
}
|
|
133
|
-
const LOCAL_CONTAINER_TARGETS = Object.freeze([
|
|
134
|
-
'release-candidate',
|
|
135
|
-
'container-release-amd64',
|
|
136
|
-
'container-release-arm64',
|
|
137
|
-
'container-release-assemble',
|
|
138
|
-
]);
|
|
139
|
-
function requiresLocalContainerPreparation(profile, stage) {
|
|
140
|
-
return ((profile === 'starter' && stage === 'production') ||
|
|
141
|
-
(profile === 'production-isolated' && stage === 'staging'));
|
|
142
|
-
}
|
|
143
|
-
function confinedEvidenceSegments(root, candidate) {
|
|
144
|
-
const confined = (0, node_path_1.relative)(root, candidate);
|
|
145
|
-
if (confined === '' ||
|
|
146
|
-
confined === '..' ||
|
|
147
|
-
confined.startsWith(`..${node_path_1.sep}`) ||
|
|
148
|
-
(0, node_path_1.isAbsolute)(confined)) {
|
|
149
|
-
throw new Error('Local container evidence path escapes the workspace.');
|
|
150
|
-
}
|
|
151
|
-
const segments = confined.split(node_path_1.sep);
|
|
152
|
-
if (segments.some((segment) => segment === '' ||
|
|
153
|
-
segment === '.' ||
|
|
154
|
-
segment === '..' ||
|
|
155
|
-
segment.includes('\0'))) {
|
|
156
|
-
throw new Error('Local container evidence path is invalid.');
|
|
157
|
-
}
|
|
158
|
-
return segments;
|
|
159
|
-
}
|
|
160
|
-
function assertSafeEvidenceTree(path) {
|
|
161
|
-
let entries = 0;
|
|
162
|
-
const visit = (directory) => {
|
|
163
|
-
for (const entry of (0, node_fs_1.readdirSync)(directory, { withFileTypes: true })) {
|
|
164
|
-
entries += 1;
|
|
165
|
-
if (entries > 4096) {
|
|
166
|
-
throw new Error('Local container evidence tree is unexpectedly large.');
|
|
167
|
-
}
|
|
168
|
-
const child = (0, node_path_1.join)(directory, entry.name);
|
|
169
|
-
const identity = (0, node_fs_1.lstatSync)(child);
|
|
170
|
-
if (identity.isSymbolicLink()) {
|
|
171
|
-
throw new Error('Local container evidence cleanup refuses symbolic links.');
|
|
172
|
-
}
|
|
173
|
-
if (identity.isDirectory()) {
|
|
174
|
-
visit(child);
|
|
175
|
-
}
|
|
176
|
-
else if (!identity.isFile()) {
|
|
177
|
-
throw new Error('Local container evidence cleanup accepts only regular files and directories.');
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
visit(path);
|
|
182
|
-
}
|
|
183
|
-
function removeExactLocalEvidenceDirectory(root, path) {
|
|
184
|
-
const segments = confinedEvidenceSegments(root, path);
|
|
185
|
-
let current = root;
|
|
186
|
-
const rootIdentity = (0, node_fs_1.lstatSync)(current);
|
|
187
|
-
if (!rootIdentity.isDirectory() || rootIdentity.isSymbolicLink()) {
|
|
188
|
-
throw new Error('Local deployment workspace root is absent or unsafe.');
|
|
189
|
-
}
|
|
190
|
-
for (const segment of segments) {
|
|
191
|
-
current = (0, node_path_1.join)(current, segment);
|
|
192
|
-
if (!(0, node_fs_1.existsSync)(current))
|
|
193
|
-
return;
|
|
194
|
-
const identity = (0, node_fs_1.lstatSync)(current);
|
|
195
|
-
if (!identity.isDirectory() || identity.isSymbolicLink()) {
|
|
196
|
-
throw new Error('Local container evidence cleanup encountered an unsafe path.');
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
assertSafeEvidenceTree(current);
|
|
200
|
-
(0, node_fs_1.rmSync)(current, { recursive: true });
|
|
201
|
-
}
|
|
202
|
-
function ensurePrivateEvidenceDirectory(root, path) {
|
|
203
|
-
const segments = confinedEvidenceSegments(root, path);
|
|
204
|
-
let current = root;
|
|
205
|
-
for (const segment of segments) {
|
|
206
|
-
current = (0, node_path_1.join)(current, segment);
|
|
207
|
-
if ((0, node_fs_1.existsSync)(current)) {
|
|
208
|
-
const identity = (0, node_fs_1.lstatSync)(current);
|
|
209
|
-
if (!identity.isDirectory() || identity.isSymbolicLink()) {
|
|
210
|
-
throw new Error('Local container evidence directory encountered an unsafe path.');
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
(0, private_state_js_1.ensurePrivateDirectory)(current);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
function resetLocalContainerWorkingEvidence(input) {
|
|
217
|
-
const projectRoot = confinedWorkspacePath(input.root, input.project.root);
|
|
218
|
-
for (const path of [
|
|
219
|
-
(0, node_path_1.join)(projectRoot, '.ebk', 'evidence', 'release-candidate'),
|
|
220
|
-
(0, node_path_1.join)(input.root, '.ebk', 'evidence', 'release-candidate', 'packages', input.project.name),
|
|
221
|
-
(0, node_path_1.join)(input.root, '.ebk', 'evidence', 'container-release', 'partials', input.stage, input.project.name),
|
|
222
|
-
(0, node_path_1.join)(input.root, '.ebk', 'evidence', 'container-release', input.stage, 'packages', input.project.name),
|
|
223
|
-
]) {
|
|
224
|
-
removeExactLocalEvidenceDirectory(input.root, path);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
/** Materialize the same bounded workspace-level candidate layout restored by
|
|
228
|
-
* protected GitHub deployment. The generated container helper and SST image
|
|
229
|
-
* resolver both consume this exact path. */
|
|
230
|
-
function materializeLocalReleaseCandidate(input) {
|
|
231
|
-
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u.test(input.project.name)) {
|
|
232
|
-
throw new Error(`Local container release project ${input.project.name} has an unsafe evidence identity.`);
|
|
233
|
-
}
|
|
234
|
-
const projectRoot = confinedWorkspacePath(input.root, input.project.root);
|
|
235
|
-
const source = (0, node_path_1.join)(projectRoot, '.ebk', 'evidence', 'release-candidate');
|
|
236
|
-
const sourceIdentity = (0, node_fs_1.lstatSync)(source);
|
|
237
|
-
if (!sourceIdentity.isDirectory() || sourceIdentity.isSymbolicLink()) {
|
|
238
|
-
throw new Error(`Local release candidate for ${input.project.name} is absent or unsafe.`);
|
|
239
|
-
}
|
|
240
|
-
const entries = (0, node_fs_1.readdirSync)(source, { withFileTypes: true }).sort((left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0);
|
|
241
|
-
if (entries.length === 0 ||
|
|
242
|
-
entries.length > MAX_LOCAL_RELEASE_CANDIDATE_FILES ||
|
|
243
|
-
entries.some((entry) => !entry.isFile() ||
|
|
244
|
-
entry.isSymbolicLink() ||
|
|
245
|
-
!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}\.json$/u.test(entry.name))) {
|
|
246
|
-
throw new Error(`Local release candidate for ${input.project.name} has an invalid file inventory.`);
|
|
247
|
-
}
|
|
248
|
-
let totalBytes = 0;
|
|
249
|
-
const files = entries.map(({ name }) => {
|
|
250
|
-
const path = (0, node_path_1.join)(source, name);
|
|
251
|
-
const identity = (0, node_fs_1.lstatSync)(path);
|
|
252
|
-
const maximumBytes = name === 'release-artifacts.json'
|
|
253
|
-
? MAX_LOCAL_RELEASE_ARTIFACTS_BYTES
|
|
254
|
-
: MAX_LOCAL_RELEASE_CANDIDATE_FILE_BYTES;
|
|
255
|
-
if (!identity.isFile() ||
|
|
256
|
-
identity.isSymbolicLink() ||
|
|
257
|
-
identity.size <= 0 ||
|
|
258
|
-
identity.size > maximumBytes) {
|
|
259
|
-
throw new Error(`Local release candidate file ${input.project.name}/${name} is absent or unsafe.`);
|
|
260
|
-
}
|
|
261
|
-
totalBytes += identity.size;
|
|
262
|
-
return { name, path };
|
|
263
|
-
});
|
|
264
|
-
if (totalBytes > MAX_LOCAL_RELEASE_CANDIDATE_BYTES) {
|
|
265
|
-
throw new Error(`Local release candidate for ${input.project.name} exceeds the bounded inventory size.`);
|
|
266
|
-
}
|
|
267
|
-
const candidateFiles = files.map(({ name, path }) => ({
|
|
268
|
-
contents: (0, node_fs_1.readFileSync)(path),
|
|
269
|
-
name,
|
|
270
|
-
}));
|
|
271
|
-
const candidateFile = candidateFiles.find(({ name }) => name === 'candidate.json');
|
|
272
|
-
let candidate;
|
|
273
|
-
try {
|
|
274
|
-
candidate = JSON.parse(candidateFile?.contents.toString('utf8') ?? '');
|
|
275
|
-
}
|
|
276
|
-
catch {
|
|
277
|
-
throw new Error(`Local release candidate for ${input.project.name} is invalid JSON.`);
|
|
278
|
-
}
|
|
279
|
-
if (candidate.kind !== 'ebk-release-candidate' ||
|
|
280
|
-
candidate.schemaVersion !== 1 ||
|
|
281
|
-
candidate.slice !== input.project.name ||
|
|
282
|
-
candidate.sourceCommit !== input.sourceCommit) {
|
|
283
|
-
throw new Error(`Local release candidate for ${input.project.name} differs from the exact deployment source.`);
|
|
284
|
-
}
|
|
285
|
-
const destination = (0, node_path_1.join)(input.root, '.ebk', 'evidence', 'release-candidate', 'packages', input.project.name);
|
|
286
|
-
removeExactLocalEvidenceDirectory(input.root, destination);
|
|
287
|
-
ensurePrivateEvidenceDirectory(input.root, destination);
|
|
288
|
-
for (const { contents, name } of candidateFiles) {
|
|
289
|
-
if (name === 'release-artifacts.json') {
|
|
290
|
-
(0, private_state_js_1.atomicWritePrivateFileWithMaximumBytes)((0, node_path_1.join)(destination, name), contents, MAX_LOCAL_RELEASE_ARTIFACTS_BYTES);
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
(0, private_state_js_1.atomicWritePrivateFile)((0, node_path_1.join)(destination, name), contents);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
function attestLocalContainerBinding(input) {
|
|
298
|
-
const path = (0, node_path_1.join)(input.root, '.ebk', 'evidence', 'container-release', input.stage, 'packages', input.project.name, 'binding.json');
|
|
299
|
-
const identity = (0, node_fs_1.lstatSync)(path);
|
|
300
|
-
if (!identity.isFile() ||
|
|
301
|
-
identity.isSymbolicLink() ||
|
|
302
|
-
identity.size <= 0 ||
|
|
303
|
-
identity.size > 64 * 1024 * 1024) {
|
|
304
|
-
throw new Error(`Local protected container binding for ${input.project.name} is absent or unsafe.`);
|
|
305
|
-
}
|
|
306
|
-
const binding = (0, container_release_js_1.validateContainerReleaseBinding)(JSON.parse((0, node_fs_1.readFileSync)(path, 'utf8')));
|
|
307
|
-
if (binding.accountId !== input.account ||
|
|
308
|
-
binding.region !== input.region ||
|
|
309
|
-
binding.slice !== input.project.name ||
|
|
310
|
-
binding.sourceCommit !== input.sourceCommit ||
|
|
311
|
-
binding.stage !== input.stage) {
|
|
312
|
-
throw new Error(`Local protected container binding for ${input.project.name} differs from the exact deployment authority.`);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
/** Read only the bounded public outputs SST writes after a successful native
|
|
316
|
-
* deploy. This is post-operation smoke input, never preview or mutation
|
|
317
|
-
* authority. Stage and project identity prevent a stale output file from
|
|
318
|
-
* selecting another deployment. */
|
|
319
|
-
function readDeployedSmokeTarget(workspaceRoot, project, stage) {
|
|
320
|
-
const projectRoot = confinedWorkspacePath(workspaceRoot, project.root);
|
|
321
|
-
const outputPath = (0, node_path_1.join)(projectRoot, '.sst', 'outputs.json');
|
|
322
|
-
const identity = (0, node_fs_1.lstatSync)(outputPath);
|
|
323
|
-
if (!identity.isFile() ||
|
|
324
|
-
identity.isSymbolicLink() ||
|
|
325
|
-
identity.size < 2 ||
|
|
326
|
-
identity.size > 64 * 1024) {
|
|
327
|
-
throw new Error(`Native SST outputs for ${project.name} are absent or unsafe.`);
|
|
328
|
-
}
|
|
329
|
-
const value = JSON.parse((0, node_fs_1.readFileSync)(outputPath, 'utf8'));
|
|
330
|
-
let api;
|
|
331
|
-
let web;
|
|
332
|
-
try {
|
|
333
|
-
api = new URL(String(value.apiUrl ?? ''));
|
|
334
|
-
web = new URL(String(value.webUrl ?? ''));
|
|
335
|
-
}
|
|
336
|
-
catch {
|
|
337
|
-
throw new Error(`Native SST outputs for ${project.name} contain invalid smoke URLs.`);
|
|
338
|
-
}
|
|
339
|
-
// WHATWG URL keeps '*' in a host. A Slice whose managed infrastructure still
|
|
340
|
-
// publishes SST's referenced-Router URL names the wildcard alias host under a
|
|
341
|
-
// custom domain. Refuse a '*' and any character outside letters, digits, '.'
|
|
342
|
-
// and '-' before smoke; this is not a hostname validator.
|
|
343
|
-
const literalHost = /^[a-z0-9.-]+$/u;
|
|
344
|
-
if (!literalHost.test(api.hostname) || !literalHost.test(web.hostname)) {
|
|
345
|
-
throw new Error(`Native SST outputs for ${project.name} name a host with '*' or a character other than letters, digits, '.' and '-'. Slice URLs must use the Foundation routerUrl host; apply the managed Slice upgrade and redeploy before smoke.`);
|
|
346
|
-
}
|
|
347
|
-
const credentialFreeHttps = (url) => url.protocol === 'https:' &&
|
|
348
|
-
!url.username &&
|
|
349
|
-
!url.password &&
|
|
350
|
-
!url.search &&
|
|
351
|
-
!url.hash;
|
|
352
|
-
if (value.name !== project.name ||
|
|
353
|
-
value.stage !== stage ||
|
|
354
|
-
!credentialFreeHttps(api) ||
|
|
355
|
-
!credentialFreeHttps(web) ||
|
|
356
|
-
// A bound Slice API is mapped under /<project> on the Foundation's
|
|
357
|
-
// api.<root> domain; an execute-api origin has no path.
|
|
358
|
-
!['/', `/${project.name}`].includes(api.pathname.replace(/\/$/u, '') || '/') ||
|
|
359
|
-
web.pathname.replace(/\/$/u, '') !== `/${project.name}` ||
|
|
360
|
-
!/^[a-z0-9]{1,128}$/u.test(String(value.authClientId ?? '')) ||
|
|
361
|
-
!/^[A-Za-z0-9_-]{1,128}_[A-Za-z0-9]{1,128}$/u.test(String(value.authUserPoolId ?? ''))) {
|
|
362
|
-
throw new Error(`Native SST outputs for ${project.name} do not match the deployed stage and smoke target.`);
|
|
363
|
-
}
|
|
364
|
-
return {
|
|
365
|
-
apiUrl: api.href,
|
|
366
|
-
clientId: String(value.authClientId),
|
|
367
|
-
userPoolId: String(value.authUserPoolId),
|
|
368
|
-
webUrl: web.href,
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
/** The root site's bounded public outputs: its kind, name, stage and a web
|
|
372
|
-
* URL at the Router origin's `/`, with the same literal-host refusal as a
|
|
373
|
-
* Slice. */
|
|
374
|
-
function readDeployedSiteSmokeTarget(workspaceRoot, project, stage) {
|
|
375
|
-
const projectRoot = confinedWorkspacePath(workspaceRoot, project.root);
|
|
376
|
-
const outputPath = (0, node_path_1.join)(projectRoot, '.sst', 'outputs.json');
|
|
377
|
-
const identity = (0, node_fs_1.lstatSync)(outputPath);
|
|
378
|
-
if (!identity.isFile() ||
|
|
379
|
-
identity.isSymbolicLink() ||
|
|
380
|
-
identity.size < 2 ||
|
|
381
|
-
identity.size > 64 * 1024) {
|
|
382
|
-
throw new Error(`Native SST outputs for ${project.name} are absent or unsafe.`);
|
|
383
|
-
}
|
|
384
|
-
const value = JSON.parse((0, node_fs_1.readFileSync)(outputPath, 'utf8'));
|
|
385
|
-
let web;
|
|
386
|
-
try {
|
|
387
|
-
web = new URL(String(value.webUrl ?? ''));
|
|
388
|
-
}
|
|
389
|
-
catch {
|
|
390
|
-
throw new Error(`Native SST outputs for ${project.name} contain an invalid smoke URL.`);
|
|
391
|
-
}
|
|
392
|
-
if (!/^[a-z0-9.-]+$/u.test(web.hostname)) {
|
|
393
|
-
throw new Error(`Native SST outputs for ${project.name} name a host with '*' or a character other than letters, digits, '.' and '-'. The root site URL must use the Foundation routerUrl host; apply the managed root site upgrade and redeploy before smoke.`);
|
|
394
|
-
}
|
|
395
|
-
if (value.kind !== 'site' ||
|
|
396
|
-
value.name !== root_site_js_1.ROOT_SITE_NAME ||
|
|
397
|
-
value.stage !== stage ||
|
|
398
|
-
['apiUrl', 'authClientId', 'authUserPoolId'].some((key) => key in value) ||
|
|
399
|
-
web.protocol !== 'https:' ||
|
|
400
|
-
web.username ||
|
|
401
|
-
web.password ||
|
|
402
|
-
web.search ||
|
|
403
|
-
web.hash ||
|
|
404
|
-
web.pathname !== '/') {
|
|
405
|
-
throw new Error(`Native SST outputs for ${project.name} do not match the deployed stage and root site smoke target.`);
|
|
406
|
-
}
|
|
407
|
-
return { webUrl: web.href };
|
|
408
|
-
}
|
|
409
|
-
function deployedSmokeEnvironment(target) {
|
|
410
|
-
if (!('apiUrl' in target))
|
|
411
|
-
return { EBK_SMOKE_URL: target.webUrl };
|
|
412
|
-
return {
|
|
413
|
-
EBK_SMOKE_API_URL: target.apiUrl,
|
|
414
|
-
EBK_SMOKE_AUTHORITY_VERSION: 'cognito-admin-cloudwatch-observe-v1',
|
|
415
|
-
EBK_SMOKE_CLIENT_ID: target.clientId,
|
|
416
|
-
EBK_SMOKE_URL: target.webUrl,
|
|
417
|
-
EBK_SMOKE_USER_POOL_ID: target.userPoolId,
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
const GIT_SHA = /^[a-f0-9]{40,64}$/u;
|
|
421
|
-
// A trunk promotion deploys the immutable artifacts built from the release
|
|
422
|
-
// source (EBK_RELEASE_SOURCE_COMMIT, the staging-built head) while it runs
|
|
423
|
-
// under the promotion commit. The deployed smoke must expect the build
|
|
424
|
-
// identity the deployed Functions report, not the commit the workflow runs
|
|
425
|
-
// under (EBK-INT-2026-086); receipts keep binding the promotion commit.
|
|
426
|
-
function deployedSourceCommit(sourceCommit, environment = process.env) {
|
|
427
|
-
const release = environment.EBK_RELEASE_SOURCE_COMMIT ?? '';
|
|
428
|
-
return GIT_SHA.test(release) ? release : sourceCommit;
|
|
429
|
-
}
|
|
430
|
-
const RUN_NUMBER = /^[1-9][0-9]*$/u;
|
|
431
|
-
/** Resolve which projects this deployment must touch. Anything that cannot be
|
|
432
|
-
* proven unchanged since the baseline receipt deploys; governing changes deploy
|
|
433
|
-
* everything. Local runs default to the full lifecycle. */
|
|
434
|
-
function baselineRunIdentity(value) {
|
|
435
|
-
if (typeof value === 'number') {
|
|
436
|
-
return Number.isSafeInteger(value) && value >= 1 ? String(value) : '';
|
|
437
|
-
}
|
|
438
|
-
return value?.trim() ?? '';
|
|
439
|
-
}
|
|
440
|
-
function resolveLifecycleScope(input) {
|
|
441
|
-
const requestedMode = input.options.lifecycleScope === 'affected' ? 'affected' : 'full';
|
|
442
|
-
const receiptPath = input.options.baselineReceipt?.trim() ?? '';
|
|
443
|
-
// Nx parses digits-only arguments as numbers; the workflow passes the run
|
|
444
|
-
// id and attempt as digits (EBK-INT-2026-084).
|
|
445
|
-
const runId = baselineRunIdentity(input.options.baselineRunId);
|
|
446
|
-
const runAttempt = baselineRunIdentity(input.options.baselineRunAttempt);
|
|
447
|
-
const withoutBaseline = (reason) => ({
|
|
448
|
-
baseline: null,
|
|
449
|
-
mode: 'full',
|
|
450
|
-
projects: Object.fromEntries(input.orderedProjects.map((project) => [project, 'deploy'])),
|
|
451
|
-
reason,
|
|
452
|
-
});
|
|
453
|
-
if (requestedMode === 'full')
|
|
454
|
-
return withoutBaseline('requested-full');
|
|
455
|
-
if (receiptPath === '')
|
|
456
|
-
return withoutBaseline('no-baseline');
|
|
457
|
-
if ((0, node_path_1.isAbsolute)(receiptPath) === false && receiptPath.includes('..')) {
|
|
458
|
-
return withoutBaseline('baseline-path-rejected');
|
|
459
|
-
}
|
|
460
|
-
if (!RUN_NUMBER.test(runId) || !RUN_NUMBER.test(runAttempt)) {
|
|
461
|
-
return withoutBaseline('baseline-run-rejected');
|
|
462
|
-
}
|
|
463
|
-
let receipt;
|
|
464
|
-
try {
|
|
465
|
-
const parsed = JSON.parse((0, node_fs_1.readFileSync)(receiptPath, 'utf8'));
|
|
466
|
-
receipt = validateBaselineReceipt(parsed);
|
|
467
|
-
}
|
|
468
|
-
catch (error) {
|
|
469
|
-
devkit_1.logger.warn(`[lifecycle-scope] baseline receipt rejected: ${error instanceof Error ? error.message : String(error)}`);
|
|
470
|
-
return withoutBaseline('baseline-receipt-rejected');
|
|
471
|
-
}
|
|
472
|
-
const baselineCommit = receipt.source.commit;
|
|
473
|
-
const git = (args) => input.run('git', args, {
|
|
474
|
-
cwd: input.context.root,
|
|
475
|
-
encoding: 'utf8',
|
|
476
|
-
maxBuffer: 16 * 1024 * 1024,
|
|
477
|
-
});
|
|
478
|
-
const ancestry = git([
|
|
479
|
-
'merge-base',
|
|
480
|
-
'--is-ancestor',
|
|
481
|
-
baselineCommit,
|
|
482
|
-
input.source.commit,
|
|
483
|
-
]);
|
|
484
|
-
if (ancestry.status !== 0)
|
|
485
|
-
return withoutBaseline('baseline-not-ancestor');
|
|
486
|
-
const governing = git([
|
|
487
|
-
'diff',
|
|
488
|
-
'--name-only',
|
|
489
|
-
`${baselineCommit}..${input.source.commit}`,
|
|
490
|
-
'--',
|
|
491
|
-
...affected_lifecycle_js_1.LIFECYCLE_GOVERNING_FILES,
|
|
492
|
-
]);
|
|
493
|
-
if (governing.status !== 0)
|
|
494
|
-
return withoutBaseline('governing-diff-unavailable');
|
|
495
|
-
const changedGoverningFiles = String(governing.stdout)
|
|
496
|
-
.split('\n')
|
|
497
|
-
.map((line) => line.trim())
|
|
498
|
-
.filter((line) => line.length > 0);
|
|
499
|
-
const affected = input.run(process.execPath, [
|
|
500
|
-
(0, node_path_1.join)(input.context.root, 'node_modules', 'nx', 'dist', 'bin', 'nx.js'),
|
|
501
|
-
'show',
|
|
502
|
-
'projects',
|
|
503
|
-
'--affected',
|
|
504
|
-
`--base=${baselineCommit}`,
|
|
505
|
-
`--head=${input.source.commit}`,
|
|
506
|
-
'--json',
|
|
507
|
-
], {
|
|
508
|
-
cwd: input.context.root,
|
|
509
|
-
encoding: 'utf8',
|
|
510
|
-
env: { ...process.env, NX_DAEMON: 'false' },
|
|
511
|
-
maxBuffer: 16 * 1024 * 1024,
|
|
512
|
-
});
|
|
513
|
-
let affectedProjects = null;
|
|
514
|
-
if (affected.status === 0) {
|
|
515
|
-
try {
|
|
516
|
-
const parsed = JSON.parse(String(affected.stdout));
|
|
517
|
-
affectedProjects = Array.isArray(parsed)
|
|
518
|
-
? parsed.filter((entry) => typeof entry === 'string')
|
|
519
|
-
: null;
|
|
520
|
-
}
|
|
521
|
-
catch {
|
|
522
|
-
affectedProjects = null;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
return (0, affected_lifecycle_js_1.selectLifecycleScope)({
|
|
526
|
-
affectedProjects,
|
|
527
|
-
baseline: { commit: baselineCommit, receipt, runAttempt, runId },
|
|
528
|
-
changedGoverningFiles,
|
|
529
|
-
frameworkVersion: input.frameworkVersion,
|
|
530
|
-
orderedProjects: input.orderedProjects,
|
|
531
|
-
requestedMode,
|
|
532
|
-
stage: input.options.stage,
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
function validateBaselineReceipt(value) {
|
|
536
|
-
const record = value;
|
|
537
|
-
if (!record ||
|
|
538
|
-
typeof record !== 'object' ||
|
|
539
|
-
Object.prototype.hasOwnProperty.call(record, 'selectedSlices') ||
|
|
540
|
-
record.kind !== 'ebk-deployment-receipt' ||
|
|
541
|
-
record.schemaVersion !== 1 ||
|
|
542
|
-
typeof record.outcome !== 'string' ||
|
|
543
|
-
typeof record.stage !== 'string' ||
|
|
544
|
-
typeof record.frameworkVersion !== 'string' ||
|
|
545
|
-
!record.source ||
|
|
546
|
-
typeof record.source !== 'object' ||
|
|
547
|
-
!GIT_SHA.test(String(record.source.commit ?? '')) ||
|
|
548
|
-
!Array.isArray(record.children) ||
|
|
549
|
-
record.children.some((child) => !child ||
|
|
550
|
-
typeof child !== 'object' ||
|
|
551
|
-
typeof child.project !== 'string' ||
|
|
552
|
-
typeof child.target !== 'string' ||
|
|
553
|
-
typeof child.outcome !== 'string')) {
|
|
554
|
-
throw new Error('Baseline deployment receipt is malformed.');
|
|
555
|
-
}
|
|
556
|
-
return {
|
|
557
|
-
children: record.children,
|
|
558
|
-
frameworkVersion: record.frameworkVersion,
|
|
559
|
-
outcome: record.outcome,
|
|
560
|
-
source: { commit: String(record.source.commit) },
|
|
561
|
-
stage: record.stage,
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
/** Determine the one native deployment order. Foundation is always first and
|
|
565
|
-
* production Slice admission remains a committed policy decision. */
|
|
566
|
-
function localDeploymentProjectOrder(policy, context, stage, requestedSlices) {
|
|
567
|
-
if (!(0, index_js_2.isActiveDeploymentStage)(policy.deploymentProfile, stage)) {
|
|
568
|
-
throw new Error(`Deployment stage ${stage} is inactive for the ${policy.deploymentProfile} deployment profile.`);
|
|
569
|
-
}
|
|
570
|
-
const projects = projectDescriptors(context);
|
|
571
|
-
const foundations = projects.filter((project) => project.tags.includes('scope:foundation') &&
|
|
572
|
-
supportsTarget(project, 'deploy'));
|
|
573
|
-
if (foundations.length !== 1) {
|
|
574
|
-
throw new Error(`Local deployment requires exactly one deployable Foundation; found ${foundations.length}.`);
|
|
575
|
-
}
|
|
576
|
-
const slices = projects
|
|
577
|
-
.filter((project) => project.tags.includes('type:slice') &&
|
|
578
|
-
supportsTarget(project, 'deploy'))
|
|
579
|
-
.sort((left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0);
|
|
580
|
-
// The root site deploys after the Foundation and before every Slice, so it
|
|
581
|
-
// is removed after them.
|
|
582
|
-
const sites = projects.filter((project) => project.tags.includes('type:site') && supportsTarget(project, 'deploy'));
|
|
583
|
-
if (slices.some(({ name }) => name === root_site_js_1.ROOT_SITE_NAME)) {
|
|
584
|
-
throw new Error(`Product Slice ${root_site_js_1.ROOT_SITE_NAME} cannot deploy: ${root_site_js_1.ROOT_SITE_NAME} is reserved for the workspace root site. ${root_site_js_1.ROOT_SITE_RENAME_GUIDANCE}`);
|
|
585
|
-
}
|
|
586
|
-
if (sites.length > 1 ||
|
|
587
|
-
sites.some(({ name, root }) => name !== root_site_js_1.ROOT_SITE_NAME || root !== root_site_js_1.ROOT_SITE_ROOT)) {
|
|
588
|
-
throw new Error(`Local deployment accepts one root site, the ${root_site_js_1.ROOT_SITE_NAME} project at ${root_site_js_1.ROOT_SITE_ROOT}.`);
|
|
589
|
-
}
|
|
590
|
-
if (stage === 'production') {
|
|
591
|
-
const missing = slices
|
|
592
|
-
.filter(({ name }) => policy.slices[name] === undefined)
|
|
593
|
-
.map(({ name }) => name);
|
|
594
|
-
if (missing.length > 0) {
|
|
595
|
-
throw new Error(`Registered Product Slices lack an explicit production policy: ${missing.join(', ')}.`);
|
|
596
|
-
}
|
|
597
|
-
if (sites.length > 0 && policy.site === undefined) {
|
|
598
|
-
throw new Error('The registered root site lacks an explicit production policy: set site.productionStatus to blocked or ready.');
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
const eligibleSites = stage === 'production' && policy.site?.productionStatus !== 'ready'
|
|
602
|
-
? []
|
|
603
|
-
: sites;
|
|
604
|
-
const eligibleSlices = [
|
|
605
|
-
...eligibleSites,
|
|
606
|
-
...(stage === 'production'
|
|
607
|
-
? slices.filter(({ name }) => {
|
|
608
|
-
const status = policy.slices[name]?.productionStatus;
|
|
609
|
-
return status === 'pilot' || status === 'ready';
|
|
610
|
-
})
|
|
611
|
-
: slices),
|
|
612
|
-
];
|
|
613
|
-
if (requestedSlices !== undefined &&
|
|
614
|
-
(!Array.isArray(requestedSlices) ||
|
|
615
|
-
requestedSlices.length === 0 ||
|
|
616
|
-
requestedSlices.length > 64 ||
|
|
617
|
-
new Set(requestedSlices).size !== requestedSlices.length ||
|
|
618
|
-
requestedSlices.some((name) => typeof name !== 'string' || !/^[a-z0-9][a-z0-9-]{0,62}$/.test(name)))) {
|
|
619
|
-
throw new Error('Local deployment Slice selection must contain unique, bounded Slice names.');
|
|
620
|
-
}
|
|
621
|
-
for (const name of requestedSlices ?? []) {
|
|
622
|
-
if (!eligibleSlices.some((slice) => slice.name === name)) {
|
|
623
|
-
throw new Error(`Selected Slice ${name} is not deployable in ${stage}; inspect its project and committed production policy.`);
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
const selectedSlices = requestedSlices === undefined
|
|
627
|
-
? eligibleSlices
|
|
628
|
-
: eligibleSlices.filter(({ name }) => requestedSlices.includes(name));
|
|
629
|
-
const selected = [
|
|
630
|
-
{ kind: 'foundation', name: foundations[0]?.name ?? '' },
|
|
631
|
-
...selectedSlices.map(({ name, tags }) => ({
|
|
632
|
-
kind: tags.includes('type:site') ? 'site' : 'slice',
|
|
633
|
-
name,
|
|
634
|
-
})),
|
|
635
|
-
];
|
|
636
|
-
const decision = (0, index_js_2.evaluateRepositoryPolicyRequest)(policy, {
|
|
637
|
-
action: 'deploy',
|
|
638
|
-
projects: selected,
|
|
639
|
-
stage,
|
|
640
|
-
});
|
|
641
|
-
if (!decision.allowed) {
|
|
642
|
-
throw new Error(`Repository Operating Policy rejected local deployment:\n${decision.reasons.map((reason) => `- ${reason}`).join('\n')}`);
|
|
643
|
-
}
|
|
644
|
-
return selected.map(({ name }) => name);
|
|
645
|
-
}
|
|
646
|
-
function frameworkVersion(root) {
|
|
647
|
-
const candidates = [
|
|
648
|
-
(0, node_path_1.join)(root, 'node_modules', '@empire-builder-kit', 'nx', 'package.json'),
|
|
649
|
-
(0, node_path_1.join)(root, 'package.json'),
|
|
650
|
-
];
|
|
651
|
-
for (const path of candidates) {
|
|
652
|
-
try {
|
|
653
|
-
const value = JSON.parse((0, node_fs_1.readFileSync)(path, 'utf8'));
|
|
654
|
-
if (value.name === '@empire-builder-kit/nx' && value.version) {
|
|
655
|
-
return value.version;
|
|
656
|
-
}
|
|
657
|
-
const dependency = value.devDependencies?.['@empire-builder-kit/nx'] ??
|
|
658
|
-
value.dependencies?.['@empire-builder-kit/nx'];
|
|
659
|
-
if (dependency)
|
|
660
|
-
return dependency;
|
|
661
|
-
}
|
|
662
|
-
catch {
|
|
663
|
-
// Try the next deterministic package identity.
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
return 'unknown';
|
|
667
|
-
}
|
|
668
|
-
function prepareReceiptDestination(root) {
|
|
669
|
-
const directory = (0, node_path_1.join)(root, '.ebk', 'evidence', 'deployment');
|
|
670
|
-
ensurePrivateEvidenceDirectory(root, directory);
|
|
671
|
-
const path = (0, node_path_1.join)(directory, 'latest.json');
|
|
672
|
-
if ((0, node_fs_1.existsSync)(path))
|
|
673
|
-
(0, private_state_js_1.assertPrivatePath)(path, 'file');
|
|
674
|
-
return path;
|
|
675
|
-
}
|
|
676
|
-
function writeReceipt(root, receipt) {
|
|
677
|
-
(0, private_state_js_1.atomicWritePrivateFile)(prepareReceiptDestination(root), `${JSON.stringify(receipt, null, 2)}\n`);
|
|
678
|
-
}
|
|
679
|
-
function invalidatePriorReceipt(root) {
|
|
680
|
-
const path = prepareReceiptDestination(root);
|
|
681
|
-
if (!(0, node_fs_1.existsSync)(path))
|
|
682
|
-
return;
|
|
683
|
-
(0, private_state_js_1.assertPrivatePath)(path, 'file');
|
|
684
|
-
(0, node_fs_1.rmSync)(path, { force: true });
|
|
685
|
-
if ((0, node_fs_1.existsSync)(path)) {
|
|
686
|
-
throw new Error('Prior deployment receipt invalidation failed.');
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
class NativeChildReconciliationError extends Error {
|
|
690
|
-
constructor(primary, reconciliation) {
|
|
691
|
-
const describe = (error) => error instanceof Error ? error.message : String(error);
|
|
692
|
-
super(`${describe(primary)}; source reconciliation also failed: ${describe(reconciliation)}`);
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
async function runNxTarget(input) {
|
|
696
|
-
const forwarded = [
|
|
697
|
-
`--stage=${input.stage}`,
|
|
698
|
-
`--expectedRoleArn=${input.expectedRoleArn}`,
|
|
699
|
-
`--region=${input.region}`,
|
|
700
|
-
...(input.profile ? [`--profile=${input.profile}`] : []),
|
|
701
|
-
];
|
|
702
|
-
const args = [
|
|
703
|
-
(0, node_path_1.join)(input.context.root, 'node_modules', 'nx', 'dist', 'bin', 'nx.js'),
|
|
704
|
-
'run',
|
|
705
|
-
`${input.project}:${input.target}`,
|
|
706
|
-
'--',
|
|
707
|
-
...forwarded,
|
|
708
|
-
];
|
|
709
|
-
const projectRoot = input.context.projectsConfigurations?.projects[input.project]?.root;
|
|
710
|
-
if (!projectRoot)
|
|
711
|
-
throw new Error(`Deployment project ${input.project} lacks its source root.`);
|
|
712
|
-
const nextSource = (0, sst_environment_source_js_1.captureNextEnvironmentSource)({
|
|
713
|
-
projectRoot: confinedWorkspacePath(input.context.root, projectRoot),
|
|
714
|
-
workspaceRoot: input.context.root,
|
|
715
|
-
});
|
|
716
|
-
let primaryFailure;
|
|
717
|
-
try {
|
|
718
|
-
const result = input.runSync
|
|
719
|
-
? input.runSync(process.execPath, args, {
|
|
720
|
-
cwd: input.context.root,
|
|
721
|
-
env: input.environment,
|
|
722
|
-
shell: false,
|
|
723
|
-
stdio: 'inherit',
|
|
724
|
-
})
|
|
725
|
-
: await (0, run_sst_command_js_1.runGovernedChildProcess)({
|
|
726
|
-
args,
|
|
727
|
-
cwd: input.context.root,
|
|
728
|
-
environment: input.environment,
|
|
729
|
-
executable: process.execPath,
|
|
730
|
-
...(input.spawnChild ? { spawnChild: input.spawnChild } : {}),
|
|
731
|
-
});
|
|
732
|
-
if (result.error || result.signal || result.status !== 0) {
|
|
733
|
-
throw new Error(result.error
|
|
734
|
-
? `${input.target} failed for ${input.project}: ${result.error.message}`
|
|
735
|
-
: result.signal
|
|
736
|
-
? `${input.target} failed for ${input.project} with signal ${result.signal}.`
|
|
737
|
-
: `${input.target} failed for ${input.project} with status ${result.status ?? 'unknown'}.`);
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
catch (error) {
|
|
741
|
-
primaryFailure = { error };
|
|
742
|
-
}
|
|
743
|
-
// Reconcile after every settled child, retaining its error until cleanup ends.
|
|
744
|
-
// Native Next may run in an Nx dependency before the SST executor starts.
|
|
745
|
-
try {
|
|
746
|
-
(0, sst_environment_source_js_1.reconcileNextEnvironmentSource)(nextSource, input.context.root);
|
|
747
|
-
}
|
|
748
|
-
catch (error) {
|
|
749
|
-
if (primaryFailure)
|
|
750
|
-
throw new NativeChildReconciliationError(primaryFailure.error, error);
|
|
751
|
-
throw error;
|
|
752
|
-
}
|
|
753
|
-
if (primaryFailure)
|
|
754
|
-
throw primaryFailure.error;
|
|
755
|
-
}
|
|
756
|
-
const FOUNDATION_DESCRIPTOR_PATH = 'packages/foundation/contracts/foundation.json';
|
|
757
|
-
/** The committed Foundation declaration is the only SQL signal; the generated
|
|
758
|
-
* Foundation publishes database discovery exactly when it declares postgres. */
|
|
759
|
-
function productionFoundationDeclaresPostgres(root) {
|
|
760
|
-
let descriptor;
|
|
761
|
-
try {
|
|
762
|
-
descriptor = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(root, FOUNDATION_DESCRIPTOR_PATH), 'utf8'));
|
|
763
|
-
}
|
|
764
|
-
catch {
|
|
765
|
-
throw new Error(`Production deployment requires the committed Foundation capability declaration ${FOUNDATION_DESCRIPTOR_PATH}.`);
|
|
766
|
-
}
|
|
767
|
-
return (0, capability_plan_js_1.planFoundationCapabilities)({ current: descriptor, requirements: [] })
|
|
768
|
-
.resources.postgres;
|
|
769
|
-
}
|
|
770
|
-
/** Declarations are monotonic: a SQL-free Foundation must never observe, gain,
|
|
771
|
-
* or lose a production database during a native deployment. The
|
|
772
|
-
* `priorDiscovery` check is a redundant second line: the preflight already
|
|
773
|
-
* rejects an existing database before any child deploys, so a prior `existing`
|
|
774
|
-
* state cannot reach the postflights today and no spec exercises that branch. */
|
|
775
|
-
function assertSqlFreeProductionDatabase(discovery, priorDiscovery) {
|
|
776
|
-
if (discovery.state !== 'absent' || priorDiscovery?.state === 'existing') {
|
|
777
|
-
throw new Error('Production Foundation database discovery is present although the Foundation does not declare postgres; deployment is blocked.');
|
|
778
|
-
}
|
|
779
|
-
}
|
|
780
|
-
function productionConfirmation(account, region, commit) {
|
|
781
|
-
return `deploy:production:${account}:${region}:${commit}`;
|
|
782
|
-
}
|
|
783
|
-
async function defaultIdentifyGithubCaller(region) {
|
|
784
|
-
return new client_sts_1.STSClient({
|
|
785
|
-
endpoint: (0, identity_js_1.canonicalStsEndpoint)(region),
|
|
786
|
-
region,
|
|
787
|
-
}).send(new client_sts_1.GetCallerIdentityCommand({}));
|
|
788
|
-
}
|
|
789
|
-
function assertGithubDeploymentAuthority(input) {
|
|
790
|
-
const repository = process.env.GITHUB_REPOSITORY?.trim() ?? '';
|
|
791
|
-
const ref = process.env.GITHUB_REF?.trim() ?? '';
|
|
792
|
-
const eventName = process.env.GITHUB_EVENT_NAME?.trim() ?? '';
|
|
793
|
-
const callerWorkflow = process.env.GITHUB_WORKFLOW_REF?.trim() ?? '';
|
|
794
|
-
const calledWorkflow = process.env.EBK_GITHUB_JOB_WORKFLOW_REF?.trim() ?? '';
|
|
795
|
-
const expectedBranch = input.stage === 'production' ? 'main' : 'develop';
|
|
796
|
-
const expectedRef = `refs/heads/${expectedBranch}`;
|
|
797
|
-
const expectedCalledWorkflow = `${repository}/.github/workflows/deploy.yml@${expectedRef}`;
|
|
798
|
-
const expectedCallerWorkflow = eventName === 'push'
|
|
799
|
-
? `${repository}/.github/workflows/ci.yml@${expectedRef}`
|
|
800
|
-
: eventName === 'workflow_dispatch'
|
|
801
|
-
? expectedCalledWorkflow
|
|
802
|
-
: undefined;
|
|
803
|
-
const allowedEvent = eventName === 'workflow_dispatch' ||
|
|
804
|
-
(eventName === 'push' && input.policy.deploymentProfile !== 'starter');
|
|
805
|
-
if (process.env.GITHUB_ACTIONS !== 'true' ||
|
|
806
|
-
!repository ||
|
|
807
|
-
!allowedEvent ||
|
|
808
|
-
process.env.GITHUB_SHA !== input.commit ||
|
|
809
|
-
ref !== expectedRef ||
|
|
810
|
-
callerWorkflow !== expectedCallerWorkflow ||
|
|
811
|
-
calledWorkflow !== expectedCalledWorkflow) {
|
|
812
|
-
throw new Error('Protected deployment requires the exact generated GitHub caller and reusable deploy workflows, branch, and immutable source commit.');
|
|
813
|
-
}
|
|
814
|
-
if (input.policy.deploymentProfile === 'starter' &&
|
|
815
|
-
input.stage === 'staging') {
|
|
816
|
-
throw new Error('The starter deployment profile has no staging stage.');
|
|
817
|
-
}
|
|
818
|
-
const clean = git(input.root, ['status', '--porcelain=v1', '--untracked-files=all'], input.run);
|
|
819
|
-
if (clean !== '') {
|
|
820
|
-
throw new Error('Protected GitHub deployment requires a clean checkout.');
|
|
821
|
-
}
|
|
822
|
-
}
|
|
28
|
+
const production_database_safeguard_js_1 = require("./production-database-safeguard.js");
|
|
29
|
+
const DEPLOYMENT_ROLE_ARN = /^arn:(aws|aws-us-gov|aws-cn):iam::\d{12}:role\/[A-Za-z0-9+=,.@_/-]{1,512}$/u;
|
|
823
30
|
async function runLocalDeploy(options, context, dependencies = {}) {
|
|
824
31
|
const run = dependencies.run ?? node_child_process_1.spawnSync;
|
|
825
32
|
const now = dependencies.now ?? (() => new Date());
|
|
@@ -846,13 +53,13 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
846
53
|
const retain = () => {
|
|
847
54
|
if (!policy || !receiptDestinationPrepared)
|
|
848
55
|
return;
|
|
849
|
-
writeReceipt(context.root, {
|
|
56
|
+
(0, deployment_receipt_js_1.writeReceipt)(context.root, {
|
|
850
57
|
account,
|
|
851
58
|
actor,
|
|
852
59
|
authority: githubAuthority ? 'github' : 'local',
|
|
853
60
|
children,
|
|
854
61
|
completedAt: now().toISOString(),
|
|
855
|
-
frameworkVersion: frameworkVersion(context.root),
|
|
62
|
+
frameworkVersion: (0, deployment_receipt_js_1.frameworkVersion)(context.root),
|
|
856
63
|
...(failure ? { failure } : {}),
|
|
857
64
|
kind: 'ebk-deployment-receipt',
|
|
858
65
|
...(lifecycleScope ? { lifecycleScope } : {}),
|
|
@@ -869,9 +76,9 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
869
76
|
});
|
|
870
77
|
};
|
|
871
78
|
try {
|
|
872
|
-
invalidatePriorReceipt(context.root);
|
|
79
|
+
(0, deployment_receipt_js_1.invalidatePriorReceipt)(context.root);
|
|
873
80
|
receiptDestinationPrepared = true;
|
|
874
|
-
(0,
|
|
81
|
+
(0, governed_child_process_js_1.assertGovernedAwsLifecyclePlatform)(dependencies.platform);
|
|
875
82
|
policy = (0, index_js_2.readRepositoryOperatingPolicy)(context.root);
|
|
876
83
|
if (options.stage === 'production') {
|
|
877
84
|
(0, capacity_migration_js_1.assertWorkspaceCapacityMigrationChoice)(context.root, policy.productionFoundation.profile);
|
|
@@ -883,14 +90,14 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
883
90
|
(0, index_js_2.requiresGithubDeployment)(policy.deploymentProfile, options.stage)) {
|
|
884
91
|
throw new Error(`The ${policy.deploymentProfile} profile requires GitHub deployment authority for ${options.stage}.`);
|
|
885
92
|
}
|
|
886
|
-
if (!
|
|
93
|
+
if (!DEPLOYMENT_ROLE_ARN.test(options.expectedRoleArn)) {
|
|
887
94
|
throw new Error('Local deployment requires one exact IAM role ARN.');
|
|
888
95
|
}
|
|
889
96
|
region = (0, index_js_2.configuredDeploymentRegion)(policy.deploymentRegion);
|
|
890
97
|
account = (0, index_js_2.configuredDeploymentAccountForStage)(policy.deploymentProfile, policy.deploymentAccounts, options.stage);
|
|
891
98
|
const expectedRoleArn = (0, index_js_1.createStageAuthorityIdentity)({
|
|
892
99
|
accountId: account,
|
|
893
|
-
partition: partitionForRegion(region),
|
|
100
|
+
partition: (0, stage_identity_js_1.partitionForRegion)(region),
|
|
894
101
|
region,
|
|
895
102
|
stage: options.stage,
|
|
896
103
|
}).deploymentRoleArn;
|
|
@@ -901,10 +108,10 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
901
108
|
(githubAuthority || options.lifecycleScope === 'affected')) {
|
|
902
109
|
throw new Error('Explicit Slice selection is local-only and cannot be combined with affected lifecycle or protected GitHub deployment.');
|
|
903
110
|
}
|
|
904
|
-
const orderedProjects = localDeploymentProjectOrder(policy, context, options.stage, options.slices);
|
|
111
|
+
const orderedProjects = (0, deployment_scope_js_1.localDeploymentProjectOrder)(policy, context, options.stage, options.slices);
|
|
905
112
|
if (options.slices)
|
|
906
113
|
selectedSlices = orderedProjects.slice(1);
|
|
907
|
-
const identity = localWorkingTreeDigest(context.root, run);
|
|
114
|
+
const identity = (0, deployment_source_js_1.localWorkingTreeDigest)(context.root, run);
|
|
908
115
|
source = {
|
|
909
116
|
clean: identity.clean,
|
|
910
117
|
commit: identity.commit,
|
|
@@ -916,20 +123,20 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
916
123
|
if (options.stage === 'production') {
|
|
917
124
|
// Read only after the clean-source check so the declaration is bound to
|
|
918
125
|
// the digested tree, and before any AWS authority or transport exists.
|
|
919
|
-
productionPostgresDeclared = productionFoundationDeclaresPostgres(context.root);
|
|
126
|
+
productionPostgresDeclared = (0, deployment_authority_js_1.productionFoundationDeclaresPostgres)(context.root);
|
|
920
127
|
}
|
|
921
128
|
if (githubAuthority) {
|
|
922
129
|
if (options.profile) {
|
|
923
130
|
throw new Error('Protected GitHub deployment must use ambient OIDC credentials, not a local AWS profile.');
|
|
924
131
|
}
|
|
925
|
-
assertGithubDeploymentAuthority({
|
|
132
|
+
(0, deployment_authority_js_1.assertGithubDeploymentAuthority)({
|
|
926
133
|
commit: source.commit,
|
|
927
134
|
policy,
|
|
928
135
|
root: context.root,
|
|
929
136
|
run,
|
|
930
137
|
stage: options.stage,
|
|
931
138
|
});
|
|
932
|
-
const caller = await (dependencies.identifyGithubCaller ?? defaultIdentifyGithubCaller)(region);
|
|
139
|
+
const caller = await (dependencies.identifyGithubCaller ?? deployment_authority_js_1.defaultIdentifyGithubCaller)(region);
|
|
933
140
|
if (caller.Account?.trim() !== account ||
|
|
934
141
|
!(0, identity_js_1.matchesExpectedAssumedRoleArn)(account, caller.Arn?.trim() ?? '', expectedRoleArn)) {
|
|
935
142
|
throw new Error('Protected GitHub deployment caller does not match the committed account and exact assumed role.');
|
|
@@ -962,7 +169,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
962
169
|
}
|
|
963
170
|
}
|
|
964
171
|
if (!githubAuthority && options.stage === 'production') {
|
|
965
|
-
const expected = productionConfirmation(account, region, source.commit);
|
|
172
|
+
const expected = (0, deployment_authority_js_1.productionConfirmation)(account, region, source.commit);
|
|
966
173
|
let acknowledged = false;
|
|
967
174
|
try {
|
|
968
175
|
acknowledged = await (dependencies.approve ?? (0, local_approval_js_1.createTtyLocalMutationApprover)())({
|
|
@@ -983,9 +190,9 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
983
190
|
throw new Error('Local production deployment acknowledgement was declined.');
|
|
984
191
|
}
|
|
985
192
|
}
|
|
986
|
-
lifecycleScope = resolveLifecycleScope({
|
|
193
|
+
lifecycleScope = (0, deployment_scope_js_1.resolveLifecycleScope)({
|
|
987
194
|
context,
|
|
988
|
-
frameworkVersion: frameworkVersion(context.root),
|
|
195
|
+
frameworkVersion: (0, deployment_receipt_js_1.frameworkVersion)(context.root),
|
|
989
196
|
options,
|
|
990
197
|
orderedProjects,
|
|
991
198
|
run: dependencies.run ?? node_child_process_1.spawnSync,
|
|
@@ -995,22 +202,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
995
202
|
orderedProjects
|
|
996
203
|
.map((project) => `${project}=${lifecycleScope?.projects[project]}`)
|
|
997
204
|
.join(' '));
|
|
998
|
-
const descriptors = projectDescriptors(context);
|
|
999
|
-
const localProtectedContainerStage = !githubAuthority &&
|
|
1000
|
-
requiresLocalContainerPreparation(policy.deploymentProfile, options.stage)
|
|
1001
|
-
? options.stage
|
|
1002
|
-
: undefined;
|
|
1003
|
-
const localProtectedContainerProjects = localProtectedContainerStage
|
|
1004
|
-
? orderedProjects
|
|
1005
|
-
.map((project) => descriptors.find((candidate) => candidate.name === project))
|
|
1006
|
-
.filter((project) => project?.tags.includes('type:slice') === true)
|
|
1007
|
-
: [];
|
|
1008
|
-
for (const project of localProtectedContainerProjects) {
|
|
1009
|
-
const missingTargets = LOCAL_CONTAINER_TARGETS.filter((target) => !supportsTarget(project, target));
|
|
1010
|
-
if (missingTargets.length > 0) {
|
|
1011
|
-
throw new Error(`Local ${policy.deploymentProfile} ${options.stage} requires the complete immutable OCI target set for ${project.name}: ${missingTargets.join(', ')}.`);
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
205
|
+
const descriptors = (0, deployment_projects_js_1.projectDescriptors)(context);
|
|
1014
206
|
if (!githubAuthority) {
|
|
1015
207
|
transport = await (dependencies.createTransport ?? federated_credential_transport_js_1.createLocalFederatedCredentialTransport)({
|
|
1016
208
|
account,
|
|
@@ -1065,88 +257,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1065
257
|
// Fail before any mutation: deploying a SQL-free Foundation over an
|
|
1066
258
|
// existing database would retire it outside the separate retirement path.
|
|
1067
259
|
if (!productionPostgresDeclared) {
|
|
1068
|
-
assertSqlFreeProductionDatabase(productionDatabaseBefore);
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
const localContainerRunId = localProtectedContainerProjects.length === 0
|
|
1072
|
-
? ''
|
|
1073
|
-
: ((0, node_crypto_1.randomBytes)(8).readBigUInt64BE() + 1n).toString();
|
|
1074
|
-
for (const project of localProtectedContainerProjects) {
|
|
1075
|
-
resetLocalContainerWorkingEvidence({
|
|
1076
|
-
project,
|
|
1077
|
-
root: context.root,
|
|
1078
|
-
stage: localProtectedContainerStage,
|
|
1079
|
-
});
|
|
1080
|
-
for (const target of LOCAL_CONTAINER_TARGETS) {
|
|
1081
|
-
if (transport)
|
|
1082
|
-
await transport.refresh();
|
|
1083
|
-
const environment = {
|
|
1084
|
-
...(transport
|
|
1085
|
-
? transport.childEnvironment((0, child_environment_js_1.sanitizeGovernedAwsChildEnvironment)(process.env))
|
|
1086
|
-
: (0, child_environment_js_1.sanitizeGovernedAwsChildEnvironment)(process.env)),
|
|
1087
|
-
AWS_EXPECTED_ACCOUNT_ID: account,
|
|
1088
|
-
AWS_REGION: region,
|
|
1089
|
-
EBK_LOCAL_CONTAINER_RUN_ID: localContainerRunId,
|
|
1090
|
-
EBK_LOCAL_DEPLOYMENT_MODE: 'federated',
|
|
1091
|
-
EBK_DEPLOYMENT_PROFILE: policy.deploymentProfile,
|
|
1092
|
-
EBK_NX_STAGE_LIFECYCLE: 'local',
|
|
1093
|
-
EBK_RELEASE_SOURCE_COMMIT: source.commit,
|
|
1094
|
-
EBK_SOURCE_COMMIT: source.commit,
|
|
1095
|
-
EBK_STAGE: options.stage,
|
|
1096
|
-
EBK_WORKING_TREE_DIRTY: 'false',
|
|
1097
|
-
};
|
|
1098
|
-
assertDeploymentSourceUnchanged(context.root, source, run);
|
|
1099
|
-
const childStartedAt = now().toISOString();
|
|
1100
|
-
try {
|
|
1101
|
-
await runNxTarget({
|
|
1102
|
-
context,
|
|
1103
|
-
environment,
|
|
1104
|
-
expectedRoleArn,
|
|
1105
|
-
...(transport ? { profile: transport.profile } : {}),
|
|
1106
|
-
project: project.name,
|
|
1107
|
-
region,
|
|
1108
|
-
...(dependencies.run ? { runSync: dependencies.run } : {}),
|
|
1109
|
-
...(dependencies.spawnChild
|
|
1110
|
-
? { spawnChild: dependencies.spawnChild }
|
|
1111
|
-
: {}),
|
|
1112
|
-
stage: options.stage,
|
|
1113
|
-
target,
|
|
1114
|
-
});
|
|
1115
|
-
if (target === 'release-candidate') {
|
|
1116
|
-
materializeLocalReleaseCandidate({
|
|
1117
|
-
project,
|
|
1118
|
-
root: context.root,
|
|
1119
|
-
sourceCommit: source.commit,
|
|
1120
|
-
});
|
|
1121
|
-
}
|
|
1122
|
-
if (target === 'container-release-assemble') {
|
|
1123
|
-
(dependencies.attestContainerBinding ?? attestLocalContainerBinding)({
|
|
1124
|
-
account,
|
|
1125
|
-
project,
|
|
1126
|
-
region,
|
|
1127
|
-
root: context.root,
|
|
1128
|
-
sourceCommit: source.commit,
|
|
1129
|
-
stage: options.stage,
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1132
|
-
children.push({
|
|
1133
|
-
completedAt: now().toISOString(),
|
|
1134
|
-
outcome: 'succeeded',
|
|
1135
|
-
project: project.name,
|
|
1136
|
-
startedAt: childStartedAt,
|
|
1137
|
-
target,
|
|
1138
|
-
});
|
|
1139
|
-
}
|
|
1140
|
-
catch (error) {
|
|
1141
|
-
children.push({
|
|
1142
|
-
completedAt: now().toISOString(),
|
|
1143
|
-
outcome: 'failed',
|
|
1144
|
-
project: project.name,
|
|
1145
|
-
startedAt: childStartedAt,
|
|
1146
|
-
target,
|
|
1147
|
-
});
|
|
1148
|
-
throw error;
|
|
1149
|
-
}
|
|
260
|
+
(0, deployment_authority_js_1.assertSqlFreeProductionDatabase)(productionDatabaseBefore);
|
|
1150
261
|
}
|
|
1151
262
|
}
|
|
1152
263
|
for (const project of orderedProjects) {
|
|
@@ -1184,10 +295,10 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1184
295
|
EBK_SOURCE_COMMIT: source.commit,
|
|
1185
296
|
EBK_WORKING_TREE_DIRTY: source.clean ? 'false' : 'true',
|
|
1186
297
|
};
|
|
1187
|
-
assertDeploymentSourceUnchanged(context.root, source, run);
|
|
298
|
+
(0, deployment_source_js_1.assertDeploymentSourceUnchanged)(context.root, source, run);
|
|
1188
299
|
const childStartedAt = now().toISOString();
|
|
1189
300
|
try {
|
|
1190
|
-
await runNxTarget({
|
|
301
|
+
await (0, deployment_child_js_1.runNxTarget)({
|
|
1191
302
|
context,
|
|
1192
303
|
environment,
|
|
1193
304
|
expectedRoleArn,
|
|
@@ -1258,7 +369,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1258
369
|
requireExisting: productionPostgresDeclared,
|
|
1259
370
|
});
|
|
1260
371
|
if (!productionPostgresDeclared) {
|
|
1261
|
-
assertSqlFreeProductionDatabase(productionDatabaseAfterFoundation, productionDatabaseBefore);
|
|
372
|
+
(0, deployment_authority_js_1.assertSqlFreeProductionDatabase)(productionDatabaseAfterFoundation, productionDatabaseBefore);
|
|
1262
373
|
}
|
|
1263
374
|
children.push({
|
|
1264
375
|
completedAt: now().toISOString(),
|
|
@@ -1279,19 +390,19 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1279
390
|
throw error;
|
|
1280
391
|
}
|
|
1281
392
|
}
|
|
1282
|
-
migrations[project] = supportsTarget(descriptor, 'db-migrate')
|
|
393
|
+
migrations[project] = (0, deployment_projects_js_1.supportsTarget)(descriptor, 'db-migrate')
|
|
1283
394
|
? 'completed-by-deploy-target'
|
|
1284
395
|
: 'not-applicable';
|
|
1285
|
-
if (supportsTarget(descriptor, 'smoke-deployed')) {
|
|
396
|
+
if ((0, deployment_projects_js_1.supportsTarget)(descriptor, 'smoke-deployed')) {
|
|
1286
397
|
if (transport)
|
|
1287
398
|
await transport.refresh();
|
|
1288
399
|
const smokeTarget = descriptor.tags.includes('type:site')
|
|
1289
|
-
? readDeployedSiteSmokeTarget(context.root, descriptor, options.stage)
|
|
1290
|
-
: readDeployedSmokeTarget(context.root, descriptor, options.stage);
|
|
1291
|
-
assertDeploymentSourceUnchanged(context.root, source, run);
|
|
400
|
+
? (0, deployed_smoke_js_1.readDeployedSiteSmokeTarget)(context.root, descriptor, options.stage)
|
|
401
|
+
: (0, deployed_smoke_js_1.readDeployedSmokeTarget)(context.root, descriptor, options.stage);
|
|
402
|
+
(0, deployment_source_js_1.assertDeploymentSourceUnchanged)(context.root, source, run);
|
|
1292
403
|
const smokeStartedAt = now().toISOString();
|
|
1293
404
|
try {
|
|
1294
|
-
const runSmoke = () => runNxTarget({
|
|
405
|
+
const runSmoke = () => (0, deployment_child_js_1.runNxTarget)({
|
|
1295
406
|
context,
|
|
1296
407
|
environment: {
|
|
1297
408
|
...(transport
|
|
@@ -1303,8 +414,8 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1303
414
|
AWS_REGION: region,
|
|
1304
415
|
EBK_NX_STAGE_LIFECYCLE: githubAuthority ? 'github' : 'local',
|
|
1305
416
|
EBK_SOURCE_COMMIT: source.commit,
|
|
1306
|
-
EBK_DEPLOYED_SOURCE_COMMIT: deployedSourceCommit(source.commit),
|
|
1307
|
-
...deployedSmokeEnvironment(smokeTarget),
|
|
417
|
+
EBK_DEPLOYED_SOURCE_COMMIT: (0, deployment_scope_js_1.deployedSourceCommit)(source.commit),
|
|
418
|
+
...(0, deployed_smoke_js_1.deployedSmokeEnvironment)(smokeTarget),
|
|
1308
419
|
EBK_STAGE: options.stage,
|
|
1309
420
|
},
|
|
1310
421
|
expectedRoleArn,
|
|
@@ -1411,7 +522,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1411
522
|
requireExisting: productionPostgresDeclared,
|
|
1412
523
|
});
|
|
1413
524
|
if (!productionPostgresDeclared) {
|
|
1414
|
-
assertSqlFreeProductionDatabase(finalDiscovery, productionDatabaseAfterFoundation);
|
|
525
|
+
(0, deployment_authority_js_1.assertSqlFreeProductionDatabase)(finalDiscovery, productionDatabaseAfterFoundation);
|
|
1415
526
|
}
|
|
1416
527
|
children.push({
|
|
1417
528
|
completedAt: now().toISOString(),
|
|
@@ -1433,7 +544,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1433
544
|
}
|
|
1434
545
|
}
|
|
1435
546
|
finalPhase = 'final-source-validation';
|
|
1436
|
-
assertDeploymentSourceUnchanged(context.root, source, run);
|
|
547
|
+
(0, deployment_source_js_1.assertDeploymentSourceUnchanged)(context.root, source, run);
|
|
1437
548
|
if (transport) {
|
|
1438
549
|
finalPhase = 'credential-cleanup';
|
|
1439
550
|
transport.cleanup();
|
|
@@ -1463,7 +574,7 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1463
574
|
failure = {
|
|
1464
575
|
project,
|
|
1465
576
|
operation: 'deploy',
|
|
1466
|
-
...(error instanceof NativeChildReconciliationError
|
|
577
|
+
...(error instanceof deployment_child_js_1.NativeChildReconciliationError
|
|
1467
578
|
? { secondaryPhases: ['source-reconciliation'] }
|
|
1468
579
|
: {}),
|
|
1469
580
|
phase: finalPhase === 'credential-cleanup'
|
|
@@ -1483,4 +594,12 @@ async function runLocalDeploy(options, context, dependencies = {}) {
|
|
|
1483
594
|
}
|
|
1484
595
|
const executor = (options, context) => runLocalDeploy(options, context);
|
|
1485
596
|
exports.default = executor;
|
|
597
|
+
var deployed_smoke_js_2 = require("./deployed-smoke.js");
|
|
598
|
+
Object.defineProperty(exports, "deployedSmokeEnvironment", { enumerable: true, get: function () { return deployed_smoke_js_2.deployedSmokeEnvironment; } });
|
|
599
|
+
Object.defineProperty(exports, "readDeployedSiteSmokeTarget", { enumerable: true, get: function () { return deployed_smoke_js_2.readDeployedSiteSmokeTarget; } });
|
|
600
|
+
var deployment_scope_js_2 = require("./deployment-scope.js");
|
|
601
|
+
Object.defineProperty(exports, "deployedSourceCommit", { enumerable: true, get: function () { return deployment_scope_js_2.deployedSourceCommit; } });
|
|
602
|
+
Object.defineProperty(exports, "localDeploymentProjectOrder", { enumerable: true, get: function () { return deployment_scope_js_2.localDeploymentProjectOrder; } });
|
|
603
|
+
var deployment_source_js_2 = require("./deployment-source.js");
|
|
604
|
+
Object.defineProperty(exports, "localWorkingTreeDigest", { enumerable: true, get: function () { return deployment_source_js_2.localWorkingTreeDigest; } });
|
|
1486
605
|
//# sourceMappingURL=local-deploy.js.map
|