@nx/js 16.0.0-beta.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/CHANGELOG.md +8 -0
- package/LICENSE +22 -0
- package/README.md +63 -0
- package/babel.d.ts +10 -0
- package/babel.js +89 -0
- package/babel.js.map +1 -0
- package/executors.json +37 -0
- package/generators.json +52 -0
- package/migrations.json +60 -0
- package/package.json +64 -0
- package/src/executors/node/compat.d.ts +2 -0
- package/src/executors/node/compat.js +6 -0
- package/src/executors/node/compat.js.map +1 -0
- package/src/executors/node/node-with-require-overrides.d.ts +5 -0
- package/src/executors/node/node-with-require-overrides.js +20 -0
- package/src/executors/node/node-with-require-overrides.js.map +1 -0
- package/src/executors/node/node.impl.d.ts +8 -0
- package/src/executors/node/node.impl.js +184 -0
- package/src/executors/node/node.impl.js.map +1 -0
- package/src/executors/node/schema.d.ts +16 -0
- package/src/executors/node/schema.json +74 -0
- package/src/executors/swc/compat.d.ts +2 -0
- package/src/executors/swc/compat.js +6 -0
- package/src/executors/swc/compat.js.map +1 -0
- package/src/executors/swc/schema.json +147 -0
- package/src/executors/swc/swc.impl.d.ts +11 -0
- package/src/executors/swc/swc.impl.js +126 -0
- package/src/executors/swc/swc.impl.js.map +1 -0
- package/src/executors/tsc/compat.d.ts +2 -0
- package/src/executors/tsc/compat.js +6 -0
- package/src/executors/tsc/compat.js.map +1 -0
- package/src/executors/tsc/schema.json +156 -0
- package/src/executors/tsc/tsc.impl.d.ts +7 -0
- package/src/executors/tsc/tsc.impl.js +106 -0
- package/src/executors/tsc/tsc.impl.js.map +1 -0
- package/src/generators/convert-to-swc/convert-to-swc.d.ts +5 -0
- package/src/generators/convert-to-swc/convert-to-swc.js +62 -0
- package/src/generators/convert-to-swc/convert-to-swc.js.map +1 -0
- package/src/generators/convert-to-swc/schema.d.ts +4 -0
- package/src/generators/convert-to-swc/schema.json +36 -0
- package/src/generators/init/files/__fileName__ +20 -0
- package/src/generators/init/init.d.ts +5 -0
- package/src/generators/init/init.js +67 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/schema.d.ts +6 -0
- package/src/generators/init/schema.json +30 -0
- package/src/generators/library/files/jest-config/jest.config.__ext__ +24 -0
- package/src/generators/library/files/lib/README.md +19 -0
- package/src/generators/library/files/lib/src/index.ts__tmpl__ +1 -0
- package/src/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +7 -0
- package/src/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +3 -0
- package/src/generators/library/files/lib/tsconfig.json__tmpl__ +14 -0
- package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +10 -0
- package/src/generators/library/library.d.ts +15 -0
- package/src/generators/library/library.js +388 -0
- package/src/generators/library/library.js.map +1 -0
- package/src/generators/library/schema.json +134 -0
- package/src/index.d.ts +15 -0
- package/src/index.js +24 -0
- package/src/index.js.map +1 -0
- package/src/migrations/update-13-10-1/update-lib-swcrc-exclude.d.ts +2 -0
- package/src/migrations/update-13-10-1/update-lib-swcrc-exclude.js +32 -0
- package/src/migrations/update-13-10-1/update-lib-swcrc-exclude.js.map +1 -0
- package/src/migrations/update-13-8-5/update-node-executor.d.ts +2 -0
- package/src/migrations/update-13-8-5/update-node-executor.js +28 -0
- package/src/migrations/update-13-8-5/update-node-executor.js.map +1 -0
- package/src/migrations/update-13-8-5/update-swcrc.d.ts +2 -0
- package/src/migrations/update-13-8-5/update-swcrc.js +35 -0
- package/src/migrations/update-13-8-5/update-swcrc.js.map +1 -0
- package/src/migrations/update-14-0-0/exclude-jest-config-swcrc.d.ts +3 -0
- package/src/migrations/update-14-0-0/exclude-jest-config-swcrc.js +27 -0
- package/src/migrations/update-14-0-0/exclude-jest-config-swcrc.js.map +1 -0
- package/src/migrations/update-14-1-5/update-swcrc-path.d.ts +3 -0
- package/src/migrations/update-14-1-5/update-swcrc-path.js +30 -0
- package/src/migrations/update-14-1-5/update-swcrc-path.js.map +1 -0
- package/src/migrations/update-15-8-0/rename-swcrc-config.d.ts +2 -0
- package/src/migrations/update-15-8-0/rename-swcrc-config.js +81 -0
- package/src/migrations/update-15-8-0/rename-swcrc-config.js.map +1 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
- package/src/utils/add-babel-inputs.d.ts +2 -0
- package/src/utils/add-babel-inputs.js +23 -0
- package/src/utils/add-babel-inputs.js.map +1 -0
- package/src/utils/assets/assets.d.ts +10 -0
- package/src/utils/assets/assets.js +38 -0
- package/src/utils/assets/assets.js.map +1 -0
- package/src/utils/assets/copy-assets-handler.d.ts +28 -0
- package/src/utils/assets/copy-assets-handler.js +155 -0
- package/src/utils/assets/copy-assets-handler.js.map +1 -0
- package/src/utils/assets/index.d.ts +16 -0
- package/src/utils/assets/index.js +31 -0
- package/src/utils/assets/index.js.map +1 -0
- package/src/utils/buildable-libs-utils.d.ts +32 -0
- package/src/utils/buildable-libs-utils.js +309 -0
- package/src/utils/buildable-libs-utils.js.map +1 -0
- package/src/utils/check-dependencies.d.ts +8 -0
- package/src/utils/check-dependencies.js +24 -0
- package/src/utils/check-dependencies.js.map +1 -0
- package/src/utils/code-frames/highlight.d.ts +1 -0
- package/src/utils/code-frames/highlight.js +87 -0
- package/src/utils/code-frames/highlight.js.map +1 -0
- package/src/utils/code-frames/identifiers.d.ts +5 -0
- package/src/utils/code-frames/identifiers.js +53 -0
- package/src/utils/code-frames/identifiers.js.map +1 -0
- package/src/utils/compiler-helper-dependency.d.ts +17 -0
- package/src/utils/compiler-helper-dependency.js +111 -0
- package/src/utils/compiler-helper-dependency.js.map +1 -0
- package/src/utils/generate-globs.d.ts +6 -0
- package/src/utils/generate-globs.js +81 -0
- package/src/utils/generate-globs.js.map +1 -0
- package/src/utils/inline.d.ts +19 -0
- package/src/utils/inline.js +211 -0
- package/src/utils/inline.js.map +1 -0
- package/src/utils/minimal-publish-script.d.ts +2 -0
- package/src/utils/minimal-publish-script.js +76 -0
- package/src/utils/minimal-publish-script.js.map +1 -0
- package/src/utils/package-json/index.d.ts +13 -0
- package/src/utils/package-json/index.js +34 -0
- package/src/utils/package-json/index.js.map +1 -0
- package/src/utils/package-json/update-package-json.d.ts +20 -0
- package/src/utils/package-json/update-package-json.js +142 -0
- package/src/utils/package-json/update-package-json.js.map +1 -0
- package/src/utils/prettier.d.ts +6 -0
- package/src/utils/prettier.js +38 -0
- package/src/utils/prettier.js.map +1 -0
- package/src/utils/schema.d.ts +81 -0
- package/src/utils/swc/add-swc-config.d.ts +3 -0
- package/src/utils/swc/add-swc-config.js +44 -0
- package/src/utils/swc/add-swc-config.js.map +1 -0
- package/src/utils/swc/add-swc-dependencies.d.ts +2 -0
- package/src/utils/swc/add-swc-dependencies.js +15 -0
- package/src/utils/swc/add-swc-dependencies.js.map +1 -0
- package/src/utils/swc/compile-swc.d.ts +13 -0
- package/src/utils/swc/compile-swc.js +161 -0
- package/src/utils/swc/compile-swc.js.map +1 -0
- package/src/utils/swc/get-swcrc-path.d.ts +2 -0
- package/src/utils/swc/get-swcrc-path.js +14 -0
- package/src/utils/swc/get-swcrc-path.js.map +1 -0
- package/src/utils/swc/inline.d.ts +2 -0
- package/src/utils/swc/inline.js +13 -0
- package/src/utils/swc/inline.js.map +1 -0
- package/src/utils/typescript/__mocks__/plugin-a.d.ts +1 -0
- package/src/utils/typescript/__mocks__/plugin-a.js +6 -0
- package/src/utils/typescript/__mocks__/plugin-a.js.map +1 -0
- package/src/utils/typescript/__mocks__/plugin-b.d.ts +1 -0
- package/src/utils/typescript/__mocks__/plugin-b.js +6 -0
- package/src/utils/typescript/__mocks__/plugin-b.js.map +1 -0
- package/src/utils/typescript/ast-utils.d.ts +22 -0
- package/src/utils/typescript/ast-utils.js +199 -0
- package/src/utils/typescript/ast-utils.js.map +1 -0
- package/src/utils/typescript/compile-typescript-files.d.ts +10 -0
- package/src/utils/typescript/compile-typescript-files.js +45 -0
- package/src/utils/typescript/compile-typescript-files.js.map +1 -0
- package/src/utils/typescript/create-ts-config.d.ts +17 -0
- package/src/utils/typescript/create-ts-config.js +48 -0
- package/src/utils/typescript/create-ts-config.js.map +1 -0
- package/src/utils/typescript/ensure-typescript.d.ts +1 -0
- package/src/utils/typescript/ensure-typescript.js +10 -0
- package/src/utils/typescript/ensure-typescript.js.map +1 -0
- package/src/utils/typescript/get-source-nodes.d.ts +2 -0
- package/src/utils/typescript/get-source-nodes.js +19 -0
- package/src/utils/typescript/get-source-nodes.js.map +1 -0
- package/src/utils/typescript/load-ts-transformers.d.ts +5 -0
- package/src/utils/typescript/load-ts-transformers.js +63 -0
- package/src/utils/typescript/load-ts-transformers.js.map +1 -0
- package/src/utils/typescript/print-diagnostics.d.ts +1 -0
- package/src/utils/typescript/print-diagnostics.js +22 -0
- package/src/utils/typescript/print-diagnostics.js.map +1 -0
- package/src/utils/typescript/run-type-check.d.ts +32 -0
- package/src/utils/typescript/run-type-check.js +125 -0
- package/src/utils/typescript/run-type-check.js.map +1 -0
- package/src/utils/typescript/ts-config.d.ts +6 -0
- package/src/utils/typescript/ts-config.js +50 -0
- package/src/utils/typescript/ts-config.js.map +1 -0
- package/src/utils/typescript/types.d.ts +18 -0
- package/src/utils/typescript/types.js +3 -0
- package/src/utils/typescript/types.js.map +1 -0
- package/src/utils/versions.d.ts +8 -0
- package/src/utils/versions.js +13 -0
- package/src/utils/versions.js.map +1 -0
- package/src/utils/watch-for-single-file-changes.d.ts +1 -0
- package/src/utils/watch-for-single-file-changes.js +27 -0
- package/src/utils/watch-for-single-file-changes.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.impl.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/node/node.impl.ts"],"names":[],"mappings":";;;;AAAA,uCAMoB;AACpB,2EAAgF;AAChF,iDAAmD;AACnD,mCAAoC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AAO,OAAO,CAAC,GAAG,CAChB,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAO,eAAe,EAAE,EAAE;QACrD,MAAM,MAAM,GAAG,IAAA,0BAAiB,EAAC,eAAe,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAW,EAAC,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;QACtD,OAAO,IAAI,OAAO,CAAuB,CAAO,OAAO,EAAE,EAAE;YACzD,IAAI,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YAChC,4BAA4B;YAC5B,OAAO,CAAC,KAAK,CAAC,KAA6B,CAAC,CAAC;YAE7C,qBAAqB;YACrB,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE;gBAClB,KAAK,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;aAC7B;QACH,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CACH,CAAC;AACJ,CAAC;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const enum InspectType {
|
|
2
|
+
Inspect = 'inspect',
|
|
3
|
+
InspectBrk = 'inspect-brk',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface NodeExecutorOptions {
|
|
7
|
+
inspect: boolean | InspectType;
|
|
8
|
+
runtimeArgs: string[];
|
|
9
|
+
args: string[];
|
|
10
|
+
waitUntilTargets: string[];
|
|
11
|
+
buildTarget: string;
|
|
12
|
+
buildTargetOptions: Record<string, any>;
|
|
13
|
+
host: string;
|
|
14
|
+
port: number;
|
|
15
|
+
watch?: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"cli": "nx",
|
|
6
|
+
"title": "Node executor",
|
|
7
|
+
"description": "Execute Nodejs applications.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"buildTarget": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The target to run to build you the app."
|
|
13
|
+
},
|
|
14
|
+
"buildTargetOptions": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"description": "Additional options to pass into the build target.",
|
|
17
|
+
"default": {}
|
|
18
|
+
},
|
|
19
|
+
"waitUntilTargets": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "The targets to run before starting the node app.",
|
|
22
|
+
"default": [],
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"host": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": "localhost",
|
|
30
|
+
"description": "The host to inspect the process on."
|
|
31
|
+
},
|
|
32
|
+
"port": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"default": 9229,
|
|
35
|
+
"description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes."
|
|
36
|
+
},
|
|
37
|
+
"inspect": {
|
|
38
|
+
"oneOf": [
|
|
39
|
+
{
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["inspect", "inspect-brk"]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"description": "Ensures the app is starting with debugging.",
|
|
48
|
+
"default": "inspect"
|
|
49
|
+
},
|
|
50
|
+
"runtimeArgs": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"description": "Extra args passed to the node process.",
|
|
53
|
+
"default": [],
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"args": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"description": "Extra args when starting the app.",
|
|
61
|
+
"default": [],
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"watch": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"description": "Enable re-building when files change.",
|
|
69
|
+
"default": true
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["buildTarget"]
|
|
74
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const swc_impl_1 = require("./swc.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(swc_impl_1.swcExecutor);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/swc/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAC/C,yCAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,sBAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"$schema": "http://json-schema.org/schema",
|
|
5
|
+
"cli": "nx",
|
|
6
|
+
"title": "Typescript Build Target",
|
|
7
|
+
"description": "Builds using SWC.",
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"main": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The name of the main entry-point file.",
|
|
13
|
+
"x-completion-type": "file",
|
|
14
|
+
"x-completion-glob": "main@(.js|.ts|.tsx)"
|
|
15
|
+
},
|
|
16
|
+
"outputPath": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The output path of the generated files.",
|
|
19
|
+
"x-completion-type": "directory"
|
|
20
|
+
},
|
|
21
|
+
"tsConfig": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The path to the Typescript configuration file.",
|
|
24
|
+
"x-completion-type": "file",
|
|
25
|
+
"x-completion-glob": "tsconfig.*.json"
|
|
26
|
+
},
|
|
27
|
+
"swcrc": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The path to the SWC configuration file. Default: .swcrc",
|
|
30
|
+
"x-completion-type": "file",
|
|
31
|
+
"x-completion-glob": ".swcrc"
|
|
32
|
+
},
|
|
33
|
+
"assets": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"description": "List of static assets.",
|
|
36
|
+
"default": [],
|
|
37
|
+
"items": {
|
|
38
|
+
"$ref": "#/definitions/assetPattern"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"watch": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Enable re-building when files change.",
|
|
44
|
+
"default": false
|
|
45
|
+
},
|
|
46
|
+
"clean": {
|
|
47
|
+
"type": "boolean",
|
|
48
|
+
"description": "Remove previous output before build.",
|
|
49
|
+
"default": true
|
|
50
|
+
},
|
|
51
|
+
"skipTypeCheck": {
|
|
52
|
+
"type": "boolean",
|
|
53
|
+
"description": "Whether to skip TypeScript type checking.",
|
|
54
|
+
"default": false,
|
|
55
|
+
"x-priority": "important"
|
|
56
|
+
},
|
|
57
|
+
"swcExclude": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"description": "List of SWC Glob/Regex to be excluded from compilation (https://swc.rs/docs/configuration/compilation#exclude).",
|
|
60
|
+
"default": [
|
|
61
|
+
"./src/**/.*.spec.ts$",
|
|
62
|
+
"./**/.*.spec.ts$",
|
|
63
|
+
"./src/**/jest-setup.ts$",
|
|
64
|
+
"./**/jest-setup.ts$",
|
|
65
|
+
"./**/.*.js$"
|
|
66
|
+
],
|
|
67
|
+
"hidden": true
|
|
68
|
+
},
|
|
69
|
+
"updateBuildableProjectDepsInPackageJson": {
|
|
70
|
+
"type": "boolean",
|
|
71
|
+
"description": "Whether to update the buildable project dependencies in the build output package.json.",
|
|
72
|
+
"default": true
|
|
73
|
+
},
|
|
74
|
+
"buildableProjectDepsInPackageJsonType": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
|
77
|
+
"enum": ["dependencies", "peerDependencies"],
|
|
78
|
+
"default": "peerDependencies"
|
|
79
|
+
},
|
|
80
|
+
"external": {
|
|
81
|
+
"description": "A list projects to be treated as external. This feature is experimental",
|
|
82
|
+
"oneOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": ["all", "none"]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"type": "string"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"externalBuildTargets": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
"description": "List of target names that annotate a build target for a project",
|
|
101
|
+
"default": ["build"]
|
|
102
|
+
},
|
|
103
|
+
"generateLockfile": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"description": "Generate a lockfile (e.g. yarn.lock) that matches the workspace lockfile to ensure package versions match.",
|
|
106
|
+
"default": false,
|
|
107
|
+
"x-priority": "internal"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": ["main", "outputPath", "tsConfig"],
|
|
111
|
+
"definitions": {
|
|
112
|
+
"assetPattern": {
|
|
113
|
+
"oneOf": [
|
|
114
|
+
{
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"glob": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "The pattern to match."
|
|
120
|
+
},
|
|
121
|
+
"input": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
124
|
+
},
|
|
125
|
+
"ignore": {
|
|
126
|
+
"description": "An array of globs to ignore.",
|
|
127
|
+
"type": "array",
|
|
128
|
+
"items": {
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"output": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "Absolute path within the output."
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"additionalProperties": false,
|
|
138
|
+
"required": ["glob", "input", "output"]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "string"
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"examplesFile": "../../../docs/swc-examples.md"
|
|
147
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { NormalizedSwcExecutorOptions, SwcExecutorOptions } from '../../utils/schema';
|
|
3
|
+
export declare function normalizeOptions(options: SwcExecutorOptions, contextRoot: string, sourceRoot?: string, projectRoot?: string): NormalizedSwcExecutorOptions;
|
|
4
|
+
export declare function swcExecutor(_options: SwcExecutorOptions, context: ExecutorContext): AsyncGenerator<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
outfile?: undefined;
|
|
7
|
+
} | {
|
|
8
|
+
success: boolean;
|
|
9
|
+
outfile: string;
|
|
10
|
+
}, any, undefined>;
|
|
11
|
+
export default swcExecutor;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.swcExecutor = exports.normalizeOptions = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const assets_1 = require("../../utils/assets/assets");
|
|
7
|
+
const fs_extra_1 = require("fs-extra");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const assets_2 = require("../../utils/assets");
|
|
10
|
+
const check_dependencies_1 = require("../../utils/check-dependencies");
|
|
11
|
+
const compiler_helper_dependency_1 = require("../../utils/compiler-helper-dependency");
|
|
12
|
+
const inline_1 = require("../../utils/inline");
|
|
13
|
+
const package_json_1 = require("../../utils/package-json");
|
|
14
|
+
const compile_swc_1 = require("../../utils/swc/compile-swc");
|
|
15
|
+
const get_swcrc_path_1 = require("../../utils/swc/get-swcrc-path");
|
|
16
|
+
const inline_2 = require("../../utils/swc/inline");
|
|
17
|
+
function normalizeOptions(options, contextRoot, sourceRoot, projectRoot) {
|
|
18
|
+
const outputPath = (0, path_1.join)(contextRoot, options.outputPath);
|
|
19
|
+
if (options.skipTypeCheck == null) {
|
|
20
|
+
options.skipTypeCheck = false;
|
|
21
|
+
}
|
|
22
|
+
if (options.watch == null) {
|
|
23
|
+
options.watch = false;
|
|
24
|
+
}
|
|
25
|
+
// TODO: put back when inlining story is more stable
|
|
26
|
+
// if (options.external == null) {
|
|
27
|
+
// options.external = 'all';
|
|
28
|
+
// } else if (Array.isArray(options.external) && options.external.length === 0) {
|
|
29
|
+
// options.external = 'none';
|
|
30
|
+
// }
|
|
31
|
+
if (Array.isArray(options.external) && options.external.length > 0) {
|
|
32
|
+
const firstItem = options.external[0];
|
|
33
|
+
if (firstItem === 'all' || firstItem === 'none') {
|
|
34
|
+
options.external = firstItem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const files = (0, assets_1.assetGlobsToFiles)(options.assets, contextRoot, outputPath);
|
|
38
|
+
const projectRootParts = projectRoot.split('/');
|
|
39
|
+
// We pop the last part of the `projectRoot` to pass
|
|
40
|
+
// the last part (projectDir) and the remainder (projectRootParts) to swc
|
|
41
|
+
const projectDir = projectRootParts.pop();
|
|
42
|
+
// default to current directory if projectRootParts is [].
|
|
43
|
+
// Eg: when a project is at the root level, outside of layout dir
|
|
44
|
+
const swcCwd = projectRootParts.join('/') || '.';
|
|
45
|
+
let swcrcPath = (0, get_swcrc_path_1.getSwcrcPath)(options, contextRoot, projectRoot);
|
|
46
|
+
try {
|
|
47
|
+
const swcrcContent = (0, devkit_1.readJsonFile)(swcrcPath);
|
|
48
|
+
// if we have path mappings setup but baseUrl isn't specified, then we're proceeding with the following logic
|
|
49
|
+
if (swcrcContent.jsc &&
|
|
50
|
+
swcrcContent.jsc.paths &&
|
|
51
|
+
!swcrcContent.jsc.baseUrl) {
|
|
52
|
+
swcrcContent.jsc.baseUrl = `./${projectDir}`;
|
|
53
|
+
swcrcPath = (0, get_swcrc_path_1.getSwcrcPath)(options, contextRoot, projectRoot, true);
|
|
54
|
+
(0, devkit_1.writeJsonFile)(swcrcPath, swcrcContent);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch (e) { }
|
|
58
|
+
const swcCliOptions = {
|
|
59
|
+
srcPath: projectDir,
|
|
60
|
+
destPath: (0, path_1.relative)((0, path_1.join)(contextRoot, swcCwd), outputPath),
|
|
61
|
+
swcCwd,
|
|
62
|
+
swcrcPath,
|
|
63
|
+
};
|
|
64
|
+
return Object.assign(Object.assign({}, options), { mainOutputPath: (0, path_1.resolve)(outputPath, options.main.replace(`${projectRoot}/`, '').replace('.ts', '.js')), files, root: contextRoot, sourceRoot,
|
|
65
|
+
projectRoot, originalProjectRoot: projectRoot, outputPath, tsConfig: (0, path_1.join)(contextRoot, options.tsConfig), swcCliOptions });
|
|
66
|
+
}
|
|
67
|
+
exports.normalizeOptions = normalizeOptions;
|
|
68
|
+
function swcExecutor(_options, context) {
|
|
69
|
+
return tslib_1.__asyncGenerator(this, arguments, function* swcExecutor_1() {
|
|
70
|
+
const { sourceRoot, root } = context.projectsConfigurations.projects[context.projectName];
|
|
71
|
+
const options = normalizeOptions(_options, context.root, sourceRoot, root);
|
|
72
|
+
const { tmpTsConfig, dependencies } = (0, check_dependencies_1.checkDependencies)(context, options.tsConfig);
|
|
73
|
+
if (tmpTsConfig) {
|
|
74
|
+
options.tsConfig = tmpTsConfig;
|
|
75
|
+
}
|
|
76
|
+
const swcHelperDependency = (0, compiler_helper_dependency_1.getHelperDependency)(compiler_helper_dependency_1.HelperDependency.swc, options.swcCliOptions.swcrcPath, dependencies, context.projectGraph);
|
|
77
|
+
if (swcHelperDependency) {
|
|
78
|
+
dependencies.push(swcHelperDependency);
|
|
79
|
+
}
|
|
80
|
+
const inlineProjectGraph = (0, inline_1.handleInliningBuild)(context, options, options.tsConfig);
|
|
81
|
+
if (!(0, inline_1.isInlineGraphEmpty)(inlineProjectGraph)) {
|
|
82
|
+
options.projectRoot = '.'; // set to root of workspace to include other libs for type check
|
|
83
|
+
// remap paths for SWC compilation
|
|
84
|
+
options.swcCliOptions.srcPath = options.swcCliOptions.swcCwd;
|
|
85
|
+
options.swcCliOptions.swcCwd = '.';
|
|
86
|
+
options.swcCliOptions.destPath = options.swcCliOptions.destPath
|
|
87
|
+
.split('../')
|
|
88
|
+
.at(-1)
|
|
89
|
+
.concat('/', options.swcCliOptions.srcPath);
|
|
90
|
+
// tmp swcrc with dependencies to exclude
|
|
91
|
+
// - buildable libraries
|
|
92
|
+
// - other libraries that are not dependent on the current project
|
|
93
|
+
options.swcCliOptions.swcrcPath = (0, inline_2.generateTmpSwcrc)(inlineProjectGraph, options.swcCliOptions.swcrcPath);
|
|
94
|
+
}
|
|
95
|
+
if (options.watch) {
|
|
96
|
+
let disposeFn;
|
|
97
|
+
process.on('SIGINT', () => disposeFn());
|
|
98
|
+
process.on('SIGTERM', () => disposeFn());
|
|
99
|
+
return yield tslib_1.__await(yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, compile_swc_1.compileSwcWatch)(context, options, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
const assetResult = yield (0, assets_2.copyAssets)(options, context);
|
|
101
|
+
const packageJsonResult = yield (0, package_json_1.copyPackageJson)(Object.assign(Object.assign({}, options), { skipTypings: !options.skipTypeCheck }), context);
|
|
102
|
+
removeTmpSwcrc(options.swcCliOptions.swcrcPath);
|
|
103
|
+
disposeFn = () => {
|
|
104
|
+
assetResult === null || assetResult === void 0 ? void 0 : assetResult.stop();
|
|
105
|
+
packageJsonResult === null || packageJsonResult === void 0 ? void 0 : packageJsonResult.stop();
|
|
106
|
+
};
|
|
107
|
+
}))))));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return yield tslib_1.__await(yield yield tslib_1.__await((0, compile_swc_1.compileSwc)(context, options, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
yield (0, assets_2.copyAssets)(options, context);
|
|
112
|
+
yield (0, package_json_1.copyPackageJson)(Object.assign(Object.assign({}, options), { generateExportsField: true, skipTypings: !options.skipTypeCheck, extraDependencies: swcHelperDependency ? [swcHelperDependency] : [] }), context);
|
|
113
|
+
removeTmpSwcrc(options.swcCliOptions.swcrcPath);
|
|
114
|
+
(0, inline_1.postProcessInlinedDependencies)(options.outputPath, options.originalProjectRoot, inlineProjectGraph);
|
|
115
|
+
}))));
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
exports.swcExecutor = swcExecutor;
|
|
120
|
+
function removeTmpSwcrc(swcrcPath) {
|
|
121
|
+
if (swcrcPath.includes('tmp/') && swcrcPath.includes('.generated.swcrc')) {
|
|
122
|
+
(0, fs_extra_1.removeSync)((0, path_1.dirname)(swcrcPath));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.default = swcExecutor;
|
|
126
|
+
//# sourceMappingURL=swc.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swc.impl.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/swc/swc.impl.ts"],"names":[],"mappings":";;;;AAAA,uCAA0E;AAC1E,sDAA+E;AAC/E,uCAAsC;AACtC,+BAAwD;AACxD,+CAAgD;AAChD,uEAAmE;AACnE,uFAGgD;AAChD,+CAI4B;AAC5B,2DAA2D;AAK3D,6DAA0E;AAC1E,mEAA8D;AAC9D,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,aAAa,CAAC,SAAS,CAAC,CAAC;gBAChD,IAAA,uCAA8B,EAC5B,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,mBAAmB,EAC3B,kBAAkB,CACnB,CAAC;YACJ,CAAC,CAAA,CAAC,CAAA,EAAC;SACJ;IACH,CAAC;CAAA;AA7FD,kCA6FC;AAED,SAAS,cAAc,CAAC,SAAiB;IACvC,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QACxE,IAAA,qBAAU,EAAC,IAAA,cAAO,EAAC,SAAS,CAAC,CAAC,CAAC;KAChC;AACH,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
|
4
|
+
const tsc_impl_1 = require("./tsc.impl");
|
|
5
|
+
exports.default = (0, devkit_1.convertNxExecutor)(tsc_impl_1.tscExecutor);
|
|
6
|
+
//# sourceMappingURL=compat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/tsc/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,yCAAyC;AAEzC,kBAAe,IAAA,0BAAiB,EAAC,sBAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"outputCapture": "direct-nodejs",
|
|
4
|
+
"title": "Typescript Build Target",
|
|
5
|
+
"description": "Builds using TypeScript.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"main": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The name of the main entry-point file.",
|
|
12
|
+
"x-completion-type": "file",
|
|
13
|
+
"x-completion-glob": "main@(.js|.ts|.jsx|.tsx)"
|
|
14
|
+
},
|
|
15
|
+
"rootDir": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Sets the rootDir for TypeScript compilation. When not defined, it uses the root of project."
|
|
18
|
+
},
|
|
19
|
+
"outputPath": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The output path of the generated files.",
|
|
22
|
+
"x-completion-type": "directory"
|
|
23
|
+
},
|
|
24
|
+
"tsConfig": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The path to the Typescript configuration file.",
|
|
27
|
+
"x-completion-type": "file",
|
|
28
|
+
"x-completion-glob": "tsconfig.*.json"
|
|
29
|
+
},
|
|
30
|
+
"assets": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"description": "List of static assets.",
|
|
33
|
+
"default": [],
|
|
34
|
+
"items": {
|
|
35
|
+
"$ref": "#/definitions/assetPattern"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"watch": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "Enable re-building when files change.",
|
|
41
|
+
"default": false
|
|
42
|
+
},
|
|
43
|
+
"clean": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"description": "Remove previous output before build.",
|
|
46
|
+
"default": true
|
|
47
|
+
},
|
|
48
|
+
"transformers": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"description": "List of TypeScript Transformer Plugins.",
|
|
51
|
+
"default": [],
|
|
52
|
+
"items": {
|
|
53
|
+
"$ref": "#/definitions/transformerPattern"
|
|
54
|
+
},
|
|
55
|
+
"x-priority": "important"
|
|
56
|
+
},
|
|
57
|
+
"updateBuildableProjectDepsInPackageJson": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"description": "Whether to update the buildable project dependencies in the build output package.json.",
|
|
60
|
+
"default": true
|
|
61
|
+
},
|
|
62
|
+
"buildableProjectDepsInPackageJsonType": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "When `updateBuildableProjectDepsInPackageJson` is `true`, this adds dependencies to either `peerDependencies` or `dependencies`.",
|
|
65
|
+
"enum": ["dependencies", "peerDependencies"],
|
|
66
|
+
"default": "peerDependencies"
|
|
67
|
+
},
|
|
68
|
+
"external": {
|
|
69
|
+
"description": "A list projects to be treated as external. This feature is experimental",
|
|
70
|
+
"oneOf": [
|
|
71
|
+
{
|
|
72
|
+
"type": "string",
|
|
73
|
+
"enum": ["all", "none"]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "array",
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"externalBuildTargets": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"description": "List of target names that annotate a build target for a project",
|
|
89
|
+
"default": ["build"]
|
|
90
|
+
},
|
|
91
|
+
"generateLockfile": {
|
|
92
|
+
"type": "boolean",
|
|
93
|
+
"description": "Generate a lockfile (e.g. yarn.lock) that matches the workspace lockfile to ensure package versions match.",
|
|
94
|
+
"default": false,
|
|
95
|
+
"x-priority": "internal"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"required": ["main", "outputPath", "tsConfig"],
|
|
99
|
+
"definitions": {
|
|
100
|
+
"assetPattern": {
|
|
101
|
+
"oneOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"glob": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "The pattern to match."
|
|
108
|
+
},
|
|
109
|
+
"input": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
112
|
+
},
|
|
113
|
+
"ignore": {
|
|
114
|
+
"description": "An array of globs to ignore.",
|
|
115
|
+
"type": "array",
|
|
116
|
+
"items": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"output": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Absolute path within the output."
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["glob", "input", "output"]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "string"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"transformerPattern": {
|
|
134
|
+
"oneOf": [
|
|
135
|
+
{
|
|
136
|
+
"type": "string"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "object",
|
|
140
|
+
"properties": {
|
|
141
|
+
"name": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
},
|
|
144
|
+
"options": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": true
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"required": ["name"]
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"examplesFile": "../../../docs/tsc-examples.md"
|
|
156
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import type { TypeScriptCompilationOptions } from '@nx/workspace/src/utilities/typescript/compilation';
|
|
3
|
+
import { ExecutorOptions, NormalizedExecutorOptions } from '../../utils/schema';
|
|
4
|
+
export declare function normalizeOptions(options: ExecutorOptions, contextRoot: string, sourceRoot: string, projectRoot: string): NormalizedExecutorOptions;
|
|
5
|
+
export declare function createTypeScriptCompilationOptions(normalizedOptions: NormalizedExecutorOptions, context: ExecutorContext): TypeScriptCompilationOptions;
|
|
6
|
+
export declare function tscExecutor(_options: ExecutorOptions, context: ExecutorContext): AsyncGenerator<import("../../utils/typescript/compile-typescript-files").TypescriptCompilationResult, any, undefined>;
|
|
7
|
+
export default tscExecutor;
|