@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.
Files changed (287) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/{src/base/base-executor.d.ts → base-executor-BKuqWAnc.d.mts} +14 -12
  3. package/dist/base-executor-BKuqWAnc.d.mts.map +1 -0
  4. package/dist/base-executor-CL9md5FK.d.cts +28 -0
  5. package/dist/base-executor-CL9md5FK.d.cts.map +1 -0
  6. package/dist/base-executor-DIVmWt0_.mjs +76 -0
  7. package/dist/base-executor-DIVmWt0_.mjs.map +1 -0
  8. package/dist/base-executor-hfeykVFL.cjs +83 -0
  9. package/dist/base-executor.schema-CH9f7UZz.d.cts +131 -0
  10. package/dist/base-executor.schema-CH9f7UZz.d.cts.map +1 -0
  11. package/dist/base-executor.schema-LJ14f-QU.d.mts +131 -0
  12. package/dist/base-executor.schema-LJ14f-QU.d.mts.map +1 -0
  13. package/dist/base-executor.untyped-Bet42T8_.mjs +139 -0
  14. package/dist/base-executor.untyped-Bet42T8_.mjs.map +1 -0
  15. package/dist/base-executor.untyped-DUgXmZji.cjs +144 -0
  16. package/dist/chunk-CbDLau6x.cjs +34 -0
  17. package/dist/constants-BHT2TeEj.cjs +39 -0
  18. package/dist/constants-DPeeG_si.mjs +34 -0
  19. package/dist/constants-DPeeG_si.mjs.map +1 -0
  20. package/dist/executor-9aTY5L1O.d.mts +155 -0
  21. package/dist/executor-9aTY5L1O.d.mts.map +1 -0
  22. package/dist/executor-BA-Xvw_2.cjs +23 -0
  23. package/dist/executor-BDu-MfKS.d.cts +155 -0
  24. package/dist/executor-BDu-MfKS.d.cts.map +1 -0
  25. package/dist/executor-BaJuosQ2.d.cts +139 -0
  26. package/dist/executor-BaJuosQ2.d.cts.map +1 -0
  27. package/dist/executor-BerELzzO.d.cts +165 -0
  28. package/dist/executor-BerELzzO.d.cts.map +1 -0
  29. package/dist/executor-C12a2R2m.d.mts +165 -0
  30. package/dist/executor-C12a2R2m.d.mts.map +1 -0
  31. package/dist/executor-CQoHBvIx.d.mts +155 -0
  32. package/dist/executor-CQoHBvIx.d.mts.map +1 -0
  33. package/dist/executor-CR4F9h0Q.mjs +13 -0
  34. package/dist/executor-CR4F9h0Q.mjs.map +1 -0
  35. package/dist/executor-CmOJDW7i.cjs +30 -0
  36. package/dist/executor-CsYeTG7f.d.mts +155 -0
  37. package/dist/executor-CsYeTG7f.d.mts.map +1 -0
  38. package/dist/executor-DXs-DQDq.cjs +23 -0
  39. package/dist/executor-DY3Q5btA.mjs +18 -0
  40. package/dist/executor-DY3Q5btA.mjs.map +1 -0
  41. package/dist/executor-DaM4shEF.d.mts +139 -0
  42. package/dist/executor-DaM4shEF.d.mts.map +1 -0
  43. package/dist/executor-DriX4F9a.mjs +13 -0
  44. package/dist/executor-DriX4F9a.mjs.map +1 -0
  45. package/dist/executor-DupYdy7P.cjs +23 -0
  46. package/dist/executor-_6Wimayo.d.cts +155 -0
  47. package/dist/executor-_6Wimayo.d.cts.map +1 -0
  48. package/dist/executor-dakLe5jY.mjs +13 -0
  49. package/dist/executor-dakLe5jY.mjs.map +1 -0
  50. package/dist/executor-gauQV_Qs.mjs +18 -0
  51. package/dist/executor-gauQV_Qs.mjs.map +1 -0
  52. package/dist/executor-q94V36zQ.d.cts +155 -0
  53. package/dist/executor-q94V36zQ.d.cts.map +1 -0
  54. package/dist/executor-tEMakUYi.cjs +30 -0
  55. package/dist/executors-C15iG1sF.mjs +1 -0
  56. package/dist/executors-D7478W2S.cjs +0 -0
  57. package/dist/executors-YbcSXKr5.d.mts +1 -0
  58. package/dist/executors-hX1C9GbI.d.cts +1 -0
  59. package/dist/executors.cjs +13 -0
  60. package/dist/executors.d.cts +9 -0
  61. package/dist/executors.d.mts +9 -11
  62. package/dist/executors.mjs +9 -9
  63. package/dist/generator-DeiwVUqC.mjs +11 -0
  64. package/dist/generator-DeiwVUqC.mjs.map +1 -0
  65. package/dist/generator-Dv37nXlF.d.cts +8 -0
  66. package/dist/generator-Dv37nXlF.d.cts.map +1 -0
  67. package/dist/generator-Uu2ErkQj.cjs +22 -0
  68. package/dist/generator-aA0eb35E.d.mts +8 -0
  69. package/dist/generator-aA0eb35E.d.mts.map +1 -0
  70. package/dist/generators-B8_tB0mD.d.cts +17 -0
  71. package/dist/generators-B8_tB0mD.d.cts.map +1 -0
  72. package/dist/generators-Bi9wzfNx.mjs +1 -0
  73. package/dist/generators-DymCAfYw.d.mts +17 -0
  74. package/dist/generators-DymCAfYw.d.mts.map +1 -0
  75. package/dist/generators-q39_jUCw.cjs +0 -0
  76. package/dist/generators.cjs +5 -0
  77. package/dist/generators.d.cts +3 -0
  78. package/dist/generators.d.mts +3 -19
  79. package/dist/generators.mjs +4 -3
  80. package/dist/index-BAMQksFF.d.mts +8 -0
  81. package/dist/index-BAMQksFF.d.mts.map +1 -0
  82. package/dist/index-C5yJ9lGj.d.cts +8 -0
  83. package/dist/index-C5yJ9lGj.d.cts.map +1 -0
  84. package/dist/index.cjs +21 -0
  85. package/dist/index.d.cts +13 -0
  86. package/dist/index.d.mts +13 -16
  87. package/dist/index.mjs +14 -14
  88. package/dist/plugin-A9gAUguP.cjs +12 -0
  89. package/dist/plugin-CODFOru1.d.cts +243 -0
  90. package/dist/plugin-CODFOru1.d.cts.map +1 -0
  91. package/dist/plugin-Dbr_Q4yi.mjs +8 -0
  92. package/dist/plugin-Dbr_Q4yi.mjs.map +1 -0
  93. package/dist/plugin-DpjoI0QS.d.mts +243 -0
  94. package/dist/plugin-DpjoI0QS.d.mts.map +1 -0
  95. package/dist/plugin-utilities-Ci8AHf-K.mjs +347 -0
  96. package/dist/plugin-utilities-Ci8AHf-K.mjs.map +1 -0
  97. package/dist/plugin-utilities-Ddlc3SiI.cjs +366 -0
  98. package/dist/src/base/base-executor.cjs +3 -0
  99. package/dist/src/base/base-executor.d.cts +3 -0
  100. package/dist/src/base/base-executor.d.mts +3 -26
  101. package/dist/src/base/base-executor.mjs +3 -3
  102. package/dist/src/base/base-executor.schema.d.cjs +0 -0
  103. package/dist/src/base/base-executor.schema.d.cts +2 -0
  104. package/dist/src/base/base-executor.schema.d.mts +2 -0
  105. package/dist/src/base/base-executor.untyped.cjs +3 -0
  106. package/dist/src/base/base-executor.untyped.d.cts +6 -0
  107. package/dist/src/base/base-executor.untyped.d.cts.map +1 -0
  108. package/dist/src/base/base-executor.untyped.d.mts +5 -3
  109. package/dist/src/base/base-executor.untyped.d.mts.map +1 -0
  110. package/dist/src/base/base-executor.untyped.mjs +3 -2
  111. package/dist/src/executors/build/executor.cjs +6 -0
  112. package/dist/src/executors/build/executor.d.cts +4 -0
  113. package/dist/src/executors/build/executor.d.mts +4 -7
  114. package/dist/src/executors/build/executor.mjs +4 -4
  115. package/dist/src/executors/build/untyped.cjs +26 -0
  116. package/dist/src/executors/build/untyped.d.cts +6 -0
  117. package/dist/src/executors/build/untyped.d.cts.map +1 -0
  118. package/dist/src/executors/build/untyped.d.mts +5 -3
  119. package/dist/src/executors/build/untyped.d.mts.map +1 -0
  120. package/dist/src/executors/build/untyped.mjs +23 -30
  121. package/dist/src/executors/build/untyped.mjs.map +1 -0
  122. package/dist/src/executors/clean/executor.cjs +6 -0
  123. package/dist/src/executors/clean/executor.d.cts +4 -0
  124. package/dist/src/executors/clean/executor.d.mts +4 -7
  125. package/dist/src/executors/clean/executor.mjs +4 -4
  126. package/dist/src/executors/clean/untyped.cjs +17 -0
  127. package/dist/src/executors/clean/untyped.d.cts +6 -0
  128. package/dist/src/executors/clean/untyped.d.cts.map +1 -0
  129. package/dist/src/executors/clean/untyped.d.mts +5 -3
  130. package/dist/src/executors/clean/untyped.d.mts.map +1 -0
  131. package/dist/src/executors/clean/untyped.mjs +12 -10
  132. package/dist/src/executors/clean/untyped.mjs.map +1 -0
  133. package/dist/src/executors/docs/executor.cjs +6 -0
  134. package/dist/src/executors/docs/executor.d.cts +4 -0
  135. package/dist/src/executors/docs/executor.d.mts +4 -7
  136. package/dist/src/executors/docs/executor.mjs +4 -4
  137. package/dist/src/executors/docs/untyped.cjs +18 -0
  138. package/dist/src/executors/docs/untyped.d.cts +6 -0
  139. package/dist/src/executors/docs/untyped.d.cts.map +1 -0
  140. package/dist/src/executors/docs/untyped.d.mts +5 -3
  141. package/dist/src/executors/docs/untyped.d.mts.map +1 -0
  142. package/dist/src/executors/docs/untyped.mjs +15 -13
  143. package/dist/src/executors/docs/untyped.mjs.map +1 -0
  144. package/dist/src/executors/lint/executor.cjs +6 -0
  145. package/dist/src/executors/lint/executor.d.cts +4 -0
  146. package/dist/src/executors/lint/executor.d.mts +4 -7
  147. package/dist/src/executors/lint/executor.mjs +4 -4
  148. package/dist/src/executors/lint/untyped.cjs +18 -0
  149. package/dist/src/executors/lint/untyped.d.cts +6 -0
  150. package/dist/src/executors/lint/untyped.d.cts.map +1 -0
  151. package/dist/src/executors/lint/untyped.d.mts +5 -3
  152. package/dist/src/executors/lint/untyped.d.mts.map +1 -0
  153. package/dist/src/executors/lint/untyped.mjs +15 -13
  154. package/dist/src/executors/lint/untyped.mjs.map +1 -0
  155. package/dist/src/executors/prepare/executor.cjs +6 -0
  156. package/dist/src/executors/prepare/executor.d.cts +4 -0
  157. package/dist/src/executors/prepare/executor.d.mts +4 -7
  158. package/dist/src/executors/prepare/executor.mjs +4 -4
  159. package/dist/src/executors/prepare/untyped.cjs +4 -0
  160. package/dist/src/executors/prepare/untyped.d.cts +6 -0
  161. package/dist/src/executors/prepare/untyped.d.cts.map +1 -0
  162. package/dist/src/executors/prepare/untyped.d.mts +5 -3
  163. package/dist/src/executors/prepare/untyped.d.mts.map +1 -0
  164. package/dist/src/executors/prepare/untyped.mjs +4 -3
  165. package/dist/src/generators/sync/generator.cjs +5 -0
  166. package/dist/src/generators/sync/generator.d.cts +2 -0
  167. package/dist/src/generators/sync/generator.d.mts +2 -6
  168. package/dist/src/generators/sync/generator.mjs +3 -2
  169. package/dist/src/generators/sync/untyped.cjs +23 -0
  170. package/dist/src/generators/sync/untyped.d.cts +6 -0
  171. package/dist/src/generators/sync/untyped.d.cts.map +1 -0
  172. package/dist/src/generators/sync/untyped.d.mts +5 -3
  173. package/dist/src/generators/sync/untyped.d.mts.map +1 -0
  174. package/dist/src/generators/sync/untyped.mjs +18 -16
  175. package/dist/src/generators/sync/untyped.mjs.map +1 -0
  176. package/dist/src/helpers/constants.cjs +3 -0
  177. package/dist/src/helpers/{constants.d.ts → constants.d.cts} +3 -1
  178. package/dist/src/helpers/constants.d.cts.map +1 -0
  179. package/dist/src/helpers/constants.d.mts +3 -1
  180. package/dist/src/helpers/constants.d.mts.map +1 -0
  181. package/dist/src/helpers/constants.mjs +3 -2
  182. package/dist/src/helpers/plugin-utilities.cjs +6 -0
  183. package/dist/src/helpers/plugin-utilities.d.cts +58 -0
  184. package/dist/src/helpers/plugin-utilities.d.cts.map +1 -0
  185. package/dist/src/helpers/plugin-utilities.d.mts +34 -31
  186. package/dist/src/helpers/plugin-utilities.d.mts.map +1 -0
  187. package/dist/src/helpers/plugin-utilities.mjs +4 -4
  188. package/dist/src/plugin/index.cjs +5 -0
  189. package/dist/src/plugin/index.d.cts +3 -0
  190. package/dist/src/plugin/index.d.mts +3 -6
  191. package/dist/src/plugin/index.mjs +5 -5
  192. package/dist/src/types/plugin.cjs +0 -0
  193. package/dist/src/types/plugin.d.cts +2 -0
  194. package/dist/src/types/plugin.d.mts +2 -241
  195. package/dist/src/types/plugin.mjs +1 -1
  196. package/dist/untyped-BIEzjl_J.mjs +27 -0
  197. package/dist/untyped-BIEzjl_J.mjs.map +1 -0
  198. package/dist/untyped-DKPJSDgJ.cjs +32 -0
  199. package/executors.json +1 -1
  200. package/generators.json +1 -1
  201. package/package.json +117 -88
  202. package/dist/chunk-23KFTIT2.mjs +0 -1
  203. package/dist/chunk-326QB2VK.mjs +0 -14
  204. package/dist/chunk-3BI2YVJ3.js +0 -156
  205. package/dist/chunk-3D3MU5VP.js +0 -26
  206. package/dist/chunk-4OMPO3GC.mjs +0 -154
  207. package/dist/chunk-ADMWJVSB.js +0 -374
  208. package/dist/chunk-DXL4NVUO.js +0 -18
  209. package/dist/chunk-F4QJKUNK.js +0 -18
  210. package/dist/chunk-GCIPEE4T.mjs +0 -28
  211. package/dist/chunk-IC47MFKB.mjs +0 -29
  212. package/dist/chunk-IDXFQ2WL.mjs +0 -15
  213. package/dist/chunk-IOBDAGVL.js +0 -30
  214. package/dist/chunk-IQVSZEQ6.js +0 -31
  215. package/dist/chunk-N2YKXZ5R.js +0 -2
  216. package/dist/chunk-NB2KHU33.mjs +0 -19
  217. package/dist/chunk-NXR5JH7F.js +0 -10
  218. package/dist/chunk-O6YSETKJ.mjs +0 -4
  219. package/dist/chunk-P5X6KXLE.js +0 -26
  220. package/dist/chunk-PKGTRC56.mjs +0 -15
  221. package/dist/chunk-PMQ5YVLP.js +0 -18
  222. package/dist/chunk-R577MOZR.js +0 -4928
  223. package/dist/chunk-RBIHD4JS.mjs +0 -4900
  224. package/dist/chunk-RLODK6TM.js +0 -281
  225. package/dist/chunk-RLYU2FOM.mjs +0 -366
  226. package/dist/chunk-SHUYVCID.js +0 -6
  227. package/dist/chunk-SQV3SFA4.mjs +0 -8
  228. package/dist/chunk-UV4HQO3Y.mjs +0 -1
  229. package/dist/chunk-W75JGXP2.mjs +0 -260
  230. package/dist/chunk-WIPWBPB3.mjs +0 -19
  231. package/dist/chunk-WUJKJGEW.js +0 -17
  232. package/dist/chunk-XO62WWX4.js +0 -2
  233. package/dist/chunk-ZERXJ7S6.mjs +0 -15
  234. package/dist/executor-AQVlPFta.d.ts +0 -163
  235. package/dist/executor-BNmIhtpF.d.mts +0 -153
  236. package/dist/executor-C0A5mFLO.d.mts +0 -137
  237. package/dist/executor-Cep8-Y3A.d.mts +0 -153
  238. package/dist/executor-CkyahICv.d.ts +0 -137
  239. package/dist/executor-DOsxw-Ih.d.ts +0 -153
  240. package/dist/executor-DUQbjUVt.d.ts +0 -153
  241. package/dist/executor-O3MDQSFT.d.ts +0 -153
  242. package/dist/executor-U4mVkhQK.d.mts +0 -163
  243. package/dist/executor-Xt5qNzC5.d.mts +0 -153
  244. package/dist/executors.d.ts +0 -11
  245. package/dist/executors.js +0 -34
  246. package/dist/generators.d.ts +0 -19
  247. package/dist/generators.js +0 -16
  248. package/dist/index.d.ts +0 -16
  249. package/dist/index.js +0 -51
  250. package/dist/src/base/base-executor.js +0 -12
  251. package/dist/src/base/base-executor.schema.d.d.mts +0 -129
  252. package/dist/src/base/base-executor.schema.d.d.ts +0 -129
  253. package/dist/src/base/base-executor.schema.d.js +0 -2
  254. package/dist/src/base/base-executor.schema.d.mjs +0 -1
  255. package/dist/src/base/base-executor.untyped.d.ts +0 -5
  256. package/dist/src/base/base-executor.untyped.js +0 -10
  257. package/dist/src/executors/build/executor.d.ts +0 -7
  258. package/dist/src/executors/build/executor.js +0 -19
  259. package/dist/src/executors/build/untyped.d.ts +0 -5
  260. package/dist/src/executors/build/untyped.js +0 -37
  261. package/dist/src/executors/clean/executor.d.ts +0 -7
  262. package/dist/src/executors/clean/executor.js +0 -19
  263. package/dist/src/executors/clean/untyped.d.ts +0 -5
  264. package/dist/src/executors/clean/untyped.js +0 -19
  265. package/dist/src/executors/docs/executor.d.ts +0 -7
  266. package/dist/src/executors/docs/executor.js +0 -19
  267. package/dist/src/executors/docs/untyped.d.ts +0 -5
  268. package/dist/src/executors/docs/untyped.js +0 -20
  269. package/dist/src/executors/lint/executor.d.ts +0 -7
  270. package/dist/src/executors/lint/executor.js +0 -19
  271. package/dist/src/executors/lint/untyped.d.ts +0 -5
  272. package/dist/src/executors/lint/untyped.js +0 -20
  273. package/dist/src/executors/prepare/executor.d.ts +0 -7
  274. package/dist/src/executors/prepare/executor.js +0 -19
  275. package/dist/src/executors/prepare/untyped.d.ts +0 -5
  276. package/dist/src/executors/prepare/untyped.js +0 -11
  277. package/dist/src/generators/sync/generator.d.ts +0 -6
  278. package/dist/src/generators/sync/generator.js +0 -17
  279. package/dist/src/generators/sync/untyped.d.ts +0 -5
  280. package/dist/src/generators/sync/untyped.js +0 -25
  281. package/dist/src/helpers/constants.js +0 -11
  282. package/dist/src/helpers/plugin-utilities.d.ts +0 -55
  283. package/dist/src/helpers/plugin-utilities.js +0 -21
  284. package/dist/src/plugin/index.d.ts +0 -6
  285. package/dist/src/plugin/index.js +0 -14
  286. package/dist/src/types/plugin.d.ts +0 -241
  287. package/dist/src/types/plugin.js +0 -2
@@ -1,281 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkSHUYVCID_js = require('./chunk-SHUYVCID.js');
4
- var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
5
- var toArray = require('@stryke/convert/to-array');
6
- var murmurhash = require('@stryke/hash/murmurhash');
7
- var getUnique = require('@stryke/helpers/get-unique');
8
- var append = require('@stryke/path/append');
9
- var isType = require('@stryke/path/is-type');
10
- var joinPaths = require('@stryke/path/join-paths');
11
- var replace = require('@stryke/path/replace');
12
- var isObject = require('@stryke/type-checks/is-object');
13
- var isRegexp = require('@stryke/type-checks/is-regexp');
14
- var isSetString = require('@stryke/type-checks/is-set-string');
15
- var isString = require('@stryke/type-checks/is-string');
16
- var join = require('@stryke/path/join');
17
- var logger = require('@storm-software/config-tools/logger');
18
- var types = require('@storm-software/config-tools/types');
19
- var colors = require('@storm-software/config-tools/utilities/colors');
20
- var noop = require('@stryke/helpers/noop');
21
- var kebabCase = require('@stryke/string-format/kebab-case');
22
- var titleCase = require('@stryke/string-format/title-case');
23
- var chalk = require('chalk');
24
- var listFiles = require('@stryke/fs/list-files');
25
- var isParentPath = require('@stryke/path/is-parent-path');
26
- var prettier = require('prettier');
27
- require('@stryke/fs/read-file');
28
- var isSetObject = require('@stryke/type-checks/is-set-object');
29
- require('magic-string');
30
- var Diff = require('diff-match-patch');
31
- require('@stryke/fs/write-file');
32
- var getConfig = require('@storm-software/config-tools/get-config');
33
- var exists = require('@stryke/fs/exists');
34
- var isFunction = require('@stryke/type-checks/is-function');
35
- var c12 = require('c12');
36
- var defu = require('defu');
37
-
38
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
39
-
40
- var chalk__default = /*#__PURE__*/_interopDefault(chalk);
41
- var Diff__default = /*#__PURE__*/_interopDefault(Diff);
42
- var defu__default = /*#__PURE__*/_interopDefault(defu);
43
-
44
- // ../core/src/lib/constants/meta.ts
45
- var ROOT_HASH_LENGTH = 45;
46
- var CACHE_HASH_LENGTH = 62;
47
-
48
- // ../core/src/lib/constants/environments.ts
49
- var DEFAULT_ENVIRONMENT = "default";
50
- var GLOBAL_ENVIRONMENT = "__global__";
51
- function replacePathTokens(context, path) {
52
- if (!path) {
53
- return path;
54
- }
55
- return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.root).replaceAll("{projectRoot}", context.config.root).replaceAll("{sourceRoot}", join.joinPaths(context.config.root, "src")).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replace.replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replace.replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replace.replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
56
- }
57
- chunkSHUYVCID_js.__name(replacePathTokens, "replacePathTokens");
58
-
59
- // ../core/src/lib/entry.ts
60
- function resolveEntryOutput(context, typeDefinition) {
61
- return replace.replaceExtension(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(typeDefinition.file, joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.root, "src")), joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.root)), joinPaths.joinPaths(context.config.root, "src")), context.config.root), "src"));
62
- }
63
- chunkSHUYVCID_js.__name(resolveEntryOutput, "resolveEntryOutput");
64
- function resolveEntry(context, typeDefinition, input, output) {
65
- return {
66
- ...typeDefinition,
67
- input: isSetString.isSetString(input) || isRegexp.isRegExp(input) ? {
68
- file: String(input)
69
- } : typeDefinition,
70
- output: output || resolveEntryOutput(context, typeDefinition)
71
- };
72
- }
73
- chunkSHUYVCID_js.__name(resolveEntry, "resolveEntry");
74
- function isTypeDefinition(entry) {
75
- return !isString.isString(entry) && entry.file !== void 0;
76
- }
77
- chunkSHUYVCID_js.__name(isTypeDefinition, "isTypeDefinition");
78
- function isResolvedEntryTypeDefinition(entry) {
79
- return !isRegexp.isRegExp(entry) && isTypeDefinition(entry) && entry.output !== void 0;
80
- }
81
- chunkSHUYVCID_js.__name(isResolvedEntryTypeDefinition, "isResolvedEntryTypeDefinition");
82
- function resolveEntriesSync(context, typeDefinitions) {
83
- return (isObject.isObject(typeDefinitions) ? Object.values(typeDefinitions).flat() : toArray.toArray(typeDefinitions)).map((entry) => {
84
- if (isResolvedEntryTypeDefinition(entry)) {
85
- return {
86
- ...entry,
87
- output: entry.output ? replacePathTokens(context, entry.output) : void 0,
88
- file: replacePathTokens(context, entry.file)
89
- };
90
- }
91
- let typeDefinition;
92
- if (isString.isString(entry)) {
93
- typeDefinition = parseTypeDefinition.parseTypeDefinition(replacePathTokens(context, entry));
94
- } else if (isRegexp.isRegExp(entry)) {
95
- typeDefinition = {
96
- file: replacePathTokens(context, entry.source)
97
- };
98
- } else {
99
- typeDefinition = entry;
100
- typeDefinition.file = replacePathTokens(context, typeDefinition.file);
101
- }
102
- const filePath = isType.isAbsolutePath(typeDefinition.file) ? typeDefinition.file : append.appendPath(typeDefinition.file, context.config.root);
103
- if (context.fs.isFileSync(filePath)) {
104
- return resolveEntry(context, {
105
- file: append.appendPath(filePath, context.workspaceConfig.workspaceRoot),
106
- name: typeDefinition.name
107
- });
108
- }
109
- return context.fs.globSync(append.appendPath(filePath, context.workspaceConfig.workspaceRoot)).map((file) => resolveEntry(context, {
110
- file,
111
- name: typeDefinition.name
112
- }));
113
- }).flat().filter(Boolean);
114
- }
115
- chunkSHUYVCID_js.__name(resolveEntriesSync, "resolveEntriesSync");
116
- function getUniqueInputs(inputs = []) {
117
- return isObject.isObject(inputs) ? inputs : getUnique.getUniqueBy(toArray.toArray(inputs), (item) => isSetString.isSetString(item) ? item : murmurhash.murmurhash(item ?? {}, {
118
- maxLength: 24
119
- }));
120
- }
121
- chunkSHUYVCID_js.__name(getUniqueInputs, "getUniqueInputs");
122
- var createLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((name, options = {}) => {
123
- const logLevel = options.logLevel === null ? types.LogLevelLabel.SILENT : options.logLevel || types.LogLevelLabel.INFO;
124
- if (logLevel === types.LogLevelLabel.SILENT) {
125
- return noop.noop;
126
- }
127
- if (options.customLogger) {
128
- return options.customLogger;
129
- }
130
- return (type, ...args) => logger.getLogFn(logger.getLogLevel(type), {
131
- ...options,
132
- logLevel
133
- })(`${chalk__default.default.bold.hex(colors.getColor("brand", options))(`${name ? kebabCase.kebabCase(name) : ""}${options.name ? `${name ? chalk__default.default.gray(" > ") : ""}${kebabCase.kebabCase(options.name)}` : ""}${chalk__default.default.gray(" > ")}`)}${args.join(" ")} `.trim());
134
- }, "createLog");
135
- var BADGE_COLORS = [
136
- "#00A0DD",
137
- "#6FCE4E",
138
- "#FBBF24",
139
- "#F43F5E",
140
- "#3B82F6",
141
- "#A855F7",
142
- "#469592",
143
- "#288EDF",
144
- "#D8B4FE",
145
- "#10B981",
146
- "#EF4444",
147
- "#F0EC56",
148
- "#F472B6",
149
- "#22D3EE",
150
- "#EAB308",
151
- "#84CC16",
152
- "#F87171",
153
- "#0EA5E9",
154
- "#D946EF",
155
- "#FACC15",
156
- "#34D399",
157
- "#8B5CF6"
158
- ];
159
- var extendLog = /* @__PURE__ */ chunkSHUYVCID_js.__name((logFn, name) => {
160
- return (type, ...args) => logFn(type, ` ${chalk__default.default.inverse.hex(BADGE_COLORS[name.split("").map((char) => char.charCodeAt(0)).reduce((ret, charCode) => ret + charCode, 0) % BADGE_COLORS.length] || BADGE_COLORS[0])(` ${titleCase.titleCase(name)} `)} ${args.join(" ")} `);
161
- }, "extendLog");
162
- function getBaseFileHeader(context) {
163
- return `
164
- // Generated with ${titleCase.titleCase(context.config.framework)}
165
- // Note: Do not edit this file manually - it will be overwritten automatically
166
- `;
167
- }
168
- chunkSHUYVCID_js.__name(getBaseFileHeader, "getBaseFileHeader");
169
- function getFileHeader(context, options = {}) {
170
- const { directive = null, prettierIgnore = false } = options;
171
- return `/* eslint-disable */
172
- // biome-ignore lint: disable
173
- ${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `
174
-
175
- ${directive}
176
- ` : "\n"}
177
- ${getBaseFileHeader(context)}
178
-
179
- `;
180
- }
181
- chunkSHUYVCID_js.__name(getFileHeader, "getFileHeader");
182
- async function format(context, path, data, force = false) {
183
- if (!force && (isParentPath.isParentPath(path, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) || isParentPath.isParentPath(path, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot)))) {
184
- return data;
185
- }
186
- let code = data;
187
- const resolvedConfig = await prettier.resolveConfig(path);
188
- if (resolvedConfig) {
189
- code = await prettier.format(data, {
190
- absolutePath: path,
191
- ...resolvedConfig
192
- });
193
- }
194
- return code;
195
- }
196
- chunkSHUYVCID_js.__name(format, "format");
197
- async function formatFolder(context, path) {
198
- if (!isParentPath.isParentPath(path, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath.isParentPath(path, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
199
- await Promise.allSettled((await listFiles.listFiles(path)).map(async (file) => {
200
- if (!isParentPath.isParentPath(file, append.appendPath(context.config.output.outputPath, context.workspaceConfig.workspaceRoot)) && !isParentPath.isParentPath(file, append.appendPath(context.config.output.buildPath, context.workspaceConfig.workspaceRoot))) {
201
- const data = await context.fs.read(file);
202
- if (data) {
203
- const formatted = await format(context, file, data);
204
- return context.fs.write(file, formatted);
205
- }
206
- }
207
- }));
208
- }
209
- }
210
- chunkSHUYVCID_js.__name(formatFolder, "formatFolder");
211
- new Diff__default.default();
212
- async function loadWorkspaceConfig(workspaceRoot, cwd) {
213
- return defu__default.default({
214
- workspaceRoot
215
- }, await getConfig.getWorkspaceConfig(true, {
216
- cwd,
217
- workspaceRoot,
218
- useDefault: true
219
- }));
220
- }
221
- chunkSHUYVCID_js.__name(loadWorkspaceConfig, "loadWorkspaceConfig");
222
- async function loadUserConfigFile(projectRoot, workspaceRoot, jiti, command, mode = "production", configFile, framework = "powerlines") {
223
- let resolvedUserConfig = {};
224
- let resolvedUserConfigFile;
225
- if (configFile) {
226
- resolvedUserConfigFile = exists.existsSync(replace.replacePath(configFile, projectRoot)) ? replace.replacePath(configFile, projectRoot) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot))) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), replace.replacePath(configFile, projectRoot)) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), configFile) : void 0;
227
- }
228
- if (!resolvedUserConfigFile) {
229
- resolvedUserConfigFile = exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.${mode}.config.mjs`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.ts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.js`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mts`) : exists.existsSync(joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`)) ? joinPaths.joinPaths(append.appendPath(projectRoot, workspaceRoot), `${framework}.config.mjs`) : void 0;
230
- }
231
- if (resolvedUserConfigFile) {
232
- const resolved = await jiti.import(jiti.esmResolve(resolvedUserConfigFile));
233
- if (resolved) {
234
- let config = {};
235
- if (isFunction.isFunction(resolved)) {
236
- config = await Promise.resolve(resolved({
237
- command,
238
- mode,
239
- isSsrBuild: false,
240
- isPreview: false
241
- }));
242
- }
243
- if (isSetObject.isSetObject(config)) {
244
- resolvedUserConfig = {
245
- ...config,
246
- config,
247
- configFile: resolvedUserConfigFile
248
- };
249
- }
250
- }
251
- }
252
- const result = await c12.loadConfig({
253
- cwd: projectRoot,
254
- name: framework,
255
- envName: mode,
256
- globalRc: true,
257
- packageJson: true,
258
- dotenv: true,
259
- jiti
260
- });
261
- return defu__default.default(resolvedUserConfig, isSetObject.isSetObject(result?.config) ? {
262
- ...result.config,
263
- ...result
264
- } : {});
265
- }
266
- chunkSHUYVCID_js.__name(loadUserConfigFile, "loadUserConfigFile");
267
-
268
- exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
269
- exports.DEFAULT_ENVIRONMENT = DEFAULT_ENVIRONMENT;
270
- exports.GLOBAL_ENVIRONMENT = GLOBAL_ENVIRONMENT;
271
- exports.ROOT_HASH_LENGTH = ROOT_HASH_LENGTH;
272
- exports.createLog = createLog;
273
- exports.extendLog = extendLog;
274
- exports.format = format;
275
- exports.formatFolder = formatFolder;
276
- exports.getFileHeader = getFileHeader;
277
- exports.getUniqueInputs = getUniqueInputs;
278
- exports.loadUserConfigFile = loadUserConfigFile;
279
- exports.loadWorkspaceConfig = loadWorkspaceConfig;
280
- exports.replacePathTokens = replacePathTokens;
281
- exports.resolveEntriesSync = resolveEntriesSync;
@@ -1,366 +0,0 @@
1
- import { ROOT_HASH_LENGTH, loadUserConfigFile } from './chunk-W75JGXP2.mjs';
2
- import { CONFIG_INPUTS } from './chunk-IC47MFKB.mjs';
3
- import { __name } from './chunk-O6YSETKJ.mjs';
4
- import { createNodesFromFiles } from '@nx/devkit';
5
- import { withNamedInputs } from '@storm-software/workspace-tools/utils/nx-json';
6
- import { getProjectRoot, getRoot, getProjectConfigFromProjectRoot } from '@storm-software/workspace-tools/utils/plugin-helpers';
7
- import { setDefaultProjectTags, addProjectTag } from '@storm-software/workspace-tools/utils/project-tags';
8
- import { getEnvPaths } from '@stryke/env/get-env-paths';
9
- import { existsSync } from '@stryke/fs/exists';
10
- import { murmurhash } from '@stryke/hash/murmurhash';
11
- import { joinPaths } from '@stryke/path/join-paths';
12
- import { kebabCase } from '@stryke/string-format/kebab-case';
13
- import { titleCase } from '@stryke/string-format/title-case';
14
- import { isError } from '@stryke/type-checks/is-error';
15
- import { isSetObject } from '@stryke/type-checks/is-set-object';
16
- import defu from 'defu';
17
- import { createJiti } from 'jiti';
18
- import { readFile } from 'node:fs/promises';
19
- import { readNxJson } from 'nx/src/config/nx-json.js';
20
- import { readTargetsFromPackageJson } from 'nx/src/utils/package-json.js';
21
-
22
- function getNxTargetInputs(framework) {
23
- return CONFIG_INPUTS.map((input) => input.replace("{framework}", framework));
24
- }
25
- __name(getNxTargetInputs, "getNxTargetInputs");
26
- function getNxPluginInputs(framework) {
27
- return `**/{${getNxTargetInputs(framework).map((input) => input.replace("{projectRoot}/", "")).join(",")}}`;
28
- }
29
- __name(getNxPluginInputs, "getNxPluginInputs");
30
- function createNxPlugin(opts) {
31
- const framework = opts?.framework || "powerlines";
32
- const title = `${titleCase(framework)} Nx Plugin`;
33
- try {
34
- const name = opts?.name || `${framework}/nx/plugin`;
35
- const artifactsFolder = opts?.artifactsFolder || `{projectRoot}/.${framework}`;
36
- const targetInputs = getNxTargetInputs(framework);
37
- const pluginInputs = getNxPluginInputs(framework);
38
- return [
39
- pluginInputs,
40
- async (configFiles, options, contextV2) => {
41
- if (options?.verboseOutput) {
42
- console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Initializing the ${title} for the following inputs: ${pluginInputs}`);
43
- }
44
- const envPaths = getEnvPaths({
45
- orgId: "storm-software",
46
- appId: framework,
47
- workspaceRoot: contextV2.workspaceRoot
48
- });
49
- if (!envPaths.cache) {
50
- throw new Error("The cache directory could not be determined.");
51
- }
52
- const nxJson = readNxJson(contextV2.workspaceRoot);
53
- const resolver = createJiti(contextV2.workspaceRoot, {
54
- debug: !!options?.debug,
55
- interopDefault: true,
56
- fsCache: joinPaths(envPaths.cache, "nx-plugin", murmurhash(contextV2.workspaceRoot, {
57
- maxLength: ROOT_HASH_LENGTH
58
- }), "jiti"),
59
- moduleCache: true
60
- });
61
- return createNodesFromFiles(async (configFile, _, context) => {
62
- try {
63
- const projectRoot = getProjectRoot(configFile, contextV2.workspaceRoot);
64
- if (!projectRoot) {
65
- 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}`);
66
- return {};
67
- }
68
- const root = getRoot(projectRoot, context);
69
- if (options?.verboseOutput) {
70
- console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Loading ${framework} user configuration for project in root directory ${projectRoot}.`);
71
- }
72
- const userConfig = await loadUserConfigFile(projectRoot, contextV2.workspaceRoot, resolver, "build", "development", configFile, framework);
73
- if (!existsSync(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"))) {
74
- if (options?.verboseOutput) {
75
- console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Cannot find \`package.json\` file in the project's root directory (path: "${joinPaths(contextV2.workspaceRoot, projectRoot)}"). Skipping project configuration.`);
76
- }
77
- return {};
78
- }
79
- const packageJsonContent = await readFile(joinPaths(contextV2.workspaceRoot, projectRoot, "package.json"), "utf8");
80
- if (!packageJsonContent) {
81
- if (options?.verboseOutput) {
82
- console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No package.json file found for project in root directory ${projectRoot}`);
83
- }
84
- return {};
85
- }
86
- const packageJson = JSON.parse(packageJsonContent);
87
- if (!userConfig.configFile && !packageJson?.storm) {
88
- if (options?.verboseOutput) {
89
- console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Skipping ${projectRoot} - no ${framework} configuration found for project in root directory.`);
90
- }
91
- return {};
92
- }
93
- const projectConfig = getProjectConfigFromProjectRoot(projectRoot, packageJson);
94
- if (!projectConfig) {
95
- if (options?.verboseOutput) {
96
- console.warn(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - No project configuration found for project in root directory ${projectRoot}`);
97
- }
98
- return {};
99
- }
100
- const targets = readTargetsFromPackageJson(packageJson, nxJson, projectRoot, context.workspaceRoot);
101
- if (options?.verboseOutput) {
102
- console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Preparing Nx targets for project in root directory ${projectRoot}.`);
103
- }
104
- if (options?.clean !== false && !targets[options?.clean?.targetName || "clean"]) {
105
- targets[options?.clean?.targetName || "clean"] = {
106
- cache: true,
107
- inputs: Array.isArray(options?.clean?.inputs) ? options.clean.inputs : withNamedInputs(targetInputs, [
108
- options?.clean?.inputs || "typescript"
109
- ]),
110
- outputs: options?.clean?.outputs,
111
- executor: options?.clean?.executor || `@${framework}/nx:${options?.clean?.targetName || "clean"}`,
112
- dependsOn: options?.clean?.dependsOn ?? [
113
- `^${options?.clean?.targetName || "clean"}`
114
- ],
115
- defaultConfiguration: options?.clean?.defaultConfiguration || "production",
116
- options: {
117
- outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
118
- projectType: projectConfig.projectType || userConfig.projectType,
119
- autoInstall: userConfig.autoInstall
120
- },
121
- configurations: {
122
- production: {
123
- mode: "production"
124
- },
125
- test: {
126
- mode: "test"
127
- },
128
- development: {
129
- mode: "development",
130
- skipCache: true
131
- }
132
- }
133
- };
134
- }
135
- if (options?.prepare !== false && !targets[options?.prepare?.targetName || "prepare"]) {
136
- targets[options?.prepare?.targetName || "prepare"] = {
137
- cache: true,
138
- inputs: Array.isArray(options?.prepare?.inputs) ? options.prepare.inputs : withNamedInputs(targetInputs, [
139
- options?.prepare?.inputs || "typescript"
140
- ]),
141
- outputs: options?.prepare?.outputs ?? [
142
- artifactsFolder
143
- ],
144
- executor: options?.prepare?.executor || `@${framework}/nx:${options?.prepare?.targetName || "prepare"}`,
145
- dependsOn: options?.prepare?.dependsOn ?? [
146
- `^${options?.prepare?.targetName || "build"}`,
147
- options?.clean !== false && `${options?.clean?.targetName || "clean"}`
148
- ].filter(Boolean),
149
- defaultConfiguration: options?.prepare?.defaultConfiguration || "production",
150
- options: {
151
- input: userConfig.input,
152
- projectType: projectConfig.projectType || userConfig.projectType,
153
- autoInstall: userConfig.autoInstall,
154
- skipCache: userConfig.skipCache
155
- },
156
- configurations: {
157
- production: {
158
- mode: "production"
159
- },
160
- test: {
161
- mode: "test"
162
- },
163
- development: {
164
- mode: "development",
165
- skipCache: true
166
- }
167
- }
168
- };
169
- }
170
- if (options?.build !== false && !targets[options?.build?.targetName || "build"]) {
171
- targets[options?.build?.targetName || "build"] = {
172
- cache: true,
173
- inputs: Array.isArray(options?.build?.inputs) ? options.build.inputs : withNamedInputs(targetInputs, [
174
- options?.build?.inputs || "typescript"
175
- ]),
176
- outputs: options?.build?.outputs ?? [
177
- "{options.outputPath}"
178
- ],
179
- executor: options?.build?.executor || `@${framework}/nx:${options?.build?.targetName || "build"}`,
180
- dependsOn: options?.build?.dependsOn ?? [
181
- `^${options?.build?.targetName || "build"}`,
182
- userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
183
- ].filter(Boolean),
184
- defaultConfiguration: options?.build?.defaultConfiguration || "production",
185
- options: {
186
- input: userConfig.input,
187
- outputPath: userConfig.output?.outputPath || "dist/{projectRoot}",
188
- projectType: projectConfig.projectType || userConfig.projectType,
189
- autoInstall: userConfig.autoInstall,
190
- skipCache: userConfig.skipCache
191
- },
192
- configurations: {
193
- production: {
194
- mode: "production"
195
- },
196
- test: {
197
- mode: "test"
198
- },
199
- development: {
200
- mode: "development",
201
- skipCache: true
202
- }
203
- }
204
- };
205
- }
206
- if (options?.lint !== false && !targets[options?.lint?.targetName || "lint"]) {
207
- targets[options?.lint?.targetName || "lint"] = {
208
- cache: true,
209
- inputs: Array.isArray(options?.lint?.inputs) ? options.lint.inputs : withNamedInputs([
210
- ...targetInputs,
211
- artifactsFolder
212
- ], options?.lint?.inputs ? [
213
- options.lint.inputs
214
- ] : [
215
- "linting",
216
- "typescript"
217
- ]),
218
- outputs: options?.lint?.outputs ?? [
219
- "{options.outputPath}"
220
- ],
221
- executor: options?.lint?.executor || `@${framework}/nx:${options?.lint?.targetName || "lint"}`,
222
- dependsOn: options?.lint?.dependsOn ?? [
223
- `^${options?.lint?.targetName || "lint"}`,
224
- userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
225
- ].filter(Boolean),
226
- defaultConfiguration: options?.lint?.defaultConfiguration || "production",
227
- options: {
228
- input: userConfig.input,
229
- projectType: projectConfig.projectType || userConfig.projectType,
230
- autoInstall: userConfig.autoInstall,
231
- skipCache: userConfig.skipCache
232
- },
233
- configurations: {
234
- production: {
235
- mode: "production"
236
- },
237
- test: {
238
- mode: "test"
239
- },
240
- development: {
241
- mode: "development",
242
- skipCache: true
243
- }
244
- }
245
- };
246
- }
247
- if (options?.docs !== false && !targets[options?.docs?.targetName || "docs"]) {
248
- targets[options?.docs?.targetName || "docs"] = {
249
- cache: true,
250
- inputs: Array.isArray(options?.docs?.inputs) ? options.docs.inputs : withNamedInputs([
251
- ...targetInputs,
252
- artifactsFolder
253
- ], options?.docs?.inputs ? [
254
- options.docs.inputs
255
- ] : [
256
- "documentation",
257
- "typescript"
258
- ]),
259
- outputs: options?.docs?.outputs ?? [
260
- "{options.outputPath}"
261
- ],
262
- executor: options?.docs?.executor || `@${framework}/nx:${options?.docs?.targetName || "docs"}`,
263
- dependsOn: options?.docs?.dependsOn ?? [
264
- `^${options?.docs?.targetName || "docs"}`,
265
- options?.build !== false && `${options?.build?.targetName || "build"}`,
266
- userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
267
- ].filter(Boolean),
268
- defaultConfiguration: options?.docs?.defaultConfiguration || "production",
269
- options: {
270
- input: userConfig.input,
271
- projectType: projectConfig.projectType || userConfig.projectType,
272
- autoInstall: userConfig.autoInstall,
273
- skipCache: userConfig.skipCache
274
- },
275
- configurations: {
276
- production: {
277
- mode: "production"
278
- },
279
- test: {
280
- mode: "test"
281
- },
282
- development: {
283
- mode: "development",
284
- skipCache: true
285
- }
286
- }
287
- };
288
- }
289
- if (options?.deploy !== false && !targets[options?.deploy?.targetName || "deploy"]) {
290
- targets[options?.deploy?.targetName || "deploy"] = {
291
- inputs: Array.isArray(options?.deploy?.inputs) ? options.deploy.inputs : withNamedInputs([
292
- ...targetInputs,
293
- artifactsFolder
294
- ], options?.deploy?.inputs ? [
295
- options.deploy.inputs
296
- ] : [
297
- "documentation",
298
- "typescript"
299
- ]),
300
- outputs: options?.deploy?.outputs ?? [
301
- "{options.outputPath}"
302
- ],
303
- executor: options?.deploy?.executor || `@${framework}/nx:${options?.deploy?.targetName || "deploy"}`,
304
- dependsOn: options?.deploy?.dependsOn ?? [
305
- `^${options?.deploy?.targetName || "deploy"}`,
306
- options?.build !== false && `${options?.build?.targetName || "build"}`,
307
- userConfig.skipCache ? void 0 : isSetObject(options?.prepare) && options?.prepare?.targetName ? options?.prepare?.targetName : "prepare"
308
- ].filter(Boolean),
309
- defaultConfiguration: options?.deploy?.defaultConfiguration || "production",
310
- options: {
311
- input: userConfig.input,
312
- projectType: projectConfig.projectType || userConfig.projectType,
313
- autoInstall: userConfig.autoInstall,
314
- skipCache: userConfig.skipCache
315
- },
316
- configurations: {
317
- production: {
318
- mode: "production"
319
- },
320
- test: {
321
- mode: "test"
322
- },
323
- development: {
324
- mode: "development",
325
- skipCache: true
326
- }
327
- }
328
- };
329
- }
330
- setDefaultProjectTags(projectConfig, name);
331
- addProjectTag(projectConfig, framework, projectConfig.projectType || userConfig.projectType || "library", {
332
- overwrite: true
333
- });
334
- if (options?.verboseOutput) {
335
- console.debug(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - Completed preparing Nx configuration for project in root directory ${projectRoot}.`);
336
- }
337
- return {
338
- projects: {
339
- [root]: defu(projectConfig, {
340
- name: kebabCase(userConfig.name),
341
- projectType: userConfig.projectType || "library",
342
- root,
343
- sourceRoot: joinPaths(root, "src"),
344
- targets
345
- })
346
- }
347
- };
348
- } catch (error) {
349
- console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error"}`);
350
- throw new Error(`The ${title} failed to process the project configuration for file ${configFile}. See previous logs for more details.`, {
351
- cause: error instanceof Error ? error : void 0
352
- });
353
- }
354
- }, configFiles, options, contextV2);
355
- }
356
- ];
357
- } catch (error) {
358
- console.error(`[${title}] - ${(/* @__PURE__ */ new Date()).toISOString()} - ${isError(error) ? error.message : "Unknown fatal error during plugin initialization"}`);
359
- throw new Error(`Failed to initialize the ${title}. See previous logs for more details.`, {
360
- cause: error instanceof Error ? error : void 0
361
- });
362
- }
363
- }
364
- __name(createNxPlugin, "createNxPlugin");
365
-
366
- export { createNxPlugin, getNxPluginInputs, getNxTargetInputs };
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var __defProp = Object.defineProperty;
4
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
-
6
- exports.__name = __name;
@@ -1,8 +0,0 @@
1
- import { createNxPlugin } from './chunk-RLYU2FOM.mjs';
2
-
3
- // src/plugin/index.ts
4
- var createNodesV2 = createNxPlugin({
5
- framework: "powerlines"
6
- });
7
-
8
- export { createNodesV2 };
@@ -1 +0,0 @@
1
-