@code-pushup/nx-plugin 0.90.1 → 0.92.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.90.1",
3
+ "version": "0.92.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.90.1",
36
- "@code-pushup/utils": "0.90.1",
35
+ "@code-pushup/models": "0.92.0",
36
+ "@code-pushup/utils": "0.92.0",
37
37
  "@nx/devkit": ">=17.0.0",
38
38
  "nx": ">=17.0.0"
39
39
  },
@@ -8,9 +8,8 @@ const context_js_1 = require("../internal/context.js");
8
8
  const utils_js_1 = require("./utils.js");
9
9
  async function runAutorunExecutor(terminalAndExecutorOptions, context) {
10
10
  const normalizedContext = (0, context_js_1.normalizeContext)(context);
11
- const mergedOptions = (0, utils_js_1.mergeExecutorOptions)(context.target?.options, terminalAndExecutorOptions);
12
- const cliArgumentObject = (0, utils_js_1.parseAutorunExecutorOptions)(mergedOptions, normalizedContext);
13
- const { dryRun, verbose, command, bin } = mergedOptions;
11
+ const cliArgumentObject = (0, utils_js_1.parseAutorunExecutorOptions)(terminalAndExecutorOptions, normalizedContext);
12
+ const { dryRun, verbose, command, bin } = terminalAndExecutorOptions;
14
13
  const commandString = (0, cli_js_1.createCliCommandString)({
15
14
  command,
16
15
  args: cliArgumentObject,
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/cli/executor.ts"],"names":[],"mappings":";;AAgBA,qCA4CC;AA5DD,uCAA0D;AAC1D,0EAAmE;AACnE,+CAG4B;AAC5B,uDAA0D;AAE1D,yCAA+E;AAQhE,KAA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BACpE,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC7C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,eAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,aAAa;gBACtB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,EAAE,CAAC;aAC9D,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,aAAa;KACvB,CAAC;AACJ,CAAC"}
@@ -3,16 +3,3 @@ import type { AutorunCommandExecutorOnlyOptions, AutorunCommandExecutorOptions,
3
3
  export declare function parseAutorunExecutorOnlyOptions(options: Partial<AutorunCommandExecutorOnlyOptions>): AutorunCommandExecutorOnlyOptions;
4
4
  export declare function parsePrintConfigExecutorOptions(options: Partial<PrintConfigCommandExecutorOptions>): PrintConfigCommandExecutorOptions;
5
5
  export declare function parseAutorunExecutorOptions(options: Partial<AutorunCommandExecutorOptions>, normalizedContext: NormalizedExecutorContext): AutorunCommandExecutorOptions;
6
- /**
7
- * Deeply merges executor options.
8
- *
9
- * @param targetOptions - The original options from the target configuration.
10
- * @param cliOptions - The options from Nx, combining target options and CLI arguments.
11
- * @returns A new object with deeply merged properties.
12
- *
13
- * Nx performs a shallow merge by default, where command-line arguments can override entire objects
14
- * (e.g., `--persist.filename` replaces the entire `persist` object).
15
- * This function ensures that nested properties are deeply merged,
16
- * preserving the original target options where CLI arguments are not provided.
17
- */
18
- export declare function mergeExecutorOptions(targetOptions: Partial<AutorunCommandExecutorOptions>, cliOptions: Partial<AutorunCommandExecutorOptions>): AutorunCommandExecutorOptions;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.parseAutorunExecutorOnlyOptions = parseAutorunExecutorOnlyOptions;
4
4
  exports.parsePrintConfigExecutorOptions = parsePrintConfigExecutorOptions;
5
5
  exports.parseAutorunExecutorOptions = parseAutorunExecutorOptions;
6
- exports.mergeExecutorOptions = mergeExecutorOptions;
7
6
  const config_js_1 = require("../internal/config.js");
8
7
  function parseAutorunExecutorOnlyOptions(options) {
9
8
  const { projectPrefix, dryRun, onlyPlugins } = options;
@@ -20,7 +19,7 @@ function parsePrintConfigExecutorOptions(options) {
20
19
  };
21
20
  }
22
21
  function parseAutorunExecutorOptions(options, normalizedContext) {
23
- const { projectPrefix, persist, upload, command } = options;
22
+ const { projectPrefix, persist, upload, command, output } = options;
24
23
  const needsUploadParams = command === 'upload' || command === 'autorun' || command === undefined;
25
24
  const uploadCfg = (0, config_js_1.uploadConfig)({ projectPrefix, ...upload }, normalizedContext);
26
25
  const hasApiToken = uploadCfg?.apiKey != null;
@@ -28,6 +27,7 @@ function parseAutorunExecutorOptions(options, normalizedContext) {
28
27
  ...parsePrintConfigExecutorOptions(options),
29
28
  ...parseAutorunExecutorOnlyOptions(options),
30
29
  ...(0, config_js_1.globalConfig)(options, normalizedContext),
30
+ ...(output ? { output } : {}),
31
31
  persist: (0, config_js_1.persistConfig)({ projectPrefix, ...persist }, normalizedContext),
32
32
  // @TODO This is a hack to avoid validation errors of upload config for commands that dont need it.
33
33
  // Fix: use utils and execute the core logic directly
@@ -35,38 +35,4 @@ function parseAutorunExecutorOptions(options, normalizedContext) {
35
35
  ...(needsUploadParams && hasApiToken ? { upload: uploadCfg } : {}),
36
36
  };
37
37
  }
38
- /**
39
- * Deeply merges executor options.
40
- *
41
- * @param targetOptions - The original options from the target configuration.
42
- * @param cliOptions - The options from Nx, combining target options and CLI arguments.
43
- * @returns A new object with deeply merged properties.
44
- *
45
- * Nx performs a shallow merge by default, where command-line arguments can override entire objects
46
- * (e.g., `--persist.filename` replaces the entire `persist` object).
47
- * This function ensures that nested properties are deeply merged,
48
- * preserving the original target options where CLI arguments are not provided.
49
- */
50
- function mergeExecutorOptions(targetOptions, cliOptions) {
51
- return {
52
- ...targetOptions,
53
- ...cliOptions,
54
- ...(targetOptions?.persist || cliOptions?.persist
55
- ? {
56
- persist: {
57
- ...targetOptions?.persist,
58
- ...cliOptions?.persist,
59
- },
60
- }
61
- : {}),
62
- ...(targetOptions?.upload || cliOptions?.upload
63
- ? {
64
- upload: {
65
- ...targetOptions?.upload,
66
- ...cliOptions?.upload,
67
- },
68
- }
69
- : {}),
70
- };
71
- }
72
38
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/executors/cli/utils.ts"],"names":[],"mappings":";;AAYA,0EASC;AAED,0EAOC;AAED,kEAsBC;AAcD,oDAwBC;AA5FD,qDAI+B;AAQ/B,SAAgB,+BAA+B,CAC7C,OAAmD;IAEnD,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACvD,OAAO;QACL,GAAG,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,CAAC;QACvC,GAAG,CAAC,MAAM,IAAI,IAAI,IAAI,EAAE,MAAM,EAAE,CAAC;QACjC,GAAG,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,SAAgB,+BAA+B,CAC7C,OAAmD;IAEnD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,OAAO;QACL,GAAG,CAAC,MAAM,IAAI,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,OAA+C,EAC/C,iBAA4C;IAE5C,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAC5D,MAAM,iBAAiB,GACrB,OA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