@powerlines/nx 0.11.221 → 0.11.223
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/CHANGELOG.md +21 -0
- package/dist/{src/base/base-executor.d.ts → base-executor-BKuqWAnc.d.mts} +14 -12
- package/dist/base-executor-BKuqWAnc.d.mts.map +1 -0
- package/dist/base-executor-CL9md5FK.d.cts +28 -0
- package/dist/base-executor-CL9md5FK.d.cts.map +1 -0
- package/dist/base-executor-DIVmWt0_.mjs +76 -0
- package/dist/base-executor-DIVmWt0_.mjs.map +1 -0
- package/dist/base-executor-hfeykVFL.cjs +83 -0
- package/dist/base-executor.schema-CH9f7UZz.d.cts +131 -0
- package/dist/base-executor.schema-CH9f7UZz.d.cts.map +1 -0
- package/dist/base-executor.schema-LJ14f-QU.d.mts +131 -0
- package/dist/base-executor.schema-LJ14f-QU.d.mts.map +1 -0
- package/dist/base-executor.untyped-Bet42T8_.mjs +139 -0
- package/dist/base-executor.untyped-Bet42T8_.mjs.map +1 -0
- package/dist/base-executor.untyped-DUgXmZji.cjs +144 -0
- package/dist/chunk-CbDLau6x.cjs +34 -0
- package/dist/constants-BHT2TeEj.cjs +39 -0
- package/dist/constants-DPeeG_si.mjs +34 -0
- package/dist/constants-DPeeG_si.mjs.map +1 -0
- package/dist/executor-9aTY5L1O.d.mts +155 -0
- package/dist/executor-9aTY5L1O.d.mts.map +1 -0
- package/dist/executor-BA-Xvw_2.cjs +23 -0
- package/dist/executor-BDu-MfKS.d.cts +155 -0
- package/dist/executor-BDu-MfKS.d.cts.map +1 -0
- package/dist/executor-BaJuosQ2.d.cts +139 -0
- package/dist/executor-BaJuosQ2.d.cts.map +1 -0
- package/dist/executor-BerELzzO.d.cts +165 -0
- package/dist/executor-BerELzzO.d.cts.map +1 -0
- package/dist/executor-C12a2R2m.d.mts +165 -0
- package/dist/executor-C12a2R2m.d.mts.map +1 -0
- package/dist/executor-CQoHBvIx.d.mts +155 -0
- package/dist/executor-CQoHBvIx.d.mts.map +1 -0
- package/dist/executor-CR4F9h0Q.mjs +13 -0
- package/dist/executor-CR4F9h0Q.mjs.map +1 -0
- package/dist/executor-CmOJDW7i.cjs +30 -0
- package/dist/executor-CsYeTG7f.d.mts +155 -0
- package/dist/executor-CsYeTG7f.d.mts.map +1 -0
- package/dist/executor-DXs-DQDq.cjs +23 -0
- package/dist/executor-DY3Q5btA.mjs +18 -0
- package/dist/executor-DY3Q5btA.mjs.map +1 -0
- package/dist/executor-DaM4shEF.d.mts +139 -0
- package/dist/executor-DaM4shEF.d.mts.map +1 -0
- package/dist/executor-DriX4F9a.mjs +13 -0
- package/dist/executor-DriX4F9a.mjs.map +1 -0
- package/dist/executor-DupYdy7P.cjs +23 -0
- package/dist/executor-_6Wimayo.d.cts +155 -0
- package/dist/executor-_6Wimayo.d.cts.map +1 -0
- package/dist/executor-dakLe5jY.mjs +13 -0
- package/dist/executor-dakLe5jY.mjs.map +1 -0
- package/dist/executor-gauQV_Qs.mjs +18 -0
- package/dist/executor-gauQV_Qs.mjs.map +1 -0
- package/dist/executor-q94V36zQ.d.cts +155 -0
- package/dist/executor-q94V36zQ.d.cts.map +1 -0
- package/dist/executor-tEMakUYi.cjs +30 -0
- package/dist/executors-C15iG1sF.mjs +1 -0
- package/dist/executors-D7478W2S.cjs +0 -0
- package/dist/executors-YbcSXKr5.d.mts +1 -0
- package/dist/executors-hX1C9GbI.d.cts +1 -0
- package/dist/executors.cjs +13 -0
- package/dist/executors.d.cts +9 -0
- package/dist/executors.d.mts +9 -11
- package/dist/executors.mjs +9 -9
- package/dist/generator-DeiwVUqC.mjs +11 -0
- package/dist/generator-DeiwVUqC.mjs.map +1 -0
- package/dist/generator-Dv37nXlF.d.cts +8 -0
- package/dist/generator-Dv37nXlF.d.cts.map +1 -0
- package/dist/generator-Uu2ErkQj.cjs +22 -0
- package/dist/generator-aA0eb35E.d.mts +8 -0
- package/dist/generator-aA0eb35E.d.mts.map +1 -0
- package/dist/generators-B8_tB0mD.d.cts +17 -0
- package/dist/generators-B8_tB0mD.d.cts.map +1 -0
- package/dist/generators-Bi9wzfNx.mjs +1 -0
- package/dist/generators-DymCAfYw.d.mts +17 -0
- package/dist/generators-DymCAfYw.d.mts.map +1 -0
- package/dist/generators-q39_jUCw.cjs +0 -0
- package/dist/generators.cjs +5 -0
- package/dist/generators.d.cts +3 -0
- package/dist/generators.d.mts +3 -19
- package/dist/generators.mjs +4 -3
- package/dist/index-BAMQksFF.d.mts +8 -0
- package/dist/index-BAMQksFF.d.mts.map +1 -0
- package/dist/index-C5yJ9lGj.d.cts +8 -0
- package/dist/index-C5yJ9lGj.d.cts.map +1 -0
- package/dist/index.cjs +21 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.mts +13 -16
- package/dist/index.mjs +14 -14
- package/dist/plugin-A9gAUguP.cjs +12 -0
- package/dist/plugin-CODFOru1.d.cts +243 -0
- package/dist/plugin-CODFOru1.d.cts.map +1 -0
- package/dist/plugin-Dbr_Q4yi.mjs +8 -0
- package/dist/plugin-Dbr_Q4yi.mjs.map +1 -0
- package/dist/plugin-DpjoI0QS.d.mts +243 -0
- package/dist/plugin-DpjoI0QS.d.mts.map +1 -0
- package/dist/plugin-utilities-Ci8AHf-K.mjs +347 -0
- package/dist/plugin-utilities-Ci8AHf-K.mjs.map +1 -0
- package/dist/plugin-utilities-Ddlc3SiI.cjs +366 -0
- package/dist/src/base/base-executor.cjs +3 -0
- package/dist/src/base/base-executor.d.cts +3 -0
- package/dist/src/base/base-executor.d.mts +3 -26
- package/dist/src/base/base-executor.mjs +3 -3
- package/dist/src/base/base-executor.schema.d.cjs +0 -0
- package/dist/src/base/base-executor.schema.d.cts +2 -0
- package/dist/src/base/base-executor.schema.d.mts +2 -0
- package/dist/src/base/base-executor.untyped.cjs +3 -0
- package/dist/src/base/base-executor.untyped.d.cts +6 -0
- package/dist/src/base/base-executor.untyped.d.cts.map +1 -0
- package/dist/src/base/base-executor.untyped.d.mts +5 -3
- package/dist/src/base/base-executor.untyped.d.mts.map +1 -0
- package/dist/src/base/base-executor.untyped.mjs +3 -2
- package/dist/src/executors/build/executor.cjs +6 -0
- package/dist/src/executors/build/executor.d.cts +4 -0
- package/dist/src/executors/build/executor.d.mts +4 -7
- package/dist/src/executors/build/executor.mjs +4 -4
- package/dist/src/executors/build/untyped.cjs +26 -0
- package/dist/src/executors/build/untyped.d.cts +6 -0
- package/dist/src/executors/build/untyped.d.cts.map +1 -0
- package/dist/src/executors/build/untyped.d.mts +5 -3
- package/dist/src/executors/build/untyped.d.mts.map +1 -0
- package/dist/src/executors/build/untyped.mjs +23 -30
- package/dist/src/executors/build/untyped.mjs.map +1 -0
- package/dist/src/executors/clean/executor.cjs +6 -0
- package/dist/src/executors/clean/executor.d.cts +4 -0
- package/dist/src/executors/clean/executor.d.mts +4 -7
- package/dist/src/executors/clean/executor.mjs +4 -4
- package/dist/src/executors/clean/untyped.cjs +17 -0
- package/dist/src/executors/clean/untyped.d.cts +6 -0
- package/dist/src/executors/clean/untyped.d.cts.map +1 -0
- package/dist/src/executors/clean/untyped.d.mts +5 -3
- package/dist/src/executors/clean/untyped.d.mts.map +1 -0
- package/dist/src/executors/clean/untyped.mjs +12 -10
- package/dist/src/executors/clean/untyped.mjs.map +1 -0
- package/dist/src/executors/docs/executor.cjs +6 -0
- package/dist/src/executors/docs/executor.d.cts +4 -0
- package/dist/src/executors/docs/executor.d.mts +4 -7
- package/dist/src/executors/docs/executor.mjs +4 -4
- package/dist/src/executors/docs/untyped.cjs +18 -0
- package/dist/src/executors/docs/untyped.d.cts +6 -0
- package/dist/src/executors/docs/untyped.d.cts.map +1 -0
- package/dist/src/executors/docs/untyped.d.mts +5 -3
- package/dist/src/executors/docs/untyped.d.mts.map +1 -0
- package/dist/src/executors/docs/untyped.mjs +15 -13
- package/dist/src/executors/docs/untyped.mjs.map +1 -0
- package/dist/src/executors/lint/executor.cjs +6 -0
- package/dist/src/executors/lint/executor.d.cts +4 -0
- package/dist/src/executors/lint/executor.d.mts +4 -7
- package/dist/src/executors/lint/executor.mjs +4 -4
- package/dist/src/executors/lint/untyped.cjs +18 -0
- package/dist/src/executors/lint/untyped.d.cts +6 -0
- package/dist/src/executors/lint/untyped.d.cts.map +1 -0
- package/dist/src/executors/lint/untyped.d.mts +5 -3
- package/dist/src/executors/lint/untyped.d.mts.map +1 -0
- package/dist/src/executors/lint/untyped.mjs +15 -13
- package/dist/src/executors/lint/untyped.mjs.map +1 -0
- package/dist/src/executors/prepare/executor.cjs +6 -0
- package/dist/src/executors/prepare/executor.d.cts +4 -0
- package/dist/src/executors/prepare/executor.d.mts +4 -7
- package/dist/src/executors/prepare/executor.mjs +4 -4
- package/dist/src/executors/prepare/untyped.cjs +4 -0
- package/dist/src/executors/prepare/untyped.d.cts +6 -0
- package/dist/src/executors/prepare/untyped.d.cts.map +1 -0
- package/dist/src/executors/prepare/untyped.d.mts +5 -3
- package/dist/src/executors/prepare/untyped.d.mts.map +1 -0
- package/dist/src/executors/prepare/untyped.mjs +4 -3
- package/dist/src/generators/sync/generator.cjs +5 -0
- package/dist/src/generators/sync/generator.d.cts +2 -0
- package/dist/src/generators/sync/generator.d.mts +2 -6
- package/dist/src/generators/sync/generator.mjs +3 -2
- package/dist/src/generators/sync/untyped.cjs +23 -0
- package/dist/src/generators/sync/untyped.d.cts +6 -0
- package/dist/src/generators/sync/untyped.d.cts.map +1 -0
- package/dist/src/generators/sync/untyped.d.mts +5 -3
- package/dist/src/generators/sync/untyped.d.mts.map +1 -0
- package/dist/src/generators/sync/untyped.mjs +18 -16
- package/dist/src/generators/sync/untyped.mjs.map +1 -0
- package/dist/src/helpers/constants.cjs +3 -0
- package/dist/src/helpers/{constants.d.ts → constants.d.cts} +3 -1
- package/dist/src/helpers/constants.d.cts.map +1 -0
- package/dist/src/helpers/constants.d.mts +3 -1
- package/dist/src/helpers/constants.d.mts.map +1 -0
- package/dist/src/helpers/constants.mjs +3 -2
- package/dist/src/helpers/plugin-utilities.cjs +6 -0
- package/dist/src/helpers/plugin-utilities.d.cts +58 -0
- package/dist/src/helpers/plugin-utilities.d.cts.map +1 -0
- package/dist/src/helpers/plugin-utilities.d.mts +34 -31
- package/dist/src/helpers/plugin-utilities.d.mts.map +1 -0
- package/dist/src/helpers/plugin-utilities.mjs +4 -4
- package/dist/src/plugin/index.cjs +5 -0
- package/dist/src/plugin/index.d.cts +3 -0
- package/dist/src/plugin/index.d.mts +3 -6
- package/dist/src/plugin/index.mjs +5 -5
- package/dist/src/types/plugin.cjs +0 -0
- package/dist/src/types/plugin.d.cts +2 -0
- package/dist/src/types/plugin.d.mts +2 -241
- package/dist/src/types/plugin.mjs +1 -1
- package/dist/untyped-BIEzjl_J.mjs +27 -0
- package/dist/untyped-BIEzjl_J.mjs.map +1 -0
- package/dist/untyped-DKPJSDgJ.cjs +32 -0
- package/executors.json +1 -1
- package/generators.json +1 -1
- package/package.json +117 -88
- package/dist/chunk-23KFTIT2.mjs +0 -1
- package/dist/chunk-326QB2VK.mjs +0 -14
- package/dist/chunk-3BI2YVJ3.js +0 -156
- package/dist/chunk-3D3MU5VP.js +0 -26
- package/dist/chunk-4OMPO3GC.mjs +0 -154
- package/dist/chunk-ADMWJVSB.js +0 -374
- package/dist/chunk-DXL4NVUO.js +0 -18
- package/dist/chunk-F4QJKUNK.js +0 -18
- package/dist/chunk-GCIPEE4T.mjs +0 -28
- package/dist/chunk-IC47MFKB.mjs +0 -29
- package/dist/chunk-IDXFQ2WL.mjs +0 -15
- package/dist/chunk-IOBDAGVL.js +0 -30
- package/dist/chunk-IQVSZEQ6.js +0 -31
- package/dist/chunk-N2YKXZ5R.js +0 -2
- package/dist/chunk-NB2KHU33.mjs +0 -19
- package/dist/chunk-NXR5JH7F.js +0 -10
- package/dist/chunk-O6YSETKJ.mjs +0 -4
- package/dist/chunk-P5X6KXLE.js +0 -26
- package/dist/chunk-PKGTRC56.mjs +0 -15
- package/dist/chunk-PMQ5YVLP.js +0 -18
- package/dist/chunk-R577MOZR.js +0 -4928
- package/dist/chunk-RBIHD4JS.mjs +0 -4900
- package/dist/chunk-RLODK6TM.js +0 -281
- package/dist/chunk-RLYU2FOM.mjs +0 -366
- package/dist/chunk-SHUYVCID.js +0 -6
- package/dist/chunk-SQV3SFA4.mjs +0 -8
- package/dist/chunk-UV4HQO3Y.mjs +0 -1
- package/dist/chunk-W75JGXP2.mjs +0 -260
- package/dist/chunk-WIPWBPB3.mjs +0 -19
- package/dist/chunk-WUJKJGEW.js +0 -17
- package/dist/chunk-XO62WWX4.js +0 -2
- package/dist/chunk-ZERXJ7S6.mjs +0 -15
- package/dist/executor-AQVlPFta.d.ts +0 -163
- package/dist/executor-BNmIhtpF.d.mts +0 -153
- package/dist/executor-C0A5mFLO.d.mts +0 -137
- package/dist/executor-Cep8-Y3A.d.mts +0 -153
- package/dist/executor-CkyahICv.d.ts +0 -137
- package/dist/executor-DOsxw-Ih.d.ts +0 -153
- package/dist/executor-DUQbjUVt.d.ts +0 -153
- package/dist/executor-O3MDQSFT.d.ts +0 -153
- package/dist/executor-U4mVkhQK.d.mts +0 -163
- package/dist/executor-Xt5qNzC5.d.mts +0 -153
- package/dist/executors.d.ts +0 -11
- package/dist/executors.js +0 -34
- package/dist/generators.d.ts +0 -19
- package/dist/generators.js +0 -16
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -51
- package/dist/src/base/base-executor.js +0 -12
- package/dist/src/base/base-executor.schema.d.d.mts +0 -129
- package/dist/src/base/base-executor.schema.d.d.ts +0 -129
- package/dist/src/base/base-executor.schema.d.js +0 -2
- package/dist/src/base/base-executor.schema.d.mjs +0 -1
- package/dist/src/base/base-executor.untyped.d.ts +0 -5
- package/dist/src/base/base-executor.untyped.js +0 -10
- package/dist/src/executors/build/executor.d.ts +0 -7
- package/dist/src/executors/build/executor.js +0 -19
- package/dist/src/executors/build/untyped.d.ts +0 -5
- package/dist/src/executors/build/untyped.js +0 -37
- package/dist/src/executors/clean/executor.d.ts +0 -7
- package/dist/src/executors/clean/executor.js +0 -19
- package/dist/src/executors/clean/untyped.d.ts +0 -5
- package/dist/src/executors/clean/untyped.js +0 -19
- package/dist/src/executors/docs/executor.d.ts +0 -7
- package/dist/src/executors/docs/executor.js +0 -19
- package/dist/src/executors/docs/untyped.d.ts +0 -5
- package/dist/src/executors/docs/untyped.js +0 -20
- package/dist/src/executors/lint/executor.d.ts +0 -7
- package/dist/src/executors/lint/executor.js +0 -19
- package/dist/src/executors/lint/untyped.d.ts +0 -5
- package/dist/src/executors/lint/untyped.js +0 -20
- package/dist/src/executors/prepare/executor.d.ts +0 -7
- package/dist/src/executors/prepare/executor.js +0 -19
- package/dist/src/executors/prepare/untyped.d.ts +0 -5
- package/dist/src/executors/prepare/untyped.js +0 -11
- package/dist/src/generators/sync/generator.d.ts +0 -6
- package/dist/src/generators/sync/generator.js +0 -17
- package/dist/src/generators/sync/untyped.d.ts +0 -5
- package/dist/src/generators/sync/untyped.js +0 -25
- package/dist/src/helpers/constants.js +0 -11
- package/dist/src/helpers/plugin-utilities.d.ts +0 -55
- package/dist/src/helpers/plugin-utilities.js +0 -21
- package/dist/src/plugin/index.d.ts +0 -6
- package/dist/src/plugin/index.js +0 -14
- package/dist/src/types/plugin.d.ts +0 -241
- package/dist/src/types/plugin.js +0 -2
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
+
const require_constants = require('./constants-BHT2TeEj.cjs');
|
|
3
|
+
let defu = require("defu");
|
|
4
|
+
defu = require_chunk.__toESM(defu);
|
|
5
|
+
let __storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
|
|
6
|
+
let __stryke_type_checks_is_error = require("@stryke/type-checks/is-error");
|
|
7
|
+
let __nx_devkit = require("@nx/devkit");
|
|
8
|
+
let __storm_software_workspace_tools_utils_nx_json = require("@storm-software/workspace-tools/utils/nx-json");
|
|
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");
|
|
14
|
+
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
15
|
+
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
16
|
+
let __stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
17
|
+
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
18
|
+
let jiti = require("jiti");
|
|
19
|
+
let node_fs_promises = require("node:fs/promises");
|
|
20
|
+
let nx_src_config_nx_json_js = require("nx/src/config/nx-json.js");
|
|
21
|
+
let nx_src_utils_package_json_js = require("nx/src/utils/package-json.js");
|
|
22
|
+
require("@storm-software/config-tools/get-config");
|
|
23
|
+
let __stryke_path_append = require("@stryke/path/append");
|
|
24
|
+
let __stryke_path_replace = require("@stryke/path/replace");
|
|
25
|
+
let __stryke_type_checks_is_function = require("@stryke/type-checks/is-function");
|
|
26
|
+
let c12 = require("c12");
|
|
27
|
+
require("@stryke/convert/parse-type-definition");
|
|
28
|
+
require("@stryke/convert/to-array");
|
|
29
|
+
require("@stryke/helpers/get-unique");
|
|
30
|
+
require("@stryke/path/is-type");
|
|
31
|
+
require("@stryke/type-checks/is-object");
|
|
32
|
+
require("@stryke/type-checks/is-regexp");
|
|
33
|
+
require("@stryke/type-checks/is-set-string");
|
|
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: true,
|
|
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
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/helpers/plugin-utilities.ts
|
|
109
|
+
/**
|
|
110
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
111
|
+
*
|
|
112
|
+
* @param framework - The framework name to use in the input strings
|
|
113
|
+
* @returns An array of Nx input strings for the configuration file
|
|
114
|
+
*/
|
|
115
|
+
function getNxTargetInputs(framework) {
|
|
116
|
+
return require_constants.CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Generates Nx input strings for the Powerlines configuration file, replacing the `{framework}` placeholder with the specified framework name.
|
|
120
|
+
*
|
|
121
|
+
* @param framework - The framework name to use in the input strings
|
|
122
|
+
* @returns An array of Nx input strings for the configuration file
|
|
123
|
+
*/
|
|
124
|
+
function getNxPluginInputs(framework) {
|
|
125
|
+
return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Creates an Nx plugin that integrates Powerlines into the Nx build process.
|
|
129
|
+
*
|
|
130
|
+
* @param opts - Options for creating the Nx plugin
|
|
131
|
+
* @returns A CreateNodesV2 function that can be used as an Nx plugin
|
|
132
|
+
*/
|
|
133
|
+
function createNxPlugin(opts) {
|
|
134
|
+
const framework = opts?.framework || "powerlines";
|
|
135
|
+
const title = `${(0, __stryke_string_format_title_case.titleCase)(framework)} Nx Plugin`;
|
|
136
|
+
try {
|
|
137
|
+
const name = opts?.name || `${framework}/nx/plugin`;
|
|
138
|
+
const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
|
|
139
|
+
const targetInputs = getNxTargetInputs(framework);
|
|
140
|
+
const pluginInputs = getNxPluginInputs(framework);
|
|
141
|
+
return [pluginInputs, async (configFiles, options, contextV2) => {
|
|
142
|
+
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`);
|
|
143
|
+
const envPaths = (0, __stryke_env_get_env_paths.getEnvPaths)({
|
|
144
|
+
orgId: "storm-software",
|
|
145
|
+
appId: framework,
|
|
146
|
+
workspaceRoot: contextV2.workspaceRoot
|
|
147
|
+
});
|
|
148
|
+
if (!envPaths.cache) throw new Error("The cache directory could not be determined.");
|
|
149
|
+
const nxJson = (0, nx_src_config_nx_json_js.readNxJson)(contextV2.workspaceRoot);
|
|
150
|
+
const resolver = (0, jiti.createJiti)(contextV2.workspaceRoot, {
|
|
151
|
+
debug: !!options?.debug,
|
|
152
|
+
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"),
|
|
154
|
+
moduleCache: true
|
|
155
|
+
});
|
|
156
|
+
return (0, __nx_devkit.createNodesFromFiles)(async (configFile, _, context) => {
|
|
157
|
+
try {
|
|
158
|
+
const projectRoot = (0, __storm_software_workspace_tools_utils_plugin_helpers.getProjectRoot)(configFile, contextV2.workspaceRoot);
|
|
159
|
+
if (!projectRoot) {
|
|
160
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - package.json and ${framework} configuration files (i.e. ${framework}.config.ts) must be located in the project root directory: ${configFile}`);
|
|
161
|
+
return {};
|
|
162
|
+
}
|
|
163
|
+
const root = (0, __storm_software_workspace_tools_utils_plugin_helpers.getRoot)(projectRoot, context);
|
|
164
|
+
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
|
|
165
|
+
const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
|
|
166
|
+
if (!(0, __stryke_fs_exists.existsSync)((0, __stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot, "package.json"))) {
|
|
167
|
+
if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${(0, __stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
|
|
168
|
+
return {};
|
|
169
|
+
}
|
|
170
|
+
const packageJsonContent = await (0, node_fs_promises.readFile)((0, __stryke_path_join_paths.joinPaths)(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
|
|
171
|
+
if (!packageJsonContent) {
|
|
172
|
+
if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
|
|
173
|
+
return {};
|
|
174
|
+
}
|
|
175
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
176
|
+
if (!userConfig.configFile && !packageJson?.storm) {
|
|
177
|
+
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
|
|
178
|
+
return {};
|
|
179
|
+
}
|
|
180
|
+
const projectConfig = (0, __storm_software_workspace_tools_utils_plugin_helpers.getProjectConfigFromProjectRoot)(projectRoot, packageJson);
|
|
181
|
+
if (!projectConfig) {
|
|
182
|
+
if (options?.verboseOutput) console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
|
|
183
|
+
return {};
|
|
184
|
+
}
|
|
185
|
+
const targets = (0, nx_src_utils_package_json_js.readTargetsFromPackageJson)(packageJson, nxJson, projectRoot, context.workspaceRoot);
|
|
186
|
+
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
|
|
187
|
+
if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) targets[options?.clean?.targetName || "clean"] = {
|
|
188
|
+
cache: true,
|
|
189
|
+
inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : (0, __storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.clean?.inputs || "typescript"]),
|
|
190
|
+
outputs: options?.clean?.outputs,
|
|
191
|
+
executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
|
|
192
|
+
dependsOn: options?.clean?.dependsOn ?? [`^${options?.clean?.targetName || "clean"}`],
|
|
193
|
+
defaultConfiguration: options?.clean?.defaultConfiguration || "production",
|
|
194
|
+
options: {
|
|
195
|
+
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
196
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
197
|
+
autoInstall: userConfig.autoInstall
|
|
198
|
+
},
|
|
199
|
+
configurations: {
|
|
200
|
+
production: { mode: "production" },
|
|
201
|
+
test: { mode: "test" },
|
|
202
|
+
development: {
|
|
203
|
+
mode: "development",
|
|
204
|
+
skipCache: true
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) targets[options?.prepare?.targetName || "prepare"] = {
|
|
209
|
+
cache: true,
|
|
210
|
+
inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : (0, __storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.prepare?.inputs || "typescript"]),
|
|
211
|
+
outputs: options?.prepare?.outputs ?? [artifactsFolder],
|
|
212
|
+
executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
|
|
213
|
+
dependsOn: options?.prepare?.dependsOn ?? [`^${options?.prepare?.targetName || "build"}`, options?.clean !== false && `${options?.clean?.targetName || "clean"}`].filter(Boolean),
|
|
214
|
+
defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
|
|
215
|
+
options: {
|
|
216
|
+
input: userConfig.input,
|
|
217
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
218
|
+
autoInstall: userConfig.autoInstall,
|
|
219
|
+
skipCache: userConfig.skipCache
|
|
220
|
+
},
|
|
221
|
+
configurations: {
|
|
222
|
+
production: { mode: "production" },
|
|
223
|
+
test: { mode: "test" },
|
|
224
|
+
development: {
|
|
225
|
+
mode: "development",
|
|
226
|
+
skipCache: true
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
if (options?.build !== false && !targets[options?.build?.targetName || "build"]) targets[options?.build?.targetName || "build"] = {
|
|
231
|
+
cache: true,
|
|
232
|
+
inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : (0, __storm_software_workspace_tools_utils_nx_json.withNamedInputs)(targetInputs, [options?.build?.inputs || "typescript"]),
|
|
233
|
+
outputs: options?.build?.outputs ?? ["{options.outputPath}"],
|
|
234
|
+
executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
|
|
235
|
+
dependsOn: options?.build?.dependsOn ?? [`^${options?.build?.targetName || "build"}`, userConfig.skipCache ? void 0 : (0, __stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
|
|
236
|
+
defaultConfiguration: options?.build?.defaultConfiguration || "production",
|
|
237
|
+
options: {
|
|
238
|
+
input: userConfig.input,
|
|
239
|
+
outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
|
|
240
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
241
|
+
autoInstall: userConfig.autoInstall,
|
|
242
|
+
skipCache: userConfig.skipCache
|
|
243
|
+
},
|
|
244
|
+
configurations: {
|
|
245
|
+
production: { mode: "production" },
|
|
246
|
+
test: { mode: "test" },
|
|
247
|
+
development: {
|
|
248
|
+
mode: "development",
|
|
249
|
+
skipCache: true
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) targets[options?.lint?.targetName || "lint"] = {
|
|
254
|
+
cache: true,
|
|
255
|
+
inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : (0, __storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.lint?.inputs ? [options.lint.inputs] : ["linting", "typescript"]),
|
|
256
|
+
outputs: options?.lint?.outputs ?? ["{options.outputPath}"],
|
|
257
|
+
executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
|
|
258
|
+
dependsOn: options?.lint?.dependsOn ?? [`^${options?.lint?.targetName || "lint"}`, userConfig.skipCache ? void 0 : (0, __stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"].filter(Boolean),
|
|
259
|
+
defaultConfiguration: options?.lint?.defaultConfiguration || "production",
|
|
260
|
+
options: {
|
|
261
|
+
input: userConfig.input,
|
|
262
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
263
|
+
autoInstall: userConfig.autoInstall,
|
|
264
|
+
skipCache: userConfig.skipCache
|
|
265
|
+
},
|
|
266
|
+
configurations: {
|
|
267
|
+
production: { mode: "production" },
|
|
268
|
+
test: { mode: "test" },
|
|
269
|
+
development: {
|
|
270
|
+
mode: "development",
|
|
271
|
+
skipCache: true
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) targets[options?.docs?.targetName || "docs"] = {
|
|
276
|
+
cache: true,
|
|
277
|
+
inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : (0, __storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.docs?.inputs ? [options.docs.inputs] : ["documentation", "typescript"]),
|
|
278
|
+
outputs: options?.docs?.outputs ?? ["{options.outputPath}"],
|
|
279
|
+
executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
|
|
280
|
+
dependsOn: options?.docs?.dependsOn ?? [
|
|
281
|
+
`^${options?.docs?.targetName || "docs"}`,
|
|
282
|
+
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
283
|
+
userConfig.skipCache ? void 0 : (0, __stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
284
|
+
].filter(Boolean),
|
|
285
|
+
defaultConfiguration: options?.docs?.defaultConfiguration || "production",
|
|
286
|
+
options: {
|
|
287
|
+
input: userConfig.input,
|
|
288
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
289
|
+
autoInstall: userConfig.autoInstall,
|
|
290
|
+
skipCache: userConfig.skipCache
|
|
291
|
+
},
|
|
292
|
+
configurations: {
|
|
293
|
+
production: { mode: "production" },
|
|
294
|
+
test: { mode: "test" },
|
|
295
|
+
development: {
|
|
296
|
+
mode: "development",
|
|
297
|
+
skipCache: true
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) targets[options?.deploy?.targetName || "deploy"] = {
|
|
302
|
+
inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : (0, __storm_software_workspace_tools_utils_nx_json.withNamedInputs)([...targetInputs, artifactsFolder], options?.deploy?.inputs ? [options.deploy.inputs] : ["documentation", "typescript"]),
|
|
303
|
+
outputs: options?.deploy?.outputs ?? ["{options.outputPath}"],
|
|
304
|
+
executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
|
|
305
|
+
dependsOn: options?.deploy?.dependsOn ?? [
|
|
306
|
+
`^${options?.deploy?.targetName || "deploy"}`,
|
|
307
|
+
options?.build !== false && `${options?.build?.targetName || "build"}`,
|
|
308
|
+
userConfig.skipCache ? void 0 : (0, __stryke_type_checks_is_set_object.isSetObject)(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
|
|
309
|
+
].filter(Boolean),
|
|
310
|
+
defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
|
|
311
|
+
options: {
|
|
312
|
+
input: userConfig.input,
|
|
313
|
+
projectType: projectConfig.projectType || userConfig.projectType,
|
|
314
|
+
autoInstall: userConfig.autoInstall,
|
|
315
|
+
skipCache: userConfig.skipCache
|
|
316
|
+
},
|
|
317
|
+
configurations: {
|
|
318
|
+
production: { mode: "production" },
|
|
319
|
+
test: { mode: "test" },
|
|
320
|
+
development: {
|
|
321
|
+
mode: "development",
|
|
322
|
+
skipCache: true
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
(0, __storm_software_workspace_tools_utils_project_tags.setDefaultProjectTags)(projectConfig, name);
|
|
327
|
+
(0, __storm_software_workspace_tools_utils_project_tags.addProjectTag)(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", { overwrite: true });
|
|
328
|
+
if (options?.verboseOutput) console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
|
|
329
|
+
return { projects: { [root]: (0, defu.default)(projectConfig, {
|
|
330
|
+
name: (0, __stryke_string_format_kebab_case.kebabCase)(userConfig.name),
|
|
331
|
+
projectType: userConfig.projectType || "library",
|
|
332
|
+
root,
|
|
333
|
+
sourceRoot: (0, __stryke_path_join_paths.joinPaths)(root, "src"),
|
|
334
|
+
targets
|
|
335
|
+
}) } };
|
|
336
|
+
} catch (error) {
|
|
337
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : "Unknown fatal error"}`);
|
|
338
|
+
throw new Error(`The ${title} failed to process the project configuration for file ${configFile}. See previous logs for more details.`, { cause: error instanceof Error ? error : void 0 });
|
|
339
|
+
}
|
|
340
|
+
}, configFiles, options, contextV2);
|
|
341
|
+
}];
|
|
342
|
+
} catch (error) {
|
|
343
|
+
console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${(0, __stryke_type_checks_is_error.isError)(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
|
|
344
|
+
throw new Error(`Failed to initialize the ${title}. See previous logs for more details.`, { cause: error instanceof Error ? error : void 0 });
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
//#endregion
|
|
349
|
+
Object.defineProperty(exports, 'createNxPlugin', {
|
|
350
|
+
enumerable: true,
|
|
351
|
+
get: function () {
|
|
352
|
+
return createNxPlugin;
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
Object.defineProperty(exports, 'getNxPluginInputs', {
|
|
356
|
+
enumerable: true,
|
|
357
|
+
get: function () {
|
|
358
|
+
return getNxPluginInputs;
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
Object.defineProperty(exports, 'getNxTargetInputs', {
|
|
362
|
+
enumerable: true,
|
|
363
|
+
get: function () {
|
|
364
|
+
return getNxTargetInputs;
|
|
365
|
+
}
|
|
366
|
+
});
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import PowerlinesAPI, { PowerlinesCommand, InlineConfig } from 'powerlines';
|
|
5
|
-
import { BaseExecutorSchema } from './base-executor.schema.d.mjs';
|
|
6
|
-
|
|
7
|
-
type PowerlinesExecutorContext<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = ExecutorContext & {
|
|
8
|
-
projectName: string;
|
|
9
|
-
command: TCommand;
|
|
10
|
-
options: TExecutorSchema;
|
|
11
|
-
inlineConfig: InlineConfig;
|
|
12
|
-
workspaceConfig: StormWorkspaceConfig;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* A utility function to create a Powerlines executor that can be used with the `withRunExecutor` function.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* This function is designed to simplify the creation of Powerlines executors by providing a consistent interface and error handling.
|
|
19
|
-
*
|
|
20
|
-
* @param command - The command that the executor will handle (e.g., "new", "prepare", "build", etc.).
|
|
21
|
-
* @param executorFn - The function that will be executed when the command is run.
|
|
22
|
-
* @returns A Promise that resolves to the result of the executor function.
|
|
23
|
-
*/
|
|
24
|
-
declare function withExecutor<TCommand extends PowerlinesCommand = PowerlinesCommand, TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema>(command: TCommand, executorFn: (context: PowerlinesExecutorContext<TCommand, TExecutorSchema>, api: PowerlinesAPI) => Promise<BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined): PromiseExecutor<TExecutorSchema>;
|
|
25
|
-
|
|
26
|
-
export { type PowerlinesExecutorContext, withExecutor };
|
|
1
|
+
import "../../base-executor.schema-LJ14f-QU.mjs";
|
|
2
|
+
import { n as withExecutor, t as PowerlinesExecutorContext } from "../../base-executor-BKuqWAnc.mjs";
|
|
3
|
+
export { PowerlinesExecutorContext, withExecutor };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { t as withExecutor } from "../../base-executor-DIVmWt0_.mjs";
|
|
2
|
+
|
|
3
|
+
export { withExecutor };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-executor.untyped.d.cts","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
declare const _default: untyped.SchemaDefinition;
|
|
1
|
+
import * as untyped0 from "untyped";
|
|
4
2
|
|
|
3
|
+
//#region src/base/base-executor.untyped.d.ts
|
|
4
|
+
declare const _default: untyped0.SchemaDefinition;
|
|
5
|
+
//#endregion
|
|
5
6
|
export { _default as default };
|
|
7
|
+
//# sourceMappingURL=base-executor.untyped.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-executor.untyped.d.mts","names":[],"sources":["../../../src/base/base-executor.untyped.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { t as base_executor_untyped_default } from "../../base-executor.untyped-Bet42T8_.mjs";
|
|
2
|
+
|
|
3
|
+
export { base_executor_untyped_default as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
require('../../../base-executor-hfeykVFL.cjs');
|
|
3
|
+
const require_executor = require('../../../executor-CmOJDW7i.cjs');
|
|
4
|
+
|
|
5
|
+
exports.default = require_executor.executor_default;
|
|
6
|
+
exports.executorFn = require_executor.executorFn;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export { e as default, a as executorFn } from '../../../executor-U4mVkhQK.mjs';
|
|
6
|
-
import '@storm-software/config/types';
|
|
7
|
-
import '../../base/base-executor.schema.d.mjs';
|
|
1
|
+
import "../../../base-executor.schema-LJ14f-QU.mjs";
|
|
2
|
+
import "../../../base-executor-BKuqWAnc.mjs";
|
|
3
|
+
import { n as executorFn, t as executor } from "../../../executor-C12a2R2m.mjs";
|
|
4
|
+
export { executor as default, executorFn };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import "../../../base-executor-DIVmWt0_.mjs";
|
|
2
|
+
import { n as executor_default, t as executorFn } from "../../../executor-DY3Q5btA.mjs";
|
|
3
|
+
|
|
4
|
+
export { executor_default as default, executorFn };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const require_chunk = require('../../../chunk-CbDLau6x.cjs');
|
|
2
|
+
require('../../../base-executor.untyped-DUgXmZji.cjs');
|
|
3
|
+
const require_untyped = require('../../../untyped-DKPJSDgJ.cjs');
|
|
4
|
+
let untyped = require("untyped");
|
|
5
|
+
|
|
6
|
+
//#region src/executors/build/untyped.ts
|
|
7
|
+
var untyped_default = (0, untyped.defineUntypedSchema)({
|
|
8
|
+
...require_untyped.untyped_default,
|
|
9
|
+
$schema: {
|
|
10
|
+
id: "BuildExecutorSchema",
|
|
11
|
+
title: "Build Executor",
|
|
12
|
+
description: "A type definition for the Powerlines - Build executor schema",
|
|
13
|
+
required: []
|
|
14
|
+
},
|
|
15
|
+
entry: { $schema: {
|
|
16
|
+
title: "Entry Path(s)",
|
|
17
|
+
description: "The entry path(s) for the package",
|
|
18
|
+
oneOf: [{ type: "string" }, {
|
|
19
|
+
type: "array",
|
|
20
|
+
items: { type: "string" }
|
|
21
|
+
}]
|
|
22
|
+
} }
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
module.exports = untyped_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untyped.d.cts","names":[],"sources":["../../../../src/executors/build/untyped.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
declare const _default: untyped.SchemaDefinition;
|
|
1
|
+
import * as untyped5 from "untyped";
|
|
4
2
|
|
|
3
|
+
//#region src/executors/build/untyped.d.ts
|
|
4
|
+
declare const _default: untyped5.SchemaDefinition;
|
|
5
|
+
//#endregion
|
|
5
6
|
export { _default as default };
|
|
7
|
+
//# sourceMappingURL=untyped.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untyped.d.mts","names":[],"sources":["../../../../src/executors/build/untyped.ts"],"sourcesContent":[],"mappings":""}
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { defineUntypedSchema } from 'untyped';
|
|
1
|
+
import "../../../base-executor.untyped-Bet42T8_.mjs";
|
|
2
|
+
import { t as untyped_default$1 } from "../../../untyped-BIEzjl_J.mjs";
|
|
3
|
+
import { defineUntypedSchema } from "untyped";
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: "array",
|
|
24
|
-
items: {
|
|
25
|
-
type: "string"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
}
|
|
5
|
+
//#region src/executors/build/untyped.ts
|
|
6
|
+
var untyped_default = defineUntypedSchema({
|
|
7
|
+
...untyped_default$1,
|
|
8
|
+
$schema: {
|
|
9
|
+
id: "BuildExecutorSchema",
|
|
10
|
+
title: "Build Executor",
|
|
11
|
+
description: "A type definition for the Powerlines - Build executor schema",
|
|
12
|
+
required: []
|
|
13
|
+
},
|
|
14
|
+
entry: { $schema: {
|
|
15
|
+
title: "Entry Path(s)",
|
|
16
|
+
description: "The entry path(s) for the package",
|
|
17
|
+
oneOf: [{ type: "string" }, {
|
|
18
|
+
type: "array",
|
|
19
|
+
items: { type: "string" }
|
|
20
|
+
}]
|
|
21
|
+
} }
|
|
31
22
|
});
|
|
32
23
|
|
|
33
|
-
|
|
24
|
+
//#endregion
|
|
25
|
+
export { untyped_default as default };
|
|
26
|
+
//# sourceMappingURL=untyped.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"untyped.mjs","names":["PrepareExecutorSchema"],"sources":["../../../../src/executors/build/untyped.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 { defineUntypedSchema } from \"untyped\";\nimport PrepareExecutorSchema from \"../prepare/untyped\";\n\nexport default defineUntypedSchema({\n ...PrepareExecutorSchema,\n $schema: {\n id: \"BuildExecutorSchema\",\n title: \"Build Executor\",\n description: \"A type definition for the Powerlines - Build executor schema\",\n required: []\n },\n entry: {\n $schema: {\n title: \"Entry Path(s)\",\n description: \"The entry path(s) for the package\",\n oneOf: [{ type: \"string\" }, { type: \"array\", items: { type: \"string\" } }]\n }\n }\n});\n"],"mappings":";;;;;AAqBA,sBAAe,oBAAoB;CACjC,GAAGA;CACH,SAAS;EACP,IAAI;EACJ,OAAO;EACP,aAAa;EACb,UAAU,EAAE;EACb;CACD,OAAO,EACL,SAAS;EACP,OAAO;EACP,aAAa;EACb,OAAO,CAAC,EAAE,MAAM,UAAU,EAAE;GAAE,MAAM;GAAS,OAAO,EAAE,MAAM,UAAU;GAAE,CAAC;EAC1E,EACF;CACF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
+
require('../../../base-executor-hfeykVFL.cjs');
|
|
3
|
+
const require_executor = require('../../../executor-DXs-DQDq.cjs');
|
|
4
|
+
|
|
5
|
+
exports.default = require_executor.executor_default;
|
|
6
|
+
exports.executorFn = require_executor.executorFn;
|