@empire-builder-kit/nx 1.0.0-rc.46 → 1.0.0-rc.47
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/generators.json +11 -1
- package/package.json +3 -3
- package/src/aws-authority/stage-authority.d.ts +30 -2
- package/src/aws-authority/stage-authority.js +220 -25
- package/src/developer-agent/generator-planning.js +99 -6
- package/src/developer-agent/model.d.ts +7 -3
- package/src/developer-agent/model.js +1 -0
- package/src/developer-agent/operation-registry.d.ts +1 -0
- package/src/developer-agent/operation-registry.js +43 -2
- package/src/developer-agent/planning.js +5 -2
- package/src/developer-agent/preview-changes.js +10 -0
- package/src/developer-agent/validation.js +7 -3
- package/src/developer-agent/workspace-inspection.js +51 -4
- package/src/executors/deployment-plan/deployment-plan.js +3 -0
- package/src/executors/dev-doctor/dev-doctor.d.ts +25 -3
- package/src/executors/dev-doctor/dev-doctor.js +136 -49
- package/src/executors/dev-setup/dev-setup.d.ts +18 -1
- package/src/executors/dev-setup/dev-setup.js +320 -196
- package/src/executors/foundation-preflight/foundation-preflight.js +9 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +2 -2
- package/src/executors/infrastructure-plan/infrastructure-plan.js +10 -3
- package/src/executors/local-deploy/local-deploy.d.ts +15 -0
- package/src/executors/local-deploy/local-deploy.js +96 -14
- package/src/executors/sst-lifecycle/logging-preflight.js +12 -1
- package/src/executors/sst-lifecycle/run-sst-command.js +51 -5
- package/src/foundation/cost-estimate.js +1 -1
- package/src/foundation/identity-domain-parent-ready.d.ts +91 -0
- package/src/foundation/identity-domain-parent-ready.js +333 -0
- package/src/foundation/identity-domain.d.ts +94 -0
- package/src/foundation/identity-domain.js +115 -0
- package/src/foundation/index.d.ts +2 -0
- package/src/foundation/index.js +7 -0
- package/src/foundation/preflight.js +17 -1
- package/src/foundation/root-site-readiness.d.ts +27 -0
- package/src/foundation/root-site-readiness.js +78 -0
- package/src/foundation/root-site.d.ts +81 -0
- package/src/foundation/root-site.js +268 -0
- package/src/generators/framework-prerequisites.d.ts +2 -0
- package/src/generators/framework-prerequisites.js +34 -0
- package/src/generators/function/function-registration.d.ts +24 -0
- package/src/generators/function/function-registration.js +66 -0
- package/src/generators/function/function.d.ts +16 -1
- package/src/generators/function/function.js +101 -18
- package/src/generators/function/schema.d.ts +1 -0
- package/src/generators/function/schema.json +6 -0
- package/src/generators/function-access/function-access.d.ts +14 -0
- package/src/generators/function-access/function-access.js +141 -0
- package/src/generators/function-access/schema.d.ts +6 -0
- package/src/generators/function-access/schema.json +25 -0
- package/src/generators/post-generation-install.d.ts +1 -1
- package/src/generators/post-generation-install.js +1 -1
- package/src/generators/preset/dependency-overrides.d.ts +1 -1
- package/src/generators/preset/dependency-overrides.js +1 -1
- package/src/generators/preset/workspace-files-adopter-skills.js +14 -0
- package/src/generators/preset/workspace-files-developer-agent.js +17 -11
- package/src/generators/preset/workspace-files-stage-authority.js +58 -1
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +11 -0
- package/src/generators/preset/workspace-files-thin-deploy.js +47 -4
- package/src/generators/preset/workspace-files-thin-docs.js +33 -5
- package/src/generators/preset/workspace-files.js +207 -13
- package/src/generators/repository-policy/repository-policy.js +2 -1
- package/src/generators/repository-policy/schema.d.ts +2 -0
- package/src/generators/repository-policy/schema.json +7 -2
- package/src/generators/site/built-in-site-documentation-files.d.ts +2 -0
- package/src/generators/site/built-in-site-documentation-files.js +92 -0
- package/src/generators/site/built-in-site-files.d.ts +8 -0
- package/src/generators/site/built-in-site-files.js +40 -0
- package/src/generators/site/built-in-site-infrastructure-files.d.ts +2 -0
- package/src/generators/site/built-in-site-infrastructure-files.js +275 -0
- package/src/generators/site/built-in-site-plan.d.ts +19 -0
- package/src/generators/site/built-in-site-plan.js +65 -0
- package/src/generators/site/built-in-site-project-files.d.ts +3 -0
- package/src/generators/site/built-in-site-project-files.js +258 -0
- package/src/generators/site/built-in-site-script-files.d.ts +2 -0
- package/src/generators/site/built-in-site-script-files.js +306 -0
- package/src/generators/site/built-in-site-shared.d.ts +9 -0
- package/src/generators/site/built-in-site-shared.js +21 -0
- package/src/generators/site/built-in-site-smoke-files.d.ts +2 -0
- package/src/generators/site/built-in-site-smoke-files.js +37 -0
- package/src/generators/site/built-in-site-sst-config-files.d.ts +2 -0
- package/src/generators/site/built-in-site-sst-config-files.js +39 -0
- package/src/generators/site/built-in-site-web-files.d.ts +2 -0
- package/src/generators/site/built-in-site-web-files.js +284 -0
- package/src/generators/site/schema.d.ts +4 -0
- package/src/generators/site/schema.json +20 -0
- package/src/generators/site/site.d.ts +13 -0
- package/src/generators/site/site.js +221 -0
- package/src/generators/slice/built-in-plan-alarm-identity.d.ts +9 -0
- package/src/generators/slice/built-in-plan-alarm-identity.js +8 -1
- package/src/generators/slice/built-in-plan-api-contract-files.js +18 -0
- package/src/generators/slice/built-in-plan-async-work-files.js +18 -0
- package/src/generators/slice/built-in-plan-data-files.js +116 -11
- package/src/generators/slice/built-in-plan-foundation-files.d.ts +12 -0
- package/src/generators/slice/built-in-plan-foundation-files.js +114 -5
- package/src/generators/slice/built-in-plan-frontend-files.js +2 -271
- package/src/generators/slice/built-in-plan-frontend-header-proof.d.ts +6 -0
- package/src/generators/slice/built-in-plan-frontend-header-proof.js +282 -0
- package/src/generators/slice/built-in-plan-infrastructure-files.js +151 -237
- package/src/generators/slice/built-in-plan-key-value-cleanup.js +4 -3
- package/src/generators/slice/built-in-plan-log-group-helpers.d.ts +29 -0
- package/src/generators/slice/built-in-plan-log-group-helpers.js +130 -0
- package/src/generators/slice/built-in-plan-metadata-files.js +21 -4
- package/src/generators/slice/built-in-plan-next-build-authority.d.ts +5 -0
- package/src/generators/slice/built-in-plan-next-build-authority.js +124 -0
- package/src/generators/slice/built-in-plan-operations-files.d.ts +6 -0
- package/src/generators/slice/built-in-plan-operations-files.js +107 -219
- package/src/generators/slice/built-in-plan-performance-files.js +6 -1
- package/src/generators/slice/built-in-plan-reliability-files.js +12 -8
- package/src/generators/slice/built-in-plan-shared.d.ts +1 -1
- package/src/generators/slice/built-in-plan-shared.js +1 -1
- package/src/generators/slice/built-in-plan-sst-config.d.ts +49 -0
- package/src/generators/slice/built-in-plan-sst-config.js +160 -0
- package/src/generators/slice/built-in-plan-testing-files.js +92 -49
- package/src/generators/slice/built-in-plan-verification-files.js +15 -4
- package/src/generators/slice/built-in-plan-web-files.js +65 -0
- package/src/generators/slice/deployed-smoke-diagnostics.d.ts +35 -0
- package/src/generators/slice/deployed-smoke-diagnostics.js +189 -0
- package/src/generators/slice/deployed-smoke-readiness.d.ts +7 -0
- package/src/generators/slice/deployed-smoke-readiness.js +118 -23
- package/src/generators/slice/persistence-contract.js +2 -2
- package/src/generators/slice/pnpm-launch-script.d.ts +13 -0
- package/src/generators/slice/pnpm-launch-script.js +28 -0
- package/src/generators/slice/slice.js +27 -0
- package/src/generators/upgrade/custom-domain-notice.d.ts +19 -0
- package/src/generators/upgrade/custom-domain-notice.js +38 -0
- package/src/generators/upgrade/external-blueprint-compositions.d.ts +84 -0
- package/src/generators/upgrade/external-blueprint-compositions.js +478 -0
- package/src/generators/upgrade/framework-package-upgrade.d.ts +58 -0
- package/src/generators/upgrade/framework-package-upgrade.js +78 -0
- package/src/generators/upgrade/function-authentication-notice.d.ts +29 -0
- package/src/generators/upgrade/function-authentication-notice.js +74 -0
- package/src/generators/upgrade/schema.json +2 -2
- package/src/generators/upgrade/upgrade-plan.d.ts +52 -0
- package/src/generators/upgrade/upgrade-plan.js +406 -0
- package/src/generators/upgrade/upgrade.d.ts +1 -35
- package/src/generators/upgrade/upgrade.js +259 -593
- package/src/generators/workload/workload.js +60 -4
- package/src/git-policy/github-bootstrap.d.ts +6 -5
- package/src/git-policy/github-bootstrap.js +6 -4
- package/src/local-dev/fleet-process.d.ts +9 -2
- package/src/local-dev/fleet-process.js +27 -7
- package/src/local-dev/gateway-daemon.d.ts +1 -1
- package/src/local-dev/gateway-daemon.js +6 -4
- package/src/local-dev/portless.d.ts +5 -0
- package/src/local-dev/portless.js +5 -0
- package/src/local-dev/process-group.d.ts +10 -0
- package/src/local-dev/process-group.js +33 -0
- package/src/local-dev/tls.js +31 -2
- package/src/local-dev/trust-store.d.ts +42 -0
- package/src/local-dev/trust-store.js +87 -0
- package/src/ownership/composition.d.ts +7 -0
- package/src/ownership/composition.js +64 -56
- package/src/ownership/index.d.ts +1 -0
- package/src/ownership/index.js +1 -0
- package/src/ownership/record.d.ts +19 -0
- package/src/ownership/record.js +26 -2
- package/src/ownership/site-record.d.ts +18 -0
- package/src/ownership/site-record.js +105 -0
- package/src/repository-policy/deployment-plan.d.ts +3 -0
- package/src/repository-policy/deployment-plan.js +33 -4
- package/src/repository-policy/index.d.ts +1 -0
- package/src/repository-policy/index.js +1 -0
- package/src/repository-policy/policy.d.ts +13 -1
- package/src/repository-policy/policy.js +55 -1
- package/src/repository-policy/public-dns.d.ts +65 -0
- package/src/repository-policy/public-dns.js +168 -0
- package/src/schemas/generated-ownership-v2.json +6 -0
- package/src/schemas/repository-policy-v1.json +67 -1
- package/src/supply-chain/blueprint-trust-git.js +24 -0
- package/src/supply-chain/blueprint-verification-authority.js +21 -3
- package/src/supply-chain/generated-blueprint-trust-command.js +15 -0
- package/src/work-markers/work-markers.js +4 -1
- package/src/workspace-deployment/ownership.d.ts +15 -0
- package/src/workspace-deployment/ownership.js +19 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderConsumerSstConfig = renderConsumerSstConfig;
|
|
4
|
+
/** The managed sst.config.ts of a Next.js Foundation consumer. */
|
|
5
|
+
function renderConsumerSstConfig(input) {
|
|
6
|
+
const requiredKeys = input.requiredBuildKeys === undefined
|
|
7
|
+
? 'ebkNextBuildEnvironmentKeys'
|
|
8
|
+
: 'ebkRequiredNextBuildEnvironmentKeys';
|
|
9
|
+
const identityCheck = input.nameSourceIdentities
|
|
10
|
+
? ` const sourceCommit = resolved.EBK_SOURCE_COMMIT.trim();
|
|
11
|
+
const sourceTree = resolved.EBK_LOCAL_SOURCE_TREE.trim();
|
|
12
|
+
if (
|
|
13
|
+
!ebkSourceCommitPattern.test(sourceCommit) ||
|
|
14
|
+
!ebkSourceTreePattern.test(sourceTree)
|
|
15
|
+
) {
|
|
16
|
+
`
|
|
17
|
+
: ` if (
|
|
18
|
+
!ebkSourceCommitPattern.test(resolved.EBK_SOURCE_COMMIT.trim()) ||
|
|
19
|
+
!ebkSourceTreePattern.test(resolved.EBK_LOCAL_SOURCE_TREE.trim())
|
|
20
|
+
) {
|
|
21
|
+
`;
|
|
22
|
+
return `const ebkNextBuildEnvironmentKeys = new Set(${input.buildKeys});
|
|
23
|
+
|
|
24
|
+
${input.requiredBuildKeys === undefined
|
|
25
|
+
? ''
|
|
26
|
+
: `const ebkRequiredNextBuildEnvironmentKeys = ${input.requiredBuildKeys} as const;
|
|
27
|
+
|
|
28
|
+
`}\
|
|
29
|
+
const ebkLocalCommandResource = {
|
|
30
|
+
__pulumiType: 'command:local:Command',
|
|
31
|
+
} as unknown as new (
|
|
32
|
+
name: string,
|
|
33
|
+
args: { environment?: unknown; triggers?: unknown },
|
|
34
|
+
options?: unknown,
|
|
35
|
+
) => unknown;
|
|
36
|
+
|
|
37
|
+
const ebkSourceCommitPattern = /^(?:[a-f0-9]{40}|[a-f0-9]{64})$/;
|
|
38
|
+
const ebkSourceTreePattern = /^[a-f0-9]{64}$/;
|
|
39
|
+
|
|
40
|
+
function exactNextBuildEnvironment(value: unknown): Record<string, string> {
|
|
41
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
42
|
+
throw new Error('The Next build environment must resolve to one object.');
|
|
43
|
+
}
|
|
44
|
+
const environment = value as Record<string, unknown>;
|
|
45
|
+
const retained = Object.fromEntries(
|
|
46
|
+
Object.entries(environment)
|
|
47
|
+
.filter(([key]) => ebkNextBuildEnvironmentKeys.has(key))
|
|
48
|
+
.sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0)),
|
|
49
|
+
);
|
|
50
|
+
for (const key of ${requiredKeys}) {
|
|
51
|
+
if (typeof retained[key] !== 'string') {
|
|
52
|
+
throw new Error('The Next build environment omitted ' + key + '.');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return retained as Record<string, string>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// SST 4.17.1 installs its transform globals only while evaluating $config.run.
|
|
59
|
+
// Register there, before infrastructure construction, rather than at module
|
|
60
|
+
// load. The explicit ${input.buildCommandNoun} separately routes diff/refresh invokes
|
|
61
|
+
// through the wrapper.
|
|
62
|
+
function registerExactNextBuildEnvironmentTransform(): void {
|
|
63
|
+
$transform(
|
|
64
|
+
ebkLocalCommandResource,
|
|
65
|
+
(
|
|
66
|
+
args: { environment?: unknown; triggers?: unknown },
|
|
67
|
+
_options: unknown,
|
|
68
|
+
resourceName: string,
|
|
69
|
+
) => {
|
|
70
|
+
if (resourceName !== '${input.builderLogicalName}') return;
|
|
71
|
+
const unresolvedEnvironment = args.environment as Record<
|
|
72
|
+
string,
|
|
73
|
+
unknown
|
|
74
|
+
>;
|
|
75
|
+
const resolveEnvironment = (environment: Record<string, unknown>) => {
|
|
76
|
+
const resolved = exactNextBuildEnvironment({
|
|
77
|
+
...environment,
|
|
78
|
+
CI: 'true',
|
|
79
|
+
NEXT_TELEMETRY_DISABLED: '1',
|
|
80
|
+
});
|
|
81
|
+
${identityCheck}\
|
|
82
|
+
throw new Error(
|
|
83
|
+
'The Next builder requires exact EBK commit and working-tree identities.',
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return resolved;
|
|
87
|
+
};
|
|
88
|
+
args.environment = $output(unresolvedEnvironment).apply(
|
|
89
|
+
resolveEnvironment,
|
|
90
|
+
);
|
|
91
|
+
// Preserve SST's native per-invocation build trigger.${input.buildTriggerNote}
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export default $config({
|
|
97
|
+
app(input: { stage?: string } | undefined) {
|
|
98
|
+
const stage = input?.stage ?? 'development';
|
|
99
|
+
const production = input?.stage === 'production';
|
|
100
|
+
return {
|
|
101
|
+
name: '${input.appName}',
|
|
102
|
+
removal: production ? 'retain' : 'remove',
|
|
103
|
+
protect: production,
|
|
104
|
+
home: 'aws',
|
|
105
|
+
providers: {
|
|
106
|
+
aws: {
|
|
107
|
+
defaultTags: {
|
|
108
|
+
// SST contributes sst:app and sst:stage. Keep the provider baseline
|
|
109
|
+
// at eight tags so generated S3 asset objects remain within AWS's
|
|
110
|
+
// hard ten-tag object limit.${input.tagBaselineNote}
|
|
111
|
+
tags: {
|
|
112
|
+
'ebk:cost-allocation': 'unallocated',
|
|
113
|
+
'ebk:cost-scope': '${input.workspace}/${input.appName}/' + stage,
|
|
114
|
+
'ebk:framework-version': '${input.frameworkVersion}',
|
|
115
|
+
'ebk:managed-by': 'empire-builder-kit',
|
|
116
|
+
'ebk:owner': '${input.appName}-product',
|
|
117
|
+
'ebk:slice': '${input.appName}',
|
|
118
|
+
'ebk:stage': stage,
|
|
119
|
+
'ebk:workspace': '${input.workspace}',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
region: process.env.AWS_REGION ?? 'us-east-1',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
async run() {
|
|
128
|
+
${input.stageGuard}\
|
|
129
|
+
const {
|
|
130
|
+
installLambdaPolicyWriteOrdering,
|
|
131
|
+
installStageIamBoundaryTransforms,
|
|
132
|
+
} = await import('@empire-builder-kit/nx/aws-authority');
|
|
133
|
+
registerExactNextBuildEnvironmentTransform();
|
|
134
|
+
const accountId = process.env.AWS_EXPECTED_ACCOUNT_ID?.trim() ?? '';
|
|
135
|
+
if (!/^[0-9]{12}$/.test(accountId)) {
|
|
136
|
+
throw new Error(
|
|
137
|
+
'${input.boundarySubject} IAM boundary injection requires AWS_EXPECTED_ACCOUNT_ID.',
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
installStageIamBoundaryTransforms({
|
|
141
|
+
accountId,
|
|
142
|
+
instanceProfileResource: aws.iam.InstanceProfile,
|
|
143
|
+
registerTransform: $transform,
|
|
144
|
+
roleResource: aws.iam.Role,
|
|
145
|
+
resourceStage: $app.stage,
|
|
146
|
+
stage: ${input.boundaryStage},
|
|
147
|
+
});
|
|
148
|
+
// Order Function URL and Lambda permission policy writes before any
|
|
149
|
+
// resource registers; the pinned providers otherwise race them.
|
|
150
|
+
installLambdaPolicyWriteOrdering({
|
|
151
|
+
mergeOptions: $util.mergeOptions,
|
|
152
|
+
registerStackTransformation: $util.runtime.registerStackTransformation,
|
|
153
|
+
});
|
|
154
|
+
const { app } = await import('./infra/index.js');
|
|
155
|
+
return ${input.runEntry};
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
`;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=built-in-plan-sst-config.js.map
|
|
@@ -5,6 +5,8 @@ const built_in_plan_shared_js_1 = require("./built-in-plan-shared.js");
|
|
|
5
5
|
const local_source_identity_js_1 = require("./local-source-identity.js");
|
|
6
6
|
const built_in_plan_testing_persistence_files_js_1 = require("./built-in-plan-testing-persistence-files.js");
|
|
7
7
|
const deployed_smoke_readiness_js_1 = require("./deployed-smoke-readiness.js");
|
|
8
|
+
const deployed_smoke_diagnostics_js_1 = require("./deployed-smoke-diagnostics.js");
|
|
9
|
+
const pnpm_launch_script_js_1 = require("./pnpm-launch-script.js");
|
|
8
10
|
/** @internal */
|
|
9
11
|
function renderProductTestingFiles(name, pascalName, sql = false) {
|
|
10
12
|
return {
|
|
@@ -74,8 +76,12 @@ The runner creates one run-scoped synthetic customer in the Slice's narrow
|
|
|
74
76
|
\`<slice>-admin\`. It never grants the customer administrator authority, strips
|
|
75
77
|
AWS credentials from the browser child, observes the published event only from
|
|
76
78
|
the credential-bearing parent, removes both principals and all raw browser and
|
|
77
|
-
log state, and retains only allowlisted sanitized evidence. A failed
|
|
78
|
-
the
|
|
79
|
+
log state, and retains only allowlisted sanitized evidence. A failed browser
|
|
80
|
+
run also keeps the last 4 KiB of its output, with every synthetic credential
|
|
81
|
+
and email replaced, as private local
|
|
82
|
+
\`.ebk/evidence/playwright-smoke-output-<attempt>.txt\`; the hosted workflow
|
|
83
|
+
does not upload it. A failed smoke ends the lifecycle immediately and no
|
|
84
|
+
successful deployment receipt is written.
|
|
79
85
|
|
|
80
86
|
One optional evidence-level retry replays the complete, identical browser or
|
|
81
87
|
live-integration proof. Consequently \`counts.retried\` is always zero or one.
|
|
@@ -1311,9 +1317,12 @@ import {
|
|
|
1311
1317
|
import { spawnSync } from 'node:child_process';
|
|
1312
1318
|
import { createHash, randomBytes, randomUUID } from 'node:crypto';
|
|
1313
1319
|
import {
|
|
1320
|
+
closeSync,
|
|
1314
1321
|
existsSync,
|
|
1315
1322
|
mkdirSync,
|
|
1323
|
+
openSync,
|
|
1316
1324
|
readFileSync,
|
|
1325
|
+
readSync,
|
|
1317
1326
|
rmSync,
|
|
1318
1327
|
statSync,
|
|
1319
1328
|
writeFileSync,
|
|
@@ -1419,6 +1428,11 @@ const rawPath = (attempt) =>
|
|
|
1419
1428
|
join(rawRoot, 'playwright-smoke-' + attempt + '.json');
|
|
1420
1429
|
const dataCleanupPath = (attempt) =>
|
|
1421
1430
|
join(rawRoot, 'data-cleanup-' + attempt + '.json');
|
|
1431
|
+
const playwrightOutputTailPath = (attempt) =>
|
|
1432
|
+
join(evidenceRoot, 'playwright-smoke-output-' + attempt + '.txt');
|
|
1433
|
+
for (const attempt of [1, 2]) {
|
|
1434
|
+
rmSync(playwrightOutputTailPath(attempt), { force: true });
|
|
1435
|
+
}
|
|
1422
1436
|
const source = {
|
|
1423
1437
|
blueprintCandidates: [
|
|
1424
1438
|
ownership.blueprint.name + '@' + ownership.blueprint.version,
|
|
@@ -1558,6 +1572,8 @@ function permissionFailure(error, operation, authority = 'Cognito principal') {
|
|
|
1558
1572
|
};
|
|
1559
1573
|
}
|
|
1560
1574
|
|
|
1575
|
+
${deployed_smoke_diagnostics_js_1.deployedSmokeOwnershipFindingFunctions}
|
|
1576
|
+
${deployed_smoke_diagnostics_js_1.playwrightOutputTailFunctions}
|
|
1561
1577
|
function isCognitoUserAbsent(error) {
|
|
1562
1578
|
return (
|
|
1563
1579
|
error &&
|
|
@@ -1725,6 +1741,7 @@ function requiresScheduledDeliveryObservation(stage) {
|
|
|
1725
1741
|
return ['development', 'staging', 'production'].includes(stage);
|
|
1726
1742
|
}
|
|
1727
1743
|
|
|
1744
|
+
${pnpm_launch_script_js_1.pnpmLaunchFunction}
|
|
1728
1745
|
// A successful browser journey may have deleted its synthetic record, while
|
|
1729
1746
|
// its mutation receipt remains. Replaying that same journey/run scope cannot
|
|
1730
1747
|
// recreate the record, even when the first cleanup completed successfully.
|
|
@@ -1857,7 +1874,8 @@ if (
|
|
|
1857
1874
|
!url ||
|
|
1858
1875
|
!apiUrl ||
|
|
1859
1876
|
normalizedProductPath !== expectedProductPath ||
|
|
1860
|
-
|
|
1877
|
+
// A bound Slice API is mapped under /<slice> on the Foundation's api.<root>.
|
|
1878
|
+
!['/', expectedProductPath].includes(apiUrl.pathname.replace(/\\/$/, '') || '/') ||
|
|
1861
1879
|
!validIdentity ||
|
|
1862
1880
|
!validSourceCommit ||
|
|
1863
1881
|
!validRunId ||
|
|
@@ -1873,6 +1891,7 @@ if (
|
|
|
1873
1891
|
);
|
|
1874
1892
|
}
|
|
1875
1893
|
if (process.exitCode === undefined) {
|
|
1894
|
+
let ownershipFailure;
|
|
1876
1895
|
try {
|
|
1877
1896
|
const ownership = await assertWorkspaceStageOwnershipForWorkspace(workspaceRoot, stage, {
|
|
1878
1897
|
...(process.env.AWS_PROFILE ? { profile: process.env.AWS_PROFILE } : {}),
|
|
@@ -1881,14 +1900,12 @@ if (process.exitCode === undefined) {
|
|
|
1881
1900
|
? { credentialsFilepath: process.env.AWS_SHARED_CREDENTIALS_FILE }
|
|
1882
1901
|
: {}),
|
|
1883
1902
|
});
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
'Deployed smoke requires this workspace to own the exact account, Region, and canonical stage tuple.',
|
|
1891
|
-
);
|
|
1903
|
+
ownershipFailure = ownershipRegionFinding(ownership, process.env.AWS_REGION);
|
|
1904
|
+
} catch (error) {
|
|
1905
|
+
ownershipFailure = ownershipErrorFinding(error);
|
|
1906
|
+
}
|
|
1907
|
+
if (ownershipFailure) {
|
|
1908
|
+
failPreflight(ownershipFailure.classification, ownershipFailure.summary);
|
|
1892
1909
|
}
|
|
1893
1910
|
}
|
|
1894
1911
|
if (process.exitCode === undefined) {
|
|
@@ -2085,8 +2102,12 @@ if (process.exitCode === undefined) {
|
|
|
2085
2102
|
if (process.exitCode !== undefined) {
|
|
2086
2103
|
rmSync(rawRoot, { force: true, recursive: true });
|
|
2087
2104
|
} else {
|
|
2088
|
-
const
|
|
2089
|
-
|
|
2105
|
+
const playwright = pnpmLaunch([
|
|
2106
|
+
'exec',
|
|
2107
|
+
'playwright',
|
|
2108
|
+
'test',
|
|
2109
|
+
'--reporter=json',
|
|
2110
|
+
]);
|
|
2090
2111
|
const executeAttempt = async (attempt) => {
|
|
2091
2112
|
const attemptStartedAt = new Date().toISOString();
|
|
2092
2113
|
const path = rawPath(attempt);
|
|
@@ -2095,6 +2116,7 @@ if (process.exitCode === undefined) {
|
|
|
2095
2116
|
'event-observation-' + attempt + '.json',
|
|
2096
2117
|
);
|
|
2097
2118
|
const cleanupPath = dataCleanupPath(attempt);
|
|
2119
|
+
const outputPath = join(rawRoot, 'playwright-output-' + attempt + '.log');
|
|
2098
2120
|
rmSync(observationPath, { force: true });
|
|
2099
2121
|
rmSync(cleanupPath, { force: true });
|
|
2100
2122
|
let dataCleanup = {
|
|
@@ -2135,34 +2157,41 @@ if (process.exitCode === undefined) {
|
|
|
2135
2157
|
typeof value === 'string',
|
|
2136
2158
|
),
|
|
2137
2159
|
);
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
+
// Output goes to a private raw file, not a pipe, so its size can
|
|
2161
|
+
// never stop the run; only a failed run keeps its scrubbed tail.
|
|
2162
|
+
const output = openSync(outputPath, 'w', 0o600);
|
|
2163
|
+
try {
|
|
2164
|
+
execution = spawnSync(
|
|
2165
|
+
playwright.command,
|
|
2166
|
+
playwright.args,
|
|
2167
|
+
{
|
|
2168
|
+
cwd: projectRoot,
|
|
2169
|
+
encoding: 'utf8',
|
|
2170
|
+
env: {
|
|
2171
|
+
...childEnvironment,
|
|
2172
|
+
EBK_SOURCE_COMMIT: deployedSourceCommit,
|
|
2173
|
+
EBK_STAGE: stage,
|
|
2174
|
+
EBK_SMOKE_API_URL: apiUrl.href,
|
|
2175
|
+
EBK_SMOKE_DATA_CLEANUP_PATH: cleanupPath,
|
|
2176
|
+
EBK_SMOKE_EMAIL: principalEmail,
|
|
2177
|
+
EBK_FRONTEND_SECURITY_PROFILE: 'deployed-https',
|
|
2178
|
+
EBK_SMOKE_PASSWORD: principalPassword,
|
|
2179
|
+
EBK_SMOKE_REVIEWER_EMAIL: reviewerEmail,
|
|
2180
|
+
EBK_SMOKE_REVIEWER_PASSWORD: reviewerPassword,
|
|
2181
|
+
EBK_SMOKE_OBSERVATION_PATH: observationPath,
|
|
2182
|
+
EBK_SMOKE_URL: url.href,
|
|
2183
|
+
EBK_TEST_RUN_ID: runId,
|
|
2184
|
+
EBK_TEST_SEED: seed,
|
|
2185
|
+
PLAYWRIGHT_JSON_OUTPUT_NAME: path,
|
|
2186
|
+
},
|
|
2187
|
+
shell: false,
|
|
2188
|
+
stdio: ['ignore', output, output],
|
|
2189
|
+
windowsHide: true,
|
|
2160
2190
|
},
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
);
|
|
2191
|
+
);
|
|
2192
|
+
} finally {
|
|
2193
|
+
closeSync(output);
|
|
2194
|
+
}
|
|
2166
2195
|
if (existsSync(path)) {
|
|
2167
2196
|
try {
|
|
2168
2197
|
const reportContents = readBoundedUtf8(
|
|
@@ -2261,20 +2290,34 @@ if (process.exitCode === undefined) {
|
|
|
2261
2290
|
observationFinding ? 1 : 0,
|
|
2262
2291
|
reportPolicyFinding ? 1 : 0,
|
|
2263
2292
|
);
|
|
2293
|
+
const outputTailKept =
|
|
2294
|
+
runnerFailed > 0 &&
|
|
2295
|
+
retainPlaywrightOutputTail(outputPath, playwrightOutputTailPath(attempt), [
|
|
2296
|
+
principalPassword,
|
|
2297
|
+
reviewerPassword,
|
|
2298
|
+
principalEmail,
|
|
2299
|
+
reviewerEmail,
|
|
2300
|
+
]);
|
|
2301
|
+
rmSync(outputPath, { force: true });
|
|
2264
2302
|
return {
|
|
2265
2303
|
attempt,
|
|
2266
2304
|
completedAt: new Date().toISOString(),
|
|
2267
2305
|
dataCleanup,
|
|
2268
2306
|
diagnostic:
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2307
|
+
[
|
|
2308
|
+
(reportInvalid
|
|
2309
|
+
? 'Playwright emitted malformed machine-readable output.'
|
|
2310
|
+
: undefined) ||
|
|
2311
|
+
(reportCredentialLeak
|
|
2312
|
+
? 'Playwright output contained the synthetic principal credential and was removed.'
|
|
2313
|
+
: undefined) ||
|
|
2314
|
+
(execution?.error
|
|
2315
|
+
? 'The Playwright process could not start.'
|
|
2316
|
+
: playwrightFailureDiagnostic(report)),
|
|
2317
|
+
outputTailKept ? playwrightOutputTailNote : undefined,
|
|
2318
|
+
]
|
|
2319
|
+
.filter(Boolean)
|
|
2320
|
+
.join(' ') || undefined,
|
|
2278
2321
|
failed,
|
|
2279
2322
|
artifactSensitive: reportCredentialLeak,
|
|
2280
2323
|
observationFindings: observationFinding
|
|
@@ -79,7 +79,11 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
79
79
|
);
|
|
80
80
|
writeDataCleanupOutcome(dataCleanupPath, 'not-required');
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
// A bound Slice API is mapped under /<slice> on api.<root>: join each
|
|
83
|
+
// operation path onto apiUrl, never resolve an absolute path against it.
|
|
84
|
+
const publicHealth = await page.request.get(
|
|
85
|
+
productEndpoint(apiUrl, '/health'),
|
|
86
|
+
);
|
|
83
87
|
expect(publicHealth.status()).toBe(200);
|
|
84
88
|
await expect(publicHealth.json()).resolves.toMatchObject({
|
|
85
89
|
data: {
|
|
@@ -121,8 +125,13 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
121
125
|
data: { message: 'Authenticated request accepted.' },
|
|
122
126
|
});
|
|
123
127
|
|
|
128
|
+
// Generated auth routes accept only JSON from their own origin.
|
|
129
|
+
const sameOriginJson = {
|
|
130
|
+
headers: { 'content-type': 'application/json', origin: productUrl.origin },
|
|
131
|
+
};
|
|
124
132
|
const refreshResponse = await page.request.post(
|
|
125
133
|
productEndpoint(productUrl, '/api/auth/refresh'),
|
|
134
|
+
sameOriginJson,
|
|
126
135
|
);
|
|
127
136
|
expect(refreshResponse.status()).toBe(200);
|
|
128
137
|
await expect(refreshResponse.json()).resolves.toEqual({ ok: true });
|
|
@@ -145,7 +154,7 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
145
154
|
};
|
|
146
155
|
|
|
147
156
|
const databaseResponse = await page.request.get(
|
|
148
|
-
|
|
157
|
+
productEndpoint(apiUrl, '/database-health'),
|
|
149
158
|
{ headers: authenticatedHeaders },
|
|
150
159
|
);
|
|
151
160
|
expect(databaseResponse.status()).toBe(200);
|
|
@@ -154,7 +163,7 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
154
163
|
});
|
|
155
164
|
|
|
156
165
|
const recordId = runRecordId(runScope);
|
|
157
|
-
const recordUrl =
|
|
166
|
+
const recordUrl = productEndpoint(apiUrl, '/records/' + recordId);
|
|
158
167
|
const testExpiresAt = new Date(Date.now() + 24 * 60 * 60 * 1_000)
|
|
159
168
|
.toISOString();
|
|
160
169
|
let recordCleanupRequired = false;
|
|
@@ -216,6 +225,7 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
216
225
|
|
|
217
226
|
await page.request.post(
|
|
218
227
|
productEndpoint(productUrl, '/api/auth/sign-out'),
|
|
228
|
+
sameOriginJson,
|
|
219
229
|
);
|
|
220
230
|
await page.goto(productUrl.href);
|
|
221
231
|
await page.getByRole('link', { name: 'Sign in' }).click();
|
|
@@ -256,7 +266,7 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
256
266
|
});
|
|
257
267
|
|
|
258
268
|
const eventResponse = await page.request.post(
|
|
259
|
-
|
|
269
|
+
productEndpoint(apiUrl, '/events/example'),
|
|
260
270
|
{ headers: authenticatedHeaders },
|
|
261
271
|
);
|
|
262
272
|
expect(eventResponse.status()).toBe(200);
|
|
@@ -344,6 +354,7 @@ test('proves the deployed product, auth, database, and event journey', async ({
|
|
|
344
354
|
|
|
345
355
|
const signOutResponse = await page.request.post(
|
|
346
356
|
productEndpoint(productUrl, '/api/auth/sign-out'),
|
|
357
|
+
sameOriginJson,
|
|
347
358
|
);
|
|
348
359
|
expect(signOutResponse.status()).toBe(200);
|
|
349
360
|
await expect(signOutResponse.json()).resolves.toEqual({ ok: true });
|
|
@@ -320,12 +320,66 @@ export default function PasswordReset() {
|
|
|
320
320
|
<button type="submit">Send reset code</button></form><p role="status">{message}</p>
|
|
321
321
|
</div></main>;
|
|
322
322
|
}
|
|
323
|
+
`,
|
|
324
|
+
'web/src/lib/same-origin-request.ts': `import 'server-only';
|
|
325
|
+
|
|
326
|
+
// State-changing auth routes accept only same-origin JSON. application/json is
|
|
327
|
+
// not a CORS-safelisted type, so a browser cannot send it cross-origin without
|
|
328
|
+
// a preflight that these routes never approve. Fetch Metadata, or Origin when
|
|
329
|
+
// a browser omits it, then binds the request to this exact origin, which also
|
|
330
|
+
// refuses sibling hosts that share the site and its SameSite=Strict cookies.
|
|
331
|
+
|
|
332
|
+
const noStore = { 'cache-control': 'no-store' };
|
|
333
|
+
|
|
334
|
+
function refusal(status: 403 | 415, code: string, message: string): Response {
|
|
335
|
+
return Response.json({ ok: false, error: { code, message } }, { status, headers: noStore });
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// The public origin of this request. The EBK Router and the local Fleet proxy
|
|
339
|
+
// overwrite x-forwarded-host with the viewer's Host; the Host header behind
|
|
340
|
+
// the Router names the server's own URL. Secure-cookie stages are HTTPS-only.
|
|
341
|
+
function requestOrigin(request: Request): string | null {
|
|
342
|
+
const host = request.headers.get('x-forwarded-host')?.toLowerCase();
|
|
343
|
+
if (!host || host.includes(',')) return null;
|
|
344
|
+
const forwardedProto = request.headers.get('x-forwarded-proto');
|
|
345
|
+
const secure = process.env.EBK_SECURE_COOKIES === 'true' || process.env.NODE_ENV === 'production';
|
|
346
|
+
const scheme = secure ? 'https'
|
|
347
|
+
: forwardedProto === 'http' || forwardedProto === 'https' ? forwardedProto : null;
|
|
348
|
+
if (!scheme) return null;
|
|
349
|
+
try {
|
|
350
|
+
const origin = new URL(scheme + '://' + host);
|
|
351
|
+
return origin.host === host ? origin.origin : null;
|
|
352
|
+
} catch {
|
|
353
|
+
return null;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/** Returns the refusal for a request that is not same-origin JSON, else null. */
|
|
358
|
+
export function refuseUnlessSameOriginJson(request: Request): Response | null {
|
|
359
|
+
const mediaType = request.headers.get('content-type')?.split(';', 1)[0]?.trim().toLowerCase();
|
|
360
|
+
if (mediaType !== 'application/json')
|
|
361
|
+
return refusal(415, 'unsupported_media_type', 'Content-Type application/json is required.');
|
|
362
|
+
const fetchSite = request.headers.get('sec-fetch-site');
|
|
363
|
+
if (fetchSite !== null) {
|
|
364
|
+
return fetchSite === 'same-origin'
|
|
365
|
+
? null
|
|
366
|
+
: refusal(403, 'cross_origin_refused', 'Only same-origin requests are accepted.');
|
|
367
|
+
}
|
|
368
|
+
const origin = request.headers.get('origin');
|
|
369
|
+
if (origin !== null && origin !== requestOrigin(request))
|
|
370
|
+
return refusal(403, 'cross_origin_refused', 'Only same-origin requests are accepted.');
|
|
371
|
+
// Neither header: a non-browser client. Every browser that can send this
|
|
372
|
+
// JSON request cross-origin sends Origin with it; other clients can forge
|
|
373
|
+
// both headers and carry no ambient session cookies.
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
323
376
|
`,
|
|
324
377
|
'web/src/app/api/auth/sign-in/route.ts': `import 'server-only';
|
|
325
378
|
import { InitiateAuthCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
326
379
|
import { createSessionTokenCookiePlan } from '@empire-builder-kit/runtime/auth-session';
|
|
327
380
|
import { cookies } from 'next/headers';
|
|
328
381
|
import { NextResponse } from 'next/server';
|
|
382
|
+
import { refuseUnlessSameOriginJson } from '../../../../lib/same-origin-request';
|
|
329
383
|
import { observeNextOperation } from '../../../../lib/server-logging';
|
|
330
384
|
|
|
331
385
|
const cognito = new CognitoIdentityProviderClient({});
|
|
@@ -336,6 +390,8 @@ export async function POST(request: Request) {
|
|
|
336
390
|
operation: 'sign-in',
|
|
337
391
|
request,
|
|
338
392
|
async handle() {
|
|
393
|
+
const refused = refuseUnlessSameOriginJson(request);
|
|
394
|
+
if (refused) return refused;
|
|
339
395
|
const body = await request.json() as { email?: string; password?: string };
|
|
340
396
|
if (!body.email || !body.password) return NextResponse.json({ ok: false }, { status: 400 });
|
|
341
397
|
const result = await cognito.send(new InitiateAuthCommand({
|
|
@@ -362,6 +418,7 @@ import { InitiateAuthCommand, CognitoIdentityProviderClient } from '@aws-sdk/cli
|
|
|
362
418
|
import { createSessionTokenCookiePlan, getSessionTokenCookieNames } from '@empire-builder-kit/runtime/auth-session';
|
|
363
419
|
import { cookies } from 'next/headers';
|
|
364
420
|
import { NextResponse } from 'next/server';
|
|
421
|
+
import { refuseUnlessSameOriginJson } from '../../../../lib/same-origin-request';
|
|
365
422
|
import { observeNextOperation } from '../../../../lib/server-logging';
|
|
366
423
|
|
|
367
424
|
const cognito = new CognitoIdentityProviderClient({});
|
|
@@ -372,6 +429,8 @@ export async function POST(request: Request) {
|
|
|
372
429
|
operation: 'refresh-session',
|
|
373
430
|
request,
|
|
374
431
|
async handle() {
|
|
432
|
+
const refused = refuseUnlessSameOriginJson(request);
|
|
433
|
+
if (refused) return refused;
|
|
375
434
|
const store = await cookies();
|
|
376
435
|
const secure = process.env.EBK_SECURE_COOKIES === 'true' || process.env.NODE_ENV === 'production';
|
|
377
436
|
const names = getSessionTokenCookieNames({ namespace: '${name}', secure });
|
|
@@ -397,6 +456,7 @@ export async function POST(request: Request) {
|
|
|
397
456
|
import { createSessionTokenCookieDeletionPlan } from '@empire-builder-kit/runtime/auth-session';
|
|
398
457
|
import { cookies } from 'next/headers';
|
|
399
458
|
import { NextResponse } from 'next/server';
|
|
459
|
+
import { refuseUnlessSameOriginJson } from '../../../../lib/same-origin-request';
|
|
400
460
|
import { observeNextOperation } from '../../../../lib/server-logging';
|
|
401
461
|
|
|
402
462
|
export async function POST(request: Request) {
|
|
@@ -405,6 +465,8 @@ export async function POST(request: Request) {
|
|
|
405
465
|
operation: 'sign-out',
|
|
406
466
|
request,
|
|
407
467
|
async handle() {
|
|
468
|
+
const refused = refuseUnlessSameOriginJson(request);
|
|
469
|
+
if (refused) return refused;
|
|
408
470
|
const store = await cookies();
|
|
409
471
|
const secure = process.env.EBK_SECURE_COOKIES === 'true' || process.env.NODE_ENV === 'production';
|
|
410
472
|
for (const { name, value, ...options } of createSessionTokenCookieDeletionPlan({
|
|
@@ -419,6 +481,7 @@ export async function POST(request: Request) {
|
|
|
419
481
|
'web/src/app/api/auth/password-reset/route.ts': `import 'server-only';
|
|
420
482
|
import { ForgotPasswordCommand, CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider';
|
|
421
483
|
import { NextResponse } from 'next/server';
|
|
484
|
+
import { refuseUnlessSameOriginJson } from '../../../../lib/same-origin-request';
|
|
422
485
|
import { observeNextOperation } from '../../../../lib/server-logging';
|
|
423
486
|
|
|
424
487
|
const cognito = new CognitoIdentityProviderClient({});
|
|
@@ -428,6 +491,8 @@ export async function POST(request: Request) {
|
|
|
428
491
|
operation: 'password-reset',
|
|
429
492
|
request,
|
|
430
493
|
async handle() {
|
|
494
|
+
const refused = refuseUnlessSameOriginJson(request);
|
|
495
|
+
if (refused) return refused;
|
|
431
496
|
const body = await request.json() as { email?: string };
|
|
432
497
|
if (body.email) await cognito.send(new ForgotPasswordCommand({
|
|
433
498
|
ClientId: process.env.AUTH_CLIENT_ID, Username: body.email,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated diagnostic functions for the Slice deployed smoke runner,
|
|
3
|
+
* `scripts/run-smoke-deployed.mjs`. Each constant is JavaScript source the
|
|
4
|
+
* runner template embeds; the runner supplies the free identifiers named in
|
|
5
|
+
* each comment.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* `ownershipRegionFinding(ownership, region)` and
|
|
9
|
+
* `ownershipErrorFinding(error)` classify the workspace stage ownership
|
|
10
|
+
* preflight. Only an owner mismatch or an access-denied error is
|
|
11
|
+
* `authorization-denied`; a missing credential source or a Region mismatch is
|
|
12
|
+
* `prerequisite-missing`, and anything else is `infrastructure-unavailable`.
|
|
13
|
+
* Summaries never carry a bare account id or another workspace's identity;
|
|
14
|
+
* the shared sanitizer withholds any cause matching a protected shape.
|
|
15
|
+
*
|
|
16
|
+
* Free identifier: `sanitizeTestingEvidenceSummary`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const deployedSmokeOwnershipFindingFunctions: string;
|
|
19
|
+
/**
|
|
20
|
+
* `retainPlaywrightOutputTail(outputPath, tailPath, secrets)` keeps at most
|
|
21
|
+
* the last 4 KiB of a failed Playwright run's combined output at `tailPath`
|
|
22
|
+
* (mode 0600). Every verbatim or URI-encoded occurrence of a known synthetic
|
|
23
|
+
* credential or email inside the bytes read, overlapping ones merged, and any
|
|
24
|
+
* bare account id is replaced before the cut; other encodings are not
|
|
25
|
+
* recognized. A secret that started before the bytes read, a
|
|
26
|
+
* split account id or a split character can only sit before the first line
|
|
27
|
+
* break after a cut, so a cut tail keeps only whole lines; a secret holding
|
|
28
|
+
* a line break withholds the tail. Output that still matches a protected
|
|
29
|
+
* shape is withheld. It removes `outputPath` and returns whether a tail was
|
|
30
|
+
* kept.
|
|
31
|
+
*
|
|
32
|
+
* Free identifiers: `closeSync`, `inspectTestingEvidenceArtifact`,
|
|
33
|
+
* `openSync`, `readSync`, `rmSync`, `statSync`, `writeFileSync`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const playwrightOutputTailFunctions: string;
|