@aws/nx-plugin 0.1.6 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-THIRD-PARTY +1554 -3241
- package/generators.json +1 -13
- package/package.json +14 -14
- package/src/cloudscape-website/app/README.md +84 -48
- package/src/cloudscape-website/app/__snapshots__/generator.spec.ts.snap +168 -233
- package/src/cloudscape-website/app/files/app/README.md.template +44 -0
- package/src/cloudscape-website/app/files/app/src/layouts/App/index.tsx.template +40 -43
- package/src/cloudscape-website/app/files/app/src/layouts/App/navitems.ts.template +3 -3
- package/src/cloudscape-website/app/files/app/src/layouts/Routes/index.tsx.template +4 -6
- package/src/cloudscape-website/app/files/app/src/main.tsx.template +7 -10
- package/src/cloudscape-website/app/files/app/src/pages/Home/index.tsx.template +0 -2
- package/src/cloudscape-website/app/files/common/constructs/src/app/static-websites/__websiteNameKebabCase__.ts.template +13 -0
- package/src/cloudscape-website/app/files/common/constructs/src/{__websiteNameKebabCase__ → core}/static-website.ts.template +79 -144
- package/src/cloudscape-website/app/generator.js +90 -74
- package/src/cloudscape-website/app/generator.js.map +1 -1
- package/src/cloudscape-website/app/schema.d.ts +3 -5
- package/src/cloudscape-website/app/schema.json +1 -24
- package/src/cloudscape-website/cognito-auth/README.md +53 -32
- package/src/cloudscape-website/cognito-auth/__snapshots__/generator.spec.ts.snap +162 -124
- package/src/cloudscape-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +53 -39
- package/src/cloudscape-website/cognito-auth/files/common/constructs/src/core/user-identity.ts.template +168 -0
- package/src/cloudscape-website/cognito-auth/generator.js +130 -47
- package/src/cloudscape-website/cognito-auth/generator.js.map +1 -1
- package/src/cloudscape-website/cognito-auth/schema.d.ts +1 -0
- package/src/cloudscape-website/cognito-auth/schema.json +7 -1
- package/src/cloudscape-website/runtime-config/__snapshots__/generator.spec.ts.snap +20 -15
- package/src/cloudscape-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +7 -10
- package/src/cloudscape-website/runtime-config/files/app/hooks/useRuntimeConfig.tsx.template +13 -0
- package/src/cloudscape-website/runtime-config/generator.js +4 -2
- package/src/cloudscape-website/runtime-config/generator.js.map +1 -1
- package/src/infra/app/README.md +71 -46
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +184 -305
- package/src/infra/app/files/app/README.md.template +76 -0
- package/src/infra/app/files/app/src/main.ts.template +18 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/aws-prototyping.guard +1282 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/cfn-nag.guard +6839 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/hipaa-security.guard +2807 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/nist-csf.guard +2585 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/pci-dss-3-2-1.guard +2236 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/wa-reliability-pillar.guard +885 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard-rules/wa-security-pillar.guard +2205 -0
- package/src/infra/app/files/common/constructs/src/core/cfn-guard.ts.template +63 -0
- package/src/infra/app/generator.js +36 -7
- package/src/infra/app/generator.js.map +1 -1
- package/src/infra/app/schema.d.ts +10 -1
- package/src/infra/app/schema.json +16 -8
- package/src/trpc/backend/README.md +102 -80
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +42 -19
- package/src/trpc/backend/files/backend/README.md.template +33 -0
- package/src/trpc/backend/files/common/constructs/src/app/trpc-apis/__apiNameKebabCase__.ts.template +18 -0
- package/src/trpc/backend/files/common/constructs/src/{__apiNameKebabCase__/index.ts.template → core/trpc-api.ts.template} +12 -16
- package/src/trpc/backend/files/schema/README.md.template +33 -0
- package/src/trpc/backend/generator.js +30 -44
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.ts +3 -1
- package/src/trpc/backend/schema.json +8 -13
- package/src/trpc/react/README.md +46 -66
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +104 -65
- package/src/trpc/react/files/src/components/TrpcClients/IsolatedTrpcProvider.tsx.template +75 -0
- package/src/trpc/react/files/src/components/TrpcClients/TrpcApis.tsx.template +1 -0
- package/src/trpc/react/files/src/components/TrpcClients/TrpcClientProviders.tsx.template +10 -0
- package/src/trpc/react/files/src/components/TrpcClients/index.tsx.template +5 -0
- package/src/trpc/react/files/src/hooks/useSigV4.tsx.template +38 -0
- package/src/trpc/react/files/src/hooks/use__apiNameClassName__.tsx.template +3 -0
- package/src/trpc/react/generator.js +124 -25
- package/src/trpc/react/generator.js.map +1 -1
- package/src/trpc/react/schema.json +2 -2
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +47 -93
- package/src/ts/lib/eslint.d.ts +1 -2
- package/src/ts/lib/eslint.js +62 -21
- package/src/ts/lib/eslint.js.map +1 -1
- package/src/ts/lib/files/README.md.template +33 -0
- package/src/ts/lib/generator.js +44 -5
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/schema.d.ts +1 -4
- package/src/ts/lib/schema.json +2 -21
- package/src/ts/lib/ts-project-utils.js +3 -18
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/vitest.js +12 -0
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/utils/ast.d.ts +13 -0
- package/src/utils/ast.js +102 -0
- package/src/utils/ast.js.map +1 -0
- package/src/utils/files/common/constructs/src/app/index.ts.template +0 -0
- package/src/utils/files/common/constructs/src/{runtime-config → core}/runtime-config.ts.template +3 -5
- package/src/utils/files/common/constructs/src/index.ts.template +2 -1
- package/src/utils/files/common/readme/README.md.template +33 -0
- package/src/utils/files/common/types/src/runtime-config.ts.template +2 -13
- package/src/utils/format.d.ts +1 -1
- package/src/utils/format.js +2 -2
- package/src/utils/format.js.map +1 -1
- package/src/utils/names.d.ts +2 -0
- package/src/utils/names.js +27 -0
- package/src/utils/names.js.map +1 -0
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/paths.js.map +1 -1
- package/src/utils/shared-constructs.js +37 -4
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/test.d.ts +2 -0
- package/src/utils/test.js +19 -0
- package/src/utils/test.js.map +1 -0
- package/src/utils/versions.d.ts +15 -9
- package/src/utils/versions.js +14 -8
- package/src/utils/versions.js.map +1 -1
- package/src/cloudscape-website/app/files/common/constructs/src/__websiteNameKebabCase__/cloudfront-web-acl.ts.template +0 -317
- package/src/cloudscape-website/app/files/common/constructs/src/__websiteNameKebabCase__/index.ts.template +0 -4
- package/src/cloudscape-website/app/files/common/constructs/src/__websiteNameKebabCase__/webacl_event_handler/index.ts.template +0 -301
- package/src/cloudscape-website/cognito-auth/files/common/constructs/src/identity/index.ts.template +0 -4
- package/src/cloudscape-website/cognito-auth/files/common/constructs/src/identity/user-identity.ts.template +0 -66
- package/src/cloudscape-website/cognito-auth/files/common/constructs/src/identity/userpool-with-mfa.ts.template +0 -70
- package/src/gitlab/generator.d.ts +0 -8
- package/src/gitlab/generator.js +0 -16
- package/src/gitlab/generator.js.map +0 -1
- package/src/gitlab/schema.d.ts +0 -9
- package/src/gitlab/schema.json +0 -52
- package/src/infra/app/files/src/main.ts.template +0 -37
- package/src/trpc/react/files/src/components/TRPCClientProvider/index.tsx.template +0 -34
- package/src/trpc/react/files/src/hooks/useTrpc.tsx.template +0 -5
- package/src/ts/cjs-to-esm/generator.d.ts +0 -12
- package/src/ts/cjs-to-esm/generator.js +0 -189
- package/src/ts/cjs-to-esm/generator.js.map +0 -1
- package/src/ts/cjs-to-esm/schema.d.ts +0 -9
- package/src/ts/cjs-to-esm/schema.json +0 -28
- /package/src/infra/app/files/{cdk.json → app/cdk.json} +0 -0
- /package/src/infra/app/files/{src → app/src}/stacks/application-stack.ts.template +0 -0
- /package/src/utils/files/common/constructs/src/{runtime-config → core}/index.ts.template +0 -0
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cjsToEsm = cjsToEsm;
|
|
4
|
-
exports.cjsToEsmGenerator = cjsToEsmGenerator;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
/**
|
|
7
|
-
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
8
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
*/
|
|
10
|
-
const devkit_1 = require("@nx/devkit");
|
|
11
|
-
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
12
|
-
const ts = tslib_1.__importStar(require("typescript"));
|
|
13
|
-
const minimatch_1 = require("minimatch");
|
|
14
|
-
// Replaces "module.exports = value" with "export default value"
|
|
15
|
-
const replaceModuleExportsWithExportDefault = (sourceFile) => {
|
|
16
|
-
const transformer = (context) => (rootNode) => {
|
|
17
|
-
function visit(node) {
|
|
18
|
-
if (ts.isExpressionStatement(node)) {
|
|
19
|
-
const expr = node.expression;
|
|
20
|
-
if (ts.isBinaryExpression(expr) &&
|
|
21
|
-
ts.isPropertyAccessExpression(expr.left) &&
|
|
22
|
-
ts.isIdentifier(expr.left.expression) &&
|
|
23
|
-
expr.left.expression.text === 'module' &&
|
|
24
|
-
ts.isIdentifier(expr.left.name) &&
|
|
25
|
-
expr.left.name.text === 'exports' &&
|
|
26
|
-
expr.operatorToken.kind === ts.SyntaxKind.EqualsToken) {
|
|
27
|
-
// Create an export default statement
|
|
28
|
-
return context.factory.createExportAssignment(undefined, undefined, expr.right);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return ts.visitEachChild(node, visit, context);
|
|
32
|
-
}
|
|
33
|
-
return ts.visitNode(rootNode, visit);
|
|
34
|
-
};
|
|
35
|
-
const result = ts.transform(sourceFile, [transformer]);
|
|
36
|
-
return result.transformed[0];
|
|
37
|
-
};
|
|
38
|
-
// Replaces "const x = require('y')" with "import x from 'y'"
|
|
39
|
-
const replaceRequires = (sourceFile) => {
|
|
40
|
-
const transformer = (context) => (rootNode) => {
|
|
41
|
-
function visit(node) {
|
|
42
|
-
if (ts.isVariableStatement(node)) {
|
|
43
|
-
const declaration = node.declarationList.declarations[0];
|
|
44
|
-
if (declaration && ts.isVariableDeclaration(declaration)) {
|
|
45
|
-
const initializer = declaration.initializer;
|
|
46
|
-
if (initializer &&
|
|
47
|
-
ts.isCallExpression(initializer) &&
|
|
48
|
-
ts.isIdentifier(initializer.expression) &&
|
|
49
|
-
initializer.expression.text === 'require' &&
|
|
50
|
-
initializer.arguments.length === 1) {
|
|
51
|
-
const modulePath = initializer.arguments[0];
|
|
52
|
-
if (ts.isStringLiteral(modulePath)) {
|
|
53
|
-
// Handle destructuring pattern
|
|
54
|
-
if (ts.isObjectBindingPattern(declaration.name)) {
|
|
55
|
-
const importSpecifiers = declaration.name.elements
|
|
56
|
-
.map((element) => {
|
|
57
|
-
if (ts.isBindingElement(element) &&
|
|
58
|
-
ts.isIdentifier(element.name)) {
|
|
59
|
-
return context.factory.createImportSpecifier(false, undefined, element.name);
|
|
60
|
-
}
|
|
61
|
-
return undefined;
|
|
62
|
-
})
|
|
63
|
-
.filter((spec) => spec !== undefined);
|
|
64
|
-
return context.factory.createImportDeclaration(undefined, context.factory.createImportClause(false, undefined, context.factory.createNamedImports(importSpecifiers)), modulePath, undefined);
|
|
65
|
-
}
|
|
66
|
-
// Handle simple require
|
|
67
|
-
if (ts.isIdentifier(declaration.name)) {
|
|
68
|
-
return context.factory.createImportDeclaration(undefined, context.factory.createImportClause(false, declaration.name, undefined), modulePath, undefined);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return ts.visitEachChild(node, visit, context);
|
|
75
|
-
}
|
|
76
|
-
return ts.visitNode(rootNode, visit);
|
|
77
|
-
};
|
|
78
|
-
const result = ts.transform(sourceFile, [transformer]);
|
|
79
|
-
return result.transformed[0];
|
|
80
|
-
};
|
|
81
|
-
// Replaces requires not directly assigned to variables eg
|
|
82
|
-
// "const x = require('y').foo()" with
|
|
83
|
-
// import _import0 from 'y'
|
|
84
|
-
// const x = _import0.foo()
|
|
85
|
-
const replaceInlineRequires = (sourceFile) => {
|
|
86
|
-
let importCounter = 0;
|
|
87
|
-
const imports = [];
|
|
88
|
-
const importMap = new Map();
|
|
89
|
-
const transformer = (context) => (rootNode) => {
|
|
90
|
-
function visit(node) {
|
|
91
|
-
if (ts.isCallExpression(node) &&
|
|
92
|
-
ts.isIdentifier(node.expression) &&
|
|
93
|
-
node.expression.text === 'require' &&
|
|
94
|
-
node.arguments.length === 1 &&
|
|
95
|
-
ts.isStringLiteral(node.arguments[0])) {
|
|
96
|
-
const modulePath = node.arguments[0];
|
|
97
|
-
const modulePathText = modulePath.text;
|
|
98
|
-
// Check if we already have an import for this module
|
|
99
|
-
if (!importMap.has(modulePathText)) {
|
|
100
|
-
const importName = `_import${importCounter++}`;
|
|
101
|
-
importMap.set(modulePathText, importName);
|
|
102
|
-
// Create import declaration
|
|
103
|
-
imports.push(context.factory.createImportDeclaration(undefined, context.factory.createImportClause(false, context.factory.createIdentifier(importName), undefined), modulePath, undefined));
|
|
104
|
-
}
|
|
105
|
-
// Replace require() with the import reference
|
|
106
|
-
return context.factory.createIdentifier(importMap.get(modulePathText));
|
|
107
|
-
}
|
|
108
|
-
return ts.visitEachChild(node, visit, context);
|
|
109
|
-
}
|
|
110
|
-
// First pass to collect all requires and create imports
|
|
111
|
-
const visited = ts.visitNode(rootNode, visit);
|
|
112
|
-
// If we found any inline requires, prepend the imports to the source file
|
|
113
|
-
if (imports.length > 0 && ts.isSourceFile(visited)) {
|
|
114
|
-
return context.factory.updateSourceFile(visited, [
|
|
115
|
-
...imports,
|
|
116
|
-
...visited.statements,
|
|
117
|
-
]);
|
|
118
|
-
}
|
|
119
|
-
return visited;
|
|
120
|
-
};
|
|
121
|
-
const result = ts.transform(sourceFile, [transformer]);
|
|
122
|
-
return result.transformed[0];
|
|
123
|
-
};
|
|
124
|
-
function cjsToEsm(tree, relativePathInTree, options) {
|
|
125
|
-
var _a, _b;
|
|
126
|
-
const includePatterns = (_a = options === null || options === void 0 ? void 0 : options.include) !== null && _a !== void 0 ? _a : ['**/*.{js,ts}'];
|
|
127
|
-
const excludePatterns = (_b = options === null || options === void 0 ? void 0 : options.exclude) !== null && _b !== void 0 ? _b : ['node_modules', 'dist', 'build', 'tmp', '.nx'].flatMap((p) => [
|
|
128
|
-
p,
|
|
129
|
-
`**/${p}/**/*`,
|
|
130
|
-
`${p}/**/*`,
|
|
131
|
-
]);
|
|
132
|
-
// Process each TypeScript/JavaScript file in the project
|
|
133
|
-
const processFile = (filePath) => {
|
|
134
|
-
const content = tree.read(filePath, 'utf-8');
|
|
135
|
-
if (!content)
|
|
136
|
-
return;
|
|
137
|
-
// Parse the source file
|
|
138
|
-
const originalSourceFile = tsquery_1.tsquery.ast(content);
|
|
139
|
-
let sourceFile = originalSourceFile;
|
|
140
|
-
sourceFile = replaceModuleExportsWithExportDefault(sourceFile);
|
|
141
|
-
sourceFile = replaceRequires(sourceFile);
|
|
142
|
-
sourceFile = replaceInlineRequires(sourceFile);
|
|
143
|
-
const printer = ts.createPrinter({
|
|
144
|
-
removeComments: false,
|
|
145
|
-
newLine: ts.NewLineKind.LineFeed,
|
|
146
|
-
});
|
|
147
|
-
tree.write(filePath, printer.printNode(ts.EmitHint.Unspecified, sourceFile, originalSourceFile));
|
|
148
|
-
};
|
|
149
|
-
// Process all files in the given directory (recursively)
|
|
150
|
-
const processDirectory = (dirPath) => {
|
|
151
|
-
const entries = tree.children(dirPath);
|
|
152
|
-
entries.forEach((entry) => {
|
|
153
|
-
const fullPath = `${dirPath}/${entry}`;
|
|
154
|
-
const relativePath = fullPath.replace(`${relativePathInTree}/`, '');
|
|
155
|
-
// Return early for exclude to ensure we don't traverse node_modules etc!
|
|
156
|
-
const shouldExclude = excludePatterns.some((pattern) => (0, minimatch_1.minimatch)(relativePath, pattern));
|
|
157
|
-
if (shouldExclude) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
if (tree.isFile(fullPath)) {
|
|
161
|
-
const shouldInclude = includePatterns.some((pattern) => (0, minimatch_1.minimatch)(relativePath, pattern));
|
|
162
|
-
if (shouldInclude) {
|
|
163
|
-
processFile(fullPath);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
processDirectory(fullPath);
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
// Start processing from the given directories
|
|
172
|
-
processDirectory(relativePathInTree);
|
|
173
|
-
}
|
|
174
|
-
function cjsToEsmGenerator(tree, options) {
|
|
175
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
// Get the project configuration
|
|
177
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
178
|
-
const project = projects.get(options.project);
|
|
179
|
-
if (!project) {
|
|
180
|
-
throw new Error(`Project ${options.project} not found`);
|
|
181
|
-
}
|
|
182
|
-
cjsToEsm(tree, project.root, {
|
|
183
|
-
include: options.include ? [options.include] : undefined,
|
|
184
|
-
exclude: options.exclude ? [options.exclude] : undefined,
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
exports.default = cjsToEsmGenerator;
|
|
189
|
-
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/cjs-to-esm/generator.ts"],"names":[],"mappings":";;AAiMA,4BAmEC;AAED,8CAgBC;;AAtRD;;;GAGG;AACH,uCAA+C;AAE/C,uDAAoD;AACpD,uDAAiC;AACjC,yCAAsC;AAEtC,gEAAgE;AAChE,MAAM,qCAAqC,GAAG,CAC5C,UAAyB,EACV,EAAE;IACjB,MAAM,WAAW,GACf,CAAoB,OAAiC,EAAE,EAAE,CACzD,CAAC,QAAW,EAAE,EAAE;QACd,SAAS,KAAK,CAAC,IAAa;Y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CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,8CAA8C;IAC9C,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;AACvC,CAAC;AAED,SAAsB,iBAAiB,CACrC,IAAU,EACV,OAAgC;;QAEhC,gCAAgC;QAChC,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE9C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,WAAW,OAAO,CAAC,OAAO,YAAY,CAAC,CAAC;QAC1D,CAAC;QAED,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;YACxD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS;SACzD,CAAC,CAAC;IACL,CAAC;CAAA;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"$id": "ts-cjs-to-esm",
|
|
5
|
-
"title": "Convert CommonJS to ESM",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"project": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "The name of the project to convert",
|
|
11
|
-
"$default": {
|
|
12
|
-
"$source": "argv",
|
|
13
|
-
"index": 0
|
|
14
|
-
},
|
|
15
|
-
"x-dropdown": "projects"
|
|
16
|
-
},
|
|
17
|
-
"include": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "Glob pattern for files to include in the conversion",
|
|
20
|
-
"default": "**/*.{js,ts}"
|
|
21
|
-
},
|
|
22
|
-
"exclude": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Glob pattern for files to exclude from the conversion. If not provided, patterns from .gitignore will be used"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"required": ["project"]
|
|
28
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|