@code-pushup/nx-plugin 0.92.1 → 0.93.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/nx-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Nx plugin to integrate the Code PushUp CLI into your workspace 🛠️",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"generators": "./generators.json",
|
|
33
33
|
"executors": "./executors.json",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@code-pushup/models": "0.
|
|
36
|
-
"@code-pushup/utils": "0.
|
|
35
|
+
"@code-pushup/models": "0.93.0",
|
|
36
|
+
"@code-pushup/utils": "0.93.0",
|
|
37
37
|
"@nx/devkit": ">=17.0.0",
|
|
38
38
|
"nx": ">=17.0.0"
|
|
39
39
|
},
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = runAutorunExecutor;
|
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const execute_process_js_1 = require("../../internal/execute-process.js");
|
|
6
5
|
const context_js_1 = require("../internal/context.js");
|
|
7
6
|
const utils_js_1 = require("./utils.js");
|
|
8
7
|
/* eslint-disable-next-line max-lines-per-function */
|
|
9
8
|
async function runAutorunExecutor(terminalAndExecutorOptions, context) {
|
|
10
|
-
const { objectToCliArgs, formatCommandStatus } = await Promise.resolve().then(() => require('@code-pushup/utils'));
|
|
9
|
+
const { objectToCliArgs, formatCommandStatus, logger, stringifyError } = await Promise.resolve().then(() => require('@code-pushup/utils'));
|
|
11
10
|
const normalizedContext = (0, context_js_1.normalizeContext)(context);
|
|
12
11
|
const cliArgumentObject = (0, utils_js_1.parseAutorunExecutorOptions)(terminalAndExecutorOptions, normalizedContext);
|
|
13
|
-
const {
|
|
12
|
+
const { command: cliCommand } = terminalAndExecutorOptions;
|
|
13
|
+
const { verbose = false, dryRun, bin, ...restArgs } = cliArgumentObject;
|
|
14
|
+
logger.setVerbose(verbose);
|
|
14
15
|
const command = bin ? `node` : 'npx';
|
|
15
16
|
const positionals = [
|
|
16
17
|
bin ?? '@code-pushup/cli',
|
|
17
18
|
...(cliCommand ? [cliCommand] : []),
|
|
18
19
|
];
|
|
19
|
-
const args = [...positionals, ...objectToCliArgs(
|
|
20
|
+
const args = [...positionals, ...objectToCliArgs(restArgs)];
|
|
21
|
+
const executorEnvVariables = {
|
|
22
|
+
...(verbose && { CP_VERBOSE: 'true' }),
|
|
23
|
+
};
|
|
20
24
|
const commandString = formatCommandStatus([command, ...args].join(' '), {
|
|
21
25
|
cwd: context.cwd,
|
|
26
|
+
env: executorEnvVariables,
|
|
22
27
|
});
|
|
23
|
-
if (verbose) {
|
|
24
|
-
devkit_1.logger.info(`Run CLI executor ${command ?? ''}`);
|
|
25
|
-
devkit_1.logger.info(`Command: ${commandString}`);
|
|
26
|
-
}
|
|
27
28
|
if (dryRun) {
|
|
28
|
-
|
|
29
|
+
logger.warn(`DryRun execution of: ${commandString}`);
|
|
29
30
|
}
|
|
30
31
|
else {
|
|
31
32
|
try {
|
|
33
|
+
logger.debug(`With env vars: ${executorEnvVariables}`);
|
|
32
34
|
await (0, execute_process_js_1.executeProcess)({
|
|
33
35
|
command,
|
|
34
36
|
args,
|
|
@@ -36,7 +38,7 @@ async function runAutorunExecutor(terminalAndExecutorOptions, context) {
|
|
|
36
38
|
});
|
|
37
39
|
}
|
|
38
40
|
catch (error) {
|
|
39
|
-
|
|
41
|
+
logger.error(stringifyError(error));
|
|
40
42
|
return {
|
|
41
43
|
success: false,
|
|
42
44
|
command: commandString,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/cli/executor.ts"],"names":[],"mappings":";;AAaA,
|
|
1
|
+
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/cli/executor.ts"],"names":[],"mappings":";;AAaA,qCAoDC;AAhED,0EAAmE;AACnE,uDAA0D;AAE1D,yCAAyD;AAQzD,qDAAqD;AACtC,KAAK,UAAU,kBAAkB,CAC9C,0BAAyD,EACzD,OAAwB;IAExB,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,GACpE,2CAAa,oBAAoB,EAAC,CAAC;IACrC,MAAM,iBAAiB,GAAG,IAAA,6BAAgB,EAAC,OAAO,CAAC,CAAC;IACpD,MAAM,iBAAiB,GAAG,IAAA,sCAA2B,EACnD,0BAA0B,EAC1B,iBAAiB,CAClB,CAAC;IACF,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,0BAA0B,CAAC;IAC3D,MAAM,EAAE,OAAO,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,QAAQ,EAAE,GAAG,iBAAiB,CAAC;IACxE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAE3B,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IACrC,MAAM,WAAW,GAAG;QAClB,GAAG,IAAI,kBAAkB;QACzB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACpC,CAAC;IACF,MAAM,IAAI,GAAG,CAAC,GAAG,WAAW,EAAE,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,MAAM,oBAAoB,GAAG;QAC3B,GAAG,CAAC,OAAO,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;KACvC,CAAC;IACF,MAAM,aAAa,GAAG,mBAAmB,CAAC,CAAC,OAAO,EAAE,GAAG,IAAI,CA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