@nrwl/js 13.8.3 → 13.8.4-beta.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/executors.json +0 -10
- package/generators.json +0 -14
- package/migrations.json +8 -1
- package/package.json +5 -5
- package/src/executors/swc/schema.json +18 -1
- package/src/executors/swc/swc.impl.js +17 -11
- package/src/executors/swc/swc.impl.js.map +1 -1
- package/src/executors/tsc/schema.json +11 -0
- package/src/executors/tsc/tsc.impl.js +3 -3
- package/src/executors/tsc/tsc.impl.js.map +1 -1
- package/src/generators/library/library.d.ts +12 -2
- package/src/generators/library/library.js +190 -3
- package/src/generators/library/library.js.map +1 -1
- package/src/index.d.ts +0 -1
- package/src/index.js +1 -3
- package/src/index.js.map +1 -1
- package/src/migrations/update-13-9-0/update-node-executor.d.ts +2 -0
- package/src/migrations/update-13-9-0/update-node-executor.js +28 -0
- package/src/migrations/update-13-9-0/update-node-executor.js.map +1 -0
- package/src/utils/check-dependencies.d.ts +4 -1
- package/src/utils/check-dependencies.js +4 -0
- package/src/utils/check-dependencies.js.map +1 -1
- package/src/utils/schema.d.ts +5 -7
- package/src/utils/swc/compile-swc.js +5 -8
- package/src/utils/swc/compile-swc.js.map +1 -1
- package/src/utils/update-package-json.d.ts +4 -1
- package/src/utils/update-package-json.js +10 -9
- package/src/utils/update-package-json.js.map +1 -1
- package/src/utils/versions.d.ts +3 -3
- package/src/utils/versions.js +4 -4
- package/src/utils/versions.js.map +1 -1
- package/src/executors/node/compat.d.ts +0 -2
- package/src/executors/node/compat.js +0 -6
- package/src/executors/node/compat.js.map +0 -1
- package/src/executors/node/node-with-require-overrides.d.ts +0 -5
- package/src/executors/node/node-with-require-overrides.js +0 -20
- package/src/executors/node/node-with-require-overrides.js.map +0 -1
- package/src/executors/node/node.impl.d.ts +0 -5
- package/src/executors/node/node.impl.js +0 -142
- package/src/executors/node/node.impl.js.map +0 -1
- package/src/executors/node/schema.d.ts +0 -16
- package/src/executors/node/schema.json +0 -72
- package/src/generators/application/application.d.ts +0 -5
- package/src/generators/application/application.js +0 -17
- package/src/generators/application/application.js.map +0 -1
- package/src/generators/application/files/README.md +0 -19
- package/src/generators/application/files/package.json__tmpl__ +0 -5
- package/src/generators/application/files/src/app/__fileName__.spec.ts__tmpl__ +0 -7
- package/src/generators/application/files/src/app/__fileName__.ts__tmpl__ +0 -3
- package/src/generators/application/files/src/index.ts__tmpl__ +0 -3
- package/src/generators/application/files/tsconfig.app.json__tmpl__ +0 -10
- package/src/generators/application/files/tsconfig.json__tmpl__ +0 -14
- package/src/generators/application/schema.json +0 -99
- package/src/utils/project-generator.d.ts +0 -12
- package/src/utils/project-generator.js +0 -203
- package/src/utils/project-generator.js.map +0 -1
package/src/utils/schema.d.ts
CHANGED
|
@@ -36,6 +36,8 @@ export interface ExecutorOptions {
|
|
|
36
36
|
tsConfig: string;
|
|
37
37
|
watch: boolean;
|
|
38
38
|
transformers: TransformerEntry[];
|
|
39
|
+
updateBuildableProjectDepsInPackageJson?: boolean;
|
|
40
|
+
buildableProjectDepsInPackageJsonType?: 'dependencies' | 'peerDependencies';
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export interface NormalizedExecutorOptions extends ExecutorOptions {
|
|
@@ -52,19 +54,15 @@ export interface SwcExecutorOptions extends ExecutorOptions {
|
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export interface SwcCliOptions {
|
|
55
|
-
|
|
57
|
+
srcPath: string;
|
|
56
58
|
destPath: string;
|
|
59
|
+
swcrcPath: string;
|
|
60
|
+
swcCwd: string;
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
export interface NormalizedSwcExecutorOptions
|
|
60
64
|
extends NormalizedExecutorOptions {
|
|
61
65
|
swcExclude: string[];
|
|
62
66
|
skipTypeCheck: boolean;
|
|
63
|
-
swcrcPath: string;
|
|
64
67
|
swcCliOptions: SwcCliOptions;
|
|
65
68
|
}
|
|
66
|
-
|
|
67
|
-
export interface ExecutorEvent {
|
|
68
|
-
outfile: string;
|
|
69
|
-
success: boolean;
|
|
70
|
-
}
|
|
@@ -8,9 +8,8 @@ const child_process_1 = require("child_process");
|
|
|
8
8
|
const create_async_iteratable_1 = require("../create-async-iterable/create-async-iteratable");
|
|
9
9
|
const print_diagnostics_1 = require("../typescript/print-diagnostics");
|
|
10
10
|
const run_type_check_1 = require("../typescript/run-type-check");
|
|
11
|
-
function getSwcCmd(
|
|
12
|
-
|
|
13
|
-
let swcCmd = `npx swc ${srcPath} -d ${normalizedOptions.swcCliOptions.destPath} --source-maps --no-swcrc --config-file=${normalizedOptions.swcrcPath}`;
|
|
11
|
+
function getSwcCmd({ swcrcPath, srcPath, destPath }, watch = false) {
|
|
12
|
+
let swcCmd = `npx swc ${srcPath} -d ${destPath} --source-maps --no-swcrc --config-file=${swcrcPath}`;
|
|
14
13
|
return watch ? swcCmd.concat(' --watch') : swcCmd;
|
|
15
14
|
}
|
|
16
15
|
function getTypeCheckOptions(normalizedOptions) {
|
|
@@ -30,8 +29,8 @@ function getTypeCheckOptions(normalizedOptions) {
|
|
|
30
29
|
function compileSwc(context, normalizedOptions, postCompilationCallback) {
|
|
31
30
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
32
31
|
devkit_1.logger.log(`Compiling with SWC for ${context.projectName}...`);
|
|
33
|
-
const swcCmdLog = (0, child_process_1.execSync)(getSwcCmd(normalizedOptions), {
|
|
34
|
-
cwd: normalizedOptions.
|
|
32
|
+
const swcCmdLog = (0, child_process_1.execSync)(getSwcCmd(normalizedOptions.swcCliOptions), {
|
|
33
|
+
cwd: normalizedOptions.swcCliOptions.swcCwd,
|
|
35
34
|
}).toString();
|
|
36
35
|
devkit_1.logger.log(swcCmdLog.replace(/\n/, ''));
|
|
37
36
|
const isCompileSuccess = swcCmdLog.includes('Successfully compiled');
|
|
@@ -62,9 +61,7 @@ function compileSwcWatch(context, normalizedOptions, postCompilationCallback) {
|
|
|
62
61
|
let stdoutOnData;
|
|
63
62
|
let stderrOnData;
|
|
64
63
|
let watcherOnExit;
|
|
65
|
-
const swcWatcher = (0, child_process_1.exec)(getSwcCmd(normalizedOptions, true), {
|
|
66
|
-
cwd: normalizedOptions.projectRoot,
|
|
67
|
-
});
|
|
64
|
+
const swcWatcher = (0, child_process_1.exec)(getSwcCmd(normalizedOptions.swcCliOptions, true), { cwd: normalizedOptions.swcCliOptions.swcCwd });
|
|
68
65
|
processOnExit = () => {
|
|
69
66
|
swcWatcher.kill();
|
|
70
67
|
done();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile-swc.js","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/swc/compile-swc.ts"],"names":[],"mappings":";;;;AAAA,yCAAuD;AACvD,mFAAyE;AACzE,iDAA+C;AAC/C,8FAAuF;AAEvF,uEAAmE;AACnE,iEAA8E;AAE9E,SAAS,SAAS,CAChB,
|
|
1
|
+
{"version":3,"file":"compile-swc.js","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/swc/compile-swc.ts"],"names":[],"mappings":";;;;AAAA,yCAAuD;AACvD,mFAAyE;AACzE,iDAA+C;AAC/C,8FAAuF;AAEvF,uEAAmE;AACnE,iEAA8E;AAE9E,SAAS,SAAS,CAChB,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAiB,EAC/C,KAAK,GAAG,KAAK;IAEb,IAAI,MAAM,GAAG,WAAW,OAAO,OAAO,QAAQ,2CAA2C,SAAS,EAAE,CAAC;IACrG,OAAO,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACpD,CAAC;AAED,SAAS,mBAAmB,CAAC,iBAA+C;IAC1E,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC;IAE7E,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,qBAAqB;QAC3B,YA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CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ExecutorContext, ProjectGraphProjectNode } from '@nrwl/devkit';
|
|
2
|
+
import { DependentBuildableProjectNode } from '@nrwl/workspace/src/utilities/buildable-libs-utils';
|
|
3
|
+
import { NormalizedExecutorOptions } from './schema';
|
|
4
|
+
export declare function updatePackageJson(options: NormalizedExecutorOptions, context: ExecutorContext, target: ProjectGraphProjectNode<any>, dependencies: DependentBuildableProjectNode[], withTypings?: boolean): void;
|
|
@@ -3,28 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updatePackageJson = void 0;
|
|
4
4
|
const devkit_1 = require("@nrwl/devkit");
|
|
5
5
|
const fileutils_1 = require("@nrwl/tao/src/utils/fileutils");
|
|
6
|
+
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
function getMainFileDirRelativeToProjectRoot(main, projectRoot) {
|
|
8
9
|
const mainFileDir = (0, path_1.dirname)(main);
|
|
9
10
|
const relativeDir = (0, devkit_1.normalizePath)((0, path_1.relative)(projectRoot, mainFileDir));
|
|
10
11
|
return relativeDir === '' ? `./` : `./${relativeDir}/`;
|
|
11
12
|
}
|
|
12
|
-
function updatePackageJson(
|
|
13
|
+
function updatePackageJson(options, context, target, dependencies, withTypings = true) {
|
|
13
14
|
var _a, _b;
|
|
14
|
-
const packageJson = (0, fileutils_1.readJsonFile)((0, path_1.join)(projectRoot, 'package.json'));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
const mainFile = (0, path_1.basename)(main).replace(/\.[tj]s$/, '');
|
|
19
|
-
const relativeMainFileDir = getMainFileDirRelativeToProjectRoot(main, projectRoot);
|
|
15
|
+
const packageJson = (0, fileutils_1.readJsonFile)((0, path_1.join)(options.projectRoot, 'package.json'));
|
|
16
|
+
const mainFile = (0, path_1.basename)(options.main).replace(/\.[tj]s$/, '');
|
|
17
|
+
const relativeMainFileDir = getMainFileDirRelativeToProjectRoot(options.main, options.projectRoot);
|
|
20
18
|
const mainJsFile = `${relativeMainFileDir}${mainFile}.js`;
|
|
21
19
|
const typingsFile = `${relativeMainFileDir}${mainFile}.d.ts`;
|
|
22
20
|
packageJson.main = (_a = packageJson.main) !== null && _a !== void 0 ? _a : mainJsFile;
|
|
23
21
|
if (withTypings) {
|
|
24
22
|
packageJson.typings = (_b = packageJson.typings) !== null && _b !== void 0 ? _b : typingsFile;
|
|
25
23
|
}
|
|
26
|
-
|
|
27
|
-
(0
|
|
24
|
+
(0, fileutils_1.writeJsonFile)(`${options.outputPath}/package.json`, packageJson);
|
|
25
|
+
if (dependencies.length > 0 &&
|
|
26
|
+
options.updateBuildableProjectDepsInPackageJson) {
|
|
27
|
+
(0, buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies)(context.root, context.projectName, context.targetName, context.configurationName, target, dependencies, options.buildableProjectDepsInPackageJsonType);
|
|
28
|
+
}
|
|
28
29
|
}
|
|
29
30
|
exports.updatePackageJson = updatePackageJson;
|
|
30
31
|
//# sourceMappingURL=update-package-json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-package-json.js","sourceRoot":"","sources":["../../../../../packages/js/src/utils/update-package-json.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"update-package-json.js","sourceRoot":"","sources":["../../../../../packages/js/src/utils/update-package-json.ts"],"names":[],"mappings":";;;AAAA,yCAIsB;AACtB,6DAA4E;AAC5E,6FAG4D;AAC5D,+BAAyD;AAGzD,SAAS,mCAAmC,CAC1C,IAAY,EACZ,WAAmB;IAEnB,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,IAAI,CAAC,CAAC;IAClC,MAAM,WAAW,GAAG,IAAA,sBAAa,EAAC,IAAA,eAAQ,EAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IACtE,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@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const nxVersion = "*";
|
|
2
|
-
export declare const swcCoreVersion = "1.2.
|
|
3
|
-
export declare const swcCliVersion = "~0.1.
|
|
4
|
-
export declare const swcHelpersVersion = "~0.
|
|
2
|
+
export declare const swcCoreVersion = "~1.2.143";
|
|
3
|
+
export declare const swcCliVersion = "~0.1.55";
|
|
4
|
+
export declare const swcHelpersVersion = "~0.3.3";
|
package/src/utils/versions.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.swcHelpersVersion = exports.swcCliVersion = exports.swcCoreVersion = exports.nxVersion = void 0;
|
|
4
|
-
exports.nxVersion = '13.8.
|
|
5
|
-
exports.swcCoreVersion = '1.2.
|
|
6
|
-
exports.swcCliVersion = '~0.1.
|
|
7
|
-
exports.swcHelpersVersion = '~0.
|
|
4
|
+
exports.nxVersion = '13.8.4-beta.0';
|
|
5
|
+
exports.swcCoreVersion = '~1.2.143';
|
|
6
|
+
exports.swcCliVersion = '~0.1.55';
|
|
7
|
+
exports.swcHelpersVersion = '~0.3.3';
|
|
8
8
|
//# sourceMappingURL=versions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/js/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,GAAG,CAAC;AAEhB,QAAA,cAAc,GAAG,
|
|
1
|
+
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/js/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,GAAG,CAAC;AAEhB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,aAAa,GAAG,SAAS,CAAC;AAC1B,QAAA,iBAAiB,GAAG,QAAQ,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
4
|
-
const node_impl_1 = require("./node.impl");
|
|
5
|
-
exports.default = (0, devkit_1.convertNxExecutor)(node_impl_1.default);
|
|
6
|
-
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/node/compat.ts"],"names":[],"mappings":";;AAAA,yCAAiD;AACjD,2CAAuC;AAEvC,kBAAe,IAAA,0BAAiB,EAAC,mBAAY,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const Module = require('module');
|
|
2
|
-
const originalLoader = Module._load;
|
|
3
|
-
const mappings = JSON.parse(process.env.NX_MAPPINGS);
|
|
4
|
-
const keys = Object.keys(mappings);
|
|
5
|
-
const fileToRun = process.env.NX_FILE_TO_RUN;
|
|
6
|
-
Module._load = function (request, parent) {
|
|
7
|
-
if (!parent)
|
|
8
|
-
return originalLoader.apply(this, arguments);
|
|
9
|
-
const match = keys.find((k) => request === k);
|
|
10
|
-
if (match) {
|
|
11
|
-
const newArguments = [...arguments];
|
|
12
|
-
newArguments[0] = mappings[match];
|
|
13
|
-
return originalLoader.apply(this, newArguments);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return originalLoader.apply(this, arguments);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
require(fileToRun);
|
|
20
|
-
//# sourceMappingURL=node-with-require-overrides.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-with-require-overrides.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/node/node-with-require-overrides.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;AAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACrD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACnC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AAE7C,MAAM,CAAC,KAAK,GAAG,UAAU,OAAO,EAAE,MAAM;IACtC,IAAI,CAAC,MAAM;QAAE,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC;IAC9C,IAAI,KAAK,EAAE;QACT,MAAM,YAAY,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;QACpC,YAAY,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;KACjD;SAAM;QACL,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC9C;AACH,CAAC,CAAC;AAEF,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { ExecutorEvent } from '../../utils/schema';
|
|
3
|
-
import { NodeExecutorOptions } from './schema';
|
|
4
|
-
export declare function nodeExecutor(options: NodeExecutorOptions, context: ExecutorContext): AsyncGenerator<ExecutorEvent, void, unknown>;
|
|
5
|
-
export default nodeExecutor;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nodeExecutor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const child_process_1 = require("child_process");
|
|
7
|
-
const treeKill = require("tree-kill");
|
|
8
|
-
const util_1 = require("util");
|
|
9
|
-
const project_graph_1 = require("@nrwl/workspace/src/core/project-graph");
|
|
10
|
-
const buildable_libs_utils_1 = require("@nrwl/workspace/src/utilities/buildable-libs-utils");
|
|
11
|
-
let subProcess = null;
|
|
12
|
-
function nodeExecutor(options, context) {
|
|
13
|
-
return (0, tslib_1.__asyncGenerator)(this, arguments, function* nodeExecutor_1() {
|
|
14
|
-
var e_1, _a;
|
|
15
|
-
process.on('SIGTERM', () => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
16
|
-
yield killProcess();
|
|
17
|
-
process.exit(128 + 15);
|
|
18
|
-
}));
|
|
19
|
-
process.on('SIGINT', () => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
20
|
-
yield killProcess();
|
|
21
|
-
process.exit(128 + 2);
|
|
22
|
-
}));
|
|
23
|
-
process.on('SIGHUP', () => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
24
|
-
yield killProcess();
|
|
25
|
-
process.exit(128 + 1);
|
|
26
|
-
}));
|
|
27
|
-
if (options.waitUntilTargets && options.waitUntilTargets.length > 0) {
|
|
28
|
-
const results = yield (0, tslib_1.__await)(runWaitUntilTargets(options, context));
|
|
29
|
-
for (const [i, result] of results.entries()) {
|
|
30
|
-
if (!result.success) {
|
|
31
|
-
throw new Error(`Wait until target failed: ${options.waitUntilTargets[i]}.`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
const mappings = calculateResolveMappings(context, options);
|
|
36
|
-
try {
|
|
37
|
-
for (var _b = (0, tslib_1.__asyncValues)(startBuild(options, context)), _c; _c = yield (0, tslib_1.__await)(_b.next()), !_c.done;) {
|
|
38
|
-
const event = _c.value;
|
|
39
|
-
if (!event.success) {
|
|
40
|
-
devkit_1.logger.error('There was an error with the build. See above.');
|
|
41
|
-
devkit_1.logger.info(`${event.outfile} was not restarted.`);
|
|
42
|
-
}
|
|
43
|
-
yield (0, tslib_1.__await)(handleBuildEvent(event, options, mappings));
|
|
44
|
-
yield yield (0, tslib_1.__await)(event);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
48
|
-
finally {
|
|
49
|
-
try {
|
|
50
|
-
if (_c && !_c.done && (_a = _b.return)) yield (0, tslib_1.__await)(_a.call(_b));
|
|
51
|
-
}
|
|
52
|
-
finally { if (e_1) throw e_1.error; }
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
exports.nodeExecutor = nodeExecutor;
|
|
57
|
-
function calculateResolveMappings(context, options) {
|
|
58
|
-
const projectGraph = (0, project_graph_1.readCachedProjectGraph)();
|
|
59
|
-
const parsed = (0, devkit_1.parseTargetString)(options.buildTarget);
|
|
60
|
-
const { dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)(projectGraph, context.root, parsed.project, parsed.target, parsed.configuration);
|
|
61
|
-
return dependencies.reduce((m, c) => {
|
|
62
|
-
if (!c.outputs[0] && c.node.type === 'npm') {
|
|
63
|
-
c.outputs[0] = `node_modules/${c.node.data.packageName}`;
|
|
64
|
-
}
|
|
65
|
-
m[c.name] = (0, devkit_1.joinPathFragments)(context.root, c.outputs[0]);
|
|
66
|
-
return m;
|
|
67
|
-
}, {});
|
|
68
|
-
}
|
|
69
|
-
function runProcess(event, options, mappings) {
|
|
70
|
-
subProcess = (0, child_process_1.fork)((0, devkit_1.joinPathFragments)(__dirname, 'node-with-require-overrides'), options.args, {
|
|
71
|
-
execArgv: getExecArgv(options),
|
|
72
|
-
stdio: 'inherit',
|
|
73
|
-
env: Object.assign(Object.assign({}, process.env), { NX_FILE_TO_RUN: event.outfile, NX_MAPPINGS: JSON.stringify(mappings) }),
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function getExecArgv(options) {
|
|
77
|
-
const args = [
|
|
78
|
-
'-r',
|
|
79
|
-
require.resolve('source-map-support/register'),
|
|
80
|
-
...options.runtimeArgs,
|
|
81
|
-
];
|
|
82
|
-
if (options.inspect === true) {
|
|
83
|
-
options.inspect = "inspect" /* Inspect */;
|
|
84
|
-
}
|
|
85
|
-
if (options.inspect) {
|
|
86
|
-
args.push(`--${options.inspect}=${options.host}:${options.port}`);
|
|
87
|
-
}
|
|
88
|
-
return args;
|
|
89
|
-
}
|
|
90
|
-
function handleBuildEvent(event, options, mappings) {
|
|
91
|
-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
92
|
-
if ((!event.success || options.watch) && subProcess) {
|
|
93
|
-
yield killProcess();
|
|
94
|
-
}
|
|
95
|
-
if (event.success) {
|
|
96
|
-
runProcess(event, options, mappings);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function killProcess() {
|
|
101
|
-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
102
|
-
const promisifiedTreeKill = (0, util_1.promisify)(treeKill);
|
|
103
|
-
try {
|
|
104
|
-
yield promisifiedTreeKill(subProcess.pid, 'SIGTERM');
|
|
105
|
-
}
|
|
106
|
-
catch (err) {
|
|
107
|
-
if (Array.isArray(err) && err[0] && err[2]) {
|
|
108
|
-
const errorMessage = err[2];
|
|
109
|
-
devkit_1.logger.error(errorMessage);
|
|
110
|
-
}
|
|
111
|
-
else if (err.message) {
|
|
112
|
-
devkit_1.logger.error(err.message);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
finally {
|
|
116
|
-
subProcess = null;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function startBuild(options, context) {
|
|
121
|
-
return (0, tslib_1.__asyncGenerator)(this, arguments, function* startBuild_1() {
|
|
122
|
-
const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget);
|
|
123
|
-
yield (0, tslib_1.__await)(yield* (0, tslib_1.__asyncDelegator)((0, tslib_1.__asyncValues)(yield (0, tslib_1.__await)((0, devkit_1.runExecutor)(buildTarget, Object.assign(Object.assign({}, options.buildTargetOptions), { watch: options.watch }), context)))));
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
function runWaitUntilTargets(options, context) {
|
|
127
|
-
return Promise.all(options.waitUntilTargets.map((waitUntilTarget) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
128
|
-
const target = (0, devkit_1.parseTargetString)(waitUntilTarget);
|
|
129
|
-
const output = yield (0, devkit_1.runExecutor)(target, {}, context);
|
|
130
|
-
return new Promise((resolve) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
131
|
-
let event = yield output.next();
|
|
132
|
-
// Resolve after first event
|
|
133
|
-
resolve(event.value);
|
|
134
|
-
// Continue iterating
|
|
135
|
-
while (!event.done) {
|
|
136
|
-
event = yield output.next();
|
|
137
|
-
}
|
|
138
|
-
}));
|
|
139
|
-
})));
|
|
140
|
-
}
|
|
141
|
-
exports.default = nodeExecutor;
|
|
142
|
-
//# sourceMappingURL=node.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node.impl.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/node/node.impl.ts"],"names":[],"mappings":";;;;AAAA,yCAMsB;AACtB,iDAAmD;AACnD,sCAAsC;AACtC,+BAAiC;AAGjC,0EAAgF;AAChF,6FAAkG;AAElG,IAAI,UAAU,GAAiB,IAAI,CAAC;AAEpC,SAAuB,YAAY,CACjC,OAA4B,EAC5B,OAAwB;;;QAExB,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;YAC/B,MAAM,WAAW,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;QACzB,CAAC,CAAA,CAAC,CAAC;QACH,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAS,EAAE;YAC9B,MAAM,WAAW,EAAE,CAAC;YACp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-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
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"cli": "nx",
|
|
4
|
-
"title": "Node executor",
|
|
5
|
-
"description": "Execute Nodejs applications",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"buildTarget": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "The target to run to build you the app"
|
|
11
|
-
},
|
|
12
|
-
"buildTargetOptions": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"description": "Additional options to pass into the build target.",
|
|
15
|
-
"default": {}
|
|
16
|
-
},
|
|
17
|
-
"waitUntilTargets": {
|
|
18
|
-
"type": "array",
|
|
19
|
-
"description": "The targets to run to before starting the node app",
|
|
20
|
-
"default": [],
|
|
21
|
-
"items": {
|
|
22
|
-
"type": "string"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"host": {
|
|
26
|
-
"type": "string",
|
|
27
|
-
"default": "localhost",
|
|
28
|
-
"description": "The host to inspect the process on"
|
|
29
|
-
},
|
|
30
|
-
"port": {
|
|
31
|
-
"type": "number",
|
|
32
|
-
"default": 9229,
|
|
33
|
-
"description": "The port to inspect the process on. Setting port to 0 will assign random free ports to all forked processes."
|
|
34
|
-
},
|
|
35
|
-
"inspect": {
|
|
36
|
-
"oneOf": [
|
|
37
|
-
{
|
|
38
|
-
"type": "string",
|
|
39
|
-
"enum": ["inspect", "inspect-brk"]
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"type": "boolean"
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
"description": "Ensures the app is starting with debugging",
|
|
46
|
-
"default": "inspect"
|
|
47
|
-
},
|
|
48
|
-
"runtimeArgs": {
|
|
49
|
-
"type": "array",
|
|
50
|
-
"description": "Extra args passed to the node process",
|
|
51
|
-
"default": [],
|
|
52
|
-
"items": {
|
|
53
|
-
"type": "string"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"args": {
|
|
57
|
-
"type": "array",
|
|
58
|
-
"description": "Extra args when starting the app",
|
|
59
|
-
"default": [],
|
|
60
|
-
"items": {
|
|
61
|
-
"type": "string"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"watch": {
|
|
65
|
-
"type": "boolean",
|
|
66
|
-
"description": "Enable re-building when files change.",
|
|
67
|
-
"default": true
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"additionalProperties": false,
|
|
71
|
-
"required": ["buildTarget"]
|
|
72
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Tree } from '@nrwl/devkit';
|
|
2
|
-
import { GeneratorSchema } from '../../utils/schema';
|
|
3
|
-
export declare function applicationGenerator(tree: Tree, schema: GeneratorSchema): Promise<import("@nrwl/devkit").GeneratorCallback>;
|
|
4
|
-
export default applicationGenerator;
|
|
5
|
-
export declare const applicationSchematic: (options: GeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.applicationSchematic = exports.applicationGenerator = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
const project_generator_1 = require("../../utils/project-generator");
|
|
8
|
-
function applicationGenerator(tree, schema) {
|
|
9
|
-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
10
|
-
const { appsDir } = (0, devkit_1.getWorkspaceLayout)(tree);
|
|
11
|
-
return (0, project_generator_1.projectGenerator)(tree, Object.assign(Object.assign({}, schema), { buildable: true, skipTsConfig: true }), appsDir, (0, path_1.join)(__dirname, './files'), 'application');
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
exports.applicationGenerator = applicationGenerator;
|
|
15
|
-
exports.default = applicationGenerator;
|
|
16
|
-
exports.applicationSchematic = (0, devkit_1.convertNxGenerator)(applicationGenerator);
|
|
17
|
-
//# sourceMappingURL=application.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../../../../../packages/js/src/generators/application/application.ts"],"names":[],"mappings":";;;;AAAA,yCAA4E;AAC5E,+BAA4B;AAC5B,qEAAiE;AAGjE,SAAsB,oBAAoB,CACxC,IAAU,EACV,MAAuB;;QAEvB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;QAC7C,OAAO,IAAA,oCAAgB,EACrB,IAAI,kCACC,MAAM,KAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,KAChD,OAAO,EACP,IAAA,WAAI,EAAC,SAAS,EAAE,SAAS,CAAC,EAC1B,aAAa,CACd,CAAC;IACJ,CAAC;CAAA;AAZD,oDAYC;AAED,kBAAe,oBAAoB,CAAC;AACvB,QAAA,oBAAoB,GAAG,IAAA,2BAAkB,EAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# <%= name %>
|
|
2
|
-
|
|
3
|
-
This application was generated with [Nx](https://nx.dev).
|
|
4
|
-
|
|
5
|
-
## Building
|
|
6
|
-
|
|
7
|
-
Run `<%= cliCommand %> build <%= name %>` to build the application.
|
|
8
|
-
|
|
9
|
-
## Starting
|
|
10
|
-
|
|
11
|
-
Run `<%= cliCommand %> start <%= name %>` to start/run the application.
|
|
12
|
-
|
|
13
|
-
<% if (hasUnitTestRunner) { %>
|
|
14
|
-
|
|
15
|
-
## Running unit tests
|
|
16
|
-
|
|
17
|
-
Run `<%= cliCommand %> test <%= name %>` to execute the unit tests via [Jest](https://jestjs.io).
|
|
18
|
-
|
|
19
|
-
<% } %>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "<%= offsetFromRoot %>dist/out-tsc",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"types": []
|
|
7
|
-
},
|
|
8
|
-
"include": ["**/*.ts"<% if (js) { %>, "**/*.js"<% } %>],
|
|
9
|
-
"exclude": ["**/*.spec.ts", "**/*.test.ts"<% if (js) { %>, "**/*.spec.js", "**/*.test.js"<% } %>]
|
|
10
|
-
}
|