@aws/nx-plugin 1.0.0-rc.66 → 1.0.0-rc.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/migrations.json CHANGED
@@ -2,6 +2,11 @@
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "name": "@aws/nx-plugin",
4
4
  "generators": {
5
+ "latest-smithy-server-package-rename": {
6
+ "version": "1.0.0-rc.67",
7
+ "description": "Move Smithy APIs onto the renamed @smithy/server-* packages",
8
+ "implementation": "./src/migrations/latest/smithy-server-package-rename/migration"
9
+ },
5
10
  "v1.0.0-rc.50-0001-modernize-function-props-cast": {
6
11
  "version": "1.0.0-rc.50",
7
12
  "description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
@@ -98,7 +103,7 @@
98
103
  "implementation": "./src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration"
99
104
  },
100
105
  "sync-vended-versions": {
101
- "version": "1.0.0-rc.66",
106
+ "version": "1.0.0-rc.67",
102
107
  "description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
103
108
  "implementation": "./src/utils/version-upgrade-migration/migration"
104
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "1.0.0-rc.66",
3
+ "version": "1.0.0-rc.67",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -0,0 +1,3 @@
1
+ {
2
+ "description": "Move Smithy APIs onto the renamed @smithy/server-* packages"
3
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { type MigrationReturnObject, type Tree } from '@nx/devkit';
6
+ export default function migration(tree: Tree): Promise<MigrationReturnObject>;
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */ import { getProjects, joinPathFragments, readJson, updateJson } from "@nx/devkit";
5
+ import { applyGritQL, matchGritQL } from "../../../utils/ast.js";
6
+ import { formatFilesInSubtree } from "../../../utils/format.js";
7
+ /**
8
+ * Move a Smithy API onto the renamed `@smithy/server-*` packages.
9
+ *
10
+ * The Smithy server runtime was published as `@aws-smithy/server-*`, stopped at
11
+ * `1.0.0-alpha.10`, and was renamed to `@smithy/server-*`. The Server SDK codegen
12
+ * this release vends generates against the renamed packages, importing
13
+ * `AuthScheme` and `ServerInterceptor` — types the deprecated packages never
14
+ * exported — so a workspace left on them fails to bundle its SSDK.
15
+ *
16
+ * Both the imports and the declarations move: the renamed packages are no longer
17
+ * the same names, so the version sync cannot recognise the old ones and would
18
+ * leave them installed alongside the new.
19
+ *
20
+ * Guardrails:
21
+ * - Scoped to a Smithy API project this plugin generated, found through the
22
+ * metadata the generator records. A file of the user's own that happens to
23
+ * import these packages is left alone.
24
+ * - Imports are rewritten by module specifier, preserving whatever the file
25
+ * imports from it, so a project that imports more than the generated shape
26
+ * keeps its own bindings. Only the two packages the generators vend are
27
+ * matched: `@aws-smithy/server-common` is a transitive dependency of those and
28
+ * is never declared or imported directly.
29
+ * - A manifest is only rewritten where it declares the old package, and the new
30
+ * name takes the field the old one occupied. A workspace that already moved
31
+ * itself is left alone.
32
+ * - Idempotent: nothing matches the old names once they are gone.
33
+ *
34
+ * Every value here is hardcoded rather than read from the generators: this runs
35
+ * once, for the release that renamed the packages, so it has to keep applying
36
+ * that exact change however far the vended versions and generators move
37
+ * afterwards.
38
+ */ /** The id the `ts#smithy-api` generator records on the projects it creates. */ const SMITHY_API_GENERATOR_ID = 'ts#smithy-api';
39
+ /** The renamed packages, old name to new, with the version this release vends. */ const RENAMES = [
40
+ {
41
+ old: '@aws-smithy/server-apigateway',
42
+ renamed: '@smithy/server-apigateway',
43
+ version: '0.2.0'
44
+ },
45
+ {
46
+ old: '@aws-smithy/server-node',
47
+ renamed: '@smithy/server-node',
48
+ version: '0.2.0'
49
+ }
50
+ ];
51
+ /** The source files the generators give these imports. */ const SOURCE_FILES = [
52
+ 'src/handler.ts',
53
+ 'src/local-server.ts'
54
+ ];
55
+ /**
56
+ * Rewrite an import's module specifier, keeping its bindings — `$bindings` holds
57
+ * whatever the file imports, so a binding the project added survives the move.
58
+ */ const importPattern = (from, to)=>`\`import { $bindings } from '${from}'\` => \`import { $bindings } from '${to}'\``;
59
+ /** Whether the file still imports the old package under any other form. */ const hasRemainingImport = (from)=>`\`import $_ from '${from}'\``;
60
+ /** Rename the packages a manifest declares, reporting whether anything changed. */ const renameInManifest = (tree, path)=>{
61
+ if (!tree.exists(path)) {
62
+ return false;
63
+ }
64
+ const json = readJson(tree, path);
65
+ const fields = [
66
+ 'dependencies',
67
+ 'devDependencies'
68
+ ].filter((field)=>RENAMES.some(({ old })=>json[field]?.[old]));
69
+ if (fields.length === 0) {
70
+ return false;
71
+ }
72
+ updateJson(tree, path, (manifest)=>{
73
+ for (const field of fields){
74
+ const declared = manifest[field];
75
+ for (const { old, renamed, version } of RENAMES){
76
+ if (!declared[old]) {
77
+ continue;
78
+ }
79
+ delete declared[old];
80
+ // The vended pin rather than the old specifier: the renamed line
81
+ // restarted at 0.x, so carrying `1.0.0-alpha.10` across resolves nothing.
82
+ declared[renamed] = version;
83
+ }
84
+ }
85
+ return manifest;
86
+ });
87
+ return true;
88
+ };
89
+ const divergedNextStep = (path)=>`${path}: still imports a deprecated '@aws-smithy/server-*' package in a form this migration does not rewrite - update the import to the matching '@smithy/server-*' package by hand.`;
90
+ export default async function migration(tree) {
91
+ const nextSteps = [];
92
+ // Only a Smithy API project this plugin generated carries these packages.
93
+ const projects = [
94
+ ...getProjects(tree).values()
95
+ ].filter((project)=>project.metadata?.generator === SMITHY_API_GENERATOR_ID);
96
+ for (const project of projects){
97
+ for (const sourceFile of SOURCE_FILES){
98
+ const sourcePath = joinPathFragments(project.root, sourceFile);
99
+ if (!tree.exists(sourcePath)) {
100
+ continue;
101
+ }
102
+ for (const { old, renamed } of RENAMES){
103
+ await applyGritQL(tree, sourcePath, importPattern(old, renamed));
104
+ // A namespace or default import of the same package is left as it is —
105
+ // reported rather than rewritten, so a diverged file is never clobbered.
106
+ if (await matchGritQL(tree, sourcePath, hasRemainingImport(old))) {
107
+ nextSteps.push(divergedNextStep(sourcePath));
108
+ }
109
+ }
110
+ }
111
+ renameInManifest(tree, joinPathFragments(project.root, 'package.json'));
112
+ }
113
+ // A workspace may hoist these to the root manifest, which is not an nx project.
114
+ if (projects.length > 0) {
115
+ renameInManifest(tree, 'package.json');
116
+ }
117
+ await formatFilesInSubtree(tree);
118
+ return {
119
+ nextSteps
120
+ };
121
+ }
122
+
123
+ //# sourceMappingURL=migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/smithy-server-package-rename/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n getProjects,\n joinPathFragments,\n type MigrationReturnObject,\n readJson,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport { applyGritQL, matchGritQL } from '../../../utils/ast';\nimport { formatFilesInSubtree } from '../../../utils/format';\n\n/**\n * Move a Smithy API onto the renamed `@smithy/server-*` packages.\n *\n * The Smithy server runtime was published as `@aws-smithy/server-*`, stopped at\n * `1.0.0-alpha.10`, and was renamed to `@smithy/server-*`. The Server SDK codegen\n * this release vends generates against the renamed packages, importing\n * `AuthScheme` and `ServerInterceptor` — types the deprecated packages never\n * exported — so a workspace left on them fails to bundle its SSDK.\n *\n * Both the imports and the declarations move: the renamed packages are no longer\n * the same names, so the version sync cannot recognise the old ones and would\n * leave them installed alongside the new.\n *\n * Guardrails:\n * - Scoped to a Smithy API project this plugin generated, found through the\n * metadata the generator records. A file of the user's own that happens to\n * import these packages is left alone.\n * - Imports are rewritten by module specifier, preserving whatever the file\n * imports from it, so a project that imports more than the generated shape\n * keeps its own bindings. Only the two packages the generators vend are\n * matched: `@aws-smithy/server-common` is a transitive dependency of those and\n * is never declared or imported directly.\n * - A manifest is only rewritten where it declares the old package, and the new\n * name takes the field the old one occupied. A workspace that already moved\n * itself is left alone.\n * - Idempotent: nothing matches the old names once they are gone.\n *\n * Every value here is hardcoded rather than read from the generators: this runs\n * once, for the release that renamed the packages, so it has to keep applying\n * that exact change however far the vended versions and generators move\n * afterwards.\n */\n\n/** The id the `ts#smithy-api` generator records on the projects it creates. */\nconst SMITHY_API_GENERATOR_ID = 'ts#smithy-api';\n\n/** The renamed packages, old name to new, with the version this release vends. */\nconst RENAMES = [\n {\n old: '@aws-smithy/server-apigateway',\n renamed: '@smithy/server-apigateway',\n version: '0.2.0',\n },\n {\n old: '@aws-smithy/server-node',\n renamed: '@smithy/server-node',\n version: '0.2.0',\n },\n] as const;\n\n/** The source files the generators give these imports. */\nconst SOURCE_FILES = ['src/handler.ts', 'src/local-server.ts'];\n\n/**\n * Rewrite an import's module specifier, keeping its bindings — `$bindings` holds\n * whatever the file imports, so a binding the project added survives the move.\n */\nconst importPattern = (from: string, to: string): string =>\n `\\`import { $bindings } from '${from}'\\` => \\`import { $bindings } from '${to}'\\``;\n\n/** Whether the file still imports the old package under any other form. */\nconst hasRemainingImport = (from: string): string =>\n `\\`import $_ from '${from}'\\``;\n\n/** Rename the packages a manifest declares, reporting whether anything changed. */\nconst renameInManifest = (tree: Tree, path: string): boolean => {\n if (!tree.exists(path)) {\n return false;\n }\n const json = readJson(tree, path);\n const fields = (['dependencies', 'devDependencies'] as const).filter(\n (field) => RENAMES.some(({ old }) => json[field]?.[old]),\n );\n if (fields.length === 0) {\n return false;\n }\n updateJson(tree, path, (manifest) => {\n for (const field of fields) {\n const declared = manifest[field] as Record<string, string>;\n for (const { old, renamed, version } of RENAMES) {\n if (!declared[old]) {\n continue;\n }\n delete declared[old];\n // The vended pin rather than the old specifier: the renamed line\n // restarted at 0.x, so carrying `1.0.0-alpha.10` across resolves nothing.\n declared[renamed] = version;\n }\n }\n return manifest;\n });\n return true;\n};\n\nconst divergedNextStep = (path: string): string =>\n `${path}: still imports a deprecated '@aws-smithy/server-*' package in a form this migration does not rewrite - update the import to the matching '@smithy/server-*' package by hand.`;\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n // Only a Smithy API project this plugin generated carries these packages.\n const projects = [...getProjects(tree).values()].filter(\n (project) =>\n (project.metadata as { generator?: string } | undefined)?.generator ===\n SMITHY_API_GENERATOR_ID,\n );\n\n for (const project of projects) {\n for (const sourceFile of SOURCE_FILES) {\n const sourcePath = joinPathFragments(project.root, sourceFile);\n if (!tree.exists(sourcePath)) {\n continue;\n }\n for (const { old, renamed } of RENAMES) {\n await applyGritQL(tree, sourcePath, importPattern(old, renamed));\n // A namespace or default import of the same package is left as it is —\n // reported rather than rewritten, so a diverged file is never clobbered.\n if (await matchGritQL(tree, sourcePath, hasRemainingImport(old))) {\n nextSteps.push(divergedNextStep(sourcePath));\n }\n }\n }\n\n renameInManifest(tree, joinPathFragments(project.root, 'package.json'));\n }\n\n // A workspace may hoist these to the root manifest, which is not an nx project.\n if (projects.length > 0) {\n renameInManifest(tree, 'package.json');\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["getProjects","joinPathFragments","readJson","updateJson","applyGritQL","matchGritQL","formatFilesInSubtree","SMITHY_API_GENERATOR_ID","RENAMES","old","renamed","version","SOURCE_FILES","importPattern","from","to","hasRemainingImport","renameInManifest","tree","path","exists","json","fields","filter","field","some","length","manifest","declared","divergedNextStep","migration","nextSteps","projects","values","project","metadata","generator","sourceFile","sourcePath","root","push"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EACXC,iBAAiB,EAEjBC,QAAQ,EAERC,UAAU,QACL,aAAa;AACpB,SAASC,WAAW,EAAEC,WAAW,QAAQ,wBAA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,GAAGC;YACtB;QACF;QACA,OAAOgB;IACT;IACA,OAAO;AACT;AAEA,MAAME,mBAAmB,CAACV,OACxB,GAAGA,KAAK,6KAA6K,CAAC;AAExL,eAAe,eAAeW,UAC5BZ,IAAU;IAEV,MAAMa,YAAsB,EAAE;IAE9B,0EAA0E;IAC1E,MAAMC,WAAW;WAAIhC,YAAYkB,MAAMe,MAAM;KAAG,CAACV,MAAM,CACrD,CAACW,UACC,AAACA,QAAQC,QAAQ,EAAyCC,cAC1D7B;IAGJ,KAAK,MAAM2B,WAAWF,SAAU;QAC9B,KAAK,MAAMK,cAAczB,aAAc;YACrC,MAAM0B,aAAarC,kBAAkBiC,QAAQK,IAAI,EAAEF;YACnD,IAAI,CAACnB,KAAKE,MAAM,CAACkB,aAAa;gBAC5B;YACF;YACA,KAAK,MAAM,EAAE7B,GAAG,EAAEC,OAAO,EAAE,IAAIF,QAAS;gBACtC,MAAMJ,YAAYc,MAAMoB,YAAYzB,cAAcJ,KAAKC;gBACvD,uEAAuE;gBACvE,yEAAyE;gBACzE,IAAI,MAAML,YAAYa,MAAMoB,YAAYtB,mBAAmBP,OAAO;oBAChEsB,UAAUS,IAAI,CAACX,iBAAiBS;gBAClC;YACF;QACF;QAEArB,iBAAiBC,MAAMjB,kBAAkBiC,QAAQK,IAAI,EAAE;IACzD;IAEA,gFAAgF;IAChF,IAAIP,SAASN,MAAM,GAAG,GAAG;QACvBT,iBAAiBC,MAAM;IACzB;IAEA,MAAMZ,qBAAqBY;IAE3B,OAAO;QAAEa;IAAU;AACrB"}
@@ -10,7 +10,7 @@ import type { PyAgentA2aConnectionGeneratorSchema } from './schema';
10
10
  export interface PyAgentA2aConnectionMetadata {
11
11
  readonly framework: AgentFramework;
12
12
  }
13
- export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly import("../../../utils/declared-dependencies").DeclaredTsDependency<"@a2a-js/sdk" | "@aws/aws-distro-opentelemetry-node-autoinstrumentation" | "@opentelemetry/propagator-jaeger" | "minimatch" | "@aws-sdk/client-dynamodb" | "@aws-sdk/client-api-gateway" | "@aws-sdk/client-iam" | "@aws-sdk/client-bedrock-agentcore" | "@aws-sdk/client-bedrock-runtime" | "@aws-sdk/client-s3" | "@aws-sdk/client-sts" | "@aws-sdk/credential-providers" | "@aws-sdk/credential-provider-cognito-identity" | "@aws-sdk/client-secrets-manager" | "@aws-sdk/rds-signer" | "@aws-smithy/server-apigateway" | "@aws-smithy/server-node" | "@aws-lambda-powertools/logger" | "@aws-lambda-powertools/metrics" | "@aws-lambda-powertools/parameters" | "@aws-lambda-powertools/tracer" | "@aws-lambda-powertools/parser" | "@aws-sdk/client-appconfigdata" | "@middy/core" | "@nxlv/python" | "@nx-extend/terraform" | "nx" | "@nx/devkit" | "@nx/js" | "@nx/react" | "@nx/vite" | "@nx/vitest" | "@nx/workspace" | "create-nx-workspace" | "@swc-node/register" | "@swc/core" | "@modelcontextprotocol/sdk" | "@modelcontextprotocol/inspector" | "@ag-ui/a2ui-toolkit" | "@ag-ui/aws-strands" | "@ag-ui/client" | "@ag-ui/core" | "@ag-ui/encoder" | "agent-chat-cli" | "@copilotkit/react-core" | "rxjs" | "@strands-agents/sdk" | "@tanstack/react-router" | "@tanstack/router-plugin" | "@tanstack/router-generator" | "@tanstack/virtual-file-routes" | "@tanstack/router-utils" | "@cloudscape-design/board-components" | "@cloudscape-design/chat-components" | "@cloudscape-design/components" | "@cloudscape-design/global-styles" | "@tanstack/react-query" | "@tanstack/react-query-devtools" | "@trpc/tanstack-react-query" | "@trpc/client" | "@trpc/server" | "@types/node" | "@types/aws-lambda" | "@types/cors" | "@types/pg" | "@types/ws" | "@types/express" | "@smithy/config-resolver" | "@smithy/node-config-provider" | "@smithy/node-http-handler" | "@smithy/types" | "@vitest/coverage-v8" | "@vitest/ui" | "@astrojs/react" | "@astrojs/starlight" | "astro" | "aws4fetch" | "aws-cdk" | "aws-cdk-lib" | "aws-xray-sdk-core" | "constructs" | "cors" | "chalk" | "class-variance-authority" | "clsx" | "commander" | "cpy-cli" | "electrodb" | "esbuild" | "event-source-polyfill" | "@types/event-source-polyfill" | "@biomejs/biome" | "@prisma/adapter-mariadb" | "@prisma/adapter-pg" | "@prisma/client" | "ejs" | "@types/ejs" | "express" | "fast-glob" | "husky" | "fs-extra" | "@types/fs-extra" | "make-dir-cli" | "mariadb" | "mise" | "ncp" | "npm" | "npm-check-updates" | "oidc-client-ts" | "pg" | "prisma" | "react-oidc-context" | "react" | "react-dom" | "rimraf" | "rolldown" | "rolldown-plugin-dts" | "simple-git" | "source-map-support" | "starlight-blog" | "tailwindcss" | "@tailwindcss/vite" | "tsx" | "lucide-react" | "radix-ui" | "shadcn" | "tw-animate-css" | "tailwind-merge" | "vite" | "typescript" | "vitest" | "zod" | "ws", PyAgentA2aConnectionMetadata>[], readonly [{
13
+ export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly import("../../../utils/declared-dependencies").DeclaredTsDependency<"@a2a-js/sdk" | "@aws/aws-distro-opentelemetry-node-autoinstrumentation" | "@opentelemetry/propagator-jaeger" | "minimatch" | "@aws-sdk/client-dynamodb" | "@aws-sdk/client-api-gateway" | "@aws-sdk/client-iam" | "@aws-sdk/client-bedrock-agentcore" | "@aws-sdk/client-bedrock-runtime" | "@aws-sdk/client-s3" | "@aws-sdk/client-sts" | "@aws-sdk/credential-providers" | "@aws-sdk/credential-provider-cognito-identity" | "@aws-sdk/client-secrets-manager" | "@aws-sdk/rds-signer" | "@smithy/server-apigateway" | "@smithy/server-node" | "@aws-lambda-powertools/logger" | "@aws-lambda-powertools/metrics" | "@aws-lambda-powertools/parameters" | "@aws-lambda-powertools/tracer" | "@aws-lambda-powertools/parser" | "@aws-sdk/client-appconfigdata" | "@middy/core" | "@nxlv/python" | "@nx-extend/terraform" | "nx" | "@nx/devkit" | "@nx/js" | "@nx/react" | "@nx/vite" | "@nx/vitest" | "@nx/workspace" | "create-nx-workspace" | "@swc-node/register" | "@swc/core" | "@modelcontextprotocol/sdk" | "@modelcontextprotocol/inspector" | "@ag-ui/a2ui-toolkit" | "@ag-ui/aws-strands" | "@ag-ui/client" | "@ag-ui/core" | "@ag-ui/encoder" | "agent-chat-cli" | "@copilotkit/react-core" | "rxjs" | "@strands-agents/sdk" | "@tanstack/react-router" | "@tanstack/router-plugin" | "@tanstack/router-generator" | "@tanstack/virtual-file-routes" | "@tanstack/router-utils" | "@cloudscape-design/board-components" | "@cloudscape-design/chat-components" | "@cloudscape-design/components" | "@cloudscape-design/global-styles" | "@tanstack/react-query" | "@tanstack/react-query-devtools" | "@trpc/tanstack-react-query" | "@trpc/client" | "@trpc/server" | "@types/node" | "@types/aws-lambda" | "@types/cors" | "@types/pg" | "@types/ws" | "@types/express" | "@smithy/config-resolver" | "@smithy/node-config-provider" | "@smithy/node-http-handler" | "@smithy/types" | "@vitest/coverage-v8" | "@vitest/ui" | "@astrojs/react" | "@astrojs/starlight" | "astro" | "aws4fetch" | "aws-cdk" | "aws-cdk-lib" | "aws-xray-sdk-core" | "constructs" | "cors" | "chalk" | "class-variance-authority" | "clsx" | "commander" | "cpy-cli" | "electrodb" | "esbuild" | "event-source-polyfill" | "@types/event-source-polyfill" | "@biomejs/biome" | "@prisma/adapter-mariadb" | "@prisma/adapter-pg" | "@prisma/client" | "ejs" | "@types/ejs" | "express" | "fast-glob" | "husky" | "fs-extra" | "@types/fs-extra" | "make-dir-cli" | "mariadb" | "mise" | "ncp" | "npm" | "npm-check-updates" | "oidc-client-ts" | "pg" | "prisma" | "react-oidc-context" | "react" | "react-dom" | "rimraf" | "rolldown" | "rolldown-plugin-dts" | "simple-git" | "source-map-support" | "starlight-blog" | "tailwindcss" | "@tailwindcss/vite" | "tsx" | "lucide-react" | "radix-ui" | "shadcn" | "tw-animate-css" | "tailwind-merge" | "vite" | "typescript" | "vitest" | "zod" | "ws", PyAgentA2aConnectionMetadata>[], readonly [{
14
14
  readonly name: "boto3";
15
15
  }, {
16
16
  readonly name: "httpx";
@@ -10,7 +10,7 @@ import type { PyAgentGatewayConnectionGeneratorSchema } from './schema';
10
10
  export interface PyAgentGatewayConnectionMetadata {
11
11
  readonly framework: AgentFramework;
12
12
  }
13
- export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly import("../../../utils/declared-dependencies").DeclaredTsDependency<"@a2a-js/sdk" | "@aws/aws-distro-opentelemetry-node-autoinstrumentation" | "@opentelemetry/propagator-jaeger" | "minimatch" | "@aws-sdk/client-dynamodb" | "@aws-sdk/client-api-gateway" | "@aws-sdk/client-iam" | "@aws-sdk/client-bedrock-agentcore" | "@aws-sdk/client-bedrock-runtime" | "@aws-sdk/client-s3" | "@aws-sdk/client-sts" | "@aws-sdk/credential-providers" | "@aws-sdk/credential-provider-cognito-identity" | "@aws-sdk/client-secrets-manager" | "@aws-sdk/rds-signer" | "@aws-smithy/server-apigateway" | "@aws-smithy/server-node" | "@aws-lambda-powertools/logger" | "@aws-lambda-powertools/metrics" | "@aws-lambda-powertools/parameters" | "@aws-lambda-powertools/tracer" | "@aws-lambda-powertools/parser" | "@aws-sdk/client-appconfigdata" | "@middy/core" | "@nxlv/python" | "@nx-extend/terraform" | "nx" | "@nx/devkit" | "@nx/js" | "@nx/react" | "@nx/vite" | "@nx/vitest" | "@nx/workspace" | "create-nx-workspace" | "@swc-node/register" | "@swc/core" | "@modelcontextprotocol/sdk" | "@modelcontextprotocol/inspector" | "@ag-ui/a2ui-toolkit" | "@ag-ui/aws-strands" | "@ag-ui/client" | "@ag-ui/core" | "@ag-ui/encoder" | "agent-chat-cli" | "@copilotkit/react-core" | "rxjs" | "@strands-agents/sdk" | "@tanstack/react-router" | "@tanstack/router-plugin" | "@tanstack/router-generator" | "@tanstack/virtual-file-routes" | "@tanstack/router-utils" | "@cloudscape-design/board-components" | "@cloudscape-design/chat-components" | "@cloudscape-design/components" | "@cloudscape-design/global-styles" | "@tanstack/react-query" | "@tanstack/react-query-devtools" | "@trpc/tanstack-react-query" | "@trpc/client" | "@trpc/server" | "@types/node" | "@types/aws-lambda" | "@types/cors" | "@types/pg" | "@types/ws" | "@types/express" | "@smithy/config-resolver" | "@smithy/node-config-provider" | "@smithy/node-http-handler" | "@smithy/types" | "@vitest/coverage-v8" | "@vitest/ui" | "@astrojs/react" | "@astrojs/starlight" | "astro" | "aws4fetch" | "aws-cdk" | "aws-cdk-lib" | "aws-xray-sdk-core" | "constructs" | "cors" | "chalk" | "class-variance-authority" | "clsx" | "commander" | "cpy-cli" | "electrodb" | "esbuild" | "event-source-polyfill" | "@types/event-source-polyfill" | "@biomejs/biome" | "@prisma/adapter-mariadb" | "@prisma/adapter-pg" | "@prisma/client" | "ejs" | "@types/ejs" | "express" | "fast-glob" | "husky" | "fs-extra" | "@types/fs-extra" | "make-dir-cli" | "mariadb" | "mise" | "ncp" | "npm" | "npm-check-updates" | "oidc-client-ts" | "pg" | "prisma" | "react-oidc-context" | "react" | "react-dom" | "rimraf" | "rolldown" | "rolldown-plugin-dts" | "simple-git" | "source-map-support" | "starlight-blog" | "tailwindcss" | "@tailwindcss/vite" | "tsx" | "lucide-react" | "radix-ui" | "shadcn" | "tw-animate-css" | "tailwind-merge" | "vite" | "typescript" | "vitest" | "zod" | "ws", PyAgentGatewayConnectionMetadata>[], readonly [{
13
+ export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly import("../../../utils/declared-dependencies").DeclaredTsDependency<"@a2a-js/sdk" | "@aws/aws-distro-opentelemetry-node-autoinstrumentation" | "@opentelemetry/propagator-jaeger" | "minimatch" | "@aws-sdk/client-dynamodb" | "@aws-sdk/client-api-gateway" | "@aws-sdk/client-iam" | "@aws-sdk/client-bedrock-agentcore" | "@aws-sdk/client-bedrock-runtime" | "@aws-sdk/client-s3" | "@aws-sdk/client-sts" | "@aws-sdk/credential-providers" | "@aws-sdk/credential-provider-cognito-identity" | "@aws-sdk/client-secrets-manager" | "@aws-sdk/rds-signer" | "@smithy/server-apigateway" | "@smithy/server-node" | "@aws-lambda-powertools/logger" | "@aws-lambda-powertools/metrics" | "@aws-lambda-powertools/parameters" | "@aws-lambda-powertools/tracer" | "@aws-lambda-powertools/parser" | "@aws-sdk/client-appconfigdata" | "@middy/core" | "@nxlv/python" | "@nx-extend/terraform" | "nx" | "@nx/devkit" | "@nx/js" | "@nx/react" | "@nx/vite" | "@nx/vitest" | "@nx/workspace" | "create-nx-workspace" | "@swc-node/register" | "@swc/core" | "@modelcontextprotocol/sdk" | "@modelcontextprotocol/inspector" | "@ag-ui/a2ui-toolkit" | "@ag-ui/aws-strands" | "@ag-ui/client" | "@ag-ui/core" | "@ag-ui/encoder" | "agent-chat-cli" | "@copilotkit/react-core" | "rxjs" | "@strands-agents/sdk" | "@tanstack/react-router" | "@tanstack/router-plugin" | "@tanstack/router-generator" | "@tanstack/virtual-file-routes" | "@tanstack/router-utils" | "@cloudscape-design/board-components" | "@cloudscape-design/chat-components" | "@cloudscape-design/components" | "@cloudscape-design/global-styles" | "@tanstack/react-query" | "@tanstack/react-query-devtools" | "@trpc/tanstack-react-query" | "@trpc/client" | "@trpc/server" | "@types/node" | "@types/aws-lambda" | "@types/cors" | "@types/pg" | "@types/ws" | "@types/express" | "@smithy/config-resolver" | "@smithy/node-config-provider" | "@smithy/node-http-handler" | "@smithy/types" | "@vitest/coverage-v8" | "@vitest/ui" | "@astrojs/react" | "@astrojs/starlight" | "astro" | "aws4fetch" | "aws-cdk" | "aws-cdk-lib" | "aws-xray-sdk-core" | "constructs" | "cors" | "chalk" | "class-variance-authority" | "clsx" | "commander" | "cpy-cli" | "electrodb" | "esbuild" | "event-source-polyfill" | "@types/event-source-polyfill" | "@biomejs/biome" | "@prisma/adapter-mariadb" | "@prisma/adapter-pg" | "@prisma/client" | "ejs" | "@types/ejs" | "express" | "fast-glob" | "husky" | "fs-extra" | "@types/fs-extra" | "make-dir-cli" | "mariadb" | "mise" | "ncp" | "npm" | "npm-check-updates" | "oidc-client-ts" | "pg" | "prisma" | "react-oidc-context" | "react" | "react-dom" | "rimraf" | "rolldown" | "rolldown-plugin-dts" | "simple-git" | "source-map-support" | "starlight-blog" | "tailwindcss" | "@tailwindcss/vite" | "tsx" | "lucide-react" | "radix-ui" | "shadcn" | "tw-animate-css" | "tailwind-merge" | "vite" | "typescript" | "vitest" | "zod" | "ws", PyAgentGatewayConnectionMetadata>[], readonly [{
14
14
  readonly name: "boto3";
15
15
  }, {
16
16
  readonly name: "httpx";
@@ -10,7 +10,7 @@ import type { PyAgentMcpConnectionGeneratorSchema } from './schema';
10
10
  export interface PyAgentMcpConnectionMetadata {
11
11
  readonly framework: AgentFramework;
12
12
  }
13
- export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly import("../../../utils/declared-dependencies").DeclaredTsDependency<"@a2a-js/sdk" | "@aws/aws-distro-opentelemetry-node-autoinstrumentation" | "@opentelemetry/propagator-jaeger" | "minimatch" | "@aws-sdk/client-dynamodb" | "@aws-sdk/client-api-gateway" | "@aws-sdk/client-iam" | "@aws-sdk/client-bedrock-agentcore" | "@aws-sdk/client-bedrock-runtime" | "@aws-sdk/client-s3" | "@aws-sdk/client-sts" | "@aws-sdk/credential-providers" | "@aws-sdk/credential-provider-cognito-identity" | "@aws-sdk/client-secrets-manager" | "@aws-sdk/rds-signer" | "@aws-smithy/server-apigateway" | "@aws-smithy/server-node" | "@aws-lambda-powertools/logger" | "@aws-lambda-powertools/metrics" | "@aws-lambda-powertools/parameters" | "@aws-lambda-powertools/tracer" | "@aws-lambda-powertools/parser" | "@aws-sdk/client-appconfigdata" | "@middy/core" | "@nxlv/python" | "@nx-extend/terraform" | "nx" | "@nx/devkit" | "@nx/js" | "@nx/react" | "@nx/vite" | "@nx/vitest" | "@nx/workspace" | "create-nx-workspace" | "@swc-node/register" | "@swc/core" | "@modelcontextprotocol/sdk" | "@modelcontextprotocol/inspector" | "@ag-ui/a2ui-toolkit" | "@ag-ui/aws-strands" | "@ag-ui/client" | "@ag-ui/core" | "@ag-ui/encoder" | "agent-chat-cli" | "@copilotkit/react-core" | "rxjs" | "@strands-agents/sdk" | "@tanstack/react-router" | "@tanstack/router-plugin" | "@tanstack/router-generator" | "@tanstack/virtual-file-routes" | "@tanstack/router-utils" | "@cloudscape-design/board-components" | "@cloudscape-design/chat-components" | "@cloudscape-design/components" | "@cloudscape-design/global-styles" | "@tanstack/react-query" | "@tanstack/react-query-devtools" | "@trpc/tanstack-react-query" | "@trpc/client" | "@trpc/server" | "@types/node" | "@types/aws-lambda" | "@types/cors" | "@types/pg" | "@types/ws" | "@types/express" | "@smithy/config-resolver" | "@smithy/node-config-provider" | "@smithy/node-http-handler" | "@smithy/types" | "@vitest/coverage-v8" | "@vitest/ui" | "@astrojs/react" | "@astrojs/starlight" | "astro" | "aws4fetch" | "aws-cdk" | "aws-cdk-lib" | "aws-xray-sdk-core" | "constructs" | "cors" | "chalk" | "class-variance-authority" | "clsx" | "commander" | "cpy-cli" | "electrodb" | "esbuild" | "event-source-polyfill" | "@types/event-source-polyfill" | "@biomejs/biome" | "@prisma/adapter-mariadb" | "@prisma/adapter-pg" | "@prisma/client" | "ejs" | "@types/ejs" | "express" | "fast-glob" | "husky" | "fs-extra" | "@types/fs-extra" | "make-dir-cli" | "mariadb" | "mise" | "ncp" | "npm" | "npm-check-updates" | "oidc-client-ts" | "pg" | "prisma" | "react-oidc-context" | "react" | "react-dom" | "rimraf" | "rolldown" | "rolldown-plugin-dts" | "simple-git" | "source-map-support" | "starlight-blog" | "tailwindcss" | "@tailwindcss/vite" | "tsx" | "lucide-react" | "radix-ui" | "shadcn" | "tw-animate-css" | "tailwind-merge" | "vite" | "typescript" | "vitest" | "zod" | "ws", PyAgentMcpConnectionMetadata>[], readonly [{
13
+ export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly import("../../../utils/declared-dependencies").DeclaredTsDependency<"@a2a-js/sdk" | "@aws/aws-distro-opentelemetry-node-autoinstrumentation" | "@opentelemetry/propagator-jaeger" | "minimatch" | "@aws-sdk/client-dynamodb" | "@aws-sdk/client-api-gateway" | "@aws-sdk/client-iam" | "@aws-sdk/client-bedrock-agentcore" | "@aws-sdk/client-bedrock-runtime" | "@aws-sdk/client-s3" | "@aws-sdk/client-sts" | "@aws-sdk/credential-providers" | "@aws-sdk/credential-provider-cognito-identity" | "@aws-sdk/client-secrets-manager" | "@aws-sdk/rds-signer" | "@smithy/server-apigateway" | "@smithy/server-node" | "@aws-lambda-powertools/logger" | "@aws-lambda-powertools/metrics" | "@aws-lambda-powertools/parameters" | "@aws-lambda-powertools/tracer" | "@aws-lambda-powertools/parser" | "@aws-sdk/client-appconfigdata" | "@middy/core" | "@nxlv/python" | "@nx-extend/terraform" | "nx" | "@nx/devkit" | "@nx/js" | "@nx/react" | "@nx/vite" | "@nx/vitest" | "@nx/workspace" | "create-nx-workspace" | "@swc-node/register" | "@swc/core" | "@modelcontextprotocol/sdk" | "@modelcontextprotocol/inspector" | "@ag-ui/a2ui-toolkit" | "@ag-ui/aws-strands" | "@ag-ui/client" | "@ag-ui/core" | "@ag-ui/encoder" | "agent-chat-cli" | "@copilotkit/react-core" | "rxjs" | "@strands-agents/sdk" | "@tanstack/react-router" | "@tanstack/router-plugin" | "@tanstack/router-generator" | "@tanstack/virtual-file-routes" | "@tanstack/router-utils" | "@cloudscape-design/board-components" | "@cloudscape-design/chat-components" | "@cloudscape-design/components" | "@cloudscape-design/global-styles" | "@tanstack/react-query" | "@tanstack/react-query-devtools" | "@trpc/tanstack-react-query" | "@trpc/client" | "@trpc/server" | "@types/node" | "@types/aws-lambda" | "@types/cors" | "@types/pg" | "@types/ws" | "@types/express" | "@smithy/config-resolver" | "@smithy/node-config-provider" | "@smithy/node-http-handler" | "@smithy/types" | "@vitest/coverage-v8" | "@vitest/ui" | "@astrojs/react" | "@astrojs/starlight" | "astro" | "aws4fetch" | "aws-cdk" | "aws-cdk-lib" | "aws-xray-sdk-core" | "constructs" | "cors" | "chalk" | "class-variance-authority" | "clsx" | "commander" | "cpy-cli" | "electrodb" | "esbuild" | "event-source-polyfill" | "@types/event-source-polyfill" | "@biomejs/biome" | "@prisma/adapter-mariadb" | "@prisma/adapter-pg" | "@prisma/client" | "ejs" | "@types/ejs" | "express" | "fast-glob" | "husky" | "fs-extra" | "@types/fs-extra" | "make-dir-cli" | "mariadb" | "mise" | "ncp" | "npm" | "npm-check-updates" | "oidc-client-ts" | "pg" | "prisma" | "react-oidc-context" | "react" | "react-dom" | "rimraf" | "rolldown" | "rolldown-plugin-dts" | "simple-git" | "source-map-support" | "starlight-blog" | "tailwindcss" | "@tailwindcss/vite" | "tsx" | "lucide-react" | "radix-ui" | "shadcn" | "tw-animate-css" | "tailwind-merge" | "vite" | "typescript" | "vitest" | "zod" | "ws", PyAgentMcpConnectionMetadata>[], readonly [{
14
14
  readonly name: "boto3";
15
15
  }, {
16
16
  readonly name: "httpx";
@@ -364,7 +364,7 @@ exports[`smithyProjectGenerator > should generate smithy project with default op
364
364
  "software.amazon.smithy:smithy-aws-traits:1.72.1",
365
365
  "software.amazon.smithy:smithy-validation-model:1.72.1",
366
366
  "software.amazon.smithy:smithy-openapi:1.72.1",
367
- "software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.50.0"
367
+ "software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.52.0"
368
368
  ]
369
369
  }
370
370
  }
@@ -550,7 +550,7 @@ exports[`smithyProjectGenerator > should handle kebab-case conversion for servic
550
550
  "software.amazon.smithy:smithy-aws-traits:1.72.1",
551
551
  "software.amazon.smithy:smithy-validation-model:1.72.1",
552
552
  "software.amazon.smithy:smithy-openapi:1.72.1",
553
- "software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.50.0"
553
+ "software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.52.0"
554
554
  ]
555
555
  }
556
556
  }
@@ -1628,7 +1628,7 @@ exports[`tsSmithyApiGenerator > should generate smithy ts api with default optio
1628
1628
  "import {
1629
1629
  convertEvent,
1630
1630
  convertVersion1Response,
1631
- } from '@aws-smithy/server-apigateway';
1631
+ } from '@smithy/server-apigateway';
1632
1632
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
1633
1633
  import middy from '@middy/core';
1634
1634
  import { Tracer } from '@aws-lambda-powertools/tracer';
@@ -1693,7 +1693,7 @@ export const handler = middy<APIGatewayProxyEvent, APIGatewayProxyResult>()
1693
1693
 
1694
1694
  exports[`tsSmithyApiGenerator > should generate smithy ts api with default options > local-server.ts 1`] = `
1695
1695
  "import { IncomingMessage, ServerResponse, createServer } from 'http';
1696
- import { convertRequest, writeResponse } from '@aws-smithy/server-node';
1696
+ import { convertRequest, writeResponse } from '@smithy/server-node';
1697
1697
  import { Logger } from '@aws-lambda-powertools/logger';
1698
1698
  import { Metrics } from '@aws-lambda-powertools/metrics';
1699
1699
  import { Tracer } from '@aws-lambda-powertools/tracer';
@@ -1807,7 +1807,7 @@ exports[`tsSmithyApiGenerator > should handle kebab-case API names correctly > k
1807
1807
  "import {
1808
1808
  convertEvent,
1809
1809
  convertVersion1Response,
1810
- } from '@aws-smithy/server-apigateway';
1810
+ } from '@smithy/server-apigateway';
1811
1811
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
1812
1812
  import middy from '@middy/core';
1813
1813
  import { Tracer } from '@aws-lambda-powertools/tracer';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  convertEvent,
3
3
  convertVersion1Response,
4
- } from '@aws-smithy/server-apigateway';
4
+ } from '@smithy/server-apigateway';
5
5
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
6
6
  import middy from '@middy/core';
7
7
  import { Tracer } from '@aws-lambda-powertools/tracer';
@@ -1,5 +1,5 @@
1
1
  import { IncomingMessage, ServerResponse, createServer } from 'http';
2
- import { convertRequest, writeResponse } from '@aws-smithy/server-node';
2
+ import { convertRequest, writeResponse } from '@smithy/server-node';
3
3
  import { Logger } from '@aws-lambda-powertools/logger';
4
4
  import { Metrics } from '@aws-lambda-powertools/metrics';
5
5
  import { Tracer } from '@aws-lambda-powertools/tracer';
@@ -13,9 +13,9 @@ export interface TsSmithyApiMetadata extends IacMetadata {
13
13
  readonly modelProject: string;
14
14
  }
15
15
  export declare const DEPENDENCIES: import("../../../utils/declared-dependencies").DependencyDeclaration<readonly [{
16
- readonly name: "@aws-smithy/server-apigateway";
16
+ readonly name: "@smithy/server-apigateway";
17
17
  }, {
18
- readonly name: "@aws-smithy/server-node";
18
+ readonly name: "@smithy/server-node";
19
19
  }, {
20
20
  readonly name: "@middy/core";
21
21
  }, {
@@ -25,10 +25,10 @@ import smithyProjectGenerator from "../../project/generator.js";
25
25
  export const DEPENDENCIES = declareDependencies()({
26
26
  ts: [
27
27
  {
28
- name: '@aws-smithy/server-apigateway'
28
+ name: '@smithy/server-apigateway'
29
29
  },
30
30
  {
31
- name: '@aws-smithy/server-node'
31
+ name: '@smithy/server-node'
32
32
  },
33
33
  {
34
34
  name: '@middy/core'
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/smithy/ts/api/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport tsProjectGenerator, { getTsLibDetails } from '../../../ts/lib/generator';\nimport { addTsDependencies } from '../../../utils/add-dependencies';\nimport {\n API_CONSTRUCTS_DEPENDENCIES,\n API_CONSTRUCTS_PY_DEPENDENCIES,\n addApiGatewayInfra,\n} from '../../../utils/api-constructs/api-constructs';\nimport { addSharedConstructsOpenApiMetadataGenerateTarget } from '../../../utils/api-constructs/open-api-metadata';\nimport {\n addTypeScriptBundleTarget,\n BUNDLE_DEPENDENCIES,\n} from '../../../utils/bundle/bundle';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../../../utils/declared-dependencies';\nimport { formatFilesInSubtree } from '../../../utils/format';\nimport { FS_DEPENDENCIES, FsCommands } from '../../../utils/fs';\nimport { updateGitIgnore } from '../../../utils/git';\nimport { resolveIac } from '../../../utils/iac';\nimport { installDependencies } from '../../../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../../../utils/metrics';\nimport { esmVars } from '../../../utils/module-format';\nimport { toClassName, toKebabCase } from '../../../utils/names';\nimport {\n addDependencyToTargetIfNotPresent,\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n normalizeTargetKeyOrder,\n readProjectConfigurationUnqualified,\n} from '../../../utils/nx';\nimport { assignPort } from '../../../utils/port';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../../../utils/shared-constructs';\nimport type { IacMetadata } from '../../../utils/shared-constructs-constants';\nimport smithyProjectGenerator from '../../project/generator';\nimport type { TsSmithyApiGeneratorSchema } from './schema';\n\n/** The metadata this generator records, which its predicates read. */\nexport interface TsSmithyApiMetadata extends IacMetadata {\n readonly apiName: string;\n readonly auth: TsSmithyApiGeneratorSchema['auth'];\n readonly modelProject: string;\n}\n\n// Each entry names the branch it belongs to, so the same declaration drives both\n// adding and the version sync.\nexport const DEPENDENCIES = declareDependencies<TsSmithyApiMetadata>()({\n ts: [\n { name: '@aws-smithy/server-apigateway' },\n { name: '@aws-smithy/server-node' },\n { name: '@middy/core' },\n { name: '@aws-lambda-powertools/logger' },\n { name: '@aws-lambda-powertools/parameters' },\n { name: '@aws-lambda-powertools/tracer' },\n { name: '@aws-lambda-powertools/metrics' },\n { name: '@aws-sdk/client-appconfigdata' },\n // The custom authorizer handler parses its event.\n { name: '@aws-lambda-powertools/parser', when: (m) => m.auth === 'custom' },\n { name: '@types/aws-lambda', dev: true },\n // tsx runs the local server from the workspace root.\n { name: 'tsx', dev: true, root: true },\n ...ownedElsewhere(FS_DEPENDENCIES),\n ...ownedElsewhere(API_CONSTRUCTS_DEPENDENCIES),\n ...ownedElsewhere(BUNDLE_DEPENDENCIES),\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ],\n py: ownedElsewhere(API_CONSTRUCTS_PY_DEPENDENCIES),\n});\n\nexport const TS_SMITHY_API_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport const tsSmithyApiGenerator = async (\n tree: Tree,\n options: TsSmithyApiGeneratorSchema,\n): Promise<GeneratorCallback> => {\n if (\n (options.infra as string) !== 'rest-lambda' &&\n (options.infra as string) !== 'none'\n ) {\n throw new Error(\n `Unsupported infra '${options.infra}' for Smithy TypeScript API. ` +\n `Only 'rest-lambda' (API Gateway REST API) is supported.`,\n );\n }\n\n const integrationPattern = getIntegrationPattern(options);\n const apiNameClassName = toClassName(options.name);\n const apiNameKebabCase = toKebabCase(options.name);\n const { fullyQualifiedName: backendFullyQualifiedName, dir } =\n getTsLibDetails(tree, options);\n const modelProjectName = `${apiNameKebabCase}-model`;\n\n let projectExists: boolean;\n try {\n readProjectConfigurationUnqualified(tree, backendFullyQualifiedName);\n projectExists = true;\n } catch {\n projectExists = false;\n }\n\n if (!projectExists) {\n // Generate the model project\n await smithyProjectGenerator(tree, {\n name: modelProjectName,\n serviceName: apiNameClassName,\n namespace: options.namespace,\n directory: dir,\n subDirectory: 'model',\n preferInstallDependencies: false,\n });\n\n // Generate the backend project\n await tsProjectGenerator(tree, {\n name: options.name,\n directory: dir,\n subDirectory: 'backend',\n preferInstallDependencies: false,\n });\n }\n\n // Add metadata to associate backend project with model project\n const modelProjectConfig = readProjectConfigurationUnqualified(\n tree,\n modelProjectName,\n );\n updateProjectConfiguration(tree, modelProjectConfig.name, {\n ...modelProjectConfig,\n metadata: {\n ...modelProjectConfig.metadata,\n backendProject: backendFullyQualifiedName,\n } as any,\n });\n\n // Recorded in the metadata below so the version sync can tell a CDK\n // project from a Terraform one; undefined when no infrastructure was\n // generated, in which case neither provider's packages were added.\n const iac =\n options.infra !== 'none' ? await resolveIac(tree, options.iac) : undefined;\n\n // Recorded here and read by the declaration's predicates, so the packages\n // added below are exactly the ones the version sync will own.\n const metadata: TsSmithyApiMetadata = {\n apiName: options.name,\n auth: options.auth,\n modelProject: modelProjectConfig.name,\n ...(iac ? { iac } : {}),\n };\n\n addGeneratorMetadata(\n tree,\n backendFullyQualifiedName,\n TS_SMITHY_API_GENERATOR_INFO,\n metadata,\n );\n\n const backendProjectConfig = readProjectConfigurationUnqualified(\n tree,\n backendFullyQualifiedName,\n );\n const port = assignPort(tree, backendProjectConfig, 3001);\n\n // Delete default index.ts with \"hello\" function\n tree.delete(joinPathFragments(backendProjectConfig.sourceRoot, 'index.ts'));\n\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files'),\n backendProjectConfig.sourceRoot,\n {\n apiNameClassName,\n port,\n ...esmVars(tree),\n },\n );\n\n if (options.infra !== 'none') {\n if (options.auth === 'custom') {\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n '..',\n '..',\n '..',\n 'utils',\n 'api-constructs',\n 'files',\n 'cdk',\n 'authorizer',\n 'rest',\n ),\n backendProjectConfig.sourceRoot,\n {},\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n }\n\n // Add infrastructure\n await sharedConstructsGenerator(\n tree,\n {\n iac,\n },\n DEPENDENCIES,\n );\n await addApiGatewayInfra(\n tree,\n {\n iac,\n apiProjectName: backendFullyQualifiedName,\n apiNameClassName,\n apiNameKebabCase,\n auth: options.auth,\n constructType: 'rest',\n backend: {\n type: 'smithy',\n bundleOutputDir: joinPathFragments(\n 'dist',\n backendProjectConfig.root,\n 'bundle',\n ),\n integrationPattern,\n ...(options.auth === 'custom' && {\n authorizerBundleOutputDir: joinPathFragments(\n 'dist',\n backendProjectConfig.root,\n 'bundle',\n 'authorizer',\n ),\n }),\n },\n },\n DEPENDENCIES,\n );\n addSharedConstructsOpenApiMetadataGenerateTarget(tree, {\n iac,\n apiNameKebabCase,\n specPath: joinPathFragments(\n 'dist',\n modelProjectConfig.root,\n 'build',\n 'openapi',\n 'openapi.json',\n ),\n specBuildTargetName: `${modelProjectConfig.name}:build`,\n });\n\n // Add bundle target using rolldown\n await addTypeScriptBundleTarget(\n tree,\n backendProjectConfig,\n {\n targetFilePath: 'src/handler.ts',\n external: [/@aws-sdk\\/.*/], // lambda runtime provides aws sdk\n },\n DEPENDENCIES,\n );\n\n if (options.auth === 'custom') {\n await addTypeScriptBundleTarget(\n tree,\n backendProjectConfig,\n {\n targetFilePath: 'src/authorizer.ts',\n bundleOutputDir: 'authorizer',\n external: [/@aws-sdk\\/.*/],\n },\n DEPENDENCIES,\n );\n }\n }\n\n const cmd = new FsCommands(tree, DEPENDENCIES);\n const generatedSrcDirFromRoot = '{projectRoot}/src/generated';\n\n // Target for copying the ssdk built by the model\n backendProjectConfig.targets['copy-ssdk'] = {\n cache: true,\n inputs: [\n {\n dependentTasksOutputFiles: '**/*',\n },\n ],\n executor: 'nx:run-commands',\n options: {\n commands: [\n cmd.rm(generatedSrcDirFromRoot),\n cmd.mkdir(generatedSrcDirFromRoot),\n cmd.cp(\n joinPathFragments('dist', modelProjectConfig.root, 'build', 'ssdk'),\n joinPathFragments(generatedSrcDirFromRoot, 'ssdk'),\n ),\n ],\n parallel: false,\n },\n outputs: ['{projectRoot}/src/generated'],\n dependsOn: [`${modelProjectConfig.name}:build`],\n };\n addDependencyToTargetIfNotPresent(\n backendProjectConfig,\n 'compile',\n 'copy-ssdk',\n );\n\n // Add a project which continuously copies based on changes to the model project\n // This allows the \"serve\" target to hot reload when the smithy model is changed\n backendProjectConfig.targets['watch-copy-ssdk'] = {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n command: `nx watch --projects=${modelProjectConfig.name} --includeDependencies -- nx run ${backendFullyQualifiedName}:copy-ssdk`,\n },\n };\n\n // Add serve target for running the server locally\n backendProjectConfig.targets.serve = normalizeTargetKeyOrder({\n executor: 'nx:run-commands',\n continuous: true,\n dependsOn: ['copy-ssdk', 'watch-copy-ssdk'],\n options: {\n command: 'tsx --watch src/local-server.ts',\n cwd: '{projectRoot}',\n },\n });\n\n const existingDevDependsOn =\n backendProjectConfig.targets['dev']?.dependsOn ?? [];\n\n backendProjectConfig.targets['dev'] = normalizeTargetKeyOrder({\n ...backendProjectConfig.targets.serve,\n // Own copy of dependsOn so adding dev dependencies below doesn't\n // mutate the shared array referenced by the serve target.\n dependsOn: [...(backendProjectConfig.targets.serve.dependsOn ?? [])],\n options: {\n ...backendProjectConfig.targets.serve.options,\n env: {\n LOCAL_DEV: 'true',\n },\n },\n });\n\n // Preserve any dependencies added to dev by connection generators\n for (const dependency of existingDevDependsOn) {\n addDependencyToTargetIfNotPresent(backendProjectConfig, 'dev', dependency);\n }\n\n // Ignore generated code\n updateGitIgnore(tree, backendProjectConfig.root, (patterns) => [\n ...patterns,\n 'src/generated',\n ]);\n\n updateProjectConfiguration(\n tree,\n backendFullyQualifiedName,\n backendProjectConfig,\n );\n\n addTsDependencies(tree, DEPENDENCIES, {\n metadata,\n projectRoot: backendProjectConfig.root,\n });\n\n await addGeneratorMetricsIfApplicable(tree, [TS_SMITHY_API_GENERATOR_INFO]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, options.preferInstallDependencies, {\n languages: ['typescript'],\n });\n};\n\nconst getIntegrationPattern = (\n options: TsSmithyApiGeneratorSchema,\n): 'isolated' | 'shared' => options.integrationPattern ?? 'isolated';\n\nexport default tsSmithyApiGenerator;\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","updateProjectConfiguration","tsProjectGenerator","getTsLibDetails","addTsDependencies","API_CONSTRUCTS_DEPENDENCIES","API_CONSTRUCTS_PY_DEPENDENCIES","addApiGatewayInfra","addSharedConstructsOpenApiMetadataGenerateTarget","addTypeScriptBundleTarget","BUNDLE_DEPENDENCIES","declareDependencies","ownedElsewhere","formatFilesInSubtree","FS_DEPENDENCIES","FsCommands","updateGitIgnore","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","esmVars","toClassName","toKebabCase","addDependencyToTargetIfNotPresent","addGeneratorMetadata","getGeneratorInfo","normalizeTargetKeyOrder","readProjectConfigurationUnqualified","assignPort","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","smithyProjectGenerator","DEPENDENCIES","ts","name","when","m","auth","dev","root","py","TS_SMITHY_API_GENERATOR_INFO","filename","tsSmithyApiGenerator","tree","options","infra","Error","integrationPattern","getIntegrationPattern","apiNameClassName","apiNameKebabCase","fullyQualifiedName","backendFullyQualifiedName","dir","modelProjectName","projectExists","serviceName","namespace","directory","subDirectory","preferInstallDependencies","modelProjectConfig","metadata","backendProject","iac","undefined","apiName","modelProject","backendProjectConfig","port","delete","sourceRoot","dirname","overwriteStrategy","KeepExisting","apiProjectName","constructType","backend","type","bundleOutputDir","authorizerBundleOutputDir","specPath","specBuildTargetName","targetFilePath","external","cmd","generatedSrcDirFromRoot","targets","cache","inputs","dependentTasksOutputFiles","executor","commands","rm","mkdir","cp","parallel","outputs","dependsOn","continuous","command","serve","cwd","existingDevDependsOn","env","LOCAL_DEV","dependency","patterns","projectRoot","languages"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAEjBC,0BAA0B,QACrB,aAAa;AACpB,OAAOC,sBAAsBC,eAAe,QAAQ,+BAA4B;AAChF,SAASC,iBAAiB,QAAQ,qCAAkC;AACpE,SACEC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,kBAAkB,QACb,kDAA+C;AACtD,SAASC,gDAAgD,QAAQ,qDAAkD;AACnH,SACEC,yBAAyB,EACzBC,mBAAmB,QACd,kCAA+B;AACtC,SACEC,mBAAmB,EACnBC,cAAc,QACT,0CAAuC;AAC9C,SAASC,oBAAoB,QAAQ,2BAAwB;AAC7D,SAASC,eAAe,EAAEC,UAAU,QAAQ,uBAAoB;AAChE,SAASC,eAAe,QAAQ,wBAAqB;AACrD,SAASC,UAAU,QAAQ,wBAAqB;AAChD,SAASC,mBAAmB,QAAQ,4B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,OAAO,CAACc,KAAK;QACrC,iEAAiE;QACjE,0DAA0D;QAC1DH,WAAW;eAAK9B,qBAAqBmB,OAAO,CAACc,KAAK,CAACH,SAAS,IAAI,EAAE;SAAE;QACpEtD,SAAS;YACP,GAAGwB,qBAAqBmB,OAAO,CAACc,KAAK,CAACzD,OAAO;YAC7C4D,KAAK;gBACHC,WAAW;YACb;QACF;IACF;IAEA,kEAAkE;IAClE,KAAK,MAAMC,cAAcH,qBAAsB;QAC7CjF,kCAAkC8C,sBAAsB,OAAOsC;IACjE;IAEA,wBAAwB;IACxB3F,gBAAgB4B,MAAMyB,qBAAqB9B,IAAI,EAAE,CAACqE,WAAa;eAC1DA;YACH;SACD;IAED3G,2BACE2C,MACAS,2BACAgB;IAGFjE,kBAAkBwC,MAAMZ,cAAc;QACpC+B;QACA8C,aAAaxC,qBAAqB9B,IAAI;IACxC;IAEA,MAAMpB,gCAAgCyB,MAAM;QAACH;KAA6B;IAE1E,MAAM5B,qBAAqB+B;IAC3B,OAAO,IACL1B,oBAAoB0B,MAAMC,QAAQgB,yBAAyB,EAAE;YAC3DiD,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAEF,MAAM7D,wBAAwB,CAC5BJ,UAC0BA,QAAQG,kBAAkB,IAAI;AAE1D,eAAeL,qBAAqB"}
1
+ {"version":3,"sources":["../../../../../../../packages/nx-plugin/src/smithy/ts/api/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport tsProjectGenerator, { getTsLibDetails } from '../../../ts/lib/generator';\nimport { addTsDependencies } from '../../../utils/add-dependencies';\nimport {\n API_CONSTRUCTS_DEPENDENCIES,\n API_CONSTRUCTS_PY_DEPENDENCIES,\n addApiGatewayInfra,\n} from '../../../utils/api-constructs/api-constructs';\nimport { addSharedConstructsOpenApiMetadataGenerateTarget } from '../../../utils/api-constructs/open-api-metadata';\nimport {\n addTypeScriptBundleTarget,\n BUNDLE_DEPENDENCIES,\n} from '../../../utils/bundle/bundle';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../../../utils/declared-dependencies';\nimport { formatFilesInSubtree } from '../../../utils/format';\nimport { FS_DEPENDENCIES, FsCommands } from '../../../utils/fs';\nimport { updateGitIgnore } from '../../../utils/git';\nimport { resolveIac } from '../../../utils/iac';\nimport { installDependencies } from '../../../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../../../utils/metrics';\nimport { esmVars } from '../../../utils/module-format';\nimport { toClassName, toKebabCase } from '../../../utils/names';\nimport {\n addDependencyToTargetIfNotPresent,\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n normalizeTargetKeyOrder,\n readProjectConfigurationUnqualified,\n} from '../../../utils/nx';\nimport { assignPort } from '../../../utils/port';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../../../utils/shared-constructs';\nimport type { IacMetadata } from '../../../utils/shared-constructs-constants';\nimport smithyProjectGenerator from '../../project/generator';\nimport type { TsSmithyApiGeneratorSchema } from './schema';\n\n/** The metadata this generator records, which its predicates read. */\nexport interface TsSmithyApiMetadata extends IacMetadata {\n readonly apiName: string;\n readonly auth: TsSmithyApiGeneratorSchema['auth'];\n readonly modelProject: string;\n}\n\n// Each entry names the branch it belongs to, so the same declaration drives both\n// adding and the version sync.\nexport const DEPENDENCIES = declareDependencies<TsSmithyApiMetadata>()({\n ts: [\n { name: '@smithy/server-apigateway' },\n { name: '@smithy/server-node' },\n { name: '@middy/core' },\n { name: '@aws-lambda-powertools/logger' },\n { name: '@aws-lambda-powertools/parameters' },\n { name: '@aws-lambda-powertools/tracer' },\n { name: '@aws-lambda-powertools/metrics' },\n { name: '@aws-sdk/client-appconfigdata' },\n // The custom authorizer handler parses its event.\n { name: '@aws-lambda-powertools/parser', when: (m) => m.auth === 'custom' },\n { name: '@types/aws-lambda', dev: true },\n // tsx runs the local server from the workspace root.\n { name: 'tsx', dev: true, root: true },\n ...ownedElsewhere(FS_DEPENDENCIES),\n ...ownedElsewhere(API_CONSTRUCTS_DEPENDENCIES),\n ...ownedElsewhere(BUNDLE_DEPENDENCIES),\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ],\n py: ownedElsewhere(API_CONSTRUCTS_PY_DEPENDENCIES),\n});\n\nexport const TS_SMITHY_API_GENERATOR_INFO: NxGeneratorInfo = getGeneratorInfo(\n import.meta.filename,\n);\n\nexport const tsSmithyApiGenerator = async (\n tree: Tree,\n options: TsSmithyApiGeneratorSchema,\n): Promise<GeneratorCallback> => {\n if (\n (options.infra as string) !== 'rest-lambda' &&\n (options.infra as string) !== 'none'\n ) {\n throw new Error(\n `Unsupported infra '${options.infra}' for Smithy TypeScript API. ` +\n `Only 'rest-lambda' (API Gateway REST API) is supported.`,\n );\n }\n\n const integrationPattern = getIntegrationPattern(options);\n const apiNameClassName = toClassName(options.name);\n const apiNameKebabCase = toKebabCase(options.name);\n const { fullyQualifiedName: backendFullyQualifiedName, dir } =\n getTsLibDetails(tree, options);\n const modelProjectName = `${apiNameKebabCase}-model`;\n\n let projectExists: boolean;\n try {\n readProjectConfigurationUnqualified(tree, backendFullyQualifiedName);\n projectExists = true;\n } catch {\n projectExists = false;\n }\n\n if (!projectExists) {\n // Generate the model project\n await smithyProjectGenerator(tree, {\n name: modelProjectName,\n serviceName: apiNameClassName,\n namespace: options.namespace,\n directory: dir,\n subDirectory: 'model',\n preferInstallDependencies: false,\n });\n\n // Generate the backend project\n await tsProjectGenerator(tree, {\n name: options.name,\n directory: dir,\n subDirectory: 'backend',\n preferInstallDependencies: false,\n });\n }\n\n // Add metadata to associate backend project with model project\n const modelProjectConfig = readProjectConfigurationUnqualified(\n tree,\n modelProjectName,\n );\n updateProjectConfiguration(tree, modelProjectConfig.name, {\n ...modelProjectConfig,\n metadata: {\n ...modelProjectConfig.metadata,\n backendProject: backendFullyQualifiedName,\n } as any,\n });\n\n // Recorded in the metadata below so the version sync can tell a CDK\n // project from a Terraform one; undefined when no infrastructure was\n // generated, in which case neither provider's packages were added.\n const iac =\n options.infra !== 'none' ? await resolveIac(tree, options.iac) : undefined;\n\n // Recorded here and read by the declaration's predicates, so the packages\n // added below are exactly the ones the version sync will own.\n const metadata: TsSmithyApiMetadata = {\n apiName: options.name,\n auth: options.auth,\n modelProject: modelProjectConfig.name,\n ...(iac ? { iac } : {}),\n };\n\n addGeneratorMetadata(\n tree,\n backendFullyQualifiedName,\n TS_SMITHY_API_GENERATOR_INFO,\n metadata,\n );\n\n const backendProjectConfig = readProjectConfigurationUnqualified(\n tree,\n backendFullyQualifiedName,\n );\n const port = assignPort(tree, backendProjectConfig, 3001);\n\n // Delete default index.ts with \"hello\" function\n tree.delete(joinPathFragments(backendProjectConfig.sourceRoot, 'index.ts'));\n\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files'),\n backendProjectConfig.sourceRoot,\n {\n apiNameClassName,\n port,\n ...esmVars(tree),\n },\n );\n\n if (options.infra !== 'none') {\n if (options.auth === 'custom') {\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n '..',\n '..',\n '..',\n 'utils',\n 'api-constructs',\n 'files',\n 'cdk',\n 'authorizer',\n 'rest',\n ),\n backendProjectConfig.sourceRoot,\n {},\n {\n overwriteStrategy: OverwriteStrategy.KeepExisting,\n },\n );\n }\n\n // Add infrastructure\n await sharedConstructsGenerator(\n tree,\n {\n iac,\n },\n DEPENDENCIES,\n );\n await addApiGatewayInfra(\n tree,\n {\n iac,\n apiProjectName: backendFullyQualifiedName,\n apiNameClassName,\n apiNameKebabCase,\n auth: options.auth,\n constructType: 'rest',\n backend: {\n type: 'smithy',\n bundleOutputDir: joinPathFragments(\n 'dist',\n backendProjectConfig.root,\n 'bundle',\n ),\n integrationPattern,\n ...(options.auth === 'custom' && {\n authorizerBundleOutputDir: joinPathFragments(\n 'dist',\n backendProjectConfig.root,\n 'bundle',\n 'authorizer',\n ),\n }),\n },\n },\n DEPENDENCIES,\n );\n addSharedConstructsOpenApiMetadataGenerateTarget(tree, {\n iac,\n apiNameKebabCase,\n specPath: joinPathFragments(\n 'dist',\n modelProjectConfig.root,\n 'build',\n 'openapi',\n 'openapi.json',\n ),\n specBuildTargetName: `${modelProjectConfig.name}:build`,\n });\n\n // Add bundle target using rolldown\n await addTypeScriptBundleTarget(\n tree,\n backendProjectConfig,\n {\n targetFilePath: 'src/handler.ts',\n external: [/@aws-sdk\\/.*/], // lambda runtime provides aws sdk\n },\n DEPENDENCIES,\n );\n\n if (options.auth === 'custom') {\n await addTypeScriptBundleTarget(\n tree,\n backendProjectConfig,\n {\n targetFilePath: 'src/authorizer.ts',\n bundleOutputDir: 'authorizer',\n external: [/@aws-sdk\\/.*/],\n },\n DEPENDENCIES,\n );\n }\n }\n\n const cmd = new FsCommands(tree, DEPENDENCIES);\n const generatedSrcDirFromRoot = '{projectRoot}/src/generated';\n\n // Target for copying the ssdk built by the model\n backendProjectConfig.targets['copy-ssdk'] = {\n cache: true,\n inputs: [\n {\n dependentTasksOutputFiles: '**/*',\n },\n ],\n executor: 'nx:run-commands',\n options: {\n commands: [\n cmd.rm(generatedSrcDirFromRoot),\n cmd.mkdir(generatedSrcDirFromRoot),\n cmd.cp(\n joinPathFragments('dist', modelProjectConfig.root, 'build', 'ssdk'),\n joinPathFragments(generatedSrcDirFromRoot, 'ssdk'),\n ),\n ],\n parallel: false,\n },\n outputs: ['{projectRoot}/src/generated'],\n dependsOn: [`${modelProjectConfig.name}:build`],\n };\n addDependencyToTargetIfNotPresent(\n backendProjectConfig,\n 'compile',\n 'copy-ssdk',\n );\n\n // Add a project which continuously copies based on changes to the model project\n // This allows the \"serve\" target to hot reload when the smithy model is changed\n backendProjectConfig.targets['watch-copy-ssdk'] = {\n executor: 'nx:run-commands',\n continuous: true,\n options: {\n command: `nx watch --projects=${modelProjectConfig.name} --includeDependencies -- nx run ${backendFullyQualifiedName}:copy-ssdk`,\n },\n };\n\n // Add serve target for running the server locally\n backendProjectConfig.targets.serve = normalizeTargetKeyOrder({\n executor: 'nx:run-commands',\n continuous: true,\n dependsOn: ['copy-ssdk', 'watch-copy-ssdk'],\n options: {\n command: 'tsx --watch src/local-server.ts',\n cwd: '{projectRoot}',\n },\n });\n\n const existingDevDependsOn =\n backendProjectConfig.targets['dev']?.dependsOn ?? [];\n\n backendProjectConfig.targets['dev'] = normalizeTargetKeyOrder({\n ...backendProjectConfig.targets.serve,\n // Own copy of dependsOn so adding dev dependencies below doesn't\n // mutate the shared array referenced by the serve target.\n dependsOn: [...(backendProjectConfig.targets.serve.dependsOn ?? [])],\n options: {\n ...backendProjectConfig.targets.serve.options,\n env: {\n LOCAL_DEV: 'true',\n },\n },\n });\n\n // Preserve any dependencies added to dev by connection generators\n for (const dependency of existingDevDependsOn) {\n addDependencyToTargetIfNotPresent(backendProjectConfig, 'dev', dependency);\n }\n\n // Ignore generated code\n updateGitIgnore(tree, backendProjectConfig.root, (patterns) => [\n ...patterns,\n 'src/generated',\n ]);\n\n updateProjectConfiguration(\n tree,\n backendFullyQualifiedName,\n backendProjectConfig,\n );\n\n addTsDependencies(tree, DEPENDENCIES, {\n metadata,\n projectRoot: backendProjectConfig.root,\n });\n\n await addGeneratorMetricsIfApplicable(tree, [TS_SMITHY_API_GENERATOR_INFO]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, options.preferInstallDependencies, {\n languages: ['typescript'],\n });\n};\n\nconst getIntegrationPattern = (\n options: TsSmithyApiGeneratorSchema,\n): 'isolated' | 'shared' => options.integrationPattern ?? 'isolated';\n\nexport default tsSmithyApiGenerator;\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","updateProjectConfiguration","tsProjectGenerator","getTsLibDetails","addTsDependencies","API_CONSTRUCTS_DEPENDENCIES","API_CONSTRUCTS_PY_DEPENDENCIES","addApiGatewayInfra","addSharedConstructsOpenApiMetadataGenerateTarget","addTypeScriptBundleTarget","BUNDLE_DEPENDENCIES","declareDependencies","ownedElsewhere","formatFilesInSubtree","FS_DEPENDENCIES","FsCommands","updateGitIgnore","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","esmVars","toClassName","toKebabCase","addDependencyToTargetIfNotPresent","addGeneratorMetadata","getGeneratorInfo","normalizeTargetKeyOrder","readProjectConfigurationUnqualified","assignPort","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","smithyProjectGenerator","DEPENDENCIES","ts","name","when","m","auth","dev","root","py","TS_SMITHY_API_GENERATOR_INFO","filename","tsSmithyApiGenerator","tree","options","infra","Error","integrationPattern","getIntegrationPattern","apiNameClassName","apiNameKebabCase","fullyQualifiedName","backendFullyQualifiedName","dir","modelProjectName","projectExists","serviceName","namespace","directory","subDirectory","preferInstallDependencies","modelProjectConfig","metadata","backendProject","iac","undefined","apiName","modelProject","backendProjectConfig","port","delete","sourceRoot","dirname","overwriteStrategy","KeepExisting","apiProjectName","constructType","backend","type","bundleOutputDir","authorizerBundleOutputDir","specPath","specBuildTargetName","targetFilePath","external","cmd","generatedSrcDirFromRoot","targets","cache","inputs","dependentTasksOutputFiles","executor","commands","rm","mkdir","cp","parallel","outputs","dependsOn","continuous","command","serve","cwd","existingDevDependsOn","env","LOCAL_DEV","dependency","patterns","projectRoot","languages"],"mappings":"AAAA;;;CAGC,GACD,SAEEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAEjBC,0BAA0B,QACrB,aAAa;AACpB,OAAOC,sBAAsBC,eAAe,QAAQ,+BAA4B;AAChF,SAASC,iBAAiB,QAAQ,qCAAkC;AACpE,SACEC,2BAA2B,EAC3BC,8BAA8B,EAC9BC,kBAAkB,QACb,kDAA+C;AACtD,SAASC,gDAAgD,QAAQ,qDAAkD;AACnH,SACEC,yBAAyB,EACzBC,mBAAmB,QACd,kCAA+B;AACtC,SACEC,mBAAmB,EAC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SAAkB;QAC3CtD,SAAS;YACPwD,SAAS;YACTE,KAAK;QACP;IACF;IAEA,MAAMC,uBACJnC,qBAAqBmB,OAAO,CAAC,MAAM,EAAEW,aAAa,EAAE;IAEtD9B,qBAAqBmB,OAAO,CAAC,MAAM,GAAG9D,wBAAwB;QAC5D,GAAG2C,qBAAqBmB,OAAO,CAACc,KAAK;QACrC,iEAAiE;QACjE,0DAA0D;QAC1DH,WAAW;eAAK9B,qBAAqBmB,OAAO,CAACc,KAAK,CAACH,SAAS,IAAI,EAAE;SAAE;QACpEtD,SAAS;YACP,GAAGwB,qBAAqBmB,OAAO,CAACc,KAAK,CAACzD,OAAO;YAC7C4D,KAAK;gBACHC,WAAW;YACb;QACF;IACF;IAEA,kEAAkE;IAClE,KAAK,MAAMC,cAAcH,qBAAsB;QAC7CjF,kCAAkC8C,sBAAsB,OAAOsC;IACjE;IAEA,wBAAwB;IACxB3F,gBAAgB4B,MAAMyB,qBAAqB9B,IAAI,EAAE,CAACqE,WAAa;eAC1DA;YACH;SACD;IAED3G,2BACE2C,MACAS,2BACAgB;IAGFjE,kBAAkBwC,MAAMZ,cAAc;QACpC+B;QACA8C,aAAaxC,qBAAqB9B,IAAI;IACxC;IAEA,MAAMpB,gCAAgCyB,MAAM;QAACH;KAA6B;IAE1E,MAAM5B,qBAAqB+B;IAC3B,OAAO,IACL1B,oBAAoB0B,MAAMC,QAAQgB,yBAAyB,EAAE;YAC3DiD,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAEF,MAAM7D,wBAAwB,CAC5BJ,UAC0BA,QAAQG,kBAAkB,IAAI;AAE1D,eAAeL,qBAAqB"}
@@ -51,7 +51,7 @@ exports[`ts#rdb smithy-connection generator > should be idempotent across contex
51
51
  import {
52
52
  convertEvent,
53
53
  convertVersion1Response,
54
- } from '@aws-smithy/server-apigateway';
54
+ } from '@smithy/server-apigateway';
55
55
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
56
56
  import { Tracer } from '@aws-lambda-powertools/tracer';
57
57
  import { Logger } from '@aws-lambda-powertools/logger';
@@ -84,7 +84,7 @@ export const lambdaHandler = async (
84
84
  exports[`ts#rdb smithy-connection generator > should be idempotent across context.ts, handler.ts, and local-server.ts 3`] = `
85
85
  "import { getPrisma as getDb } from 'db';
86
86
  import { IncomingMessage, ServerResponse, createServer } from 'http';
87
- import { convertRequest, writeResponse } from '@aws-smithy/server-node';
87
+ import { convertRequest, writeResponse } from '@smithy/server-node';
88
88
  import { Tracer } from '@aws-lambda-powertools/tracer';
89
89
  import { Logger } from '@aws-lambda-powertools/logger';
90
90
  import { Metrics } from '@aws-lambda-powertools/metrics';
@@ -136,7 +136,7 @@ exports[`ts#rdb smithy-connection generator > should inject into context.ts, han
136
136
  import {
137
137
  convertEvent,
138
138
  convertVersion1Response,
139
- } from '@aws-smithy/server-apigateway';
139
+ } from '@smithy/server-apigateway';
140
140
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
141
141
  import { Tracer } from '@aws-lambda-powertools/tracer';
142
142
  import { Logger } from '@aws-lambda-powertools/logger';
@@ -169,7 +169,7 @@ export const lambdaHandler = async (
169
169
  exports[`ts#rdb smithy-connection generator > should inject into context.ts, handler.ts, and local-server.ts 3`] = `
170
170
  "import { getPrisma as getDb } from 'db';
171
171
  import { IncomingMessage, ServerResponse, createServer } from 'http';
172
- import { convertRequest, writeResponse } from '@aws-smithy/server-node';
172
+ import { convertRequest, writeResponse } from '@smithy/server-node';
173
173
  import { Tracer } from '@aws-lambda-powertools/tracer';
174
174
  import { Logger } from '@aws-lambda-powertools/logger';
175
175
  import { Metrics } from '@aws-lambda-powertools/metrics';
@@ -224,7 +224,7 @@ import { getPrisma as getPostgresDb } from 'postgres-db';
224
224
  import {
225
225
  convertEvent,
226
226
  convertVersion1Response,
227
- } from '@aws-smithy/server-apigateway';
227
+ } from '@smithy/server-apigateway';
228
228
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda';
229
229
  import { Tracer } from '@aws-lambda-powertools/tracer';
230
230
  import { Logger } from '@aws-lambda-powertools/logger';
@@ -260,7 +260,7 @@ exports[`ts#rdb smithy-connection generator > should support multiple rdb connec
260
260
  "import { getPrisma as getMysqlDb } from 'mysql-db';
261
261
  import { getPrisma as getPostgresDb } from 'postgres-db';
262
262
  import { IncomingMessage, ServerResponse, createServer } from 'http';
263
- import { convertRequest, writeResponse } from '@aws-smithy/server-node';
263
+ import { convertRequest, writeResponse } from '@smithy/server-node';
264
264
  import { Tracer } from '@aws-lambda-powertools/tracer';
265
265
  import { Logger } from '@aws-lambda-powertools/logger';
266
266
  import { Metrics } from '@aws-lambda-powertools/metrics';
@@ -22,8 +22,8 @@ export declare const TS_VERSIONS: {
22
22
  readonly '@aws-sdk/credential-provider-cognito-identity': "3.972.66";
23
23
  readonly '@aws-sdk/client-secrets-manager': "3.1106.0";
24
24
  readonly '@aws-sdk/rds-signer': "3.1106.0";
25
- readonly '@aws-smithy/server-apigateway': "1.0.0-alpha.10";
26
- readonly '@aws-smithy/server-node': "1.0.0-alpha.10";
25
+ readonly '@smithy/server-apigateway': "0.2.0";
26
+ readonly '@smithy/server-node': "0.2.0";
27
27
  readonly '@aws-lambda-powertools/logger': "2.34.0";
28
28
  readonly '@aws-lambda-powertools/metrics': "2.34.0";
29
29
  readonly '@aws-lambda-powertools/parameters': "2.34.0";
@@ -222,7 +222,7 @@ export declare const JAVA_VERSIONS: {
222
222
  readonly 'software.amazon.smithy:smithy-aws-traits': "1.72.1";
223
223
  readonly 'software.amazon.smithy:smithy-validation-model': "1.72.1";
224
224
  readonly 'software.amazon.smithy:smithy-openapi': "1.72.1";
225
- readonly 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': "0.50.0";
225
+ readonly 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': "0.52.0";
226
226
  };
227
227
  export type IJavaVersion = keyof typeof JAVA_VERSIONS;
228
228
  /** The Maven coordinates the version update resolves, in declaration order. */
@@ -27,8 +27,8 @@
27
27
  '@aws-sdk/credential-provider-cognito-identity': '3.972.66',
28
28
  '@aws-sdk/client-secrets-manager': '3.1106.0',
29
29
  '@aws-sdk/rds-signer': '3.1106.0',
30
- '@aws-smithy/server-apigateway': '1.0.0-alpha.10',
31
- '@aws-smithy/server-node': '1.0.0-alpha.10',
30
+ '@smithy/server-apigateway': '0.2.0',
31
+ '@smithy/server-node': '0.2.0',
32
32
  '@aws-lambda-powertools/logger': '2.34.0',
33
33
  '@aws-lambda-powertools/metrics': '2.34.0',
34
34
  '@aws-lambda-powertools/parameters': '2.34.0',
@@ -246,7 +246,7 @@
246
246
  'software.amazon.smithy:smithy-aws-traits': '1.72.1',
247
247
  'software.amazon.smithy:smithy-validation-model': '1.72.1',
248
248
  'software.amazon.smithy:smithy-openapi': '1.72.1',
249
- 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.50.0'
249
+ 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.52.0'
250
250
  };
251
251
  /** The Maven coordinates the version update resolves, in declaration order. */ export const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS);
252
252
  /** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */ export const javaMavenDependency = (artifact)=>`${artifact}:${JAVA_VERSIONS[artifact]}`;
@@ -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';\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.1106.0',\n '@aws-sdk/client-api-gateway': '3.1106.0',\n '@aws-sdk/client-iam': '3.1106.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1106.0',\n '@aws-sdk/client-bedrock-runtime': '3.1106.0',\n '@aws-sdk/client-s3': '3.1106.0',\n '@aws-sdk/client-sts': '3.1106.0',\n '@aws-sdk/credential-providers': '3.1106.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.66',\n '@aws-sdk/client-secrets-manager': '3.1106.0',\n '@aws-sdk/rds-signer': '3.1106.0',\n '@aws-smithy/server-apigateway': '1.0.0-alpha.10',\n '@aws-smithy/server-node': '1.0.0-alpha.10',\n '@aws-lambda-powertools/logger': '2.34.0',\n '@aws-lambda-powertools/metrics': '2.34.0',\n '@aws-lambda-powertools/parameters': '2.34.0',\n '@aws-lambda-powertools/tracer': '2.34.0',\n '@aws-lambda-powertools/parser': '2.34.0',\n '@aws-sdk/client-appconfigdata': '3.1106.0',\n '@middy/core': '7.7.2',\n '@nxlv/python': '22.2.2',\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.15.47',\n '@modelcontextprotocol/sdk': '1.30.0',\n '@modelcontextprotocol/inspector': '0.22.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.66.4',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.12.0',\n '@tanstack/react-router': '1.170.23',\n '@tanstack/router-plugin': '1.168.27',\n '@tanstack/router-generator': '1.167.25',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.2',\n '@cloudscape-design/board-components': '3.0.213',\n '@cloudscape-design/chat-components': '1.0.157',\n '@cloudscape-design/components': '3.0.1342',\n '@cloudscape-design/global-styles': '1.0.65',\n '@tanstack/react-query': '5.101.4',\n '@tanstack/react-query-devtools': '5.101.4',\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.21.0',\n '@types/ws': '8.18.1',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.6.16',\n '@smithy/node-config-provider': '4.5.16',\n '@smithy/node-http-handler': '4.9.13',\n '@smithy/types': '4.16.1',\n '@vitest/coverage-v8': '4.1.10',\n '@vitest/ui': '4.1.10',\n '@astrojs/react': '6.0.2',\n '@astrojs/starlight': '0.41.3',\n astro: '7.1.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1135.1',\n 'aws-cdk-lib': '2.263.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '5.6.2',\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.2',\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.7',\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.3',\n ncp: '2.0.0',\n npm: '12.0.2',\n 'npm-check-updates': '22.2.9',\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.3',\n 'rolldown-plugin-dts': '0.28.0',\n 'simple-git': '3.36.0',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.28.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.11',\n 'lucide-react': '1.30.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.16.2',\n 'tw-animate-css': '1.4.0',\n 'tailwind-merge': '3.6.0',\n vite: '8.2.1',\n typescript: '6.0.3',\n vitest: '4.1.10',\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.42',\n 'ag-ui-protocol': '==0.1.19',\n 'ag-ui-strands': '==0.2.4',\n 'aws-lambda-powertools': '==3.31.1',\n 'aws-lambda-powertools[tracer]': '==3.31.1',\n 'aws-lambda-powertools[parser]': '==3.31.1',\n 'aws-opentelemetry-distro': '==0.19.0',\n 'bedrock-agentcore': '==1.21.0',\n boto3: '==1.43.67',\n checkov: '==3.3.9',\n fastapi: '==0.141.1',\n 'fastapi[standard]': '==0.141.1',\n httpx: '==0.28.1',\n langchain: '==1.3.14',\n 'langchain-aws': '==1.7.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.10',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n ruff: '==0.16.2',\n 'strands-agents': '==1.51.0',\n 'strands-agents[a2a]': '==1.51.0',\n 'strands-agents-tools': '==0.8.6',\n ty: '==0.0.69',\n pynamodb: '==6.1.0',\n uvicorn: '==0.52.1',\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.4',\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.72.1',\n 'software.amazon.smithy:smithy-aws-traits': '1.72.1',\n 'software.amazon.smithy:smithy-validation-model': '1.72.1',\n 'software.amazon.smithy:smithy-openapi': '1.72.1',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.50.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.72.1',\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.58.0',\n random: '3.9.0',\n null: '3.3.0',\n archive: '2.8.0',\n external: '2.4.0',\n local: '2.9.0',\n time: '0.14.0',\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","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","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,6BAA0B;AAEjC;;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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C,GACD,OAAO,MAAMC,qBAAqB;IAChC,qEAAqE;IACrEC,OAAO;AACT,EAAW;AAEX;;;;;CAKC,GACD,OAAO,MAAMC,yBAAyB;IACpCD,OAAO;AACT,EAAqE;AAErE,wEAAwE,GACxE,OAAO,MAAME,iBAAiB,CAACC,OAC7B,GAAGF,sBAAsB,CAACE,KAAK,CAAC,CAAC,EAAEJ,kBAAkB,CAACI,KAAK,EAAE,CAAC;AAEhE;;;CAGC,GACD,OAAO,MAAMC,qBAAqB;IAChCC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,SAAS;IACTC,UAAU;IACVC,OAAO;IACPC,MAAM;AACR,EAAW;AAGX;;;CAGC,GACD,OAAO,MAAMC,4BAA4B,IAAO,CAAA;QAC9CC,oBAAoBT,mBAAmBC,GAAG;QAC1CS,uBAAuBV,mBAAmBE,MAAM;QAChDS,qBAAqBX,mBAAmBG,IAAI;QAC5CS,wBAAwBZ,mBAAmBI,OAAO;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';\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.1106.0',\n '@aws-sdk/client-api-gateway': '3.1106.0',\n '@aws-sdk/client-iam': '3.1106.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1106.0',\n '@aws-sdk/client-bedrock-runtime': '3.1106.0',\n '@aws-sdk/client-s3': '3.1106.0',\n '@aws-sdk/client-sts': '3.1106.0',\n '@aws-sdk/credential-providers': '3.1106.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.66',\n '@aws-sdk/client-secrets-manager': '3.1106.0',\n '@aws-sdk/rds-signer': '3.1106.0',\n '@smithy/server-apigateway': '0.2.0',\n '@smithy/server-node': '0.2.0',\n '@aws-lambda-powertools/logger': '2.34.0',\n '@aws-lambda-powertools/metrics': '2.34.0',\n '@aws-lambda-powertools/parameters': '2.34.0',\n '@aws-lambda-powertools/tracer': '2.34.0',\n '@aws-lambda-powertools/parser': '2.34.0',\n '@aws-sdk/client-appconfigdata': '3.1106.0',\n '@middy/core': '7.7.2',\n '@nxlv/python': '22.2.2',\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.15.47',\n '@modelcontextprotocol/sdk': '1.30.0',\n '@modelcontextprotocol/inspector': '0.22.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.66.4',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.12.0',\n '@tanstack/react-router': '1.170.23',\n '@tanstack/router-plugin': '1.168.27',\n '@tanstack/router-generator': '1.167.25',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.2',\n '@cloudscape-design/board-components': '3.0.213',\n '@cloudscape-design/chat-components': '1.0.157',\n '@cloudscape-design/components': '3.0.1342',\n '@cloudscape-design/global-styles': '1.0.65',\n '@tanstack/react-query': '5.101.4',\n '@tanstack/react-query-devtools': '5.101.4',\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.21.0',\n '@types/ws': '8.18.1',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.6.16',\n '@smithy/node-config-provider': '4.5.16',\n '@smithy/node-http-handler': '4.9.13',\n '@smithy/types': '4.16.1',\n '@vitest/coverage-v8': '4.1.10',\n '@vitest/ui': '4.1.10',\n '@astrojs/react': '6.0.2',\n '@astrojs/starlight': '0.41.3',\n astro: '7.1.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1135.1',\n 'aws-cdk-lib': '2.263.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '5.6.2',\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.2',\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.7',\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.3',\n ncp: '2.0.0',\n npm: '12.0.2',\n 'npm-check-updates': '22.2.9',\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.3',\n 'rolldown-plugin-dts': '0.28.0',\n 'simple-git': '3.36.0',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.28.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.11',\n 'lucide-react': '1.30.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.16.2',\n 'tw-animate-css': '1.4.0',\n 'tailwind-merge': '3.6.0',\n vite: '8.2.1',\n typescript: '6.0.3',\n vitest: '4.1.10',\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.42',\n 'ag-ui-protocol': '==0.1.19',\n 'ag-ui-strands': '==0.2.4',\n 'aws-lambda-powertools': '==3.31.1',\n 'aws-lambda-powertools[tracer]': '==3.31.1',\n 'aws-lambda-powertools[parser]': '==3.31.1',\n 'aws-opentelemetry-distro': '==0.19.0',\n 'bedrock-agentcore': '==1.21.0',\n boto3: '==1.43.67',\n checkov: '==3.3.9',\n fastapi: '==0.141.1',\n 'fastapi[standard]': '==0.141.1',\n httpx: '==0.28.1',\n langchain: '==1.3.14',\n 'langchain-aws': '==1.7.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.10',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n ruff: '==0.16.2',\n 'strands-agents': '==1.51.0',\n 'strands-agents[a2a]': '==1.51.0',\n 'strands-agents-tools': '==0.8.6',\n ty: '==0.0.69',\n pynamodb: '==6.1.0',\n uvicorn: '==0.52.1',\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.4',\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.72.1',\n 'software.amazon.smithy:smithy-aws-traits': '1.72.1',\n 'software.amazon.smithy:smithy-validation-model': '1.72.1',\n 'software.amazon.smithy:smithy-openapi': '1.72.1',\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.72.1',\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.58.0',\n random: '3.9.0',\n null: '3.3.0',\n archive: '2.8.0',\n external: '2.4.0',\n local: '2.9.0',\n time: '0.14.0',\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","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","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,6BAA0B;AAEjC;;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,iCAA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