nx 18.0.3 → 18.0.5
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/package.json +14 -13
- package/src/command-line/add/add.js +3 -1
- package/src/command-line/graph/graph.js +1 -1
- package/src/command-line/init/init-v2.js +16 -11
- package/src/command-line/migrate/command-object.js +17 -2
- package/src/command-line/migrate/migrate.js +13 -1
- package/src/command-line/release/changelog.d.ts +16 -1
- package/src/command-line/release/changelog.js +104 -198
- package/src/command-line/release/command-object.d.ts +1 -0
- package/src/command-line/release/command-object.js +31 -12
- package/src/command-line/release/publish.js +8 -11
- package/src/command-line/release/release.js +57 -6
- package/src/command-line/release/utils/git.d.ts +5 -1
- package/src/command-line/release/utils/git.js +26 -11
- package/src/command-line/release/utils/github.d.ts +4 -8
- package/src/command-line/release/utils/github.js +102 -34
- package/src/command-line/release/utils/shared.d.ts +1 -0
- package/src/command-line/release/utils/shared.js +3 -1
- package/src/command-line/release/version.js +0 -6
- package/src/core/graph/3rdpartylicenses.txt +0 -51
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/polyfills.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.js +1 -1
- package/src/executors/run-commands/run-commands.impl.js +3 -3
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +3 -3
- package/src/plugins/js/utils/register.d.ts +4 -8
- package/src/plugins/js/utils/register.js +8 -22
- package/src/plugins/target-defaults/target-defaults-plugin.d.ts +2 -3
- package/src/plugins/target-defaults/target-defaults-plugin.js +24 -32
- package/src/project-graph/utils/project-configuration-utils.js +13 -6
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +20 -23
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +16 -16
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +1 -1
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +1 -0
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +10 -2
- package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -1
- package/src/tasks-runner/task-orchestrator.js +23 -1
- package/src/utils/json.js +3 -1
- package/src/utils/logger.js +1 -1
- package/src/utils/output.d.ts +0 -1
- package/src/utils/output.js +6 -7
- package/src/utils/package-json.d.ts +1 -1
- package/src/utils/package-json.js +12 -11
- package/src/utils/plugins/core-plugins.js +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],a=!0,u=0;u<t.length;u++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i<l&&(l=i));if(a){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={
|
|
1
|
+
(()=>{"use strict";var e,r={},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var l=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],a=!0,u=0;u<t.length;u++)(!1&i||l>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(a=!1,i<l&&(l=i));if(a){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={666:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[l,a,u]=t,d=0;if(l.some((r=>0!==e[r]))){for(n in a)o.o(a,n)&&(o.m[n]=a[n]);if(u)var f=u(o)}for(r&&r(t);d<l.length;d++)i=l[d],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(f)},t=self.webpackChunk=self.webpackChunk||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})()})();
|
package/src/core/graph/styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[532],{33767:()=>{}},s=>{var e;e=33767,s(s.s=e)}]);
|
|
@@ -65,7 +65,7 @@ async function runInParallel(options, context) {
|
|
|
65
65
|
if (options.readyWhen) {
|
|
66
66
|
const r = await Promise.race(procs);
|
|
67
67
|
if (!r.result) {
|
|
68
|
-
process.stderr.write(`Warning:
|
|
68
|
+
process.stderr.write(`Warning: command "${r.command}" exited with non-zero status code`);
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
@@ -77,7 +77,7 @@ async function runInParallel(options, context) {
|
|
|
77
77
|
const failed = r.filter((v) => !v.result);
|
|
78
78
|
if (failed.length > 0) {
|
|
79
79
|
failed.forEach((f) => {
|
|
80
|
-
process.stderr.write(`Warning:
|
|
80
|
+
process.stderr.write(`Warning: command "${f.command}" exited with non-zero status code`);
|
|
81
81
|
});
|
|
82
82
|
return false;
|
|
83
83
|
}
|
|
@@ -107,7 +107,7 @@ async function runSerially(options, context) {
|
|
|
107
107
|
for (const c of options.commands) {
|
|
108
108
|
const success = await createProcess(c, undefined, options.color, calculateCwd(options.cwd, context), options.env ?? {}, false);
|
|
109
109
|
if (!success) {
|
|
110
|
-
process.stderr.write(`Warning:
|
|
110
|
+
process.stderr.write(`Warning: command "${c.command}" exited with non-zero status code`);
|
|
111
111
|
return false;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
|
|
4
4
|
const nx_json_1 = require("../../generators/utils/nx-json");
|
|
5
5
|
const json_1 = require("../../generators/utils/json");
|
|
6
|
-
const
|
|
6
|
+
const output_1 = require("../../utils/output");
|
|
7
7
|
const path_1 = require("../../utils/path");
|
|
8
8
|
async function update(tree) {
|
|
9
9
|
if (!tree.exists('nx.json')) {
|
|
@@ -37,7 +37,7 @@ function warnNpmScopeHasChanged(tree, nxJson) {
|
|
|
37
37
|
}
|
|
38
38
|
const packageJsonName = (0, json_1.readJson)(tree, 'package.json').name;
|
|
39
39
|
if (newScope) {
|
|
40
|
-
|
|
40
|
+
output_1.output.warn({
|
|
41
41
|
title: 'npmScope has been removed from nx.json',
|
|
42
42
|
bodyLines: [
|
|
43
43
|
'This will now be read from package.json',
|
|
@@ -50,7 +50,7 @@ function warnNpmScopeHasChanged(tree, nxJson) {
|
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
52
|
// There is no scope in package.json
|
|
53
|
-
|
|
53
|
+
output_1.output.warn({
|
|
54
54
|
title: 'npmScope has been removed from nx.json',
|
|
55
55
|
bodyLines: [
|
|
56
56
|
'This will now be read from package.json',
|
|
@@ -21,14 +21,10 @@ export declare function registerTsProject(tsConfigPath: string): () => void;
|
|
|
21
21
|
* @returns cleanup function
|
|
22
22
|
* @deprecated This signature will be removed in Nx v19. You should pass the full path to the tsconfig in the first argument.
|
|
23
23
|
*/
|
|
24
|
-
export declare function registerTsProject(path: string, configFilename: string
|
|
25
|
-
|
|
26
|
-
* @deprecated Do not use this.. it's a 1-off exception
|
|
27
|
-
*/
|
|
28
|
-
useForSwcEnvironmentVariable?: boolean): any;
|
|
29
|
-
export declare function getSwcTranspiler(compilerOptions: CompilerOptions, tsConfigPath?: string): (...args: unknown[]) => unknown;
|
|
24
|
+
export declare function registerTsProject(path: string, configFilename: string): any;
|
|
25
|
+
export declare function getSwcTranspiler(compilerOptions: CompilerOptions): (...args: unknown[]) => unknown;
|
|
30
26
|
export declare function getTsNodeTranspiler(compilerOptions: CompilerOptions): (...args: unknown[]) => unknown;
|
|
31
|
-
export declare function getTranspiler(compilerOptions: CompilerOptions
|
|
27
|
+
export declare function getTranspiler(compilerOptions: CompilerOptions): () => (...args: unknown[]) => unknown;
|
|
32
28
|
/**
|
|
33
29
|
* Register ts-node or swc-node given a set of compiler options.
|
|
34
30
|
*
|
|
@@ -37,7 +33,7 @@ export declare function getTranspiler(compilerOptions: CompilerOptions, tsConfig
|
|
|
37
33
|
*
|
|
38
34
|
* @returns cleanup method
|
|
39
35
|
*/
|
|
40
|
-
export declare function registerTranspiler(compilerOptions: CompilerOptions
|
|
36
|
+
export declare function registerTranspiler(compilerOptions: CompilerOptions): () => void;
|
|
41
37
|
/**
|
|
42
38
|
* @param tsConfigPath Adds the paths from a tsconfig file into node resolutions
|
|
43
39
|
* @returns cleanup function
|
|
@@ -3,22 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getTsNodeCompilerOptions = exports.registerTsConfigPaths = exports.registerTranspiler = exports.getTranspiler = exports.getTsNodeTranspiler = exports.getSwcTranspiler = exports.registerTsProject = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const logger_1 = require("../../../utils/logger");
|
|
6
|
-
const fs_1 = require("fs");
|
|
7
|
-
const workspace_root_1 = require("../../../utils/workspace-root");
|
|
8
6
|
const swcNodeInstalled = packageIsInstalled('@swc-node/register');
|
|
9
7
|
const tsNodeInstalled = packageIsInstalled('ts-node/register');
|
|
10
8
|
let ts;
|
|
11
9
|
let isTsEsmLoaderRegistered = false;
|
|
12
|
-
function registerTsProject(path, configFilename
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated Do not use this.. it's a 1-off exception
|
|
15
|
-
*/
|
|
16
|
-
useForSwcEnvironmentVariable) {
|
|
10
|
+
function registerTsProject(path, configFilename) {
|
|
17
11
|
const tsConfigPath = configFilename ? (0, path_1.join)(path, configFilename) : path;
|
|
18
12
|
const compilerOptions = readCompilerOptions(tsConfigPath);
|
|
19
13
|
const cleanupFunctions = [
|
|
20
14
|
registerTsConfigPaths(tsConfigPath),
|
|
21
|
-
registerTranspiler(compilerOptions
|
|
15
|
+
registerTranspiler(compilerOptions),
|
|
22
16
|
];
|
|
23
17
|
// Add ESM support for `.ts` files.
|
|
24
18
|
// NOTE: There is no cleanup function for this, as it's not possible to unregister the loader.
|
|
@@ -39,19 +33,10 @@ useForSwcEnvironmentVariable) {
|
|
|
39
33
|
};
|
|
40
34
|
}
|
|
41
35
|
exports.registerTsProject = registerTsProject;
|
|
42
|
-
function getSwcTranspiler(compilerOptions
|
|
36
|
+
function getSwcTranspiler(compilerOptions) {
|
|
43
37
|
// These are requires to prevent it from registering when it shouldn't
|
|
44
38
|
const register = require('@swc-node/register/register')
|
|
45
39
|
.register;
|
|
46
|
-
if (tsConfigPath) {
|
|
47
|
-
process.env.SWC_NODE_PROJECT = tsConfigPath;
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
let rootTsConfig = (0, path_1.join)(workspace_root_1.workspaceRoot, 'tsconfig.base.json');
|
|
51
|
-
if ((0, fs_1.existsSync)(rootTsConfig)) {
|
|
52
|
-
process.env.SWC_NODE_PROJECT = rootTsConfig;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
40
|
const cleanupFn = register(compilerOptions);
|
|
56
41
|
return typeof cleanupFn === 'function' ? cleanupFn : () => { };
|
|
57
42
|
}
|
|
@@ -75,18 +60,19 @@ function getTsNodeTranspiler(compilerOptions) {
|
|
|
75
60
|
};
|
|
76
61
|
}
|
|
77
62
|
exports.getTsNodeTranspiler = getTsNodeTranspiler;
|
|
78
|
-
function getTranspiler(compilerOptions
|
|
63
|
+
function getTranspiler(compilerOptions) {
|
|
79
64
|
const preferTsNode = process.env.NX_PREFER_TS_NODE === 'true';
|
|
80
65
|
if (!ts) {
|
|
81
66
|
ts = require('typescript');
|
|
82
67
|
}
|
|
83
68
|
compilerOptions.lib = ['es2021'];
|
|
84
69
|
compilerOptions.module = ts.ModuleKind.CommonJS;
|
|
70
|
+
compilerOptions.moduleResolution = ts.ModuleResolutionKind.Node10;
|
|
85
71
|
compilerOptions.target = ts.ScriptTarget.ES2021;
|
|
86
72
|
compilerOptions.inlineSourceMap = true;
|
|
87
73
|
compilerOptions.skipLibCheck = true;
|
|
88
74
|
if (swcNodeInstalled && !preferTsNode) {
|
|
89
|
-
return () => getSwcTranspiler(compilerOptions
|
|
75
|
+
return () => getSwcTranspiler(compilerOptions);
|
|
90
76
|
}
|
|
91
77
|
// We can fall back on ts-node if it's available
|
|
92
78
|
if (tsNodeInstalled) {
|
|
@@ -102,9 +88,9 @@ exports.getTranspiler = getTranspiler;
|
|
|
102
88
|
*
|
|
103
89
|
* @returns cleanup method
|
|
104
90
|
*/
|
|
105
|
-
function registerTranspiler(compilerOptions
|
|
91
|
+
function registerTranspiler(compilerOptions) {
|
|
106
92
|
// Function to register transpiler that returns cleanup function
|
|
107
|
-
const transpiler = getTranspiler(compilerOptions
|
|
93
|
+
const transpiler = getTranspiler(compilerOptions);
|
|
108
94
|
if (!transpiler) {
|
|
109
95
|
warnNoTranspiler();
|
|
110
96
|
return () => { };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TargetConfiguration } from '../../config/workspace-json-project-json';
|
|
2
2
|
import { NxPluginV2 } from '../../utils/nx-plugin';
|
|
3
|
-
import { PackageJson } from '../../utils/package-json';
|
|
4
3
|
/**
|
|
5
4
|
* This symbol marks that a target provides information which should modify a target already registered
|
|
6
5
|
* on the project via other plugins. If the target has not already been registered, and this symbol is true,
|
|
@@ -17,7 +16,7 @@ export declare const TargetDefaultsPlugin: NxPluginV2;
|
|
|
17
16
|
* being scrapped. By adding enough information from the project.json / package.json,
|
|
18
17
|
* we can make sure that the target after merging is compatible with the defined target.
|
|
19
18
|
*/
|
|
20
|
-
export declare function getTargetInfo(target: string,
|
|
19
|
+
export declare function getTargetInfo(target: string, projectJsonTargets: Record<string, TargetConfiguration>, packageJsonTargets: Record<string, TargetConfiguration>): {
|
|
21
20
|
command: string;
|
|
22
21
|
executor?: undefined;
|
|
23
22
|
options?: undefined;
|
|
@@ -6,6 +6,7 @@ const node_fs_1 = require("node:fs");
|
|
|
6
6
|
const node_path_1 = require("node:path");
|
|
7
7
|
const fileutils_1 = require("../../utils/fileutils");
|
|
8
8
|
const globs_1 = require("../../utils/globs");
|
|
9
|
+
const package_json_1 = require("../../utils/package-json");
|
|
9
10
|
const package_json_workspaces_1 = require("../package-json-workspaces");
|
|
10
11
|
/**
|
|
11
12
|
* This symbol marks that a target provides information which should modify a target already registered
|
|
@@ -37,18 +38,12 @@ exports.TargetDefaultsPlugin = {
|
|
|
37
38
|
}
|
|
38
39
|
const projectJson = readJsonOrNull((0, node_path_1.join)(ctx.workspaceRoot, root, 'project.json'));
|
|
39
40
|
const packageJson = readJsonOrNull((0, node_path_1.join)(ctx.workspaceRoot, root, 'package.json'));
|
|
40
|
-
const
|
|
41
|
+
const packageJsonTargets = (0, package_json_1.readTargetsFromPackageJson)(packageJson);
|
|
41
42
|
const projectDefinedTargets = new Set([
|
|
42
|
-
...Object.keys(packageJson?.scripts ?? {}).filter((script) => {
|
|
43
|
-
if (includedScripts) {
|
|
44
|
-
return includedScripts.includes(script);
|
|
45
|
-
}
|
|
46
|
-
return true;
|
|
47
|
-
}),
|
|
48
43
|
...Object.keys(projectJson?.targets ?? {}),
|
|
49
|
-
...Object.keys(
|
|
44
|
+
...(packageJson ? Object.keys(packageJsonTargets) : []),
|
|
50
45
|
]);
|
|
51
|
-
const executorToTargetMap = getExecutorToTargetMap(
|
|
46
|
+
const executorToTargetMap = getExecutorToTargetMap(packageJsonTargets, projectJson?.targets);
|
|
52
47
|
const modifiedTargets = {};
|
|
53
48
|
for (const defaultSpecifier in targetDefaults) {
|
|
54
49
|
const targetNames = executorToTargetMap.get(defaultSpecifier) ?? new Set();
|
|
@@ -59,7 +54,7 @@ exports.TargetDefaultsPlugin = {
|
|
|
59
54
|
if (!modifiedTargets[targetName] || targetName !== defaultSpecifier) {
|
|
60
55
|
const defaults = JSON.parse(JSON.stringify(targetDefaults[defaultSpecifier]));
|
|
61
56
|
modifiedTargets[targetName] = {
|
|
62
|
-
...getTargetInfo(targetName, projectJson,
|
|
57
|
+
...getTargetInfo(targetName, projectJson?.targets, packageJsonTargets),
|
|
63
58
|
...defaults,
|
|
64
59
|
};
|
|
65
60
|
}
|
|
@@ -80,17 +75,14 @@ exports.TargetDefaultsPlugin = {
|
|
|
80
75
|
},
|
|
81
76
|
],
|
|
82
77
|
};
|
|
83
|
-
function getExecutorToTargetMap(
|
|
78
|
+
function getExecutorToTargetMap(packageJsonTargets, projectJsonTargets) {
|
|
84
79
|
const executorToTargetMap = new Map();
|
|
85
80
|
const targets = Object.keys({
|
|
86
|
-
...
|
|
87
|
-
...
|
|
88
|
-
...packageJson?.nx?.targets,
|
|
81
|
+
...projectJsonTargets,
|
|
82
|
+
...packageJsonTargets,
|
|
89
83
|
});
|
|
90
84
|
for (const target of targets) {
|
|
91
|
-
const executor =
|
|
92
|
-
packageJson?.nx?.targets?.[target]?.executor ??
|
|
93
|
-
'nx:run-script';
|
|
85
|
+
const executor = getTargetExecutor(target, projectJsonTargets, packageJsonTargets);
|
|
94
86
|
const targetsForExecutor = executorToTargetMap.get(executor) ?? new Set();
|
|
95
87
|
targetsForExecutor.add(target);
|
|
96
88
|
executorToTargetMap.set(executor, targetsForExecutor);
|
|
@@ -114,10 +106,10 @@ function readJsonOrNull(path) {
|
|
|
114
106
|
* being scrapped. By adding enough information from the project.json / package.json,
|
|
115
107
|
* we can make sure that the target after merging is compatible with the defined target.
|
|
116
108
|
*/
|
|
117
|
-
function getTargetInfo(target,
|
|
118
|
-
const projectJsonTarget =
|
|
119
|
-
const packageJsonTarget =
|
|
120
|
-
const executor = getTargetExecutor(target,
|
|
109
|
+
function getTargetInfo(target, projectJsonTargets, packageJsonTargets) {
|
|
110
|
+
const projectJsonTarget = projectJsonTargets?.[target];
|
|
111
|
+
const packageJsonTarget = packageJsonTargets?.[target];
|
|
112
|
+
const executor = getTargetExecutor(target, projectJsonTargets, packageJsonTargets);
|
|
121
113
|
const targetOptions = {
|
|
122
114
|
...packageJsonTarget?.options,
|
|
123
115
|
...projectJsonTarget?.options,
|
|
@@ -162,17 +154,17 @@ function getTargetInfo(target, projectJson, packageJson) {
|
|
|
162
154
|
return {};
|
|
163
155
|
}
|
|
164
156
|
exports.getTargetInfo = getTargetInfo;
|
|
165
|
-
function getTargetExecutor(target,
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return 'nx:run-commands';
|
|
157
|
+
function getTargetExecutor(target, projectJsonTargets, packageJsonTargets) {
|
|
158
|
+
const projectJsonTargetConfiguration = projectJsonTargets?.[target];
|
|
159
|
+
const packageJsonTargetConfiguration = packageJsonTargets?.[target];
|
|
160
|
+
if (!projectJsonTargetConfiguration && packageJsonTargetConfiguration) {
|
|
161
|
+
return packageJsonTargetConfiguration?.executor ?? 'nx:run-script';
|
|
171
162
|
}
|
|
172
|
-
if (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
163
|
+
if (projectJsonTargetConfiguration?.executor) {
|
|
164
|
+
return projectJsonTargetConfiguration.executor;
|
|
165
|
+
}
|
|
166
|
+
if (projectJsonTargetConfiguration?.command) {
|
|
167
|
+
return 'nx:run-commands';
|
|
176
168
|
}
|
|
177
|
-
return
|
|
169
|
+
return null;
|
|
178
170
|
}
|
|
@@ -108,13 +108,13 @@ skipCommandNormalization) {
|
|
|
108
108
|
!matchingProject.targets?.[targetName]) {
|
|
109
109
|
continue;
|
|
110
110
|
}
|
|
111
|
+
const mergedTarget = mergeTargetConfigurations(skipCommandNormalization
|
|
112
|
+
? target
|
|
113
|
+
: resolveCommandSyntacticSugar(target, project.root), matchingProject.targets?.[targetName], sourceMap, sourceInformation, `targets.${targetName}`);
|
|
111
114
|
// We don't want the symbol to live on past the merge process
|
|
112
|
-
if (
|
|
113
|
-
delete
|
|
114
|
-
updatedProjectConfiguration.targets[targetName] =
|
|
115
|
-
mergeTargetConfigurations(skipCommandNormalization
|
|
116
|
-
? target
|
|
117
|
-
: resolveCommandSyntacticSugar(target, project.root), matchingProject.targets?.[targetName], sourceMap, sourceInformation, `targets.${targetName}`);
|
|
115
|
+
if (mergedTarget?.[target_defaults_plugin_1.ONLY_MODIFIES_EXISTING_TARGET])
|
|
116
|
+
delete mergedTarget?.[target_defaults_plugin_1.ONLY_MODIFIES_EXISTING_TARGET];
|
|
117
|
+
updatedProjectConfiguration.targets[targetName] = mergedTarget;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
projectRootMap.set(updatedProjectConfiguration.root, updatedProjectConfiguration);
|
|
@@ -288,6 +288,13 @@ function mergeTargetConfigurations(target, baseTarget, projectConfigSourceMap, s
|
|
|
288
288
|
// Target is "compatible", e.g. executor is defined only once or is the same
|
|
289
289
|
// in both places. This means that it is likely safe to merge
|
|
290
290
|
const isCompatible = isCompatibleTarget(baseTargetProperties, target);
|
|
291
|
+
// If the targets are not compatible, we would normally overwrite the old target
|
|
292
|
+
// with the new one. However, we have a special case for targets that have the
|
|
293
|
+
// ONLY_MODIFIES_EXISTING_TARGET symbol set. This prevents the merged target
|
|
294
|
+
// equaling info that should have only been used to modify the existing target.
|
|
295
|
+
if (!isCompatible && target[target_defaults_plugin_1.ONLY_MODIFIES_EXISTING_TARGET]) {
|
|
296
|
+
return baseTarget;
|
|
297
|
+
}
|
|
291
298
|
if (!isCompatible && projectConfigSourceMap) {
|
|
292
299
|
// if the target is not compatible, we will simply override the options
|
|
293
300
|
// we have to delete old entries from the source map
|
|
@@ -9,6 +9,8 @@ const output_1 = require("../../utils/output");
|
|
|
9
9
|
const pretty_time_1 = require("./pretty-time");
|
|
10
10
|
const formatting_utils_1 = require("./formatting-utils");
|
|
11
11
|
const view_logs_utils_1 = require("./view-logs-utils");
|
|
12
|
+
const LEFT_PAD = ` `;
|
|
13
|
+
const EXTENDED_LEFT_PAD = ` `;
|
|
12
14
|
/**
|
|
13
15
|
* The following function is responsible for creating a life cycle with dynamic
|
|
14
16
|
* outputs, meaning previous outputs can be rewritten or modified as new outputs
|
|
@@ -74,7 +76,7 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
74
76
|
// Create vertical breathing room for cursor position under the pinned footer
|
|
75
77
|
lines.push('');
|
|
76
78
|
for (const line of lines) {
|
|
77
|
-
output_1.output.overwriteLine(
|
|
79
|
+
output_1.output.overwriteLine(line);
|
|
78
80
|
}
|
|
79
81
|
pinnedFooterNumLines = lines.length + additionalLines;
|
|
80
82
|
// clear any possible text below the cursor's position
|
|
@@ -143,10 +145,10 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
143
145
|
const runningTasks = taskRows.filter((row) => row.status === 'running');
|
|
144
146
|
const remainingTasks = totalTasks - totalCompletedTasks;
|
|
145
147
|
if (runningTasks.length > 0) {
|
|
146
|
-
additionalFooterRows.push(output_1.output.dim(
|
|
148
|
+
additionalFooterRows.push(output_1.output.dim(`${LEFT_PAD}${output_1.output.colors.cyan(figures.arrowRight)} Executing ${runningTasks.length}/${remainingTasks} remaining tasks${runningTasks.length > 1 ? ' in parallel' : ''}...`));
|
|
147
149
|
additionalFooterRows.push('');
|
|
148
150
|
for (const runningTask of runningTasks) {
|
|
149
|
-
additionalFooterRows.push(
|
|
151
|
+
additionalFooterRows.push(`${LEFT_PAD}${output_1.output.dim.cyan(cli_spinners_1.dots.frames[currentFrame])} ${output_1.output.formatCommand(runningTask.task.id)}`);
|
|
150
152
|
}
|
|
151
153
|
/**
|
|
152
154
|
* Reduce layout thrashing by ensuring that there is a relatively consistent
|
|
@@ -170,21 +172,20 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
170
172
|
additionalFooterRows.push('');
|
|
171
173
|
}
|
|
172
174
|
if (totalSuccessfulTasks > 0) {
|
|
173
|
-
additionalFooterRows.push(
|
|
175
|
+
additionalFooterRows.push(`${LEFT_PAD}${output_1.output.colors.green(figures.tick)} ${totalSuccessfulTasks}${`/${totalCompletedTasks}`} succeeded ${output_1.output.dim(`[${totalCachedTasks} read from cache]`)}`);
|
|
174
176
|
}
|
|
175
177
|
if (totalFailedTasks > 0) {
|
|
176
|
-
additionalFooterRows.push(
|
|
178
|
+
additionalFooterRows.push(`${LEFT_PAD}${output_1.output.colors.red(figures.cross)} ${totalFailedTasks}${`/${totalCompletedTasks}`} failed`);
|
|
177
179
|
}
|
|
178
180
|
moveCursorToStartOfPinnedFooter();
|
|
179
181
|
if (additionalFooterRows.length > 1) {
|
|
180
182
|
const text = `Running ${(0, formatting_utils_1.formatTargetsAndProjects)(projectNames, targets, tasks)}`;
|
|
181
183
|
const taskOverridesRows = [];
|
|
182
184
|
if (Object.keys(overrides).length > 0) {
|
|
183
|
-
const leftPadding = `${output_1.output.X_PADDING} `;
|
|
184
185
|
taskOverridesRows.push('');
|
|
185
|
-
taskOverridesRows.push(`${
|
|
186
|
+
taskOverridesRows.push(`${EXTENDED_LEFT_PAD}${output_1.output.dim.cyan('With additional flags:')}`);
|
|
186
187
|
Object.entries(overrides)
|
|
187
|
-
.map(([flag, value]) => output_1.output.dim.cyan((0, formatting_utils_1.formatFlags)(
|
|
188
|
+
.map(([flag, value]) => output_1.output.dim.cyan((0, formatting_utils_1.formatFlags)(EXTENDED_LEFT_PAD, flag, value)))
|
|
188
189
|
.forEach((arg) => taskOverridesRows.push(arg));
|
|
189
190
|
}
|
|
190
191
|
const pinnedFooterLines = [
|
|
@@ -221,11 +222,10 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
221
222
|
const text = `Successfully ran ${(0, formatting_utils_1.formatTargetsAndProjects)(projectNames, targets, tasks)}`;
|
|
222
223
|
const taskOverridesRows = [];
|
|
223
224
|
if (Object.keys(overrides).length > 0) {
|
|
224
|
-
const leftPadding = `${output_1.output.X_PADDING} `;
|
|
225
225
|
taskOverridesRows.push('');
|
|
226
|
-
taskOverridesRows.push(`${
|
|
226
|
+
taskOverridesRows.push(`${EXTENDED_LEFT_PAD}${output_1.output.dim.green('With additional flags:')}`);
|
|
227
227
|
Object.entries(overrides)
|
|
228
|
-
.map(([flag, value]) => output_1.output.dim.green((0, formatting_utils_1.formatFlags)(
|
|
228
|
+
.map(([flag, value]) => output_1.output.dim.green((0, formatting_utils_1.formatFlags)(EXTENDED_LEFT_PAD, flag, value)))
|
|
229
229
|
.forEach((arg) => taskOverridesRows.push(arg));
|
|
230
230
|
}
|
|
231
231
|
const pinnedFooterLines = [
|
|
@@ -233,7 +233,7 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
233
233
|
...taskOverridesRows,
|
|
234
234
|
];
|
|
235
235
|
if (totalCachedTasks > 0) {
|
|
236
|
-
pinnedFooterLines.push(output_1.output.dim(`${os_1.EOL}
|
|
236
|
+
pinnedFooterLines.push(output_1.output.dim(`${os_1.EOL}Nx read the output from the cache instead of running the command for ${totalCachedTasks} out of ${totalTasks} tasks.`));
|
|
237
237
|
}
|
|
238
238
|
renderPinnedFooter(pinnedFooterLines, 'green');
|
|
239
239
|
}
|
|
@@ -241,11 +241,10 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
241
241
|
const text = `Ran ${(0, formatting_utils_1.formatTargetsAndProjects)(projectNames, targets, tasks)}`;
|
|
242
242
|
const taskOverridesRows = [];
|
|
243
243
|
if (Object.keys(overrides).length > 0) {
|
|
244
|
-
const leftPadding = `${output_1.output.X_PADDING} `;
|
|
245
244
|
taskOverridesRows.push('');
|
|
246
|
-
taskOverridesRows.push(`${
|
|
245
|
+
taskOverridesRows.push(`${EXTENDED_LEFT_PAD}${output_1.output.dim.red('With additional flags:')}`);
|
|
247
246
|
Object.entries(overrides)
|
|
248
|
-
.map(([flag, value]) => output_1.output.dim.red((0, formatting_utils_1.formatFlags)(
|
|
247
|
+
.map(([flag, value]) => output_1.output.dim.red((0, formatting_utils_1.formatFlags)(EXTENDED_LEFT_PAD, flag, value)))
|
|
249
248
|
.forEach((arg) => taskOverridesRows.push(arg));
|
|
250
249
|
}
|
|
251
250
|
const numFailedToPrint = 5;
|
|
@@ -254,15 +253,15 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
254
253
|
output_1.output.applyNxPrefix('red', output_1.output.colors.red(text) + output_1.output.dim.white(` (${timeTakenText})`)),
|
|
255
254
|
...taskOverridesRows,
|
|
256
255
|
'',
|
|
257
|
-
output_1.output.dim(
|
|
256
|
+
output_1.output.dim(`${LEFT_PAD}${output_1.output.dim(figures.tick)} ${totalSuccessfulTasks}${`/${totalCompletedTasks}`} succeeded ${output_1.output.dim(`[${totalCachedTasks} read from cache]`)}`),
|
|
258
257
|
'',
|
|
259
|
-
|
|
258
|
+
`${LEFT_PAD}${output_1.output.colors.red(figures.cross)} ${totalFailedTasks}${`/${totalCompletedTasks}`} targets failed, including the following:`,
|
|
260
259
|
`${failedTasksForPrinting
|
|
261
|
-
.map((t) =>
|
|
260
|
+
.map((t) => `${EXTENDED_LEFT_PAD}${output_1.output.colors.red('-')} ${output_1.output.formatCommand(t.toString())}`)
|
|
262
261
|
.join('\n ')}`,
|
|
263
262
|
];
|
|
264
263
|
if (failedTasks.size > numFailedToPrint) {
|
|
265
|
-
failureSummaryRows.push(output_1.output.dim(
|
|
264
|
+
failureSummaryRows.push(output_1.output.dim(`${EXTENDED_LEFT_PAD}...and ${failedTasks.size - numFailedToPrint} more...`));
|
|
266
265
|
}
|
|
267
266
|
failureSummaryRows.push(...(0, view_logs_utils_1.viewLogsFooterRows)(failedTasks.size));
|
|
268
267
|
renderPinnedFooter(failureSummaryRows, 'red');
|
|
@@ -314,8 +313,7 @@ async function createRunManyDynamicOutputRenderer({ projectNames, tasks, args, o
|
|
|
314
313
|
}
|
|
315
314
|
exports.createRunManyDynamicOutputRenderer = createRunManyDynamicOutputRenderer;
|
|
316
315
|
function writeCompletedTaskResultLine(line) {
|
|
317
|
-
|
|
318
|
-
output_1.output.overwriteLine(output_1.output.X_PADDING + additionalXPadding + line);
|
|
316
|
+
output_1.output.overwriteLine(LEFT_PAD + line);
|
|
319
317
|
}
|
|
320
318
|
/**
|
|
321
319
|
* There's not much we can do in order to "neaten up" the outputs of
|
|
@@ -326,7 +324,6 @@ function writeCompletedTaskResultLine(line) {
|
|
|
326
324
|
function writeCommandOutputBlock(commandOutput) {
|
|
327
325
|
commandOutput = commandOutput || '';
|
|
328
326
|
commandOutput = commandOutput.trimStart();
|
|
329
|
-
const additionalXPadding = ' ';
|
|
330
327
|
const lines = commandOutput.split(os_1.EOL);
|
|
331
328
|
let totalTrailingEmptyLines = 0;
|
|
332
329
|
for (let i = lines.length - 1; i >= 0; i--) {
|
|
@@ -341,5 +338,5 @@ function writeCommandOutputBlock(commandOutput) {
|
|
|
341
338
|
}
|
|
342
339
|
lines.push('');
|
|
343
340
|
// Indent the command output to make it look more "designed" in the context of the dynamic output
|
|
344
|
-
lines.forEach((l) => output_1.output.overwriteLine(`${
|
|
341
|
+
lines.forEach((l) => output_1.output.overwriteLine(`${EXTENDED_LEFT_PAD}${l}`));
|
|
345
342
|
}
|
|
@@ -9,6 +9,8 @@ const output_1 = require("../../utils/output");
|
|
|
9
9
|
const pretty_time_1 = require("./pretty-time");
|
|
10
10
|
const formatting_utils_1 = require("./formatting-utils");
|
|
11
11
|
const view_logs_utils_1 = require("./view-logs-utils");
|
|
12
|
+
const LEFT_PAD = ` `;
|
|
13
|
+
const EXTENDED_LEFT_PAD = ` `;
|
|
12
14
|
/**
|
|
13
15
|
* The following function is responsible for creating a life cycle with dynamic
|
|
14
16
|
* outputs, meaning previous outputs can be rewritten or modified as new outputs
|
|
@@ -57,7 +59,7 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
57
59
|
const moveCursorToStartOfDependentTargetLines = () => {
|
|
58
60
|
readline.moveCursor(process.stdout, 0, -dependentTargetsNumLines);
|
|
59
61
|
};
|
|
60
|
-
const renderLines = (lines, dividerColor = 'cyan', renderDivider = true
|
|
62
|
+
const renderLines = (lines, dividerColor = 'cyan', renderDivider = true) => {
|
|
61
63
|
let additionalLines = 0;
|
|
62
64
|
if (renderDivider) {
|
|
63
65
|
const dividerLines = output_1.output.getVerticalSeparatorLines(dividerColor);
|
|
@@ -68,7 +70,7 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
68
70
|
lines.push('');
|
|
69
71
|
}
|
|
70
72
|
for (const line of lines) {
|
|
71
|
-
output_1.output.overwriteLine(
|
|
73
|
+
output_1.output.overwriteLine(line);
|
|
72
74
|
}
|
|
73
75
|
dependentTargetsNumLines = lines.length + additionalLines;
|
|
74
76
|
// clear any possible text below the cursor's position
|
|
@@ -86,7 +88,7 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
86
88
|
switch (state) {
|
|
87
89
|
case 'EXECUTING_DEPENDENT_TARGETS':
|
|
88
90
|
if (totalFailedTasks === 0) {
|
|
89
|
-
linesToRender.push(
|
|
91
|
+
linesToRender.push(`${LEFT_PAD}${output_1.output.colors.cyan(cli_spinners_1.dots.frames[dependentTargetsCurrentFrame])} ${output_1.output.dim(`Nx is waiting on ${remainingDependentTasksNotFromInitiatingProject} dependent project tasks before running tasks from`)} ${initiatingProject}${output_1.output.dim('...')}`);
|
|
90
92
|
if (totalSuccessfulTasks > 0) {
|
|
91
93
|
linesToRender.push('');
|
|
92
94
|
}
|
|
@@ -94,14 +96,14 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
94
96
|
break;
|
|
95
97
|
}
|
|
96
98
|
if (totalFailedTasks > 0) {
|
|
97
|
-
linesToRender.push(output_1.output.colors.red.dim(
|
|
99
|
+
linesToRender.push(output_1.output.colors.red.dim(`${LEFT_PAD}${output_1.output.colors.red(figures.cross)} ${totalFailedTasks}${`/${totalCompletedTasks}`} dependent project tasks failed (see below)`));
|
|
98
100
|
}
|
|
99
101
|
if (totalSuccessfulTasks > 0) {
|
|
100
|
-
linesToRender.push(output_1.output.dim(
|
|
102
|
+
linesToRender.push(output_1.output.dim(`${LEFT_PAD}${output_1.output.dim(figures.tick)} ${totalSuccessfulTasks}${`/${totalCompletedTasks}`} dependent project tasks succeeded ${output_1.output.dim(`[${totalCachedTasks} read from cache]`)}`));
|
|
101
103
|
}
|
|
102
104
|
moveCursorToStartOfDependentTargetLines();
|
|
103
105
|
if (linesToRender.length > 1) {
|
|
104
|
-
renderLines(linesToRender, 'gray', renderDivider && state !== 'EXECUTING_DEPENDENT_TARGETS'
|
|
106
|
+
renderLines(linesToRender, 'gray', renderDivider && state !== 'EXECUTING_DEPENDENT_TARGETS');
|
|
105
107
|
}
|
|
106
108
|
else {
|
|
107
109
|
renderLines([]);
|
|
@@ -120,7 +122,7 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
120
122
|
renderDependentTargets(false);
|
|
121
123
|
if (totalDependentTasksNotFromInitiatingProject > 0) {
|
|
122
124
|
output_1.output.addNewline();
|
|
123
|
-
process.stdout.write(
|
|
125
|
+
process.stdout.write(`${LEFT_PAD}${output_1.output.dim('Hint: you can run the command with')} --verbose ${output_1.output.dim('to see the full dependent project outputs')}` + os_1.EOL);
|
|
124
126
|
output_1.output.addVerticalSeparator('gray');
|
|
125
127
|
}
|
|
126
128
|
}
|
|
@@ -176,11 +178,10 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
176
178
|
const text = `Successfully ran ${(0, formatting_utils_1.formatTargetsAndProjects)([initiatingProject], [targetName], tasks)}`;
|
|
177
179
|
const taskOverridesLines = [];
|
|
178
180
|
if (Object.keys(overrides).length > 0) {
|
|
179
|
-
const leftPadding = `${output_1.output.X_PADDING} `;
|
|
180
181
|
taskOverridesLines.push('');
|
|
181
|
-
taskOverridesLines.push(`${
|
|
182
|
+
taskOverridesLines.push(`${EXTENDED_LEFT_PAD}${output_1.output.dim.green('With additional flags:')}`);
|
|
182
183
|
Object.entries(overrides)
|
|
183
|
-
.map(([flag, value]) => output_1.output.dim.green((0, formatting_utils_1.formatFlags)(
|
|
184
|
+
.map(([flag, value]) => output_1.output.dim.green((0, formatting_utils_1.formatFlags)(EXTENDED_LEFT_PAD, flag, value)))
|
|
184
185
|
.forEach((arg) => taskOverridesLines.push(arg));
|
|
185
186
|
}
|
|
186
187
|
const pinnedFooterLines = [
|
|
@@ -188,7 +189,7 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
188
189
|
...taskOverridesLines,
|
|
189
190
|
];
|
|
190
191
|
if (totalCachedTasks > 0) {
|
|
191
|
-
pinnedFooterLines.push(output_1.output.dim(`${os_1.EOL}
|
|
192
|
+
pinnedFooterLines.push(output_1.output.dim(`${os_1.EOL}Nx read the output from the cache instead of running the command for ${totalCachedTasks} out of ${totalTasks} tasks.`));
|
|
192
193
|
}
|
|
193
194
|
renderLines(pinnedFooterLines, 'green');
|
|
194
195
|
}
|
|
@@ -200,11 +201,10 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
200
201
|
}
|
|
201
202
|
const taskOverridesLines = [];
|
|
202
203
|
if (Object.keys(overrides).length > 0) {
|
|
203
|
-
const leftPadding = `${output_1.output.X_PADDING} `;
|
|
204
204
|
taskOverridesLines.push('');
|
|
205
|
-
taskOverridesLines.push(`${
|
|
205
|
+
taskOverridesLines.push(`${EXTENDED_LEFT_PAD}${output_1.output.dim.red('With additional flags:')}`);
|
|
206
206
|
Object.entries(overrides)
|
|
207
|
-
.map(([flag, value]) => output_1.output.dim.red((0, formatting_utils_1.formatFlags)(
|
|
207
|
+
.map(([flag, value]) => output_1.output.dim.red((0, formatting_utils_1.formatFlags)(EXTENDED_LEFT_PAD, flag, value)))
|
|
208
208
|
.forEach((arg) => taskOverridesLines.push(arg));
|
|
209
209
|
}
|
|
210
210
|
const viewLogs = (0, view_logs_utils_1.viewLogsFooterRows)(totalFailedTasks);
|
|
@@ -212,8 +212,8 @@ async function createRunOneDynamicOutputRenderer({ initiatingProject, tasks, arg
|
|
|
212
212
|
output_1.output.applyNxPrefix('red', output_1.output.colors.red(text) + output_1.output.dim(` (${timeTakenText})`)),
|
|
213
213
|
...taskOverridesLines,
|
|
214
214
|
'',
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
`${LEFT_PAD}${output_1.output.colors.red(figures.cross)} ${totalFailedTasks}${`/${totalCompletedTasks}`} failed`,
|
|
216
|
+
`${LEFT_PAD}${output_1.output.dim(figures.tick)} ${totalSuccessfulTasks}${`/${totalCompletedTasks}`} succeeded ${output_1.output.dim(`[${totalCachedTasks} read from cache]`)}`,
|
|
217
217
|
...viewLogs,
|
|
218
218
|
], 'red');
|
|
219
219
|
}
|
|
@@ -27,7 +27,7 @@ class StaticRunManyTerminalOutputLifeCycle {
|
|
|
27
27
|
output_1.output.logSingleLine(`No projects with ${(0, formatting_utils_1.formatTargetsAndProjects)(this.projectNames, this.args.targets, this.tasks)} were run`);
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
const bodyLines = this.projectNames.map((affectedProject) =>
|
|
30
|
+
const bodyLines = this.projectNames.map((affectedProject) => `${output_1.output.dim('-')} ${affectedProject}`);
|
|
31
31
|
if (Object.keys(this.taskOverrides).length > 0) {
|
|
32
32
|
bodyLines.push('');
|
|
33
33
|
bodyLines.push(`${output_1.output.dim('With additional flags:')}`);
|
|
@@ -19,6 +19,7 @@ export declare class StaticRunOneTerminalOutputLifeCycle implements LifeCycle {
|
|
|
19
19
|
constructor(initiatingProject: string, projectNames: string[], tasks: Task[], args: {
|
|
20
20
|
targets?: string[];
|
|
21
21
|
configuration?: string;
|
|
22
|
+
verbose?: boolean;
|
|
22
23
|
});
|
|
23
24
|
startCommand(): void;
|
|
24
25
|
endCommand(): void;
|
|
@@ -78,12 +78,20 @@ class StaticRunOneTerminalOutputLifeCycle {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
printTaskTerminalOutput(task, status, terminalOutput) {
|
|
81
|
-
|
|
81
|
+
const args = (0, utils_1.getPrintableCommandArgsForTask)(task);
|
|
82
|
+
if (this.args.verbose ||
|
|
83
|
+
status === 'success' ||
|
|
82
84
|
status === 'failure' ||
|
|
83
85
|
task.target.project === this.initiatingProject) {
|
|
84
|
-
const args = (0, utils_1.getPrintableCommandArgsForTask)(task);
|
|
85
86
|
output_1.output.logCommandOutput(args.join(' '), status, terminalOutput);
|
|
86
87
|
}
|
|
88
|
+
else {
|
|
89
|
+
/**
|
|
90
|
+
* Do not show the terminal output in the case where it is not the initiating project and verbose is not set,
|
|
91
|
+
* but still print the command that was run and its status (so that cache hits can still be traced).
|
|
92
|
+
*/
|
|
93
|
+
output_1.output.logCommandOutput(args.join(' '), status, '');
|
|
94
|
+
}
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
97
|
exports.StaticRunOneTerminalOutputLifeCycle = StaticRunOneTerminalOutputLifeCycle;
|