@powerlines/nx 0.11.230 → 0.11.232
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/base/base-executor.cjs +2 -1
- package/dist/src/base/base-executor.d.cts +2 -2
- package/dist/src/base/base-executor.d.mts +2 -2
- package/dist/src/base/base-executor.mjs +2 -1
- package/dist/src/base/base-executor.schema.d.cts +1 -1
- package/dist/src/base/base-executor.schema.d.mts +1 -1
- package/dist/src/base/base-executor.untyped.cjs +1 -1
- package/dist/src/base/base-executor.untyped.d.cts +2 -6
- package/dist/src/base/base-executor.untyped.d.mts +2 -7
- package/dist/src/base/base-executor.untyped.mjs +1 -1
- package/dist/src/base/index.cjs +6 -0
- package/dist/src/base/index.d.cts +5 -0
- package/dist/src/base/index.d.mts +5 -0
- package/dist/src/base/index.mjs +6 -0
- package/dist/src/base-executor-BwNEuJr4.d.mts +2152 -0
- package/dist/src/base-executor-BwNEuJr4.d.mts.map +1 -0
- package/dist/src/base-executor-BxwoTM0e.d.cts +2150 -0
- package/dist/src/base-executor-BxwoTM0e.d.cts.map +1 -0
- package/dist/src/base-executor-D0PC7G0V.cjs +4646 -0
- package/dist/src/base-executor-ZxlpQ-df.mjs +4628 -0
- package/dist/src/base-executor-ZxlpQ-df.mjs.map +1 -0
- package/dist/{base-executor.schema-LJ14f-QU.d.mts → src/base-executor.schema-CZPuauLj.d.cts} +1 -1
- package/dist/src/base-executor.schema-CZPuauLj.d.cts.map +1 -0
- package/dist/{base-executor.schema-CH9f7UZz.d.cts → src/base-executor.schema-DiDI-Jcs.d.mts} +1 -1
- package/dist/src/base-executor.schema-DiDI-Jcs.d.mts.map +1 -0
- package/dist/src/base-executor.untyped-5iZFoBFu.d.mts +7 -0
- package/dist/src/base-executor.untyped-5iZFoBFu.d.mts.map +1 -0
- package/dist/{base-executor.untyped-Bet42T8_.mjs → src/base-executor.untyped-BKF-oUZS.mjs} +1 -1
- package/dist/src/base-executor.untyped-BKF-oUZS.mjs.map +1 -0
- package/dist/{base-executor.untyped-DUgXmZji.cjs → src/base-executor.untyped-CDbDTHgS.cjs} +1 -1
- package/dist/src/base-executor.untyped-DsIwfUqm.d.cts +7 -0
- package/dist/src/base-executor.untyped-DsIwfUqm.d.cts.map +1 -0
- package/dist/src/config-Dkb72RJI.cjs +239 -0
- package/dist/src/config-LoR-NIJg.mjs +147 -0
- package/dist/src/config-LoR-NIJg.mjs.map +1 -0
- package/dist/src/constants-BvU9n9qR.d.mts +8 -0
- package/dist/src/constants-BvU9n9qR.d.mts.map +1 -0
- package/dist/src/constants-CPcygc7m.d.cts +8 -0
- package/dist/src/constants-CPcygc7m.d.cts.map +1 -0
- package/dist/{constants-DPeeG_si.mjs → src/constants-DzvoYj5w.mjs} +1 -1
- package/dist/src/constants-DzvoYj5w.mjs.map +1 -0
- package/dist/src/executors/build/executor.cjs +19 -4
- package/dist/src/executors/build/executor.d.cts +165 -4
- package/dist/src/executors/build/executor.d.cts.map +1 -0
- package/dist/src/executors/build/executor.d.mts +165 -4
- package/dist/src/executors/build/executor.d.mts.map +1 -0
- package/dist/src/executors/build/executor.mjs +18 -3
- package/dist/src/executors/build/executor.mjs.map +1 -0
- package/dist/src/executors/build/untyped.cjs +3 -3
- package/dist/src/executors/build/untyped.d.mts +2 -2
- package/dist/src/executors/build/untyped.mjs +2 -2
- package/dist/src/executors/clean/executor.cjs +13 -4
- package/dist/src/executors/clean/executor.d.cts +139 -4
- package/dist/src/executors/clean/executor.d.cts.map +1 -0
- package/dist/src/executors/clean/executor.d.mts +139 -4
- package/dist/src/executors/clean/executor.d.mts.map +1 -0
- package/dist/src/executors/clean/executor.mjs +13 -3
- package/dist/{executor-DriX4F9a.mjs.map → src/executors/clean/executor.mjs.map} +1 -1
- package/dist/src/executors/clean/untyped.cjs +2 -2
- package/dist/src/executors/clean/untyped.d.mts +2 -2
- package/dist/src/executors/clean/untyped.mjs +1 -1
- package/dist/src/executors/docs/executor.cjs +13 -4
- package/dist/src/executors/docs/executor.d.cts +155 -4
- package/dist/src/executors/docs/executor.d.cts.map +1 -0
- package/dist/src/executors/docs/executor.d.mts +155 -4
- package/dist/src/executors/docs/executor.d.mts.map +1 -0
- package/dist/src/executors/docs/executor.mjs +13 -3
- package/dist/{executor-CR4F9h0Q.mjs.map → src/executors/docs/executor.mjs.map} +1 -1
- package/dist/src/executors/docs/untyped.cjs +3 -3
- package/dist/src/executors/docs/untyped.d.cts +2 -2
- package/dist/src/executors/docs/untyped.mjs +2 -2
- package/dist/src/executors/lint/executor.cjs +13 -4
- package/dist/src/executors/lint/executor.d.cts +155 -4
- package/dist/src/executors/lint/executor.d.cts.map +1 -0
- package/dist/src/executors/lint/executor.d.mts +155 -4
- package/dist/src/executors/lint/executor.d.mts.map +1 -0
- package/dist/src/executors/lint/executor.mjs +13 -3
- package/dist/{executor-dakLe5jY.mjs.map → src/executors/lint/executor.mjs.map} +1 -1
- package/dist/src/executors/lint/untyped.cjs +3 -3
- package/dist/src/executors/lint/untyped.d.cts +2 -2
- package/dist/src/executors/lint/untyped.d.mts +2 -2
- package/dist/src/executors/lint/untyped.mjs +2 -2
- package/dist/src/executors/prepare/executor.cjs +19 -4
- package/dist/src/executors/prepare/executor.d.cts +155 -4
- package/dist/src/executors/prepare/executor.d.cts.map +1 -0
- package/dist/src/executors/prepare/executor.d.mts +155 -4
- package/dist/src/executors/prepare/executor.d.mts.map +1 -0
- package/dist/src/executors/prepare/executor.mjs +18 -3
- package/dist/src/executors/prepare/executor.mjs.map +1 -0
- package/dist/src/executors/prepare/untyped.cjs +2 -2
- package/dist/src/executors/prepare/untyped.d.mts +2 -2
- package/dist/src/executors/prepare/untyped.mjs +2 -2
- package/dist/src/generators/sync/generator.cjs +11 -3
- package/dist/src/generators/sync/generator.d.cts +8 -2
- package/dist/src/generators/sync/generator.d.cts.map +1 -0
- package/dist/src/generators/sync/generator.d.mts +8 -2
- package/dist/src/generators/sync/generator.d.mts.map +1 -0
- package/dist/src/generators/sync/generator.mjs +10 -2
- package/dist/{generator-DeiwVUqC.mjs.map → src/generators/sync/generator.mjs.map} +1 -1
- package/dist/src/generators/sync/untyped.cjs +1 -1
- package/dist/src/helpers/constants.cjs +1 -1
- package/dist/src/helpers/constants.d.cts +2 -8
- package/dist/src/helpers/constants.d.mts +2 -8
- package/dist/src/helpers/constants.mjs +1 -1
- package/dist/src/helpers/index.cjs +9 -0
- package/dist/src/helpers/index.d.cts +5 -0
- package/dist/src/helpers/index.d.mts +5 -0
- package/dist/src/helpers/index.mjs +6 -0
- package/dist/src/helpers/plugin-utilities.cjs +3 -2
- package/dist/src/helpers/plugin-utilities.d.cts +3 -58
- package/dist/src/helpers/plugin-utilities.d.mts +3 -58
- package/dist/src/helpers/plugin-utilities.mjs +3 -2
- package/dist/src/index-DOvrmvAP.d.cts +1 -0
- package/dist/src/index-Dh6J9gb5.d.cts +1 -0
- package/dist/src/index-QAtBiMxG.d.cts +1 -0
- package/dist/src/index-c55Utzva.d.mts +1 -0
- package/dist/src/index.cjs +15 -0
- package/dist/src/index.d.cts +10 -0
- package/dist/src/index.d.mts +10 -0
- package/dist/src/index.mjs +11 -0
- package/dist/src/plugin/index.cjs +8 -4
- package/dist/src/plugin/index.d.cts +8 -3
- package/dist/src/plugin/index.d.cts.map +1 -0
- package/dist/src/plugin/index.d.mts +8 -3
- package/dist/src/plugin/index.d.mts.map +1 -0
- package/dist/src/plugin/index.mjs +9 -4
- package/dist/src/plugin/index.mjs.map +1 -0
- package/dist/src/plugin-BSBH78mm.cjs +0 -0
- package/dist/{plugin-CODFOru1.d.cts → src/plugin-Bpm6rlvQ.d.cts} +1 -1
- package/dist/src/plugin-Bpm6rlvQ.d.cts.map +1 -0
- package/dist/{plugin-DpjoI0QS.d.mts → src/plugin-DK05gCB5.d.mts} +1 -1
- package/dist/src/plugin-DK05gCB5.d.mts.map +1 -0
- package/dist/src/plugin-DRjpXVSI.mjs +1 -0
- package/dist/{plugin-utilities-B6evbzM-.cjs → src/plugin-utilities-B6thBT59.cjs} +16 -100
- package/dist/src/plugin-utilities-CYqug_T4.d.mts +58 -0
- package/dist/src/plugin-utilities-CYqug_T4.d.mts.map +1 -0
- package/dist/{plugin-utilities-C-wuo6ih.mjs → src/plugin-utilities-DGw6LPZ0.mjs} +15 -97
- package/dist/src/plugin-utilities-DGw6LPZ0.mjs.map +1 -0
- package/dist/src/plugin-utilities-rlfzc3UW.d.cts +58 -0
- package/dist/src/plugin-utilities-rlfzc3UW.d.cts.map +1 -0
- package/dist/src/types/index.cjs +2 -0
- package/dist/src/types/index.d.cts +3 -0
- package/dist/src/types/index.d.mts +3 -0
- package/dist/src/types/index.mjs +4 -0
- package/dist/src/types/plugin.cjs +1 -0
- package/dist/src/types/plugin.d.cts +1 -1
- package/dist/src/types/plugin.d.mts +1 -1
- package/dist/src/types/plugin.mjs +2 -0
- package/dist/src/types-CKPddlfS.cjs +0 -0
- package/dist/src/types-SpBueMV7.mjs +1 -0
- package/dist/{untyped-DKPJSDgJ.cjs → src/untyped-BgrXugMs.cjs} +2 -2
- package/dist/{untyped-BIEzjl_J.mjs → src/untyped-DCpTmHDS.mjs} +2 -2
- package/dist/src/untyped-DCpTmHDS.mjs.map +1 -0
- package/package.json +25 -48
- package/CHANGELOG.md +0 -2187
- package/dist/base-executor-BKuqWAnc.d.mts +0 -28
- package/dist/base-executor-BKuqWAnc.d.mts.map +0 -1
- package/dist/base-executor-CL9md5FK.d.cts +0 -28
- package/dist/base-executor-CL9md5FK.d.cts.map +0 -1
- package/dist/base-executor-DIVmWt0_.mjs +0 -76
- package/dist/base-executor-DIVmWt0_.mjs.map +0 -1
- package/dist/base-executor-hfeykVFL.cjs +0 -83
- package/dist/base-executor.schema-CH9f7UZz.d.cts.map +0 -1
- package/dist/base-executor.schema-LJ14f-QU.d.mts.map +0 -1
- package/dist/base-executor.untyped-Bet42T8_.mjs.map +0 -1
- package/dist/chunk-CbDLau6x.cjs +0 -34
- package/dist/constants-DPeeG_si.mjs.map +0 -1
- package/dist/executor-9aTY5L1O.d.mts +0 -155
- package/dist/executor-9aTY5L1O.d.mts.map +0 -1
- package/dist/executor-BA-Xvw_2.cjs +0 -23
- package/dist/executor-BDu-MfKS.d.cts +0 -155
- package/dist/executor-BDu-MfKS.d.cts.map +0 -1
- package/dist/executor-BaJuosQ2.d.cts +0 -139
- package/dist/executor-BaJuosQ2.d.cts.map +0 -1
- package/dist/executor-BerELzzO.d.cts +0 -165
- package/dist/executor-BerELzzO.d.cts.map +0 -1
- package/dist/executor-C12a2R2m.d.mts +0 -165
- package/dist/executor-C12a2R2m.d.mts.map +0 -1
- package/dist/executor-CQoHBvIx.d.mts +0 -155
- package/dist/executor-CQoHBvIx.d.mts.map +0 -1
- package/dist/executor-CR4F9h0Q.mjs +0 -13
- package/dist/executor-CmOJDW7i.cjs +0 -30
- package/dist/executor-CsYeTG7f.d.mts +0 -155
- package/dist/executor-CsYeTG7f.d.mts.map +0 -1
- package/dist/executor-DXs-DQDq.cjs +0 -23
- package/dist/executor-DY3Q5btA.mjs +0 -18
- package/dist/executor-DY3Q5btA.mjs.map +0 -1
- package/dist/executor-DaM4shEF.d.mts +0 -139
- package/dist/executor-DaM4shEF.d.mts.map +0 -1
- package/dist/executor-DriX4F9a.mjs +0 -13
- package/dist/executor-DupYdy7P.cjs +0 -23
- package/dist/executor-_6Wimayo.d.cts +0 -155
- package/dist/executor-_6Wimayo.d.cts.map +0 -1
- package/dist/executor-dakLe5jY.mjs +0 -13
- package/dist/executor-gauQV_Qs.mjs +0 -18
- package/dist/executor-gauQV_Qs.mjs.map +0 -1
- package/dist/executor-q94V36zQ.d.cts +0 -155
- package/dist/executor-q94V36zQ.d.cts.map +0 -1
- package/dist/executor-tEMakUYi.cjs +0 -30
- package/dist/executors.cjs +0 -13
- package/dist/executors.d.cts +0 -9
- package/dist/executors.d.mts +0 -9
- package/dist/executors.mjs +0 -9
- package/dist/generator-DeiwVUqC.mjs +0 -11
- package/dist/generator-Dv37nXlF.d.cts +0 -8
- package/dist/generator-Dv37nXlF.d.cts.map +0 -1
- package/dist/generator-Uu2ErkQj.cjs +0 -22
- package/dist/generator-aA0eb35E.d.mts +0 -8
- package/dist/generator-aA0eb35E.d.mts.map +0 -1
- package/dist/generators-B8_tB0mD.d.cts +0 -17
- package/dist/generators-B8_tB0mD.d.cts.map +0 -1
- package/dist/generators-DymCAfYw.d.mts +0 -17
- package/dist/generators-DymCAfYw.d.mts.map +0 -1
- package/dist/generators.cjs +0 -5
- package/dist/generators.d.cts +0 -3
- package/dist/generators.d.mts +0 -3
- package/dist/generators.mjs +0 -4
- package/dist/index-BAMQksFF.d.mts +0 -8
- package/dist/index-BAMQksFF.d.mts.map +0 -1
- package/dist/index-C5yJ9lGj.d.cts +0 -8
- package/dist/index-C5yJ9lGj.d.cts.map +0 -1
- package/dist/index.cjs +0 -21
- package/dist/index.d.cts +0 -13
- package/dist/index.d.mts +0 -13
- package/dist/index.mjs +0 -14
- package/dist/plugin-CODFOru1.d.cts.map +0 -1
- package/dist/plugin-CWRA5nom.mjs +0 -8
- package/dist/plugin-CWRA5nom.mjs.map +0 -1
- package/dist/plugin-DJ2BfJg6.cjs +0 -12
- package/dist/plugin-DpjoI0QS.d.mts.map +0 -1
- package/dist/plugin-utilities-C-wuo6ih.mjs.map +0 -1
- package/dist/src/base/base-executor.untyped.d.cts.map +0 -1
- package/dist/src/base/base-executor.untyped.d.mts.map +0 -1
- package/dist/src/helpers/constants.d.cts.map +0 -1
- package/dist/src/helpers/constants.d.mts.map +0 -1
- package/dist/src/helpers/plugin-utilities.d.cts.map +0 -1
- package/dist/src/helpers/plugin-utilities.d.mts.map +0 -1
- package/dist/untyped-BIEzjl_J.mjs.map +0 -1
- package/docs/api/base-executor.schema.md +0 -123
- package/docs/api/build/schema.md +0 -151
- package/docs/api/clean/schema.md +0 -123
- package/docs/api/docs/schema.md +0 -141
- package/docs/api/lint/schema.md +0 -141
- package/docs/api/prepare/schema.md +0 -141
- package/docs/api/sync/schema.md +0 -16
- /package/dist/{executors-D7478W2S.cjs → src/base-BHJKI_1R.cjs} +0 -0
- /package/dist/{executors-C15iG1sF.mjs → src/base-BRSa-clf.mjs} +0 -0
- /package/dist/{constants-BHT2TeEj.cjs → src/constants-Dpoi7x5C.cjs} +0 -0
- /package/dist/{generators-q39_jUCw.cjs → src/helpers-Bx2yBrpn.cjs} +0 -0
- /package/dist/{generators-Bi9wzfNx.mjs → src/helpers-j01T2doK.mjs} +0 -0
- /package/dist/{executors-YbcSXKr5.d.mts → src/index-7rWKHdox.d.mts} +0 -0
- /package/dist/{executors-hX1C9GbI.d.cts → src/index-CRo77wc3.d.mts} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { t as NxPluginOptions } from "../plugin-DK05gCB5.mjs";
|
|
2
|
+
import * as _nx_devkit0 from "@nx/devkit";
|
|
3
|
+
|
|
4
|
+
//#region src/plugin/index.d.ts
|
|
5
|
+
declare const createNodesV2: _nx_devkit0.CreateNodesV2<NxPluginOptions>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { createNodesV2 };
|
|
8
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../../src/plugin/index.ts"],"sourcesContent":[],"mappings":";;;;cAqBa,eAAa,WAAA,CAAA,cAAA"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import { t as
|
|
1
|
+
import "../config-LoR-NIJg.mjs";
|
|
2
|
+
import "../constants-DzvoYj5w.mjs";
|
|
3
|
+
import { t as createNxPlugin } from "../plugin-utilities-DGw6LPZ0.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
//#region src/plugin/index.ts
|
|
6
|
+
const createNodesV2 = createNxPlugin({ framework: "powerlines" });
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { createNodesV2 };
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/plugin/index.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\nimport { createNxPlugin } from \"../helpers/plugin-utilities\";\nimport { NxPluginOptions } from \"../types/plugin\";\n\nexport const createNodesV2 = createNxPlugin<NxPluginOptions>({\n framework: \"powerlines\"\n});\n"],"mappings":";;;;;AAqBA,MAAa,gBAAgB,eAAgC,EAC3D,WAAW,cACZ,CAAC"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-Bpm6rlvQ.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";UAkBiB,eAAA;EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-DK05gCB5.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";UAkBiB,eAAA;EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,110 +1,26 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_constants = require('./constants-
|
|
3
|
-
let defu = require("defu");
|
|
4
|
-
defu = require_chunk.__toESM(defu);
|
|
5
|
-
let __storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
|
|
1
|
+
const require_config = require('./config-Dkb72RJI.cjs');
|
|
2
|
+
const require_constants = require('./constants-Dpoi7x5C.cjs');
|
|
6
3
|
let __stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
let __storm_software_workspace_tools_utils_plugin_helpers = require("@storm-software/workspace-tools/utils/plugin-helpers");
|
|
10
|
-
let __storm_software_workspace_tools_utils_project_tags = require("@storm-software/workspace-tools/utils/project-tags");
|
|
11
|
-
let __stryke_env_get_env_paths = require("@stryke/env/get-env-paths");
|
|
12
|
-
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
13
|
-
let __stryke_hash_murmurhash = require("@stryke/hash/murmurhash");
|
|
4
|
+
let defu = require("defu");
|
|
5
|
+
defu = require_config.__toESM(defu);
|
|
14
6
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
15
|
-
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
16
|
-
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
17
|
-
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
18
7
|
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
19
8
|
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
9
|
+
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
10
|
+
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
11
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
12
|
+
let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
|
|
13
|
+
let __stryke_env_get_env_paths = require("@stryke/env/get-env-paths");
|
|
14
|
+
let __stryke_hash_murmurhash = require("@stryke/hash/murmurhash");
|
|
20
15
|
let jiti = require("jiti");
|
|
21
16
|
let node_fs_promises = require("node:fs/promises");
|
|
17
|
+
let __nx_devkit = require("@nx/devkit");
|
|
18
|
+
let __storm_software_workspace_tools_utils_nx_json = require("@storm-software/workspace-tools/utils/nx-json");
|
|
19
|
+
let __storm_software_workspace_tools_utils_plugin_helpers = require("@storm-software/workspace-tools/utils/plugin-helpers");
|
|
20
|
+
let __storm_software_workspace_tools_utils_project_tags = require("@storm-software/workspace-tools/utils/project-tags");
|
|
22
21
|
let nx_src_config_nx_json_js = require("nx/src/config/nx-json.js");
|
|
23
22
|
let nx_src_utils_package_json_js = require("nx/src/utils/package-json.js");
|
|
24
|
-
require("@storm-software/config-tools/get-config");
|
|
25
|
-
let __stryke_path_append = require("@stryke/path/append");
|
|
26
|
-
let __stryke_path_replace = require("@stryke/path/replace");
|
|
27
|
-
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
28
|
-
let c12 = require("c12");
|
|
29
|
-
require("@stryke/convert/parse-type-definition");
|
|
30
|
-
require("@stryke/convert/to-array");
|
|
31
|
-
require("@stryke/helpers/get-unique");
|
|
32
|
-
require("@stryke/path/is-type");
|
|
33
|
-
require("@stryke/type-checks/is-object");
|
|
34
|
-
require("@stryke/type-checks/is-string");
|
|
35
|
-
require("@stryke/path/join");
|
|
36
|
-
require("@storm-software/config-tools/types");
|
|
37
|
-
require("@storm-software/config-tools/utilities/colors");
|
|
38
|
-
require("@stryke/helpers/noop");
|
|
39
|
-
require("chalk");
|
|
40
|
-
require("@stryke/fs/list-files");
|
|
41
|
-
require("@stryke/path/is-parent-path");
|
|
42
|
-
require("prettier");
|
|
43
|
-
require("@stryke/fs/read-file");
|
|
44
|
-
require("magic-string");
|
|
45
|
-
let diff_match_patch = require("diff-match-patch");
|
|
46
|
-
diff_match_patch = require_chunk.__toESM(diff_match_patch);
|
|
47
|
-
require("@stryke/fs/write-file");
|
|
48
|
-
|
|
49
|
-
//#region ../core/src/lib/config.ts
|
|
50
|
-
/**
|
|
51
|
-
* Loads the user configuration file for the project.
|
|
52
|
-
*
|
|
53
|
-
* @param projectRoot - The root directory of the project.
|
|
54
|
-
* @param workspaceRoot - The root directory of the workspace.
|
|
55
|
-
* @param jiti - An instance of Jiti to resolve modules from
|
|
56
|
-
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
57
|
-
* @param mode - The mode in which the project is running (default is "production").
|
|
58
|
-
* @param configFile - An optional path to a specific configuration file.
|
|
59
|
-
* @param framework - The framework name to use for default configuration file names.
|
|
60
|
-
* @returns A promise that resolves to the resolved user configuration.
|
|
61
|
-
*/
|
|
62
|
-
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti$1, command, mode = "production", configFile, framework = "powerlines") {
|
|
63
|
-
let resolvedUserConfig = {};
|
|
64
|
-
let resolvedUserConfigFile;
|
|
65
|
-
if (configFile) resolvedUserConfigFile = (0, __stryke_fs_exists.existsSync)((0, __stryke_path_replace.replacePath)(configFile, projectRoot)) ? (0, __stryke_path_replace.replacePath)(configFile, projectRoot) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), (0, __stryke_path_replace.replacePath)(configFile, projectRoot))) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), (0, __stryke_path_replace.replacePath)(configFile, projectRoot)) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), configFile)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), configFile) : void 0;
|
|
66
|
-
if (!resolvedUserConfigFile) resolvedUserConfigFile = (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.ts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.js`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.js`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mts`) : (0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? (0, __stryke_path_join_paths.joinPaths)((0, __stryke_path_append.appendPath)(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
67
|
-
if (resolvedUserConfigFile) {
|
|
68
|
-
const resolved = await jiti$1.import(jiti$1.esmResolve(resolvedUserConfigFile));
|
|
69
|
-
if (resolved) {
|
|
70
|
-
let config = {};
|
|
71
|
-
if ((0, __stryke_type_checks_is_function.isFunction)(resolved)) config = await Promise.resolve(resolved({
|
|
72
|
-
command,
|
|
73
|
-
mode,
|
|
74
|
-
isSsrBuild: false,
|
|
75
|
-
isPreview: false
|
|
76
|
-
}));
|
|
77
|
-
if ((0, __stryke_type_checks_is_set_object.isSetObject)(config)) resolvedUserConfig = {
|
|
78
|
-
...config,
|
|
79
|
-
config,
|
|
80
|
-
configFile: resolvedUserConfigFile
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const result = await (0, c12.loadConfig)({
|
|
85
|
-
cwd: projectRoot,
|
|
86
|
-
name: framework,
|
|
87
|
-
envName: mode,
|
|
88
|
-
globalRc: true,
|
|
89
|
-
packageJson: (0, __stryke_string_format_camel_case.camelCase)(framework),
|
|
90
|
-
dotenv: true,
|
|
91
|
-
jiti: jiti$1
|
|
92
|
-
});
|
|
93
|
-
return (0, defu.default)(resolvedUserConfig, (0, __stryke_type_checks_is_set_object.isSetObject)(result?.config) ? {
|
|
94
|
-
...result.config,
|
|
95
|
-
...result
|
|
96
|
-
} : {});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region ../core/src/lib/constants/meta.ts
|
|
101
|
-
const ROOT_HASH_LENGTH = 45;
|
|
102
|
-
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region ../core/src/lib/utilities/source-map.ts
|
|
105
|
-
const dmp = new diff_match_patch.default();
|
|
106
23
|
|
|
107
|
-
//#endregion
|
|
108
24
|
//#region src/helpers/plugin-utilities.ts
|
|
109
25
|
/**
|
|
110
26
|
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
@@ -150,7 +66,7 @@ function createNxPlugin(opts) {
|
|
|
150
66
|
const resolver = (0, jiti.createJiti)(contextV2.workspaceRoot, {
|
|
151
67
|
debug: !!options?.debug,
|
|
152
68
|
interopDefault: true,
|
|
153
|
-
fsCache: (0, __stryke_path_join_paths.joinPaths)(envPaths.cache, "nx-plugin", (0, __stryke_hash_murmurhash.murmurhash)(contextV2.workspaceRoot, { maxLength: ROOT_HASH_LENGTH }), "jiti"),
|
|
69
|
+
fsCache: (0, __stryke_path_join_paths.joinPaths)(envPaths.cache, "nx-plugin", (0, __stryke_hash_murmurhash.murmurhash)(contextV2.workspaceRoot, { maxLength: require_config.ROOT_HASH_LENGTH }), "jiti"),
|
|
154
70
|
moduleCache: true
|
|
155
71
|
});
|
|
156
72
|
return (0, __nx_devkit.createNodesFromFiles)(async (configFile, _, context) => {
|
|
@@ -164,7 +80,7 @@ function createNxPlugin(opts) {
|
|
|
164
80
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
165
81
|
let userConfig = {};
|
|
166
82
|
try {
|
|
167
|
-
userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
83
|
+
userConfig = await require_config.loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
168
84
|
} catch (error) {
|
|
169
85
|
console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Failed to load user configuration for project in ${projectRoot} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : (0, __stryke_type_checks_is_set_string.isSetString)(error) ? error : "Unknown error"} \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.`);
|
|
170
86
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { t as NxPluginOptions } from "./plugin-DK05gCB5.mjs";
|
|
2
|
+
import { CreateNodesV2 } from "@nx/devkit";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/plugin-utilities.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
8
|
+
*
|
|
9
|
+
* @param framework - The framework name to use in the input strings
|
|
10
|
+
* @returns An array of Nx input strings for the configuration file
|
|
11
|
+
*/
|
|
12
|
+
declare function getNxTargetInputs(framework: string): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
15
|
+
*
|
|
16
|
+
* @param framework - The framework name to use in the input strings
|
|
17
|
+
* @returns An array of Nx input strings for the configuration file
|
|
18
|
+
*/
|
|
19
|
+
declare function getNxPluginInputs(framework: string): string;
|
|
20
|
+
interface CreateNxPluginOptions {
|
|
21
|
+
/**
|
|
22
|
+
* The name of the Nx plugin to create
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* This will be used in logging and project tagging.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue "\{framework\}/plugin/nx"
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The folder where the generated runtime artifacts will be located
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
35
|
+
*
|
|
36
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
37
|
+
*/
|
|
38
|
+
artifactsFolder?: string;
|
|
39
|
+
/**
|
|
40
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* 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.
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue "powerlines"
|
|
46
|
+
*/
|
|
47
|
+
framework?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates an Nx plugin that integrates Powerlines into the Nx build process.
|
|
51
|
+
*
|
|
52
|
+
* @param opts - Options for creating the Nx plugin
|
|
53
|
+
* @returns A CreateNodesV2 function that can be used as an Nx plugin
|
|
54
|
+
*/
|
|
55
|
+
declare function createNxPlugin<TOptions extends NxPluginOptions = NxPluginOptions>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { getNxTargetInputs as i, createNxPlugin as n, getNxPluginInputs as r, CreateNxPluginOptions as t };
|
|
58
|
+
//# sourceMappingURL=plugin-utilities-CYqug_T4.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-utilities-CYqug_T4.d.mts","names":[],"sources":["../../src/helpers/plugin-utilities.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkEA;AAUA;AAMA;AAsCA;AACmB,iBAvDH,iBAAA,CAuDG,SAAA,EAAA,MAAA,CAAA,EAAA,MAAA,EAAA;;;;;;;iBA7CH,iBAAA;UAMC,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCD,gCACG,kBAAkB,wBAC5B,wBAAwB,cAAc"}
|
|
@@ -1,107 +1,25 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import
|
|
3
|
-
import "@storm-software/config-tools/logger";
|
|
1
|
+
import { i as ROOT_HASH_LENGTH, t as loadUserConfigFile } from "./config-LoR-NIJg.mjs";
|
|
2
|
+
import { t as CONFIG_INPUTS } from "./constants-DzvoYj5w.mjs";
|
|
4
3
|
import { isError } from "@stryke/type-checks/is-error";
|
|
5
|
-
import
|
|
6
|
-
import { withNamedInputs } from "@storm-software/workspace-tools/utils/nx-json";
|
|
7
|
-
import { getProjectConfigFromProjectRoot, getProjectRoot, getRoot } from "@storm-software/workspace-tools/utils/plugin-helpers";
|
|
8
|
-
import { addProjectTag, setDefaultProjectTags } from "@storm-software/workspace-tools/utils/project-tags";
|
|
9
|
-
import { getEnvPaths } from "@stryke/env/get-env-paths";
|
|
10
|
-
import { existsSync } from "@stryke/fs/exists";
|
|
11
|
-
import { murmurhash } from "@stryke/hash/murmurhash";
|
|
4
|
+
import defu$1 from "defu";
|
|
12
5
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
13
|
-
import { camelCase } from "@stryke/string-format/camel-case";
|
|
14
|
-
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
15
|
-
import { titleCase } from "@stryke/string-format/title-case";
|
|
16
6
|
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
17
7
|
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
8
|
+
import { existsSync } from "@stryke/fs/exists";
|
|
9
|
+
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
10
|
+
import { titleCase } from "@stryke/string-format/title-case";
|
|
11
|
+
import { camelCase } from "@stryke/string-format/camel-case";
|
|
12
|
+
import { getEnvPaths } from "@stryke/env/get-env-paths";
|
|
13
|
+
import { murmurhash } from "@stryke/hash/murmurhash";
|
|
18
14
|
import { createJiti } from "jiti";
|
|
19
15
|
import { readFile } from "node:fs/promises";
|
|
16
|
+
import { createNodesFromFiles } from "@nx/devkit";
|
|
17
|
+
import { withNamedInputs } from "@storm-software/workspace-tools/utils/nx-json";
|
|
18
|
+
import { getProjectConfigFromProjectRoot, getProjectRoot, getRoot } from "@storm-software/workspace-tools/utils/plugin-helpers";
|
|
19
|
+
import { addProjectTag, setDefaultProjectTags } from "@storm-software/workspace-tools/utils/project-tags";
|
|
20
20
|
import { readNxJson as readNxJson$1 } from "nx/src/config/nx-json.js";
|
|
21
21
|
import { readTargetsFromPackageJson } from "nx/src/utils/package-json.js";
|
|
22
|
-
import "@storm-software/config-tools/get-config";
|
|
23
|
-
import { appendPath } from "@stryke/path/append";
|
|
24
|
-
import { replacePath } from "@stryke/path/replace";
|
|
25
|
-
import { isFunction } from "@stryke/type-checks/is-function";
|
|
26
|
-
import { loadConfig } from "c12";
|
|
27
|
-
import "@stryke/convert/parse-type-definition";
|
|
28
|
-
import "@stryke/convert/to-array";
|
|
29
|
-
import "@stryke/helpers/get-unique";
|
|
30
|
-
import "@stryke/path/is-type";
|
|
31
|
-
import "@stryke/type-checks/is-object";
|
|
32
|
-
import "@stryke/type-checks/is-string";
|
|
33
|
-
import "@stryke/path/join";
|
|
34
|
-
import "@storm-software/config-tools/types";
|
|
35
|
-
import "@storm-software/config-tools/utilities/colors";
|
|
36
|
-
import "@stryke/helpers/noop";
|
|
37
|
-
import "chalk";
|
|
38
|
-
import "@stryke/fs/list-files";
|
|
39
|
-
import "@stryke/path/is-parent-path";
|
|
40
|
-
import "prettier";
|
|
41
|
-
import "@stryke/fs/read-file";
|
|
42
|
-
import "magic-string";
|
|
43
|
-
import Diff from "diff-match-patch";
|
|
44
|
-
import "@stryke/fs/write-file";
|
|
45
22
|
|
|
46
|
-
//#region ../core/src/lib/config.ts
|
|
47
|
-
/**
|
|
48
|
-
* Loads the user configuration file for the project.
|
|
49
|
-
*
|
|
50
|
-
* @param projectRoot - The root directory of the project.
|
|
51
|
-
* @param workspaceRoot - The root directory of the workspace.
|
|
52
|
-
* @param jiti - An instance of Jiti to resolve modules from
|
|
53
|
-
* @param command - The {@link PowerlinesCommand} string associated with the current running process
|
|
54
|
-
* @param mode - The mode in which the project is running (default is "production").
|
|
55
|
-
* @param configFile - An optional path to a specific configuration file.
|
|
56
|
-
* @param framework - The framework name to use for default configuration file names.
|
|
57
|
-
* @returns A promise that resolves to the resolved user configuration.
|
|
58
|
-
*/
|
|
59
|
-
async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
|
|
60
|
-
let resolvedUserConfig = {};
|
|
61
|
-
let resolvedUserConfigFile;
|
|
62
|
-
if (configFile) resolvedUserConfigFile = existsSync(replacePath(configFile, projectRoot)) ? replacePath(configFile, projectRoot) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), replacePath(configFile, projectRoot))) ? joinPaths(appendPath(projectRoot, workspaceRoot), replacePath(configFile, projectRoot)) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths(appendPath(projectRoot, workspaceRoot), configFile) : void 0;
|
|
63
|
-
if (!resolvedUserConfigFile) resolvedUserConfigFile = existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : existsSync(joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths(appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
|
|
64
|
-
if (resolvedUserConfigFile) {
|
|
65
|
-
const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
|
|
66
|
-
if (resolved) {
|
|
67
|
-
let config = {};
|
|
68
|
-
if (isFunction(resolved)) config = await Promise.resolve(resolved({
|
|
69
|
-
command,
|
|
70
|
-
mode,
|
|
71
|
-
isSsrBuild: false,
|
|
72
|
-
isPreview: false
|
|
73
|
-
}));
|
|
74
|
-
if (isSetObject(config)) resolvedUserConfig = {
|
|
75
|
-
...config,
|
|
76
|
-
config,
|
|
77
|
-
configFile: resolvedUserConfigFile
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
const result = await loadConfig({
|
|
82
|
-
cwd: projectRoot,
|
|
83
|
-
name: framework,
|
|
84
|
-
envName: mode,
|
|
85
|
-
globalRc: true,
|
|
86
|
-
packageJson: camelCase(framework),
|
|
87
|
-
dotenv: true,
|
|
88
|
-
jiti
|
|
89
|
-
});
|
|
90
|
-
return defu(resolvedUserConfig, isSetObject(result?.config) ? {
|
|
91
|
-
...result.config,
|
|
92
|
-
...result
|
|
93
|
-
} : {});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
//#endregion
|
|
97
|
-
//#region ../core/src/lib/constants/meta.ts
|
|
98
|
-
const ROOT_HASH_LENGTH = 45;
|
|
99
|
-
|
|
100
|
-
//#endregion
|
|
101
|
-
//#region ../core/src/lib/utilities/source-map.ts
|
|
102
|
-
const dmp = new Diff();
|
|
103
|
-
|
|
104
|
-
//#endregion
|
|
105
23
|
//#region src/helpers/plugin-utilities.ts
|
|
106
24
|
/**
|
|
107
25
|
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
@@ -328,7 +246,7 @@ function createNxPlugin(opts) {
|
|
|
328
246
|
setDefaultProjectTags(projectConfig, name);
|
|
329
247
|
addProjectTag(projectConfig, framework, userConfig.projectType || projectConfig.projectType || "library", { overwrite: true });
|
|
330
248
|
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
331
|
-
return { projects: { [root]: defu(projectConfig, {
|
|
249
|
+
return { projects: { [root]: defu$1(projectConfig, {
|
|
332
250
|
name: kebabCase(userConfig.name),
|
|
333
251
|
projectType: userConfig.projectType || "library",
|
|
334
252
|
root,
|
|
@@ -349,4 +267,4 @@ function createNxPlugin(opts) {
|
|
|
349
267
|
|
|
350
268
|
//#endregion
|
|
351
269
|
export { getNxPluginInputs as n, getNxTargetInputs as r, createNxPlugin as t };
|
|
352
|
-
//# sourceMappingURL=plugin-utilities-
|
|
270
|
+
//# sourceMappingURL=plugin-utilities-DGw6LPZ0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-utilities-DGw6LPZ0.mjs","names":["readNxJson","packageJson: PackageJson","targets: ProjectConfiguration[\"targets\"]","defu"],"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/murmurhash\";\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 outputPath: userConfig.output?.outputPath,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall\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 input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\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 input: userConfig.input,\n outputPath: userConfig.output?.outputPath,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\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 input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\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 input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\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 input: userConfig.input,\n projectType:\n userConfig.projectType || projectConfig.projectType,\n autoInstall: userConfig.autoInstall,\n skipCache: userConfig.skipCache\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 userConfig.projectType ||\n projectConfig.projectType ||\n \"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: userConfig.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,CA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;AAED,QAAM,IAAI,MACR,4BAA4B,MAAM,KAChC,QAAQ,MAAM,GACV,MAAM,UACN,YAAY,MAAM,GAChB,QACA,wCAER,EACE,OAAO,iBAAiB,QAAQ,QAAQ,QACzC,CACF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { t as NxPluginOptions } from "./plugin-Bpm6rlvQ.cjs";
|
|
2
|
+
import { CreateNodesV2 } from "@nx/devkit";
|
|
3
|
+
|
|
4
|
+
//#region src/helpers/plugin-utilities.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
8
|
+
*
|
|
9
|
+
* @param framework - The framework name to use in the input strings
|
|
10
|
+
* @returns An array of Nx input strings for the configuration file
|
|
11
|
+
*/
|
|
12
|
+
declare function getNxTargetInputs(framework: string): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
15
|
+
*
|
|
16
|
+
* @param framework - The framework name to use in the input strings
|
|
17
|
+
* @returns An array of Nx input strings for the configuration file
|
|
18
|
+
*/
|
|
19
|
+
declare function getNxPluginInputs(framework: string): string;
|
|
20
|
+
interface CreateNxPluginOptions {
|
|
21
|
+
/**
|
|
22
|
+
* The name of the Nx plugin to create
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* This will be used in logging and project tagging.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue "\{framework\}/plugin/nx"
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The folder where the generated runtime artifacts will be located
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
|
|
35
|
+
*
|
|
36
|
+
* @defaultValue "\{projectRoot\}/.powerlines"
|
|
37
|
+
*/
|
|
38
|
+
artifactsFolder?: string;
|
|
39
|
+
/**
|
|
40
|
+
* A string identifier that allows a child framework or tool to identify itself when using Powerlines.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* 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.
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue "powerlines"
|
|
46
|
+
*/
|
|
47
|
+
framework?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Creates an Nx plugin that integrates Powerlines into the Nx build process.
|
|
51
|
+
*
|
|
52
|
+
* @param opts - Options for creating the Nx plugin
|
|
53
|
+
* @returns A CreateNodesV2 function that can be used as an Nx plugin
|
|
54
|
+
*/
|
|
55
|
+
declare function createNxPlugin<TOptions extends NxPluginOptions = NxPluginOptions>(opts?: CreateNxPluginOptions): CreateNodesV2<TOptions>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { getNxTargetInputs as i, createNxPlugin as n, getNxPluginInputs as r, CreateNxPluginOptions as t };
|
|
58
|
+
//# sourceMappingURL=plugin-utilities-rlfzc3UW.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-utilities-rlfzc3UW.d.cts","names":[],"sources":["../../src/helpers/plugin-utilities.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkEA;AAUA;AAMA;AAsCA;AACmB,iBAvDH,iBAAA,CAuDG,SAAA,EAAA,MAAA,CAAA,EAAA,MAAA,EAAA;;;;;;;iBA7CH,iBAAA;UAMC,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsCD,gCACG,kBAAkB,wBAC5B,wBAAwB,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-BSBH78mm.cjs');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as NxPluginOptions } from "
|
|
1
|
+
import { t as NxPluginOptions } from "../plugin-Bpm6rlvQ.cjs";
|
|
2
2
|
export { NxPluginOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as NxPluginOptions } from "
|
|
1
|
+
import { t as NxPluginOptions } from "../plugin-DK05gCB5.mjs";
|
|
2
2
|
export { NxPluginOptions };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_base_executor_untyped = require('./base-executor.untyped-
|
|
1
|
+
const require_config = require('./config-Dkb72RJI.cjs');
|
|
2
|
+
const require_base_executor_untyped = require('./base-executor.untyped-CDbDTHgS.cjs');
|
|
3
3
|
let untyped = require("untyped");
|
|
4
4
|
|
|
5
5
|
//#region src/executors/prepare/untyped.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as base_executor_untyped_default } from "./base-executor.untyped-
|
|
1
|
+
import { t as base_executor_untyped_default } from "./base-executor.untyped-BKF-oUZS.mjs";
|
|
2
2
|
import { defineUntypedSchema } from "untyped";
|
|
3
3
|
|
|
4
4
|
//#region src/executors/prepare/untyped.ts
|
|
@@ -24,4 +24,4 @@ var untyped_default = defineUntypedSchema({
|
|
|
24
24
|
|
|
25
25
|
//#endregion
|
|
26
26
|
export { untyped_default as t };
|
|
27
|
-
//# sourceMappingURL=untyped-
|
|
27
|
+
//# sourceMappingURL=untyped-DCpTmHDS.mjs.map
|