@aws/nx-plugin 0.23.1 → 0.25.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 +212 -29
- package/README.md +22 -0
- package/bin/aws-nx-mcp.d.ts +2 -0
- package/bin/aws-nx-mcp.js +18 -0
- package/bin/aws-nx-mcp.js.map +1 -0
- package/generators.json +24 -10
- package/package.json +7 -2
- package/src/api-connection/generator.js +2 -1
- package/src/api-connection/generator.js.map +1 -1
- package/src/cloudscape-website/cognito-auth/generator.js +1 -1
- package/src/cloudscape-website/cognito-auth/generator.js.map +1 -1
- package/src/cloudscape-website/runtime-config/generator.js +1 -1
- package/src/cloudscape-website/runtime-config/generator.js.map +1 -1
- package/src/mcp-server/generator-info.d.ts +23 -0
- package/src/mcp-server/generator-info.js +134 -0
- package/src/mcp-server/generator-info.js.map +1 -0
- package/src/mcp-server/index.d.ts +1 -0
- package/src/mcp-server/index.js +17 -0
- package/src/mcp-server/index.js.map +1 -0
- package/src/mcp-server/schema.d.ts +7 -0
- package/src/mcp-server/schema.js +11 -0
- package/src/mcp-server/schema.js.map +1 -0
- package/src/mcp-server/server.d.ts +9 -0
- package/src/mcp-server/server.js +40 -0
- package/src/mcp-server/server.js.map +1 -0
- package/src/mcp-server/tools/create-workspace-command.d.ts +9 -0
- package/src/mcp-server/tools/create-workspace-command.js +34 -0
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -0
- package/src/mcp-server/tools/general-guidance.d.ts +11 -0
- package/src/mcp-server/tools/general-guidance.js +75 -0
- package/src/mcp-server/tools/general-guidance.js.map +1 -0
- package/src/mcp-server/tools/generator-guide.d.ts +10 -0
- package/src/mcp-server/tools/generator-guide.js +36 -0
- package/src/mcp-server/tools/generator-guide.js.map +1 -0
- package/src/mcp-server/tools/list-generators.d.ts +10 -0
- package/src/mcp-server/tools/list-generators.js +23 -0
- package/src/mcp-server/tools/list-generators.js.map +1 -0
- package/src/py/fast-api/react/generator.js +5 -5
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/lambda-function/generator.js +2 -2
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/trpc/react/generator.js +5 -5
- package/src/trpc/react/generator.js.map +1 -1
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +1 -2
- package/src/ts/nx-generator/files/nx-plugin-for-aws/docs/__nameKebabCase__.mdx.template +1 -2
- package/src/ts/nx-generator/generator.js +1 -1
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/utils/nx.d.ts +18 -0
- package/src/utils/nx.js +38 -6
- package/src/utils/nx.js.map +1 -1
- package/src/utils/paths.js +2 -6
- package/src/utils/paths.js.map +1 -1
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +1 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.postProcessGuide = exports.fetchGuidePages = exports.fetchGuidePagesForGenerator = exports.renderGeneratorInfo = exports.buildNxCommand = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
const lodash_kebabcase_1 = tslib_1.__importDefault(require("lodash.kebabcase"));
|
|
10
|
+
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
11
|
+
/**
|
|
12
|
+
* Build a command to run nx
|
|
13
|
+
*/
|
|
14
|
+
const buildNxCommand = (command, pm) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return `${pm
|
|
17
|
+
? `${(_a = {
|
|
18
|
+
npm: 'npx',
|
|
19
|
+
bun: 'bunx',
|
|
20
|
+
}[pm]) !== null && _a !== void 0 ? _a : pm} `
|
|
21
|
+
: ''}nx ${command}`;
|
|
22
|
+
};
|
|
23
|
+
exports.buildNxCommand = buildNxCommand;
|
|
24
|
+
const renderSchema = (schema) => Object.entries(schema.properties)
|
|
25
|
+
.map(([parameter, parameterSchema]) => { var _a; return `- ${parameter} [type: ${parameterSchema.type}]${((_a = schema.required) !== null && _a !== void 0 ? _a : []).includes(parameter) ? ` (required)` : ''} ${parameterSchema.description}`; })
|
|
26
|
+
.join('\n');
|
|
27
|
+
const renderGeneratorCommand = (generatorId, schema, packageManager) => `\`\`\`bash
|
|
28
|
+
${(0, exports.buildNxCommand)(`g @aws/nx-plugin:${generatorId} --no-interactive ${Object.entries(schema.properties)
|
|
29
|
+
.filter(([parameter]) => { var _a; return ((_a = schema.required) !== null && _a !== void 0 ? _a : []).includes(parameter); })
|
|
30
|
+
.map(([parameter]) => `--${parameter}=<${parameter}>`)
|
|
31
|
+
.join(' ')}`, packageManager)}
|
|
32
|
+
\`\`\``;
|
|
33
|
+
/**
|
|
34
|
+
* Render summary information about a generator
|
|
35
|
+
*/
|
|
36
|
+
const renderGeneratorInfo = (packageManager, info) => {
|
|
37
|
+
const schema = JSON.parse(fs_1.default.readFileSync(info.resolvedSchemaPath, 'utf-8'));
|
|
38
|
+
return `${info.id}
|
|
39
|
+
|
|
40
|
+
Description: ${info.description}
|
|
41
|
+
|
|
42
|
+
Available Parameters:
|
|
43
|
+
${renderSchema(schema)}
|
|
44
|
+
|
|
45
|
+
Command:
|
|
46
|
+
${renderGeneratorCommand(info.id, schema, packageManager)}
|
|
47
|
+
`;
|
|
48
|
+
};
|
|
49
|
+
exports.renderGeneratorInfo = renderGeneratorInfo;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieve the markdown guide pages for a generator from github.
|
|
52
|
+
* If the generator has guidePages in generators.json we fetch all of those, otherwise we
|
|
53
|
+
* try to fetch a guide with the generator name kebab-cased.
|
|
54
|
+
*/
|
|
55
|
+
const fetchGuidePagesForGenerator = (info, generators, packageManager) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
56
|
+
var _a;
|
|
57
|
+
return yield (0, exports.fetchGuidePages)((_a = info.guidePages) !== null && _a !== void 0 ? _a : [(0, lodash_kebabcase_1.default)(info.id)], generators, packageManager);
|
|
58
|
+
});
|
|
59
|
+
exports.fetchGuidePagesForGenerator = fetchGuidePagesForGenerator;
|
|
60
|
+
/**
|
|
61
|
+
* Fetch markdown guide pages from github
|
|
62
|
+
*/
|
|
63
|
+
const fetchGuidePages = (guidePages, generators, packageManager) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
const guides = yield Promise.allSettled(guidePages.map((guide) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
65
|
+
return yield (yield fetch(`https://raw.githubusercontent.com/awslabs/nx-plugin-for-aws/refs/heads/main/docs/src/content/docs/en/guides/${guide}.mdx`)).text();
|
|
66
|
+
})));
|
|
67
|
+
return guides
|
|
68
|
+
.filter((result) => result.status === 'fulfilled')
|
|
69
|
+
.map((result) => (0, exports.postProcessGuide)(result.value, generators, packageManager))
|
|
70
|
+
.join('\n\n');
|
|
71
|
+
});
|
|
72
|
+
exports.fetchGuidePages = fetchGuidePages;
|
|
73
|
+
const findGeneratorAndSchema = (generators, generatorId) => {
|
|
74
|
+
const generator = generators.find((info) => info.id === generatorId);
|
|
75
|
+
if (!generator) {
|
|
76
|
+
return undefined;
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
const schema = JSON.parse(fs_1.default.readFileSync(generator.resolvedSchemaPath, 'utf-8'));
|
|
80
|
+
return { generator, schema };
|
|
81
|
+
}
|
|
82
|
+
catch (_a) {
|
|
83
|
+
return undefined;
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Post-process a guide page to "inline" relevant components
|
|
88
|
+
*/
|
|
89
|
+
const postProcessGuide = (guide, generators, packageManager) => {
|
|
90
|
+
// Replace <NxCommands /> with markdown code blocks
|
|
91
|
+
let processedGuide = guide.replace(/<NxCommands\s+commands={([^}]+)}\s*\/>/g, (match, commandsMatch) => {
|
|
92
|
+
try {
|
|
93
|
+
const commands = JSON.parse(commandsMatch
|
|
94
|
+
.replaceAll("\\'", '__ESCAPED_SINGLE_QUOTE__')
|
|
95
|
+
.replaceAll("'", '"')
|
|
96
|
+
.replaceAll('__ESCAPED_SINGLE_QUOTE__', "\\'"));
|
|
97
|
+
return `\`\`\`bash\n${commands.map((command) => (0, exports.buildNxCommand)(command, packageManager)).join('\n')}\n\`\`\``;
|
|
98
|
+
}
|
|
99
|
+
catch (_a) {
|
|
100
|
+
return match;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
// Replace <RunGenerator /> with renderGeneratorCommand
|
|
104
|
+
processedGuide = processedGuide.replace(/<RunGenerator\s+([^/>]+)\s*\/>/g, (match, attributes) => {
|
|
105
|
+
// Extract generator parameter
|
|
106
|
+
const generatorMatch = attributes.match(/generator=["']([^"']+)["']/);
|
|
107
|
+
if (!generatorMatch) {
|
|
108
|
+
return match; // If no generator parameter, leave as is
|
|
109
|
+
}
|
|
110
|
+
const generatorId = generatorMatch[1];
|
|
111
|
+
const info = findGeneratorAndSchema(generators, generatorId);
|
|
112
|
+
if (!info) {
|
|
113
|
+
return match;
|
|
114
|
+
}
|
|
115
|
+
return renderGeneratorCommand(generatorId, info.schema, packageManager);
|
|
116
|
+
});
|
|
117
|
+
// Replace <GeneratorParameters /> with renderSchema
|
|
118
|
+
processedGuide = processedGuide.replace(/<GeneratorParameters\s+([^/>]+)\s*\/>/g, (match, attributes) => {
|
|
119
|
+
// Extract generator parameter
|
|
120
|
+
const generatorMatch = attributes.match(/generator=["']([^"']+)["']/);
|
|
121
|
+
if (!generatorMatch) {
|
|
122
|
+
return match; // If no generator parameter, leave as is
|
|
123
|
+
}
|
|
124
|
+
const generatorId = generatorMatch[1];
|
|
125
|
+
const info = findGeneratorAndSchema(generators, generatorId);
|
|
126
|
+
if (!info) {
|
|
127
|
+
return match;
|
|
128
|
+
}
|
|
129
|
+
return renderSchema(info.schema);
|
|
130
|
+
});
|
|
131
|
+
return processedGuide;
|
|
132
|
+
};
|
|
133
|
+
exports.postProcessGuide = postProcessGuide;
|
|
134
|
+
//# sourceMappingURL=generator-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-info.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/generator-info.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,gFAAyC;AAEzC,oDAAoB;AAEpB;;GAEG;AACI,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,EAAW,EAAE,EAAE;;IAC7D,OAAA,GACE,EAAE;QACA,CAAC,CAAC,GACE,MAAA;YACE,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,MAAM;SACZ,CAAC,EAAE,CAAC,mCAAI,EACX,GAAG;QACL,CAAC,CAAC,EACN,MAAM,OAAO,EAAE,CAAA;CAAA,CAAC;AAVL,QAAA,cAAc,kBAUT;AAElB,MAAM,YAAY,GAAG,CAAC,MAAW,EAAE,EAAE,CACnC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;KAC9B,GAAG,CACF,CAAC,CAAC,SAAS,EAAE,eAAe,CAAgB,EAAE,EAAE,WAC9C,OAAA,KAAK,SAAS,WAAW,eAAe,CAAC,IAAI,IAAI,CAAC,MAAA,MAAM,CAAC,QAAQ,mCAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,IAAI,eAAe,CAAC,WAAW,EAAE,CAAA,EAAA,CACrJ;KACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAEhB,MAAM,sBAAsB,GAAG,CAC7B,WAAmB,EACnB,MAAW,EACX,cAAuB,EACvB,EAAE,CAAC;EACH,IAAA,sBAAc,EACd,oBAAoB,WAAW,qBAAqB,MAAM,CAAC,OAAO,CAChE,MAAM,CAAC,UAAU,CAClB;KACE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE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,cAAc,CAAC,CAAC,CAAC,CAAC;QAEtC,MAAM,IAAI,GAAG,sBAAsB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAE7D,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC,CACF,CAAC;IAEF,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AApEW,QAAA,gBAAgB,oBAoE3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const startMcpServer: () => Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startMcpServer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
*/
|
|
9
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
10
|
+
const server_1 = require("./server");
|
|
11
|
+
const startMcpServer = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
13
|
+
yield (0, server_1.createServer)().connect(transport);
|
|
14
|
+
console.error('Nx Plugin for AWS MCP Server listening on STDIO');
|
|
15
|
+
});
|
|
16
|
+
exports.startMcpServer = startMcpServer;
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/index.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,wEAAiF;AACjF,qCAAwC;AAEjC,MAAM,cAAc,GAAG,GAAS,EAAE;IACvC,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,IAAA,qBAAY,GAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACxC,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;AACnE,CAAC,CAAA,CAAC;AAJW,QAAA,cAAc,kBAIzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export declare const PACKAGE_MANAGERS: readonly ["pnpm", "yarn", "npm", "bun"];
|
|
7
|
+
export declare const PackageManagerSchema: z.ZodEnum<["pnpm", "yarn", "npm", "bun"]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PackageManagerSchema = exports.PACKAGE_MANAGERS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
const zod_1 = require("zod");
|
|
9
|
+
exports.PACKAGE_MANAGERS = ['pnpm', 'yarn', 'npm', 'bun'];
|
|
10
|
+
exports.PackageManagerSchema = zod_1.z.enum(exports.PACKAGE_MANAGERS);
|
|
11
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/schema.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,6BAAwB;AAEX,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAC3D,QAAA,oBAAoB,GAAG,OAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
/**
|
|
7
|
+
* Create the MCP Server
|
|
8
|
+
*/
|
|
9
|
+
export declare const createServer: () => McpServer;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createServer = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
9
|
+
const nx_1 = require("../utils/nx");
|
|
10
|
+
const create_workspace_command_1 = require("./tools/create-workspace-command");
|
|
11
|
+
const list_generators_1 = require("./tools/list-generators");
|
|
12
|
+
const generator_guide_1 = require("./tools/generator-guide");
|
|
13
|
+
const general_guidance_1 = require("./tools/general-guidance");
|
|
14
|
+
/**
|
|
15
|
+
* Create the MCP Server
|
|
16
|
+
*/
|
|
17
|
+
const createServer = () => {
|
|
18
|
+
const generators = (0, nx_1.listGenerators)();
|
|
19
|
+
const server = new mcp_js_1.McpServer({
|
|
20
|
+
name: 'nx-plugin-for-aws',
|
|
21
|
+
version: '1.0.0',
|
|
22
|
+
}, {
|
|
23
|
+
instructions: `# Nx Plugin for AWS MCP Server
|
|
24
|
+
|
|
25
|
+
This server provides resources and tools for quickly scaffolding AWS projects within an Nx workspace (monorepo), using the Nx Plugin for AWS (@aws/nx-plugin).
|
|
26
|
+
|
|
27
|
+
The Nx Plugin for AWS provides "generators" to add projects or functionality to your workspace. Use this to build the foundations of any project you are building
|
|
28
|
+
on AWS, if the generators apply to your use case.
|
|
29
|
+
|
|
30
|
+
${general_guidance_1.TOOL_SELECTION_GUIDE}
|
|
31
|
+
`,
|
|
32
|
+
});
|
|
33
|
+
(0, general_guidance_1.addGeneralGuidanceTool)(server, generators);
|
|
34
|
+
(0, create_workspace_command_1.addCreateWorkspaceCommandTool)(server);
|
|
35
|
+
(0, list_generators_1.addListGeneratorsTool)(server, generators);
|
|
36
|
+
(0, generator_guide_1.addGeneratorGuideTool)(server, generators);
|
|
37
|
+
return server;
|
|
38
|
+
};
|
|
39
|
+
exports.createServer = createServer;
|
|
40
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/server.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,oEAAoE;AACpE,oCAA6C;AAC7C,+EAAiF;AACjF,6DAAgE;AAChE,6DAAgE;AAChE,+DAGkC;AAElC;;GAEG;AACI,MAAM,YAAY,GAAG,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,IAAA,mBAAc,GAAE,CAAC;IAEpC,MAAM,MAAM,GAAG,IAAI,kBAAS,CAC1B;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,OAAO;KACjB,EACD;QACE,YAAY,EAAE;;;;;;;EAOlB,uCAAoB;CACrB;KACI,CACF,CAAC;IAEF,IAAA,yCAAsB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC3C,IAAA,wDAA6B,EAAC,MAAM,CAAC,CAAC;IACtC,IAAA,uCAAqB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC1C,IAAA,uCAAqB,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAE1C,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA3BW,QAAA,YAAY,gBA2BvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
/**
|
|
7
|
+
* Add a tool which tells a model how to create an Nx workspace
|
|
8
|
+
*/
|
|
9
|
+
export declare const addCreateWorkspaceCommandTool: (server: McpServer) => void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addCreateWorkspaceCommandTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schema_1 = require("../schema");
|
|
6
|
+
/**
|
|
7
|
+
* Add a tool which tells a model how to create an Nx workspace
|
|
8
|
+
*/
|
|
9
|
+
const addCreateWorkspaceCommandTool = (server) => {
|
|
10
|
+
server.tool('create-workspace-command', { workspaceName: zod_1.z.string(), packageManager: schema_1.PackageManagerSchema }, ({ workspaceName, packageManager }) => ({
|
|
11
|
+
content: [
|
|
12
|
+
{
|
|
13
|
+
type: 'text',
|
|
14
|
+
text: `Run the following command to create a workspace:
|
|
15
|
+
|
|
16
|
+
\`\`\`bash
|
|
17
|
+
npx create-nx-workspace@~21.0.3 ${workspaceName} --pm=${packageManager} --preset=@aws/nx-plugin --ci=skip
|
|
18
|
+
\`\`\`
|
|
19
|
+
|
|
20
|
+
Note that this will create a workspace in a new directory named ${workspaceName}. If you are already working in the directory
|
|
21
|
+
you would like for your workspace, you can move all the files up one level and delete the empty directory afterwards, eg:
|
|
22
|
+
|
|
23
|
+
\`\`\`bash
|
|
24
|
+
mv ${workspaceName}/{*,.*} ./ && rm -rf ${workspaceName}
|
|
25
|
+
\`\`\`
|
|
26
|
+
|
|
27
|
+
(Note that the above command will complain about moving . and .. but that is expected and ok!)
|
|
28
|
+
`,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
exports.addCreateWorkspaceCommandTool = addCreateWorkspaceCommandTool;
|
|
34
|
+
//# sourceMappingURL=create-workspace-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-workspace-command.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/create-workspace-command.ts"],"names":[],"mappings":";;;AAKA,6BAAwB;AACxB,sCAAiD;AAEjD;;GAEG;AACI,MAAM,6BAA6B,GAAG,CAAC,MAAiB,EAAE,EAAE;IACjE,MAAM,CAAC,IAAI,CACT,0BAA0B,EAC1B,EAAE,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,cAAc,EAAE,6BAAoB,EAAE,EACnE,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;;;kCAGkB,aAAa,SAAS,cAAc;;;kEAGJ,aAAa;;;;KAI1E,aAAa,wBAAwB,aAAa;;;;GAIpD;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,6BAA6B,iCA2BxC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
import { NxGeneratorInfo } from '../../utils/nx';
|
|
7
|
+
export declare const TOOL_SELECTION_GUIDE = "## Tool Selection Guide\n\n- Use the `general-guidance` tool for guidance and best practices for working with Nx and the Nx Plugin for AWS.\n- Use the `create-workspace-command` tool to discover how to create a workspace to start a new project.\n- Use the `list-generators` tool to discover the available generators and how to run them.\n- Use the `generator-guide` tool to retrieve detailed information about a specific generator.";
|
|
8
|
+
/**
|
|
9
|
+
* Add a tool which provides general guidance for using Nx and the Nx Plugin for AWS
|
|
10
|
+
*/
|
|
11
|
+
export declare const addGeneralGuidanceTool: (server: McpServer, generators: NxGeneratorInfo[]) => void;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addGeneralGuidanceTool = exports.TOOL_SELECTION_GUIDE = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const schema_1 = require("../schema");
|
|
6
|
+
const generator_info_1 = require("../generator-info");
|
|
7
|
+
exports.TOOL_SELECTION_GUIDE = `## Tool Selection Guide
|
|
8
|
+
|
|
9
|
+
- Use the \`general-guidance\` tool for guidance and best practices for working with Nx and the Nx Plugin for AWS.
|
|
10
|
+
- Use the \`create-workspace-command\` tool to discover how to create a workspace to start a new project.
|
|
11
|
+
- Use the \`list-generators\` tool to discover the available generators and how to run them.
|
|
12
|
+
- Use the \`generator-guide\` tool to retrieve detailed information about a specific generator.`;
|
|
13
|
+
/**
|
|
14
|
+
* Add a tool which provides general guidance for using Nx and the Nx Plugin for AWS
|
|
15
|
+
*/
|
|
16
|
+
const addGeneralGuidanceTool = (server, generators) => {
|
|
17
|
+
server.tool('general-guidance', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
return ({
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: `# Nx Plugin for AWS Guidance
|
|
23
|
+
|
|
24
|
+
${exports.TOOL_SELECTION_GUIDE}
|
|
25
|
+
|
|
26
|
+
## Getting Started
|
|
27
|
+
|
|
28
|
+
- Choose a package manager first. You can choose between ${schema_1.PACKAGE_MANAGERS.join(' ,')}. It's recommended to use "pnpm" if the user has no preference
|
|
29
|
+
- Next, you must create an Nx workspace. Use the \`create-workspace-command\` tool for more details, and provide it with your chosen package manager
|
|
30
|
+
- After this, you can start scaffolding the main components of your application using generators. Use the \`list-generators\` tool to discover available generators, and the \`generator-guide\` tool for more detailed information about a specific generator
|
|
31
|
+
|
|
32
|
+
## Nx Primer
|
|
33
|
+
|
|
34
|
+
- Prefix nx commands with the appropriate prefix for your package manager, for example:
|
|
35
|
+
${schema_1.PACKAGE_MANAGERS.map((pm) => (0, generator_info_1.buildNxCommand)('<options>', pm)).join(' - \n')}
|
|
36
|
+
- Each project in your workspace has a file named \`project.json\` which contains important project information such as its name, and defines the "targets" which can be run for that project, for example building or testing the project
|
|
37
|
+
- Use the command \`nx reset\` to reset the Nx daemon when unexpected issues arise
|
|
38
|
+
- After adding dependencies between projects, use \`nx sync\` to ensure project references are set up correctly
|
|
39
|
+
|
|
40
|
+
## General Instructions
|
|
41
|
+
|
|
42
|
+
- Workspaces contain a single \`package.json\` file at the root which defines the dependencies for all projects. Therefore when installing dependencies, you must add these to the root workspace using the appropriate command for your package manager:
|
|
43
|
+
- pnpm add -w -D <package>
|
|
44
|
+
- yarn add -D <package>
|
|
45
|
+
- npm install --legacy-peer-deps -D <package>
|
|
46
|
+
- bun install -D <package>
|
|
47
|
+
- (Omit -D for production dependencies)
|
|
48
|
+
- When specifying project names as arguments to generators, prefer the _fully qualified_ project name, for example \`@workspace-name/project-name\`. Check the \`project.json\` file for the specific package to find its fully qualified name
|
|
49
|
+
- When no generator exists for a specific framework required, use the base \`ts#project\` and \`py#project\` generators and build on top, unless building a React website in which case use the \`ts#cloudscape-website\` generator and replace CloudScape with your desired UI component library
|
|
50
|
+
|
|
51
|
+
## Useful Commands
|
|
52
|
+
|
|
53
|
+
- Fix lint issues with \`nx run-many --target lint --configuration=fix --all --output-style=stream\`
|
|
54
|
+
- Build all projects with \`nx run-many --target build --all --output-style=stream\`
|
|
55
|
+
- Prefer importing the CDK constructs vended by generators in \`packages/common/constructs\` over writing your own
|
|
56
|
+
|
|
57
|
+
## Best Practices
|
|
58
|
+
|
|
59
|
+
- Generate all projects into the \`packages/\` directory
|
|
60
|
+
- After making changes to your projects, fix linting issues, then run a full build
|
|
61
|
+
|
|
62
|
+
## Language Specific Guidance
|
|
63
|
+
|
|
64
|
+
Please refer to the below documentation for important details regarding working with any TypeScript or Python projects.
|
|
65
|
+
|
|
66
|
+
${yield (0, generator_info_1.fetchGuidePages)(['typescript-project', 'python-project'], generators)}
|
|
67
|
+
|
|
68
|
+
`,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
});
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
exports.addGeneralGuidanceTool = addGeneralGuidanceTool;
|
|
75
|
+
//# sourceMappingURL=general-guidance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"general-guidance.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/general-guidance.ts"],"names":[],"mappings":";;;;AAMA,sCAA6C;AAC7C,sDAAoE;AAEvD,QAAA,oBAAoB,GAAG;;;;;gGAK4D,CAAC;AAEjG;;GAEG;AACI,MAAM,sBAAsB,GAAG,CACpC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,GAAS,EAAE;QAAC,OAAA,CAAC;YAC3C,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;EAEZ,4BAAoB;;;;2DAIqC,yBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;EAOpF,yBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B3E,MAAM,IAAA,gCAAe,EAAC,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,EAAE,UAAU,CAAC;;KAExE;iBACE;aACF;SACF,CAAC,CAAA;MAAA,CAAC,CAAC;AACN,CAAC,CAAC;AA1DW,QAAA,sBAAsB,0BA0DjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
import { NxGeneratorInfo } from '../../utils/nx';
|
|
7
|
+
/**
|
|
8
|
+
* Add a tool which provides a detailed guide for an individual generator
|
|
9
|
+
*/
|
|
10
|
+
export declare const addGeneratorGuideTool: (server: McpServer, generators: NxGeneratorInfo[]) => void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addGeneratorGuideTool = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const generator_info_1 = require("../generator-info");
|
|
7
|
+
const schema_1 = require("../schema");
|
|
8
|
+
/**
|
|
9
|
+
* Add a tool which provides a detailed guide for an individual generator
|
|
10
|
+
*/
|
|
11
|
+
const addGeneratorGuideTool = (server, generators) => {
|
|
12
|
+
server.tool('generator-guide', {
|
|
13
|
+
packageManager: schema_1.PackageManagerSchema,
|
|
14
|
+
generator: zod_1.z.custom((v) => generators.map((g) => g.id).includes(v)),
|
|
15
|
+
}, (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ packageManager, generator: generatorId }) {
|
|
16
|
+
const generator = generators.find((g) => g.id === generatorId);
|
|
17
|
+
if (!generator) {
|
|
18
|
+
throw new Error(`No generator found with id ${generatorId}. Available generators: ${generators.map((g) => g.id).join(' ,')}`);
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: `## ${(0, generator_info_1.renderGeneratorInfo)(packageManager, generator)}
|
|
25
|
+
|
|
26
|
+
# Guide
|
|
27
|
+
|
|
28
|
+
${yield (0, generator_info_1.fetchGuidePagesForGenerator)(generator, generators, packageManager)}
|
|
29
|
+
`,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
};
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
exports.addGeneratorGuideTool = addGeneratorGuideTool;
|
|
36
|
+
//# sourceMappingURL=generator-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-guide.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/generator-guide.ts"],"names":[],"mappings":";;;;AAMA,6BAAwB;AACxB,sDAG2B;AAC3B,sCAAiD;AAEjD;;GAEG;AACI,MAAM,qBAAqB,GAAG,CACnC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB;QACE,cAAc,EAAE,6BAAoB;QACpC,SAAS,EAAE,OAAC,CAAC,MAAM,CAAS,CAAC,CAAC,EAAE,EAAE,CAChC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACxC;KACF,EACD,KAAmD,EAAE,oDAA9C,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE;QAC/C,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,WAAW,CAAC,CAAC;QAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,8BAA8B,WAAW,2BAA2B,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC7G,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM,IAAA,oCAAmB,EAAC,cAAc,EAAE,SAAS,CAAC;;;;EAIpE,MAAM,IAAA,4CAA2B,EAAC,SAAS,EAAE,UAAU,EAAE,cAAc,CAAC;CACzE;iBACU;aACF;SACF,CAAC;IACJ,CAAC,CAAA,CACF,CAAC;AACJ,CAAC,CAAC;AAnCW,QAAA,qBAAqB,yBAmChC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
|
+
import { NxGeneratorInfo } from '../../utils/nx';
|
|
7
|
+
/**
|
|
8
|
+
* Adds a tool which lists details about the available generators
|
|
9
|
+
*/
|
|
10
|
+
export declare const addListGeneratorsTool: (server: McpServer, generators: NxGeneratorInfo[]) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addListGeneratorsTool = void 0;
|
|
4
|
+
const schema_1 = require("../schema");
|
|
5
|
+
const generator_info_1 = require("../generator-info");
|
|
6
|
+
/**
|
|
7
|
+
* Adds a tool which lists details about the available generators
|
|
8
|
+
*/
|
|
9
|
+
const addListGeneratorsTool = (server, generators) => {
|
|
10
|
+
server.tool('list-generators', { packageManager: schema_1.PackageManagerSchema }, ({ packageManager }) => ({
|
|
11
|
+
content: [
|
|
12
|
+
{
|
|
13
|
+
type: 'text',
|
|
14
|
+
text: `## Available Generators
|
|
15
|
+
|
|
16
|
+
${generators.map((g) => `### ${(0, generator_info_1.renderGeneratorInfo)(packageManager, g)}`).join('\n\n')}
|
|
17
|
+
`,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
22
|
+
exports.addListGeneratorsTool = addListGeneratorsTool;
|
|
23
|
+
//# sourceMappingURL=list-generators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-generators.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/list-generators.ts"],"names":[],"mappings":";;;AAKA,sCAAiD;AACjD,sDAAwD;AAGxD;;GAEG;AACI,MAAM,qBAAqB,GAAG,CACnC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,EAAE,cAAc,EAAE,6BAAoB,EAAE,EACxC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;;IAEZ,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,IAAA,oCAAmB,EAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;GACpF;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,qBAAqB,yBAmBhC"}
|
|
@@ -22,8 +22,8 @@ const open_api_1 = require("./open-api");
|
|
|
22
22
|
exports.FAST_API_REACT_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
23
23
|
const fastApiReactGenerator = (tree, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
24
24
|
var _a;
|
|
25
|
-
const frontendProjectConfig = (0,
|
|
26
|
-
const fastApiProjectConfig = (0,
|
|
25
|
+
const frontendProjectConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.frontendProjectName);
|
|
26
|
+
const fastApiProjectConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.fastApiProjectName);
|
|
27
27
|
// Add OpenAPI spec generation to the project, run as part of build
|
|
28
28
|
const { specPath } = (0, open_api_1.addOpenApiGeneration)(tree, {
|
|
29
29
|
project: fastApiProjectConfig,
|
|
@@ -33,7 +33,7 @@ const fastApiReactGenerator = (tree, options) => tslib_1.__awaiter(void 0, void
|
|
|
33
33
|
const generatedClientDir = (0, devkit_1.joinPathFragments)('generated', (0, lodash_kebabcase_1.default)(apiName));
|
|
34
34
|
const generatedClientDirFromRoot = (0, devkit_1.joinPathFragments)(frontendProjectConfig.sourceRoot, generatedClientDir);
|
|
35
35
|
// Add TypeScript client generation to Frontend project.json
|
|
36
|
-
(0, devkit_1.updateProjectConfiguration)(tree,
|
|
36
|
+
(0, devkit_1.updateProjectConfiguration)(tree, frontendProjectConfig.name, Object.assign(Object.assign({}, frontendProjectConfig), { targets: (0, object_1.sortObjectKeys)(Object.assign(Object.assign(Object.assign({}, frontendProjectConfig.targets), Object.fromEntries(['compile', 'bundle'].map((target) => {
|
|
37
37
|
var _a, _b, _c, _d;
|
|
38
38
|
return [
|
|
39
39
|
target,
|
|
@@ -58,7 +58,7 @@ const fastApiReactGenerator = (tree, options) => tslib_1.__awaiter(void 0, void
|
|
|
58
58
|
`nx g @aws/nx-plugin:open-api#ts-hooks --openApiSpecPath="${specPath}" --outputPath="${generatedClientDirFromRoot}" --no-interactive`,
|
|
59
59
|
],
|
|
60
60
|
},
|
|
61
|
-
dependsOn: [`${
|
|
61
|
+
dependsOn: [`${fastApiProjectConfig.name}:openapi`],
|
|
62
62
|
} })) }));
|
|
63
63
|
const relativeSrcDir = frontendProjectConfig.sourceRoot.slice(frontendProjectConfig.root.length + 1);
|
|
64
64
|
// Ignore the generated client by default
|
|
@@ -69,7 +69,7 @@ const fastApiReactGenerator = (tree, options) => tslib_1.__awaiter(void 0, void
|
|
|
69
69
|
]);
|
|
70
70
|
// Ensure that the frontend has runtime config as we'll use the url for creating the client
|
|
71
71
|
yield (0, generator_1.runtimeConfigGenerator)(tree, {
|
|
72
|
-
project:
|
|
72
|
+
project: frontendProjectConfig.name,
|
|
73
73
|
});
|
|
74
74
|
// Add sigv4 fetch
|
|
75
75
|
if (options.auth === 'IAM') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/py/fast-api/react/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/py/fast-api/react/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAQoB;AAEpB,oFAA8F;AAC9F,gFAAyC;AACzC,gFAAyC;AACzC,kDAAuD;AACvD,gDAAmD;AACnD,kDAA6D;AAC7D,sDAAuD;AACvD,4CAAqD;AACrD,4CAK4B;AAE5B,0CAI2B;AAC3B,oDAAyE;AACzE,yCAAkD;AAErC,QAAA,6BAA6B,GACxC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,MAAM,qBAAqB,GAAG,CACnC,IAAU,EACV,OAAoC,EACpC,EAAE;;IACF,MAAM,qBAAqB,GAAG,IAAA,wCAAmC,EAC/D,IAAI,EACJ,OAAO,CAAC,mBAAmB,CAC5B,CAAC;IACF,MAAM,oBAAoB,GAAG,IAAA,wCAAmC,EAC9D,IAAI,EACJ,OAAO,CAAC,kBAAkB,CAC3B,CAAC;IAEF,mEAAmE;IACnE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,+BAAoB,EAAC,IAAI,EAAE;QAC9C,OAAO,EAAE,oBAAoB;KAC9B,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAC,oBAAoB,CAAC,QAAgB,0CAAE,OAAO,CAAC;IAChE,MAAM,eAAe,GAAG,YAAY,IAAA,0BAAS,EAAC,OAAO,CAAC,SAAS,CAAC;IAEhE,MAAM,kBAAkB,GAAG,IAAA,0BAAiB,EAAC,WAAW,EAAE,IAAA,0BAAS,EAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,MAAM,0BAA0B,GAAG,IAAA,0BAAiB,EAClD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AAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,qCAA6B,CAAC,CAAC,CAAC;IAE7E,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IACjC,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC,CAAA,CAAC;AA/MW,QAAA,qBAAqB,yBA+MhC;AAEF,MAAM,oBAAoB,GAAG,CAAC,aAAmC,EAAU,EAAE;;IAC3E,IAAI,aAAa,CAAC,UAAU,EAAE,CAAC;QAC7B,MAAM,eAAe,GAAG,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5D,OAAO,eAAe,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrD,CAAC;IACD,MAAM,OAAO,GAAG,MAAC,aAAa,CAAC,QAAgB,0CAAE,OAAO,CAAC;IACzD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,IAAA,0BAAS,EAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,IAAI,KAAK,CAAC,8CAA8C,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;AAChF,CAAC,CAAC;AAEF,kBAAe,6BAAqB,CAAC"}
|
|
@@ -36,7 +36,7 @@ const getLambdaFunctionDetails = (tree, schema) => {
|
|
|
36
36
|
*/
|
|
37
37
|
const lambdaFunctionProjectGenerator = (tree, schema) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
38
38
|
var _a, _b, _c, _d, _e, _f;
|
|
39
|
-
const projectConfig = (0,
|
|
39
|
+
const projectConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, schema.project);
|
|
40
40
|
const pyProjectPath = (0, devkit_1.joinPathFragments)(projectConfig.root, 'pyproject.toml');
|
|
41
41
|
// Check if the project has a pyproject.toml file
|
|
42
42
|
if (!pyProjectPath) {
|
|
@@ -46,7 +46,7 @@ const lambdaFunctionProjectGenerator = (tree, schema) => tslib_1.__awaiter(void
|
|
|
46
46
|
throw new Error(`This project does not have a source root. Please add a source root to the project configuration before running this generator.`);
|
|
47
47
|
}
|
|
48
48
|
const dir = projectConfig.root;
|
|
49
|
-
const projectNameWithOutScope =
|
|
49
|
+
const projectNameWithOutScope = projectConfig.name.split('.').pop();
|
|
50
50
|
const normalizedProjectName = (0, names_1.toSnakeCase)(projectNameWithOutScope);
|
|
51
51
|
// Module name is the last part of the source root,
|
|
52
52
|
const sourceParts = projectConfig.sourceRoot.split('/');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/py/lambda-function/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/py/lambda-function/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAUoB;AAEpB,oEAAmE;AACnE,oEAAiE;AACjE,sCAA+C;AAE/C,qEAA0E;AAC1E,yFAGiD;AACjD,6CAK2B;AAC3B,yCAAgD;AAChD,+CAA0D;AAC1D,qDAAoD;AACpD,+CAAoD;AACpD,uCAIwB;AACxB,iDAAsE;AAEzD,QAAA,8BAA8B,GACzC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAiB/B,MAAM,wBAAwB,GAAG,CAC/B,IAAU,EACV,MAA2E,EACpD,EAAE;IACzB,MAAM,KAAK,GAAG,IAAA,mBAAW,EAAC,IAAA,uBAAW,EAAC,IAAI,CAAC,CAAC,CAAC;IAC7C,MAAM,sBAAsB,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAChE,MAAM,0BAA0B,GAAG,GAAG,KAAK,IAAI,sBAAsB,EAAE,CAAC;IACxE,MAAM,sBAAsB,GAAG,GAAG,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,YAAY,CAAC,CAA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