powerlines 0.19.5 → 0.21.0

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 (315) hide show
  1. package/dist/api.cjs +4 -4
  2. package/dist/api.d.cts +7 -8
  3. package/dist/api.d.ts +7 -8
  4. package/dist/api.js +3 -3
  5. package/dist/astro.cjs +10 -10
  6. package/dist/astro.d.cts +1 -2
  7. package/dist/astro.d.ts +1 -2
  8. package/dist/astro.js +7 -7
  9. package/dist/{chunk-MLAYLHZO.js → chunk-237NITCY.js} +20 -5
  10. package/dist/{chunk-5PRY6OJM.cjs → chunk-2HNC5JVK.cjs} +2 -2
  11. package/dist/{chunk-AEJIVPUZ.js → chunk-2Q2PSPZK.js} +1 -1
  12. package/dist/{chunk-JPWBN72J.js → chunk-3FS7K4DZ.js} +1 -1
  13. package/dist/{chunk-BSGWY4AP.cjs → chunk-3JH36WUJ.cjs} +2 -2
  14. package/dist/{chunk-ZOUGUAQY.cjs → chunk-44UTUCBG.cjs} +34 -16
  15. package/dist/{chunk-KMELWYHW.cjs → chunk-6XRDZOE3.cjs} +967 -664
  16. package/dist/{chunk-YQZXG4X6.cjs → chunk-7C2NEC7D.cjs} +2 -2
  17. package/dist/{chunk-GQM2JCO3.js → chunk-A5GTERYN.js} +2 -2
  18. package/dist/chunk-B4KLWFY6.cjs +32 -0
  19. package/dist/{chunk-I4LLZ5BI.js → chunk-C5TKY75S.js} +1 -1
  20. package/dist/{chunk-TK6CN2KT.cjs → chunk-DMXXNXLS.cjs} +4 -4
  21. package/dist/{chunk-MCDMY6GK.cjs → chunk-F4BD5CXH.cjs} +2 -2
  22. package/dist/chunk-GRAVJX3I.js +29 -0
  23. package/dist/chunk-HV7SHEHD.cjs +118 -0
  24. package/dist/{chunk-WJ4CZKXY.js → chunk-JKBJF3UI.js} +1 -1
  25. package/dist/{chunk-BHPTTRBA.js → chunk-L4AXJFX2.js} +32 -14
  26. package/dist/{chunk-Z63SQZUB.cjs → chunk-LKYBC6DX.cjs} +4 -4
  27. package/dist/{chunk-RR7EC4RF.js → chunk-M6XGEVJY.js} +1 -1
  28. package/dist/{chunk-PAJB5K7A.js → chunk-NZXMP4J5.js} +3 -2
  29. package/dist/{chunk-GFINPIIK.js → chunk-OZU47JET.js} +1000 -704
  30. package/dist/{chunk-FCTNMPJF.cjs → chunk-PAMSESZV.cjs} +1 -1
  31. package/dist/chunk-PDFOF6ZP.js +112 -0
  32. package/dist/{chunk-7HKTQSUG.cjs → chunk-PJP4MECA.cjs} +4 -3
  33. package/dist/{chunk-OJSRHKHW.js → chunk-QQGXARP3.js} +1 -1
  34. package/dist/{chunk-ULFJBFI7.cjs → chunk-SQANNMRF.cjs} +22 -7
  35. package/dist/{chunk-HI3LNK6Q.js → chunk-SVDPKN3U.js} +1 -1
  36. package/dist/chunk-SVF4ATJR.cjs +8 -0
  37. package/dist/{chunk-A3FMGMBV.cjs → chunk-UVM4JAR3.cjs} +2 -2
  38. package/dist/{chunk-VICSRRKQ.js → chunk-WU7I52LM.js} +2 -2
  39. package/dist/{chunk-X5LPEBDE.cjs → chunk-WYJGOC3Y.cjs} +2 -2
  40. package/dist/{chunk-LIXKMZW5.cjs → chunk-YG5ORYN2.cjs} +2 -2
  41. package/dist/{chunk-HEG6IAVR.js → chunk-ZPOCM5XZ.js} +1 -1
  42. package/dist/chunk-ZWF7LZXE.js +5 -0
  43. package/dist/config.d.cts +1 -2
  44. package/dist/config.d.ts +1 -2
  45. package/dist/esbuild.cjs +9 -9
  46. package/dist/esbuild.d.cts +1 -2
  47. package/dist/esbuild.d.ts +1 -2
  48. package/dist/esbuild.js +6 -6
  49. package/dist/farm.cjs +5 -5
  50. package/dist/farm.d.cts +1 -2
  51. package/dist/farm.d.ts +1 -2
  52. package/dist/farm.js +4 -4
  53. package/dist/{hooks-C6t50M6a.d.cts → hooks-CJ1W5lrx.d.cts} +1 -1
  54. package/dist/{hooks-Bq2jUAKs.d.ts → hooks-CNEZpkMS.d.ts} +1 -1
  55. package/dist/index.cjs +45 -287
  56. package/dist/index.d.cts +3 -4
  57. package/dist/index.d.ts +3 -4
  58. package/dist/index.js +20 -244
  59. package/dist/lib/build/esbuild.cjs +5 -5
  60. package/dist/lib/build/esbuild.d.cts +3 -5
  61. package/dist/lib/build/esbuild.d.ts +3 -5
  62. package/dist/lib/build/esbuild.js +2 -2
  63. package/dist/lib/build/index.cjs +25 -25
  64. package/dist/lib/build/index.d.cts +3 -5
  65. package/dist/lib/build/index.d.ts +3 -5
  66. package/dist/lib/build/index.js +9 -9
  67. package/dist/lib/build/rolldown.cjs +3 -3
  68. package/dist/lib/build/rolldown.d.cts +1 -3
  69. package/dist/lib/build/rolldown.d.ts +1 -3
  70. package/dist/lib/build/rolldown.js +2 -2
  71. package/dist/lib/build/rollup.cjs +3 -3
  72. package/dist/lib/build/rollup.d.cts +1 -3
  73. package/dist/lib/build/rollup.d.ts +1 -3
  74. package/dist/lib/build/rollup.js +1 -1
  75. package/dist/lib/build/rspack.cjs +2 -2
  76. package/dist/lib/build/rspack.d.cts +1 -3
  77. package/dist/lib/build/rspack.d.ts +1 -3
  78. package/dist/lib/build/rspack.js +1 -1
  79. package/dist/lib/build/tsup.cjs +6 -6
  80. package/dist/lib/build/tsup.d.cts +1 -3
  81. package/dist/lib/build/tsup.d.ts +1 -3
  82. package/dist/lib/build/tsup.js +3 -3
  83. package/dist/lib/build/unbuild.cjs +5 -5
  84. package/dist/lib/build/unbuild.d.cts +2 -4
  85. package/dist/lib/build/unbuild.d.ts +2 -4
  86. package/dist/lib/build/unbuild.js +2 -2
  87. package/dist/lib/build/vite.cjs +5 -5
  88. package/dist/lib/build/vite.d.cts +1 -3
  89. package/dist/lib/build/vite.d.ts +1 -3
  90. package/dist/lib/build/vite.js +3 -3
  91. package/dist/lib/build/webpack.cjs +2 -2
  92. package/dist/lib/build/webpack.d.cts +1 -3
  93. package/dist/lib/build/webpack.d.ts +1 -3
  94. package/dist/lib/build/webpack.js +1 -1
  95. package/dist/lib/chunk-27VJFYDM.cjs +132 -0
  96. package/dist/lib/chunk-3G4C3YAU.js +124 -0
  97. package/dist/lib/{chunk-DX4TFRS3.js → chunk-43VJVIL2.js} +976 -681
  98. package/dist/lib/{chunk-5EXW3ZRC.cjs → chunk-4FX4VOLA.cjs} +25 -4
  99. package/dist/lib/{chunk-ADKYAHF5.js → chunk-5GM5UAUO.js} +32 -12
  100. package/dist/lib/{chunk-JB2JJXGW.js → chunk-5SADLYYK.js} +1 -1
  101. package/dist/lib/{chunk-KXCEN6Y4.js → chunk-5SP6QZLX.js} +1 -1
  102. package/dist/lib/{chunk-TNHDC2ZQ.cjs → chunk-7XHBIYIN.cjs} +1 -20
  103. package/dist/lib/{chunk-SM3S7DYW.js → chunk-BHDQZ6YX.js} +12 -2
  104. package/dist/lib/{chunk-F7IDAYLH.cjs → chunk-CSJ6KNIX.cjs} +12 -9
  105. package/dist/lib/{chunk-37W2ZDLA.cjs → chunk-E2MVGKGH.cjs} +2 -2
  106. package/dist/lib/{chunk-ET5QBFGZ.cjs → chunk-FN7673NC.cjs} +2 -2
  107. package/dist/lib/{chunk-67IBLMW6.cjs → chunk-GDXHCTCX.cjs} +14 -7
  108. package/dist/lib/{chunk-ESNHFT4V.cjs → chunk-HCOHRD3Q.cjs} +26 -13
  109. package/dist/lib/{chunk-SYHVP3OW.js → chunk-HOZ37BFN.js} +23 -4
  110. package/dist/lib/{chunk-7OHD3BD4.js → chunk-HQ5YA43H.js} +12 -9
  111. package/dist/lib/{chunk-47WZIAPZ.js → chunk-IOM7GRZU.js} +5 -8
  112. package/dist/lib/{chunk-WFUO3YPK.js → chunk-L4NEN725.js} +19 -4
  113. package/dist/lib/{chunk-MVSXEH4P.cjs → chunk-LAFEAMNN.cjs} +6 -9
  114. package/dist/lib/{chunk-7Y5MJRWF.js → chunk-LIN4KAV3.js} +57 -34
  115. package/dist/lib/{chunk-LJ4WO7TW.cjs → chunk-LMO7PRBP.cjs} +35 -13
  116. package/dist/lib/{chunk-4AMFNBTX.cjs → chunk-LPA7UJIR.cjs} +956 -659
  117. package/dist/lib/{chunk-OTBLE55Z.cjs → chunk-MPCVQK2D.cjs} +12 -1
  118. package/dist/lib/{chunk-5ASXKB2V.js → chunk-QAXCBFBP.js} +1 -1
  119. package/dist/lib/{chunk-N2EGPL2L.js → chunk-T7RMV2FW.js} +25 -12
  120. package/dist/lib/{chunk-7K7JH3DF.cjs → chunk-ULJVBW4L.cjs} +19 -4
  121. package/dist/lib/{chunk-UDJ37BEE.cjs → chunk-VGSV2BEL.cjs} +57 -34
  122. package/dist/lib/{chunk-AOKLB4V2.cjs → chunk-Y2BHXV33.cjs} +1 -1
  123. package/dist/lib/{chunk-GRJJZ5VJ.js → chunk-YH5GOJS3.js} +2 -15
  124. package/dist/lib/{chunk-Q3ERHHXJ.js → chunk-YV6MDKW4.js} +13 -6
  125. package/dist/lib/{config-LK_Wl1SU.d.cts → config-7vXtXiGg.d.cts} +204 -118
  126. package/dist/lib/{config-CnPcoKqT.d.ts → config-B9aVEiiX.d.ts} +204 -118
  127. package/dist/lib/config-file.d.cts +1 -3
  128. package/dist/lib/config-file.d.ts +1 -3
  129. package/dist/lib/create-program.d.cts +1 -3
  130. package/dist/lib/create-program.d.ts +1 -3
  131. package/dist/lib/entry.cjs +9 -9
  132. package/dist/lib/entry.d.cts +1 -3
  133. package/dist/lib/entry.d.ts +1 -3
  134. package/dist/lib/entry.js +1 -1
  135. package/dist/lib/{hooks-DX1o8l6J.d.ts → hooks-BxUBzqCb.d.ts} +1 -1
  136. package/dist/lib/{hooks-BD2rDhpA.d.cts → hooks-cvv50JDh.d.cts} +1 -1
  137. package/dist/lib/index.cjs +32 -28
  138. package/dist/lib/index.d.cts +326 -7
  139. package/dist/lib/index.d.ts +326 -7
  140. package/dist/lib/index.js +8 -8
  141. package/dist/lib/logger.d.cts +1 -3
  142. package/dist/lib/logger.d.ts +1 -3
  143. package/dist/lib/typescript/compiler-host.d.cts +1 -3
  144. package/dist/lib/typescript/compiler-host.d.ts +1 -3
  145. package/dist/lib/typescript/import-transformer.d.cts +1 -3
  146. package/dist/lib/typescript/import-transformer.d.ts +1 -3
  147. package/dist/lib/typescript/index.d.cts +1 -3
  148. package/dist/lib/typescript/index.d.ts +1 -3
  149. package/dist/lib/typescript/program.d.cts +1 -3
  150. package/dist/lib/typescript/program.d.ts +1 -3
  151. package/dist/lib/unplugin/factory.cjs +5 -5
  152. package/dist/lib/unplugin/factory.d.cts +7 -9
  153. package/dist/lib/unplugin/factory.d.ts +7 -9
  154. package/dist/lib/unplugin/factory.js +4 -4
  155. package/dist/lib/unplugin/index.cjs +8 -8
  156. package/dist/lib/unplugin/index.d.cts +2 -4
  157. package/dist/lib/unplugin/index.d.ts +2 -4
  158. package/dist/lib/unplugin/index.js +5 -5
  159. package/dist/lib/unplugin/plugin.cjs +3 -3
  160. package/dist/lib/unplugin/plugin.d.cts +1 -3
  161. package/dist/lib/unplugin/plugin.d.ts +1 -3
  162. package/dist/lib/unplugin/plugin.js +2 -2
  163. package/dist/lib/unplugin/resolve-id.cjs +2 -2
  164. package/dist/lib/unplugin/resolve-id.d.cts +1 -3
  165. package/dist/lib/unplugin/resolve-id.d.ts +1 -3
  166. package/dist/lib/unplugin/resolve-id.js +1 -1
  167. package/dist/lib/utilities/bundle.cjs +4 -4
  168. package/dist/lib/utilities/bundle.d.cts +1 -3
  169. package/dist/lib/utilities/bundle.d.ts +1 -3
  170. package/dist/lib/utilities/bundle.js +3 -3
  171. package/dist/lib/utilities/cache.d.cts +1 -3
  172. package/dist/lib/utilities/cache.d.ts +1 -3
  173. package/dist/lib/utilities/file-header.d.cts +1 -3
  174. package/dist/lib/utilities/file-header.d.ts +1 -3
  175. package/dist/lib/utilities/index.cjs +14 -14
  176. package/dist/lib/utilities/index.d.cts +1 -3
  177. package/dist/lib/utilities/index.d.ts +1 -3
  178. package/dist/lib/utilities/index.js +5 -5
  179. package/dist/lib/utilities/meta.cjs +8 -8
  180. package/dist/lib/utilities/meta.d.cts +1 -3
  181. package/dist/lib/utilities/meta.d.ts +1 -3
  182. package/dist/lib/utilities/meta.js +1 -1
  183. package/dist/lib/utilities/resolve-path.d.cts +1 -3
  184. package/dist/lib/utilities/resolve-path.d.ts +1 -3
  185. package/dist/lib/utilities/resolve.cjs +5 -5
  186. package/dist/lib/utilities/resolve.d.cts +1 -3
  187. package/dist/lib/utilities/resolve.d.ts +1 -3
  188. package/dist/lib/utilities/resolve.js +4 -4
  189. package/dist/lib/utilities/source-file.d.cts +1 -3
  190. package/dist/lib/utilities/source-file.d.ts +1 -3
  191. package/dist/lib/utilities/source-map.d.cts +1 -3
  192. package/dist/lib/utilities/source-map.d.ts +1 -3
  193. package/dist/lib/utilities/worker.d.cts +1 -3
  194. package/dist/lib/utilities/worker.d.ts +1 -3
  195. package/dist/lib/utilities/write-file.d.cts +1 -3
  196. package/dist/lib/utilities/write-file.d.ts +1 -3
  197. package/dist/next.cjs +9 -9
  198. package/dist/next.js +6 -6
  199. package/dist/nuxt.cjs +11 -11
  200. package/dist/nuxt.js +8 -8
  201. package/dist/plugin-utils/{chunk-YKIS7BLU.cjs → chunk-5MO4BCOW.cjs} +24 -0
  202. package/dist/plugin-utils/{chunk-HHFA3IEZ.js → chunk-CYVV2MB7.js} +24 -0
  203. package/dist/plugin-utils/{chunk-75UVEMIV.cjs → chunk-DZZPNO5H.cjs} +2 -2
  204. package/dist/plugin-utils/{chunk-WEIEQXIJ.cjs → chunk-ECFS7DPV.cjs} +5 -5
  205. package/dist/plugin-utils/{chunk-MQOW6ENT.cjs → chunk-F65J5WOX.cjs} +1 -1
  206. package/dist/plugin-utils/{chunk-IHME6YWJ.js → chunk-GV7O3E7P.js} +1 -1
  207. package/dist/plugin-utils/chunk-J33TXWF6.js +12 -0
  208. package/dist/plugin-utils/{chunk-PK6PYFWY.js → chunk-L277XSSN.js} +1 -1
  209. package/dist/plugin-utils/{chunk-YDYJAGMP.js → chunk-QKMG6ZAU.js} +1 -1
  210. package/dist/plugin-utils/chunk-QP6OJWFG.cjs +14 -0
  211. package/dist/plugin-utils/{chunk-5TL6KEQ5.cjs → chunk-UNAGYQRB.cjs} +4 -4
  212. package/dist/plugin-utils/{chunk-432MQOUZ.js → chunk-XIXI67PY.js} +1 -1
  213. package/dist/plugin-utils/{config-48EWGWXq.d.cts → config-BzVVjChJ.d.cts} +201 -115
  214. package/dist/plugin-utils/{config-48EWGWXq.d.ts → config-BzVVjChJ.d.ts} +201 -115
  215. package/dist/plugin-utils/enforce.cjs +5 -5
  216. package/dist/plugin-utils/enforce.d.cts +1 -3
  217. package/dist/plugin-utils/enforce.d.ts +1 -3
  218. package/dist/plugin-utils/enforce.js +4 -4
  219. package/dist/plugin-utils/extend.cjs +4 -4
  220. package/dist/plugin-utils/extend.d.cts +1 -3
  221. package/dist/plugin-utils/extend.d.ts +1 -3
  222. package/dist/plugin-utils/extend.js +3 -3
  223. package/dist/plugin-utils/get-config-path.cjs +2 -2
  224. package/dist/plugin-utils/get-config-path.d.cts +2 -4
  225. package/dist/plugin-utils/get-config-path.d.ts +2 -4
  226. package/dist/plugin-utils/get-config-path.js +1 -1
  227. package/dist/plugin-utils/helpers.cjs +14 -14
  228. package/dist/plugin-utils/helpers.d.cts +3 -5
  229. package/dist/plugin-utils/helpers.d.ts +3 -5
  230. package/dist/plugin-utils/helpers.js +1 -1
  231. package/dist/plugin-utils/index.cjs +24 -24
  232. package/dist/plugin-utils/index.d.cts +1 -3
  233. package/dist/plugin-utils/index.d.ts +1 -3
  234. package/dist/plugin-utils/index.js +6 -6
  235. package/dist/plugin-utils/merge.cjs +3 -3
  236. package/dist/plugin-utils/merge.d.cts +1 -3
  237. package/dist/plugin-utils/merge.d.ts +1 -3
  238. package/dist/plugin-utils/merge.js +2 -2
  239. package/dist/plugin-utils/paths.cjs +2 -2
  240. package/dist/plugin-utils/paths.d.cts +4 -5
  241. package/dist/plugin-utils/paths.d.ts +4 -5
  242. package/dist/plugin-utils/paths.js +1 -1
  243. package/dist/{resolved-B41SbjnS.d.cts → resolved-D8vIizyA.d.cts} +81 -66
  244. package/dist/{resolved-J7a2Aeuk.d.ts → resolved-DWxXKJYy.d.ts} +81 -66
  245. package/dist/rolldown.cjs +8 -8
  246. package/dist/rolldown.d.cts +1 -2
  247. package/dist/rolldown.d.ts +1 -2
  248. package/dist/rolldown.js +5 -5
  249. package/dist/rollup.cjs +8 -8
  250. package/dist/rollup.d.cts +1 -2
  251. package/dist/rollup.d.ts +1 -2
  252. package/dist/rollup.js +5 -5
  253. package/dist/rspack.cjs +8 -8
  254. package/dist/rspack.d.cts +1 -2
  255. package/dist/rspack.d.ts +1 -2
  256. package/dist/rspack.js +5 -5
  257. package/dist/tsup.cjs +10 -10
  258. package/dist/tsup.js +7 -7
  259. package/dist/types/babel.d.cts +1 -2
  260. package/dist/types/babel.d.ts +1 -2
  261. package/dist/types/build.d.cts +94 -7
  262. package/dist/types/build.d.ts +94 -7
  263. package/dist/types/commands.cjs +2 -2
  264. package/dist/types/commands.d.cts +1 -2
  265. package/dist/types/commands.d.ts +1 -2
  266. package/dist/types/commands.js +1 -1
  267. package/dist/types/config.d.cts +1 -2
  268. package/dist/types/config.d.ts +1 -2
  269. package/dist/types/context.d.cts +2 -3
  270. package/dist/types/context.d.ts +2 -3
  271. package/dist/types/hooks.d.cts +1 -2
  272. package/dist/types/hooks.d.ts +1 -2
  273. package/dist/types/index.cjs +6 -22
  274. package/dist/types/index.d.cts +2 -3
  275. package/dist/types/index.d.ts +2 -3
  276. package/dist/types/index.js +2 -2
  277. package/dist/types/internal.d.cts +2 -3
  278. package/dist/types/internal.d.ts +2 -3
  279. package/dist/types/plugin.d.cts +1 -2
  280. package/dist/types/plugin.d.ts +1 -2
  281. package/dist/types/resolved.d.cts +1 -2
  282. package/dist/types/resolved.d.ts +1 -2
  283. package/dist/types/unplugin.d.cts +1 -2
  284. package/dist/types/unplugin.d.ts +1 -2
  285. package/dist/types/vfs.cjs +4 -20
  286. package/dist/types/vfs.d.cts +47 -54
  287. package/dist/types/vfs.d.ts +47 -54
  288. package/dist/types/vfs.js +1 -1
  289. package/dist/unloader.cjs +8 -8
  290. package/dist/unloader.d.cts +3 -4
  291. package/dist/unloader.d.ts +3 -4
  292. package/dist/unloader.js +5 -5
  293. package/dist/unplugin.cjs +20 -20
  294. package/dist/unplugin.d.cts +4 -5
  295. package/dist/unplugin.d.ts +4 -5
  296. package/dist/unplugin.js +17 -17
  297. package/dist/vite.cjs +9 -9
  298. package/dist/vite.d.cts +1 -2
  299. package/dist/vite.d.ts +1 -2
  300. package/dist/vite.js +6 -6
  301. package/dist/webpack.cjs +8 -8
  302. package/dist/webpack.d.cts +1 -2
  303. package/dist/webpack.d.ts +1 -2
  304. package/dist/webpack.js +5 -5
  305. package/package.json +8 -6
  306. package/dist/chunk-CWCEYGLM.js +0 -43
  307. package/dist/chunk-F5NKLRZD.cjs +0 -49
  308. package/dist/chunk-OBYFBPPO.js +0 -9
  309. package/dist/chunk-RDMLGFIT.js +0 -29
  310. package/dist/chunk-RF6RSWD4.cjs +0 -16
  311. package/dist/chunk-XDLLDHRY.cjs +0 -32
  312. package/dist/lib/chunk-POOHWK7C.cjs +0 -63
  313. package/dist/lib/chunk-VLHOYZG2.js +0 -55
  314. package/dist/plugin-utils/chunk-2HFS2OOG.cjs +0 -14
  315. package/dist/plugin-utils/chunk-CVZA2RT3.js +0 -12
@@ -3,7 +3,9 @@
3
3
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
4
4
  var alias = require('@rollup/plugin-alias');
5
5
  var pluginBabel = require('@rollup/plugin-babel');
6
+ var inject = require('@rollup/plugin-inject');
6
7
  var resolve = require('@rollup/plugin-node-resolve');
8
+ var replace = require('@rollup/plugin-replace');
7
9
  var toArray = require('@stryke/convert/to-array');
8
10
  var joinPaths = require('@stryke/path/join-paths');
9
11
  var isFunction = require('@stryke/type-checks/is-function');
@@ -15,7 +17,9 @@ var typescriptPlugin = require('rollup-plugin-typescript2');
15
17
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
18
 
17
19
  var alias__default = /*#__PURE__*/_interopDefault(alias);
20
+ var inject__default = /*#__PURE__*/_interopDefault(inject);
18
21
  var resolve__default = /*#__PURE__*/_interopDefault(resolve);
22
+ var replace__default = /*#__PURE__*/_interopDefault(replace);
19
23
  var defu__default = /*#__PURE__*/_interopDefault(defu);
20
24
  var typescriptPlugin__default = /*#__PURE__*/_interopDefault(typescriptPlugin);
21
25
 
@@ -43,7 +47,7 @@ function extractRollupConfig(context) {
43
47
  const result = defu__default.default({
44
48
  input: fs.globSync(toArray.toArray(context.config.entry).map((entry) => isString.isString(entry) ? entry : entry.file)).flat(),
45
49
  external: /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((source, importer, isResolved) => {
46
- const externalFn = context.config.build.variant === "rollup" && context.config.override.external ? isFunction.isFunction(context.config.override.external) ? context.config.override.external : (id) => toArray.toArray(context.config.override.external).includes(id) : context.config.build.variant === "vite" && context.config.override.build?.rollupOptions?.external ? isFunction.isFunction(context.config.override.build?.rollupOptions?.external) ? context.config.override.build?.rollupOptions?.external : (id) => toArray.toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : context.config.build.variant === "rollup" && context.config.build.external ? isFunction.isFunction(context.config.build.external) ? context.config.build.external : (id) => toArray.toArray(context.config.build.external).includes(id) : context.config.build.variant === "vite" && context.config.build.build?.rollupOptions?.external ? isFunction.isFunction(context.config.build.build?.rollupOptions?.external) ? context.config.build.build?.rollupOptions?.external : (id) => toArray.toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : void 0;
50
+ const externalFn = context.config.build.variant === "rollup" && context.config.build.override.external ? isFunction.isFunction(context.config.build.override.external) ? context.config.build.override.external : (id) => toArray.toArray(context.config.build.override.external).includes(id) : context.config.build.variant === "vite" && context.config.build.override.build?.rollupOptions?.external ? isFunction.isFunction(context.config.build.override.build?.rollupOptions?.external) ? context.config.build.override.build?.rollupOptions?.external : (id) => toArray.toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : context.config.build.variant === "rollup" && context.config.build.external ? isFunction.isFunction(context.config.build.external) ? context.config.build.external : (id) => toArray.toArray(context.config.build.external).includes(id) : context.config.build.variant === "vite" && context.config.build.build?.rollupOptions?.external ? isFunction.isFunction(context.config.build.build?.rollupOptions?.external) ? context.config.build.build?.rollupOptions?.external : (id) => toArray.toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : void 0;
47
51
  if (isFunction.isFunction(externalFn) && externalFn(source, importer, isResolved)) {
48
52
  return true;
49
53
  }
@@ -63,6 +67,15 @@ function extractRollupConfig(context) {
63
67
  check: false,
64
68
  tsconfig: context.tsconfig.tsconfigFilePath
65
69
  }),
70
+ context.config.build.define && Object.keys(context.config.build.define).length > 0 && replace__default.default({
71
+ sourceMap: context.config.mode === "development",
72
+ preventAssignment: true,
73
+ ...context.config.build.define ?? {}
74
+ }),
75
+ context.config.build.inject && Object.keys(context.config.build.inject).length > 0 && inject__default.default({
76
+ sourceMap: context.config.mode === "development",
77
+ ...context.config.build.inject
78
+ }),
66
79
  alias__default.default({
67
80
  entries: context.builtins.reduce((ret, id) => {
68
81
  if (!ret.find((e) => e.find === id)) {
@@ -75,7 +88,15 @@ function extractRollupConfig(context) {
75
88
  }
76
89
  }
77
90
  return ret;
78
- }, [])
91
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias : Object.entries(context.config.build.alias).reduce((ret, [id, path]) => {
92
+ if (!ret.find((e) => e.find === id)) {
93
+ ret.push({
94
+ find: id,
95
+ replacement: path
96
+ });
97
+ }
98
+ return ret;
99
+ }, []) : [])
79
100
  }),
80
101
  pluginBabel.getBabelInputPlugin(defu__default.default(context.config.transform.babel, {
81
102
  caller: {
@@ -101,8 +122,8 @@ function extractRollupConfig(context) {
101
122
  preferBuiltins: true
102
123
  }),
103
124
  dtsBundlePlugin
104
- ]
105
- }, context.config.build.variant === "rollup" ? context.config.override : {}, context.config.build.variant === "vite" ? context.config.override.build?.rollupOptions : {}, {
125
+ ].filter(Boolean)
126
+ }, context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, {
106
127
  cache: !context.config.skipCache ? joinPaths.joinPaths(context.cachePath, "rollup") : false,
107
128
  output: {
108
129
  dir: context.config.output.outputPath
@@ -1,7 +1,9 @@
1
- import { dtsBundlePlugin } from './chunk-SYHVP3OW.js';
1
+ import { dtsBundlePlugin } from './chunk-HOZ37BFN.js';
2
2
  import { __name } from './chunk-SHUYVCID.js';
3
3
  import { getBabelInputPlugin } from '@rollup/plugin-babel';
4
+ import inject from '@rollup/plugin-inject';
4
5
  import resolve from '@rollup/plugin-node-resolve';
6
+ import replace from '@rollup/plugin-replace';
5
7
  import { toArray } from '@stryke/convert/to-array';
6
8
  import { joinPaths } from '@stryke/path/join-paths';
7
9
  import { isFunction } from '@stryke/type-checks/is-function';
@@ -15,7 +17,7 @@ function extractRolldownConfig(context) {
15
17
  return defu({
16
18
  input: globSync(toArray(context.config.entry).map((entry) => isString(entry) ? entry : entry.file)).flat(),
17
19
  external: /* @__PURE__ */ __name((source, importer, isResolved) => {
18
- const externalFn = context.config.build.variant === "rollup" && context.config.override.external ? isFunction(context.config.override.external) ? context.config.override.external : (id) => toArray(context.config.override.external).includes(id) : context.config.build.variant === "vite" && context.config.override?.build?.rollupOptions?.external ? isFunction(context.config.override?.build?.rollupOptions?.external) ? context.config.override?.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : context.config.build.variant === "rollup" && context.config.build.external ? isFunction(context.config.build.external) ? context.config.build.external : (id) => toArray(context.config.build.external).includes(id) : context.config.build.variant === "vite" && context.config.build.build?.rollupOptions?.external ? isFunction(context.config.build.build?.rollupOptions?.external) ? context.config.build.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : void 0;
20
+ const externalFn = context.config.build.variant === "rollup" && context.config.build.override.external ? isFunction(context.config.build.override.external) ? context.config.build.override.external : (id) => toArray(context.config.build.override.external).includes(id) : context.config.build.variant === "vite" && context.config.build.override?.build?.rollupOptions?.external ? isFunction(context.config.build.override?.build?.rollupOptions?.external) ? context.config.build.override?.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : context.config.build.variant === "rollup" && context.config.build.external ? isFunction(context.config.build.external) ? context.config.build.external : (id) => toArray(context.config.build.external).includes(id) : context.config.build.variant === "vite" && context.config.build.build?.rollupOptions?.external ? isFunction(context.config.build.build?.rollupOptions?.external) ? context.config.build.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : void 0;
19
21
  if (isFunction(externalFn) && externalFn(source, importer, isResolved)) {
20
22
  return true;
21
23
  }
@@ -35,6 +37,15 @@ function extractRolldownConfig(context) {
35
37
  check: false,
36
38
  tsconfig: context.tsconfig.tsconfigFilePath
37
39
  }),
40
+ context.config.build.define && Object.keys(context.config.build.define).length > 0 && replace({
41
+ sourceMap: context.config.mode === "development",
42
+ preventAssignment: true,
43
+ ...context.config.build.define ?? {}
44
+ }),
45
+ context.config.build.inject && Object.keys(context.config.build.inject).length > 0 && inject({
46
+ sourceMap: context.config.mode === "development",
47
+ ...context.config.build.inject
48
+ }),
38
49
  aliasPlugin({
39
50
  entries: context.builtins.reduce((ret, id) => {
40
51
  if (!ret.find((e) => e.find === id)) {
@@ -47,7 +58,15 @@ function extractRolldownConfig(context) {
47
58
  }
48
59
  }
49
60
  return ret;
50
- }, [])
61
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias : Object.entries(context.config.build.alias).reduce((ret, [id, path]) => {
62
+ if (!ret.find((e) => e.find === id)) {
63
+ ret.push({
64
+ find: id,
65
+ replacement: path
66
+ });
67
+ }
68
+ return ret;
69
+ }, []) : [])
51
70
  }),
52
71
  getBabelInputPlugin(defu(context.config.transform.babel, {
53
72
  caller: {
@@ -74,15 +93,15 @@ function extractRolldownConfig(context) {
74
93
  }),
75
94
  dtsBundlePlugin
76
95
  ]
77
- }, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.override : {}, context.config.build.variant === "vite" ? context.config.override.build?.rollupOptions : {}, {
96
+ }, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, {
97
+ experimental: {
98
+ viteMode: context.config.build.variant === "vite"
99
+ },
78
100
  resolve: {
79
- alias: context.builtins.reduce((ret, id) => {
80
- const path = context.fs.ids[id];
81
- if (path) {
82
- ret[id] = path;
83
- }
84
- return ret;
85
- }, {})
101
+ mainFields: context.config.build.mainFields,
102
+ conditions: context.config.build.conditions,
103
+ define: context.config.build.define,
104
+ extensions: context.config.build.extensions
86
105
  },
87
106
  platform: context.config.build.platform,
88
107
  tsconfig: context.tsconfig.tsconfigFilePath,
@@ -90,7 +109,8 @@ function extractRolldownConfig(context) {
90
109
  output: {
91
110
  dir: context.config.output.outputPath
92
111
  },
93
- logLevel: context.config.logLevel
112
+ logLevel: context.config.logLevel,
113
+ onLog: context.log
94
114
  }, context.config.build.variant === "rolldown" || context.config.build.variant === "rollup" ? context.config.build : {}, context.config.build.variant === "vite" ? context.config.build.build : {}, {
95
115
  output: {
96
116
  sourcemap: context.config.mode === "development"
@@ -1,5 +1,5 @@
1
1
  import { resolvePath } from './chunk-NWAD7K4D.js';
2
- import { extractESBuildConfig } from './chunk-VLHOYZG2.js';
2
+ import { extractESBuildConfig } from './chunk-3G4C3YAU.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { LogLevelLabel } from '@storm-software/config-tools/types';
5
5
  import { build } from 'esbuild';
@@ -13,7 +13,7 @@ function extractRspackConfig(context) {
13
13
  return ret;
14
14
  }, {})
15
15
  }
16
- }, context.config.build.variant === "rspack" ? context.config.override : {}, {
16
+ }, context.config.build.variant === "rspack" ? context.config.build.override : {}, {
17
17
  external: context.config.build.external,
18
18
  noExternal: context.config.build.noExternal,
19
19
  skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
@@ -12,15 +12,6 @@ var filePathFns = require('@stryke/path/file-path-fns');
12
12
  var joinPaths = require('@stryke/path/join-paths');
13
13
  var kebabCase = require('@stryke/string-format/kebab-case');
14
14
 
15
- // src/types/vfs.ts
16
- var __VFS_INIT__ = "__VFS_INIT__";
17
- var __VFS_REVERT__ = "__VFS_REVERT__";
18
- var __VFS_CACHE__ = "__VFS_CACHE__";
19
- var __VFS_RESOLVER__ = "__VFS_RESOLVER__";
20
- var __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
21
- var __VFS_UNIFIED__ = "__VFS_UNIFIED__";
22
-
23
- // src/lib/utilities/meta.ts
24
15
  var PROJECT_ROOT_HASH_LENGTH = 45;
25
16
  var CACHE_HASH_LENGTH = 62;
26
17
  function getPrefixedProjectRootHash(name, projectRootHash) {
@@ -83,11 +74,7 @@ chunkUSNT2KNT_cjs.__name(getPersistedMeta, "getPersistedMeta");
83
74
  async function writeMetaFile(context) {
84
75
  const metaFilePath = joinPaths.joinPaths(context.dataPath, "meta.json");
85
76
  context.log(types.LogLevelLabel.DEBUG, `Writing runtime metadata to ${metaFilePath}`);
86
- await context.fs.writeFile(metaFilePath, JSON.stringify({
87
- ...context.meta,
88
- virtualFiles: context.fs[__VFS_VIRTUAL__].toJSON(context.artifactsPath),
89
- virtualFilesMeta: context.fs.getPartialMeta()
90
- }, null, 2), {
77
+ await context.fs.writeFile(metaFilePath, JSON.stringify(context.meta, null, 2), {
91
78
  mode: "fs"
92
79
  });
93
80
  }
@@ -95,12 +82,6 @@ chunkUSNT2KNT_cjs.__name(writeMetaFile, "writeMetaFile");
95
82
 
96
83
  exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
97
84
  exports.PROJECT_ROOT_HASH_LENGTH = PROJECT_ROOT_HASH_LENGTH;
98
- exports.__VFS_CACHE__ = __VFS_CACHE__;
99
- exports.__VFS_INIT__ = __VFS_INIT__;
100
- exports.__VFS_RESOLVER__ = __VFS_RESOLVER__;
101
- exports.__VFS_REVERT__ = __VFS_REVERT__;
102
- exports.__VFS_UNIFIED__ = __VFS_UNIFIED__;
103
- exports.__VFS_VIRTUAL__ = __VFS_VIRTUAL__;
104
85
  exports.discoverTemplates = discoverTemplates;
105
86
  exports.getChecksum = getChecksum;
106
87
  exports.getPersistedMeta = getPersistedMeta;
@@ -9,7 +9,17 @@ import { appendPath } from '@stryke/path/append';
9
9
  import { joinPaths } from '@stryke/path/join-paths';
10
10
  import { replacePath, replaceExtension } from '@stryke/path/replace';
11
11
  import { isSetString } from '@stryke/type-checks/is-set-string';
12
+ import { isString } from '@stryke/type-checks/is-string';
12
13
 
14
+ function replacePathTokens(context, path) {
15
+ if (!path) {
16
+ return path;
17
+ }
18
+ return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
19
+ }
20
+ __name(replacePathTokens, "replacePathTokens");
21
+
22
+ // src/lib/entry.ts
13
23
  function resolveEntryInputFile(context, typeDefinition) {
14
24
  return replacePath(typeDefinition.file, joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot));
15
25
  }
@@ -52,7 +62,7 @@ async function resolveEntries(context, typeDefinitions) {
52
62
  }
53
63
  __name(resolveEntries, "resolveEntries");
54
64
  function resolveEntriesSync(context, typeDefinitions) {
55
- return typeDefinitions.map((typeDefinition) => {
65
+ return typeDefinitions.map((entry) => isString(entry) ? replacePathTokens(context, entry) : replacePathTokens(context, entry.file)).map((typeDefinition) => {
56
66
  const parsed = parseTypeDefinition(typeDefinition);
57
67
  const filePath = appendPath(parsed.file, context.config.projectRoot);
58
68
  if (isFile(filePath)) {
@@ -95,4 +105,4 @@ function getUniqueEntries(entries = []) {
95
105
  }
96
106
  __name(getUniqueEntries, "getUniqueEntries");
97
107
 
98
- export { getUniqueEntries, resolveEntries, resolveEntriesSync, resolveEntry, resolveEntryInput, resolveEntryInputFile, resolveEntryOutput, resolveVirtualEntry };
108
+ export { getUniqueEntries, replacePathTokens, resolveEntries, resolveEntriesSync, resolveEntry, resolveEntryInput, resolveEntryInputFile, resolveEntryOutput, resolveVirtualEntry };
@@ -12,18 +12,21 @@ function extractWebpackConfig(context) {
12
12
  return defu__default.default({
13
13
  resolve: {
14
14
  alias: context.builtins.reduce((ret, id) => {
15
- const path = context.fs.ids[id];
16
- if (path) {
17
- ret[id] = path;
15
+ if (!ret[id]) {
16
+ const path = context.fs.ids[id];
17
+ if (path) {
18
+ ret[id] = path;
19
+ }
18
20
  }
19
21
  return ret;
20
- }, {})
22
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce((ret, alias) => {
23
+ if (!ret[alias.find.toString()]) {
24
+ ret[alias.find.toString()] = alias.replacement;
25
+ }
26
+ return ret;
27
+ }, {}) : context.config.build.alias : {})
21
28
  }
22
- }, context.config.build.variant === "webpack" ? context.config.override : {}, {
23
- external: context.config.build.external,
24
- noExternal: context.config.build.noExternal,
25
- skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
26
- }, {
29
+ }, context.config.build.variant === "webpack" ? context.config.build.override : {}, {
27
30
  output: {
28
31
  path: joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.outputPath)
29
32
  },
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkET5QBFGZ_cjs = require('./chunk-ET5QBFGZ.cjs');
3
+ var chunkFN7673NC_cjs = require('./chunk-FN7673NC.cjs');
4
4
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
5
  var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
6
6
  var isSetString = require('@stryke/type-checks/is-set-string');
@@ -12,7 +12,7 @@ async function resolve(context, type, overrides = {}) {
12
12
  } else {
13
13
  typeDefinition = type;
14
14
  }
15
- const result = await chunkET5QBFGZ_cjs.bundle(context, typeDefinition.file, overrides);
15
+ const result = await chunkFN7673NC_cjs.bundle(context, typeDefinition.file, overrides);
16
16
  const resolved = await context.resolver.evalModule(result.text, {
17
17
  filename: result.path,
18
18
  forceTranspile: true
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkMZJWK36Q_cjs = require('./chunk-MZJWK36Q.cjs');
4
- var chunkPOOHWK7C_cjs = require('./chunk-POOHWK7C.cjs');
4
+ var chunk27VJFYDM_cjs = require('./chunk-27VJFYDM.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var types = require('@storm-software/config-tools/types');
7
7
  var esbuild = require('esbuild');
@@ -12,7 +12,7 @@ async function bundle(context, file, overrides = {}) {
12
12
  throw new Error(`Module not found: "${file}". Please check the path and try again.`);
13
13
  }
14
14
  const result = await esbuild.build({
15
- ...chunkPOOHWK7C_cjs.extractESBuildConfig(context),
15
+ ...chunk27VJFYDM_cjs.extractESBuildConfig(context),
16
16
  entry: [
17
17
  path
18
18
  ],
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk3OCI4TH7_cjs = require('./chunk-3OCI4TH7.cjs');
4
- var chunk5EXW3ZRC_cjs = require('./chunk-5EXW3ZRC.cjs');
4
+ var chunk4FX4VOLA_cjs = require('./chunk-4FX4VOLA.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var joinPaths = require('@stryke/path/join-paths');
7
7
  var isObject = require('@stryke/type-checks/is-object');
@@ -116,13 +116,20 @@ var unbuildLoader = /* @__PURE__ */ chunkUSNT2KNT_cjs.__name((context) => {
116
116
  function extractUnbuildConfig(context) {
117
117
  return defu__default.default({
118
118
  alias: context.builtins.reduce((ret, id) => {
119
- const path = context.fs.ids[id];
120
- if (path) {
121
- ret[id] = path;
119
+ if (!ret[id]) {
120
+ const path = context.fs.ids[id];
121
+ if (path) {
122
+ ret[id] = path;
123
+ }
122
124
  }
123
125
  return ret;
124
- }, {})
125
- }, context.config.build.variant === "unbuild" ? context.config.override : {}, {
126
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce((ret, alias) => {
127
+ if (!ret[alias.find.toString()]) {
128
+ ret[alias.find.toString()] = alias.replacement;
129
+ }
130
+ return ret;
131
+ }, {}) : context.config.build.alias : {})
132
+ }, context.config.build.variant === "unbuild" ? context.config.build.override : {}, {
126
133
  projectName: context.config.name,
127
134
  name: context.config.name,
128
135
  orgName: isObject.isObject(context.workspaceConfig.organization) ? context.workspaceConfig.organization.name : context.workspaceConfig.organization,
@@ -144,7 +151,7 @@ function extractUnbuildConfig(context) {
144
151
  fsCache: joinPaths.joinPaths(context.envPaths.cache, "jiti"),
145
152
  moduleCache: true
146
153
  },
147
- rollup: chunk5EXW3ZRC_cjs.extractRollupConfig(context)
154
+ rollup: chunk4FX4VOLA_cjs.extractRollupConfig(context)
148
155
  }, context.config.build.variant === "unbuild" ? context.config.build : {}, {
149
156
  debug: context.config.mode === "development",
150
157
  minify: context.config.mode !== "development",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkPOOHWK7C_cjs = require('./chunk-POOHWK7C.cjs');
3
+ var chunk27VJFYDM_cjs = require('./chunk-27VJFYDM.cjs');
4
4
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
5
  var joinPaths = require('@stryke/path/join-paths');
6
6
  var defu = require('defu');
@@ -31,18 +31,32 @@ function extractViteConfig(context) {
31
31
  return defu__default.default({
32
32
  resolve: {
33
33
  alias: context.builtins.reduce((ret, id) => {
34
- const path = context.fs.ids[id];
35
- if (path) {
36
- ret[id] = path;
34
+ if (!ret.find((e) => e.find === id)) {
35
+ const path = context.fs.ids[id];
36
+ if (path) {
37
+ ret.push({
38
+ find: id,
39
+ replacement: path
40
+ });
41
+ }
37
42
  }
38
43
  return ret;
39
- }, {})
44
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias : Object.entries(context.config.build.alias).reduce((ret, [id, path]) => {
45
+ if (!ret.find((e) => e.find === id)) {
46
+ ret.push({
47
+ find: id,
48
+ replacement: path
49
+ });
50
+ }
51
+ return ret;
52
+ }, []) : []),
53
+ dedupe: context.config.build.dedupe,
54
+ mainFields: context.config.build.mainFields,
55
+ conditions: context.config.build.conditions,
56
+ extensions: context.config.build.extensions
40
57
  }
41
- }, context.config.build.variant === "vite" ? context.config.override : {}, {
42
- external: context.config.build.external,
43
- noExternal: context.config.build.noExternal,
44
- skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
45
- }, {
58
+ }, context.config.build.variant === "vite" ? context.config.build.override : {}, {
59
+ define: context.config.build.define,
46
60
  rootDir: context.config.sourceRoot,
47
61
  platform: context.config.build.platform,
48
62
  mode: context.config.mode === "development" ? "development" : "production",
@@ -52,10 +66,9 @@ function extractViteConfig(context) {
52
66
  tsconfig: context.tsconfig.tsconfigFilePath,
53
67
  tsconfigRaw: context.tsconfig.tsconfigJson
54
68
  },
55
- esbuild: chunkPOOHWK7C_cjs.extractESBuildConfig(context),
69
+ esbuild: chunk27VJFYDM_cjs.extractESBuildConfig(context),
56
70
  logLevel: context.config.logLevel ?? void 0,
57
- envDir: context.config.projectRoot,
58
- noExternal: context.builtins
71
+ envDir: context.config.projectRoot
59
72
  }, context.config.build.variant === "vite" ? context.config.build : {}, {
60
73
  build: {
61
74
  minify: context.config.mode !== "development",
@@ -1,7 +1,9 @@
1
1
  import { __name } from './chunk-SHUYVCID.js';
2
2
  import alias from '@rollup/plugin-alias';
3
3
  import { getBabelInputPlugin } from '@rollup/plugin-babel';
4
+ import inject from '@rollup/plugin-inject';
4
5
  import resolve from '@rollup/plugin-node-resolve';
6
+ import replace from '@rollup/plugin-replace';
5
7
  import { toArray } from '@stryke/convert/to-array';
6
8
  import { joinPaths } from '@stryke/path/join-paths';
7
9
  import { isFunction } from '@stryke/type-checks/is-function';
@@ -34,7 +36,7 @@ function extractRollupConfig(context) {
34
36
  const result = defu({
35
37
  input: globSync(toArray(context.config.entry).map((entry) => isString(entry) ? entry : entry.file)).flat(),
36
38
  external: /* @__PURE__ */ __name((source, importer, isResolved) => {
37
- const externalFn = context.config.build.variant === "rollup" && context.config.override.external ? isFunction(context.config.override.external) ? context.config.override.external : (id) => toArray(context.config.override.external).includes(id) : context.config.build.variant === "vite" && context.config.override.build?.rollupOptions?.external ? isFunction(context.config.override.build?.rollupOptions?.external) ? context.config.override.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : context.config.build.variant === "rollup" && context.config.build.external ? isFunction(context.config.build.external) ? context.config.build.external : (id) => toArray(context.config.build.external).includes(id) : context.config.build.variant === "vite" && context.config.build.build?.rollupOptions?.external ? isFunction(context.config.build.build?.rollupOptions?.external) ? context.config.build.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : void 0;
39
+ const externalFn = context.config.build.variant === "rollup" && context.config.build.override.external ? isFunction(context.config.build.override.external) ? context.config.build.override.external : (id) => toArray(context.config.build.override.external).includes(id) : context.config.build.variant === "vite" && context.config.build.override.build?.rollupOptions?.external ? isFunction(context.config.build.override.build?.rollupOptions?.external) ? context.config.build.override.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : context.config.build.variant === "rollup" && context.config.build.external ? isFunction(context.config.build.external) ? context.config.build.external : (id) => toArray(context.config.build.external).includes(id) : context.config.build.variant === "vite" && context.config.build.build?.rollupOptions?.external ? isFunction(context.config.build.build?.rollupOptions?.external) ? context.config.build.build?.rollupOptions?.external : (id) => toArray(context.config.build?.build?.rollupOptions?.external).includes(id) : void 0;
38
40
  if (isFunction(externalFn) && externalFn(source, importer, isResolved)) {
39
41
  return true;
40
42
  }
@@ -54,6 +56,15 @@ function extractRollupConfig(context) {
54
56
  check: false,
55
57
  tsconfig: context.tsconfig.tsconfigFilePath
56
58
  }),
59
+ context.config.build.define && Object.keys(context.config.build.define).length > 0 && replace({
60
+ sourceMap: context.config.mode === "development",
61
+ preventAssignment: true,
62
+ ...context.config.build.define ?? {}
63
+ }),
64
+ context.config.build.inject && Object.keys(context.config.build.inject).length > 0 && inject({
65
+ sourceMap: context.config.mode === "development",
66
+ ...context.config.build.inject
67
+ }),
57
68
  alias({
58
69
  entries: context.builtins.reduce((ret, id) => {
59
70
  if (!ret.find((e) => e.find === id)) {
@@ -66,7 +77,15 @@ function extractRollupConfig(context) {
66
77
  }
67
78
  }
68
79
  return ret;
69
- }, [])
80
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias : Object.entries(context.config.build.alias).reduce((ret, [id, path]) => {
81
+ if (!ret.find((e) => e.find === id)) {
82
+ ret.push({
83
+ find: id,
84
+ replacement: path
85
+ });
86
+ }
87
+ return ret;
88
+ }, []) : [])
70
89
  }),
71
90
  getBabelInputPlugin(defu(context.config.transform.babel, {
72
91
  caller: {
@@ -92,8 +111,8 @@ function extractRollupConfig(context) {
92
111
  preferBuiltins: true
93
112
  }),
94
113
  dtsBundlePlugin
95
- ]
96
- }, context.config.build.variant === "rollup" ? context.config.override : {}, context.config.build.variant === "vite" ? context.config.override.build?.rollupOptions : {}, {
114
+ ].filter(Boolean)
115
+ }, context.config.build.variant === "rollup" ? context.config.build.override : {}, context.config.build.variant === "vite" ? context.config.build.override.build?.rollupOptions : {}, {
97
116
  cache: !context.config.skipCache ? joinPaths(context.cachePath, "rollup") : false,
98
117
  output: {
99
118
  dir: context.config.output.outputPath
@@ -6,18 +6,21 @@ function extractWebpackConfig(context) {
6
6
  return defu({
7
7
  resolve: {
8
8
  alias: context.builtins.reduce((ret, id) => {
9
- const path = context.fs.ids[id];
10
- if (path) {
11
- ret[id] = path;
9
+ if (!ret[id]) {
10
+ const path = context.fs.ids[id];
11
+ if (path) {
12
+ ret[id] = path;
13
+ }
12
14
  }
13
15
  return ret;
14
- }, {})
16
+ }, context.config.build.alias ? Array.isArray(context.config.build.alias) ? context.config.build.alias.reduce((ret, alias) => {
17
+ if (!ret[alias.find.toString()]) {
18
+ ret[alias.find.toString()] = alias.replacement;
19
+ }
20
+ return ret;
21
+ }, {}) : context.config.build.alias : {})
15
22
  }
16
- }, context.config.build.variant === "webpack" ? context.config.override : {}, {
17
- external: context.config.build.external,
18
- noExternal: context.config.build.noExternal,
19
- skipNodeModulesBundle: context.config.build.skipNodeModulesBundle
20
- }, {
23
+ }, context.config.build.variant === "webpack" ? context.config.build.override : {}, {
21
24
  output: {
22
25
  path: joinPaths(context.workspaceConfig.workspaceRoot, context.config.output.outputPath)
23
26
  },
@@ -1,4 +1,4 @@
1
- import { resolveESBuildEntry } from './chunk-VLHOYZG2.js';
1
+ import { resolveESBuildEntry } from './chunk-3G4C3YAU.js';
2
2
  import { __name } from './chunk-SHUYVCID.js';
3
3
  import { DEFAULT_BUILD_OPTIONS } from '@storm-software/tsup/constants';
4
4
  import defu from 'defu';
@@ -31,8 +31,8 @@ function extractTsupConfig(context) {
31
31
  if (context.config.build.variant === "tsup") {
32
32
  if (context.config.build.esbuildOptions) {
33
33
  context.config.build.esbuildOptions?.(options, ctx);
34
- } else if (context.config.override.esbuildOptions) {
35
- context.config.override.esbuildOptions?.(options, ctx);
34
+ } else if (context.config.build.override.esbuildOptions) {
35
+ context.config.build.override.esbuildOptions?.(options, ctx);
36
36
  }
37
37
  }
38
38
  options.alias = {
@@ -47,19 +47,16 @@ function extractTsupConfig(context) {
47
47
  };
48
48
  }, "esbuildOptions"),
49
49
  noExternal: context.builtins
50
- }, context.config.build.variant === "tsup" ? context.config.override : {}, {
50
+ }, context.config.build.variant === "tsup" ? context.config.build.override : {}, {
51
51
  name: context.config.name,
52
52
  assets: context.config.output.assets,
53
- external: context.config.build.external,
54
- noExternal: context.config.build.noExternal,
55
- skipNodeModulesBundle: context.config.build.skipNodeModulesBundle,
53
+ resolveExtensions: context.config.build.extensions,
56
54
  outputPath: context.config.output.outputPath,
57
55
  projectRoot: context.config.projectRoot,
58
56
  tsconfig: context.tsconfig.tsconfigFilePath,
59
57
  tsconfigRaw: context.tsconfig.tsconfigJson,
60
58
  format: context.config.output.format,
61
59
  mode: context.config.mode,
62
- platform: context.config.build.platform,
63
60
  treeshake: context.config.build.variant === "tsup" ? context.config.build?.treeshake : context.config.build.variant === "tsup" ? context.config.build?.treeShaking : void 0
64
61
  }, context.config.build.variant === "tsup" ? context.config.build : {}, {
65
62
  minify: context.config.mode !== "development",
@@ -1,4 +1,5 @@
1
1
  import { __name } from './chunk-SHUYVCID.js';
2
+ import { joinPaths } from '@stryke/path/join';
2
3
  import { match } from 'bundle-require';
3
4
 
4
5
  var NON_NODE_MODULE_REGEX = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
@@ -21,9 +22,23 @@ async function handleResolveId(context, args, options = {}) {
21
22
  };
22
23
  }
23
24
  }
24
- if (context.fs.isTsconfigPath(args.id)) {
25
- const tsconfigPath = context.fs.resolveTsconfigPath(args.id);
26
- const tsconfigPathPackage = context.fs.resolveTsconfigPathPackage(args.id);
25
+ if (!!context.tsconfig.options.paths && Object.keys(context.tsconfig.options.paths).some((path) => args.id.startsWith(path.replaceAll("*", "")))) {
26
+ let tsconfigPath = false;
27
+ if (context.tsconfig.options.paths) {
28
+ for (const tsconfigPathKey of Object.keys(context.tsconfig.options.paths).filter((tsconfigPath2) => args.id.startsWith(tsconfigPath2.replaceAll("*", "")))) {
29
+ const resolvedPath = context.tsconfig.options.paths[tsconfigPathKey]?.find((tsconfigPath2) => context.fs.resolve(joinPaths(context.workspaceConfig.workspaceRoot, tsconfigPath2.replaceAll("*", ""), args.id.replace(tsconfigPathKey.replaceAll("*", ""), ""))) || context.fs.formatPath(tsconfigPath2) === context.fs.formatPath(args.id));
30
+ if (resolvedPath) {
31
+ tsconfigPath = context.fs.formatPath(resolvedPath) === context.fs.formatPath(args.id) ? context.fs.formatPath(resolvedPath) : context.fs.resolve(joinPaths(context.workspaceConfig.workspaceRoot, resolvedPath.replaceAll("*", ""), args.id.replace(tsconfigPathKey.replaceAll("*", ""), "")));
32
+ }
33
+ }
34
+ }
35
+ let tsconfigPathPackage = false;
36
+ if (context.tsconfig.options.paths) {
37
+ const tsconfigPathKeys = Object.keys(context.tsconfig.options.paths).filter((tsconfigPath2) => args.id.startsWith(tsconfigPath2.replaceAll("*", "")));
38
+ if (tsconfigPathKeys.length > 0 && tsconfigPathKeys[0]) {
39
+ tsconfigPathPackage = tsconfigPathKeys[0].replace(/\/\*$/, "");
40
+ }
41
+ }
27
42
  if (tsconfigPath && tsconfigPathPackage) {
28
43
  return {
29
44
  id: tsconfigPath,
@@ -56,7 +71,7 @@ async function handleResolveId(context, args, options = {}) {
56
71
  args.importer
57
72
  ] : []
58
73
  });
59
- if (match(args.id, options.noExternal) || resolvedPath && context.fs.meta[resolvedPath]?.variant === "builtin") {
74
+ if (match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.variant === "builtin") {
60
75
  return void 0;
61
76
  }
62
77
  if (match(args.id, options.external) || args.id.startsWith("node:")) {