@aws/nx-plugin 0.49.1 → 0.50.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/generators.json +22 -1
- package/package.json +1 -1
- package/sdk/ts.d.ts +2 -0
- package/sdk/ts.js +6 -3
- package/sdk/ts.js.map +1 -1
- package/src/api-connection/generator.d.ts +2 -2
- package/src/api-connection/generator.js +20 -0
- package/src/api-connection/generator.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +124 -14
- package/src/infra/app/files/app/README.md.template +5 -5
- package/src/infra/app/files/app/checkov.yml.template +12 -0
- package/src/infra/app/files/app/src/main.ts.template +2 -4
- package/src/infra/app/generator.js +13 -8
- package/src/infra/app/generator.js.map +1 -1
- package/src/infra/app/schema.d.ts +0 -8
- package/src/infra/app/schema.json +0 -16
- package/src/license/config.js +3 -3
- package/src/license/config.js.map +1 -1
- package/src/open-api/ts-hooks/__snapshots__/generator.spec.tsx.snap +114 -0
- package/src/open-api/ts-hooks/generator.spec.tsx +176 -0
- package/src/open-api/utils/codegen-data.js +42 -5
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +2 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +55 -2
- package/src/py/fast-api/generator.js +8 -55
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/generator.js +9 -111
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/lambda-function/generator.js +1 -1
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/py/mcp-server/generator.js +1 -1
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/py/strands-agent/generator.js +1 -1
- package/src/py/strands-agent/generator.js.map +1 -1
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +576 -0
- package/src/smithy/project/files/build.Dockerfile.template +97 -0
- package/src/smithy/project/files/smithy-build.json.template +25 -0
- package/src/smithy/project/files/src/main.smithy.template +19 -0
- package/src/smithy/project/files/src/operations/echo.smithy.template +18 -0
- package/src/smithy/project/generator.d.ts +10 -0
- package/src/smithy/project/generator.js +70 -0
- package/src/smithy/project/generator.js.map +1 -0
- package/src/smithy/project/schema.d.ts +11 -0
- package/src/smithy/project/schema.json +42 -0
- package/src/smithy/react-connection/__snapshots__/generator.spec.ts.snap +270 -0
- package/src/smithy/react-connection/files/model/extensions.smithy.template +33 -0
- package/src/smithy/react-connection/generator.d.ts +10 -0
- package/src/smithy/react-connection/generator.js +100 -0
- package/src/smithy/react-connection/generator.js.map +1 -0
- package/src/smithy/react-connection/schema.d.ts +8 -0
- package/src/smithy/react-connection/schema.json +26 -0
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +3023 -0
- package/src/smithy/ts/api/files/context.ts.template +12 -0
- package/src/smithy/ts/api/files/handler.ts.template +50 -0
- package/src/smithy/ts/api/files/index.ts.template +0 -0
- package/src/smithy/ts/api/files/local-server.ts.template +41 -0
- package/src/smithy/ts/api/files/operations/echo.ts.template +7 -0
- package/src/smithy/ts/api/files/service.ts.template +8 -0
- package/src/smithy/ts/api/generator.d.ts +10 -0
- package/src/smithy/ts/api/generator.js +154 -0
- package/src/smithy/ts/api/generator.js.map +1 -0
- package/src/smithy/ts/api/schema.d.ts +14 -0
- package/src/smithy/ts/api/schema.json +56 -0
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +61 -2
- package/src/trpc/backend/generator.js +6 -20
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.ts +2 -1
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/lambda-function/generator.js +10 -10
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lib/eslint.d.ts +7 -0
- package/src/ts/lib/eslint.js +37 -29
- package/src/ts/lib/eslint.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/ts/mcp-server/files/Dockerfile.template +1 -1
- package/src/ts/mcp-server/generator.js +20 -14
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/ts/nx-generator/generator.js +3 -2
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +264 -3
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +10 -0
- package/src/utils/__snapshots__/shared-constructs.spec.ts.snap +49 -0
- package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +1 -1
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +1 -1
- package/src/utils/api-connection/open-api/react.d.ts +43 -0
- package/src/utils/api-connection/open-api/react.js +132 -0
- package/src/utils/api-connection/open-api/react.js.map +1 -0
- package/src/utils/api-constructs/api-constructs.d.ts +6 -2
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +4 -4
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +7 -4
- package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +37 -2
- package/src/utils/api-constructs/files/cdk/core/api/rest/rest-api.ts.template +15 -0
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -1
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -1
- package/src/utils/api-constructs/open-api-metadata.d.ts +17 -0
- package/src/utils/api-constructs/open-api-metadata.js +68 -0
- package/src/utils/api-constructs/open-api-metadata.js.map +1 -0
- package/src/utils/bundle/bundle.d.ts +35 -0
- package/src/utils/bundle/bundle.js +107 -0
- package/src/utils/bundle/bundle.js.map +1 -0
- package/src/utils/bundle/files/ts/rolldown.config.ts.template +3 -0
- package/src/utils/files/common/constructs/src/core/checkov.ts.template +44 -0
- package/src/utils/files/common/constructs/src/core/index.ts.template +1 -0
- package/src/utils/fs.d.ts +16 -0
- package/src/utils/fs.js +32 -0
- package/src/utils/fs.js.map +1 -0
- package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +8 -0
- package/src/utils/nx.d.ts +10 -3
- package/src/utils/nx.js +18 -3
- package/src/utils/nx.js.map +1 -1
- package/src/utils/versions.d.ts +6 -2
- package/src/utils/versions.js +5 -1
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/cdk/core/static-website.ts.template +56 -2
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/aws-prototyping.guard +0 -1282
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/cfn-nag.guard +0 -6839
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/hipaa-security.guard +0 -2807
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/nist-csf.guard +0 -2585
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/pci-dss-3-2-1.guard +0 -2236
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/wa-reliability-pillar.guard +0 -885
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/wa-security-pillar.guard +0 -2205
- package/src/infra/app/files/common/constructs/src/core/cfn-guard.ts.template +0 -67
- package/src/utils/bundle.d.ts +0 -16
- package/src/utils/bundle.js +0 -48
- package/src/utils/bundle.js.map +0 -1
- package/src/utils/esbuild.d.ts +0 -15
- package/src/utils/esbuild.js +0 -46
- package/src/utils/esbuild.js.map +0 -1
- /package/src/{py/fast-api/react/files/website → utils/api-connection/open-api/files}/components/__apiNameClassName__Provider.tsx.template +0 -0
- /package/src/{py/fast-api/react/files/website → utils/api-connection/open-api/files}/hooks/use__apiNameClassName__.tsx.template +0 -0
- /package/src/{py/fast-api/react/files/website → utils/api-connection/open-api/files}/hooks/use__apiNameClassName__Client.tsx.template +0 -0
package/generators.json
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"guidePages": [
|
|
12
12
|
"api-connection",
|
|
13
13
|
"api-connection/react-fastapi",
|
|
14
|
-
"api-connection/react-trpc"
|
|
14
|
+
"api-connection/react-trpc",
|
|
15
|
+
"api-connection/react-smithy"
|
|
15
16
|
]
|
|
16
17
|
},
|
|
17
18
|
"license": {
|
|
@@ -95,6 +96,20 @@
|
|
|
95
96
|
"description": "Add a Strands Agent to a Python project",
|
|
96
97
|
"metric": "g25"
|
|
97
98
|
},
|
|
99
|
+
"smithy#project": {
|
|
100
|
+
"factory": "./src/smithy/project/generator",
|
|
101
|
+
"schema": "./src/smithy/project/schema.json",
|
|
102
|
+
"description": "Generate a Smithy model project",
|
|
103
|
+
"metric": "g27",
|
|
104
|
+
"hidden": true
|
|
105
|
+
},
|
|
106
|
+
"smithy#react-connection": {
|
|
107
|
+
"factory": "./src/smithy/react-connection/generator",
|
|
108
|
+
"schema": "./src/smithy/react-connection/schema.json",
|
|
109
|
+
"description": "Connects a react website to a Smithy API",
|
|
110
|
+
"metric": "g28",
|
|
111
|
+
"hidden": true
|
|
112
|
+
},
|
|
98
113
|
"terraform#project": {
|
|
99
114
|
"factory": "./src/terraform/project/generator",
|
|
100
115
|
"schema": "./src/terraform/project/schema.json",
|
|
@@ -162,6 +177,12 @@
|
|
|
162
177
|
"metric": "g7",
|
|
163
178
|
"hidden": true
|
|
164
179
|
},
|
|
180
|
+
"ts#smithy-api": {
|
|
181
|
+
"factory": "./src/smithy/ts/api/generator",
|
|
182
|
+
"schema": "./src/smithy/ts/api/schema.json",
|
|
183
|
+
"description": "Create an API using Smithy and the Smithy TypeScript Server SDK",
|
|
184
|
+
"metric": "g26"
|
|
185
|
+
},
|
|
165
186
|
"ts#trpc-api": {
|
|
166
187
|
"factory": "./src/trpc/backend/generator",
|
|
167
188
|
"schema": "./src/trpc/backend/schema.json",
|
package/package.json
CHANGED
package/sdk/ts.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { runtimeConfigGenerator } from '../src/ts/react-website/runtime-config/g
|
|
|
20
20
|
export type { RuntimeConfigGeneratorSchema } from '../src/ts/react-website/runtime-config/schema';
|
|
21
21
|
export { tsTrpcApiGenerator } from '../src/trpc/backend/generator';
|
|
22
22
|
export type { TsTrpcApiGeneratorSchema } from '../src/trpc/backend/schema';
|
|
23
|
+
export { tsSmithyApiGenerator } from '../src/smithy/ts/api/generator';
|
|
24
|
+
export type { TsSmithyApiGeneratorSchema } from '../src/smithy/ts/api/schema';
|
|
23
25
|
export { tsLambdaFunctionGenerator } from '../src/ts/lambda-function/generator';
|
|
24
26
|
export type { TsLambdaFunctionGeneratorSchema } from '../src/ts/lambda-function/schema';
|
|
25
27
|
export { sharedConstructsGenerator } from '../src/utils/shared-constructs';
|
package/sdk/ts.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.sharedConstructsGenerator = exports.tsLambdaFunctionGenerator = exports.tsTrpcApiGenerator = exports.runtimeConfigGenerator = exports.tsReactWebsiteAuthGenerator = exports.tsReactWebsiteGenerator = exports.tsNxPluginGenerator = exports.tsNxGeneratorGenerator = exports.tsMcpServerGenerator = exports.tsInfraGenerator = exports.tsProjectGenerator = void 0;
|
|
7
|
+
exports.sharedConstructsGenerator = exports.tsLambdaFunctionGenerator = exports.tsSmithyApiGenerator = exports.tsTrpcApiGenerator = exports.runtimeConfigGenerator = exports.tsReactWebsiteAuthGenerator = exports.tsReactWebsiteGenerator = exports.tsNxPluginGenerator = exports.tsNxGeneratorGenerator = exports.tsMcpServerGenerator = exports.tsInfraGenerator = exports.tsProjectGenerator = void 0;
|
|
8
8
|
// TypeScript Project Generator
|
|
9
9
|
var generator_1 = require("../src/ts/lib/generator");
|
|
10
10
|
Object.defineProperty(exports, "tsProjectGenerator", { enumerable: true, get: function () { return generator_1.tsProjectGenerator; } });
|
|
@@ -32,9 +32,12 @@ Object.defineProperty(exports, "runtimeConfigGenerator", { enumerable: true, get
|
|
|
32
32
|
// TypeScript tRPC API
|
|
33
33
|
var generator_9 = require("../src/trpc/backend/generator");
|
|
34
34
|
Object.defineProperty(exports, "tsTrpcApiGenerator", { enumerable: true, get: function () { return generator_9.tsTrpcApiGenerator; } });
|
|
35
|
+
// TypeScript Smithy API
|
|
36
|
+
var generator_10 = require("../src/smithy/ts/api/generator");
|
|
37
|
+
Object.defineProperty(exports, "tsSmithyApiGenerator", { enumerable: true, get: function () { return generator_10.tsSmithyApiGenerator; } });
|
|
35
38
|
// TypeScript Lambda Function
|
|
36
|
-
var
|
|
37
|
-
Object.defineProperty(exports, "tsLambdaFunctionGenerator", { enumerable: true, get: function () { return
|
|
39
|
+
var generator_11 = require("../src/ts/lambda-function/generator");
|
|
40
|
+
Object.defineProperty(exports, "tsLambdaFunctionGenerator", { enumerable: true, get: function () { return generator_11.tsLambdaFunctionGenerator; } });
|
|
38
41
|
// Shared Constructs
|
|
39
42
|
var shared_constructs_1 = require("../src/utils/shared-constructs");
|
|
40
43
|
Object.defineProperty(exports, "sharedConstructsGenerator", { enumerable: true, get: function () { return shared_constructs_1.sharedConstructsGenerator; } });
|
package/sdk/ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts.js","sourceRoot":"","sources":["../../../../packages/nx-plugin/sdk/ts.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+BAA+B;AAC/B,qDAA6D;AAApD,+GAAA,kBAAkB,OAAA;AAG3B,4BAA4B;AAC5B,wDAA8D;AAArD,6GAAA,gBAAgB,OAAA;AAGzB,kCAAkC;AAClC,4DAAsE;AAA7D,iHAAA,oBAAoB,OAAA;AAG7B,oCAAoC;AACpC,8DAA0E;AAAjE,mHAAA,sBAAsB,OAAA;AAG/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@@ -7,12 +7,12 @@ import { ApiConnectionGeneratorSchema } from './schema';
|
|
|
7
7
|
/**
|
|
8
8
|
* List of supported source and target project types for api connections
|
|
9
9
|
*/
|
|
10
|
-
declare const SUPPORTED_PROJECT_TYPES: readonly ["ts#trpc-api", "py#fast-api", "react"];
|
|
10
|
+
declare const SUPPORTED_PROJECT_TYPES: readonly ["ts#trpc-api", "py#fast-api", "react", "smithy"];
|
|
11
11
|
type ProjectType = (typeof SUPPORTED_PROJECT_TYPES)[number];
|
|
12
12
|
/**
|
|
13
13
|
* Generator for a connection from a project to an API project
|
|
14
14
|
*/
|
|
15
|
-
export declare const apiConnectionGenerator: (tree: Tree, options: ApiConnectionGeneratorSchema) => Promise<()
|
|
15
|
+
export declare const apiConnectionGenerator: (tree: Tree, options: ApiConnectionGeneratorSchema) => Promise<import("@nx/devkit").GeneratorCallback>;
|
|
16
16
|
/**
|
|
17
17
|
* Determine whether the given project is of a known project type
|
|
18
18
|
*/
|
|
@@ -12,6 +12,9 @@ const ast_1 = require("../utils/ast");
|
|
|
12
12
|
const toml_1 = require("../utils/toml");
|
|
13
13
|
const generator_2 = tslib_1.__importDefault(require("../py/fast-api/react/generator"));
|
|
14
14
|
const nx_1 = require("../utils/nx");
|
|
15
|
+
const generator_3 = require("../smithy/project/generator");
|
|
16
|
+
const generator_4 = require("../smithy/ts/api/generator");
|
|
17
|
+
const generator_5 = tslib_1.__importDefault(require("../smithy/react-connection/generator"));
|
|
15
18
|
/**
|
|
16
19
|
* List of supported source and target project types for api connections
|
|
17
20
|
*/
|
|
@@ -19,6 +22,7 @@ const SUPPORTED_PROJECT_TYPES = [
|
|
|
19
22
|
'ts#trpc-api',
|
|
20
23
|
'py#fast-api',
|
|
21
24
|
'react',
|
|
25
|
+
'smithy',
|
|
22
26
|
];
|
|
23
27
|
/**
|
|
24
28
|
* Enumerates the supported project connections
|
|
@@ -26,6 +30,7 @@ const SUPPORTED_PROJECT_TYPES = [
|
|
|
26
30
|
const SUPPORTED_CONNECTIONS = [
|
|
27
31
|
{ source: 'react', target: 'ts#trpc-api' },
|
|
28
32
|
{ source: 'react', target: 'py#fast-api' },
|
|
33
|
+
{ source: 'react', target: 'smithy' },
|
|
29
34
|
];
|
|
30
35
|
/**
|
|
31
36
|
* Generators for each connection type
|
|
@@ -39,6 +44,10 @@ const CONNECTION_GENERATORS = {
|
|
|
39
44
|
frontendProjectName: options.sourceProject,
|
|
40
45
|
fastApiProjectName: options.targetProject,
|
|
41
46
|
}),
|
|
47
|
+
'react -> smithy': (tree, options) => (0, generator_5.default)(tree, {
|
|
48
|
+
frontendProjectName: options.sourceProject,
|
|
49
|
+
smithyModelOrBackendProjectName: options.targetProject,
|
|
50
|
+
}),
|
|
42
51
|
};
|
|
43
52
|
/**
|
|
44
53
|
* Generator for a connection from a project to an API project
|
|
@@ -72,6 +81,9 @@ const determineProjectType = (tree, projectName) => {
|
|
|
72
81
|
if (isFastApi(tree, projectConfiguration)) {
|
|
73
82
|
return 'py#fast-api';
|
|
74
83
|
}
|
|
84
|
+
if (isSmithyApi(tree, projectConfiguration)) {
|
|
85
|
+
return 'smithy';
|
|
86
|
+
}
|
|
75
87
|
if (isReact(tree, projectConfiguration)) {
|
|
76
88
|
return 'react';
|
|
77
89
|
}
|
|
@@ -126,5 +138,13 @@ const isFastApi = (tree, projectConfiguration) => {
|
|
|
126
138
|
}
|
|
127
139
|
return false;
|
|
128
140
|
};
|
|
141
|
+
const isSmithyApi = (_tree, projectConfiguration) => {
|
|
142
|
+
var _a;
|
|
143
|
+
// Support selecting either the smithy model or backend project
|
|
144
|
+
return [
|
|
145
|
+
generator_3.SMITHY_PROJECT_GENERATOR_INFO.id,
|
|
146
|
+
generator_4.TS_SMITHY_API_GENERATOR_INFO.id,
|
|
147
|
+
].includes(((_a = projectConfiguration.metadata) !== null && _a !== void 0 ? _a : {}).generator);
|
|
148
|
+
};
|
|
129
149
|
exports.default = exports.apiConnectionGenerator;
|
|
130
150
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/api-connection/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAA2E;AAE3E,gFAAyD;AACzD,sCAAoD;AACpD,wCAAyC;AACzC,uFAAmE;AACnE,oCAAkE;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/api-connection/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAA2E;AAE3E,gFAAyD;AACzD,sCAAoD;AACpD,wCAAyC;AACzC,uFAAmE;AACnE,oCAAkE;AAClE,2DAA4E;AAC5E,0DAA0E;AAC1E,6FAAkF;AAElF;;GAEG;AACH,MAAM,uBAAuB,GAAG;IAC9B,aAAa;IACb,aAAa;IACb,OAAO;IACP,QAAQ;CACA,CAAC;AAMX;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;IAC1C,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE;CACf,CAAC;AAQzB;;GAEG;AACH,MAAM,qBAAqB,GAAG;IAC5B,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CACxC,IAAA,mBAAkB,EAAC,IAAI,EAAE;QACvB,mBAAmB,EAAE,OAAO,CAAC,aAAa;QAC1C,kBAAkB,EAAE,OAAO,CAAC,aAAa;KAC1C,CAAC;IACJ,sBAAsB,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,CACxC,IAAA,mBAAqB,EAAC,IAAI,EAAE;QAC1B,mBAAmB,EAAE,OAAO,CAAC,aAAa;QAC1C,kBAAkB,EAAE,OAAO,CAAC,aAAa;KAC1C,CAAC;IACJ,iBAAiB,EAAE,C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C/B,MAAM,SAAS,GAAG,IAAA,eAAQ,EAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAChD,IAAI,CAAC,MAAA,MAAC,SAAiB,aAAjB,SAAS,uBAAT,SAAS,CAAU,OAAO,0CAAE,YAAY,mCAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAClB,KAAW,EACX,oBAA0C,EACjC,EAAE;;IACX,+DAA+D;IAC/D,OAAO;QACL,yCAA6B,CAAC,EAAE;QAChC,wCAA4B,CAAC,EAAE;KAChC,CAAC,QAAQ,CAAC,CAAC,MAAC,oBAAoB,CAAC,QAAgB,mCAAI,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;AACvE,CAAC,CAAC;AAEF,kBAAe,8BAAsB,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`infra generator > should add required dependencies to package.json > dependencies 1`] = `
|
|
4
4
|
{
|
|
5
|
-
"@cdklabs/cdk-validator-cfnguard": "0.0.60",
|
|
6
5
|
"aws-cdk": "2.1027.0",
|
|
7
6
|
"aws-cdk-lib": "2.213.0",
|
|
8
7
|
"constructs": "10.4.2",
|
|
@@ -43,7 +42,6 @@ exports[`infra generator > should add required dependencies to package.json > de
|
|
|
43
42
|
exports[`infra generator > should add required dependencies to package.json > package-json 1`] = `
|
|
44
43
|
{
|
|
45
44
|
"dependencies": {
|
|
46
|
-
"@cdklabs/cdk-validator-cfnguard": "0.0.60",
|
|
47
45
|
"aws-cdk": "2.1027.0",
|
|
48
46
|
"aws-cdk-lib": "2.213.0",
|
|
49
47
|
"constructs": "10.4.2",
|
|
@@ -81,6 +79,25 @@ exports[`infra generator > should add required dependencies to package.json > pa
|
|
|
81
79
|
}
|
|
82
80
|
`;
|
|
83
81
|
|
|
82
|
+
exports[`infra generator > should configure Checkov target correctly > checkov-target 1`] = `
|
|
83
|
+
{
|
|
84
|
+
"cache": true,
|
|
85
|
+
"dependsOn": [
|
|
86
|
+
"synth",
|
|
87
|
+
],
|
|
88
|
+
"executor": "nx:run-commands",
|
|
89
|
+
"inputs": [
|
|
90
|
+
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
91
|
+
],
|
|
92
|
+
"options": {
|
|
93
|
+
"command": "uvx checkov==3.2.469 --config-file packages/test/checkov.yml --file dist/packages/infra/cdk.out/**/*.template.json",
|
|
94
|
+
},
|
|
95
|
+
"outputs": [
|
|
96
|
+
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
97
|
+
],
|
|
98
|
+
}
|
|
99
|
+
`;
|
|
100
|
+
|
|
84
101
|
exports[`infra generator > should configure project.json with correct targets > build-target 1`] = `
|
|
85
102
|
{
|
|
86
103
|
"dependsOn": [
|
|
@@ -88,6 +105,7 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
88
105
|
"compile",
|
|
89
106
|
"test",
|
|
90
107
|
"synth",
|
|
108
|
+
"checkov",
|
|
91
109
|
],
|
|
92
110
|
}
|
|
93
111
|
`;
|
|
@@ -137,6 +155,7 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
137
155
|
"compile",
|
|
138
156
|
"test",
|
|
139
157
|
"synth",
|
|
158
|
+
"checkov",
|
|
140
159
|
],
|
|
141
160
|
},
|
|
142
161
|
"cdk": {
|
|
@@ -146,6 +165,22 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
146
165
|
"cwd": "packages/test",
|
|
147
166
|
},
|
|
148
167
|
},
|
|
168
|
+
"checkov": {
|
|
169
|
+
"cache": true,
|
|
170
|
+
"dependsOn": [
|
|
171
|
+
"synth",
|
|
172
|
+
],
|
|
173
|
+
"executor": "nx:run-commands",
|
|
174
|
+
"inputs": [
|
|
175
|
+
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
176
|
+
],
|
|
177
|
+
"options": {
|
|
178
|
+
"command": "uvx checkov==3.2.469 --config-file packages/test/checkov.yml --file dist/packages/infra/cdk.out/**/*.template.json",
|
|
179
|
+
},
|
|
180
|
+
"outputs": [
|
|
181
|
+
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
182
|
+
],
|
|
183
|
+
},
|
|
149
184
|
"compile": {
|
|
150
185
|
"executor": "nx:run-commands",
|
|
151
186
|
"options": {
|
|
@@ -215,6 +250,70 @@ exports[`infra generator > should configure project.json with correct targets >
|
|
|
215
250
|
}
|
|
216
251
|
`;
|
|
217
252
|
|
|
253
|
+
exports[`infra generator > should generate Checkov configuration files > checkov-ts 1`] = `
|
|
254
|
+
"import { IConstruct } from 'constructs';
|
|
255
|
+
import { CfnResource } from 'aws-cdk-lib';
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Suppresses a set of rules for a construct tree.
|
|
259
|
+
*
|
|
260
|
+
* @param construct The root construct to suppress the rule for.
|
|
261
|
+
* @param ids The ids of the rules to suppress.
|
|
262
|
+
* @param comment The reason for suppressing the rule
|
|
263
|
+
* @param predicate A predicate function that determines whether the rule should be suppressed for the given construct or any of its descendants.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* The following example suppresses the CKV_AWS_XXX rule for the given construct.
|
|
267
|
+
* suppressRules(construct, ['CKV_AWS_XXX'], 'Not required for this use case')
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* The following example suppresses the CKV_AWS_XXX rule for the construct or any of its descendants if it is an instance of Bucket:
|
|
271
|
+
* suppressRules(construct, ['CKV_AWS_XXX'], 'Not required for this use case', (construct) => construct instanceof Bucket)
|
|
272
|
+
*/
|
|
273
|
+
export const suppressRules = (
|
|
274
|
+
construct: IConstruct,
|
|
275
|
+
ids: string[],
|
|
276
|
+
comment: string,
|
|
277
|
+
predicate?: (construct: IConstruct) => boolean,
|
|
278
|
+
) => {
|
|
279
|
+
const resources = (
|
|
280
|
+
predicate ? construct.node.findAll().filter(predicate) : [construct]
|
|
281
|
+
)
|
|
282
|
+
.map((resource) => {
|
|
283
|
+
if (CfnResource.isCfnResource(resource)) {
|
|
284
|
+
return resource;
|
|
285
|
+
} else return resource.node.defaultChild;
|
|
286
|
+
})
|
|
287
|
+
.filter((resource) => CfnResource.isCfnResource(resource));
|
|
288
|
+
|
|
289
|
+
resources.forEach((resource) => {
|
|
290
|
+
const metadata = resource.getMetadata('checkov') || {};
|
|
291
|
+
metadata['skip'] = [
|
|
292
|
+
...(metadata['skip'] ?? []),
|
|
293
|
+
...ids.map((id) => ({ id, comment })),
|
|
294
|
+
];
|
|
295
|
+
resource.addMetadata('checkov', metadata);
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
"
|
|
299
|
+
`;
|
|
300
|
+
|
|
301
|
+
exports[`infra generator > should generate Checkov configuration files > checkov-yml 1`] = `
|
|
302
|
+
"# Defines the checks to skip entirely. Remove if your requirements differ.
|
|
303
|
+
skip-check:
|
|
304
|
+
# Lambda function suppressions
|
|
305
|
+
- CKV_AWS_115 # Concurrent execution limit
|
|
306
|
+
- CKV_AWS_116 # Dead Letter Queue
|
|
307
|
+
- CKV_AWS_117 # Lambda functions in VPC
|
|
308
|
+
- CKV_AWS_173 # Encrypt Lambda environment variables
|
|
309
|
+
- CKV_AWS_272 # Code signing
|
|
310
|
+
output:
|
|
311
|
+
- cli
|
|
312
|
+
- json
|
|
313
|
+
output-file-path: console,dist/packages/test/checkov/checkov_report.json
|
|
314
|
+
"
|
|
315
|
+
`;
|
|
316
|
+
|
|
218
317
|
exports[`infra generator > should generate consistent file content across runs > consistent-files 1`] = `
|
|
219
318
|
{
|
|
220
319
|
"cdk.json": "{
|
|
@@ -286,11 +385,9 @@ exports[`infra generator > should generate consistent file content across runs >
|
|
|
286
385
|
}
|
|
287
386
|
",
|
|
288
387
|
"src/main.ts": "import { ApplicationStage } from './stages/application-stage.js';
|
|
289
|
-
import { App
|
|
388
|
+
import { App } from ':proj/common-constructs';
|
|
290
389
|
|
|
291
|
-
const app = new App(
|
|
292
|
-
policyValidationBeta1: [new CfnGuardValidator(RuleSet.AWS_PROTOTYPING)],
|
|
293
|
-
});
|
|
390
|
+
const app = new App();
|
|
294
391
|
|
|
295
392
|
// Use this to deploy your own sandbox environment (assumes your CLI credentials)
|
|
296
393
|
new ApplicationStage(app, 'proj-test-sandbox', {
|
|
@@ -440,11 +537,9 @@ exports[`infra generator > should generate files with correct content > cdk-json
|
|
|
440
537
|
|
|
441
538
|
exports[`infra generator > should generate files with correct content > main-ts 1`] = `
|
|
442
539
|
"import { ApplicationStage } from './stages/application-stage.js';
|
|
443
|
-
import { App
|
|
540
|
+
import { App } from ':proj/common-constructs';
|
|
444
541
|
|
|
445
|
-
const app = new App(
|
|
446
|
-
policyValidationBeta1: [new CfnGuardValidator(RuleSet.AWS_PROTOTYPING)],
|
|
447
|
-
});
|
|
542
|
+
const app = new App();
|
|
448
543
|
|
|
449
544
|
// Use this to deploy your own sandbox environment (assumes your CLI credentials)
|
|
450
545
|
new ApplicationStage(app, 'proj-test-sandbox', {
|
|
@@ -529,11 +624,9 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
529
624
|
}
|
|
530
625
|
",
|
|
531
626
|
"src/main.ts": "import { ApplicationStage } from './stages/application-stage.js';
|
|
532
|
-
import { App
|
|
627
|
+
import { App } from ':proj/common-constructs';
|
|
533
628
|
|
|
534
|
-
const app = new App(
|
|
535
|
-
policyValidationBeta1: [new CfnGuardValidator(RuleSet.AWS_PROTOTYPING)],
|
|
536
|
-
});
|
|
629
|
+
const app = new App();
|
|
537
630
|
|
|
538
631
|
// Use this to deploy your own sandbox environment (assumes your CLI credentials)
|
|
539
632
|
new ApplicationStage(app, 'proj-custom-infra-sandbox', {
|
|
@@ -601,6 +694,7 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
601
694
|
"compile",
|
|
602
695
|
"test",
|
|
603
696
|
"synth",
|
|
697
|
+
"checkov",
|
|
604
698
|
],
|
|
605
699
|
},
|
|
606
700
|
"cdk": {
|
|
@@ -610,6 +704,22 @@ exports[`infra generator > should handle custom project names correctly > custom
|
|
|
610
704
|
"cwd": "packages/custom-infra",
|
|
611
705
|
},
|
|
612
706
|
},
|
|
707
|
+
"checkov": {
|
|
708
|
+
"cache": true,
|
|
709
|
+
"dependsOn": [
|
|
710
|
+
"synth",
|
|
711
|
+
],
|
|
712
|
+
"executor": "nx:run-commands",
|
|
713
|
+
"inputs": [
|
|
714
|
+
"{workspaceRoot}/dist/{projectRoot}/cdk.out",
|
|
715
|
+
],
|
|
716
|
+
"options": {
|
|
717
|
+
"command": "uvx checkov==3.2.469 --config-file packages/custom-infra/checkov.yml --file dist/packages/infra/cdk.out/**/*.template.json",
|
|
718
|
+
},
|
|
719
|
+
"outputs": [
|
|
720
|
+
"{workspaceRoot}/dist/{projectRoot}/checkov",
|
|
721
|
+
],
|
|
722
|
+
},
|
|
613
723
|
"compile": {
|
|
614
724
|
"executor": "nx:run-commands",
|
|
615
725
|
"options": {
|
|
@@ -46,28 +46,28 @@ Currently hot swapping supports Lambda functions, Step Functions state machines,
|
|
|
46
46
|
|
|
47
47
|
Run `<%= pkgMgrCmd %> nx deploy <%= fullyQualifiedName %> --hotswap --all`
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Checkov Rule Suppressions
|
|
50
50
|
|
|
51
51
|
There may be instances where you want to suppress certain rules on resources. You can do this in two ways:
|
|
52
52
|
|
|
53
53
|
### Supress a rule on a given construct
|
|
54
54
|
|
|
55
55
|
```typescript
|
|
56
|
-
import {
|
|
56
|
+
import { suppressRules } from '<%= scopeAlias %>common-constructs';
|
|
57
57
|
|
|
58
58
|
...
|
|
59
59
|
// suppresses the RULE_NAME for the given construct.
|
|
60
|
-
|
|
60
|
+
suppressRules(construct, ['RULE_NAME'], 'Reason');
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### Supress a rule on a descendant construct
|
|
64
64
|
|
|
65
65
|
```typescript
|
|
66
|
-
import {
|
|
66
|
+
import { suppressRules } from '<%= scopeAlias %>common-constructs';
|
|
67
67
|
|
|
68
68
|
...
|
|
69
69
|
// Supresses the RULE_NAME for the construct or any of its descendants if it is an instance of Bucket
|
|
70
|
-
suppressRule(construct, 'RULE_NAME', (construct) => construct instanceof Bucket);
|
|
70
|
+
suppressRule(construct, ['RULE_NAME'], 'Reason', (construct) => construct instanceof Bucket);
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
## Useful links
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Defines the checks to skip entirely. Remove if your requirements differ.
|
|
2
|
+
skip-check:
|
|
3
|
+
# Lambda function suppressions
|
|
4
|
+
- CKV_AWS_115 # Concurrent execution limit
|
|
5
|
+
- CKV_AWS_116 # Dead Letter Queue
|
|
6
|
+
- CKV_AWS_117 # Lambda functions in VPC
|
|
7
|
+
- CKV_AWS_173 # Encrypt Lambda environment variables
|
|
8
|
+
- CKV_AWS_272 # Code signing
|
|
9
|
+
output:
|
|
10
|
+
- cli
|
|
11
|
+
- json
|
|
12
|
+
output-file-path: console,dist/<%- dir %>/checkov/checkov_report.json
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ApplicationStage } from './stages/application-stage.js';
|
|
2
|
-
import { App
|
|
2
|
+
import { App } from '<%= scopeAlias %>common-constructs';
|
|
3
3
|
|
|
4
|
-
const app = new App(
|
|
5
|
-
policyValidationBeta1: [new CfnGuardValidator(RuleSet.<%= ruleSet %>)]
|
|
6
|
-
});
|
|
4
|
+
const app = new App();
|
|
7
5
|
|
|
8
6
|
// Use this to deploy your own sandbox environment (assumes your CLI credentials)
|
|
9
7
|
new ApplicationStage(app, '<%= namespace %>-sandbox', {
|
|
@@ -13,13 +13,13 @@ const versions_1 = require("../../utils/versions");
|
|
|
13
13
|
const npm_scope_1 = require("../../utils/npm-scope");
|
|
14
14
|
const shared_constructs_1 = require("../../utils/shared-constructs");
|
|
15
15
|
const shared_constructs_constants_1 = require("../../utils/shared-constructs-constants");
|
|
16
|
-
const ast_1 = require("../../utils/ast");
|
|
17
16
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
18
17
|
const format_1 = require("../../utils/format");
|
|
19
18
|
const object_1 = require("../../utils/object");
|
|
20
19
|
const nx_1 = require("../../utils/nx");
|
|
21
20
|
const metrics_1 = require("../../utils/metrics");
|
|
22
21
|
const names_1 = require("../../utils/names");
|
|
22
|
+
const py_1 = require("../../utils/py");
|
|
23
23
|
exports.INFRA_APP_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
24
24
|
function tsInfraGenerator(tree, schema) {
|
|
25
25
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -43,19 +43,16 @@ function tsInfraGenerator(tree, schema) {
|
|
|
43
43
|
tree.delete((0, devkit_1.joinPathFragments)(libraryRoot, 'src'));
|
|
44
44
|
(0, devkit_1.generateFiles)(tree, // the virtual file system
|
|
45
45
|
(0, devkit_1.joinPathFragments)(__dirname, './files/app'), // path to the file templates
|
|
46
|
-
libraryRoot, Object.assign(
|
|
46
|
+
libraryRoot, Object.assign({ synthDir: synthDirFromProject, scopeAlias: scopeAlias, namespace: (0, names_1.kebabCase)(fullyQualifiedName), fullyQualifiedName, pkgMgrCmd: (0, devkit_1.getPackageManagerCommand)().exec, dir: lib.dir }, schema), {
|
|
47
47
|
overwriteStrategy: devkit_1.OverwriteStrategy.Overwrite,
|
|
48
48
|
});
|
|
49
|
-
(0, devkit_1.generateFiles)(tree, // the virtual file system
|
|
50
|
-
(0, devkit_1.joinPathFragments)(__dirname, 'files', shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core'), (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core'), Object.assign({ synthDir: synthDirFromProject, scopeAlias: (0, npm_scope_1.toScopeAlias)((0, npm_scope_1.getNpmScopePrefix)(tree)) }, schema), {
|
|
51
|
-
overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting,
|
|
52
|
-
});
|
|
53
49
|
(0, devkit_1.updateJson)(tree, `${libraryRoot}/project.json`, (config) => {
|
|
54
50
|
var _a;
|
|
55
51
|
config.projectType = 'application';
|
|
56
52
|
config.targets.build.dependsOn = [
|
|
57
53
|
...((_a = config.targets.build.dependsOn) !== null && _a !== void 0 ? _a : []),
|
|
58
54
|
'synth',
|
|
55
|
+
'checkov',
|
|
59
56
|
];
|
|
60
57
|
config.targets.synth = {
|
|
61
58
|
cache: true,
|
|
@@ -68,6 +65,16 @@ function tsInfraGenerator(tree, schema) {
|
|
|
68
65
|
command: 'cdk synth',
|
|
69
66
|
},
|
|
70
67
|
};
|
|
68
|
+
config.targets.checkov = {
|
|
69
|
+
cache: true,
|
|
70
|
+
executor: 'nx:run-commands',
|
|
71
|
+
inputs: ['{workspaceRoot}/dist/{projectRoot}/cdk.out'],
|
|
72
|
+
outputs: ['{workspaceRoot}/dist/{projectRoot}/checkov'],
|
|
73
|
+
dependsOn: ['synth'],
|
|
74
|
+
options: {
|
|
75
|
+
command: (0, py_1.uvxCommand)('checkov', `--config-file ${lib.dir}/checkov.yml --file dist/packages/infra/cdk.out/**/*.template.json`),
|
|
76
|
+
},
|
|
77
|
+
};
|
|
71
78
|
config.targets.deploy = {
|
|
72
79
|
executor: 'nx:run-commands',
|
|
73
80
|
options: {
|
|
@@ -113,9 +120,7 @@ function tsInfraGenerator(tree, schema) {
|
|
|
113
120
|
config.targets = (0, object_1.sortObjectKeys)(config.targets);
|
|
114
121
|
return config;
|
|
115
122
|
});
|
|
116
|
-
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core', 'index.ts'), './cfn-guard.js');
|
|
117
123
|
(0, devkit_1.addDependenciesToPackageJson)(tree, (0, versions_1.withVersions)([
|
|
118
|
-
'@cdklabs/cdk-validator-cfnguard',
|
|
119
124
|
'aws-cdk-lib',
|
|
120
125
|
'aws-cdk',
|
|
121
126
|
'esbuild',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/infra/app/generator.ts"],"names":[],"mappings":";;;AA0CA,4CA6JC;;AAvMD;;;GAGG;AACH,uCAYoB;AAEpB,4EAA6E;AAC7E,mDAAoD;AACpD,qDAAwE;AACxE,qEAA0E;AAC1E,yFAGiD;AAEjD,wDAAwB;AACxB,+CAA0D;AAC1D,+CAAoD;AACpD,uCAIwB;AACxB,iDAAsE;AACtE,6CAA8C;AAC9C,uCAA4C;AAE/B,QAAA,wBAAwB,GACnC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAE/B,SAAsB,gBAAgB,CACpC,IAAU,EACV,MAA8B;;QAE9B,MAAM,GAAG,GAAG,IAAA,2BAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1C,MAAM,IAAA,mBAAkB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAEvC,IAAA,yBAAoB,EAAC,IAAI,EAAE,GAAG,CAAC,kBAAkB,EAAE,gCAAwB,CAAC,CAAC;QAE7E,iEAAiE;QACjE,MAAM,IAAA,6CAAyB,EAAC,IAAI,EAAE;YACpC,WAAW,EAAE,KAAK;SACnB,CAAC,CAAC;QAEH,MAAM,gBAAgB,GAAG,SAAS,GAAG,CAAC,GAAG,UAAU,CAAC;QACpD,MAAM,mBAAmB,GACvB,GAAG,CAAC,GAAG;aACJ,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAClC,MAAM,aAAa,GAAG,IAA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,kBAAe,gBAAgB,CAAC"}
|
|
@@ -4,14 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export interface TsInfraGeneratorSchema {
|
|
6
6
|
name: string;
|
|
7
|
-
ruleSet:
|
|
8
|
-
| 'aws_prototyping'
|
|
9
|
-
| 'cfn_nag'
|
|
10
|
-
| 'hipaa'
|
|
11
|
-
| 'nist_csf'
|
|
12
|
-
| 'pci_dss_3_2_1'
|
|
13
|
-
| 'well_architected_reliability'
|
|
14
|
-
| 'well_architected_security';
|
|
15
7
|
directory?: string;
|
|
16
8
|
// unitTestRunner?: 'jest' | 'vitest' | 'none';
|
|
17
9
|
// linter?: Linter;
|
|
@@ -14,22 +14,6 @@
|
|
|
14
14
|
"x-prompt": "What name would you like to use for the application?",
|
|
15
15
|
"pattern": "^[a-zA-Z][^:]*$"
|
|
16
16
|
},
|
|
17
|
-
"ruleSet": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"enum": [
|
|
20
|
-
"aws_prototyping",
|
|
21
|
-
"cfn_nag",
|
|
22
|
-
"hipaa",
|
|
23
|
-
"nist_csf",
|
|
24
|
-
"pci_dss_3_2_1",
|
|
25
|
-
"well_architected_reliability",
|
|
26
|
-
"well_architected_security"
|
|
27
|
-
],
|
|
28
|
-
"x-priority": "important",
|
|
29
|
-
"x-prompt": "What rule set do you want to validate your AWS resources with?",
|
|
30
|
-
"description": "Rule set to validate your AWS resources with.",
|
|
31
|
-
"default": "aws_prototyping"
|
|
32
|
-
},
|
|
33
17
|
"directory": {
|
|
34
18
|
"description": "The directory of the new application.",
|
|
35
19
|
"type": "string",
|
package/src/license/config.js
CHANGED
|
@@ -27,8 +27,6 @@ exports.LANGUAGE_COMMENT_SYNTAX = Object.assign(Object.assign(Object.assign(Obje
|
|
|
27
27
|
'php',
|
|
28
28
|
// Java
|
|
29
29
|
'java',
|
|
30
|
-
// Smithy
|
|
31
|
-
'smithy',
|
|
32
30
|
// TypeSpec
|
|
33
31
|
'tsp',
|
|
34
32
|
// Golang
|
|
@@ -83,7 +81,9 @@ exports.LANGUAGE_COMMENT_SYNTAX = Object.assign(Object.assign(Object.assign(Obje
|
|
|
83
81
|
// Markdown
|
|
84
82
|
md: { block: { start: '<!--', end: '-->' } },
|
|
85
83
|
// Terraform
|
|
86
|
-
tf: { line: '#', block: { start: '/*', end: '*/' } }
|
|
84
|
+
tf: { line: '#', block: { start: '/*', end: '*/' } },
|
|
85
|
+
// Smithy
|
|
86
|
+
smithy: { line: '//' } });
|
|
87
87
|
/**
|
|
88
88
|
* Build the default license config for a given license
|
|
89
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/license/config.ts"],"names":[],"mappings":";;;;AAMA,iDAG+B;AAG/B;;GAEG;AACH,MAAM,kBAAkB,GAA+B,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAExE;;GAEG;AACU,QAAA,uBAAuB,6EAE/B,MAAM,CAAC,WAAW,CACnB;IACE,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;IACR,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/license/config.ts"],"names":[],"mappings":";;;;AAMA,iDAG+B;AAG/B;;GAEG;AACH,MAAM,kBAAkB,GAA+B,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAExE;;GAEG;AACU,QAAA,uBAAuB,6EAE/B,MAAM,CAAC,WAAW,CACnB;IACE,OAAO;IACP,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,QAAQ;IACR,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IAC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