@empire-builder-kit/nx 1.0.0-rc.13 → 1.0.0-rc.17

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.
Files changed (215) hide show
  1. package/executors.json +10 -0
  2. package/package.json +3 -3
  3. package/src/cli/output.js +1 -1
  4. package/src/developer-agent/model.js +4 -4
  5. package/src/developer-agent/model.js.map +1 -1
  6. package/src/developer-agent/operation-registry.js +53 -8
  7. package/src/developer-agent/operation-registry.js.map +1 -1
  8. package/src/developer-agent/planning.js +7 -9
  9. package/src/developer-agent/planning.js.map +1 -1
  10. package/src/developer-agent/workspace-inspection.js +12 -0
  11. package/src/developer-agent/workspace-inspection.js.map +1 -1
  12. package/src/executors/deployment-plan/deployment-plan.js +5 -0
  13. package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
  14. package/src/executors/foundation-preflight/foundation-preflight.d.ts +2 -0
  15. package/src/executors/foundation-preflight/foundation-preflight.js +6 -2
  16. package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
  17. package/src/executors/foundation-preflight/schema.json +10 -0
  18. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +2 -0
  19. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +2 -1
  20. package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
  21. package/src/executors/foundation-profile-preflight/schema.json +19 -3
  22. package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
  23. package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
  24. package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +229 -5
  25. package/src/executors/infrastructure-plan/infrastructure-plan.js +2298 -175
  26. package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
  27. package/src/executors/infrastructure-plan/schema.json +16 -0
  28. package/src/executors/local-deploy/fixtures/local-deploy-state-machine.mjs +53 -0
  29. package/src/executors/local-deploy/local-approval.d.ts +23 -0
  30. package/src/executors/local-deploy/local-approval.js +43 -0
  31. package/src/executors/local-deploy/local-approval.js.map +1 -0
  32. package/src/executors/local-deploy/local-deploy.d.ts +69 -0
  33. package/src/executors/local-deploy/local-deploy.js +911 -0
  34. package/src/executors/local-deploy/local-deploy.js.map +1 -0
  35. package/src/executors/local-deploy/schema.json +42 -0
  36. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +3 -0
  37. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +94 -0
  38. package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -0
  39. package/src/executors/router-waf-rehearsal/schema.json +9 -0
  40. package/src/executors/secret-metadata/schema.json +5 -0
  41. package/src/executors/secret-metadata/secret-metadata.d.ts +12 -1
  42. package/src/executors/secret-metadata/secret-metadata.js +68 -16
  43. package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
  44. package/src/executors/sst-lifecycle/logging-preflight.d.ts +5 -0
  45. package/src/executors/sst-lifecycle/logging-preflight.js +23 -13
  46. package/src/executors/sst-lifecycle/logging-preflight.js.map +1 -1
  47. package/src/executors/sst-lifecycle/run-sst-command.d.ts +8 -1
  48. package/src/executors/sst-lifecycle/run-sst-command.js +144 -12
  49. package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
  50. package/src/executors/sst-lifecycle/schema.json +13 -1
  51. package/src/executors/sst-lifecycle/sst-environment-source.d.ts +25 -0
  52. package/src/executors/sst-lifecycle/sst-environment-source.js +213 -0
  53. package/src/executors/sst-lifecycle/sst-environment-source.js.map +1 -0
  54. package/src/foundation/index.d.ts +2 -0
  55. package/src/foundation/index.js +2 -0
  56. package/src/foundation/index.js.map +1 -1
  57. package/src/foundation/logging-preflight.js +1 -1
  58. package/src/foundation/logging-preflight.js.map +1 -1
  59. package/src/foundation/logging.d.ts +3 -1
  60. package/src/foundation/logging.js +1 -1
  61. package/src/foundation/logging.js.map +1 -1
  62. package/src/foundation/partial-state.d.ts +10 -0
  63. package/src/foundation/partial-state.js +21 -0
  64. package/src/foundation/partial-state.js.map +1 -0
  65. package/src/foundation/router-waf.d.ts +98 -0
  66. package/src/foundation/router-waf.js +401 -0
  67. package/src/foundation/router-waf.js.map +1 -0
  68. package/src/generators/function/function.js +2 -1
  69. package/src/generators/function/function.js.map +1 -1
  70. package/src/generators/preset/generator.js +23 -3
  71. package/src/generators/preset/generator.js.map +1 -1
  72. package/src/generators/preset/schema.d.ts +7 -0
  73. package/src/generators/preset/schema.json +47 -0
  74. package/src/generators/preset/workspace-files-ci-acceptance.js +176 -36
  75. package/src/generators/preset/workspace-files-ci-acceptance.js.map +1 -1
  76. package/src/generators/preset/workspace-files-developer-agent.d.ts +2 -0
  77. package/src/generators/preset/workspace-files-developer-agent.js +25 -11
  78. package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
  79. package/src/generators/preset/workspace-files-foundation-workload-roles.js +5 -2
  80. package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +1 -1
  81. package/src/generators/preset/workspace-files-workload-role-baseline.js +254 -42
  82. package/src/generators/preset/workspace-files-workload-role-baseline.js.map +1 -1
  83. package/src/generators/preset/workspace-files.d.ts +5 -1
  84. package/src/generators/preset/workspace-files.js +788 -49
  85. package/src/generators/preset/workspace-files.js.map +1 -1
  86. package/src/generators/repository-policy/repository-policy.js +65 -3
  87. package/src/generators/repository-policy/repository-policy.js.map +1 -1
  88. package/src/generators/repository-policy/schema.d.ts +6 -0
  89. package/src/generators/repository-policy/schema.json +46 -0
  90. package/src/generators/slice/built-in-plan-api-files.js +2 -1
  91. package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
  92. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +18 -0
  93. package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
  94. package/src/generators/slice/built-in-plan-data-files.js +16 -5
  95. package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
  96. package/src/generators/slice/built-in-plan-data-retention-job-files.js +6 -3
  97. package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +1 -1
  98. package/src/generators/slice/built-in-plan-database-lifecycle-files.js +21 -7
  99. package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -1
  100. package/src/generators/slice/built-in-plan-foundation-files.js +2 -3
  101. package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
  102. package/src/generators/slice/built-in-plan-infrastructure-files.js +359 -27
  103. package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
  104. package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +67 -11
  105. package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +1 -1
  106. package/src/generators/slice/built-in-plan-metadata-files.js +1 -0
  107. package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
  108. package/src/generators/slice/built-in-plan-operations-files.js +442 -5
  109. package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
  110. package/src/generators/slice/built-in-plan-performance-files.d.ts +2 -1
  111. package/src/generators/slice/built-in-plan-performance-files.js +34 -47
  112. package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
  113. package/src/generators/slice/built-in-plan-project-files.js +14 -2
  114. package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
  115. package/src/generators/slice/built-in-plan-release-files.js +119 -30
  116. package/src/generators/slice/built-in-plan-release-files.js.map +1 -1
  117. package/src/generators/slice/built-in-plan-web-files.js +13 -0
  118. package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
  119. package/src/generators/slice/built-in-plan-workload-role-files.js +5 -2
  120. package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
  121. package/src/generators/slice/built-in-plan.d.ts +2 -1
  122. package/src/generators/slice/built-in-plan.js +8 -5
  123. package/src/generators/slice/built-in-plan.js.map +1 -1
  124. package/src/generators/slice/slice.js +11 -3
  125. package/src/generators/slice/slice.js.map +1 -1
  126. package/src/generators/upgrade/upgrade.js +35 -0
  127. package/src/generators/upgrade/upgrade.js.map +1 -1
  128. package/src/generators/workload/workload.js +2 -2
  129. package/src/generators/workload/workload.js.map +1 -1
  130. package/src/git-policy/github-bootstrap.d.ts +3 -1
  131. package/src/git-policy/github-bootstrap.js +22 -5
  132. package/src/git-policy/github-bootstrap.js.map +1 -1
  133. package/src/infrastructure-change/local-capability.d.ts +73 -0
  134. package/src/infrastructure-change/local-capability.js +114 -0
  135. package/src/infrastructure-change/local-capability.js.map +1 -0
  136. package/src/infrastructure-change/model.d.ts +25 -4
  137. package/src/infrastructure-change/model.js +1 -0
  138. package/src/infrastructure-change/model.js.map +1 -1
  139. package/src/infrastructure-change/normalize.d.ts +4 -0
  140. package/src/infrastructure-change/normalize.js +47 -7
  141. package/src/infrastructure-change/normalize.js.map +1 -1
  142. package/src/infrastructure-change/plan.d.ts +30 -3
  143. package/src/infrastructure-change/plan.js +323 -13
  144. package/src/infrastructure-change/plan.js.map +1 -1
  145. package/src/infrastructure-change/risk.d.ts +3 -1
  146. package/src/infrastructure-change/risk.js +96 -16
  147. package/src/infrastructure-change/risk.js.map +1 -1
  148. package/src/local-dev/private-state.d.ts +2 -0
  149. package/src/local-dev/private-state.js +3 -1
  150. package/src/local-dev/private-state.js.map +1 -1
  151. package/src/performance/cost-controls.d.ts +5 -3
  152. package/src/performance/cost-controls.js +30 -24
  153. package/src/performance/cost-controls.js.map +1 -1
  154. package/src/performance/model.d.ts +1 -1
  155. package/src/performance/model.js +0 -2
  156. package/src/performance/model.js.map +1 -1
  157. package/src/performance/test-fixtures.js +0 -2
  158. package/src/performance/test-fixtures.js.map +1 -1
  159. package/src/release/source-authority.d.ts +1 -0
  160. package/src/release/source-authority.js +136 -9
  161. package/src/release/source-authority.js.map +1 -1
  162. package/src/repository-policy/deployment-plan.d.ts +4 -1
  163. package/src/repository-policy/deployment-plan.js +8 -0
  164. package/src/repository-policy/deployment-plan.js.map +1 -1
  165. package/src/repository-policy/foundation-profile.js +1 -2
  166. package/src/repository-policy/foundation-profile.js.map +1 -1
  167. package/src/repository-policy/policy.d.ts +25 -1
  168. package/src/repository-policy/policy.js +145 -4
  169. package/src/repository-policy/policy.js.map +1 -1
  170. package/src/schemas/performance-policy-v1.json +0 -2
  171. package/src/schemas/repository-policy-v1.json +41 -0
  172. package/src/secrets/operator.js +22 -4
  173. package/src/secrets/operator.js.map +1 -1
  174. package/src/secrets/verification.js +9 -1
  175. package/src/secrets/verification.js.map +1 -1
  176. package/src/sst-environment-source-format.d.ts +3 -0
  177. package/src/sst-environment-source-format.js +179 -0
  178. package/src/sst-environment-source-format.js.map +1 -0
  179. package/src/supply-chain/blueprint-verification-authority.js +55 -3
  180. package/src/supply-chain/blueprint-verification-authority.js.map +1 -1
  181. package/src/supply-chain/generated-command.js +1 -0
  182. package/src/supply-chain/generated-command.js.map +1 -1
  183. package/src/supply-chain/generated-container-release-command.js +187 -38
  184. package/src/supply-chain/generated-container-release-command.js.map +1 -1
  185. package/src/supply-chain/generated-ecr-collector-command.js +12 -2
  186. package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
  187. package/src/supply-chain/generated-scanner-command.js +1 -0
  188. package/src/supply-chain/generated-scanner-command.js.map +1 -1
  189. package/src/supply-chain/sbom.d.ts +1 -1
  190. package/src/supply-chain/sbom.js +30 -5
  191. package/src/supply-chain/sbom.js.map +1 -1
  192. package/src/workload-roles/account-baseline.d.ts +11 -0
  193. package/src/workload-roles/account-baseline.js +253 -16
  194. package/src/workload-roles/account-baseline.js.map +1 -1
  195. package/src/workload-roles/authority.d.ts +3 -1
  196. package/src/workload-roles/authority.js +48 -2
  197. package/src/workload-roles/authority.js.map +1 -1
  198. package/src/workload-roles/aws-s3-state.js +27 -0
  199. package/src/workload-roles/aws-s3-state.js.map +1 -1
  200. package/src/workload-roles/boundary.d.ts +2 -1
  201. package/src/workload-roles/boundary.js +9 -2
  202. package/src/workload-roles/boundary.js.map +1 -1
  203. package/src/workload-roles/handler.js +52 -24
  204. package/src/workload-roles/handler.js.map +1 -1
  205. package/src/workload-roles/injection.js +1 -1
  206. package/src/workload-roles/injection.js.map +1 -1
  207. package/src/workload-roles/provisioner.js +12 -4
  208. package/src/workload-roles/provisioner.js.map +1 -1
  209. package/src/workload-roles/registration.d.ts +1 -0
  210. package/src/workload-roles/registration.js +5 -0
  211. package/src/workload-roles/registration.js.map +1 -1
  212. package/src/workload-roles/stage-boundary.js +1 -1
  213. package/src/workload-roles/stage-boundary.js.map +1 -1
  214. package/src/workload-roles/standard-slice.js +1 -0
  215. package/src/workload-roles/standard-slice.js.map +1 -1
@@ -160,6 +160,280 @@ export async function handler(event: unknown) {
160
160
  throw error;
161
161
  }
162
162
  }
163
+ `,
164
+ 'infra/route-function-materialization.ts': `type RouteFunctionArgs = {
165
+ ebkRouteMaterialization?: unknown;
166
+ handler: string;
167
+ environment?: unknown;
168
+ link?: unknown;
169
+ permissions?: unknown;
170
+ } & Record<string, any>;
171
+
172
+ type OutputFactory = (value: any) => {
173
+ apply(callback: (value: any) => any): unknown;
174
+ };
175
+
176
+ type RouteRegistrar<Result> = (
177
+ rawRoute: string,
178
+ handler: string,
179
+ args?: Record<string, any>,
180
+ ) => Result;
181
+
182
+ export function createVpcRouteFunctionMaterializer(input: {
183
+ directHandlers: readonly string[];
184
+ foundationVpc: unknown;
185
+ output: OutputFactory;
186
+ }) {
187
+ const directHandlerLimit = 2;
188
+ const compositionDirectHandlerLimit = 64;
189
+ const routeFunctionLimit = 23;
190
+ if (
191
+ !Array.isArray(input.directHandlers) ||
192
+ input.directHandlers.length !== directHandlerLimit ||
193
+ input.directHandlers.some(
194
+ (handler) =>
195
+ typeof handler !== 'string' ||
196
+ handler.length === 0 ||
197
+ handler.length > 256,
198
+ ) ||
199
+ new Set(input.directHandlers).size !== input.directHandlers.length
200
+ ) {
201
+ throw new Error(
202
+ 'Direct API routes require the exact bounded unique handler inventory.',
203
+ );
204
+ }
205
+ const directHandlers = new Set(input.directHandlers);
206
+ const compositionDirectHandlers = new Set<string>();
207
+ const routeFunctions = new Map<string, RouteFunctionArgs>();
208
+ const materializedRouteFunctions = new Set<string>();
209
+
210
+ const transform = (args: any): void => {
211
+ if (
212
+ typeof args !== 'object' ||
213
+ args === null ||
214
+ Array.isArray(args) ||
215
+ typeof args.handler !== 'string' ||
216
+ args.handler.length === 0
217
+ ) {
218
+ throw new Error(
219
+ 'API route handler transforms require one literal handler path.',
220
+ );
221
+ }
222
+ const routeFunction = routeFunctions.get(args.handler);
223
+ if (!routeFunction) {
224
+ if (directHandlers.has(args.handler)) {
225
+ if (args.ebkRouteMaterialization !== undefined) {
226
+ throw new Error(
227
+ 'Built-in direct API route materialization authority is ambiguous.',
228
+ );
229
+ }
230
+ return;
231
+ }
232
+ if (
233
+ args.ebkRouteMaterialization === 'direct' &&
234
+ !compositionDirectHandlers.has(args.handler) &&
235
+ compositionDirectHandlers.size < compositionDirectHandlerLimit
236
+ ) {
237
+ delete args.ebkRouteMaterialization;
238
+ compositionDirectHandlers.add(args.handler);
239
+ return;
240
+ }
241
+ throw new Error(
242
+ 'API route handler lacks registered materialization authority.',
243
+ );
244
+ }
245
+ if (
246
+ args.ebkRouteMaterialization !== undefined ||
247
+ routeFunction.handler !== args.handler ||
248
+ materializedRouteFunctions.has(args.handler)
249
+ ) {
250
+ throw new Error(
251
+ 'VPC API route handler materialization authority is ambiguous.',
252
+ );
253
+ }
254
+
255
+ // SST 4.17.1 resolves the complete FunctionArgs definition before it
256
+ // calls this transform. Passing imported Foundation Outputs as that
257
+ // definition can therefore defer the route component itself during
258
+ // refresh. Keep the definition literal until here, then reproduce
259
+ // functionBuilder's route-over-default merge exactly.
260
+ const defaultEnvironment = args.environment;
261
+ const defaultLink = args.link;
262
+ const defaultPermissions = args.permissions;
263
+ Object.assign(args, routeFunction);
264
+ args.environment = input
265
+ .output([defaultEnvironment, routeFunction.environment])
266
+ .apply(([defaults, route]: [any, any]) => ({
267
+ ...(defaults ?? {}),
268
+ ...(route ?? {}),
269
+ }));
270
+ args.link = input
271
+ .output([defaultLink, routeFunction.link])
272
+ .apply(([defaults, route]: [any, any]) => [
273
+ ...(defaults ?? []),
274
+ ...(route ?? []),
275
+ ]);
276
+ args.permissions = input
277
+ .output([defaultPermissions, routeFunction.permissions])
278
+ .apply(([defaults, route]: [any, any]) => [
279
+ ...(defaults ?? []),
280
+ ...(route ?? []),
281
+ ]);
282
+ materializedRouteFunctions.add(args.handler);
283
+ };
284
+
285
+ const route = <Result>(
286
+ rawRoute: string,
287
+ handler: RouteFunctionArgs,
288
+ args: Record<string, any> | undefined,
289
+ register: RouteRegistrar<Result>,
290
+ ): Result => {
291
+ const handlerPath = handler.handler;
292
+ if (
293
+ typeof rawRoute !== 'string' ||
294
+ rawRoute.length === 0 ||
295
+ rawRoute.length > 512 ||
296
+ typeof handlerPath !== 'string' ||
297
+ handlerPath.length === 0 ||
298
+ handlerPath.length > 256 ||
299
+ typeof register !== 'function' ||
300
+ directHandlers.has(handlerPath) ||
301
+ routeFunctions.has(handlerPath) ||
302
+ routeFunctions.size >= routeFunctionLimit
303
+ ) {
304
+ throw new Error(
305
+ 'VPC API routes require one bounded unique literal handler registration.',
306
+ );
307
+ }
308
+ routeFunctions.set(handlerPath, {
309
+ ...handler,
310
+ handler: handlerPath,
311
+ vpc: input.foundationVpc,
312
+ });
313
+ try {
314
+ return register(rawRoute, handlerPath, args);
315
+ } catch (error) {
316
+ routeFunctions.delete(handlerPath);
317
+ throw error;
318
+ }
319
+ };
320
+
321
+ return Object.freeze({ route, transform });
322
+ }
323
+ `,
324
+ 'infra/next-build-authority.ts': `import {
325
+ chmodSync,
326
+ existsSync,
327
+ lstatSync,
328
+ readdirSync,
329
+ realpathSync,
330
+ unlinkSync,
331
+ } from 'node:fs';
332
+ import { join, relative, resolve } from 'node:path';
333
+
334
+ const maximumEntries = 65_536;
335
+ const maximumDepth = 64;
336
+ const maximumFinderMetadataFiles = 256;
337
+ const maximumFinderMetadataBytes = 1_048_576n;
338
+
339
+ // SST 4.17.1 awaits FunctionArgs.hook.postbuild after Runtime.Build has
340
+ // materialized the exact directory that its Lambda zipper consumes. Finder
341
+ // metadata removed only from OpenNext's earlier output can be recreated or
342
+ // copied through package-local node_modules before that boundary. Sanitize the
343
+ // final derived bundle here so the bytes reviewed by the infrastructure plan
344
+ // are the bytes SST packages.
345
+ export function removeFinderMetadataFromBuiltFunction(rootPath: string): number {
346
+ const root = resolve(rootPath);
347
+ const rootIdentity = lstatSync(root, { bigint: true });
348
+ if (
349
+ !rootIdentity.isDirectory() ||
350
+ rootIdentity.isSymbolicLink() ||
351
+ realpathSync(root) !== root
352
+ ) {
353
+ throw new Error('The built Function root has an invalid identity.');
354
+ }
355
+
356
+ const pendingDirectories = [{ depth: 0, path: root }];
357
+ let observedEntries = 0;
358
+ let removedFinderMetadata = 0;
359
+ while (pendingDirectories.length > 0) {
360
+ const current = pendingDirectories.pop();
361
+ if (!current) break;
362
+ if (current.depth > maximumDepth) {
363
+ throw new Error('The built Function tree exceeds its depth bound.');
364
+ }
365
+ for (const entry of readdirSync(current.path, { withFileTypes: true }).sort(
366
+ (left, right) =>
367
+ left.name < right.name ? -1 : left.name > right.name ? 1 : 0,
368
+ )) {
369
+ observedEntries += 1;
370
+ if (observedEntries > maximumEntries) {
371
+ throw new Error('The built Function tree exceeds its entry bound.');
372
+ }
373
+ const entryPath = join(current.path, entry.name);
374
+ const identity = lstatSync(entryPath, { bigint: true });
375
+ if (entry.name === '.DS_Store') {
376
+ removedFinderMetadata += 1;
377
+ if (
378
+ removedFinderMetadata > maximumFinderMetadataFiles ||
379
+ !identity.isFile() ||
380
+ identity.isSymbolicLink() ||
381
+ identity.nlink !== 1n ||
382
+ identity.size > maximumFinderMetadataBytes
383
+ ) {
384
+ throw new Error(
385
+ 'The built Function Finder metadata has an invalid identity.',
386
+ );
387
+ }
388
+ unlinkSync(entryPath);
389
+ if (existsSync(entryPath)) {
390
+ throw new Error(
391
+ 'The built Function Finder metadata was not removed.',
392
+ );
393
+ }
394
+ continue;
395
+ }
396
+ if (identity.isDirectory() && !identity.isSymbolicLink()) {
397
+ const confined = relative(root, entryPath);
398
+ if (
399
+ confined === '..' ||
400
+ confined.startsWith('../') ||
401
+ resolve(root, confined) !== entryPath
402
+ ) {
403
+ throw new Error('The built Function entry escapes its root.');
404
+ }
405
+ pendingDirectories.push({ depth: current.depth + 1, path: entryPath });
406
+ }
407
+ }
408
+ // Finder can recreate its metadata in the interval between this hook and
409
+ // SST's asynchronous glob/archive pass. On macOS, close that exact race by
410
+ // removing only the owner's write bit from each completed derived
411
+ // directory. The generated build wrapper restores it before the next
412
+ // OpenNext build. Group/other permission bits remain unchanged.
413
+ if (process.platform === 'darwin') {
414
+ const currentIdentity = lstatSync(current.path, { bigint: true });
415
+ if (
416
+ !currentIdentity.isDirectory() ||
417
+ currentIdentity.isSymbolicLink()
418
+ ) {
419
+ throw new Error('The built Function directory changed identity.');
420
+ }
421
+ chmodSync(
422
+ current.path,
423
+ Number((currentIdentity.mode & 0o7_777n) & ~0o200n),
424
+ );
425
+ if ((lstatSync(current.path, { bigint: true }).mode & 0o200n) !== 0n) {
426
+ throw new Error('The built Function directory was not sealed.');
427
+ }
428
+ if (existsSync(join(current.path, '.DS_Store'))) {
429
+ throw new Error(
430
+ 'The built Function Finder metadata raced its final seal.',
431
+ );
432
+ }
433
+ }
434
+ }
435
+ return removedFinderMetadata;
436
+ }
163
437
  `,
164
438
  'infra/product.ts': `import {
165
439
  createManagedLogGroupContract,
@@ -212,6 +486,8 @@ import {
212
486
  registerProductMigration,
213
487
  registerProductRetention,
214
488
  } from './foundation.js';
489
+ import { createVpcRouteFunctionMaterializer } from './route-function-materialization.js';
490
+ import { removeFinderMetadataFromBuiltFunction } from './next-build-authority.js';
215
491
  import {
216
492
  standardSliceDatabaseTaskFamily,
217
493
  standardSliceResourceNames,
@@ -516,6 +792,28 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
516
792
  'Protected infrastructure requires exact deployment and release source Git object IDs.',
517
793
  );
518
794
  }
795
+ $transform(
796
+ aws.lambda.Invocation,
797
+ (args: any, _opts: any, logicalName: string) => {
798
+ if (logicalName !== '${pascalName}WebRevalidationSeed') return;
799
+ const triggers = args.triggers;
800
+ if (
801
+ !triggers ||
802
+ typeof triggers !== 'object' ||
803
+ Array.isArray(triggers) ||
804
+ Object.keys(triggers).length !== 1 ||
805
+ typeof triggers.version !== 'string'
806
+ ) {
807
+ throw new Error(
808
+ 'Pinned SST Next revalidation seed does not expose one exact version trigger.',
809
+ );
810
+ }
811
+ // SST 4.17.1 uses Date.now() here, which makes every preview propose a
812
+ // replacement even when the immutable application source is unchanged.
813
+ // Re-seed exactly once per released source instead.
814
+ args.triggers = { version: releaseSourceCommit };
815
+ },
816
+ );
519
817
  const dataRetentionContainer = resolveStandardContainerImage({
520
818
  artifactId: '${name}.job.data-retention',
521
819
  local: {
@@ -733,9 +1031,35 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
733
1031
  foundation.discovery.alertTopicArn,
734
1032
  );
735
1033
 
1034
+ const vpcRouteFunctionMaterializer =
1035
+ createVpcRouteFunctionMaterializer({
1036
+ directHandlers: [
1037
+ 'api/health.handler',
1038
+ 'async/webhook-ingress.handler',
1039
+ ],
1040
+ foundationVpc: foundation.vpc,
1041
+ output: $output,
1042
+ });
736
1043
  const api = new sst.aws.ApiGatewayV2('${pascalName}Api', {
737
1044
  ...(performanceDeploymentAuthority ? { vpc: foundation.vpc } : {}),
1045
+ transform: {
1046
+ route: {
1047
+ handler: vpcRouteFunctionMaterializer.transform,
1048
+ },
1049
+ },
738
1050
  });
1051
+ const routeInVpc = (
1052
+ rawRoute: string,
1053
+ handler: { handler: string } & Record<string, any>,
1054
+ args?: Record<string, any>,
1055
+ ) =>
1056
+ vpcRouteFunctionMaterializer.route(
1057
+ rawRoute,
1058
+ handler,
1059
+ args,
1060
+ (registeredRoute, registeredHandler, registeredArgs) =>
1061
+ api.route(registeredRoute, registeredHandler, registeredArgs),
1062
+ );
739
1063
  const performanceIngress = performanceDeploymentAuthority
740
1064
  ? (() => {
741
1065
  const originProof = new random.RandomPassword(
@@ -782,7 +1106,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
782
1106
  link: secretLinksFor('api-health'),
783
1107
  ...lambdaLogging(apiHealthLogs.logGroup.name),
784
1108
  });
785
- api.route(
1109
+ routeInVpc(
786
1110
  ${identifierPrefix}MachineAuthorizationProof.method +
787
1111
  ' ' +
788
1112
  ${identifierPrefix}MachineAuthorizationProof.path,
@@ -802,7 +1126,6 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
802
1126
  ...secretLinksFor('api-machine-authorization-proof'),
803
1127
  ],
804
1128
  ...lambdaLogging(machineAuthorizationProofTargetLogs.logGroup.name),
805
- vpc: foundation.vpc,
806
1129
  },
807
1130
  );
808
1131
  for (const route of [
@@ -819,7 +1142,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
819
1142
  operation: ${identifierPrefix}RevokeRecordDelegation,
820
1143
  },
821
1144
  ]) {
822
- api.route(route.operation.method + ' ' + route.operation.path, {
1145
+ routeInVpc(route.operation.method + ' ' + route.operation.path, {
823
1146
  ...(workloadRoleBindings?.api.delegations ?? {}),
824
1147
  environment: {
825
1148
  AUTH_CLIENT_ID: authClient.id,
@@ -832,7 +1155,6 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
832
1155
  handler: route.handler,
833
1156
  link: [database, ...secretLinksFor('api-delegations')],
834
1157
  ...lambdaLogging(delegationLogs.logGroup.name),
835
- vpc: foundation.vpc,
836
1158
  });
837
1159
  }
838
1160
  for (const route of [
@@ -873,7 +1195,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
873
1195
  operation: ${identifierPrefix}ExpireRecordHold,
874
1196
  },
875
1197
  ]) {
876
- api.route(route.operation.method + ' ' + route.operation.path, {
1198
+ routeInVpc(route.operation.method + ' ' + route.operation.path, {
877
1199
  ...(workloadRoleBindings?.api.dataRights ?? {}),
878
1200
  ...(workloadRoles
879
1201
  ? {}
@@ -896,7 +1218,6 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
896
1218
  ...secretLinksFor('api-data-rights'),
897
1219
  ],
898
1220
  ...lambdaLogging(dataRightsLogs.logGroup.name),
899
- vpc: foundation.vpc,
900
1221
  });
901
1222
  }
902
1223
  for (const route of [
@@ -909,7 +1230,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
909
1230
  operation: ${identifierPrefix}DecideRetentionApproval,
910
1231
  },
911
1232
  ]) {
912
- api.route(route.operation.method + ' ' + route.operation.path, {
1233
+ routeInVpc(route.operation.method + ' ' + route.operation.path, {
913
1234
  ...(workloadRoleBindings?.api.databaseRecords ?? {}),
914
1235
  environment: {
915
1236
  AUTH_CLIENT_ID: authClient.id,
@@ -922,10 +1243,9 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
922
1243
  handler: route.handler,
923
1244
  link: [database, ...secretLinksFor('api-database-records')],
924
1245
  ...lambdaLogging(dataRetentionReviewLogs.logGroup.name),
925
- vpc: foundation.vpc,
926
1246
  });
927
1247
  }
928
- api.route(
1248
+ routeInVpc(
929
1249
  ${identifierPrefix}ProtectedExample.method +
930
1250
  ' ' +
931
1251
  ${identifierPrefix}ProtectedExample.path,
@@ -942,10 +1262,9 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
942
1262
  handler: 'api/protected.handler',
943
1263
  link: [database, ...secretLinksFor('api-protected')],
944
1264
  ...lambdaLogging(protectedApiLogs.logGroup.name),
945
- vpc: foundation.vpc,
946
1265
  },
947
1266
  );
948
- api.route(
1267
+ routeInVpc(
949
1268
  ${identifierPrefix}DatabaseHealth.method +
950
1269
  ' ' +
951
1270
  ${identifierPrefix}DatabaseHealth.path,
@@ -962,7 +1281,6 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
962
1281
  handler: 'database/runtime-health.handler',
963
1282
  link: [database, ...secretLinksFor('api-database-health')],
964
1283
  ...lambdaLogging(databaseHealthLogs.logGroup.name),
965
- vpc: foundation.vpc,
966
1284
  },
967
1285
  );
968
1286
  for (const route of [
@@ -979,7 +1297,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
979
1297
  operation: ${identifierPrefix}PutRecord,
980
1298
  },
981
1299
  ]) {
982
- api.route(route.operation.method + ' ' + route.operation.path, {
1300
+ routeInVpc(route.operation.method + ' ' + route.operation.path, {
983
1301
  ...(workloadRoleBindings?.api.databaseRecords ?? {}),
984
1302
  environment: {
985
1303
  AUTH_CLIENT_ID: authClient.id,
@@ -997,7 +1315,6 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
997
1315
  ...secretLinksFor('api-database-records'),
998
1316
  ],
999
1317
  ...lambdaLogging(databaseRecordsLogs.logGroup.name),
1000
- vpc: foundation.vpc,
1001
1318
  });
1002
1319
  }
1003
1320
  for (const route of [
@@ -1010,7 +1327,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1010
1327
  operation: ${identifierPrefix}DecideRecordDeletion,
1011
1328
  },
1012
1329
  ]) {
1013
- api.route(route.operation.method + ' ' + route.operation.path, {
1330
+ routeInVpc(route.operation.method + ' ' + route.operation.path, {
1014
1331
  ...(workloadRoleBindings?.api.databaseRecords ?? {}),
1015
1332
  environment: {
1016
1333
  AUTH_CLIENT_ID: authClient.id,
@@ -1023,10 +1340,9 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1023
1340
  handler: route.handler,
1024
1341
  link: [database, ...secretLinksFor('api-database-records')],
1025
1342
  ...lambdaLogging(databaseRecordsLogs.logGroup.name),
1026
- vpc: foundation.vpc,
1027
1343
  });
1028
1344
  }
1029
- api.route(
1345
+ routeInVpc(
1030
1346
  ${identifierPrefix}PublishCreated.method +
1031
1347
  ' ' +
1032
1348
  ${identifierPrefix}PublishCreated.path,
@@ -1048,7 +1364,6 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1048
1364
  ...secretLinksFor('api-publish-created'),
1049
1365
  ],
1050
1366
  ...lambdaLogging(eventPublisherLogs.logGroup.name),
1051
- vpc: foundation.vpc,
1052
1367
  },
1053
1368
  );
1054
1369
  const machineAuthorizationProof = new sst.aws.Function(
@@ -1305,8 +1620,9 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1305
1620
  });
1306
1621
  const reliability = create${pascalName}Reliability({
1307
1622
  alertTopicArn: foundation.discovery.alertTopicArn,
1308
- alertTopicName:
1309
- foundation.discovery.alertTopicArn.split(':').at(-1) ?? '',
1623
+ alertTopicName: foundation.discovery.alertTopicArn.apply(
1624
+ (alertTopicArn: string) => alertTopicArn.split(':').at(-1) ?? '',
1625
+ ),
1310
1626
  apiId: api.id,
1311
1627
  databaseClusterIdentifier: foundation.discovery.databaseClusterId,
1312
1628
  functionName: dataExportCleanup.name,
@@ -1934,6 +2250,7 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1934
2250
  }
1935
2251
 
1936
2252
  const web = new sst.aws.Nextjs('${pascalName}Web', {
2253
+ buildCommand: 'node ../tools/ebk-next-build-environment.mjs',
1937
2254
  dev: {
1938
2255
  command: \`pnpm exec next dev web --hostname 127.0.0.1 --port \${devPort}\`,
1939
2256
  directory: '.',
@@ -1982,6 +2299,11 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1982
2299
  : undefined,
1983
2300
  imageOptimizer: {
1984
2301
  ...(workloadRoleBindings?.next.imageOptimizer ?? {}),
2302
+ hook: {
2303
+ async postbuild(directory: string) {
2304
+ removeFinderMetadataFromBuiltFunction(directory);
2305
+ },
2306
+ },
1985
2307
  link: secretLinksFor('web-image-optimizer'),
1986
2308
  ...lambdaLogging(nextImageOptimizerLogs.logGroup.name),
1987
2309
  },
@@ -1997,6 +2319,11 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
1997
2319
  },
1998
2320
  server: {
1999
2321
  ...(workloadRoleBindings?.next.server ?? {}),
2322
+ hook: {
2323
+ async postbuild(directory: string) {
2324
+ removeFinderMetadataFromBuiltFunction(directory);
2325
+ },
2326
+ },
2000
2327
  link: secretLinksFor(
2001
2328
  'web-server',
2002
2329
  performanceDeploymentBinding
@@ -2049,33 +2376,38 @@ export function product(workloadRoles?: StandardSliceWorkloadRolePreflight) {
2049
2376
  Environment: [
2050
2377
  {
2051
2378
  Name: 'EBK_DATABASE_LIFECYCLE_CORRELATION_ID',
2052
- Value: '{% $states.input.databaseLifecycleCorrelationId %}',
2379
+ Value:
2380
+ '{% $states.context.Execution.Input.databaseLifecycleCorrelationId %}',
2053
2381
  },
2054
2382
  ...(callback
2055
2383
  ? [
2056
2384
  {
2057
2385
  Name: 'EBK_CANDIDATE_IDENTITY',
2058
- Value: '{% $states.input.candidateIdentity %}',
2386
+ Value:
2387
+ '{% $states.context.Execution.Input.candidateIdentity %}',
2059
2388
  },
2060
2389
  {
2061
2390
  Name: 'EBK_EXECUTION_DATABASE_IDENTIFIER',
2062
- Value: '{% $states.input.databaseIdentifier %}',
2391
+ Value:
2392
+ '{% $states.context.Execution.Input.databaseIdentifier %}',
2063
2393
  },
2064
2394
  {
2065
2395
  Name: 'EBK_EXECUTION_SLICE',
2066
- Value: '{% $states.input.slice %}',
2396
+ Value: '{% $states.context.Execution.Input.slice %}',
2067
2397
  },
2068
2398
  {
2069
2399
  Name: 'EBK_EXECUTION_STAGE',
2070
- Value: '{% $states.input.stage %}',
2400
+ Value: '{% $states.context.Execution.Input.stage %}',
2071
2401
  },
2072
2402
  {
2073
2403
  Name: 'EBK_REGISTRATION_DIGEST',
2074
- Value: '{% $states.input.registrationDigest %}',
2404
+ Value:
2405
+ '{% $states.context.Execution.Input.registrationDigest %}',
2075
2406
  },
2076
2407
  {
2077
2408
  Name: 'EBK_SOURCE_COMMIT',
2078
- Value: '{% $states.input.sourceCommit %}',
2409
+ Value:
2410
+ '{% $states.context.Execution.Input.sourceCommit %}',
2079
2411
  },
2080
2412
  {
2081
2413
  Name: 'EBK_STEP_FUNCTIONS_TASK_TOKEN',
@@ -1 +1 @@
1
- {"version":3,"file":"built-in-plan-infrastructure-files.js","sourceRoot":"","sources":["../../../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T,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAwHT,IAAI;;kCAEA,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmGpC,UAAU;;;;;;;;;;;;eAYF,IAAI;;;;;;;;;OASZ,UAAU;;;;;;;;;;;;eAYF,IAAI;;;;;;;;;OASZ,UAAU;;;;;;;;;;;;;eAaF,IAAI;;;;;;;;;;SAUV,UAAU;;;;;;;;;;;;;;aAcN,IAAI;;;;;;;;;;;OAWV,UAAU;;;;;;;;;8BASa,IAAI;;;eAGnB,IAAI;;;;;;;;;OASZ,UAAU;;;;;;;;;;;;;kBAaC,IAAI;;;;;eAKP,IAAI;;;;;;;;;;SAUV,UAAU;;;;;;;;;;;;;;oBAcC,IAAI;;;;;;aAMX,IAAI;;;;;;;;;;;;SAYR,UAAU;;;;;;;;;;;;;;oBAcC,IAAI;;;;;;aAMX,IAAI;;;;;;;;;;;;SAYR,UAAU;;;;;;;;;;;;;;oBAcC,IAAI;;;;;;aAMX,IAAI;;;;;;;;;;oDAUmC,UAAU;sBACxC,IAAI;;;;qCAIW,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D9C;KACE,CAAC;AACJ,CAAC"}
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,4EAuyGC;AA7yGD,uEAGmC;AAEnC,gBAAgB;AAChB,SAAgB,gCAAgC,CAC9C,IAAY,EACZ,UAAkB,EAClB,SAAiB;IAEjB,MAAM,gBAAgB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