@aws/nx-plugin 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/migrations.json +7 -2
- package/package.json +1 -1
- package/src/migrations/latest/py-dynamodb-bind-base-model-meta/metadata.json +3 -0
- package/src/migrations/latest/py-dynamodb-bind-base-model-meta/migration.d.ts +6 -0
- package/src/migrations/latest/py-dynamodb-bind-base-model-meta/migration.js +56 -0
- package/src/migrations/latest/py-dynamodb-bind-base-model-meta/migration.js.map +1 -0
- package/src/migrations/latest/py-dynamodb-type-base-model-meta/metadata.json +1 -1
- package/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.d.ts +1 -1
- package/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.js +21 -54
- package/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.js.map +1 -1
- package/src/open-api/py-client/files/shared/errors.py.template +3 -5
- package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +6 -2
- package/src/py/dynamodb/base-model-meta.d.ts +39 -0
- package/src/py/dynamodb/base-model-meta.js +54 -0
- package/src/py/dynamodb/base-model-meta.js.map +1 -0
- package/src/py/dynamodb/files/__name__/entities/base.py.template +3 -1
- package/src/utils/version-lockstep/hold.d.ts +26 -0
- package/src/utils/version-lockstep/hold.js +33 -0
- package/src/utils/version-lockstep/hold.js.map +1 -0
- package/src/utils/versions.d.ts +1 -1
- package/src/utils/versions.js +1 -1
- package/src/utils/versions.js.map +1 -1
package/migrations.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"latest-py-dynamodb-type-base-model-meta": {
|
|
21
21
|
"version": "1.0.8",
|
|
22
|
-
"description": "Declare the py#dynamodb BaseModel Meta
|
|
22
|
+
"description": "Declare the py#dynamodb BaseModel Meta as a subclass of pynamodb's MetaProtocol bound with the inherited MetaProtocol type, so the generated project type checks with ty 0.0.86 and 0.0.87",
|
|
23
23
|
"implementation": "./src/migrations/latest/py-dynamodb-type-base-model-meta/migration"
|
|
24
24
|
},
|
|
25
25
|
"latest-cache-inputs-outputs": {
|
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
"description": "Keep checkov reports and vitest coverage out of downstream task hashes, declare Smithy build inputs, cache ts#rdb Prisma client generation and stop caching Terraform output",
|
|
28
28
|
"implementation": "./src/migrations/latest/cache-inputs-outputs/migration"
|
|
29
29
|
},
|
|
30
|
+
"latest-py-dynamodb-bind-base-model-meta": {
|
|
31
|
+
"version": "1.0.9",
|
|
32
|
+
"description": "Bind the py#dynamodb BaseModel Meta that 1.0.8 declared as a nested MetaProtocol subclass with the inherited MetaProtocol type, so the generated project type checks with ty 0.0.87",
|
|
33
|
+
"implementation": "./src/migrations/latest/py-dynamodb-bind-base-model-meta/migration"
|
|
34
|
+
},
|
|
30
35
|
"v1.0.0-rc.50-0001-modernize-function-props-cast": {
|
|
31
36
|
"version": "1.0.0-rc.50",
|
|
32
37
|
"description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
|
|
@@ -408,7 +413,7 @@
|
|
|
408
413
|
"implementation": "./src/migrations/v1.0.5/0001-api-custom-domain-runtime-config/migration"
|
|
409
414
|
},
|
|
410
415
|
"sync-vended-versions": {
|
|
411
|
-
"version": "1.0.
|
|
416
|
+
"version": "1.0.9",
|
|
412
417
|
"description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
|
|
413
418
|
"implementation": "./src/utils/version-upgrade-migration/migration"
|
|
414
419
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { bindMetaBlock, divergedMetaNextStep, findMetaBlockShape, META_BINDING, NESTED_PROTOCOL_META_HEADER, pyDynamoDbBasePyPaths, TYPED_IMPORT, UNTYPED_IMPORT, UNTYPED_META_HEADER } from "../../../py/dynamodb/base-model-meta.js";
|
|
5
|
+
import { formatFilesInSubtree } from "../../../utils/format.js";
|
|
6
|
+
/**
|
|
7
|
+
* Bind the `Meta` of the `BaseModel` that py#dynamodb vends in
|
|
8
|
+
* `<module>/entities/base.py` with pynamodb's declared `MetaProtocol` type.
|
|
9
|
+
*
|
|
10
|
+
* Release 1.0.8 vends, and its `py-dynamodb-type-base-model-meta` migration
|
|
11
|
+
* writes, a nested `class Meta(MetaProtocol):`. pynamodb declares
|
|
12
|
+
* `Model.Meta: MetaProtocol`, a mutable attribute, and the nested class
|
|
13
|
+
* narrows it to the class's own type, which ty 0.0.87 reports as
|
|
14
|
+
* `invalid-mutable-override`. This declares the block as
|
|
15
|
+
* `class _Meta(MetaProtocol):` and binds it with `Meta: MetaProtocol = _Meta`.
|
|
16
|
+
* `Meta` is the same class object, so pynamodb's runtime defaults apply as
|
|
17
|
+
* before.
|
|
18
|
+
*
|
|
19
|
+
* A base.py is edited only where its import line and `Meta` block still have
|
|
20
|
+
* the exact shape the generator wrote. One already bound is left alone, as is
|
|
21
|
+
* an untyped `class Meta:` in the generated shape, which
|
|
22
|
+
* `py-dynamodb-type-base-model-meta` converges on the bound shape before this
|
|
23
|
+
* runs. Any other base.py is left untouched and reported via `nextSteps`.
|
|
24
|
+
*/ /**
|
|
25
|
+
* Rewrite a base.py still in the 1.0.8 shape. Already bound, untyped and
|
|
26
|
+
* missing files are left alone; a diverged one is reported via nextSteps.
|
|
27
|
+
*/ const migrateBasePy = (tree, filePath, nextSteps)=>{
|
|
28
|
+
if (!tree.exists(filePath)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const content = tree.read(filePath, 'utf-8') ?? '';
|
|
32
|
+
if (content.includes(META_BINDING)) {
|
|
33
|
+
return; // Already migrated (or user-added).
|
|
34
|
+
}
|
|
35
|
+
if (content.includes(UNTYPED_IMPORT) && findMetaBlockShape(content, UNTYPED_META_HEADER)) {
|
|
36
|
+
return; // Left to py-dynamodb-type-base-model-meta.
|
|
37
|
+
}
|
|
38
|
+
const shape = findMetaBlockShape(content, NESTED_PROTOCOL_META_HEADER);
|
|
39
|
+
if (!shape || !content.includes(TYPED_IMPORT)) {
|
|
40
|
+
nextSteps.push(divergedMetaNextStep(filePath));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
tree.write(filePath, bindMetaBlock(content, NESTED_PROTOCOL_META_HEADER, shape));
|
|
44
|
+
};
|
|
45
|
+
export default async function migration(tree) {
|
|
46
|
+
const nextSteps = [];
|
|
47
|
+
for (const filePath of pyDynamoDbBasePyPaths(tree)){
|
|
48
|
+
migrateBasePy(tree, filePath, nextSteps);
|
|
49
|
+
}
|
|
50
|
+
await formatFilesInSubtree(tree);
|
|
51
|
+
return {
|
|
52
|
+
nextSteps
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=migration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/py-dynamodb-bind-base-model-meta/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { MigrationReturnObject, Tree } from '@nx/devkit';\nimport {\n bindMetaBlock,\n divergedMetaNextStep,\n findMetaBlockShape,\n META_BINDING,\n NESTED_PROTOCOL_META_HEADER,\n pyDynamoDbBasePyPaths,\n TYPED_IMPORT,\n UNTYPED_IMPORT,\n UNTYPED_META_HEADER,\n} from '../../../py/dynamodb/base-model-meta.js';\nimport { formatFilesInSubtree } from '../../../utils/format.js';\n\n/**\n * Bind the `Meta` of the `BaseModel` that py#dynamodb vends in\n * `<module>/entities/base.py` with pynamodb's declared `MetaProtocol` type.\n *\n * Release 1.0.8 vends, and its `py-dynamodb-type-base-model-meta` migration\n * writes, a nested `class Meta(MetaProtocol):`. pynamodb declares\n * `Model.Meta: MetaProtocol`, a mutable attribute, and the nested class\n * narrows it to the class's own type, which ty 0.0.87 reports as\n * `invalid-mutable-override`. This declares the block as\n * `class _Meta(MetaProtocol):` and binds it with `Meta: MetaProtocol = _Meta`.\n * `Meta` is the same class object, so pynamodb's runtime defaults apply as\n * before.\n *\n * A base.py is edited only where its import line and `Meta` block still have\n * the exact shape the generator wrote. One already bound is left alone, as is\n * an untyped `class Meta:` in the generated shape, which\n * `py-dynamodb-type-base-model-meta` converges on the bound shape before this\n * runs. Any other base.py is left untouched and reported via `nextSteps`.\n */\n\n/**\n * Rewrite a base.py still in the 1.0.8 shape. Already bound, untyped and\n * missing files are left alone; a diverged one is reported via nextSteps.\n */\nconst migrateBasePy = (\n tree: Tree,\n filePath: string,\n nextSteps: string[],\n): void => {\n if (!tree.exists(filePath)) {\n return;\n }\n\n const content = tree.read(filePath, 'utf-8') ?? '';\n if (content.includes(META_BINDING)) {\n return; // Already migrated (or user-added).\n }\n\n if (\n content.includes(UNTYPED_IMPORT) &&\n findMetaBlockShape(content, UNTYPED_META_HEADER)\n ) {\n return; // Left to py-dynamodb-type-base-model-meta.\n }\n\n const shape = findMetaBlockShape(content, NESTED_PROTOCOL_META_HEADER);\n if (!shape || !content.includes(TYPED_IMPORT)) {\n nextSteps.push(divergedMetaNextStep(filePath));\n return;\n }\n\n tree.write(\n filePath,\n bindMetaBlock(content, NESTED_PROTOCOL_META_HEADER, shape),\n );\n};\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n for (const filePath of pyDynamoDbBasePyPaths(tree)) {\n migrateBasePy(tree, filePath, nextSteps);\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["bindMetaBlock","divergedMetaNextStep","findMetaBlockShape","META_BINDING","NESTED_PROTOCOL_META_HEADER","pyDynamoDbBasePyPaths","TYPED_IMPORT","UNTYPED_IMPORT","UNTYPED_META_HEADER","formatFilesInSubtree","migrateBasePy","tree","filePath","nextSteps","exists","content","read","includes","shape","push","write","migration"],"mappings":"AAAA;;;CAGC,GAED,SACEA,aAAa,EACbC,oBAAoB,EACpBC,kBAAkB,EAClBC,YAAY,EACZC,2BAA2B,EAC3BC,qBAAqB,EACrBC,YAAY,EACZC,cAAc,EACdC,mBAAmB,QACd,0CAA0C;AACjD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;;;;;;;;;;;CAkBC,GAED;;;CAGC,GACD,MAAMC,gBAAgB,CACpBC,MACAC,UACAC;IAEA,IAAI,CAACF,KAAKG,MAAM,CAACF,WAAW;QAC1B;IACF;IAEA,MAAMG,UAAUJ,KAAKK,IAAI,CAACJ,UAAU,YAAY;IAChD,IAAIG,QAAQE,QAAQ,CAACd,eAAe;QAClC,QAAQ,oCAAoC;IAC9C;IAEA,IACEY,QAAQE,QAAQ,CAACV,mBACjBL,mBAAmBa,SAASP,sBAC5B;QACA,QAAQ,4CAA4C;IACtD;IAEA,MAAMU,QAAQhB,mBAAmBa,SAASX;IAC1C,IAAI,CAACc,SAAS,CAACH,QAAQE,QAAQ,CAACX,eAAe;QAC7CO,UAAUM,IAAI,CAAClB,qBAAqBW;QACpC;IACF;IAEAD,KAAKS,KAAK,CACRR,UACAZ,cAAce,SAASX,6BAA6Bc;AAExD;AAEA,eAAe,eAAeG,UAC5BV,IAAU;IAEV,MAAME,YAAsB,EAAE;IAE9B,KAAK,MAAMD,YAAYP,sBAAsBM,MAAO;QAClDD,cAAcC,MAAMC,UAAUC;IAChC;IAEA,MAAMJ,qBAAqBE;IAE3B,OAAO;QAAEE;IAAU;AACrB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "Declare the py#dynamodb BaseModel Meta
|
|
2
|
+
"description": "Declare the py#dynamodb BaseModel Meta as a subclass of pynamodb's MetaProtocol bound with the inherited MetaProtocol type, so the generated project type checks with ty 0.0.86 and 0.0.87"
|
|
3
3
|
}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import type { MigrationReturnObject, Tree } from '@nx/devkit';
|
|
6
6
|
export default function migration(tree: Tree): Promise<MigrationReturnObject>;
|
|
@@ -1,56 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/ import {
|
|
5
|
-
import { PY_DYNAMODB_GENERATOR_INFO } from "../../../py/dynamodb/generator.js";
|
|
4
|
+
*/ import { bindMetaBlock, divergedMetaNextStep, findMetaBlockShape, META_BINDING, pyDynamoDbBasePyPaths, TYPED_IMPORT, UNTYPED_IMPORT, UNTYPED_META_HEADER } from "../../../py/dynamodb/base-model-meta.js";
|
|
6
5
|
import { formatFilesInSubtree } from "../../../utils/format.js";
|
|
7
6
|
/**
|
|
8
|
-
* Type the `Meta`
|
|
9
|
-
* `<module>/entities/base.py` as
|
|
7
|
+
* Type the `Meta` of the `BaseModel` that py#dynamodb vends in
|
|
8
|
+
* `<module>/entities/base.py` as pynamodb's `MetaProtocol`.
|
|
10
9
|
*
|
|
11
|
-
* pynamodb declares `Model.Meta: MetaProtocol
|
|
12
|
-
* defines only some of the protocol's members,
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
10
|
+
* pynamodb declares `Model.Meta: MetaProtocol`, a mutable attribute. A nested
|
|
11
|
+
* `class Meta:` defines only some of the protocol's members, which ty reports
|
|
12
|
+
* as `invalid-attribute-override`; and any nested `class Meta`, even one
|
|
13
|
+
* subclassing the protocol, declares `Meta` with the narrower type of that
|
|
14
|
+
* class, which ty 0.0.87 reports as `invalid-mutable-override`. So the block is
|
|
15
|
+
* declared as `class _Meta(MetaProtocol):` and bound with
|
|
16
|
+
* `Meta: MetaProtocol = _Meta`, keeping the inherited type. Subclassing the
|
|
17
|
+
* protocol declares every member with the protocol's type; the members it only
|
|
18
|
+
* annotates are not set on the class, so pynamodb's runtime defaults apply as
|
|
19
|
+
* before, and `Meta` is the same class object it was.
|
|
18
20
|
*
|
|
19
21
|
* The generator writes base.py once and keeps the user's copy, so this brings
|
|
20
22
|
* existing workspaces up to date. A base.py is edited only where its import
|
|
21
23
|
* line and `Meta` block still have the exact shape the generator wrote. One
|
|
22
24
|
* that has diverged is left untouched and reported via `nextSteps`.
|
|
23
|
-
*/
|
|
24
|
-
const NEW_IMPORT = '\nfrom pynamodb.models import MetaProtocol, Model\n';
|
|
25
|
-
const OLD_META_HEADER = ' class Meta:\n';
|
|
26
|
-
const NEW_META_HEADER = ' class Meta(MetaProtocol):\n';
|
|
27
|
-
/**
|
|
28
|
-
* The helper the vended `host` line reads the local port through. Workspaces
|
|
29
|
-
* generated before the serve-local -> local-dev rename use `_serve_local`.
|
|
30
|
-
*/ const LOCAL_DEV_HELPERS = [
|
|
31
|
-
'_local_dev',
|
|
32
|
-
'_serve_local'
|
|
33
|
-
];
|
|
34
|
-
/**
|
|
35
|
-
* The quote the block's string literals use: the template's single quotes, or
|
|
36
|
-
* the double quotes `ruff format` rewrites them to.
|
|
37
|
-
*/ const QUOTES = [
|
|
38
|
-
'"',
|
|
39
|
-
"'"
|
|
40
|
-
];
|
|
41
|
-
/** The vended `BaseModel.Meta` block, up to the blank line that ends it. */ const metaBlock = (header, localDevHelper, quote)=>`${header} table_name: str
|
|
42
|
-
region = os.environ.get("AWS_REGION", ${quote}us-east-1${quote})
|
|
43
|
-
host = f"http://localhost:{${localDevHelper}()['port']}" if is_local() else None
|
|
44
|
-
aws_access_key_id = ${quote}UNUSED${quote} if is_local() else None
|
|
45
|
-
aws_secret_access_key = ${quote}UNUSED${quote} if is_local() else None
|
|
46
|
-
|
|
47
|
-
`;
|
|
48
|
-
/** Every shape of the block the generator has written. */ const OLD_META_SHAPES = LOCAL_DEV_HELPERS.flatMap((helper)=>QUOTES.map((quote)=>({
|
|
49
|
-
helper,
|
|
50
|
-
quote
|
|
51
|
-
})));
|
|
52
|
-
const divergedNextStep = (filePath)=>`${filePath}: its BaseModel Meta class or its pynamodb.models import has been customised, so it was left unchanged. If \`ty check\` reports invalid-attribute-override for it, declare it as \`class Meta(MetaProtocol):\`, importing MetaProtocol from pynamodb.models.`;
|
|
53
|
-
/**
|
|
25
|
+
*/ /**
|
|
54
26
|
* Rewrite a base.py still in the generated shape. Already migrated and missing
|
|
55
27
|
* files are left alone; a diverged one is reported via nextSteps.
|
|
56
28
|
*/ const migrateBasePy = (tree, filePath, nextSteps)=>{
|
|
@@ -58,25 +30,20 @@ const divergedNextStep = (filePath)=>`${filePath}: its BaseModel Meta class or i
|
|
|
58
30
|
return;
|
|
59
31
|
}
|
|
60
32
|
const content = tree.read(filePath, 'utf-8') ?? '';
|
|
61
|
-
if (content.includes(
|
|
33
|
+
if (content.includes(META_BINDING)) {
|
|
62
34
|
return; // Already migrated (or user-added).
|
|
63
35
|
}
|
|
64
|
-
const shape =
|
|
65
|
-
if (!shape || !content.includes(
|
|
66
|
-
nextSteps.push(
|
|
36
|
+
const shape = findMetaBlockShape(content, UNTYPED_META_HEADER);
|
|
37
|
+
if (!shape || !content.includes(UNTYPED_IMPORT)) {
|
|
38
|
+
nextSteps.push(divergedMetaNextStep(filePath));
|
|
67
39
|
return;
|
|
68
40
|
}
|
|
69
|
-
tree.write(filePath, content.replace(
|
|
41
|
+
tree.write(filePath, bindMetaBlock(content.replace(UNTYPED_IMPORT, TYPED_IMPORT), UNTYPED_META_HEADER, shape));
|
|
70
42
|
};
|
|
71
43
|
export default async function migration(tree) {
|
|
72
44
|
const nextSteps = [];
|
|
73
|
-
for (const
|
|
74
|
-
|
|
75
|
-
// py#dynamodb writes its package under the project's sourceRoot.
|
|
76
|
-
if (generator !== PY_DYNAMODB_GENERATOR_INFO.id || !project.sourceRoot) {
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
migrateBasePy(tree, joinPathFragments(project.sourceRoot, 'entities', 'base.py'), nextSteps);
|
|
45
|
+
for (const filePath of pyDynamoDbBasePyPaths(tree)){
|
|
46
|
+
migrateBasePy(tree, filePath, nextSteps);
|
|
80
47
|
}
|
|
81
48
|
await formatFilesInSubtree(tree);
|
|
82
49
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport
|
|
1
|
+
{"version":3,"sources":["../../../../../../../packages/nx-plugin/src/migrations/latest/py-dynamodb-type-base-model-meta/migration.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { MigrationReturnObject, Tree } from '@nx/devkit';\nimport {\n bindMetaBlock,\n divergedMetaNextStep,\n findMetaBlockShape,\n META_BINDING,\n pyDynamoDbBasePyPaths,\n TYPED_IMPORT,\n UNTYPED_IMPORT,\n UNTYPED_META_HEADER,\n} from '../../../py/dynamodb/base-model-meta.js';\nimport { formatFilesInSubtree } from '../../../utils/format.js';\n\n/**\n * Type the `Meta` of the `BaseModel` that py#dynamodb vends in\n * `<module>/entities/base.py` as pynamodb's `MetaProtocol`.\n *\n * pynamodb declares `Model.Meta: MetaProtocol`, a mutable attribute. A nested\n * `class Meta:` defines only some of the protocol's members, which ty reports\n * as `invalid-attribute-override`; and any nested `class Meta`, even one\n * subclassing the protocol, declares `Meta` with the narrower type of that\n * class, which ty 0.0.87 reports as `invalid-mutable-override`. So the block is\n * declared as `class _Meta(MetaProtocol):` and bound with\n * `Meta: MetaProtocol = _Meta`, keeping the inherited type. Subclassing the\n * protocol declares every member with the protocol's type; the members it only\n * annotates are not set on the class, so pynamodb's runtime defaults apply as\n * before, and `Meta` is the same class object it was.\n *\n * The generator writes base.py once and keeps the user's copy, so this brings\n * existing workspaces up to date. A base.py is edited only where its import\n * line and `Meta` block still have the exact shape the generator wrote. One\n * that has diverged is left untouched and reported via `nextSteps`.\n */\n\n/**\n * Rewrite a base.py still in the generated shape. Already migrated and missing\n * files are left alone; a diverged one is reported via nextSteps.\n */\nconst migrateBasePy = (\n tree: Tree,\n filePath: string,\n nextSteps: string[],\n): void => {\n if (!tree.exists(filePath)) {\n return;\n }\n\n const content = tree.read(filePath, 'utf-8') ?? '';\n if (content.includes(META_BINDING)) {\n return; // Already migrated (or user-added).\n }\n\n const shape = findMetaBlockShape(content, UNTYPED_META_HEADER);\n if (!shape || !content.includes(UNTYPED_IMPORT)) {\n nextSteps.push(divergedMetaNextStep(filePath));\n return;\n }\n\n tree.write(\n filePath,\n bindMetaBlock(\n content.replace(UNTYPED_IMPORT, TYPED_IMPORT),\n UNTYPED_META_HEADER,\n shape,\n ),\n );\n};\n\nexport default async function migration(\n tree: Tree,\n): Promise<MigrationReturnObject> {\n const nextSteps: string[] = [];\n\n for (const filePath of pyDynamoDbBasePyPaths(tree)) {\n migrateBasePy(tree, filePath, nextSteps);\n }\n\n await formatFilesInSubtree(tree);\n\n return { nextSteps };\n}\n"],"names":["bindMetaBlock","divergedMetaNextStep","findMetaBlockShape","META_BINDING","pyDynamoDbBasePyPaths","TYPED_IMPORT","UNTYPED_IMPORT","UNTYPED_META_HEADER","formatFilesInSubtree","migrateBasePy","tree","filePath","nextSteps","exists","content","read","includes","shape","push","write","replace","migration"],"mappings":"AAAA;;;CAGC,GAED,SACEA,aAAa,EACbC,oBAAoB,EACpBC,kBAAkB,EAClBC,YAAY,EACZC,qBAAqB,EACrBC,YAAY,EACZC,cAAc,EACdC,mBAAmB,QACd,0CAA0C;AACjD,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;;;;;;;;;;;;CAmBC,GAED;;;CAGC,GACD,MAAMC,gBAAgB,CACpBC,MACAC,UACAC;IAEA,IAAI,CAACF,KAAKG,MAAM,CAACF,WAAW;QAC1B;IACF;IAEA,MAAMG,UAAUJ,KAAKK,IAAI,CAACJ,UAAU,YAAY;IAChD,IAAIG,QAAQE,QAAQ,CAACb,eAAe;QAClC,QAAQ,oCAAoC;IAC9C;IAEA,MAAMc,QAAQf,mBAAmBY,SAASP;IAC1C,IAAI,CAACU,SAAS,CAACH,QAAQE,QAAQ,CAACV,iBAAiB;QAC/CM,UAAUM,IAAI,CAACjB,qBAAqBU;QACpC;IACF;IAEAD,KAAKS,KAAK,CACRR,UACAX,cACEc,QAAQM,OAAO,CAACd,gBAAgBD,eAChCE,qBACAU;AAGN;AAEA,eAAe,eAAeI,UAC5BX,IAAU;IAEV,MAAME,YAAsB,EAAE;IAE9B,KAAK,MAAMD,YAAYP,sBAAsBM,MAAO;QAClDD,cAAcC,MAAMC,UAAUC;IAChC;IAEA,MAAMJ,qBAAqBE;IAE3B,OAAO;QAAEE;IAAU;AACrB"}
|
|
@@ -9,7 +9,7 @@ from typing import Any<%- hasNeverErrorType ? ', Never' : '' %>
|
|
|
9
9
|
from . import types
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class ApiError(Exception):
|
|
12
|
+
class ApiError[ErrorT](Exception):
|
|
13
13
|
"""Base class for all API errors.
|
|
14
14
|
|
|
15
15
|
Subclasses are generated per-operation so `error` can be narrowed by the
|
|
@@ -18,7 +18,7 @@ class ApiError(Exception):
|
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
status: int
|
|
21
|
-
error:
|
|
21
|
+
error: ErrorT
|
|
22
22
|
|
|
23
23
|
def __init__(self, status: int, error: Any = None) -> None:
|
|
24
24
|
super().__init__(f"API returned status {status}")
|
|
@@ -30,8 +30,6 @@ class ApiError(Exception):
|
|
|
30
30
|
_%>
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
class <%- shape.exceptionClassName %>(ApiError):
|
|
33
|
+
class <%- shape.exceptionClassName %>(ApiError[<% if (shape.entries.length === 0) { %>Never<% } else { %>types.<%- shape.unionTypeName %><% } %>]):
|
|
34
34
|
"""Raised when `<%- op.operationIdSnakeCase || op.name %>` returns a non-success status."""
|
|
35
|
-
|
|
36
|
-
error: <% if (shape.entries.length === 0) { %>Never<% } else { %>types.<%- shape.unionTypeName %><% } %>
|
|
37
35
|
<%_ }); _%>
|
|
@@ -775,13 +775,15 @@ class BaseModel(Model):
|
|
|
775
775
|
See https://pynamodb.readthedocs.io/en/stable/polymorphism.html
|
|
776
776
|
"""
|
|
777
777
|
|
|
778
|
-
class
|
|
778
|
+
class _Meta(MetaProtocol):
|
|
779
779
|
table_name: str
|
|
780
780
|
region = os.environ.get("AWS_REGION", "us-east-1")
|
|
781
781
|
host = f"http://localhost:{_local_dev()['port']}" if is_local() else None
|
|
782
782
|
aws_access_key_id = "UNUSED" if is_local() else None
|
|
783
783
|
aws_secret_access_key = "UNUSED" if is_local() else None
|
|
784
784
|
|
|
785
|
+
Meta: MetaProtocol = _Meta
|
|
786
|
+
|
|
785
787
|
entity_type = DiscriminatorAttribute()
|
|
786
788
|
|
|
787
789
|
pk = UnicodeAttribute(hash_key=True)
|
|
@@ -1495,13 +1497,15 @@ class BaseModel(Model):
|
|
|
1495
1497
|
See https://pynamodb.readthedocs.io/en/stable/polymorphism.html
|
|
1496
1498
|
"""
|
|
1497
1499
|
|
|
1498
|
-
class
|
|
1500
|
+
class _Meta(MetaProtocol):
|
|
1499
1501
|
table_name: str
|
|
1500
1502
|
region = os.environ.get("AWS_REGION", "us-east-1")
|
|
1501
1503
|
host = f"http://localhost:{_local_dev()['port']}" if is_local() else None
|
|
1502
1504
|
aws_access_key_id = "UNUSED" if is_local() else None
|
|
1503
1505
|
aws_secret_access_key = "UNUSED" if is_local() else None
|
|
1504
1506
|
|
|
1507
|
+
Meta: MetaProtocol = _Meta
|
|
1508
|
+
|
|
1505
1509
|
entity_type = DiscriminatorAttribute()
|
|
1506
1510
|
|
|
1507
1511
|
pk = UnicodeAttribute(hash_key=True)
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* The shapes of the `BaseModel` Meta block py#dynamodb has vended in
|
|
8
|
+
* `<module>/entities/base.py`, shared by the migrations that carry an existing
|
|
9
|
+
* base.py to the shape the generator writes today.
|
|
10
|
+
*/
|
|
11
|
+
/** The pynamodb.models import of a base.py whose Meta is untyped. */
|
|
12
|
+
export declare const UNTYPED_IMPORT = "\nfrom pynamodb.models import Model\n";
|
|
13
|
+
/** The pynamodb.models import of a base.py whose Meta is typed. */
|
|
14
|
+
export declare const TYPED_IMPORT = "\nfrom pynamodb.models import MetaProtocol, Model\n";
|
|
15
|
+
/** A nested Meta that types none of pynamodb's `MetaProtocol` members. */
|
|
16
|
+
export declare const UNTYPED_META_HEADER = " class Meta:\n";
|
|
17
|
+
/** A nested Meta that subclasses `MetaProtocol` but narrows the mutable `Meta`. */
|
|
18
|
+
export declare const NESTED_PROTOCOL_META_HEADER = " class Meta(MetaProtocol):\n";
|
|
19
|
+
/** The block the generator writes today, bound to `Meta` by `META_BINDING`. */
|
|
20
|
+
export declare const BOUND_META_HEADER = " class _Meta(MetaProtocol):\n";
|
|
21
|
+
/** Binds `Meta` to the block while keeping pynamodb's declared type. */
|
|
22
|
+
export declare const META_BINDING = " Meta: MetaProtocol = _Meta\n";
|
|
23
|
+
/** One way the generator has written the block's body. */
|
|
24
|
+
export interface MetaBlockShape {
|
|
25
|
+
readonly helper: string;
|
|
26
|
+
readonly quote: string;
|
|
27
|
+
}
|
|
28
|
+
/** Every shape of the block's body the generator has written. */
|
|
29
|
+
export declare const META_BLOCK_SHAPES: readonly MetaBlockShape[];
|
|
30
|
+
/** The vended `BaseModel` Meta block, up to the blank line that ends it. */
|
|
31
|
+
export declare const metaBlock: (header: string, { helper, quote }: MetaBlockShape, binding?: string) => string;
|
|
32
|
+
/** The shape of `content`'s block under `header`, if it has a vended one. */
|
|
33
|
+
export declare const findMetaBlockShape: (content: string, header: string) => MetaBlockShape | undefined;
|
|
34
|
+
/** Rewrite the vended block under `header` to the shape vended today. */
|
|
35
|
+
export declare const bindMetaBlock: (content: string, header: string, shape: MetaBlockShape) => string;
|
|
36
|
+
/** The nextSteps entry for a base.py whose Meta or import has diverged. */
|
|
37
|
+
export declare const divergedMetaNextStep: (filePath: string) => string;
|
|
38
|
+
/** The base.py path of every py#dynamodb project, whether or not it exists. */
|
|
39
|
+
export declare const pyDynamoDbBasePyPaths: (tree: Tree) => string[];
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { getProjects, joinPathFragments } from "@nx/devkit";
|
|
5
|
+
import { PY_DYNAMODB_GENERATOR_INFO } from "./generator.js";
|
|
6
|
+
/**
|
|
7
|
+
* The shapes of the `BaseModel` Meta block py#dynamodb has vended in
|
|
8
|
+
* `<module>/entities/base.py`, shared by the migrations that carry an existing
|
|
9
|
+
* base.py to the shape the generator writes today.
|
|
10
|
+
*/ /** The pynamodb.models import of a base.py whose Meta is untyped. */ export const UNTYPED_IMPORT = '\nfrom pynamodb.models import Model\n';
|
|
11
|
+
/** The pynamodb.models import of a base.py whose Meta is typed. */ export const TYPED_IMPORT = '\nfrom pynamodb.models import MetaProtocol, Model\n';
|
|
12
|
+
/** A nested Meta that types none of pynamodb's `MetaProtocol` members. */ export const UNTYPED_META_HEADER = ' class Meta:\n';
|
|
13
|
+
/** A nested Meta that subclasses `MetaProtocol` but narrows the mutable `Meta`. */ export const NESTED_PROTOCOL_META_HEADER = ' class Meta(MetaProtocol):\n';
|
|
14
|
+
/** The block the generator writes today, bound to `Meta` by `META_BINDING`. */ export const BOUND_META_HEADER = ' class _Meta(MetaProtocol):\n';
|
|
15
|
+
/** Binds `Meta` to the block while keeping pynamodb's declared type. */ export const META_BINDING = ' Meta: MetaProtocol = _Meta\n';
|
|
16
|
+
/**
|
|
17
|
+
* The helper the vended `host` line reads the local port through. Workspaces
|
|
18
|
+
* generated before the serve-local -> local-dev rename use `_serve_local`.
|
|
19
|
+
*/ const LOCAL_DEV_HELPERS = [
|
|
20
|
+
'_local_dev',
|
|
21
|
+
'_serve_local'
|
|
22
|
+
];
|
|
23
|
+
/**
|
|
24
|
+
* The quote the block's string literals use: the template's single quotes, or
|
|
25
|
+
* the double quotes `ruff format` rewrites them to.
|
|
26
|
+
*/ const QUOTES = [
|
|
27
|
+
'"',
|
|
28
|
+
"'"
|
|
29
|
+
];
|
|
30
|
+
/** Every shape of the block's body the generator has written. */ export const META_BLOCK_SHAPES = LOCAL_DEV_HELPERS.flatMap((helper)=>QUOTES.map((quote)=>({
|
|
31
|
+
helper,
|
|
32
|
+
quote
|
|
33
|
+
})));
|
|
34
|
+
/** The vended `BaseModel` Meta block, up to the blank line that ends it. */ export const metaBlock = (header, { helper, quote }, binding = '')=>`${header} table_name: str
|
|
35
|
+
region = os.environ.get("AWS_REGION", ${quote}us-east-1${quote})
|
|
36
|
+
host = f"http://localhost:{${helper}()['port']}" if is_local() else None
|
|
37
|
+
aws_access_key_id = ${quote}UNUSED${quote} if is_local() else None
|
|
38
|
+
aws_secret_access_key = ${quote}UNUSED${quote} if is_local() else None
|
|
39
|
+
${binding ? `\n${binding}` : ''}
|
|
40
|
+
`;
|
|
41
|
+
/** The shape of `content`'s block under `header`, if it has a vended one. */ export const findMetaBlockShape = (content, header)=>META_BLOCK_SHAPES.find((shape)=>content.includes(metaBlock(header, shape)));
|
|
42
|
+
/** Rewrite the vended block under `header` to the shape vended today. */ export const bindMetaBlock = (content, header, shape)=>content.replace(metaBlock(header, shape), metaBlock(BOUND_META_HEADER, shape, META_BINDING));
|
|
43
|
+
/** The nextSteps entry for a base.py whose Meta or import has diverged. */ export const divergedMetaNextStep = (filePath)=>`${filePath}: its BaseModel Meta class or its pynamodb.models import has been customised, so it was left unchanged. If \`ty check\` reports invalid-attribute-override or invalid-mutable-override for it, declare the class as \`class _Meta(MetaProtocol):\` followed by \`Meta: MetaProtocol = _Meta\`, importing MetaProtocol from pynamodb.models.`;
|
|
44
|
+
/** The base.py path of every py#dynamodb project, whether or not it exists. */ export const pyDynamoDbBasePyPaths = (tree)=>[
|
|
45
|
+
...getProjects(tree).values()
|
|
46
|
+
].flatMap((project)=>{
|
|
47
|
+
const generator = project.metadata?.generator;
|
|
48
|
+
// py#dynamodb writes its package under the project's sourceRoot.
|
|
49
|
+
return generator === PY_DYNAMODB_GENERATOR_INFO.id && project.sourceRoot ? [
|
|
50
|
+
joinPathFragments(project.sourceRoot, 'entities', 'base.py')
|
|
51
|
+
] : [];
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=base-model-meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/nx-plugin/src/py/dynamodb/base-model-meta.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { getProjects, joinPathFragments, type Tree } from '@nx/devkit';\nimport { PY_DYNAMODB_GENERATOR_INFO } from './generator.js';\n\n/**\n * The shapes of the `BaseModel` Meta block py#dynamodb has vended in\n * `<module>/entities/base.py`, shared by the migrations that carry an existing\n * base.py to the shape the generator writes today.\n */\n\n/** The pynamodb.models import of a base.py whose Meta is untyped. */\nexport const UNTYPED_IMPORT = '\\nfrom pynamodb.models import Model\\n';\n\n/** The pynamodb.models import of a base.py whose Meta is typed. */\nexport const TYPED_IMPORT =\n '\\nfrom pynamodb.models import MetaProtocol, Model\\n';\n\n/** A nested Meta that types none of pynamodb's `MetaProtocol` members. */\nexport const UNTYPED_META_HEADER = ' class Meta:\\n';\n\n/** A nested Meta that subclasses `MetaProtocol` but narrows the mutable `Meta`. */\nexport const NESTED_PROTOCOL_META_HEADER = ' class Meta(MetaProtocol):\\n';\n\n/** The block the generator writes today, bound to `Meta` by `META_BINDING`. */\nexport const BOUND_META_HEADER = ' class _Meta(MetaProtocol):\\n';\n\n/** Binds `Meta` to the block while keeping pynamodb's declared type. */\nexport const META_BINDING = ' Meta: MetaProtocol = _Meta\\n';\n\n/**\n * The helper the vended `host` line reads the local port through. Workspaces\n * generated before the serve-local -> local-dev rename use `_serve_local`.\n */\nconst LOCAL_DEV_HELPERS = ['_local_dev', '_serve_local'];\n\n/**\n * The quote the block's string literals use: the template's single quotes, or\n * the double quotes `ruff format` rewrites them to.\n */\nconst QUOTES = ['\"', \"'\"];\n\n/** One way the generator has written the block's body. */\nexport interface MetaBlockShape {\n readonly helper: string;\n readonly quote: string;\n}\n\n/** Every shape of the block's body the generator has written. */\nexport const META_BLOCK_SHAPES: readonly MetaBlockShape[] =\n LOCAL_DEV_HELPERS.flatMap((helper) =>\n QUOTES.map((quote) => ({ helper, quote })),\n );\n\n/** The vended `BaseModel` Meta block, up to the blank line that ends it. */\nexport const metaBlock = (\n header: string,\n { helper, quote }: MetaBlockShape,\n binding = '',\n): string =>\n `${header} table_name: str\n region = os.environ.get(\"AWS_REGION\", ${quote}us-east-1${quote})\n host = f\"http://localhost:{${helper}()['port']}\" if is_local() else None\n aws_access_key_id = ${quote}UNUSED${quote} if is_local() else None\n aws_secret_access_key = ${quote}UNUSED${quote} if is_local() else None\n${binding ? `\\n${binding}` : ''}\n`;\n\n/** The shape of `content`'s block under `header`, if it has a vended one. */\nexport const findMetaBlockShape = (\n content: string,\n header: string,\n): MetaBlockShape | undefined =>\n META_BLOCK_SHAPES.find((shape) => content.includes(metaBlock(header, shape)));\n\n/** Rewrite the vended block under `header` to the shape vended today. */\nexport const bindMetaBlock = (\n content: string,\n header: string,\n shape: MetaBlockShape,\n): string =>\n content.replace(\n metaBlock(header, shape),\n metaBlock(BOUND_META_HEADER, shape, META_BINDING),\n );\n\n/** The nextSteps entry for a base.py whose Meta or import has diverged. */\nexport const divergedMetaNextStep = (filePath: string): string =>\n `${filePath}: its BaseModel Meta class or its pynamodb.models import has been customised, so it was left unchanged. If \\`ty check\\` reports invalid-attribute-override or invalid-mutable-override for it, declare the class as \\`class _Meta(MetaProtocol):\\` followed by \\`Meta: MetaProtocol = _Meta\\`, importing MetaProtocol from pynamodb.models.`;\n\n/** The base.py path of every py#dynamodb project, whether or not it exists. */\nexport const pyDynamoDbBasePyPaths = (tree: Tree): string[] =>\n [...getProjects(tree).values()].flatMap((project) => {\n const generator = (project.metadata as { generator?: string } | undefined)\n ?.generator;\n // py#dynamodb writes its package under the project's sourceRoot.\n return generator === PY_DYNAMODB_GENERATOR_INFO.id && project.sourceRoot\n ? [joinPathFragments(project.sourceRoot, 'entities', 'base.py')]\n : [];\n });\n"],"names":["getProjects","joinPathFragments","PY_DYNAMODB_GENERATOR_INFO","UNTYPED_IMPORT","TYPED_IMPORT","UNTYPED_META_HEADER","NESTED_PROTOCOL_META_HEADER","BOUND_META_HEADER","META_BINDING","LOCAL_DEV_HELPERS","QUOTES","META_BLOCK_SHAPES","flatMap","helper","map","quote","metaBlock","header","binding","findMetaBlockShape","content","find","shape","includes","bindMetaBlock","replace","divergedMetaNextStep","filePath","pyDynamoDbBasePyPaths","tree","values","project","generator","metadata","id","sourceRoot"],"mappings":"AAAA;;;CAGC,GACD,SAASA,WAAW,EAAEC,iBAAiB,QAAmB,aAAa;AACvE,SAASC,0BAA0B,QAAQ,iBAAiB;AAE5D;;;;CAIC,GAED,mEAAmE,GACnE,OAAO,MAAMC,iBAAiB,wCAAwC;AAEtE,iEAAiE,GACjE,OAAO,MAAMC,eACX,sDAAsD;AAExD,wEAAwE,GACxE,OAAO,MAAMC,sBAAsB,oBAAoB;AAEvD,iFAAiF,GACjF,OAAO,MAAMC,8BAA8B,kCAAkC;AAE7E,6EAA6E,GAC7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OAAOA,cAAc9B,2BAA2BgC,EAAE,IAAIH,QAAQI,UAAU,GACpE;YAAClC,kBAAkB8B,QAAQI,UAAU,EAAE,YAAY;SAAW,GAC9D,EAAE;IACR,GAAG"}
|
|
@@ -38,13 +38,15 @@ class BaseModel(Model):
|
|
|
38
38
|
See https://pynamodb.readthedocs.io/en/stable/polymorphism.html
|
|
39
39
|
"""
|
|
40
40
|
|
|
41
|
-
class
|
|
41
|
+
class _Meta(MetaProtocol):
|
|
42
42
|
table_name: str
|
|
43
43
|
region = os.environ.get("AWS_REGION", 'us-east-1')
|
|
44
44
|
host = f"http://localhost:{_local_dev()['port']}" if is_local() else None
|
|
45
45
|
aws_access_key_id = 'UNUSED' if is_local() else None
|
|
46
46
|
aws_secret_access_key = 'UNUSED' if is_local() else None
|
|
47
47
|
|
|
48
|
+
Meta: MetaProtocol = _Meta
|
|
49
|
+
|
|
48
50
|
entity_type = DiscriminatorAttribute()
|
|
49
51
|
|
|
50
52
|
pk = UnicodeAttribute(hash_key=True)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import type { IPyDepVersion } from '../versions.js';
|
|
6
|
+
import type { IVersionedDep, LockstepNote } from './lockstep.js';
|
|
7
|
+
/**
|
|
8
|
+
* A pin the version update must not move, why, and what lets it move again.
|
|
9
|
+
*
|
|
10
|
+
* The npm equivalent is a `reject` entry in `.ncurc.cjs`. pip-check-updates
|
|
11
|
+
* has no exclude option, so Python pins are held here instead.
|
|
12
|
+
*/
|
|
13
|
+
export interface VersionHold<Name extends IVersionedDep = IVersionedDep> {
|
|
14
|
+
name: Name;
|
|
15
|
+
reason: string;
|
|
16
|
+
liftWhen: string;
|
|
17
|
+
}
|
|
18
|
+
/** Python pins the version update keeps at their current version. */
|
|
19
|
+
export declare const PY_VERSION_HOLDS: readonly VersionHold<IPyDepVersion>[];
|
|
20
|
+
/**
|
|
21
|
+
* Put each held pin the run proposed moving back to its current version.
|
|
22
|
+
*
|
|
23
|
+
* Mutates `proposed`, which holds versions not yet written anywhere, and
|
|
24
|
+
* returns a note for each pin it held so the reason reaches the update's PR.
|
|
25
|
+
*/
|
|
26
|
+
export declare const holdPinnedVersions: <Name extends IVersionedDep>(holds: readonly VersionHold<Name>[], current: Readonly<Partial<Record<Name, string>>>, proposed: Partial<Record<Name, string>>) => LockstepNote[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ /** Python pins the version update keeps at their current version. */ export const PY_VERSION_HOLDS = [
|
|
5
|
+
{
|
|
6
|
+
name: 'ty',
|
|
7
|
+
reason: 'ty is 0.x and its releases add diagnostics that fail the vended Python templates',
|
|
8
|
+
liftWhen: 'a newer ty has been checked against all vended Python templates (run the py-client, py#dynamodb and other Python-typecheck specs with it)'
|
|
9
|
+
}
|
|
10
|
+
];
|
|
11
|
+
/**
|
|
12
|
+
* Put each held pin the run proposed moving back to its current version.
|
|
13
|
+
*
|
|
14
|
+
* Mutates `proposed`, which holds versions not yet written anywhere, and
|
|
15
|
+
* returns a note for each pin it held so the reason reaches the update's PR.
|
|
16
|
+
*/ export const holdPinnedVersions = (holds, current, proposed)=>{
|
|
17
|
+
const notes = [];
|
|
18
|
+
for (const { name, reason, liftWhen } of holds){
|
|
19
|
+
const held = current[name];
|
|
20
|
+
const available = proposed[name];
|
|
21
|
+
if (held === undefined || available === undefined || available === held) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
proposed[name] = held;
|
|
25
|
+
notes.push({
|
|
26
|
+
name,
|
|
27
|
+
note: `${name} held at ${held} (${available} available): ${reason}. Lift when ${liftWhen}`
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return notes;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=hold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/nx-plugin/src/utils/version-lockstep/hold.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport type { IPyDepVersion } from '../versions.js';\nimport type { IVersionedDep, LockstepNote } from './lockstep.js';\n\n/**\n * A pin the version update must not move, why, and what lets it move again.\n *\n * The npm equivalent is a `reject` entry in `.ncurc.cjs`. pip-check-updates\n * has no exclude option, so Python pins are held here instead.\n */\nexport interface VersionHold<Name extends IVersionedDep = IVersionedDep> {\n name: Name;\n reason: string;\n liftWhen: string;\n}\n\n/** Python pins the version update keeps at their current version. */\nexport const PY_VERSION_HOLDS: readonly VersionHold<IPyDepVersion>[] = [\n {\n name: 'ty',\n reason:\n 'ty is 0.x and its releases add diagnostics that fail the vended Python templates',\n liftWhen:\n 'a newer ty has been checked against all vended Python templates (run the py-client, py#dynamodb and other Python-typecheck specs with it)',\n },\n];\n\n/**\n * Put each held pin the run proposed moving back to its current version.\n *\n * Mutates `proposed`, which holds versions not yet written anywhere, and\n * returns a note for each pin it held so the reason reaches the update's PR.\n */\nexport const holdPinnedVersions = <Name extends IVersionedDep>(\n holds: readonly VersionHold<Name>[],\n current: Readonly<Partial<Record<Name, string>>>,\n proposed: Partial<Record<Name, string>>,\n): LockstepNote[] => {\n const notes: LockstepNote[] = [];\n\n for (const { name, reason, liftWhen } of holds) {\n const held = current[name];\n const available = proposed[name];\n if (held === undefined || available === undefined || available === held) {\n continue;\n }\n proposed[name] = held;\n notes.push({\n name,\n note: `${name} held at ${held} (${available} available): ${reason}. Lift when ${liftWhen}`,\n });\n }\n\n return notes;\n};\n"],"names":["PY_VERSION_HOLDS","name","reason","liftWhen","holdPinnedVersions","holds","current","proposed","notes","held","available","undefined","push","note"],"mappings":"AAAA;;;CAGC,GAgBD,mEAAmE,GACnE,OAAO,MAAMA,mBAA0D;IACrE;QACEC,MAAM;QACNC,QACE;QACFC,UACE;IACJ;CACD,CAAC;AAEF;;;;;CAKC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,OACAC,SACAC;IAEA,MAAMC,QAAwB,EAAE;IAEhC,KAAK,MAAM,EAAEP,IAAI,EAAEC,MAAM,EAAEC,QAAQ,EAAE,IAAIE,MAAO;QAC9C,MAAMI,OAAOH,OAAO,CAACL,KAAK;QAC1B,MAAMS,YAAYH,QAAQ,CAACN,KAAK;QAChC,IAAIQ,SAASE,aAAaD,cAAcC,aAAaD,cAAcD,MAAM;YACvE;QACF;QACAF,QAAQ,CAACN,KAAK,GAAGQ;QACjBD,MAAMI,IAAI,CAAC;YACTX;YACAY,MAAM,GAAGZ,KAAK,SAAS,EAAEQ,KAAK,EAAE,EAAEC,UAAU,aAAa,EAAER,OAAO,YAAY,EAAEC,UAAU;QAC5F;IACF;IAEA,OAAOK;AACT,EAAE"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export declare const PY_VERSIONS: {
|
|
|
204
204
|
readonly 'strands-agents': "==1.57.2";
|
|
205
205
|
readonly 'strands-agents[a2a]': "==1.57.2";
|
|
206
206
|
readonly 'strands-agents-tools': "==0.8.9";
|
|
207
|
-
readonly ty: "==0.0.
|
|
207
|
+
readonly ty: "==0.0.87";
|
|
208
208
|
readonly pynamodb: "==6.1.0";
|
|
209
209
|
readonly uvicorn: "==0.54.0";
|
|
210
210
|
readonly sqlmodel: "==0.0.47";
|
package/src/utils/versions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type DeclaredPy,\n type DeclaredTs,\n type DependencyDeclaration,\n declaredNames,\n} from './declared-dependencies.js';\n\n/**\n * Versons for TypeScript dependencies added by generators\n */\nexport const TS_VERSIONS = {\n '@a2a-js/sdk': '0.3.14',\n '@aws/aws-distro-opentelemetry-node-autoinstrumentation': '0.13.0',\n // Pinned above the version the ADOT autoinstrumentation package resolves\n // transitively (2.8.0) to clear CVE-2026-59892 (HIGH).\n '@opentelemetry/propagator-jaeger': '2.11.0',\n // Overridden in the vended agent/MCP image builds to clear CVE-2026-14257\n // (HIGH) in brace-expansion: minimatch 10 is the lowest major depending on\n // brace-expansion 5.x, the only line Trivy's `< 5.0.8` advisory range treats\n // as fixed. Overriding brace-expansion directly is not viable — 5.x drops the\n // CommonJS default export that minimatch 9 calls.\n minimatch: '10.2.6',\n // Both overridden in the vended RDB migration image build, which installs the\n // prisma CLI to run migrations: its own ranges resolve deepmerge-ts below the\n // CVE-2026-40345 fix (HIGH) and mysql2 below the GHSA-3f6p-5ww8-9rcr fix\n // (HIGH). Neither is imported by the handler, which drives the schema engine.\n 'deepmerge-ts': '8.0.2',\n mysql2: '3.24.5',\n '@aws-sdk/client-dynamodb': '3.1146.0',\n '@aws-sdk/client-api-gateway': '3.1146.0',\n '@aws-sdk/client-iam': '3.1146.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1146.0',\n '@aws-sdk/client-bedrock-runtime': '3.1146.0',\n '@aws-sdk/client-s3': '3.1146.0',\n '@aws-sdk/client-sts': '3.1146.0',\n '@aws-sdk/client-cognito-identity-provider': '3.1146.0',\n '@aws-sdk/credential-providers': '3.1146.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.71',\n '@aws-sdk/client-secrets-manager': '3.1146.0',\n '@aws-sdk/rds-signer': '3.1146.0',\n '@smithy/server-apigateway': '0.3.3',\n '@smithy/server-node': '0.3.3',\n '@aws-lambda-powertools/logger': '2.35.0',\n '@aws-lambda-powertools/metrics': '2.35.0',\n '@aws-lambda-powertools/parameters': '2.35.0',\n '@aws-lambda-powertools/tracer': '2.35.0',\n '@aws-lambda-powertools/parser': '2.35.0',\n '@aws-sdk/client-appconfigdata': '3.1146.0',\n '@middy/core': '7.9.2',\n '@nxlv/python': '23.2.1',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.2.1',\n '@nx/devkit': '23.2.1',\n '@nx/js': '23.2.1',\n '@nx/react': '23.2.1',\n '@nx/vite': '23.2.1',\n '@nx/vitest': '23.2.1',\n '@nx/workspace': '23.2.1',\n 'create-nx-workspace': '23.2.1',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.13',\n '@modelcontextprotocol/sdk': '1.32.0',\n '@modelcontextprotocol/inspector': '2.9.0',\n '@ag-ui/a2ui-toolkit': '0.0.4',\n '@ag-ui/aws-strands': '0.3.0',\n '@ag-ui/client': '0.0.59',\n '@ag-ui/core': '0.0.59',\n '@ag-ui/encoder': '0.0.59',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.74.0',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.19.0',\n '@tanstack/react-router': '1.170.41',\n '@tanstack/router-plugin': '1.168.42',\n '@tanstack/router-generator': '1.167.40',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.3',\n '@cloudscape-design/board-components': '3.0.236',\n '@cloudscape-design/chat-components': '1.0.177',\n '@cloudscape-design/components': '3.0.1391',\n '@cloudscape-design/global-styles': '1.0.71',\n '@tanstack/react-query': '5.104.1',\n '@tanstack/react-query-devtools': '5.104.1',\n '@trpc/tanstack-react-query': '11.19.0',\n '@trpc/client': '11.19.0',\n '@trpc/server': '11.19.0',\n '@types/node': '26.6.4',\n '@types/aws-lambda': '8.10.164',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.2',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.7.2',\n '@smithy/node-config-provider': '4.6.2',\n '@smithy/node-http-handler': '4.12.1',\n '@smithy/types': '4.19.0',\n '@vitest/coverage-v8': '4.1.11',\n '@vitest/ui': '4.1.11',\n '@astrojs/react': '6.0.6',\n '@astrojs/starlight': '0.42.5',\n astro: '7.3.5',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1144.0',\n 'aws-cdk-lib': '2.272.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.1',\n 'class-variance-authority': '0.7.1',\n cn: '0.4.0',\n commander: '15.0.0',\n electrodb: '3.9.3',\n esbuild: '0.28.2',\n 'event-source-polyfill': '1.0.31',\n '@types/event-source-polyfill': '1.0.5',\n '@biomejs/biome': '2.5.15',\n '@prisma/adapter-mariadb': '7.10.0',\n '@prisma/adapter-pg': '7.10.0',\n '@prisma/client': '7.10.0',\n ejs: '6.0.1',\n '@types/ejs': '3.1.5',\n express: '5.2.1',\n 'fast-glob': '3.3.3',\n husky: '9.1.7',\n 'fs-extra': '11.4.1',\n '@types/fs-extra': '11.0.4',\n mariadb: '3.5.4',\n mise: '2026.10.1',\n npm: '12.2.0',\n 'npm-check-updates': '23.1.0',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.1',\n prisma: '7.10.0',\n 'react-oidc-context': '3.3.1',\n react: '19.3.0',\n 'react-dom': '19.3.0',\n rolldown: '1.2.12',\n 'rolldown-plugin-dts': '0.28.6',\n shx: '0.4.0',\n 'simple-git': '4.0.2',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.30.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.15',\n 'lucide-react': '1.51.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.21.1',\n 'tw-animate-css': '1.4.0',\n vite: '8.3.2',\n typescript: '6.0.3',\n vitest: '4.1.11',\n // The `testEnvironment` @nx/vitest writes into every generated config.\n jsdom: '29.1.1',\n zod: '4.6.5',\n ws: '8.22.0',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\n\n/**\n * Dependencies that must move as a unit, held at the lowest version proposed\n * across each group by the version update. Members must share a version line.\n *\n * The wasm formatter bindings are dependencies of this repo rather than vended\n * pins, so they are named here but versioned in the manifests.\n */\nexport const LOCKSTEP_GROUPS = [\n // A duplicate `@ag-ui/client` fails every generated website with TS2322.\n ['@ag-ui/client', '@ag-ui/core', '@ag-ui/encoder'],\n // The wasm bindings format generated files; the CLI checks them.\n ['@biomejs/wasm-nodejs', '@biomejs/biome'],\n ['@astral-sh/ruff-wasm-nodejs', 'ruff'],\n] as const satisfies readonly (readonly [string, string, ...string[]])[];\n\n/**\n * Add versions to the given dependencies, which the declaration must own.\n *\n * @param declaration the calling generator's `DEPENDENCIES`\n */\nexport const withVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredTs<D>[],\n): Record<string, string> => {\n assertDeclared(declaration.ts, deps, 'ts');\n return Object.fromEntries(\n deps.map((dep) => [dep, TS_VERSIONS[dep as ITsDepVersion]]),\n );\n};\n\n/**\n * The `nx` and `@nx/*` packages a generated workspace pins, all of which must\n * hold the same version: a workspace nx even a patch apart hoists a second\n * nested nx, and the two deadlock `nx sync`.\n *\n * Bumping them in a user's workspace requires `packageJsonUpdates` rather than a\n * migration — see `version-upgrade-migration/nx-package-updates.ts`.\n */\nexport const NX_PACKAGES = [\n 'nx',\n '@nx/devkit',\n '@nx/js',\n '@nx/react',\n '@nx/vite',\n '@nx/vitest',\n '@nx/workspace',\n] as const satisfies readonly ITsDepVersion[];\n\n/**\n * The nx version the plugin is built against, and the single source of truth\n * for every place a workspace's nx is pinned.\n */\nexport const NX_VERSION = TS_VERSIONS.nx;\n\n/**\n * Versions for Python dependencies added by generators\n */\nexport const PY_VERSIONS = {\n 'a2a-sdk': '==0.3.26',\n 'ag-ui-langgraph': '==0.0.46',\n 'ag-ui-protocol': '==0.1.22',\n 'ag-ui-strands': '==0.4.1',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.35.0',\n 'aws-lambda-powertools[tracer]': '==3.35.0',\n 'aws-lambda-powertools[parser]': '==3.35.0',\n 'aws-opentelemetry-distro': '==0.21.0',\n 'bedrock-agentcore': '==1.24.0',\n boto3: '==1.43.108',\n checkov: '==3.3.22',\n fastapi: '==0.142.2',\n 'fastapi[standard]': '==0.142.2',\n httpx: '==0.28.1',\n langchain: '==1.4.3',\n 'langchain-aws': '==1.8.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.12',\n 'langgraph-checkpoint-aws': '==1.2.4',\n 'langgraph-checkpoint-sqlite': '==3.1.1',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n pydantic: '==2.13.5',\n ruff: '==0.16.10',\n 'strands-agents': '==1.57.2',\n 'strands-agents[a2a]': '==1.57.2',\n 'strands-agents-tools': '==0.8.9',\n ty: '==0.0.86',\n pynamodb: '==6.1.0',\n uvicorn: '==0.54.0',\n sqlmodel: '==0.0.47',\n alembic: '==1.20.0',\n aiomysql: '==0.3.2',\n asyncpg: '==0.31.0',\n // Pinned explicitly: SQLAlchemy's async engine pulls greenlet transitively,\n // and leaving it unpinned lets uv resolve to a just-released version whose\n // platform wheels may not all be published yet (breaking aarch64 installs).\n greenlet: '==3.5.6',\n} as const;\nexport type IPyDepVersion = keyof typeof PY_VERSIONS;\n\n/**\n * Add versions to the given dependencies\n */\nexport const withPyVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredPy<D>[],\n): string[] => {\n assertDeclared(declaration.py, deps, 'py');\n return deps.map((dep) => `${dep}${PY_VERSIONS[dep as IPyDepVersion]}`);\n};\n\n/** Catches undeclared packages that reach here past the type checker. */\nconst assertDeclared = (\n declared: readonly { readonly name: string }[],\n deps: readonly unknown[],\n kind: 'ts' | 'py',\n): void => {\n const names = declaredNames(declared);\n const undeclared = deps.filter((dep) => !names.includes(dep as string));\n if (undeclared.length > 0) {\n throw new Error(\n `Undeclared ${kind} dependencies: ${undeclared.join(', ')}. Add them to the generator's declareDependencies({ ${kind}: [...] }).`,\n );\n }\n};\n\n/**\n * Versions for vendored tools\n */\nexport const VENDORED_VERSIONS = {\n 'git-secrets': '1.3.0',\n} as const;\n\n/**\n * Versions of Java dependencies added by generators, keyed by Maven coordinate.\n *\n * Every entry is resolved from Maven Central by the version update and named\n * `<group>:<artifact>:<version>` where a generator writes it.\n */\nexport const JAVA_VERSIONS = {\n 'software.amazon.smithy:smithy-model': '1.74.0',\n 'software.amazon.smithy:smithy-aws-traits': '1.74.0',\n 'software.amazon.smithy:smithy-validation-model': '1.74.0',\n 'software.amazon.smithy:smithy-openapi': '1.74.0',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.54.0',\n} as const;\nexport type IJavaVersion = keyof typeof JAVA_VERSIONS;\n\n/** The Maven coordinates the version update resolves, in declaration order. */\nexport const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS) as IJavaVersion[];\n\n/** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */\nexport const javaMavenDependency = (artifact: IJavaVersion): string =>\n `${artifact}:${JAVA_VERSIONS[artifact]}`;\n\n/**\n * Versions of tools resolved by mise, keyed by the tool name mise knows.\n *\n * Every entry is checked with `mise latest <tool>` by the version update. Nothing\n * is installed into the workspace: the pin travels in the `project.json` target\n * command, which is what the version sync reaches to move it forward.\n */\nexport const MISE_VERSIONS = {\n smithy: '1.74.0',\n} as const;\nexport type IMiseVersion = keyof typeof MISE_VERSIONS;\n\n/** The tools the version update resolves through mise, in declaration order. */\nexport const MISE_TOOLS = Object.keys(MISE_VERSIONS) as IMiseVersion[];\n\n/**\n * Base container images used by generated Dockerfiles. Pinned exactly so\n * generated images are reproducible, and chosen to be free of known\n * HIGH/CRITICAL vulnerabilities at time of generation.\n */\nexport const BASE_IMAGES = {\n node: 'public.ecr.aws/docker/library/node:lts-slim',\n python: 'public.ecr.aws/docker/library/python:3.14-slim',\n} as const;\n\n/**\n * Versions for container tooling used by generated image build/scan targets.\n * Pinned exactly so generated images are reproducible.\n */\nexport const CONTAINER_VERSIONS = {\n // ECR-hosted Trivy image used to scan built images during the build.\n trivy: '0.72.0',\n} as const;\n\n/**\n * Repository each pinned tool image is pulled from, keyed as\n * {@link CONTAINER_VERSIONS}. Kept beside the versions so a tool added here is\n * one entry rather than a reference built somewhere else, which is also what\n * lets the version sync find these pins wherever a target command runs them.\n */\nexport const CONTAINER_REPOSITORIES = {\n trivy: 'public.ecr.aws/aquasecurity/trivy',\n} as const satisfies Record<keyof typeof CONTAINER_VERSIONS, string>;\n\n/** The pinned reference for a tool image, as a target command runs it. */\nexport const containerImage = (tool: keyof typeof CONTAINER_VERSIONS): string =>\n `${CONTAINER_REPOSITORIES[tool]}:${CONTAINER_VERSIONS[tool]}`;\n\n/**\n * The managed Lambda runtimes generated infrastructure targets, as the single\n * source both IaC providers derive from.\n *\n * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`\n * against `nodejs24.x` — so deriving both from the version here keeps a bump one\n * edit that moves them together. Resolved by the version update workflow.\n */\nexport const LAMBDA_RUNTIME_VERSIONS = {\n node: '24',\n python: '3.14',\n} as const;\nexport type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;\n\n/**\n * The managed AgentCore Runtime runtimes generated infrastructure targets, for\n * agents and MCP servers packaged as code rather than as a container image.\n *\n * Tracked separately from {@link LAMBDA_RUNTIME_VERSIONS}: AgentCore publishes\n * its own, smaller set, so a Lambda bump would otherwise move these to a runtime\n * AgentCore rejects at create time. Resolved by the version update workflow from\n * the `AgentCoreRuntime` members `aws-cdk-lib` publishes, the same source the\n * Lambda runtimes come from.\n */\nexport const AGENT_CORE_RUNTIME_VERSIONS = {\n node: '22',\n python: '3.14',\n} as const;\nexport type IAgentCoreRuntime = keyof typeof AGENT_CORE_RUNTIME_VERSIONS;\n\n/**\n * The runtime as AgentCore's `runtime` field names it, e.g. `NODE_22` or\n * `PYTHON_3_14`.\n */\nexport const agentCoreRuntime = (runtime: IAgentCoreRuntime): string =>\n runtime === 'node'\n ? `NODE_${AGENT_CORE_RUNTIME_VERSIONS.node}`\n : `PYTHON_${AGENT_CORE_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * The interpreter uv pins for a generated Python project, as the Lambda runtime's\n * `major.minor`.\n *\n * No patch: uv reads this as a request for any patch of that minor, so it resolves\n * whichever one the platform has a build for. Naming an exact patch pins one that\n * may not exist everywhere, and Lambda patches the interpreter itself, so the minor\n * is the whole of what a project needs to agree on.\n */\nexport const pyenvPythonVersion = (): string => LAMBDA_RUNTIME_VERSIONS.python;\n\n/**\n * The `[project].requires-python` specifier for a generated Python project.\n *\n * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter\n * is that version, and Ruff derives its `target-version` from this (`py314`), so\n * lint targets the same version the function runs on.\n */\nexport const pyprojectPythonDependency = (): string =>\n `>=${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */\nexport const terraformLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x`\n : `python${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/**\n * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.\n * Always an explicitly versioned member, never a `_LATEST` alias.\n */\nexport const cdkLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X`\n : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * Substitution variables exposing the pinned runtimes to generated CDK\n * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with\n * {@link terraformLambdaRuntimeVars}, which names the same variables so a\n * template reads alike under either provider.\n */\nexport const cdkLambdaRuntimeVars = () => ({\n nodeRuntime: cdkLambdaRuntime('node'),\n pythonRuntime: cdkLambdaRuntime('python'),\n});\n\n/**\n * Substitution variables exposing the pinned runtimes to generated `.tf`\n * templates (e.g. `runtime = \"<%- nodeRuntime %>\"`).\n */\nexport const terraformLambdaRuntimeVars = () => ({\n nodeRuntime: terraformLambdaRuntime('node'),\n pythonRuntime: terraformLambdaRuntime('python'),\n});\n\n/**\n * Exact versions for Terraform providers used by generated `.tf` modules.\n * Pinned exactly (no range operator) so generated infrastructure is reproducible.\n */\nexport const TERRAFORM_VERSIONS = {\n aws: '6.67.0',\n random: '3.9.1',\n null: '3.3.2',\n archive: '2.8.1',\n external: '2.4.2',\n local: '2.9.1',\n time: '0.14.2',\n} as const;\nexport type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;\n\n/**\n * Substitution variables exposing Terraform provider version constraints to\n * generated `.tf` templates (e.g. `version = \"<%- awsProviderVersion %>\"`)\n */\nexport const terraformProviderVersions = () => ({\n awsProviderVersion: TERRAFORM_VERSIONS.aws,\n randomProviderVersion: TERRAFORM_VERSIONS.random,\n nullProviderVersion: TERRAFORM_VERSIONS.null,\n archiveProviderVersion: TERRAFORM_VERSIONS.archive,\n externalProviderVersion: TERRAFORM_VERSIONS.external,\n localProviderVersion: TERRAFORM_VERSIONS.local,\n timeProviderVersion: TERRAFORM_VERSIONS.time,\n});\n"],"names":["declaredNames","TS_VERSIONS","minimatch","mysql2","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","cn","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","npm","pg","prisma","react","rolldown","shx","tailwindcss","tsx","shadcn","vite","typescript","vitest","jsdom","zod","ws","LOCKSTEP_GROUPS","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","pydantic","ruff","ty","pynamodb","uvicorn","sqlmodel","alembic","aiomysql","asyncpg","greenlet","withPyVersions","py","declared","kind","names","undeclared","filter","includes","length","Error","join","VENDORED_VERSIONS","JAVA_VERSIONS","JAVA_ARTIFACTS","keys","javaMavenDependency","artifact","MISE_VERSIONS","smithy","MISE_TOOLS","BASE_IMAGES","node","python","CONTAINER_VERSIONS","trivy","CONTAINER_REPOSITORIES","containerImage","tool","LAMBDA_RUNTIME_VERSIONS","AGENT_CORE_RUNTIME_VERSIONS","agentCoreRuntime","runtime","replace","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","cdkLambdaRuntime","cdkLambdaRuntimeVars","nodeRuntime","pythonRuntime","terraformLambdaRuntimeVars","TERRAFORM_VERSIONS","aws","random","null","archive","external","local","time","terraformProviderVersions","awsProviderVersion","randomProviderVersion","nullProviderVersion","archiveProviderVersion","externalProviderVersion","localProviderVersion","timeProviderVersion"],"mappings":"AAAA;;;CAGC,GACD,SAIEA,aAAa,QACR,6BAA6B;AAEpC;;CAEC,GACD,OAAO,MAAMC,cAAc;IACzB,eAAe;IACf,0DAA0D;IAC1D,yEAAyE;IACzE,uDAAuD;IACvD,oCAAoC;IACpC,0EAA0E;IAC1E,2EAA2E;IAC3E,6EAA6E;IAC7E,8EAA8E;IAC9E,kDAAkD;IAClDC,WAAW;IACX,8EAA8E;IAC9E,8EAA8E;IAC9E,yEAAyE;IACzE,8EAA8E;IAC9E,gBAAgB;IAChBC,QAAQ;IACR,4BAA4B;IAC5B,+BAA+B;IAC/B,uBAAuB;IACvB,qCAAqC;IACrC,mCAAmC;IACnC,sBAAsB;IACtB,uBAAuB;IACvB,6CAA6C;IAC7C,iCAAiC;IACjC,iDAAiD;IACjD,mCAAmC;IACnC,uBAAuB;IACvB,6BAA6B;IAC7B,uBAAuB;IACvB,iCAAiC;IACjC,kCAAkC;IAClC,qCAAqC;IACrC,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,eAAe;IACf,gBAAgB;IAChB,wBAAwB;IACxB,0DAA0D;IAC1DC,IAAI;IACJ,cAAc;IACd,UAAU;IACV,aAAa;IACb,YAAY;IACZ,cAAc;IACd,iBAAiB;IACj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CAGC,GACD,OAAO,MAAMI,6BAA6B,IAAO,CAAA;QAC/CF,aAAaH,uBAAuB;QACpCI,eAAeJ,uBAAuB;IACxC,CAAA,EAAG;AAEH;;;CAGC,GACD,OAAO,MAAMM,qBAAqB;IAChCC,KAAK;IACLC,QAAQ;IACRC,MAAM;IACNC,SAAS;IACTC,UAAU;IACVC,OAAO;IACPC,MAAM;AACR,EAAW;AAGX;;;CAGC,GACD,OAAO,MAAMC,4BAA4B,IAAO,CAAA;QAC9CC,oBAAoBT,mBAAmBC,GAAG;QAC1CS,uBAAuBV,mBAAmBE,MAAM;QAChDS,qBAAqBX,mBAAmBG,IAAI;QAC5CS,wBAAwBZ,mBAAmBI,OAAO;QAClDS,yBAAyBb,mBAAmBK,QAAQ;QACpDS,sBAAsBd,mBAAmBM,KAAK;QAC9CS,qBAAqBf,mBAAmBO,IAAI;IAC9C,CAAA,EAAG"}
|
|
1
|
+
{"version":3,"sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n type DeclaredPy,\n type DeclaredTs,\n type DependencyDeclaration,\n declaredNames,\n} from './declared-dependencies.js';\n\n/**\n * Versons for TypeScript dependencies added by generators\n */\nexport const TS_VERSIONS = {\n '@a2a-js/sdk': '0.3.14',\n '@aws/aws-distro-opentelemetry-node-autoinstrumentation': '0.13.0',\n // Pinned above the version the ADOT autoinstrumentation package resolves\n // transitively (2.8.0) to clear CVE-2026-59892 (HIGH).\n '@opentelemetry/propagator-jaeger': '2.11.0',\n // Overridden in the vended agent/MCP image builds to clear CVE-2026-14257\n // (HIGH) in brace-expansion: minimatch 10 is the lowest major depending on\n // brace-expansion 5.x, the only line Trivy's `< 5.0.8` advisory range treats\n // as fixed. Overriding brace-expansion directly is not viable — 5.x drops the\n // CommonJS default export that minimatch 9 calls.\n minimatch: '10.2.6',\n // Both overridden in the vended RDB migration image build, which installs the\n // prisma CLI to run migrations: its own ranges resolve deepmerge-ts below the\n // CVE-2026-40345 fix (HIGH) and mysql2 below the GHSA-3f6p-5ww8-9rcr fix\n // (HIGH). Neither is imported by the handler, which drives the schema engine.\n 'deepmerge-ts': '8.0.2',\n mysql2: '3.24.5',\n '@aws-sdk/client-dynamodb': '3.1146.0',\n '@aws-sdk/client-api-gateway': '3.1146.0',\n '@aws-sdk/client-iam': '3.1146.0',\n '@aws-sdk/client-bedrock-agentcore': '3.1146.0',\n '@aws-sdk/client-bedrock-runtime': '3.1146.0',\n '@aws-sdk/client-s3': '3.1146.0',\n '@aws-sdk/client-sts': '3.1146.0',\n '@aws-sdk/client-cognito-identity-provider': '3.1146.0',\n '@aws-sdk/credential-providers': '3.1146.0',\n '@aws-sdk/credential-provider-cognito-identity': '3.972.71',\n '@aws-sdk/client-secrets-manager': '3.1146.0',\n '@aws-sdk/rds-signer': '3.1146.0',\n '@smithy/server-apigateway': '0.3.3',\n '@smithy/server-node': '0.3.3',\n '@aws-lambda-powertools/logger': '2.35.0',\n '@aws-lambda-powertools/metrics': '2.35.0',\n '@aws-lambda-powertools/parameters': '2.35.0',\n '@aws-lambda-powertools/tracer': '2.35.0',\n '@aws-lambda-powertools/parser': '2.35.0',\n '@aws-sdk/client-appconfigdata': '3.1146.0',\n '@middy/core': '7.9.2',\n '@nxlv/python': '23.2.1',\n '@nx-extend/terraform': '10.4.1',\n // These must all hold the same version — see NX_PACKAGES.\n nx: '23.2.1',\n '@nx/devkit': '23.2.1',\n '@nx/js': '23.2.1',\n '@nx/react': '23.2.1',\n '@nx/vite': '23.2.1',\n '@nx/vitest': '23.2.1',\n '@nx/workspace': '23.2.1',\n 'create-nx-workspace': '23.2.1',\n '@swc-node/register': '1.12.1',\n '@swc/core': '1.16.13',\n '@modelcontextprotocol/sdk': '1.32.0',\n '@modelcontextprotocol/inspector': '2.9.0',\n '@ag-ui/a2ui-toolkit': '0.0.4',\n '@ag-ui/aws-strands': '0.3.0',\n '@ag-ui/client': '0.0.59',\n '@ag-ui/core': '0.0.59',\n '@ag-ui/encoder': '0.0.59',\n 'agent-chat-cli': '0.3.0',\n '@copilotkit/react-core': '1.74.0',\n rxjs: '7.8.2',\n '@strands-agents/sdk': '1.19.0',\n '@tanstack/react-router': '1.170.41',\n '@tanstack/router-plugin': '1.168.42',\n '@tanstack/router-generator': '1.167.40',\n '@tanstack/virtual-file-routes': '1.162.0',\n '@tanstack/router-utils': '1.162.3',\n '@cloudscape-design/board-components': '3.0.236',\n '@cloudscape-design/chat-components': '1.0.177',\n '@cloudscape-design/components': '3.0.1391',\n '@cloudscape-design/global-styles': '1.0.71',\n '@tanstack/react-query': '5.104.1',\n '@tanstack/react-query-devtools': '5.104.1',\n '@trpc/tanstack-react-query': '11.19.0',\n '@trpc/client': '11.19.0',\n '@trpc/server': '11.19.0',\n '@types/node': '26.6.4',\n '@types/aws-lambda': '8.10.164',\n '@types/cors': '2.8.19',\n '@types/pg': '8.23.1',\n '@types/ws': '8.18.2',\n '@types/express': '5.0.6',\n '@smithy/config-resolver': '4.7.2',\n '@smithy/node-config-provider': '4.6.2',\n '@smithy/node-http-handler': '4.12.1',\n '@smithy/types': '4.19.0',\n '@vitest/coverage-v8': '4.1.11',\n '@vitest/ui': '4.1.11',\n '@astrojs/react': '6.0.6',\n '@astrojs/starlight': '0.42.5',\n astro: '7.3.5',\n cookie: '2.0.1',\n aws4fetch: '1.0.20',\n 'aws-cdk': '2.1144.0',\n 'aws-cdk-lib': '2.272.0',\n 'aws-xray-sdk-core': '3.12.0',\n constructs: '10.8.1',\n cors: '2.8.6',\n chalk: '6.0.1',\n 'class-variance-authority': '0.7.1',\n cn: '0.4.0',\n commander: '15.0.0',\n electrodb: '3.9.3',\n esbuild: '0.28.2',\n 'event-source-polyfill': '1.0.31',\n '@types/event-source-polyfill': '1.0.5',\n '@biomejs/biome': '2.5.15',\n '@prisma/adapter-mariadb': '7.10.0',\n '@prisma/adapter-pg': '7.10.0',\n '@prisma/client': '7.10.0',\n ejs: '6.0.1',\n '@types/ejs': '3.1.5',\n express: '5.2.1',\n 'fast-glob': '3.3.3',\n husky: '9.1.7',\n 'fs-extra': '11.4.1',\n '@types/fs-extra': '11.0.4',\n mariadb: '3.5.4',\n mise: '2026.10.1',\n npm: '12.2.0',\n 'npm-check-updates': '23.1.0',\n 'oidc-client-ts': '3.5.0',\n pg: '8.23.1',\n prisma: '7.10.0',\n 'react-oidc-context': '3.3.1',\n react: '19.3.0',\n 'react-dom': '19.3.0',\n rolldown: '1.2.12',\n 'rolldown-plugin-dts': '0.28.6',\n shx: '0.4.0',\n 'simple-git': '4.0.2',\n 'source-map-support': '0.5.21',\n 'starlight-blog': '0.30.0',\n tailwindcss: '4.3.3',\n '@tailwindcss/vite': '4.3.3',\n tsx: '4.23.15',\n 'lucide-react': '1.51.0',\n 'radix-ui': '1.6.7',\n shadcn: '4.21.1',\n 'tw-animate-css': '1.4.0',\n vite: '8.3.2',\n typescript: '6.0.3',\n vitest: '4.1.11',\n // The `testEnvironment` @nx/vitest writes into every generated config.\n jsdom: '29.1.1',\n zod: '4.6.5',\n ws: '8.22.0',\n} as const;\nexport type ITsDepVersion = keyof typeof TS_VERSIONS;\n\n/**\n * Dependencies that must move as a unit, held at the lowest version proposed\n * across each group by the version update. Members must share a version line.\n *\n * The wasm formatter bindings are dependencies of this repo rather than vended\n * pins, so they are named here but versioned in the manifests.\n */\nexport const LOCKSTEP_GROUPS = [\n // A duplicate `@ag-ui/client` fails every generated website with TS2322.\n ['@ag-ui/client', '@ag-ui/core', '@ag-ui/encoder'],\n // The wasm bindings format generated files; the CLI checks them.\n ['@biomejs/wasm-nodejs', '@biomejs/biome'],\n ['@astral-sh/ruff-wasm-nodejs', 'ruff'],\n] as const satisfies readonly (readonly [string, string, ...string[]])[];\n\n/**\n * Add versions to the given dependencies, which the declaration must own.\n *\n * @param declaration the calling generator's `DEPENDENCIES`\n */\nexport const withVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredTs<D>[],\n): Record<string, string> => {\n assertDeclared(declaration.ts, deps, 'ts');\n return Object.fromEntries(\n deps.map((dep) => [dep, TS_VERSIONS[dep as ITsDepVersion]]),\n );\n};\n\n/**\n * The `nx` and `@nx/*` packages a generated workspace pins, all of which must\n * hold the same version: a workspace nx even a patch apart hoists a second\n * nested nx, and the two deadlock `nx sync`.\n *\n * Bumping them in a user's workspace requires `packageJsonUpdates` rather than a\n * migration — see `version-upgrade-migration/nx-package-updates.ts`.\n */\nexport const NX_PACKAGES = [\n 'nx',\n '@nx/devkit',\n '@nx/js',\n '@nx/react',\n '@nx/vite',\n '@nx/vitest',\n '@nx/workspace',\n] as const satisfies readonly ITsDepVersion[];\n\n/**\n * The nx version the plugin is built against, and the single source of truth\n * for every place a workspace's nx is pinned.\n */\nexport const NX_VERSION = TS_VERSIONS.nx;\n\n/**\n * Versions for Python dependencies added by generators\n */\nexport const PY_VERSIONS = {\n 'a2a-sdk': '==0.3.26',\n 'ag-ui-langgraph': '==0.0.46',\n 'ag-ui-protocol': '==0.1.22',\n 'ag-ui-strands': '==0.4.1',\n aiosqlite: '==0.22.1',\n 'aws-lambda-powertools': '==3.35.0',\n 'aws-lambda-powertools[tracer]': '==3.35.0',\n 'aws-lambda-powertools[parser]': '==3.35.0',\n 'aws-opentelemetry-distro': '==0.21.0',\n 'bedrock-agentcore': '==1.24.0',\n boto3: '==1.43.108',\n checkov: '==3.3.22',\n fastapi: '==0.142.2',\n 'fastapi[standard]': '==0.142.2',\n httpx: '==0.28.1',\n langchain: '==1.4.3',\n 'langchain-aws': '==1.8.0',\n 'langchain-mcp-adapters': '==0.3.2',\n langgraph: '==1.2.12',\n 'langgraph-checkpoint-aws': '==1.2.4',\n 'langgraph-checkpoint-sqlite': '==3.1.1',\n mcp: '==1.28.1',\n 'pip-check-updates': '==0.29.0',\n 'pip-licenses': '==5.5.5',\n pydantic: '==2.13.5',\n ruff: '==0.16.10',\n 'strands-agents': '==1.57.2',\n 'strands-agents[a2a]': '==1.57.2',\n 'strands-agents-tools': '==0.8.9',\n ty: '==0.0.87',\n pynamodb: '==6.1.0',\n uvicorn: '==0.54.0',\n sqlmodel: '==0.0.47',\n alembic: '==1.20.0',\n aiomysql: '==0.3.2',\n asyncpg: '==0.31.0',\n // Pinned explicitly: SQLAlchemy's async engine pulls greenlet transitively,\n // and leaving it unpinned lets uv resolve to a just-released version whose\n // platform wheels may not all be published yet (breaking aarch64 installs).\n greenlet: '==3.5.6',\n} as const;\nexport type IPyDepVersion = keyof typeof PY_VERSIONS;\n\n/**\n * Add versions to the given dependencies\n */\nexport const withPyVersions = <D extends DependencyDeclaration>(\n declaration: D,\n deps: readonly DeclaredPy<D>[],\n): string[] => {\n assertDeclared(declaration.py, deps, 'py');\n return deps.map((dep) => `${dep}${PY_VERSIONS[dep as IPyDepVersion]}`);\n};\n\n/** Catches undeclared packages that reach here past the type checker. */\nconst assertDeclared = (\n declared: readonly { readonly name: string }[],\n deps: readonly unknown[],\n kind: 'ts' | 'py',\n): void => {\n const names = declaredNames(declared);\n const undeclared = deps.filter((dep) => !names.includes(dep as string));\n if (undeclared.length > 0) {\n throw new Error(\n `Undeclared ${kind} dependencies: ${undeclared.join(', ')}. Add them to the generator's declareDependencies({ ${kind}: [...] }).`,\n );\n }\n};\n\n/**\n * Versions for vendored tools\n */\nexport const VENDORED_VERSIONS = {\n 'git-secrets': '1.3.0',\n} as const;\n\n/**\n * Versions of Java dependencies added by generators, keyed by Maven coordinate.\n *\n * Every entry is resolved from Maven Central by the version update and named\n * `<group>:<artifact>:<version>` where a generator writes it.\n */\nexport const JAVA_VERSIONS = {\n 'software.amazon.smithy:smithy-model': '1.74.0',\n 'software.amazon.smithy:smithy-aws-traits': '1.74.0',\n 'software.amazon.smithy:smithy-validation-model': '1.74.0',\n 'software.amazon.smithy:smithy-openapi': '1.74.0',\n 'software.amazon.smithy.typescript:smithy-aws-typescript-codegen': '0.54.0',\n} as const;\nexport type IJavaVersion = keyof typeof JAVA_VERSIONS;\n\n/** The Maven coordinates the version update resolves, in declaration order. */\nexport const JAVA_ARTIFACTS = Object.keys(JAVA_VERSIONS) as IJavaVersion[];\n\n/** A Maven coordinate as a dependency names it: `<group>:<artifact>:<version>`. */\nexport const javaMavenDependency = (artifact: IJavaVersion): string =>\n `${artifact}:${JAVA_VERSIONS[artifact]}`;\n\n/**\n * Versions of tools resolved by mise, keyed by the tool name mise knows.\n *\n * Every entry is checked with `mise latest <tool>` by the version update. Nothing\n * is installed into the workspace: the pin travels in the `project.json` target\n * command, which is what the version sync reaches to move it forward.\n */\nexport const MISE_VERSIONS = {\n smithy: '1.74.0',\n} as const;\nexport type IMiseVersion = keyof typeof MISE_VERSIONS;\n\n/** The tools the version update resolves through mise, in declaration order. */\nexport const MISE_TOOLS = Object.keys(MISE_VERSIONS) as IMiseVersion[];\n\n/**\n * Base container images used by generated Dockerfiles. Pinned exactly so\n * generated images are reproducible, and chosen to be free of known\n * HIGH/CRITICAL vulnerabilities at time of generation.\n */\nexport const BASE_IMAGES = {\n node: 'public.ecr.aws/docker/library/node:lts-slim',\n python: 'public.ecr.aws/docker/library/python:3.14-slim',\n} as const;\n\n/**\n * Versions for container tooling used by generated image build/scan targets.\n * Pinned exactly so generated images are reproducible.\n */\nexport const CONTAINER_VERSIONS = {\n // ECR-hosted Trivy image used to scan built images during the build.\n trivy: '0.72.0',\n} as const;\n\n/**\n * Repository each pinned tool image is pulled from, keyed as\n * {@link CONTAINER_VERSIONS}. Kept beside the versions so a tool added here is\n * one entry rather than a reference built somewhere else, which is also what\n * lets the version sync find these pins wherever a target command runs them.\n */\nexport const CONTAINER_REPOSITORIES = {\n trivy: 'public.ecr.aws/aquasecurity/trivy',\n} as const satisfies Record<keyof typeof CONTAINER_VERSIONS, string>;\n\n/** The pinned reference for a tool image, as a target command runs it. */\nexport const containerImage = (tool: keyof typeof CONTAINER_VERSIONS): string =>\n `${CONTAINER_REPOSITORIES[tool]}:${CONTAINER_VERSIONS[tool]}`;\n\n/**\n * The managed Lambda runtimes generated infrastructure targets, as the single\n * source both IaC providers derive from.\n *\n * CDK and Terraform name the same runtime differently — `Runtime.NODEJS_24_X`\n * against `nodejs24.x` — so deriving both from the version here keeps a bump one\n * edit that moves them together. Resolved by the version update workflow.\n */\nexport const LAMBDA_RUNTIME_VERSIONS = {\n node: '24',\n python: '3.14',\n} as const;\nexport type ILambdaRuntime = keyof typeof LAMBDA_RUNTIME_VERSIONS;\n\n/**\n * The managed AgentCore Runtime runtimes generated infrastructure targets, for\n * agents and MCP servers packaged as code rather than as a container image.\n *\n * Tracked separately from {@link LAMBDA_RUNTIME_VERSIONS}: AgentCore publishes\n * its own, smaller set, so a Lambda bump would otherwise move these to a runtime\n * AgentCore rejects at create time. Resolved by the version update workflow from\n * the `AgentCoreRuntime` members `aws-cdk-lib` publishes, the same source the\n * Lambda runtimes come from.\n */\nexport const AGENT_CORE_RUNTIME_VERSIONS = {\n node: '22',\n python: '3.14',\n} as const;\nexport type IAgentCoreRuntime = keyof typeof AGENT_CORE_RUNTIME_VERSIONS;\n\n/**\n * The runtime as AgentCore's `runtime` field names it, e.g. `NODE_22` or\n * `PYTHON_3_14`.\n */\nexport const agentCoreRuntime = (runtime: IAgentCoreRuntime): string =>\n runtime === 'node'\n ? `NODE_${AGENT_CORE_RUNTIME_VERSIONS.node}`\n : `PYTHON_${AGENT_CORE_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * The interpreter uv pins for a generated Python project, as the Lambda runtime's\n * `major.minor`.\n *\n * No patch: uv reads this as a request for any patch of that minor, so it resolves\n * whichever one the platform has a build for. Naming an exact patch pins one that\n * may not exist everywhere, and Lambda patches the interpreter itself, so the minor\n * is the whole of what a project needs to agree on.\n */\nexport const pyenvPythonVersion = (): string => LAMBDA_RUNTIME_VERSIONS.python;\n\n/**\n * The `[project].requires-python` specifier for a generated Python project.\n *\n * A lower bound on the Lambda runtime's `major.minor`: the deployed interpreter\n * is that version, and Ruff derives its `target-version` from this (`py314`), so\n * lint targets the same version the function runs on.\n */\nexport const pyprojectPythonDependency = (): string =>\n `>=${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/** The runtime as Terraform's `runtime` attribute names it, e.g. `nodejs24.x`. */\nexport const terraformLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `nodejs${LAMBDA_RUNTIME_VERSIONS.node}.x`\n : `python${LAMBDA_RUNTIME_VERSIONS.python}`;\n\n/**\n * The runtime as an `aws-cdk-lib` `Runtime` member, e.g. `Runtime.NODEJS_24_X`.\n * Always an explicitly versioned member, never a `_LATEST` alias.\n */\nexport const cdkLambdaRuntime = (runtime: ILambdaRuntime): string =>\n runtime === 'node'\n ? `Runtime.NODEJS_${LAMBDA_RUNTIME_VERSIONS.node}_X`\n : `Runtime.PYTHON_${LAMBDA_RUNTIME_VERSIONS.python.replace('.', '_')}`;\n\n/**\n * Substitution variables exposing the pinned runtimes to generated CDK\n * templates (e.g. `runtime: <%- nodeRuntime %>`). Paired with\n * {@link terraformLambdaRuntimeVars}, which names the same variables so a\n * template reads alike under either provider.\n */\nexport const cdkLambdaRuntimeVars = () => ({\n nodeRuntime: cdkLambdaRuntime('node'),\n pythonRuntime: cdkLambdaRuntime('python'),\n});\n\n/**\n * Substitution variables exposing the pinned runtimes to generated `.tf`\n * templates (e.g. `runtime = \"<%- nodeRuntime %>\"`).\n */\nexport const terraformLambdaRuntimeVars = () => ({\n nodeRuntime: terraformLambdaRuntime('node'),\n pythonRuntime: terraformLambdaRuntime('python'),\n});\n\n/**\n * Exact versions for Terraform providers used by generated `.tf` modules.\n * Pinned exactly (no range operator) so generated infrastructure is reproducible.\n */\nexport const TERRAFORM_VERSIONS = {\n aws: '6.67.0',\n random: '3.9.1',\n null: '3.3.2',\n archive: '2.8.1',\n external: '2.4.2',\n local: '2.9.1',\n time: '0.14.2',\n} as const;\nexport type ITerraformProviderVersion = keyof typeof TERRAFORM_VERSIONS;\n\n/**\n * Substitution variables exposing Terraform provider version constraints to\n * generated `.tf` templates (e.g. `version = \"<%- awsProviderVersion %>\"`)\n */\nexport const terraformProviderVersions = () => ({\n awsProviderVersion: TERRAFORM_VERSIONS.aws,\n randomProviderVersion: TERRAFORM_VERSIONS.random,\n nullProviderVersion: TERRAFORM_VERSIONS.null,\n archiveProviderVersion: TERRAFORM_VERSIONS.archive,\n externalProviderVersion: TERRAFORM_VERSIONS.external,\n localProviderVersion: TERRAFORM_VERSIONS.local,\n timeProviderVersion: TERRAFORM_VERSIONS.time,\n});\n"],"names":["declaredNames","TS_VERSIONS","minimatch","mysql2","nx","rxjs","astro","cookie","aws4fetch","constructs","cors","chalk","cn","commander","electrodb","esbuild","ejs","express","husky","mariadb","mise","npm","pg","prisma","react","rolldown","shx","tailwindcss","tsx","shadcn","vite","typescript","vitest","jsdom","zod","ws","LOCKSTEP_GROUPS","withVersions","declaration","deps","assertDeclared","ts","Object","fromEntries","map","dep","NX_PACKAGES","NX_VERSION","PY_VERSIONS","aiosqlite","boto3","checkov","fastapi","httpx","langchain","langgraph","mcp","pydantic","ruff","ty","pynamodb","uvicorn","sqlmodel","alembic","aiomysql","asyncpg","greenlet","withPyVersions","py","declared","kind","names","undeclared","filter","includes","length","Error","join","VENDORED_VERSIONS","JAVA_VERSIONS","JAVA_ARTIFACTS","keys","javaMavenDependency","artifact","MISE_VERSIONS","smithy","MISE_TOOLS","BASE_IMAGES","node","python","CONTAINER_VERSIONS","trivy","CONTAINER_REPOSITORIES","containerImage","tool","LAMBDA_RUNTIME_VERSIONS","AGENT_CORE_RUNTIME_VERSIONS","agentCoreRuntime","runtime","replace","pyenvPythonVersion","pyprojectPythonDependency","terraformLambdaRuntime","cdkLambdaRuntime","cdkLambdaRuntimeVars","nodeRuntime","pythonRuntime","terraformLambdaRuntimeVars","TERRAFORM_VERSIONS","aws","random","null","archive","external","local","time","terraformProviderVersions","awsProviderVersion","randomProviderVersion","nullProviderVersion","archiveProviderVersion","externalProviderVersion","localProviderVersion","timeProviderVersion"],"mappings":"AAAA;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