@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
|
@@ -6,16 +6,12 @@ const tool_versions_js_1 = require("../preset/tool-versions.js");
|
|
|
6
6
|
const built_in_plan_shared_js_1 = require("./built-in-plan-shared.js");
|
|
7
7
|
const personalStagePattern = '^personal-[a-z0-9](?:[a-z0-9-]{0,25}[a-z0-9])?$';
|
|
8
8
|
/** @internal */
|
|
9
|
-
function renderStandardSliceSecretRuntimeFiles(name) {
|
|
10
|
-
const pascalName = name
|
|
11
|
-
.split('-')
|
|
12
|
-
.map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`)
|
|
13
|
-
.join('');
|
|
9
|
+
function renderStandardSliceSecretRuntimeFiles(name, workspace = 'workspace') {
|
|
14
10
|
return {
|
|
15
11
|
'secrets/workload-access.json': (0, built_in_plan_shared_js_1.json)({
|
|
16
12
|
bindings: [
|
|
17
13
|
{
|
|
18
|
-
logicalName:
|
|
14
|
+
logicalName: 'GeneratedPerformanceLoadHmacKeys',
|
|
19
15
|
workload: `${name}.web-server`,
|
|
20
16
|
},
|
|
21
17
|
],
|
|
@@ -41,6 +37,7 @@ function declarationProjection(declaration) {
|
|
|
41
37
|
!hasOnlyProperties(declaration, [
|
|
42
38
|
'cache',
|
|
43
39
|
'contractVersion',
|
|
40
|
+
'generation',
|
|
44
41
|
'logicalName',
|
|
45
42
|
'owner',
|
|
46
43
|
'requiredStages',
|
|
@@ -56,17 +53,27 @@ function declarationProjection(declaration) {
|
|
|
56
53
|
declaration.requiredStages.some((stage) => typeof stage !== 'string') ||
|
|
57
54
|
!isRecord(declaration.rotation) ||
|
|
58
55
|
!['manual', 'provider-managed'].includes(declaration.rotation.mode) ||
|
|
59
|
-
!['aws-managed', 'database-bootstrap', 'operator'].includes(
|
|
56
|
+
!['aws-managed', 'database-bootstrap', 'generated', 'operator'].includes(
|
|
60
57
|
declaration.source,
|
|
61
58
|
) ||
|
|
62
59
|
!isRecord(declaration.value) ||
|
|
63
60
|
!hasOnlyProperties(declaration.value, ['kind', 'validate']) ||
|
|
64
61
|
!['binary', 'json', 'string'].includes(declaration.value.kind) ||
|
|
65
|
-
typeof declaration.value.validate !== 'function'
|
|
62
|
+
typeof declaration.value.validate !== 'function' ||
|
|
63
|
+
(declaration.source === 'generated') !==
|
|
64
|
+
(declaration.generation !== undefined) ||
|
|
65
|
+
(declaration.generation !== undefined &&
|
|
66
|
+
(!isRecord(declaration.generation) ||
|
|
67
|
+
!hasOnlyProperties(declaration.generation, ['kind']) ||
|
|
68
|
+
declaration.generation.kind !== 'hmac-key-ring-v1' ||
|
|
69
|
+
declaration.value.kind !== 'json'))
|
|
66
70
|
) {
|
|
67
71
|
throw new Error('invalid');
|
|
68
72
|
}
|
|
69
73
|
return {
|
|
74
|
+
...(declaration.generation === undefined
|
|
75
|
+
? {}
|
|
76
|
+
: { generation: { kind: declaration.generation.kind } }),
|
|
70
77
|
logicalName: declaration.logicalName,
|
|
71
78
|
owner: declaration.owner,
|
|
72
79
|
requiredStages: [...declaration.requiredStages],
|
|
@@ -80,7 +87,7 @@ function parseMetadata(value) {
|
|
|
80
87
|
if (
|
|
81
88
|
!isRecord(value) ||
|
|
82
89
|
!hasOnlyProperties(value, ['declarations', 'schemaVersion']) ||
|
|
83
|
-
value.schemaVersion !==
|
|
90
|
+
value.schemaVersion !== 2 ||
|
|
84
91
|
!Array.isArray(value.declarations)
|
|
85
92
|
) {
|
|
86
93
|
throw new Error('invalid');
|
|
@@ -90,6 +97,7 @@ function parseMetadata(value) {
|
|
|
90
97
|
if (
|
|
91
98
|
!isRecord(declaration) ||
|
|
92
99
|
!hasOnlyProperties(declaration, [
|
|
100
|
+
'generation',
|
|
93
101
|
'logicalName',
|
|
94
102
|
'owner',
|
|
95
103
|
'requiredStages',
|
|
@@ -106,9 +114,16 @@ function parseMetadata(value) {
|
|
|
106
114
|
!isRecord(declaration.rotation) ||
|
|
107
115
|
!hasOnlyProperties(declaration.rotation, ['mode']) ||
|
|
108
116
|
!['manual', 'provider-managed'].includes(declaration.rotation.mode) ||
|
|
109
|
-
!['aws-managed', 'database-bootstrap', 'operator'].includes(
|
|
117
|
+
!['aws-managed', 'database-bootstrap', 'generated', 'operator'].includes(
|
|
110
118
|
declaration.source,
|
|
111
119
|
) ||
|
|
120
|
+
(declaration.source === 'generated') !==
|
|
121
|
+
(declaration.generation !== undefined) ||
|
|
122
|
+
(declaration.generation !== undefined &&
|
|
123
|
+
(!isRecord(declaration.generation) ||
|
|
124
|
+
!hasOnlyProperties(declaration.generation, ['kind']) ||
|
|
125
|
+
declaration.generation.kind !== 'hmac-key-ring-v1' ||
|
|
126
|
+
declaration.valueKind !== 'json')) ||
|
|
112
127
|
!['binary', 'json', 'string'].includes(declaration.valueKind) ||
|
|
113
128
|
logicalNames.has(declaration.logicalName)
|
|
114
129
|
) {
|
|
@@ -116,6 +131,9 @@ function parseMetadata(value) {
|
|
|
116
131
|
}
|
|
117
132
|
logicalNames.add(declaration.logicalName);
|
|
118
133
|
return {
|
|
134
|
+
...(declaration.generation === undefined
|
|
135
|
+
? {}
|
|
136
|
+
: { generation: { kind: declaration.generation.kind } }),
|
|
119
137
|
logicalName: declaration.logicalName,
|
|
120
138
|
owner: declaration.owner,
|
|
121
139
|
requiredStages: [...declaration.requiredStages],
|
|
@@ -244,6 +262,7 @@ import {
|
|
|
244
262
|
createPersonalSecretLedgerRecord,
|
|
245
263
|
isExactSstSecretAlreadyAbsent,
|
|
246
264
|
} from '@empire-builder-kit/nx/secrets';
|
|
265
|
+
import { assertWorkspaceStageOwnershipForWorkspace } from '@empire-builder-kit/nx/workspace-deployment';
|
|
247
266
|
import { execFile } from 'node:child_process';
|
|
248
267
|
import { readFile, realpath } from 'node:fs/promises';
|
|
249
268
|
import { dirname, isAbsolute, relative, resolve } from 'node:path';
|
|
@@ -489,6 +508,18 @@ async function main() {
|
|
|
489
508
|
await verifyDeclarations(projectRoot, environment);
|
|
490
509
|
const binary = await workspaceSstRuntime(workspaceRoot);
|
|
491
510
|
const accountId = await requiredAwsContext(environment, profile, region);
|
|
511
|
+
const ownership = await assertWorkspaceStageOwnershipForWorkspace(
|
|
512
|
+
workspaceRoot,
|
|
513
|
+
'development',
|
|
514
|
+
{
|
|
515
|
+
configFilepath: environment.AWS_CONFIG_FILE,
|
|
516
|
+
credentialsFilepath: environment.AWS_SHARED_CREDENTIALS_FILE,
|
|
517
|
+
profile,
|
|
518
|
+
},
|
|
519
|
+
);
|
|
520
|
+
if (ownership.region !== region) {
|
|
521
|
+
throw new Error('Personal secret cleanup Region differs from its exact workspace owner tuple.');
|
|
522
|
+
}
|
|
492
523
|
const identity = {
|
|
493
524
|
accountId,
|
|
494
525
|
region,
|
|
@@ -717,15 +748,15 @@ export function createStandardSliceSecretRuntime(
|
|
|
717
748
|
}
|
|
718
749
|
`,
|
|
719
750
|
'infra/personal-secrets.ts': `import {
|
|
751
|
+
canonicalOperatorSecretName,
|
|
720
752
|
parseSecretMetadataRegistry,
|
|
721
753
|
parseSecretWorkloadAccessRegistry,
|
|
722
754
|
personalSecretNamesForWorkload,
|
|
723
|
-
type SecretWorkloadAccessPlanEntry,
|
|
724
755
|
} from '@empire-builder-kit/nx/secrets';
|
|
725
756
|
import secretMetadataDocument from '../secrets/metadata.json';
|
|
726
757
|
import secretWorkloadAccessDocument from '../secrets/workload-access.json';
|
|
727
|
-
import {
|
|
728
|
-
import { standardSliceBoundOperatorSecretDeclarations } from './
|
|
758
|
+
import { createStandardSliceRuntimeTopology } from './native-runtime-authority/topology.js';
|
|
759
|
+
import { standardSliceBoundOperatorSecretDeclarations } from './native-runtime-authority/effective-intent.js';
|
|
729
760
|
|
|
730
761
|
const metadata = parseSecretMetadataRegistry(secretMetadataDocument);
|
|
731
762
|
const access = parseSecretWorkloadAccessRegistry(
|
|
@@ -806,84 +837,66 @@ function expectedBindingKeys(stage: string) {
|
|
|
806
837
|
);
|
|
807
838
|
}
|
|
808
839
|
|
|
809
|
-
function createProtectedLinks(
|
|
810
|
-
protectedAccess: readonly SecretWorkloadAccessPlanEntry[],
|
|
811
|
-
stage: string,
|
|
812
|
-
) {
|
|
840
|
+
function createProtectedLinks(stage: string) {
|
|
813
841
|
const expected = expectedBindingKeys(stage);
|
|
814
842
|
const observed = new Set<string>();
|
|
815
|
-
const linksByName = new Map<
|
|
816
|
-
string,
|
|
817
|
-
{ arn: string; resource: any }
|
|
818
|
-
>();
|
|
843
|
+
const linksByName = new Map<string, { resource: any }>();
|
|
819
844
|
const linksByWorkload = new Map<
|
|
820
845
|
string,
|
|
821
846
|
Array<{ logicalName: string; resource: any }>
|
|
822
847
|
>();
|
|
848
|
+
const declarationsByName = new Map(
|
|
849
|
+
metadata.declarations.map((declaration) => [
|
|
850
|
+
declaration.logicalName,
|
|
851
|
+
declaration,
|
|
852
|
+
]),
|
|
853
|
+
);
|
|
823
854
|
|
|
824
|
-
for (const entry of
|
|
855
|
+
for (const entry of access.bindings) {
|
|
856
|
+
const declaration = declarationsByName.get(entry.logicalName);
|
|
857
|
+
if (!declaration?.requiredStages.includes(stage)) continue;
|
|
825
858
|
if (
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
entry.
|
|
859
|
+
(declaration.source !== 'operator' &&
|
|
860
|
+
declaration.source !== 'generated') ||
|
|
861
|
+
!entry.workload.startsWith(workloadPrefix)
|
|
829
862
|
) {
|
|
830
863
|
throw new Error(
|
|
831
864
|
'Protected secret access differs from the declared workload registry.',
|
|
832
865
|
);
|
|
833
866
|
}
|
|
834
|
-
const
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
(candidate) =>
|
|
839
|
-
candidate.link.properties.logicalName === reference.logicalName,
|
|
867
|
+
const bindingKey = entry.workload + '\\0' + entry.logicalName;
|
|
868
|
+
if (!expected.has(bindingKey) || observed.has(bindingKey)) {
|
|
869
|
+
throw new Error(
|
|
870
|
+
'Protected secret access differs from the declared workload registry.',
|
|
840
871
|
);
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
link.permission.Action.length !== 1 ||
|
|
851
|
-
link.permission.Action[0] !== 'secretsmanager:GetSecretValue' ||
|
|
852
|
-
link.permission.Resource.length !== 1 ||
|
|
853
|
-
link.permission.Resource[0] !== reference.secretArn
|
|
854
|
-
) {
|
|
855
|
-
throw new Error(
|
|
856
|
-
'Protected secret access differs from the declared workload registry.',
|
|
857
|
-
);
|
|
858
|
-
}
|
|
859
|
-
observed.add(bindingKey);
|
|
860
|
-
const existing = linksByName.get(reference.logicalName);
|
|
861
|
-
if (existing && existing.arn !== reference.secretArn) {
|
|
862
|
-
throw new Error(
|
|
863
|
-
'A declared secret resolved to conflicting protected references.',
|
|
872
|
+
}
|
|
873
|
+
observed.add(bindingKey);
|
|
874
|
+
const existing = linksByName.get(entry.logicalName);
|
|
875
|
+
const resource =
|
|
876
|
+
existing?.resource ??
|
|
877
|
+
(() => {
|
|
878
|
+
const name = canonicalOperatorSecretName(
|
|
879
|
+
{ slice: '${name}', stage, workspace: '${workspace}' },
|
|
880
|
+
entry.logicalName,
|
|
864
881
|
);
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
existing?.resource ??
|
|
868
|
-
new sst.Linkable(reference.logicalName, {
|
|
882
|
+
const secret = aws.secretsmanager.getSecretOutput({ name });
|
|
883
|
+
return new sst.Linkable(entry.logicalName, {
|
|
869
884
|
properties: {
|
|
870
|
-
logicalName:
|
|
885
|
+
logicalName: entry.logicalName,
|
|
871
886
|
provider: 'aws-secrets-manager',
|
|
872
|
-
secretArn:
|
|
887
|
+
secretArn: secret.arn,
|
|
873
888
|
},
|
|
874
889
|
include: [
|
|
875
890
|
sst.aws.permission({
|
|
876
891
|
actions: ['secretsmanager:GetSecretValue'],
|
|
877
|
-
resources: [
|
|
892
|
+
resources: [secret.arn],
|
|
878
893
|
}),
|
|
879
894
|
],
|
|
880
895
|
});
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
resources.push({ logicalName: reference.logicalName, resource });
|
|
886
|
-
}
|
|
896
|
+
})();
|
|
897
|
+
linksByName.set(entry.logicalName, { resource });
|
|
898
|
+
const resources = linksByWorkload.get(entry.workload) ?? [];
|
|
899
|
+
resources.push({ logicalName: entry.logicalName, resource });
|
|
887
900
|
linksByWorkload.set(entry.workload, resources);
|
|
888
901
|
}
|
|
889
902
|
if (
|
|
@@ -898,13 +911,11 @@ function createProtectedLinks(
|
|
|
898
911
|
}
|
|
899
912
|
|
|
900
913
|
export function createStandardSliceSecretLinks(
|
|
901
|
-
input: {
|
|
902
|
-
protectedAccess?: readonly SecretWorkloadAccessPlanEntry[];
|
|
903
|
-
} = {},
|
|
914
|
+
input: Record<string, never> = {},
|
|
904
915
|
): StandardSliceSecretLinks {
|
|
905
916
|
if ($dev) {
|
|
906
917
|
if (
|
|
907
|
-
input.
|
|
918
|
+
Object.keys(input).length !== 0 ||
|
|
908
919
|
!personalStagePattern.test($app.stage)
|
|
909
920
|
) {
|
|
910
921
|
throw new Error(
|
|
@@ -913,7 +924,7 @@ export function createStandardSliceSecretLinks(
|
|
|
913
924
|
}
|
|
914
925
|
standardSliceBoundOperatorSecretDeclarations(
|
|
915
926
|
'development',
|
|
916
|
-
|
|
927
|
+
createStandardSliceRuntimeTopology('development'),
|
|
917
928
|
);
|
|
918
929
|
const resources = new Map(
|
|
919
930
|
metadata.declarations
|
|
@@ -968,10 +979,10 @@ export function createStandardSliceSecretLinks(
|
|
|
968
979
|
'A personal stage may run only under the SST development adapter.',
|
|
969
980
|
);
|
|
970
981
|
}
|
|
971
|
-
|
|
972
|
-
input
|
|
973
|
-
|
|
974
|
-
);
|
|
982
|
+
if (Object.keys(input).length !== 0) {
|
|
983
|
+
throw new Error('Protected secret link input must be empty.');
|
|
984
|
+
}
|
|
985
|
+
const linksByWorkload = createProtectedLinks($app.stage);
|
|
975
986
|
return {
|
|
976
987
|
linksForWorkload(
|
|
977
988
|
workload: string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-plan-secret-runtime-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-secret-runtime-files.ts"],"names":[],"mappings":";;AAOA,
|
|
1
|
+
{"version":3,"file":"built-in-plan-secret-runtime-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-secret-runtime-files.ts"],"names":[],"mappings":";;AAOA,sFAm/BC;AA1/BD,gEAAkE;AAClE,iEAAmE;AACnE,uEAAiD;AAEjD,MAAM,oBAAoB,GAAG,iDAAiD,CAAC;AAE/E,gBAAgB;AAChB,SAAgB,qCAAqC,CACnD,IAAY,EACZ,SAAS,GAAG,WAAW;IAEvB,OAAO;QACL,8BAA8B,EAAE,IAAA,8BAAI,EAAC;YACnC,QAAQ,EAAE;gBACR;oBACE,WAAW,EAAE,kCAAkC;oBAC/C,QAAQ,EAAE,GAAG,IAAI,aAAa;iBAC/B;aACF;YACD,aAAa,EAAE,CAAC;SACjB,CAAC;QACF,sCAAsC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqI3D;KACE,CAAC;AACJ,CAAC"}
|
|
@@ -45,41 +45,25 @@ those validators enforce cross-field outcome rules and trusted time/workflow
|
|
|
45
45
|
context that JSON Schema cannot establish alone.
|
|
46
46
|
|
|
47
47
|
\`smoke-deployed-check\` only proves that Playwright can discover the suite. It
|
|
48
|
-
does not contact or prove a deployment.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
\`clientId\`. Set \`EBK_SMOKE_AUTHORITY_VERSION\` to
|
|
54
|
-
\`cognito-admin-cloudwatch-observe-v1\` only after the protected role is reviewed for
|
|
55
|
-
\`DescribeUserPoolClient\`, \`AdminCreateUser\`, \`AdminSetUserPassword\`,
|
|
56
|
-
\`AdminAddUserToGroup\`, and \`AdminDeleteUser\` on those pools and
|
|
57
|
-
\`FilterLogEvents\` on each exact
|
|
58
|
-
\`/ebk/<stage>/<slice>/event-consumer\` log group. The workflow creates one
|
|
59
|
-
run-scoped synthetic customer in the Slice's narrow \`<slice>-test-writer\`
|
|
60
|
-
group and one distinct synthetic reviewer in \`<slice>-admin\`. It never grants
|
|
61
|
-
the customer administrator authority, strips AWS credentials from the browser
|
|
62
|
-
child,
|
|
63
|
-
observes the published event only from the credential-bearing parent, removes
|
|
64
|
-
both principals and all raw browser and log state, and retains only allowlisted
|
|
65
|
-
sanitized evidence.
|
|
48
|
+
does not contact or prove a deployment. The root governed lifecycle runs each
|
|
49
|
+
Slice's \`smoke-deployed\` target immediately after its successful native SST
|
|
50
|
+
deployment and migration. Local and GitHub execution use the same stage
|
|
51
|
+
deployment role and exact deployed outputs; no separate smoke role, workflow,
|
|
52
|
+
target registry, or staging-evidence reconciliation graph exists.
|
|
66
53
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
application mutation, wildcard Logs query, \`GetLogEvents\`, \`StartQuery\`, or
|
|
73
|
-
\`logs:Unmask\` authority. GitHub bootstrap verifies that the secret name exists
|
|
74
|
-
only in each protected environment; it never creates the secret or role and
|
|
75
|
-
cannot attest to the hidden role policy. Review that policy before setting the
|
|
76
|
-
authority-version acknowledgement.
|
|
54
|
+
Development and staging smoke wait up to sixteen minutes for the exact durable
|
|
55
|
+
event on the fifteen-minute nonproduction outbox schedule. Production waits up
|
|
56
|
+
to ninety seconds for the same proof on its one-minute schedule. These bounds
|
|
57
|
+
include CloudWatch Logs request latency and the runner aborts an in-flight
|
|
58
|
+
request when no bounded observation time remains.
|
|
77
59
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
60
|
+
The runner creates one run-scoped synthetic customer in the Slice's narrow
|
|
61
|
+
\`<slice>-test-writer\` group and one distinct synthetic reviewer in
|
|
62
|
+
\`<slice>-admin\`. It never grants the customer administrator authority, strips
|
|
63
|
+
AWS credentials from the browser child, observes the published event only from
|
|
64
|
+
the credential-bearing parent, removes both principals and all raw browser and
|
|
65
|
+
log state, and retains only allowlisted sanitized evidence. A failed smoke ends
|
|
66
|
+
the lifecycle immediately and no successful deployment receipt is written.
|
|
83
67
|
|
|
84
68
|
One optional evidence-level retry replays the complete, identical browser or
|
|
85
69
|
live-integration proof. Consequently \`counts.retried\` is always zero or one.
|
|
@@ -1333,6 +1317,7 @@ import {
|
|
|
1333
1317
|
writeFileSync,
|
|
1334
1318
|
} from 'node:fs';
|
|
1335
1319
|
import { join, relative, resolve } from 'node:path';
|
|
1320
|
+
import { performance } from 'node:perf_hooks';
|
|
1336
1321
|
import { createRequire } from 'node:module';
|
|
1337
1322
|
import { TextDecoder } from 'node:util';
|
|
1338
1323
|
import {
|
|
@@ -1340,6 +1325,7 @@ import {
|
|
|
1340
1325
|
playwrightSkippedTestIds,
|
|
1341
1326
|
reconcileRunnerQuarantine,
|
|
1342
1327
|
} from '../testing/quarantine-runtime.mjs';
|
|
1328
|
+
import { assertWorkspaceStageOwnershipForWorkspace } from '@empire-builder-kit/nx/workspace-deployment';
|
|
1343
1329
|
|
|
1344
1330
|
const require = createRequire(import.meta.url);
|
|
1345
1331
|
const {
|
|
@@ -1397,6 +1383,14 @@ const userPoolId = process.env.EBK_SMOKE_USER_POOL_ID ?? '';
|
|
|
1397
1383
|
const clientId = process.env.EBK_SMOKE_CLIENT_ID ?? '';
|
|
1398
1384
|
const smokeAuthority =
|
|
1399
1385
|
process.env.EBK_SMOKE_AUTHORITY_VERSION ?? '';
|
|
1386
|
+
const lifecycleAdapter = process.env.EBK_NX_STAGE_LIFECYCLE ?? '';
|
|
1387
|
+
const deployedEnvironmentClass =
|
|
1388
|
+
lifecycleAdapter === 'local'
|
|
1389
|
+
? 'local-federated'
|
|
1390
|
+
: lifecycleAdapter === 'github'
|
|
1391
|
+
? 'protected-github'
|
|
1392
|
+
: undefined;
|
|
1393
|
+
const unexpectedArguments = process.argv.slice(2);
|
|
1400
1394
|
const requestedRunId = process.env.EBK_TEST_RUN_ID;
|
|
1401
1395
|
const runId = requestedRunId ?? randomUUID().replaceAll('-', '');
|
|
1402
1396
|
const seed = process.env.EBK_TEST_SEED ?? runId;
|
|
@@ -1483,7 +1477,7 @@ function failPreflight(
|
|
|
1483
1477
|
attempts: [],
|
|
1484
1478
|
cleanup,
|
|
1485
1479
|
environment: {
|
|
1486
|
-
class: '
|
|
1480
|
+
class: deployedEnvironmentClass ?? 'unresolved-adapter',
|
|
1487
1481
|
deployed: true,
|
|
1488
1482
|
stage: stage || 'unresolved',
|
|
1489
1483
|
},
|
|
@@ -1690,6 +1684,18 @@ function inspectPlaywrightReportPolicy(report) {
|
|
|
1690
1684
|
};
|
|
1691
1685
|
}
|
|
1692
1686
|
|
|
1687
|
+
function requiresScheduledDeliveryObservation(stage) {
|
|
1688
|
+
return ['development', 'staging', 'production'].includes(stage);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
function scheduledDeliveryDeadlineFinding() {
|
|
1692
|
+
return {
|
|
1693
|
+
classification: 'assertion-failed',
|
|
1694
|
+
summary:
|
|
1695
|
+
'The exact published event and correlation were not observed in the managed event-consumer log group within the bounded window.',
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1693
1699
|
async function observePublishedEvent(logs, observationPath, attemptStartedAt) {
|
|
1694
1700
|
let intent;
|
|
1695
1701
|
try {
|
|
@@ -1711,7 +1717,11 @@ async function observePublishedEvent(logs, observationPath, attemptStartedAt) {
|
|
|
1711
1717
|
}
|
|
1712
1718
|
const logGroupName = '/ebk/' + stage + '/${name}/event-consumer';
|
|
1713
1719
|
const startTime = Math.max(0, Date.parse(attemptStartedAt) - 5_000);
|
|
1714
|
-
|
|
1720
|
+
const timeoutMilliseconds = stage === 'production' ? 90_000 : 960_000;
|
|
1721
|
+
const deadline = performance.now() + timeoutMilliseconds;
|
|
1722
|
+
while (true) {
|
|
1723
|
+
const remainingRequestMilliseconds = deadline - performance.now();
|
|
1724
|
+
if (remainingRequestMilliseconds <= 0) break;
|
|
1715
1725
|
let response;
|
|
1716
1726
|
try {
|
|
1717
1727
|
response = await logs.send(
|
|
@@ -1721,14 +1731,28 @@ async function observePublishedEvent(logs, observationPath, attemptStartedAt) {
|
|
|
1721
1731
|
logGroupName,
|
|
1722
1732
|
startTime,
|
|
1723
1733
|
}),
|
|
1734
|
+
{
|
|
1735
|
+
abortSignal: AbortSignal.timeout(
|
|
1736
|
+
Math.max(1, Math.ceil(remainingRequestMilliseconds)),
|
|
1737
|
+
),
|
|
1738
|
+
},
|
|
1724
1739
|
);
|
|
1725
1740
|
} catch (error) {
|
|
1741
|
+
if (
|
|
1742
|
+
performance.now() >= deadline ||
|
|
1743
|
+
['AbortError', 'TimeoutError'].includes(error?.name)
|
|
1744
|
+
) {
|
|
1745
|
+
return scheduledDeliveryDeadlineFinding();
|
|
1746
|
+
}
|
|
1726
1747
|
return permissionFailure(
|
|
1727
1748
|
error,
|
|
1728
1749
|
'event-consumer observation',
|
|
1729
1750
|
'CloudWatch Logs',
|
|
1730
1751
|
);
|
|
1731
1752
|
}
|
|
1753
|
+
if (performance.now() > deadline) {
|
|
1754
|
+
return scheduledDeliveryDeadlineFinding();
|
|
1755
|
+
}
|
|
1732
1756
|
const observed = (response.events ?? []).some(({ message }) => {
|
|
1733
1757
|
const record = structuredLogRecord(message);
|
|
1734
1758
|
return (
|
|
@@ -1744,15 +1768,13 @@ async function observePublishedEvent(logs, observationPath, attemptStartedAt) {
|
|
|
1744
1768
|
);
|
|
1745
1769
|
});
|
|
1746
1770
|
if (observed) return undefined;
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1771
|
+
const remainingDelayMilliseconds = deadline - performance.now();
|
|
1772
|
+
if (remainingDelayMilliseconds <= 0) break;
|
|
1773
|
+
await new Promise((resolveDelay) =>
|
|
1774
|
+
setTimeout(resolveDelay, Math.min(3_000, remainingDelayMilliseconds)),
|
|
1775
|
+
);
|
|
1750
1776
|
}
|
|
1751
|
-
return
|
|
1752
|
-
classification: 'assertion-failed',
|
|
1753
|
-
summary:
|
|
1754
|
-
'The exact published event and correlation were not observed in the managed event-consumer log group within the bounded window.',
|
|
1755
|
-
};
|
|
1777
|
+
return scheduledDeliveryDeadlineFinding();
|
|
1756
1778
|
}
|
|
1757
1779
|
|
|
1758
1780
|
const url = credentialFreeHttpsUrl(smokeUrl);
|
|
@@ -1763,7 +1785,7 @@ const validIdentity =
|
|
|
1763
1785
|
/^[A-Za-z0-9_-]{1,128}_[A-Za-z0-9]{1,128}$/.test(userPoolId) &&
|
|
1764
1786
|
/^[a-z0-9]{1,128}$/.test(clientId);
|
|
1765
1787
|
if (
|
|
1766
|
-
!['staging', 'production'].includes(stage) ||
|
|
1788
|
+
!['development', 'staging', 'production'].includes(stage) ||
|
|
1767
1789
|
!url ||
|
|
1768
1790
|
!apiUrl ||
|
|
1769
1791
|
normalizedProductPath !== expectedProductPath ||
|
|
@@ -1772,14 +1794,35 @@ if (
|
|
|
1772
1794
|
!validSourceCommit ||
|
|
1773
1795
|
!validRunId ||
|
|
1774
1796
|
!validSeed ||
|
|
1797
|
+
!deployedEnvironmentClass ||
|
|
1798
|
+
unexpectedArguments.length > 0 ||
|
|
1775
1799
|
smokeAuthority !== 'cognito-admin-cloudwatch-observe-v1' ||
|
|
1776
1800
|
!process.env.AWS_REGION
|
|
1777
1801
|
) {
|
|
1778
1802
|
failPreflight(
|
|
1779
1803
|
'prerequisite-missing',
|
|
1780
|
-
'
|
|
1804
|
+
'Deployed smoke requires development, staging, or production, one exact source commit, native credential-free HTTPS web and API outputs, exact Cognito identity, bounded run/seed identity, AWS region, and cognito-admin-cloudwatch-observe-v1 authority acknowledgement.',
|
|
1781
1805
|
);
|
|
1782
1806
|
}
|
|
1807
|
+
if (process.exitCode === undefined) {
|
|
1808
|
+
try {
|
|
1809
|
+
const ownership = await assertWorkspaceStageOwnershipForWorkspace(workspaceRoot, stage, {
|
|
1810
|
+
...(process.env.AWS_PROFILE ? { profile: process.env.AWS_PROFILE } : {}),
|
|
1811
|
+
...(process.env.AWS_CONFIG_FILE ? { configFilepath: process.env.AWS_CONFIG_FILE } : {}),
|
|
1812
|
+
...(process.env.AWS_SHARED_CREDENTIALS_FILE
|
|
1813
|
+
? { credentialsFilepath: process.env.AWS_SHARED_CREDENTIALS_FILE }
|
|
1814
|
+
: {}),
|
|
1815
|
+
});
|
|
1816
|
+
if (process.env.AWS_REGION !== ownership.region) {
|
|
1817
|
+
throw new Error('Deployed smoke Region differs from its exact workspace owner tuple.');
|
|
1818
|
+
}
|
|
1819
|
+
} catch {
|
|
1820
|
+
failPreflight(
|
|
1821
|
+
'authorization-denied',
|
|
1822
|
+
'Deployed smoke requires this workspace to own the exact account, Region, and canonical stage tuple.',
|
|
1823
|
+
);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1783
1826
|
if (process.exitCode === undefined) {
|
|
1784
1827
|
let quarantine;
|
|
1785
1828
|
try {
|
|
@@ -2020,6 +2063,7 @@ if (process.exitCode === undefined) {
|
|
|
2020
2063
|
EBK_SMOKE_API_URL: apiUrl.href,
|
|
2021
2064
|
EBK_SMOKE_DATA_CLEANUP_PATH: cleanupPath,
|
|
2022
2065
|
EBK_SMOKE_EMAIL: principalEmail,
|
|
2066
|
+
EBK_FRONTEND_SECURITY_PROFILE: 'deployed-https',
|
|
2023
2067
|
EBK_SMOKE_PASSWORD: principalPassword,
|
|
2024
2068
|
EBK_SMOKE_REVIEWER_EMAIL: reviewerEmail,
|
|
2025
2069
|
EBK_SMOKE_REVIEWER_PASSWORD: reviewerPassword,
|
|
@@ -2077,7 +2121,10 @@ if (process.exitCode === undefined) {
|
|
|
2077
2121
|
} else {
|
|
2078
2122
|
reportInvalid = true;
|
|
2079
2123
|
}
|
|
2080
|
-
if (
|
|
2124
|
+
if (
|
|
2125
|
+
execution?.status === 0 &&
|
|
2126
|
+
requiresScheduledDeliveryObservation(stage)
|
|
2127
|
+
) {
|
|
2081
2128
|
observationFinding = await observePublishedEvent(
|
|
2082
2129
|
logs,
|
|
2083
2130
|
observationPath,
|
|
@@ -2362,7 +2409,7 @@ if (process.exitCode === undefined) {
|
|
|
2362
2409
|
attempts,
|
|
2363
2410
|
cleanup,
|
|
2364
2411
|
environment: {
|
|
2365
|
-
class:
|
|
2412
|
+
class: deployedEnvironmentClass,
|
|
2366
2413
|
deployed: true,
|
|
2367
2414
|
stage,
|
|
2368
2415
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-plan-testing-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-testing-files.ts"],"names":[],"mappings":";;AAGA,
|
|
1
|
+
{"version":3,"file":"built-in-plan-testing-files.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/slice/built-in-plan-testing-files.ts"],"names":[],"mappings":";;AAGA,8DAs7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AI;;;;;;;;CAQnB;QACG,kCAAkC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC;QACG,8BAA8B,EAAE;;;;;;;;;;;;;;;;;CAiBnC;KACE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DeploymentProfile } from '../../repository-policy/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Prerelease release-manifest and rollout scripts used Pulumi previews as
|
|
4
|
+
* deployment authorization. The thin SST lifecycle keeps immutable candidate
|
|
5
|
+
* capture, but deployment evidence is the post-operation receipt emitted by
|
|
6
|
+
* the shared lifecycle adapter. Those old scripts are deliberately not
|
|
7
|
+
* generated.
|
|
8
|
+
*/
|
|
9
|
+
export declare const RETIRED_PREVIEW_RELEASE_PATHS: readonly ["scripts/release-lifecycle.mjs", "scripts/release-manifest.mjs", "scripts/release-rollout-proof.mjs", "scripts/release-rollout.mjs"];
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare function renderProductThinReleaseFiles(name: string, configurationSeed: string, deploymentProfile: DeploymentProfile): Readonly<Record<string, string>>;
|