@aws/nx-plugin 1.1.0 → 1.2.0
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/README.md +30 -29
- package/generators.json +8 -0
- package/migrations.json +6 -1
- package/package.json +1 -1
- package/src/agentcore-harness/generator.d.ts +1 -1
- package/src/greengrass/component/common.d.ts +60 -0
- package/src/greengrass/component/common.js +191 -0
- package/src/greengrass/component/common.js.map +1 -0
- package/src/greengrass/component/dependencies.d.ts +101 -0
- package/src/greengrass/component/dependencies.js +37 -0
- package/src/greengrass/component/dependencies.js.map +1 -0
- package/src/greengrass/component/generator.d.ts +174 -0
- package/src/greengrass/component/generator.js +32 -0
- package/src/greengrass/component/generator.js.map +1 -0
- package/src/greengrass/component/metadata.d.ts +2 -0
- package/src/greengrass/component/metadata.js +14 -0
- package/src/greengrass/component/metadata.js.map +1 -0
- package/src/greengrass/component/python/__snapshots__/generator.spec.ts.snap +450 -0
- package/src/greengrass/component/python/files/component/main.py.template +60 -0
- package/src/greengrass/component/python/files/component/recipe.yaml.template +30 -0
- package/src/greengrass/component/python/files/gdk/gdk-config.json.template +13 -0
- package/src/greengrass/component/python/files/tests/test___componentSnakeCase__.py.template +37 -0
- package/src/greengrass/component/python/generator.d.ts +15 -0
- package/src/greengrass/component/python/generator.js +192 -0
- package/src/greengrass/component/python/generator.js.map +1 -0
- package/src/greengrass/component/schema.d.js +6 -0
- package/src/greengrass/component/schema.d.js.map +1 -0
- package/src/greengrass/component/schema.d.ts +18 -0
- package/src/greengrass/component/schema.json +82 -0
- package/src/greengrass/component/typescript/__snapshots__/generator.spec.ts.snap +275 -0
- package/src/greengrass/component/typescript/files/component/recipe.yaml.template +41 -0
- package/src/greengrass/component/typescript/files/entrypoint/main.ts.template +58 -0
- package/src/greengrass/component/typescript/files/gdk/gdk-config.json.template +13 -0
- package/src/greengrass/component/typescript/files/scripts/vendor-crt-addon.ts.template +115 -0
- package/src/greengrass/component/typescript/generator.d.ts +16 -0
- package/src/greengrass/component/typescript/generator.js +194 -0
- package/src/greengrass/component/typescript/generator.js.map +1 -0
- package/src/infra/app/generator.d.ts +1 -1
- package/src/init/generator.d.ts +1 -1
- package/src/internal/test-matrix/generator.js +42 -0
- package/src/internal/test-matrix/generator.js.map +1 -1
- package/src/license/dependency-check/pre-approved.js +2 -1
- package/src/license/dependency-check/pre-approved.js.map +1 -1
- package/src/migrations/latest/ts-agent-guardrails-synth-input/metadata.json +3 -0
- package/src/migrations/latest/ts-agent-guardrails-synth-input/migration.d.ts +22 -0
- package/src/migrations/latest/ts-agent-guardrails-synth-input/migration.js +42 -0
- package/src/migrations/latest/ts-agent-guardrails-synth-input/migration.js.map +1 -0
- package/src/open-api/py-client/generator.d.ts +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +2 -0
- package/src/preset/generator.d.ts +1 -1
- package/src/py/agent/a2a-connection/generator.d.ts +1 -1
- package/src/py/agent/gateway-connection/generator.d.ts +1 -1
- package/src/py/agent/mcp-connection/generator.d.ts +1 -1
- package/src/py/agent/react-connection/generator.d.ts +1 -1
- package/src/py/fast-api/react/generator.d.ts +1 -1
- package/src/py/project/generator.js +2 -0
- package/src/py/project/generator.js.map +1 -1
- package/src/sdk/greengrass.d.ts +6 -0
- package/src/sdk/greengrass.js +6 -0
- package/src/sdk/greengrass.js.map +1 -0
- package/src/smithy/project/generator.d.ts +1 -1
- package/src/smithy/react-connection/generator.d.ts +1 -1
- package/src/terraform/project/generator.d.ts +1 -1
- package/src/trpc/react/generator.d.ts +1 -1
- package/src/ts/agent/a2a-connection/generator.d.ts +1 -1
- package/src/ts/agent/gateway-connection/generator.d.ts +1 -1
- package/src/ts/agent/guardrails/generator.js +10 -1
- package/src/ts/agent/guardrails/generator.js.map +1 -1
- package/src/ts/agent/guardrails/synth-inputs.d.ts +19 -0
- package/src/ts/agent/guardrails/synth-inputs.js +50 -0
- package/src/ts/agent/guardrails/synth-inputs.js.map +1 -0
- package/src/ts/agent/mcp-connection/generator.d.ts +1 -1
- package/src/ts/agent/react-connection/generator.d.ts +1 -1
- package/src/ts/astro-docs/generator.d.ts +1 -1
- package/src/ts/dcr-proxy/generator.d.ts +1 -1
- package/src/ts/dynamodb/generator.d.ts +1 -1
- package/src/ts/lambda-function/generator.d.ts +1 -1
- package/src/ts/lib/generator.d.ts +1 -1
- package/src/ts/nx-generator/generator.d.ts +1 -1
- package/src/ts/nx-migration/generator.d.ts +1 -1
- package/src/ts/nx-plugin/generator.d.ts +1 -1
- package/src/ts/rdb/generator.d.ts +1 -1
- package/src/ts/react-website/agui/generator.d.ts +1 -1
- package/src/utils/__snapshots__/shared-greengrass-scripts.spec.ts.snap +1279 -0
- package/src/utils/files/common/scripts/src/greengrass/build-artifact.ts.template +236 -0
- package/src/utils/files/common/scripts/src/greengrass/component-logs.ts.template +48 -0
- package/src/utils/files/common/scripts/src/greengrass/deploy-local.ts.template +497 -0
- package/src/utils/files/common/scripts/src/greengrass/recipe-utils.ts.template +356 -0
- package/src/utils/files/common/scripts/src/greengrass/zip-writer.ts.template +121 -0
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +3 -3
- package/src/utils/files/terraform/src/metrics/metrics.tf.template +1 -1
- package/src/utils/greengrass/constants.d.ts +58 -0
- package/src/utils/greengrass/constants.js +63 -0
- package/src/utils/greengrass/constants.js.map +1 -0
- package/src/utils/greengrass/naming.d.ts +46 -0
- package/src/utils/greengrass/naming.js +67 -0
- package/src/utils/greengrass/naming.js.map +1 -0
- package/src/utils/greengrass/recipe.d.ts +143 -0
- package/src/utils/greengrass/recipe.js +119 -0
- package/src/utils/greengrass/recipe.js.map +1 -0
- package/src/utils/greengrass-constructs/files/cdk/app/greengrass-component/__componentDirName__.ts.template +42 -0
- package/src/utils/greengrass-constructs/files/cdk/core/greengrass/artifact-bucket.ts.template +82 -0
- package/src/utils/greengrass-constructs/files/cdk/core/greengrass/component-version.ts.template +370 -0
- package/src/utils/greengrass-constructs/files/cdk/core/greengrass/deployment.ts.template +276 -0
- package/src/utils/greengrass-constructs/files/cdk/core/greengrass/index.ts.template +5 -0
- package/src/utils/greengrass-constructs/files/cdk/core/greengrass/next-version.ts.template +119 -0
- package/src/utils/greengrass-constructs/files/cdk/core/greengrass/recipe.ts.template +90 -0
- package/src/utils/greengrass-constructs/files/next-version/__nextVersionFileName__.template +195 -0
- package/src/utils/greengrass-constructs/files/terraform/app/greengrass-component/__componentDirName__/__componentDirName__.tf.template +26 -0
- package/src/utils/greengrass-constructs/files/terraform/core/greengrass/artifact-bucket/main.tf.template +204 -0
- package/src/utils/greengrass-constructs/files/terraform/core/greengrass/component-version/main.tf.template +156 -0
- package/src/utils/greengrass-constructs/files/terraform/core/greengrass/deployment/main.tf.template +186 -0
- package/src/utils/greengrass-constructs/greengrass-constructs.d.ts +57 -0
- package/src/utils/greengrass-constructs/greengrass-constructs.js +154 -0
- package/src/utils/greengrass-constructs/greengrass-constructs.js.map +1 -0
- package/src/utils/guardrail-constructs/guardrail-constructs.d.ts +3 -1
- package/src/utils/guardrail-constructs/guardrail-constructs.js +3 -1
- package/src/utils/guardrail-constructs/guardrail-constructs.js.map +1 -1
- package/src/utils/nx.d.ts +15 -0
- package/src/utils/nx.js +32 -0
- package/src/utils/nx.js.map +1 -1
- package/src/utils/shared-greengrass-scripts.d.ts +21 -0
- package/src/utils/shared-greengrass-scripts.js +43 -0
- package/src/utils/shared-greengrass-scripts.js.map +1 -0
- package/src/utils/versions.d.ts +7 -0
- package/src/utils/versions.js +7 -0
- package/src/utils/versions.js.map +1 -1
package/src/utils/nx.d.ts
CHANGED
|
@@ -86,6 +86,21 @@ export declare const addComponentGeneratorMetadata: (tree: Tree, projectName: st
|
|
|
86
86
|
}, componentPath: string, componentName?: string, additionalMetadata?: {
|
|
87
87
|
[key: string]: any;
|
|
88
88
|
}) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Merge `patch` into the component metadata entry matched on generator id and
|
|
91
|
+
* name, leaving every other recorded value alone. A no-op when no entry matches
|
|
92
|
+
* or when the patch changes nothing.
|
|
93
|
+
*
|
|
94
|
+
* `addComponentGeneratorMetadata` leaves an existing entry untouched, so a
|
|
95
|
+
* generator whose options may legitimately change between runs pairs the two:
|
|
96
|
+
* the add records a first run, this converges the values a later run resolved
|
|
97
|
+
* differently.
|
|
98
|
+
*/
|
|
99
|
+
export declare const updateComponentGeneratorMetadata: (tree: Tree, projectName: string, info: {
|
|
100
|
+
id: string;
|
|
101
|
+
}, componentName: string | undefined, patch: {
|
|
102
|
+
[key: string]: any;
|
|
103
|
+
}) => void;
|
|
89
104
|
/**
|
|
90
105
|
* Merge a generator's own config into an `nx.json` `targetDefaults` value,
|
|
91
106
|
* preserving whatever the workspace already had. `apply` receives the config to
|
package/src/utils/nx.js
CHANGED
|
@@ -139,6 +139,38 @@ export const getPackageVersion = ()=>{
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* Merge `patch` into the component metadata entry matched on generator id and
|
|
144
|
+
* name, leaving every other recorded value alone. A no-op when no entry matches
|
|
145
|
+
* or when the patch changes nothing.
|
|
146
|
+
*
|
|
147
|
+
* `addComponentGeneratorMetadata` leaves an existing entry untouched, so a
|
|
148
|
+
* generator whose options may legitimately change between runs pairs the two:
|
|
149
|
+
* the add records a first run, this converges the values a later run resolved
|
|
150
|
+
* differently.
|
|
151
|
+
*/ export const updateComponentGeneratorMetadata = (tree, projectName, info, componentName, patch)=>{
|
|
152
|
+
const config = readProjectConfigurationUnqualified(tree, projectName);
|
|
153
|
+
const existingComponents = config?.metadata?.components ?? [];
|
|
154
|
+
const updated = existingComponents.map((component)=>component.generator === info.id && component.name === componentName ? {
|
|
155
|
+
...component,
|
|
156
|
+
...patch
|
|
157
|
+
} : component);
|
|
158
|
+
if (JSON.stringify(updated) === JSON.stringify(existingComponents)) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
// Place metadata before targets for a stable serialized key order.
|
|
162
|
+
const { targets, ...rest } = config;
|
|
163
|
+
updateProjectConfiguration(tree, config.name, {
|
|
164
|
+
...rest,
|
|
165
|
+
metadata: {
|
|
166
|
+
...config?.metadata,
|
|
167
|
+
components: updated
|
|
168
|
+
},
|
|
169
|
+
...targets ? {
|
|
170
|
+
targets
|
|
171
|
+
} : {}
|
|
172
|
+
});
|
|
173
|
+
};
|
|
142
174
|
/**
|
|
143
175
|
* Merge a generator's own config into an `nx.json` `targetDefaults` value,
|
|
144
176
|
* preserving whatever the workspace already had. `apply` receives the config to
|
package/src/utils/nx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/nx.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 type ProjectConfiguration,\n readJson,\n readProjectConfiguration,\n type TargetConfiguration,\n type TargetDefaultValue,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport * as path from 'path';\nimport PackageJson from '../../package.json' with { type: 'json' };\nimport { NX_PLUGIN_MCP_PACKAGE_NAME } from './mcp.js';\nimport { toSnakeCase } from './names.js';\nimport { getNpmScope, getNpmScopePrefix } from './npm-scope.js';\n\nexport type { GeneratorInfo, NxGeneratorInfo } from './generators.js';\nexport { buildGeneratorInfoList } from './generators.js';\n\nimport { buildGeneratorInfoList, type GeneratorInfo } from './generators.js';\n\nconst GENERATORS = buildGeneratorInfoList(\n path.resolve(import.meta.dirname, '..', '..'),\n);\n\n/**\n * List Nx Plugin for AWS generators\n * @param includeHidden include hidden generators (default false)\n */\nexport const listGenerators = (includeHidden = false) =>\n GENERATORS.filter((g) => includeHidden || !g.hidden);\n\n/**\n * Return generator information. Call this from a generator method with import.meta.filename\n */\nexport const getGeneratorInfo = (generatorFileName: string): GeneratorInfo => {\n const { dir, name } = path.parse(path.resolve(generatorFileName));\n const resolvedFactoryPath = path.join(dir, name);\n return GENERATORS.find(\n (generatorInfo) =>\n generatorInfo.resolvedFactoryPath === resolvedFactoryPath,\n );\n};\n\nexport const getPackageVersion = () => {\n return PackageJson.version;\n};\n\n/**\n * True inside the plugin's own monorepo, where the plugin is the source rather\n * than a dependency.\n */\nexport const isNxPluginForAwsWorkspace = (tree: Tree): boolean => {\n const rootPackageJson = tree.exists('package.json')\n ? readJson(tree, 'package.json')\n : undefined;\n return rootPackageJson?.name === '@aws/nx-plugin-source';\n};\n\n/**\n * The `@aws/nx-plugin` devDependency entry for a workspace the plugin generates\n * into, keyed to the version the running generators come from. Empty inside the\n * plugin's own monorepo.\n */\nexport const nxPluginSelfDependency = (tree: Tree): Record<string, string> =>\n isNxPluginForAwsWorkspace(tree)\n ? {}\n : { [PackageJson.name]: `^${PackageJson.version}` };\n\n/**\n * The `@aws/nx-plugin-mcp` devDependency entry, keyed to the running generators'\n * version — the two packages are released in lockstep. Declaring it pins the MCP\n * server the vended config runs in the workspace's lockfile, so upgrading it\n * upgrades the server. Empty inside the plugin's own monorepo.\n */\nexport const nxPluginMcpDependency = (tree: Tree): Record<string, string> =>\n isNxPluginForAwsWorkspace(tree)\n ? {}\n : { [NX_PLUGIN_MCP_PACKAGE_NAME]: `^${PackageJson.version}` };\n\n/**\n * Read a project configuration where the project name may not be fully qualified (ie may omit the scope prefix)\n */\nexport const readProjectConfigurationUnqualified = (\n tree: Tree,\n projectName: string,\n) => {\n try {\n return readProjectConfiguration(tree, projectName);\n } catch (e) {\n // Attempt to find the project without the scope\n const project = [...getProjects(tree).values()].find(\n (p) =>\n p.name &&\n (p.name === `${getNpmScopePrefix(tree)}${projectName}` || // TypeScript fully-qualified name\n p.name === `${toSnakeCase(getNpmScope(tree))}.${projectName}`), // Python fully-qualified name\n );\n if (project) {\n return project;\n }\n throw e;\n }\n};\n\n/**\n * Returns whether a project with the given name already exists in the workspace.\n * The project name may be unqualified (ie may omit the scope prefix).\n */\nexport const projectExists = (tree: Tree, projectName: string): boolean => {\n try {\n readProjectConfigurationUnqualified(tree, projectName);\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * Add metadata about the generator that generated the project to the project.json\n */\nexport const addGeneratorMetadata = (\n tree: Tree,\n projectName: string,\n info: { id: string },\n additionalMetadata?: { [key: string]: any },\n) => {\n const config = readProjectConfigurationUnqualified(tree, projectName);\n const metadata = {\n ...config?.metadata,\n generator: info.id,\n ...additionalMetadata,\n };\n // Skip the write when nothing changed so re-running doesn't reserialize\n // project.json. metadata is plain JSON built in a fixed key order, so a\n // stringify comparison is exact here.\n if (JSON.stringify(config?.metadata) === JSON.stringify(metadata)) {\n return;\n }\n // Place metadata immediately before targets so the serialized key order is\n // identical whether or not metadata already existed (matching the order Nx\n // normalizes a read config to), keeping the change a pure metadata insert.\n const { targets, ...rest } = config;\n updateProjectConfiguration(tree, config.name, {\n ...rest,\n metadata: metadata as any,\n ...(targets ? { targets } : {}),\n });\n};\n\n/**\n * Represents a component entry in project metadata\n */\nexport interface ComponentMetadata {\n readonly generator: string;\n readonly name?: string;\n /**\n * What this entry wires up. For a connection that is the target — the thing\n * being connected to — paired with `sourcePath` below.\n */\n readonly path?: string;\n /**\n * The component the connection is made *from*, when both ends are components\n * of a project rather than whole projects.\n *\n * A connection records the project it lives on and the target it reaches, which\n * alone can't tell which of several components on that project is wired up.\n * Recorded as a path for the same reason `path` is: it identifies a component\n * within its project without depending on a name that may repeat.\n */\n readonly sourcePath?: string;\n [key: string]: any;\n}\n\n/**\n * Add metadata about the generator that generated the component to the project.json\n *\n * A connection between two components passes the source's path as\n * `additionalMetadata.sourcePath`, so the pair is identifiable rather than just\n * the two projects.\n */\nexport const addComponentGeneratorMetadata = (\n tree: Tree,\n projectName: string,\n info: { id: string },\n componentPath: string,\n componentName?: string,\n additionalMetadata?: { [key: string]: any },\n) => {\n const config = readProjectConfigurationUnqualified(tree, projectName);\n\n const existingComponents = (config?.metadata as any)?.components ?? [];\n const alreadyAdded = existingComponents.filter(\n (c: any) => c.generator === info.id && c.name === componentName,\n );\n\n if (alreadyAdded.length === 0) {\n const componentMetadata: ComponentMetadata = {\n generator: info.id,\n path: componentPath,\n ...(componentName ? { name: componentName } : {}),\n ...additionalMetadata,\n };\n // Place metadata before targets for a stable serialized key order.\n const { targets, ...rest } = config;\n updateProjectConfiguration(tree, config.name, {\n ...rest,\n metadata: {\n ...config?.metadata,\n components: [...existingComponents, componentMetadata],\n } as any,\n ...(targets ? { targets } : {}),\n });\n }\n};\n\n/**\n * Merge a generator's own config into an `nx.json` `targetDefaults` value,\n * preserving whatever the workspace already had. `apply` receives the config to\n * layer onto and returns the merged config (e.g. `(base) => ({ cache: true,\n * ...base })`); it must be idempotent so re-running the generator is a no-op.\n *\n * Nx 23.1 widened each value to either a config object or an ordered array of\n * filtered entries. The plugin only contributes unfiltered (catch-all) config,\n * so the input's shape is preserved: an object (or unset) stays an object;\n * an array keeps the user's filtered entries and `apply` merges into its first\n * unfiltered entry, prepending one as the base if none exists (Nx layers later\n * matches on top, so our catch-all must stay first to not override a filter).\n */\nexport const mergeTargetDefault = (\n value: TargetDefaultValue | undefined,\n apply: (base: Partial<TargetConfiguration>) => Partial<TargetConfiguration>,\n): TargetDefaultValue => {\n if (!Array.isArray(value)) {\n return apply(value ?? {});\n }\n const catchAllIndex = value.findIndex((entry) => entry.filter === undefined);\n if (catchAllIndex === -1) {\n return [apply({}), ...value];\n }\n return value.map((entry, index) =>\n index === catchAllIndex ? apply(entry) : entry,\n );\n};\n\n/**\n * A single entry in an Nx `dependsOn` array.\n * Matches the shape accepted by Nx without requiring a devkit type import.\n */\nexport type TargetDependency =\n | string\n | {\n projects?: string | string[];\n target: string;\n params?: 'ignore' | 'forward';\n };\n\nconst targetDependencyEquals = (a: TargetDependency, b: TargetDependency) => {\n if (typeof a === 'string' || typeof b === 'string') {\n return a === b;\n }\n if (a.target !== b.target || a.params !== b.params) {\n return false;\n }\n const aProjects = Array.isArray(a.projects)\n ? a.projects\n : a.projects !== undefined\n ? [a.projects]\n : [];\n const bProjects = Array.isArray(b.projects)\n ? b.projects\n : b.projects !== undefined\n ? [b.projects]\n : [];\n if (aProjects.length !== bProjects.length) {\n return false;\n }\n return aProjects.every((p, i) => p === bProjects[i]);\n};\n\n// The order target properties are authored in. Nx preserves a target's\n// authored key order when it reads then rewrites an existing project.json,\n// except `options` and `configurations`, which it always moves to the end (in\n// that order). Keeping `options`/`configurations` last here therefore makes a\n// generator's first-run output byte-identical to subsequent runs (idempotency);\n// the remaining keys are ordered to read intuitively.\nconst NX_TARGET_KEY_ORDER = [\n 'executor',\n 'dependsOn',\n 'continuous',\n 'cache',\n 'inputs',\n 'outputs',\n 'metadata',\n 'defaultConfiguration',\n 'options',\n 'configurations',\n];\n\n/**\n * Reorder a target's keys to match Nx's own serialization order. Nx reorders\n * target properties when it rewrites an existing project.json, so applying the\n * same order when first authoring a target keeps generators idempotent.\n */\nexport const normalizeTargetKeyOrder = <T extends object>(target: T): T =>\n Object.fromEntries(\n Object.entries(target as Record<string, unknown>).sort(([a], [b]) => {\n const ai = NX_TARGET_KEY_ORDER.indexOf(a);\n const bi = NX_TARGET_KEY_ORDER.indexOf(b);\n return (\n (ai === -1 ? NX_TARGET_KEY_ORDER.length : ai) -\n (bi === -1 ? NX_TARGET_KEY_ORDER.length : bi)\n );\n }),\n ) as T;\n\n/**\n * Merge the configuration a generator owns into a project's existing target, so\n * re-running converges that configuration without discarding what other\n * generators (or the user) contributed to the same target.\n *\n * `dependsOn` is unioned: existing entries keep their order and the desired ones\n * are appended only when absent, so a re-run neither drops an entry (e.g. the\n * `bundle` a lambda function adds to `build`) nor duplicates one. Every other\n * key the caller passes wins, since those are the ones the generator owns.\n *\n * The result carries Nx's own key order, so a target authored on the first run\n * serializes identically to the same target merged into on a re-run.\n */\nexport const mergeTarget = (\n existing: TargetConfiguration | undefined,\n desired: TargetConfiguration,\n): TargetConfiguration => {\n const merged: TargetConfiguration = { ...existing, ...desired };\n const dependsOn = [...(existing?.dependsOn ?? [])];\n for (const dependency of desired.dependsOn ?? []) {\n if (!dependsOn.some((d) => targetDependencyEquals(d, dependency))) {\n dependsOn.push(dependency);\n }\n }\n if (dependsOn.length > 0) {\n merged.dependsOn = dependsOn;\n }\n return normalizeTargetKeyOrder(merged);\n};\n\n/**\n * Mutate the project to add the dependency to the target if not already present\n * Adds the target if not present.\n *\n * Accepts either a string target name (e.g. `'build'`) or a dependency config\n * object (e.g. `{ projects: ['foo'], target: 'dev' }`). Deduplicates\n * using deep equality so re-running a generator does not grow `dependsOn`.\n */\nexport const addDependencyToTargetIfNotPresent = (\n project: ProjectConfiguration,\n target: string,\n dependency: TargetDependency,\n) => {\n project.targets ??= {};\n project.targets[target] ??= {};\n project.targets[target].dependsOn ??= [];\n const dependsOn = project.targets[target].dependsOn;\n // Leave existing dependencies in place so re-running does not reorder them;\n // only append when the dependency is genuinely absent.\n if (!dependsOn.some((d) => targetDependencyEquals(d, dependency))) {\n dependsOn.push(dependency);\n }\n // Keep key order aligned with Nx's so first run matches subsequent runs.\n project.targets[target] = normalizeTargetKeyOrder(project.targets[target]);\n};\n\n/**\n * Register a dependency that produces a deployable artifact on both `build` and\n * `assemble`.\n *\n * `build` is the everything target: artifacts plus the quality gates (lint,\n * test, typecheck). `assemble` is its artifact-only sibling, which the deploy\n * targets depend on so a deploy builds what it deploys and nothing else.\n */\nexport const addArtifactDependencyToTargets = (\n project: ProjectConfiguration,\n dependency: TargetDependency,\n) => {\n addDependencyToTargetIfNotPresent(project, 'build', dependency);\n addDependencyToTargetIfNotPresent(project, 'assemble', dependency);\n};\n\n/**\n * Register another project whose artifacts this one consumes, on both `build`\n * and `assemble`.\n *\n * The shared infrastructure project reads the artifacts of every project it\n * deploys, and those cross-project edges are explicit because Nx's `^` operator\n * only follows package dependencies. `assemble` mirrors the list against the\n * consumed projects' own `assemble`, keeping the artifact-only chain closed.\n */\nexport const addArtifactProjectToTargets = (\n project: ProjectConfiguration,\n consumedProjectName: string,\n) => {\n addDependencyToTargetIfNotPresent(\n project,\n 'build',\n `${consumedProjectName}:build`,\n );\n addDependencyToTargetIfNotPresent(\n project,\n 'assemble',\n `${consumedProjectName}:assemble`,\n );\n};\n\n/**\n * Register a component's `<name>-dev` target under the project-level `dev`\n * target, so `nx run <project>:dev` starts every component in the project.\n *\n * Component generators author their own continuous `<name>-dev` runner and call\n * this to aggregate it. Every component added to the project accumulates its\n * `<name>-dev` under `dev`. Nx keys tasks by `project:target`, so any\n * dependencies shared between components run exactly once.\n */\nexport const addComponentDevTarget = (\n targets: Record<string, ProjectConfiguration['targets'][string]>,\n componentDevTargetName: string,\n) => {\n targets['dev'] ??= { continuous: true, dependsOn: [] };\n const projectDev = targets['dev'];\n projectDev.continuous = true;\n projectDev.dependsOn ??= [];\n // Append in component-creation order; dedupe keeps re-runs idempotent.\n if (!projectDev.dependsOn.includes(componentDevTargetName)) {\n projectDev.dependsOn.push(componentDevTargetName);\n }\n targets['dev'] = normalizeTargetKeyOrder(projectDev);\n};\n"],"names":["getProjects","readJson","readProjectConfiguration","updateProjectConfiguration","path","PackageJson","type","NX_PLUGIN_MCP_PACKAGE_NAME","toSnakeCase","getNpmScope","getNpmScopePrefix","buildGeneratorInfoList","GENERATORS","resolve","dirname","listGenerators","includeHidden","filter","g","hidden","getGeneratorInfo","generatorFileName","dir","name","parse","resolvedFactoryPath","join","find","generatorInfo","getPackageVersion","version","isNxPluginForAwsWorkspace","tree","rootPackageJson","exists","undefined","nxPluginSelfDependency","nxPluginMcpDependency","readProjectConfigurationUnqualified","projectName","e","project","values","p","projectExists","addGeneratorMetadata","info","additionalMetadata","config","metadata","generator","id","JSON","stringify","targets","rest","addComponentGeneratorMetadata","componentPath","componentName","existingComponents","components","alreadyAdded","c","length","componentMetadata","mergeTargetDefault","value","apply","Array","isArray","catchAllIndex","findIndex","entry","map","index","targetDependencyEquals","a","b","target","params","aProjects","projects","bProjects","every","i","NX_TARGET_KEY_ORDER","normalizeTargetKeyOrder","Object","fromEntries","entries","sort","ai","indexOf","bi","mergeTarget","existing","desired","merged","dependsOn","dependency","some","d","push","addDependencyToTargetIfNotPresent","addArtifactDependencyToTargets","addArtifactProjectToTargets","consumedProjectName","addComponentDevTarget","componentDevTargetName","continuous","projectDev","includes"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EAEXC,QAAQ,EACRC,wBAAwB,EAIxBC,0BAA0B,QACrB,aAAa;AACpB,YAAYC,UAAU,OAAO;AAC7B,OAAOC,iBAAiB,0BAA0B;IAAEC,MAAM;AAAO,EAAE;AACnE,SAASC,0BAA0B,QAAQ,WAAW;AACtD,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,iBAAiB;AAGhE,SAASC,sBAAsB,QAAQ,kBAAkB;AAEzD,SAASA,sBAAsB,QAA4B,kBAAkB;AAE7E,MAAMC,aAAaD,uBACjBP,KAAKS,OAAO,CAAC,YAAYC,OAAO,EAAE,MAAM;AAG1C;;;CAGC,GACD,OAAO,MAAMC,iBAAiB,CAACC,gBAAgB,KAAK,GAClDJ,WAAWK,MAAM,CAAC,CAACC,IAAMF,iBAAiB,CAACE,EAAEC,MAAM,EAAE;AAEvD;;CAEC,GACD,OAAO,MAAMC,mBAAmB,CAACC;IAC/B,MAAM,EAAEC,GAAG,EAAEC,IAAI,EAAE,GAAGnB,KAAKoB,KAAK,CAACpB,KAAKS,OAAO,CAACQ;IAC9C,MAAMI,sBAAsBrB,KAAKsB,IAAI,CAACJ,KAAKC;IAC3C,OAAOX,WAAWe,IAAI,CACpB,CAACC,gBACCA,cAAcH,mBAAmB,KAAKA;AAE5C,EAAE;AAEF,OAAO,MAAMI,oBAAoB;IAC/B,OAAOxB,YAAYyB,OAAO;AAC5B,EAAE;AAEF;;;CAGC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAMC,kBAAkBD,KAAKE,MAAM,CAAC,kBAChCjC,SAAS+B,MAAM,kBACfG;IACJ,OAAOF,iBAAiBV,SAAS;AACnC,EAAE;AAEF;;;;CAIC,GACD,OAAO,MAAMa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;;;CAOC,GACD,OAAO,MAAM0B,iCAAiC,CAC5C/D,SACA0D;IAEAI,kCAAkC9D,SAAS,SAAS0D;IACpDI,kCAAkC9D,SAAS,YAAY0D;AACzD,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMM,8BAA8B,CACzChE,SACAiE;IAEAH,kCACE9D,SACA,SACA,GAAGiE,oBAAoB,MAAM,CAAC;IAEhCH,kCACE9D,SACA,YACA,GAAGiE,oBAAoB,SAAS,CAAC;AAErC,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CACnCrD,SACAsD;IAEAtD,OAAO,CAAC,MAAM,KAAK;QAAEuD,YAAY;QAAMX,WAAW,EAAE;IAAC;IACrD,MAAMY,aAAaxD,OAAO,CAAC,MAAM;IACjCwD,WAAWD,UAAU,GAAG;IACxBC,WAAWZ,SAAS,KAAK,EAAE;IAC3B,uEAAuE;IACvE,IAAI,CAACY,WAAWZ,SAAS,CAACa,QAAQ,CAACH,yBAAyB;QAC1DE,WAAWZ,SAAS,CAACI,IAAI,CAACM;IAC5B;IACAtD,OAAO,CAAC,MAAM,GAAGgC,wBAAwBwB;AAC3C,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/nx.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 type ProjectConfiguration,\n readJson,\n readProjectConfiguration,\n type TargetConfiguration,\n type TargetDefaultValue,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport * as path from 'path';\nimport PackageJson from '../../package.json' with { type: 'json' };\nimport { NX_PLUGIN_MCP_PACKAGE_NAME } from './mcp.js';\nimport { toSnakeCase } from './names.js';\nimport { getNpmScope, getNpmScopePrefix } from './npm-scope.js';\n\nexport type { GeneratorInfo, NxGeneratorInfo } from './generators.js';\nexport { buildGeneratorInfoList } from './generators.js';\n\nimport { buildGeneratorInfoList, type GeneratorInfo } from './generators.js';\n\nconst GENERATORS = buildGeneratorInfoList(\n path.resolve(import.meta.dirname, '..', '..'),\n);\n\n/**\n * List Nx Plugin for AWS generators\n * @param includeHidden include hidden generators (default false)\n */\nexport const listGenerators = (includeHidden = false) =>\n GENERATORS.filter((g) => includeHidden || !g.hidden);\n\n/**\n * Return generator information. Call this from a generator method with import.meta.filename\n */\nexport const getGeneratorInfo = (generatorFileName: string): GeneratorInfo => {\n const { dir, name } = path.parse(path.resolve(generatorFileName));\n const resolvedFactoryPath = path.join(dir, name);\n return GENERATORS.find(\n (generatorInfo) =>\n generatorInfo.resolvedFactoryPath === resolvedFactoryPath,\n );\n};\n\nexport const getPackageVersion = () => {\n return PackageJson.version;\n};\n\n/**\n * True inside the plugin's own monorepo, where the plugin is the source rather\n * than a dependency.\n */\nexport const isNxPluginForAwsWorkspace = (tree: Tree): boolean => {\n const rootPackageJson = tree.exists('package.json')\n ? readJson(tree, 'package.json')\n : undefined;\n return rootPackageJson?.name === '@aws/nx-plugin-source';\n};\n\n/**\n * The `@aws/nx-plugin` devDependency entry for a workspace the plugin generates\n * into, keyed to the version the running generators come from. Empty inside the\n * plugin's own monorepo.\n */\nexport const nxPluginSelfDependency = (tree: Tree): Record<string, string> =>\n isNxPluginForAwsWorkspace(tree)\n ? {}\n : { [PackageJson.name]: `^${PackageJson.version}` };\n\n/**\n * The `@aws/nx-plugin-mcp` devDependency entry, keyed to the running generators'\n * version — the two packages are released in lockstep. Declaring it pins the MCP\n * server the vended config runs in the workspace's lockfile, so upgrading it\n * upgrades the server. Empty inside the plugin's own monorepo.\n */\nexport const nxPluginMcpDependency = (tree: Tree): Record<string, string> =>\n isNxPluginForAwsWorkspace(tree)\n ? {}\n : { [NX_PLUGIN_MCP_PACKAGE_NAME]: `^${PackageJson.version}` };\n\n/**\n * Read a project configuration where the project name may not be fully qualified (ie may omit the scope prefix)\n */\nexport const readProjectConfigurationUnqualified = (\n tree: Tree,\n projectName: string,\n) => {\n try {\n return readProjectConfiguration(tree, projectName);\n } catch (e) {\n // Attempt to find the project without the scope\n const project = [...getProjects(tree).values()].find(\n (p) =>\n p.name &&\n (p.name === `${getNpmScopePrefix(tree)}${projectName}` || // TypeScript fully-qualified name\n p.name === `${toSnakeCase(getNpmScope(tree))}.${projectName}`), // Python fully-qualified name\n );\n if (project) {\n return project;\n }\n throw e;\n }\n};\n\n/**\n * Returns whether a project with the given name already exists in the workspace.\n * The project name may be unqualified (ie may omit the scope prefix).\n */\nexport const projectExists = (tree: Tree, projectName: string): boolean => {\n try {\n readProjectConfigurationUnqualified(tree, projectName);\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * Add metadata about the generator that generated the project to the project.json\n */\nexport const addGeneratorMetadata = (\n tree: Tree,\n projectName: string,\n info: { id: string },\n additionalMetadata?: { [key: string]: any },\n) => {\n const config = readProjectConfigurationUnqualified(tree, projectName);\n const metadata = {\n ...config?.metadata,\n generator: info.id,\n ...additionalMetadata,\n };\n // Skip the write when nothing changed so re-running doesn't reserialize\n // project.json. metadata is plain JSON built in a fixed key order, so a\n // stringify comparison is exact here.\n if (JSON.stringify(config?.metadata) === JSON.stringify(metadata)) {\n return;\n }\n // Place metadata immediately before targets so the serialized key order is\n // identical whether or not metadata already existed (matching the order Nx\n // normalizes a read config to), keeping the change a pure metadata insert.\n const { targets, ...rest } = config;\n updateProjectConfiguration(tree, config.name, {\n ...rest,\n metadata: metadata as any,\n ...(targets ? { targets } : {}),\n });\n};\n\n/**\n * Represents a component entry in project metadata\n */\nexport interface ComponentMetadata {\n readonly generator: string;\n readonly name?: string;\n /**\n * What this entry wires up. For a connection that is the target — the thing\n * being connected to — paired with `sourcePath` below.\n */\n readonly path?: string;\n /**\n * The component the connection is made *from*, when both ends are components\n * of a project rather than whole projects.\n *\n * A connection records the project it lives on and the target it reaches, which\n * alone can't tell which of several components on that project is wired up.\n * Recorded as a path for the same reason `path` is: it identifies a component\n * within its project without depending on a name that may repeat.\n */\n readonly sourcePath?: string;\n [key: string]: any;\n}\n\n/**\n * Add metadata about the generator that generated the component to the project.json\n *\n * A connection between two components passes the source's path as\n * `additionalMetadata.sourcePath`, so the pair is identifiable rather than just\n * the two projects.\n */\nexport const addComponentGeneratorMetadata = (\n tree: Tree,\n projectName: string,\n info: { id: string },\n componentPath: string,\n componentName?: string,\n additionalMetadata?: { [key: string]: any },\n) => {\n const config = readProjectConfigurationUnqualified(tree, projectName);\n\n const existingComponents = (config?.metadata as any)?.components ?? [];\n const alreadyAdded = existingComponents.filter(\n (c: any) => c.generator === info.id && c.name === componentName,\n );\n\n if (alreadyAdded.length === 0) {\n const componentMetadata: ComponentMetadata = {\n generator: info.id,\n path: componentPath,\n ...(componentName ? { name: componentName } : {}),\n ...additionalMetadata,\n };\n // Place metadata before targets for a stable serialized key order.\n const { targets, ...rest } = config;\n updateProjectConfiguration(tree, config.name, {\n ...rest,\n metadata: {\n ...config?.metadata,\n components: [...existingComponents, componentMetadata],\n } as any,\n ...(targets ? { targets } : {}),\n });\n }\n};\n\n/**\n * Merge `patch` into the component metadata entry matched on generator id and\n * name, leaving every other recorded value alone. A no-op when no entry matches\n * or when the patch changes nothing.\n *\n * `addComponentGeneratorMetadata` leaves an existing entry untouched, so a\n * generator whose options may legitimately change between runs pairs the two:\n * the add records a first run, this converges the values a later run resolved\n * differently.\n */\nexport const updateComponentGeneratorMetadata = (\n tree: Tree,\n projectName: string,\n info: { id: string },\n componentName: string | undefined,\n patch: { [key: string]: any },\n) => {\n const config = readProjectConfigurationUnqualified(tree, projectName);\n const existingComponents: ComponentMetadata[] =\n (config?.metadata as any)?.components ?? [];\n\n const updated = existingComponents.map((component) =>\n component.generator === info.id && component.name === componentName\n ? { ...component, ...patch }\n : component,\n );\n if (JSON.stringify(updated) === JSON.stringify(existingComponents)) {\n return;\n }\n\n // Place metadata before targets for a stable serialized key order.\n const { targets, ...rest } = config;\n updateProjectConfiguration(tree, config.name, {\n ...rest,\n metadata: {\n ...config?.metadata,\n components: updated,\n } as any,\n ...(targets ? { targets } : {}),\n });\n};\n\n/**\n * Merge a generator's own config into an `nx.json` `targetDefaults` value,\n * preserving whatever the workspace already had. `apply` receives the config to\n * layer onto and returns the merged config (e.g. `(base) => ({ cache: true,\n * ...base })`); it must be idempotent so re-running the generator is a no-op.\n *\n * Nx 23.1 widened each value to either a config object or an ordered array of\n * filtered entries. The plugin only contributes unfiltered (catch-all) config,\n * so the input's shape is preserved: an object (or unset) stays an object;\n * an array keeps the user's filtered entries and `apply` merges into its first\n * unfiltered entry, prepending one as the base if none exists (Nx layers later\n * matches on top, so our catch-all must stay first to not override a filter).\n */\nexport const mergeTargetDefault = (\n value: TargetDefaultValue | undefined,\n apply: (base: Partial<TargetConfiguration>) => Partial<TargetConfiguration>,\n): TargetDefaultValue => {\n if (!Array.isArray(value)) {\n return apply(value ?? {});\n }\n const catchAllIndex = value.findIndex((entry) => entry.filter === undefined);\n if (catchAllIndex === -1) {\n return [apply({}), ...value];\n }\n return value.map((entry, index) =>\n index === catchAllIndex ? apply(entry) : entry,\n );\n};\n\n/**\n * A single entry in an Nx `dependsOn` array.\n * Matches the shape accepted by Nx without requiring a devkit type import.\n */\nexport type TargetDependency =\n | string\n | {\n projects?: string | string[];\n target: string;\n params?: 'ignore' | 'forward';\n };\n\nconst targetDependencyEquals = (a: TargetDependency, b: TargetDependency) => {\n if (typeof a === 'string' || typeof b === 'string') {\n return a === b;\n }\n if (a.target !== b.target || a.params !== b.params) {\n return false;\n }\n const aProjects = Array.isArray(a.projects)\n ? a.projects\n : a.projects !== undefined\n ? [a.projects]\n : [];\n const bProjects = Array.isArray(b.projects)\n ? b.projects\n : b.projects !== undefined\n ? [b.projects]\n : [];\n if (aProjects.length !== bProjects.length) {\n return false;\n }\n return aProjects.every((p, i) => p === bProjects[i]);\n};\n\n// The order target properties are authored in. Nx preserves a target's\n// authored key order when it reads then rewrites an existing project.json,\n// except `options` and `configurations`, which it always moves to the end (in\n// that order). Keeping `options`/`configurations` last here therefore makes a\n// generator's first-run output byte-identical to subsequent runs (idempotency);\n// the remaining keys are ordered to read intuitively.\nconst NX_TARGET_KEY_ORDER = [\n 'executor',\n 'dependsOn',\n 'continuous',\n 'cache',\n 'inputs',\n 'outputs',\n 'metadata',\n 'defaultConfiguration',\n 'options',\n 'configurations',\n];\n\n/**\n * Reorder a target's keys to match Nx's own serialization order. Nx reorders\n * target properties when it rewrites an existing project.json, so applying the\n * same order when first authoring a target keeps generators idempotent.\n */\nexport const normalizeTargetKeyOrder = <T extends object>(target: T): T =>\n Object.fromEntries(\n Object.entries(target as Record<string, unknown>).sort(([a], [b]) => {\n const ai = NX_TARGET_KEY_ORDER.indexOf(a);\n const bi = NX_TARGET_KEY_ORDER.indexOf(b);\n return (\n (ai === -1 ? NX_TARGET_KEY_ORDER.length : ai) -\n (bi === -1 ? NX_TARGET_KEY_ORDER.length : bi)\n );\n }),\n ) as T;\n\n/**\n * Merge the configuration a generator owns into a project's existing target, so\n * re-running converges that configuration without discarding what other\n * generators (or the user) contributed to the same target.\n *\n * `dependsOn` is unioned: existing entries keep their order and the desired ones\n * are appended only when absent, so a re-run neither drops an entry (e.g. the\n * `bundle` a lambda function adds to `build`) nor duplicates one. Every other\n * key the caller passes wins, since those are the ones the generator owns.\n *\n * The result carries Nx's own key order, so a target authored on the first run\n * serializes identically to the same target merged into on a re-run.\n */\nexport const mergeTarget = (\n existing: TargetConfiguration | undefined,\n desired: TargetConfiguration,\n): TargetConfiguration => {\n const merged: TargetConfiguration = { ...existing, ...desired };\n const dependsOn = [...(existing?.dependsOn ?? [])];\n for (const dependency of desired.dependsOn ?? []) {\n if (!dependsOn.some((d) => targetDependencyEquals(d, dependency))) {\n dependsOn.push(dependency);\n }\n }\n if (dependsOn.length > 0) {\n merged.dependsOn = dependsOn;\n }\n return normalizeTargetKeyOrder(merged);\n};\n\n/**\n * Mutate the project to add the dependency to the target if not already present\n * Adds the target if not present.\n *\n * Accepts either a string target name (e.g. `'build'`) or a dependency config\n * object (e.g. `{ projects: ['foo'], target: 'dev' }`). Deduplicates\n * using deep equality so re-running a generator does not grow `dependsOn`.\n */\nexport const addDependencyToTargetIfNotPresent = (\n project: ProjectConfiguration,\n target: string,\n dependency: TargetDependency,\n) => {\n project.targets ??= {};\n project.targets[target] ??= {};\n project.targets[target].dependsOn ??= [];\n const dependsOn = project.targets[target].dependsOn;\n // Leave existing dependencies in place so re-running does not reorder them;\n // only append when the dependency is genuinely absent.\n if (!dependsOn.some((d) => targetDependencyEquals(d, dependency))) {\n dependsOn.push(dependency);\n }\n // Keep key order aligned with Nx's so first run matches subsequent runs.\n project.targets[target] = normalizeTargetKeyOrder(project.targets[target]);\n};\n\n/**\n * Register a dependency that produces a deployable artifact on both `build` and\n * `assemble`.\n *\n * `build` is the everything target: artifacts plus the quality gates (lint,\n * test, typecheck). `assemble` is its artifact-only sibling, which the deploy\n * targets depend on so a deploy builds what it deploys and nothing else.\n */\nexport const addArtifactDependencyToTargets = (\n project: ProjectConfiguration,\n dependency: TargetDependency,\n) => {\n addDependencyToTargetIfNotPresent(project, 'build', dependency);\n addDependencyToTargetIfNotPresent(project, 'assemble', dependency);\n};\n\n/**\n * Register another project whose artifacts this one consumes, on both `build`\n * and `assemble`.\n *\n * The shared infrastructure project reads the artifacts of every project it\n * deploys, and those cross-project edges are explicit because Nx's `^` operator\n * only follows package dependencies. `assemble` mirrors the list against the\n * consumed projects' own `assemble`, keeping the artifact-only chain closed.\n */\nexport const addArtifactProjectToTargets = (\n project: ProjectConfiguration,\n consumedProjectName: string,\n) => {\n addDependencyToTargetIfNotPresent(\n project,\n 'build',\n `${consumedProjectName}:build`,\n );\n addDependencyToTargetIfNotPresent(\n project,\n 'assemble',\n `${consumedProjectName}:assemble`,\n );\n};\n\n/**\n * Register a component's `<name>-dev` target under the project-level `dev`\n * target, so `nx run <project>:dev` starts every component in the project.\n *\n * Component generators author their own continuous `<name>-dev` runner and call\n * this to aggregate it. Every component added to the project accumulates its\n * `<name>-dev` under `dev`. Nx keys tasks by `project:target`, so any\n * dependencies shared between components run exactly once.\n */\nexport const addComponentDevTarget = (\n targets: Record<string, ProjectConfiguration['targets'][string]>,\n componentDevTargetName: string,\n) => {\n targets['dev'] ??= { continuous: true, dependsOn: [] };\n const projectDev = targets['dev'];\n projectDev.continuous = true;\n projectDev.dependsOn ??= [];\n // Append in component-creation order; dedupe keeps re-runs idempotent.\n if (!projectDev.dependsOn.includes(componentDevTargetName)) {\n projectDev.dependsOn.push(componentDevTargetName);\n }\n targets['dev'] = normalizeTargetKeyOrder(projectDev);\n};\n"],"names":["getProjects","readJson","readProjectConfiguration","updateProjectConfiguration","path","PackageJson","type","NX_PLUGIN_MCP_PACKAGE_NAME","toSnakeCase","getNpmScope","getNpmScopePrefix","buildGeneratorInfoList","GENERATORS","resolve","dirname","listGenerators","includeHidden","filter","g","hidden","getGeneratorInfo","generatorFileName","dir","name","parse","resolvedFactoryPath","join","find","generatorInfo","getPackageVersion","version","isNxPluginForAwsWorkspace","tree","rootPackageJson","exists","undefined","nxPluginSelfDependency","nxPluginMcpDependency","readProjectConfigurationUnqualified","projectName","e","project","values","p","projectExists","addGeneratorMetadata","info","additionalMetadata","config","metadata","generator","id","JSON","stringify","targets","rest","addComponentGeneratorMetadata","componentPath","componentName","existingComponents","components","alreadyAdded","c","length","componentMetadata","updateComponentGeneratorMetadata","patch","updated","map","component","mergeTargetDefault","value","apply","Array","isArray","catchAllIndex","findIndex","entry","index","targetDependencyEquals","a","b","target","params","aProjects","projects","bProjects","every","i","NX_TARGET_KEY_ORDER","normalizeTargetKeyOrder","Object","fromEntries","entries","sort","ai","indexOf","bi","mergeTarget","existing","desired","merged","dependsOn","dependency","some","d","push","addDependencyToTargetIfNotPresent","addArtifactDependencyToTargets","addArtifactProjectToTargets","consumedProjectName","addComponentDevTarget","componentDevTargetName","continuous","projectDev","includes"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EAEXC,QAAQ,EACRC,wBAAwB,EAIxBC,0BAA0B,QACrB,aAAa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|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { DependencyDeclaration, MustDeclare } from './declared-dependencies.js';
|
|
7
|
+
/** Dependencies a caller must declare to use the shared Greengrass scripts. */
|
|
8
|
+
export declare const SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES: readonly [{
|
|
9
|
+
readonly name: "js-yaml";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "@types/js-yaml";
|
|
12
|
+
}, {
|
|
13
|
+
readonly name: "tsx";
|
|
14
|
+
}];
|
|
15
|
+
/**
|
|
16
|
+
* Ensures the shared scripts package exists and adds Greengrass local-build
|
|
17
|
+
* and local-deploy scripts to packages/common/scripts/src/greengrass/. Used
|
|
18
|
+
* by greengrass#component for Python and TypeScript hosts so a
|
|
19
|
+
* single set of TypeScript scripts serves both.
|
|
20
|
+
*/
|
|
21
|
+
export declare function sharedGreengrassScriptsGenerator<const D extends DependencyDeclaration>(tree: Tree, declaration: D & MustDeclare<typeof SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES, D>): Promise<void>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { generateFiles, joinPathFragments, OverwriteStrategy } from "@nx/devkit";
|
|
5
|
+
import { addDependenciesToPackageJson } from "./dependencies.js";
|
|
6
|
+
import { esmVars } from "./module-format.js";
|
|
7
|
+
import { PACKAGES_DIR, SHARED_SCRIPTS_DIR } from "./shared-constructs-constants.js";
|
|
8
|
+
import { ensureSharedScriptsProject } from "./shared-scripts.js";
|
|
9
|
+
import { withVersions } from "./versions.js";
|
|
10
|
+
/** Dependencies a caller must declare to use the shared Greengrass scripts. */ export const SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES = [
|
|
11
|
+
{
|
|
12
|
+
name: 'js-yaml'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: '@types/js-yaml'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'tsx'
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* Ensures the shared scripts package exists and adds Greengrass local-build
|
|
23
|
+
* and local-deploy scripts to packages/common/scripts/src/greengrass/. Used
|
|
24
|
+
* by greengrass#component for Python and TypeScript hosts so a
|
|
25
|
+
* single set of TypeScript scripts serves both.
|
|
26
|
+
*/ export async function sharedGreengrassScriptsGenerator(tree, declaration) {
|
|
27
|
+
const scriptsDir = joinPathFragments(PACKAGES_DIR, SHARED_SCRIPTS_DIR);
|
|
28
|
+
const greengrassScriptsDir = joinPathFragments(scriptsDir, 'src', 'greengrass');
|
|
29
|
+
await ensureSharedScriptsProject(tree);
|
|
30
|
+
generateFiles(tree, joinPathFragments(import.meta.dirname, 'files', SHARED_SCRIPTS_DIR, 'src', 'greengrass'), greengrassScriptsDir, esmVars(tree), {
|
|
31
|
+
overwriteStrategy: OverwriteStrategy.KeepExisting
|
|
32
|
+
});
|
|
33
|
+
addDependenciesToPackageJson(tree, withVersions(declaration, [
|
|
34
|
+
'js-yaml'
|
|
35
|
+
]), withVersions(declaration, [
|
|
36
|
+
'@types/js-yaml'
|
|
37
|
+
]), joinPathFragments(PACKAGES_DIR, SHARED_SCRIPTS_DIR, 'package.json'));
|
|
38
|
+
addDependenciesToPackageJson(tree, {}, withVersions(declaration, [
|
|
39
|
+
'tsx'
|
|
40
|
+
]));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=shared-greengrass-scripts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/shared-greengrass-scripts.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n generateFiles,\n joinPathFragments,\n OverwriteStrategy,\n type Tree,\n} from '@nx/devkit';\nimport type {\n DependencyDeclaration,\n MustDeclare,\n} from './declared-dependencies.js';\nimport { addDependenciesToPackageJson } from './dependencies.js';\nimport { esmVars } from './module-format.js';\nimport {\n PACKAGES_DIR,\n SHARED_SCRIPTS_DIR,\n} from './shared-constructs-constants.js';\nimport { ensureSharedScriptsProject } from './shared-scripts.js';\nimport { type ITsDepVersion, withVersions } from './versions.js';\n\n/** Dependencies a caller must declare to use the shared Greengrass scripts. */\nexport const SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES = [\n { name: 'js-yaml' },\n { name: '@types/js-yaml' },\n { name: 'tsx' },\n] as const satisfies readonly { name: ITsDepVersion }[];\n\n/**\n * Ensures the shared scripts package exists and adds Greengrass local-build\n * and local-deploy scripts to packages/common/scripts/src/greengrass/. Used\n * by greengrass#component for Python and TypeScript hosts so a\n * single set of TypeScript scripts serves both.\n */\nexport async function sharedGreengrassScriptsGenerator<\n const D extends DependencyDeclaration,\n>(\n tree: Tree,\n declaration: D &\n MustDeclare<typeof SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES, D>,\n): Promise<void> {\n const scriptsDir = joinPathFragments(PACKAGES_DIR, SHARED_SCRIPTS_DIR);\n const greengrassScriptsDir = joinPathFragments(\n scriptsDir,\n 'src',\n 'greengrass',\n );\n\n await ensureSharedScriptsProject(tree);\n\n generateFiles(\n tree,\n joinPathFragments(\n import.meta.dirname,\n 'files',\n SHARED_SCRIPTS_DIR,\n 'src',\n 'greengrass',\n ),\n greengrassScriptsDir,\n esmVars(tree),\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n\n addDependenciesToPackageJson(\n tree,\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES\n >,\n ['js-yaml'],\n ),\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES\n >,\n ['@types/js-yaml'],\n ),\n joinPathFragments(PACKAGES_DIR, SHARED_SCRIPTS_DIR, 'package.json'),\n );\n addDependenciesToPackageJson(\n tree,\n {},\n withVersions(\n declaration as DependencyDeclaration<\n typeof SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES\n >,\n ['tsx'],\n ),\n );\n}\n"],"names":["generateFiles","joinPathFragments","OverwriteStrategy","addDependenciesToPackageJson","esmVars","PACKAGES_DIR","SHARED_SCRIPTS_DIR","ensureSharedScriptsProject","withVersions","SHARED_GREENGRASS_SCRIPTS_DEPENDENCIES","name","sharedGreengrassScriptsGenerator","tree","declaration","scriptsDir","greengrassScriptsDir","dirname","overwriteStrategy","KeepExisting"],"mappings":"AAAA;;;CAGC,GACD,SACEA,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,QAEZ,aAAa;AAKpB,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE,SAASC,OAAO,QAAQ,qBAAqB;AAC7C,SACEC,YAAY,EACZC,kBAAkB,QACb,mCAAmC;AAC1C,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAA6BC,YAAY,QAAQ,gBAAgB;AAEjE,6EAA6E,GAC7E,OAAO,MAAMC,yCAAyC;IACpD;QAAEC,MAAM;IAAU;IAClB;QAAEA,MAAM;IAAiB;IACzB;QAAEA,MAAM;IAAM;CACf,CAAuD;AAExD;;;;;CAKC,GACD,OAAO,eAAeC,iCAGpBC,IAAU,EACVC,WAC+D;IAE/D,MAAMC,aAAab,kBAAkBI,cAAcC;IACnD,MAAMS,uBAAuBd,kBAC3Ba,YACA,OACA;IAGF,MAAMP,2BAA2BK;IAEjCZ,cACEY,MACAX,kBACE,YAAYe,OAAO,EACnB,SACAV,oBACA,OACA,eAEFS,sBACAX,QAAQQ,OACR;QAAEK,mBAAmBf,kBAAkBgB,YAAY;IAAC;IAGtDf,6BACES,MACAJ,aACEK,aAGA;QAAC;KAAU,GAEbL,aACEK,aAGA;QAAC;KAAiB,GAEpBZ,kBAAkBI,cAAcC,oBAAoB;IAEtDH,6BACES,MACA,CAAC,GACDJ,aACEK,aAGA;QAAC;KAAM;AAGb"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const TS_VERSIONS: {
|
|
|
18
18
|
readonly '@aws-sdk/client-iam': "3.1152.0";
|
|
19
19
|
readonly '@aws-sdk/client-bedrock-agentcore': "3.1152.0";
|
|
20
20
|
readonly '@aws-sdk/client-bedrock-runtime': "3.1152.0";
|
|
21
|
+
readonly '@aws-sdk/client-greengrassv2': "3.1152.0";
|
|
21
22
|
readonly '@aws-sdk/client-s3': "3.1152.0";
|
|
22
23
|
readonly '@aws-sdk/client-sts': "3.1152.0";
|
|
23
24
|
readonly '@aws-sdk/client-cognito-identity-provider': "3.1152.0";
|
|
@@ -75,6 +76,7 @@ export declare const TS_VERSIONS: {
|
|
|
75
76
|
readonly '@types/node': "26.6.5";
|
|
76
77
|
readonly '@types/aws-lambda': "8.10.164";
|
|
77
78
|
readonly '@types/cors': "2.8.19";
|
|
79
|
+
readonly '@types/js-yaml': "4.0.9";
|
|
78
80
|
readonly '@types/pg': "8.23.1";
|
|
79
81
|
readonly '@types/ws': "8.18.2";
|
|
80
82
|
readonly '@types/express': "5.0.6";
|
|
@@ -91,6 +93,7 @@ export declare const TS_VERSIONS: {
|
|
|
91
93
|
readonly aws4fetch: "1.0.20";
|
|
92
94
|
readonly 'aws-cdk': "2.1145.0";
|
|
93
95
|
readonly 'aws-cdk-lib': "2.273.0";
|
|
96
|
+
readonly 'aws-iot-device-sdk-v2': "1.28.0";
|
|
94
97
|
readonly 'aws-xray-sdk-core': "3.12.0";
|
|
95
98
|
readonly constructs: "10.8.1";
|
|
96
99
|
readonly cors: "2.8.6";
|
|
@@ -113,6 +116,7 @@ export declare const TS_VERSIONS: {
|
|
|
113
116
|
readonly husky: "9.1.7";
|
|
114
117
|
readonly 'fs-extra': "11.4.1";
|
|
115
118
|
readonly '@types/fs-extra': "11.0.4";
|
|
119
|
+
readonly 'js-yaml': "4.3.2";
|
|
116
120
|
readonly mariadb: "3.5.4";
|
|
117
121
|
readonly mise: "2026.10.14";
|
|
118
122
|
readonly npm: "12.2.1";
|
|
@@ -200,6 +204,7 @@ export declare const PY_VERSIONS: {
|
|
|
200
204
|
readonly 'aws-lambda-powertools[tracer]': "==3.36.0";
|
|
201
205
|
readonly 'aws-lambda-powertools[parser]': "==3.36.0";
|
|
202
206
|
readonly 'aws-opentelemetry-distro': "==0.21.0";
|
|
207
|
+
readonly awsiotsdk: "==1.31.0";
|
|
203
208
|
readonly 'bedrock-agentcore': "==1.24.2";
|
|
204
209
|
readonly boto3: "==1.43.115";
|
|
205
210
|
readonly checkov: "==3.3.29";
|
|
@@ -388,6 +393,7 @@ export declare const terraformLambdaRuntimeVars: () => {
|
|
|
388
393
|
*/
|
|
389
394
|
export declare const TERRAFORM_VERSIONS: {
|
|
390
395
|
readonly aws: "6.69.1";
|
|
396
|
+
readonly awscc: "1.100.0";
|
|
391
397
|
readonly random: "3.9.1";
|
|
392
398
|
readonly null: "3.3.2";
|
|
393
399
|
readonly archive: "2.8.1";
|
|
@@ -402,6 +408,7 @@ export type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;
|
|
|
402
408
|
*/
|
|
403
409
|
export declare const terraformProviderVersions: () => {
|
|
404
410
|
awsProviderVersion: "6.69.1";
|
|
411
|
+
awsccProviderVersion: "1.100.0";
|
|
405
412
|
randomProviderVersion: "3.9.1";
|
|
406
413
|
nullProviderVersion: "3.3.2";
|
|
407
414
|
archiveProviderVersion: "2.8.1";
|
package/src/utils/versions.js
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
'@aws-sdk/client-iam': '3.1152.0',
|
|
28
28
|
'@aws-sdk/client-bedrock-agentcore': '3.1152.0',
|
|
29
29
|
'@aws-sdk/client-bedrock-runtime': '3.1152.0',
|
|
30
|
+
'@aws-sdk/client-greengrassv2': '3.1152.0',
|
|
30
31
|
'@aws-sdk/client-s3': '3.1152.0',
|
|
31
32
|
'@aws-sdk/client-sts': '3.1152.0',
|
|
32
33
|
'@aws-sdk/client-cognito-identity-provider': '3.1152.0',
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
'@types/node': '26.6.5',
|
|
86
87
|
'@types/aws-lambda': '8.10.164',
|
|
87
88
|
'@types/cors': '2.8.19',
|
|
89
|
+
'@types/js-yaml': '4.0.9',
|
|
88
90
|
'@types/pg': '8.23.1',
|
|
89
91
|
'@types/ws': '8.18.2',
|
|
90
92
|
'@types/express': '5.0.6',
|
|
@@ -101,6 +103,7 @@
|
|
|
101
103
|
aws4fetch: '1.0.20',
|
|
102
104
|
'aws-cdk': '2.1145.0',
|
|
103
105
|
'aws-cdk-lib': '2.273.0',
|
|
106
|
+
'aws-iot-device-sdk-v2': '1.28.0',
|
|
104
107
|
'aws-xray-sdk-core': '3.12.0',
|
|
105
108
|
constructs: '10.8.1',
|
|
106
109
|
cors: '2.8.6',
|
|
@@ -123,6 +126,7 @@
|
|
|
123
126
|
husky: '9.1.7',
|
|
124
127
|
'fs-extra': '11.4.1',
|
|
125
128
|
'@types/fs-extra': '11.0.4',
|
|
129
|
+
'js-yaml': '4.3.2',
|
|
126
130
|
mariadb: '3.5.4',
|
|
127
131
|
mise: '2026.10.14',
|
|
128
132
|
npm: '12.2.1',
|
|
@@ -248,6 +252,7 @@
|
|
|
248
252
|
'aws-lambda-powertools[tracer]': '==3.36.0',
|
|
249
253
|
'aws-lambda-powertools[parser]': '==3.36.0',
|
|
250
254
|
'aws-opentelemetry-distro': '==0.21.0',
|
|
255
|
+
awsiotsdk: '==1.31.0',
|
|
251
256
|
'bedrock-agentcore': '==1.24.2',
|
|
252
257
|
boto3: '==1.43.115',
|
|
253
258
|
checkov: '==3.3.29',
|
|
@@ -429,6 +434,7 @@
|
|
|
429
434
|
* Pinned exactly (no range operator) so generated infrastructure is reproducible.
|
|
430
435
|
*/ export const TERRAFORM_VERSIONS = {
|
|
431
436
|
aws: '6.69.1',
|
|
437
|
+
awscc: '1.100.0',
|
|
432
438
|
random: '3.9.1',
|
|
433
439
|
null: '3.3.2',
|
|
434
440
|
archive: '2.8.1',
|
|
@@ -441,6 +447,7 @@
|
|
|
441
447
|
* generated `.tf` templates (e.g. `version = "<%- awsProviderVersion %>"`)
|
|
442
448
|
*/ export const terraformProviderVersions = ()=>({
|
|
443
449
|
awsProviderVersion: TERRAFORM_VERSIONS.aws,
|
|
450
|
+
awsccProviderVersion: TERRAFORM_VERSIONS.awscc,
|
|
444
451
|
randomProviderVersion: TERRAFORM_VERSIONS.random,
|
|
445
452
|
nullProviderVersion: TERRAFORM_VERSIONS.null,
|
|
446
453
|
archiveProviderVersion: TERRAFORM_VERSIONS.archive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type DeclaredPy,\n type DeclaredTs,\n type DependencyDeclaration,\n declaredNames,\n} from './declared-dependencies.js';\n\n/**\n * Versons for TypeScript dependencies added by generators\n */\nexport const TS_VERSIONS = {\n '@a2a-js/sdk': '0.3.14',\n '@aws/aws-distro-opentelemetry-node-autoinstrumentation': '0.13.0',\n // Pinned above the version the ADOT autoinstrumentation package resolves\n // transitively (2.8.0) to clear CVE-2026-59892 (HIGH).\n '@opentelemetry/propagator-jaeger': '2.12.0',\n // Overridden in the vended agent/MCP image builds to clear CVE-2026-14257\n // (HIGH) in brace-expansion: minimatch 10 is the lowest major depending on\n // brace-expansion 5.x, the only line Trivy's `< 5.0.8` advisory range treats\n // as fixed. Overriding brace-expansion directly is not viable — 5.x drops the\n // CommonJS default export that minimatch 9 calls.\n minimatch: '10.2.6',\n // Both overridden in the vended RDB migration image build, which installs the\n // prisma CLI to run migrations: its own ranges resolve deepmerge-ts below the\n // CVE-2026-40345 fix (HIGH) and mysql2 below the GHSA-3f6p-5ww8-9rcr fix\n // (HIGH). Neither is imported by the handler, which drives the schema engine.\n 'deepmerge-ts': '8.0.2',\n mysql2: '3.24.6',\n '@aws-sdk/client-dynamodb': '3.1152.0',\n '@aws-sdk/client-api-gateway': '3.1152.0',\n '@aws-sdk/client-iam': '3.1152.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1152.0',\n '@aws-sdk/client-bedrock-runtime': '3.1152.0',\n '@aws-sdk/client-s3': '3.1152.0',\n '@aws-sdk/client-sts': '3.1152.0',\n '@aws-sdk/client-cognito-identity-provider': '3.1152.0',\n '@aws-sdk/credential-providers': '3.1152.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.73',\n '@aws-sdk/client-secrets-manager': '3.1152.0',\n '@aws-sdk/rds-signer': '3.1152.0',\n '@smithy/server-apigateway': '0.3.4',\n '@smithy/server-node': '0.3.4',\n '@aws-lambda-powertools/logger': '2.36.0',\n '@aws-lambda-powertools/metrics': '2.36.0',\n '@aws-lambda-powertools/parameters': '2.36.0',\n '@aws-lambda-powertools/tracer': '2.36.0',\n '@aws-lambda-powertools/parser': '2.36.0',\n '@aws-sdk/client-appconfigdata': '3.1152.0',\n '@middy/core': '7.9.2',\n '@nxlv/python': '23.2.1',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.3.0',\n '@nx/devkit': '23.3.0',\n '@nx/js': '23.3.0',\n '@nx/react': '23.3.0',\n '@nx/vite': '23.3.0',\n '@nx/vitest': '23.3.0',\n '@nx/workspace': '23.3.0',\n 'create-nx-workspace': '23.3.0',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.18',\n '@modelcontextprotocol/sdk': '1.32.1',\n '@modelcontextprotocol/client': '2.3.1',\n '@modelcontextprotocol/inspector': '2.11.0',\n '@ag-ui/a2ui-toolkit': '0.0.5',\n '@ag-ui/aws-strands': '1.0.0',\n '@ag-ui/client': '1.0.2',\n '@ag-ui/core': '1.0.2',\n '@ag-ui/encoder': '1.0.2',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.79.1',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.21.0',\n '@tanstack/react-router': '1.170.45',\n '@tanstack/router-plugin': '1.168.47',\n '@tanstack/router-generator': '1.167.45',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.4',\n '@cloudscape-design/board-components': '3.0.238',\n '@cloudscape-design/chat-components': '1.0.179',\n '@cloudscape-design/components': '3.0.1401',\n '@cloudscape-design/global-styles': '1.0.71',\n '@tanstack/react-query': '5.104.4',\n '@tanstack/react-query-devtools': '5.104.4',\n '@trpc/tanstack-react-query': '11.19.0',\n '@trpc/client': '11.19.0',\n '@trpc/server': '11.19.0',\n '@types/node': '26.6.5',\n '@types/aws-lambda': '8.10.164',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.2',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.7.2',\n '@smithy/node-config-provider': '4.6.2',\n '@smithy/node-http-handler': '4.12.1',\n '@smithy/types': '4.19.0',\n '@vitest/coverage-v8': '5.0.4',\n '@vitest/ui': '5.0.4',\n '@astrojs/react': '6.0.6',\n '@astrojs/starlight': '0.42.6',\n astro: '7.4.0',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1145.0',\n 'aws-cdk-lib': '2.273.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.1',\n 'class-variance-authority': '0.7.1',\n cn: '0.5.0',\n commander: '15.0.0',\n electrodb: '3.9.3',\n esbuild: '0.28.2',\n 'event-source-polyfill': '1.0.31',\n '@types/event-source-polyfill': '1.0.5',\n '@biomejs/biome': '2.5.15',\n '@prisma/adapter-mariadb': '7.10.1',\n '@prisma/adapter-pg': '7.10.1',\n '@prisma/client': '7.10.1',\n ejs: '6.0.1',\n '@types/ejs': '3.1.5',\n express: '5.3.0',\n 'fast-glob': '3.3.3',\n husky: '9.1.7',\n 'fs-extra': '11.4.1',\n '@types/fs-extra': '11.0.4',\n mariadb: '3.5.4',\n mise: '2026.10.14',\n npm: '12.2.1',\n 'npm-check-updates': '23.1.1',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.1',\n prisma: '7.10.1',\n 'react-oidc-context': '3.3.1',\n react: '19.3.1',\n 'react-dom': '19.3.1',\n rolldown: '1.2.14',\n 'rolldown-plugin-dts': '0.28.8',\n shx: '0.4.0',\n 'simple-git': '4.0.2',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.30.2',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.15',\n 'lucide-react': '1.59.0',\n 'radix-ui': '1.8.1',\n shadcn: '4.22.1',\n 'tw-animate-css': '1.4.0',\n vite: '8.3.4',\n typescript: '6.0.3',\n vitest: '5.0.4',\n // The `testEnvironment` @nx/vitest writes into every generated config.\n jsdom: '29.1.1',\n zod: '4.6.7',\n ws: '8.22.0',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\n\n/**\n * Dependencies that must move as a unit, held at the lowest version proposed\n * across each group by the version update. Members must share a version line.\n *\n * The wasm formatter bindings are dependencies of this repo rather than vended\n * pins, so they are named here but versioned in the manifests.\n */\nexport const LOCKSTEP_GROUPS = [\n // A duplicate `@ag-ui/client` fails every generated website with TS2322.\n ['@ag-ui/client', '@ag-ui/core', '@ag-ui/encoder'],\n // The wasm bindings format generated files; the CLI checks them.\n ['@biomejs/wasm-nodejs', '@biomejs/biome'],\n ['@astral-sh/ruff-wasm-nodejs', 'ruff'],\n // vitest pins its coverage provider and UI at its own exact version.\n ['vitest', '@vitest/coverage-v8', '@vitest/ui'],\n] as const satisfies readonly (readonly [string, string, ...string[]])[];\n\n/**\n * Pins the version update sets to the exact `dependencies` of another vended\n * package, as published for the version of it being written. Followers' lockstep\n * group mates move with them. If a peer's published `peerDependencies` reject the\n * result, or a manifest can't be read, all of these pins stay where they are.\n *\n * Use this rather than a lockstep group when the packages don't share a version\n * line.\n */\nexport const EXACT_DEPENDENCY_PINS = [\n {\n source: '@copilotkit/react-core',\n followers: ['@ag-ui/client', '@ag-ui/core'],\n peers: ['@ag-ui/aws-strands', '@ag-ui/a2ui-toolkit'],\n reason:\n 'a second @ag-ui/client copy fails every generated website with TS2322',\n },\n] as const satisfies readonly {\n source: ITsDepVersion;\n followers: readonly [ITsDepVersion, ...ITsDepVersion[]];\n peers: readonly ITsDepVersion[];\n reason: string;\n}[];\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.47',\n 'ag-ui-protocol': '==0.1.22',\n 'ag-ui-strands': '==0.4.1',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.36.0',\n 'aws-lambda-powertools[tracer]': '==3.36.0',\n 'aws-lambda-powertools[parser]': '==3.36.0',\n 'aws-opentelemetry-distro': '==0.21.0',\n 'bedrock-agentcore': '==1.24.2',\n boto3: '==1.43.115',\n checkov: '==3.3.29',\n fastapi: '==0.150.0',\n 'fastapi[standard]': '==0.150.0',\n httpx: '==0.28.1',\n langchain: '==1.4.6',\n 'langchain-aws': '==1.9.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.16',\n 'langgraph-checkpoint-aws': '==1.2.5',\n 'langgraph-checkpoint-sqlite': '==3.1.2',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n pydantic: '==2.14.1',\n ruff: '==0.17.1',\n 'strands-agents': '==1.61.1',\n 'strands-agents[a2a]': '==1.61.1',\n 'strands-agents-tools': '==0.8.9',\n ty: '==0.0.89',\n pynamodb: '==6.1.0',\n uvicorn: '==0.54.0',\n sqlmodel: '==0.0.48',\n alembic: '==1.20.0',\n aiomysql: '==0.3.2',\n asyncpg: '==0.32.0',\n // Pinned explicitly: SQLAlchemy's async engine pulls greenlet transitively,\n // and leaving it unpinned lets uv resolve to a just-released version whose\n // platform wheels may not all be published yet (breaking aarch64 installs).\n greenlet: '==3.5.6',\n} as const;\nexport type IPyDepVersion = keyof typeof PY_VERSIONS;\n\n/**\n * Entries for the workspace root `[tool.uv] override-dependencies`, keyed by\n * the vended package whose own requirement they override. They are written\n * whenever a project depends on the key.\n */\nexport const PY_UV_OVERRIDES = {\n // strands-agents-tools caps pillow below 13.0.0, the release that fixes\n // CVE-2026-112403 and other pillow CVEs. Remove this entry when the\n // strands-agents-tools pin moves to a release that allows pillow 13\n // (strands-agents/tools#626).\n 'strands-agents-tools': ['pillow>=13.0.0'],\n} as const satisfies Partial<Record<IPyDepVersion, readonly string[]>>;\n\n/**\n * Add versions to the given dependencies\n */\nexport const withPyVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredPy<D>[],\n): string[] => {\n assertDeclared(declaration.py, deps, 'py');\n return deps.map((dep) => `${dep}${PY_VERSIONS[dep as IPyDepVersion]}`);\n};\n\n/** Catches undeclared packages that reach here past the type checker. */\nconst assertDeclared = (\n declared: readonly { readonly name: string }[],\n deps: readonly unknown[],\n kind: 'ts' | 'py',\n): void => {\n const names = declaredNames(declared);\n const undeclared = deps.filter((dep) => !names.includes(dep as string));\n if (undeclared.length > 0) {\n throw new Error(\n `Undeclared ${kind} dependencies: ${undeclared.join(', ')}. Add them to the generator's declareDependencies({ ${kind}: [...] }).`,\n );\n }\n};\n\n/**\n * Versions for vendored tools\n */\nexport const VENDORED_VERSIONS = {\n 'git-secrets': '1.3.0',\n} as const;\n\n/**\n * Versions of Java dependencies added by generators, keyed by Maven coordinate.\n *\n * Every entry is resolved from Maven Central by the version update and named\n * `<group>:<artifact>:<version>` where a generator writes it.\n */\nexport const JAVA_VERSIONS = {\n 'software.amazon.smithy:smithy-model': '1.74.1',\n 'software.amazon.smithy:smithy-aws-traits': '1.74.1',\n 'software.amazon.smithy:smithy-validation-model': '1.74.1',\n 'software.amazon.smithy:smithy-openapi': '1.74.1',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.54.0',\n} as const;\nexport type IJavaVersion = keyof typeof JAVA_VERSIONS;\n\n/** The Maven coordinates the version update resolves, in declaration order. */\nexport const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS) as IJavaVersion[];\n\n/** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */\nexport const javaMavenDependency = (artifact: IJavaVersion): string =>\n `${artifact}:${JAVA_VERSIONS[artifact]}`;\n\n/**\n * Versions of tools resolved by mise, keyed by the tool name mise knows.\n *\n * Every entry is checked with `mise latest <tool>` by the version update. Nothing\n * is installed into the workspace: the pin travels in the `project.json` target\n * command, which is what the version sync reaches to move it forward.\n */\nexport const MISE_VERSIONS = {\n smithy: '1.74.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 * The managed Lambda runtimes generated infrastructure targets, as the single\n * source both IaC providers derive from.\n *\n * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`\n * against `nodejs24.x` — so deriving both from the version here keeps a bump one\n * edit that moves them together. Resolved by the version update workflow.\n */\nexport const LAMBDA_RUNTIME_VERSIONS = {\n node: '24',\n python: '3.14',\n} as const;\nexport type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;\n\n/**\n * The managed AgentCore Runtime runtimes generated infrastructure targets, for\n * agents and MCP servers packaged as code rather than as a container image.\n *\n * Tracked separately from {@link LAMBDA_RUNTIME_VERSIONS}: AgentCore publishes\n * its own, smaller set, so a Lambda bump would otherwise move these to a runtime\n * AgentCore rejects at create time. Resolved by the version update workflow from\n * the `AgentCoreRuntime` members `aws-cdk-lib` publishes, the same source the\n * Lambda runtimes come from.\n */\nexport const AGENT_CORE_RUNTIME_VERSIONS = {\n node: '22',\n python: '3.14',\n} as const;\nexport type IAgentCoreRuntime = keyof typeof AGENT_CORE_RUNTIME_VERSIONS;\n\n/**\n * The runtime as AgentCore's `runtime` field names it, e.g. `NODE_22` or\n * `PYTHON_3_14`.\n */\nexport const agentCoreRuntime = (runtime: IAgentCoreRuntime): string =>\n runtime === 'node'\n ? `NODE_${AGENT_CORE_RUNTIME_VERSIONS.node}`\n : `PYTHON_${AGENT_CORE_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * The interpreter uv pins for a generated Python project, as the Lambda runtime's\n * `major.minor`.\n *\n * No patch: uv reads this as a request for any patch of that minor, so it resolves\n * whichever one the platform has a build for. Naming an exact patch pins one that\n * may not exist everywhere, and Lambda patches the interpreter itself, so the minor\n * is the whole of what a project needs to agree on.\n */\nexport const pyenvPythonVersion = (): string => LAMBDA_RUNTIME_VERSIONS.python;\n\n/**\n * The `[project].requires-python` specifier for a generated Python project.\n *\n * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter\n * is that version, and Ruff derives its `target-version` from this (`py314`), so\n * lint targets the same version the function runs on.\n */\nexport const pyprojectPythonDependency = (): string =>\n `>=${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */\nexport const terraformLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x`\n : `python${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/**\n * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.\n * Always an explicitly versioned member, never a `_LATEST` alias.\n */\nexport const cdkLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X`\n : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * Substitution variables exposing the pinned runtimes to generated CDK\n * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with\n * {@link terraformLambdaRuntimeVars}, which names the same variables so a\n * template reads alike under either provider.\n */\nexport const cdkLambdaRuntimeVars = () => ({\n nodeRuntime: cdkLambdaRuntime('node'),\n pythonRuntime: cdkLambdaRuntime('python'),\n});\n\n/**\n * Substitution variables exposing the pinned runtimes to generated `.tf`\n * templates (e.g. `runtime = \"<%- nodeRuntime %>\"`).\n */\nexport const terraformLambdaRuntimeVars = () => ({\n nodeRuntime: terraformLambdaRuntime('node'),\n pythonRuntime: terraformLambdaRuntime('python'),\n});\n\n/**\n * Exact versions for Terraform providers used by generated `.tf` modules.\n * Pinned exactly (no range operator) so generated infrastructure is reproducible.\n */\nexport const TERRAFORM_VERSIONS = {\n aws: '6.69.1',\n random: '3.9.1',\n null: '3.3.2',\n archive: '2.8.1',\n external: '2.4.2',\n local: '2.9.1',\n time: '0.14.2',\n} as const;\nexport type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;\n\n/**\n * Substitution variables exposing Terraform provider version constraints to\n * generated `.tf` templates (e.g. `version = \"<%- awsProviderVersion %>\"`)\n */\nexport const terraformProviderVersions = () => ({\n awsProviderVersion: TERRAFORM_VERSIONS.aws,\n randomProviderVersion: TERRAFORM_VERSIONS.random,\n nullProviderVersion: TERRAFORM_VERSIONS.null,\n archiveProviderVersion: TERRAFORM_VERSIONS.archive,\n externalProviderVersion: TERRAFORM_VERSIONS.external,\n localProviderVersion: TERRAFORM_VERSIONS.local,\n timeProviderVersion: TERRAFORM_VERSIONS.time,\n});\n"],"names":["declaredNames","TS_VERSIONS","minimatch","mysql2","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","cn","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","npm","pg","prisma","react","rolldown","shx","tailwindcss","tsx","shadcn","vite","typescript","vitest","jsdom","zod","ws","LOCKSTEP_GROUPS","EXACT_DEPENDENCY_PINS","source","followers","peers","reason","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","pydantic","ruff","ty","pynamodb","uvicorn","sqlmodel","alembic","aiomysql","asyncpg","greenlet","PY_UV_OVERRIDES","withPyVersions","py","declared","kind","names","undeclared","filter","includes","length","Error","join","VENDORED_VERSIONS","JAVA_VERSIONS","JAVA_ARTIFACTS","keys","javaMavenDependency","artifact","MISE_VERSIONS","smithy","MISE_TOOLS","BASE_IMAGES","node","python","CONTAINER_VERSIONS","trivy","CONTAINER_REPOSITORIES","containerImage","tool","LAMBDA_RUNTIME_VERSIONS","AGENT_CORE_RUNTIME_VERSIONS","agentCoreRuntime","runtime","replace","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","cdkLambdaRuntime","cdkLambdaRuntimeVars","nodeRuntime","pythonRuntime","terraformLambdaRuntimeVars","TERRAFORM_VERSIONS","aws","random","null","archive","external","local","time","terraformProviderVersions","awsProviderVersion","randomProviderVersion","nullProviderVersion","archiveProviderVersion","externalProviderVersion","localProviderVersion","timeProviderVersion"],"mappings":"AAAA;;;CAGC,GACD,SAIEA,aAAa,QACR,6BAA6B;AAEpC;;CAEC,GACD,OAAO,MAAMC,cAAc;IACzB,eAAe;IACf,0DAA0D;IAC1D,yEAAyE;IACzE,uDAAuD;IACvD,oCAAoC;IACpC,0EAA0E;IAC1E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,kDAAkD;IAClDC,WAAW;IACX,8EAA8E;IAC9E,8EAA8E;IAC9E,yEAAyE;IACzE,8EAA8E;IAC9E,gBAAgB;IA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,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.js';\n\n/**\n * Versons for TypeScript dependencies added by generators\n */\nexport const TS_VERSIONS = {\n '@a2a-js/sdk': '0.3.14',\n '@aws/aws-distro-opentelemetry-node-autoinstrumentation': '0.13.0',\n // Pinned above the version the ADOT autoinstrumentation package resolves\n // transitively (2.8.0) to clear CVE-2026-59892 (HIGH).\n '@opentelemetry/propagator-jaeger': '2.12.0',\n // Overridden in the vended agent/MCP image builds to clear CVE-2026-14257\n // (HIGH) in brace-expansion: minimatch 10 is the lowest major depending on\n // brace-expansion 5.x, the only line Trivy's `< 5.0.8` advisory range treats\n // as fixed. Overriding brace-expansion directly is not viable — 5.x drops the\n // CommonJS default export that minimatch 9 calls.\n minimatch: '10.2.6',\n // Both overridden in the vended RDB migration image build, which installs the\n // prisma CLI to run migrations: its own ranges resolve deepmerge-ts below the\n // CVE-2026-40345 fix (HIGH) and mysql2 below the GHSA-3f6p-5ww8-9rcr fix\n // (HIGH). Neither is imported by the handler, which drives the schema engine.\n 'deepmerge-ts': '8.0.2',\n mysql2: '3.24.6',\n '@aws-sdk/client-dynamodb': '3.1152.0',\n '@aws-sdk/client-api-gateway': '3.1152.0',\n '@aws-sdk/client-iam': '3.1152.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1152.0',\n '@aws-sdk/client-bedrock-runtime': '3.1152.0',\n '@aws-sdk/client-greengrassv2': '3.1152.0',\n '@aws-sdk/client-s3': '3.1152.0',\n '@aws-sdk/client-sts': '3.1152.0',\n '@aws-sdk/client-cognito-identity-provider': '3.1152.0',\n '@aws-sdk/credential-providers': '3.1152.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.73',\n '@aws-sdk/client-secrets-manager': '3.1152.0',\n '@aws-sdk/rds-signer': '3.1152.0',\n '@smithy/server-apigateway': '0.3.4',\n '@smithy/server-node': '0.3.4',\n '@aws-lambda-powertools/logger': '2.36.0',\n '@aws-lambda-powertools/metrics': '2.36.0',\n '@aws-lambda-powertools/parameters': '2.36.0',\n '@aws-lambda-powertools/tracer': '2.36.0',\n '@aws-lambda-powertools/parser': '2.36.0',\n '@aws-sdk/client-appconfigdata': '3.1152.0',\n '@middy/core': '7.9.2',\n '@nxlv/python': '23.2.1',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.3.0',\n '@nx/devkit': '23.3.0',\n '@nx/js': '23.3.0',\n '@nx/react': '23.3.0',\n '@nx/vite': '23.3.0',\n '@nx/vitest': '23.3.0',\n '@nx/workspace': '23.3.0',\n 'create-nx-workspace': '23.3.0',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.18',\n '@modelcontextprotocol/sdk': '1.32.1',\n '@modelcontextprotocol/client': '2.3.1',\n '@modelcontextprotocol/inspector': '2.11.0',\n '@ag-ui/a2ui-toolkit': '0.0.5',\n '@ag-ui/aws-strands': '1.0.0',\n '@ag-ui/client': '1.0.2',\n '@ag-ui/core': '1.0.2',\n '@ag-ui/encoder': '1.0.2',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.79.1',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.21.0',\n '@tanstack/react-router': '1.170.45',\n '@tanstack/router-plugin': '1.168.47',\n '@tanstack/router-generator': '1.167.45',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.4',\n '@cloudscape-design/board-components': '3.0.238',\n '@cloudscape-design/chat-components': '1.0.179',\n '@cloudscape-design/components': '3.0.1401',\n '@cloudscape-design/global-styles': '1.0.71',\n '@tanstack/react-query': '5.104.4',\n '@tanstack/react-query-devtools': '5.104.4',\n '@trpc/tanstack-react-query': '11.19.0',\n '@trpc/client': '11.19.0',\n '@trpc/server': '11.19.0',\n '@types/node': '26.6.5',\n '@types/aws-lambda': '8.10.164',\n '@types/cors': '2.8.19',\n '@types/js-yaml': '4.0.9',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.2',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.7.2',\n '@smithy/node-config-provider': '4.6.2',\n '@smithy/node-http-handler': '4.12.1',\n '@smithy/types': '4.19.0',\n '@vitest/coverage-v8': '5.0.4',\n '@vitest/ui': '5.0.4',\n '@astrojs/react': '6.0.6',\n '@astrojs/starlight': '0.42.6',\n astro: '7.4.0',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1145.0',\n 'aws-cdk-lib': '2.273.0',\n 'aws-iot-device-sdk-v2': '1.28.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.1',\n 'class-variance-authority': '0.7.1',\n cn: '0.5.0',\n commander: '15.0.0',\n electrodb: '3.9.3',\n esbuild: '0.28.2',\n 'event-source-polyfill': '1.0.31',\n '@types/event-source-polyfill': '1.0.5',\n '@biomejs/biome': '2.5.15',\n '@prisma/adapter-mariadb': '7.10.1',\n '@prisma/adapter-pg': '7.10.1',\n '@prisma/client': '7.10.1',\n ejs: '6.0.1',\n '@types/ejs': '3.1.5',\n express: '5.3.0',\n 'fast-glob': '3.3.3',\n husky: '9.1.7',\n 'fs-extra': '11.4.1',\n '@types/fs-extra': '11.0.4',\n 'js-yaml': '4.3.2',\n mariadb: '3.5.4',\n mise: '2026.10.14',\n npm: '12.2.1',\n 'npm-check-updates': '23.1.1',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.1',\n prisma: '7.10.1',\n 'react-oidc-context': '3.3.1',\n react: '19.3.1',\n 'react-dom': '19.3.1',\n rolldown: '1.2.14',\n 'rolldown-plugin-dts': '0.28.8',\n shx: '0.4.0',\n 'simple-git': '4.0.2',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.30.2',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.15',\n 'lucide-react': '1.59.0',\n 'radix-ui': '1.8.1',\n shadcn: '4.22.1',\n 'tw-animate-css': '1.4.0',\n vite: '8.3.4',\n typescript: '6.0.3',\n vitest: '5.0.4',\n // The `testEnvironment` @nx/vitest writes into every generated config.\n jsdom: '29.1.1',\n zod: '4.6.7',\n ws: '8.22.0',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\n\n/**\n * Dependencies that must move as a unit, held at the lowest version proposed\n * across each group by the version update. Members must share a version line.\n *\n * The wasm formatter bindings are dependencies of this repo rather than vended\n * pins, so they are named here but versioned in the manifests.\n */\nexport const LOCKSTEP_GROUPS = [\n // A duplicate `@ag-ui/client` fails every generated website with TS2322.\n ['@ag-ui/client', '@ag-ui/core', '@ag-ui/encoder'],\n // The wasm bindings format generated files; the CLI checks them.\n ['@biomejs/wasm-nodejs', '@biomejs/biome'],\n ['@astral-sh/ruff-wasm-nodejs', 'ruff'],\n // vitest pins its coverage provider and UI at its own exact version.\n ['vitest', '@vitest/coverage-v8', '@vitest/ui'],\n] as const satisfies readonly (readonly [string, string, ...string[]])[];\n\n/**\n * Pins the version update sets to the exact `dependencies` of another vended\n * package, as published for the version of it being written. Followers' lockstep\n * group mates move with them. If a peer's published `peerDependencies` reject the\n * result, or a manifest can't be read, all of these pins stay where they are.\n *\n * Use this rather than a lockstep group when the packages don't share a version\n * line.\n */\nexport const EXACT_DEPENDENCY_PINS = [\n {\n source: '@copilotkit/react-core',\n followers: ['@ag-ui/client', '@ag-ui/core'],\n peers: ['@ag-ui/aws-strands', '@ag-ui/a2ui-toolkit'],\n reason:\n 'a second @ag-ui/client copy fails every generated website with TS2322',\n },\n] as const satisfies readonly {\n source: ITsDepVersion;\n followers: readonly [ITsDepVersion, ...ITsDepVersion[]];\n peers: readonly ITsDepVersion[];\n reason: string;\n}[];\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.47',\n 'ag-ui-protocol': '==0.1.22',\n 'ag-ui-strands': '==0.4.1',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.36.0',\n 'aws-lambda-powertools[tracer]': '==3.36.0',\n 'aws-lambda-powertools[parser]': '==3.36.0',\n 'aws-opentelemetry-distro': '==0.21.0',\n awsiotsdk: '==1.31.0',\n 'bedrock-agentcore': '==1.24.2',\n boto3: '==1.43.115',\n checkov: '==3.3.29',\n fastapi: '==0.150.0',\n 'fastapi[standard]': '==0.150.0',\n httpx: '==0.28.1',\n langchain: '==1.4.6',\n 'langchain-aws': '==1.9.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.16',\n 'langgraph-checkpoint-aws': '==1.2.5',\n 'langgraph-checkpoint-sqlite': '==3.1.2',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n pydantic: '==2.14.1',\n ruff: '==0.17.1',\n 'strands-agents': '==1.61.1',\n 'strands-agents[a2a]': '==1.61.1',\n 'strands-agents-tools': '==0.8.9',\n ty: '==0.0.89',\n pynamodb: '==6.1.0',\n uvicorn: '==0.54.0',\n sqlmodel: '==0.0.48',\n alembic: '==1.20.0',\n aiomysql: '==0.3.2',\n asyncpg: '==0.32.0',\n // Pinned explicitly: SQLAlchemy's async engine pulls greenlet transitively,\n // and leaving it unpinned lets uv resolve to a just-released version whose\n // platform wheels may not all be published yet (breaking aarch64 installs).\n greenlet: '==3.5.6',\n} as const;\nexport type IPyDepVersion = keyof typeof PY_VERSIONS;\n\n/**\n * Entries for the workspace root `[tool.uv] override-dependencies`, keyed by\n * the vended package whose own requirement they override. They are written\n * whenever a project depends on the key.\n */\nexport const PY_UV_OVERRIDES = {\n // strands-agents-tools caps pillow below 13.0.0, the release that fixes\n // CVE-2026-112403 and other pillow CVEs. Remove this entry when the\n // strands-agents-tools pin moves to a release that allows pillow 13\n // (strands-agents/tools#626).\n 'strands-agents-tools': ['pillow>=13.0.0'],\n} as const satisfies Partial<Record<IPyDepVersion, readonly string[]>>;\n\n/**\n * Add versions to the given dependencies\n */\nexport const withPyVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredPy<D>[],\n): string[] => {\n assertDeclared(declaration.py, deps, 'py');\n return deps.map((dep) => `${dep}${PY_VERSIONS[dep as IPyDepVersion]}`);\n};\n\n/** Catches undeclared packages that reach here past the type checker. */\nconst assertDeclared = (\n declared: readonly { readonly name: string }[],\n deps: readonly unknown[],\n kind: 'ts' | 'py',\n): void => {\n const names = declaredNames(declared);\n const undeclared = deps.filter((dep) => !names.includes(dep as string));\n if (undeclared.length > 0) {\n throw new Error(\n `Undeclared ${kind} dependencies: ${undeclared.join(', ')}. Add them to the generator's declareDependencies({ ${kind}: [...] }).`,\n );\n }\n};\n\n/**\n * Versions for vendored tools\n */\nexport const VENDORED_VERSIONS = {\n 'git-secrets': '1.3.0',\n} as const;\n\n/**\n * Versions of Java dependencies added by generators, keyed by Maven coordinate.\n *\n * Every entry is resolved from Maven Central by the version update and named\n * `<group>:<artifact>:<version>` where a generator writes it.\n */\nexport const JAVA_VERSIONS = {\n 'software.amazon.smithy:smithy-model': '1.74.1',\n 'software.amazon.smithy:smithy-aws-traits': '1.74.1',\n 'software.amazon.smithy:smithy-validation-model': '1.74.1',\n 'software.amazon.smithy:smithy-openapi': '1.74.1',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.54.0',\n} as const;\nexport type IJavaVersion = keyof typeof JAVA_VERSIONS;\n\n/** The Maven coordinates the version update resolves, in declaration order. */\nexport const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS) as IJavaVersion[];\n\n/** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */\nexport const javaMavenDependency = (artifact: IJavaVersion): string =>\n `${artifact}:${JAVA_VERSIONS[artifact]}`;\n\n/**\n * Versions of tools resolved by mise, keyed by the tool name mise knows.\n *\n * Every entry is checked with `mise latest <tool>` by the version update. Nothing\n * is installed into the workspace: the pin travels in the `project.json` target\n * command, which is what the version sync reaches to move it forward.\n */\nexport const MISE_VERSIONS = {\n smithy: '1.74.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 * The managed Lambda runtimes generated infrastructure targets, as the single\n * source both IaC providers derive from.\n *\n * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`\n * against `nodejs24.x` — so deriving both from the version here keeps a bump one\n * edit that moves them together. Resolved by the version update workflow.\n */\nexport const LAMBDA_RUNTIME_VERSIONS = {\n node: '24',\n python: '3.14',\n} as const;\nexport type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;\n\n/**\n * The managed AgentCore Runtime runtimes generated infrastructure targets, for\n * agents and MCP servers packaged as code rather than as a container image.\n *\n * Tracked separately from {@link LAMBDA_RUNTIME_VERSIONS}: AgentCore publishes\n * its own, smaller set, so a Lambda bump would otherwise move these to a runtime\n * AgentCore rejects at create time. Resolved by the version update workflow from\n * the `AgentCoreRuntime` members `aws-cdk-lib` publishes, the same source the\n * Lambda runtimes come from.\n */\nexport const AGENT_CORE_RUNTIME_VERSIONS = {\n node: '22',\n python: '3.14',\n} as const;\nexport type IAgentCoreRuntime = keyof typeof AGENT_CORE_RUNTIME_VERSIONS;\n\n/**\n * The runtime as AgentCore's `runtime` field names it, e.g. `NODE_22` or\n * `PYTHON_3_14`.\n */\nexport const agentCoreRuntime = (runtime: IAgentCoreRuntime): string =>\n runtime === 'node'\n ? `NODE_${AGENT_CORE_RUNTIME_VERSIONS.node}`\n : `PYTHON_${AGENT_CORE_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * The interpreter uv pins for a generated Python project, as the Lambda runtime's\n * `major.minor`.\n *\n * No patch: uv reads this as a request for any patch of that minor, so it resolves\n * whichever one the platform has a build for. Naming an exact patch pins one that\n * may not exist everywhere, and Lambda patches the interpreter itself, so the minor\n * is the whole of what a project needs to agree on.\n */\nexport const pyenvPythonVersion = (): string => LAMBDA_RUNTIME_VERSIONS.python;\n\n/**\n * The `[project].requires-python` specifier for a generated Python project.\n *\n * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter\n * is that version, and Ruff derives its `target-version` from this (`py314`), so\n * lint targets the same version the function runs on.\n */\nexport const pyprojectPythonDependency = (): string =>\n `>=${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */\nexport const terraformLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x`\n : `python${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/**\n * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.\n * Always an explicitly versioned member, never a `_LATEST` alias.\n */\nexport const cdkLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X`\n : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * Substitution variables exposing the pinned runtimes to generated CDK\n * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with\n * {@link terraformLambdaRuntimeVars}, which names the same variables so a\n * template reads alike under either provider.\n */\nexport const cdkLambdaRuntimeVars = () => ({\n nodeRuntime: cdkLambdaRuntime('node'),\n pythonRuntime: cdkLambdaRuntime('python'),\n});\n\n/**\n * Substitution variables exposing the pinned runtimes to generated `.tf`\n * templates (e.g. `runtime = \"<%- nodeRuntime %>\"`).\n */\nexport const terraformLambdaRuntimeVars = () => ({\n nodeRuntime: terraformLambdaRuntime('node'),\n pythonRuntime: terraformLambdaRuntime('python'),\n});\n\n/**\n * Exact versions for Terraform providers used by generated `.tf` modules.\n * Pinned exactly (no range operator) so generated infrastructure is reproducible.\n */\nexport const TERRAFORM_VERSIONS = {\n aws: '6.69.1',\n awscc: '1.100.0',\n random: '3.9.1',\n null: '3.3.2',\n archive: '2.8.1',\n external: '2.4.2',\n local: '2.9.1',\n time: '0.14.2',\n} as const;\nexport type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;\n\n/**\n * Substitution variables exposing Terraform provider version constraints to\n * generated `.tf` templates (e.g. `version = \"<%- awsProviderVersion %>\"`)\n */\nexport const terraformProviderVersions = () => ({\n awsProviderVersion: TERRAFORM_VERSIONS.aws,\n awsccProviderVersion: TERRAFORM_VERSIONS.awscc,\n randomProviderVersion: TERRAFORM_VERSIONS.random,\n nullProviderVersion: TERRAFORM_VERSIONS.null,\n archiveProviderVersion: TERRAFORM_VERSIONS.archive,\n externalProviderVersion: TERRAFORM_VERSIONS.external,\n localProviderVersion: TERRAFORM_VERSIONS.local,\n timeProviderVersion: TERRAFORM_VERSIONS.time,\n});\n"],"names":["declaredNames","TS_VERSIONS","minimatch","mysql2","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","cn","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","npm","pg","prisma","react","rolldown","shx","tailwindcss","tsx","shadcn","vite","typescript","vitest","jsdom","zod","ws","LOCKSTEP_GROUPS","EXACT_DEPENDENCY_PINS","source","followers","peers","reason","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","awsiotsdk","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","pydantic","ruff","ty","pynamodb","uvicorn","sqlmodel","alembic","aiomysql","asyncpg","greenlet","PY_UV_OVERRIDES","withPyVersions","py","declared","kind","names","undeclared","filter","includes","length","Error","join","VENDORED_VERSIONS","JAVA_VERSIONS","JAVA_ARTIFACTS","keys","javaMavenDependency","artifact","MISE_VERSIONS","smithy","MISE_TOOLS","BASE_IMAGES","node","python","CONTAINER_VERSIONS","trivy","CONTAINER_REPOSITORIES","containerImage","tool","LAMBDA_RUNTIME_VERSIONS","AGENT_CORE_RUNTIME_VERSIONS","agentCoreRuntime","runtime","replace","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","cdkLambdaRuntime","cdkLambdaRuntimeVars","nodeRuntime","pythonRuntime","terraformLambdaRuntimeVars","TERRAFORM_VERSIONS","aws","awscc","random","null","archive","external","local","time","terraformProviderVersions","awsProviderVersion","awsccProviderVersion","randomProviderVersion","nullProviderVersion","archiveProviderVersion","externalProviderVersion","localProviderVersion","timeProviderVersion"],"mappings":"AAAA;;;CAGC,GACD,SAIEA,aAAa,QACR,6BAA6B;AAEpC;;CAEC,GACD,OAAO,MAAMC,cAAc;IACzB,eAAe;IACf,0DAA0D;IAC1D,yEAAyE;IACzE,uDAAuD;IACvD,oCAAoC;IACpC,0EAA0E;IAC1E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,kDAAkD;IAClDC,WAAW;IACX,8EAA8E;IAC9E,8EAA8E;IAC9E,yEAAyE;IACzE,8EAA8E;IAC9E,gBAAgB;IAChBC,QAAQ;IACR,4BAA4B;IAC5B,+BAA+B;IAC/B,uBAAuB;IACvB,qCAAqC;IACrC,mCAAmC;IACnC,gCAAgC;IAChC,sBAAsB;IACtB,uBAAuB;IACvB,6CAA6C;IAC7C,iCAAiC;IACjC,iDAAiD;IACjD,mCAAmC;IACnC,uBAAuB;IACvB,6BAA6B;IAC7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