@aws/nx-plugin 0.46.0 → 0.48.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/package.json +1 -1
- package/src/infra/app/generator.js +4 -1
- package/src/infra/app/generator.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +4 -0
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.js +3 -1
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +9 -0
- package/src/preset/generator.d.ts +1 -1
- package/src/preset/generator.js +4 -1
- package/src/preset/generator.js.map +1 -1
- package/src/preset/schema.d.ts +3 -0
- package/src/preset/schema.json +9 -1
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +60 -0
- package/src/py/fast-api/generator.js +5 -3
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +1 -0
- package/src/py/fast-api/schema.d.ts +3 -1
- package/src/py/fast-api/schema.json +4 -4
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +310 -0
- package/src/py/lambda-function/generator.js +17 -25
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/lambda-function/schema.d.ts +3 -0
- package/src/py/lambda-function/schema.json +8 -0
- package/src/py/mcp-server/generator.js +4 -2
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/mcp-server/schema.d.ts +4 -1
- package/src/py/mcp-server/schema.json +4 -4
- package/src/py/strands-agent/generator.js +4 -2
- package/src/py/strands-agent/generator.js.map +1 -1
- package/src/py/strands-agent/schema.d.ts +3 -1
- package/src/py/strands-agent/schema.json +4 -4
- package/src/terraform/project/generator.js +2 -1
- package/src/terraform/project/generator.js.map +1 -1
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +60 -0
- package/src/trpc/backend/generator.js +4 -2
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.ts +2 -1
- package/src/trpc/backend/schema.json +4 -4
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +1 -0
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +310 -0
- package/src/ts/lambda-function/generator.js +17 -27
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lambda-function/schema.d.ts +3 -0
- package/src/ts/lambda-function/schema.json +8 -0
- package/src/ts/mcp-server/generator.js +4 -2
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/mcp-server/schema.d.ts +3 -1
- package/src/ts/mcp-server/schema.json +4 -4
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +27 -1
- package/src/ts/nx-generator/files/nx-plugin-for-aws/docs/__nameKebabCase__.mdx.template +31 -0
- package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.spec.ts.template +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +756 -0
- package/src/ts/react-website/app/generator.js +44 -43
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/app/schema.d.ts +2 -0
- package/src/ts/react-website/app/schema.json +8 -0
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +259 -0
- package/src/ts/react-website/cognito-auth/generator.js +12 -13
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/schema.d.ts +4 -0
- package/src/ts/react-website/cognito-auth/schema.json +8 -0
- package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +0 -40
- package/src/ts/react-website/runtime-config/generator.js +0 -2
- package/src/ts/react-website/runtime-config/generator.js.map +1 -1
- package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +4 -2
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/api-constructs/api-constructs.d.ts +2 -1
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +10 -0
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +10 -0
- package/src/utils/config/index.d.ts +6 -0
- package/src/utils/config/index.js.map +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/entry/entry.tf.template +119 -0
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +28 -0
- package/src/utils/files/terraform/src/metrics/metrics.tf.template +7 -1
- package/src/{py/lambda-function/files/common/constructs/src/app/lambda-functions/__constructFunctionKebabCase__.ts.template → utils/function-constructs/files/cdk/app/lambda-functions/__functionNameKebabCase__.ts.template} +5 -5
- package/src/utils/function-constructs/files/terraform/app/lambda-functions/__functionNameKebabCase__/__functionNameKebabCase__.tf.template +150 -0
- package/src/utils/function-constructs/function-constructs.d.ts +20 -0
- package/src/utils/function-constructs/function-constructs.js +57 -0
- package/src/utils/function-constructs/function-constructs.js.map +1 -0
- package/src/utils/iac.d.ts +21 -0
- package/src/utils/iac.js +25 -0
- package/src/utils/iac.js.map +1 -0
- package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +123 -0
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +421 -0
- package/src/utils/identity-constructs/files/terraform/core/user-identity/main.tf.template +47 -0
- package/src/utils/identity-constructs/identity-constructs.d.ts +16 -0
- package/src/utils/identity-constructs/identity-constructs.js +84 -0
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -0
- package/src/utils/metrics.js +1 -1
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/shared-constructs.d.ts +3 -2
- package/src/utils/shared-constructs.js +27 -3
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/website-constructs/files/terraform/app/static-websites/__websiteNameKebabCase__/__websiteNameKebabCase__.tf.template +42 -0
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +709 -0
- package/src/utils/website-constructs/website-constructs.d.ts +19 -0
- package/src/utils/website-constructs/website-constructs.js +61 -0
- package/src/utils/website-constructs/website-constructs.js.map +1 -0
- package/src/ts/lambda-function/files/common/constructs/src/app/lambda-functions/__constructFunctionNameKebabCase__.ts.template +0 -24
- /package/src/{ts/react-website/cognito-auth/files/common/constructs/src → utils/identity-constructs/files/cdk}/core/user-identity.ts.template +0 -0
- /package/src/{ts/react-website/app/files/common/constructs/src → utils/website-constructs/files/cdk}/app/static-websites/__websiteNameKebabCase__.ts.template +0 -0
- /package/src/{ts/react-website/app/files/common/constructs/src → utils/website-constructs/files/cdk}/core/static-website.ts.template +0 -0
|
@@ -16,6 +16,7 @@ const shared_constructs_1 = require("../../utils/shared-constructs");
|
|
|
16
16
|
const agent_core_constructs_1 = require("../../utils/agent-core-constructs/agent-core-constructs");
|
|
17
17
|
const npm_scope_1 = require("../../utils/npm-scope");
|
|
18
18
|
const esbuild_1 = require("../../utils/esbuild");
|
|
19
|
+
const iac_1 = require("../../utils/iac");
|
|
19
20
|
exports.TS_MCP_SERVER_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
20
21
|
const tsMcpServerGenerator = (tree, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
22
|
var _a, _b, _c;
|
|
@@ -80,14 +81,15 @@ const tsMcpServerGenerator = (tree, options) => tslib_1.__awaiter(void 0, void 0
|
|
|
80
81
|
],
|
|
81
82
|
});
|
|
82
83
|
// Add shared constructs
|
|
83
|
-
yield (0,
|
|
84
|
+
const iacProvider = yield (0, iac_1.resolveIacProvider)(tree, options.iacProvider);
|
|
85
|
+
yield (0, shared_constructs_1.sharedConstructsGenerator)(tree, { iacProvider });
|
|
84
86
|
// Add the construct to deploy the mcp server
|
|
85
87
|
(0, agent_core_constructs_1.addMcpServerInfra)(tree, {
|
|
86
88
|
mcpServerNameKebabCase: name,
|
|
87
89
|
mcpServerNameClassName: (0, names_1.toClassName)(name),
|
|
88
90
|
projectName: project.name,
|
|
89
91
|
dockerImageTag,
|
|
90
|
-
iacProvider
|
|
92
|
+
iacProvider,
|
|
91
93
|
});
|
|
92
94
|
// Add additional dependencies
|
|
93
95
|
devDeps = Object.assign(Object.assign({}, devDeps), (0, versions_1.withVersions)(['esbuild']));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/mcp-server/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAYoB;AAEpB,uCAIwB;AACxB,iDAAsE;AACtE,+CAA0D;AAC1D,mDAAoD;AACpD,6CAA2D;AAC3D,qEAA0E;AAC1E,mGAA4F;AAC5F,qDAAoD;AACpD,iDAA6D;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/mcp-server/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAYoB;AAEpB,uCAIwB;AACxB,iDAAsE;AACtE,+CAA0D;AAC1D,mDAAoD;AACpD,6CAA2D;AAC3D,qEAA0E;AAC1E,mGAA4F;AAC5F,qDAAoD;AACpD,iDAA6D;AAC7D,yCAAqD;AAExC,QAAA,4BAA4B,GACvC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,MAAM,oBAAoB,GAAG,CAClC,IAAU,EACV,OAAmC,EACP,EAAE;;IAC9B,MAAM,OAAO,GAAG,IAAA,wCAAmC,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CACb,uBAAuB,OAAO,CAAC,OAAO,wDAAwD,CAC/F,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,GAAG,IAAA,iBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC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AU,CAAC,EAAE;gBACjD,QAAQ,EAAE,iBAAiB;gBAC3B,OAAO,EAAE;oBACP,QAAQ,EAAE;wBACR,gCAAgC,iBAAiB,WAAW;qBAC7D;oBACD,GAAG,EAAE,eAAe;iBACrB;aACF,OAEH,CAAC;IAEH,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,oCAA4B,CAAC,CAAC,CAAC;IAE5E,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;AAvJW,QAAA,oBAAoB,wBAuJ/B;AAEF,kBAAe,4BAAoB,CAAC"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { IacProviderOption } from '../../utils/iac';
|
|
7
|
+
|
|
6
8
|
export type TsMcpServerComputeType = 'None' | 'BedrockAgentCoreRuntime';
|
|
7
9
|
|
|
8
10
|
/**
|
|
@@ -13,5 +15,5 @@ export interface TsMcpServerGeneratorSchema {
|
|
|
13
15
|
project: string;
|
|
14
16
|
name?: string;
|
|
15
17
|
computeType?: TsMcpServerComputeType;
|
|
16
|
-
iacProvider:
|
|
18
|
+
iacProvider: IacProviderOption;
|
|
17
19
|
}
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"iacProvider": {
|
|
32
32
|
"type": "string",
|
|
33
|
-
"description": "The preferred IaC provider",
|
|
34
|
-
"enum": ["CDK", "Terraform"],
|
|
33
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
34
|
+
"enum": ["Inherit", "CDK", "Terraform"],
|
|
35
35
|
"x-priority": "important",
|
|
36
|
-
"default": "
|
|
37
|
-
"x-prompt": "Which provider would you like to manage your infrastructure? (default:
|
|
36
|
+
"default": "Inherit",
|
|
37
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: Inherit)"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"required": ["project"]
|
|
@@ -9,6 +9,8 @@ description: Some description
|
|
|
9
9
|
import { FileTree } from '@astrojs/starlight/components';
|
|
10
10
|
import RunGenerator from '@components/run-generator.astro';
|
|
11
11
|
import GeneratorParameters from '@components/generator-parameters.astro';
|
|
12
|
+
import Infrastructure from '@components/infrastructure.astro';
|
|
13
|
+
import Snippet from '@components/snippet.astro';
|
|
12
14
|
|
|
13
15
|
TODO: Add an overview of your generator here.
|
|
14
16
|
|
|
@@ -32,6 +34,30 @@ The generator will create the following project files:
|
|
|
32
34
|
- todo.txt Update this section with what your generator generates!
|
|
33
35
|
</FileTree>
|
|
34
36
|
|
|
37
|
+
### Infrastructure
|
|
38
|
+
|
|
39
|
+
<Snippet name="shared-constructs" />
|
|
40
|
+
|
|
41
|
+
<Infrastructure>
|
|
42
|
+
<Fragment slot="cdk">
|
|
43
|
+
<FileTree>
|
|
44
|
+
- packages/common/constructs/src - app - todo.txt document app specific
|
|
45
|
+
cdk constructs if any - core - todo.txt document core cdk constructs if
|
|
46
|
+
any
|
|
47
|
+
</FileTree>
|
|
48
|
+
</Fragment>
|
|
49
|
+
<Fragment slot="terraform">
|
|
50
|
+
<FileTree>
|
|
51
|
+
- packages/common/terraform/src - app - todo.txt document app specific tf
|
|
52
|
+
modules if any - core - todo.txt document core tf modules if any
|
|
53
|
+
</FileTree>
|
|
54
|
+
</Fragment>
|
|
55
|
+
</Infrastructure>
|
|
56
|
+
|
|
57
|
+
:::danger
|
|
58
|
+
Delete this section if your generator does not create infrastructure
|
|
59
|
+
:::
|
|
60
|
+
|
|
35
61
|
## TODO: More Docs!
|
|
36
62
|
|
|
37
63
|
Add more documentation detailing things like:
|
|
@@ -65,7 +91,7 @@ describe('foo#bar generator', () => {
|
|
|
65
91
|
});
|
|
66
92
|
|
|
67
93
|
it('should add generator metric to app.ts', async () => {
|
|
68
|
-
await sharedConstructsGenerator(tree);
|
|
94
|
+
await sharedConstructsGenerator(tree, { iacProvider: 'CDK' });
|
|
69
95
|
|
|
70
96
|
await fooBarGenerator(tree, { exampleOption: 'example' });
|
|
71
97
|
|
|
@@ -6,6 +6,8 @@ description: <%- description ?? 'TODO - A short description of your generator' %
|
|
|
6
6
|
import { FileTree } from '@astrojs/starlight/components';
|
|
7
7
|
import RunGenerator from '@components/run-generator.astro';
|
|
8
8
|
import GeneratorParameters from '@components/generator-parameters.astro';
|
|
9
|
+
import Infrastructure from '@components/infrastructure.astro';
|
|
10
|
+
import Snippet from '@components/snippet.astro';
|
|
9
11
|
|
|
10
12
|
TODO: Add an overview of your generator here.
|
|
11
13
|
|
|
@@ -29,6 +31,35 @@ The generator will create the following project files:
|
|
|
29
31
|
- todo.txt Update this section with what your generator generates!
|
|
30
32
|
</FileTree>
|
|
31
33
|
|
|
34
|
+
### Infrastructure
|
|
35
|
+
|
|
36
|
+
<Snippet name="shared-constructs" />
|
|
37
|
+
|
|
38
|
+
<Infrastructure>
|
|
39
|
+
<Fragment slot="cdk">
|
|
40
|
+
<FileTree>
|
|
41
|
+
- packages/common/constructs/src
|
|
42
|
+
- app
|
|
43
|
+
- todo.txt document app specific cdk constructs if any
|
|
44
|
+
- core
|
|
45
|
+
- todo.txt document core cdk constructs if any
|
|
46
|
+
</FileTree>
|
|
47
|
+
</Fragment>
|
|
48
|
+
<Fragment slot="terraform">
|
|
49
|
+
<FileTree>
|
|
50
|
+
- packages/common/terraform/src
|
|
51
|
+
- app
|
|
52
|
+
- todo.txt document app specific tf modules if any
|
|
53
|
+
- core
|
|
54
|
+
- todo.txt document core tf modules if any
|
|
55
|
+
</FileTree>
|
|
56
|
+
</Fragment>
|
|
57
|
+
</Infrastructure>
|
|
58
|
+
|
|
59
|
+
:::danger
|
|
60
|
+
Delete this section if your generator does not create infrastructure
|
|
61
|
+
:::
|
|
62
|
+
|
|
32
63
|
## TODO: More Docs!
|
|
33
64
|
|
|
34
65
|
Add more documentation detailing things like:
|
|
@@ -18,7 +18,7 @@ describe('<%- name %> generator', () => {
|
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
it('should add generator metric to app.ts', async () => {
|
|
21
|
-
await sharedConstructsGenerator(tree);
|
|
21
|
+
await sharedConstructsGenerator(tree, { iacProvider: 'CDK' });
|
|
22
22
|
|
|
23
23
|
await <%- nameCamelCase %>Generator(tree, { exampleOption: 'example' });
|
|
24
24
|
|