@aws/nx-plugin 1.0.7 → 1.0.8

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 (52) hide show
  1. package/migrations.json +16 -1
  2. package/package.json +1 -1
  3. package/src/infra/app/__snapshots__/generator.spec.ts.snap +10 -0
  4. package/src/infra/app/files/app/README.md.template +12 -0
  5. package/src/infra/app/generator.js +8 -0
  6. package/src/infra/app/generator.js.map +1 -1
  7. package/src/migrations/latest/cache-inputs-outputs/metadata.json +3 -0
  8. package/src/migrations/latest/cache-inputs-outputs/migration.d.ts +6 -0
  9. package/src/migrations/latest/cache-inputs-outputs/migration.js +176 -0
  10. package/src/migrations/latest/cache-inputs-outputs/migration.js.map +1 -0
  11. package/src/migrations/latest/infra-test-loop/metadata.json +3 -0
  12. package/src/migrations/latest/infra-test-loop/migration.d.ts +6 -0
  13. package/src/migrations/latest/infra-test-loop/migration.js +110 -0
  14. package/src/migrations/latest/infra-test-loop/migration.js.map +1 -0
  15. package/src/migrations/latest/py-dynamodb-type-base-model-meta/metadata.json +3 -0
  16. package/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.d.ts +6 -0
  17. package/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.js +87 -0
  18. package/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.js.map +1 -0
  19. package/src/migrations/v1.0.0-rc.90/0004-python-test-input-scoping/migration.js +8 -2
  20. package/src/migrations/v1.0.0-rc.90/0004-python-test-input-scoping/migration.js.map +1 -1
  21. package/src/open-api/py-client/files/client/__clientModuleName__.py.template +17 -6
  22. package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +4 -4
  23. package/src/py/dynamodb/files/__name__/entities/base.py.template +2 -2
  24. package/src/smithy/project/__snapshots__/generator.spec.ts.snap +9 -0
  25. package/src/smithy/project/generator.d.ts +9 -0
  26. package/src/smithy/project/generator.js +15 -0
  27. package/src/smithy/project/generator.js.map +1 -1
  28. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +2 -0
  29. package/src/terraform/project/generator.js +2 -4
  30. package/src/terraform/project/generator.js.map +1 -1
  31. package/src/ts/lib/__snapshots__/generator.spec.ts.snap +1 -1
  32. package/src/ts/lib/generator.d.ts +14 -3
  33. package/src/ts/lib/generator.js +18 -7
  34. package/src/ts/lib/generator.js.map +1 -1
  35. package/src/ts/rdb/generator.js +4 -0
  36. package/src/ts/rdb/generator.js.map +1 -1
  37. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +102 -2
  38. package/src/utils/__snapshots__/cdk-test-setup.spec.ts.snap +25 -0
  39. package/src/utils/cdk-test-setup.d.ts +22 -0
  40. package/src/utils/cdk-test-setup.js +38 -0
  41. package/src/utils/cdk-test-setup.js.map +1 -0
  42. package/src/utils/files/cdk-test-setup/tests/global-setup.ts.template +45 -0
  43. package/src/utils/shared-constructs.js +2 -0
  44. package/src/utils/shared-constructs.js.map +1 -1
  45. package/src/utils/test/python-dependencies.d.ts +6 -0
  46. package/src/utils/test/python-dependencies.js +9 -0
  47. package/src/utils/test/python-dependencies.js.map +1 -1
  48. package/src/utils/test/warm-python-cache.js +40 -21
  49. package/src/utils/test/warm-python-cache.js.map +1 -1
  50. package/src/utils/versions.d.ts +1 -1
  51. package/src/utils/versions.js +1 -1
  52. package/src/utils/versions.js.map +1 -1
@@ -0,0 +1,22 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ /** Where the vitest global setup lives, relative to the project root. */
3
+ export declare const CDK_TEST_GLOBAL_SETUP = "tests/global-setup.ts";
4
+ /** The `globalSetup` entry the vitest config registers. */
5
+ export declare const CDK_TEST_GLOBAL_SETUP_ENTRY = "./tests/global-setup.ts";
6
+ export declare const CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR: string;
7
+ /** The global setup exactly as it is vended (the template has no variables). */
8
+ export declare const renderCdkTestGlobalSetup: () => string;
9
+ /**
10
+ * Register the global setup as the first property of the config's own `test`
11
+ * object. Prepending means no trailing comma to manage, and the `not some`
12
+ * guard leaves a config that already declares a global setup alone.
13
+ */
14
+ export declare const GLOBAL_SETUP_PATTERN = "`test: { $props }` => `test: { globalSetup: ['./tests/global-setup.ts'], $props }` where {\n $props <: within `defineConfig($_)`,\n $props <: not some `globalSetup: $_`\n}";
15
+ /** The project's vitest config, if it has one. */
16
+ export declare const findVitestConfig: (tree: Tree, projectRoot: string) => string | undefined;
17
+ /**
18
+ * Give a CDK project's tests a per-run temp directory with asset bundling
19
+ * skipped: vend `tests/global-setup.ts` (kept if it exists) and register it in
20
+ * the vitest config. The caller formats.
21
+ */
22
+ export declare const addCdkTestGlobalSetup: (tree: Tree, projectRoot: string) => Promise<void>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ import { readFileSync } from "node:fs";
5
+ import { join } from "node:path";
6
+ import { generateFiles, joinPathFragments, OverwriteStrategy } from "@nx/devkit";
7
+ import { applyGritQL } from "./ast.js";
8
+ /** Where the vitest global setup lives, relative to the project root. */ export const CDK_TEST_GLOBAL_SETUP = 'tests/global-setup.ts';
9
+ /** The `globalSetup` entry the vitest config registers. */ export const CDK_TEST_GLOBAL_SETUP_ENTRY = `./${CDK_TEST_GLOBAL_SETUP}`;
10
+ export const CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR = join(import.meta.dirname, 'files', 'cdk-test-setup');
11
+ /** The global setup exactly as it is vended (the template has no variables). */ export const renderCdkTestGlobalSetup = ()=>readFileSync(join(CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR, `${CDK_TEST_GLOBAL_SETUP}.template`), 'utf-8');
12
+ /**
13
+ * Register the global setup as the first property of the config's own `test`
14
+ * object. Prepending means no trailing comma to manage, and the `not some`
15
+ * guard leaves a config that already declares a global setup alone.
16
+ */ export const GLOBAL_SETUP_PATTERN = `\`test: { $props }\` => \`test: { globalSetup: ['${CDK_TEST_GLOBAL_SETUP_ENTRY}'], $props }\` where {
17
+ $props <: within \`defineConfig($_)\`,
18
+ $props <: not some \`globalSetup: $_\`
19
+ }`;
20
+ /** The project's vitest config, if it has one. */ export const findVitestConfig = (tree, projectRoot)=>[
21
+ joinPathFragments(projectRoot, 'vitest.config.mts'),
22
+ joinPathFragments(projectRoot, 'vite.config.mts')
23
+ ].find((config)=>tree.exists(config));
24
+ /**
25
+ * Give a CDK project's tests a per-run temp directory with asset bundling
26
+ * skipped: vend `tests/global-setup.ts` (kept if it exists) and register it in
27
+ * the vitest config. The caller formats.
28
+ */ export const addCdkTestGlobalSetup = async (tree, projectRoot)=>{
29
+ generateFiles(tree, CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR, projectRoot, {}, {
30
+ overwriteStrategy: OverwriteStrategy.KeepExisting
31
+ });
32
+ const configPath = findVitestConfig(tree, projectRoot);
33
+ if (configPath) {
34
+ await applyGritQL(tree, configPath, GLOBAL_SETUP_PATTERN);
35
+ }
36
+ };
37
+
38
+ //# sourceMappingURL=cdk-test-setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/cdk-test-setup.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport {\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n} from '@nx/devkit';\nimport { applyGritQL } from './ast.js';\n\n/** Where the vitest global setup lives, relative to the project root. */\nexport const CDK_TEST_GLOBAL_SETUP = 'tests/global-setup.ts';\n\n/** The `globalSetup` entry the vitest config registers. */\nexport const CDK_TEST_GLOBAL_SETUP_ENTRY = `./${CDK_TEST_GLOBAL_SETUP}`;\n\nexport const CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR = join(\n import.meta.dirname,\n 'files',\n 'cdk-test-setup',\n);\n\n/** The global setup exactly as it is vended (the template has no variables). */\nexport const renderCdkTestGlobalSetup = (): string =>\n readFileSync(\n join(\n CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR,\n `${CDK_TEST_GLOBAL_SETUP}.template`,\n ),\n 'utf-8',\n );\n\n/**\n * Register the global setup as the first property of the config's own `test`\n * object. Prepending means no trailing comma to manage, and the `not some`\n * guard leaves a config that already declares a global setup alone.\n */\nexport const GLOBAL_SETUP_PATTERN = `\\`test: { $props }\\` => \\`test: { globalSetup: ['${CDK_TEST_GLOBAL_SETUP_ENTRY}'], $props }\\` where {\n $props <: within \\`defineConfig($_)\\`,\n $props <: not some \\`globalSetup: $_\\`\n}`;\n\n/** The project's vitest config, if it has one. */\nexport const findVitestConfig = (\n tree: Tree,\n projectRoot: string,\n): string | undefined =>\n [\n joinPathFragments(projectRoot, 'vitest.config.mts'),\n joinPathFragments(projectRoot, 'vite.config.mts'),\n ].find((config) => tree.exists(config));\n\n/**\n * Give a CDK project's tests a per-run temp directory with asset bundling\n * skipped: vend `tests/global-setup.ts` (kept if it exists) and register it in\n * the vitest config. The caller formats.\n */\nexport const addCdkTestGlobalSetup = async (\n tree: Tree,\n projectRoot: string,\n): Promise<void> => {\n generateFiles(\n tree,\n CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR,\n projectRoot,\n {},\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n\n const configPath = findVitestConfig(tree, projectRoot);\n if (configPath) {\n await applyGritQL(tree, configPath, GLOBAL_SETUP_PATTERN);\n }\n};\n"],"names":["readFileSync","join","generateFiles","joinPathFragments","OverwriteStrategy","applyGritQL","CDK_TEST_GLOBAL_SETUP","CDK_TEST_GLOBAL_SETUP_ENTRY","CDK_TEST_GLOBAL_SETUP_TEMPLATE_DIR","dirname","renderCdkTestGlobalSetup","GLOBAL_SETUP_PATTERN","findVitestConfig","tree","projectRoot","find","config","exists","addCdkTestGlobalSetup","overwriteStrategy","KeepExisting","configPath"],"mappings":"AAAA;;;CAGC,GACD,SAASA,YAAY,QAAQ,UAAU;AACvC,SAASC,IAAI,QAAQ,YAAY;AACjC,SACEC,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,QAEZ,aAAa;AACpB,SAASC,WAAW,QAAQ,WAAW;AAEvC,uEAAuE,GACvE,OAAO,MAAMC,wBAAwB,wBAAwB;AAE7D,yDAAyD,GACzD,OAAO,MAAMC,8BAA8B,CAAC,EAAE,EAAED,uBAAuB,CAAC;AAExE,OAAO,MAAME,qCAAqCP,KAChD,YAAYQ,OAAO,EACnB,SACA,kBACA;AAEF,8EAA8E,GAC9E,OAAO,MAAMC,2BAA2B,IACtCV,aACEC,KACEO,oCACA,GAAGF,sBAAsB,SAAS,CAAC,GAErC,SACA;AAEJ;;;;CAIC,GACD,OAAO,MAAMK,uBAAuB,CAAC,iDAAiD,EAAEJ,4BAA4B;;;CAGnH,CAAC,CAAC;AAEH,gDAAgD,GAChD,OAAO,MAAMK,mBAAmB,CAC9BC,MACAC,cAEA;QACEX,kBAAkBW,aAAa;QAC/BX,kBAAkBW,aAAa;KAChC,CAACC,IAAI,CAAC,CAACC,SAAWH,KAAKI,MAAM,CAACD,SAAS;AAE1C;;;;CAIC,GACD,OAAO,MAAME,wBAAwB,OACnCL,MACAC;IAEAZ,cACEW,MACAL,oCACAM,aACA,CAAC,GACD;QACEK,mBAAmBf,kBAAkBgB,YAAY;IACnD;IAGF,MAAMC,aAAaT,iBAAiBC,MAAMC;IAC1C,IAAIO,YAAY;QACd,MAAMhB,YAAYQ,MAAMQ,YAAYV;IACtC;AACF,EAAE"}
@@ -0,0 +1,45 @@
1
+ import { existsSync, mkdtempSync, rmSync } from 'node:fs';
2
+ import { tmpdir } from 'node:os';
3
+ import { join } from 'node:path';
4
+ import { setTimeout as sleep } from 'node:timers/promises';
5
+
6
+ const VARIABLES = ['TMPDIR', 'TEMP', 'TMP', 'CDK_CONTEXT_JSON'];
7
+
8
+ const remove = (dir: string) => {
9
+ try {
10
+ rmSync(dir, { recursive: true, force: true });
11
+ } catch {
12
+ // Retried below.
13
+ }
14
+ return !existsSync(dir);
15
+ };
16
+
17
+ export default function setup() {
18
+ const previous = VARIABLES.map((name) => [name, process.env[name]] as const);
19
+ const dir = mkdtempSync(join(tmpdir(), 'cdk-test-'));
20
+ process.env.TMPDIR = dir;
21
+ process.env.TEMP = dir;
22
+ process.env.TMP = dir;
23
+ process.env.CDK_CONTEXT_JSON = JSON.stringify({
24
+ ...JSON.parse(process.env.CDK_CONTEXT_JSON ?? '{}'),
25
+ 'aws:cdk:bundling-stacks': [],
26
+ });
27
+
28
+ return async () => {
29
+ // Exiting workers may still be deleting their cdk.out here, so retry.
30
+ const deadline = Date.now() + 2000;
31
+ while (!remove(dir) && Date.now() < deadline) {
32
+ await sleep(50);
33
+ }
34
+ if (existsSync(dir)) {
35
+ console.warn(`Could not remove the CDK test directory ${dir}`);
36
+ }
37
+ for (const [name, value] of previous) {
38
+ if (value === undefined) {
39
+ delete process.env[name];
40
+ } else {
41
+ process.env[name] = value;
42
+ }
43
+ }
44
+ };
45
+ }
@@ -4,6 +4,7 @@
4
4
  */ import { generateFiles, joinPathFragments, OverwriteStrategy, updateJson } from "@nx/devkit";
5
5
  import terraformProjectGenerator from "../terraform/project/generator.js";
6
6
  import tsProjectGenerator from "../ts/lib/generator.js";
7
+ import { addCdkTestGlobalSetup } from "./cdk-test-setup.js";
7
8
  import { readAwsNxPluginConfig } from "./config/utils.js";
8
9
  import { addDependenciesToPackageJson } from "./dependencies.js";
9
10
  import { formatFilesInSubtree } from "./format.js";
@@ -46,6 +47,7 @@ export async function sharedConstructsGenerator(tree, options, declaration) {
46
47
  ]), withVersions(declaration, [
47
48
  '@types/node'
48
49
  ]), joinPathFragments(joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR), 'package.json'));
50
+ await addCdkTestGlobalSetup(tree, joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR));
49
51
  await formatFilesInSubtree(tree);
50
52
  }
51
53
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/shared-constructs.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type ProjectConfiguration,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport terraformProjectGenerator from '../terraform/project/generator.js';\nimport tsProjectGenerator from '../ts/lib/generator.js';\nimport { readAwsNxPluginConfig } from './config/utils.js';\nimport type {\n DependencyDeclaration,\n MustDeclare,\n} from './declared-dependencies.js';\nimport { addDependenciesToPackageJson } from './dependencies.js';\nimport { formatFilesInSubtree } from './format.js';\nimport type { Iac } from './iac.js';\nimport { esmVars } from './module-format.js';\nimport { getNpmScopePrefix } from './npm-scope.js';\nimport { getPackageManagerDisplayCommands } from './pkg-manager.js';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DEPENDENCIES,\n SHARED_CONSTRUCTS_DIR,\n SHARED_CONSTRUCTS_NAME,\n SHARED_TERRAFORM_DIR,\n SHARED_TERRAFORM_NAME,\n} from './shared-constructs-constants.js';\n\nexport { SHARED_CONSTRUCTS_DEPENDENCIES };\n\nimport { terraformProviderVersions, withVersions } from './versions.js';\n\nexport interface SharedConstructsGeneratorOptions {\n iac: Iac;\n}\n\nexport async function sharedConstructsGenerator<\n const D extends DependencyDeclaration,\n>(\n tree: Tree,\n options: SharedConstructsGeneratorOptions,\n declaration: D & MustDeclare<typeof SHARED_CONSTRUCTS_DEPENDENCIES, D>,\n) {\n const { iac } = options;\n const npmScopePrefix = getNpmScopePrefix(tree);\n updateGitignore(tree);\n\n if (iac === 'cdk') {\n if (\n !tree.exists(\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR, 'project.json'),\n )\n ) {\n await tsProjectGenerator(tree, {\n name: SHARED_CONSTRUCTS_NAME,\n directory: PACKAGES_DIR,\n subDirectory: SHARED_CONSTRUCTS_DIR,\n });\n tree.delete(\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR, 'src'),\n );\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n 'files',\n SHARED_CONSTRUCTS_DIR,\n 'src',\n ),\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR, 'src'),\n {\n npmScopePrefix,\n scopeAlias: npmScopePrefix,\n tags: readAwsNxPluginConfig(tree)?.tags ?? [],\n ...esmVars(tree),\n },\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'common', 'readme'),\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR),\n {\n fullyQualifiedName: `${npmScopePrefix}${SHARED_CONSTRUCTS_NAME}`,\n name: SHARED_CONSTRUCTS_NAME,\n pkgMgrCmd: getPackageManagerDisplayCommands().exec,\n },\n {\n overwriteStrategy: OverwriteStrategy.Overwrite,\n },\n );\n addDependenciesToPackageJson(\n tree,\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_CONSTRUCTS_DEPENDENCIES\n >,\n ['constructs', 'aws-cdk-lib'],\n ),\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_CONSTRUCTS_DEPENDENCIES\n >,\n ['@types/node'],\n ),\n joinPathFragments(\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR),\n 'package.json',\n ),\n );\n await formatFilesInSubtree(tree);\n }\n }\n\n // Handle Terraform provider\n if (iac === 'terraform') {\n const terraformLibPath = joinPathFragments(\n PACKAGES_DIR,\n SHARED_TERRAFORM_DIR,\n );\n if (!tree.exists(joinPathFragments(terraformLibPath, 'project.json'))) {\n await terraformProjectGenerator(tree, {\n name: SHARED_TERRAFORM_NAME,\n directory: joinPathFragments(PACKAGES_DIR, 'common'),\n type: 'library',\n });\n\n // `build` is a no-op orchestration target that produces no files of its\n // own. Terraform writes runtime-config entries into\n // `dist/{projectRoot}/runtime-config` at apply time, and other terraform\n // projects contribute their own entries to the same directory. Without\n // explicit outputs, Nx infers `dist/{projectRoot}` as this target's\n // cached output and, on a cache hit, restores the cached copy over the\n // freshly-applied config — wiping the very values consumers read. Declare\n // no outputs so Nx never treats runtime config as a cacheable artifact.\n updateJson(\n tree,\n joinPathFragments(PACKAGES_DIR, SHARED_TERRAFORM_DIR, 'project.json'),\n (projectConfig: ProjectConfiguration) => {\n projectConfig.targets ??= {};\n projectConfig.targets.build ??= {};\n projectConfig.targets.build.outputs = [];\n return projectConfig;\n },\n );\n\n tree.delete(joinPathFragments(terraformLibPath, 'src', 'main.tf'));\n\n // Create the metrics.tf file with empty initial values\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'terraform'),\n terraformLibPath,\n { ...terraformProviderVersions() },\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n\n await formatFilesInSubtree(tree);\n }\n }\n}\n\nconst updateGitignore = (tree: Tree) => {\n const gitignore = tree.exists('.gitignore')\n ? tree.read('.gitignore', 'utf-8')\n : '';\n const regex = /runtime-config.json/gm;\n const hasRuntimeConfig = regex.test(gitignore ?? '');\n if (hasRuntimeConfig) {\n return;\n }\n tree.write('.gitignore', `${gitignore}\\n\\nruntime-config.json`);\n};\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","updateJson","terraformProjectGenerator","tsProjectGenerator","readAwsNxPluginConfig","addDependenciesToPackageJson","formatFilesInSubtree","esmVars","getNpmScopePrefix","getPackageManagerDisplayCommands","PACKAGES_DIR","SHARED_CONSTRUCTS_DEPENDENCIES","SHARED_CONSTRUCTS_DIR","SHARED_CONSTRUCTS_NAME","SHARED_TERRAFORM_DIR","SHARED_TERRAFORM_NAME","terraformProviderVersions","withVersions","sharedConstructsGenerator","tree","options","declaration","iac","npmScopePrefix","updateGitignore","exists","name","directory","subDirectory","delete","dirname","scopeAlias","tags","overwriteStrategy","KeepExisting","fullyQualifiedName","pkgMgrCmd","exec","Overwrite","terraformLibPath","type","projectConfig","targets","build","outputs","gitignore","read","regex","hasRuntimeConfig","test","write"],"mappings":"AAAA;;;CAGC,GACD,SACEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAGjBC,UAAU,QACL,aAAa;AACpB,OAAOC,+BAA+B,oCAAoC;AAC1E,OAAOC,wBAAwB,yBAAyB;AACxD,SAASC,qBAAqB,QAAQ,oBAAoB;AAK1D,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,oBAAoB,QAAQ,cAAc;AAEnD,SAASC,OAAO,QAAQ,qBAAqB;AAC7C,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,gCAAgC,QAAQ,mBAAmB;AACpE,SACEC,YAAY,EACZC,8BAA8B,EAC9BC,qBAAqB,EACrBC,sBAAsB,EACtBC,oBAAoB,EACpBC,qBAAqB,QAChB,mCAAmC;AAE1C,SAASJ,8BAA8B,GAAG;AAE1C,SAASK,yBAAyB,EAAEC,YAAY,QAAQ,gBAAgB;AAMxE,OAAO,eAAeC,0BAGpBC,IAAU,EACVC,OAAyC,EACzCC,WAAsE;IAEtE,MAAM,EAAEC,GAAG,EAAE,GAAGF;IAChB,MAAMG,iBAAiBf,kBAAkBW;IACzCK,gBAAgBL;IAEhB,IAAIG,QAAQ,OAAO;QACjB,IACE,CAACH,KAAKM,MAAM,CACV1B,kBAAkBW,cAAcE,uBAAuB,kBAEzD;YACA,MAAMT,mBAAmBgB,MAAM;gBAC7BO,MAAMb;gBACNc,WAAWjB;gBACXkB,cAAchB;YAChB;YACAO,KAAKU,MAAM,CACT9B,kBAAkBW,cAAcE,uBAAuB;YAEzDd,cACEqB,MACApB,kBACE,YAAY+B,OAAO,EACnB,SACAlB,uBACA,QAEFb,kBAAkBW,cAAcE,uBAAuB,QACvD;gBACEW;gBACAQ,YAAYR;gBACZS,MAAM5B,sBAAsBe,OAAOa,QAAQ,EAAE;gBAC7C,GAAGzB,QAAQY,KAAK;YAClB,GACA;gBACEc,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,YAAY;YACnD;YAGF,MAAM5B,qBAAqBa;QAC7B;IACF;AACF;AAEA,MAAMK,kBAAkB,CAACL;IACvB,MAAM0B,YAAY1B,KAAKM,MAAM,CAAC,gBAC1BN,KAAK2B,IAAI,CAAC,cAAc,WACxB;IACJ,MAAMC,QAAQ;IACd,MAAMC,mBAAmBD,MAAME,IAAI,CAACJ,aAAa;IACjD,IAAIG,kBAAkB;QACpB;IACF;IACA7B,KAAK+B,KAAK,CAAC,cAAc,GAAGL,UAAU,uBAAuB,CAAC;AAChE"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/shared-constructs.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type ProjectConfiguration,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport terraformProjectGenerator from '../terraform/project/generator.js';\nimport tsProjectGenerator from '../ts/lib/generator.js';\nimport { addCdkTestGlobalSetup } from './cdk-test-setup.js';\nimport { readAwsNxPluginConfig } from './config/utils.js';\nimport type {\n DependencyDeclaration,\n MustDeclare,\n} from './declared-dependencies.js';\nimport { addDependenciesToPackageJson } from './dependencies.js';\nimport { formatFilesInSubtree } from './format.js';\nimport type { Iac } from './iac.js';\nimport { esmVars } from './module-format.js';\nimport { getNpmScopePrefix } from './npm-scope.js';\nimport { getPackageManagerDisplayCommands } from './pkg-manager.js';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DEPENDENCIES,\n SHARED_CONSTRUCTS_DIR,\n SHARED_CONSTRUCTS_NAME,\n SHARED_TERRAFORM_DIR,\n SHARED_TERRAFORM_NAME,\n} from './shared-constructs-constants.js';\n\nexport { SHARED_CONSTRUCTS_DEPENDENCIES };\n\nimport { terraformProviderVersions, withVersions } from './versions.js';\n\nexport interface SharedConstructsGeneratorOptions {\n iac: Iac;\n}\n\nexport async function sharedConstructsGenerator<\n const D extends DependencyDeclaration,\n>(\n tree: Tree,\n options: SharedConstructsGeneratorOptions,\n declaration: D & MustDeclare<typeof SHARED_CONSTRUCTS_DEPENDENCIES, D>,\n) {\n const { iac } = options;\n const npmScopePrefix = getNpmScopePrefix(tree);\n updateGitignore(tree);\n\n if (iac === 'cdk') {\n if (\n !tree.exists(\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR, 'project.json'),\n )\n ) {\n await tsProjectGenerator(tree, {\n name: SHARED_CONSTRUCTS_NAME,\n directory: PACKAGES_DIR,\n subDirectory: SHARED_CONSTRUCTS_DIR,\n });\n tree.delete(\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR, 'src'),\n );\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n 'files',\n SHARED_CONSTRUCTS_DIR,\n 'src',\n ),\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR, 'src'),\n {\n npmScopePrefix,\n scopeAlias: npmScopePrefix,\n tags: readAwsNxPluginConfig(tree)?.tags ?? [],\n ...esmVars(tree),\n },\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'common', 'readme'),\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR),\n {\n fullyQualifiedName: `${npmScopePrefix}${SHARED_CONSTRUCTS_NAME}`,\n name: SHARED_CONSTRUCTS_NAME,\n pkgMgrCmd: getPackageManagerDisplayCommands().exec,\n },\n {\n overwriteStrategy: OverwriteStrategy.Overwrite,\n },\n );\n addDependenciesToPackageJson(\n tree,\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_CONSTRUCTS_DEPENDENCIES\n >,\n ['constructs', 'aws-cdk-lib'],\n ),\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_CONSTRUCTS_DEPENDENCIES\n >,\n ['@types/node'],\n ),\n joinPathFragments(\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR),\n 'package.json',\n ),\n );\n await addCdkTestGlobalSetup(\n tree,\n joinPathFragments(PACKAGES_DIR, SHARED_CONSTRUCTS_DIR),\n );\n await formatFilesInSubtree(tree);\n }\n }\n\n // Handle Terraform provider\n if (iac === 'terraform') {\n const terraformLibPath = joinPathFragments(\n PACKAGES_DIR,\n SHARED_TERRAFORM_DIR,\n );\n if (!tree.exists(joinPathFragments(terraformLibPath, 'project.json'))) {\n await terraformProjectGenerator(tree, {\n name: SHARED_TERRAFORM_NAME,\n directory: joinPathFragments(PACKAGES_DIR, 'common'),\n type: 'library',\n });\n\n // `build` is a no-op orchestration target that produces no files of its\n // own. Terraform writes runtime-config entries into\n // `dist/{projectRoot}/runtime-config` at apply time, and other terraform\n // projects contribute their own entries to the same directory. Without\n // explicit outputs, Nx infers `dist/{projectRoot}` as this target's\n // cached output and, on a cache hit, restores the cached copy over the\n // freshly-applied config — wiping the very values consumers read. Declare\n // no outputs so Nx never treats runtime config as a cacheable artifact.\n updateJson(\n tree,\n joinPathFragments(PACKAGES_DIR, SHARED_TERRAFORM_DIR, 'project.json'),\n (projectConfig: ProjectConfiguration) => {\n projectConfig.targets ??= {};\n projectConfig.targets.build ??= {};\n projectConfig.targets.build.outputs = [];\n return projectConfig;\n },\n );\n\n tree.delete(joinPathFragments(terraformLibPath, 'src', 'main.tf'));\n\n // Create the metrics.tf file with empty initial values\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'terraform'),\n terraformLibPath,\n { ...terraformProviderVersions() },\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n\n await formatFilesInSubtree(tree);\n }\n }\n}\n\nconst updateGitignore = (tree: Tree) => {\n const gitignore = tree.exists('.gitignore')\n ? tree.read('.gitignore', 'utf-8')\n : '';\n const regex = /runtime-config.json/gm;\n const hasRuntimeConfig = regex.test(gitignore ?? '');\n if (hasRuntimeConfig) {\n return;\n }\n tree.write('.gitignore', `${gitignore}\\n\\nruntime-config.json`);\n};\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","updateJson","terraformProjectGenerator","tsProjectGenerator","addCdkTestGlobalSetup","readAwsNxPluginConfig","addDependenciesToPackageJson","formatFilesInSubtree","esmVars","getNpmScopePrefix","getPackageManagerDisplayCommands","PACKAGES_DIR","SHARED_CONSTRUCTS_DEPENDENCIES","SHARED_CONSTRUCTS_DIR","SHARED_CONSTRUCTS_NAME","SHARED_TERRAFORM_DIR","SHARED_TERRAFORM_NAME","terraformProviderVersions","withVersions","sharedConstructsGenerator","tree","options","declaration","iac","npmScopePrefix","updateGitignore","exists","name","directory","subDirectory","delete","dirname","scopeAlias","tags","overwriteStrategy","KeepExisting","fullyQualifiedName","pkgMgrCmd","exec","Overwrite","terraformLibPath","type","projectConfig","targets","build","outputs","gitignore","read","regex","hasRuntimeConfig","test","write"],"mappings":"AAAA;;;CAGC,GACD,SACEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAGjBC,UAAU,QACL,aAAa;AACpB,OAAOC,+BAA+B,oCAAoC;AAC1E,OAAOC,wBAAwB,yBAAyB;AACxD,SAASC,qBAAqB,QAAQ,sBAAsB;AAC5D,SAASC,qBAAqB,QAAQ,oBAAoB;AAK1D,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,oBAAoB,QAAQ,cAAc;AAEnD,SAASC,OAAO,QAAQ,qBAAqB;AAC7C,SAASC,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,gCAAgC,QAAQ,mBAAmB;AACpE,SACEC,YAAY,EACZC,8BAA8B,EAC9BC,qBAAqB,EACrBC,sBAAsB,EACtBC,oBAAoB,EACpBC,qBAAqB,QAChB,mCAAmC;AAE1C,SAASJ,8BAA8B,GAAG;AAE1C,SAASK,yBAAyB,EAAEC,YAAY,QAAQ,gBAAgB;AAMxE,OAAO,eAAeC,0BAGpBC,IAAU,EACVC,OAAyC,EACzCC,WAAsE;IAEtE,MAAM,EAAEC,GAAG,E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B,MAAM;YACR;YAEA,wEAAwE;YACxE,oDAAoD;YACpD,yEAAyE;YACzE,uEAAuE;YACvE,oEAAoE;YACpE,uEAAuE;YACvE,0EAA0E;YAC1E,wEAAwE;YACxExC,WACEmB,MACArB,kBAAkBY,cAAcI,sBAAsB,iBACtD,CAAC2B;gBACCA,cAAcC,OAAO,KAAK,CAAC;gBAC3BD,cAAcC,OAAO,CAACC,KAAK,KAAK,CAAC;gBACjCF,cAAcC,OAAO,CAACC,KAAK,CAACC,OAAO,GAAG,EAAE;gBACxC,OAAOH;YACT;YAGFtB,KAAKU,MAAM,CAAC/B,kBAAkByC,kBAAkB,OAAO;YAEvD,uDAAuD;YACvD1C,cACEsB,MACArB,kBAAkB,YAAYgC,OAAO,EAAE,SAAS,cAChDS,kBACA;gBAAE,GAAGvB,2BAA2B;YAAC,GACjC;gBACEiB,mBAAmBlC,kBAAkBmC,YAAY;YACnD;YAGF,MAAM5B,qBAAqBa;QAC7B;IACF;AACF;AAEA,MAAMK,kBAAkB,CAACL;IACvB,MAAM0B,YAAY1B,KAAKM,MAAM,CAAC,gBAC1BN,KAAK2B,IAAI,CAAC,cAAc,WACxB;IACJ,MAAMC,QAAQ;IACd,MAAMC,mBAAmBD,MAAME,IAAI,CAACJ,aAAa;IACjD,IAAIG,kBAAkB;QACpB;IACF;IACA7B,KAAK+B,KAAK,CAAC,cAAc,GAAGL,UAAU,uBAAuB,CAAC;AAChE"}
@@ -6,3 +6,9 @@
6
6
  export declare const PY_CLIENT_VERIFIER_DEPENDENCIES: string[];
7
7
  /** The type checker every Python worker installs alongside its dependencies. */
8
8
  export declare const PY_VERIFIER_TYPE_CHECKER: string;
9
+ /**
10
+ * The packages a project generated by `py#dynamodb` imports, at the versions
11
+ * the generator vends. The worker itself imports the py-client packages, so
12
+ * they are included too.
13
+ */
14
+ export declare const PY_DYNAMODB_VERIFIER_DEPENDENCIES: string[];
@@ -2,6 +2,7 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */ import { OPEN_API_PY_CLIENT_DEPENDENCIES } from "../../open-api/py-client/generator.js";
5
+ import { DEPENDENCIES as PY_DYNAMODB_DEPENDENCIES } from "../../py/dynamodb/generator.js";
5
6
  import { declaredNames } from "../declared-dependencies.js";
6
7
  import { PY_VERSIONS, withPyVersions } from "../versions.js";
7
8
  /**
@@ -10,5 +11,13 @@ import { PY_VERSIONS, withPyVersions } from "../versions.js";
10
11
  * exactly what a consumer gets.
11
12
  */ export const PY_CLIENT_VERIFIER_DEPENDENCIES = withPyVersions(OPEN_API_PY_CLIENT_DEPENDENCIES, declaredNames(OPEN_API_PY_CLIENT_DEPENDENCIES.py));
12
13
  /** The type checker every Python worker installs alongside its dependencies. */ export const PY_VERIFIER_TYPE_CHECKER = `ty${PY_VERSIONS.ty}`;
14
+ /**
15
+ * The packages a project generated by `py#dynamodb` imports, at the versions
16
+ * the generator vends. The worker itself imports the py-client packages, so
17
+ * they are included too.
18
+ */ export const PY_DYNAMODB_VERIFIER_DEPENDENCIES = [
19
+ ...withPyVersions(PY_DYNAMODB_DEPENDENCIES, declaredNames(PY_DYNAMODB_DEPENDENCIES.py)),
20
+ ...PY_CLIENT_VERIFIER_DEPENDENCIES
21
+ ];
13
22
 
14
23
  //# sourceMappingURL=python-dependencies.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/test/python-dependencies.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { OPEN_API_PY_CLIENT_DEPENDENCIES } from '../../open-api/py-client/generator.js';\nimport { declaredNames } from '../declared-dependencies.js';\nimport { PY_VERSIONS, withPyVersions } from '../versions.js';\n\n/**\n * The packages a client generated by `open-api#py-client` imports, at the\n * versions the generator vends — so a worker runs the code under test against\n * exactly what a consumer gets.\n */\nexport const PY_CLIENT_VERIFIER_DEPENDENCIES: string[] = withPyVersions(\n OPEN_API_PY_CLIENT_DEPENDENCIES,\n declaredNames(OPEN_API_PY_CLIENT_DEPENDENCIES.py),\n);\n\n/** The type checker every Python worker installs alongside its dependencies. */\nexport const PY_VERIFIER_TYPE_CHECKER = `ty${PY_VERSIONS.ty}`;\n"],"names":["OPEN_API_PY_CLIENT_DEPENDENCIES","declaredNames","PY_VERSIONS","withPyVersions","PY_CLIENT_VERIFIER_DEPENDENCIES","py","PY_VERIFIER_TYPE_CHECKER","ty"],"mappings":"AAAA;;;CAGC,GACD,SAASA,+BAA+B,QAAQ,wCAAwC;AACxF,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,EAAEC,cAAc,QAAQ,iBAAiB;AAE7D;;;;CAIC,GACD,OAAO,MAAMC,kCAA4CD,eACvDH,iCACAC,cAAcD,gCAAgCK,EAAE,GAChD;AAEF,8EAA8E,GAC9E,OAAO,MAAMC,2BAA2B,CAAC,EAAE,EAAEJ,YAAYK,EAAE,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/test/python-dependencies.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { OPEN_API_PY_CLIENT_DEPENDENCIES } from '../../open-api/py-client/generator.js';\nimport { DEPENDENCIES as PY_DYNAMODB_DEPENDENCIES } from '../../py/dynamodb/generator.js';\nimport { declaredNames } from '../declared-dependencies.js';\nimport { PY_VERSIONS, withPyVersions } from '../versions.js';\n\n/**\n * The packages a client generated by `open-api#py-client` imports, at the\n * versions the generator vends — so a worker runs the code under test against\n * exactly what a consumer gets.\n */\nexport const PY_CLIENT_VERIFIER_DEPENDENCIES: string[] = withPyVersions(\n OPEN_API_PY_CLIENT_DEPENDENCIES,\n declaredNames(OPEN_API_PY_CLIENT_DEPENDENCIES.py),\n);\n\n/** The type checker every Python worker installs alongside its dependencies. */\nexport const PY_VERIFIER_TYPE_CHECKER = `ty${PY_VERSIONS.ty}`;\n\n/**\n * The packages a project generated by `py#dynamodb` imports, at the versions\n * the generator vends. The worker itself imports the py-client packages, so\n * they are included too.\n */\nexport const PY_DYNAMODB_VERIFIER_DEPENDENCIES: string[] = [\n ...withPyVersions(\n PY_DYNAMODB_DEPENDENCIES,\n declaredNames(PY_DYNAMODB_DEPENDENCIES.py),\n ),\n ...PY_CLIENT_VERIFIER_DEPENDENCIES,\n];\n"],"names":["OPEN_API_PY_CLIENT_DEPENDENCIES","DEPENDENCIES","PY_DYNAMODB_DEPENDENCIES","declaredNames","PY_VERSIONS","withPyVersions","PY_CLIENT_VERIFIER_DEPENDENCIES","py","PY_VERIFIER_TYPE_CHECKER","ty","PY_DYNAMODB_VERIFIER_DEPENDENCIES"],"mappings":"AAAA;;;CAGC,GACD,SAASA,+BAA+B,QAAQ,wCAAwC;AACxF,SAASC,gBAAgBC,wBAAwB,QAAQ,iCAAiC;AAC1F,SAASC,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,EAAEC,cAAc,QAAQ,iBAAiB;AAE7D;;;;CAIC,GACD,OAAO,MAAMC,kCAA4CD,eACvDL,iCACAG,cAAcH,gCAAgCO,EAAE,GAChD;AAEF,8EAA8E,GAC9E,OAAO,MAAMC,2BAA2B,CAAC,EAAE,EAAEJ,YAAYK,EAAE,EAAE,CAAC;AAE9D;;;;CAIC,GACD,OAAO,MAAMC,oCAA8C;OACtDL,eACDH,0BACAC,cAAcD,yBAAyBK,EAAE;OAExCD;CACJ,CAAC"}
@@ -2,7 +2,8 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */ import { execFileSync } from "child_process";
5
- import { PY_CLIENT_VERIFIER_DEPENDENCIES, PY_VERIFIER_TYPE_CHECKER } from "./python-dependencies.js";
5
+ import { pyenvPythonVersion } from "../versions.js";
6
+ import { PY_CLIENT_VERIFIER_DEPENDENCIES, PY_DYNAMODB_VERIFIER_DEPENDENCIES, PY_VERIFIER_TYPE_CHECKER } from "./python-dependencies.js";
6
7
  /**
7
8
  * Vitest globalSetup that warms uv's cache once before any worker spawns.
8
9
  *
@@ -20,26 +21,44 @@ import { PY_CLIENT_VERIFIER_DEPENDENCIES, PY_VERIFIER_TYPE_CHECKER } from "./pyt
20
21
  * swallowed: a broken cache otherwise degrades silently to every worker racing a
21
22
  * cold one, which is the startup failure this exists to prevent.
22
23
  */ export default function setup() {
23
- // The same set the verifier installs, so the warm cache is the one it hits.
24
- const deps = [
25
- ...PY_CLIENT_VERIFIER_DEPENDENCIES,
26
- PY_VERIFIER_TYPE_CHECKER
27
- ].flatMap((spec)=>[
28
- '--with',
29
- spec
30
- ]);
31
- try {
32
- execFileSync('uv', [
33
- 'run',
34
- ...deps,
35
- 'python',
36
- '-c',
37
- ''
38
- ], {
39
- stdio: 'ignore'
40
- });
41
- } catch (error) {
42
- console.warn(`Could not warm uv's cache, so each Python worker will install its own ` + `dependencies and may time out starting up: ${error}`);
24
+ // The same sets the verifiers install, on the same interpreters, so the warm
25
+ // cache is the one they hit. Wheels can be interpreter-specific, so each set
26
+ // is warmed on the interpreter its verifier runs.
27
+ const environments = [
28
+ {
29
+ dependencies: PY_CLIENT_VERIFIER_DEPENDENCIES
30
+ },
31
+ {
32
+ dependencies: PY_DYNAMODB_VERIFIER_DEPENDENCIES,
33
+ python: pyenvPythonVersion()
34
+ }
35
+ ];
36
+ for (const { dependencies, python } of environments){
37
+ const deps = [
38
+ ...dependencies,
39
+ PY_VERIFIER_TYPE_CHECKER
40
+ ].flatMap((spec)=>[
41
+ '--with',
42
+ spec
43
+ ]);
44
+ const interpreter = python ? [
45
+ '--python',
46
+ python
47
+ ] : [];
48
+ try {
49
+ execFileSync('uv', [
50
+ 'run',
51
+ ...interpreter,
52
+ ...deps,
53
+ 'python',
54
+ '-c',
55
+ ''
56
+ ], {
57
+ stdio: 'ignore'
58
+ });
59
+ } catch (error) {
60
+ console.warn(`Could not warm uv's cache, so each Python worker will install its own ` + `dependencies and may time out starting up: ${error}`);
61
+ }
43
62
  }
44
63
  }
45
64
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/test/warm-python-cache.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { execFileSync } from 'child_process';\nimport {\n PY_CLIENT_VERIFIER_DEPENDENCIES,\n PY_VERIFIER_TYPE_CHECKER,\n} from './python-dependencies.js';\n\n/**\n * Vitest globalSetup that warms uv's cache once before any worker spawns.\n *\n * `PythonVerifier` starts a `uv run --with …` worker per spec file. On a cold\n * cache the first invocation takes an exclusive write lock while it downloads\n * and installs those packages; with many workers racing that lock, startup\n * stalls and a worker can be torn down before it answers. Installing them once\n * up front means every worker hits a warm cache, where uv only takes shared\n * locks.\n *\n * Mirrors the pre-warm this suite used for `ruff` before it moved in-process.\n *\n * A failure here is not fatal — a missing `uv` is reported by the verifier\n * itself, with a message naming the tool — but it is warned about rather than\n * swallowed: a broken cache otherwise degrades silently to every worker racing a\n * cold one, which is the startup failure this exists to prevent.\n */\nexport default function setup() {\n // The same set the verifier installs, so the warm cache is the one it hits.\n const deps = [\n ...PY_CLIENT_VERIFIER_DEPENDENCIES,\n PY_VERIFIER_TYPE_CHECKER,\n ].flatMap((spec) => ['--with', spec]);\n try {\n execFileSync('uv', ['run', ...deps, 'python', '-c', ''], {\n stdio: 'ignore',\n });\n } catch (error) {\n console.warn(\n `Could not warm uv's cache, so each Python worker will install its own ` +\n `dependencies and may time out starting up: ${error}`,\n );\n }\n}\n"],"names":["execFileSync","PY_CLIENT_VERIFIER_DEPENDENCIES","PY_VERIFIER_TYPE_CHECKER","setup","deps","flatMap","spec","stdio","error","console","warn"],"mappings":"AAAA;;;CAGC,GACD,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SACEC,+BAA+B,EAC/BC,wBAAwB,QACnB,2BAA2B;AAElC;;;;;;;;;;;;;;;;CAgBC,GACD,eAAe,SAASC;IACtB,4EAA4E;IAC5E,MAAMC,OAAO;WACRH;QACHC;KACD,CAACG,OAAO,CAAC,CAACC,OAAS;YAAC;YAAUA;SAAK;IACpC,IAAI;QACFN,aAAa,MAAM;YAAC;eAAUI;YAAM;YAAU;YAAM;SAAG,EAAE;YACvDG,OAAO;QACT;IACF,EAAE,OAAOC,OAAO;QACdC,QAAQC,IAAI,CACV,CAAC,sEAAsE,CAAC,GACtE,CAAC,2CAA2C,EAAEF,OAAO;IAE3D;AACF"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/test/warm-python-cache.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { execFileSync } from 'child_process';\nimport { pyenvPythonVersion } from '../versions.js';\nimport {\n PY_CLIENT_VERIFIER_DEPENDENCIES,\n PY_DYNAMODB_VERIFIER_DEPENDENCIES,\n PY_VERIFIER_TYPE_CHECKER,\n} from './python-dependencies.js';\n\n/**\n * Vitest globalSetup that warms uv's cache once before any worker spawns.\n *\n * `PythonVerifier` starts a `uv run --with …` worker per spec file. On a cold\n * cache the first invocation takes an exclusive write lock while it downloads\n * and installs those packages; with many workers racing that lock, startup\n * stalls and a worker can be torn down before it answers. Installing them once\n * up front means every worker hits a warm cache, where uv only takes shared\n * locks.\n *\n * Mirrors the pre-warm this suite used for `ruff` before it moved in-process.\n *\n * A failure here is not fatal — a missing `uv` is reported by the verifier\n * itself, with a message naming the tool — but it is warned about rather than\n * swallowed: a broken cache otherwise degrades silently to every worker racing a\n * cold one, which is the startup failure this exists to prevent.\n */\nexport default function setup() {\n // The same sets the verifiers install, on the same interpreters, so the warm\n // cache is the one they hit. Wheels can be interpreter-specific, so each set\n // is warmed on the interpreter its verifier runs.\n const environments: { dependencies: string[]; python?: string }[] = [\n { dependencies: PY_CLIENT_VERIFIER_DEPENDENCIES },\n {\n dependencies: PY_DYNAMODB_VERIFIER_DEPENDENCIES,\n python: pyenvPythonVersion(),\n },\n ];\n for (const { dependencies, python } of environments) {\n const deps = [...dependencies, PY_VERIFIER_TYPE_CHECKER].flatMap((spec) => [\n '--with',\n spec,\n ]);\n const interpreter = python ? ['--python', python] : [];\n try {\n execFileSync('uv', ['run', ...interpreter, ...deps, 'python', '-c', ''], {\n stdio: 'ignore',\n });\n } catch (error) {\n console.warn(\n `Could not warm uv's cache, so each Python worker will install its own ` +\n `dependencies and may time out starting up: ${error}`,\n );\n }\n }\n}\n"],"names":["execFileSync","pyenvPythonVersion","PY_CLIENT_VERIFIER_DEPENDENCIES","PY_DYNAMODB_VERIFIER_DEPENDENCIES","PY_VERIFIER_TYPE_CHECKER","setup","environments","dependencies","python","deps","flatMap","spec","interpreter","stdio","error","console","warn"],"mappings":"AAAA;;;CAGC,GACD,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,kBAAkB,QAAQ,iBAAiB;AACpD,SACEC,+BAA+B,EAC/BC,iCAAiC,EACjCC,wBAAwB,QACnB,2BAA2B;AAElC;;;;;;;;;;;;;;;;CAgBC,GACD,eAAe,SAASC;IACtB,6EAA6E;IAC7E,6EAA6E;IAC7E,kDAAkD;IAClD,MAAMC,eAA8D;QAClE;YAAEC,cAAcL;QAAgC;QAChD;YACEK,cAAcJ;YACdK,QAAQP;QACV;KACD;IACD,KAAK,MAAM,EAAEM,YAAY,EAAEC,MAAM,EAAE,IAAIF,aAAc;QACnD,MAAMG,OAAO;eAAIF;YAAcH;SAAyB,CAACM,OAAO,CAAC,CAACC,OAAS;gBACzE;gBACAA;aACD;QACD,MAAMC,cAAcJ,SAAS;YAAC;YAAYA;SAAO,GAAG,EAAE;QACtD,IAAI;YACFR,aAAa,MAAM;gBAAC;mBAAUY;mBAAgBH;gBAAM;gBAAU;gBAAM;aAAG,EAAE;gBACvEI,OAAO;YACT;QACF,EAAE,OAAOC,OAAO;YACdC,QAAQC,IAAI,CACV,CAAC,sEAAsE,CAAC,GACtE,CAAC,2CAA2C,EAAEF,OAAO;QAE3D;IACF;AACF"}
@@ -204,7 +204,7 @@ export declare const PY_VERSIONS: {
204
204
  readonly 'strands-agents': "==1.57.2";
205
205
  readonly 'strands-agents[a2a]': "==1.57.2";
206
206
  readonly 'strands-agents-tools': "==0.8.9";
207
- readonly ty: "==0.0.84";
207
+ readonly ty: "==0.0.86";
208
208
  readonly pynamodb: "==6.1.0";
209
209
  readonly uvicorn: "==0.54.0";
210
210
  readonly sqlmodel: "==0.0.47";
@@ -239,7 +239,7 @@
239
239
  'strands-agents': '==1.57.2',
240
240
  'strands-agents[a2a]': '==1.57.2',
241
241
  'strands-agents-tools': '==0.8.9',
242
- ty: '==0.0.84',
242
+ ty: '==0.0.86',
243
243
  pynamodb: '==6.1.0',
244
244
  uvicorn: '==0.54.0',
245
245
  sqlmodel: '==0.0.47',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type DeclaredPy,\n type DeclaredTs,\n type DependencyDeclaration,\n declaredNames,\n} from './declared-dependencies.js';\n\n/**\n * Versons for TypeScript dependencies added by generators\n */\nexport const TS_VERSIONS = {\n '@a2a-js/sdk': '0.3.14',\n '@aws/aws-distro-opentelemetry-node-autoinstrumentation': '0.13.0',\n // Pinned above the version the ADOT autoinstrumentation package resolves\n // transitively (2.8.0) to clear CVE-2026-59892 (HIGH).\n '@opentelemetry/propagator-jaeger': '2.11.0',\n // Overridden in the vended agent/MCP image builds to clear CVE-2026-14257\n // (HIGH) in brace-expansion: minimatch 10 is the lowest major depending on\n // brace-expansion 5.x, the only line Trivy's `< 5.0.8` advisory range treats\n // as fixed. Overriding brace-expansion directly is not viable — 5.x drops the\n // CommonJS default export that minimatch 9 calls.\n minimatch: '10.2.6',\n // Both overridden in the vended RDB migration image build, which installs the\n // prisma CLI to run migrations: its own ranges resolve deepmerge-ts below the\n // CVE-2026-40345 fix (HIGH) and mysql2 below the GHSA-3f6p-5ww8-9rcr fix\n // (HIGH). Neither is imported by the handler, which drives the schema engine.\n 'deepmerge-ts': '8.0.2',\n mysql2: '3.24.5',\n '@aws-sdk/client-dynamodb': '3.1146.0',\n '@aws-sdk/client-api-gateway': '3.1146.0',\n '@aws-sdk/client-iam': '3.1146.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1146.0',\n '@aws-sdk/client-bedrock-runtime': '3.1146.0',\n '@aws-sdk/client-s3': '3.1146.0',\n '@aws-sdk/client-sts': '3.1146.0',\n '@aws-sdk/client-cognito-identity-provider': '3.1146.0',\n '@aws-sdk/credential-providers': '3.1146.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.71',\n '@aws-sdk/client-secrets-manager': '3.1146.0',\n '@aws-sdk/rds-signer': '3.1146.0',\n '@smithy/server-apigateway': '0.3.3',\n '@smithy/server-node': '0.3.3',\n '@aws-lambda-powertools/logger': '2.35.0',\n '@aws-lambda-powertools/metrics': '2.35.0',\n '@aws-lambda-powertools/parameters': '2.35.0',\n '@aws-lambda-powertools/tracer': '2.35.0',\n '@aws-lambda-powertools/parser': '2.35.0',\n '@aws-sdk/client-appconfigdata': '3.1146.0',\n '@middy/core': '7.9.2',\n '@nxlv/python': '23.2.1',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.2.1',\n '@nx/devkit': '23.2.1',\n '@nx/js': '23.2.1',\n '@nx/react': '23.2.1',\n '@nx/vite': '23.2.1',\n '@nx/vitest': '23.2.1',\n '@nx/workspace': '23.2.1',\n 'create-nx-workspace': '23.2.1',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.13',\n '@modelcontextprotocol/sdk': '1.32.0',\n '@modelcontextprotocol/inspector': '2.9.0',\n '@ag-ui/a2ui-toolkit': '0.0.4',\n '@ag-ui/aws-strands': '0.3.0',\n '@ag-ui/client': '0.0.59',\n '@ag-ui/core': '0.0.59',\n '@ag-ui/encoder': '0.0.59',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.74.0',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.19.0',\n '@tanstack/react-router': '1.170.41',\n '@tanstack/router-plugin': '1.168.42',\n '@tanstack/router-generator': '1.167.40',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.3',\n '@cloudscape-design/board-components': '3.0.236',\n '@cloudscape-design/chat-components': '1.0.177',\n '@cloudscape-design/components': '3.0.1391',\n '@cloudscape-design/global-styles': '1.0.71',\n '@tanstack/react-query': '5.104.1',\n '@tanstack/react-query-devtools': '5.104.1',\n '@trpc/tanstack-react-query': '11.19.0',\n '@trpc/client': '11.19.0',\n '@trpc/server': '11.19.0',\n '@types/node': '26.6.4',\n '@types/aws-lambda': '8.10.164',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.2',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.7.2',\n '@smithy/node-config-provider': '4.6.2',\n '@smithy/node-http-handler': '4.12.1',\n '@smithy/types': '4.19.0',\n '@vitest/coverage-v8': '4.1.11',\n '@vitest/ui': '4.1.11',\n '@astrojs/react': '6.0.6',\n '@astrojs/starlight': '0.42.5',\n astro: '7.3.5',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1144.0',\n 'aws-cdk-lib': '2.272.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.1',\n 'class-variance-authority': '0.7.1',\n cn: '0.4.0',\n commander: '15.0.0',\n electrodb: '3.9.3',\n esbuild: '0.28.2',\n 'event-source-polyfill': '1.0.31',\n '@types/event-source-polyfill': '1.0.5',\n '@biomejs/biome': '2.5.15',\n '@prisma/adapter-mariadb': '7.10.0',\n '@prisma/adapter-pg': '7.10.0',\n '@prisma/client': '7.10.0',\n ejs: '6.0.1',\n '@types/ejs': '3.1.5',\n express: '5.2.1',\n 'fast-glob': '3.3.3',\n husky: '9.1.7',\n 'fs-extra': '11.4.1',\n '@types/fs-extra': '11.0.4',\n mariadb: '3.5.4',\n mise: '2026.10.1',\n npm: '12.2.0',\n 'npm-check-updates': '23.1.0',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.1',\n prisma: '7.10.0',\n 'react-oidc-context': '3.3.1',\n react: '19.3.0',\n 'react-dom': '19.3.0',\n rolldown: '1.2.12',\n 'rolldown-plugin-dts': '0.28.6',\n shx: '0.4.0',\n 'simple-git': '4.0.2',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.30.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.15',\n 'lucide-react': '1.51.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.21.1',\n 'tw-animate-css': '1.4.0',\n vite: '8.3.2',\n typescript: '6.0.3',\n vitest: '4.1.11',\n // The `testEnvironment` @nx/vitest writes into every generated config.\n jsdom: '29.1.1',\n zod: '4.6.5',\n ws: '8.22.0',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\n\n/**\n * Dependencies that must move as a unit, held at the lowest version proposed\n * across each group by the version update. Members must share a version line.\n *\n * The wasm formatter bindings are dependencies of this repo rather than vended\n * pins, so they are named here but versioned in the manifests.\n */\nexport const LOCKSTEP_GROUPS = [\n // A duplicate `@ag-ui/client` fails every generated website with TS2322.\n ['@ag-ui/client', '@ag-ui/core', '@ag-ui/encoder'],\n // The wasm bindings format generated files; the CLI checks them.\n ['@biomejs/wasm-nodejs', '@biomejs/biome'],\n ['@astral-sh/ruff-wasm-nodejs', 'ruff'],\n] as const satisfies readonly (readonly [string, string, ...string[]])[];\n\n/**\n * Add versions to the given dependencies, which the declaration must own.\n *\n * @param declaration the calling generator's `DEPENDENCIES`\n */\nexport const withVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredTs<D>[],\n): Record<string, string> => {\n assertDeclared(declaration.ts, deps, 'ts');\n return Object.fromEntries(\n deps.map((dep) => [dep, TS_VERSIONS[dep as ITsDepVersion]]),\n );\n};\n\n/**\n * The `nx` and `@nx/*` packages a generated workspace pins, all of which must\n * hold the same version: a workspace nx even a patch apart hoists a second\n * nested nx, and the two deadlock `nx sync`.\n *\n * Bumping them in a user's workspace requires `packageJsonUpdates` rather than a\n * migration — see `version-upgrade-migration/nx-package-updates.ts`.\n */\nexport const NX_PACKAGES = [\n 'nx',\n '@nx/devkit',\n '@nx/js',\n '@nx/react',\n '@nx/vite',\n '@nx/vitest',\n '@nx/workspace',\n] as const satisfies readonly ITsDepVersion[];\n\n/**\n * The nx version the plugin is built against, and the single source of truth\n * for every place a workspace's nx is pinned.\n */\nexport const NX_VERSION = TS_VERSIONS.nx;\n\n/**\n * Versions for Python dependencies added by generators\n */\nexport const PY_VERSIONS = {\n 'a2a-sdk': '==0.3.26',\n 'ag-ui-langgraph': '==0.0.46',\n 'ag-ui-protocol': '==0.1.22',\n 'ag-ui-strands': '==0.4.1',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.35.0',\n 'aws-lambda-powertools[tracer]': '==3.35.0',\n 'aws-lambda-powertools[parser]': '==3.35.0',\n 'aws-opentelemetry-distro': '==0.21.0',\n 'bedrock-agentcore': '==1.24.0',\n boto3: '==1.43.108',\n checkov: '==3.3.22',\n fastapi: '==0.142.2',\n 'fastapi[standard]': '==0.142.2',\n httpx: '==0.28.1',\n langchain: '==1.4.3',\n 'langchain-aws': '==1.8.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.12',\n 'langgraph-checkpoint-aws': '==1.2.4',\n 'langgraph-checkpoint-sqlite': '==3.1.1',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n pydantic: '==2.13.5',\n ruff: '==0.16.10',\n 'strands-agents': '==1.57.2',\n 'strands-agents[a2a]': '==1.57.2',\n 'strands-agents-tools': '==0.8.9',\n ty: '==0.0.84',\n pynamodb: '==6.1.0',\n uvicorn: '==0.54.0',\n sqlmodel: '==0.0.47',\n alembic: '==1.20.0',\n aiomysql: '==0.3.2',\n asyncpg: '==0.31.0',\n // Pinned explicitly: SQLAlchemy's async engine pulls greenlet transitively,\n // and leaving it unpinned lets uv resolve to a just-released version whose\n // platform wheels may not all be published yet (breaking aarch64 installs).\n greenlet: '==3.5.6',\n} as const;\nexport type IPyDepVersion = keyof typeof PY_VERSIONS;\n\n/**\n * Add versions to the given dependencies\n */\nexport const withPyVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredPy<D>[],\n): string[] => {\n assertDeclared(declaration.py, deps, 'py');\n return deps.map((dep) => `${dep}${PY_VERSIONS[dep as IPyDepVersion]}`);\n};\n\n/** Catches undeclared packages that reach here past the type checker. */\nconst assertDeclared = (\n declared: readonly { readonly name: string }[],\n deps: readonly unknown[],\n kind: 'ts' | 'py',\n): void => {\n const names = declaredNames(declared);\n const undeclared = deps.filter((dep) => !names.includes(dep as string));\n if (undeclared.length > 0) {\n throw new Error(\n `Undeclared ${kind} dependencies: ${undeclared.join(', ')}. Add them to the generator's declareDependencies({ ${kind}: [...] }).`,\n );\n }\n};\n\n/**\n * Versions for vendored tools\n */\nexport const VENDORED_VERSIONS = {\n 'git-secrets': '1.3.0',\n} as const;\n\n/**\n * Versions of Java dependencies added by generators, keyed by Maven coordinate.\n *\n * Every entry is resolved from Maven Central by the version update and named\n * `<group>:<artifact>:<version>` where a generator writes it.\n */\nexport const JAVA_VERSIONS = {\n 'software.amazon.smithy:smithy-model': '1.74.0',\n 'software.amazon.smithy:smithy-aws-traits': '1.74.0',\n 'software.amazon.smithy:smithy-validation-model': '1.74.0',\n 'software.amazon.smithy:smithy-openapi': '1.74.0',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.54.0',\n} as const;\nexport type IJavaVersion = keyof typeof JAVA_VERSIONS;\n\n/** The Maven coordinates the version update resolves, in declaration order. */\nexport const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS) as IJavaVersion[];\n\n/** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */\nexport const javaMavenDependency = (artifact: IJavaVersion): string =>\n `${artifact}:${JAVA_VERSIONS[artifact]}`;\n\n/**\n * Versions of tools resolved by mise, keyed by the tool name mise knows.\n *\n * Every entry is checked with `mise latest <tool>` by the version update. Nothing\n * is installed into the workspace: the pin travels in the `project.json` target\n * command, which is what the version sync reaches to move it forward.\n */\nexport const MISE_VERSIONS = {\n smithy: '1.74.0',\n} as const;\nexport type IMiseVersion = keyof typeof MISE_VERSIONS;\n\n/** The tools the version update resolves through mise, in declaration order. */\nexport const MISE_TOOLS = Object.keys(MISE_VERSIONS) as IMiseVersion[];\n\n/**\n * Base container images used by generated Dockerfiles. Pinned exactly so\n * generated images are reproducible, and chosen to be free of known\n * HIGH/CRITICAL vulnerabilities at time of generation.\n */\nexport const BASE_IMAGES = {\n node: 'public.ecr.aws/docker/library/node:lts-slim',\n python: 'public.ecr.aws/docker/library/python:3.14-slim',\n} as const;\n\n/**\n * Versions for container tooling used by generated image build/scan targets.\n * Pinned exactly so generated images are reproducible.\n */\nexport const CONTAINER_VERSIONS = {\n // ECR-hosted Trivy image used to scan built images during the build.\n trivy: '0.72.0',\n} as const;\n\n/**\n * Repository each pinned tool image is pulled from, keyed as\n * {@link CONTAINER_VERSIONS}. Kept beside the versions so a tool added here is\n * one entry rather than a reference built somewhere else, which is also what\n * lets the version sync find these pins wherever a target command runs them.\n */\nexport const CONTAINER_REPOSITORIES = {\n trivy: 'public.ecr.aws/aquasecurity/trivy',\n} as const satisfies Record<keyof typeof CONTAINER_VERSIONS, string>;\n\n/** The pinned reference for a tool image, as a target command runs it. */\nexport const containerImage = (tool: keyof typeof CONTAINER_VERSIONS): string =>\n `${CONTAINER_REPOSITORIES[tool]}:${CONTAINER_VERSIONS[tool]}`;\n\n/**\n * The managed Lambda runtimes generated infrastructure targets, as the single\n * source both IaC providers derive from.\n *\n * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`\n * against `nodejs24.x` — so deriving both from the version here keeps a bump one\n * edit that moves them together. Resolved by the version update workflow.\n */\nexport const LAMBDA_RUNTIME_VERSIONS = {\n node: '24',\n python: '3.14',\n} as const;\nexport type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;\n\n/**\n * The managed AgentCore Runtime runtimes generated infrastructure targets, for\n * agents and MCP servers packaged as code rather than as a container image.\n *\n * Tracked separately from {@link LAMBDA_RUNTIME_VERSIONS}: AgentCore publishes\n * its own, smaller set, so a Lambda bump would otherwise move these to a runtime\n * AgentCore rejects at create time. Resolved by the version update workflow from\n * the `AgentCoreRuntime` members `aws-cdk-lib` publishes, the same source the\n * Lambda runtimes come from.\n */\nexport const AGENT_CORE_RUNTIME_VERSIONS = {\n node: '22',\n python: '3.14',\n} as const;\nexport type IAgentCoreRuntime = keyof typeof AGENT_CORE_RUNTIME_VERSIONS;\n\n/**\n * The runtime as AgentCore's `runtime` field names it, e.g. `NODE_22` or\n * `PYTHON_3_14`.\n */\nexport const agentCoreRuntime = (runtime: IAgentCoreRuntime): string =>\n runtime === 'node'\n ? `NODE_${AGENT_CORE_RUNTIME_VERSIONS.node}`\n : `PYTHON_${AGENT_CORE_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * The interpreter uv pins for a generated Python project, as the Lambda runtime's\n * `major.minor`.\n *\n * No patch: uv reads this as a request for any patch of that minor, so it resolves\n * whichever one the platform has a build for. Naming an exact patch pins one that\n * may not exist everywhere, and Lambda patches the interpreter itself, so the minor\n * is the whole of what a project needs to agree on.\n */\nexport const pyenvPythonVersion = (): string => LAMBDA_RUNTIME_VERSIONS.python;\n\n/**\n * The `[project].requires-python` specifier for a generated Python project.\n *\n * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter\n * is that version, and Ruff derives its `target-version` from this (`py314`), so\n * lint targets the same version the function runs on.\n */\nexport const pyprojectPythonDependency = (): string =>\n `>=${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */\nexport const terraformLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x`\n : `python${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/**\n * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.\n * Always an explicitly versioned member, never a `_LATEST` alias.\n */\nexport const cdkLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X`\n : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * Substitution variables exposing the pinned runtimes to generated CDK\n * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with\n * {@link terraformLambdaRuntimeVars}, which names the same variables so a\n * template reads alike under either provider.\n */\nexport const cdkLambdaRuntimeVars = () => ({\n nodeRuntime: cdkLambdaRuntime('node'),\n pythonRuntime: cdkLambdaRuntime('python'),\n});\n\n/**\n * Substitution variables exposing the pinned runtimes to generated `.tf`\n * templates (e.g. `runtime = \"<%- nodeRuntime %>\"`).\n */\nexport const terraformLambdaRuntimeVars = () => ({\n nodeRuntime: terraformLambdaRuntime('node'),\n pythonRuntime: terraformLambdaRuntime('python'),\n});\n\n/**\n * Exact versions for Terraform providers used by generated `.tf` modules.\n * Pinned exactly (no range operator) so generated infrastructure is reproducible.\n */\nexport const TERRAFORM_VERSIONS = {\n aws: '6.67.0',\n random: '3.9.1',\n null: '3.3.2',\n archive: '2.8.1',\n external: '2.4.2',\n local: '2.9.1',\n time: '0.14.2',\n} as const;\nexport type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;\n\n/**\n * Substitution variables exposing Terraform provider version constraints to\n * generated `.tf` templates (e.g. `version = \"<%- awsProviderVersion %>\"`)\n */\nexport const terraformProviderVersions = () => ({\n awsProviderVersion: TERRAFORM_VERSIONS.aws,\n randomProviderVersion: TERRAFORM_VERSIONS.random,\n nullProviderVersion: TERRAFORM_VERSIONS.null,\n archiveProviderVersion: TERRAFORM_VERSIONS.archive,\n externalProviderVersion: TERRAFORM_VERSIONS.external,\n localProviderVersion: TERRAFORM_VERSIONS.local,\n timeProviderVersion: TERRAFORM_VERSIONS.time,\n});\n"],"names":["declaredNames","TS_VERSIONS","minimatch","mysql2","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","cn","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","npm","pg","prisma","react","rolldown","shx","tailwindcss","tsx","shadcn","vite","typescript","vitest","jsdom","zod","ws","LOCKSTEP_GROUPS","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","pydantic","ruff","ty","pynamodb","uvicorn","sqlmodel","alembic","aiomysql","asyncpg","greenlet","withPyVersions","py","declared","kind","names","undeclared","filter","includes","length","Error","join","VENDORED_VERSIONS","JAVA_VERSIONS","JAVA_ARTIFACTS","keys","javaMavenDependency","artifact","MISE_VERSIONS","smithy","MISE_TOOLS","BASE_IMAGES","node","python","CONTAINER_VERSIONS","trivy","CONTAINER_REPOSITORIES","containerImage","tool","LAMBDA_RUNTIME_VERSIONS","AGENT_CORE_RUNTIME_VERSIONS","agentCoreRuntime","runtime","replace","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","cdkLambdaRuntime","cdkLambdaRuntimeVars","nodeRuntime","pythonRuntime","terraformLambdaRuntimeVars","TERRAFORM_VERSIONS","aws","random","null","archive","external","local","time","terraformProviderVersions","awsProviderVersion","randomProviderVersion","nullProviderVersion","archiveProviderVersion","externalProviderVersion","localProviderVersion","timeProviderVersion"],"m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BK,QAAQ;QACpDS,sBAAsBd,mBAAmBM,KAAK;QAC9CS,qBAAqBf,mBAAmBO,IAAI;IAC9C,CAAA,EAAG"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type DeclaredPy,\n type DeclaredTs,\n type DependencyDeclaration,\n declaredNames,\n} from './declared-dependencies.js';\n\n/**\n * Versons for TypeScript dependencies added by generators\n */\nexport const TS_VERSIONS = {\n '@a2a-js/sdk': '0.3.14',\n '@aws/aws-distro-opentelemetry-node-autoinstrumentation': '0.13.0',\n // Pinned above the version the ADOT autoinstrumentation package resolves\n // transitively (2.8.0) to clear CVE-2026-59892 (HIGH).\n '@opentelemetry/propagator-jaeger': '2.11.0',\n // Overridden in the vended agent/MCP image builds to clear CVE-2026-14257\n // (HIGH) in brace-expansion: minimatch 10 is the lowest major depending on\n // brace-expansion 5.x, the only line Trivy's `< 5.0.8` advisory range treats\n // as fixed. Overriding brace-expansion directly is not viable — 5.x drops the\n // CommonJS default export that minimatch 9 calls.\n minimatch: '10.2.6',\n // Both overridden in the vended RDB migration image build, which installs the\n // prisma CLI to run migrations: its own ranges resolve deepmerge-ts below the\n // CVE-2026-40345 fix (HIGH) and mysql2 below the GHSA-3f6p-5ww8-9rcr fix\n // (HIGH). Neither is imported by the handler, which drives the schema engine.\n 'deepmerge-ts': '8.0.2',\n mysql2: '3.24.5',\n '@aws-sdk/client-dynamodb': '3.1146.0',\n '@aws-sdk/client-api-gateway': '3.1146.0',\n '@aws-sdk/client-iam': '3.1146.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1146.0',\n '@aws-sdk/client-bedrock-runtime': '3.1146.0',\n '@aws-sdk/client-s3': '3.1146.0',\n '@aws-sdk/client-sts': '3.1146.0',\n '@aws-sdk/client-cognito-identity-provider': '3.1146.0',\n '@aws-sdk/credential-providers': '3.1146.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.71',\n '@aws-sdk/client-secrets-manager': '3.1146.0',\n '@aws-sdk/rds-signer': '3.1146.0',\n '@smithy/server-apigateway': '0.3.3',\n '@smithy/server-node': '0.3.3',\n '@aws-lambda-powertools/logger': '2.35.0',\n '@aws-lambda-powertools/metrics': '2.35.0',\n '@aws-lambda-powertools/parameters': '2.35.0',\n '@aws-lambda-powertools/tracer': '2.35.0',\n '@aws-lambda-powertools/parser': '2.35.0',\n '@aws-sdk/client-appconfigdata': '3.1146.0',\n '@middy/core': '7.9.2',\n '@nxlv/python': '23.2.1',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.2.1',\n '@nx/devkit': '23.2.1',\n '@nx/js': '23.2.1',\n '@nx/react': '23.2.1',\n '@nx/vite': '23.2.1',\n '@nx/vitest': '23.2.1',\n '@nx/workspace': '23.2.1',\n 'create-nx-workspace': '23.2.1',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.13',\n '@modelcontextprotocol/sdk': '1.32.0',\n '@modelcontextprotocol/inspector': '2.9.0',\n '@ag-ui/a2ui-toolkit': '0.0.4',\n '@ag-ui/aws-strands': '0.3.0',\n '@ag-ui/client': '0.0.59',\n '@ag-ui/core': '0.0.59',\n '@ag-ui/encoder': '0.0.59',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.74.0',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.19.0',\n '@tanstack/react-router': '1.170.41',\n '@tanstack/router-plugin': '1.168.42',\n '@tanstack/router-generator': '1.167.40',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.3',\n '@cloudscape-design/board-components': '3.0.236',\n '@cloudscape-design/chat-components': '1.0.177',\n '@cloudscape-design/components': '3.0.1391',\n '@cloudscape-design/global-styles': '1.0.71',\n '@tanstack/react-query': '5.104.1',\n '@tanstack/react-query-devtools': '5.104.1',\n '@trpc/tanstack-react-query': '11.19.0',\n '@trpc/client': '11.19.0',\n '@trpc/server': '11.19.0',\n '@types/node': '26.6.4',\n '@types/aws-lambda': '8.10.164',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.2',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.7.2',\n '@smithy/node-config-provider': '4.6.2',\n '@smithy/node-http-handler': '4.12.1',\n '@smithy/types': '4.19.0',\n '@vitest/coverage-v8': '4.1.11',\n '@vitest/ui': '4.1.11',\n '@astrojs/react': '6.0.6',\n '@astrojs/starlight': '0.42.5',\n astro: '7.3.5',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1144.0',\n 'aws-cdk-lib': '2.272.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.1',\n 'class-variance-authority': '0.7.1',\n cn: '0.4.0',\n commander: '15.0.0',\n electrodb: '3.9.3',\n esbuild: '0.28.2',\n 'event-source-polyfill': '1.0.31',\n '@types/event-source-polyfill': '1.0.5',\n '@biomejs/biome': '2.5.15',\n '@prisma/adapter-mariadb': '7.10.0',\n '@prisma/adapter-pg': '7.10.0',\n '@prisma/client': '7.10.0',\n ejs: '6.0.1',\n '@types/ejs': '3.1.5',\n express: '5.2.1',\n 'fast-glob': '3.3.3',\n husky: '9.1.7',\n 'fs-extra': '11.4.1',\n '@types/fs-extra': '11.0.4',\n mariadb: '3.5.4',\n mise: '2026.10.1',\n npm: '12.2.0',\n 'npm-check-updates': '23.1.0',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.1',\n prisma: '7.10.0',\n 'react-oidc-context': '3.3.1',\n react: '19.3.0',\n 'react-dom': '19.3.0',\n rolldown: '1.2.12',\n 'rolldown-plugin-dts': '0.28.6',\n shx: '0.4.0',\n 'simple-git': '4.0.2',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.30.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.15',\n 'lucide-react': '1.51.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.21.1',\n 'tw-animate-css': '1.4.0',\n vite: '8.3.2',\n typescript: '6.0.3',\n vitest: '4.1.11',\n // The `testEnvironment` @nx/vitest writes into every generated config.\n jsdom: '29.1.1',\n zod: '4.6.5',\n ws: '8.22.0',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\n\n/**\n * Dependencies that must move as a unit, held at the lowest version proposed\n * across each group by the version update. Members must share a version line.\n *\n * The wasm formatter bindings are dependencies of this repo rather than vended\n * pins, so they are named here but versioned in the manifests.\n */\nexport const LOCKSTEP_GROUPS = [\n // A duplicate `@ag-ui/client` fails every generated website with TS2322.\n ['@ag-ui/client', '@ag-ui/core', '@ag-ui/encoder'],\n // The wasm bindings format generated files; the CLI checks them.\n ['@biomejs/wasm-nodejs', '@biomejs/biome'],\n ['@astral-sh/ruff-wasm-nodejs', 'ruff'],\n] as const satisfies readonly (readonly [string, string, ...string[]])[];\n\n/**\n * Add versions to the given dependencies, which the declaration must own.\n *\n * @param declaration the calling generator's `DEPENDENCIES`\n */\nexport const withVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredTs<D>[],\n): Record<string, string> => {\n assertDeclared(declaration.ts, deps, 'ts');\n return Object.fromEntries(\n deps.map((dep) => [dep, TS_VERSIONS[dep as ITsDepVersion]]),\n );\n};\n\n/**\n * The `nx` and `@nx/*` packages a generated workspace pins, all of which must\n * hold the same version: a workspace nx even a patch apart hoists a second\n * nested nx, and the two deadlock `nx sync`.\n *\n * Bumping them in a user's workspace requires `packageJsonUpdates` rather than a\n * migration — see `version-upgrade-migration/nx-package-updates.ts`.\n */\nexport const NX_PACKAGES = [\n 'nx',\n '@nx/devkit',\n '@nx/js',\n '@nx/react',\n '@nx/vite',\n '@nx/vitest',\n '@nx/workspace',\n] as const satisfies readonly ITsDepVersion[];\n\n/**\n * The nx version the plugin is built against, and the single source of truth\n * for every place a workspace's nx is pinned.\n */\nexport const NX_VERSION = TS_VERSIONS.nx;\n\n/**\n * Versions for Python dependencies added by generators\n */\nexport const PY_VERSIONS = {\n 'a2a-sdk': '==0.3.26',\n 'ag-ui-langgraph': '==0.0.46',\n 'ag-ui-protocol': '==0.1.22',\n 'ag-ui-strands': '==0.4.1',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.35.0',\n 'aws-lambda-powertools[tracer]': '==3.35.0',\n 'aws-lambda-powertools[parser]': '==3.35.0',\n 'aws-opentelemetry-distro': '==0.21.0',\n 'bedrock-agentcore': '==1.24.0',\n boto3: '==1.43.108',\n checkov: '==3.3.22',\n fastapi: '==0.142.2',\n 'fastapi[standard]': '==0.142.2',\n httpx: '==0.28.1',\n langchain: '==1.4.3',\n 'langchain-aws': '==1.8.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.12',\n 'langgraph-checkpoint-aws': '==1.2.4',\n 'langgraph-checkpoint-sqlite': '==3.1.1',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n pydantic: '==2.13.5',\n ruff: '==0.16.10',\n 'strands-agents': '==1.57.2',\n 'strands-agents[a2a]': '==1.57.2',\n 'strands-agents-tools': '==0.8.9',\n ty: '==0.0.86',\n pynamodb: '==6.1.0',\n uvicorn: '==0.54.0',\n sqlmodel: '==0.0.47',\n alembic: '==1.20.0',\n aiomysql: '==0.3.2',\n asyncpg: '==0.31.0',\n // Pinned explicitly: SQLAlchemy's async engine pulls greenlet transitively,\n // and leaving it unpinned lets uv resolve to a just-released version whose\n // platform wheels may not all be published yet (breaking aarch64 installs).\n greenlet: '==3.5.6',\n} as const;\nexport type IPyDepVersion = keyof typeof PY_VERSIONS;\n\n/**\n * Add versions to the given dependencies\n */\nexport const withPyVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredPy<D>[],\n): string[] => {\n assertDeclared(declaration.py, deps, 'py');\n return deps.map((dep) => `${dep}${PY_VERSIONS[dep as IPyDepVersion]}`);\n};\n\n/** Catches undeclared packages that reach here past the type checker. */\nconst assertDeclared = (\n declared: readonly { readonly name: string }[],\n deps: readonly unknown[],\n kind: 'ts' | 'py',\n): void => {\n const names = declaredNames(declared);\n const undeclared = deps.filter((dep) => !names.includes(dep as string));\n if (undeclared.length > 0) {\n throw new Error(\n `Undeclared ${kind} dependencies: ${undeclared.join(', ')}. Add them to the generator's declareDependencies({ ${kind}: [...] }).`,\n );\n }\n};\n\n/**\n * Versions for vendored tools\n */\nexport const VENDORED_VERSIONS = {\n 'git-secrets': '1.3.0',\n} as const;\n\n/**\n * Versions of Java dependencies added by generators, keyed by Maven coordinate.\n *\n * Every entry is resolved from Maven Central by the version update and named\n * `<group>:<artifact>:<version>` where a generator writes it.\n */\nexport const JAVA_VERSIONS = {\n 'software.amazon.smithy:smithy-model': '1.74.0',\n 'software.amazon.smithy:smithy-aws-traits': '1.74.0',\n 'software.amazon.smithy:smithy-validation-model': '1.74.0',\n 'software.amazon.smithy:smithy-openapi': '1.74.0',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.54.0',\n} as const;\nexport type IJavaVersion = keyof typeof JAVA_VERSIONS;\n\n/** The Maven coordinates the version update resolves, in declaration order. */\nexport const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS) as IJavaVersion[];\n\n/** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */\nexport const javaMavenDependency = (artifact: IJavaVersion): string =>\n `${artifact}:${JAVA_VERSIONS[artifact]}`;\n\n/**\n * Versions of tools resolved by mise, keyed by the tool name mise knows.\n *\n * Every entry is checked with `mise latest <tool>` by the version update. Nothing\n * is installed into the workspace: the pin travels in the `project.json` target\n * command, which is what the version sync reaches to move it forward.\n */\nexport const MISE_VERSIONS = {\n smithy: '1.74.0',\n} as const;\nexport type IMiseVersion = keyof typeof MISE_VERSIONS;\n\n/** The tools the version update resolves through mise, in declaration order. */\nexport const MISE_TOOLS = Object.keys(MISE_VERSIONS) as IMiseVersion[];\n\n/**\n * Base container images used by generated Dockerfiles. Pinned exactly so\n * generated images are reproducible, and chosen to be free of known\n * HIGH/CRITICAL vulnerabilities at time of generation.\n */\nexport const BASE_IMAGES = {\n node: 'public.ecr.aws/docker/library/node:lts-slim',\n python: 'public.ecr.aws/docker/library/python:3.14-slim',\n} as const;\n\n/**\n * Versions for container tooling used by generated image build/scan targets.\n * Pinned exactly so generated images are reproducible.\n */\nexport const CONTAINER_VERSIONS = {\n // ECR-hosted Trivy image used to scan built images during the build.\n trivy: '0.72.0',\n} as const;\n\n/**\n * Repository each pinned tool image is pulled from, keyed as\n * {@link CONTAINER_VERSIONS}. Kept beside the versions so a tool added here is\n * one entry rather than a reference built somewhere else, which is also what\n * lets the version sync find these pins wherever a target command runs them.\n */\nexport const CONTAINER_REPOSITORIES = {\n trivy: 'public.ecr.aws/aquasecurity/trivy',\n} as const satisfies Record<keyof typeof CONTAINER_VERSIONS, string>;\n\n/** The pinned reference for a tool image, as a target command runs it. */\nexport const containerImage = (tool: keyof typeof CONTAINER_VERSIONS): string =>\n `${CONTAINER_REPOSITORIES[tool]}:${CONTAINER_VERSIONS[tool]}`;\n\n/**\n * The managed Lambda runtimes generated infrastructure targets, as the single\n * source both IaC providers derive from.\n *\n * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`\n * against `nodejs24.x` — so deriving both from the version here keeps a bump one\n * edit that moves them together. Resolved by the version update workflow.\n */\nexport const LAMBDA_RUNTIME_VERSIONS = {\n node: '24',\n python: '3.14',\n} as const;\nexport type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;\n\n/**\n * The managed AgentCore Runtime runtimes generated infrastructure targets, for\n * agents and MCP servers packaged as code rather than as a container image.\n *\n * Tracked separately from {@link LAMBDA_RUNTIME_VERSIONS}: AgentCore publishes\n * its own, smaller set, so a Lambda bump would otherwise move these to a runtime\n * AgentCore rejects at create time. Resolved by the version update workflow from\n * the `AgentCoreRuntime` members `aws-cdk-lib` publishes, the same source the\n * Lambda runtimes come from.\n */\nexport const AGENT_CORE_RUNTIME_VERSIONS = {\n node: '22',\n python: '3.14',\n} as const;\nexport type IAgentCoreRuntime = keyof typeof AGENT_CORE_RUNTIME_VERSIONS;\n\n/**\n * The runtime as AgentCore's `runtime` field names it, e.g. `NODE_22` or\n * `PYTHON_3_14`.\n */\nexport const agentCoreRuntime = (runtime: IAgentCoreRuntime): string =>\n runtime === 'node'\n ? `NODE_${AGENT_CORE_RUNTIME_VERSIONS.node}`\n : `PYTHON_${AGENT_CORE_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * The interpreter uv pins for a generated Python project, as the Lambda runtime's\n * `major.minor`.\n *\n * No patch: uv reads this as a request for any patch of that minor, so it resolves\n * whichever one the platform has a build for. Naming an exact patch pins one that\n * may not exist everywhere, and Lambda patches the interpreter itself, so the minor\n * is the whole of what a project needs to agree on.\n */\nexport const pyenvPythonVersion = (): string => LAMBDA_RUNTIME_VERSIONS.python;\n\n/**\n * The `[project].requires-python` specifier for a generated Python project.\n *\n * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter\n * is that version, and Ruff derives its `target-version` from this (`py314`), so\n * lint targets the same version the function runs on.\n */\nexport const pyprojectPythonDependency = (): string =>\n `>=${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */\nexport const terraformLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x`\n : `python${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/**\n * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.\n * Always an explicitly versioned member, never a `_LATEST` alias.\n */\nexport const cdkLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X`\n : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * Substitution variables exposing the pinned runtimes to generated CDK\n * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with\n * {@link terraformLambdaRuntimeVars}, which names the same variables so a\n * template reads alike under either provider.\n */\nexport const cdkLambdaRuntimeVars = () => ({\n nodeRuntime: cdkLambdaRuntime('node'),\n pythonRuntime: cdkLambdaRuntime('python'),\n});\n\n/**\n * Substitution variables exposing the pinned runtimes to generated `.tf`\n * templates (e.g. `runtime = \"<%- nodeRuntime %>\"`).\n */\nexport const terraformLambdaRuntimeVars = () => ({\n nodeRuntime: terraformLambdaRuntime('node'),\n pythonRuntime: terraformLambdaRuntime('python'),\n});\n\n/**\n * Exact versions for Terraform providers used by generated `.tf` modules.\n * Pinned exactly (no range operator) so generated infrastructure is reproducible.\n */\nexport const TERRAFORM_VERSIONS = {\n aws: '6.67.0',\n random: '3.9.1',\n null: '3.3.2',\n archive: '2.8.1',\n external: '2.4.2',\n local: '2.9.1',\n time: '0.14.2',\n} as const;\nexport type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;\n\n/**\n * Substitution variables exposing Terraform provider version constraints to\n * generated `.tf` templates (e.g. `version = \"<%- awsProviderVersion %>\"`)\n */\nexport const terraformProviderVersions = () => ({\n awsProviderVersion: TERRAFORM_VERSIONS.aws,\n randomProviderVersion: TERRAFORM_VERSIONS.random,\n nullProviderVersion: TERRAFORM_VERSIONS.null,\n archiveProviderVersion: TERRAFORM_VERSIONS.archive,\n externalProviderVersion: TERRAFORM_VERSIONS.external,\n localProviderVersion: TERRAFORM_VERSIONS.local,\n timeProviderVersion: TERRAFORM_VERSIONS.time,\n});\n"],"names":["declaredNames","TS_VERSIONS","minimatch","mysql2","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","cn","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","npm","pg","prisma","react","rolldown","shx","tailwindcss","tsx","shadcn","vite","typescript","vitest","jsdom","zod","ws","LOCKSTEP_GROUPS","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","pydantic","ruff","ty","pynamodb","uvicorn","sqlmodel","alembic","aiomysql","asyncpg","greenlet","withPyVersions","py","declared","kind","names","undeclared","filter","includes","length","Error","join","VENDORED_VERSIONS","JAVA_VERSIONS","JAVA_ARTIFACTS","keys","javaMavenDependency","artifact","MISE_VERSIONS","smithy","MISE_TOOLS","BASE_IMAGES","node","python","CONTAINER_VERSIONS","trivy","CONTAINER_REPOSITORIES","containerImage","tool","LAMBDA_RUNTIME_VERSIONS","AGENT_CORE_RUNTIME_VERSIONS","agentCoreRuntime","runtime","replace","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","cdkLambdaRuntime","cdkLambdaRuntimeVars","nodeRuntime","pythonRuntime","terraformLambdaRuntimeVars","TERRAFORM_VERSIONS","aws","random","null","archive","external","local","time","terraformProviderVersions","awsProviderVersion","randomProviderVersion","nullProviderVersion","archiveProviderVersion","externalProviderVersion","localProviderVersion","timeProviderVersion"],"mappings":"AAAA;;;CAGC,GACD,SAIEA,aAAa,QACR,6BAA6B;AAEpC;;CAEC,GACD,OAAO,MAAMC,cAAc;IACzB,eAAe;IACf,0DAA0D;IAC1D,yEAAyE;IACzE,uDAAuD;IACvD,oCAAoC;IACpC,0EAA0E;IAC1E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,kDAAkD;IAClDC,WAAW;IACX,8EAA8E;IAC9E,8EAA8E;IAC9E,yEAAyE;IACzE,8EAA8E;IAC9E,gBAAgB;IAChBC,QAAQ;IACR,4BAA4B;IAC5B,+BAA+B;IAC/B,uBAAuB;IACvB,qCAAqC;IACrC,mCAAmC;IACnC,sBAAsB;IACtB,uBAAuB;IACvB,6CAA6C;IAC7C,iCAAiC;IACjC,i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