@code-pushup/nx-plugin 0.100.0 → 0.100.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/package.json +3 -3
- package/src/index.d.ts +1 -2
- package/src/index.js +1 -4
- package/src/index.js.map +1 -1
- package/src/plugin/index.d.ts +1 -1
- package/src/plugin/index.js +1 -2
- package/src/plugin/index.js.map +1 -1
- package/src/plugin/plugin.d.ts +1 -5
- package/src/plugin/plugin.js +1 -21
- package/src/plugin/plugin.js.map +1 -1
- package/src/plugin/types.d.ts +1 -2
- package/src/plugin/utils.d.ts +2 -3
- package/src/plugin/utils.js +0 -20
- package/src/plugin/utils.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-pushup/nx-plugin",
|
|
3
|
-
"version": "0.100.
|
|
3
|
+
"version": "0.100.1",
|
|
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.100.
|
|
36
|
-
"@code-pushup/utils": "0.100.
|
|
35
|
+
"@code-pushup/models": "0.100.1",
|
|
36
|
+
"@code-pushup/utils": "0.100.1",
|
|
37
37
|
"@nx/devkit": ">=17.0.0",
|
|
38
38
|
"nx": ">=17.0.0"
|
|
39
39
|
},
|
package/src/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare const plugin: {
|
|
2
2
|
name: string;
|
|
3
3
|
createNodesV2: import("@nx/devkit").CreateNodesV2<import("./plugin/types.js").CreateNodesOptions>;
|
|
4
|
-
createNodes: import("@nx/devkit").CreateNodes;
|
|
5
4
|
};
|
|
6
5
|
export default plugin;
|
|
7
6
|
export type { CliCommandExecutorOptions } from './executors/cli/schema.js';
|
|
@@ -11,4 +10,4 @@ export type { ConfigurationGeneratorOptions } from './generators/configuration/s
|
|
|
11
10
|
export { initGenerator, initSchematic } from './generators/init/generator.js';
|
|
12
11
|
export { type InitGeneratorSchema } from './generators/init/schema.js';
|
|
13
12
|
export * from './internal/versions.js';
|
|
14
|
-
export {
|
|
13
|
+
export { createNodesV2 } from './plugin/index.js';
|
package/src/index.js
CHANGED
|
@@ -14,15 +14,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createNodesV2 = exports.
|
|
17
|
+
exports.createNodesV2 = exports.initSchematic = exports.initGenerator = exports.configurationGenerator = exports.generateCodePushupConfig = void 0;
|
|
18
18
|
const constants_js_1 = require("./plugin/constants.js");
|
|
19
19
|
const index_js_1 = require("./plugin/index.js");
|
|
20
20
|
// default export for nx.json#plugins
|
|
21
21
|
const plugin = {
|
|
22
22
|
name: constants_js_1.PLUGIN_NAME,
|
|
23
23
|
createNodesV2: index_js_1.createNodesV2,
|
|
24
|
-
// Keep for backwards compatibility with Nx < 21
|
|
25
|
-
createNodes: index_js_1.createNodes,
|
|
26
24
|
};
|
|
27
25
|
exports.default = plugin;
|
|
28
26
|
var code_pushup_config_js_1 = require("./generators/configuration/code-pushup-config.js");
|
|
@@ -34,6 +32,5 @@ Object.defineProperty(exports, "initGenerator", { enumerable: true, get: functio
|
|
|
34
32
|
Object.defineProperty(exports, "initSchematic", { enumerable: true, get: function () { return generator_js_2.initSchematic; } });
|
|
35
33
|
__exportStar(require("./internal/versions.js"), exports);
|
|
36
34
|
var index_js_2 = require("./plugin/index.js");
|
|
37
|
-
Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return index_js_2.createNodes; } });
|
|
38
35
|
Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return index_js_2.createNodesV2; } });
|
|
39
36
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wDAAoD;AACpD,gDAAkD;AAElD,qCAAqC;AACrC,MAAM,MAAM,GAAG;IACb,IAAI,EAAE,0BAAW;IACjB,aAAa,EAAb,wBAAa;CACd,CAAC;AAEF,kBAAe,MAAM,CAAC;AAGtB,0FAA4F;AAAnF,iIAAA,wBAAwB,OAAA;AACjC,wEAAiF;AAAxE,sHAAA,sBAAsB,OAAA;AAE/B,+DAA8E;AAArE,6GAAA,aAAa,OAAA;AAAE,6GAAA,aAAa,OAAA;AAErC,yDAAuC;AACvC,8CAAkD;AAAzC,yGAAA,aAAa,OAAA"}
|
package/src/plugin/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createNodesV2 } from './plugin.js';
|
|
2
2
|
export type { CreateNodesOptions } from './types.js';
|
package/src/plugin/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNodesV2 =
|
|
3
|
+
exports.createNodesV2 = void 0;
|
|
4
4
|
var plugin_js_1 = require("./plugin.js");
|
|
5
|
-
Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_js_1.createNodes; } });
|
|
6
5
|
Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return plugin_js_1.createNodesV2; } });
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
package/src/plugin/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugin/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugin/index.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAAnC,0GAAA,aAAa,OAAA"}
|
package/src/plugin/plugin.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateNodesV2 } from '@nx/devkit';
|
|
2
2
|
import type { CreateNodesOptions } from './types.js';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated
|
|
5
|
-
*/
|
|
6
|
-
export declare const createNodes: CreateNodes;
|
|
7
3
|
export declare const createNodesV2: CreateNodesV2<CreateNodesOptions>;
|
package/src/plugin/plugin.js
CHANGED
|
@@ -1,30 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNodesV2 =
|
|
3
|
+
exports.createNodesV2 = void 0;
|
|
4
4
|
const constants_js_1 = require("../internal/constants.js");
|
|
5
5
|
const constants_js_2 = require("./constants.js");
|
|
6
6
|
const targets_js_1 = require("./target/targets.js");
|
|
7
7
|
const utils_js_1 = require("./utils.js");
|
|
8
|
-
// name has to be "createNodes" to get picked up by Nx <v20
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated
|
|
11
|
-
*/
|
|
12
|
-
exports.createNodes = [
|
|
13
|
-
`**/${constants_js_1.PROJECT_JSON_FILE_NAME}`,
|
|
14
|
-
async (projectConfigurationFile, createNodesOptions, context) => {
|
|
15
|
-
const parsedCreateNodesOptions = createNodesOptions;
|
|
16
|
-
const pluginsConfig = context.nxJsonConfiguration.pluginsConfig?.[constants_js_2.PLUGIN_NAME] ?? {};
|
|
17
|
-
const mergedOptions = { ...pluginsConfig, ...parsedCreateNodesOptions };
|
|
18
|
-
const normalizedContext = await (0, utils_js_1.normalizedCreateNodesContext)(context, projectConfigurationFile, mergedOptions);
|
|
19
|
-
return {
|
|
20
|
-
projects: {
|
|
21
|
-
[normalizedContext.projectRoot]: {
|
|
22
|
-
targets: await (0, targets_js_1.createTargets)(normalizedContext),
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
8
|
exports.createNodesV2 = [
|
|
29
9
|
`**/${constants_js_1.PROJECT_JSON_FILE_NAME}`,
|
|
30
10
|
async (projectConfigurationFiles, createNodesOptions, context) => {
|
package/src/plugin/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/plugin/plugin.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/plugin/plugin.ts"],"names":[],"mappings":";;;AAMA,2DAAkE;AAClE,iDAA6C;AAC7C,oDAAoD;AAEpD,yCAA4D;AAE/C,QAAA,aAAa,GAAsC;IAC9D,MAAM,qCAAsB,EAAE;IAC9B,KAAK,EACH,yBAA4C,EAC5C,kBAA2B,EAC3B,OAA6B,EACC,EAAE;QAChC,MAAM,wBAAwB,GAAG,kBAAwC,CAAC;QAC1E,MAAM,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAC3D,MAAM,gBAAgB,GAAG,aAAa,CAAC,0BAAW,CAAC,IAAI,EAAE,CAAC;QAC1D,MAAM,aAAa,GAAG,EAAE,GAAG,gBAAgB,EAAE,GAAG,wBAAwB,EAAE,CAAC;QAE3E,OAAO,MAAM,OAAO,CAAC,GAAG,CACtB,yBAAyB,CAAC,GAAG,CAAC,KAAK,EAAC,wBAAwB,EAAC,EAAE;YAC7D,MAAM,iBAAiB,GAAG,MAAM,IAAA,yCAA8B,EAC5D,OAAO,EACP,wBAAwB,EACxB,aAAa,CACd,CAAC;YAEF,MAAM,MAAM,GAAsB;gBAChC,QAAQ,EAAE;oBACR,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;wBAC/B,OAAO,EAAE,MAAM,IAAA,0BAAa,EAAC,iBAAiB,CAAC;qBAChD;iBACF;aACF,CAAC;YAEF,OAAO,CAAC,wBAAwB,EAAE,MAAM,CAAU,CAAC;QACrD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
|
package/src/plugin/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateNodesContextV2, ProjectConfiguration } from '@nx/devkit';
|
|
2
2
|
import type { WithRequired } from '@code-pushup/utils';
|
|
3
3
|
import type { DynamicTargetOptions } from '../internal/types.js';
|
|
4
4
|
import type { CreateTargetsOptions } from './target/targets.js';
|
|
@@ -7,5 +7,4 @@ export type ProjectPrefixOptions = {
|
|
|
7
7
|
};
|
|
8
8
|
export type CreateNodesOptions = DynamicTargetOptions & ProjectPrefixOptions;
|
|
9
9
|
export type ProjectConfigurationWithName = WithRequired<ProjectConfiguration, 'name'>;
|
|
10
|
-
export type NormalizedCreateNodesContext = CreateNodesContext & CreateTargetsOptions;
|
|
11
10
|
export type NormalizedCreateNodesV2Context = CreateNodesContextV2 & CreateTargetsOptions;
|
package/src/plugin/utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CreateNodesOptions,
|
|
3
|
-
export declare function normalizedCreateNodesContext(context: CreateNodesContext, projectConfigurationFile: string, createOptions?: CreateNodesOptions): Promise<NormalizedCreateNodesContext>;
|
|
1
|
+
import type { CreateNodesContextV2 } from '@nx/devkit';
|
|
2
|
+
import type { CreateNodesOptions, NormalizedCreateNodesV2Context } from './types.js';
|
|
4
3
|
export declare function normalizedCreateNodesV2Context(context: CreateNodesContextV2, projectConfigurationFile: string, createOptions?: CreateNodesOptions): Promise<NormalizedCreateNodesV2Context>;
|
package/src/plugin/utils.js
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.normalizedCreateNodesContext = normalizedCreateNodesContext;
|
|
4
3
|
exports.normalizedCreateNodesV2Context = normalizedCreateNodesV2Context;
|
|
5
4
|
const promises_1 = require("node:fs/promises");
|
|
6
5
|
const path = require("node:path");
|
|
7
6
|
const constants_js_1 = require("./constants.js");
|
|
8
|
-
async function normalizedCreateNodesContext(context, projectConfigurationFile, createOptions = {}) {
|
|
9
|
-
const projectRoot = path.dirname(projectConfigurationFile);
|
|
10
|
-
try {
|
|
11
|
-
const projectJson = JSON.parse((await (0, promises_1.readFile)(projectConfigurationFile)).toString());
|
|
12
|
-
const { targetName = constants_js_1.CP_TARGET_NAME } = createOptions;
|
|
13
|
-
return {
|
|
14
|
-
...context,
|
|
15
|
-
projectJson,
|
|
16
|
-
projectRoot,
|
|
17
|
-
createOptions: {
|
|
18
|
-
...createOptions,
|
|
19
|
-
targetName,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
throw new Error(`Error parsing project.json file ${projectConfigurationFile}.`);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
7
|
async function normalizedCreateNodesV2Context(context, projectConfigurationFile, createOptions = {}) {
|
|
28
8
|
const projectRoot = path.dirname(projectConfigurationFile);
|
|
29
9
|
try {
|
package/src/plugin/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/plugin/utils.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/plugin/utils.ts"],"names":[],"mappings":";;AAUA,wEAwBC;AAjCD,+CAA4C;AAC5C,kCAAkC;AAClC,iDAAgD;AAOzC,KAAK,UAAU,8BAA8B,CAClD,OAA6B,EAC7B,wBAAgC,EAChC,gBAAoC,EAAE;IAEtC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAE3D,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,CAAC,MAAM,IAAA,mBAAQ,EAAC,wBAAwB,CAAC,CAAC,CAAC,QAAQ,EAAE,CACtB,CAAC;QAElC,MAAM,EAAE,UAAU,GAAG,6BAAc,EAAE,GAAG,aAAa,CAAC;QACtD,OAAO;YACL,GAAG,OAAO;YACV,WAAW;YACX,WAAW;YACX,aAAa,EAAE,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE;SAChD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,mCAAmC,wBAAwB,GAAG,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC"}
|