@storm-software/workspace-tools 1.267.20 → 1.267.22

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 +21 -0
  2. package/README.md +1 -2
  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-DCPKZRRY.js} +259 -201
  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-OBZTQWHM.mjs → chunk-J6OXY3KI.mjs} +233 -175
  53. package/dist/chunk-KP4RPOBI.mjs +105 -0
  54. package/dist/chunk-KR72GKIT.mjs +7 -0
  55. package/dist/chunk-L4NCVOB5.mjs +17 -0
  56. package/dist/{chunk-4Y6B6JDH.js → chunk-LBAVVYKU.js} +315 -136
  57. package/dist/{chunk-34WSVY5D.mjs → chunk-LSF4BHCI.mjs} +24 -14
  58. package/dist/chunk-M725BO42.mjs +32 -0
  59. package/dist/{chunk-SAWEMBTS.mjs → chunk-MF6VZSIO.mjs} +30 -17
  60. package/dist/{chunk-2I6S33ZD.mjs → chunk-MMBLGUC3.mjs} +311 -132
  61. package/dist/chunk-MZSZKV4N.mjs +47 -0
  62. package/dist/chunk-O6RRIC6I.js +32 -0
  63. package/dist/chunk-OKSECMVK.js +32 -0
  64. package/dist/chunk-Q2HYWACQ.mjs +50 -0
  65. package/dist/{chunk-LJFHW7ZR.mjs → chunk-QFWQZOVG.mjs} +14 -43
  66. package/dist/{chunk-DHGZTMND.js → chunk-QVYCDING.js} +4 -7
  67. package/dist/{chunk-Z4NKRWWJ.js → chunk-RJRBED5Q.js} +48 -32
  68. package/dist/chunk-S5Z4QGF3.js +64 -0
  69. package/dist/{chunk-KQL5XMNL.mjs → chunk-SITFTWPY.mjs} +23 -8
  70. package/dist/chunk-SNMXP6JV.mjs +41 -0
  71. package/dist/chunk-SPXJBMLY.js +50 -0
  72. package/dist/{chunk-7TLYMNLD.mjs → chunk-SW2E5MQJ.mjs} +4 -19
  73. package/dist/{chunk-OKW5O5P4.js → chunk-T7BALDKJ.js} +26 -22
  74. package/dist/chunk-TSYIV33W.js +32 -0
  75. package/dist/{chunk-S3IPRXVE.mjs → chunk-U65XVJ4Y.mjs} +1 -12
  76. package/dist/{chunk-D3U4WMSI.mjs → chunk-U7JFVMCK.mjs} +6 -12
  77. package/dist/chunk-UIPUSUAB.js +425 -0
  78. package/dist/{chunk-O5QR3B3Z.mjs → chunk-UYSJG2E5.mjs} +56 -31
  79. package/dist/{chunk-SJGDCFBH.mjs → chunk-VLOTOQYE.mjs} +11 -8
  80. package/dist/{chunk-ENE6R7BT.mjs → chunk-W2C5IGWW.mjs} +3 -6
  81. package/dist/{chunk-G4QFSE5B.js → chunk-WE4HK4RN.js} +327 -212
  82. package/dist/{chunk-SUQKASD7.js → chunk-X2VJXJEF.js} +82 -67
  83. package/dist/{chunk-RK3UDPDP.mjs → chunk-X6PHOMFB.mjs} +32 -16
  84. package/dist/{chunk-PK2SUBWI.js → chunk-XZSS3YAB.js} +19 -16
  85. package/dist/chunk-YXBFVZ3K.js +47 -0
  86. package/dist/{chunk-CUPARBOS.js → chunk-ZP76EMBE.js} +41 -32
  87. package/dist/executors.js +21 -21
  88. package/dist/executors.mjs +23 -23
  89. package/dist/generators.js +17 -17
  90. package/dist/generators.mjs +16 -16
  91. package/dist/index.js +41 -41
  92. package/dist/index.mjs +43 -43
  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";
@@ -320,50 +381,6 @@ var DEFAULT_BUILD_OPTIONS = {
320
381
  }
321
382
  };
322
383
 
323
- // ../esbuild/src/plugins/resolve-paths.ts
324
- import path2 from "node:path";
325
- function resolvePathsConfig(options, cwd, projectRoot) {
326
- if (options?.compilerOptions?.paths) {
327
- const paths = Object.entries(options.compilerOptions.paths);
328
- const resolvedPaths = paths.map(([key, paths2]) => {
329
- return [
330
- key,
331
- paths2.map((v) => path2.resolve(cwd, v))
332
- ];
333
- });
334
- return Object.fromEntries(resolvedPaths);
335
- }
336
- if (options.extends) {
337
- const extendsPath = path2.resolve(projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends));
338
- const extendsDir = path2.dirname(extendsPath);
339
- const extendsConfig = __require(extendsPath);
340
- return resolvePathsConfig(extendsConfig, extendsDir);
341
- }
342
- return [];
343
- }
344
- __name(resolvePathsConfig, "resolvePathsConfig");
345
- var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
346
- name: "storm:resolve-paths",
347
- 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) => {
354
- if (build3.initialOptions.external?.includes(args.path)) {
355
- return {
356
- path: args.path,
357
- external: true
358
- };
359
- }
360
- return {
361
- path: `${resolvedTsPaths[args.path][0]}/index.ts`
362
- };
363
- });
364
- }
365
- }), "resolvePathsPlugin");
366
-
367
384
  // ../esbuild/src/context.ts
368
385
  async function resolveContext(userOptions) {
369
386
  const projectRoot = userOptions.projectRoot;
@@ -379,7 +396,11 @@ async function resolveContext(userOptions) {
379
396
  const projectGraph = await createProjectGraphAsync2({
380
397
  exitOnError: true
381
398
  });
382
- const projectJsonPath = joinPaths(workspaceRoot.dir, projectRoot, "project.json");
399
+ const projectJsonPath = joinPaths(
400
+ workspaceRoot.dir,
401
+ projectRoot,
402
+ "project.json"
403
+ );
383
404
  if (!existsSync3(projectJsonPath)) {
384
405
  throw new Error("Cannot find project.json configuration");
385
406
  }
@@ -388,11 +409,17 @@ async function resolveContext(userOptions) {
388
409
  const projectName = projectJson.name || userOptions.name;
389
410
  const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
390
411
  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.");
412
+ throw new Error(
413
+ "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."
414
+ );
392
415
  }
393
416
  const options = defu(userOptions, DEFAULT_BUILD_OPTIONS);
394
417
  options.name ??= projectName;
395
- const packageJsonPath = joinPaths(workspaceRoot.dir, options.projectRoot, "package.json");
418
+ const packageJsonPath = joinPaths(
419
+ workspaceRoot.dir,
420
+ options.projectRoot,
421
+ "package.json"
422
+ );
396
423
  if (!existsSync3(packageJsonPath)) {
397
424
  throw new Error("Cannot find package.json configuration");
398
425
  }
@@ -426,16 +453,16 @@ async function resolveContext(userOptions) {
426
453
  projectName,
427
454
  projectGraph,
428
455
  sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || joinPaths(resolvedOptions.projectRoot, "src"),
429
- outputPath: resolvedOptions.outputPath || joinPaths(workspaceConfig.workspaceRoot, "dist", resolvedOptions.projectRoot),
456
+ outputPath: resolvedOptions.outputPath || joinPaths(
457
+ workspaceConfig.workspaceRoot,
458
+ "dist",
459
+ resolvedOptions.projectRoot
460
+ ),
430
461
  minify: resolvedOptions.minify || resolvedOptions.mode === "production"
431
462
  };
432
- context.options.esbuildPlugins = [
433
- resolvePathsPlugin(context),
434
- ...context.options.esbuildPlugins ?? []
435
- ];
463
+ context.options.esbuildPlugins = [...context.options.esbuildPlugins ?? []];
436
464
  return context;
437
465
  }
438
- __name(resolveContext, "resolveContext");
439
466
 
440
467
  // ../esbuild/src/package-json.ts
441
468
  import { writeJsonFile } from "@nx/devkit";
@@ -445,17 +472,39 @@ async function generatePackageJson(context) {
445
472
  if (context.options.generatePackageJson !== false && existsSync4(joinPaths(context.options.projectRoot, "package.json"))) {
446
473
  writeDebug(" \u270D\uFE0F Writing package.json file", context.workspaceConfig);
447
474
  const stopwatch = getStopwatch("Write package.json file");
448
- const packageJsonPath = joinPaths(context.options.projectRoot, "project.json");
475
+ const packageJsonPath = joinPaths(
476
+ context.options.projectRoot,
477
+ "project.json"
478
+ );
449
479
  if (!existsSync4(packageJsonPath)) {
450
480
  throw new Error("Cannot find package.json configuration");
451
481
  }
452
- const packageJsonFile = await hf2.readFile(joinPaths(context.workspaceConfig.workspaceRoot, context.options.projectRoot, "package.json"), "utf8");
482
+ const packageJsonFile = await hf2.readFile(
483
+ joinPaths(
484
+ context.workspaceConfig.workspaceRoot,
485
+ context.options.projectRoot,
486
+ "package.json"
487
+ ),
488
+ "utf8"
489
+ );
453
490
  let packageJson = JSON.parse(packageJsonFile);
454
491
  if (!packageJson) {
455
492
  throw new Error("Cannot find package.json configuration file");
456
493
  }
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);
494
+ packageJson = await addPackageDependencies(
495
+ context.workspaceConfig.workspaceRoot,
496
+ context.options.projectRoot,
497
+ context.projectName,
498
+ packageJson
499
+ );
500
+ packageJson = await addWorkspacePackageJsonFields(
501
+ context.workspaceConfig,
502
+ context.options.projectRoot,
503
+ context.sourceRoot,
504
+ context.projectName,
505
+ false,
506
+ packageJson
507
+ );
459
508
  if (context.options.entry) {
460
509
  packageJson.exports ??= {};
461
510
  packageJson.exports["./package.json"] ??= "./package.json";
@@ -525,24 +574,29 @@ async function generatePackageJson(context) {
525
574
  if (isDts) {
526
575
  packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
527
576
  }
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);
577
+ packageJson.exports = Object.keys(packageJson.exports).reduce(
578
+ (ret, key) => {
579
+ if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
580
+ ret[key.replace("/index", "")] = packageJson.exports[key];
581
+ }
582
+ return ret;
583
+ },
584
+ packageJson.exports
585
+ );
534
586
  }
535
587
  }
536
- await writeJsonFile(joinPaths(context.outputPath, "package.json"), packageJson);
588
+ await writeJsonFile(
589
+ joinPaths(context.outputPath, "package.json"),
590
+ packageJson
591
+ );
537
592
  stopwatch();
538
593
  }
539
594
  return context;
540
595
  }
541
- __name(generatePackageJson, "generatePackageJson");
542
596
 
543
597
  // ../esbuild/src/plugins/deps-check.ts
544
598
  import { builtinModules as builtinModules2 } from "node:module";
545
- import path3 from "node:path";
599
+ import path2 from "node:path";
546
600
  var unusedIgnore = [
547
601
  // these are our dev dependencies
548
602
  /@types\/.*?/,
@@ -567,15 +621,11 @@ var unusedIgnore = [
567
621
  // these are indirectly used by build
568
622
  "buffer"
569
623
  ];
570
- var missingIgnore = [
571
- ".prisma",
572
- "@prisma/client",
573
- "ts-toolbelt"
574
- ];
575
- var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
624
+ var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
625
+ var depsCheckPlugin = (bundle) => ({
576
626
  name: "storm:deps-check",
577
627
  setup(build3) {
578
- const pkgJsonPath = path3.join(process.cwd(), "package.json");
628
+ const pkgJsonPath = path2.join(process.cwd(), "package.json");
579
629
  const pkgContents = __require(pkgJsonPath);
580
630
  const regDependencies = Object.keys(pkgContents["dependencies"] ?? {});
581
631
  const devDependencies = Object.keys(pkgContents["devDependencies"] ?? {});
@@ -586,9 +636,7 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
586
636
  ];
587
637
  const collectedDependencies = /* @__PURE__ */ new Set();
588
638
  const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
589
- build3.onResolve({
590
- filter: onlyPackages
591
- }, (args) => {
639
+ build3.onResolve({ filter: onlyPackages }, (args) => {
592
640
  if (args.importer.includes(process.cwd())) {
593
641
  if (args.path[0] === "@") {
594
642
  const [org, pkg] = args.path.split("/");
@@ -598,19 +646,13 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
598
646
  collectedDependencies.add(pkg);
599
647
  }
600
648
  }
601
- return {
602
- external: true
603
- };
649
+ return { external: true };
604
650
  });
605
651
  build3.onEnd(() => {
606
- const unusedDependencies = [
607
- ...dependencies
608
- ].filter((dep) => {
652
+ const unusedDependencies = [...dependencies].filter((dep) => {
609
653
  return !collectedDependencies.has(dep) || builtinModules2.includes(dep);
610
654
  });
611
- const missingDependencies = [
612
- ...collectedDependencies
613
- ].filter((dep) => {
655
+ const missingDependencies = [...collectedDependencies].filter((dep) => {
614
656
  return !dependencies.includes(dep) && !builtinModules2.includes(dep);
615
657
  });
616
658
  const filteredUnusedDeps = unusedDependencies.filter((dep) => {
@@ -619,8 +661,12 @@ var depsCheckPlugin = /* @__PURE__ */ __name((bundle) => ({
619
661
  const filteredMissingDeps = missingDependencies.filter((dep) => {
620
662
  return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
621
663
  });
622
- writeWarning(`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`);
623
- writeError(`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`);
664
+ writeWarning(
665
+ `Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
666
+ );
667
+ writeError(
668
+ `Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
669
+ );
624
670
  if (filteredMissingDeps.length > 0) {
625
671
  throw new Error(`Missing dependencies detected - please install them:
626
672
  ${JSON.stringify(filteredMissingDeps)}
@@ -628,12 +674,15 @@ ${JSON.stringify(filteredMissingDeps)}
628
674
  }
629
675
  });
630
676
  }
631
- }), "depsCheckPlugin");
677
+ });
632
678
 
633
679
  // ../esbuild/src/tsup.ts
634
680
  import { build as tsup } from "tsup";
635
681
  async function executeTsup(context) {
636
- writeDebug(` \u{1F680} Running ${context.options.name} build`, context.workspaceConfig);
682
+ writeDebug(
683
+ ` \u{1F680} Running ${context.options.name} build`,
684
+ context.workspaceConfig
685
+ );
637
686
  const stopwatch = getStopwatch(`${context.options.name} build`);
638
687
  await tsup({
639
688
  ...context.options,
@@ -643,21 +692,30 @@ async function executeTsup(context) {
643
692
  stopwatch();
644
693
  return context;
645
694
  }
646
- __name(executeTsup, "executeTsup");
647
695
 
648
696
  // ../esbuild/src/build.ts
649
697
  async function reportResults(context) {
650
698
  if (context.result?.errors.length === 0) {
651
699
  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);
700
+ writeWarning(
701
+ ` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
702
+ context.workspaceConfig
703
+ );
653
704
  }
654
- writeSuccess(` \u{1F4E6} The ${context.options.name} build completed successfully`, context.workspaceConfig);
705
+ writeSuccess(
706
+ ` \u{1F4E6} The ${context.options.name} build completed successfully`,
707
+ context.workspaceConfig
708
+ );
655
709
  } 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")}`);
710
+ writeError(
711
+ ` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
712
+ context.workspaceConfig
713
+ );
714
+ throw new Error(
715
+ `The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
716
+ );
658
717
  }
659
718
  }
660
- __name(reportResults, "reportResults");
661
719
  async function dependencyCheck(options) {
662
720
  if (process.env.DEV === "true") {
663
721
  return void 0;
@@ -668,43 +726,39 @@ async function dependencyCheck(options) {
668
726
  const buildPromise = esbuild.build({
669
727
  entryPoints: globbySync("**/*.{j,t}s", {
670
728
  // 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
- ],
729
+ ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
676
730
  gitignore: true
677
731
  }),
678
732
  logLevel: "silent",
733
+ // there will be errors
679
734
  bundle: true,
735
+ // we bundle to get everything
680
736
  write: false,
737
+ // no need to write for analysis
681
738
  outdir: "out",
682
- plugins: [
683
- depsCheckPlugin(options.bundle)
684
- ]
739
+ plugins: [depsCheckPlugin(options.bundle)]
685
740
  });
686
741
  await buildPromise.catch(() => {
687
742
  });
688
743
  return void 0;
689
744
  }
690
- __name(dependencyCheck, "dependencyCheck");
691
745
  async function cleanOutputPath(context) {
692
746
  if (context.clean !== false && context.outputPath) {
693
- writeDebug(` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`, context.workspaceConfig);
747
+ writeDebug(
748
+ ` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
749
+ context.workspaceConfig
750
+ );
694
751
  const stopwatch = getStopwatch(`${context.options.name} output clean`);
695
752
  await cleanDirectories(context.outputPath);
696
753
  stopwatch();
697
754
  }
698
755
  return context;
699
756
  }
700
- __name(cleanOutputPath, "cleanOutputPath");
701
757
  async function build2(options) {
702
758
  writeDebug(` \u26A1 Executing Storm ESBuild pipeline`);
703
759
  const stopwatch = getStopwatch("ESBuild pipeline");
704
760
  try {
705
- const opts = Array.isArray(options) ? options : [
706
- options
707
- ];
761
+ const opts = Array.isArray(options) ? options : [options];
708
762
  if (opts.length === 0) {
709
763
  throw new Error("No build options were provided");
710
764
  }
@@ -719,19 +773,22 @@ async function build2(options) {
719
773
  await reportResults(context);
720
774
  writeSuccess(" \u{1F3C1} ESBuild pipeline build completed successfully");
721
775
  } catch (error) {
722
- writeFatal("Fatal errors that the build process could not recover from have occured. The build process has been terminated.");
776
+ writeFatal(
777
+ "Fatal errors that the build process could not recover from have occured. The build process has been terminated."
778
+ );
723
779
  throw error;
724
780
  } finally {
725
781
  stopwatch();
726
782
  }
727
783
  }
728
- __name(build2, "build");
729
784
 
730
785
  // src/executors/esbuild/executor.ts
731
786
  async function esbuildExecutorFn(options, context, config) {
732
787
  writeInfo("\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
733
788
  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.");
789
+ throw new Error(
790
+ "The Build process failed because the context is not valid. Please run this command from a workspace."
791
+ );
735
792
  }
736
793
  await build2({
737
794
  ...options,
@@ -745,20 +802,21 @@ async function esbuildExecutorFn(options, context, config) {
745
802
  success: true
746
803
  };
747
804
  }
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")
805
+ var executor_default = withRunExecutor(
806
+ "Storm ESBuild build",
807
+ esbuildExecutorFn,
808
+ {
809
+ skipReadingConfig: false,
810
+ hooks: {
811
+ applyDefaultOptions: async (options, config) => {
812
+ options.entry ??= ["src/index.ts"];
813
+ options.outputPath ??= "dist/{projectRoot}";
814
+ options.tsconfig ??= "{projectRoot}/tsconfig.json";
815
+ return options;
816
+ }
817
+ }
760
818
  }
761
- });
819
+ );
762
820
 
763
821
  export {
764
822
  esbuildExecutorFn,