@aws/nx-plugin-mcp 0.96.0 → 0.97.1
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/bin/{aws-nx-mcp.cjs → aws-nx-mcp.js} +65 -146
- package/package.json +3 -3
|
@@ -18936,101 +18936,73 @@ const PackageManagerSchema = _enum(PACKAGE_MANAGERS);
|
|
|
18936
18936
|
*/
|
|
18937
18937
|
const IAC_PROVIDERS = ["CDK", "Terraform"];
|
|
18938
18938
|
//#endregion
|
|
18939
|
-
//#region ../nx-plugin/src/utils/
|
|
18939
|
+
//#region ../nx-plugin/src/utils/commands.ts
|
|
18940
|
+
const PACKAGE_MANAGER_COMMANDS = {
|
|
18941
|
+
npm: {
|
|
18942
|
+
exec: "npx",
|
|
18943
|
+
run: "npm run",
|
|
18944
|
+
create: "npm create"
|
|
18945
|
+
},
|
|
18946
|
+
pnpm: {
|
|
18947
|
+
exec: "pnpm",
|
|
18948
|
+
run: "pnpm",
|
|
18949
|
+
create: "pnpm create"
|
|
18950
|
+
},
|
|
18951
|
+
yarn: {
|
|
18952
|
+
exec: "yarn",
|
|
18953
|
+
run: "yarn",
|
|
18954
|
+
create: "yarn create"
|
|
18955
|
+
},
|
|
18956
|
+
bun: {
|
|
18957
|
+
exec: "bunx",
|
|
18958
|
+
run: "bun",
|
|
18959
|
+
create: "bun create"
|
|
18960
|
+
}
|
|
18961
|
+
};
|
|
18940
18962
|
/**
|
|
18941
|
-
*
|
|
18942
|
-
|
|
18963
|
+
* Build a package manager exec command (e.g. pnpm cmd, npx cmd, bunx cmd)
|
|
18964
|
+
*/
|
|
18965
|
+
const buildPackageManagerExecCommand = (pm, command) => {
|
|
18966
|
+
return `${PACKAGE_MANAGER_COMMANDS[pm]?.exec ?? pm} ${command}`;
|
|
18967
|
+
};
|
|
18968
|
+
/**
|
|
18969
|
+
* Build a short package manager command (e.g. pnpm build, npm run build)
|
|
18943
18970
|
*/
|
|
18971
|
+
const buildPackageManagerShortCommand = (pm, command) => {
|
|
18972
|
+
return `${PACKAGE_MANAGER_COMMANDS[pm]?.run ?? pm} ${command}`;
|
|
18973
|
+
};
|
|
18974
|
+
/**
|
|
18975
|
+
* Build an install command for a given package manager
|
|
18976
|
+
*/
|
|
18977
|
+
const buildInstallCommand = (pm, pkg, dev) => {
|
|
18978
|
+
switch (pm) {
|
|
18979
|
+
case "pnpm": return `pnpm add ${dev ? "-D" : "-"}w ${pkg}`;
|
|
18980
|
+
case "yarn": return `yarn add ${dev ? "-D " : ""}${pkg}`;
|
|
18981
|
+
case "npm": return `npm install --legacy-peer-deps ${dev ? "-D " : ""}${pkg}`;
|
|
18982
|
+
case "bun": return `bun install ${dev ? "-D " : ""}${pkg}`;
|
|
18983
|
+
default: return `${pm} install ${dev ? "-D " : ""}${pkg}`;
|
|
18984
|
+
}
|
|
18985
|
+
};
|
|
18944
18986
|
/**
|
|
18945
|
-
*
|
|
18987
|
+
* Build a command to create a new workspace using @aws/create-nx-workspace.
|
|
18988
|
+
*
|
|
18989
|
+
* Uses the `create` shorthand for each package manager:
|
|
18990
|
+
* npm create @aws/nx-workspace my-project
|
|
18991
|
+
* pnpm create @aws/nx-workspace my-project
|
|
18992
|
+
* yarn create @aws/nx-workspace my-project
|
|
18993
|
+
* bun create @aws/nx-workspace my-project
|
|
18994
|
+
*
|
|
18995
|
+
* The package manager is auto-detected by @aws/create-nx-workspace from the
|
|
18996
|
+
* invoking command, so --pm is not needed.
|
|
18946
18997
|
*/
|
|
18947
|
-
const
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
"
|
|
18955
|
-
"@aws-lambda-powertools/metrics": "2.32.0",
|
|
18956
|
-
"@aws-lambda-powertools/parameters": "2.32.0",
|
|
18957
|
-
"@aws-lambda-powertools/tracer": "2.32.0",
|
|
18958
|
-
"@aws-lambda-powertools/parser": "2.32.0",
|
|
18959
|
-
"@aws-sdk/client-appconfigdata": "3.1029.0",
|
|
18960
|
-
"@middy/core": "7.2.1",
|
|
18961
|
-
"@nxlv/python": "22.1.1",
|
|
18962
|
-
"@nx-extend/terraform": "10.2.1",
|
|
18963
|
-
"@nx/devkit": "22.6.5",
|
|
18964
|
-
"@nx/react": "22.6.5",
|
|
18965
|
-
"create-nx-workspace": "22.6.5",
|
|
18966
|
-
"@modelcontextprotocol/sdk": "1.29.0",
|
|
18967
|
-
"@modelcontextprotocol/inspector": "0.19.0",
|
|
18968
|
-
"@strands-agents/sdk": "0.7.0",
|
|
18969
|
-
"@tanstack/react-router": "1.168.17",
|
|
18970
|
-
"@tanstack/router-plugin": "1.167.16",
|
|
18971
|
-
"@tanstack/router-generator": "1.166.28",
|
|
18972
|
-
"@tanstack/virtual-file-routes": "1.161.7",
|
|
18973
|
-
"@tanstack/router-utils": "1.161.6",
|
|
18974
|
-
"@cloudscape-design/board-components": "3.0.166",
|
|
18975
|
-
"@cloudscape-design/components": "3.0.1272",
|
|
18976
|
-
"@cloudscape-design/global-styles": "1.0.57",
|
|
18977
|
-
"@tanstack/react-query": "5.99.0",
|
|
18978
|
-
"@tanstack/react-query-devtools": "5.99.0",
|
|
18979
|
-
"@trpc/tanstack-react-query": "11.16.0",
|
|
18980
|
-
"@trpc/client": "11.16.0",
|
|
18981
|
-
"@trpc/server": "11.16.0",
|
|
18982
|
-
"@types/node": "25.6.0",
|
|
18983
|
-
"@types/aws-lambda": "8.10.161",
|
|
18984
|
-
"@types/cors": "2.8.19",
|
|
18985
|
-
"@types/ws": "8.18.1",
|
|
18986
|
-
"@types/express": "5.0.6",
|
|
18987
|
-
"@smithy/types": "4.14.0",
|
|
18988
|
-
"@vitest/coverage-v8": "4.1.4",
|
|
18989
|
-
"@vitest/ui": "4.1.4",
|
|
18990
|
-
aws4fetch: "1.0.20",
|
|
18991
|
-
"aws-cdk": "2.1118.0",
|
|
18992
|
-
"aws-cdk-lib": "2.248.0",
|
|
18993
|
-
"@aws-cdk/aws-bedrock-agentcore-alpha": "2.248.0-alpha.0",
|
|
18994
|
-
"aws-xray-sdk-core": "3.12.0",
|
|
18995
|
-
constructs: "10.6.0",
|
|
18996
|
-
cors: "2.8.6",
|
|
18997
|
-
"class-variance-authority": "0.7.1",
|
|
18998
|
-
clsx: "2.1.1",
|
|
18999
|
-
electrodb: "3.7.5",
|
|
19000
|
-
esbuild: "0.28.0",
|
|
19001
|
-
"event-source-polyfill": "1.0.31",
|
|
19002
|
-
"@types/event-source-polyfill": "1.0.5",
|
|
19003
|
-
"@typescript-eslint/eslint-plugin": "8.58.1",
|
|
19004
|
-
"@typescript-eslint/parser": "8.58.1",
|
|
19005
|
-
"eslint-plugin-prettier": "5.5.5",
|
|
19006
|
-
express: "5.2.1",
|
|
19007
|
-
"jsonc-eslint-parser": "3.1.0",
|
|
19008
|
-
"typescript-eslint": "8.58.1",
|
|
19009
|
-
"make-dir-cli": "4.0.0",
|
|
19010
|
-
ncp: "2.0.0",
|
|
19011
|
-
"npm-check-updates": "19.6.6",
|
|
19012
|
-
"oidc-client-ts": "3.5.0",
|
|
19013
|
-
prettier: "3.8.2",
|
|
19014
|
-
"react-oidc-context": "3.3.1",
|
|
19015
|
-
react: "19.2.5",
|
|
19016
|
-
"react-dom": "19.2.5",
|
|
19017
|
-
rimraf: "6.1.3",
|
|
19018
|
-
rolldown: "1.0.0-rc.15",
|
|
19019
|
-
"source-map-support": "0.5.21",
|
|
19020
|
-
tailwindcss: "4.2.2",
|
|
19021
|
-
"@tailwindcss/vite": "4.2.2",
|
|
19022
|
-
tsx: "4.21.0",
|
|
19023
|
-
"lucide-react": "1.8.0",
|
|
19024
|
-
"radix-ui": "1.4.3",
|
|
19025
|
-
shadcn: "4.2.0",
|
|
19026
|
-
"tw-animate-css": "1.4.0",
|
|
19027
|
-
"tailwind-merge": "3.5.0",
|
|
19028
|
-
vite: "8.0.8",
|
|
19029
|
-
typescript: "6.0.2",
|
|
19030
|
-
vitest: "4.1.4",
|
|
19031
|
-
"vite-tsconfig-paths": "6.1.1",
|
|
19032
|
-
zod: "4.3.6",
|
|
19033
|
-
ws: "8.20.0"
|
|
18998
|
+
const buildCreateNxWorkspaceCommand = (pm, workspace, iacProvider) => {
|
|
18999
|
+
return [
|
|
19000
|
+
PACKAGE_MANAGER_COMMANDS[pm]?.create ?? `${pm} create`,
|
|
19001
|
+
"@aws/nx-workspace",
|
|
19002
|
+
...pm === "npm" ? ["--"] : [],
|
|
19003
|
+
workspace,
|
|
19004
|
+
...iacProvider ? [`--iacProvider=${iacProvider}`] : []
|
|
19005
|
+
].join(" ");
|
|
19034
19006
|
};
|
|
19035
19007
|
//#endregion
|
|
19036
19008
|
//#region ../nx-plugin/src/mcp-server/tools/create-workspace-command.ts
|
|
@@ -19049,7 +19021,7 @@ const addCreateWorkspaceCommandTool = (server) => {
|
|
|
19049
19021
|
text: `Run the following command to create a workspace:
|
|
19050
19022
|
|
|
19051
19023
|
\`\`\`bash
|
|
19052
|
-
|
|
19024
|
+
${buildCreateNxWorkspaceCommand(packageManager, workspaceName)} --no-interactive
|
|
19053
19025
|
\`\`\`
|
|
19054
19026
|
|
|
19055
19027
|
This will create a new workspace within the ${workspaceName} directory.
|
|
@@ -20069,59 +20041,6 @@ const kebabCase = (str) => {
|
|
|
20069
20041
|
return (0, import_lodash_deburr.default)(str).replace(/[^a-zA-Z0-9]+/g, "-").replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().replace(/^-+|-+$/g, "");
|
|
20070
20042
|
};
|
|
20071
20043
|
//#endregion
|
|
20072
|
-
//#region ../nx-plugin/src/utils/commands.ts
|
|
20073
|
-
/**
|
|
20074
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
20075
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
20076
|
-
*/
|
|
20077
|
-
const PACKAGE_MANAGER_COMMANDS = {
|
|
20078
|
-
npm: {
|
|
20079
|
-
exec: "npx",
|
|
20080
|
-
run: "npm run"
|
|
20081
|
-
},
|
|
20082
|
-
pnpm: {
|
|
20083
|
-
exec: "pnpm",
|
|
20084
|
-
run: "pnpm"
|
|
20085
|
-
},
|
|
20086
|
-
yarn: {
|
|
20087
|
-
exec: "yarn",
|
|
20088
|
-
run: "yarn"
|
|
20089
|
-
},
|
|
20090
|
-
bun: {
|
|
20091
|
-
exec: "bunx",
|
|
20092
|
-
run: "bun"
|
|
20093
|
-
}
|
|
20094
|
-
};
|
|
20095
|
-
/**
|
|
20096
|
-
* Build a package manager exec command (e.g. pnpm cmd, npx cmd, bunx cmd)
|
|
20097
|
-
*/
|
|
20098
|
-
const buildPackageManagerExecCommand = (pm, command) => {
|
|
20099
|
-
return `${PACKAGE_MANAGER_COMMANDS[pm]?.exec ?? pm} ${command}`;
|
|
20100
|
-
};
|
|
20101
|
-
/**
|
|
20102
|
-
* Build a short package manager command (e.g. pnpm build, npm run build)
|
|
20103
|
-
*/
|
|
20104
|
-
const buildPackageManagerShortCommand = (pm, command) => {
|
|
20105
|
-
return `${PACKAGE_MANAGER_COMMANDS[pm]?.run ?? pm} ${command}`;
|
|
20106
|
-
};
|
|
20107
|
-
/**
|
|
20108
|
-
* Build an install command for a given package manager
|
|
20109
|
-
*/
|
|
20110
|
-
const buildInstallCommand = (pm, pkg, dev) => {
|
|
20111
|
-
switch (pm) {
|
|
20112
|
-
case "pnpm": return `pnpm add ${dev ? "-D" : "-"}w ${pkg}`;
|
|
20113
|
-
case "yarn": return `yarn add ${dev ? "-D " : ""}${pkg}`;
|
|
20114
|
-
case "npm": return `npm install --legacy-peer-deps ${dev ? "-D " : ""}${pkg}`;
|
|
20115
|
-
case "bun": return `bun install ${dev ? "-D " : ""}${pkg}`;
|
|
20116
|
-
default: return `${pm} install ${dev ? "-D " : ""}${pkg}`;
|
|
20117
|
-
}
|
|
20118
|
-
};
|
|
20119
|
-
/**
|
|
20120
|
-
* Build a create-nx-workspace command.
|
|
20121
|
-
* Defaults to the pinned create-nx-workspace version from TS_VERSIONS.
|
|
20122
|
-
*/
|
|
20123
|
-
const buildCreateNxWorkspaceCommand = (pm, workspace, iacProvider, yes = false, nxVersion = TS_VERSIONS["create-nx-workspace"], nxPluginVersion) => `npx ${yes ? "-y " : ""}create-nx-workspace@${nxVersion} ${workspace} --pm=${pm} --preset=@aws/nx-plugin${nxPluginVersion ? `@${nxPluginVersion}` : ""}${iacProvider ? ` --iacProvider=${iacProvider}` : ""} --ci=skip --analytics=false --aiAgents`;
|
|
20124
|
-
//#endregion
|
|
20125
20044
|
//#region ../nx-plugin/src/mcp-server/generator-info.ts
|
|
20126
20045
|
/**
|
|
20127
20046
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -20131,7 +20050,7 @@ const buildCreateNxWorkspaceCommand = (pm, workspace, iacProvider, yes = false,
|
|
|
20131
20050
|
* Build a command to run nx
|
|
20132
20051
|
*/
|
|
20133
20052
|
const buildNxCommand = (command, pm) => pm ? buildPackageManagerExecCommand(pm, `nx ${command}`) : `nx ${command}`;
|
|
20134
|
-
const renderSchema = (schema) => Object.entries(schema.properties).map(([parameter, parameterSchema]) => `- ${parameter} [type: ${parameterSchema.type}]${(schema.required ?? []).includes(parameter) ? ` (required)` : ""} ${parameterSchema.description}`).join("\n");
|
|
20053
|
+
const renderSchema = (schema) => Object.entries(schema.properties).map(([parameter, parameterSchema]) => `- ${parameter} [type: ${parameterSchema.type}]${parameterSchema.enum ? ` [options: ${parameterSchema.enum.join(", ")}]` : ""}${(schema.required ?? []).includes(parameter) ? ` (required)` : ""} ${parameterSchema.description}`).join("\n");
|
|
20135
20054
|
const renderGeneratorCommand = (generatorId, schema, packageManager) => `\`\`\`bash
|
|
20136
20055
|
${buildNxCommand(`g @aws/nx-plugin:${generatorId} --no-interactive ${Object.entries(schema.properties).filter(([parameter]) => (schema.required ?? []).includes(parameter)).map(([parameter]) => `--${parameter}=<${parameter}>`).join(" ")}`, packageManager)}
|
|
20137
20056
|
\`\`\``;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/nx-plugin-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.97.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/awslabs/nx-plugin-for-aws.git",
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
|
-
"aws-nx-mcp": "./bin/aws-nx-mcp.
|
|
16
|
+
"aws-nx-mcp": "./bin/aws-nx-mcp.js"
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
}
|