@aws/nx-plugin 0.93.1 → 0.94.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/LICENSE-THIRD-PARTY +1114 -478
- package/generators.json +9 -0
- package/package.json +12 -12
- package/src/connection/agent-serve-local.d.ts +33 -0
- package/src/connection/agent-serve-local.js +49 -0
- package/src/connection/agent-serve-local.js.map +1 -0
- package/src/connection/generator.js +3 -0
- package/src/connection/generator.js.map +1 -1
- package/src/connection/serve-local.js +1 -1
- package/src/connection/serve-local.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +23 -23
- package/src/preset/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +21 -16
- package/src/py/strands-agent/files/app/main.py.template +12 -7
- package/src/py/strands-agent/react-connection/__snapshots__/generator.spec.ts.snap +236 -0
- package/src/py/strands-agent/react-connection/files/agent/scripts/__agentNameSnakeCase___openapi.py.template +6 -0
- package/src/py/strands-agent/react-connection/generator.d.ts +10 -0
- package/src/py/strands-agent/react-connection/generator.js +102 -0
- package/src/py/strands-agent/react-connection/generator.js.map +1 -0
- package/src/py/strands-agent/react-connection/schema.d.ts +15 -0
- package/src/py/strands-agent/react-connection/schema.json +26 -0
- package/src/py/strands-agent/react-connection/serve-local.d.ts +19 -0
- package/src/py/strands-agent/react-connection/serve-local.js +25 -0
- package/src/py/strands-agent/react-connection/serve-local.js.map +1 -0
- package/src/trpc/react/generator.js +2 -6
- package/src/trpc/react/generator.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/nx-generator/generator.js +1 -1
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +46 -46
- package/src/ts/strands-agent/react-connection/generator.js +2 -6
- package/src/ts/strands-agent/react-connection/generator.js.map +1 -1
- package/src/ts/strands-agent/react-connection/serve-local.js +8 -34
- package/src/ts/strands-agent/react-connection/serve-local.js.map +1 -1
- package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +17 -0
- package/src/utils/connection/open-api/react.d.ts +13 -1
- package/src/utils/connection/open-api/react.js +18 -18
- package/src/utils/connection/open-api/react.js.map +1 -1
- package/src/utils/shared-shadcn.js +2 -6
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/versions.d.ts +42 -42
- package/src/utils/versions.js +41 -41
- package/src/utils/versions.js.map +1 -1
|
@@ -1057,10 +1057,10 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1057
1057
|
"{
|
|
1058
1058
|
"name": "@proj/source",
|
|
1059
1059
|
"dependencies": {
|
|
1060
|
-
"@cloudscape-design/board-components": "3.0.
|
|
1061
|
-
"@cloudscape-design/components": "3.0.
|
|
1062
|
-
"@cloudscape-design/global-styles": "1.0.
|
|
1063
|
-
"aws-cdk-lib": "2.
|
|
1060
|
+
"@cloudscape-design/board-components": "3.0.164",
|
|
1061
|
+
"@cloudscape-design/components": "3.0.1266",
|
|
1062
|
+
"@cloudscape-design/global-styles": "1.0.56",
|
|
1063
|
+
"aws-cdk-lib": "2.248.0",
|
|
1064
1064
|
"constructs": "10.6.0",
|
|
1065
1065
|
"react": "19.2.4",
|
|
1066
1066
|
"react-dom": "19.2.4",
|
|
@@ -1068,13 +1068,13 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1068
1068
|
},
|
|
1069
1069
|
"devDependencies": {
|
|
1070
1070
|
"@eslint/js": "^9.8.0",
|
|
1071
|
-
"@nx/eslint": "22.6.
|
|
1072
|
-
"@nx/eslint-plugin": "22.6.
|
|
1073
|
-
"@nx/js": "22.6.
|
|
1074
|
-
"@nx/react": "22.6.
|
|
1075
|
-
"@nx/vite": "22.6.
|
|
1076
|
-
"@nx/vitest": "22.6.
|
|
1077
|
-
"@nx/web": "22.6.
|
|
1071
|
+
"@nx/eslint": "22.6.4",
|
|
1072
|
+
"@nx/eslint-plugin": "22.6.4",
|
|
1073
|
+
"@nx/js": "22.6.4",
|
|
1074
|
+
"@nx/react": "22.6.4",
|
|
1075
|
+
"@nx/vite": "22.6.4",
|
|
1076
|
+
"@nx/vitest": "22.6.4",
|
|
1077
|
+
"@nx/web": "22.6.4",
|
|
1078
1078
|
"@swc-node/register": "~1.11.1",
|
|
1079
1079
|
"@swc/cli": "~0.8.0",
|
|
1080
1080
|
"@swc/core": "~1.15.5",
|
|
@@ -1082,12 +1082,12 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1082
1082
|
"@tailwindcss/vite": "4.2.2",
|
|
1083
1083
|
"@testing-library/dom": "10.4.0",
|
|
1084
1084
|
"@testing-library/react": "16.3.0",
|
|
1085
|
-
"@types/node": "25.5.
|
|
1085
|
+
"@types/node": "25.5.2",
|
|
1086
1086
|
"@types/react": "^19.0.0",
|
|
1087
1087
|
"@types/react-dom": "^19.0.0",
|
|
1088
|
-
"@vitejs/plugin-react": "^
|
|
1089
|
-
"@vitest/coverage-v8": "4.1.
|
|
1090
|
-
"@vitest/ui": "4.1.
|
|
1088
|
+
"@vitejs/plugin-react": "^6.0.0",
|
|
1089
|
+
"@vitest/coverage-v8": "4.1.2",
|
|
1090
|
+
"@vitest/ui": "4.1.2",
|
|
1091
1091
|
"eslint": "^9.8.0",
|
|
1092
1092
|
"eslint-config-prettier": "^10.0.0",
|
|
1093
1093
|
"eslint-plugin-import": "2.31.0",
|
|
@@ -1101,9 +1101,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1101
1101
|
"prettier": "3.8.1",
|
|
1102
1102
|
"typescript": "~5.9.2",
|
|
1103
1103
|
"typescript-eslint": "^8.40.0",
|
|
1104
|
-
"vite": "
|
|
1105
|
-
"vite-tsconfig-paths": "
|
|
1106
|
-
"vitest": "4.1.
|
|
1104
|
+
"vite": "8.0.3",
|
|
1105
|
+
"vite-tsconfig-paths": "6.1.1",
|
|
1106
|
+
"vitest": "4.1.2"
|
|
1107
1107
|
},
|
|
1108
1108
|
"type": "module"
|
|
1109
1109
|
}
|
|
@@ -1955,8 +1955,8 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1955
1955
|
import baseConfig from '../eslint.config.mjs';
|
|
1956
1956
|
|
|
1957
1957
|
export default [
|
|
1958
|
-
...baseConfig,
|
|
1959
1958
|
...nx.configs['flat/react'],
|
|
1959
|
+
...baseConfig,
|
|
1960
1960
|
{
|
|
1961
1961
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
1962
1962
|
// Override or add rules here
|
|
@@ -2649,11 +2649,11 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2649
2649
|
"{
|
|
2650
2650
|
"name": "@proj/source",
|
|
2651
2651
|
"dependencies": {
|
|
2652
|
-
"@cloudscape-design/board-components": "3.0.
|
|
2653
|
-
"@cloudscape-design/components": "3.0.
|
|
2654
|
-
"@cloudscape-design/global-styles": "1.0.
|
|
2655
|
-
"@tanstack/react-router": "1.168.
|
|
2656
|
-
"aws-cdk-lib": "2.
|
|
2652
|
+
"@cloudscape-design/board-components": "3.0.164",
|
|
2653
|
+
"@cloudscape-design/components": "3.0.1266",
|
|
2654
|
+
"@cloudscape-design/global-styles": "1.0.56",
|
|
2655
|
+
"@tanstack/react-router": "1.168.10",
|
|
2656
|
+
"aws-cdk-lib": "2.248.0",
|
|
2657
2657
|
"constructs": "10.6.0",
|
|
2658
2658
|
"react": "19.2.4",
|
|
2659
2659
|
"react-dom": "19.2.4",
|
|
@@ -2661,30 +2661,30 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2661
2661
|
},
|
|
2662
2662
|
"devDependencies": {
|
|
2663
2663
|
"@eslint/js": "^9.8.0",
|
|
2664
|
-
"@nx/eslint": "22.6.
|
|
2665
|
-
"@nx/eslint-plugin": "22.6.
|
|
2666
|
-
"@nx/js": "22.6.
|
|
2667
|
-
"@nx/react": "22.6.
|
|
2668
|
-
"@nx/vite": "22.6.
|
|
2669
|
-
"@nx/vitest": "22.6.
|
|
2670
|
-
"@nx/web": "22.6.
|
|
2664
|
+
"@nx/eslint": "22.6.4",
|
|
2665
|
+
"@nx/eslint-plugin": "22.6.4",
|
|
2666
|
+
"@nx/js": "22.6.4",
|
|
2667
|
+
"@nx/react": "22.6.4",
|
|
2668
|
+
"@nx/vite": "22.6.4",
|
|
2669
|
+
"@nx/vitest": "22.6.4",
|
|
2670
|
+
"@nx/web": "22.6.4",
|
|
2671
2671
|
"@swc-node/register": "~1.11.1",
|
|
2672
2672
|
"@swc/cli": "~0.8.0",
|
|
2673
2673
|
"@swc/core": "~1.15.5",
|
|
2674
2674
|
"@swc/helpers": "~0.5.18",
|
|
2675
2675
|
"@tailwindcss/vite": "4.2.2",
|
|
2676
|
-
"@tanstack/router-generator": "1.166.
|
|
2677
|
-
"@tanstack/router-plugin": "1.167.
|
|
2676
|
+
"@tanstack/router-generator": "1.166.24",
|
|
2677
|
+
"@tanstack/router-plugin": "1.167.12",
|
|
2678
2678
|
"@tanstack/router-utils": "1.161.6",
|
|
2679
2679
|
"@tanstack/virtual-file-routes": "1.161.7",
|
|
2680
2680
|
"@testing-library/dom": "10.4.0",
|
|
2681
2681
|
"@testing-library/react": "16.3.0",
|
|
2682
|
-
"@types/node": "25.5.
|
|
2682
|
+
"@types/node": "25.5.2",
|
|
2683
2683
|
"@types/react": "^19.0.0",
|
|
2684
2684
|
"@types/react-dom": "^19.0.0",
|
|
2685
|
-
"@vitejs/plugin-react": "^
|
|
2686
|
-
"@vitest/coverage-v8": "4.1.
|
|
2687
|
-
"@vitest/ui": "4.1.
|
|
2685
|
+
"@vitejs/plugin-react": "^6.0.0",
|
|
2686
|
+
"@vitest/coverage-v8": "4.1.2",
|
|
2687
|
+
"@vitest/ui": "4.1.2",
|
|
2688
2688
|
"eslint": "^9.8.0",
|
|
2689
2689
|
"eslint-config-prettier": "^10.0.0",
|
|
2690
2690
|
"eslint-plugin-import": "2.31.0",
|
|
@@ -2698,9 +2698,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2698
2698
|
"prettier": "3.8.1",
|
|
2699
2699
|
"typescript": "~5.9.2",
|
|
2700
2700
|
"typescript-eslint": "^8.40.0",
|
|
2701
|
-
"vite": "
|
|
2702
|
-
"vite-tsconfig-paths": "
|
|
2703
|
-
"vitest": "4.1.
|
|
2701
|
+
"vite": "8.0.3",
|
|
2702
|
+
"vite-tsconfig-paths": "6.1.1",
|
|
2703
|
+
"vitest": "4.1.2"
|
|
2704
2704
|
},
|
|
2705
2705
|
"type": "module"
|
|
2706
2706
|
}
|
|
@@ -3552,8 +3552,8 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3552
3552
|
import baseConfig from '../eslint.config.mjs';
|
|
3553
3553
|
|
|
3554
3554
|
export default [
|
|
3555
|
-
...baseConfig,
|
|
3556
3555
|
...nx.configs['flat/react'],
|
|
3556
|
+
...baseConfig,
|
|
3557
3557
|
{
|
|
3558
3558
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
3559
3559
|
// Override or add rules here
|
|
@@ -4909,11 +4909,11 @@ root &&
|
|
|
4909
4909
|
|
|
4910
4910
|
exports[`react-website generator > should handle npm scope prefix correctly > scoped-dependencies 1`] = `
|
|
4911
4911
|
{
|
|
4912
|
-
"@cloudscape-design/board-components": "3.0.
|
|
4913
|
-
"@cloudscape-design/components": "3.0.
|
|
4914
|
-
"@cloudscape-design/global-styles": "1.0.
|
|
4915
|
-
"@tanstack/react-router": "1.168.
|
|
4916
|
-
"aws-cdk-lib": "2.
|
|
4912
|
+
"@cloudscape-design/board-components": "3.0.164",
|
|
4913
|
+
"@cloudscape-design/components": "3.0.1266",
|
|
4914
|
+
"@cloudscape-design/global-styles": "1.0.56",
|
|
4915
|
+
"@tanstack/react-router": "1.168.10",
|
|
4916
|
+
"aws-cdk-lib": "2.248.0",
|
|
4917
4917
|
"constructs": "10.6.0",
|
|
4918
4918
|
"react": "19.2.4",
|
|
4919
4919
|
"react-dom": "19.2.4",
|
|
@@ -59,13 +59,9 @@ async function tsStrandsAgentReactConnectionGenerator(tree, options) {
|
|
|
59
59
|
const clientProviderName = `${agentNameClassName}AgentClientProvider`;
|
|
60
60
|
await (0, ast_1.addSingleImport)(tree, mainTsxPath, clientProviderName, `./components/${clientProviderName}`);
|
|
61
61
|
// Wrap <App /> in QueryClientProvider if not already present
|
|
62
|
-
|
|
63
|
-
await (0, ast_1.applyGritQL)(tree, mainTsxPath, '`<App />` => `<QueryClientProvider><App /></QueryClientProvider>`');
|
|
64
|
-
}
|
|
62
|
+
await (0, ast_1.applyGritQL)(tree, mainTsxPath, '`<App />` => `<QueryClientProvider><App /></QueryClientProvider>` where { $program <: not contains `<QueryClientProvider>$_</QueryClientProvider>` }');
|
|
65
63
|
// Wrap <App /> in the agent client provider if not already present
|
|
66
|
-
|
|
67
|
-
await (0, ast_1.applyGritQL)(tree, mainTsxPath, `\`<App />\` => \`<${clientProviderName}><App /></${clientProviderName}>\``);
|
|
68
|
-
}
|
|
64
|
+
await (0, ast_1.applyGritQL)(tree, mainTsxPath, `\`<App />\` => \`<${clientProviderName}><App /></${clientProviderName}>\` where { $program <: not contains \`<${clientProviderName}>$_</${clientProviderName}>\` }`);
|
|
69
65
|
await (0, serve_local_1.addStrandsAgentTargetToServeLocal)(tree, frontendProjectConfig.name, agentProjectConfig.name, {
|
|
70
66
|
agentName,
|
|
71
67
|
agentNameClassName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/strands-agent/react-connection/generator.ts"],"names":[],"mappings":";;;AAgCA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/strands-agent/react-connection/generator.ts"],"names":[],"mappings":";;;AAgC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,CAAC,CAAC,CAAC,CACf,CAAC;IACF,IAAI,CAAC,YAAY;QAAE,OAAO;IAE1B,MAAM,aAAa,GAAG,CAAC,KAAK,WAAW,IAAI,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,IAAA,wBAAY,EAAC,WAAW,CAAC,CAAC;IAE7C,IAAA,mBAAU,EAAC,IAAI,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE,CAAC;QAChD,iEAAiE;QACjE,MAAM,gBAAgB,GAAG,GAAG,UAAU,IAAI,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC7B,KAAK,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC;QAC1C,CAAC;QACD,6CAA6C;QAC7C,MAAM,cAAc,GAAG,GAAG,WAAW,IAAI,CAAC;QAC1C,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;YAC3B,KAAK,CAAC,cAAc,CAAC,GAAG,aAAa,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,eAAe,GAAG;YACrB,GAAG,IAAI,CAAC,eAAe;YACvB,KAAK;SACN,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,45 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addStrandsAgentTargetToServeLocal = void 0;
|
|
4
|
-
|
|
5
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
const devkit_1 = require("@nx/devkit");
|
|
9
|
-
const ast_1 = require("../../../utils/ast");
|
|
10
|
-
const nx_1 = require("../../../utils/nx");
|
|
4
|
+
const agent_serve_local_1 = require("../../../connection/agent-serve-local");
|
|
11
5
|
/**
|
|
12
6
|
* Adds the given strands agent target project to the source project's serve-local target
|
|
13
7
|
* Updates the runtime config provider (if it exists) to point to the local WebSocket URL
|
|
14
8
|
*/
|
|
15
9
|
const addStrandsAgentTargetToServeLocal = async (tree, sourceProjectName, targetProjectName, options) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
:
|
|
22
|
-
|
|
23
|
-
if (!(targetProject.targets?.[agentServeLocalTargetName]?.continuous &&
|
|
24
|
-
sourceProject.targets?.['serve-local'])) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
// Add a dependency on the agent serve-local target (so that the agent's
|
|
28
|
-
// own serve-local dependencies, such as MCP servers, are also started)
|
|
29
|
-
sourceProject.targets['serve-local'].dependsOn = [
|
|
30
|
-
...(sourceProject.targets['serve-local'].dependsOn ?? []),
|
|
31
|
-
{
|
|
32
|
-
projects: [targetProject.name],
|
|
33
|
-
target: agentServeLocalTargetName,
|
|
34
|
-
},
|
|
35
|
-
];
|
|
36
|
-
(0, devkit_1.updateProjectConfiguration)(tree, sourceProject.name, sourceProject);
|
|
37
|
-
// Add an override to runtime-config for the serve-local target to use the local WebSocket url
|
|
38
|
-
const runtimeConfigProvider = (0, devkit_1.joinPathFragments)(sourceProject.root, 'src', 'components', 'RuntimeConfig', 'index.tsx');
|
|
39
|
-
if (tree.exists(runtimeConfigProvider)) {
|
|
40
|
-
const localUrl = `ws://localhost:${options.port}/ws`;
|
|
41
|
-
await (0, ast_1.applyGritQL)(tree, runtimeConfigProvider, `\`if ($cond) { $stmts }\` => raw\`if ($cond) {\n $stmts\n runtimeConfig.agentRuntimes.${options.agentNameClassName} = '${localUrl}';\n }\` where { $cond <: contains \`'serve-local'\`, $stmts <: within \`const applyOverrides = $_\` }`);
|
|
42
|
-
}
|
|
10
|
+
await (0, agent_serve_local_1.addAgentTargetToServeLocal)(tree, sourceProjectName, targetProjectName, {
|
|
11
|
+
agentNameClassName: options.agentNameClassName,
|
|
12
|
+
port: options.port,
|
|
13
|
+
targetComponent: options.targetComponent,
|
|
14
|
+
runtimeConfigNamespace: 'agentRuntimes',
|
|
15
|
+
localUrl: `ws://localhost:${options.port}/ws`,
|
|
16
|
+
});
|
|
43
17
|
};
|
|
44
18
|
exports.addStrandsAgentTargetToServeLocal = addStrandsAgentTargetToServeLocal;
|
|
45
19
|
//# sourceMappingURL=serve-local.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-local.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/strands-agent/react-connection/serve-local.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"serve-local.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/strands-agent/react-connection/serve-local.ts"],"names":[],"mappings":";;;AAKA,6EAAmF;AAUnF;;;GAGG;AACI,MAAM,iCAAiC,GAAG,KAAK,EACpD,IAAU,EACV,iBAAyB,EACzB,iBAAyB,EACzB,OAAsC,EACtC,EAAE;IACF,MAAM,IAAA,8CAA0B,EAAC,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE;QAC3E,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,sBAAsB,EAAE,eAAe;QACvC,QAAQ,EAAE,kBAAkB,OAAO,CAAC,IAAI,KAAK;KAC9C,CAAC,CAAC;AACL,CAAC,CAAC;AAbW,QAAA,iCAAiC,qCAa5C"}
|
package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template
CHANGED
|
@@ -7,6 +7,16 @@ import { useSigV4 } from '../hooks/useSigV4';
|
|
|
7
7
|
<%_ } else if (auth === 'Cognito') { _%>
|
|
8
8
|
import { useAuth } from 'react-oidc-context';
|
|
9
9
|
<%_ } _%>
|
|
10
|
+
<%_ if (isAgentRuntime) { _%>
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Build an HTTP URL from a Bedrock AgentCore Runtime ARN
|
|
14
|
+
*/
|
|
15
|
+
function buildAgentCoreHttpUrl(agentRuntimeArn: string): string {
|
|
16
|
+
const region = agentRuntimeArn.split(':')[3];
|
|
17
|
+
return `https://bedrock-agentcore.${region}.amazonaws.com/runtimes/${encodeURIComponent(agentRuntimeArn)}`;
|
|
18
|
+
}
|
|
19
|
+
<%_ } _%>
|
|
10
20
|
|
|
11
21
|
export const <%- apiNameClassName %>Context = createContext<<%- apiNameClassName %>OptionsProxy | undefined>(undefined);
|
|
12
22
|
|
|
@@ -14,7 +24,14 @@ export const <%- apiNameClassName %>ClientContext = createContext<<%- apiNameCla
|
|
|
14
24
|
|
|
15
25
|
const useCreate<%- apiNameClassName %>Client = (): <%- apiNameClassName %> => {
|
|
16
26
|
const runtimeConfig = useRuntimeConfig();
|
|
27
|
+
<%_ if (isAgentRuntime) { _%>
|
|
28
|
+
const agentRuntimeValue = runtimeConfig.agentRuntimes.<%- apiNameClassName %>;
|
|
29
|
+
const apiUrl = agentRuntimeValue.startsWith('arn:')
|
|
30
|
+
? buildAgentCoreHttpUrl(agentRuntimeValue)
|
|
31
|
+
: agentRuntimeValue;
|
|
32
|
+
<%_ } else { _%>
|
|
17
33
|
const apiUrl = runtimeConfig.apis.<%- apiNameClassName %>;
|
|
34
|
+
<%_ } _%>
|
|
18
35
|
<%_ if(auth === 'IAM') { _%>
|
|
19
36
|
const sigv4Client = useSigV4();
|
|
20
37
|
<%_ } else if (auth === 'Cognito') { _%>
|
|
@@ -36,8 +36,20 @@ export interface AddOpenApiReactClientOptions {
|
|
|
36
36
|
* Port on which the backend project's local server listens
|
|
37
37
|
*/
|
|
38
38
|
port: number;
|
|
39
|
+
/**
|
|
40
|
+
* When true, the generated provider reads from runtimeConfig.agentRuntimes
|
|
41
|
+
* and converts Bedrock AgentCore Runtime ARNs to HTTP URLs.
|
|
42
|
+
* When false (default), reads from runtimeConfig.apis directly.
|
|
43
|
+
*/
|
|
44
|
+
isAgentRuntime?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* When true, skips the serve-local setup. Use this when the caller
|
|
47
|
+
* handles serve-local configuration separately (e.g. agent connections
|
|
48
|
+
* that use a component-specific serve-local target instead of 'serve').
|
|
49
|
+
*/
|
|
50
|
+
skipServeLocal?: boolean;
|
|
39
51
|
}
|
|
40
52
|
/**
|
|
41
53
|
* Adds an OpenAPI React client to the frontend project along with supporting build targets
|
|
42
54
|
*/
|
|
43
|
-
export declare const addOpenApiReactClient: (tree: Tree, { apiName, frontendProjectConfig, backendProjectConfig, specBuildProject, specPath, specBuildTargetName, auth, port, }: AddOpenApiReactClientOptions) => Promise<void>;
|
|
55
|
+
export declare const addOpenApiReactClient: (tree: Tree, { apiName, frontendProjectConfig, backendProjectConfig, specBuildProject, specPath, specBuildTargetName, auth, port, isAgentRuntime, skipServeLocal, }: AddOpenApiReactClientOptions) => Promise<void>;
|
|
@@ -17,7 +17,7 @@ const versions_1 = require("../../versions");
|
|
|
17
17
|
/**
|
|
18
18
|
* Adds an OpenAPI React client to the frontend project along with supporting build targets
|
|
19
19
|
*/
|
|
20
|
-
const addOpenApiReactClient = async (tree, { apiName, frontendProjectConfig, backendProjectConfig, specBuildProject, specPath, specBuildTargetName, auth, port, }) => {
|
|
20
|
+
const addOpenApiReactClient = async (tree, { apiName, frontendProjectConfig, backendProjectConfig, specBuildProject, specPath, specBuildTargetName, auth, port, isAgentRuntime = false, skipServeLocal = false, }) => {
|
|
21
21
|
const clientGenTarget = `generate:${(0, names_1.kebabCase)(apiName)}-client`;
|
|
22
22
|
const clientGenWatchTarget = `watch-${clientGenTarget}`;
|
|
23
23
|
const generatedClientDir = (0, devkit_1.joinPathFragments)('generated', (0, names_1.kebabCase)(apiName));
|
|
@@ -96,30 +96,30 @@ const addOpenApiReactClient = async (tree, { apiName, frontendProjectConfig, bac
|
|
|
96
96
|
apiName,
|
|
97
97
|
apiNameClassName,
|
|
98
98
|
generatedClientDir,
|
|
99
|
+
isAgentRuntime,
|
|
99
100
|
});
|
|
100
101
|
// Update main.tsx to add required providers
|
|
101
102
|
const mainTsxPath = (0, devkit_1.joinPathFragments)(frontendProjectConfig.sourceRoot, 'main.tsx');
|
|
102
103
|
// Add the query client provider if it doesn't exist already
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
await (0, ast_1.applyGritQL)(tree, mainTsxPath, '`<App />` => `<QueryClientProvider><App /></QueryClientProvider>`');
|
|
106
|
-
}
|
|
104
|
+
await (0, ast_1.addSingleImport)(tree, mainTsxPath, 'QueryClientProvider', './components/QueryClientProvider');
|
|
105
|
+
await (0, ast_1.applyGritQL)(tree, mainTsxPath, '`<App />` => `<QueryClientProvider><App /></QueryClientProvider>` where { $program <: not contains `<QueryClientProvider>$_</QueryClientProvider>` }');
|
|
107
106
|
// Add the api provider if it does not exist
|
|
108
107
|
const providerName = `${apiNameClassName}Provider`;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
await (0, ast_1.addSingleImport)(tree, mainTsxPath, providerName, `./components/${providerName}`);
|
|
109
|
+
await (0, ast_1.applyGritQL)(tree, mainTsxPath, `\`<App />\` => \`<${providerName}><App /></${providerName}>\` where { $program <: not contains \`<${providerName}>$_</${providerName}>\` }`);
|
|
110
|
+
// Update serve-local on the website to use our local server.
|
|
111
|
+
// Callers that handle serve-local separately (e.g. agent connections) set skipServeLocal.
|
|
112
|
+
if (!skipServeLocal) {
|
|
113
|
+
await (0, serve_local_1.addTargetToServeLocal)(tree, frontendProjectConfig.name, backendProjectConfig.name, {
|
|
114
|
+
url: `http://localhost:${port}/`,
|
|
115
|
+
apiName,
|
|
116
|
+
// Additionally add a dependency on the generate watch command to ensure that local
|
|
117
|
+
// API changes that affect the client are also reloaded.
|
|
118
|
+
// We include a dependency on the generate target as watch ONLY triggers on a change,
|
|
119
|
+
// and we need to ensure the client is generated the first time if not already present.
|
|
120
|
+
additionalDependencyTargets: [clientGenTarget, clientGenWatchTarget],
|
|
121
|
+
});
|
|
112
122
|
}
|
|
113
|
-
// Update serve-local on the website to use our local server
|
|
114
|
-
await (0, serve_local_1.addTargetToServeLocal)(tree, frontendProjectConfig.name, backendProjectConfig.name, {
|
|
115
|
-
url: `http://localhost:${port}/`,
|
|
116
|
-
apiName,
|
|
117
|
-
// Additionally add a dependency on the generate watch command to ensure that local
|
|
118
|
-
// API changes that affect the client are also reloaded.
|
|
119
|
-
// We include a dependency on the generate target as watch ONLY triggers on a change,
|
|
120
|
-
// and we need to ensure the client is generated the first time if not already present.
|
|
121
|
-
additionalDependencyTargets: [clientGenTarget, clientGenWatchTarget],
|
|
122
|
-
});
|
|
123
123
|
(0, devkit_1.addDependenciesToPackageJson)(tree, (0, versions_1.withVersions)([
|
|
124
124
|
...(auth === 'IAM'
|
|
125
125
|
? [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/utils/connection/open-api/react.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAQoB;AACpB,uCAAqD;AACrD,yCAA8C;AAC9C,mCAA4C;AAC5C,2GAAwF;AACxF,
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/utils/connection/open-api/react.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAQoB;AACpB,uCAAqD;AACrD,yCAA8C;AAC9C,mCAA4C;AAC5C,2GAAwF;AACxF,mCAAyD;AACzD,iEAAwE;AACxE,6CAA8C;AAiD9C;;GAEG;AACI,MAAM,qBAAqB,GAAG,KAAK,EACxC,IAAU,EACV,EACE,OAAO,EACP,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,mBAAmB,EACnB,IAAI,EACJ,IAAI,EACJ,cAAc,GAAG,KAAK,EACtB,cAAc,GAAG,KAAK,GACO,EAC/B,EAAE;IACF,MAAM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;SACrE,CACF,CAAC;IACJ,CAAC;IAED,IAAA,qCAA4B,EAC1B,IAAI,EACJ,IAAA,uBAAY,EAAC;QACX,GAAI,CAAC,IAAI,KAAK,KAAK;YACjB,CAAC,CAAC;gBACE,gBAAgB;gBAChB,oBAAoB;gBACpB,+BAA+B;gBAC/B,WAAW;aACZ;YACH,CAAC,CAAC,EAAE,CAAS;QACf,GAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAS;QAC9D,uBAAuB;QACvB,gCAAgC;KACjC,CAAC,EACF,IAAA,uBAAY,EAAC,CAAC,eAAe,CAAC,CAAC,CAChC,CAAC;AACJ,CAAC,CAAC;AA3MW,QAAA,qBAAqB,yBA2MhC"}
|
|
@@ -46,12 +46,8 @@ const addSharedShadcnEslintRules = async (tree, eslintConfigPath) => {
|
|
|
46
46
|
}
|
|
47
47
|
// shadcn generates aliased imports from components.json, which conflict with our
|
|
48
48
|
// relative-import lint rule. This rule is therefore disabled for common-shadcn.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
// Append rule config to the exports array (no leading comma — GritQL handles it)
|
|
54
|
-
await (0, ast_1.applyGritQL)(tree, eslintConfigPath, "`export default [$items]` where { $items += `{ files: ['**/*.{ts,tsx,js,jsx}'], rules: { '@nx/enforce-module-boundaries': 'off' } }` }");
|
|
49
|
+
// The `not contains` guard makes this idempotent.
|
|
50
|
+
await (0, ast_1.applyGritQL)(tree, eslintConfigPath, "`export default [$items]` where { $items <: not contains `@nx/enforce-module-boundaries`, $items += `{ files: ['**/*.{ts,tsx,js,jsx}'], rules: { '@nx/enforce-module-boundaries': 'off' } }` }");
|
|
55
51
|
};
|
|
56
52
|
async function sharedShadcnGenerator(tree) {
|
|
57
53
|
const npmScopePrefix = (0, npm_scope_1.getNpmScopePrefix)(tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-shadcn.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/shared-shadcn.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"shared-shadcn.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/shared-shadcn.ts"],"names":[],"mappings":";;AA8EA,sDAoGC;;AAlLD;;;GAGG;AACH,uCAOoB;AACpB,4EAAqD;AACrD,iEAAgE;AAChE,qCAAgD;AAChD,2CAA8D;AAC9D,+BAAoC;AACpC,+EAIuC;AACvC,yCAAyD;AAEzD,MAAM,WAAW,GAAG;IAClB,0BAA0B;IAC1B,MAAM;IACN,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,UAAU;CACwB,CAAC;AAErC,MAAM,iCAAiC,GAAG,kCAAkC,CAAC;AAE7E,MAAM,+BAA+B,GAAG,CAAC,IAAU,EAAW,EAAE;IAC9D,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC3B,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACnD,MAAM,iBAAiB,GAAG,YAAY;aACnC,KAAK,CAAC,OAAO,CAAC;aACd,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,iCAAiC,CAAC,CAAC;QAErE,IAAI,iBAAiB,EAAE,CAAC;YACtB,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,oBAAoB,GACxB,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,CACR,SAAS,EACT,GAAG,YAAY,GAAG,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,iCAAiC,IAAI,CAC3F,CAAC;QACF,OAAO,IAAI,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CAAC;QACzD,IAAA,qCAA4B,EAAC,IAAI,EAAE,IAAA,uBAAY,EAAC,CAAC,GAAG,WAAW,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,IAAA,mBAAU,EAAC,IAAI,EAAE,oBAAoB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAChD,GAAG,IAAI;QACP,eAAe,EAAE;YACf,GAAG,IAAI,CAAC,eAAe;YACvB,KAAK,EAAE;gBACL,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,KAAK,IAAI,EAAE,CAAC;gBACtC,CAAC,GAAG,iBAAiB,IAAI,CAAC,EAAE;oBAC1B,KAAK,IAAA,0BAAiB,EAAC,WAAW,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE;iBAClD;aACF;SACF;KACF,CAAC,CAAC,CAAC;IAEJ,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACpC,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,EAC/C,GAAG,EACH;YACE,iBAAiB;SAClB,EACD;YACE,iBAAiB,EAAE,0BAAiB,CAAC,YAAY;SAClD,CACF,CAAC;IACJ,CAAC;IAED,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const TS_VERSIONS: {
|
|
9
9
|
readonly '@aws/aws-distro-opentelemetry-node-autoinstrumentation': "0.9.0";
|
|
10
|
-
readonly '@aws-sdk/client-dynamodb': "3.
|
|
11
|
-
readonly '@aws-sdk/client-sts': "3.
|
|
12
|
-
readonly '@aws-sdk/credential-providers': "3.
|
|
10
|
+
readonly '@aws-sdk/client-dynamodb': "3.1024.0";
|
|
11
|
+
readonly '@aws-sdk/client-sts': "3.1024.0";
|
|
12
|
+
readonly '@aws-sdk/credential-providers': "3.1024.0";
|
|
13
13
|
readonly '@aws-smithy/server-apigateway': "1.0.0-alpha.10";
|
|
14
14
|
readonly '@aws-smithy/server-node': "1.0.0-alpha.10";
|
|
15
15
|
readonly '@aws-lambda-powertools/logger': "2.32.0";
|
|
@@ -17,41 +17,41 @@ export declare const TS_VERSIONS: {
|
|
|
17
17
|
readonly '@aws-lambda-powertools/parameters': "2.32.0";
|
|
18
18
|
readonly '@aws-lambda-powertools/tracer': "2.32.0";
|
|
19
19
|
readonly '@aws-lambda-powertools/parser': "2.32.0";
|
|
20
|
-
readonly '@aws-sdk/client-appconfigdata': "3.
|
|
20
|
+
readonly '@aws-sdk/client-appconfigdata': "3.1024.0";
|
|
21
21
|
readonly '@middy/core': "7.2.1";
|
|
22
22
|
readonly '@nxlv/python': "22.1.1";
|
|
23
|
-
readonly '@nx-extend/terraform': "10.2.
|
|
24
|
-
readonly '@nx/devkit': "22.6.
|
|
25
|
-
readonly '@nx/react': "22.6.
|
|
26
|
-
readonly 'create-nx-workspace': "22.6.
|
|
27
|
-
readonly '@modelcontextprotocol/sdk': "1.
|
|
23
|
+
readonly '@nx-extend/terraform': "10.2.1";
|
|
24
|
+
readonly '@nx/devkit': "22.6.4";
|
|
25
|
+
readonly '@nx/react': "22.6.4";
|
|
26
|
+
readonly 'create-nx-workspace': "22.6.4";
|
|
27
|
+
readonly '@modelcontextprotocol/sdk': "1.29.0";
|
|
28
28
|
readonly '@modelcontextprotocol/inspector': "0.19.0";
|
|
29
29
|
readonly '@strands-agents/sdk': "0.7.0";
|
|
30
|
-
readonly '@tanstack/react-router': "1.168.
|
|
31
|
-
readonly '@tanstack/router-plugin': "1.167.
|
|
32
|
-
readonly '@tanstack/router-generator': "1.166.
|
|
30
|
+
readonly '@tanstack/react-router': "1.168.10";
|
|
31
|
+
readonly '@tanstack/router-plugin': "1.167.12";
|
|
32
|
+
readonly '@tanstack/router-generator': "1.166.24";
|
|
33
33
|
readonly '@tanstack/virtual-file-routes': "1.161.7";
|
|
34
34
|
readonly '@tanstack/router-utils': "1.161.6";
|
|
35
|
-
readonly '@cloudscape-design/board-components': "3.0.
|
|
36
|
-
readonly '@cloudscape-design/components': "3.0.
|
|
37
|
-
readonly '@cloudscape-design/global-styles': "1.0.
|
|
38
|
-
readonly '@tanstack/react-query': "5.
|
|
39
|
-
readonly '@tanstack/react-query-devtools': "5.
|
|
40
|
-
readonly '@trpc/tanstack-react-query': "11.
|
|
41
|
-
readonly '@trpc/client': "11.
|
|
42
|
-
readonly '@trpc/server': "11.
|
|
43
|
-
readonly '@types/node': "25.5.
|
|
35
|
+
readonly '@cloudscape-design/board-components': "3.0.164";
|
|
36
|
+
readonly '@cloudscape-design/components': "3.0.1266";
|
|
37
|
+
readonly '@cloudscape-design/global-styles': "1.0.56";
|
|
38
|
+
readonly '@tanstack/react-query': "5.96.2";
|
|
39
|
+
readonly '@tanstack/react-query-devtools': "5.96.2";
|
|
40
|
+
readonly '@trpc/tanstack-react-query': "11.16.0";
|
|
41
|
+
readonly '@trpc/client': "11.16.0";
|
|
42
|
+
readonly '@trpc/server': "11.16.0";
|
|
43
|
+
readonly '@types/node': "25.5.2";
|
|
44
44
|
readonly '@types/aws-lambda': "8.10.161";
|
|
45
45
|
readonly '@types/cors': "2.8.19";
|
|
46
46
|
readonly '@types/ws': "8.18.1";
|
|
47
47
|
readonly '@types/express': "5.0.6";
|
|
48
48
|
readonly '@smithy/types': "4.13.1";
|
|
49
|
-
readonly '@vitest/coverage-v8': "4.1.
|
|
50
|
-
readonly '@vitest/ui': "4.1.
|
|
49
|
+
readonly '@vitest/coverage-v8': "4.1.2";
|
|
50
|
+
readonly '@vitest/ui': "4.1.2";
|
|
51
51
|
readonly aws4fetch: "1.0.20";
|
|
52
|
-
readonly 'aws-cdk': "2.
|
|
53
|
-
readonly 'aws-cdk-lib': "2.
|
|
54
|
-
readonly '@aws-cdk/aws-bedrock-agentcore-alpha': "2.
|
|
52
|
+
readonly 'aws-cdk': "2.1117.0";
|
|
53
|
+
readonly 'aws-cdk-lib': "2.248.0";
|
|
54
|
+
readonly '@aws-cdk/aws-bedrock-agentcore-alpha': "2.248.0-alpha.0";
|
|
55
55
|
readonly 'aws-xray-sdk-core': "3.12.0";
|
|
56
56
|
readonly constructs: "10.6.0";
|
|
57
57
|
readonly cors: "2.8.6";
|
|
@@ -69,27 +69,27 @@ export declare const TS_VERSIONS: {
|
|
|
69
69
|
readonly 'typescript-eslint': "8.58.0";
|
|
70
70
|
readonly 'make-dir-cli': "4.0.0";
|
|
71
71
|
readonly ncp: "2.0.0";
|
|
72
|
-
readonly 'npm-check-updates': "19.6.
|
|
72
|
+
readonly 'npm-check-updates': "19.6.6";
|
|
73
73
|
readonly 'oidc-client-ts': "3.5.0";
|
|
74
74
|
readonly prettier: "3.8.1";
|
|
75
75
|
readonly 'react-oidc-context': "3.3.1";
|
|
76
76
|
readonly react: "19.2.4";
|
|
77
77
|
readonly 'react-dom': "19.2.4";
|
|
78
78
|
readonly rimraf: "6.1.3";
|
|
79
|
-
readonly rolldown: "1.0.0-rc.
|
|
79
|
+
readonly rolldown: "1.0.0-rc.13";
|
|
80
80
|
readonly 'source-map-support': "0.5.21";
|
|
81
81
|
readonly tailwindcss: "4.2.2";
|
|
82
82
|
readonly '@tailwindcss/vite': "4.2.2";
|
|
83
83
|
readonly tsx: "4.21.0";
|
|
84
84
|
readonly 'lucide-react': "1.7.0";
|
|
85
85
|
readonly 'radix-ui': "1.4.3";
|
|
86
|
-
readonly shadcn: "4.1.
|
|
86
|
+
readonly shadcn: "4.1.2";
|
|
87
87
|
readonly 'tw-animate-css': "1.4.0";
|
|
88
88
|
readonly 'tailwind-merge': "3.5.0";
|
|
89
|
-
readonly vite: "
|
|
89
|
+
readonly vite: "8.0.3";
|
|
90
90
|
readonly typescript: "6.0.2";
|
|
91
|
-
readonly vitest: "4.1.
|
|
92
|
-
readonly 'vite-tsconfig-paths': "
|
|
91
|
+
readonly vitest: "4.1.2";
|
|
92
|
+
readonly 'vite-tsconfig-paths': "6.1.1";
|
|
93
93
|
readonly zod: "4.3.6";
|
|
94
94
|
readonly ws: "8.20.0";
|
|
95
95
|
};
|
|
@@ -98,7 +98,7 @@ export type ITsDepVersion = keyof typeof TS_VERSIONS;
|
|
|
98
98
|
* Add versions to the given dependencies
|
|
99
99
|
*/
|
|
100
100
|
export declare const withVersions: (deps: ITsDepVersion[]) => {
|
|
101
|
-
[k: string]: "22.6.
|
|
101
|
+
[k: string]: "22.6.4" | "3.8.1" | "1.29.0" | "22.1.1" | "6.0.2" | "8.0.3" | "4.1.2" | "4.3.6" | "0.9.0" | "3.1024.0" | "1.0.0-alpha.10" | "2.32.0" | "7.2.1" | "10.2.1" | "0.19.0" | "0.7.0" | "1.168.10" | "1.167.12" | "1.166.24" | "1.161.7" | "1.161.6" | "3.0.164" | "3.0.1266" | "1.0.56" | "5.96.2" | "11.16.0" | "25.5.2" | "8.10.161" | "2.8.19" | "8.18.1" | "5.0.6" | "4.13.1" | "1.0.20" | "2.1117.0" | "2.248.0" | "2.248.0-alpha.0" | "3.12.0" | "10.6.0" | "2.8.6" | "0.7.1" | "2.1.1" | "3.7.3" | "0.27.4" | "1.0.31" | "1.0.5" | "8.58.0" | "5.5.5" | "5.2.1" | "3.1.0" | "4.0.0" | "2.0.0" | "19.6.6" | "3.5.0" | "3.3.1" | "19.2.4" | "6.1.3" | "1.0.0-rc.13" | "0.5.21" | "4.2.2" | "4.21.0" | "1.7.0" | "1.4.3" | "1.4.0" | "6.1.1" | "8.20.0";
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
104
|
* Versions for Python dependencies added by generators
|
|
@@ -108,16 +108,16 @@ export declare const PY_VERSIONS: {
|
|
|
108
108
|
readonly 'aws-lambda-powertools[tracer]': "==3.26.0";
|
|
109
109
|
readonly 'aws-lambda-powertools[parser]': "==3.26.0";
|
|
110
110
|
readonly 'aws-opentelemetry-distro': "==0.16.0";
|
|
111
|
-
readonly 'bedrock-agentcore': "==1.
|
|
112
|
-
readonly boto3: "==1.42.
|
|
113
|
-
readonly checkov: "==3.2.
|
|
114
|
-
readonly fastapi: "==0.135.
|
|
115
|
-
readonly 'fastapi[standard]': "==0.135.
|
|
116
|
-
readonly mcp: "==1.
|
|
111
|
+
readonly 'bedrock-agentcore': "==1.6.0";
|
|
112
|
+
readonly boto3: "==1.42.83";
|
|
113
|
+
readonly checkov: "==3.2.513";
|
|
114
|
+
readonly fastapi: "==0.135.3";
|
|
115
|
+
readonly 'fastapi[standard]': "==0.135.3";
|
|
116
|
+
readonly mcp: "==1.27.0";
|
|
117
117
|
readonly 'pip-check-updates': "==0.28.0";
|
|
118
|
-
readonly 'strands-agents': "==1.
|
|
119
|
-
readonly 'strands-agents-tools': "==0.
|
|
120
|
-
readonly uvicorn: "==0.
|
|
118
|
+
readonly 'strands-agents': "==1.34.1";
|
|
119
|
+
readonly 'strands-agents-tools': "==0.3.0";
|
|
120
|
+
readonly uvicorn: "==0.43.0";
|
|
121
121
|
};
|
|
122
122
|
export type IPyDepVersion = keyof typeof PY_VERSIONS;
|
|
123
123
|
/**
|