powerlines 0.14.1 → 0.15.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 (630) hide show
  1. package/dist/api.cjs +14 -0
  2. package/dist/{internal/api.d.cts → api.d.cts} +14 -14
  3. package/dist/{internal/api.d.ts → api.d.ts} +14 -14
  4. package/dist/api.js +5 -0
  5. package/dist/astro.cjs +12 -14
  6. package/dist/astro.d.cts +4 -4
  7. package/dist/astro.d.ts +4 -4
  8. package/dist/astro.js +9 -11
  9. package/dist/chunk-22MUBUHP.cjs +10 -0
  10. package/dist/chunk-2NO7N5OW.cjs +2 -0
  11. package/dist/chunk-3AEMPMJA.js +29 -0
  12. package/dist/{chunk-7GVRTQLJ.js → chunk-53SIK3PC.js} +2 -4
  13. package/dist/chunk-7464OF2J.cjs +10 -0
  14. package/dist/chunk-7GYTTM4M.cjs +2 -0
  15. package/dist/{chunk-M6XRJI44.js → chunk-7TKF67GW.js} +1 -3
  16. package/dist/chunk-AENPRFWJ.cjs +2 -0
  17. package/dist/chunk-AWZEALXL.cjs +32 -0
  18. package/dist/chunk-BUR2JQ6G.cjs +11 -0
  19. package/dist/{chunk-7HF3SEKY.cjs → chunk-C3O6OZ75.cjs} +4 -6
  20. package/dist/{chunk-WA6IOZHV.js → chunk-CEMWMWEY.js} +3 -5
  21. package/dist/chunk-CJSGAITR.js +9 -0
  22. package/dist/{chunk-6TJGZR5X.js → chunk-CWCEYGLM.js} +1 -4
  23. package/dist/chunk-DRXFQCNC.js +1 -0
  24. package/dist/{chunk-V7LXFIGK.js → chunk-DTVAXYH7.js} +19 -4
  25. package/dist/{chunk-APVMN2H7.cjs → chunk-ETKZMGLN.cjs} +0 -2
  26. package/dist/{chunk-UZQYBO6Z.cjs → chunk-F5NKLRZD.cjs} +2 -5
  27. package/dist/{chunk-5VPVJHJO.cjs → chunk-FCTNMPJF.cjs} +0 -2
  28. package/dist/chunk-FNZDWE4L.js +1 -0
  29. package/dist/{chunk-WCTOTE3T.cjs → chunk-FSZEVJIL.cjs} +31 -16
  30. package/dist/chunk-FUXITWBD.cjs +10 -0
  31. package/dist/{chunk-7QQZH7V2.js → chunk-G45EBQMJ.js} +1 -3
  32. package/dist/chunk-GHJU2KGP.cjs +2 -0
  33. package/dist/chunk-H26QYGLD.cjs +10 -0
  34. package/dist/chunk-HQFZ64VC.cjs +2 -0
  35. package/dist/chunk-J4BQZHTQ.js +1 -0
  36. package/dist/chunk-JGB5YQ2U.js +1 -0
  37. package/dist/{chunk-EBMELFCF.js → chunk-JQCWV4DT.js} +0 -2
  38. package/dist/chunk-KALR2O2F.cjs +2 -0
  39. package/dist/chunk-KIKTWMI3.cjs +2 -0
  40. package/dist/{chunk-2OGPXWHG.js → chunk-KQPL2ZMU.js} +2 -4
  41. package/dist/{chunk-MW2CYPK5.cjs → chunk-KZMYPV7R.cjs} +7 -9
  42. package/dist/{chunk-5S33UKRI.js → chunk-LQEDMNSD.js} +1 -3
  43. package/dist/{chunk-O7GICJVN.cjs → chunk-LZM7R4YU.cjs} +6 -8
  44. package/dist/{chunk-N6L2CYXV.js → chunk-MQXT2JKH.js} +2 -4
  45. package/dist/{chunk-4HGQJ4KR.js → chunk-OBYFBPPO.js} +0 -2
  46. package/dist/chunk-OO3YXM72.js +1 -0
  47. package/dist/chunk-P3BPRVO6.cjs +22 -0
  48. package/dist/chunk-QE3WGMAP.js +1 -0
  49. package/dist/{chunk-P4BOYWXT.js → chunk-REW4ZSBN.js} +522 -507
  50. package/dist/{chunk-22K72CJ5.cjs → chunk-RF6RSWD4.cjs} +0 -2
  51. package/dist/{chunk-7QVYU63E.js → chunk-SHUYVCID.js} +0 -2
  52. package/dist/chunk-SMNKPH4T.js +1 -0
  53. package/dist/{chunk-PK6SKIKE.cjs → chunk-USNT2KNT.cjs} +0 -2
  54. package/dist/chunk-V3MLQDZQ.js +1 -0
  55. package/dist/{chunk-YFP5GQWW.js → chunk-VBAXXI72.js} +1 -3
  56. package/dist/{chunk-NVNMK4CE.js → chunk-VIRLWSS6.js} +2 -4
  57. package/dist/{chunk-SIZKRND7.js → chunk-W5X3ZEZ5.js} +0 -2
  58. package/dist/{chunk-LO77RPRV.js → chunk-WJ4CZKXY.js} +0 -2
  59. package/dist/chunk-WWJBVH7C.cjs +17 -0
  60. package/dist/chunk-XLRMX2NL.cjs +10 -0
  61. package/dist/{chunk-YIWHO6SW.cjs → chunk-XP7OML7S.cjs} +0 -2
  62. package/dist/chunk-XVLT2RQ2.js +1 -0
  63. package/dist/{chunk-UFEM5JTE.cjs → chunk-XWSGD2C3.cjs} +4 -6
  64. package/dist/chunk-YRJ4MLVL.cjs +2 -0
  65. package/dist/{chunk-5A5AK6JI.js → chunk-YWJMO2CR.js} +3 -5
  66. package/dist/chunk-ZC43PZXS.cjs +2 -0
  67. package/dist/{chunk-N2RUZCWA.js → chunk-ZCO7TMWP.js} +1 -3
  68. package/dist/{chunk-PJRHRDLS.cjs → chunk-ZJSWJ27U.cjs} +591 -578
  69. package/dist/config.cjs +11 -0
  70. package/dist/{define-config.d.cts → config.d.cts} +4 -4
  71. package/dist/{define-config.d.ts → config.d.ts} +4 -4
  72. package/dist/config.js +2 -0
  73. package/dist/esbuild.cjs +11 -13
  74. package/dist/esbuild.d.cts +4 -4
  75. package/dist/esbuild.d.ts +4 -4
  76. package/dist/esbuild.js +8 -10
  77. package/dist/farm.cjs +7 -9
  78. package/dist/farm.d.cts +4 -4
  79. package/dist/farm.d.ts +4 -4
  80. package/dist/farm.js +6 -8
  81. package/dist/{hooks-q1Az_C64.d.ts → hooks-ByM-4_UN.d.ts} +1 -1
  82. package/dist/{hooks-Wrj1dKJ9.d.cts → hooks-DcH9z5L5.d.cts} +1 -1
  83. package/dist/index.cjs +43 -51
  84. package/dist/index.d.cts +11 -12
  85. package/dist/index.d.ts +11 -12
  86. package/dist/index.js +31 -35
  87. package/dist/lib/build/esbuild.cjs +6 -8
  88. package/dist/lib/build/esbuild.d.cts +3 -2
  89. package/dist/lib/build/esbuild.d.ts +3 -2
  90. package/dist/lib/build/esbuild.js +3 -5
  91. package/dist/lib/build/index.cjs +27 -29
  92. package/dist/lib/build/index.d.cts +4 -3
  93. package/dist/lib/build/index.d.ts +4 -3
  94. package/dist/lib/build/index.js +11 -13
  95. package/dist/lib/build/rolldown.cjs +4 -6
  96. package/dist/lib/build/rolldown.d.cts +3 -2
  97. package/dist/lib/build/rolldown.d.ts +3 -2
  98. package/dist/lib/build/rolldown.js +3 -5
  99. package/dist/lib/build/rollup.cjs +4 -6
  100. package/dist/lib/build/rollup.d.cts +3 -2
  101. package/dist/lib/build/rollup.d.ts +3 -2
  102. package/dist/lib/build/rollup.js +2 -4
  103. package/dist/lib/build/rspack.cjs +3 -5
  104. package/dist/lib/build/rspack.d.cts +3 -2
  105. package/dist/lib/build/rspack.d.ts +3 -2
  106. package/dist/lib/build/rspack.js +2 -4
  107. package/dist/lib/build/tsup.cjs +7 -9
  108. package/dist/lib/build/tsup.d.cts +3 -2
  109. package/dist/lib/build/tsup.d.ts +3 -2
  110. package/dist/lib/build/tsup.js +4 -6
  111. package/dist/lib/build/unbuild.cjs +7 -9
  112. package/dist/lib/build/unbuild.d.cts +4 -3
  113. package/dist/lib/build/unbuild.d.ts +4 -3
  114. package/dist/lib/build/unbuild.js +4 -6
  115. package/dist/lib/build/vite.cjs +6 -8
  116. package/dist/lib/build/vite.d.cts +3 -2
  117. package/dist/lib/build/vite.d.ts +3 -2
  118. package/dist/lib/build/vite.js +4 -6
  119. package/dist/lib/build/webpack.cjs +3 -5
  120. package/dist/lib/build/webpack.d.cts +3 -2
  121. package/dist/lib/build/webpack.d.ts +3 -2
  122. package/dist/lib/build/webpack.js +2 -4
  123. package/dist/lib/{chunk-RQICHHZM.cjs → chunk-2NZADVP5.cjs} +2 -4
  124. package/dist/lib/{chunk-UQJWVRRE.cjs → chunk-3OCI4TH7.cjs} +4 -6
  125. package/dist/lib/{chunk-MFC7UJHT.cjs → chunk-4NHFXDTQ.cjs} +3 -5
  126. package/dist/lib/{chunk-LBMMBFQE.js → chunk-4ZOJG7G7.js} +20 -10
  127. package/dist/lib/{chunk-V2T4H24I.js → chunk-54XNJQTH.js} +1 -3
  128. package/dist/lib/{chunk-JTUL3477.cjs → chunk-5EXW3ZRC.cjs} +3 -5
  129. package/dist/lib/{chunk-LEIOWD2W.js → chunk-633SP5HS.js} +2 -4
  130. package/dist/lib/{chunk-YVDJCVE5.cjs → chunk-67IBLMW6.cjs} +10 -12
  131. package/dist/lib/{chunk-3I2YOM2E.js → chunk-6BEYR6PG.js} +4 -7
  132. package/dist/lib/{chunk-GWYTWFZE.cjs → chunk-6G7CP6RO.cjs} +4 -6
  133. package/dist/lib/{chunk-MAHHHINV.js → chunk-6RLV3FIS.js} +2 -4
  134. package/dist/lib/{chunk-MVQSM5WM.cjs → chunk-7JTHFA7I.cjs} +23 -13
  135. package/dist/lib/{chunk-7EAV6Q7B.cjs → chunk-7K7JH3DF.cjs} +2 -4
  136. package/dist/lib/{chunk-VJN72T2O.js → chunk-7OHD3BD4.js} +1 -3
  137. package/dist/lib/{chunk-Q3KJZ3B5.js → chunk-7Y5MJRWF.js} +8 -10
  138. package/dist/lib/{chunk-Q2L3FNJO.js → chunk-ADKYAHF5.js} +2 -4
  139. package/dist/lib/{chunk-XZD7S5TU.cjs → chunk-AOKLB4V2.cjs} +2 -4
  140. package/dist/lib/{chunk-LJZEN4HP.cjs → chunk-BQU53ZNB.cjs} +7 -9
  141. package/dist/lib/{chunk-6IJTWIVJ.cjs → chunk-CGYAL3S2.cjs} +3 -5
  142. package/dist/lib/{chunk-ESYYL5UH.js → chunk-CXRSMYEX.js} +1 -3
  143. package/dist/lib/{chunk-7LLECRBP.cjs → chunk-DQ5JBYIN.cjs} +6 -8
  144. package/dist/lib/chunk-EJ25PQEL.cjs +2 -0
  145. package/dist/lib/{chunk-35EO5Y7R.js → chunk-ENRLU4UR.js} +1 -3
  146. package/dist/lib/{chunk-KSBESEOF.js → chunk-EQKS6CLU.js} +2 -4
  147. package/dist/lib/{chunk-V5OY4ALI.cjs → chunk-F7IDAYLH.cjs} +2 -4
  148. package/dist/lib/{chunk-5PNLONNN.cjs → chunk-FOC3UTXQ.cjs} +4 -6
  149. package/dist/lib/{chunk-7R23HVGQ.js → chunk-GANVMM73.js} +1 -3
  150. package/dist/lib/{chunk-KOCDKJDJ.js → chunk-GRJJZ5VJ.js} +1 -3
  151. package/dist/lib/chunk-H5JWMXTZ.js +1 -0
  152. package/dist/lib/{chunk-62ZJYXT3.cjs → chunk-H7A5QVLY.cjs} +5 -7
  153. package/dist/lib/chunk-HMO3LAYL.js +1 -0
  154. package/dist/lib/{chunk-RLMEYZ5I.cjs → chunk-IBPA3VN5.cjs} +15 -17
  155. package/dist/lib/{chunk-6BRTJXZ2.js → chunk-IPOD734M.js} +324 -221
  156. package/dist/lib/{chunk-LYD5OTBI.cjs → chunk-ISLUSDCG.cjs} +422 -319
  157. package/dist/lib/{chunk-632PWWU7.cjs → chunk-JA4HSQRN.cjs} +3 -5
  158. package/dist/lib/{chunk-IK3ABDPP.cjs → chunk-JG4IL7XL.cjs} +2 -4
  159. package/dist/lib/{chunk-OF5IJ4WG.js → chunk-JU4J5H6E.js} +2 -4
  160. package/dist/lib/{chunk-LTVWU4J2.js → chunk-KXCEN6Y4.js} +1 -3
  161. package/dist/lib/{chunk-W4OMKQ7W.cjs → chunk-LJ4WO7TW.cjs} +5 -7
  162. package/dist/lib/{chunk-BEKLDCTV.cjs → chunk-LPKZKRBW.cjs} +26 -14
  163. package/dist/lib/{chunk-PXSRMP4E.js → chunk-M263EZ4F.js} +1 -3
  164. package/dist/lib/{chunk-4XUVP2LL.cjs → chunk-MZJWK36Q.cjs} +2 -4
  165. package/dist/lib/{chunk-367E23MI.js → chunk-NDYKRNPQ.js} +1 -3
  166. package/dist/lib/{chunk-NE46WXNJ.js → chunk-NST5TNW6.js} +1 -3
  167. package/dist/lib/{chunk-ODJBZ6PS.js → chunk-NUDYDRYO.js} +3 -5
  168. package/dist/lib/{chunk-RXQWNSZX.js → chunk-NWAD7K4D.js} +1 -3
  169. package/dist/lib/{chunk-STAKGAWR.js → chunk-NZLZLQX2.js} +19 -7
  170. package/dist/lib/{chunk-GJNFAFKR.cjs → chunk-P3ZIYYSC.cjs} +6 -9
  171. package/dist/lib/{chunk-CAPN4FSS.js → chunk-Q3ERHHXJ.js} +3 -5
  172. package/dist/lib/chunk-RJ4277VZ.cjs +2 -0
  173. package/dist/lib/{chunk-7QVYU63E.js → chunk-SHUYVCID.js} +0 -2
  174. package/dist/lib/{chunk-YF3YHK4X.js → chunk-SYHVP3OW.js} +1 -3
  175. package/dist/lib/{chunk-NANLYIUO.cjs → chunk-T6KEXFRH.cjs} +8 -10
  176. package/dist/lib/{chunk-HQ6TGY34.js → chunk-TANQDHYY.js} +1 -3
  177. package/dist/lib/{chunk-BW3VFCTS.cjs → chunk-TNHDC2ZQ.cjs} +7 -9
  178. package/dist/lib/{chunk-ZP7PDTVE.cjs → chunk-UDJ37BEE.cjs} +17 -19
  179. package/dist/lib/{chunk-PK6SKIKE.cjs → chunk-USNT2KNT.cjs} +0 -2
  180. package/dist/lib/{chunk-U36VZLW6.cjs → chunk-VQ7CXQLT.cjs} +10 -12
  181. package/dist/lib/chunk-VVSEE3JE.cjs +2 -0
  182. package/dist/lib/{chunk-YBIWVB66.js → chunk-WFUO3YPK.js} +1 -3
  183. package/dist/lib/{chunk-MGEZC2RV.cjs → chunk-XW5TELHB.cjs} +6 -8
  184. package/dist/lib/{chunk-OO4BIM7N.js → chunk-YOENMDZY.js} +1 -3
  185. package/dist/lib/chunk-ZBLDAREE.js +1 -0
  186. package/dist/lib/{chunk-56LQSSQ3.js → chunk-ZPIKFR7Z.js} +4 -6
  187. package/dist/lib/{config-Ro14HmyO.d.cts → config-AKuoTngV.d.cts} +57 -13
  188. package/dist/lib/{config-DnifzkPt.d.ts → config-BxVBOnAV.d.ts} +57 -13
  189. package/dist/lib/config-file.cjs +4 -6
  190. package/dist/lib/config-file.d.cts +7 -5
  191. package/dist/lib/config-file.d.ts +7 -5
  192. package/dist/lib/config-file.js +2 -4
  193. package/dist/lib/create-program.cjs +3 -5
  194. package/dist/lib/create-program.d.cts +3 -2
  195. package/dist/lib/create-program.d.ts +3 -2
  196. package/dist/lib/create-program.js +2 -4
  197. package/dist/lib/entry.cjs +10 -12
  198. package/dist/lib/entry.d.cts +3 -2
  199. package/dist/lib/entry.d.ts +3 -2
  200. package/dist/lib/entry.js +2 -4
  201. package/dist/lib/{hooks-B6Ow5MtE.d.ts → hooks-BKZwFaZD.d.ts} +1 -1
  202. package/dist/lib/{hooks-CM-BbMzz.d.cts → hooks-D3P6aPKT.d.cts} +1 -1
  203. package/dist/lib/index.cjs +74 -129
  204. package/dist/lib/index.d.cts +13 -15
  205. package/dist/lib/index.d.ts +13 -15
  206. package/dist/lib/index.js +25 -28
  207. package/dist/lib/logger.cjs +4 -6
  208. package/dist/lib/logger.d.cts +4 -4
  209. package/dist/lib/logger.d.ts +4 -4
  210. package/dist/lib/logger.js +2 -4
  211. package/dist/lib/typescript/compiler-host.cjs +21 -23
  212. package/dist/lib/typescript/compiler-host.d.cts +4 -5
  213. package/dist/lib/typescript/compiler-host.d.ts +4 -5
  214. package/dist/lib/typescript/compiler-host.js +3 -5
  215. package/dist/lib/typescript/import-transformer.cjs +4 -6
  216. package/dist/lib/typescript/import-transformer.d.cts +3 -2
  217. package/dist/lib/typescript/import-transformer.d.ts +3 -2
  218. package/dist/lib/typescript/import-transformer.js +1 -3
  219. package/dist/lib/typescript/index.cjs +17 -19
  220. package/dist/lib/typescript/index.d.cts +5 -4
  221. package/dist/lib/typescript/index.d.ts +5 -4
  222. package/dist/lib/typescript/index.js +5 -7
  223. package/dist/lib/typescript/isolated-decl.cjs +3 -5
  224. package/dist/lib/typescript/isolated-decl.d.cts +1 -2
  225. package/dist/lib/typescript/isolated-decl.d.ts +1 -2
  226. package/dist/lib/typescript/isolated-decl.js +2 -4
  227. package/dist/lib/typescript/program.cjs +7 -9
  228. package/dist/lib/typescript/program.d.cts +4 -5
  229. package/dist/lib/typescript/program.d.ts +4 -5
  230. package/dist/lib/typescript/program.js +2 -4
  231. package/dist/lib/typescript/tsconfig.cjs +8 -10
  232. package/dist/lib/typescript/tsconfig.js +2 -4
  233. package/dist/lib/unplugin/factory.cjs +12 -15
  234. package/dist/lib/unplugin/factory.d.cts +10 -9
  235. package/dist/lib/unplugin/factory.d.ts +10 -9
  236. package/dist/lib/unplugin/factory.js +11 -14
  237. package/dist/lib/unplugin/index.cjs +16 -19
  238. package/dist/lib/unplugin/index.d.cts +6 -5
  239. package/dist/lib/unplugin/index.d.ts +6 -5
  240. package/dist/lib/unplugin/index.js +13 -16
  241. package/dist/lib/unplugin/plugin.cjs +6 -8
  242. package/dist/lib/unplugin/plugin.d.cts +4 -4
  243. package/dist/lib/unplugin/plugin.d.ts +4 -4
  244. package/dist/lib/unplugin/plugin.js +5 -7
  245. package/dist/lib/unplugin/resolve-id.cjs +3 -5
  246. package/dist/lib/unplugin/resolve-id.d.cts +4 -5
  247. package/dist/lib/unplugin/resolve-id.d.ts +4 -5
  248. package/dist/lib/unplugin/resolve-id.js +2 -4
  249. package/dist/lib/utilities/bundle.cjs +6 -8
  250. package/dist/lib/utilities/bundle.d.cts +3 -2
  251. package/dist/lib/utilities/bundle.d.ts +3 -2
  252. package/dist/lib/utilities/bundle.js +5 -7
  253. package/dist/lib/utilities/cache.cjs +5 -7
  254. package/dist/lib/utilities/cache.d.cts +32 -1
  255. package/dist/lib/utilities/cache.d.ts +32 -1
  256. package/dist/lib/utilities/cache.js +3 -5
  257. package/dist/lib/utilities/file-header.cjs +4 -6
  258. package/dist/lib/utilities/file-header.d.cts +4 -4
  259. package/dist/lib/utilities/file-header.d.ts +4 -4
  260. package/dist/lib/utilities/file-header.js +2 -4
  261. package/dist/lib/utilities/index.cjs +36 -91
  262. package/dist/lib/utilities/index.d.cts +6 -8
  263. package/dist/lib/utilities/index.d.ts +6 -8
  264. package/dist/lib/utilities/index.js +15 -18
  265. package/dist/lib/utilities/meta.cjs +9 -11
  266. package/dist/lib/utilities/meta.d.cts +4 -4
  267. package/dist/lib/utilities/meta.d.ts +4 -4
  268. package/dist/lib/utilities/meta.js +2 -4
  269. package/dist/lib/utilities/resolve-path.cjs +3 -5
  270. package/dist/lib/utilities/resolve-path.d.cts +3 -2
  271. package/dist/lib/utilities/resolve-path.d.ts +3 -2
  272. package/dist/lib/utilities/resolve-path.js +2 -4
  273. package/dist/lib/utilities/resolve.cjs +7 -9
  274. package/dist/lib/utilities/resolve.d.cts +3 -2
  275. package/dist/lib/utilities/resolve.d.ts +3 -2
  276. package/dist/lib/utilities/resolve.js +6 -8
  277. package/dist/lib/utilities/source-file.cjs +5 -7
  278. package/dist/lib/utilities/source-file.d.cts +31 -1
  279. package/dist/lib/utilities/source-file.d.ts +31 -1
  280. package/dist/lib/utilities/source-file.js +2 -4
  281. package/dist/lib/utilities/source-map.cjs +3 -5
  282. package/dist/lib/utilities/source-map.d.cts +33 -2
  283. package/dist/lib/utilities/source-map.d.ts +33 -2
  284. package/dist/lib/utilities/source-map.js +2 -4
  285. package/dist/lib/utilities/worker.cjs +5 -7
  286. package/dist/lib/utilities/worker.d.cts +4 -4
  287. package/dist/lib/utilities/worker.d.ts +4 -4
  288. package/dist/lib/utilities/worker.js +3 -5
  289. package/dist/lib/utilities/write-file.cjs +3 -5
  290. package/dist/lib/utilities/write-file.d.cts +3 -2
  291. package/dist/lib/utilities/write-file.d.ts +3 -2
  292. package/dist/lib/utilities/write-file.js +2 -4
  293. package/dist/next.cjs +11 -13
  294. package/dist/next.js +8 -10
  295. package/dist/nuxt.cjs +13 -15
  296. package/dist/nuxt.js +10 -12
  297. package/dist/{chunk-KMLFL4CW.js → plugin-utils/chunk-3G5FJKN2.js} +1 -3
  298. package/dist/plugin-utils/chunk-HHFA3IEZ.js +51 -0
  299. package/dist/{chunk-4AKYOJXA.cjs → plugin-utils/chunk-MIKPJJNG.cjs} +2 -4
  300. package/dist/{lib/chunk-RK2VVGL6.cjs → plugin-utils/chunk-MQOW6ENT.cjs} +15 -17
  301. package/dist/{lib/chunk-UGRFAVAJ.js → plugin-utils/chunk-PK6PYFWY.js} +2 -4
  302. package/dist/plugin-utils/chunk-SHUYVCID.js +4 -0
  303. package/dist/plugin-utils/chunk-USNT2KNT.cjs +6 -0
  304. package/dist/plugin-utils/chunk-YKIS7BLU.cjs +53 -0
  305. package/dist/plugin-utils/config-ClPkPCYC.d.cts +1309 -0
  306. package/dist/plugin-utils/config-ClPkPCYC.d.ts +1309 -0
  307. package/dist/plugin-utils/extend.cjs +11 -0
  308. package/dist/{extend-plugin.d.ts → plugin-utils/extend.d.cts} +6 -23
  309. package/dist/{extend-plugin.d.cts → plugin-utils/extend.d.ts} +6 -23
  310. package/dist/plugin-utils/extend.js +2 -0
  311. package/dist/plugin-utils/get-config-path.cjs +11 -0
  312. package/dist/plugin-utils/get-config-path.d.cts +32 -0
  313. package/dist/plugin-utils/get-config-path.d.ts +32 -0
  314. package/dist/plugin-utils/get-config-path.js +2 -0
  315. package/dist/{lib/utilities/plugin-helpers.cjs → plugin-utils/helpers.cjs} +15 -17
  316. package/dist/{lib/utilities/plugin-helpers.d.ts → plugin-utils/helpers.d.cts} +13 -14
  317. package/dist/{lib/utilities/plugin-helpers.d.cts → plugin-utils/helpers.d.ts} +13 -14
  318. package/dist/{lib/utilities/plugin-helpers.js → plugin-utils/helpers.js} +2 -4
  319. package/dist/plugin-utils/index.cjs +69 -0
  320. package/dist/plugin-utils/index.d.cts +24 -0
  321. package/dist/plugin-utils/index.d.ts +24 -0
  322. package/dist/plugin-utils/index.js +4 -0
  323. package/dist/{resolved-DtY60yLh.d.cts → resolved-CugLn_3B.d.cts} +52 -251
  324. package/dist/{resolved-wPXZS7aW.d.ts → resolved-DnI1mqEb.d.ts} +52 -251
  325. package/dist/rolldown.cjs +10 -12
  326. package/dist/rolldown.d.cts +4 -4
  327. package/dist/rolldown.d.ts +4 -4
  328. package/dist/rolldown.js +7 -9
  329. package/dist/rollup.cjs +10 -12
  330. package/dist/rollup.d.cts +4 -4
  331. package/dist/rollup.d.ts +4 -4
  332. package/dist/rollup.js +7 -9
  333. package/dist/rspack.cjs +10 -12
  334. package/dist/rspack.d.cts +4 -4
  335. package/dist/rspack.d.ts +4 -4
  336. package/dist/rspack.js +7 -9
  337. package/dist/tsup.cjs +12 -14
  338. package/dist/tsup.js +9 -11
  339. package/dist/types/babel.cjs +1 -3
  340. package/dist/types/babel.d.cts +4 -4
  341. package/dist/types/babel.d.ts +4 -4
  342. package/dist/types/babel.js +1 -3
  343. package/dist/types/build.cjs +1 -3
  344. package/dist/types/build.d.cts +4 -29
  345. package/dist/types/build.d.ts +4 -29
  346. package/dist/types/build.js +1 -3
  347. package/dist/types/commands.cjs +3 -5
  348. package/dist/types/commands.d.cts +3 -3
  349. package/dist/types/commands.d.ts +3 -3
  350. package/dist/types/commands.js +2 -4
  351. package/dist/types/config.cjs +1 -3
  352. package/dist/types/config.d.cts +3 -3
  353. package/dist/types/config.d.ts +3 -3
  354. package/dist/types/config.js +1 -3
  355. package/dist/types/context.cjs +3 -5
  356. package/dist/types/context.d.cts +3 -3
  357. package/dist/types/context.d.ts +3 -3
  358. package/dist/types/context.js +2 -4
  359. package/dist/types/hooks.cjs +1 -3
  360. package/dist/types/hooks.d.cts +4 -4
  361. package/dist/types/hooks.d.ts +4 -4
  362. package/dist/types/hooks.js +1 -3
  363. package/dist/types/index.cjs +23 -26
  364. package/dist/types/index.d.cts +8 -8
  365. package/dist/types/index.d.ts +8 -8
  366. package/dist/types/index.js +14 -17
  367. package/dist/types/internal.cjs +0 -2
  368. package/dist/types/internal.d.cts +6 -8
  369. package/dist/types/internal.d.ts +6 -8
  370. package/dist/types/internal.js +0 -2
  371. package/dist/types/plugin.cjs +3 -5
  372. package/dist/types/plugin.d.cts +3 -3
  373. package/dist/types/plugin.d.ts +3 -3
  374. package/dist/types/plugin.js +2 -4
  375. package/dist/types/resolved.cjs +1 -3
  376. package/dist/types/resolved.d.cts +4 -4
  377. package/dist/types/resolved.d.ts +4 -4
  378. package/dist/types/resolved.js +1 -3
  379. package/dist/types/tsconfig.cjs +1 -3
  380. package/dist/types/tsconfig.d.cts +1 -8
  381. package/dist/types/tsconfig.d.ts +1 -8
  382. package/dist/types/tsconfig.js +1 -3
  383. package/dist/types/typedoc.cjs +1 -3
  384. package/dist/types/typedoc.d.cts +1 -3
  385. package/dist/types/typedoc.d.ts +1 -3
  386. package/dist/types/typedoc.js +1 -3
  387. package/dist/types/unplugin.cjs +1 -3
  388. package/dist/types/unplugin.d.cts +5 -8
  389. package/dist/types/unplugin.d.ts +5 -8
  390. package/dist/types/unplugin.js +1 -3
  391. package/dist/types/vfs.cjs +8 -10
  392. package/dist/types/vfs.d.cts +1 -14
  393. package/dist/types/vfs.d.ts +1 -14
  394. package/dist/types/vfs.js +2 -4
  395. package/dist/unloader.cjs +10 -12
  396. package/dist/unloader.d.cts +4 -4
  397. package/dist/unloader.d.ts +4 -4
  398. package/dist/unloader.js +7 -9
  399. package/dist/unplugin.cjs +22 -24
  400. package/dist/unplugin.d.cts +6 -6
  401. package/dist/unplugin.d.ts +6 -6
  402. package/dist/unplugin.js +19 -21
  403. package/dist/vite.cjs +11 -13
  404. package/dist/vite.d.cts +4 -4
  405. package/dist/vite.d.ts +4 -4
  406. package/dist/vite.js +8 -10
  407. package/dist/webpack.cjs +10 -12
  408. package/dist/webpack.d.cts +4 -4
  409. package/dist/webpack.d.ts +4 -4
  410. package/dist/webpack.js +7 -9
  411. package/package.json +59 -54
  412. package/dist/chunk-2VIXD2XB.js +0 -3
  413. package/dist/chunk-3IM6CTCB.cjs +0 -12
  414. package/dist/chunk-4FZTGBHW.cjs +0 -12
  415. package/dist/chunk-4JCNAKOE.cjs +0 -4
  416. package/dist/chunk-6ZGIV2SU.cjs +0 -4
  417. package/dist/chunk-7BZQBW77.cjs +0 -4
  418. package/dist/chunk-AFJCY3R6.js +0 -3
  419. package/dist/chunk-AXIRZAL7.js +0 -3
  420. package/dist/chunk-DFLNRC3B.cjs +0 -4
  421. package/dist/chunk-DS7OM4NX.cjs +0 -4
  422. package/dist/chunk-DURCSSLV.js +0 -3
  423. package/dist/chunk-GC3BRYAK.cjs +0 -13
  424. package/dist/chunk-GIE6OE3X.js +0 -3
  425. package/dist/chunk-HJW7OH6E.js +0 -3
  426. package/dist/chunk-IHUNA3MO.cjs +0 -4
  427. package/dist/chunk-OYASPHNL.js +0 -3
  428. package/dist/chunk-Q7EJVZVI.cjs +0 -4
  429. package/dist/chunk-RIOZPUCZ.cjs +0 -34
  430. package/dist/chunk-TLHFXGYV.js +0 -3
  431. package/dist/chunk-TLRPAJU2.cjs +0 -12
  432. package/dist/chunk-TSWMWZ4U.cjs +0 -12
  433. package/dist/chunk-VNRXLY2T.js +0 -3
  434. package/dist/chunk-VQCQRLGM.cjs +0 -4
  435. package/dist/chunk-XBF43VLE.cjs +0 -4
  436. package/dist/chunk-XZO6ZJQP.cjs +0 -4
  437. package/dist/chunk-Y5CDUGSN.cjs +0 -12
  438. package/dist/chunk-YQXNZNGK.js +0 -31
  439. package/dist/chunk-YTOIG4CV.cjs +0 -24
  440. package/dist/chunk-YZCTXGFH.js +0 -11
  441. package/dist/chunk-Z5H7LD6W.js +0 -3
  442. package/dist/chunk-ZEJHPSLK.cjs +0 -19
  443. package/dist/define-config.cjs +0 -13
  444. package/dist/define-config.js +0 -4
  445. package/dist/extend-plugin.cjs +0 -13
  446. package/dist/extend-plugin.js +0 -4
  447. package/dist/internal/api.cjs +0 -16
  448. package/dist/internal/api.cjs.map +0 -1
  449. package/dist/internal/api.js +0 -7
  450. package/dist/internal/api.js.map +0 -1
  451. package/dist/lib/build/esbuild.cjs.map +0 -1
  452. package/dist/lib/build/esbuild.js.map +0 -1
  453. package/dist/lib/build/index.cjs.map +0 -1
  454. package/dist/lib/build/index.js.map +0 -1
  455. package/dist/lib/build/rolldown.cjs.map +0 -1
  456. package/dist/lib/build/rolldown.js.map +0 -1
  457. package/dist/lib/build/rollup.cjs.map +0 -1
  458. package/dist/lib/build/rollup.js.map +0 -1
  459. package/dist/lib/build/rspack.cjs.map +0 -1
  460. package/dist/lib/build/rspack.js.map +0 -1
  461. package/dist/lib/build/tsup.cjs.map +0 -1
  462. package/dist/lib/build/tsup.js.map +0 -1
  463. package/dist/lib/build/unbuild.cjs.map +0 -1
  464. package/dist/lib/build/unbuild.js.map +0 -1
  465. package/dist/lib/build/vite.cjs.map +0 -1
  466. package/dist/lib/build/vite.js.map +0 -1
  467. package/dist/lib/build/webpack.cjs.map +0 -1
  468. package/dist/lib/build/webpack.js.map +0 -1
  469. package/dist/lib/chunk-35EO5Y7R.js.map +0 -1
  470. package/dist/lib/chunk-367E23MI.js.map +0 -1
  471. package/dist/lib/chunk-3GMJQ5G3.cjs +0 -4
  472. package/dist/lib/chunk-3GMJQ5G3.cjs.map +0 -1
  473. package/dist/lib/chunk-3I2YOM2E.js.map +0 -1
  474. package/dist/lib/chunk-4BPHC6QQ.js +0 -3
  475. package/dist/lib/chunk-4BPHC6QQ.js.map +0 -1
  476. package/dist/lib/chunk-4XUVP2LL.cjs.map +0 -1
  477. package/dist/lib/chunk-56LQSSQ3.js.map +0 -1
  478. package/dist/lib/chunk-5PNLONNN.cjs.map +0 -1
  479. package/dist/lib/chunk-62ZJYXT3.cjs.map +0 -1
  480. package/dist/lib/chunk-632PWWU7.cjs.map +0 -1
  481. package/dist/lib/chunk-6BRTJXZ2.js.map +0 -1
  482. package/dist/lib/chunk-6IJTWIVJ.cjs.map +0 -1
  483. package/dist/lib/chunk-7EAV6Q7B.cjs.map +0 -1
  484. package/dist/lib/chunk-7LLECRBP.cjs.map +0 -1
  485. package/dist/lib/chunk-7QVYU63E.js.map +0 -1
  486. package/dist/lib/chunk-7R23HVGQ.js.map +0 -1
  487. package/dist/lib/chunk-BEKLDCTV.cjs.map +0 -1
  488. package/dist/lib/chunk-BW3VFCTS.cjs.map +0 -1
  489. package/dist/lib/chunk-CAPN4FSS.js.map +0 -1
  490. package/dist/lib/chunk-ESYYL5UH.js.map +0 -1
  491. package/dist/lib/chunk-GJNFAFKR.cjs.map +0 -1
  492. package/dist/lib/chunk-GWYTWFZE.cjs.map +0 -1
  493. package/dist/lib/chunk-HJWJNSSZ.js +0 -3
  494. package/dist/lib/chunk-HJWJNSSZ.js.map +0 -1
  495. package/dist/lib/chunk-HQ6TGY34.js.map +0 -1
  496. package/dist/lib/chunk-IK3ABDPP.cjs.map +0 -1
  497. package/dist/lib/chunk-JTUL3477.cjs.map +0 -1
  498. package/dist/lib/chunk-KOCDKJDJ.js.map +0 -1
  499. package/dist/lib/chunk-KSBESEOF.js.map +0 -1
  500. package/dist/lib/chunk-LBMMBFQE.js.map +0 -1
  501. package/dist/lib/chunk-LEIOWD2W.js.map +0 -1
  502. package/dist/lib/chunk-LJZEN4HP.cjs.map +0 -1
  503. package/dist/lib/chunk-LTVWU4J2.js.map +0 -1
  504. package/dist/lib/chunk-LYD5OTBI.cjs.map +0 -1
  505. package/dist/lib/chunk-MAHHHINV.js.map +0 -1
  506. package/dist/lib/chunk-MFC7UJHT.cjs.map +0 -1
  507. package/dist/lib/chunk-MGEZC2RV.cjs.map +0 -1
  508. package/dist/lib/chunk-MVQSM5WM.cjs.map +0 -1
  509. package/dist/lib/chunk-NANLYIUO.cjs.map +0 -1
  510. package/dist/lib/chunk-NE46WXNJ.js.map +0 -1
  511. package/dist/lib/chunk-ODJBZ6PS.js.map +0 -1
  512. package/dist/lib/chunk-OF5IJ4WG.js.map +0 -1
  513. package/dist/lib/chunk-OO4BIM7N.js.map +0 -1
  514. package/dist/lib/chunk-PEZXLKQD.cjs +0 -4
  515. package/dist/lib/chunk-PEZXLKQD.cjs.map +0 -1
  516. package/dist/lib/chunk-PK6SKIKE.cjs.map +0 -1
  517. package/dist/lib/chunk-PXSRMP4E.js.map +0 -1
  518. package/dist/lib/chunk-Q2L3FNJO.js.map +0 -1
  519. package/dist/lib/chunk-Q3KJZ3B5.js.map +0 -1
  520. package/dist/lib/chunk-RK2VVGL6.cjs.map +0 -1
  521. package/dist/lib/chunk-RLMEYZ5I.cjs.map +0 -1
  522. package/dist/lib/chunk-RQICHHZM.cjs.map +0 -1
  523. package/dist/lib/chunk-RXQWNSZX.js.map +0 -1
  524. package/dist/lib/chunk-STAKGAWR.js.map +0 -1
  525. package/dist/lib/chunk-U36VZLW6.cjs.map +0 -1
  526. package/dist/lib/chunk-UGRFAVAJ.js.map +0 -1
  527. package/dist/lib/chunk-UQJWVRRE.cjs.map +0 -1
  528. package/dist/lib/chunk-V2T4H24I.js.map +0 -1
  529. package/dist/lib/chunk-V5OY4ALI.cjs.map +0 -1
  530. package/dist/lib/chunk-VJN72T2O.js.map +0 -1
  531. package/dist/lib/chunk-W4OMKQ7W.cjs.map +0 -1
  532. package/dist/lib/chunk-XGH6JWRO.js +0 -3
  533. package/dist/lib/chunk-XGH6JWRO.js.map +0 -1
  534. package/dist/lib/chunk-XQMVE2NH.cjs +0 -4
  535. package/dist/lib/chunk-XQMVE2NH.cjs.map +0 -1
  536. package/dist/lib/chunk-XZD7S5TU.cjs.map +0 -1
  537. package/dist/lib/chunk-YBIWVB66.js.map +0 -1
  538. package/dist/lib/chunk-YF3YHK4X.js.map +0 -1
  539. package/dist/lib/chunk-YVDJCVE5.cjs.map +0 -1
  540. package/dist/lib/chunk-ZP7PDTVE.cjs.map +0 -1
  541. package/dist/lib/compiler-CuQLTmTB.d.cts +0 -32
  542. package/dist/lib/compiler-CuQLTmTB.d.ts +0 -32
  543. package/dist/lib/config-file.cjs.map +0 -1
  544. package/dist/lib/config-file.js.map +0 -1
  545. package/dist/lib/create-program.cjs.map +0 -1
  546. package/dist/lib/create-program.js.map +0 -1
  547. package/dist/lib/entry.cjs.map +0 -1
  548. package/dist/lib/entry.js.map +0 -1
  549. package/dist/lib/index.cjs.map +0 -1
  550. package/dist/lib/index.js.map +0 -1
  551. package/dist/lib/logger.cjs.map +0 -1
  552. package/dist/lib/logger.js.map +0 -1
  553. package/dist/lib/typescript/compiler-host.cjs.map +0 -1
  554. package/dist/lib/typescript/compiler-host.js.map +0 -1
  555. package/dist/lib/typescript/import-transformer.cjs.map +0 -1
  556. package/dist/lib/typescript/import-transformer.js.map +0 -1
  557. package/dist/lib/typescript/index.cjs.map +0 -1
  558. package/dist/lib/typescript/index.js.map +0 -1
  559. package/dist/lib/typescript/isolated-decl.cjs.map +0 -1
  560. package/dist/lib/typescript/isolated-decl.js.map +0 -1
  561. package/dist/lib/typescript/program.cjs.map +0 -1
  562. package/dist/lib/typescript/program.js.map +0 -1
  563. package/dist/lib/typescript/tsconfig.cjs.map +0 -1
  564. package/dist/lib/typescript/tsconfig.js.map +0 -1
  565. package/dist/lib/unplugin/factory.cjs.map +0 -1
  566. package/dist/lib/unplugin/factory.js.map +0 -1
  567. package/dist/lib/unplugin/index.cjs.map +0 -1
  568. package/dist/lib/unplugin/index.js.map +0 -1
  569. package/dist/lib/unplugin/plugin.cjs.map +0 -1
  570. package/dist/lib/unplugin/plugin.js.map +0 -1
  571. package/dist/lib/unplugin/resolve-id.cjs.map +0 -1
  572. package/dist/lib/unplugin/resolve-id.js.map +0 -1
  573. package/dist/lib/utilities/bundle.cjs.map +0 -1
  574. package/dist/lib/utilities/bundle.js.map +0 -1
  575. package/dist/lib/utilities/cache.cjs.map +0 -1
  576. package/dist/lib/utilities/cache.js.map +0 -1
  577. package/dist/lib/utilities/file-header.cjs.map +0 -1
  578. package/dist/lib/utilities/file-header.js.map +0 -1
  579. package/dist/lib/utilities/index.cjs.map +0 -1
  580. package/dist/lib/utilities/index.js.map +0 -1
  581. package/dist/lib/utilities/meta.cjs.map +0 -1
  582. package/dist/lib/utilities/meta.js.map +0 -1
  583. package/dist/lib/utilities/plugin-helpers.cjs.map +0 -1
  584. package/dist/lib/utilities/plugin-helpers.js.map +0 -1
  585. package/dist/lib/utilities/resolve-path.cjs.map +0 -1
  586. package/dist/lib/utilities/resolve-path.js.map +0 -1
  587. package/dist/lib/utilities/resolve.cjs.map +0 -1
  588. package/dist/lib/utilities/resolve.js.map +0 -1
  589. package/dist/lib/utilities/source-file.cjs.map +0 -1
  590. package/dist/lib/utilities/source-file.js.map +0 -1
  591. package/dist/lib/utilities/source-map.cjs.map +0 -1
  592. package/dist/lib/utilities/source-map.js.map +0 -1
  593. package/dist/lib/utilities/worker.cjs.map +0 -1
  594. package/dist/lib/utilities/worker.js.map +0 -1
  595. package/dist/lib/utilities/write-file.cjs.map +0 -1
  596. package/dist/lib/utilities/write-file.js.map +0 -1
  597. package/dist/types/babel.cjs.map +0 -1
  598. package/dist/types/babel.js.map +0 -1
  599. package/dist/types/build.cjs.map +0 -1
  600. package/dist/types/build.js.map +0 -1
  601. package/dist/types/commands.cjs.map +0 -1
  602. package/dist/types/commands.js.map +0 -1
  603. package/dist/types/compiler.cjs +0 -6
  604. package/dist/types/compiler.cjs.map +0 -1
  605. package/dist/types/compiler.d.cts +0 -38
  606. package/dist/types/compiler.d.ts +0 -38
  607. package/dist/types/compiler.js +0 -3
  608. package/dist/types/compiler.js.map +0 -1
  609. package/dist/types/config.cjs.map +0 -1
  610. package/dist/types/config.js.map +0 -1
  611. package/dist/types/context.cjs.map +0 -1
  612. package/dist/types/context.js.map +0 -1
  613. package/dist/types/hooks.cjs.map +0 -1
  614. package/dist/types/hooks.js.map +0 -1
  615. package/dist/types/index.cjs.map +0 -1
  616. package/dist/types/index.js.map +0 -1
  617. package/dist/types/internal.cjs.map +0 -1
  618. package/dist/types/internal.js.map +0 -1
  619. package/dist/types/plugin.cjs.map +0 -1
  620. package/dist/types/plugin.js.map +0 -1
  621. package/dist/types/resolved.cjs.map +0 -1
  622. package/dist/types/resolved.js.map +0 -1
  623. package/dist/types/tsconfig.cjs.map +0 -1
  624. package/dist/types/tsconfig.js.map +0 -1
  625. package/dist/types/typedoc.cjs.map +0 -1
  626. package/dist/types/typedoc.js.map +0 -1
  627. package/dist/types/unplugin.cjs.map +0 -1
  628. package/dist/types/unplugin.js.map +0 -1
  629. package/dist/types/vfs.cjs.map +0 -1
  630. package/dist/types/vfs.js.map +0 -1
@@ -0,0 +1,1309 @@
1
+ import { Format } from '@storm-software/build-tools/types';
2
+ import { LogLevelLabel } from '@storm-software/config-tools/types';
3
+ import { StormWorkspaceConfig } from '@storm-software/config/types';
4
+ import { NonUndefined, MaybePromise, FunctionLike } from '@stryke/types/base';
5
+ import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
6
+ import { AssetGlob } from '@stryke/types/file';
7
+ import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
8
+ import { EnvPaths } from '@stryke/env/get-env-paths';
9
+ import { PackageJson } from '@stryke/types/package-json';
10
+ import { Jiti } from 'jiti';
11
+ import { ParserOptions, ParseResult } from 'oxc-parser';
12
+ import { Range } from 'semver';
13
+ import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginBuildContext, UnpluginContext } from 'unplugin';
14
+ import { ArrayValues } from '@stryke/types/array';
15
+ import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
16
+ import ts from 'typescript';
17
+ import { PrimitiveJsonValue } from '@stryke/json/types';
18
+ import { Volume } from 'memfs';
19
+ import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
20
+ import { IUnionFs } from 'unionfs';
21
+
22
+ type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
23
+ interface BuildConfig {
24
+ /**
25
+ * The platform to build the project for
26
+ *
27
+ * @defaultValue "neutral"
28
+ */
29
+ platform?: "node" | "browser" | "neutral";
30
+ /**
31
+ * The alias mappings to use for module resolution during the build process.
32
+ *
33
+ * @remarks
34
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * {
39
+ * alias: {
40
+ * "@utils": "./src/utils",
41
+ * "@components": "./src/components"
42
+ * }
43
+ * }
44
+ * ```
45
+ */
46
+ alias?: Record<string, string>;
47
+ /**
48
+ * A list of modules that should not be bundled, even if they are external dependencies.
49
+ *
50
+ * @remarks
51
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
52
+ */
53
+ external?: (string | RegExp)[];
54
+ /**
55
+ * A list of modules that should always be bundled, even if they are external dependencies.
56
+ */
57
+ noExternal?: (string | RegExp)[];
58
+ /**
59
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
60
+ */
61
+ skipNodeModulesBundle?: boolean;
62
+ /**
63
+ * Should the Powerlines processes skip the `"prepare"` task prior to building?
64
+ *
65
+ * @defaultValue false
66
+ */
67
+ skipPrepare?: boolean;
68
+ }
69
+ type BuildResolvedConfig = BuildConfig;
70
+
71
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
72
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
73
+
74
+ interface ResolvedEntryTypeDefinition extends TypeDefinition {
75
+ /**
76
+ * The user provided entry point in the source code
77
+ */
78
+ input: TypeDefinition;
79
+ /**
80
+ * An optional name to use in the package export during the build process
81
+ */
82
+ output?: string;
83
+ }
84
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview" | "mainFields" | "extensions"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr" | "mainFields" | "extensions">> & {
85
+ /**
86
+ * The name of the environment
87
+ */
88
+ name: string;
89
+ /**
90
+ * Configuration options for the preview server
91
+ */
92
+ preview?: ResolvedPreviewOptions;
93
+ };
94
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
95
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
96
+ assets: ResolvedAssetGlob[];
97
+ }>;
98
+ /**
99
+ * The resolved options for the Powerlines project configuration.
100
+ */
101
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "framework">> & {
102
+ /**
103
+ * The configuration options that were provided inline to the Powerlines CLI.
104
+ */
105
+ inlineConfig: InlineConfig<TUserConfig>;
106
+ /**
107
+ * The original configuration options that were provided by the user to the Powerlines process.
108
+ */
109
+ userConfig: TUserConfig;
110
+ /**
111
+ * A string identifier for the Powerlines command being executed.
112
+ */
113
+ command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
114
+ /**
115
+ * The root directory of the project's source code
116
+ *
117
+ * @defaultValue "\{projectRoot\}/src"
118
+ */
119
+ sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
120
+ /**
121
+ * The root directory of the project.
122
+ */
123
+ projectRoot: NonUndefined<TUserConfig["root"]>;
124
+ /**
125
+ * The type of project being built.
126
+ */
127
+ projectType: NonUndefined<TUserConfig["type"]>;
128
+ /**
129
+ * The output configuration options to use for the build process
130
+ */
131
+ output: OutputResolvedConfig;
132
+ /**
133
+ * The log level to use for the Powerlines processes.
134
+ *
135
+ * @defaultValue "info"
136
+ */
137
+ logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
138
+ };
139
+
140
+ interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> {
141
+ /**
142
+ * The order in which the plugin should be applied.
143
+ */
144
+ order?: "pre" | "post" | null | undefined;
145
+ /**
146
+ * A filter to determine when the hook should be called.
147
+ */
148
+ filter?: TFilter;
149
+ /**
150
+ * The hook function to be called.
151
+ */
152
+ handler: THookFunction;
153
+ }
154
+ type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> = THookFunction | PluginHookObject<THookFunction, TFilter>;
155
+ /**
156
+ * A result returned by the plugin from the `generateTypes` hook that describes the declaration types output file.
157
+ */
158
+ interface GenerateTypesResult {
159
+ directives?: string[];
160
+ code: string;
161
+ }
162
+ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
163
+ /**
164
+ * A function that returns configuration options to be merged with the build context's options.
165
+ *
166
+ * @remarks
167
+ * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
168
+ *
169
+ * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
170
+ *
171
+ * @see https://vitejs.dev/guide/api-plugin#config
172
+ *
173
+ * @param this - The build context.
174
+ * @param config - The partial configuration object to be modified.
175
+ * @returns A promise that resolves to a partial configuration object.
176
+ */
177
+ config: (this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>;
178
+ /**
179
+ * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
180
+ *
181
+ * @remarks
182
+ * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.
183
+ *
184
+ * @see https://vitejs.dev/guide/api-plugin#configenvironment
185
+ *
186
+ * @param this - The build context.
187
+ * @param name - The name of the environment being configured.
188
+ * @param environment - The Vite-like environment object containing information about the current build environment.
189
+ * @returns A promise that resolves when the hook is complete.
190
+ */
191
+ configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
192
+ /**
193
+ * A hook that is called when the plugin is resolved.
194
+ *
195
+ * @see https://vitejs.dev/guide/api-plugin#configresolved
196
+ *
197
+ * @param this - The build context.
198
+ * @returns A promise that resolves when the hook is complete.
199
+ */
200
+ configResolved: (this: TContext) => MaybePromise<void>;
201
+ /**
202
+ * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.
203
+ *
204
+ * @param this - The build context.
205
+ * @param code - The source code to generate types for.
206
+ * @returns A promise that resolves when the hook is complete.
207
+ */
208
+ generateTypes: (this: TContext, code: string) => MaybePromise<GenerateTypesResult | string | undefined | null>;
209
+ /**
210
+ * A hook that is called at the start of the build process.
211
+ *
212
+ * @param this - The build context and unplugin build context.
213
+ * @returns A promise that resolves when the hook is complete.
214
+ */
215
+ buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
216
+ /**
217
+ * A hook that is called at the end of the build process.
218
+ *
219
+ * @param this - The build context and unplugin build context.
220
+ * @returns A promise that resolves when the hook is complete.
221
+ */
222
+ buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
223
+ /**
224
+ * A hook that is called to transform the source code.
225
+ *
226
+ * @param this - The build context, unplugin build context, and unplugin context.
227
+ * @param code - The source code to transform.
228
+ * @param id - The identifier of the source code.
229
+ * @returns A promise that resolves when the hook is complete.
230
+ */
231
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
232
+ /**
233
+ * A hook that is called to load the source code.
234
+ *
235
+ * @param this - The build context, unplugin build context, and unplugin context.
236
+ * @param id - The identifier of the source code.
237
+ * @returns A promise that resolves when the hook is complete.
238
+ */
239
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
240
+ /**
241
+ * A hook that is called to resolve the identifier of the source code.
242
+ *
243
+ * @param this - The build context, unplugin build context, and unplugin context.
244
+ * @param id - The identifier of the source code.
245
+ * @param importer - The importer of the source code.
246
+ * @param options - The options for resolving the identifier.
247
+ * @returns A promise that resolves when the hook is complete.
248
+ */
249
+ resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
250
+ isEntry: boolean;
251
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>;
252
+ /**
253
+ * A hook that is called to write the bundle to disk.
254
+ *
255
+ * @param this - The build context.
256
+ * @returns A promise that resolves when the hook is complete.
257
+ */
258
+ writeBundle: (this: TContext) => MaybePromise<void>;
259
+ }
260
+ type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant] = Required<UnpluginOptions>[TBuildVariant]> = {
261
+ [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike ? (this: ThisParameterType<TOptions[TKey]> & TContext, ...args: Parameters<TOptions[TKey]>) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>> : TOptions[TKey];
262
+ };
263
+ type ExternalPluginHookFunctionsVariant<TContext extends PluginContext = PluginContext, TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant> = {
264
+ [TKey in keyof BuildPlugin<TContext, TBuildVariant> & string as `${TBuildVariant}:${TKey}`]: BuildPlugin<TContext, TBuildVariant>[TKey];
265
+ };
266
+ type ExternalPluginHookFunctions<TContext extends PluginContext> = ExternalPluginHookFunctionsVariant<TContext, "vite"> & ExternalPluginHookFunctionsVariant<TContext, "esbuild"> & ExternalPluginHookFunctionsVariant<TContext, "rolldown"> & ExternalPluginHookFunctionsVariant<TContext, "rollup"> & ExternalPluginHookFunctionsVariant<TContext, "webpack"> & ExternalPluginHookFunctionsVariant<TContext, "rspack"> & ExternalPluginHookFunctionsVariant<TContext, "farm">;
267
+ type PluginHookFunctions<TContext extends PluginContext = PluginContext> = BasePluginHookFunctions<TContext> & ExternalPluginHookFunctions<TContext>;
268
+ type PluginHooks<TContext extends PluginContext = PluginContext> = {
269
+ [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]>;
270
+ } & {
271
+ /**
272
+ * A function that returns configuration options to be merged with the build context's options.
273
+ *
274
+ * @remarks
275
+ * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
276
+ *
277
+ * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
278
+ *
279
+ * @see https://vitejs.dev/guide/api-plugin#config
280
+ *
281
+ * @param this - The build context.
282
+ * @param config - The partial configuration object to be modified.
283
+ * @returns A promise that resolves to a partial configuration object.
284
+ */
285
+ config: PluginHook<(this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>> | Partial<TContext["config"]["userConfig"]>;
286
+ /**
287
+ * A hook that is called to transform the source code.
288
+ *
289
+ * @param this - The build context, unplugin build context, and unplugin context.
290
+ * @param code - The source code to transform.
291
+ * @param id - The identifier of the source code.
292
+ * @returns A promise that resolves when the hook is complete.
293
+ */
294
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
295
+ /**
296
+ * A hook that is called to load the source code.
297
+ *
298
+ * @param this - The build context, unplugin build context, and unplugin context.
299
+ * @param id - The identifier of the source code.
300
+ * @returns A promise that resolves when the hook is complete.
301
+ */
302
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
303
+ /**
304
+ * A hook that is called to resolve the identifier of the source code.
305
+ *
306
+ * @param this - The build context, unplugin build context, and unplugin context.
307
+ * @param id - The identifier of the source code.
308
+ * @param importer - The importer of the source code.
309
+ * @param options - The options for resolving the identifier.
310
+ * @returns A promise that resolves when the hook is complete.
311
+ */
312
+ resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
313
+ isEntry: boolean;
314
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
315
+ };
316
+ type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
317
+ [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
318
+ };
319
+ interface Plugin<in out TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
320
+ /**
321
+ * The name of the plugin, for use in deduplication, error messages and logs.
322
+ */
323
+ name: string;
324
+ /**
325
+ * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
326
+ *
327
+ * @remarks
328
+ * The Plugin invocation order is as follows:
329
+ * - `enforce: 'pre'` plugins
330
+ * - `order: 'pre'` plugin hooks
331
+ * - any other plugins (normal)
332
+ * - `order: 'post'` plugin hooks
333
+ * - `enforce: 'post'` plugins
334
+ *
335
+ * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
336
+ * @see https://rollupjs.org/plugin-development/#build-hooks
337
+ * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
338
+ * @see https://esbuild.github.io/plugins/#concepts
339
+ */
340
+ enforce?: "pre" | "post";
341
+ /**
342
+ * A function to determine if two plugins are the same and can be de-duplicated.
343
+ *
344
+ * @remarks
345
+ * If this is not provided, plugins are de-duplicated by comparing their names.
346
+ *
347
+ * @param other - The other plugin to compare against.
348
+ * @returns `true` if the two plugins are the same, `false` otherwise.
349
+ */
350
+ dedupe?: false | ((other: Plugin<any>) => boolean);
351
+ /**
352
+ * A list of pre-requisite plugins that must be loaded before this plugin can be used.
353
+ */
354
+ dependsOn?: PluginConfig<any>[];
355
+ /**
356
+ * Define environments where this plugin should be active. By default, the plugin is active in all environments.
357
+ *
358
+ * @param environment - The environment to check.
359
+ * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
360
+ */
361
+ applyToEnvironment?: (environment: EnvironmentResolvedConfig) => MaybePromise<boolean | Plugin<any>>;
362
+ }
363
+
364
+ type ReflectionMode = "default" | "explicit" | "never";
365
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
366
+ /**
367
+ * Defines the level of reflection to be used during the transpilation process.
368
+ *
369
+ * @remarks
370
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
371
+ * - `minimal` - Only the essential type information is captured.
372
+ * - `normal` - Additional type information is captured, including some contextual data.
373
+ * - `verbose` - All available type information is captured, including detailed contextual data.
374
+ */
375
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
376
+ interface DeepkitOptions {
377
+ /**
378
+ * Either true to activate reflection for all files compiled using this tsconfig,
379
+ * or a list of globs/file paths relative to this tsconfig.json.
380
+ * Globs/file paths can be prefixed with a ! to exclude them.
381
+ */
382
+ reflection?: RawReflectionMode;
383
+ /**
384
+ * Defines the level of reflection to be used during the transpilation process.
385
+ *
386
+ * @remarks
387
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
388
+ * - `minimal` - Only the essential type information is captured.
389
+ * - `normal` - Additional type information is captured, including some contextual data.
390
+ * - `verbose` - All available type information is captured, including detailed contextual data.
391
+ */
392
+ reflectionLevel?: ReflectionLevel;
393
+ }
394
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
395
+ /**
396
+ * The TypeScript compiler configuration.
397
+ *
398
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
399
+ */
400
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
401
+ /**
402
+ * Either true to activate reflection for all files compiled using this tsconfig,
403
+ * or a list of globs/file paths relative to this tsconfig.json.
404
+ * Globs/file paths can be prefixed with a ! to exclude them.
405
+ */
406
+ reflection?: RawReflectionMode;
407
+ /**
408
+ * Defines the level of reflection to be used during the transpilation process.
409
+ *
410
+ * @remarks
411
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
412
+ * - `minimal` - Only the essential type information is captured.
413
+ * - `normal` - Additional type information is captured, including some contextual data.
414
+ * - `verbose` - All available type information is captured, including detailed contextual data.
415
+ */
416
+ reflectionLevel?: ReflectionLevel;
417
+ /**
418
+ * Instructs the TypeScript compiler how to compile `.ts` files.
419
+ */
420
+ compilerOptions?: TSCompilerOptions;
421
+ }
422
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
423
+ originalTsconfigJson: TsConfigJson;
424
+ tsconfigJson: TSConfig;
425
+ tsconfigFilePath: string;
426
+ };
427
+
428
+ declare const __VFS_INIT__ = "__VFS_INIT__";
429
+ declare const __VFS_REVERT__ = "__VFS_REVERT__";
430
+ declare const __VFS_CACHE__ = "__VFS_CACHE__";
431
+ declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
432
+ declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
433
+ type OutputModeType = "fs" | "virtual";
434
+ interface VirtualFile {
435
+ /**
436
+ * The unique identifier for the virtual file.
437
+ *
438
+ * @remarks
439
+ * If no specific id is provided, it defaults to the file's {@link path}.
440
+ */
441
+ id: string;
442
+ /**
443
+ * Additional metadata associated with the virtual file.
444
+ */
445
+ details: Record<string, PrimitiveJsonValue>;
446
+ /**
447
+ * The variant of the file.
448
+ *
449
+ * @remarks
450
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
451
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
452
+ * - `entry`: Indicates that the file is an entry point for execution.
453
+ * - `normal`: Indicates that the file is a standard file without any special role.
454
+ */
455
+ variant: string;
456
+ /**
457
+ * The output mode of the file.
458
+ *
459
+ * @remarks
460
+ * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
461
+ */
462
+ mode: OutputModeType;
463
+ /**
464
+ * A virtual (or actual) path to the file in the file system.
465
+ */
466
+ path: string;
467
+ /**
468
+ * The contents of the file.
469
+ */
470
+ code: string | NodeJS.ArrayBufferView;
471
+ }
472
+ type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
473
+ interface ResolveFSOptions {
474
+ mode?: OutputModeType;
475
+ }
476
+ type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
477
+ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
478
+ skipFormat?: boolean;
479
+ }
480
+ type NodeWriteFileOptions = WriteFileOptions$1;
481
+ type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
482
+ type PowerLinesWriteFileData = Partial<Omit<VirtualFile, "path" | "mode" | "code">> & Pick<VirtualFile, "code">;
483
+ type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
484
+ interface ResolvePathOptions extends ResolveFSOptions {
485
+ /**
486
+ * Should the resolved path include the file extension?
487
+ *
488
+ * @defaultValue true
489
+ */
490
+ withExtension?: boolean;
491
+ /**
492
+ * The paths to search for the file.
493
+ */
494
+ paths?: string[];
495
+ /**
496
+ * The type of the path to resolve.
497
+ */
498
+ type?: "file" | "directory";
499
+ }
500
+ interface VirtualFileSystemInterface {
501
+ [__VFS_INIT__]: () => void;
502
+ [__VFS_REVERT__]: () => void;
503
+ /**
504
+ * The underlying file metadata.
505
+ */
506
+ meta: Record<string, VirtualFileSystemMetadata | undefined>;
507
+ /**
508
+ * A map of module ids to their file paths.
509
+ */
510
+ ids: Record<string, string>;
511
+ /**
512
+ * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
513
+ *
514
+ * @param pathOrId - The path or id to check.
515
+ * @param options - Optional parameters for resolving the path.
516
+ * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
517
+ */
518
+ isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
519
+ /**
520
+ * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
521
+ *
522
+ * @param pathOrId - The path or id to check.
523
+ * @param options - Optional parameters for resolving the path.
524
+ * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
525
+ */
526
+ isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
527
+ /**
528
+ * Checks if a file exists in the virtual file system (VFS).
529
+ *
530
+ * @param path - The path of the file to check.
531
+ * @returns `true` if the file exists, otherwise `false`.
532
+ */
533
+ isFile: (path: string) => boolean;
534
+ /**
535
+ * Checks if a directory exists in the virtual file system (VFS).
536
+ *
537
+ * @param path - The path of the directory to check.
538
+ * @returns `true` if the directory exists, otherwise `false`.
539
+ */
540
+ isDirectory: (path: string) => boolean;
541
+ /**
542
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
543
+ *
544
+ * @see https://www.typescriptlang.org/tsconfig#paths
545
+ *
546
+ * @param pathOrId - The path or id to check.
547
+ * @returns Whether the path or id corresponds to a virtual file.
548
+ */
549
+ isTsconfigPath: (pathOrId: string) => boolean;
550
+ /**
551
+ * Checks if a file exists in the virtual file system (VFS).
552
+ *
553
+ * @param pathOrId - The path or id of the file.
554
+ * @returns `true` if the file exists, otherwise `false`.
555
+ */
556
+ existsSync: (pathOrId: string) => boolean;
557
+ /**
558
+ * Gets the metadata of a file in the virtual file system (VFS).
559
+ *
560
+ * @param pathOrId - The path or id of the file.
561
+ * @returns The metadata of the file if it exists, otherwise undefined.
562
+ */
563
+ getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;
564
+ /**
565
+ * Gets the stats of a file in the virtual file system (VFS).
566
+ *
567
+ * @param pathOrId - The path or id of the file.
568
+ * @param options - Optional parameters for getting the stats.
569
+ * @returns The stats of the file if it exists, otherwise undefined.
570
+ */
571
+ lstat: (pathOrId: string, options?: StatSyncOptions & {
572
+ bigint?: false | undefined;
573
+ throwIfNoEntry: false;
574
+ }) => Promise<Stats>;
575
+ /**
576
+ * Gets the stats of a file in the virtual file system (VFS).
577
+ *
578
+ * @param pathOrId - The path or id of the file.
579
+ * @param options - Optional parameters for getting the stats.
580
+ * @returns The stats of the file if it exists, otherwise undefined.
581
+ */
582
+ lstatSync: (pathOrId: string, options?: StatSyncOptions & {
583
+ bigint?: false | undefined;
584
+ throwIfNoEntry: false;
585
+ }) => Stats | undefined;
586
+ /**
587
+ * Gets the stats of a file in the virtual file system (VFS).
588
+ *
589
+ * @param pathOrId - The path or id of the file.
590
+ * @returns The stats of the file if it exists, otherwise false.
591
+ */
592
+ stat: (pathOrId: string, options?: StatSyncOptions & {
593
+ bigint?: false | undefined;
594
+ throwIfNoEntry: false;
595
+ }) => Promise<Stats>;
596
+ /**
597
+ * Gets the stats of a file in the virtual file system (VFS).
598
+ *
599
+ * @param pathOrId - The path or id of the file.
600
+ * @returns The stats of the file if it exists, otherwise false.
601
+ */
602
+ statSync: (pathOrId: string, options?: StatSyncOptions & {
603
+ bigint?: false | undefined;
604
+ throwIfNoEntry: false;
605
+ }) => Stats | undefined;
606
+ /**
607
+ * Lists files in a given path.
608
+ *
609
+ * @param path - The path to list files from.
610
+ * @param options - Options for listing files, such as encoding and recursion.
611
+ * @returns An array of file names in the specified path.
612
+ */
613
+ readdirSync: (path: string, options?: {
614
+ encoding: BufferEncoding | null;
615
+ withFileTypes?: false | undefined;
616
+ recursive?: boolean | undefined;
617
+ } | BufferEncoding) => string[];
618
+ /**
619
+ * Lists files in a given path.
620
+ *
621
+ * @param path - The path to list files from.
622
+ * @param options - Options for listing files, such as encoding and recursion.
623
+ * @returns An array of file names in the specified path.
624
+ */
625
+ readdir: (path: string, options?: {
626
+ encoding: BufferEncoding | null;
627
+ withFileTypes?: false | undefined;
628
+ recursive?: boolean | undefined;
629
+ } | BufferEncoding) => Promise<string[]>;
630
+ /**
631
+ * Removes a file or symbolic link in the virtual file system (VFS).
632
+ *
633
+ * @param path - The path to the file to remove.
634
+ * @returns A promise that resolves when the file is removed.
635
+ */
636
+ unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
637
+ /**
638
+ * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
639
+ *
640
+ * @param path - The path to the file to remove.
641
+ * @returns A promise that resolves when the file is removed.
642
+ */
643
+ unlink: (path: string, options?: ResolveFSOptions) => Promise<void>;
644
+ /**
645
+ * Removes a directory in the virtual file system (VFS).
646
+ *
647
+ * @param path - The path to create the directory at.
648
+ * @param options - Options for creating the directory.
649
+ */
650
+ rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
651
+ /**
652
+ * Removes a directory in the virtual file system (VFS).
653
+ *
654
+ * @param path - The path to create the directory at.
655
+ * @param options - Options for creating the directory.
656
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
657
+ */
658
+ rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
659
+ /**
660
+ * Removes a file or directory in the virtual file system (VFS).
661
+ *
662
+ * @param path - The path to the file or directory to remove.
663
+ * @param options - Options for removing the file or directory.
664
+ * @returns A promise that resolves when the file or directory is removed.
665
+ */
666
+ rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
667
+ /**
668
+ * Synchronously removes a file or directory in the virtual file system (VFS).
669
+ *
670
+ * @param path - The path to the file or directory to remove.
671
+ * @param options - Options for removing the file or directory.
672
+ */
673
+ rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;
674
+ /**
675
+ * Creates a directory in the virtual file system (VFS).
676
+ *
677
+ * @param path - The path to create the directory at.
678
+ * @param options - Options for creating the directory.
679
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
680
+ */
681
+ mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
682
+ /**
683
+ * Creates a directory in the virtual file system (VFS).
684
+ *
685
+ * @param path - The path to create the directory at.
686
+ * @param options - Options for creating the directory.
687
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
688
+ */
689
+ mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
690
+ /**
691
+ * Reads a file from the virtual file system (VFS).
692
+ *
693
+ * @param pathOrId - The path or id of the file.
694
+ * @returns The contents of the file if it exists, otherwise undefined.
695
+ */
696
+ readFile: (pathOrId: string) => Promise<string | undefined>;
697
+ /**
698
+ * Reads a file from the virtual file system (VFS).
699
+ *
700
+ * @param pathOrId - The path or id of the file.
701
+ */
702
+ readFileSync: (pathOrId: string) => string | undefined;
703
+ /**
704
+ * Writes a file to the virtual file system (VFS).
705
+ *
706
+ * @param path - The path to the file.
707
+ * @param data - The contents of the file.
708
+ * @param options - Optional parameters for writing the file.
709
+ * @returns A promise that resolves when the file is written.
710
+ */
711
+ writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
712
+ /**
713
+ * Writes a file to the virtual file system (VFS).
714
+ *
715
+ * @param path - The path to the file.
716
+ * @param data - The contents of the file.
717
+ * @param options - Optional parameters for writing the file.
718
+ */
719
+ writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
720
+ /**
721
+ * Moves a file from one path to another in the virtual file system (VFS).
722
+ *
723
+ * @param srcPath - The source path to move
724
+ * @param destPath - The destination path to move to
725
+ */
726
+ move: (srcPath: string, destPath: string) => Promise<void>;
727
+ /**
728
+ * Synchronously moves a file from one path to another in the virtual file system (VFS).
729
+ *
730
+ * @param srcPath - The source path to move
731
+ * @param destPath - The destination path to move to
732
+ */
733
+ moveSync: (srcPath: string, destPath: string) => void;
734
+ /**
735
+ * Copies a file from one path to another in the virtual file system (VFS).
736
+ *
737
+ * @param srcPath - The source path to copy
738
+ * @param destPath - The destination path to copy to
739
+ */
740
+ copy: (srcPath: string, destPath: string) => Promise<void>;
741
+ /**
742
+ * Synchronously copies a file from one path to another in the virtual file system (VFS).
743
+ *
744
+ * @param srcPath - The source path to copy
745
+ * @param destPath - The destination path to copy to
746
+ */
747
+ copySync: (srcPath: string, destPath: string) => void;
748
+ /**
749
+ * Glob files in the virtual file system (VFS) based on the provided pattern(s).
750
+ *
751
+ * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
752
+ * @returns An array of file paths matching the provided pattern(s)
753
+ */
754
+ glob: (pattern: string | string[]) => Promise<string[]>;
755
+ /**
756
+ * Synchronously glob files in the virtual file system (VFS) based on the provided pattern(s).
757
+ *
758
+ * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
759
+ * @returns An array of file paths matching the provided pattern(s)
760
+ */
761
+ globSync: (pattern: string | string[]) => string[];
762
+ /**
763
+ * Resolves a path or id to a file path in the virtual file system.
764
+ *
765
+ * @param pathOrId - The path or id of the file to resolve.
766
+ * @param options - Optional parameters for resolving the path.
767
+ * @returns The resolved path of the file if it exists, otherwise false.
768
+ */
769
+ resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
770
+ /**
771
+ * Resolves a path based on TypeScript's `tsconfig.json` paths.
772
+ *
773
+ * @see https://www.typescriptlang.org/tsconfig#paths
774
+ *
775
+ * @param path - The path to check.
776
+ * @returns The resolved file path if it exists, otherwise undefined.
777
+ */
778
+ resolveTsconfigPath: (path: string) => string | false;
779
+ /**
780
+ * Resolves a package name based on TypeScript's `tsconfig.json` paths.
781
+ *
782
+ * @see https://www.typescriptlang.org/tsconfig#paths
783
+ *
784
+ * @param path - The path to check.
785
+ * @returns The resolved package name if it exists, otherwise undefined.
786
+ */
787
+ resolveTsconfigPathPackage: (path: string) => string | false;
788
+ /**
789
+ * Resolves a path or id to a file path in the virtual file system.
790
+ *
791
+ * @param pathOrId - The path or id of the file to resolve.
792
+ * @returns The resolved path of the file if it exists, otherwise false.
793
+ */
794
+ realpathSync: (pathOrId: string) => string;
795
+ /**
796
+ * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
797
+ *
798
+ * @returns A record mapping file paths to their partial metadata.
799
+ */
800
+ getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
801
+ /**
802
+ * A map of cached file paths to their underlying file content.
803
+ */
804
+ [__VFS_CACHE__]: Map<string, string>;
805
+ /**
806
+ * A reference to the underlying virtual file system.
807
+ */
808
+ [__VFS_VIRTUAL__]: Volume;
809
+ /**
810
+ * A reference to the underlying unified file system.
811
+ */
812
+ [__VFS_UNIFIED__]: IUnionFs;
813
+ }
814
+
815
+ interface MetaInfo {
816
+ /**
817
+ * The checksum generated from the resolved options
818
+ */
819
+ checksum: string;
820
+ /**
821
+ * The build id
822
+ */
823
+ buildId: string;
824
+ /**
825
+ * The release id
826
+ */
827
+ releaseId: string;
828
+ /**
829
+ * The build timestamp
830
+ */
831
+ timestamp: number;
832
+ /**
833
+ * A hash that represents the path to the project root directory
834
+ */
835
+ projectRootHash: string;
836
+ /**
837
+ * A hash that represents the path to the project root directory
838
+ */
839
+ configHash: string;
840
+ /**
841
+ * A mapping of runtime ids to their corresponding file paths
842
+ */
843
+ builtinIdMap: Record<string, string>;
844
+ /**
845
+ * A mapping of virtual file paths to their corresponding file contents
846
+ */
847
+ virtualFiles: Record<string, string | null>;
848
+ }
849
+ interface Resolver extends Jiti {
850
+ plugin: Jiti;
851
+ }
852
+ interface InitContextOptions {
853
+ /**
854
+ * If false, the plugin will be loaded after all other plugins.
855
+ *
856
+ * @defaultValue true
857
+ */
858
+ isHighPriority: boolean;
859
+ }
860
+ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
861
+ /**
862
+ * The Storm workspace configuration
863
+ */
864
+ workspaceConfig: WorkspaceConfig;
865
+ /**
866
+ * An object containing the options provided to Powerlines
867
+ */
868
+ config: TResolvedConfig;
869
+ /**
870
+ * A logging function for the Powerlines engine
871
+ */
872
+ log: LogFn;
873
+ /**
874
+ * The metadata information
875
+ */
876
+ meta: MetaInfo;
877
+ /**
878
+ * The metadata information currently written to disk
879
+ */
880
+ persistedMeta?: MetaInfo;
881
+ /**
882
+ * The Powerlines artifacts directory
883
+ */
884
+ artifactsPath: string;
885
+ /**
886
+ * The path to the Powerlines builtin runtime modules directory
887
+ */
888
+ builtinsPath: string;
889
+ /**
890
+ * The path to the Powerlines entry modules directory
891
+ */
892
+ entryPath: string;
893
+ /**
894
+ * The path to the Powerlines TypeScript declaration files directory
895
+ */
896
+ dtsPath: string;
897
+ /**
898
+ * The path to a directory where the reflection data buffers (used by the build processes) are stored
899
+ */
900
+ dataPath: string;
901
+ /**
902
+ * The path to a directory where the project cache (used by the build processes) is stored
903
+ */
904
+ cachePath: string;
905
+ /**
906
+ * The Powerlines environment paths
907
+ */
908
+ envPaths: EnvPaths;
909
+ /**
910
+ * The file system path to the Powerlines package installation
911
+ */
912
+ powerlinesPath: string;
913
+ /**
914
+ * The relative path to the Powerlines workspace root directory
915
+ */
916
+ relativeToWorkspaceRoot: string;
917
+ /**
918
+ * The project's `package.json` file content
919
+ */
920
+ packageJson: PackageJson & Record<string, any>;
921
+ /**
922
+ * The project's `project.json` file content
923
+ */
924
+ projectJson?: Record<string, any>;
925
+ /**
926
+ * The dependency installations required by the project
927
+ */
928
+ dependencies: Record<string, string | Range>;
929
+ /**
930
+ * The development dependency installations required by the project
931
+ */
932
+ devDependencies: Record<string, string | Range>;
933
+ /**
934
+ * The parsed TypeScript configuration from the `tsconfig.json` file
935
+ */
936
+ tsconfig: ParsedTypeScriptConfig;
937
+ /**
938
+ * The entry points of the source code
939
+ */
940
+ entry: ResolvedEntryTypeDefinition[];
941
+ /**
942
+ * The virtual file system manager used during the build process to reference generated runtime files
943
+ */
944
+ fs: VirtualFileSystemInterface;
945
+ /**
946
+ * The Jiti module resolver
947
+ */
948
+ resolver: Resolver;
949
+ /**
950
+ * The builtin module id that exist in the Powerlines virtual file system
951
+ */
952
+ builtins: string[];
953
+ /**
954
+ * The Powerlines builtin virtual files
955
+ */
956
+ getBuiltins: () => Promise<VirtualFile[]>;
957
+ /**
958
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
959
+ *
960
+ * @param code - The source code of the builtin file
961
+ * @param id - The unique identifier of the builtin file
962
+ * @param path - An optional path to write the builtin file to
963
+ * @param options - Options for writing the file
964
+ */
965
+ writeBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
966
+ /**
967
+ * Resolves a entry virtual file and writes it to the VFS if it does not already exist
968
+ *
969
+ * @param code - The source code of the entry file
970
+ * @param path - An optional path to write the entry file to
971
+ * @param options - Options for writing the file
972
+ */
973
+ writeEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
974
+ /**
975
+ * Parses the source code and returns a {@link ParseResult} object.
976
+ */
977
+ parse: (code: string, id: string, options?: ParserOptions | null) => Promise<ParseResult>;
978
+ /**
979
+ * A function to update the context fields using a new user configuration options
980
+ */
981
+ withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
982
+ /**
983
+ * A function to update the context fields using inline configuration options
984
+ */
985
+ withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
986
+ /**
987
+ * Create a new logger instance
988
+ *
989
+ * @param name - The name to use for the logger instance
990
+ * @returns A logger function
991
+ */
992
+ createLog: (name: string | null) => LogFn;
993
+ /**
994
+ * Extend the current logger instance with a new name
995
+ *
996
+ * @param name - The name to use for the extended logger instance
997
+ * @returns A logger function
998
+ */
999
+ extendLog: (name: string) => LogFn;
1000
+ }
1001
+ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1002
+ /**
1003
+ * The environment specific resolved configuration
1004
+ */
1005
+ environment: EnvironmentResolvedConfig;
1006
+ /**
1007
+ * An alternative property name for the {@link log} property
1008
+ *
1009
+ * @remarks
1010
+ * This is provided for compatibility with other logging libraries that expect a `logger` property.
1011
+ */
1012
+ logger: LogFn;
1013
+ }
1014
+ type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1015
+
1016
+ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
1017
+ /**
1018
+ * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
1019
+ */
1020
+ type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
1021
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
1022
+ /**
1023
+ * A configuration tuple for a Powerlines plugin.
1024
+ */
1025
+ type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
1026
+ /**
1027
+ * A configuration object for a Powerlines plugin.
1028
+ */
1029
+ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
1030
+ plugin: string | PluginFactory<TContext, TOptions>;
1031
+ options: TOptions;
1032
+ } | {
1033
+ plugin: Plugin<TContext>;
1034
+ options?: never;
1035
+ };
1036
+ /**
1037
+ * A configuration tuple for a Powerlines plugin.
1038
+ */
1039
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
1040
+ type ProjectType = "application" | "library";
1041
+ interface OutputConfig {
1042
+ /**
1043
+ * The path to output the final compiled files to
1044
+ *
1045
+ * @remarks
1046
+ * If a value is not provided, Powerlines will attempt to:
1047
+ * 1. Use the `outDir` value in the `tsconfig.json` file.
1048
+ * 2. Use the `dist` directory in the project root directory.
1049
+ *
1050
+ * @defaultValue "dist/\{projectRoot\}"
1051
+ */
1052
+ outputPath?: string;
1053
+ /**
1054
+ * The format of the output files
1055
+ *
1056
+ * @defaultValue "virtual"
1057
+ */
1058
+ mode?: OutputModeType;
1059
+ /**
1060
+ * The path of the generated runtime declaration file relative to the workspace root.
1061
+ *
1062
+ * @defaultValue "\{projectRoot\}/powerlines.d.ts"
1063
+ */
1064
+ dts?: string | false;
1065
+ /**
1066
+ * A prefix to use for identifying builtin modules
1067
+ *
1068
+ * @remarks
1069
+ * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
1070
+ *
1071
+ * @defaultValue "powerlines"
1072
+ */
1073
+ builtinPrefix?: string;
1074
+ /**
1075
+ * The folder where the generated runtime artifacts will be located
1076
+ *
1077
+ * @remarks
1078
+ * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
1079
+ *
1080
+ * @defaultValue "\{projectRoot\}/.powerlines"
1081
+ */
1082
+ artifactsFolder?: string;
1083
+ /**
1084
+ * The module format of the output files
1085
+ *
1086
+ * @remarks
1087
+ * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
1088
+ *
1089
+ * @defaultValue "esm"
1090
+ */
1091
+ format?: Format | Format[];
1092
+ /**
1093
+ * A list of assets to copy to the output directory
1094
+ *
1095
+ * @remarks
1096
+ * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
1097
+ */
1098
+ assets?: Array<string | AssetGlob>;
1099
+ }
1100
+ interface BaseConfig {
1101
+ /**
1102
+ * The name of the project
1103
+ */
1104
+ name?: string;
1105
+ /**
1106
+ * The project display title
1107
+ *
1108
+ * @remarks
1109
+ * This option is used in documentation generation and other places where a human-readable title is needed.
1110
+ */
1111
+ title?: string;
1112
+ /**
1113
+ * A description of the project
1114
+ *
1115
+ * @remarks
1116
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
1117
+ */
1118
+ description?: string;
1119
+ /**
1120
+ * The log level to use for the Powerlines processes.
1121
+ *
1122
+ * @defaultValue "info"
1123
+ */
1124
+ logLevel?: LogLevelLabel | null;
1125
+ /**
1126
+ * A custom logger function to use for logging messages
1127
+ */
1128
+ customLogger?: LogFn;
1129
+ /**
1130
+ * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
1131
+ *
1132
+ * @defaultValue "production"
1133
+ */
1134
+ mode?: "development" | "test" | "production";
1135
+ /**
1136
+ * The entry point(s) for the application
1137
+ */
1138
+ entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
1139
+ /**
1140
+ * Configuration for linting the source code
1141
+ */
1142
+ lint?: Record<string, any> | false;
1143
+ /**
1144
+ * Configuration for testing the source code
1145
+ */
1146
+ test?: Record<string, any> | false;
1147
+ /**
1148
+ * Configuration for the output of the build process
1149
+ */
1150
+ output?: OutputConfig;
1151
+ /**
1152
+ * Configuration for the transformation of the source code
1153
+ */
1154
+ transform?: Record<string, any>;
1155
+ /**
1156
+ * Options to to provide to the build process
1157
+ */
1158
+ build?: BuildConfig;
1159
+ /**
1160
+ * Configuration for documentation generation
1161
+ *
1162
+ * @remarks
1163
+ * This configuration will be used by the documentation generation plugins during the `docs` command.
1164
+ */
1165
+ docs?: Record<string, any>;
1166
+ /**
1167
+ * The path to the tsconfig file to be used by the compiler
1168
+ *
1169
+ * @remarks
1170
+ * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
1171
+ *
1172
+ * @defaultValue "\{projectRoot\}/tsconfig.json"
1173
+ */
1174
+ tsconfig?: string;
1175
+ /**
1176
+ * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
1177
+ *
1178
+ * @see https://www.typescriptlang.org/tsconfig
1179
+ *
1180
+ * @remarks
1181
+ * If populated, this option takes higher priority than `tsconfig`
1182
+ */
1183
+ tsconfigRaw?: TSConfig;
1184
+ }
1185
+ interface EnvironmentConfig extends BaseConfig {
1186
+ /**
1187
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
1188
+ *
1189
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
1190
+ */
1191
+ mainFields?: string[];
1192
+ /**
1193
+ * Array of strings indicating what conditions should be used for module resolution.
1194
+ */
1195
+ conditions?: string[];
1196
+ /**
1197
+ * Array of strings indicating what conditions should be used for external modules.
1198
+ */
1199
+ externalConditions?: string[];
1200
+ /**
1201
+ * Array of strings indicating what file extensions should be used for module resolution.
1202
+ *
1203
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
1204
+ */
1205
+ extensions?: string[];
1206
+ /**
1207
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
1208
+ *
1209
+ * @remarks
1210
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
1211
+ */
1212
+ dedupe?: string[];
1213
+ /**
1214
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
1215
+ */
1216
+ builtins?: (string | RegExp)[];
1217
+ /**
1218
+ * Configuration options for the preview server
1219
+ */
1220
+ preview?: PreviewOptions;
1221
+ /**
1222
+ * A flag indicating whether the build is for a Server-Side Rendering environment.
1223
+ */
1224
+ ssr?: boolean;
1225
+ /**
1226
+ * Define if this environment is used for Server-Side Rendering
1227
+ *
1228
+ * @defaultValue "server" (if it isn't the client environment)
1229
+ */
1230
+ consumer?: "client" | "server";
1231
+ }
1232
+ interface CommonUserConfig extends BaseConfig {
1233
+ /**
1234
+ * The type of project being built
1235
+ *
1236
+ * @defaultValue "application"
1237
+ */
1238
+ type?: ProjectType;
1239
+ /**
1240
+ * The root directory of the project
1241
+ */
1242
+ root: string;
1243
+ /**
1244
+ * The root directory of the project's source code
1245
+ *
1246
+ * @defaultValue "\{root\}/src"
1247
+ */
1248
+ sourceRoot?: string;
1249
+ /**
1250
+ * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
1251
+ *
1252
+ * @remarks
1253
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
1254
+ */
1255
+ configFile?: string;
1256
+ /**
1257
+ * Should the Powerlines CLI processes skip installing missing packages?
1258
+ *
1259
+ * @remarks
1260
+ * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
1261
+ *
1262
+ * @defaultValue false
1263
+ */
1264
+ skipInstalls?: boolean;
1265
+ /**
1266
+ * Should the compiler processes skip any improvements that make use of cache?
1267
+ *
1268
+ * @defaultValue false
1269
+ */
1270
+ skipCache?: boolean;
1271
+ /**
1272
+ * A list of resolvable paths to plugins used during the build process
1273
+ */
1274
+ plugins?: PluginConfig<PluginContext<any>>[];
1275
+ /**
1276
+ * Environment-specific configurations
1277
+ */
1278
+ environments?: Record<string, EnvironmentConfig>;
1279
+ /**
1280
+ * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
1281
+ *
1282
+ * @remarks
1283
+ * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
1284
+ *
1285
+ * @defaultValue "powerlines"
1286
+ */
1287
+ framework?: string;
1288
+ }
1289
+ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
1290
+ build?: TBuildConfig & {
1291
+ /**
1292
+ * The build variant being used by the Powerlines engine.
1293
+ */
1294
+ variant?: TBuildVariant;
1295
+ };
1296
+ override?: Partial<TBuildResolvedConfig>;
1297
+ };
1298
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
1299
+ /**
1300
+ * The configuration provided while executing Powerlines commands.
1301
+ */
1302
+ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
1303
+ /**
1304
+ * A string identifier for the Powerlines command being executed
1305
+ */
1306
+ command: PowerlinesCommand;
1307
+ };
1308
+
1309
+ export type { BasePluginHookFunctions as B, Context as C, ExternalPluginHookFunctions as E, GenerateTypesResult as G, PluginContext as P, ResolvedConfig as R, PluginFactory as a, Plugin as b, PluginHookFunctions as c, PluginHookObject as d, PluginConfigObject as e, PluginConfigTuple as f, PluginConfig as g, PluginHook as h, EnvironmentConfig as i, EnvironmentResolvedConfig as j };