@powerlines/nx 0.11.294 → 0.11.296
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/dist/src/_virtual/_rolldown/runtime.js +29 -0
- package/dist/src/base/base-executor.d.mts +28 -2
- package/dist/src/base/base-executor.d.mts.map +1 -0
- package/dist/src/base/base-executor.d.ts +28 -2
- package/dist/src/base/base-executor.d.ts.map +1 -0
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.untyped.d.mts +7 -2
- package/dist/src/base/base-executor.untyped.d.mts.map +1 -0
- package/dist/src/base/base-executor.untyped.d.ts +6 -2
- package/dist/src/base/base-executor.untyped.d.ts.map +1 -0
- package/dist/src/base/base-executor.untyped.js +1 -1
- package/dist/src/base/index.d.mts +1 -1
- package/dist/src/base/index.d.ts +1 -1
- package/dist/src/base-executor-BOTlYnaD.d.mts +163 -0
- package/dist/src/base-executor-BOTlYnaD.d.mts.map +1 -0
- package/dist/src/base-executor-DH33Fd1U.js +79 -0
- package/dist/src/base-executor-N_ZgvzpA.d.ts +163 -0
- package/dist/src/base-executor-N_ZgvzpA.d.ts.map +1 -0
- package/dist/src/base-executor-dn4QVqZ4.mjs +72 -0
- package/dist/src/base-executor-dn4QVqZ4.mjs.map +1 -0
- package/dist/src/base-executor.untyped-CWwiE6fo.mjs +162 -0
- package/dist/src/base-executor.untyped-CWwiE6fo.mjs.map +1 -0
- package/dist/src/base-executor.untyped-DwcuTgJP.js +167 -0
- package/dist/src/executors/build/executor.d.mts +2 -2
- package/dist/src/executors/build/executor.d.ts +1 -1
- package/dist/src/executors/build/executor.js +2 -2
- package/dist/src/executors/build/executor.mjs +1 -1
- package/dist/src/executors/build/untyped.js +1 -0
- package/dist/src/executors/build/untyped.mjs +1 -0
- package/dist/src/executors/build/untyped.mjs.map +1 -1
- package/dist/src/executors/clean/executor.d.mts +2 -2
- package/dist/src/executors/clean/executor.d.ts +1 -1
- package/dist/src/executors/clean/executor.js +2 -2
- package/dist/src/executors/clean/executor.mjs +1 -1
- package/dist/src/executors/clean/untyped.js +2 -2
- package/dist/src/executors/clean/untyped.mjs +1 -1
- package/dist/src/executors/docs/executor.d.mts +2 -2
- package/dist/src/executors/docs/executor.d.ts +1 -1
- package/dist/src/executors/docs/executor.js +2 -2
- package/dist/src/executors/docs/executor.mjs +1 -1
- package/dist/src/executors/docs/untyped.js +1 -0
- package/dist/src/executors/docs/untyped.mjs +1 -0
- package/dist/src/executors/docs/untyped.mjs.map +1 -1
- package/dist/src/executors/lint/executor.d.mts +2 -2
- package/dist/src/executors/lint/executor.d.ts +1 -1
- package/dist/src/executors/lint/executor.js +2 -2
- package/dist/src/executors/lint/executor.mjs +1 -1
- package/dist/src/executors/lint/untyped.js +1 -0
- package/dist/src/executors/lint/untyped.mjs +1 -0
- package/dist/src/executors/lint/untyped.mjs.map +1 -1
- package/dist/src/executors/prepare/executor.d.mts +2 -2
- package/dist/src/executors/prepare/executor.d.ts +1 -1
- package/dist/src/executors/prepare/executor.js +2 -2
- package/dist/src/executors/prepare/executor.mjs +1 -1
- package/dist/src/executors/prepare/untyped.js +2 -2
- package/dist/src/executors/prepare/untyped.mjs +1 -1
- package/dist/src/helpers/constants.d.mts +8 -2
- package/dist/src/helpers/constants.d.mts.map +1 -0
- package/dist/src/helpers/constants.d.ts +8 -2
- package/dist/src/helpers/constants.d.ts.map +1 -0
- package/dist/src/helpers/index.d.mts +2 -2
- package/dist/src/helpers/index.d.ts +2 -2
- package/dist/src/helpers/plugin-utilities.d.mts +57 -2
- package/dist/src/helpers/plugin-utilities.d.mts.map +1 -0
- package/dist/src/helpers/plugin-utilities.d.ts +57 -2
- package/dist/src/helpers/plugin-utilities.d.ts.map +1 -0
- package/dist/src/helpers/plugin-utilities.js +2 -2
- package/dist/src/helpers/plugin-utilities.mjs +2 -2
- package/dist/src/helpers/plugin-utilities.mjs.map +1 -1
- package/dist/src/index.d.mts +4 -4
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +0 -1
- package/dist/src/index.mjs +0 -1
- package/dist/src/plugin/index.d.mts +241 -1
- package/dist/src/plugin/index.d.mts.map +1 -1
- package/dist/src/plugin/index.d.ts +241 -1
- package/dist/src/plugin/index.d.ts.map +1 -1
- package/dist/src/plugin/index.js +296 -2
- package/dist/src/plugin/index.mjs +293 -1
- package/dist/src/plugin/index.mjs.map +1 -1
- package/dist/src/types/index.d.mts +1 -1
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/types/plugin.d.mts +243 -2
- package/dist/src/types/plugin.d.mts.map +1 -0
- package/dist/src/types/plugin.d.ts +243 -2
- package/dist/src/types/plugin.d.ts.map +1 -0
- package/package.json +13 -13
- package/dist/src/base-executor-Bj63x9OE.d.ts +0 -28
- package/dist/src/base-executor-Bj63x9OE.d.ts.map +0 -1
- package/dist/src/base-executor-D6POztG2.d.mts +0 -28
- package/dist/src/base-executor-D6POztG2.d.mts.map +0 -1
- package/dist/src/base-executor.untyped-D4R6pki2.d.ts +0 -7
- package/dist/src/base-executor.untyped-D4R6pki2.d.ts.map +0 -1
- package/dist/src/base-executor.untyped-hmlG6oyC.d.mts +0 -7
- package/dist/src/base-executor.untyped-hmlG6oyC.d.mts.map +0 -1
- package/dist/src/constants-CbG11Mby.d.ts +0 -8
- package/dist/src/constants-CbG11Mby.d.ts.map +0 -1
- package/dist/src/constants-VDvVnoLC.d.mts +0 -8
- package/dist/src/constants-VDvVnoLC.d.mts.map +0 -1
- package/dist/src/plugin-B_ZGdX7U.d.mts +0 -243
- package/dist/src/plugin-B_ZGdX7U.d.mts.map +0 -1
- package/dist/src/plugin-DpyutMl2.d.ts +0 -243
- package/dist/src/plugin-DpyutMl2.d.ts.map +0 -1
- package/dist/src/plugin-utilities-Cg-Ccp4C.d.mts +0 -57
- package/dist/src/plugin-utilities-Cg-Ccp4C.d.mts.map +0 -1
- package/dist/src/plugin-utilities-CmfuC3TZ.d.ts +0 -57
- package/dist/src/plugin-utilities-CmfuC3TZ.d.ts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('../../chunk-BE-pF4vm.js');
|
|
2
|
-
const
|
|
2
|
+
const require_base_executor_untyped = require('../../base-executor.untyped-DwcuTgJP.js');
|
|
3
3
|
let untyped = require("untyped");
|
|
4
4
|
|
|
5
5
|
//#region src/executors/prepare/untyped.ts
|
|
6
6
|
var untyped_default = (0, untyped.defineUntypedSchema)({
|
|
7
|
-
...
|
|
7
|
+
...require_base_executor_untyped.base_executor_untyped_default,
|
|
8
8
|
$schema: {
|
|
9
9
|
id: "PrepareExecutorSchema",
|
|
10
10
|
title: "Prepare Executor",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import base_executor_untyped_default from "../../base
|
|
1
|
+
import { t as base_executor_untyped_default } from "../../base-executor.untyped-CWwiE6fo.mjs";
|
|
2
2
|
import { defineUntypedSchema } from "untyped";
|
|
3
3
|
|
|
4
4
|
//#region src/executors/prepare/untyped.ts
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/helpers/constants.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A list of Nx input strings that describe the Powerlines configuration file
|
|
4
|
+
*/
|
|
5
|
+
declare const CONFIG_INPUTS: readonly ["{projectRoot}/{framework}.json", "{projectRoot}/{framework}.*.json", "{projectRoot}/{framework}.jsonc", "{projectRoot}/{framework}.*.jsonc", "{projectRoot}/{framework}.json5", "{projectRoot}/{framework}.*.json5", "{projectRoot}/{framework}.yaml", "{projectRoot}/{framework}.*.yaml", "{projectRoot}/{framework}.yml", "{projectRoot}/{framework}.*.yml", "{projectRoot}/{framework}.toml", "{projectRoot}/{framework}.*.toml", "{projectRoot}/{framework}.config.js", "{projectRoot}/{framework}.*.config.js", "{projectRoot}/{framework}.config.cjs", "{projectRoot}/{framework}.*.config.cjs", "{projectRoot}/{framework}.config.mjs", "{projectRoot}/{framework}.*.config.mjs", "{projectRoot}/{framework}.config.ts", "{projectRoot}/{framework}.*.config.ts", "{projectRoot}/{framework}.config.cts", "{projectRoot}/{framework}.*.config.cts", "{projectRoot}/{framework}.config.mts", "{projectRoot}/{framework}.*.config.mts"];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { CONFIG_INPUTS };
|
|
8
|
+
//# sourceMappingURL=constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.mts","names":[],"sources":["../../../src/helpers/constants.ts"],"mappings":";;AAqBA;;cAAa,aAAA"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/helpers/constants.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* A list of Nx input strings that describe the Powerlines configuration file
|
|
4
|
+
*/
|
|
5
|
+
declare const CONFIG_INPUTS: readonly ["{projectRoot}/{framework}.json", "{projectRoot}/{framework}.*.json", "{projectRoot}/{framework}.jsonc", "{projectRoot}/{framework}.*.jsonc", "{projectRoot}/{framework}.json5", "{projectRoot}/{framework}.*.json5", "{projectRoot}/{framework}.yaml", "{projectRoot}/{framework}.*.yaml", "{projectRoot}/{framework}.yml", "{projectRoot}/{framework}.*.yml", "{projectRoot}/{framework}.toml", "{projectRoot}/{framework}.*.toml", "{projectRoot}/{framework}.config.js", "{projectRoot}/{framework}.*.config.js", "{projectRoot}/{framework}.config.cjs", "{projectRoot}/{framework}.*.config.cjs", "{projectRoot}/{framework}.config.mjs", "{projectRoot}/{framework}.*.config.mjs", "{projectRoot}/{framework}.config.ts", "{projectRoot}/{framework}.*.config.ts", "{projectRoot}/{framework}.config.cts", "{projectRoot}/{framework}.*.config.cts", "{projectRoot}/{framework}.config.mts", "{projectRoot}/{framework}.*.config.mts"];
|
|
6
|
+
//#endregion
|
|
7
|
+
export { CONFIG_INPUTS };
|
|
8
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","names":[],"sources":["../../../src/helpers/constants.ts"],"mappings":";;AAqBA;;cAAa,aAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CONFIG_INPUTS } from "./constants.mjs";
|
|
2
|
+
import { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./plugin-utilities.mjs";
|
|
3
3
|
export { CONFIG_INPUTS, CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CONFIG_INPUTS } from "./constants.js";
|
|
2
|
+
import { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./plugin-utilities.js";
|
|
3
3
|
export { CONFIG_INPUTS, CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
|
|
@@ -1,2 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { NxPluginOptions } from "../types/plugin.mjs";
|
|
2
|
+
import { CreateNodesV2 } from "@nx/devkit";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/plugin-utilities.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
7
|
+
*
|
|
8
|
+
* @param framework - The framework name to use in the input strings
|
|
9
|
+
* @returns An array of Nx input strings for the configuration file
|
|
10
|
+
*/
|
|
11
|
+
declare function getNxTargetInputs(framework: string): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
14
|
+
*
|
|
15
|
+
* @param framework - The framework name to use in the input strings
|
|
16
|
+
* @returns An array of Nx input strings for the configuration file
|
|
17
|
+
*/
|
|
18
|
+
declare function getNxPluginInputs(framework: string): string;
|
|
19
|
+
interface CreateNxPluginOptions {
|
|
20
|
+
/**
|
|
21
|
+
* The name of the Nx plugin to create
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* This will be used in logging and project tagging.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue "\{framework\}/plugin/nx"
|
|
27
|
+
*/
|
|
28
|
+
name?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The folder where the generated runtime artifacts will be located
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
36
|
+
*/
|
|
37
|
+
artifactsFolder?: string;
|
|
38
|
+
/**
|
|
39
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
|
|
43
|
+
*
|
|
44
|
+
* @defaultValue "powerlines"
|
|
45
|
+
*/
|
|
46
|
+
framework?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates an Nx plugin that integrates Powerlines into the Nx build process.
|
|
50
|
+
*
|
|
51
|
+
* @param opts - Options for creating the Nx plugin
|
|
52
|
+
* @returns A CreateNodesV2 function that can be used as an Nx plugin
|
|
53
|
+
*/
|
|
54
|
+
declare function createNxPlugin<TOptions extends NxPluginOptions = NxPluginOptions>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions>;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
|
|
57
|
+
//# sourceMappingURL=plugin-utilities.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-utilities.d.mts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"mappings":";;;;;;AAkEA;;;;iBAAgB,iBAAA,CAAkB,SAAA;AAUlC;;;;;AAMA;AANA,iBAAgB,iBAAA,CAAkB,SAAA;AAAA,UAMjB,qBAAA;EAAqB;;;;;;AAsCtC;;EA7BE,IAAA;EA8BiB;;;;;;;;EApBjB,eAAA;EAoBmC;;;;;;;;EAVnC,SAAA;AAAA;;;;;;;iBASc,cAAA,kBACG,eAAA,GAAkB,eAAA,CAAA,CACnC,IAAA,GAAO,qBAAA,GAAwB,aAAA,CAAc,QAAA"}
|
|
@@ -1,2 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { NxPluginOptions } from "../types/plugin.js";
|
|
2
|
+
import { CreateNodesV2 } from "@nx/devkit";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/plugin-utilities.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
7
|
+
*
|
|
8
|
+
* @param framework - The framework name to use in the input strings
|
|
9
|
+
* @returns An array of Nx input strings for the configuration file
|
|
10
|
+
*/
|
|
11
|
+
declare function getNxTargetInputs(framework: string): string[];
|
|
12
|
+
/**
|
|
13
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
14
|
+
*
|
|
15
|
+
* @param framework - The framework name to use in the input strings
|
|
16
|
+
* @returns An array of Nx input strings for the configuration file
|
|
17
|
+
*/
|
|
18
|
+
declare function getNxPluginInputs(framework: string): string;
|
|
19
|
+
interface CreateNxPluginOptions {
|
|
20
|
+
/**
|
|
21
|
+
* The name of the Nx plugin to create
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* This will be used in logging and project tagging.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue "\{framework\}/plugin/nx"
|
|
27
|
+
*/
|
|
28
|
+
name?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The folder where the generated runtime artifacts will be located
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
34
|
+
*
|
|
35
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
36
|
+
*/
|
|
37
|
+
artifactsFolder?: string;
|
|
38
|
+
/**
|
|
39
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
|
|
43
|
+
*
|
|
44
|
+
* @defaultValue "powerlines"
|
|
45
|
+
*/
|
|
46
|
+
framework?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates an Nx plugin that integrates Powerlines into the Nx build process.
|
|
50
|
+
*
|
|
51
|
+
* @param opts - Options for creating the Nx plugin
|
|
52
|
+
* @returns A CreateNodesV2 function that can be used as an Nx plugin
|
|
53
|
+
*/
|
|
54
|
+
declare function createNxPlugin<TOptions extends NxPluginOptions = NxPluginOptions>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions>;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs };
|
|
57
|
+
//# sourceMappingURL=plugin-utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-utilities.d.ts","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"mappings":";;;;;;AAkEA;;;;iBAAgB,iBAAA,CAAkB,SAAA;AAUlC;;;;;AAMA;AANA,iBAAgB,iBAAA,CAAkB,SAAA;AAAA,UAMjB,qBAAA;EAAqB;;;;;;AAsCtC;;EA7BE,IAAA;EA8BiB;;;;;;;;EApBjB,eAAA;EAoBmC;;;;;;;;EAVnC,SAAA;AAAA;;;;;;;iBASc,cAAA,kBACG,eAAA,GAAkB,eAAA,CAAA,CACnC,IAAA,GAAO,qBAAA,GAAwB,aAAA,CAAc,QAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const
|
|
2
|
+
const require_runtime = require('../_virtual/_rolldown/runtime.js');
|
|
3
3
|
const require_helpers_constants = require('./constants.js');
|
|
4
4
|
let _stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
5
5
|
let defu = require("defu");
|
|
6
|
-
defu =
|
|
6
|
+
defu = require_runtime.__toESM(defu);
|
|
7
7
|
let _nx_devkit = require("@nx/devkit");
|
|
8
8
|
let _storm_software_workspace_tools_utils_nx_json = require("@storm-software/workspace-tools/utils/nx-json");
|
|
9
9
|
let _storm_software_workspace_tools_utils_plugin_helpers = require("@storm-software/workspace-tools/utils/plugin-helpers");
|
|
@@ -16,7 +16,7 @@ import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
|
16
16
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
17
17
|
import { createJiti } from "jiti";
|
|
18
18
|
import { readFile } from "node:fs/promises";
|
|
19
|
-
import { readNxJson
|
|
19
|
+
import { readNxJson } from "nx/src/config/nx-json.js";
|
|
20
20
|
import { readTargetsFromPackageJson } from "nx/src/utils/package-json.js";
|
|
21
21
|
import { loadUserConfigFile } from "powerlines/config";
|
|
22
22
|
import { ROOT_HASH_LENGTH } from "powerlines/constants";
|
|
@@ -62,7 +62,7 @@ function createNxPlugin(opts) {
|
|
|
62
62
|
workspaceRoot: contextV2.workspaceRoot
|
|
63
63
|
});
|
|
64
64
|
if (!envPaths.cache) throw new Error("The cache directory could not be determined.");
|
|
65
|
-
const nxJson = readNxJson
|
|
65
|
+
const nxJson = readNxJson(contextV2.workspaceRoot);
|
|
66
66
|
const resolver = createJiti(contextV2.workspaceRoot, {
|
|
67
67
|
debug: !!options?.debug,
|
|
68
68
|
interopDefault: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-utilities.mjs","names":["readNxJson"],"sources":["../../../src/helpers/plugin-utilities.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable no-console */\n\nimport type { CreateNodesResultV2, CreateNodesV2 } from \"@nx/devkit\";\nimport { createNodesFromFiles } from \"@nx/devkit\";\nimport type { ProjectTagVariant } from \"@storm-software/workspace-tools/types\";\nimport { withNamedInputs } from \"@storm-software/workspace-tools/utils/nx-json\";\nimport {\n getProjectConfigFromProjectRoot,\n getProjectRoot,\n getRoot\n} from \"@storm-software/workspace-tools/utils/plugin-helpers\";\nimport {\n addProjectTag,\n setDefaultProjectTags\n} from \"@storm-software/workspace-tools/utils/project-tags\";\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport { readFile } from \"node:fs/promises\";\nimport { readNxJson } from \"nx/src/config/nx-json.js\";\nimport type {\n ProjectConfiguration,\n TargetConfiguration\n} from \"nx/src/config/workspace-json-project-json.js\";\nimport type { PackageJson as PackageJsonNx } from \"nx/src/utils/package-json.js\";\nimport { readTargetsFromPackageJson } from \"nx/src/utils/package-json.js\";\nimport type { ParsedUserConfig } from \"powerlines\";\nimport { loadUserConfigFile } from \"powerlines/config\";\nimport { ROOT_HASH_LENGTH } from \"powerlines/constants\";\nimport { NxPluginOptions } from \"../types/plugin\";\nimport { CONFIG_INPUTS } from \"./constants\";\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxTargetInputs(framework: string): string[] {\n return CONFIG_INPUTS.map(input => input.replace(\"{framework}\", framework));\n}\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxPluginInputs(framework: string): string {\n return `**/{${getNxTargetInputs(framework)\n .map(input => input.replace(\"{projectRoot}/\", \"\"))\n .join(\",\")}}`;\n}\n\nexport interface CreateNxPluginOptions {\n /**\n * The name of the Nx plugin to create\n *\n * @remarks\n * This will be used in logging and project tagging.\n *\n * @defaultValue \"\\{framework\\}/plugin/nx\"\n */\n name?: string;\n\n /**\n * The folder where the generated runtime artifacts will be located\n *\n * @remarks\n * This folder will contain all runtime artifacts and builtins generated during the \"prepare\" phase.\n *\n * @defaultValue \"\\{projectRoot\\}/.powerlines\"\n */\n artifactsFolder?: string;\n\n /**\n * A string identifier that allows a child framework or tool to identify itself when using Powerlines.\n *\n * @remarks\n * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.\n *\n * @defaultValue \"powerlines\"\n */\n framework?: string;\n}\n\n/**\n * Creates an Nx plugin that integrates Powerlines into the Nx build process.\n *\n * @param opts - Options for creating the Nx plugin\n * @returns A CreateNodesV2 function that can be used as an Nx plugin\n */\nexport function createNxPlugin<\n TOptions extends NxPluginOptions = NxPluginOptions\n>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions> {\n const framework = opts?.framework || \"powerlines\";\n const title = `${titleCase(framework)} Nx Plugin`;\n\n try {\n const name = opts?.name || `${framework}/nx/plugin`;\n const artifactsFolder =\n opts?.artifactsFolder || `{projectRoot}/.${framework}`;\n\n const targetInputs = getNxTargetInputs(framework);\n const pluginInputs = getNxPluginInputs(framework);\n\n return [\n pluginInputs,\n async (configFiles, options, contextV2): Promise<CreateNodesResultV2> => {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`\n );\n }\n\n const envPaths = getEnvPaths({\n orgId: \"storm-software\",\n appId: framework,\n workspaceRoot: contextV2.workspaceRoot\n });\n if (!envPaths.cache) {\n throw new Error(\"The cache directory could not be determined.\");\n }\n\n const nxJson = readNxJson(contextV2.workspaceRoot);\n const resolver = createJiti(contextV2.workspaceRoot, {\n debug: !!options?.debug,\n interopDefault: true,\n fsCache: joinPaths(\n envPaths.cache,\n \"nx-plugin\",\n murmurhash(contextV2.workspaceRoot, {\n maxLength: ROOT_HASH_LENGTH\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n return createNodesFromFiles(\n async (configFile, _, context) => {\n try {\n const projectRoot = getProjectRoot(\n configFile,\n contextV2.workspaceRoot\n );\n if (!projectRoot) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - package.json and ${\n framework\n } configuration files (i.e. ${\n framework\n }.config.ts) must be located in the project root directory: ${\n configFile\n }`\n );\n\n return {};\n }\n\n const root = getRoot(projectRoot, context);\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Loading ${\n framework\n } user configuration for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n let userConfig = {} as ParsedUserConfig;\n try {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration for project in ${\n projectRoot\n } - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown error\"\n } \\n\\nThis error can occur if the project depends on another package in the workspace and the dependent package has not been built yet. To resolve this issue, please ensure that all dependent packages have been built successfully.`\n );\n }\n\n if (\n !existsSync(\n joinPaths(\n contextV2.workspaceRoot,\n projectRoot,\n \"package.json\"\n )\n )\n ) {\n if (options?.verboseOutput) {\n console.warn(\n `[${\n title\n }] - ${new Date().toISOString()} - Cannot find \\`package.json\\` file in the project's root directory (path: \"${joinPaths(\n contextV2.workspaceRoot,\n projectRoot\n )}\"). Skipping project configuration.`\n );\n }\n\n return {};\n }\n\n const packageJsonContent = await readFile(\n joinPaths(contextV2.workspaceRoot, projectRoot, \"package.json\"),\n \"utf8\"\n );\n if (!packageJsonContent) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No package.json file found for project in root directory ${projectRoot}`\n );\n }\n\n return {};\n }\n\n const packageJson: PackageJson = JSON.parse(packageJsonContent);\n if (\n !userConfig.configFile &&\n !packageJson?.[camelCase(framework)]\n ) {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Skipping ${projectRoot} - no ${\n framework\n } configuration found for project in root directory.`\n );\n }\n\n return {};\n }\n\n const projectConfig = getProjectConfigFromProjectRoot(\n projectRoot,\n packageJson\n );\n if (!projectConfig) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No project configuration found for project in root directory ${\n projectRoot\n }`\n );\n }\n\n return {};\n }\n\n const targets: ProjectConfiguration[\"targets\"] =\n readTargetsFromPackageJson(\n packageJson as PackageJsonNx,\n nxJson,\n projectRoot,\n context.workspaceRoot\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Preparing Nx targets for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n if (\n options?.clean !== false &&\n !targets[options?.clean?.targetName || \"clean\"]\n ) {\n targets[options?.clean?.targetName || \"clean\"] = {\n cache: true,\n inputs: Array.isArray(options?.clean?.inputs)\n ? options.clean.inputs\n : withNamedInputs(targetInputs, [\n options?.clean?.inputs || \"typescript\"\n ]),\n outputs: options?.clean?.outputs,\n executor:\n options?.clean?.executor ||\n `@${framework}/nx:${options?.clean?.targetName || \"clean\"}`,\n dependsOn: options?.clean?.dependsOn ?? [\n `^${options?.clean?.targetName || \"clean\"}`\n ],\n defaultConfiguration:\n options?.clean?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.prepare !== false &&\n !targets[options?.prepare?.targetName || \"prepare\"]\n ) {\n targets[options?.prepare?.targetName || \"prepare\"] = {\n cache: true,\n inputs: Array.isArray(options?.prepare?.inputs)\n ? options.prepare.inputs\n : withNamedInputs(targetInputs, [\n options?.prepare?.inputs || \"typescript\"\n ]),\n outputs: options?.prepare?.outputs ?? [artifactsFolder],\n executor:\n options?.prepare?.executor ||\n `@${framework}/nx:${options?.prepare?.targetName || \"prepare\"}`,\n dependsOn:\n options?.prepare?.dependsOn ??\n ([\n `^${options?.prepare?.targetName || \"build\"}`,\n options?.clean !== false &&\n `${options?.clean?.targetName || \"clean\"}`\n ].filter(Boolean) as string[]),\n defaultConfiguration:\n options?.prepare?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.build !== false &&\n !targets[options?.build?.targetName || \"build\"]\n ) {\n targets[options?.build?.targetName || \"build\"] = {\n cache: true,\n inputs: Array.isArray(options?.build?.inputs)\n ? options.build.inputs\n : withNamedInputs(targetInputs, [\n options?.build?.inputs || \"typescript\"\n ]),\n outputs: options?.build?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.build?.executor ||\n `@${framework}/nx:${options?.build?.targetName || \"build\"}`,\n dependsOn:\n options?.build?.dependsOn ??\n ([\n `^${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.build?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.lint !== false &&\n !targets[options?.lint?.targetName || \"lint\"]\n ) {\n targets[options?.lint?.targetName || \"lint\"] = {\n cache: true,\n inputs: Array.isArray(options?.lint?.inputs)\n ? options.lint.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.lint?.inputs\n ? [options.lint.inputs]\n : [\"linting\", \"typescript\"]\n ),\n outputs: options?.lint?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.lint?.executor ||\n `@${framework}/nx:${options?.lint?.targetName || \"lint\"}`,\n dependsOn:\n options?.lint?.dependsOn ??\n ([\n `^${options?.lint?.targetName || \"lint\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.lint?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.docs !== false &&\n !targets[options?.docs?.targetName || \"docs\"]\n ) {\n targets[options?.docs?.targetName || \"docs\"] = {\n cache: true,\n inputs: Array.isArray(options?.docs?.inputs)\n ? options.docs.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.docs?.inputs\n ? [options.docs.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.docs?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.docs?.executor ||\n `@${framework}/nx:${options?.docs?.targetName || \"docs\"}`,\n dependsOn:\n options?.docs?.dependsOn ??\n ([\n `^${options?.docs?.targetName || \"docs\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.docs?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.deploy !== false &&\n !targets[options?.deploy?.targetName || \"deploy\"]\n ) {\n targets[options?.deploy?.targetName || \"deploy\"] = {\n inputs: Array.isArray(options?.deploy?.inputs)\n ? options.deploy.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.deploy?.inputs\n ? [options.deploy.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.deploy?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.deploy?.executor ||\n `@${framework}/nx:${options?.deploy?.targetName || \"deploy\"}`,\n dependsOn:\n options?.deploy?.dependsOn ??\n ([\n `^${options?.deploy?.targetName || \"deploy\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.deploy?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n setDefaultProjectTags(projectConfig, name);\n addProjectTag(\n projectConfig,\n framework as ProjectTagVariant,\n projectConfig.projectType || \"library\",\n {\n overwrite: true\n }\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${\n title\n }] - ${new Date().toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`\n );\n }\n\n return {\n projects: {\n [root]: defu(projectConfig, {\n name: kebabCase(userConfig.name)!,\n projectType: projectConfig.projectType || \"library\",\n root,\n sourceRoot: joinPaths(root, \"src\"),\n targets\n })\n }\n };\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - Failed to process the project configuration for file \"${\n configFile\n }\" - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown fatal error\"\n }`\n );\n\n return {};\n }\n },\n configFiles,\n options,\n contextV2\n );\n }\n ];\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown fatal error during plugin initialization\"\n }`\n );\n\n throw new Error(\n `Failed to initialize the ${title} - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"See previous logs for more details\"\n }`,\n {\n cause: error instanceof Error ? error : undefined\n }\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,SAAgB,kBAAkB,WAA6B;AAC7D,QAAO,cAAc,KAAI,UAAS,MAAM,QAAQ,eAAe,UAAU,CAAC;;;;;;;;AAS5E,SAAgB,kBAAkB,WAA2B;AAC3D,QAAO,OAAO,kBAAkB,UAAU,CACvC,KAAI,UAAS,MAAM,QAAQ,kBAAkB,GAAG,CAAC,CACjD,KAAK,IAAI,CAAC;;;;;;;;AAyCf,SAAgB,eAEd,MAAuD;CACvD,MAAM,YAAY,MAAM,aAAa;CACrC,MAAM,QAAQ,GAAG,UAAU,UAAU,CAAC;AAEtC,KAAI;EACF,MAAM,OAAO,MAAM,QAAQ,GAAG,UAAU;EACxC,MAAM,kBACJ,MAAM,mBAAmB,kBAAkB;EAE7C,MAAM,eAAe,kBAAkB,UAAU;EACjD,MAAM,eAAe,kBAAkB,UAAU;AAEjD,SAAO,CACL,cACA,OAAO,aAAa,SAAS,cAA4C;AACvE,OAAI,SAAS,cACX,SAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,sBAAsB,MAAM,6BAA6B,eACnG;GAGH,MAAM,WAAW,YAAY;IAC3B,OAAO;IACP,OAAO;IACP,eAAe,UAAU;IAC1B,CAAC;AACF,OAAI,CAAC,SAAS,MACZ,OAAM,IAAI,MAAM,+CAA+C;GAGjE,MAAM,SAASA,aAAW,UAAU,cAAc;GAClD,MAAM,WAAW,WAAW,UAAU,eAAe;IACnD,OAAO,CAAC,CAAC,SAAS;IAClB,gBAAgB;IAChB,SAAS,UACP,SAAS,OACT,aACA,WAAW,UAAU,eAAe,EAClC,WAAW,kBACZ,CAAC,EACF,OACD;IACD,aAAa;IACd,CAAC;AAEF,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QACZ;OACF;MACF;AAGH,2BAAsB,eAAe,KAAK;AAC1C,mBACE,eACA,WACA,cAAc,eAAe,WAC7B,EACE,WAAW,MACZ,CACF;AAED,SAAI,SAAS,cACX,SAAQ,MACN,IACE,MACD,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,wEAAwE,YAAY,GACrH;AAGH,YAAO,EACL,UAAU,GACP,OAAO,KAAK,eAAe;MAC1B,MAAM,UAAU,WAAW,KAAK;MAChC,aAAa,cAAc,eAAe;MAC1C;MACA,YAAY,UAAU,MAAM,MAAM;MAClC;MACD,CAAC,EACH,EACF;aACM,OAAO;AACd,aAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,2DACvC,WACD,MACC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wBAET;AAED,YAAO,EAAE;;MAGb,aACA,SACA,UACD;IAEJ;UACM,OAAO;AACd,UAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,KACvC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,qDAET;AAED,QAAM,IAAI,MACR,4BAA4B,MAAM,KAChC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wCAER,EACE,OAAO,iBAAiB,QAAQ,QAAQ,QACzC,CACF"}
|
|
1
|
+
{"version":3,"file":"plugin-utilities.mjs","names":[],"sources":["../../../src/helpers/plugin-utilities.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/* eslint-disable no-console */\n\nimport type { CreateNodesResultV2, CreateNodesV2 } from \"@nx/devkit\";\nimport { createNodesFromFiles } from \"@nx/devkit\";\nimport type { ProjectTagVariant } from \"@storm-software/workspace-tools/types\";\nimport { withNamedInputs } from \"@storm-software/workspace-tools/utils/nx-json\";\nimport {\n getProjectConfigFromProjectRoot,\n getProjectRoot,\n getRoot\n} from \"@storm-software/workspace-tools/utils/plugin-helpers\";\nimport {\n addProjectTag,\n setDefaultProjectTags\n} from \"@storm-software/workspace-tools/utils/project-tags\";\nimport { getEnvPaths } from \"@stryke/env/get-env-paths\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { murmurhash } from \"@stryke/hash\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { camelCase } from \"@stryke/string-format/camel-case\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport defu from \"defu\";\nimport { createJiti } from \"jiti\";\nimport { readFile } from \"node:fs/promises\";\nimport { readNxJson } from \"nx/src/config/nx-json.js\";\nimport type {\n ProjectConfiguration,\n TargetConfiguration\n} from \"nx/src/config/workspace-json-project-json.js\";\nimport type { PackageJson as PackageJsonNx } from \"nx/src/utils/package-json.js\";\nimport { readTargetsFromPackageJson } from \"nx/src/utils/package-json.js\";\nimport type { ParsedUserConfig } from \"powerlines\";\nimport { loadUserConfigFile } from \"powerlines/config\";\nimport { ROOT_HASH_LENGTH } from \"powerlines/constants\";\nimport { NxPluginOptions } from \"../types/plugin\";\nimport { CONFIG_INPUTS } from \"./constants\";\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxTargetInputs(framework: string): string[] {\n return CONFIG_INPUTS.map(input => input.replace(\"{framework}\", framework));\n}\n\n/**\n * Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.\n *\n * @param framework - The framework name to use in the input strings\n * @returns An array of Nx input strings for the configuration file\n */\nexport function getNxPluginInputs(framework: string): string {\n return `**/{${getNxTargetInputs(framework)\n .map(input => input.replace(\"{projectRoot}/\", \"\"))\n .join(\",\")}}`;\n}\n\nexport interface CreateNxPluginOptions {\n /**\n * The name of the Nx plugin to create\n *\n * @remarks\n * This will be used in logging and project tagging.\n *\n * @defaultValue \"\\{framework\\}/plugin/nx\"\n */\n name?: string;\n\n /**\n * The folder where the generated runtime artifacts will be located\n *\n * @remarks\n * This folder will contain all runtime artifacts and builtins generated during the \"prepare\" phase.\n *\n * @defaultValue \"\\{projectRoot\\}/.powerlines\"\n */\n artifactsFolder?: string;\n\n /**\n * A string identifier that allows a child framework or tool to identify itself when using Powerlines.\n *\n * @remarks\n * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.\n *\n * @defaultValue \"powerlines\"\n */\n framework?: string;\n}\n\n/**\n * Creates an Nx plugin that integrates Powerlines into the Nx build process.\n *\n * @param opts - Options for creating the Nx plugin\n * @returns A CreateNodesV2 function that can be used as an Nx plugin\n */\nexport function createNxPlugin<\n TOptions extends NxPluginOptions = NxPluginOptions\n>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions> {\n const framework = opts?.framework || \"powerlines\";\n const title = `${titleCase(framework)} Nx Plugin`;\n\n try {\n const name = opts?.name || `${framework}/nx/plugin`;\n const artifactsFolder =\n opts?.artifactsFolder || `{projectRoot}/.${framework}`;\n\n const targetInputs = getNxTargetInputs(framework);\n const pluginInputs = getNxPluginInputs(framework);\n\n return [\n pluginInputs,\n async (configFiles, options, contextV2): Promise<CreateNodesResultV2> => {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`\n );\n }\n\n const envPaths = getEnvPaths({\n orgId: \"storm-software\",\n appId: framework,\n workspaceRoot: contextV2.workspaceRoot\n });\n if (!envPaths.cache) {\n throw new Error(\"The cache directory could not be determined.\");\n }\n\n const nxJson = readNxJson(contextV2.workspaceRoot);\n const resolver = createJiti(contextV2.workspaceRoot, {\n debug: !!options?.debug,\n interopDefault: true,\n fsCache: joinPaths(\n envPaths.cache,\n \"nx-plugin\",\n murmurhash(contextV2.workspaceRoot, {\n maxLength: ROOT_HASH_LENGTH\n }),\n \"jiti\"\n ),\n moduleCache: true\n });\n\n return createNodesFromFiles(\n async (configFile, _, context) => {\n try {\n const projectRoot = getProjectRoot(\n configFile,\n contextV2.workspaceRoot\n );\n if (!projectRoot) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - package.json and ${\n framework\n } configuration files (i.e. ${\n framework\n }.config.ts) must be located in the project root directory: ${\n configFile\n }`\n );\n\n return {};\n }\n\n const root = getRoot(projectRoot, context);\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Loading ${\n framework\n } user configuration for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n let userConfig = {} as ParsedUserConfig;\n try {\n userConfig = await loadUserConfigFile(\n projectRoot,\n contextV2.workspaceRoot,\n resolver,\n \"build\",\n \"development\",\n configFile,\n framework\n );\n } catch (error) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - Failed to load user configuration for project in ${\n projectRoot\n } - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown error\"\n } \\n\\nThis error can occur if the project depends on another package in the workspace and the dependent package has not been built yet. To resolve this issue, please ensure that all dependent packages have been built successfully.`\n );\n }\n\n if (\n !existsSync(\n joinPaths(\n contextV2.workspaceRoot,\n projectRoot,\n \"package.json\"\n )\n )\n ) {\n if (options?.verboseOutput) {\n console.warn(\n `[${\n title\n }] - ${new Date().toISOString()} - Cannot find \\`package.json\\` file in the project's root directory (path: \"${joinPaths(\n contextV2.workspaceRoot,\n projectRoot\n )}\"). Skipping project configuration.`\n );\n }\n\n return {};\n }\n\n const packageJsonContent = await readFile(\n joinPaths(contextV2.workspaceRoot, projectRoot, \"package.json\"),\n \"utf8\"\n );\n if (!packageJsonContent) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No package.json file found for project in root directory ${projectRoot}`\n );\n }\n\n return {};\n }\n\n const packageJson: PackageJson = JSON.parse(packageJsonContent);\n if (\n !userConfig.configFile &&\n !packageJson?.[camelCase(framework)]\n ) {\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Skipping ${projectRoot} - no ${\n framework\n } configuration found for project in root directory.`\n );\n }\n\n return {};\n }\n\n const projectConfig = getProjectConfigFromProjectRoot(\n projectRoot,\n packageJson\n );\n if (!projectConfig) {\n if (options?.verboseOutput) {\n console.warn(\n `[${title}] - ${new Date().toISOString()} - No project configuration found for project in root directory ${\n projectRoot\n }`\n );\n }\n\n return {};\n }\n\n const targets: ProjectConfiguration[\"targets\"] =\n readTargetsFromPackageJson(\n packageJson as PackageJsonNx,\n nxJson,\n projectRoot,\n context.workspaceRoot\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${title}] - ${new Date().toISOString()} - Preparing Nx targets for project in root directory ${\n projectRoot\n }.`\n );\n }\n\n if (\n options?.clean !== false &&\n !targets[options?.clean?.targetName || \"clean\"]\n ) {\n targets[options?.clean?.targetName || \"clean\"] = {\n cache: true,\n inputs: Array.isArray(options?.clean?.inputs)\n ? options.clean.inputs\n : withNamedInputs(targetInputs, [\n options?.clean?.inputs || \"typescript\"\n ]),\n outputs: options?.clean?.outputs,\n executor:\n options?.clean?.executor ||\n `@${framework}/nx:${options?.clean?.targetName || \"clean\"}`,\n dependsOn: options?.clean?.dependsOn ?? [\n `^${options?.clean?.targetName || \"clean\"}`\n ],\n defaultConfiguration:\n options?.clean?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.prepare !== false &&\n !targets[options?.prepare?.targetName || \"prepare\"]\n ) {\n targets[options?.prepare?.targetName || \"prepare\"] = {\n cache: true,\n inputs: Array.isArray(options?.prepare?.inputs)\n ? options.prepare.inputs\n : withNamedInputs(targetInputs, [\n options?.prepare?.inputs || \"typescript\"\n ]),\n outputs: options?.prepare?.outputs ?? [artifactsFolder],\n executor:\n options?.prepare?.executor ||\n `@${framework}/nx:${options?.prepare?.targetName || \"prepare\"}`,\n dependsOn:\n options?.prepare?.dependsOn ??\n ([\n `^${options?.prepare?.targetName || \"build\"}`,\n options?.clean !== false &&\n `${options?.clean?.targetName || \"clean\"}`\n ].filter(Boolean) as string[]),\n defaultConfiguration:\n options?.prepare?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.build !== false &&\n !targets[options?.build?.targetName || \"build\"]\n ) {\n targets[options?.build?.targetName || \"build\"] = {\n cache: true,\n inputs: Array.isArray(options?.build?.inputs)\n ? options.build.inputs\n : withNamedInputs(targetInputs, [\n options?.build?.inputs || \"typescript\"\n ]),\n outputs: options?.build?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.build?.executor ||\n `@${framework}/nx:${options?.build?.targetName || \"build\"}`,\n dependsOn:\n options?.build?.dependsOn ??\n ([\n `^${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.build?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.lint !== false &&\n !targets[options?.lint?.targetName || \"lint\"]\n ) {\n targets[options?.lint?.targetName || \"lint\"] = {\n cache: true,\n inputs: Array.isArray(options?.lint?.inputs)\n ? options.lint.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.lint?.inputs\n ? [options.lint.inputs]\n : [\"linting\", \"typescript\"]\n ),\n outputs: options?.lint?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.lint?.executor ||\n `@${framework}/nx:${options?.lint?.targetName || \"lint\"}`,\n dependsOn:\n options?.lint?.dependsOn ??\n ([\n `^${options?.lint?.targetName || \"lint\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.lint?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.docs !== false &&\n !targets[options?.docs?.targetName || \"docs\"]\n ) {\n targets[options?.docs?.targetName || \"docs\"] = {\n cache: true,\n inputs: Array.isArray(options?.docs?.inputs)\n ? options.docs.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.docs?.inputs\n ? [options.docs.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.docs?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.docs?.executor ||\n `@${framework}/nx:${options?.docs?.targetName || \"docs\"}`,\n dependsOn:\n options?.docs?.dependsOn ??\n ([\n `^${options?.docs?.targetName || \"docs\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.docs?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n if (\n options?.deploy !== false &&\n !targets[options?.deploy?.targetName || \"deploy\"]\n ) {\n targets[options?.deploy?.targetName || \"deploy\"] = {\n inputs: Array.isArray(options?.deploy?.inputs)\n ? options.deploy.inputs\n : withNamedInputs(\n [...targetInputs, artifactsFolder],\n options?.deploy?.inputs\n ? [options.deploy.inputs]\n : [\"documentation\", \"typescript\"]\n ),\n outputs: options?.deploy?.outputs ?? [\"{options.outputPath}\"],\n executor:\n options?.deploy?.executor ||\n `@${framework}/nx:${options?.deploy?.targetName || \"deploy\"}`,\n dependsOn:\n options?.deploy?.dependsOn ??\n ([\n `^${options?.deploy?.targetName || \"deploy\"}`,\n options?.build !== false &&\n `${options?.build?.targetName || \"build\"}`,\n userConfig.skipCache\n ? undefined\n : isSetObject(options?.prepare) &&\n options?.prepare?.targetName\n ? options?.prepare?.targetName\n : \"prepare\"\n ].filter(Boolean) as TargetConfiguration[\"dependsOn\"]),\n defaultConfiguration:\n options?.deploy?.defaultConfiguration || \"production\",\n options: {\n projectType: projectConfig.projectType,\n outputPath: `{workspaceRoot}/${projectRoot}/dist`,\n copyPath: `{workspaceRoot}/dist/${projectRoot}`\n },\n configurations: {\n production: {\n mode: \"production\"\n },\n test: {\n mode: \"test\"\n },\n development: {\n mode: \"development\",\n skipCache: true\n }\n }\n };\n }\n\n setDefaultProjectTags(projectConfig, name);\n addProjectTag(\n projectConfig,\n framework as ProjectTagVariant,\n projectConfig.projectType || \"library\",\n {\n overwrite: true\n }\n );\n\n if (options?.verboseOutput) {\n console.debug(\n `[${\n title\n }] - ${new Date().toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`\n );\n }\n\n return {\n projects: {\n [root]: defu(projectConfig, {\n name: kebabCase(userConfig.name)!,\n projectType: projectConfig.projectType || \"library\",\n root,\n sourceRoot: joinPaths(root, \"src\"),\n targets\n })\n }\n };\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - Failed to process the project configuration for file \"${\n configFile\n }\" - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown fatal error\"\n }`\n );\n\n return {};\n }\n },\n configFiles,\n options,\n contextV2\n );\n }\n ];\n } catch (error) {\n console.error(\n `[${title}] - ${new Date().toISOString()} - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"Unknown fatal error during plugin initialization\"\n }`\n );\n\n throw new Error(\n `Failed to initialize the ${title} - ${\n isError(error)\n ? error.message\n : isSetString(error)\n ? error\n : \"See previous logs for more details\"\n }`,\n {\n cause: error instanceof Error ? error : undefined\n }\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,SAAgB,kBAAkB,WAA6B;AAC7D,QAAO,cAAc,KAAI,UAAS,MAAM,QAAQ,eAAe,UAAU,CAAC;;;;;;;;AAS5E,SAAgB,kBAAkB,WAA2B;AAC3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AU,MAAM,MAAM;MAClC;MACD,CAAC,EACH,EACF;aACM,OAAO;AACd,aAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,2DACvC,WACD,MACC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wBAET;AAED,YAAO,EAAE;;MAGb,aACA,SACA,UACD;IAEJ;UACM,OAAO;AACd,UAAQ,MACN,IAAI,MAAM,uBAAM,IAAI,MAAM,EAAC,aAAa,CAAC,KACvC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,qDAET;AAED,QAAM,IAAI,MACR,4BAA4B,MAAM,KAChC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wCAER,EACE,OAAO,iBAAiB,QAAQ,QAAQ,QACzC,CACF"}
|
package/dist/src/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { PowerlinesExecutorContext, withExecutor } from "./base/base-executor.mjs";
|
|
2
|
+
import { CONFIG_INPUTS } from "./helpers/constants.mjs";
|
|
3
|
+
import { NxPluginOptions } from "./types/plugin.mjs";
|
|
4
|
+
import { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./helpers/plugin-utilities.mjs";
|
|
5
5
|
export { CONFIG_INPUTS, CreateNxPluginOptions, NxPluginOptions, PowerlinesExecutorContext, createNxPlugin, getNxPluginInputs, getNxTargetInputs, withExecutor };
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { PowerlinesExecutorContext, withExecutor } from "./base/base-executor.js";
|
|
2
|
+
import { CONFIG_INPUTS } from "./helpers/constants.js";
|
|
3
|
+
import { NxPluginOptions } from "./types/plugin.js";
|
|
4
|
+
import { CreateNxPluginOptions, createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./helpers/plugin-utilities.js";
|
|
5
5
|
export { CONFIG_INPUTS, CreateNxPluginOptions, NxPluginOptions, PowerlinesExecutorContext, createNxPlugin, getNxPluginInputs, getNxTargetInputs, withExecutor };
|
package/dist/src/index.js
CHANGED
|
@@ -4,7 +4,6 @@ require('./base/index.js');
|
|
|
4
4
|
const require_helpers_constants = require('./helpers/constants.js');
|
|
5
5
|
const require_helpers_plugin_utilities = require('./helpers/plugin-utilities.js');
|
|
6
6
|
require('./helpers/index.js');
|
|
7
|
-
require('./types/index.js');
|
|
8
7
|
|
|
9
8
|
exports.CONFIG_INPUTS = require_helpers_constants.CONFIG_INPUTS;
|
|
10
9
|
exports.createNxPlugin = require_helpers_plugin_utilities.createNxPlugin;
|
package/dist/src/index.mjs
CHANGED
|
@@ -3,6 +3,5 @@ import "./base/index.mjs";
|
|
|
3
3
|
import { CONFIG_INPUTS } from "./helpers/constants.mjs";
|
|
4
4
|
import { createNxPlugin, getNxPluginInputs, getNxTargetInputs } from "./helpers/plugin-utilities.mjs";
|
|
5
5
|
import "./helpers/index.mjs";
|
|
6
|
-
import "./types/index.mjs";
|
|
7
6
|
|
|
8
7
|
export { CONFIG_INPUTS, createNxPlugin, getNxPluginInputs, getNxTargetInputs, withExecutor };
|