@storm-software/workspace-tools 1.267.20 → 1.267.21

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 (255) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/chunk-22UY7NFX.js +41 -0
  4. package/dist/chunk-23BZQTB2.mjs +425 -0
  5. package/dist/{chunk-7O34DHUG.js → chunk-2AVWFUXP.js} +4 -19
  6. package/dist/{chunk-YAKIVJU6.mjs → chunk-2M22JVJQ.mjs} +307 -192
  7. package/dist/{chunk-GXIIWSRN.mjs → chunk-3EDSGFA5.mjs} +63 -54
  8. package/dist/chunk-3RG5ZIWI.js +10 -0
  9. package/dist/{chunk-AC5SI4YZ.js → chunk-3TYXXJKV.js} +11 -8
  10. package/dist/{chunk-7GXOAREP.mjs → chunk-3ZBMLG4D.mjs} +17 -14
  11. package/dist/chunk-437WGH2M.mjs +32 -0
  12. package/dist/{chunk-ULBTYC2B.js → chunk-4BECJRPP.js} +13 -42
  13. package/dist/chunk-4QRA66TH.mjs +379 -0
  14. package/dist/chunk-4S66IYQF.mjs +31 -0
  15. package/dist/{chunk-4JOIS7WW.js → chunk-4WHSR4FK.js} +24 -14
  16. package/dist/{chunk-JTAXCQX6.js → chunk-53DNHF7B.js} +7 -13
  17. package/dist/{chunk-GGGO542M.js → chunk-54FVHKCU.js} +36 -24
  18. package/dist/{chunk-23IRDNF3.mjs → chunk-5HUW3BTP.mjs} +37 -21
  19. package/dist/{chunk-7NN23VWS.mjs → chunk-5LB2F3L4.mjs} +80 -65
  20. package/dist/{chunk-UF6KFXG5.js → chunk-5VY5IBBQ.js} +20 -17
  21. package/dist/{chunk-6QO3KMZA.js → chunk-5ZFTWEKB.js} +2 -16
  22. package/dist/chunk-6EMYX25V.js +7 -0
  23. package/dist/chunk-6QZSAZZ3.mjs +64 -0
  24. package/dist/{chunk-2JA7WAH7.mjs → chunk-7AN4JMFC.mjs} +2 -16
  25. package/dist/{chunk-MXS2AKLY.mjs → chunk-7HWV6U3E.mjs} +33 -18
  26. package/dist/{chunk-GKL4BY2Y.js → chunk-A5CKB6IJ.js} +7 -8
  27. package/dist/{chunk-HSN5YXMG.mjs → chunk-ABE7UOMX.mjs} +24 -21
  28. package/dist/{chunk-6W2B4WA4.mjs → chunk-AHLKRK7D.mjs} +33 -18
  29. package/dist/{chunk-6CGAYKQL.js → chunk-AJ3C2EDW.js} +69 -44
  30. package/dist/chunk-AMW7VHFM.mjs +52 -0
  31. package/dist/chunk-AOFWKOAI.js +31 -0
  32. package/dist/{chunk-7YRW5HNX.js → chunk-AX3RSZT7.js} +42 -31
  33. package/dist/chunk-BFD7HHVZ.mjs +32 -0
  34. package/dist/{chunk-ZMFVKBRM.js → chunk-BWGJVRAS.js} +2 -13
  35. package/dist/{chunk-M6NHJNGU.js → chunk-CWBHZBTN.js} +277 -169
  36. package/dist/{chunk-BNYSKNEI.mjs → chunk-EKWR7TBP.mjs} +36 -24
  37. package/dist/chunk-EU6N7QT3.js +32 -0
  38. package/dist/chunk-EYXDS7SG.js +105 -0
  39. package/dist/chunk-F66XEAID.mjs +113 -0
  40. package/dist/chunk-FOFNKU5G.js +379 -0
  41. package/dist/{chunk-7NNHBZC5.js → chunk-GNOIETZR.js} +28 -17
  42. package/dist/chunk-GQQLBQPQ.mjs +32 -0
  43. package/dist/{chunk-7PRHEOCT.js → chunk-H5NKKUPV.js} +31 -18
  44. package/dist/{chunk-NM7WF6O5.mjs → chunk-HMJTTE4A.mjs} +39 -30
  45. package/dist/{chunk-ZCIEDGNG.mjs → chunk-HY3ZC5EZ.mjs} +10 -31
  46. package/dist/{chunk-OQPX75CG.js → chunk-I5MSPQMO.js} +31 -18
  47. package/dist/{chunk-WPRKDCZP.mjs → chunk-IEZKYJSF.mjs} +3 -6
  48. package/dist/{chunk-IWCQL3AQ.js → chunk-IL3R5ZVS.js} +10 -31
  49. package/dist/{chunk-P4OVFIT6.js → chunk-IZN2IVJ4.js} +19 -6
  50. package/dist/{chunk-UALZJZUK.js → chunk-J2Z4WP3E.js} +32 -16
  51. package/dist/{chunk-RBU35LQW.js → chunk-J4DYXH46.js} +70 -61
  52. package/dist/chunk-KP4RPOBI.mjs +105 -0
  53. package/dist/chunk-KR72GKIT.mjs +7 -0
  54. package/dist/chunk-L4NCVOB5.mjs +17 -0
  55. package/dist/{chunk-4Y6B6JDH.js → chunk-LBAVVYKU.js} +315 -136
  56. package/dist/{chunk-34WSVY5D.mjs → chunk-LSF4BHCI.mjs} +24 -14
  57. package/dist/chunk-M725BO42.mjs +32 -0
  58. package/dist/{chunk-SAWEMBTS.mjs → chunk-MF6VZSIO.mjs} +30 -17
  59. package/dist/{chunk-2I6S33ZD.mjs → chunk-MMBLGUC3.mjs} +311 -132
  60. package/dist/chunk-MZSZKV4N.mjs +47 -0
  61. package/dist/chunk-O6RRIC6I.js +32 -0
  62. package/dist/chunk-OKSECMVK.js +32 -0
  63. package/dist/chunk-Q2HYWACQ.mjs +50 -0
  64. package/dist/{chunk-LJFHW7ZR.mjs → chunk-QFWQZOVG.mjs} +14 -43
  65. package/dist/{chunk-DHGZTMND.js → chunk-QVYCDING.js} +4 -7
  66. package/dist/{chunk-Z4NKRWWJ.js → chunk-RJRBED5Q.js} +48 -32
  67. package/dist/chunk-S5Z4QGF3.js +64 -0
  68. package/dist/{chunk-KQL5XMNL.mjs → chunk-SITFTWPY.mjs} +23 -8
  69. package/dist/chunk-SNMXP6JV.mjs +41 -0
  70. package/dist/chunk-SPXJBMLY.js +50 -0
  71. package/dist/{chunk-7TLYMNLD.mjs → chunk-SW2E5MQJ.mjs} +4 -19
  72. package/dist/{chunk-OKW5O5P4.js → chunk-T7BALDKJ.js} +26 -22
  73. package/dist/chunk-TSYIV33W.js +32 -0
  74. package/dist/{chunk-S3IPRXVE.mjs → chunk-U65XVJ4Y.mjs} +1 -12
  75. package/dist/{chunk-D3U4WMSI.mjs → chunk-U7JFVMCK.mjs} +6 -12
  76. package/dist/chunk-UIPUSUAB.js +425 -0
  77. package/dist/{chunk-O5QR3B3Z.mjs → chunk-UYSJG2E5.mjs} +56 -31
  78. package/dist/{chunk-SJGDCFBH.mjs → chunk-VLOTOQYE.mjs} +11 -8
  79. package/dist/{chunk-ENE6R7BT.mjs → chunk-W2C5IGWW.mjs} +3 -6
  80. package/dist/{chunk-G4QFSE5B.js → chunk-WE4HK4RN.js} +327 -212
  81. package/dist/{chunk-SUQKASD7.js → chunk-X2VJXJEF.js} +82 -67
  82. package/dist/{chunk-RK3UDPDP.mjs → chunk-X6PHOMFB.mjs} +32 -16
  83. package/dist/{chunk-PK2SUBWI.js → chunk-XZSS3YAB.js} +19 -16
  84. package/dist/chunk-YXBFVZ3K.js +47 -0
  85. package/dist/{chunk-CUPARBOS.js → chunk-ZP76EMBE.js} +41 -32
  86. package/dist/{chunk-OBZTQWHM.mjs → chunk-ZT4IIRQF.mjs} +254 -146
  87. package/dist/executors.js +21 -21
  88. package/dist/executors.mjs +20 -20
  89. package/dist/generators.js +17 -17
  90. package/dist/generators.mjs +18 -18
  91. package/dist/index.js +41 -41
  92. package/dist/index.mjs +42 -42
  93. package/dist/src/base/base-executor.js +7 -7
  94. package/dist/src/base/base-executor.mjs +6 -6
  95. package/dist/src/base/base-executor.untyped.js +1 -1
  96. package/dist/src/base/base-executor.untyped.mjs +1 -1
  97. package/dist/src/base/base-generator.js +7 -7
  98. package/dist/src/base/base-generator.mjs +6 -6
  99. package/dist/src/base/base-generator.untyped.js +1 -1
  100. package/dist/src/base/base-generator.untyped.mjs +1 -1
  101. package/dist/src/base/cargo-base-executor.untyped.js +3 -3
  102. package/dist/src/base/cargo-base-executor.untyped.mjs +2 -2
  103. package/dist/src/base/index.js +13 -13
  104. package/dist/src/base/index.mjs +12 -12
  105. package/dist/src/base/typescript-build-executor.untyped.js +3 -3
  106. package/dist/src/base/typescript-build-executor.untyped.mjs +2 -2
  107. package/dist/src/base/typescript-library-generator.untyped.js +3 -3
  108. package/dist/src/base/typescript-library-generator.untyped.mjs +2 -2
  109. package/dist/src/executors/cargo-build/executor.js +9 -9
  110. package/dist/src/executors/cargo-build/executor.mjs +8 -8
  111. package/dist/src/executors/cargo-build/untyped.js +3 -3
  112. package/dist/src/executors/cargo-build/untyped.mjs +2 -2
  113. package/dist/src/executors/cargo-check/executor.js +9 -9
  114. package/dist/src/executors/cargo-check/executor.mjs +8 -8
  115. package/dist/src/executors/cargo-check/untyped.js +3 -3
  116. package/dist/src/executors/cargo-check/untyped.mjs +2 -2
  117. package/dist/src/executors/cargo-clippy/executor.js +9 -9
  118. package/dist/src/executors/cargo-clippy/executor.mjs +8 -8
  119. package/dist/src/executors/cargo-clippy/untyped.js +3 -3
  120. package/dist/src/executors/cargo-clippy/untyped.mjs +2 -2
  121. package/dist/src/executors/cargo-doc/executor.js +9 -9
  122. package/dist/src/executors/cargo-doc/executor.mjs +8 -8
  123. package/dist/src/executors/cargo-doc/untyped.js +3 -3
  124. package/dist/src/executors/cargo-doc/untyped.mjs +2 -2
  125. package/dist/src/executors/cargo-format/executor.js +9 -9
  126. package/dist/src/executors/cargo-format/executor.mjs +8 -8
  127. package/dist/src/executors/cargo-format/untyped.js +3 -3
  128. package/dist/src/executors/cargo-format/untyped.mjs +2 -2
  129. package/dist/src/executors/cargo-publish/executor.js +4 -4
  130. package/dist/src/executors/cargo-publish/executor.mjs +3 -3
  131. package/dist/src/executors/cargo-publish/untyped.js +3 -3
  132. package/dist/src/executors/cargo-publish/untyped.mjs +2 -2
  133. package/dist/src/executors/clean-package/executor.js +84 -62
  134. package/dist/src/executors/clean-package/executor.mjs +84 -62
  135. package/dist/src/executors/clean-package/untyped.js +2 -4
  136. package/dist/src/executors/clean-package/untyped.mjs +2 -4
  137. package/dist/src/executors/esbuild/executor.js +8 -8
  138. package/dist/src/executors/esbuild/executor.mjs +7 -7
  139. package/dist/src/executors/esbuild/untyped.js +4 -8
  140. package/dist/src/executors/esbuild/untyped.mjs +3 -7
  141. package/dist/src/executors/npm-publish/executor.js +5 -5
  142. package/dist/src/executors/npm-publish/executor.mjs +4 -4
  143. package/dist/src/executors/npm-publish/untyped.js +1 -1
  144. package/dist/src/executors/npm-publish/untyped.mjs +1 -1
  145. package/dist/src/executors/size-limit/executor.js +8 -8
  146. package/dist/src/executors/size-limit/executor.mjs +7 -7
  147. package/dist/src/executors/size-limit/untyped.js +1 -1
  148. package/dist/src/executors/size-limit/untyped.mjs +1 -1
  149. package/dist/src/executors/typia/executor.js +8 -8
  150. package/dist/src/executors/typia/executor.mjs +7 -7
  151. package/dist/src/executors/typia/untyped.js +4 -12
  152. package/dist/src/executors/typia/untyped.mjs +4 -12
  153. package/dist/src/executors/unbuild/executor.js +8 -8
  154. package/dist/src/executors/unbuild/executor.mjs +7 -7
  155. package/dist/src/executors/unbuild/untyped.js +6 -13
  156. package/dist/src/executors/unbuild/untyped.mjs +5 -12
  157. package/dist/src/generators/browser-library/generator.js +10 -10
  158. package/dist/src/generators/browser-library/generator.mjs +9 -9
  159. package/dist/src/generators/browser-library/untyped.js +5 -11
  160. package/dist/src/generators/browser-library/untyped.mjs +4 -10
  161. package/dist/src/generators/config-schema/generator.js +8 -8
  162. package/dist/src/generators/config-schema/generator.mjs +7 -7
  163. package/dist/src/generators/config-schema/untyped.js +1 -1
  164. package/dist/src/generators/config-schema/untyped.mjs +1 -1
  165. package/dist/src/generators/init/init.js +3 -3
  166. package/dist/src/generators/init/init.mjs +2 -2
  167. package/dist/src/generators/init/untyped.js +1 -1
  168. package/dist/src/generators/init/untyped.mjs +1 -1
  169. package/dist/src/generators/neutral-library/generator.js +10 -10
  170. package/dist/src/generators/neutral-library/generator.mjs +9 -9
  171. package/dist/src/generators/neutral-library/untyped.js +5 -10
  172. package/dist/src/generators/neutral-library/untyped.mjs +4 -9
  173. package/dist/src/generators/node-library/generator.js +10 -10
  174. package/dist/src/generators/node-library/generator.mjs +9 -9
  175. package/dist/src/generators/node-library/untyped.js +5 -11
  176. package/dist/src/generators/node-library/untyped.mjs +4 -10
  177. package/dist/src/generators/preset/generator.js +8 -8
  178. package/dist/src/generators/preset/generator.mjs +7 -7
  179. package/dist/src/generators/preset/untyped.js +3 -11
  180. package/dist/src/generators/preset/untyped.mjs +3 -11
  181. package/dist/src/generators/release-version/generator.js +7 -7
  182. package/dist/src/generators/release-version/generator.mjs +6 -6
  183. package/dist/src/generators/release-version/untyped.js +3 -14
  184. package/dist/src/generators/release-version/untyped.mjs +3 -14
  185. package/dist/src/plugins/rust/cargo-toml.js +5 -5
  186. package/dist/src/plugins/rust/cargo-toml.mjs +4 -4
  187. package/dist/src/plugins/rust/index.js +5 -5
  188. package/dist/src/plugins/rust/index.mjs +4 -4
  189. package/dist/src/plugins/typescript/index.js +5 -5
  190. package/dist/src/plugins/typescript/index.mjs +4 -4
  191. package/dist/src/plugins/typescript/project-config.js +5 -5
  192. package/dist/src/plugins/typescript/project-config.mjs +4 -4
  193. package/dist/src/plugins/typescript/tsup.js +114 -109
  194. package/dist/src/plugins/typescript/tsup.mjs +116 -111
  195. package/dist/src/plugins/typescript/untyped-schema.js +93 -77
  196. package/dist/src/plugins/typescript/untyped-schema.mjs +96 -80
  197. package/dist/src/types.js +1 -1
  198. package/dist/src/types.mjs +1 -1
  199. package/dist/src/utils/apply-workspace-tokens.js +5 -5
  200. package/dist/src/utils/apply-workspace-tokens.mjs +4 -4
  201. package/dist/src/utils/cargo.js +3 -3
  202. package/dist/src/utils/cargo.mjs +2 -2
  203. package/dist/src/utils/create-cli-options.js +3 -3
  204. package/dist/src/utils/create-cli-options.mjs +2 -2
  205. package/dist/src/utils/get-project-configurations.js +5 -5
  206. package/dist/src/utils/get-project-configurations.mjs +4 -4
  207. package/dist/src/utils/index.js +15 -15
  208. package/dist/src/utils/index.mjs +14 -14
  209. package/dist/src/utils/lock-file.js +3 -3
  210. package/dist/src/utils/lock-file.mjs +2 -2
  211. package/dist/src/utils/package-helpers.js +5 -5
  212. package/dist/src/utils/package-helpers.mjs +4 -4
  213. package/dist/src/utils/plugin-helpers.js +4 -4
  214. package/dist/src/utils/plugin-helpers.mjs +3 -3
  215. package/dist/src/utils/pnpm-deps-update.js +4 -4
  216. package/dist/src/utils/pnpm-deps-update.mjs +3 -3
  217. package/dist/src/utils/project-tags.js +3 -3
  218. package/dist/src/utils/project-tags.mjs +2 -2
  219. package/dist/src/utils/toml.js +3 -3
  220. package/dist/src/utils/toml.mjs +2 -2
  221. package/dist/src/utils/typia-transform.js +3 -3
  222. package/dist/src/utils/typia-transform.mjs +2 -2
  223. package/dist/src/utils/versions.js +1 -1
  224. package/dist/src/utils/versions.mjs +1 -1
  225. package/package.json +1 -1
  226. package/dist/chunk-3GQAWCBQ.js +0 -13
  227. package/dist/chunk-3IZ3O4OK.js +0 -30
  228. package/dist/chunk-6JJB5AYA.js +0 -51
  229. package/dist/chunk-7AXFMX2T.js +0 -37
  230. package/dist/chunk-B3DVFXXD.js +0 -32
  231. package/dist/chunk-DHOPT66G.mjs +0 -32
  232. package/dist/chunk-ECGUA6DW.mjs +0 -48
  233. package/dist/chunk-FMDP5I2Q.mjs +0 -446
  234. package/dist/chunk-GFHXZA2W.mjs +0 -31
  235. package/dist/chunk-HIZQZGPN.mjs +0 -32
  236. package/dist/chunk-HOXPAVCL.js +0 -32
  237. package/dist/chunk-ICPUM2HS.js +0 -50
  238. package/dist/chunk-ID7QJZH6.mjs +0 -37
  239. package/dist/chunk-KCUI5EYN.mjs +0 -468
  240. package/dist/chunk-KEBNU3P2.js +0 -446
  241. package/dist/chunk-KVZPB73M.mjs +0 -86
  242. package/dist/chunk-NSCWEC2S.js +0 -32
  243. package/dist/chunk-NX7JRHF4.mjs +0 -50
  244. package/dist/chunk-OQTJDGUH.js +0 -468
  245. package/dist/chunk-QCF7H4NZ.mjs +0 -32
  246. package/dist/chunk-QKHODSAV.mjs +0 -13
  247. package/dist/chunk-QMD25JYH.mjs +0 -43
  248. package/dist/chunk-RUKOOSWL.js +0 -31
  249. package/dist/chunk-SBJV4LAX.mjs +0 -51
  250. package/dist/chunk-TET4GF3D.js +0 -43
  251. package/dist/chunk-XITP2BX2.js +0 -13
  252. package/dist/chunk-XJZ5TRTJ.mjs +0 -102
  253. package/dist/chunk-Y4TQKFAH.mjs +0 -18
  254. package/dist/chunk-YW4UN25U.js +0 -86
  255. package/dist/chunk-ZUNLUDAB.mjs +0 -30
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  applyWorkspaceBaseTokens,
3
3
  applyWorkspaceTokens
4
- } from "./chunk-RK3UDPDP.mjs";
4
+ } from "./chunk-X6PHOMFB.mjs";
5
5
  import {
6
6
  getConfig,
7
7
  getStopwatch,
@@ -11,16 +11,13 @@ import {
11
11
  writeInfo,
12
12
  writeSuccess,
13
13
  writeTrace
14
- } from "./chunk-YAKIVJU6.mjs";
14
+ } from "./chunk-2M22JVJQ.mjs";
15
15
  import {
16
16
  findWorkspaceRoot
17
- } from "./chunk-34WSVY5D.mjs";
18
- import {
19
- __name
20
- } from "./chunk-WPRKDCZP.mjs";
17
+ } from "./chunk-LSF4BHCI.mjs";
21
18
 
22
19
  // src/base/base-generator.ts
23
- var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptions = {
20
+ var withRunGenerator = (name, generatorFn, generatorOptions = {
24
21
  skipReadingConfig: false
25
22
  }) => async (tree, _options) => {
26
23
  const stopwatch = getStopwatch(name);
@@ -32,27 +29,40 @@ var withRunGenerator = /* @__PURE__ */ __name((name, generatorFn, generatorOptio
32
29
  `, config);
33
30
  const workspaceRoot = findWorkspaceRoot();
34
31
  if (!generatorOptions.skipReadingConfig) {
35
- writeDebug(`Loading the Storm Config from environment variables and storm.config.js file...
36
- - workspaceRoot: ${workspaceRoot}`, config);
32
+ writeDebug(
33
+ `Loading the Storm Config from environment variables and storm.config.js file...
34
+ - workspaceRoot: ${workspaceRoot}`,
35
+ config
36
+ );
37
37
  config = await getConfig(workspaceRoot);
38
38
  }
39
39
  if (generatorOptions?.hooks?.applyDefaultOptions) {
40
40
  writeDebug("Running the applyDefaultOptions hook...", config);
41
- options = await Promise.resolve(generatorOptions.hooks.applyDefaultOptions(options, config));
41
+ options = await Promise.resolve(
42
+ generatorOptions.hooks.applyDefaultOptions(options, config)
43
+ );
42
44
  writeDebug("Completed the applyDefaultOptions hook", config);
43
45
  }
44
- writeTrace(`Generator schema options \u2699\uFE0F
45
- ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`, config);
46
- const tokenized = await applyWorkspaceTokens(options, {
47
- workspaceRoot: tree.root,
46
+ writeTrace(
47
+ `Generator schema options \u2699\uFE0F
48
+ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
48
49
  config
49
- }, applyWorkspaceBaseTokens);
50
+ );
51
+ const tokenized = await applyWorkspaceTokens(
52
+ options,
53
+ { workspaceRoot: tree.root, config },
54
+ applyWorkspaceBaseTokens
55
+ );
50
56
  if (generatorOptions?.hooks?.preProcess) {
51
57
  writeDebug("Running the preProcess hook...", config);
52
- await Promise.resolve(generatorOptions.hooks.preProcess(tokenized, config));
58
+ await Promise.resolve(
59
+ generatorOptions.hooks.preProcess(tokenized, config)
60
+ );
53
61
  writeDebug("Completed the preProcess hook", config);
54
62
  }
55
- const result = await Promise.resolve(generatorFn(tree, tokenized, config));
63
+ const result = await Promise.resolve(
64
+ generatorFn(tree, tokenized, config)
65
+ );
56
66
  if (result) {
57
67
  if (result.success === false || result.error && result?.error?.message && typeof result?.error?.message === "string" && result?.error?.name && typeof result?.error?.name === "string") {
58
68
  throw new Error(`The ${name} generator failed to run`, {
@@ -73,15 +83,21 @@ ${Object.keys(options ?? {}).map((key) => ` - ${key}=${JSON.stringify(options[ke
73
83
  };
74
84
  } catch (error) {
75
85
  return () => {
76
- writeFatal("A fatal error occurred while running the generator - the process was forced to terminate", config);
77
- writeError(`An exception was thrown in the generator's process
86
+ writeFatal(
87
+ "A fatal error occurred while running the generator - the process was forced to terminate",
88
+ config
89
+ );
90
+ writeError(
91
+ `An exception was thrown in the generator's process
78
92
  - Details: ${error.message}
79
- - Stacktrace: ${error.stack}`, config);
93
+ - Stacktrace: ${error.stack}`,
94
+ config
95
+ );
80
96
  };
81
97
  } finally {
82
98
  stopwatch();
83
99
  }
84
- }, "withRunGenerator");
100
+ };
85
101
 
86
102
  export {
87
103
  withRunGenerator
@@ -1,12 +1,9 @@
1
1
  import {
2
2
  pnpmCatalogUpdate
3
- } from "./chunk-NM7WF6O5.mjs";
3
+ } from "./chunk-HMJTTE4A.mjs";
4
4
  import {
5
5
  joinPaths
6
- } from "./chunk-D3U4WMSI.mjs";
7
- import {
8
- __name
9
- } from "./chunk-WPRKDCZP.mjs";
6
+ } from "./chunk-U7JFVMCK.mjs";
10
7
 
11
8
  // src/executors/npm-publish/executor.ts
12
9
  import { execSync } from "node:child_process";
@@ -19,9 +16,14 @@ async function npmPublishExecutorFn(options, context) {
19
16
  }
20
17
  const projectConfig = context.projectsConfigurations?.projects?.[context.projectName];
21
18
  if (!projectConfig) {
22
- throw new Error(`Could not find project configuration for \`${context.projectName}\``);
19
+ throw new Error(
20
+ `Could not find project configuration for \`${context.projectName}\``
21
+ );
23
22
  }
24
- const packageRoot = joinPaths(context.root, options.packageRoot || joinPaths("dist", projectConfig.root));
23
+ const packageRoot = joinPaths(
24
+ context.root,
25
+ options.packageRoot || joinPaths("dist", projectConfig.root)
26
+ );
25
27
  const packageJsonPath = joinPaths(packageRoot, "package.json");
26
28
  const packageJsonFile = await readFile(packageJsonPath, "utf8");
27
29
  if (!packageJsonFile) {
@@ -29,18 +31,18 @@ async function npmPublishExecutorFn(options, context) {
29
31
  }
30
32
  const packageJson = JSON.parse(packageJsonFile);
31
33
  const packageName = packageJson.name;
32
- console.info(`\u{1F680} Running Storm NPM Publish executor on the ${packageName} package`);
34
+ console.info(
35
+ `\u{1F680} Running Storm NPM Publish executor on the ${packageName} package`
36
+ );
33
37
  const packageTxt = packageName === context.projectName ? `package "${packageName}"` : `package "${packageName}" from project "${context.projectName}"`;
34
38
  if (packageJson.private === true) {
35
- console.warn(`Skipped ${packageTxt}, because it has \`"private": true\` in ${packageJsonPath}`);
36
- return {
37
- success: true
38
- };
39
+ console.warn(
40
+ `Skipped ${packageTxt}, because it has \`"private": true\` in ${packageJsonPath}`
41
+ );
42
+ return { success: true };
39
43
  }
40
44
  await pnpmCatalogUpdate(packageRoot, context.root);
41
- const npmPublishCommandSegments = [
42
- `npm publish --json`
43
- ];
45
+ const npmPublishCommandSegments = [`npm publish --json`];
44
46
  const npmViewCommandSegments = [
45
47
  `npm view ${packageName} versions dist-tags --json`
46
48
  ];
@@ -92,27 +94,31 @@ async function npmPublishExecutorFn(options, context) {
92
94
  const resultJson = JSON.parse(result.toString());
93
95
  const distTags = resultJson["dist-tags"] || {};
94
96
  if (distTags[tag] === currentVersion) {
95
- console.warn(`Skipped ${packageTxt} because v${currentVersion} already exists in ${registry} with tag "${tag}"`);
96
- return {
97
- success: true
98
- };
97
+ console.warn(
98
+ `Skipped ${packageTxt} because v${currentVersion} already exists in ${registry} with tag "${tag}"`
99
+ );
100
+ return { success: true };
99
101
  }
100
102
  } catch (err) {
101
103
  console.warn("\n ********************** \n");
102
- console.warn(`An error occurred while checking for existing dist-tags
104
+ console.warn(
105
+ `An error occurred while checking for existing dist-tags
103
106
  ${JSON.stringify(err)}
104
107
 
105
108
  Note: If this is the first time this package has been published to NPM, this can be ignored.
106
109
 
107
- `);
110
+ `
111
+ );
108
112
  console.info("");
109
113
  }
110
114
  try {
111
115
  if (!isDryRun) {
112
116
  const command = `npm dist-tag add ${packageName}@${currentVersion} ${tag} --registry="${registry}" `;
113
- console.info(`Adding the dist-tag ${tag} - preparing to run the following:
117
+ console.info(
118
+ `Adding the dist-tag ${tag} - preparing to run the following:
114
119
  ${command}
115
- `);
120
+ `
121
+ );
116
122
  const result = execSync(command, {
117
123
  cwd: packageRoot,
118
124
  env: {
@@ -122,17 +128,19 @@ ${command}
122
128
  maxBuffer: LARGE_BUFFER,
123
129
  killSignal: "SIGTERM"
124
130
  });
125
- console.info(`Added the dist-tag ${tag} to v${currentVersion} for registry "${registry}"
131
+ console.info(
132
+ `Added the dist-tag ${tag} to v${currentVersion} for registry "${registry}"
126
133
 
127
134
  Execution response: ${result.toString()}
128
- `);
135
+ `
136
+ );
129
137
  } else {
130
- console.info(`Would add the dist-tag ${tag} to v${currentVersion} for registry "${registry}", but [dry-run] was set.
131
- `);
138
+ console.info(
139
+ `Would add the dist-tag ${tag} to v${currentVersion} for registry "${registry}", but [dry-run] was set.
140
+ `
141
+ );
132
142
  }
133
- return {
134
- success: true
135
- };
143
+ return { success: true };
136
144
  } catch (err) {
137
145
  try {
138
146
  console.warn("\n ********************** \n");
@@ -140,16 +148,20 @@ Execution response: ${result.toString()}
140
148
  if (Buffer.isBuffer(error)) {
141
149
  error = error.toString();
142
150
  }
143
- console.warn(`An error occurred while adding dist-tags:
151
+ console.warn(
152
+ `An error occurred while adding dist-tags:
144
153
  ${error}
145
154
 
146
155
  Note: If this is the first time this package has been published to NPM, this can be ignored.
147
156
 
148
- `);
157
+ `
158
+ );
149
159
  console.info("");
150
160
  const stdoutData = JSON.parse(err.stdout?.toString() || "{}");
151
161
  if (stdoutData?.error && !(stdoutData.error?.code?.includes("E404") && stdoutData.error?.summary?.includes("no such package available")) && !(err.stderr?.toString().includes("E404") && err.stderr?.toString().includes("no such package available"))) {
152
- console.error("npm dist-tag add error please see below for more information:");
162
+ console.error(
163
+ "npm dist-tag add error please see below for more information:"
164
+ );
153
165
  if (stdoutData.error.summary) {
154
166
  console.error(stdoutData.error?.summary);
155
167
  }
@@ -157,18 +169,18 @@ Note: If this is the first time this package has been published to NPM, this can
157
169
  console.error(stdoutData.error?.detail);
158
170
  }
159
171
  if (context.isVerbose) {
160
- console.error(`npm dist-tag add stdout: ${JSON.stringify(stdoutData, null, 2)}`);
172
+ console.error(
173
+ `npm dist-tag add stdout: ${JSON.stringify(stdoutData, null, 2)}`
174
+ );
161
175
  }
162
- return {
163
- success: false
164
- };
176
+ return { success: false };
165
177
  }
166
178
  } catch (err2) {
167
- console.error(`Something unexpected went wrong when processing the npm dist-tag add output
168
- ${JSON.stringify(err2)}`);
169
- return {
170
- success: false
171
- };
179
+ console.error(
180
+ `Something unexpected went wrong when processing the npm dist-tag add output
181
+ ${JSON.stringify(err2)}`
182
+ );
183
+ return { success: false };
172
184
  }
173
185
  }
174
186
  } catch (err) {
@@ -178,25 +190,29 @@ ${JSON.stringify(err2)}`);
178
190
  }
179
191
  console.error("\n ********************** \n");
180
192
  console.info("");
181
- console.error("An error occured trying to run the npm dist-tag add command.");
193
+ console.error(
194
+ "An error occured trying to run the npm dist-tag add command."
195
+ );
182
196
  console.error(error);
183
197
  console.info("");
184
198
  const stdoutData = JSON.parse(err.stdout?.toString() || "{}");
185
199
  if (!(stdoutData.error?.code?.includes("E404") && stdoutData.error?.summary?.toLowerCase().includes("not found")) && !(err.stderr?.toString().includes("E404") && err.stderr?.toString().toLowerCase().includes("not found"))) {
186
- console.error(`Something unexpected went wrong when checking for existing dist-tags.
200
+ console.error(
201
+ `Something unexpected went wrong when checking for existing dist-tags.
187
202
 
188
203
  Error: ${JSON.stringify(err)}
189
- `);
190
- return {
191
- success: false
192
- };
204
+ `
205
+ );
206
+ return { success: false };
193
207
  }
194
208
  }
195
209
  }
196
210
  try {
197
211
  const cwd = packageRoot;
198
212
  const command = npmPublishCommandSegments.join(" ");
199
- console.info(`Running publish command "${command}" in current working directory: "${cwd}" `);
213
+ console.info(
214
+ `Running publish command "${command}" in current working directory: "${cwd}" `
215
+ );
200
216
  const result = execSync(command, {
201
217
  cwd,
202
218
  env: {
@@ -207,19 +223,19 @@ Error: ${JSON.stringify(err)}
207
223
  killSignal: "SIGTERM"
208
224
  });
209
225
  if (isDryRun) {
210
- console.info(`Would publish to ${registry} with tag "${tag}", but [dry-run] was set ${result ? `
226
+ console.info(
227
+ `Would publish to ${registry} with tag "${tag}", but [dry-run] was set ${result ? `
211
228
 
212
229
  Execution response: ${result.toString()}` : ""}
213
- `);
230
+ `
231
+ );
214
232
  } else {
215
233
  console.info(`Published to ${registry} with tag "${tag}" ${result ? `
216
234
 
217
235
  Execution response: ${result.toString()}` : ""}
218
236
  `);
219
237
  }
220
- return {
221
- success: true
222
- };
238
+ return { success: true };
223
239
  } catch (err) {
224
240
  try {
225
241
  console.error("\n ********************** \n");
@@ -236,30 +252,29 @@ Execution response: ${result.toString()}` : ""}
236
252
  console.error(stdoutData.error.detail);
237
253
  }
238
254
  if (context.isVerbose) {
239
- console.error(`npm publish stdout:
240
- ${JSON.stringify(stdoutData, null, 2)}`);
255
+ console.error(
256
+ `npm publish stdout:
257
+ ${JSON.stringify(stdoutData, null, 2)}`
258
+ );
241
259
  }
242
260
  console.error("\n ********************** \n");
243
- return {
244
- success: false
245
- };
261
+ return { success: false };
246
262
  } catch (err2) {
247
263
  let error = err2;
248
264
  if (Buffer.isBuffer(error)) {
249
265
  error = error.toString();
250
266
  }
251
- console.error(`Something unexpected went wrong when processing the npm publish output
267
+ console.error(
268
+ `Something unexpected went wrong when processing the npm publish output
252
269
 
253
270
  Error: ${JSON.stringify(error)}
254
- `);
271
+ `
272
+ );
255
273
  console.error("\n ********************** \n");
256
- return {
257
- success: false
258
- };
274
+ return { success: false };
259
275
  }
260
276
  }
261
277
  }
262
- __name(npmPublishExecutorFn, "npmPublishExecutorFn");
263
278
 
264
279
  export {
265
280
  LARGE_BUFFER,
@@ -1,17 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunk7YRW5HNXjs = require('./chunk-7YRW5HNX.js');
5
-
6
-
7
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
4
+ var _chunkAX3RSZT7js = require('./chunk-AX3RSZT7.js');
8
5
 
9
6
  // src/utils/plugin-helpers.ts
10
7
  var _devkit = require('@nx/devkit');
11
8
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
12
9
  var _fs = require('fs');
13
10
  var _path = require('path');
14
- var getProjectPlatform = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (project, ignoreTags = false) => {
11
+ var getProjectPlatform = (project, ignoreTags = false) => {
15
12
  const tsconfigJson = _devkit.readJsonFile.call(void 0, _path.join.call(void 0, project.root, "tsconfig.json"));
16
13
  if (!tsconfigJson) {
17
14
  throw new Error(`No tsconfig.json found in project root: ${project.root}`);
@@ -22,26 +19,32 @@ var getProjectPlatform = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (p
22
19
  }
23
20
  let platformTag = void 0;
24
21
  if (!ignoreTags) {
25
- platformTag = _chunk7YRW5HNXjs.getProjectTag.call(void 0, project, _chunk7YRW5HNXjs.ProjectTagConstants.Platform.TAG_ID);
22
+ platformTag = _chunkAX3RSZT7js.getProjectTag.call(void 0, project, _chunkAX3RSZT7js.ProjectTagConstants.Platform.TAG_ID);
26
23
  }
27
- if (platformTag !== _chunk7YRW5HNXjs.ProjectTagConstants.Platform.NEUTRAL) {
24
+ if (platformTag !== _chunkAX3RSZT7js.ProjectTagConstants.Platform.NEUTRAL) {
28
25
  const types = Array.isArray(_optionalChain([tsconfigJson, 'access', _ => _.compilerOptions, 'optionalAccess', _2 => _2.types])) ? tsconfigJson.compilerOptions.types : [];
29
- if (platformTag === _chunk7YRW5HNXjs.ProjectTagConstants.Platform.WORKER || types.some((type) => type.toLowerCase() === "@cloudflare/workers-types") || _optionalChain([packageJson, 'access', _3 => _3.devDependencies, 'optionalAccess', _4 => _4["@cloudflare/workers-types"]]) || _optionalChain([packageJson, 'access', _5 => _5.devDependencies, 'optionalAccess', _6 => _6["wrangler"]])) {
26
+ if (platformTag === _chunkAX3RSZT7js.ProjectTagConstants.Platform.WORKER || types.some(
27
+ (type) => type.toLowerCase() === "@cloudflare/workers-types"
28
+ ) || _optionalChain([packageJson, 'access', _3 => _3.devDependencies, 'optionalAccess', _4 => _4["@cloudflare/workers-types"]]) || _optionalChain([packageJson, 'access', _5 => _5.devDependencies, 'optionalAccess', _6 => _6["wrangler"]])) {
30
29
  return "worker";
31
30
  }
32
- if (platformTag === _chunk7YRW5HNXjs.ProjectTagConstants.Platform.NODE || _optionalChain([types, 'optionalAccess', _7 => _7.some, 'call', _8 => _8((type) => type.toLowerCase() === "node")]) || _optionalChain([packageJson, 'access', _9 => _9.devDependencies, 'optionalAccess', _10 => _10["@types/node"]])) {
31
+ if (platformTag === _chunkAX3RSZT7js.ProjectTagConstants.Platform.NODE || _optionalChain([types, 'optionalAccess', _7 => _7.some, 'call', _8 => _8((type) => type.toLowerCase() === "node")]) || _optionalChain([packageJson, 'access', _9 => _9.devDependencies, 'optionalAccess', _10 => _10["@types/node"]])) {
33
32
  return "node";
34
33
  }
35
- if (platformTag === _chunk7YRW5HNXjs.ProjectTagConstants.Platform.BROWSER || _optionalChain([types, 'optionalAccess', _11 => _11.some, 'call', _12 => _12((type) => type.toLowerCase() === "dom")]) || packageJson.dependencies && Object.keys(packageJson.dependencies).some((dependency) => dependency.includes("react")) || packageJson.devDependencies && Object.keys(packageJson.devDependencies).some((devDependency) => devDependency.includes("react"))) {
34
+ if (platformTag === _chunkAX3RSZT7js.ProjectTagConstants.Platform.BROWSER || _optionalChain([types, 'optionalAccess', _11 => _11.some, 'call', _12 => _12((type) => type.toLowerCase() === "dom")]) || packageJson.dependencies && Object.keys(packageJson.dependencies).some(
35
+ (dependency) => dependency.includes("react")
36
+ ) || packageJson.devDependencies && Object.keys(packageJson.devDependencies).some(
37
+ (devDependency) => devDependency.includes("react")
38
+ )) {
36
39
  return "browser";
37
40
  }
38
41
  }
39
42
  return "neutral";
40
- }, "getProjectPlatform");
41
- var getProjectConfigFromProjectJsonPath = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (projectJsonPath, packageJson) => {
43
+ };
44
+ var getProjectConfigFromProjectJsonPath = (projectJsonPath, packageJson) => {
42
45
  return getProjectConfigFromProjectRoot(_path.dirname.call(void 0, projectJsonPath), packageJson);
43
- }, "getProjectConfigFromProjectJsonPath");
44
- var getProjectConfigFromProjectRoot = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (projectRoot, packageJson) => {
46
+ };
47
+ var getProjectConfigFromProjectRoot = (projectRoot, packageJson) => {
45
48
  const { nx, name } = packageJson;
46
49
  const projectJson = _devkit.readJsonFile.call(void 0, _path.join.call(void 0, projectRoot, "project.json"));
47
50
  return _defu2.default.call(void 0, _nullishCoalesce(nx, () => ( {})), projectJson, {
@@ -50,8 +53,8 @@ var getProjectConfigFromProjectRoot = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.ca
50
53
  name,
51
54
  root: projectRoot
52
55
  });
53
- }, "getProjectConfigFromProjectRoot");
54
- var getProjectRoot = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (configPath, workspaceRoot) => {
56
+ };
57
+ var getProjectRoot = (configPath, workspaceRoot) => {
55
58
  try {
56
59
  const root = _path.dirname.call(void 0, configPath);
57
60
  const projectRoot = _path.join.call(void 0, workspaceRoot, root);
@@ -63,7 +66,7 @@ var getProjectRoot = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (confi
63
66
  console.error(error_);
64
67
  return null;
65
68
  }
66
- }, "getProjectRoot");
69
+ };
67
70
 
68
71
 
69
72
 
@@ -24,11 +24,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
24
24
  $schema: {
25
25
  title: "Toolchain",
26
26
  description: "The type of toolchain to use for the build",
27
- enum: [
28
- "stable",
29
- "beta",
30
- "nightly"
31
- ],
27
+ enum: ["stable", "beta", "nightly"],
32
28
  default: "stable"
33
29
  },
34
30
  $default: "stable"
@@ -66,17 +62,7 @@ var cargo_base_executor_untyped_default = _untyped.defineUntypedSchema.call(void
66
62
  title: "Features",
67
63
  type: "string",
68
64
  description: "The features to build",
69
- oneOf: [
70
- {
71
- type: "string"
72
- },
73
- {
74
- type: "array",
75
- items: {
76
- type: "string"
77
- }
78
- }
79
- ]
65
+ oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
80
66
  }
81
67
  },
82
68
  allFeatures: {
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }// src/utils/typia-transform.ts
2
+ var _transform = require('typia/lib/transform'); var _transform2 = _interopRequireDefault(_transform);
3
+ var getTypiaTransform = (program, diagnostics) => _transform2.default.call(void 0, program, {}, { addDiagnostic: (input) => diagnostics.push(input) });
4
+
5
+
6
+
7
+ exports.getTypiaTransform = getTypiaTransform;
@@ -0,0 +1,64 @@
1
+ import {
2
+ withRunGenerator
3
+ } from "./chunk-5HUW3BTP.mjs";
4
+ import {
5
+ stormWorkspaceConfigSchema,
6
+ writeInfo,
7
+ writeSuccess,
8
+ writeTrace
9
+ } from "./chunk-2M22JVJQ.mjs";
10
+ import {
11
+ findWorkspaceRoot
12
+ } from "./chunk-LSF4BHCI.mjs";
13
+
14
+ // src/generators/config-schema/generator.ts
15
+ import { formatFiles, writeJson } from "@nx/devkit";
16
+ import { zodToJsonSchema } from "zod-to-json-schema";
17
+ async function configSchemaGeneratorFn(tree, options, config) {
18
+ writeInfo(
19
+ "\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
20
+ config
21
+ );
22
+ writeTrace(
23
+ `Determining the Storm Workspace Configuration JSON Schema...`,
24
+ config
25
+ );
26
+ const jsonSchema = zodToJsonSchema(stormWorkspaceConfigSchema, {
27
+ name: "StormWorkspaceConfiguration"
28
+ });
29
+ writeTrace(jsonSchema, config);
30
+ const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
31
+ config?.workspaceRoot ?? findWorkspaceRoot(),
32
+ options.outputFile?.startsWith("./") ? "" : "./"
33
+ );
34
+ writeTrace(
35
+ `\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
36
+ config
37
+ );
38
+ writeJson(tree, outputPath, jsonSchema, { spaces: 2 });
39
+ await formatFiles(tree);
40
+ writeSuccess(
41
+ "\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
42
+ config
43
+ );
44
+ return {
45
+ success: true
46
+ };
47
+ }
48
+ var generator_default = withRunGenerator(
49
+ "Configuration Schema Creator",
50
+ configSchemaGeneratorFn,
51
+ {
52
+ hooks: {
53
+ applyDefaultOptions: (options) => {
54
+ options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
55
+ return options;
56
+ }
57
+ }
58
+ }
59
+ );
60
+
61
+ export {
62
+ configSchemaGeneratorFn,
63
+ generator_default
64
+ };
@@ -24,11 +24,7 @@ var cargo_base_executor_untyped_default = defineUntypedSchema({
24
24
  $schema: {
25
25
  title: "Toolchain",
26
26
  description: "The type of toolchain to use for the build",
27
- enum: [
28
- "stable",
29
- "beta",
30
- "nightly"
31
- ],
27
+ enum: ["stable", "beta", "nightly"],
32
28
  default: "stable"
33
29
  },
34
30
  $default: "stable"
@@ -66,17 +62,7 @@ var cargo_base_executor_untyped_default = defineUntypedSchema({
66
62
  title: "Features",
67
63
  type: "string",
68
64
  description: "The features to build",
69
- oneOf: [
70
- {
71
- type: "string"
72
- },
73
- {
74
- type: "array",
75
- items: {
76
- type: "string"
77
- }
78
- }
79
- ]
65
+ oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
80
66
  }
81
67
  },
82
68
  allFeatures: {