@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,6 +1,6 @@
1
1
  import {
2
2
  withRunExecutor
3
- } from "./chunk-O5QR3B3Z.mjs";
3
+ } from "./chunk-UYSJG2E5.mjs";
4
4
  import {
5
5
  getStopwatch,
6
6
  getWorkspaceConfig,
@@ -11,17 +11,16 @@ import {
11
11
  writeSuccess,
12
12
  writeTrace,
13
13
  writeWarning
14
- } from "./chunk-YAKIVJU6.mjs";
14
+ } from "./chunk-2M22JVJQ.mjs";
15
15
  import {
16
16
  findWorkspaceRoot
17
- } from "./chunk-34WSVY5D.mjs";
17
+ } from "./chunk-LSF4BHCI.mjs";
18
18
  import {
19
19
  joinPaths
20
- } from "./chunk-D3U4WMSI.mjs";
20
+ } from "./chunk-U7JFVMCK.mjs";
21
21
  import {
22
- __name,
23
22
  __require
24
- } from "./chunk-WPRKDCZP.mjs";
23
+ } from "./chunk-IEZKYJSF.mjs";
25
24
 
26
25
  // ../esbuild/src/build.ts
27
26
  import * as esbuild from "esbuild";
@@ -54,7 +53,7 @@ import { relative } from "path";
54
53
  import { CopyAssetsHandler } from "@nx/js/src/utils/assets/copy-assets-handler";
55
54
  import { glob } from "glob";
56
55
  import { readFile, writeFile } from "node:fs/promises";
57
- var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
56
+ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
58
57
  const pendingAssets = Array.from(assets ?? []);
59
58
  pendingAssets.push({
60
59
  input: projectRoot,
@@ -80,8 +79,11 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
80
79
  output: "src/"
81
80
  });
82
81
  }
83
- writeTrace(`\u{1F4DD} Copying the following assets to the output directory:
84
- ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`, config);
82
+ writeTrace(
83
+ `\u{1F4DD} Copying the following assets to the output directory:
84
+ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${joinPaths(outputPath, pendingAsset.output)}`).join("\n")}`,
85
+ config
86
+ );
85
87
  const assetHandler = new CopyAssetsHandler({
86
88
  projectDir: projectRoot,
87
89
  rootDir: config.workspaceRoot,
@@ -90,28 +92,45 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
90
92
  });
91
93
  await assetHandler.processAllAssetsOnce();
92
94
  if (includeSrc === true) {
93
- writeDebug(`\u{1F4DD} Adding banner and writing source files: ${joinPaths(outputPath, "src")}`, config);
95
+ writeDebug(
96
+ `\u{1F4DD} Adding banner and writing source files: ${joinPaths(
97
+ outputPath,
98
+ "src"
99
+ )}`,
100
+ config
101
+ );
94
102
  const files = await glob([
95
103
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.ts"),
96
104
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.tsx"),
97
105
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
98
106
  joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
99
107
  ]);
100
- await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
108
+ await Promise.allSettled(
109
+ files.map(
110
+ async (file) => writeFile(
111
+ file,
112
+ `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
101
113
 
102
114
  ${await readFile(file, "utf8")}
103
115
 
104
- ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
116
+ ${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
117
+ )
118
+ )
119
+ );
105
120
  }
106
- }, "copyAssets");
121
+ };
107
122
 
108
123
  // ../build-tools/src/utilities/generate-package-json.ts
109
124
  import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
110
125
  import { Glob } from "glob";
111
126
  import { existsSync, readFileSync } from "node:fs";
112
127
  import { readFile as readFile2 } from "node:fs/promises";
113
- import { createProjectGraphAsync, readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "nx/src/project-graph/project-graph";
114
- var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
128
+ import {
129
+ createProjectGraphAsync,
130
+ readCachedProjectGraph,
131
+ readProjectsConfigurationFromProjectGraph
132
+ } from "nx/src/project-graph/project-graph";
133
+ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, packageJson) => {
115
134
  let projectGraph;
116
135
  try {
117
136
  projectGraph = readCachedProjectGraph();
@@ -120,16 +139,35 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
120
139
  projectGraph = readCachedProjectGraph();
121
140
  }
122
141
  if (!projectGraph) {
123
- throw new Error("The Build process failed because the project graph is not available. Please run the build command again.");
142
+ throw new Error(
143
+ "The Build process failed because the project graph is not available. Please run the build command again."
144
+ );
124
145
  }
125
- const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
146
+ const projectDependencies = calculateProjectBuildableDependencies(
147
+ void 0,
148
+ projectGraph,
149
+ workspaceRoot,
150
+ projectName,
151
+ process.env.NX_TASK_TARGET_TARGET || "build",
152
+ process.env.NX_TASK_TARGET_CONFIGURATION || "production",
153
+ true
154
+ );
126
155
  const localPackages = [];
127
- for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot)) {
156
+ for (const project of projectDependencies.dependencies.filter(
157
+ (dep) => dep.node.type === "lib" && dep.node.data?.root !== projectRoot && dep.node.data?.root !== workspaceRoot
158
+ )) {
128
159
  const projectNode = project.node;
129
160
  if (projectNode.data.root) {
130
- const projectPackageJsonPath = joinPaths(workspaceRoot, projectNode.data.root, "package.json");
161
+ const projectPackageJsonPath = joinPaths(
162
+ workspaceRoot,
163
+ projectNode.data.root,
164
+ "package.json"
165
+ );
131
166
  if (existsSync(projectPackageJsonPath)) {
132
- const projectPackageJsonContent = await readFile2(projectPackageJsonPath, "utf8");
167
+ const projectPackageJsonContent = await readFile2(
168
+ projectPackageJsonPath,
169
+ "utf8"
170
+ );
133
171
  const projectPackageJson = JSON.parse(projectPackageJsonContent);
134
172
  if (projectPackageJson.private !== true) {
135
173
  localPackages.push(projectPackageJson);
@@ -138,19 +176,33 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
138
176
  }
139
177
  }
140
178
  if (localPackages.length > 0) {
141
- writeTrace(`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
142
- const projectJsonFile = await readFile2(joinPaths(projectRoot, "project.json"), "utf8");
179
+ writeTrace(
180
+ `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
181
+ );
182
+ const projectJsonFile = await readFile2(
183
+ joinPaths(projectRoot, "project.json"),
184
+ "utf8"
185
+ );
143
186
  const projectJson = JSON.parse(projectJsonFile);
144
187
  const projectName2 = projectJson.name;
145
188
  const projectConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
146
189
  if (!projectConfigurations?.projects?.[projectName2]) {
147
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
190
+ throw new Error(
191
+ "The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
192
+ );
148
193
  }
149
194
  const implicitDependencies = projectConfigurations.projects?.[projectName2].implicitDependencies?.reduce((ret, dep) => {
150
195
  if (projectConfigurations.projects?.[dep]) {
151
- const depPackageJsonPath = joinPaths(workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
196
+ const depPackageJsonPath = joinPaths(
197
+ workspaceRoot,
198
+ projectConfigurations.projects[dep].root,
199
+ "package.json"
200
+ );
152
201
  if (existsSync(depPackageJsonPath)) {
153
- const depPackageJsonContent = readFileSync(depPackageJsonPath, "utf8");
202
+ const depPackageJsonContent = readFileSync(
203
+ depPackageJsonPath,
204
+ "utf8"
205
+ );
154
206
  const depPackageJson = JSON.parse(depPackageJsonContent);
155
207
  if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
156
208
  ret.push(depPackageJson.name);
@@ -175,10 +227,13 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
175
227
  writeTrace("\u{1F4E6} No local packages dependencies to add to package.json");
176
228
  }
177
229
  return packageJson;
178
- }, "addPackageDependencies");
179
- var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
230
+ };
231
+ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
180
232
  const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : findWorkspaceRoot();
181
- const workspacePackageJsonContent = await readFile2(joinPaths(workspaceRoot, "package.json"), "utf8");
233
+ const workspacePackageJsonContent = await readFile2(
234
+ joinPaths(workspaceRoot, "package.json"),
235
+ "utf8"
236
+ );
182
237
  const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
183
238
  packageJson.type ??= "module";
184
239
  packageJson.sideEffects ??= false;
@@ -189,9 +244,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
189
244
  }
190
245
  packageJson.source ??= `${joinPaths(distSrc, "index.ts").replaceAll("\\", "/")}`;
191
246
  }
192
- packageJson.files ??= [
193
- "dist/**/*"
194
- ];
247
+ packageJson.files ??= ["dist/**/*"];
195
248
  if (includeSrc === true && !packageJson.files.includes("src")) {
196
249
  packageJson.files.push("src/**/*");
197
250
  }
@@ -207,26 +260,22 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (workspaceConfi
207
260
  packageJson.author ??= workspacePackageJson.author;
208
261
  packageJson.maintainers ??= workspacePackageJson.maintainers;
209
262
  if (!packageJson.maintainers && packageJson.author) {
210
- packageJson.maintainers = [
211
- packageJson.author
212
- ];
263
+ packageJson.maintainers = [packageJson.author];
213
264
  }
214
265
  packageJson.contributors ??= workspacePackageJson.contributors;
215
266
  if (!packageJson.contributors && packageJson.author) {
216
- packageJson.contributors = [
217
- packageJson.author
218
- ];
267
+ packageJson.contributors = [packageJson.author];
219
268
  }
220
269
  packageJson.repository ??= workspacePackageJson.repository;
221
270
  packageJson.repository.directory ??= projectRoot ? projectRoot : joinPaths("packages", projectName);
222
271
  return packageJson;
223
- }, "addWorkspacePackageJsonFields");
272
+ };
224
273
 
225
274
  // ../build-tools/src/utilities/get-entry-points.ts
226
275
  import { glob as glob2 } from "glob";
227
276
 
228
277
  // ../build-tools/src/utilities/get-env.ts
229
- var getEnv = /* @__PURE__ */ __name((builder, options) => {
278
+ var getEnv = (builder, options) => {
230
279
  return {
231
280
  STORM_BUILD: builder,
232
281
  STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
@@ -237,39 +286,51 @@ var getEnv = /* @__PURE__ */ __name((builder, options) => {
237
286
  STORM_TARGET: JSON.stringify(options.target),
238
287
  ...options.env
239
288
  };
240
- }, "getEnv");
289
+ };
241
290
 
242
291
  // ../build-tools/src/utilities/read-nx-config.ts
243
292
  import { existsSync as existsSync2 } from "node:fs";
244
293
  import { readFile as readFile3 } from "node:fs/promises";
245
294
 
246
295
  // ../build-tools/src/utilities/task-graph.ts
247
- import { createTaskGraph, mapTargetDefaultsToDependencies } from "nx/src/tasks-runner/create-task-graph";
296
+ import {
297
+ createTaskGraph,
298
+ mapTargetDefaultsToDependencies
299
+ } from "nx/src/tasks-runner/create-task-graph";
248
300
 
249
301
  // ../esbuild/src/assets.ts
250
302
  async function copyBuildAssets(context) {
251
303
  if (context.result?.errors.length === 0) {
252
- writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
304
+ writeDebug(
305
+ ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
306
+ context.workspaceConfig
307
+ );
253
308
  const stopwatch = getStopwatch(`${context.options.name} asset copy`);
254
- await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
309
+ await copyAssets(
310
+ context.workspaceConfig,
311
+ context.options.assets ?? [],
312
+ context.outputPath,
313
+ context.options.projectRoot,
314
+ context.sourceRoot,
315
+ true,
316
+ false
317
+ );
255
318
  stopwatch();
256
319
  }
257
320
  return context;
258
321
  }
259
- __name(copyBuildAssets, "copyBuildAssets");
260
322
 
261
323
  // ../esbuild/src/clean.ts
262
324
  import { rm } from "node:fs/promises";
263
325
  async function cleanDirectories(directory) {
264
- await rm(directory, {
265
- recursive: true,
266
- force: true
267
- });
326
+ await rm(directory, { recursive: true, force: true });
268
327
  }
269
- __name(cleanDirectories, "cleanDirectories");
270
328
 
271
329
  // ../esbuild/src/context.ts
272
- import { createProjectGraphAsync as createProjectGraphAsync2, readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2 } from "@nx/devkit";
330
+ import {
331
+ createProjectGraphAsync as createProjectGraphAsync2,
332
+ readProjectsConfigurationFromProjectGraph as readProjectsConfigurationFromProjectGraph2
333
+ } from "@nx/devkit";
273
334
  import defu from "defu";
274
335
  import { existsSync as existsSync3 } from "node:fs";
275
336
  import hf from "node:fs/promises";
@@ -326,43 +387,46 @@ function resolvePathsConfig(options, cwd, projectRoot) {
326
387
  if (options?.compilerOptions?.paths) {
327
388
  const paths = Object.entries(options.compilerOptions.paths);
328
389
  const resolvedPaths = paths.map(([key, paths2]) => {
329
- return [
330
- key,
331
- paths2.map((v) => path2.resolve(cwd, v))
332
- ];
390
+ return [key, paths2.map((v) => path2.resolve(cwd, v))];
333
391
  });
334
392
  return Object.fromEntries(resolvedPaths);
335
393
  }
336
394
  if (options.extends) {
337
- const extendsPath = path2.resolve(projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends));
395
+ const extendsPath = path2.resolve(
396
+ projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends)
397
+ );
338
398
  const extendsDir = path2.dirname(extendsPath);
339
399
  const extendsConfig = __require(extendsPath);
340
400
  return resolvePathsConfig(extendsConfig, extendsDir);
341
401
  }
342
402
  return [];
343
403
  }
344
- __name(resolvePathsConfig, "resolvePathsConfig");
345
- var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
404
+ var resolvePathsPlugin = (context) => ({
346
405
  name: "storm:resolve-paths",
347
406
  setup(build3) {
348
- const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
349
- const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
350
- const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
351
- build3.onResolve({
352
- filter: packagesRegex
353
- }, (args) => {
407
+ const parentTsConfig = build3.initialOptions.tsconfig ? __require(joinPaths(
408
+ context.workspaceConfig.workspaceRoot,
409
+ build3.initialOptions.tsconfig.replace(
410
+ context.workspaceConfig.workspaceRoot,
411
+ ""
412
+ )
413
+ )) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
414
+ const resolvedTsPaths = resolvePathsConfig(
415
+ parentTsConfig,
416
+ context.workspaceConfig.workspaceRoot,
417
+ context.options.projectRoot
418
+ );
419
+ const packagesRegex = new RegExp(
420
+ `^(${Object.keys(resolvedTsPaths).join("|")})$`
421
+ );
422
+ build3.onResolve({ filter: packagesRegex }, (args) => {
354
423
  if (build3.initialOptions.external?.includes(args.path)) {
355
- return {
356
- path: args.path,
357
- external: true
358
- };
424
+ return { path: args.path, external: true };
359
425
  }
360
- return {
361
- path: `${resolvedTsPaths[args.path][0]}/index.ts`
362
- };
426
+ return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
363
427
  });
364
428
  }
365
- }), "resolvePathsPlugin");
429
+ });
366
430
 
367
431
  // ../esbuild/src/context.ts
368
432
  async function resolveContext(userOptions) {
@@ -379,7 +443,11 @@ async function resolveContext(userOptions) {
379
443
  const projectGraph = await createProjectGraphAsync2({
380
444
  exitOnError: true
381
445
  });
382
- const projectJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "project.json");
446
+ const projectJsonPath = joinPaths(
447
+ workspaceRoot.dir,
448
+ projectRoot,
449
+ "project.json"
450
+ );
383
451
  if (!existsSync3(projectJsonPath)) {
384
452
  throw new Error("Cannot find project.json configuration");
385
453
  }
@@ -388,11 +456,17 @@ async function resolveContext(userOptions) {
388
456
  const projectName = projectJson.name || userOptions.name;
389
457
  const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
390
458
  if (!projectConfigurations?.projects?.[projectName]) {
391
- throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
459
+ throw new Error(
460
+ "The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project."
461
+ );
392
462
  }
393
463
  const options = defu(userOptions, DEFAULT_BUILD_OPTIONS);
394
464
  options.name ??= projectName;
395
- const packageJsonPath = joinPaths(workspaceRoot.dir, options.projectRoot, "package.json");
465
+ const packageJsonPath = joinPaths(
466
+ workspaceRoot.dir,
467
+ options.projectRoot,
468
+ "package.json"
469
+ );
396
470
  if (!existsSync3(packageJsonPath)) {
397
471
  throw new Error("Cannot find package.json configuration");
398
472
  }
@@ -426,7 +500,11 @@ async function resolveContext(userOptions) {
426
500
  projectName,
427
501
  projectGraph,
428
502
  sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || joinPaths(resolvedOptions.projectRoot, "src"),
429
- outputPath: resolvedOptions.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
503
+ outputPath: resolvedOptions.outputPath || joinPaths(
504
+ workspaceConfig.workspaceRoot,
505
+ "dist",
506
+ resolvedOptions.projectRoot
507
+ ),
430
508
  minify: resolvedOptions.minify || resolvedOptions.mode === "production"
431
509
  };
432
510
  context.options.esbuildPlugins = [
@@ -435,7 +513,6 @@ async function resolveContext(userOptions) {
435
513
  ];
436
514
  return context;
437
515
  }
438
- __name(resolveContext, "resolveContext");
439
516
 
440
517
  // ../esbuild/src/package-json.ts
441
518
  import { writeJsonFile } from "@nx/devkit";
@@ -445,17 +522,39 @@ async function generatePackageJson(context) {
445
522
  if (context.options.generatePackageJson !== false && existsSync4(joinPaths(context.options.projectRoot, "package.json"))) {
446
523
  writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
447
524
  const stopwatch = getStopwatch("Write package.json file");
448
- const packageJsonPath = joinPaths(context.options.projectRoot, "project.json");
525
+ const packageJsonPath = joinPaths(
526
+ context.options.projectRoot,
527
+ "project.json"
528
+ );
449
529
  if (!existsSync4(packageJsonPath)) {
450
530
  throw new Error("Cannot find package.json configuration");
451
531
  }
452
- const packageJsonFile = await hf2.readFile(joinPaths(context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
532
+ const packageJsonFile = await hf2.readFile(
533
+ joinPaths(
534
+ context.workspaceConfig.workspaceRoot,
535
+ context.options.projectRoot,
536
+ "package.json"
537
+ ),
538
+ "utf8"
539
+ );
453
540
  let packageJson = JSON.parse(packageJsonFile);
454
541
  if (!packageJson) {
455
542
  throw new Error("Cannot find package.json configuration file");
456
543
  }
457
- packageJson = await addPackageDependencies(context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
458
- packageJson = await addWorkspacePackageJsonFields(context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
544
+ packageJson = await addPackageDependencies(
545
+ context.workspaceConfig.workspaceRoot,
546
+ context.options.projectRoot,
547
+ context.projectName,
548
+ packageJson
549
+ );
550
+ packageJson = await addWorkspacePackageJsonFields(
551
+ context.workspaceConfig,
552
+ context.options.projectRoot,
553
+ context.sourceRoot,
554
+ context.projectName,
555
+ false,
556
+ packageJson
557
+ );
459
558
  if (context.options.entry) {
460
559
  packageJson.exports ??= {};
461
560
  packageJson.exports["./package.json"] ??= "./package.json";
@@ -525,20 +624,25 @@ async function generatePackageJson(context) {
525
624
  if (isDts) {
526
625
  packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
527
626
  }
528
- packageJson.exports = Object.keys(packageJson.exports).reduce((ret, key) => {
529
- if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
530
- ret[key.replace("/index", "")] = packageJson.exports[key];
531
- }
532
- return ret;
533
- }, packageJson.exports);
627
+ packageJson.exports = Object.keys(packageJson.exports).reduce(
628
+ (ret, key) => {
629
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
630
+ ret[key.replace("/index", "")] = packageJson.exports[key];
631
+ }
632
+ return ret;
633
+ },
634
+ packageJson.exports
635
+ );
534
636
  }
535
637
  }
536
- await writeJsonFile(joinPaths(context.outputPath, "package.json"), packageJson);
638
+ await writeJsonFile(
639
+ joinPaths(context.outputPath, "package.json"),
640
+ packageJson
641
+ );
537
642
  stopwatch();
538
643
  }
539
644
  return context;
540
645
  }
541
- __name(generatePackageJson, "generatePackageJson");
542
646
 
543
647
  // ../esbuild/src/plugins/deps-check.ts
544
648
  import { builtinModules as builtinModules2 } from "node:module";
@@ -567,12 +671,8 @@ var unusedIgnore = [
567
671
  // these are indirectly used by build
568
672
  "buffer"
569
673
  ];
570
- var missingIgnore = [
571
- ".prisma",
572
- "@prisma/client",
573
- "ts-toolbelt"
574
- ];
575
- var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
674
+ var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
675
+ var depsCheckPlugin = (bundle) => ({
576
676
  name: "storm:deps-check",
577
677
  setup(build3) {
578
678
  const pkgJsonPath = path3.join(process.cwd(), "package.json");
@@ -586,9 +686,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
586
686
  ];
587
687
  const collectedDependencies = /* @__PURE__ */ new Set();
588
688
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
589
- build3.onResolve({
590
- filter: onlyPackages
591
- }, (args) => {
689
+ build3.onResolve({ filter: onlyPackages }, (args) => {
592
690
  if (args.importer.includes(process.cwd())) {
593
691
  if (args.path[0] === "@") {
594
692
  const [org, pkg] = args.path.split("/");
@@ -598,19 +696,13 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
598
696
  collectedDependencies.add(pkg);
599
697
  }
600
698
  }
601
- return {
602
- external: true
603
- };
699
+ return { external: true };
604
700
  });
605
701
  build3.onEnd(() => {
606
- const unusedDependencies = [
607
- ...dependencies
608
- ].filter((dep) => {
702
+ const unusedDependencies = [...dependencies].filter((dep) => {
609
703
  return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
610
704
  });
611
- const missingDependencies = [
612
- ...collectedDependencies
613
- ].filter((dep) => {
705
+ const missingDependencies = [...collectedDependencies].filter((dep) => {
614
706
  return !dependencies.includes(dep) && !builtinModules2.includes(dep);
615
707
  });
616
708
  const filteredUnusedDeps = unusedDependencies.filter((dep) => {
@@ -619,8 +711,12 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
619
711
  const filteredMissingDeps = missingDependencies.filter((dep) => {
620
712
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
621
713
  });
622
- writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
623
- writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
714
+ writeWarning(
715
+ `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
716
+ );
717
+ writeError(
718
+ `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
719
+ );
624
720
  if (filteredMissingDeps.length > 0) {
625
721
  throw new Error(`Missing dependencies detected - please install them:
626
722
  ${JSON.stringify(filteredMissingDeps)}
@@ -628,12 +724,15 @@ ${JSON.stringify(filteredMissingDeps)}
628
724
  }
629
725
  });
630
726
  }
631
- }), "depsCheckPlugin");
727
+ });
632
728
 
633
729
  // ../esbuild/src/tsup.ts
634
730
  import { build as tsup } from "tsup";
635
731
  async function executeTsup(context) {
636
- writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
732
+ writeDebug(
733
+ ` \u{1F680} Running ${context.options.name} build`,
734
+ context.workspaceConfig
735
+ );
637
736
  const stopwatch = getStopwatch(`${context.options.name} build`);
638
737
  await tsup({
639
738
  ...context.options,
@@ -643,21 +742,30 @@ async function executeTsup(context) {
643
742
  stopwatch();
644
743
  return context;
645
744
  }
646
- __name(executeTsup, "executeTsup");
647
745
 
648
746
  // ../esbuild/src/build.ts
649
747
  async function reportResults(context) {
650
748
  if (context.result?.errors.length === 0) {
651
749
  if (context.result.warnings.length > 0) {
652
- writeWarning(` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`, context.workspaceConfig);
750
+ writeWarning(
751
+ ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
752
+ context.workspaceConfig
753
+ );
653
754
  }
654
- writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
755
+ writeSuccess(
756
+ ` \u{1F4E6} The ${context.options.name} build completed successfully`,
757
+ context.workspaceConfig
758
+ );
655
759
  } else if (context.result?.errors && context.result?.errors.length > 0) {
656
- writeError(` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`, context.workspaceConfig);
657
- throw new Error(`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`);
760
+ writeError(
761
+ ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
762
+ context.workspaceConfig
763
+ );
764
+ throw new Error(
765
+ `The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
766
+ );
658
767
  }
659
768
  }
660
- __name(reportResults, "reportResults");
661
769
  async function dependencyCheck(options) {
662
770
  if (process.env.DEV === "true") {
663
771
  return void 0;
@@ -668,43 +776,39 @@ async function dependencyCheck(options) {
668
776
  const buildPromise = esbuild.build({
669
777
  entryPoints: globbySync("**/*.{j,t}s", {
670
778
  // We don't check dependencies in ecosystem tests because tests are isolated from the build.
671
- ignore: [
672
- "./src/__tests__/**/*",
673
- "./tests/e2e/**/*",
674
- "./dist/**/*"
675
- ],
779
+ ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
676
780
  gitignore: true
677
781
  }),
678
782
  logLevel: "silent",
783
+ // there will be errors
679
784
  bundle: true,
785
+ // we bundle to get everything
680
786
  write: false,
787
+ // no need to write for analysis
681
788
  outdir: "out",
682
- plugins: [
683
- depsCheckPlugin(options.bundle)
684
- ]
789
+ plugins: [depsCheckPlugin(options.bundle)]
685
790
  });
686
791
  await buildPromise.catch(() => {
687
792
  });
688
793
  return void 0;
689
794
  }
690
- __name(dependencyCheck, "dependencyCheck");
691
795
  async function cleanOutputPath(context) {
692
796
  if (context.clean !== false && context.outputPath) {
693
- writeDebug(` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
797
+ writeDebug(
798
+ ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
799
+ context.workspaceConfig
800
+ );
694
801
  const stopwatch = getStopwatch(`${context.options.name} output clean`);
695
802
  await cleanDirectories(context.outputPath);
696
803
  stopwatch();
697
804
  }
698
805
  return context;
699
806
  }
700
- __name(cleanOutputPath, "cleanOutputPath");
701
807
  async function build2(options) {
702
808
  writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
703
809
  const stopwatch = getStopwatch("ESBuild pipeline");
704
810
  try {
705
- const opts = Array.isArray(options) ? options : [
706
- options
707
- ];
811
+ const opts = Array.isArray(options) ? options : [options];
708
812
  if (opts.length === 0) {
709
813
  throw new Error("No build options were provided");
710
814
  }
@@ -719,19 +823,22 @@ async function build2(options) {
719
823
  await reportResults(context);
720
824
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
721
825
  } catch (error) {
722
- writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
826
+ writeFatal(
827
+ "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
828
+ );
723
829
  throw error;
724
830
  } finally {
725
831
  stopwatch();
726
832
  }
727
833
  }
728
- __name(build2, "build");
729
834
 
730
835
  // src/executors/esbuild/executor.ts
731
836
  async function esbuildExecutorFn(options, context, config) {
732
837
  writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
733
838
  if (!context.projectsConfigurations?.projects || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !context.projectsConfigurations.projects[context.projectName]?.root) {
734
- throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
839
+ throw new Error(
840
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
841
+ );
735
842
  }
736
843
  await build2({
737
844
  ...options,
@@ -745,20 +852,21 @@ async function esbuildExecutorFn(options, context, config) {
745
852
  success: true
746
853
  };
747
854
  }
748
- __name(esbuildExecutorFn, "esbuildExecutorFn");
749
- var executor_default = withRunExecutor("Storm ESBuild build", esbuildExecutorFn, {
750
- skipReadingConfig: false,
751
- hooks: {
752
- applyDefaultOptions: /* @__PURE__ */ __name(async (options, config) => {
753
- options.entry ??= [
754
- "src/index.ts"
755
- ];
756
- options.outputPath ??= "dist/{projectRoot}";
757
- options.tsconfig ??= "{projectRoot}/tsconfig.json";
758
- return options;
759
- }, "applyDefaultOptions")
855
+ var executor_default = withRunExecutor(
856
+ "Storm ESBuild build",
857
+ esbuildExecutorFn,
858
+ {
859
+ skipReadingConfig: false,
860
+ hooks: {
861
+ applyDefaultOptions: async (options, config) => {
862
+ options.entry ??= ["src/index.ts"];
863
+ options.outputPath ??= "dist/{projectRoot}";
864
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
865
+ return options;
866
+ }
867
+ }
760
868
  }
761
- });
869
+ );
762
870
 
763
871
  export {
764
872
  esbuildExecutorFn,