@nrwl/workspace 13.2.0-beta.5 → 13.3.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/executors.json +0 -10
- package/migrations.json +6 -0
- package/package.json +5 -5
- package/src/command-line/affected.js +1 -3
- package/src/command-line/affected.js.map +1 -1
- package/src/command-line/examples.js +0 -20
- package/src/command-line/examples.js.map +1 -1
- package/src/command-line/format.js +16 -2
- package/src/command-line/format.js.map +1 -1
- package/src/command-line/nx-commands.js +2 -0
- package/src/command-line/nx-commands.js.map +1 -1
- package/src/command-line/report.d.ts +7 -0
- package/src/command-line/report.js +72 -10
- package/src/command-line/report.js.map +1 -1
- package/src/command-line/run-many.js +1 -3
- package/src/command-line/run-many.js.map +1 -1
- package/src/command-line/run-one.js +1 -3
- package/src/command-line/run-one.js.map +1 -1
- package/src/core/dep-graph/main.esm.js +1 -1
- package/src/core/file-utils.js +1 -3
- package/src/core/file-utils.js.map +1 -1
- package/src/core/shared-interfaces.d.ts +6 -2
- package/src/generators/library/library.js +3 -1
- package/src/generators/library/library.js.map +1 -1
- package/src/migrations/update-13-3-0/update-tsc-executor-location.d.ts +3 -0
- package/src/migrations/update-13-3-0/update-tsc-executor-location.js +31 -0
- package/src/migrations/update-13-3-0/update-tsc-executor-location.js.map +1 -0
- package/src/tasks-runner/default-reporter.d.ts +4 -0
- package/src/tasks-runner/default-reporter.js +4 -0
- package/src/tasks-runner/default-reporter.js.map +1 -1
- package/src/tasks-runner/default-tasks-runner.d.ts +2 -12
- package/src/tasks-runner/default-tasks-runner.js +15 -42
- package/src/tasks-runner/default-tasks-runner.js.map +1 -1
- package/src/tasks-runner/empty-reporter.d.ts +4 -0
- package/src/tasks-runner/empty-reporter.js +4 -0
- package/src/tasks-runner/empty-reporter.js.map +1 -1
- package/src/tasks-runner/empty-terminal-output-life-cycle.d.ts +6 -0
- package/src/tasks-runner/empty-terminal-output-life-cycle.js +16 -0
- package/src/tasks-runner/empty-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/forked-process-task-runner.js +3 -9
- package/src/tasks-runner/forked-process-task-runner.js.map +1 -1
- package/src/tasks-runner/life-cycle.d.ts +43 -0
- package/src/tasks-runner/life-cycle.js +72 -0
- package/src/tasks-runner/life-cycle.js.map +1 -0
- package/src/tasks-runner/reporter.d.ts +4 -0
- package/src/tasks-runner/reporter.js +4 -0
- package/src/tasks-runner/reporter.js.map +1 -1
- package/src/tasks-runner/run-command.d.ts +4 -4
- package/src/tasks-runner/run-command.js +68 -55
- package/src/tasks-runner/run-command.js.map +1 -1
- package/src/tasks-runner/run-many-terminal-output-life-cycle.d.ts +25 -0
- package/src/tasks-runner/run-many-terminal-output-life-cycle.js +91 -0
- package/src/tasks-runner/run-many-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/run-one-reporter.d.ts +4 -0
- package/src/tasks-runner/run-one-reporter.js +4 -0
- package/src/tasks-runner/run-one-reporter.js.map +1 -1
- package/src/tasks-runner/run-one-terminal-output-life-cycle.d.ts +25 -0
- package/src/tasks-runner/run-one-terminal-output-life-cycle.js +84 -0
- package/src/tasks-runner/run-one-terminal-output-life-cycle.js.map +1 -0
- package/src/tasks-runner/task-orchestrator.d.ts +5 -14
- package/src/tasks-runner/task-orchestrator.js +15 -93
- package/src/tasks-runner/task-orchestrator.js.map +1 -1
- package/src/tasks-runner/task-timings-life-cycle.d.ts +13 -0
- package/src/tasks-runner/task-timings-life-cycle.js +33 -0
- package/src/tasks-runner/task-timings-life-cycle.js.map +1 -0
- package/src/tasks-runner/tasks-runner-v2.d.ts +17 -3
- package/src/tasks-runner/tasks-runner-v2.js +29 -3
- package/src/tasks-runner/tasks-runner-v2.js.map +1 -1
- package/src/tasks-runner/tasks-runner.d.ts +23 -2
- package/src/tasks-runner/tasks-runner.js +5 -0
- package/src/tasks-runner/tasks-runner.js.map +1 -1
- package/src/utilities/fileutils.d.ts +2 -0
- package/src/utilities/fileutils.js +2 -1
- package/src/utilities/fileutils.js.map +1 -1
- package/src/utils/ast-utils.d.ts +1 -1
- package/src/utils/versions.js +1 -1
- package/src/command-line/workspace-results.d.ts +0 -13
- package/src/command-line/workspace-results.js +0 -66
- package/src/command-line/workspace-results.js.map +0 -1
- package/src/executors/tsc/compat.d.ts +0 -2
- package/src/executors/tsc/compat.js +0 -6
- package/src/executors/tsc/compat.js.map +0 -1
- package/src/executors/tsc/schema.d.ts +0 -6
- package/src/executors/tsc/schema.json +0 -65
- package/src/executors/tsc/tsc.impl.d.ts +0 -6
- package/src/executors/tsc/tsc.impl.js +0 -64
- package/src/executors/tsc/tsc.impl.js.map +0 -1
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"title": "Typescript Build Target",
|
|
3
|
-
"description": "Builds using TypeScript",
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"main": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "The name of the main entry-point file."
|
|
10
|
-
},
|
|
11
|
-
"outputPath": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "The output path of the generated files."
|
|
14
|
-
},
|
|
15
|
-
"tsConfig": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "The path to the Typescript configuration file."
|
|
18
|
-
},
|
|
19
|
-
"assets": {
|
|
20
|
-
"type": "array",
|
|
21
|
-
"description": "List of static assets.",
|
|
22
|
-
"default": [],
|
|
23
|
-
"items": {
|
|
24
|
-
"$ref": "#/definitions/assetPattern"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"required": ["main", "outputPath", "tsConfig"],
|
|
29
|
-
|
|
30
|
-
"definitions": {
|
|
31
|
-
"assetPattern": {
|
|
32
|
-
"oneOf": [
|
|
33
|
-
{
|
|
34
|
-
"type": "object",
|
|
35
|
-
"properties": {
|
|
36
|
-
"glob": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "The pattern to match."
|
|
39
|
-
},
|
|
40
|
-
"input": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
43
|
-
},
|
|
44
|
-
"ignore": {
|
|
45
|
-
"description": "An array of globs to ignore.",
|
|
46
|
-
"type": "array",
|
|
47
|
-
"items": {
|
|
48
|
-
"type": "string"
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"output": {
|
|
52
|
-
"type": "string",
|
|
53
|
-
"description": "Absolute path within the output."
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"additionalProperties": false,
|
|
57
|
-
"required": ["glob", "input", "output"]
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"type": "string"
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nrwl/devkit';
|
|
2
|
-
import { TypeScriptExecutorOptions } from './schema';
|
|
3
|
-
export declare function tscExecutor(options: TypeScriptExecutorOptions, context: ExecutorContext): Promise<{
|
|
4
|
-
success: boolean;
|
|
5
|
-
}>;
|
|
6
|
-
export default tscExecutor;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tscExecutor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
const project_graph_1 = require("../../core/project-graph");
|
|
8
|
-
const assets_1 = require("../../utilities/assets");
|
|
9
|
-
const buildable_libs_utils_1 = require("../../utilities/buildable-libs-utils");
|
|
10
|
-
const fileutils_1 = require("../../utilities/fileutils");
|
|
11
|
-
const compilation_1 = require("../../utilities/typescript/compilation");
|
|
12
|
-
function tscExecutor(options, context) {
|
|
13
|
-
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
14
|
-
const normalizedOptions = normalizeOptions(options, context);
|
|
15
|
-
// const projectRoot = context.workspace.projects[context.projectName].root;
|
|
16
|
-
const projectGraph = (0, project_graph_1.readCachedProjectGraph)();
|
|
17
|
-
const { target, dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)(projectGraph, context.root, context.projectName, context.targetName, context.configurationName);
|
|
18
|
-
const projectRoot = target.data.root;
|
|
19
|
-
if (dependencies.length > 0) {
|
|
20
|
-
const areDependentProjectsBuilt = (0, buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt)(context.root, context.projectName, context.targetName, dependencies);
|
|
21
|
-
if (!areDependentProjectsBuilt) {
|
|
22
|
-
return { success: false };
|
|
23
|
-
}
|
|
24
|
-
normalizedOptions.tsConfig = (0, buildable_libs_utils_1.createTmpTsConfig)((0, path_1.join)(context.root, options.tsConfig), context.root, projectRoot, dependencies);
|
|
25
|
-
}
|
|
26
|
-
// this has to happen first so the folder is created where the assets are copied into
|
|
27
|
-
const result = (0, compilation_1.compileTypeScript)({
|
|
28
|
-
outputPath: normalizedOptions.outputPath,
|
|
29
|
-
projectName: context.projectName,
|
|
30
|
-
projectRoot,
|
|
31
|
-
tsConfig: normalizedOptions.tsConfig,
|
|
32
|
-
});
|
|
33
|
-
yield (0, assets_1.copyAssets)(normalizedOptions.assets, context.root, normalizedOptions.outputPath);
|
|
34
|
-
updatePackageJson(normalizedOptions, projectRoot);
|
|
35
|
-
return result;
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
exports.tscExecutor = tscExecutor;
|
|
39
|
-
function getMainFileDirRelativeToProjectRoot(main, projectRoot) {
|
|
40
|
-
const mainFileDir = (0, path_1.dirname)(main);
|
|
41
|
-
const relativeDir = (0, devkit_1.normalizePath)((0, path_1.relative)(projectRoot, mainFileDir));
|
|
42
|
-
const relativeMainFile = relativeDir === '' ? `./` : `./${relativeDir}/`;
|
|
43
|
-
return relativeMainFile;
|
|
44
|
-
}
|
|
45
|
-
function normalizeOptions(options, context) {
|
|
46
|
-
return Object.assign(Object.assign({}, options), { outputPath: (0, path_1.join)(context.root, options.outputPath), tsConfig: (0, path_1.join)(context.root, options.tsConfig) });
|
|
47
|
-
}
|
|
48
|
-
function updatePackageJson(options, projectRoot) {
|
|
49
|
-
var _a, _b;
|
|
50
|
-
const packageJson = (0, fileutils_1.readJsonFile)((0, path_1.join)(projectRoot, 'package.json'));
|
|
51
|
-
if (packageJson.main && packageJson.typings) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
const mainFile = (0, path_1.basename)(options.main).replace(/\.[tj]s$/, '');
|
|
55
|
-
const relativeMainFileDir = getMainFileDirRelativeToProjectRoot(options.main, projectRoot);
|
|
56
|
-
const mainJsFile = `${relativeMainFileDir}${mainFile}.js`;
|
|
57
|
-
const typingsFile = `${relativeMainFileDir}${mainFile}.d.ts`;
|
|
58
|
-
packageJson.main = (_a = packageJson.main) !== null && _a !== void 0 ? _a : mainJsFile;
|
|
59
|
-
packageJson.typings = (_b = packageJson.typings) !== null && _b !== void 0 ? _b : typingsFile;
|
|
60
|
-
const outputPackageJson = (0, path_1.join)(options.outputPath, 'package.json');
|
|
61
|
-
(0, fileutils_1.writeJsonFile)(outputPackageJson, packageJson);
|
|
62
|
-
}
|
|
63
|
-
exports.default = tscExecutor;
|
|
64
|
-
//# sourceMappingURL=tsc.impl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tsc.impl.js","sourceRoot":"","sources":["../../../../../../packages/workspace/src/executors/tsc/tsc.impl.ts"],"names":[],"mappings":";;;;AAAA,yCAA8D;AAC9D,+BAAyD;AACzD,4DAAkE;AAClE,mDAAoD;AACpD,+EAI8C;AAC9C,yDAAwE;AACxE,wEAA2E;AAG3E,SAAsB,WAAW,CAC/B,OAAkC,EAClC,OAAwB;;QAExB,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;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