@aws/nx-plugin 1.0.0-rc.86 → 1.0.0-rc.87

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 (70) hide show
  1. package/migrations.json +11 -1
  2. package/package.json +1 -1
  3. package/src/infra/app/__snapshots__/generator.spec.ts.snap +34 -8
  4. package/src/infra/app/files/app/README.md.template +14 -0
  5. package/src/infra/app/generator.js +15 -2
  6. package/src/infra/app/generator.js.map +1 -1
  7. package/src/mcp-server/tools/general-guidance.js +1 -1
  8. package/src/mcp-server/tools/general-guidance.js.map +1 -1
  9. package/src/migrations/latest/add-destroy-sandbox-target/metadata.json +3 -0
  10. package/src/migrations/latest/add-destroy-sandbox-target/migration.d.ts +6 -0
  11. package/src/migrations/latest/add-destroy-sandbox-target/migration.js +150 -0
  12. package/src/migrations/latest/add-destroy-sandbox-target/migration.js.map +1 -0
  13. package/src/migrations/latest/terraform-rdb-proxy-iam-connect-grant/__snapshots__/migration.spec.ts.snap +23 -0
  14. package/src/migrations/latest/terraform-rdb-proxy-iam-connect-grant/metadata.json +3 -0
  15. package/src/migrations/latest/terraform-rdb-proxy-iam-connect-grant/migration.d.ts +6 -0
  16. package/src/migrations/latest/terraform-rdb-proxy-iam-connect-grant/migration.js +88 -0
  17. package/src/migrations/latest/terraform-rdb-proxy-iam-connect-grant/migration.js.map +1 -0
  18. package/src/open-api/ts-client/generator.js.map +1 -1
  19. package/src/open-api/ts-hooks/generator.spec.tsx +1 -1
  20. package/src/py/project/generator.js +5 -5
  21. package/src/py/project/generator.js.map +1 -1
  22. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +8 -8
  23. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +16 -16
  24. package/src/ts/dcr-proxy/__snapshots__/generator.spec.ts.snap +3 -3
  25. package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +3 -3
  26. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +4 -11
  27. package/src/ts/react-website/cognito-auth/generator.js +1 -1
  28. package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
  29. package/src/ts/react-website/runtime-config/generator.js +1 -1
  30. package/src/ts/react-website/runtime-config/generator.js.map +1 -1
  31. package/src/utils/agent-core-constructs/agent-core-constructs.js +3 -2
  32. package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
  33. package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/agentcore-gateway.ts.template +1 -1
  34. package/src/utils/api-constructs/api-constructs.js +7 -4
  35. package/src/utils/api-constructs/api-constructs.js.map +1 -1
  36. package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +4 -4
  37. package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +4 -4
  38. package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account.ts.template +1 -1
  39. package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +4 -4
  40. package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +4 -4
  41. package/src/utils/ast.d.ts +13 -0
  42. package/src/utils/ast.js +36 -0
  43. package/src/utils/ast.js.map +1 -1
  44. package/src/utils/bundle/bundle.js +5 -2
  45. package/src/utils/bundle/bundle.js.map +1 -1
  46. package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js +5 -3
  47. package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js.map +1 -1
  48. package/src/utils/dcr-proxy-constructs/files/cdk/app/dcr-proxies/__nameKebabCase__/__nameKebabCase__.ts.template +1 -1
  49. package/src/utils/dcr-proxy-constructs/files/terraform/app/dcr-proxies/__nameKebabCase__/__nameKebabCase__.tf.template +2 -2
  50. package/src/utils/files/common/scripts/src/infra/stage-credentials/cdk-command.ts.template +7 -3
  51. package/src/utils/function-constructs/function-constructs.js +3 -3
  52. package/src/utils/function-constructs/function-constructs.js.map +1 -1
  53. package/src/utils/lambda-runtime-resolution.d.ts +74 -0
  54. package/src/utils/lambda-runtime-resolution.js +97 -0
  55. package/src/utils/lambda-runtime-resolution.js.map +1 -0
  56. package/src/utils/rdb-constructs/files/cdk/app/dbs/__nameKebabCase__.ts.template +3 -3
  57. package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +4 -21
  58. package/src/utils/rdb-constructs/rdb-constructs.js +5 -3
  59. package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
  60. package/src/utils/version-upgrade-migration/sync-lambda-runtimes.d.ts +28 -0
  61. package/src/utils/version-upgrade-migration/sync-lambda-runtimes.js +148 -0
  62. package/src/utils/version-upgrade-migration/sync-lambda-runtimes.js.map +1 -0
  63. package/src/utils/version-upgrade-migration/sync-python-language-version.d.ts +31 -0
  64. package/src/utils/version-upgrade-migration/sync-python-language-version.js +110 -0
  65. package/src/utils/version-upgrade-migration/sync-python-language-version.js.map +1 -0
  66. package/src/utils/version-upgrade-migration/sync-vended-versions.js +36 -7
  67. package/src/utils/version-upgrade-migration/sync-vended-versions.js.map +1 -1
  68. package/src/utils/versions.d.ts +60 -0
  69. package/src/utils/versions.js +51 -0
  70. package/src/utils/versions.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/version-upgrade-migration/sync-vended-versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n addDependenciesToPackageJson,\n detectPackageManager,\n type MigrationReturnObject,\n readJson,\n type Tree,\n updateJson,\n visitNotIgnoredFiles,\n} from '@nx/devkit';\nimport yaml from 'js-yaml';\nimport { getCatalogManager } from 'nx/src/utils/catalog';\nimport { parsePipRequirementsLine } from 'pip-requirements-js';\nimport { coerce, parse, satisfies, validRange } from 'semver';\nimport { applyGritQL, captureAllGritQL } from '../ast.js';\nimport { buildInstallCommand } from '../commands.js';\nimport { formatFilesInSubtree } from '../format.js';\nimport { updateToml } from '../toml.js';\nimport { PY_VERSIONS, TERRAFORM_VERSIONS, TS_VERSIONS } from '../versions.js';\nimport { isNxPackage } from './nx-package-updates.js';\nimport {\n type OwnedDependencies,\n ownedDependencies,\n} from './owned-dependencies.js';\nimport { syncEmbeddedVersions } from './sync-embedded-versions.js';\nimport { syncMetricsVersion } from './sync-metrics-version.js';\nimport { isVendedUpgrade } from './vended-upgrade.js';\n\n/**\n * Syncs the versions a generated workspace pins to those this release vends:\n * TypeScript dependencies (including those pinned only by an override), Python\n * pins, Terraform providers, and the plugin version the metrics files report.\n *\n * nx and `@nx/*` are excluded — `packageJsonUpdates` owns them so `nx migrate`\n * collects Nx's own migrations (see `nx-package-updates.ts`).\n */\n\n/** Workspace files holding catalog definitions, and pnpm 11's overrides. */\nconst YAML_WORKSPACE_FILES = ['pnpm-workspace.yaml', '.yarnrc.yml'];\n\n/**\n * Vended version for a dependency this workspace's generators own, or undefined\n * for one the user added themselves.\n */\nconst vendedTsVersion = (\n owned: OwnedDependencies,\n name: string,\n): string | undefined =>\n isNxPackage(name) || !owned.ts.has(name)\n ? undefined\n : TS_VERSIONS[name as keyof typeof TS_VERSIONS];\n\n/** PY_VERSIONS records the `==` operator; the pin holds the bare version. */\nconst vendedPyVersion = (\n owned: OwnedDependencies,\n name: string,\n): string | undefined =>\n owned.py.has(name)\n ? PY_VERSIONS[name as keyof typeof PY_VERSIONS]?.replace(/^==/, '')\n : undefined;\n\n/** Protocols whose version lives elsewhere, and is synced there instead. */\nconst REFERENCE_PROTOCOL =\n /^(?:workspace|file|link|npm|git|git\\+|github|portal|patch|exec):/;\n\n/**\n * Whether devkit may be handed this specifier.\n *\n * `catalog:` is only safe where devkit has a catalog manager (pnpm, yarn).\n * It ships none for bun, and without one it rewrites the reference to a literal\n * version, severing the catalog — so bun's references are synced directly.\n */\nconst isSyncableSpecifier = (tree: Tree, declared: unknown): boolean => {\n // A manifest is the user's file and may hold anything. A version that isn't a\n // string is not one this can reason about, and throwing here would abort the\n // whole `nx migrate` over a file the sync only meant to skip.\n if (typeof declared !== 'string') {\n return false;\n }\n if (REFERENCE_PROTOCOL.test(declared)) {\n return false;\n }\n return (\n !declared.startsWith('catalog:') || getCatalogManager(tree.root) !== null\n );\n};\n\n/**\n * Whether the declared range already permits the vended version, following a\n * `catalog:` reference to the range it points at.\n *\n * Devkit would narrow such a range to an exact pin, discarding a user's widened\n * specifier without changing what resolves, so it is left alone.\n */\nconst alreadyPermitsVended = (\n tree: Tree,\n packageName: string,\n declared: string,\n vended: string,\n): boolean => {\n let range = declared;\n if (declared.startsWith('catalog:')) {\n const resolved = getCatalogManager(tree.root)?.resolveCatalogReference(\n tree,\n packageName,\n declared,\n );\n if (!resolved) {\n return false;\n }\n range = resolved;\n }\n range = range.trim();\n // An exact pin is the case to upgrade, not a range to preserve.\n if (parse(range) !== null || validRange(range) === null) {\n return false;\n }\n return satisfies(vended, range);\n};\n\n/**\n * Vended packages a manifest already declares, and the version to move each to.\n *\n * Only packages already present are named: devkit adds whatever it is given, so\n * passing the full vended list would inject all of it into every manifest.\n */\nconst declaredVendedPackages = (\n tree: Tree,\n owned: OwnedDependencies,\n packageJsonPath: string,\n): {\n dependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n} => {\n const json = readJson(tree, packageJsonPath);\n const pick = (field: 'dependencies' | 'devDependencies') =>\n Object.fromEntries(\n Object.entries((json[field] ?? {}) as Record<string, string>).flatMap(\n ([name, declared]) => {\n const vended = vendedTsVersion(owned, name);\n return vended &&\n isSyncableSpecifier(tree, declared) &&\n !alreadyPermitsVended(tree, name, declared, vended)\n ? [[name, vended] as const]\n : [];\n },\n ),\n );\n return {\n dependencies: pick('dependencies'),\n devDependencies: pick('devDependencies'),\n };\n};\n\n/**\n * Sync the TypeScript dependencies every `package.json` declares.\n *\n * Devkit does the writing: it moves a version wherever the workspace keeps it —\n * through a `catalog:` reference or directly — and refuses anything that isn't a\n * strict upgrade on what is installed.\n *\n * Called directly rather than through this plugin's wrapper, which *migrates*\n * declarations into the catalog; right when generating, wrong for a version bump.\n */\nconst syncPackageJsons = (tree: Tree, owned: OwnedDependencies): string[] => {\n const updated: string[] = [];\n\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (!path.endsWith('package.json')) {\n return;\n }\n const { dependencies, devDependencies } = declaredVendedPackages(\n tree,\n owned,\n path,\n );\n if (\n Object.keys(dependencies).length === 0 &&\n Object.keys(devDependencies).length === 0\n ) {\n return;\n }\n\n const before = tree.read(path, 'utf-8');\n const catalogsBefore = readCatalogFiles(tree);\n // Install callback dropped: `nx migrate` runs install itself.\n addDependenciesToPackageJson(tree, dependencies, devDependencies, path);\n if (\n tree.read(path, 'utf-8') !== before ||\n readCatalogFiles(tree) !== catalogsBefore\n ) {\n updated.push(path);\n }\n });\n\n return updated;\n};\n\n/** Snapshot of every catalog definition file, for change detection. */\nconst readCatalogFiles = (tree: Tree): string =>\n [...YAML_WORKSPACE_FILES, 'package.json']\n .map((path) => (tree.exists(path) ? tree.read(path, 'utf-8') : ''))\n .join('\\0');\n\n/**\n * Upgrade vended catalog entries devkit cannot reach: those no manifest\n * references, and every bun entry (bun has no catalog manager).\n */\nconst syncOrphanCatalogEntries = (\n tree: Tree,\n owned: OwnedDependencies,\n): string[] => {\n const referenced = referencedCatalogPackages(tree);\n const updated: string[] = [];\n\n const syncCatalog = (\n catalog: Record<string, string> | undefined,\n ): boolean => {\n let changed = false;\n for (const [name, declared] of Object.entries(catalog ?? {})) {\n const vended = vendedTsVersion(owned, name);\n if (!vended || referenced.has(name)) {\n continue;\n }\n if (isVendedUpgrade(vended, String(declared))) {\n catalog![name] = vended;\n changed = true;\n }\n }\n return changed;\n };\n\n for (const path of YAML_WORKSPACE_FILES) {\n if (!tree.exists(path)) {\n continue;\n }\n const catalogFile = (yaml.load(tree.read(path, 'utf-8') ?? '') ?? {}) as {\n catalog?: Record<string, string>;\n catalogs?: Record<string, Record<string, string>>;\n };\n const changed = [\n syncCatalog(catalogFile.catalog),\n ...Object.values(catalogFile.catalogs ?? {}).map(syncCatalog),\n ].some(Boolean);\n if (changed) {\n tree.write(path, yaml.dump(catalogFile, { quotingType: \"'\" }));\n updated.push(path);\n }\n }\n\n // Bun keeps its catalogs in the root manifest.\n if (tree.exists('package.json')) {\n let changed = false;\n updateJson(tree, 'package.json', (json) => {\n changed = [\n syncCatalog(json.catalog),\n ...Object.values(\n (json.catalogs ?? {}) as Record<string, Record<string, string>>,\n ).map(syncCatalog),\n ].some(Boolean);\n return json;\n });\n if (changed) {\n updated.push('package.json');\n }\n }\n\n return updated;\n};\n\n/**\n * The package an override key pins, or undefined when the key names none.\n *\n * A key is a package name, optionally preceded by the path it is scoped to and\n * followed by the parent range it applies at:\n *\n * zod -> zod\n * zod@^3 -> zod\n * **&#47;@modelcontextprotocol/sdk/zod -> zod\n * @prisma/adapter-pg/@types/pg -> @types/pg\n *\n * The last segment is the package, since every earlier one is a parent it is\n * scoped under — except that a scope and the name after it are one segment.\n */\nconst overriddenPackage = (key: string): string | undefined => {\n const segments = key.split('/').reduce<string[]>((acc, part) => {\n // A bare `@scope` is only half a name; join it to what follows.\n const previous = acc[acc.length - 1];\n if (previous?.startsWith('@') && !previous.includes('/')) {\n acc[acc.length - 1] = `${previous}/${part}`;\n return acc;\n }\n acc.push(part);\n return acc;\n }, []);\n\n const name = segments[segments.length - 1];\n if (!name || name === '.') {\n return undefined;\n }\n // A trailing `@range` scopes the override to a parent version.\n const at = name.lastIndexOf('@');\n return at > 0 ? name.slice(0, at) : name;\n};\n\n/**\n * Sync the owned packages an override pins, wherever the workspace keeps them:\n * npm's `overrides`, yarn and bun's `resolutions`, and pnpm's `pnpm.overrides`\n * (10) or `pnpm-workspace.yaml` `overrides` (11).\n *\n * Devkit does not manage these fields, so an owned package pinned only here\n * would otherwise stay on the version it was generated with. Values are compared\n * with `isVendedUpgrade`, so a range the user widened is left alone.\n */\n/**\n * Where the workspace's package manager reads overrides from.\n *\n * Only the root manifest is considered: every package manager resolves overrides\n * from the workspace root, so a nested `overrides` block is inert and rewriting\n * it would imply an effect it doesn't have.\n *\n * pnpm moved the block between majors — 10 reads `pnpm.overrides` in the\n * manifest, 11 reads `overrides` in `pnpm-workspace.yaml` — so both are covered\n * rather than detecting the minor.\n */\nconst overrideLocations = (\n tree: Tree,\n): {\n manifestFields: readonly ('overrides' | 'resolutions' | 'pnpm.overrides')[];\n workspaceFile?: string;\n} => {\n switch (detectPackageManager(tree.root)) {\n case 'npm':\n return { manifestFields: ['overrides'] };\n case 'yarn':\n return { manifestFields: ['resolutions'] };\n case 'bun':\n // Bun reads npm's `overrides` and yarn's `resolutions` alike.\n return { manifestFields: ['overrides', 'resolutions'] };\n default:\n return {\n manifestFields: ['pnpm.overrides'],\n workspaceFile: 'pnpm-workspace.yaml',\n };\n }\n};\n\nconst syncOverrides = (tree: Tree, owned: OwnedDependencies): string[] => {\n const updated: string[] = [];\n\n // Nested npm overrides carry the pin under `.`, with sibling keys scoping\n // deeper, so a value may be a string or another override object.\n const syncOverrideTree = (overrides: unknown): boolean => {\n if (typeof overrides !== 'object' || overrides === null) {\n return false;\n }\n let changed = false;\n for (const [key, value] of Object.entries(\n overrides as Record<string, unknown>,\n )) {\n if (typeof value === 'object' && value !== null) {\n changed = syncOverrideTree(value) || changed;\n continue;\n }\n if (typeof value !== 'string') {\n continue;\n }\n // `.` pins the package its parent key names.\n const name =\n key === '.' ? undefined : (overriddenPackage(key) ?? undefined);\n const vended = name ? vendedTsVersion(owned, name) : undefined;\n if (vended && isVendedUpgrade(vended, value)) {\n (overrides as Record<string, unknown>)[key] = vended;\n changed = true;\n }\n }\n return changed;\n };\n\n const { manifestFields, workspaceFile } = overrideLocations(tree);\n\n if (manifestFields.length > 0) {\n let changed = false;\n updateJson(tree, 'package.json', (json) => {\n changed = manifestFields\n .map((field) =>\n syncOverrideTree(\n field === 'pnpm.overrides' ? json.pnpm?.overrides : json[field],\n ),\n )\n .some(Boolean);\n return json;\n });\n if (changed) {\n updated.push('package.json');\n }\n }\n\n if (workspaceFile && tree.exists(workspaceFile)) {\n const contents = (yaml.load(tree.read(workspaceFile, 'utf-8') ?? '') ??\n {}) as Record<string, unknown>;\n if (syncOverrideTree(contents.overrides)) {\n tree.write(workspaceFile, yaml.dump(contents, { quotingType: \"'\" }));\n updated.push(workspaceFile);\n }\n }\n\n return updated;\n};\n\n/**\n * Packages devkit already maintains through a `catalog:` reference. Empty\n * without a catalog manager, where no reference resolves.\n */\nconst referencedCatalogPackages = (tree: Tree): Set<string> => {\n const referenced = new Set<string>();\n if (getCatalogManager(tree.root) === null) {\n return referenced;\n }\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (!path.endsWith('package.json')) {\n return;\n }\n const json = readJson(tree, path);\n for (const field of ['dependencies', 'devDependencies'] as const) {\n for (const [name, declared] of Object.entries(\n (json[field] ?? {}) as Record<string, string>,\n )) {\n if (String(declared).startsWith('catalog:')) {\n referenced.add(name);\n }\n }\n }\n });\n return referenced;\n};\n\n/** Pip specifier as `pip-requirements-js` reports it. */\ninterface PyVersionSpec {\n readonly operator: string;\n readonly version: string;\n}\n\n/**\n * Whether the declared specifiers already permit the vended version, so\n * rewriting them would discard the user's range without changing what resolves.\n *\n * This mirrors the TypeScript side: an exact pin is the case to upgrade, a range\n * that already reaches the vended version is left alone, and a range that falls\n * short is moved up.\n *\n * A `*` wildcard or a specifier semver can't read counts as already permitting,\n * so anything not understood is left as the user wrote it.\n */\nconst pyRangePermitsVended = (\n specs: readonly PyVersionSpec[],\n vended: string,\n): boolean =>\n specs.every((spec) => {\n if (spec.version.includes('*')) {\n return true;\n }\n const bound = coerce(spec.version, { includePrerelease: true });\n if (!bound) {\n return true;\n }\n switch (spec.operator) {\n // An exact pin permits only itself, so a differing vended version is an\n // upgrade to apply.\n case '==':\n case '===':\n return satisfies(vended, `=${bound.version}`, {\n includePrerelease: true,\n });\n // `~=1.2.3` allows the patch series; `~=1.2` the minor series.\n case '~=':\n return satisfies(\n vended,\n spec.version.split('.').length > 2\n ? `~${bound.version}`\n : `^${bound.version}`,\n { includePrerelease: true },\n );\n case '>=':\n case '>':\n case '<=':\n case '<':\n return satisfies(vended, `${spec.operator}${bound.version}`, {\n includePrerelease: true,\n });\n // `!=` only excludes, so it never blocks the vended version by itself.\n case '!=':\n return true;\n default:\n return true;\n }\n });\n\n/**\n * Upgrade a pip requirement to the vended version, or return it unchanged.\n *\n * Parsed rather than pattern-matched so extras and operators are read the way\n * `uv` reads them. A requirement whose specifiers already permit the vended\n * version keeps them; one that falls short is replaced with an exact pin, which\n * is what the generators write.\n */\nconst syncPyRequirement = (\n owned: OwnedDependencies,\n requirement: string,\n): string => {\n const parsed = parsePipRequirementsLine(requirement);\n if (parsed?.type !== 'ProjectName' || !parsed.versionSpec?.length) {\n return requirement;\n }\n\n const name = parsed.extras?.length\n ? `${parsed.name}[${parsed.extras.join(',')}]`\n : parsed.name;\n const vended = vendedPyVersion(owned, name);\n if (!vended) {\n return requirement;\n }\n\n const specs = parsed.versionSpec as readonly PyVersionSpec[];\n // Never move a version backwards: a pin above what this release vends is the\n // user's, and a range already reaching it is theirs to keep.\n const [first] = specs;\n const isExactPin =\n specs.length === 1 && (first.operator === '==' || first.operator === '===');\n if (isExactPin && !isVendedUpgrade(vended, first.version)) {\n return requirement;\n }\n if (!isExactPin && pyRangePermitsVended(specs, vended)) {\n return requirement;\n }\n return `${name}==${vended}`;\n};\n\n/** Sync pins in every `pyproject.toml`, dependencies and groups alike. */\nconst syncPyProjects = (tree: Tree, owned: OwnedDependencies): string[] => {\n const updated: string[] = [];\n\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (!path.endsWith('pyproject.toml')) {\n return;\n }\n\n let changed = false;\n const syncRequirements = (requirements: unknown): unknown =>\n Array.isArray(requirements)\n ? requirements.map((requirement) => {\n if (typeof requirement !== 'string') {\n return requirement;\n }\n const synced = syncPyRequirement(owned, requirement);\n changed ||= synced !== requirement;\n return synced;\n })\n : requirements;\n\n updateToml(tree, path, (toml) => {\n const project = toml.project as Record<string, unknown> | undefined;\n if (project?.dependencies) {\n project.dependencies = syncRequirements(project.dependencies) as never;\n }\n const groups = toml['dependency-groups'] as\n | Record<string, unknown>\n | undefined;\n for (const group of Object.keys(groups ?? {})) {\n groups![group] = syncRequirements(groups![group]) as never;\n }\n return toml;\n });\n\n if (changed) {\n updated.push(path);\n }\n });\n\n return updated;\n};\n\n/**\n * GritQL matching one provider's `version` in `required_providers`, scoped by\n * the sibling `source` so an alias or another provider's version can't match.\n *\n * `language hcl` is required — without it the pattern silently matches nothing.\n */\nconst providerVersionPattern = (provider: string, rewrite = ''): string =>\n `language hcl\\n\\`version = $version\\`${rewrite} where {` +\n ` $version <: within \\`{ source = \"hashicorp/${provider}\" $... }\\` }`;\n\n/** Version a provider currently declares, if it declares one. */\nconst declaredProviderVersion = async (\n tree: Tree,\n path: string,\n provider: string,\n): Promise<string | undefined> => {\n const [captured] = await captureAllGritQL(\n tree,\n path,\n providerVersionPattern(provider),\n );\n // The match is the whole attribute, e.g. `version = \"6.40.0\"`.\n return /\"([^\"]+)\"/.exec(captured ?? '')?.[1];\n};\n\n/** Sync vended provider versions in every `.tf` file. */\nconst syncTerraformProviders = async (tree: Tree): Promise<string[]> => {\n const updated: string[] = [];\n const terraformFiles: string[] = [];\n\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (path.endsWith('.tf')) {\n terraformFiles.push(path);\n }\n });\n\n for (const path of terraformFiles) {\n let changed = false;\n for (const [provider, vended] of Object.entries(TERRAFORM_VERSIONS)) {\n const declared = await declaredProviderVersion(tree, path, provider);\n if (!declared || !isVendedUpgrade(vended, declared)) {\n continue;\n }\n changed =\n (await applyGritQL(\n tree,\n path,\n providerVersionPattern(provider, ` => \\`version = \"${vended}\"\\``),\n )) || changed;\n }\n if (changed) {\n updated.push(path);\n }\n }\n\n return updated;\n};\n\n/**\n * Sync the versions this release vends, for the dependencies the workspace's\n * generators own.\n */\nexport const syncVendedVersions = async (\n tree: Tree,\n): Promise<MigrationReturnObject> => {\n const nextSteps: string[] = [];\n const owned = await ownedDependencies(tree);\n\n const packageJsons = syncPackageJsons(tree, owned);\n const catalogs = syncOrphanCatalogEntries(tree, owned);\n const overrides = syncOverrides(tree, owned);\n const pyProjects = syncPyProjects(tree, owned);\n const terraformFiles = await syncTerraformProviders(tree);\n const skippedEmbedded = await syncEmbeddedVersions(tree, owned);\n await syncMetricsVersion(tree);\n\n // Lock files are left to the user: `nx migrate` only installs when the root\n // manifest changes, and never runs `uv` or `terraform`.\n if (catalogs.length > 0 || packageJsons.length > 0 || overrides.length > 0) {\n nextSteps.push(\n `TypeScript dependency versions were updated. Run \\`${buildInstallCommand(\n detectPackageManager(tree.root),\n )}\\` to update the lock file.`,\n );\n }\n if (pyProjects.length > 0) {\n nextSteps.push(\n `Python dependency versions were updated in ${pyProjects.join(', ')}. Run \\`uv sync\\` to update uv.lock.`,\n );\n }\n if (terraformFiles.length > 0) {\n nextSteps.push(\n `Terraform provider versions were updated in ${terraformFiles.length} file(s). Run \\`terraform init -upgrade\\` in each Terraform project to update its lock file.`,\n );\n }\n // A synced embedded pin needs no next step — it is read the next time the thing\n // holding it runs. A file the sync left alone does: its versions are still the\n // old ones, and only the user can reconcile that.\n if (skippedEmbedded.length > 0) {\n nextSteps.push(\n `Version pins were left as they are in ${skippedEmbedded.join(', ')}, which repeat a pin more times than this migration rewrites at once. Update them by hand.`,\n );\n }\n\n // Without this the workspace's own format check fails on the migrated files.\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n};\n"],"names":["addDependenciesToPackageJson","detectPackageManager","readJson","updateJson","visitNotIgnoredFiles","yaml","getCatalogManager","parsePipRequirementsLine","coerce","parse","satisfies","validRange","applyGritQL","captureAllGritQL","buildInstallCommand","formatFilesInSubtree","updateToml","PY_VERSIONS","TERRAFORM_VERSIONS","TS_VERSIONS","isNxPackage","ownedDependencies","syncEmbeddedVersions","syncMetricsVersion","isVendedUpgrade","YAML_WORKSPACE_FILES","vendedTsVersion","owned","name","ts","has","undefined","vendedPyVersion","py","replace","REFERENCE_PROTOCOL","isSyncableSpecifier","tree","declared","test","startsWith","root","alreadyPermitsVended","packageName","vended","range","resolved","resolveCatalogReference","trim","declaredVendedPackages","packageJsonPath","json","pick","field","Object","fromEntries","entries","flatMap","dependencies","devDependencies","syncPackageJsons","updated","path","endsWith","keys","length","before","read","catalogsBefore","readCatalogFiles","push","map","exists","join","syncOrphanCatalogEntries","referenced","referencedCatalogPackages","syncCatalog","catalog","changed","String","catalogFile","load","values","catalogs","some","Boolean","write","dump","quotingType","overriddenPackage","key","segments","split","reduce","acc","part","previous","includes","at","lastIndexOf","slice","overrideLocations","manifestFields","workspaceFile","syncOverrides","syncOverrideTree","overrides","value","pnpm","contents","Set","add","pyRangePermitsVended","specs","every","spec","version","bound","includePrerelease","operator","syncPyRequirement","requirement","parsed","type","versionSpec","extras","first","isExactPin","syncPyProjects","syncRequirements","requirements","Array","isArray","synced","toml","project","groups","group","providerVersionPattern","provider","rewrite","declaredProviderVersion","captured","exec","syncTerraformProviders","terraformFiles","syncVendedVersions","nextSteps","packageJsons","pyProjects","skippedEmbedded"],"mappings":"AAAA;;;CAGC,GACD,SACEA,4BAA4B,EAC5BC,oBAAoB,EAEpBC,QAAQ,EAERC,UAAU,EACVC,oBAAoB,QACf,aAAa;AACpB,OAAOC,UAAU,UAAU;AAC3B,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAC/D,SAASC,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,SAAS;AAC9D,SAASC,WAAW,EAAEC,gBAAgB,QAAQ,YAAY;AAC1D,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,WAAW,EAAEC,kBAAkB,EAAEC,WAAW,QAAQ,iBAAiB;AAC9E,SAASC,WAAW,QAAQ,0BAA0B;A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AAExD,oBACpDb,qBAAqBoC,KAAKI,IAAI,GAC9B,2BAA2B,CAAC;IAElC;IACA,IAAI6G,WAAWrF,MAAM,GAAG,GAAG;QACzBmF,UAAU9E,IAAI,CACZ,CAAC,2CAA2C,EAAEgF,WAAW7E,IAAI,CAAC,MAAM,oCAAoC,CAAC;IAE7G;IACA,IAAIyE,eAAejF,MAAM,GAAG,GAAG;QAC7BmF,UAAU9E,IAAI,CACZ,CAAC,4CAA4C,EAAE4E,eAAejF,MAAM,CAAC,4FAA4F,CAAC;IAEtK;IACA,gFAAgF;IAChF,+EAA+E;IAC/E,kDAAkD;IAClD,IAAIsF,gBAAgBtF,MAAM,GAAG,GAAG;QAC9BmF,UAAU9E,IAAI,CACZ,CAAC,sCAAsC,EAAEiF,gBAAgB9E,IAAI,CAAC,MAAM,0FAA0F,CAAC;IAEnK;IAEA,6EAA6E;IAC7E,MAAM1D,qBAAqBsB;IAE3B,OAAO;QAAE+G;IAAU;AACrB,EAAE"}
1
+ {"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/version-upgrade-migration/sync-vended-versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n addDependenciesToPackageJson,\n detectPackageManager,\n type MigrationReturnObject,\n readJson,\n type Tree,\n updateJson,\n visitNotIgnoredFiles,\n} from '@nx/devkit';\nimport yaml from 'js-yaml';\nimport { getCatalogManager } from 'nx/src/utils/catalog';\nimport { parsePipRequirementsLine } from 'pip-requirements-js';\nimport { coerce, parse, satisfies, validRange } from 'semver';\nimport { applyGritQL, captureAllGritQLVariable } from '../ast.js';\nimport { buildInstallCommand } from '../commands.js';\nimport { formatFilesInSubtree } from '../format.js';\nimport {\n PACKAGES_DIR,\n SHARED_CONSTRUCTS_DIR,\n SHARED_TERRAFORM_DIR,\n} from '../shared-constructs-constants.js';\nimport { updateToml } from '../toml.js';\nimport {\n cdkLambdaRuntime,\n PY_VERSIONS,\n TERRAFORM_VERSIONS,\n TS_VERSIONS,\n terraformLambdaRuntime,\n} from '../versions.js';\nimport { isNxPackage } from './nx-package-updates.js';\nimport {\n type OwnedDependencies,\n ownedDependencies,\n} from './owned-dependencies.js';\nimport { syncEmbeddedVersions } from './sync-embedded-versions.js';\nimport { syncLambdaRuntimes, type VendedIac } from './sync-lambda-runtimes.js';\nimport { syncMetricsVersion } from './sync-metrics-version.js';\nimport {\n syncProjectPythonVersion,\n syncPythonBundleVersion,\n} from './sync-python-language-version.js';\nimport { isVendedUpgrade } from './vended-upgrade.js';\n\n/**\n * Syncs the versions a generated workspace pins to those this release vends:\n * TypeScript dependencies (including those pinned only by an override), Python\n * pins, Terraform providers, and the plugin version the metrics files report.\n *\n * nx and `@nx/*` are excluded — `packageJsonUpdates` owns them so `nx migrate`\n * collects Nx's own migrations (see `nx-package-updates.ts`).\n */\n\n/** Workspace files holding catalog definitions, and pnpm 11's overrides. */\nconst YAML_WORKSPACE_FILES = ['pnpm-workspace.yaml', '.yarnrc.yml'];\n\n/**\n * Vended version for a dependency this workspace's generators own, or undefined\n * for one the user added themselves.\n */\nconst vendedTsVersion = (\n owned: OwnedDependencies,\n name: string,\n): string | undefined =>\n isNxPackage(name) || !owned.ts.has(name)\n ? undefined\n : TS_VERSIONS[name as keyof typeof TS_VERSIONS];\n\n/** PY_VERSIONS records the `==` operator; the pin holds the bare version. */\nconst vendedPyVersion = (\n owned: OwnedDependencies,\n name: string,\n): string | undefined =>\n owned.py.has(name)\n ? PY_VERSIONS[name as keyof typeof PY_VERSIONS]?.replace(/^==/, '')\n : undefined;\n\n/** Protocols whose version lives elsewhere, and is synced there instead. */\nconst REFERENCE_PROTOCOL =\n /^(?:workspace|file|link|npm|git|git\\+|github|portal|patch|exec):/;\n\n/**\n * Whether devkit may be handed this specifier.\n *\n * `catalog:` is only safe where devkit has a catalog manager (pnpm, yarn).\n * It ships none for bun, and without one it rewrites the reference to a literal\n * version, severing the catalog — so bun's references are synced directly.\n */\nconst isSyncableSpecifier = (tree: Tree, declared: unknown): boolean => {\n // A manifest is the user's file and may hold anything. A version that isn't a\n // string is not one this can reason about, and throwing here would abort the\n // whole `nx migrate` over a file the sync only meant to skip.\n if (typeof declared !== 'string') {\n return false;\n }\n if (REFERENCE_PROTOCOL.test(declared)) {\n return false;\n }\n return (\n !declared.startsWith('catalog:') || getCatalogManager(tree.root) !== null\n );\n};\n\n/**\n * Whether the declared range already permits the vended version, following a\n * `catalog:` reference to the range it points at.\n *\n * Devkit would narrow such a range to an exact pin, discarding a user's widened\n * specifier without changing what resolves, so it is left alone.\n */\nconst alreadyPermitsVended = (\n tree: Tree,\n packageName: string,\n declared: string,\n vended: string,\n): boolean => {\n let range = declared;\n if (declared.startsWith('catalog:')) {\n const resolved = getCatalogManager(tree.root)?.resolveCatalogReference(\n tree,\n packageName,\n declared,\n );\n if (!resolved) {\n return false;\n }\n range = resolved;\n }\n range = range.trim();\n // An exact pin is the case to upgrade, not a range to preserve.\n if (parse(range) !== null || validRange(range) === null) {\n return false;\n }\n return satisfies(vended, range);\n};\n\n/**\n * Vended packages a manifest already declares, and the version to move each to.\n *\n * Only packages already present are named: devkit adds whatever it is given, so\n * passing the full vended list would inject all of it into every manifest.\n */\nconst declaredVendedPackages = (\n tree: Tree,\n owned: OwnedDependencies,\n packageJsonPath: string,\n): {\n dependencies: Record<string, string>;\n devDependencies: Record<string, string>;\n} => {\n const json = readJson(tree, packageJsonPath);\n const pick = (field: 'dependencies' | 'devDependencies') =>\n Object.fromEntries(\n Object.entries((json[field] ?? {}) as Record<string, string>).flatMap(\n ([name, declared]) => {\n const vended = vendedTsVersion(owned, name);\n return vended &&\n isSyncableSpecifier(tree, declared) &&\n !alreadyPermitsVended(tree, name, declared, vended)\n ? [[name, vended] as const]\n : [];\n },\n ),\n );\n return {\n dependencies: pick('dependencies'),\n devDependencies: pick('devDependencies'),\n };\n};\n\n/**\n * Sync the TypeScript dependencies every `package.json` declares.\n *\n * Devkit does the writing: it moves a version wherever the workspace keeps it —\n * through a `catalog:` reference or directly — and refuses anything that isn't a\n * strict upgrade on what is installed.\n *\n * Called directly rather than through this plugin's wrapper, which *migrates*\n * declarations into the catalog; right when generating, wrong for a version bump.\n */\nconst syncPackageJsons = (tree: Tree, owned: OwnedDependencies): string[] => {\n const updated: string[] = [];\n\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (!path.endsWith('package.json')) {\n return;\n }\n const { dependencies, devDependencies } = declaredVendedPackages(\n tree,\n owned,\n path,\n );\n if (\n Object.keys(dependencies).length === 0 &&\n Object.keys(devDependencies).length === 0\n ) {\n return;\n }\n\n const before = tree.read(path, 'utf-8');\n const catalogsBefore = readCatalogFiles(tree);\n // Install callback dropped: `nx migrate` runs install itself.\n addDependenciesToPackageJson(tree, dependencies, devDependencies, path);\n if (\n tree.read(path, 'utf-8') !== before ||\n readCatalogFiles(tree) !== catalogsBefore\n ) {\n updated.push(path);\n }\n });\n\n return updated;\n};\n\n/** Snapshot of every catalog definition file, for change detection. */\nconst readCatalogFiles = (tree: Tree): string =>\n [...YAML_WORKSPACE_FILES, 'package.json']\n .map((path) => (tree.exists(path) ? tree.read(path, 'utf-8') : ''))\n .join('\\0');\n\n/**\n * Upgrade vended catalog entries devkit cannot reach: those no manifest\n * references, and every bun entry (bun has no catalog manager).\n */\nconst syncOrphanCatalogEntries = (\n tree: Tree,\n owned: OwnedDependencies,\n): string[] => {\n const referenced = referencedCatalogPackages(tree);\n const updated: string[] = [];\n\n const syncCatalog = (\n catalog: Record<string, string> | undefined,\n ): boolean => {\n let changed = false;\n for (const [name, declared] of Object.entries(catalog ?? {})) {\n const vended = vendedTsVersion(owned, name);\n if (!vended || referenced.has(name)) {\n continue;\n }\n if (isVendedUpgrade(vended, String(declared))) {\n catalog![name] = vended;\n changed = true;\n }\n }\n return changed;\n };\n\n for (const path of YAML_WORKSPACE_FILES) {\n if (!tree.exists(path)) {\n continue;\n }\n const catalogFile = (yaml.load(tree.read(path, 'utf-8') ?? '') ?? {}) as {\n catalog?: Record<string, string>;\n catalogs?: Record<string, Record<string, string>>;\n };\n const changed = [\n syncCatalog(catalogFile.catalog),\n ...Object.values(catalogFile.catalogs ?? {}).map(syncCatalog),\n ].some(Boolean);\n if (changed) {\n tree.write(path, yaml.dump(catalogFile, { quotingType: \"'\" }));\n updated.push(path);\n }\n }\n\n // Bun keeps its catalogs in the root manifest.\n if (tree.exists('package.json')) {\n let changed = false;\n updateJson(tree, 'package.json', (json) => {\n changed = [\n syncCatalog(json.catalog),\n ...Object.values(\n (json.catalogs ?? {}) as Record<string, Record<string, string>>,\n ).map(syncCatalog),\n ].some(Boolean);\n return json;\n });\n if (changed) {\n updated.push('package.json');\n }\n }\n\n return updated;\n};\n\n/**\n * The package an override key pins, or undefined when the key names none.\n *\n * A key is a package name, optionally preceded by the path it is scoped to and\n * followed by the parent range it applies at:\n *\n * zod -> zod\n * zod@^3 -> zod\n * **&#47;@modelcontextprotocol/sdk/zod -> zod\n * @prisma/adapter-pg/@types/pg -> @types/pg\n *\n * The last segment is the package, since every earlier one is a parent it is\n * scoped under — except that a scope and the name after it are one segment.\n */\nconst overriddenPackage = (key: string): string | undefined => {\n const segments = key.split('/').reduce<string[]>((acc, part) => {\n // A bare `@scope` is only half a name; join it to what follows.\n const previous = acc[acc.length - 1];\n if (previous?.startsWith('@') && !previous.includes('/')) {\n acc[acc.length - 1] = `${previous}/${part}`;\n return acc;\n }\n acc.push(part);\n return acc;\n }, []);\n\n const name = segments[segments.length - 1];\n if (!name || name === '.') {\n return undefined;\n }\n // A trailing `@range` scopes the override to a parent version.\n const at = name.lastIndexOf('@');\n return at > 0 ? name.slice(0, at) : name;\n};\n\n/**\n * Sync the owned packages an override pins, wherever the workspace keeps them:\n * npm's `overrides`, yarn and bun's `resolutions`, and pnpm's `pnpm.overrides`\n * (10) or `pnpm-workspace.yaml` `overrides` (11).\n *\n * Devkit does not manage these fields, so an owned package pinned only here\n * would otherwise stay on the version it was generated with. Values are compared\n * with `isVendedUpgrade`, so a range the user widened is left alone.\n */\n/**\n * Where the workspace's package manager reads overrides from.\n *\n * Only the root manifest is considered: every package manager resolves overrides\n * from the workspace root, so a nested `overrides` block is inert and rewriting\n * it would imply an effect it doesn't have.\n *\n * pnpm moved the block between majors — 10 reads `pnpm.overrides` in the\n * manifest, 11 reads `overrides` in `pnpm-workspace.yaml` — so both are covered\n * rather than detecting the minor.\n */\nconst overrideLocations = (\n tree: Tree,\n): {\n manifestFields: readonly ('overrides' | 'resolutions' | 'pnpm.overrides')[];\n workspaceFile?: string;\n} => {\n switch (detectPackageManager(tree.root)) {\n case 'npm':\n return { manifestFields: ['overrides'] };\n case 'yarn':\n return { manifestFields: ['resolutions'] };\n case 'bun':\n // Bun reads npm's `overrides` and yarn's `resolutions` alike.\n return { manifestFields: ['overrides', 'resolutions'] };\n default:\n return {\n manifestFields: ['pnpm.overrides'],\n workspaceFile: 'pnpm-workspace.yaml',\n };\n }\n};\n\nconst syncOverrides = (tree: Tree, owned: OwnedDependencies): string[] => {\n const updated: string[] = [];\n\n // Nested npm overrides carry the pin under `.`, with sibling keys scoping\n // deeper, so a value may be a string or another override object.\n const syncOverrideTree = (overrides: unknown): boolean => {\n if (typeof overrides !== 'object' || overrides === null) {\n return false;\n }\n let changed = false;\n for (const [key, value] of Object.entries(\n overrides as Record<string, unknown>,\n )) {\n if (typeof value === 'object' && value !== null) {\n changed = syncOverrideTree(value) || changed;\n continue;\n }\n if (typeof value !== 'string') {\n continue;\n }\n // `.` pins the package its parent key names.\n const name =\n key === '.' ? undefined : (overriddenPackage(key) ?? undefined);\n const vended = name ? vendedTsVersion(owned, name) : undefined;\n if (vended && isVendedUpgrade(vended, value)) {\n (overrides as Record<string, unknown>)[key] = vended;\n changed = true;\n }\n }\n return changed;\n };\n\n const { manifestFields, workspaceFile } = overrideLocations(tree);\n\n if (manifestFields.length > 0) {\n let changed = false;\n updateJson(tree, 'package.json', (json) => {\n changed = manifestFields\n .map((field) =>\n syncOverrideTree(\n field === 'pnpm.overrides' ? json.pnpm?.overrides : json[field],\n ),\n )\n .some(Boolean);\n return json;\n });\n if (changed) {\n updated.push('package.json');\n }\n }\n\n if (workspaceFile && tree.exists(workspaceFile)) {\n const contents = (yaml.load(tree.read(workspaceFile, 'utf-8') ?? '') ??\n {}) as Record<string, unknown>;\n if (syncOverrideTree(contents.overrides)) {\n tree.write(workspaceFile, yaml.dump(contents, { quotingType: \"'\" }));\n updated.push(workspaceFile);\n }\n }\n\n return updated;\n};\n\n/**\n * Packages devkit already maintains through a `catalog:` reference. Empty\n * without a catalog manager, where no reference resolves.\n */\nconst referencedCatalogPackages = (tree: Tree): Set<string> => {\n const referenced = new Set<string>();\n if (getCatalogManager(tree.root) === null) {\n return referenced;\n }\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (!path.endsWith('package.json')) {\n return;\n }\n const json = readJson(tree, path);\n for (const field of ['dependencies', 'devDependencies'] as const) {\n for (const [name, declared] of Object.entries(\n (json[field] ?? {}) as Record<string, string>,\n )) {\n if (String(declared).startsWith('catalog:')) {\n referenced.add(name);\n }\n }\n }\n });\n return referenced;\n};\n\n/** Pip specifier as `pip-requirements-js` reports it. */\ninterface PyVersionSpec {\n readonly operator: string;\n readonly version: string;\n}\n\n/**\n * Whether the declared specifiers already permit the vended version, so\n * rewriting them would discard the user's range without changing what resolves.\n *\n * This mirrors the TypeScript side: an exact pin is the case to upgrade, a range\n * that already reaches the vended version is left alone, and a range that falls\n * short is moved up.\n *\n * A `*` wildcard or a specifier semver can't read counts as already permitting,\n * so anything not understood is left as the user wrote it.\n */\nconst pyRangePermitsVended = (\n specs: readonly PyVersionSpec[],\n vended: string,\n): boolean =>\n specs.every((spec) => {\n if (spec.version.includes('*')) {\n return true;\n }\n const bound = coerce(spec.version, { includePrerelease: true });\n if (!bound) {\n return true;\n }\n switch (spec.operator) {\n // An exact pin permits only itself, so a differing vended version is an\n // upgrade to apply.\n case '==':\n case '===':\n return satisfies(vended, `=${bound.version}`, {\n includePrerelease: true,\n });\n // `~=1.2.3` allows the patch series; `~=1.2` the minor series.\n case '~=':\n return satisfies(\n vended,\n spec.version.split('.').length > 2\n ? `~${bound.version}`\n : `^${bound.version}`,\n { includePrerelease: true },\n );\n case '>=':\n case '>':\n case '<=':\n case '<':\n return satisfies(vended, `${spec.operator}${bound.version}`, {\n includePrerelease: true,\n });\n // `!=` only excludes, so it never blocks the vended version by itself.\n case '!=':\n return true;\n default:\n return true;\n }\n });\n\n/**\n * Upgrade a pip requirement to the vended version, or return it unchanged.\n *\n * Parsed rather than pattern-matched so extras and operators are read the way\n * `uv` reads them. A requirement whose specifiers already permit the vended\n * version keeps them; one that falls short is replaced with an exact pin, which\n * is what the generators write.\n */\nconst syncPyRequirement = (\n owned: OwnedDependencies,\n requirement: string,\n): string => {\n const parsed = parsePipRequirementsLine(requirement);\n if (parsed?.type !== 'ProjectName' || !parsed.versionSpec?.length) {\n return requirement;\n }\n\n const name = parsed.extras?.length\n ? `${parsed.name}[${parsed.extras.join(',')}]`\n : parsed.name;\n const vended = vendedPyVersion(owned, name);\n if (!vended) {\n return requirement;\n }\n\n const specs = parsed.versionSpec as readonly PyVersionSpec[];\n // Never move a version backwards: a pin above what this release vends is the\n // user's, and a range already reaching it is theirs to keep.\n const [first] = specs;\n const isExactPin =\n specs.length === 1 && (first.operator === '==' || first.operator === '===');\n if (isExactPin && !isVendedUpgrade(vended, first.version)) {\n return requirement;\n }\n if (!isExactPin && pyRangePermitsVended(specs, vended)) {\n return requirement;\n }\n return `${name}==${vended}`;\n};\n\n/** Sync pins in every `pyproject.toml`, dependencies and groups alike. */\nconst syncPyProjects = (tree: Tree, owned: OwnedDependencies): string[] => {\n const updated: string[] = [];\n\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (!path.endsWith('pyproject.toml')) {\n return;\n }\n\n let changed = false;\n const syncRequirements = (requirements: unknown): unknown =>\n Array.isArray(requirements)\n ? requirements.map((requirement) => {\n if (typeof requirement !== 'string') {\n return requirement;\n }\n const synced = syncPyRequirement(owned, requirement);\n changed ||= synced !== requirement;\n return synced;\n })\n : requirements;\n\n updateToml(tree, path, (toml) => {\n const project = toml.project as Record<string, unknown> | undefined;\n if (project?.dependencies) {\n project.dependencies = syncRequirements(project.dependencies) as never;\n }\n const groups = toml['dependency-groups'] as\n | Record<string, unknown>\n | undefined;\n for (const group of Object.keys(groups ?? {})) {\n groups![group] = syncRequirements(groups![group]) as never;\n }\n return toml;\n });\n\n if (changed) {\n updated.push(path);\n }\n });\n\n return updated;\n};\n\n/**\n * GritQL matching one provider's `version` in `required_providers`, scoped by\n * the sibling `source` so an alias or another provider's version can't match.\n *\n * `language hcl` is required — without it the pattern silently matches nothing.\n */\nconst providerVersionPattern = (provider: string, rewrite = ''): string =>\n `language hcl\\n\\`version = $version\\`${rewrite} where {` +\n ` $version <: within \\`{ source = \"hashicorp/${provider}\" $... }\\` }`;\n\n/** Version a provider currently declares, if it declares one. */\nconst declaredProviderVersion = async (\n tree: Tree,\n path: string,\n provider: string,\n): Promise<string | undefined> => {\n const [bound] =\n (await captureAllGritQLVariable(\n tree,\n path,\n providerVersionPattern(provider),\n 'version',\n )) ?? [];\n // The binding is the quoted version, e.g. `\"6.40.0\"`.\n return bound?.replace(/^\"|\"$/g, '');\n};\n\n/** Sync vended provider versions in every `.tf` file. */\nconst syncTerraformProviders = async (tree: Tree): Promise<string[]> => {\n const updated: string[] = [];\n const terraformFiles: string[] = [];\n\n visitNotIgnoredFiles(tree, '.', (path) => {\n if (path.endsWith('.tf')) {\n terraformFiles.push(path);\n }\n });\n\n for (const path of terraformFiles) {\n let changed = false;\n for (const [provider, vended] of Object.entries(TERRAFORM_VERSIONS)) {\n const declared = await declaredProviderVersion(tree, path, provider);\n if (!declared || !isVendedUpgrade(vended, declared)) {\n continue;\n }\n changed =\n (await applyGritQL(\n tree,\n path,\n providerVersionPattern(provider, ` => \\`version = \"${vended}\"\\``),\n )) || changed;\n }\n if (changed) {\n updated.push(path);\n }\n }\n\n return updated;\n};\n\n/**\n * The projects this plugin generates infrastructure into, per provider.\n *\n * A runtime is not a dependency, so there is no per-package ownership to consult —\n * these directories are the scope. A Lambda a user defined in their own project\n * keeps whatever runtime they chose, even though it is the same shape.\n */\nconst OWNED_INFRA_DIRS: Readonly<Record<VendedIac, string>> = {\n cdk: `${PACKAGES_DIR}/${SHARED_CONSTRUCTS_DIR}`,\n terraform: `${PACKAGES_DIR}/${SHARED_TERRAFORM_DIR}`,\n};\n\n/**\n * Sync the versions this release vends, for the dependencies the workspace's\n * generators own.\n */\nexport const syncVendedVersions = async (\n tree: Tree,\n): Promise<MigrationReturnObject> => {\n const nextSteps: string[] = [];\n const owned = await ownedDependencies(tree);\n\n const packageJsons = syncPackageJsons(tree, owned);\n const catalogs = syncOrphanCatalogEntries(tree, owned);\n const overrides = syncOverrides(tree, owned);\n const pyProjects = syncPyProjects(tree, owned);\n const terraformFiles = await syncTerraformProviders(tree);\n const lambdaRuntimes = await syncLambdaRuntimes(tree, OWNED_INFRA_DIRS);\n const projectPython = syncProjectPythonVersion(tree);\n const pythonBundles = syncPythonBundleVersion(tree);\n const skippedEmbedded = await syncEmbeddedVersions(tree, owned);\n await syncMetricsVersion(tree);\n\n // Lock files are left to the user: `nx migrate` only installs when the root\n // manifest changes, and never runs `uv` or `terraform`.\n if (catalogs.length > 0 || packageJsons.length > 0 || overrides.length > 0) {\n nextSteps.push(\n `TypeScript dependency versions were updated. Run \\`${buildInstallCommand(\n detectPackageManager(tree.root),\n )}\\` to update the lock file.`,\n );\n }\n if (\n pyProjects.length > 0 ||\n projectPython.length > 0 ||\n pythonBundles.length > 0\n ) {\n nextSteps.push(\n `Python dependency versions were updated in ${[...new Set([...pyProjects, ...projectPython, ...pythonBundles])].join(', ')}. Run \\`uv sync\\` to update uv.lock.`,\n );\n }\n // A runtime the sync recognised is simply moved; one it doesn't recognise is\n // the user's choice, so it is reported rather than rewritten.\n if (lambdaRuntimes.diverged.length > 0) {\n nextSteps.push(\n `Lambda runtimes in ${[...new Set(lambdaRuntimes.diverged)].join(', ')} have diverged from the generated shape and were left untouched. Set them to \\`${cdkLambdaRuntime('node')}\\` (CDK) or \\`\"${terraformLambdaRuntime('node')}\"\\` (Terraform) if you want them on the runtime this release vends.`,\n );\n }\n if (terraformFiles.length > 0) {\n nextSteps.push(\n `Terraform provider versions were updated in ${terraformFiles.length} file(s). Run \\`terraform init -upgrade\\` in each Terraform project to update its lock file.`,\n );\n }\n // A synced embedded pin needs no next step — it is read the next time the thing\n // holding it runs. A file the sync left alone does: its versions are still the\n // old ones, and only the user can reconcile that.\n if (skippedEmbedded.length > 0) {\n nextSteps.push(\n `Version pins were left as they are in ${skippedEmbedded.join(', ')}, which repeat a pin more times than this migration rewrites at once. Update them by hand.`,\n );\n }\n\n // Without this the workspace's own format check fails on the migrated files.\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n};\n"],"names":["addDependenciesToPackageJson","detectPackageManager","readJson","updateJson","visitNotIgnoredFiles","yaml","getCatalogManager","parsePipRequirementsLine","coerce","parse","satisfies","validRange","applyGritQL","captureAllGritQLVariable","buildInstallCommand","formatFilesInSubtree","PACKAGES_DIR","SHARED_CONSTRUCTS_DIR","SHARED_TERRAFORM_DIR","updateToml","cdkLambdaRuntime","PY_VERSIONS","TERRAFORM_VERSIONS","TS_VERSIONS","terraformLambdaRuntime","isNxPackage","ownedDependencies","syncEmbeddedVersions","syncLambdaRuntimes","syncMetricsVersion","syncProjectPythonVersion","syncPythonBundleVersion","isVendedUpgrade","YAML_WORKSPACE_FILES","vendedTsVersion","owned","name","ts","has","undefined","vendedPyVersion","py","replace","REFERENCE_PROTOCOL","isSyncableSpecifier","tree","declared","test","startsWith","root","alreadyPermitsVended","packageName","vended","range","resolved","resolveCatalogReference","trim","declaredVendedPackages","packageJsonPath","json","pick","field","Object","fromEntries","entries","flatMap","dependencies","devDependencies","syncPackageJsons","updated","path","endsWith","keys","length","before","read","catalogsBefore","readCatalogFiles","push","map","exists","join","syncOrphanCatalogEntries","referenced","referencedCatalogPackages","syncCatalog","catalog","changed","String","catalogFile","load","values","catalogs","some","Boolean","write","dump","quotingType","overriddenPackage","key","segments","split","reduce","acc","part","previous","includes","at","lastIndexOf","slice","overrideLocations","manifestFields","workspaceFile","syncOverrides","syncOverrideTree","overrides","value","pnpm","contents","Set","add","pyRangePermitsVended","specs","every","spec","version","bound","includePrerelease","operator","syncPyRequirement","requirement","parsed","type","versionSpec","extras","first","isExactPin","syncPyProjects","syncRequirements","requirements","Array","isArray","synced","toml","project","groups","group","providerVersionPattern","provider","rewrite","declaredProviderVersion","syncTerraformProviders","terraformFiles","OWNED_INFRA_DIRS","cdk","terraform","syncVendedVersions","nextSteps","packageJsons","pyProjects","lambdaRuntimes","projectPython","pythonBundles","skippedEmbedded","diverged"],"mappings":"AAAA;;;CAGC,GACD,SACEA,4BAA4B,EAC5BC,oBAAoB,EAEpBC,QAAQ,EAERC,UAAU,EACVC,oBAAoB,QACf,aAAa;AACpB,OAAOC,UAAU,UAAU;AAC3B,SAASC,iBAAiB,QAAQ,uBAAuB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAC/D,SAASC,MAAM,EAAEC,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,SAAS;AAC9D,SAASC,WAAW,EAAEC,wBAAwB,QAAQ,YAAY;AAClE,SAASC,mBAAmB,QAAQ,iBAAiB;AACrD,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SACEC,YAAY,EACZC,qBAAqB,EACrBC,oBAAoB,QACf,oCAAoC;AAC3C,SAASC,UAAU,QAAQ,aAAa;AACxC,SACEC,gBAAgB,EAChBC,WAAW,EACXC,kBAAkB,EAClBC,WAAW,EACXC,sBAAsB,QACjB,iBAAiB;AACxB,SAASC,WAAW,QAAQ,0BAA0B;AACtD,SAEEC,iBAAiB,QACZ,0BAA0B;AACjC,SAASC,oBAAoB,QAAQ,8BAA8B;AACnE,SAASC,kBAAkB,QAAwB,4BAA4B;AAC/E,SAASC,kBAAkB,QAAQ,4BAA4B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
@@ -273,6 +273,66 @@ export declare const CONTAINER_REPOSITORIES: {
273
273
  };
274
274
  /** The pinned reference for a tool image, as a target command runs it. */
275
275
  export declare const containerImage: (tool: keyof typeof CONTAINER_VERSIONS) => string;
276
+ /**
277
+ * The managed Lambda runtimes generated infrastructure targets, as the single
278
+ * source both IaC providers derive from.
279
+ *
280
+ * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`
281
+ * against `nodejs24.x` — so deriving both from the version here keeps a bump one
282
+ * edit that moves them together. Resolved by the version update workflow.
283
+ */
284
+ export declare const LAMBDA_RUNTIME_VERSIONS: {
285
+ readonly node: "24";
286
+ readonly python: "3.14";
287
+ };
288
+ export type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;
289
+ /**
290
+ * Patch of the CPython release uv pins as the project interpreter.
291
+ *
292
+ * A Lambda runtime names only `major.minor`, but uv pins an exact
293
+ * `major.minor.patch`, so only the patch lives here — the `major.minor` comes from
294
+ * {@link LAMBDA_RUNTIME_VERSIONS}. Resolved from uv by the version update
295
+ * workflow.
296
+ */
297
+ export declare const PYTHON_RUNTIME_PATCH = "7";
298
+ /**
299
+ * The interpreter uv pins for a generated Python project, as `major.minor.patch`.
300
+ * Matches the Lambda Python runtime by construction.
301
+ */
302
+ export declare const pyenvPythonVersion: () => string;
303
+ /**
304
+ * The `[project].requires-python` specifier for a generated Python project.
305
+ *
306
+ * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter
307
+ * is that version, and Ruff derives its `target-version` from this (`py314`), so
308
+ * lint targets the same version the function runs on.
309
+ */
310
+ export declare const pyprojectPythonDependency: () => string;
311
+ /** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */
312
+ export declare const terraformLambdaRuntime: (runtime: ILambdaRuntime) => string;
313
+ /**
314
+ * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.
315
+ * Always an explicitly versioned member, never a `_LATEST` alias.
316
+ */
317
+ export declare const cdkLambdaRuntime: (runtime: ILambdaRuntime) => string;
318
+ /**
319
+ * Substitution variables exposing the pinned runtimes to generated CDK
320
+ * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with
321
+ * {@link terraformLambdaRuntimeVars}, which names the same variables so a
322
+ * template reads alike under either provider.
323
+ */
324
+ export declare const cdkLambdaRuntimeVars: () => {
325
+ nodeRuntime: string;
326
+ pythonRuntime: string;
327
+ };
328
+ /**
329
+ * Substitution variables exposing the pinned runtimes to generated `.tf`
330
+ * templates (e.g. `runtime = "<%- nodeRuntime %>"`).
331
+ */
332
+ export declare const terraformLambdaRuntimeVars: () => {
333
+ nodeRuntime: string;
334
+ pythonRuntime: string;
335
+ };
276
336
  /**
277
337
  * Exact versions for Terraform providers used by generated `.tf` modules.
278
338
  * Pinned exactly (no range operator) so generated infrastructure is reproducible.
@@ -288,6 +288,57 @@
288
288
  trivy: 'public.ecr.aws/aquasecurity/trivy'
289
289
  };
290
290
  /** The pinned reference for a tool image, as a target command runs it. */ export const containerImage = (tool)=>`${CONTAINER_REPOSITORIES[tool]}:${CONTAINER_VERSIONS[tool]}`;
291
+ /**
292
+ * The managed Lambda runtimes generated infrastructure targets, as the single
293
+ * source both IaC providers derive from.
294
+ *
295
+ * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`
296
+ * against `nodejs24.x` — so deriving both from the version here keeps a bump one
297
+ * edit that moves them together. Resolved by the version update workflow.
298
+ */ export const LAMBDA_RUNTIME_VERSIONS = {
299
+ node: '24',
300
+ python: '3.14'
301
+ };
302
+ /**
303
+ * Patch of the CPython release uv pins as the project interpreter.
304
+ *
305
+ * A Lambda runtime names only `major.minor`, but uv pins an exact
306
+ * `major.minor.patch`, so only the patch lives here — the `major.minor` comes from
307
+ * {@link LAMBDA_RUNTIME_VERSIONS}. Resolved from uv by the version update
308
+ * workflow.
309
+ */ export const PYTHON_RUNTIME_PATCH = '7';
310
+ /**
311
+ * The interpreter uv pins for a generated Python project, as `major.minor.patch`.
312
+ * Matches the Lambda Python runtime by construction.
313
+ */ export const pyenvPythonVersion = ()=>`${LAMBDA_RUNTIME_VERSIONS.python}.${PYTHON_RUNTIME_PATCH}`;
314
+ /**
315
+ * The `[project].requires-python` specifier for a generated Python project.
316
+ *
317
+ * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter
318
+ * is that version, and Ruff derives its `target-version` from this (`py314`), so
319
+ * lint targets the same version the function runs on.
320
+ */ export const pyprojectPythonDependency = ()=>`>=${LAMBDA_RUNTIME_VERSIONS.python}`;
321
+ /** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */ export const terraformLambdaRuntime = (runtime)=>runtime === 'node' ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x` : `python${LAMBDA_RUNTIME_VERSIONS.python}`;
322
+ /**
323
+ * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.
324
+ * Always an explicitly versioned member, never a `_LATEST` alias.
325
+ */ export const cdkLambdaRuntime = (runtime)=>runtime === 'node' ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X` : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;
326
+ /**
327
+ * Substitution variables exposing the pinned runtimes to generated CDK
328
+ * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with
329
+ * {@link terraformLambdaRuntimeVars}, which names the same variables so a
330
+ * template reads alike under either provider.
331
+ */ export const cdkLambdaRuntimeVars = ()=>({
332
+ nodeRuntime: cdkLambdaRuntime('node'),
333
+ pythonRuntime: cdkLambdaRuntime('python')
334
+ });
335
+ /**
336
+ * Substitution variables exposing the pinned runtimes to generated `.tf`
337
+ * templates (e.g. `runtime = "<%- nodeRuntime %>"`).
338
+ */ export const terraformLambdaRuntimeVars = ()=>({
339
+ nodeRuntime: terraformLambdaRuntime('node'),
340
+ pythonRuntime: terraformLambdaRuntime('python')
341
+ });
291
342
  /**
292
343
  * Exact versions for Terraform providers used by generated `.tf` modules.
293
344
  * Pinned exactly (no range operator) so generated infrastructure is reproducible.
@@ -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.12.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.10.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 '@aws-sdk/client-dynamodb': '3.1116.0',\n '@aws-sdk/client-api-gateway': '3.1116.0',\n '@aws-sdk/client-iam': '3.1116.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1116.0',\n '@aws-sdk/client-bedrock-runtime': '3.1116.0',\n '@aws-sdk/client-s3': '3.1116.0',\n '@aws-sdk/client-sts': '3.1116.0',\n '@aws-sdk/credential-providers': '3.1116.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.69',\n '@aws-sdk/client-secrets-manager': '3.1116.0',\n '@aws-sdk/rds-signer': '3.1116.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.1116.0',\n '@middy/core': '7.8.0',\n '@nxlv/python': '23.0.0',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.1.1',\n '@nx/devkit': '23.1.1',\n '@nx/js': '23.1.1',\n '@nx/react': '23.1.1',\n '@nx/vite': '23.1.1',\n '@nx/vitest': '23.1.1',\n '@nx/workspace': '23.1.1',\n 'create-nx-workspace': '23.1.1',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.1',\n '@modelcontextprotocol/sdk': '1.30.0',\n '@modelcontextprotocol/inspector': '2.3.0',\n '@ag-ui/a2ui-toolkit': '0.0.4',\n '@ag-ui/aws-strands': '0.2.3',\n '@ag-ui/client': '0.0.57',\n '@ag-ui/core': '0.0.57',\n '@ag-ui/encoder': '0.0.57',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.69.0',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.14.0',\n '@tanstack/react-router': '1.170.31',\n '@tanstack/router-plugin': '1.168.34',\n '@tanstack/router-generator': '1.167.32',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.2',\n '@cloudscape-design/board-components': '3.0.220',\n '@cloudscape-design/chat-components': '1.0.164',\n '@cloudscape-design/components': '3.0.1352',\n '@cloudscape-design/global-styles': '1.0.67',\n '@tanstack/react-query': '5.102.0',\n '@tanstack/react-query-devtools': '5.102.0',\n '@trpc/tanstack-react-query': '11.18.0',\n '@trpc/client': '11.18.0',\n '@trpc/server': '11.18.0',\n '@types/node': '26.2.0',\n '@types/aws-lambda': '8.10.162',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.1',\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.11.3',\n '@smithy/types': '4.17.2',\n '@vitest/coverage-v8': '4.1.11',\n '@vitest/ui': '4.1.11',\n '@astrojs/react': '6.0.4',\n '@astrojs/starlight': '0.41.7',\n astro: '7.2.4',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1138.0',\n 'aws-cdk-lib': '2.266.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.0',\n 'class-variance-authority': '0.7.1',\n clsx: '2.1.1',\n commander: '15.0.0',\n 'cpy-cli': '7.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.10',\n '@prisma/adapter-mariadb': '7.9.1',\n '@prisma/adapter-pg': '7.9.1',\n '@prisma/client': '7.9.1',\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.0',\n '@types/fs-extra': '11.0.4',\n 'make-dir-cli': '4.0.0',\n mariadb: '3.5.3',\n mise: '2026.8.10',\n ncp: '2.0.0',\n npm: '12.0.2',\n 'npm-check-updates': '23.0.2',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.0',\n prisma: '7.9.1',\n 'react-oidc-context': '3.3.1',\n react: '19.2.8',\n 'react-dom': '19.2.8',\n rimraf: '6.1.3',\n rolldown: '1.2.5',\n 'rolldown-plugin-dts': '0.28.2',\n 'simple-git': '3.36.0',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.29.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.12',\n 'lucide-react': '1.33.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.19.0',\n 'tw-animate-css': '1.4.0',\n 'tailwind-merge': '3.6.0',\n vite: '8.2.2',\n typescript: '6.0.3',\n vitest: '4.1.11',\n zod: '4.4.3',\n ws: '8.21.3',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\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.43',\n 'ag-ui-protocol': '==0.1.20',\n 'ag-ui-strands': '==0.3.0',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.34.0',\n 'aws-lambda-powertools[tracer]': '==3.34.0',\n 'aws-lambda-powertools[parser]': '==3.34.0',\n 'aws-opentelemetry-distro': '==0.19.0',\n 'bedrock-agentcore': '==1.22.0',\n boto3: '==1.43.78',\n checkov: '==3.3.13',\n fastapi: '==0.141.1',\n 'fastapi[standard]': '==0.141.1',\n httpx: '==0.28.1',\n langchain: '==1.3.16',\n 'langchain-aws': '==1.7.3',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.11',\n 'langgraph-checkpoint-aws': '==1.2.2',\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 ruff: '==0.16.4',\n 'strands-agents': '==1.53.0',\n 'strands-agents[a2a]': '==1.53.0',\n 'strands-agents-tools': '==0.8.6',\n ty: '==0.0.74',\n pynamodb: '==6.1.0',\n uvicorn: '==0.52.4',\n sqlmodel: '==0.0.39',\n alembic: '==1.19.1',\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.5',\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.73.0',\n 'software.amazon.smithy:smithy-aws-traits': '1.73.0',\n 'software.amazon.smithy:smithy-validation-model': '1.73.0',\n 'software.amazon.smithy:smithy-openapi': '1.73.0',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.52.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.73.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 * 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.61.0',\n random: '3.9.0',\n null: '3.3.1',\n archive: '2.8.0',\n external: '2.4.1',\n local: '2.9.0',\n time: '0.14.1',\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","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","clsx","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","ncp","npm","pg","prisma","react","rimraf","rolldown","tailwindcss","tsx","shadcn","vite","typescript","vitest","zod","ws","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","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","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,4BAA4B;IAC5B,+BAA+B;IAC/B,uBAAuB;IACvB,qCAAqC;IACrC,mCAAmC;IACnC,sBAAsB;IACtB,uBAAuB;IACvB,iCAAiC;IACjC,iDAAiD;IACjD,mCAAmC;IACnC,uBAAuB;IACvB,6BAA6B;IAC7B,uBAAuB;IACvB,iCAAiC;IACjC,kCAAkC;IAClC,qCAAqC;IACrC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,eAAe;IACf,gBAAgB;IAChB,wBAAwB;IACxB,0DAA0D;IAC1DC,IAAI;IACJ,cAAc;IACd,UAAU;IACV,aAAa;IACb,YAAY;IACZ,cAAc;IACd,iBAAiB;IACjB,uBAAuB;IACvB,sBAAsB;IACtB,aAAa;IACb,6BAA6B;IAC7B,mCAAmC;IACnC,uBAAuB;IACvB,sBAAsB;IACtB,iBAAiB;IACjB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,0BAA0B;IAC1BC,MAAM;IACN,uBAAuB;IACvB,0BAA0B;IAC1B,2BAA2B;IAC3B,8BAA8B;IAC9B,iCAAiC;IACjC,0BAA0B;IAC1B,uCAAuC;IACvC,sCAAsC;IACtC,iCAAiC;IACjC,oCAAoC;IACpC,yBAAyB;IACzB,kCAAkC;IAClC,8B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;QAClDS,yBAAyBb,mBAAmBK,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.12.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.10.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 '@aws-sdk/client-dynamodb': '3.1116.0',\n '@aws-sdk/client-api-gateway': '3.1116.0',\n '@aws-sdk/client-iam': '3.1116.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1116.0',\n '@aws-sdk/client-bedrock-runtime': '3.1116.0',\n '@aws-sdk/client-s3': '3.1116.0',\n '@aws-sdk/client-sts': '3.1116.0',\n '@aws-sdk/credential-providers': '3.1116.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.69',\n '@aws-sdk/client-secrets-manager': '3.1116.0',\n '@aws-sdk/rds-signer': '3.1116.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.1116.0',\n '@middy/core': '7.8.0',\n '@nxlv/python': '23.0.0',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.1.1',\n '@nx/devkit': '23.1.1',\n '@nx/js': '23.1.1',\n '@nx/react': '23.1.1',\n '@nx/vite': '23.1.1',\n '@nx/vitest': '23.1.1',\n '@nx/workspace': '23.1.1',\n 'create-nx-workspace': '23.1.1',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.1',\n '@modelcontextprotocol/sdk': '1.30.0',\n '@modelcontextprotocol/inspector': '2.3.0',\n '@ag-ui/a2ui-toolkit': '0.0.4',\n '@ag-ui/aws-strands': '0.2.3',\n '@ag-ui/client': '0.0.57',\n '@ag-ui/core': '0.0.57',\n '@ag-ui/encoder': '0.0.57',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.69.0',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.14.0',\n '@tanstack/react-router': '1.170.31',\n '@tanstack/router-plugin': '1.168.34',\n '@tanstack/router-generator': '1.167.32',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.2',\n '@cloudscape-design/board-components': '3.0.220',\n '@cloudscape-design/chat-components': '1.0.164',\n '@cloudscape-design/components': '3.0.1352',\n '@cloudscape-design/global-styles': '1.0.67',\n '@tanstack/react-query': '5.102.0',\n '@tanstack/react-query-devtools': '5.102.0',\n '@trpc/tanstack-react-query': '11.18.0',\n '@trpc/client': '11.18.0',\n '@trpc/server': '11.18.0',\n '@types/node': '26.2.0',\n '@types/aws-lambda': '8.10.162',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.1',\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.11.3',\n '@smithy/types': '4.17.2',\n '@vitest/coverage-v8': '4.1.11',\n '@vitest/ui': '4.1.11',\n '@astrojs/react': '6.0.4',\n '@astrojs/starlight': '0.41.7',\n astro: '7.2.4',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1138.0',\n 'aws-cdk-lib': '2.266.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.0',\n 'class-variance-authority': '0.7.1',\n clsx: '2.1.1',\n commander: '15.0.0',\n 'cpy-cli': '7.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.10',\n '@prisma/adapter-mariadb': '7.9.1',\n '@prisma/adapter-pg': '7.9.1',\n '@prisma/client': '7.9.1',\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.0',\n '@types/fs-extra': '11.0.4',\n 'make-dir-cli': '4.0.0',\n mariadb: '3.5.3',\n mise: '2026.8.10',\n ncp: '2.0.0',\n npm: '12.0.2',\n 'npm-check-updates': '23.0.2',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.0',\n prisma: '7.9.1',\n 'react-oidc-context': '3.3.1',\n react: '19.2.8',\n 'react-dom': '19.2.8',\n rimraf: '6.1.3',\n rolldown: '1.2.5',\n 'rolldown-plugin-dts': '0.28.2',\n 'simple-git': '3.36.0',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.29.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.12',\n 'lucide-react': '1.33.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.19.0',\n 'tw-animate-css': '1.4.0',\n 'tailwind-merge': '3.6.0',\n vite: '8.2.2',\n typescript: '6.0.3',\n vitest: '4.1.11',\n zod: '4.4.3',\n ws: '8.21.3',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\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.43',\n 'ag-ui-protocol': '==0.1.20',\n 'ag-ui-strands': '==0.3.0',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.34.0',\n 'aws-lambda-powertools[tracer]': '==3.34.0',\n 'aws-lambda-powertools[parser]': '==3.34.0',\n 'aws-opentelemetry-distro': '==0.19.0',\n 'bedrock-agentcore': '==1.22.0',\n boto3: '==1.43.78',\n checkov: '==3.3.13',\n fastapi: '==0.141.1',\n 'fastapi[standard]': '==0.141.1',\n httpx: '==0.28.1',\n langchain: '==1.3.16',\n 'langchain-aws': '==1.7.3',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.11',\n 'langgraph-checkpoint-aws': '==1.2.2',\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 ruff: '==0.16.4',\n 'strands-agents': '==1.53.0',\n 'strands-agents[a2a]': '==1.53.0',\n 'strands-agents-tools': '==0.8.6',\n ty: '==0.0.74',\n pynamodb: '==6.1.0',\n uvicorn: '==0.52.4',\n sqlmodel: '==0.0.39',\n alembic: '==1.19.1',\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.5',\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.73.0',\n 'software.amazon.smithy:smithy-aws-traits': '1.73.0',\n 'software.amazon.smithy:smithy-validation-model': '1.73.0',\n 'software.amazon.smithy:smithy-openapi': '1.73.0',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.52.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.73.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 * Patch of the CPython release uv pins as the project interpreter.\n *\n * A Lambda runtime names only `major.minor`, but uv pins an exact\n * `major.minor.patch`, so only the patch lives here — the `major.minor` comes from\n * {@link LAMBDA_RUNTIME_VERSIONS}. Resolved from uv by the version update\n * workflow.\n */\nexport const PYTHON_RUNTIME_PATCH = '7';\n\n/**\n * The interpreter uv pins for a generated Python project, as `major.minor.patch`.\n * Matches the Lambda Python runtime by construction.\n */\nexport const pyenvPythonVersion = (): string =>\n `${LAMBDA_RUNTIME_VERSIONS.python}.${PYTHON_RUNTIME_PATCH}`;\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.61.0',\n random: '3.9.0',\n null: '3.3.1',\n archive: '2.8.0',\n external: '2.4.1',\n local: '2.9.0',\n time: '0.14.1',\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","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","clsx","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","ncp","npm","pg","prisma","react","rimraf","rolldown","tailwindcss","tsx","shadcn","vite","typescript","vitest","zod","ws","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","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","PYTHON_RUNTIME_PATCH","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","runtime","cdkLambdaRuntime","replace","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,4BAA4B;IAC5B,+BAA+B;IAC/B,uBAAuB;IACvB,qCAAqC;IACrC,mCAAmC;IACnC,sBAAsB;IACtB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