@empire-builder-kit/nx 1.0.0-rc.30 → 1.0.0-rc.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/executors.json +8 -3
- package/package.json +14 -7
- package/src/aws/child-environment.d.ts +10 -0
- package/src/aws/child-environment.js +77 -0
- package/src/aws/child-environment.js.map +1 -0
- package/src/aws/identity.d.ts +13 -0
- package/src/aws/identity.js +41 -0
- package/src/aws/identity.js.map +1 -0
- package/src/aws-authority/index.d.ts +1 -0
- package/src/aws-authority/index.js +5 -0
- package/src/aws-authority/index.js.map +1 -0
- package/src/aws-authority/stage-authority.d.ts +240 -0
- package/src/aws-authority/stage-authority.js +2968 -0
- package/src/aws-authority/stage-authority.js.map +1 -0
- package/src/cli/main.d.ts +2 -0
- package/src/cli/main.js +11 -0
- package/src/cli/main.js.map +1 -1
- package/src/developer-agent/generator-planning.js +4 -4
- package/src/developer-agent/generator-planning.js.map +1 -1
- package/src/developer-agent/operation-registry.js +14 -6
- package/src/developer-agent/operation-registry.js.map +1 -1
- package/src/developer-agent/workspace-inspection.js +11 -2
- package/src/developer-agent/workspace-inspection.js.map +1 -1
- package/src/executors/deployment-plan/deployment-plan.js +1 -1
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +0 -1
- package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
- package/src/executors/foundation-preflight/schema.json +0 -5
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +12 -3
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +95 -32
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
- package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +64 -0
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js +221 -0
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js.map +1 -0
- package/src/executors/foundation-profile-preflight/schema.json +1 -6
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +11 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +44 -21
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +1 -1
- package/src/executors/foundation-remove-preflight/schema.json +6 -1
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/github-bootstrap/schema.json +7 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +27 -369
- package/src/executors/infrastructure-plan/infrastructure-plan.js +237 -5470
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
- package/src/executors/infrastructure-plan/schema.json +8 -64
- package/src/executors/local-deploy/federated-credential-transport.d.ts +48 -0
- package/src/executors/local-deploy/federated-credential-transport.js +252 -0
- package/src/executors/local-deploy/federated-credential-transport.js.map +1 -0
- package/src/executors/local-deploy/local-approval.d.ts +4 -9
- package/src/executors/local-deploy/local-approval.js +3 -7
- package/src/executors/local-deploy/local-approval.js.map +1 -1
- package/src/executors/local-deploy/local-deploy.d.ts +60 -43
- package/src/executors/local-deploy/local-deploy.js +955 -804
- package/src/executors/local-deploy/local-deploy.js.map +1 -1
- package/src/executors/local-deploy/schema.json +3 -20
- package/src/executors/refresh/refresh.js +2 -2
- package/src/executors/refresh/refresh.js.map +1 -1
- package/src/executors/remove/remove.js +2 -2
- package/src/executors/remove/remove.js.map +1 -1
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +27 -1
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +907 -22
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -1
- package/src/executors/router-waf-rehearsal/schema.json +17 -2
- package/src/executors/secret-initialize/schema.json +42 -0
- package/src/executors/secret-initialize/secret-initialize.d.ts +32 -0
- package/src/executors/secret-initialize/secret-initialize.js +243 -0
- package/src/executors/secret-initialize/secret-initialize.js.map +1 -0
- package/src/executors/secret-metadata/secret-metadata.d.ts +4 -1
- package/src/executors/secret-metadata/secret-metadata.js +76 -29
- package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
- package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +53 -0
- package/src/executors/sst-lifecycle/generated-secret-retirement.js +192 -0
- package/src/executors/sst-lifecycle/generated-secret-retirement.js.map +1 -0
- package/src/executors/sst-lifecycle/governed-native-operation.d.ts +46 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js +153 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js.map +1 -0
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +27 -7
- package/src/executors/sst-lifecycle/run-sst-command.js +474 -89
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
- package/src/executors/sst-lifecycle/schema.json +0 -5
- package/src/executors/sst-lifecycle/secret-preflight.d.ts +2 -0
- package/src/executors/sst-lifecycle/secret-preflight.js +13 -7
- package/src/executors/sst-lifecycle/secret-preflight.js.map +1 -1
- package/src/executors/unlock/unlock.js +2 -2
- package/src/executors/unlock/unlock.js.map +1 -1
- package/src/foundation/provision-logical-database.js +2 -0
- package/src/foundation/provision-logical-database.js.map +1 -1
- package/src/foundation/router-waf-rate-rehearsal.d.ts +97 -0
- package/src/foundation/router-waf-rate-rehearsal.js +210 -0
- package/src/foundation/router-waf-rate-rehearsal.js.map +1 -0
- package/src/foundation/router-waf.d.ts +59 -9
- package/src/foundation/router-waf.js +427 -32
- package/src/foundation/router-waf.js.map +1 -1
- package/src/foundation/stages.d.ts +1 -0
- package/src/foundation/stages.js +11 -0
- package/src/foundation/stages.js.map +1 -1
- package/src/generators/formatting.d.ts +8 -0
- package/src/generators/formatting.js +118 -0
- package/src/generators/formatting.js.map +1 -0
- package/src/generators/function/function.js +37 -17
- package/src/generators/function/function.js.map +1 -1
- package/src/generators/post-generation-install.js +2 -2
- package/src/generators/post-generation-install.js.map +1 -1
- package/src/generators/preset/generator.js +28 -8
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +3 -0
- package/src/generators/preset/schema.json +5 -5
- package/src/generators/preset/workspace-files-developer-agent.js +15 -7
- package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
- package/src/generators/preset/workspace-files-ecr-inspector.d.ts +18 -0
- package/src/generators/preset/workspace-files-ecr-inspector.js +298 -0
- package/src/generators/preset/workspace-files-ecr-inspector.js.map +1 -0
- package/src/generators/preset/workspace-files-performance-cost.d.ts +2 -2
- package/src/generators/preset/workspace-files-performance-cost.js +8 -8
- package/src/generators/preset/workspace-files-performance-cost.js.map +1 -1
- package/src/generators/preset/workspace-files-performance-load.d.ts +1 -1
- package/src/generators/preset/workspace-files-performance-load.js +29 -24
- package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
- package/src/generators/preset/workspace-files-stage-authority.d.ts +6 -0
- package/src/generators/preset/workspace-files-stage-authority.js +479 -0
- package/src/generators/preset/workspace-files-stage-authority.js.map +1 -0
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +40 -0
- package/src/generators/preset/workspace-files-thin-deploy.js +1500 -0
- package/src/generators/preset/workspace-files-thin-deploy.js.map +1 -0
- package/src/generators/preset/workspace-files-thin-docs.d.ts +5 -0
- package/src/generators/preset/workspace-files-thin-docs.js +240 -0
- package/src/generators/preset/workspace-files-thin-docs.js.map +1 -0
- package/src/generators/preset/workspace-files-thin-release.d.ts +14 -0
- package/src/generators/preset/workspace-files-thin-release.js +26 -0
- package/src/generators/preset/workspace-files-thin-release.js.map +1 -0
- package/src/generators/preset/workspace-files.d.ts +2 -1
- package/src/generators/preset/workspace-files.js +448 -680
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +149 -19
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/repository-policy/schema.d.ts +2 -0
- package/src/generators/repository-policy/schema.json +11 -1
- package/src/generators/repository-policy/tree-policy.d.ts +3 -0
- package/src/generators/repository-policy/tree-policy.js +25 -0
- package/src/generators/repository-policy/tree-policy.js.map +1 -0
- package/src/generators/slice/built-in-plan-api-files.js +1 -0
- package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-async-work-files.js +41 -0
- package/src/generators/slice/built-in-plan-async-work-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +6 -0
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +5 -31
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-data-files.js +89 -30
- package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +19 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +21 -3
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +20 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-foundation-files.js +3 -5
- package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-frontend-files.js +5 -1
- package/src/generators/slice/built-in-plan-frontend-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +199 -188
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-metadata-files.js +13 -0
- package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +307 -0
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-operations-files.js +65 -51
- package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-performance-files.js +97 -19
- package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-project-files.js +9 -68
- package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.js +87 -76
- package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +94 -47
- package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-thin-release-files.d.ts +11 -0
- package/src/generators/slice/built-in-plan-thin-release-files.js +129 -0
- package/src/generators/slice/built-in-plan-thin-release-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-verification-files.js +6 -2
- package/src/generators/slice/built-in-plan-verification-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +4 -2
- package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js +26 -4
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
- package/src/generators/slice/built-in-plan.d.ts +1 -0
- package/src/generators/slice/built-in-plan.js +28 -11
- package/src/generators/slice/built-in-plan.js.map +1 -1
- package/src/generators/slice/slice.js +30 -32
- package/src/generators/slice/slice.js.map +1 -1
- package/src/generators/upgrade/upgrade.d.ts +1 -1
- package/src/generators/upgrade/upgrade.js +200 -48
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/generators/workload/performance-registration.d.ts +1 -0
- package/src/generators/workload/performance-registration.js +9 -11
- package/src/generators/workload/performance-registration.js.map +1 -1
- package/src/generators/workload/service-performance-files.d.ts +1 -0
- package/src/generators/workload/service-performance-files.js +27 -7
- package/src/generators/workload/service-performance-files.js.map +1 -1
- package/src/generators/workload/workload.d.ts +1 -1
- package/src/generators/workload/workload.js +55 -28
- package/src/generators/workload/workload.js.map +1 -1
- package/src/git-policy/github-bootstrap.d.ts +28 -7
- package/src/git-policy/github-bootstrap.js +205 -163
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/local-dev/private-state.d.ts +3 -0
- package/src/local-dev/private-state.js +17 -5
- package/src/local-dev/private-state.js.map +1 -1
- package/src/local-dev/tls.js +5 -1
- package/src/local-dev/tls.js.map +1 -1
- package/src/performance/cost-collection.d.ts +1 -1
- package/src/performance/cost-collection.js +4 -2
- package/src/performance/cost-collection.js.map +1 -1
- package/src/performance/cost-controls.d.ts +3 -1
- package/src/performance/cost-controls.js +9 -4
- package/src/performance/cost-controls.js.map +1 -1
- package/src/performance/evidence.d.ts +1 -1
- package/src/performance/evidence.js +5 -3
- package/src/performance/evidence.js.map +1 -1
- package/src/performance/load-safety.js +5 -3
- package/src/performance/load-safety.js.map +1 -1
- package/src/performance/model.d.ts +2 -2
- package/src/performance/model.js +4 -3
- package/src/performance/model.js.map +1 -1
- package/src/release/index.d.ts +0 -2
- package/src/release/index.js +0 -2
- package/src/release/index.js.map +1 -1
- package/src/release/source-authority.d.ts +4 -5
- package/src/release/source-authority.js +13 -123
- package/src/release/source-authority.js.map +1 -1
- package/src/repository-policy/aurora-preflight.d.ts +1 -1
- package/src/repository-policy/aurora-preflight.js +4 -1
- package/src/repository-policy/aurora-preflight.js.map +1 -1
- package/src/repository-policy/policy.d.ts +21 -2
- package/src/repository-policy/policy.js +290 -25
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/performance-policy-v1.json +3 -1
- package/src/schemas/repository-policy-v1.json +46 -2
- package/src/secrets/adapters.d.ts +7 -2
- package/src/secrets/adapters.js +34 -3
- package/src/secrets/adapters.js.map +1 -1
- package/src/secrets/aws-control-plane.d.ts +10 -1
- package/src/secrets/aws-control-plane.js +67 -0
- package/src/secrets/aws-control-plane.js.map +1 -1
- package/src/secrets/generated-aws-control-plane.d.ts +23 -0
- package/src/secrets/generated-aws-control-plane.js +259 -0
- package/src/secrets/generated-aws-control-plane.js.map +1 -0
- package/src/secrets/metadata.js +38 -10
- package/src/secrets/metadata.js.map +1 -1
- package/src/secrets/model.d.ts +8 -1
- package/src/secrets/model.js +24 -3
- package/src/secrets/model.js.map +1 -1
- package/src/secrets/operator.d.ts +89 -3
- package/src/secrets/operator.js +422 -9
- package/src/secrets/operator.js.map +1 -1
- package/src/secrets/registry.d.ts +2 -1
- package/src/secrets/registry.js +18 -1
- package/src/secrets/registry.js.map +1 -1
- package/src/secrets/workload-access.js +10 -2
- package/src/secrets/workload-access.js.map +1 -1
- package/src/supply-chain/action-pins.js +61 -7
- package/src/supply-chain/action-pins.js.map +1 -1
- package/src/supply-chain/build-output-bounds.d.ts +2 -0
- package/src/supply-chain/build-output-bounds.js +12 -0
- package/src/supply-chain/build-output-bounds.js.map +1 -0
- package/src/supply-chain/build-output.js +2 -4
- package/src/supply-chain/build-output.js.map +1 -1
- package/src/supply-chain/ecr-scanning.d.ts +5 -3
- package/src/supply-chain/ecr-scanning.js +11 -7
- package/src/supply-chain/ecr-scanning.js.map +1 -1
- package/src/supply-chain/ecs-deployed-image.d.ts +5 -3
- package/src/supply-chain/ecs-deployed-image.js +6 -4
- package/src/supply-chain/ecs-deployed-image.js.map +1 -1
- package/src/supply-chain/generated-container-release-command.js +849 -44
- package/src/supply-chain/generated-container-release-command.js.map +1 -1
- package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -1
- package/src/supply-chain/generated-ecr-collector-command.js +188 -91
- package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
- package/src/supply-chain/generated-files.js +4 -3
- package/src/supply-chain/generated-files.js.map +1 -1
- package/src/supply-chain/index.d.ts +1 -1
- package/src/supply-chain/index.js +2 -1
- package/src/supply-chain/index.js.map +1 -1
- package/src/workload-roles/index.d.ts +10 -17
- package/src/workload-roles/index.js +5 -18
- package/src/workload-roles/index.js.map +1 -1
- package/src/workspace-deployment/identity.d.ts +3 -0
- package/src/workspace-deployment/identity.js +22 -0
- package/src/workspace-deployment/identity.js.map +1 -0
- package/src/workspace-deployment/index.d.ts +3 -0
- package/src/workspace-deployment/index.js +7 -0
- package/src/workspace-deployment/index.js.map +1 -0
- package/src/workspace-deployment/migration-evidence.d.ts +29 -0
- package/src/workspace-deployment/migration-evidence.js +83 -0
- package/src/workspace-deployment/migration-evidence.js.map +1 -0
- package/src/workspace-deployment/migration.d.ts +27 -0
- package/src/workspace-deployment/migration.js +109 -0
- package/src/workspace-deployment/migration.js.map +1 -0
- package/src/workspace-deployment/ownership.d.ts +81 -0
- package/src/workspace-deployment/ownership.js +381 -0
- package/src/workspace-deployment/ownership.js.map +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-plan-infrastructure-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-infrastructure-files.ts"],"names":[],"mappings":";;AAMA,
|
|
1
|
+
{"version":3,"file":"built-in-plan-infrastructure-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-infrastructure-files.ts"],"names":[],"mappings":";;AAMA,4EAwzGC;AA9zGD,uEAGmC;AAEnC,gBAAgB;AAChB,SAAgB,gCAAgC,CAC9C,IAAY,EACZ,UAAkB,EAClB,SAAiB,EACjB,yBAEM,CAAC,SAAS,EAAE,YAAY,CAAC;IAE/B,MAAM,gBAAgB,GAAG,IAAA,8CAAoB,EAAC,UAAU,CAAC,CAAC;IAC1D,MAAM,wBAAwB,GAAG,IAAA,6CAAmB,EAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAC/D,OAAO;QACL,6CAA6C,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6ErC,IAAI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sst/resource';
|
|
193
193
|
|
|
194
194
|
declare global {
|
|
195
|
+
type EbkSstOutput<T> = {
|
|
196
|
+
apply<U>(operation: (value: T) => U): EbkSstOutput<U>;
|
|
197
|
+
};
|
|
198
|
+
type EbkSstUnwrap<T> = T extends EbkSstOutput<infer U>
|
|
199
|
+
? EbkSstUnwrap<U>
|
|
200
|
+
: T extends readonly (infer U)[]
|
|
201
|
+
? EbkSstUnwrap<U>[]
|
|
202
|
+
: T extends Record<string, unknown>
|
|
203
|
+
? { [K in keyof T]: EbkSstUnwrap<T[K]> }
|
|
204
|
+
: T;
|
|
195
205
|
const sst: any;
|
|
196
206
|
const aws: any;
|
|
197
207
|
const $app: { name: string; stage: string };
|
|
@@ -203,6 +213,9 @@ declare global {
|
|
|
203
213
|
) => unknown;
|
|
204
214
|
const $jsonStringify: (value: unknown) => unknown;
|
|
205
215
|
const $output: (value: unknown) => any;
|
|
216
|
+
function $resolve<T extends Record<string, any>>(
|
|
217
|
+
value: T,
|
|
218
|
+
): EbkSstOutput<EbkSstUnwrap<T>>;
|
|
206
219
|
const $transform: any;
|
|
207
220
|
const $util: any;
|
|
208
221
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-plan-metadata-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-metadata-files.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"built-in-plan-metadata-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-metadata-files.ts"],"names":[],"mappings":";;AAIA,4DAuOC;AA1OD,uEAAiD;AAEjD,gBAAgB;AAChB,SAAgB,wBAAwB,CACtC,IAAY,EACZ,KAAa,EACb,UAAkB,EAClB,SAAmC;IAEnC,OAAO;QACL,qBAAqB,EAAE,IAAA,8BAAI,EAAC,SAAS,CAAC;QACtC,WAAW,EAAE,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;oBAyBN,IAAI;;;IAGpB,IAAI;;;;;gDAKwC,KAAK,IAAI,IAAI;;;;;;mBAM1C,IAAI;;;;;;;;;;;;;;gBAcP,IAAI;;;;;;wCAMoB,IAAI;;qBAEvB,IAAI;;;oCAGW,IAAI;;;;;;;;;;;;;;;;;;;;;;CAsBvC;QACG,oBAAoB,EAAE;IACtB,UAAU;IACV,UAAU;SACL,UAAU;SACV,UAAU;;;eAGJ,UAAU;CACxB;QACG,6BAA6B,EAAE,IAAA,8BAAI,EAAC;YAClC,QAAQ,EAAE,EAAE;YACZ,aAAa,EAAE,CAAC;SACjB,CAAC;QACF,sBAAsB,EAAE,KAAK,IAAI;;;;;;;;;;;;;CAapC;QACG,mBAAmB,EAAE,KAAK,IAAI;;;;;gBAKlB,IAAI;;;CAGnB;QACG,kBAAkB,EAAE,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DhC;QACG,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiClB,UAAU;;;;;CAKf;KACE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderStandardSliceNativeRuntimeAuthorityFiles = renderStandardSliceNativeRuntimeAuthorityFiles;
|
|
4
|
+
const built_in_plan_workload_role_files_js_1 = require("./built-in-plan-workload-role-files.js");
|
|
5
|
+
function renderTopology(name) {
|
|
6
|
+
return `import { createDatabaseBindingPlan } from '@empire-builder-kit/nx/foundation';
|
|
7
|
+
import {
|
|
8
|
+
createStandardSliceWorkloadRoleTopology as createRuntimeTopology,
|
|
9
|
+
type StandardSliceServiceAdapterMetadata,
|
|
10
|
+
type StandardSliceWorkloadExtension,
|
|
11
|
+
} from '@empire-builder-kit/nx/workload-roles';
|
|
12
|
+
import databaseBindings from '../../database/bindings.json';
|
|
13
|
+
import performanceOperations from '../../operations/performance.json';
|
|
14
|
+
|
|
15
|
+
export const STANDARD_SLICE_RUNTIME_EXTENSIONS = [
|
|
16
|
+
// <ebk:native-runtime-extensions:start>
|
|
17
|
+
// <ebk:native-runtime-extensions:end>
|
|
18
|
+
] as const satisfies readonly StandardSliceWorkloadExtension[];
|
|
19
|
+
|
|
20
|
+
function serviceAdapterMetadata(value: unknown): StandardSliceServiceAdapterMetadata {
|
|
21
|
+
if (value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
22
|
+
throw new Error('Performance operations must be an object.');
|
|
23
|
+
}
|
|
24
|
+
const load = (value as { load?: unknown }).load;
|
|
25
|
+
if (load === null || typeof load !== 'object' || Array.isArray(load)) {
|
|
26
|
+
throw new Error('Performance operations load authority must be an object.');
|
|
27
|
+
}
|
|
28
|
+
const owner = (load as { serviceAdapterOwner?: unknown }).serviceAdapterOwner;
|
|
29
|
+
const status = (load as { serviceAdapterStatus?: unknown }).serviceAdapterStatus;
|
|
30
|
+
if (
|
|
31
|
+
(status === 'requires-adopter-service-runtime-endpoint' && owner === null) ||
|
|
32
|
+
(status === 'managed-generated-service-runtime-endpoint' &&
|
|
33
|
+
typeof owner === 'string' && owner.length > 0)
|
|
34
|
+
) {
|
|
35
|
+
return { owner, status };
|
|
36
|
+
}
|
|
37
|
+
throw new Error('Performance operations Service adapter authority is inconsistent.');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const SERVICE_ADAPTER = serviceAdapterMetadata(performanceOperations);
|
|
41
|
+
|
|
42
|
+
export function createStandardSliceRuntimeTopology(stage: string) {
|
|
43
|
+
const databases = createDatabaseBindingPlan(databaseBindings, {
|
|
44
|
+
slice: '${name}',
|
|
45
|
+
stage,
|
|
46
|
+
}).provisioned;
|
|
47
|
+
return createRuntimeTopology({
|
|
48
|
+
databaseIdentifiers: databases,
|
|
49
|
+
extensions: STANDARD_SLICE_RUNTIME_EXTENSIONS,
|
|
50
|
+
serviceAdapter: SERVICE_ADAPTER,
|
|
51
|
+
slice: '${name}',
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
function renderEffectiveIntent(name, workspace) {
|
|
57
|
+
const source = (0, built_in_plan_workload_role_files_js_1.renderStandardSliceWorkloadRoleFiles)(name, workspace)['infra/workload-roles/effective-intent.ts'];
|
|
58
|
+
if (!source) {
|
|
59
|
+
throw new Error('Standard Slice native authority source is unavailable.');
|
|
60
|
+
}
|
|
61
|
+
const withoutRoleNameImport = source.replace(' standardSliceWorkloadRoleName,\n', '');
|
|
62
|
+
const legacyRoleArn = `function roleArn(
|
|
63
|
+
context: StandardSliceWorkloadRoleIntentContext,
|
|
64
|
+
resource: string,
|
|
65
|
+
) {
|
|
66
|
+
return (
|
|
67
|
+
'arn:' +
|
|
68
|
+
context.partition +
|
|
69
|
+
':iam::' +
|
|
70
|
+
context.accountId +
|
|
71
|
+
':role/' +
|
|
72
|
+
standardSliceWorkloadRoleName(context.stage, '${name}', resource)
|
|
73
|
+
);
|
|
74
|
+
}`;
|
|
75
|
+
const nativeRoleArn = `function roleArn(
|
|
76
|
+
context: StandardSliceWorkloadRoleIntentContext,
|
|
77
|
+
_resource: string,
|
|
78
|
+
) {
|
|
79
|
+
void _resource;
|
|
80
|
+
return (
|
|
81
|
+
'arn:' +
|
|
82
|
+
context.partition +
|
|
83
|
+
':iam::' +
|
|
84
|
+
context.accountId +
|
|
85
|
+
':role/ebk/' +
|
|
86
|
+
context.stage +
|
|
87
|
+
'/workloads/*'
|
|
88
|
+
);
|
|
89
|
+
}`;
|
|
90
|
+
if (!withoutRoleNameImport.includes(legacyRoleArn)) {
|
|
91
|
+
throw new Error('Standard Slice role ARN source seam changed unexpectedly.');
|
|
92
|
+
}
|
|
93
|
+
return withoutRoleNameImport
|
|
94
|
+
.replace(legacyRoleArn, nativeRoleArn)
|
|
95
|
+
.replace('<ebk:workload-role-intent-contributions:start>', '<ebk:native-runtime-intent-contributions:start>')
|
|
96
|
+
.replace('<ebk:workload-role-intent-contributions:end>', '<ebk:native-runtime-intent-contributions:end>');
|
|
97
|
+
}
|
|
98
|
+
function renderRuntime(name, workspace) {
|
|
99
|
+
return `import { canonicalOperatorSecretName } from '@empire-builder-kit/nx/secrets';
|
|
100
|
+
import {
|
|
101
|
+
createStandardSliceWorkloadRoleIntents,
|
|
102
|
+
standardSliceBoundOperatorSecretDeclarations,
|
|
103
|
+
standardSliceResourceNames,
|
|
104
|
+
type StandardSliceWorkloadRoleIntentContext,
|
|
105
|
+
} from './effective-intent.js';
|
|
106
|
+
import { createStandardSliceRuntimeTopology } from './topology.js';
|
|
107
|
+
|
|
108
|
+
type NativePermission = {
|
|
109
|
+
actions: string[];
|
|
110
|
+
conditions?: Array<{ test: string; variable: string; values: string[] }>;
|
|
111
|
+
resources: any[];
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
function requiredAccountId(): string {
|
|
115
|
+
const value = process.env.AWS_EXPECTED_ACCOUNT_ID?.trim() ?? '';
|
|
116
|
+
if (!/^[0-9]{12}$/.test(value)) {
|
|
117
|
+
throw new Error('Native Slice runtime authority requires AWS_EXPECTED_ACCOUNT_ID.');
|
|
118
|
+
}
|
|
119
|
+
return value;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function requiredRegion(): string {
|
|
123
|
+
const value = (process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? '').trim();
|
|
124
|
+
if (!/^[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-[0-9]$/.test(value)) {
|
|
125
|
+
throw new Error('Native Slice runtime authority requires one exact AWS Region.');
|
|
126
|
+
}
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function partitionForRegion(region: string): 'aws' | 'aws-cn' | 'aws-us-gov' {
|
|
131
|
+
if (region.startsWith('cn-')) return 'aws-cn';
|
|
132
|
+
if (region.startsWith('us-gov-')) return 'aws-us-gov';
|
|
133
|
+
return 'aws';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function permissionConditions(
|
|
137
|
+
conditions: Record<string, Record<string, string | string[]>> | undefined,
|
|
138
|
+
) {
|
|
139
|
+
if (!conditions) return undefined;
|
|
140
|
+
return Object.entries(conditions).flatMap(([test, entries]) =>
|
|
141
|
+
Object.entries(entries).map(([variable, rawValues]) => ({
|
|
142
|
+
test,
|
|
143
|
+
values: Array.isArray(rawValues) ? rawValues : [rawValues],
|
|
144
|
+
variable,
|
|
145
|
+
})),
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function policyJson(permissions: readonly NativePermission[]): string {
|
|
150
|
+
return JSON.stringify({
|
|
151
|
+
Statement: permissions.map((permission) => ({
|
|
152
|
+
Action: permission.actions,
|
|
153
|
+
...(permission.conditions
|
|
154
|
+
? {
|
|
155
|
+
Condition: permission.conditions.reduce<
|
|
156
|
+
Record<string, Record<string, string | string[]>>
|
|
157
|
+
>((result, { test, values, variable }) => {
|
|
158
|
+
result[test] = {
|
|
159
|
+
...(result[test] ?? {}),
|
|
160
|
+
[variable]: values.length === 1 ? values[0] : values,
|
|
161
|
+
};
|
|
162
|
+
return result;
|
|
163
|
+
}, {}),
|
|
164
|
+
}
|
|
165
|
+
: {}),
|
|
166
|
+
Effect: 'Allow',
|
|
167
|
+
Resource: permission.resources,
|
|
168
|
+
})),
|
|
169
|
+
Version: '2012-10-17',
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function createStandardSliceNativeRuntimeAuthority(input: {
|
|
174
|
+
clusterId: any;
|
|
175
|
+
clusterResourceId: any;
|
|
176
|
+
eventBusArn: any;
|
|
177
|
+
identityUserPoolArn: any;
|
|
178
|
+
masterSecretArn: any;
|
|
179
|
+
}) {
|
|
180
|
+
const accountId = requiredAccountId();
|
|
181
|
+
const region = requiredRegion();
|
|
182
|
+
const partition = partitionForRegion(region);
|
|
183
|
+
const authorityStage = $dev ? 'development' : $app.stage;
|
|
184
|
+
const topology = createStandardSliceRuntimeTopology(authorityStage);
|
|
185
|
+
const declarations = standardSliceBoundOperatorSecretDeclarations(
|
|
186
|
+
authorityStage,
|
|
187
|
+
topology,
|
|
188
|
+
);
|
|
189
|
+
const developmentAuthority = Object.freeze({
|
|
190
|
+
createAppConfigMonitorRole(_logicalName: string): never {
|
|
191
|
+
void _logicalName;
|
|
192
|
+
throw new Error('Personal stages do not create protected AppConfig roles.');
|
|
193
|
+
},
|
|
194
|
+
createStepFunctionsRole(_logicalName: string, _resource: string): never {
|
|
195
|
+
void _logicalName;
|
|
196
|
+
void _resource;
|
|
197
|
+
throw new Error('Personal stages do not create protected Step Functions roles.');
|
|
198
|
+
},
|
|
199
|
+
permissions(_resource: string): NativePermission[] {
|
|
200
|
+
void _resource;
|
|
201
|
+
return [];
|
|
202
|
+
},
|
|
203
|
+
resourceNames: standardSliceResourceNames({ accountId, stage: $app.stage }),
|
|
204
|
+
});
|
|
205
|
+
if ($dev) return developmentAuthority;
|
|
206
|
+
const secretReferences = declarations.map((declaration) => {
|
|
207
|
+
const secretName = canonicalOperatorSecretName(
|
|
208
|
+
{ slice: '${name}', stage: $app.stage, workspace: '${workspace}' },
|
|
209
|
+
declaration.logicalName,
|
|
210
|
+
);
|
|
211
|
+
return {
|
|
212
|
+
declaration,
|
|
213
|
+
observed: aws.secretsmanager.getSecretOutput({ name: secretName }),
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
const resolved = $resolve({
|
|
217
|
+
clusterId: input.clusterId,
|
|
218
|
+
clusterResourceId: input.clusterResourceId,
|
|
219
|
+
eventBusArn: input.eventBusArn,
|
|
220
|
+
identityUserPoolArn: input.identityUserPoolArn,
|
|
221
|
+
masterSecretArn: input.masterSecretArn,
|
|
222
|
+
secretArns: secretReferences.map(({ observed }) => observed.arn),
|
|
223
|
+
}).apply((values) => {
|
|
224
|
+
const clusterId = values.clusterId ?? '';
|
|
225
|
+
const clusterName = clusterId.split('/').at(-1) ?? '';
|
|
226
|
+
if (!clusterName || !/^[A-Za-z0-9_-]{1,255}$/.test(clusterName)) {
|
|
227
|
+
throw new Error('Foundation cluster identity is malformed.');
|
|
228
|
+
}
|
|
229
|
+
const context: StandardSliceWorkloadRoleIntentContext = {
|
|
230
|
+
accountId,
|
|
231
|
+
clusterName,
|
|
232
|
+
clusterResourceId: values.clusterResourceId ?? '',
|
|
233
|
+
eventBusArn: values.eventBusArn ?? '',
|
|
234
|
+
identityUserPoolArn: values.identityUserPoolArn ?? '',
|
|
235
|
+
masterSecretArn: values.masterSecretArn ?? '',
|
|
236
|
+
partition,
|
|
237
|
+
region,
|
|
238
|
+
stage: authorityStage,
|
|
239
|
+
};
|
|
240
|
+
const references = secretReferences.map(({ declaration }, index) => ({
|
|
241
|
+
logicalName: declaration.logicalName,
|
|
242
|
+
provider: 'aws-secrets-manager' as const,
|
|
243
|
+
secretArn: values.secretArns[index] ?? '',
|
|
244
|
+
}));
|
|
245
|
+
return createStandardSliceWorkloadRoleIntents(
|
|
246
|
+
context,
|
|
247
|
+
topology,
|
|
248
|
+
references,
|
|
249
|
+
);
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
const permissions = (resource: string) =>
|
|
253
|
+
resolved.apply((intentsByRole) => {
|
|
254
|
+
const roleId = '${name}.' + resource;
|
|
255
|
+
const intents = intentsByRole[roleId];
|
|
256
|
+
if (!intents) {
|
|
257
|
+
throw new Error('Native Slice runtime authority omitted ' + roleId + '.');
|
|
258
|
+
}
|
|
259
|
+
return intents.map((intent) => ({
|
|
260
|
+
actions: intent.actions,
|
|
261
|
+
...(intent.conditions
|
|
262
|
+
? { conditions: permissionConditions(intent.conditions) }
|
|
263
|
+
: {}),
|
|
264
|
+
resources: intent.resources,
|
|
265
|
+
}));
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
const createServiceRole = (
|
|
269
|
+
logicalName: string,
|
|
270
|
+
resource: string,
|
|
271
|
+
service: 'appconfig.amazonaws.com' | 'states.amazonaws.com',
|
|
272
|
+
) =>
|
|
273
|
+
new aws.iam.Role(logicalName, {
|
|
274
|
+
assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal({ Service: service }),
|
|
275
|
+
inlinePolicies: [{
|
|
276
|
+
name: 'runtime',
|
|
277
|
+
policy: permissions(resource).apply(policyJson),
|
|
278
|
+
}],
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
return Object.freeze({
|
|
282
|
+
createAppConfigMonitorRole(logicalName: string) {
|
|
283
|
+
return createServiceRole(
|
|
284
|
+
logicalName,
|
|
285
|
+
'configuration-monitor',
|
|
286
|
+
'appconfig.amazonaws.com',
|
|
287
|
+
);
|
|
288
|
+
},
|
|
289
|
+
createStepFunctionsRole(logicalName: string, resource: string) {
|
|
290
|
+
return createServiceRole(logicalName, resource, 'states.amazonaws.com');
|
|
291
|
+
},
|
|
292
|
+
permissions,
|
|
293
|
+
resourceNames: standardSliceResourceNames({ accountId, stage: $app.stage }),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
297
|
+
}
|
|
298
|
+
/** @internal */
|
|
299
|
+
function renderStandardSliceNativeRuntimeAuthorityFiles(name, workspace) {
|
|
300
|
+
return {
|
|
301
|
+
'infra/native-runtime-authority/effective-intent.ts': renderEffectiveIntent(name, workspace),
|
|
302
|
+
'infra/native-runtime-authority/index.ts': `export * from './runtime.js';\n`,
|
|
303
|
+
'infra/native-runtime-authority/runtime.ts': renderRuntime(name, workspace),
|
|
304
|
+
'infra/native-runtime-authority/topology.ts': renderTopology(name),
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=built-in-plan-native-runtime-authority-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"built-in-plan-native-runtime-authority-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-native-runtime-authority-files.ts"],"names":[],"mappings":";;AAwTA,wGAaC;AArUD,iGAA8F;AAE9F,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO;;;;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5D,IAAY,EACZ,SAAiB;IAEjB,OAAO;QACL,oDAAoD,EAAE,qBAAqB,CACzE,IAAI,EACJ,SAAS,CACV;QACD,yCAAyC,EAAE,iCAAiC;QAC5E,2CAA2C,EAAE,aAAa,CAAC,IAAI,EAAE,SAAS,CAAC;QAC3E,4CAA4C,EAAE,cAAc,CAAC,IAAI,CAAC;KACnE,CAAC;AACJ,CAAC"}
|
|
@@ -50,10 +50,6 @@ function renderSliceOperationsFiles(name, workspace = 'workspace', frameworkVers
|
|
|
50
50
|
description: 'Health and operator-facing runtime behavior.',
|
|
51
51
|
id: 'operations',
|
|
52
52
|
},
|
|
53
|
-
{
|
|
54
|
-
description: 'Infrastructure planning, drift, approval, and convergence behavior.',
|
|
55
|
-
id: 'infrastructure-change',
|
|
56
|
-
},
|
|
57
53
|
{
|
|
58
54
|
description: 'Performance budgets, capacity limits, protected load, cost, and resource attribution.',
|
|
59
55
|
id: 'performance',
|
|
@@ -214,12 +210,6 @@ const configurationDeclarations = JSON.parse(
|
|
|
214
210
|
'utf8',
|
|
215
211
|
),
|
|
216
212
|
);
|
|
217
|
-
const infrastructureChange = JSON.parse(
|
|
218
|
-
readFileSync(
|
|
219
|
-
new URL('../operations/infrastructure-change.json', import.meta.url),
|
|
220
|
-
'utf8',
|
|
221
|
-
),
|
|
222
|
-
);
|
|
223
213
|
const frontend = JSON.parse(
|
|
224
214
|
readFileSync(new URL('../frontend/contract.json', import.meta.url), 'utf8'),
|
|
225
215
|
);
|
|
@@ -242,7 +232,6 @@ for (const [label, document] of [
|
|
|
242
232
|
['async work', asyncContract],
|
|
243
233
|
['configuration', configurationDeclarations],
|
|
244
234
|
['frontend', frontend],
|
|
245
|
-
['infrastructure change', infrastructureChange],
|
|
246
235
|
['performance', performance],
|
|
247
236
|
['release', release],
|
|
248
237
|
['reliability', reliability],
|
|
@@ -347,6 +336,8 @@ import {
|
|
|
347
336
|
StartExecutionCommand,
|
|
348
337
|
} from '@aws-sdk/client-sfn';
|
|
349
338
|
import { GetParameterCommand, SSMClient } from '@aws-sdk/client-ssm';
|
|
339
|
+
import { assertWorkspaceStageOwnershipForWorkspace } from '@empire-builder-kit/nx/workspace-deployment';
|
|
340
|
+
import { resolve } from 'node:path';
|
|
350
341
|
import {
|
|
351
342
|
createDatabaseBindingPlan,
|
|
352
343
|
productSliceMigrationPath,
|
|
@@ -376,13 +367,31 @@ const selectedDatabase = selectDatabaseTarget(bindingPlan, {
|
|
|
376
367
|
database: databaseArg?.slice('--database='.length),
|
|
377
368
|
});
|
|
378
369
|
|
|
370
|
+
const ownership = await assertWorkspaceStageOwnershipForWorkspace(
|
|
371
|
+
resolve(import.meta.dirname, '../../..'),
|
|
372
|
+
stage,
|
|
373
|
+
{
|
|
374
|
+
...(process.env.AWS_PROFILE ? { profile: process.env.AWS_PROFILE } : {}),
|
|
375
|
+
...(process.env.AWS_CONFIG_FILE ? { configFilepath: process.env.AWS_CONFIG_FILE } : {}),
|
|
376
|
+
...(process.env.AWS_SHARED_CREDENTIALS_FILE
|
|
377
|
+
? { credentialsFilepath: process.env.AWS_SHARED_CREDENTIALS_FILE }
|
|
378
|
+
: {}),
|
|
379
|
+
},
|
|
380
|
+
);
|
|
381
|
+
if (
|
|
382
|
+
process.env.AWS_REGION?.trim() &&
|
|
383
|
+
process.env.AWS_REGION.trim() !== ownership.region
|
|
384
|
+
) {
|
|
385
|
+
throw new Error('Database migration Region differs from its exact workspace owner tuple.');
|
|
386
|
+
}
|
|
387
|
+
|
|
379
388
|
const parameterName = productSliceMigrationPath(
|
|
380
389
|
foundationStage,
|
|
381
390
|
stage,
|
|
382
391
|
'${name}',
|
|
383
392
|
selectedDatabase,
|
|
384
393
|
);
|
|
385
|
-
const parameter = await new SSMClient({}).send(
|
|
394
|
+
const parameter = await new SSMClient({ region: ownership.region }).send(
|
|
386
395
|
new GetParameterCommand({ Name: parameterName }),
|
|
387
396
|
);
|
|
388
397
|
const stateMachineArn = parameter.Parameter?.Value;
|
|
@@ -432,28 +441,12 @@ const baseExecutionName = [
|
|
|
432
441
|
].join('-').slice(0, 80);
|
|
433
442
|
const databaseLifecycleCorrelationId =
|
|
434
443
|
'dbm-' + executionIdentity + '-' + runAttempt;
|
|
435
|
-
const sfn = new SFNClient({});
|
|
444
|
+
const sfn = new SFNClient({ region: ownership.region });
|
|
436
445
|
const executionArnFor = (name) =>
|
|
437
446
|
stateMachineArn.replace(':stateMachine:', ':execution:') + ':' + name;
|
|
438
|
-
const
|
|
447
|
+
const startOrDescribeExecution = async (name) => {
|
|
439
448
|
try {
|
|
440
|
-
|
|
441
|
-
new DescribeExecutionCommand({ executionArn: executionArnFor(name) }),
|
|
442
|
-
);
|
|
443
|
-
} catch (error) {
|
|
444
|
-
if (
|
|
445
|
-
error &&
|
|
446
|
-
typeof error === 'object' &&
|
|
447
|
-
error.name === 'ExecutionDoesNotExist'
|
|
448
|
-
) {
|
|
449
|
-
return undefined;
|
|
450
|
-
}
|
|
451
|
-
throw error;
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
const startExecution = async (name) => {
|
|
455
|
-
try {
|
|
456
|
-
await sfn.send(
|
|
449
|
+
const started = await sfn.send(
|
|
457
450
|
new StartExecutionCommand({
|
|
458
451
|
input: JSON.stringify({
|
|
459
452
|
databaseLifecycleCorrelationId,
|
|
@@ -468,6 +461,10 @@ const startExecution = async (name) => {
|
|
|
468
461
|
stateMachineArn,
|
|
469
462
|
}),
|
|
470
463
|
);
|
|
464
|
+
return {
|
|
465
|
+
executionArn: started.executionArn ?? executionArnFor(name),
|
|
466
|
+
status: 'RUNNING',
|
|
467
|
+
};
|
|
471
468
|
} catch (error) {
|
|
472
469
|
if (
|
|
473
470
|
!error ||
|
|
@@ -476,6 +473,9 @@ const startExecution = async (name) => {
|
|
|
476
473
|
) {
|
|
477
474
|
throw error;
|
|
478
475
|
}
|
|
476
|
+
return await sfn.send(
|
|
477
|
+
new DescribeExecutionCommand({ executionArn: executionArnFor(name) }),
|
|
478
|
+
);
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
481
|
const terminal = new Set([
|
|
@@ -486,9 +486,8 @@ const terminal = new Set([
|
|
|
486
486
|
]);
|
|
487
487
|
|
|
488
488
|
let executionName = baseExecutionName;
|
|
489
|
-
let execution = await
|
|
489
|
+
let execution = await startOrDescribeExecution(executionName);
|
|
490
490
|
if (
|
|
491
|
-
execution &&
|
|
492
491
|
terminal.has(execution.status ?? 'UNKNOWN') &&
|
|
493
492
|
execution.status !== 'SUCCEEDED' &&
|
|
494
493
|
parsedRunAttempt > 1
|
|
@@ -496,14 +495,11 @@ if (
|
|
|
496
495
|
const retrySuffix = '-retry-' + runAttempt;
|
|
497
496
|
executionName =
|
|
498
497
|
baseExecutionName.slice(0, 80 - retrySuffix.length) + retrySuffix;
|
|
499
|
-
execution = await
|
|
500
|
-
}
|
|
501
|
-
if (!execution) {
|
|
502
|
-
await startExecution(executionName);
|
|
498
|
+
execution = await startOrDescribeExecution(executionName);
|
|
503
499
|
}
|
|
504
500
|
|
|
505
|
-
const executionArn = executionArnFor(executionName);
|
|
506
|
-
let status = execution
|
|
501
|
+
const executionArn = execution.executionArn ?? executionArnFor(executionName);
|
|
502
|
+
let status = execution.status ?? 'RUNNING';
|
|
507
503
|
process.stdout.write(
|
|
508
504
|
'[database-migration] execution=' + executionArn + ' status=' + status + '\\n',
|
|
509
505
|
);
|
|
@@ -544,6 +540,7 @@ export {};
|
|
|
544
540
|
'EBK_APPCONFIG_ENVIRONMENT_ID',
|
|
545
541
|
'EBK_APPCONFIG_PROFILE_ID',
|
|
546
542
|
'EBK_FLEET_ORIGIN',
|
|
543
|
+
'EBK_LOCAL_SOURCE_TREE',
|
|
547
544
|
'EBK_PERFORMANCE_ACCOUNT_FINGERPRINT',
|
|
548
545
|
'EBK_PERFORMANCE_CANDIDATE_DIGEST',
|
|
549
546
|
'EBK_PERFORMANCE_LOAD_ENABLED',
|
|
@@ -569,6 +566,7 @@ const ebkRequiredNextBuildEnvironmentKeys = [
|
|
|
569
566
|
'AUTH_USER_POOL_ID',
|
|
570
567
|
'CI',
|
|
571
568
|
'EBK_FLEET_ORIGIN',
|
|
569
|
+
'EBK_LOCAL_SOURCE_TREE',
|
|
572
570
|
'EBK_PERFORMANCE_ACCOUNT_FINGERPRINT',
|
|
573
571
|
'EBK_PERFORMANCE_CANDIDATE_DIGEST',
|
|
574
572
|
'EBK_PERFORMANCE_LOAD_ENABLED',
|
|
@@ -598,6 +596,7 @@ const ebkLocalCommandResource = {
|
|
|
598
596
|
) => unknown;
|
|
599
597
|
|
|
600
598
|
const ebkSourceCommitPattern = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/;
|
|
599
|
+
const ebkSourceTreePattern = /^[a-f0-9]{64}$/;
|
|
601
600
|
|
|
602
601
|
function exactNextBuildEnvironment(value: unknown): Record<string, string> {
|
|
603
602
|
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
@@ -647,12 +646,16 @@ function registerExactNextBuildEnvironmentTransform(): void {
|
|
|
647
646
|
(environment: Record<string, unknown>) => {
|
|
648
647
|
const resolved = resolveEnvironment(environment);
|
|
649
648
|
const sourceCommit = resolved.EBK_SOURCE_COMMIT.trim();
|
|
650
|
-
|
|
649
|
+
const sourceTree = resolved.EBK_LOCAL_SOURCE_TREE.trim();
|
|
650
|
+
if (
|
|
651
|
+
!ebkSourceCommitPattern.test(sourceCommit) ||
|
|
652
|
+
!ebkSourceTreePattern.test(sourceTree)
|
|
653
|
+
) {
|
|
651
654
|
throw new Error(
|
|
652
|
-
'The Next builder requires
|
|
655
|
+
'The Next builder requires exact EBK commit and working-tree identities.',
|
|
653
656
|
);
|
|
654
657
|
}
|
|
655
|
-
return [sourceCommit];
|
|
658
|
+
return [sourceCommit, sourceTree];
|
|
656
659
|
},
|
|
657
660
|
);
|
|
658
661
|
},
|
|
@@ -693,6 +696,8 @@ export default $config({
|
|
|
693
696
|
};
|
|
694
697
|
},
|
|
695
698
|
async run() {
|
|
699
|
+
const { installStageIamBoundaryTransforms } =
|
|
700
|
+
await import('@empire-builder-kit/nx/aws-authority');
|
|
696
701
|
registerExactNextBuildEnvironmentTransform();
|
|
697
702
|
const personalStagePattern = /^personal-[a-z0-9](?:[a-z0-9-]{0,34}[a-z0-9])?$/;
|
|
698
703
|
if ($dev && !personalStagePattern.test($app.stage)) {
|
|
@@ -705,16 +710,24 @@ export default $config({
|
|
|
705
710
|
'A personal stage may run only through the framework development adapter.',
|
|
706
711
|
);
|
|
707
712
|
}
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
const accountId = process.env.AWS_EXPECTED_ACCOUNT_ID?.trim() ?? '';
|
|
714
|
+
if (!/^[0-9]{12}$/.test(accountId)) {
|
|
715
|
+
throw new Error(
|
|
716
|
+
'Native Slice IAM boundary injection requires AWS_EXPECTED_ACCOUNT_ID.',
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
installStageIamBoundaryTransforms({
|
|
720
|
+
accountId,
|
|
721
|
+
instanceProfileResource: aws.iam.InstanceProfile,
|
|
722
|
+
registerTransform: $transform,
|
|
723
|
+
roleResource: aws.iam.Role,
|
|
724
|
+
stage: ($dev ? 'development' : $app.stage) as
|
|
725
|
+
| 'development'
|
|
726
|
+
| 'staging'
|
|
727
|
+
| 'production',
|
|
728
|
+
});
|
|
716
729
|
const { app } = await import('./infra/index.js');
|
|
717
|
-
return app(
|
|
730
|
+
return app();
|
|
718
731
|
},
|
|
719
732
|
});
|
|
720
733
|
`,
|
|
@@ -743,6 +756,7 @@ const applicationKeys = new Set(${JSON.stringify([
|
|
|
743
756
|
'EBK_APPCONFIG_ENVIRONMENT_ID',
|
|
744
757
|
'EBK_APPCONFIG_PROFILE_ID',
|
|
745
758
|
'EBK_FLEET_ORIGIN',
|
|
759
|
+
'EBK_LOCAL_SOURCE_TREE',
|
|
746
760
|
'EBK_PERFORMANCE_ACCOUNT_FINGERPRINT',
|
|
747
761
|
'EBK_PERFORMANCE_CANDIDATE_DIGEST',
|
|
748
762
|
'EBK_PERFORMANCE_LOAD_ENABLED',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-plan-operations-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-operations-files.ts"],"names":[],"mappings":";;AAMA,
|
|
1
|
+
{"version":3,"file":"built-in-plan-operations-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-operations-files.ts"],"names":[],"mappings":";;AAMA,gEAwkCC;AA9kCD,uDAA8E;AAC9E,gEAA+E;AAC/E,gEAA+E;AAC/E,uEAAiD;AAEjD,gBAAgB;AAChB,SAAgB,0BAA0B,CACxC,IAAY,EACZ,SAAS,GAAG,WAAW,EACvB,gBAAgB,GAAG,qBAAqB;IAExC,MAAM,UAAU,GAAG,IAAI;SACpB,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SAC9D,IAAI,CAAC,EAAE,CAAC,CAAC;IACZ,OAAO;QACL,0BAA0B,EAAE,IAAA,8BAAI,EAAC;YAC/B,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,+CAA+C;oBAC5D,EAAE,EAAE,eAAe;iBACpB;gBACD;oBACE,WAAW,EACT,gFAAgF;oBAClF,EAAE,EAAE,YAAY;iBACjB;gBACD;oBACE,WAAW,EACT,0DAA0D;oBAC5D,EAAE,EAAE,eAAe;iBACpB;gBACD;oBACE,WAAW,EAAE,iDAAiD;oBAC9D,EAAE,EAAE,UAAU;iBACf;gBACD;oBACE,WAAW,EACT,mEAAmE;oBACrE,EAAE,EAAE,oBAAoB;iBACzB;gBACD;oBACE,WAAW,EACT,6DAA6D;oBAC/D,EAAE,EAAE,gBAAgB;iBACrB;gBACD;o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