@code-pushup/nx-plugin 0.80.2 → 0.82.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 +3 -3
- package/src/executors/cli/README.md +3 -3
- package/src/executors/cli/executor.js +4 -3
- package/src/executors/cli/executor.js.map +1 -1
- package/src/executors/internal/config.d.ts +2 -1
- package/src/executors/internal/config.js +13 -8
- package/src/executors/internal/config.js.map +1 -1
- package/src/generators/configuration/generator.d.ts +0 -2
- package/src/generators/configuration/generator.js +1 -23
- package/src/generators/configuration/generator.js.map +1 -1
- package/src/generators/configuration/schema.json +0 -11
- package/src/plugin/target/configuration-target.d.ts +0 -1
- package/src/plugin/target/configuration-target.js +5 -7
- package/src/plugin/target/configuration-target.js.map +1 -1
- package/src/plugin/target/executor-target.js +6 -10
- package/src/plugin/target/executor-target.js.map +1 -1
- package/src/plugin/target/targets.js +0 -1
- package/src/plugin/target/targets.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/nx-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.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.82.0",
|
|
36
|
+
"@code-pushup/utils": "0.82.0",
|
|
37
37
|
"@nx/devkit": ">=17.0.0",
|
|
38
38
|
"ansis": "^3.3.0",
|
|
39
39
|
"nx": ">=17.0.0"
|
|
@@ -7,10 +7,10 @@ For details on the CLI command read the [CLI commands documentation](https://git
|
|
|
7
7
|
|
|
8
8
|
## Usage
|
|
9
9
|
|
|
10
|
-
Configure a target in your project
|
|
10
|
+
Configure a target in your `project.json`.
|
|
11
11
|
|
|
12
12
|
```jsonc
|
|
13
|
-
//
|
|
13
|
+
// {projectRoot}/project.json
|
|
14
14
|
{
|
|
15
15
|
"name": "my-project",
|
|
16
16
|
"targets": {
|
|
@@ -74,4 +74,4 @@ Show what will be executed without actually executing it:
|
|
|
74
74
|
| **dryRun** | `boolean` | To debug the executor, dry run the command without real execution. |
|
|
75
75
|
| **bin** | `string` | Path to Code PushUp CLI |
|
|
76
76
|
|
|
77
|
-
For all other options see the [CLI autorun documentation](../../../../cli/README.md#autorun-command).
|
|
77
|
+
For all other options, see the [CLI autorun documentation](../../../../cli/README.md#autorun-command).
|
|
@@ -10,10 +10,11 @@ async function runAutorunExecutor(terminalAndExecutorOptions, context) {
|
|
|
10
10
|
const normalizedContext = (0, context_js_1.normalizeContext)(context);
|
|
11
11
|
const mergedOptions = (0, utils_js_1.mergeExecutorOptions)(context.target?.options, terminalAndExecutorOptions);
|
|
12
12
|
const cliArgumentObject = (0, utils_js_1.parseAutorunExecutorOptions)(mergedOptions, normalizedContext);
|
|
13
|
-
const { dryRun, verbose, command } = mergedOptions;
|
|
13
|
+
const { dryRun, verbose, command, bin } = mergedOptions;
|
|
14
14
|
const commandString = (0, cli_js_1.createCliCommandString)({
|
|
15
15
|
command,
|
|
16
16
|
args: cliArgumentObject,
|
|
17
|
+
bin,
|
|
17
18
|
});
|
|
18
19
|
if (verbose) {
|
|
19
20
|
devkit_1.logger.info(`Run CLI executor ${command ?? ''}`);
|
|
@@ -25,7 +26,7 @@ async function runAutorunExecutor(terminalAndExecutorOptions, context) {
|
|
|
25
26
|
else {
|
|
26
27
|
try {
|
|
27
28
|
await (0, execute_process_js_1.executeProcess)({
|
|
28
|
-
...(0, cli_js_1.createCliCommandObject)({ command, args: cliArgumentObject }),
|
|
29
|
+
...(0, cli_js_1.createCliCommandObject)({ command, args: cliArgumentObject, bin }),
|
|
29
30
|
...(context.cwd ? { cwd: context.cwd } : {}),
|
|
30
31
|
});
|
|
31
32
|
}
|
|
@@ -34,7 +35,7 @@ async function runAutorunExecutor(terminalAndExecutorOptions, context) {
|
|
|
34
35
|
return {
|
|
35
36
|
success: false,
|
|
36
37
|
command: commandString,
|
|
37
|
-
error: error,
|
|
38
|
+
error: error instanceof Error ? error : new Error(`${error}`),
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../src/executors/cli/executor.ts"],"names":[],"mappings":";;AAgBA,
|
|
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,KAAK,UAAU,kBAAkB,CAC9C,0BAAyD,EACzD,OAAwB;IAExB,MAAM,iBAAiB,GAAG,IAAA,6BAAgB,EAAC,OAAO,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,IAAA,+BAAoB,EACxC,OAAO,CAAC,MAAM,EAAE,OAAO,EACvB,0BAA0B,CAC3B,CAAC;IACF,MAAM,iBAAiB,GAAG,IAAA,sCAA2B,EACnD,aAAa,EACb,iBAAiB,CAClB,CAAC;IACF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,aAAa,CAAC;IACxD,MAAM,aAAa,GAAG,IAAA,+BAAsB,EAAC;QAC3C,OAAO;QACP,IAAI,EAAE,iBAAiB;QACvB,GAAG;KACJ,CAAC,CAAC;IACH,IAAI,OAAO,EAAE,CAAC;QACZ,eAAM,CAAC,IAAI,CAAC,oBAAoB,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC;QACjD,eAAM,CAAC,IAAI,CAAC,YAAY,aAAa,EAAE,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,MAAM,EAAE,CAAC;QACX,eAAM,CAAC,IAAI,CAAC,wBAAwB,aAAa,EAAE,CAAC,CAAC;IACvD,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,MAAM,IAAA,mCAAc,EAAC;gBACnB,GAAG,IAAA,+BAAsB,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC;gBACpE,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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PersistConfig, UploadConfig } from '@code-pushup/models';
|
|
2
|
+
import type { NormalizedExecutorContext } from './context.js';
|
|
2
3
|
import type { BaseNormalizedExecutorContext, GlobalExecutorOptions, ProjectExecutorOnlyOptions } from './types.js';
|
|
3
4
|
export declare function globalConfig(options: Partial<GlobalExecutorOptions & Record<string, unknown>>, context: BaseNormalizedExecutorContext): GlobalExecutorOptions;
|
|
4
5
|
export declare function persistConfig(options: Partial<PersistConfig & ProjectExecutorOnlyOptions>, context: BaseNormalizedExecutorContext): Partial<PersistConfig>;
|
|
5
|
-
export declare function uploadConfig(options: Partial<UploadConfig & ProjectExecutorOnlyOptions>, context:
|
|
6
|
+
export declare function uploadConfig(options: Partial<UploadConfig & ProjectExecutorOnlyOptions>, context: NormalizedExecutorContext): Partial<UploadConfig>;
|
|
@@ -28,19 +28,24 @@ function persistConfig(options, context) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
function uploadConfig(options, context) {
|
|
31
|
-
const {
|
|
32
|
-
const { name: projectName } = projectConfig ?? {};
|
|
31
|
+
const { workspaceRoot, projectName } = context;
|
|
33
32
|
const { projectPrefix, server, apiKey, organization, project, timeout } = options;
|
|
34
33
|
const applyPrefix = workspaceRoot === '.';
|
|
35
34
|
const prefix = projectPrefix ? `${projectPrefix}-` : '';
|
|
35
|
+
const derivedProject = projectName && !project
|
|
36
|
+
? applyPrefix
|
|
37
|
+
? `${prefix}${projectName}`
|
|
38
|
+
: projectName
|
|
39
|
+
: project;
|
|
36
40
|
return {
|
|
37
|
-
...(projectName
|
|
38
|
-
? {
|
|
39
|
-
project: applyPrefix ? `${prefix}${projectName}` : projectName,
|
|
40
|
-
}
|
|
41
|
-
: {}),
|
|
42
41
|
...(0, env_js_1.parseEnv)(process.env),
|
|
43
|
-
...Object.fromEntries(Object.entries({
|
|
42
|
+
...Object.fromEntries(Object.entries({
|
|
43
|
+
server,
|
|
44
|
+
apiKey,
|
|
45
|
+
organization,
|
|
46
|
+
...(derivedProject ? { project: derivedProject } : {}),
|
|
47
|
+
timeout,
|
|
48
|
+
}).filter(([_, v]) => v !== undefined)),
|
|
44
49
|
};
|
|
45
50
|
}
|
|
46
51
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/executors/internal/config.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../src/executors/internal/config.ts"],"names":[],"mappings":";;AAUA,oCAaC;AAED,sCAkBC;AAED,oCA8BC;AA3ED,kCAAkC;AAGlC,qCAAoC;AAOpC,SAAgB,YAAY,CAC1B,OAAiE,EACjE,OAAsC;IAEtC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,aAAa,IAAI,EAAE,CAAC;IACvD,gEAAgE;IAChE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC9C,OAAO;QACL,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,uBAAuB,CAAC;KAClE,CAAC;AACJ,CAAC;AAED,SAAgB,aAAa,CAC3B,OAA4D,EAC5D,OAAsC;IAEtC,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAEjD,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,aAAa,IAAI,EAAE,CAAC;IACvD,MAAM,EACJ,MAAM,EACN,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,gDAAgD;IACnH,QAAQ,GACT,GAAG,OAAO,CAAC;IAEZ,OAAO;QACL,SAAS;QACT,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAC1B,OAA2D,EAC3D,OAAkC;IAElC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAE/C,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,GACrE,OAAO,CAAC;IACV,MAAM,WAAW,GAAG,aAAa,KAAK,GAAG,CAAC;IAC1C,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAExD,MAAM,cAAc,GAClB,WAAW,IAAI,CAAC,OAAO;QACrB,CAAC,CAAC,WAAW;YACX,CAAC,CAAC,GAAG,MAAM,GAAG,WAAW,EAAE;YAC3B,CAAC,CAAC,WAAW;QACf,CAAC,CAAC,OAAO,CAAC;IAEd,OAAO;QACL,GAAG,IAAA,iBAAQ,EAAC,OAAO,CAAC,GAAG,CAAC;QACxB,GAAG,MAAM,CAAC,WAAW,CACnB,MAAM,CAAC,OAAO,CAAC;YACb,MAAM;YACN,MAAM;YACN,YAAY;YACZ,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACtD,OAAO;SACR,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CACvC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type Tree } from '@nx/devkit';
|
|
2
|
-
import type { ProjectConfiguration } from 'nx/src/config/workspace-json-project-json';
|
|
3
2
|
import type { ConfigurationGeneratorOptions } from './schema.js';
|
|
4
3
|
export declare function configurationGenerator(tree: Tree, options: ConfigurationGeneratorOptions): Promise<void>;
|
|
5
|
-
export declare function addTargetToProject(tree: Tree, projectConfiguration: ProjectConfiguration, options: ConfigurationGeneratorOptions): void;
|
|
6
4
|
export default configurationGenerator;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.configurationGenerator = configurationGenerator;
|
|
4
|
-
exports.addTargetToProject = addTargetToProject;
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const constants_js_1 = require("../../internal/constants.js");
|
|
7
5
|
const code_pushup_config_js_1 = require("./code-pushup-config.js");
|
|
8
6
|
async function configurationGenerator(tree, options) {
|
|
9
7
|
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
10
|
-
const { skipConfig,
|
|
8
|
+
const { skipConfig, skipFormat } = options;
|
|
11
9
|
if (skipConfig === true) {
|
|
12
10
|
devkit_1.logger.info('Skip config file creation');
|
|
13
11
|
}
|
|
14
12
|
else {
|
|
15
13
|
(0, code_pushup_config_js_1.generateCodePushupConfig)(tree, projectConfiguration.root);
|
|
16
14
|
}
|
|
17
|
-
if (skipTarget === true) {
|
|
18
|
-
devkit_1.logger.info('Skip adding target to project');
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
addTargetToProject(tree, projectConfiguration, options);
|
|
22
|
-
}
|
|
23
15
|
if (skipFormat === true) {
|
|
24
16
|
devkit_1.logger.info('Skip formatting files');
|
|
25
17
|
}
|
|
@@ -27,19 +19,5 @@ async function configurationGenerator(tree, options) {
|
|
|
27
19
|
await (0, devkit_1.formatFiles)(tree);
|
|
28
20
|
}
|
|
29
21
|
}
|
|
30
|
-
function addTargetToProject(tree, projectConfiguration, options) {
|
|
31
|
-
const { targets } = projectConfiguration;
|
|
32
|
-
const { targetName, project } = options;
|
|
33
|
-
const codePushupTargetConfig = {
|
|
34
|
-
executor: `${constants_js_1.PACKAGE_NAME}:cli`,
|
|
35
|
-
};
|
|
36
|
-
(0, devkit_1.updateProjectConfiguration)(tree, project, {
|
|
37
|
-
...projectConfiguration,
|
|
38
|
-
targets: {
|
|
39
|
-
...targets,
|
|
40
|
-
[targetName ?? constants_js_1.DEFAULT_TARGET_NAME]: codePushupTargetConfig,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
22
|
exports.default = configurationGenerator;
|
|
45
23
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/generators/configuration/generator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../src/generators/configuration/generator.ts"],"names":[],"mappings":";;AASA,wDAmBC;AA5BD,uCAKoB;AACpB,mEAAmE;AAG5D,KAAK,UAAU,sBAAsB,CAC1C,IAAU,EACV,OAAsC;IAEtC,MAAM,oBAAoB,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7E,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAE3C,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,eAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IAC3C,CAAC;SAAM,CAAC;QACN,IAAA,gDAAwB,EAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAED,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;QACxB,eAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACvC,CAAC;SAAM,CAAC;QACN,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,kBAAe,sBAAsB,CAAC"}
|
|
@@ -15,21 +15,10 @@
|
|
|
15
15
|
"index": 0
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"targetName": {
|
|
19
|
-
"type": "string",
|
|
20
|
-
"description": "The name of the target.",
|
|
21
|
-
"x-prompt": "Which name should the target get? default is code-pushup.",
|
|
22
|
-
"default": "code-pushup"
|
|
23
|
-
},
|
|
24
18
|
"bin": {
|
|
25
19
|
"type": "string",
|
|
26
20
|
"description": "Path to Code PushUp CLI"
|
|
27
21
|
},
|
|
28
|
-
"skipTarget": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"description": "Skip adding the target to project.json.",
|
|
31
|
-
"$default": "false"
|
|
32
|
-
},
|
|
33
22
|
"skipConfig": {
|
|
34
23
|
"type": "boolean",
|
|
35
24
|
"description": "Skip adding the code-pushup.config.ts to the project root.",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TargetConfiguration } from '@nx/devkit';
|
|
2
2
|
import type { RunCommandsOptions } from 'nx/src/executors/run-commands/run-commands.impl';
|
|
3
3
|
export declare function createConfigurationTarget(options?: {
|
|
4
|
-
targetName?: string;
|
|
5
4
|
projectName?: string;
|
|
6
5
|
bin?: string;
|
|
7
6
|
}): TargetConfiguration<RunCommandsOptions>;
|
|
@@ -3,15 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createConfigurationTarget = createConfigurationTarget;
|
|
4
4
|
const cli_js_1 = require("../../executors/internal/cli.js");
|
|
5
5
|
const constants_js_1 = require("../../internal/constants.js");
|
|
6
|
-
const constants_js_2 = require("../constants.js");
|
|
7
6
|
function createConfigurationTarget(options) {
|
|
8
|
-
const { projectName, bin = constants_js_1.PACKAGE_NAME
|
|
7
|
+
const { projectName, bin = constants_js_1.PACKAGE_NAME } = options ?? {};
|
|
8
|
+
const args = (0, cli_js_1.objectToCliArgs)({
|
|
9
|
+
...(projectName ? { project: projectName } : {}),
|
|
10
|
+
});
|
|
9
11
|
return {
|
|
10
|
-
command: `nx g ${bin}:configuration ${(
|
|
11
|
-
skipTarget: true,
|
|
12
|
-
targetName,
|
|
13
|
-
...(projectName ? { project: projectName } : {}),
|
|
14
|
-
}).join(' ')}`,
|
|
12
|
+
command: `nx g ${bin}:configuration${args.length > 0 ? ` ${args.join(' ')}` : ''}`,
|
|
15
13
|
};
|
|
16
14
|
}
|
|
17
15
|
//# sourceMappingURL=configuration-target.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-target.js","sourceRoot":"","sources":["../../../../src/plugin/target/configuration-target.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"configuration-target.js","sourceRoot":"","sources":["../../../../src/plugin/target/configuration-target.ts"],"names":[],"mappings":";;AAKA,8DAWC;AAdD,4DAAkE;AAClE,8DAA2D;AAE3D,SAAgB,yBAAyB,CAAC,OAGzC;IACC,MAAM,EAAE,WAAW,EAAE,GAAG,GAAG,2BAAY,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAA,wBAAe,EAAC;QAC3B,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjD,CAAC,CAAC;IACH,OAAO;QACL,OAAO,EAAE,QAAQ,GAAG,iBAAiB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;KACnF,CAAC;AACJ,CAAC"}
|
|
@@ -3,16 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createExecutorTarget = createExecutorTarget;
|
|
4
4
|
const constants_js_1 = require("../../internal/constants.js");
|
|
5
5
|
function createExecutorTarget(options) {
|
|
6
|
-
const { bin
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
...(
|
|
10
|
-
|
|
11
|
-
options: {
|
|
12
|
-
projectPrefix,
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
: {}),
|
|
6
|
+
const { bin, projectPrefix } = options ?? {};
|
|
7
|
+
const executor = `${constants_js_1.PACKAGE_NAME}:cli`;
|
|
8
|
+
const executorOptions = (bin || projectPrefix) && {
|
|
9
|
+
...(bin && { bin }),
|
|
10
|
+
...(projectPrefix && { projectPrefix }),
|
|
16
11
|
};
|
|
12
|
+
return { executor, ...(executorOptions && { options: executorOptions }) };
|
|
17
13
|
}
|
|
18
14
|
//# sourceMappingURL=executor-target.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor-target.js","sourceRoot":"","sources":["../../../../src/plugin/target/executor-target.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"executor-target.js","sourceRoot":"","sources":["../../../../src/plugin/target/executor-target.ts"],"names":[],"mappings":";;AAIA,oDAYC;AAfD,8DAA2D;AAG3D,SAAgB,oBAAoB,CAAC,OAGpC;IACC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IAE7C,MAAM,QAAQ,GAAG,GAAG,2BAAY,MAAM,CAAC;IACvC,MAAM,eAAe,GAAG,CAAC,GAAG,IAAI,aAAa,CAAC,IAAI;QAChD,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,CAAC;QACnB,GAAG,CAAC,aAAa,IAAI,EAAE,aAAa,EAAE,CAAC;KACxC,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,eAAe,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;AAC5E,CAAC"}
|
|
@@ -16,7 +16,6 @@ async function createTargets(normalizedContext) {
|
|
|
16
16
|
: // if NO code-pushup.config.*.(ts|js|mjs) is present return configuration target
|
|
17
17
|
{
|
|
18
18
|
[`${targetName}--configuration`]: (0, configuration_target_js_1.createConfigurationTarget)({
|
|
19
|
-
targetName,
|
|
20
19
|
projectName: normalizedContext.projectJson.name,
|
|
21
20
|
bin,
|
|
22
21
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"targets.js","sourceRoot":"","sources":["../../../../src/plugin/target/targets.ts"],"names":[],"mappings":";;AAgBA,
|
|
1
|
+
{"version":3,"file":"targets.js","sourceRoot":"","sources":["../../../../src/plugin/target/targets.ts"],"names":[],"mappings":";;AAgBA,sCAkBC;AAlCD,+CAA2C;AAC3C,kDAAiD;AAKjD,uEAAsE;AACtE,iDAA0D;AAC1D,6DAA4D;AAQrD,KAAK,UAAU,aAAa,CAAC,iBAAuC;IACzE,MAAM,EACJ,UAAU,GAAG,6BAAc,EAC3B,GAAG,EACH,aAAa,GACd,GAAG,iBAAiB,CAAC,aAAa,CAAC;IACpC,MAAM,SAAS,GAAG,MAAM,IAAA,kBAAO,EAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC/D,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,uCAAwB,CAAC,CAAC;QACzE,CAAC,CAAC;YACE,CAAC,UAAU,CAAC,EAAE,IAAA,yCAAoB,EAAC,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;SAC3D;QACH,CAAC,CAAC,gFAAgF;YAChF;gBACE,CAAC,GAAG,UAAU,iBAAiB,CAAC,EAAE,IAAA,mDAAyB,EAAC;oBAC1D,WAAW,EAAE,iBAAiB,CAAC,WAAW,CAAC,IAAI;oBAC/C,GAAG;iBACJ,CAAC;aACH,CAAC;AACR,CAAC"}
|