powerlines 0.24.8 → 0.25.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 (460) hide show
  1. package/dist/{api-C32Buv5_.d.ts → api-BTK8aYwE.d.cts} +1 -1
  2. package/dist/{api-wzd5AREv.d.cts → api-eyrYBmQh.d.ts} +1 -1
  3. package/dist/api.cjs +8 -6
  4. package/dist/api.d.cts +20 -22
  5. package/dist/api.d.ts +20 -22
  6. package/dist/api.js +7 -5
  7. package/dist/astro.cjs +12 -10
  8. package/dist/astro.d.cts +19 -21
  9. package/dist/astro.d.ts +19 -21
  10. package/dist/astro.js +10 -8
  11. package/dist/{chunk-JKBJF3UI.js → chunk-2MYPFASJ.js} +2 -0
  12. package/dist/chunk-2VIXD2XB.js +3 -0
  13. package/dist/{chunk-OB7MYWHE.js → chunk-44PO64SX.js} +4 -2
  14. package/dist/chunk-4JCNAKOE.cjs +4 -0
  15. package/dist/{chunk-QH4TS5V4.cjs → chunk-6MFZ436T.cjs} +978 -1032
  16. package/dist/chunk-6ZGIV2SU.cjs +4 -0
  17. package/dist/chunk-7BZQBW77.cjs +4 -0
  18. package/dist/{chunk-JQCWV4DT.js → chunk-7LKYXMB3.js} +2 -0
  19. package/dist/{chunk-SHUYVCID.js → chunk-7QVYU63E.js} +2 -0
  20. package/dist/chunk-AFJCY3R6.js +3 -0
  21. package/dist/chunk-AXIRZAL7.js +3 -0
  22. package/dist/chunk-BTNHSS2P.cjs +13 -0
  23. package/dist/{chunk-FQXHIKCM.cjs → chunk-C2U4ATHO.cjs} +9 -7
  24. package/dist/chunk-DFLNRC3B.cjs +4 -0
  25. package/dist/chunk-DS7OM4NX.cjs +4 -0
  26. package/dist/{chunk-W5X3ZEZ5.js → chunk-EBXVKPUX.js} +2 -0
  27. package/dist/{chunk-X74SYWFL.cjs → chunk-G2EHTXK6.cjs} +9 -7
  28. package/dist/chunk-GIE6OE3X.js +3 -0
  29. package/dist/chunk-HJW7OH6E.js +3 -0
  30. package/dist/{chunk-MOXO6WJO.js → chunk-HSIMIWOH.js} +3 -1
  31. package/dist/{chunk-5IBA5HC2.cjs → chunk-HTJKPEWU.cjs} +6 -4
  32. package/dist/chunk-IHUNA3MO.cjs +4 -0
  33. package/dist/chunk-JU2HWIWS.js +12 -0
  34. package/dist/{chunk-BCHFSOQ4.js → chunk-LQXE5JHF.js} +906 -957
  35. package/dist/chunk-MBBNZS6K.cjs +16 -0
  36. package/dist/{chunk-3TNZWTLG.js → chunk-NNADGQRN.js} +5 -3
  37. package/dist/chunk-OYASPHNL.js +3 -0
  38. package/dist/chunk-PCCFAZML.js +3 -0
  39. package/dist/{chunk-USNT2KNT.cjs → chunk-PK6SKIKE.cjs} +2 -0
  40. package/dist/{chunk-ETKZMGLN.cjs → chunk-PSTCR335.cjs} +2 -0
  41. package/dist/chunk-Q7EJVZVI.cjs +4 -0
  42. package/dist/{chunk-CJSGAITR.js → chunk-S7MXT5A2.js} +3 -1
  43. package/dist/{chunk-7RWEBVQC.cjs → chunk-SDVEUTY2.cjs} +13 -11
  44. package/dist/{chunk-OLCL34MI.js → chunk-SYDUPBME.js} +6 -4
  45. package/dist/chunk-TLHFXGYV.js +3 -0
  46. package/dist/chunk-TP5MEMLG.cjs +12 -0
  47. package/dist/chunk-VNRXLY2T.js +3 -0
  48. package/dist/chunk-VQCQRLGM.cjs +4 -0
  49. package/dist/chunk-XZO6ZJQP.cjs +4 -0
  50. package/dist/{chunk-XP7OML7S.cjs → chunk-YUX7LOBU.cjs} +2 -0
  51. package/dist/chunk-YZZUOOPS.cjs +4 -0
  52. package/dist/chunk-Z5H7LD6W.js +3 -0
  53. package/dist/{chunk-VBR53KGY.js → chunk-Z5UEYORO.js} +5 -3
  54. package/dist/{chunk-PAMSESZV.cjs → chunk-Z6ARQDHR.cjs} +2 -0
  55. package/dist/config.cjs +5 -3
  56. package/dist/config.d.cts +19 -21
  57. package/dist/config.d.ts +19 -21
  58. package/dist/config.js +4 -2
  59. package/dist/{resolved-CSqGKlA5.d.cts → context-TizkCfOv.d.cts} +848 -849
  60. package/dist/{resolved-BABoCnXm.d.ts → context-jhcT1Vi1.d.ts} +848 -849
  61. package/dist/esbuild.cjs +13 -11
  62. package/dist/esbuild.d.cts +19 -21
  63. package/dist/esbuild.d.ts +19 -21
  64. package/dist/esbuild.js +10 -8
  65. package/dist/farm.cjs +9 -7
  66. package/dist/farm.d.cts +19 -21
  67. package/dist/farm.d.ts +19 -21
  68. package/dist/farm.js +8 -6
  69. package/dist/index.cjs +39 -41
  70. package/dist/index.d.cts +30 -55
  71. package/dist/index.d.ts +30 -55
  72. package/dist/index.js +20 -18
  73. package/dist/lib/{api-CDUN9en8.d.ts → api-CCOhyMZo.d.cts} +1 -1
  74. package/dist/lib/{api-BRMITKt-.d.cts → api-CpJJXdtL.d.ts} +1 -1
  75. package/dist/lib/build/esbuild.cjs +5 -5
  76. package/dist/lib/build/esbuild.d.cts +2 -2
  77. package/dist/lib/build/esbuild.d.ts +2 -2
  78. package/dist/lib/build/esbuild.js +2 -2
  79. package/dist/lib/build/index.cjs +25 -25
  80. package/dist/lib/build/index.d.cts +4 -4
  81. package/dist/lib/build/index.d.ts +4 -4
  82. package/dist/lib/build/index.js +9 -9
  83. package/dist/lib/build/rolldown.cjs +3 -3
  84. package/dist/lib/build/rolldown.d.cts +2 -2
  85. package/dist/lib/build/rolldown.d.ts +2 -2
  86. package/dist/lib/build/rolldown.js +2 -2
  87. package/dist/lib/build/rollup.cjs +3 -3
  88. package/dist/lib/build/rollup.d.cts +2 -2
  89. package/dist/lib/build/rollup.d.ts +2 -2
  90. package/dist/lib/build/rollup.js +1 -1
  91. package/dist/lib/build/rspack.cjs +2 -2
  92. package/dist/lib/build/rspack.d.cts +2 -2
  93. package/dist/lib/build/rspack.d.ts +2 -2
  94. package/dist/lib/build/rspack.js +1 -1
  95. package/dist/lib/build/tsup.cjs +6 -6
  96. package/dist/lib/build/tsup.d.cts +2 -2
  97. package/dist/lib/build/tsup.d.ts +2 -2
  98. package/dist/lib/build/tsup.js +3 -3
  99. package/dist/lib/build/unbuild.cjs +5 -5
  100. package/dist/lib/build/unbuild.d.cts +4 -4
  101. package/dist/lib/build/unbuild.d.ts +4 -4
  102. package/dist/lib/build/unbuild.js +2 -2
  103. package/dist/lib/build/vite.cjs +5 -5
  104. package/dist/lib/build/vite.d.cts +2 -2
  105. package/dist/lib/build/vite.d.ts +2 -2
  106. package/dist/lib/build/vite.js +3 -3
  107. package/dist/lib/build/webpack.cjs +2 -2
  108. package/dist/lib/build/webpack.d.cts +2 -2
  109. package/dist/lib/build/webpack.d.ts +2 -2
  110. package/dist/lib/build/webpack.js +1 -1
  111. package/dist/lib/chunk-3T56KQ7U.cjs +49 -0
  112. package/dist/lib/{chunk-PZLO6FZW.js → chunk-3W53W5J2.js} +2 -2
  113. package/dist/lib/chunk-4W6WV35V.js +108 -0
  114. package/dist/lib/chunk-6OYSDQXE.cjs +139 -0
  115. package/dist/lib/{chunk-EV357RFB.cjs → chunk-7MHUTBEC.cjs} +1 -3
  116. package/dist/lib/{chunk-A2NFSQ5K.js → chunk-7OVZZWGY.js} +1 -1
  117. package/dist/lib/chunk-A2NW7WAN.js +47 -0
  118. package/dist/lib/chunk-D6MI2V6R.cjs +115 -0
  119. package/dist/lib/{chunk-VHLINWXG.js → chunk-DLVVEHMU.js} +1 -1
  120. package/dist/lib/{chunk-XLYMVIVD.cjs → chunk-DNQBXFNE.cjs} +10 -10
  121. package/dist/lib/{chunk-UGVHYKKN.js → chunk-DYLE5FD3.js} +39 -2
  122. package/dist/lib/{chunk-AKBAX4FH.js → chunk-EN52JYUK.js} +1 -1
  123. package/dist/lib/{chunk-JYDGFQIV.cjs → chunk-F2CXZUSB.cjs} +1 -1
  124. package/dist/lib/{chunk-7VJ42H2I.cjs → chunk-HRRI4KOM.cjs} +1 -3
  125. package/dist/lib/{chunk-LPRZ3HD4.cjs → chunk-IXTLRVAK.cjs} +3 -3
  126. package/dist/lib/{chunk-SYF7QG2J.js → chunk-J3BW52BU.js} +1 -1
  127. package/dist/lib/chunk-KFDNKOXM.js +56 -0
  128. package/dist/lib/chunk-L56XA427.js +137 -0
  129. package/dist/lib/{chunk-6PPZCPME.cjs → chunk-LOW2TIQ6.cjs} +2 -2
  130. package/dist/lib/{chunk-TMZCGC5U.js → chunk-MI55FDCZ.js} +1 -1
  131. package/dist/lib/{chunk-DUZJ7ZF2.cjs → chunk-MKKWFHGE.cjs} +2 -2
  132. package/dist/lib/{chunk-ISBHXSDH.cjs → chunk-N5XEKCVW.cjs} +1 -1
  133. package/dist/lib/{chunk-XZFEHPYE.js → chunk-N5YLKWC2.js} +1 -1
  134. package/dist/lib/chunk-NIRFKQAD.js +845 -0
  135. package/dist/lib/{chunk-YMHOAMCU.cjs → chunk-NLJR4WIX.cjs} +41 -4
  136. package/dist/lib/{chunk-L3HESXYF.cjs → chunk-NUE5DIH3.cjs} +3 -3
  137. package/dist/lib/chunk-OBA5U4Y2.js +1059 -0
  138. package/dist/lib/{chunk-FQLZZYYO.js → chunk-OEF6EHQV.js} +1 -3
  139. package/dist/lib/{chunk-WTTBXYFQ.js → chunk-OFXWRM3U.js} +2 -2
  140. package/dist/lib/chunk-ONETLSPO.js +85 -0
  141. package/dist/lib/{chunk-2OV26JXJ.cjs → chunk-PQRWG64T.cjs} +3 -3
  142. package/dist/lib/chunk-R33US3PV.cjs +1081 -0
  143. package/dist/lib/{chunk-OA7OL7HF.cjs → chunk-SFEEJZLK.cjs} +38 -66
  144. package/dist/lib/{chunk-H6EOZSIZ.js → chunk-TAVG226Z.js} +1 -1
  145. package/dist/lib/{chunk-DALRRHB4.cjs → chunk-TSFG3WEA.cjs} +1 -1
  146. package/dist/lib/{chunk-RMA2PMP7.cjs → chunk-TZCC5IWH.cjs} +3 -3
  147. package/dist/lib/chunk-VHCBD2IS.js +149 -0
  148. package/dist/lib/{chunk-HY6DNFCT.js → chunk-VODWHWD6.js} +2 -2
  149. package/dist/lib/{chunk-2X5DUDNT.js → chunk-W6GWSJ22.js} +2 -2
  150. package/dist/lib/chunk-WBSA6OG6.cjs +860 -0
  151. package/dist/lib/{chunk-TOCNXURI.cjs → chunk-WCXA5WFX.cjs} +4 -4
  152. package/dist/lib/{chunk-6I5PL7H2.js → chunk-WGSZ4X6N.js} +1 -3
  153. package/dist/lib/{chunk-T2KQZC5K.js → chunk-WLDQUTFD.js} +27 -54
  154. package/dist/lib/{chunk-AOHJEL2Q.js → chunk-WOKPJMGJ.js} +3 -3
  155. package/dist/lib/{chunk-TDJNFAOV.cjs → chunk-X6JDYLWM.cjs} +1 -1
  156. package/dist/lib/chunk-XLHFUATD.cjs +151 -0
  157. package/dist/lib/chunk-XUYQYUWZ.cjs +87 -0
  158. package/dist/lib/chunk-YYEAV24J.cjs +67 -0
  159. package/dist/lib/{config-D8KrE7SZ.d.cts → config-Cqxh4V21.d.cts} +58 -475
  160. package/dist/lib/{config-DBIFdRoq.d.ts → config-D-WwQL-4.d.ts} +58 -475
  161. package/dist/lib/config-file.d.cts +2 -2
  162. package/dist/lib/config-file.d.ts +2 -2
  163. package/dist/lib/contexts/api-context.cjs +12 -7
  164. package/dist/lib/contexts/api-context.d.cts +27 -4
  165. package/dist/lib/contexts/api-context.d.ts +27 -4
  166. package/dist/lib/contexts/api-context.js +11 -6
  167. package/dist/lib/contexts/context.cjs +10 -5
  168. package/dist/lib/contexts/context.d.cts +7 -7
  169. package/dist/lib/contexts/context.d.ts +7 -7
  170. package/dist/lib/contexts/context.js +9 -4
  171. package/dist/lib/contexts/environment-context.cjs +11 -6
  172. package/dist/lib/contexts/environment-context.d.cts +4 -4
  173. package/dist/lib/contexts/environment-context.d.ts +4 -4
  174. package/dist/lib/contexts/environment-context.js +10 -5
  175. package/dist/lib/contexts/index.cjs +14 -9
  176. package/dist/lib/contexts/index.d.cts +4 -4
  177. package/dist/lib/contexts/index.d.ts +4 -4
  178. package/dist/lib/contexts/index.js +11 -6
  179. package/dist/lib/contexts/plugin-context.d.cts +4 -4
  180. package/dist/lib/contexts/plugin-context.d.ts +4 -4
  181. package/dist/lib/entry.cjs +9 -9
  182. package/dist/lib/entry.d.cts +2 -2
  183. package/dist/lib/entry.d.ts +2 -2
  184. package/dist/lib/entry.js +1 -1
  185. package/dist/lib/fs/helpers.cjs +47 -0
  186. package/dist/lib/fs/helpers.d.cts +74 -0
  187. package/dist/lib/fs/helpers.d.ts +74 -0
  188. package/dist/lib/fs/helpers.js +2 -0
  189. package/dist/lib/fs/index.cjs +17 -0
  190. package/dist/lib/fs/index.d.cts +33 -0
  191. package/dist/lib/fs/index.d.ts +33 -0
  192. package/dist/lib/fs/index.js +8 -0
  193. package/dist/lib/fs/storage/base.cjs +11 -0
  194. package/dist/lib/fs/storage/base.d.cts +138 -0
  195. package/dist/lib/fs/storage/base.d.ts +138 -0
  196. package/dist/lib/fs/storage/base.js +2 -0
  197. package/dist/lib/fs/storage/file-system.cjs +13 -0
  198. package/dist/lib/fs/storage/file-system.d.cts +90 -0
  199. package/dist/lib/fs/storage/file-system.d.ts +90 -0
  200. package/dist/lib/fs/storage/file-system.js +4 -0
  201. package/dist/lib/fs/storage/index.cjs +22 -0
  202. package/dist/lib/fs/storage/index.d.cts +6 -0
  203. package/dist/lib/fs/storage/index.d.ts +6 -0
  204. package/dist/lib/fs/storage/index.js +5 -0
  205. package/dist/lib/fs/storage/virtual.cjs +12 -0
  206. package/dist/lib/fs/storage/virtual.d.cts +66 -0
  207. package/dist/lib/fs/storage/virtual.d.ts +66 -0
  208. package/dist/lib/fs/storage/virtual.js +3 -0
  209. package/dist/lib/fs/vfs.cjs +16 -0
  210. package/dist/lib/fs/vfs.d.cts +247 -0
  211. package/dist/lib/fs/vfs.d.ts +247 -0
  212. package/dist/lib/fs/vfs.js +7 -0
  213. package/dist/lib/fs-Dg-aTfiN.d.cts +378 -0
  214. package/dist/lib/fs-Dg-aTfiN.d.ts +378 -0
  215. package/dist/lib/index.cjs +62 -68
  216. package/dist/lib/index.d.cts +18 -356
  217. package/dist/lib/index.d.ts +18 -356
  218. package/dist/lib/index.js +19 -13
  219. package/dist/lib/{internal-CaGANOWK.d.cts → internal-Cl7s1iAA.d.cts} +2 -2
  220. package/dist/lib/{internal-1qCyw7bA.d.ts → internal-W5pvS6e9.d.ts} +2 -2
  221. package/dist/lib/logger.d.cts +2 -2
  222. package/dist/lib/logger.d.ts +2 -2
  223. package/dist/lib/typescript/import-transformer.cjs +7 -45
  224. package/dist/lib/typescript/import-transformer.d.cts +2 -2
  225. package/dist/lib/typescript/import-transformer.d.ts +2 -2
  226. package/dist/lib/typescript/import-transformer.js +2 -47
  227. package/dist/lib/typescript/index.cjs +10 -22
  228. package/dist/lib/typescript/index.d.cts +4 -4
  229. package/dist/lib/typescript/index.d.ts +4 -4
  230. package/dist/lib/typescript/index.js +2 -2
  231. package/dist/lib/typescript/ts-morph.cjs +6 -2
  232. package/dist/lib/typescript/ts-morph.d.cts +28 -4
  233. package/dist/lib/typescript/ts-morph.d.ts +28 -4
  234. package/dist/lib/typescript/ts-morph.js +1 -1
  235. package/dist/lib/unplugin/factory.cjs +14 -9
  236. package/dist/lib/unplugin/factory.d.cts +4 -4
  237. package/dist/lib/unplugin/factory.d.ts +4 -4
  238. package/dist/lib/unplugin/factory.js +13 -8
  239. package/dist/lib/unplugin/helpers.d.cts +2 -2
  240. package/dist/lib/unplugin/helpers.d.ts +2 -2
  241. package/dist/lib/unplugin/index.cjs +16 -11
  242. package/dist/lib/unplugin/index.d.cts +4 -4
  243. package/dist/lib/unplugin/index.d.ts +4 -4
  244. package/dist/lib/unplugin/index.js +14 -9
  245. package/dist/lib/unplugin/plugin.cjs +2 -2
  246. package/dist/lib/unplugin/plugin.d.cts +4 -4
  247. package/dist/lib/unplugin/plugin.d.ts +4 -4
  248. package/dist/lib/unplugin/plugin.js +1 -1
  249. package/dist/lib/{unplugin-CEeJqADD.d.ts → unplugin-Cg2NoKj0.d.ts} +2 -2
  250. package/dist/lib/{unplugin-bUSyjd0S.d.cts → unplugin-trF-VLnO.d.cts} +2 -2
  251. package/dist/lib/utilities/bundle.cjs +4 -4
  252. package/dist/lib/utilities/bundle.d.cts +2 -2
  253. package/dist/lib/utilities/bundle.d.ts +2 -2
  254. package/dist/lib/utilities/bundle.js +3 -3
  255. package/dist/lib/utilities/cache.d.cts +2 -2
  256. package/dist/lib/utilities/cache.d.ts +2 -2
  257. package/dist/lib/utilities/file-header.d.cts +2 -2
  258. package/dist/lib/utilities/file-header.d.ts +2 -2
  259. package/dist/lib/utilities/index.cjs +22 -22
  260. package/dist/lib/utilities/index.d.cts +2 -2
  261. package/dist/lib/utilities/index.d.ts +2 -2
  262. package/dist/lib/utilities/index.js +6 -6
  263. package/dist/lib/utilities/meta.cjs +7 -7
  264. package/dist/lib/utilities/meta.d.cts +2 -2
  265. package/dist/lib/utilities/meta.d.ts +2 -2
  266. package/dist/lib/utilities/meta.js +1 -1
  267. package/dist/lib/utilities/resolve.cjs +5 -5
  268. package/dist/lib/utilities/resolve.d.cts +2 -2
  269. package/dist/lib/utilities/resolve.d.ts +2 -2
  270. package/dist/lib/utilities/resolve.js +4 -4
  271. package/dist/lib/utilities/source-file.d.cts +2 -2
  272. package/dist/lib/utilities/source-file.d.ts +2 -2
  273. package/dist/lib/utilities/source-map.d.cts +2 -2
  274. package/dist/lib/utilities/source-map.d.ts +2 -2
  275. package/dist/lib/utilities/worker.d.cts +2 -2
  276. package/dist/lib/utilities/worker.d.ts +2 -2
  277. package/dist/lib/utilities/write-file.d.cts +2 -2
  278. package/dist/lib/utilities/write-file.d.ts +2 -2
  279. package/dist/next.cjs +11 -9
  280. package/dist/next.js +9 -7
  281. package/dist/nuxt.cjs +13 -11
  282. package/dist/nuxt.js +11 -9
  283. package/dist/plugin-utils/{chunk-JHTLGE4X.js → chunk-K2GWRZPV.js} +1 -1
  284. package/dist/plugin-utils/{chunk-HSYQWNIH.cjs → chunk-VWFJOPKC.cjs} +1 -1
  285. package/dist/plugin-utils/{context-BITGF5LZ.d.cts → context-PtfEjz3_.d.cts} +187 -230
  286. package/dist/plugin-utils/{context-BITGF5LZ.d.ts → context-PtfEjz3_.d.ts} +187 -230
  287. package/dist/plugin-utils/context-helpers.d.cts +1 -2
  288. package/dist/plugin-utils/context-helpers.d.ts +1 -2
  289. package/dist/plugin-utils/enforce.d.cts +1 -2
  290. package/dist/plugin-utils/enforce.d.ts +1 -2
  291. package/dist/plugin-utils/extend.d.cts +1 -2
  292. package/dist/plugin-utils/extend.d.ts +1 -2
  293. package/dist/plugin-utils/get-config-path.d.cts +1 -2
  294. package/dist/plugin-utils/get-config-path.d.ts +1 -2
  295. package/dist/plugin-utils/helpers.d.cts +1 -2
  296. package/dist/plugin-utils/helpers.d.ts +1 -2
  297. package/dist/plugin-utils/index.cjs +2 -2
  298. package/dist/plugin-utils/index.d.cts +1 -2
  299. package/dist/plugin-utils/index.d.ts +1 -2
  300. package/dist/plugin-utils/index.js +1 -1
  301. package/dist/plugin-utils/merge.d.cts +1 -2
  302. package/dist/plugin-utils/merge.d.ts +1 -2
  303. package/dist/plugin-utils/paths.cjs +2 -2
  304. package/dist/plugin-utils/paths.d.cts +2 -3
  305. package/dist/plugin-utils/paths.d.ts +2 -3
  306. package/dist/plugin-utils/paths.js +1 -1
  307. package/dist/rolldown.cjs +9 -7
  308. package/dist/rolldown.d.cts +19 -21
  309. package/dist/rolldown.d.ts +19 -21
  310. package/dist/rolldown.js +8 -6
  311. package/dist/rollup.cjs +9 -7
  312. package/dist/rollup.d.cts +19 -21
  313. package/dist/rollup.d.ts +19 -21
  314. package/dist/rollup.js +8 -6
  315. package/dist/rspack.cjs +9 -7
  316. package/dist/rspack.d.cts +18 -20
  317. package/dist/rspack.d.ts +18 -20
  318. package/dist/rspack.js +8 -6
  319. package/dist/tsup.cjs +12 -10
  320. package/dist/tsup.js +10 -8
  321. package/dist/types/api.cjs +3 -1
  322. package/dist/types/api.cjs.map +1 -0
  323. package/dist/types/api.d.cts +20 -22
  324. package/dist/types/api.d.ts +20 -22
  325. package/dist/types/api.js +3 -1
  326. package/dist/types/api.js.map +1 -0
  327. package/dist/types/babel.cjs +3 -1
  328. package/dist/types/babel.cjs.map +1 -0
  329. package/dist/types/babel.d.cts +17 -19
  330. package/dist/types/babel.d.ts +17 -19
  331. package/dist/types/babel.js +3 -1
  332. package/dist/types/babel.js.map +1 -0
  333. package/dist/types/build.cjs +3 -1
  334. package/dist/types/build.cjs.map +1 -0
  335. package/dist/types/build.js +3 -1
  336. package/dist/types/build.js.map +1 -0
  337. package/dist/types/commands.cjs +5 -3
  338. package/dist/types/commands.cjs.map +1 -0
  339. package/dist/types/commands.d.cts +18 -20
  340. package/dist/types/commands.d.ts +18 -20
  341. package/dist/types/commands.js +4 -2
  342. package/dist/types/commands.js.map +1 -0
  343. package/dist/types/config.cjs +3 -1
  344. package/dist/types/config.cjs.map +1 -0
  345. package/dist/types/config.d.cts +2 -4
  346. package/dist/types/config.d.ts +2 -4
  347. package/dist/types/config.js +3 -1
  348. package/dist/types/config.js.map +1 -0
  349. package/dist/types/context.cjs +5 -3
  350. package/dist/types/context.cjs.map +1 -0
  351. package/dist/types/context.d.cts +8 -10
  352. package/dist/types/context.d.ts +8 -10
  353. package/dist/types/context.js +4 -2
  354. package/dist/types/context.js.map +1 -0
  355. package/dist/types/fs.cjs +10 -4
  356. package/dist/types/fs.cjs.map +1 -0
  357. package/dist/types/fs.d.cts +138 -184
  358. package/dist/types/fs.d.ts +138 -184
  359. package/dist/types/fs.js +4 -2
  360. package/dist/types/fs.js.map +1 -0
  361. package/dist/types/hooks.cjs +3 -1
  362. package/dist/types/hooks.cjs.map +1 -0
  363. package/dist/types/hooks.d.cts +19 -21
  364. package/dist/types/hooks.d.ts +19 -21
  365. package/dist/types/hooks.js +3 -1
  366. package/dist/types/hooks.js.map +1 -0
  367. package/dist/types/index.cjs +26 -20
  368. package/dist/types/index.cjs.map +1 -0
  369. package/dist/types/index.d.cts +13 -15
  370. package/dist/types/index.d.ts +13 -15
  371. package/dist/types/index.js +17 -15
  372. package/dist/types/index.js.map +1 -0
  373. package/dist/types/internal.cjs +2 -0
  374. package/dist/types/internal.cjs.map +1 -0
  375. package/dist/types/internal.d.cts +20 -22
  376. package/dist/types/internal.d.ts +20 -22
  377. package/dist/types/internal.js +2 -0
  378. package/dist/types/internal.js.map +1 -0
  379. package/dist/types/plugin.cjs +5 -3
  380. package/dist/types/plugin.cjs.map +1 -0
  381. package/dist/types/plugin.d.cts +9 -11
  382. package/dist/types/plugin.d.ts +9 -11
  383. package/dist/types/plugin.js +4 -2
  384. package/dist/types/plugin.js.map +1 -0
  385. package/dist/types/resolved.cjs +3 -1
  386. package/dist/types/resolved.cjs.map +1 -0
  387. package/dist/types/resolved.d.cts +7 -9
  388. package/dist/types/resolved.d.ts +7 -9
  389. package/dist/types/resolved.js +3 -1
  390. package/dist/types/resolved.js.map +1 -0
  391. package/dist/types/tsconfig.cjs +3 -1
  392. package/dist/types/tsconfig.cjs.map +1 -0
  393. package/dist/types/tsconfig.js +3 -1
  394. package/dist/types/tsconfig.js.map +1 -0
  395. package/dist/types/typedoc.cjs +3 -1
  396. package/dist/types/typedoc.cjs.map +1 -0
  397. package/dist/types/typedoc.js +3 -1
  398. package/dist/types/typedoc.js.map +1 -0
  399. package/dist/types/unplugin.cjs +3 -1
  400. package/dist/types/unplugin.cjs.map +1 -0
  401. package/dist/types/unplugin.d.cts +11 -13
  402. package/dist/types/unplugin.d.ts +11 -13
  403. package/dist/types/unplugin.js +3 -1
  404. package/dist/types/unplugin.js.map +1 -0
  405. package/dist/unloader.cjs +9 -7
  406. package/dist/unloader.d.cts +19 -21
  407. package/dist/unloader.d.ts +19 -21
  408. package/dist/unloader.js +8 -6
  409. package/dist/unplugin.cjs +20 -20
  410. package/dist/unplugin.d.cts +19 -21
  411. package/dist/unplugin.d.ts +19 -21
  412. package/dist/unplugin.js +10 -10
  413. package/dist/vite.cjs +13 -11
  414. package/dist/vite.d.cts +19 -21
  415. package/dist/vite.d.ts +19 -21
  416. package/dist/vite.js +10 -8
  417. package/dist/webpack.cjs +12 -10
  418. package/dist/webpack.d.cts +19 -21
  419. package/dist/webpack.d.ts +19 -21
  420. package/dist/webpack.js +9 -7
  421. package/package.json +72 -19
  422. package/schemas/fs.capnp +4 -59
  423. package/dist/chunk-2NO7N5OW.cjs +0 -2
  424. package/dist/chunk-7GYTTM4M.cjs +0 -2
  425. package/dist/chunk-AENPRFWJ.cjs +0 -2
  426. package/dist/chunk-AYKZK666.cjs +0 -8
  427. package/dist/chunk-BUR2JQ6G.cjs +0 -11
  428. package/dist/chunk-DRXFQCNC.js +0 -1
  429. package/dist/chunk-FNZDWE4L.js +0 -1
  430. package/dist/chunk-GHJU2KGP.cjs +0 -2
  431. package/dist/chunk-GRU7B3QM.cjs +0 -2
  432. package/dist/chunk-HQFZ64VC.cjs +0 -2
  433. package/dist/chunk-J4BQZHTQ.js +0 -1
  434. package/dist/chunk-JGB5YQ2U.js +0 -1
  435. package/dist/chunk-KALR2O2F.cjs +0 -2
  436. package/dist/chunk-LOUZXJFY.cjs +0 -10
  437. package/dist/chunk-OO3YXM72.js +0 -1
  438. package/dist/chunk-QE3WGMAP.js +0 -1
  439. package/dist/chunk-SMNKPH4T.js +0 -1
  440. package/dist/chunk-T2P533I5.js +0 -1
  441. package/dist/chunk-V3MLQDZQ.js +0 -1
  442. package/dist/chunk-VT7NVLLU.js +0 -5
  443. package/dist/chunk-YRJ4MLVL.cjs +0 -2
  444. package/dist/chunk-ZC43PZXS.cjs +0 -2
  445. package/dist/lib/chunk-3MZQ4MQX.cjs +0 -2360
  446. package/dist/lib/chunk-5JAFU45Z.js +0 -2324
  447. package/dist/lib/chunk-HAXL7QE7.js +0 -154
  448. package/dist/lib/chunk-SAS5EPBD.cjs +0 -107
  449. package/dist/lib/chunk-WUYK74EH.cjs +0 -165
  450. package/dist/lib/chunk-YQ3ODCHV.js +0 -105
  451. package/dist/lib/typescript/compiler-host.cjs +0 -164
  452. package/dist/lib/typescript/compiler-host.d.cts +0 -63
  453. package/dist/lib/typescript/compiler-host.d.ts +0 -63
  454. package/dist/lib/typescript/compiler-host.js +0 -156
  455. package/dist/lib/typescript/program.cjs +0 -27
  456. package/dist/lib/typescript/program.d.cts +0 -68
  457. package/dist/lib/typescript/program.d.ts +0 -68
  458. package/dist/lib/typescript/program.js +0 -2
  459. /package/dist/{chunk-2NCILNCH.cjs → lib/chunk-K2SFTPN3.cjs} +0 -0
  460. /package/dist/{chunk-BLNT5INX.js → lib/chunk-NQAHFTUW.js} +0 -0
@@ -1,27 +1,100 @@
1
- import { MaybePromise, FunctionLike, NonUndefined, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
2
- import { TypeDefinitionParameter, TypeDefinition } from '@stryke/types/configuration';
3
- import { AssetGlob } from '@stryke/types/file';
4
- import { PreviewOptions, ResolvedConfig as ResolvedConfig$2, ResolvedPreviewOptions } from 'vite';
5
- import { UnpluginBuildVariant, BuildConfig, BuildResolvedConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, BuildVariant } from './types/build.js';
6
- import { PluginPass, PluginObj, PluginItem, TransformOptions, transformAsync } from '@babel/core';
7
- import { Format } from '@storm-software/build-tools/types';
8
- import { LogLevelLabel } from '@storm-software/config-tools/types';
9
- import { StormWorkspaceConfig } from '@storm-software/config/types';
10
- import { ResolvedConfig as ResolvedConfig$1, ConfigLayer } from 'c12';
11
- import { BabelAPI } from '@babel/helper-plugin-utils';
12
1
  import { EnvPaths } from '@stryke/env/get-env-paths';
2
+ import { MaybePromise, NonUndefined, FunctionLike, DeepPartial as DeepPartial$1 } from '@stryke/types/base';
13
3
  import { PackageJson } from '@stryke/types/package-json';
14
4
  import { Worker } from 'jest-worker';
15
5
  import { Jiti } from 'jiti';
16
6
  import MagicString, { SourceMap } from 'magic-string';
17
- import { DirectoryJSON } from 'memfs';
18
7
  import { Range } from 'semver';
19
8
  import { Project } from 'ts-morph';
20
9
  import { Unimport } from 'unimport';
21
10
  import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginMessage, UnpluginContext, UnpluginBuildContext } from 'unplugin';
22
- import { VirtualFileSystemInterface, ResolveOptions, VirtualFile, PowerlinesWriteFileOptions, VirtualFileMetadata, OutputModeType } from './types/fs.js';
11
+ import { PluginPass, PluginObj, PluginItem, TransformOptions, transformAsync } from '@babel/core';
12
+ import { Format } from '@storm-software/build-tools/types';
13
+ import { LogLevelLabel } from '@storm-software/config-tools/types';
14
+ import { StormWorkspaceConfig } from '@storm-software/config/types';
15
+ import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
16
+ import { AssetGlob } from '@stryke/types/file';
17
+ import { ResolvedConfig as ResolvedConfig$1, ConfigLayer } from 'c12';
18
+ import { ResolvedPreviewOptions, PreviewOptions, ResolvedConfig as ResolvedConfig$2 } from 'vite';
19
+ import { BabelAPI } from '@babel/helper-plugin-utils';
20
+ import { StoragePort, StoragePreset, VirtualFileSystemInterface, ResolveOptions, VirtualFile } from './types/fs.js';
23
21
  import { ArrayValues } from '@stryke/types/array';
24
- import { ParsedTypeScriptConfig, TSConfig } from './types/tsconfig.js';
22
+ import { BuildVariant, UnpluginBuildVariant, BuildConfig, BuildResolvedConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig } from './types/build.js';
23
+ import { TSConfig, ParsedTypeScriptConfig } from './types/tsconfig.js';
24
+
25
+ interface NamedImportDefinition {
26
+ name: string;
27
+ source: string;
28
+ kind: "named";
29
+ }
30
+ interface DefaultImportDefinition {
31
+ source: string;
32
+ kind: "default";
33
+ }
34
+ type ImportDefinition = NamedImportDefinition | DefaultImportDefinition;
35
+ type BabelPluginPass<TState = unknown> = PluginPass & TState;
36
+ type BabelTransformPluginFilter = (code: string, id: string) => boolean;
37
+ type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
38
+ name: string;
39
+ log: LogFn;
40
+ api: BabelAPI;
41
+ options: TOptions;
42
+ context: TContext;
43
+ dirname: string;
44
+ }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
45
+ $$name: string;
46
+ };
47
+ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [
48
+ BabelTransformPlugin<TContext, TOptions, TState>,
49
+ TOptions,
50
+ BabelTransformPluginFilter
51
+ ];
52
+ type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | [
53
+ BabelTransformPlugin<TContext, TOptions, TState>,
54
+ TOptions,
55
+ BabelTransformPluginFilter | null
56
+ ];
57
+ type BabelTransformInput = Omit<TransformOptions & Required<Pick<TransformOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
58
+ interface BabelTransformPluginBuilderParams<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>> {
59
+ name: string;
60
+ log: LogFn;
61
+ api: BabelAPI;
62
+ options: TOptions;
63
+ context: TContext;
64
+ dirname: string;
65
+ }
66
+ type BabelTransformPluginBuilder<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = (params: BabelTransformPluginBuilderParams<TContext, TOptions>) => PluginObj<TState & BabelPluginPass<TOptions>>;
67
+ type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
68
+ /**
69
+ * A non-local import specifier represents an import that is not defined within the current module.
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * import { bar as baz } from 'foo';
74
+ * // { name: 'baz', module: 'foo', imported: 'bar' }
75
+ * ```
76
+ *
77
+ * @remarks
78
+ * It captures the details of an import statement, including the local name used in the module, the source module from which it is imported, and the original name of the export in the source module.
79
+ */
80
+ interface ImportSpecifier {
81
+ name?: string;
82
+ module: string;
83
+ imported: string;
84
+ }
85
+ declare type __ΩNamedImportDefinition = any[];
86
+ declare type __ΩDefaultImportDefinition = any[];
87
+ declare type __ΩImportDefinition = any[];
88
+ declare type __ΩBabelPluginPass = any[];
89
+ declare type __ΩBabelTransformPluginFilter = any[];
90
+ declare type __ΩBabelTransformPlugin = any[];
91
+ declare type __ΩBabelTransformPluginOptions = any[];
92
+ declare type __ΩResolvedBabelTransformPluginOptions = any[];
93
+ declare type __ΩBabelTransformInput = any[];
94
+ declare type __ΩBabelTransformPluginBuilderParams = any[];
95
+ declare type __ΩBabelTransformPluginBuilder = any[];
96
+ declare type __ΩDeclareBabelTransformPluginReturn = any[];
97
+ declare type __ΩImportSpecifier = any[];
25
98
 
26
99
  declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
27
100
  type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
@@ -29,6 +102,106 @@ type Commands<TContext extends Context = Context> = Record<CommandType, (this: T
29
102
  declare type __ΩCommandType = any[];
30
103
  declare type __ΩCommands = any[];
31
104
 
105
+ interface ResolvedEntryTypeDefinition extends TypeDefinition {
106
+ /**
107
+ * The user provided entry point in the source code
108
+ */
109
+ input: TypeDefinition;
110
+ /**
111
+ * An optional name to use in the package export during the build process
112
+ */
113
+ output?: string;
114
+ }
115
+ type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
116
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
117
+ /**
118
+ * The name of the environment
119
+ */
120
+ name: string;
121
+ /**
122
+ * Configuration options for the preview server
123
+ */
124
+ preview?: ResolvedPreviewOptions;
125
+ };
126
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
127
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
128
+ assets: ResolvedAssetGlob[];
129
+ }> & Pick<OutputConfig, "storage">;
130
+ /**
131
+ * The resolved options for the Powerlines project configuration.
132
+ */
133
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
134
+ /**
135
+ * The configuration options that were provided inline to the Powerlines CLI.
136
+ */
137
+ inlineConfig: InlineConfig<TUserConfig>;
138
+ /**
139
+ * The original configuration options that were provided by the user to the Powerlines process.
140
+ */
141
+ userConfig: TUserConfig;
142
+ /**
143
+ * A string identifier for the Powerlines command being executed.
144
+ */
145
+ command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
146
+ /**
147
+ * The root directory of the project's source code
148
+ *
149
+ * @defaultValue "\{projectRoot\}/src"
150
+ */
151
+ sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
152
+ /**
153
+ * The root directory of the project.
154
+ */
155
+ projectRoot: NonUndefined<TUserConfig["root"]>;
156
+ /**
157
+ * The type of project being built.
158
+ */
159
+ projectType: NonUndefined<TUserConfig["type"]>;
160
+ /**
161
+ * The output configuration options to use for the build process
162
+ */
163
+ output: OutputResolvedConfig;
164
+ /**
165
+ * Configuration provided to build processes
166
+ *
167
+ * @remarks
168
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
169
+ */
170
+ build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
171
+ /**
172
+ * The log level to use for the Powerlines processes.
173
+ *
174
+ * @defaultValue "info"
175
+ */
176
+ logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
177
+ };
178
+ type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
179
+ type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
180
+ type RspackResolvedConfig = ResolvedConfig<RspackUserConfig>;
181
+ type ESBuildResolvedConfig = ResolvedConfig<ESBuildUserConfig>;
182
+ type RollupResolvedConfig = ResolvedConfig<RollupUserConfig>;
183
+ type RolldownResolvedConfig = ResolvedConfig<RolldownUserConfig>;
184
+ type TsupResolvedConfig = ResolvedConfig<TsupUserConfig>;
185
+ type UnbuildResolvedConfig = ResolvedConfig<UnbuildUserConfig>;
186
+ type FarmResolvedConfig = ResolvedConfig<FarmUserConfig>;
187
+ type InferResolvedConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends undefined ? ResolvedConfig : TBuildVariant extends "webpack" ? WebpackResolvedConfig : TBuildVariant extends "rspack" ? RspackResolvedConfig : TBuildVariant extends "vite" ? ViteResolvedConfig : TBuildVariant extends "esbuild" ? ESBuildResolvedConfig : TBuildVariant extends "unbuild" ? UnbuildResolvedConfig : TBuildVariant extends "tsup" ? TsupResolvedConfig : TBuildVariant extends "rolldown" ? RolldownResolvedConfig : TBuildVariant extends "rollup" ? RollupResolvedConfig : TBuildVariant extends "farm" ? FarmResolvedConfig : ResolvedConfig;
188
+ declare type __ΩResolvedEntryTypeDefinition = any[];
189
+ declare type __ΩBabelResolvedConfig = any[];
190
+ declare type __ΩEnvironmentResolvedConfig = any[];
191
+ declare type __ΩResolvedAssetGlob = any[];
192
+ declare type __ΩOutputResolvedConfig = any[];
193
+ declare type __ΩResolvedConfig = any[];
194
+ declare type __ΩViteResolvedConfig = any[];
195
+ declare type __ΩWebpackResolvedConfig = any[];
196
+ declare type __ΩRspackResolvedConfig = any[];
197
+ declare type __ΩESBuildResolvedConfig = any[];
198
+ declare type __ΩRollupResolvedConfig = any[];
199
+ declare type __ΩRolldownResolvedConfig = any[];
200
+ declare type __ΩTsupResolvedConfig = any[];
201
+ declare type __ΩUnbuildResolvedConfig = any[];
202
+ declare type __ΩFarmResolvedConfig = any[];
203
+ declare type __ΩInferResolvedConfig = any[];
204
+
32
205
  interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
33
206
  /**
34
207
  * The order in which the plugin should be applied.
@@ -279,1097 +452,923 @@ declare type __ΩPluginBuildPlugins = any[];
279
452
  declare type __ΩPlugin = any[];
280
453
  declare type __ΩPluginNonHookFields = any[];
281
454
 
282
- type BaseHooks<TContext extends PluginContext = PluginContext> = BasePluginHookFunctions<TContext>;
283
- type BaseHookKeys<TContext extends PluginContext = PluginContext> = keyof BaseHooks<TContext>;
284
- type ExternalHooks<TContext extends PluginContext = PluginContext> = ExternalPluginHookFunctions<TContext>;
285
- type ExternalHookKeys<TContext extends PluginContext = PluginContext> = keyof ExternalHooks<TContext>;
286
- type Hooks<TContext extends PluginContext = PluginContext> = PluginHookFunctions<TContext>;
287
- type HookKeys<TContext extends PluginContext = PluginContext> = keyof Hooks<TContext>;
288
- interface BaseHooksListItem<TContext extends PluginContext = PluginContext, TKey extends BaseHookKeys<TContext> = BaseHookKeys<TContext>> extends PluginHookObject<BaseHooks<TContext>[TKey]> {
289
- plugin: Plugin<TContext>;
290
- }
291
- interface BaseHooksList<TContext extends PluginContext = PluginContext, TKey extends BaseHookKeys<TContext> = BaseHookKeys<TContext>> {
292
- preOrdered?: BaseHooksListItem<TContext, TKey>[];
293
- preEnforced?: BaseHooksListItem<TContext, TKey>[];
294
- normal?: BaseHooksListItem<TContext, TKey>[];
295
- postEnforced?: BaseHooksListItem<TContext, TKey>[];
296
- postOrdered?: BaseHooksListItem<TContext, TKey>[];
297
- }
298
- interface ExternalHooksListItem<TContext extends PluginContext = PluginContext, TKey extends ExternalHookKeys<TContext> = ExternalHookKeys<TContext>> {
455
+ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
456
+ /**
457
+ * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
458
+ */
459
+ type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
460
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
461
+ /**
462
+ * A configuration tuple for a Powerlines plugin.
463
+ */
464
+ type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
465
+ /**
466
+ * A configuration object for a Powerlines plugin.
467
+ */
468
+ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
469
+ plugin: string | PluginFactory<TContext, TOptions>;
470
+ options: TOptions;
471
+ } | {
299
472
  plugin: Plugin<TContext>;
300
- handler: ExternalHooks<TContext>[TKey];
301
- }
302
- type HooksList<TContext extends PluginContext = PluginContext> = {
303
- [TKey in BaseHookKeys<TContext>]?: BaseHooksList<TContext, TKey>;
304
- } & {
305
- [TKey in ExternalHookKeys<TContext>]?: ExternalHooksListItem<TContext, TKey>[];
473
+ options?: never;
306
474
  };
307
- type InferHookHandler<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Hooks<TContext>[TKey];
308
- type InferHookReturnType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ReturnType<InferHookHandler<TContext, TKey>> extends Promise<infer U> ? U extends Promise<infer V> ? V : U : ReturnType<InferHookHandler<TContext, TKey>>;
309
- type InferHookParameters<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Parameters<InferHookHandler<TContext, TKey>>;
310
- type InferHookThisType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ThisParameterType<InferHookHandler<TContext, TKey>>;
311
- declare type __ΩBaseHooks = any[];
312
- declare type __ΩBaseHookKeys = any[];
313
- declare type __ΩExternalHooks = any[];
314
- declare type __ΩExternalHookKeys = any[];
315
- declare type __ΩHooks = any[];
316
- declare type __ΩHookKeys = any[];
317
- declare type __ΩBaseHooksListItem = any[];
318
- declare type __ΩBaseHooksList = any[];
319
- declare type __ΩExternalHooksListItem = any[];
320
- declare type __ΩHooksList = any[];
321
- declare type __ΩInferHookHandler = any[];
322
- declare type __ΩInferHookReturnType = any[];
323
- declare type __ΩInferHookParameters = any[];
324
- declare type __ΩInferHookThisType = any[];
325
-
326
475
  /**
327
- * The severity level of a {@link LogRecord}.
476
+ * A configuration tuple for a Powerlines plugin.
328
477
  */
329
- type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
330
- declare const LogLevel: {
331
- DEBUG: LogLevel;
332
- INFO: LogLevel;
333
- WARNING: LogLevel;
334
- ERROR: LogLevel;
335
- FATAL: LogLevel;
336
- };
337
- type WorkerProcess<TExposedMethods extends ReadonlyArray<string>> = {
338
- [K in TExposedMethods[number]]: (data: any) => Promise<any>;
339
- } & {
340
- close: () => void;
341
- end: () => ReturnType<Worker["end"]>;
342
- };
343
- interface MetaInfo {
344
- /**
345
- * The checksum generated from the resolved options
346
- */
347
- checksum: string;
478
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
479
+ type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial$1<Plugin<TContext>>;
480
+ type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext>>;
481
+ type ProjectType = "application" | "library";
482
+ type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
348
483
  /**
349
- * The build id
484
+ * The Babel plugins to be used during the build process
350
485
  */
351
- buildId: string;
486
+ plugins?: BabelTransformPluginOptions[];
352
487
  /**
353
- * The release id
488
+ * The Babel presets to be used during the build process
354
489
  */
355
- releaseId: string;
490
+ presets?: BabelTransformPluginOptions[];
491
+ };
492
+ interface OutputConfig {
356
493
  /**
357
- * The build timestamp
494
+ * The path to output the final compiled files to
495
+ *
496
+ * @remarks
497
+ * If a value is not provided, Powerlines will attempt to:
498
+ * 1. Use the `outDir` value in the `tsconfig.json` file.
499
+ * 2. Use the `dist` directory in the project root directory.
500
+ *
501
+ * @defaultValue "dist/\{projectRoot\}"
358
502
  */
359
- timestamp: number;
503
+ outputPath?: string;
360
504
  /**
361
- * A hash that represents the path to the project root directory
505
+ * The output directory path for the project build.
506
+ *
507
+ * @remarks
508
+ * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
509
+ *
510
+ * @defaultValue "\{projectRoot\}/dist"
362
511
  */
363
- projectRootHash: string;
512
+ buildPath?: string;
364
513
  /**
365
- * A hash that represents the path to the project root directory
514
+ * The folder where the generated runtime artifacts will be located
515
+ *
516
+ * @remarks
517
+ * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
518
+ *
519
+ * @defaultValue "\{projectRoot\}/.powerlines"
366
520
  */
367
- configHash: string;
368
- }
369
- interface Resolver extends Jiti {
370
- plugin: Jiti;
371
- }
372
- interface TransformResult {
373
- code: string;
374
- map: SourceMap | null;
375
- }
376
- /**
377
- * The format for providing source code to the compiler
378
- */
379
- interface SourceFile {
521
+ artifactsPath?: string;
380
522
  /**
381
- * The name of the file to be compiled
523
+ * The path of the generated runtime declaration file relative to the workspace root.
524
+ *
525
+ * @defaultValue "\{projectRoot\}/powerlines.d.ts"
382
526
  */
383
- id: string;
527
+ dts?: string | false;
384
528
  /**
385
- * The source code to be compiled
529
+ * A prefix to use for identifying builtin modules
530
+ *
531
+ * @remarks
532
+ * 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"`.
533
+ *
534
+ * @defaultValue "powerlines"
386
535
  */
387
- code: MagicString;
536
+ builtinPrefix?: string;
388
537
  /**
389
- * The environment variables used in the source code
538
+ * The module format of the output files
539
+ *
540
+ * @remarks
541
+ * 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.
542
+ *
543
+ * @defaultValue "esm"
390
544
  */
391
- env: string[];
545
+ format?: Format | Format[];
392
546
  /**
393
- * The result of the transformation
547
+ * A list of assets to copy to the output directory
548
+ *
549
+ * @remarks
550
+ * 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.
394
551
  */
395
- result?: TransformResult;
396
- }
397
- type UnimportContext = Omit<Unimport, "injectImports"> & {
398
- dumpImports: () => Promise<void>;
399
- injectImports: (source: SourceFile) => Promise<SourceFile>;
400
- refreshRuntimeImports: () => Promise<void>;
401
- };
402
- interface SelectHooksOptions {
403
- order?: "pre" | "post" | "normal";
404
- }
405
- interface InitContextOptions {
552
+ assets?: Array<string | AssetGlob>;
406
553
  /**
407
- * If false, the plugin will be loaded after all other plugins.
554
+ * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
408
555
  *
409
- * @defaultValue true
556
+ * @remarks
557
+ * If a string preset is provided, it must be one of the following values:
558
+ * - `"virtual"`: Uses the local file system for storage.
559
+ * - `"fs"`: Uses an in-memory virtual file system for storage.
560
+ *
561
+ * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
562
+ *
563
+ * @defaultValue "virtual"
410
564
  */
411
- isHighPriority: boolean;
565
+ storage?: StoragePort | StoragePreset;
412
566
  }
413
- /**
414
- * The unresolved Powerlines context.
415
- *
416
- * @remarks
417
- * This context is used before the user configuration has been fully resolved after the `config`.
418
- */
419
- interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
567
+ interface BaseConfig {
420
568
  /**
421
- * The Storm workspace configuration
569
+ * The entry point(s) for the application
422
570
  */
423
- workspaceConfig: WorkspaceConfig;
571
+ entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
424
572
  /**
425
- * An object containing the options provided to Powerlines
573
+ * Configuration for the output of the build process
426
574
  */
427
- config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
428
- projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
429
- output: TResolvedConfig["output"];
430
- };
575
+ output?: OutputConfig;
431
576
  /**
432
- * A logging function for the Powerlines engine
577
+ * Configuration for linting the source code
578
+ *
579
+ * @remarks
580
+ * If set to `false`, linting will be disabled.
433
581
  */
434
- log: LogFn;
582
+ lint?: Record<string, any> | false;
435
583
  /**
436
- * A logging function for fatal messages
584
+ * Configuration for testing the source code
585
+ *
586
+ * @remarks
587
+ * If set to `false`, testing will be disabled.
437
588
  */
438
- fatal: (message: string | UnpluginMessage) => void;
589
+ test?: Record<string, any> | false;
439
590
  /**
440
- * A logging function for error messages
591
+ * Configuration for the transformation of the source code
441
592
  */
442
- error: (message: string | UnpluginMessage) => void;
593
+ transform?: Record<string, any>;
443
594
  /**
444
- * A logging function for warning messages
595
+ * Configuration provided to build processes
596
+ *
597
+ * @remarks
598
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
445
599
  */
446
- warn: (message: string | UnpluginMessage) => void;
600
+ build?: BuildConfig;
447
601
  /**
448
- * A logging function for informational messages
602
+ * Configuration for documentation generation
603
+ *
604
+ * @remarks
605
+ * This configuration will be used by the documentation generation plugins during the `docs` command.
449
606
  */
450
- info: (message: string | UnpluginMessage) => void;
607
+ docs?: Record<string, any>;
451
608
  /**
452
- * A logging function for debug messages
609
+ * Configuration for deploying the source code
610
+ *
611
+ * @remarks
612
+ * If set to `false`, the deployment will be disabled.
453
613
  */
454
- debug: (message: string | UnpluginMessage) => void;
614
+ deploy?: Record<string, any> | false;
455
615
  /**
456
- * A logging function for trace messages
616
+ * The path to the tsconfig file to be used by the compiler
617
+ *
618
+ * @remarks
619
+ * 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).
620
+ *
621
+ * @defaultValue "\{projectRoot\}/tsconfig.json"
457
622
  */
458
- trace: (message: string | UnpluginMessage) => void;
623
+ tsconfig?: string;
459
624
  /**
460
- * The metadata information
625
+ * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
626
+ *
627
+ * @see https://www.typescriptlang.org/tsconfig
628
+ *
629
+ * @remarks
630
+ * If populated, this option takes higher priority than `tsconfig`
461
631
  */
462
- meta: MetaInfo;
632
+ tsconfigRaw?: TSConfig;
633
+ }
634
+ interface EnvironmentConfig extends BaseConfig {
463
635
  /**
464
- * The metadata information currently written to disk
636
+ * Configuration options for the preview server
465
637
  */
466
- persistedMeta?: MetaInfo;
638
+ preview?: PreviewOptions;
467
639
  /**
468
- * The Powerlines artifacts directory
640
+ * A flag indicating whether the build is for a Server-Side Rendering environment.
469
641
  */
470
- artifactsPath: string;
642
+ ssr?: boolean;
471
643
  /**
472
- * The path to the Powerlines builtin runtime modules directory
644
+ * Define if this environment is used for Server-Side Rendering
645
+ *
646
+ * @defaultValue "server" (if it isn't the client environment)
473
647
  */
474
- builtinsPath: string;
648
+ consumer?: "client" | "server";
649
+ }
650
+ interface CommonUserConfig extends BaseConfig {
475
651
  /**
476
- * The path to the Powerlines entry modules directory
652
+ * The name of the project
477
653
  */
478
- entryPath: string;
654
+ name?: string;
479
655
  /**
480
- * The path to the Powerlines TypeScript declaration files directory
656
+ * The project display title
657
+ *
658
+ * @remarks
659
+ * This option is used in documentation generation and other places where a human-readable title is needed.
481
660
  */
482
- dtsPath: string;
661
+ title?: string;
483
662
  /**
484
- * The path to a directory where the reflection data buffers (used by the build processes) are stored
663
+ * A description of the project
664
+ *
665
+ * @remarks
666
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
485
667
  */
486
- dataPath: string;
668
+ description?: string;
487
669
  /**
488
- * The path to a directory where the project cache (used by the build processes) is stored
670
+ * The log level to use for the Powerlines processes.
671
+ *
672
+ * @defaultValue "info"
489
673
  */
490
- cachePath: string;
674
+ logLevel?: LogLevelLabel | null;
491
675
  /**
492
- * The Powerlines environment paths
676
+ * A custom logger function to use for logging messages
493
677
  */
494
- envPaths: EnvPaths;
678
+ customLogger?: LogFn;
495
679
  /**
496
- * The file system path to the Powerlines package installation
680
+ * 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.
681
+ *
682
+ * @defaultValue "production"
497
683
  */
498
- powerlinesPath: string;
684
+ mode?: "development" | "test" | "production";
499
685
  /**
500
- * The relative path to the Powerlines workspace root directory
686
+ * The type of project being built
687
+ *
688
+ * @defaultValue "application"
501
689
  */
502
- relativeToWorkspaceRoot: string;
690
+ type?: ProjectType;
503
691
  /**
504
- * The project's `package.json` file content
692
+ * The root directory of the project
505
693
  */
506
- packageJson: PackageJson & Record<string, any>;
694
+ root: string;
507
695
  /**
508
- * The project's `project.json` file content
696
+ * The root directory of the project's source code
697
+ *
698
+ * @defaultValue "\{root\}/src"
509
699
  */
510
- projectJson?: Record<string, any>;
700
+ sourceRoot?: string;
511
701
  /**
512
- * The dependency installations required by the project
513
- */
514
- dependencies: Record<string, string | Range>;
515
- /**
516
- * The development dependency installations required by the project
517
- */
518
- devDependencies: Record<string, string | Range>;
519
- /**
520
- * The parsed TypeScript configuration from the `tsconfig.json` file
521
- */
522
- tsconfig: ParsedTypeScriptConfig;
523
- /**
524
- * The entry points of the source code
525
- */
526
- entry: ResolvedEntryTypeDefinition[];
527
- /**
528
- * The virtual file system manager used during the build process to reference generated runtime files
529
- */
530
- fs: VirtualFileSystemInterface;
531
- /**
532
- * The Jiti module resolver
533
- */
534
- resolver: Resolver;
535
- /**
536
- * The builtin module id that exist in the Powerlines virtual file system
537
- */
538
- builtins: string[];
539
- /**
540
- * The {@link Project} instance used for type reflection and module manipulation
541
- *
542
- * @see https://ts-morph.com/
543
- *
544
- * @remarks
545
- * This instance is created lazily on first access.
546
- */
547
- program: Project;
548
- /**
549
- * A helper function to resolve modules using the Jiti resolver
702
+ * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
550
703
  *
551
704
  * @remarks
552
- * This function can be used to resolve modules relative to the project root directory.
553
- *
554
- * @example
555
- * ```ts
556
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
557
- * ```
558
- *
559
- * @param id - The module to resolve.
560
- * @param importer - An optional path to the importer module.
561
- * @param options - Additional resolution options.
562
- * @returns A promise that resolves to the resolved module path.
705
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
563
706
  */
564
- resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
707
+ configFile?: string;
565
708
  /**
566
- * A helper function to load modules using the Jiti resolver
709
+ * Should the Powerlines CLI processes skip installing missing packages?
567
710
  *
568
711
  * @remarks
569
- * This function can be used to load modules relative to the project root directory.
570
- *
571
- * @example
572
- * ```ts
573
- * const module = await context.load("some-module", "/path/to/importer");
574
- * ```
575
- *
576
- * @param id - The module to load.
577
- * @returns A promise that resolves to the loaded module.
578
- */
579
- load: (id: string) => Promise<TransformResult | undefined>;
580
- /**
581
- * The Powerlines builtin virtual files
582
- */
583
- getBuiltins: () => Promise<VirtualFile[]>;
584
- /**
585
- * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
712
+ * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
586
713
  *
587
- * @param code - The source code of the builtin file
588
- * @param id - The unique identifier of the builtin file
589
- * @param path - An optional path to write the builtin file to
590
- * @param options - Options for writing the file
714
+ * @defaultValue false
591
715
  */
592
- emitBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
716
+ skipInstalls?: boolean;
593
717
  /**
594
- * Resolves a entry virtual file and writes it to the VFS if it does not already exist
718
+ * Should the compiler processes skip any improvements that make use of cache?
595
719
  *
596
- * @param code - The source code of the entry file
597
- * @param path - An optional path to write the entry file to
598
- * @param options - Options for writing the file
599
- */
600
- emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
601
- /**
602
- * A function to update the context fields using a new user configuration options
720
+ * @defaultValue false
603
721
  */
604
- withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
722
+ skipCache?: boolean;
605
723
  /**
606
- * A function to update the context fields using inline configuration options
724
+ * A list of resolvable paths to plugins used during the build process
607
725
  */
608
- withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
726
+ plugins?: PluginConfig<PluginContext<any>>[];
609
727
  /**
610
- * Create a new logger instance
611
- *
612
- * @param name - The name to use for the logger instance
613
- * @returns A logger function
728
+ * Environment-specific configurations
614
729
  */
615
- createLog: (name: string | null) => LogFn;
730
+ environments?: Record<string, EnvironmentConfig>;
616
731
  /**
617
- * Extend the current logger instance with a new name
732
+ * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
618
733
  *
619
- * @param name - The name to use for the extended logger instance
620
- * @returns A logger function
621
- */
622
- extendLog: (name: string) => LogFn;
623
- /**
624
- * Generates a checksum representing the current context state
734
+ * @remarks
735
+ * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
625
736
  *
626
- * @returns A promise that resolves to a string representing the checksum
737
+ * @defaultValue "powerlines"
627
738
  */
628
- generateChecksum: () => Promise<string>;
739
+ framework?: string;
629
740
  }
630
- type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
741
+ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
631
742
  /**
632
- * The fully resolved Powerlines configuration
743
+ * Configuration provided to build processes
744
+ *
745
+ * @remarks
746
+ * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
633
747
  */
634
- config: TResolvedConfig;
748
+ build: Omit<TBuildConfig, "override"> & {
749
+ /**
750
+ * The build variant being used by the Powerlines engine.
751
+ */
752
+ variant?: TBuildVariant;
753
+ /**
754
+ * An optional set of override options to apply to the selected build variant.
755
+ *
756
+ * @remarks
757
+ * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
758
+ */
759
+ override?: Partial<TBuildResolvedConfig>;
760
+ };
635
761
  };
636
- interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
762
+ type WebpackUserConfig = UserConfig<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
763
+ type RspackUserConfig = UserConfig<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
764
+ type RollupUserConfig = UserConfig<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
765
+ type RolldownUserConfig = UserConfig<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
766
+ type ViteUserConfig = UserConfig<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
767
+ type ESBuildUserConfig = UserConfig<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
768
+ type UnbuildUserConfig = UserConfig<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
769
+ type TsupUserConfig = UserConfig<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
770
+ type FarmUserConfig = UserConfig<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
771
+ type InferUserConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends "webpack" ? WebpackUserConfig : TBuildVariant extends "rspack" ? RspackUserConfig : TBuildVariant extends "vite" ? ViteUserConfig : TBuildVariant extends "esbuild" ? ESBuildUserConfig : TBuildVariant extends "unbuild" ? UnbuildUserConfig : TBuildVariant extends "tsup" ? TsupUserConfig : TBuildVariant extends "rolldown" ? RolldownUserConfig : TBuildVariant extends "rollup" ? RollupUserConfig : TBuildVariant extends "farm" ? FarmUserConfig : UserConfig;
772
+ type InitialUserConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
773
+ root: string;
774
+ };
775
+ type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = TUserConfig & ResolvedConfig$1<TUserConfig> & {
637
776
  /**
638
- * The expected plugins options for the Powerlines project.
777
+ * The path to the user configuration file, if it exists.
639
778
  *
640
779
  * @remarks
641
- * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
780
+ * This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
642
781
  */
643
- plugins: Plugin<PluginContext<TResolvedConfig>>[];
782
+ configFile?: ConfigLayer<TUserConfig>["configFile"];
783
+ };
784
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
785
+ /**
786
+ * The configuration provided while executing Powerlines commands.
787
+ */
788
+ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
644
789
  /**
645
- * A function to add a plugin to the context and update the configuration options
790
+ * A string identifier for the Powerlines command being executed
646
791
  */
647
- addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
792
+ command: PowerlinesCommand;
793
+ };
794
+ type NewInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
648
795
  /**
649
- * A table for storing the current context for each configured environment
796
+ * A string identifier for the Powerlines command being executed
650
797
  */
651
- environments: Record<string, EnvironmentContext<TResolvedConfig>>;
798
+ command: "new";
652
799
  /**
653
- * Retrieves the context for a specific environment by name
654
- *
655
- * @throws Will throw an error if the environment does not exist
656
- *
657
- * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
658
- * @returns A promise that resolves to the environment context.
659
- *
660
- * @example
661
- * ```ts
662
- * const devEnv = await apiContext.getEnvironment("development");
663
- * const defaultEnv = await apiContext.getEnvironment();
664
- * ```
800
+ * The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
665
801
  */
666
- getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
802
+ packageName?: string;
803
+ };
804
+ type CleanInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
667
805
  /**
668
- * Safely retrieves the context for a specific environment by name
669
- *
670
- * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
671
- * @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
672
- *
673
- * @example
674
- * ```ts
675
- * const devEnv = await apiContext.getEnvironmentSafe("development");
676
- * const defaultEnv = await apiContext.getEnvironmentSafe();
677
- * ```
678
- *
679
- * @remarks
680
- * This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
681
- * This can be useful in scenarios where the existence of an environment is optional or uncertain.
682
- *
683
- * ```ts
684
- * const testEnv = await apiContext.getEnvironmentSafe("test");
685
- * if (testEnv) {
686
- * // Environment exists, safe to use it
687
- * } else {
688
- * // Environment does not exist, handle accordingly
689
- * }
690
- * ```
691
- *
692
- * Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
806
+ * A string identifier for the Powerlines command being executed
693
807
  */
694
- getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
808
+ command: "clean";
809
+ };
810
+ type PrepareInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
695
811
  /**
696
- * A function to copy the context and update the fields for a specific environment
697
- *
698
- * @param environment - The environment configuration to use.
699
- * @returns A new context instance with the updated environment.
812
+ * A string identifier for the Powerlines command being executed
700
813
  */
701
- in: (environment: EnvironmentResolvedConfig) => Promise<EnvironmentContext<TResolvedConfig>>;
702
- }
703
- interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
704
- plugin: Plugin<PluginContext<TResolvedConfig>>;
705
- context: PluginContext<TResolvedConfig>;
706
- }
707
- interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
814
+ command: "prepare";
815
+ };
816
+ type BuildInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
708
817
  /**
709
- * The expected plugins options for the Powerlines project.
710
- *
711
- * @remarks
712
- * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
818
+ * A string identifier for the Powerlines command being executed
713
819
  */
714
- plugins: EnvironmentContextPlugin<TResolvedConfig>[];
820
+ command: "build";
821
+ };
822
+ type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
715
823
  /**
716
- * A function to add a plugin to the context and update the configuration options
824
+ * A string identifier for the Powerlines command being executed
717
825
  */
718
- addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
826
+ command: "lint";
827
+ };
828
+ type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
719
829
  /**
720
- * The environment specific resolved configuration
830
+ * A string identifier for the Powerlines command being executed
721
831
  */
722
- environment: EnvironmentResolvedConfig;
832
+ command: "docs";
833
+ };
834
+ type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
723
835
  /**
724
- * A table holding references to hook functions registered by plugins
836
+ * A string identifier for the Powerlines command being executed
725
837
  */
726
- hooks: HooksList<PluginContext<TResolvedConfig>>;
727
- /**
728
- * Retrieves the hook handlers for a specific hook name
729
- */
730
- selectHooks: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options?: SelectHooksOptions) => Hooks[TKey][];
731
- }
732
- interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
733
- /**
734
- * The environment specific resolved configuration
735
- */
736
- environment: EnvironmentResolvedConfig;
737
- /**
738
- * An alternative property name for the {@link log} property
739
- *
740
- * @remarks
741
- * This is provided for compatibility with other logging libraries that expect a `logger` property.
742
- */
743
- logger: LogFn;
744
- }
745
- type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
746
- interface SerializedVirtualFileSystem {
747
- virtualFiles: DirectoryJSON;
748
- virtualFilesMeta: Record<string, Partial<VirtualFileMetadata>>;
749
- }
750
- declare type __ΩLogLevel = any[];
751
- declare type __ΩWorkerProcess = any[];
752
- declare type __ΩMetaInfo = any[];
753
- declare type __ΩResolver = any[];
754
- declare type __ΩTransformResult = any[];
755
- declare type __ΩSourceFile = any[];
756
- declare type __ΩUnimportContext = any[];
757
- declare type __ΩSelectHooksOptions = any[];
758
- declare type __ΩInitContextOptions = any[];
759
- declare type __ΩUnresolvedContext = any[];
760
- declare type __ΩContext = any[];
761
- declare type __ΩAPIContext = any[];
762
- declare type __ΩEnvironmentContextPlugin = any[];
763
- declare type __ΩEnvironmentContext = any[];
764
- declare type __ΩPluginContext = any[];
765
- declare type __ΩBuildPluginContext = any[];
766
- declare type __ΩSerializedVirtualFileSystem = any[];
767
-
768
- interface NamedImportDefinition {
769
- name: string;
770
- source: string;
771
- kind: "named";
772
- }
773
- interface DefaultImportDefinition {
774
- source: string;
775
- kind: "default";
776
- }
777
- type ImportDefinition = NamedImportDefinition | DefaultImportDefinition;
778
- type BabelPluginPass<TState = unknown> = PluginPass & TState;
779
- type BabelTransformPluginFilter = (code: string, id: string) => boolean;
780
- type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
781
- name: string;
782
- log: LogFn;
783
- api: BabelAPI;
784
- options: TOptions;
785
- context: TContext;
786
- dirname: string;
787
- }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
788
- $$name: string;
838
+ command: "deploy";
789
839
  };
790
- type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [
791
- BabelTransformPlugin<TContext, TOptions, TState>,
792
- TOptions,
793
- BabelTransformPluginFilter
794
- ];
795
- type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | [
796
- BabelTransformPlugin<TContext, TOptions, TState>,
797
- TOptions,
798
- BabelTransformPluginFilter | null
799
- ];
800
- type BabelTransformInput = Omit<TransformOptions & Required<Pick<TransformOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
801
- interface BabelTransformPluginBuilderParams<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>> {
802
- name: string;
803
- log: LogFn;
804
- api: BabelAPI;
805
- options: TOptions;
806
- context: TContext;
807
- dirname: string;
808
- }
809
- type BabelTransformPluginBuilder<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = (params: BabelTransformPluginBuilderParams<TContext, TOptions>) => PluginObj<TState & BabelPluginPass<TOptions>>;
810
- type DeclareBabelTransformPluginReturn<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = any> = Omit<BabelTransformPlugin<TContext, TOptions, TState>, "$$name"> & Required<Pick<BabelTransformPlugin<TContext, TOptions, TState>, "$$name">>;
840
+ type ConfigEnv = Pick<ResolvedConfig$2, "command" | "mode" | "environments" | "preview">;
841
+ type AnyUserConfig = Record<string, any> & (Partial<UserConfig> | Partial<WebpackUserConfig> | Partial<RspackUserConfig> | Partial<ViteUserConfig> | Partial<ESBuildUserConfig> | Partial<UnbuildUserConfig> | Partial<TsupUserConfig> | Partial<RolldownUserConfig> | Partial<RollupUserConfig> | Partial<FarmUserConfig>);
842
+ type UserConfigFnObject = (env: ConfigEnv) => DeepPartial$1<UserConfig>;
843
+ type UserConfigFnPromise = (env: ConfigEnv) => Promise<DeepPartial$1<UserConfig>>;
844
+ type UserConfigFn = (env: ConfigEnv) => UserConfig | Promise<DeepPartial$1<UserConfig>>;
845
+ type UserConfigExport = DeepPartial$1<UserConfig> | Promise<DeepPartial$1<UserConfig>> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
811
846
  /**
812
- * A non-local import specifier represents an import that is not defined within the current module.
813
- *
814
- * @example
815
- * ```typescript
816
- * import { bar as baz } from 'foo';
817
- * // { name: 'baz', module: 'foo', imported: 'bar' }
818
- * ```
819
- *
820
- * @remarks
821
- * It captures the details of an import statement, including the local name used in the module, the source module from which it is imported, and the original name of the export in the source module.
847
+ * An empty interface to allow augmentation of the defineConfig input type.
822
848
  */
823
- interface ImportSpecifier {
824
- name?: string;
825
- module: string;
826
- imported: string;
849
+ interface DefineConfigInput {
827
850
  }
828
- declare type __ΩNamedImportDefinition = any[];
829
- declare type __ΩDefaultImportDefinition = any[];
830
- declare type __ΩImportDefinition = any[];
831
- declare type __ΩBabelPluginPass = any[];
832
- declare type __ΩBabelTransformPluginFilter = any[];
833
- declare type __ΩBabelTransformPlugin = any[];
834
- declare type __ΩBabelTransformPluginOptions = any[];
835
- declare type __ΩResolvedBabelTransformPluginOptions = any[];
836
- declare type __ΩBabelTransformInput = any[];
837
- declare type __ΩBabelTransformPluginBuilderParams = any[];
838
- declare type __ΩBabelTransformPluginBuilder = any[];
839
- declare type __ΩDeclareBabelTransformPluginReturn = any[];
840
- declare type __ΩImportSpecifier = any[];
851
+ declare type __ΩLogFn = any[];
852
+ declare type __ΩWorkspaceConfig = any[];
853
+ declare type __ΩPluginFactory = any[];
854
+ declare type __ΩPluginConfigTuple = any[];
855
+ declare type __ΩPluginConfigObject = any[];
856
+ declare type __ΩPluginConfig = any[];
857
+ declare type __ΩPartialPlugin = any[];
858
+ declare type __ΩPartialPluginFactory = any[];
859
+ declare type __ΩProjectType = any[];
860
+ declare type __ΩBabelUserConfig = any[];
861
+ declare type __ΩOutputConfig = any[];
862
+ declare type __ΩBaseConfig = any[];
863
+ declare type __ΩEnvironmentConfig = any[];
864
+ declare type __ΩCommonUserConfig = any[];
865
+ declare type __ΩUserConfig = any[];
866
+ declare type __ΩWebpackUserConfig = any[];
867
+ declare type __ΩRspackUserConfig = any[];
868
+ declare type __ΩRollupUserConfig = any[];
869
+ declare type __ΩRolldownUserConfig = any[];
870
+ declare type __ΩViteUserConfig = any[];
871
+ declare type __ΩESBuildUserConfig = any[];
872
+ declare type __ΩUnbuildUserConfig = any[];
873
+ declare type __ΩTsupUserConfig = any[];
874
+ declare type __ΩFarmUserConfig = any[];
875
+ declare type __ΩInferUserConfig = any[];
876
+ declare type __ΩInitialUserConfig = any[];
877
+ declare type __ΩParsedUserConfig = any[];
878
+ declare type __ΩPowerlinesCommand = any[];
879
+ declare type __ΩInlineConfig = any[];
880
+ declare type __ΩNewInlineConfig = any[];
881
+ declare type __ΩCleanInlineConfig = any[];
882
+ declare type __ΩPrepareInlineConfig = any[];
883
+ declare type __ΩBuildInlineConfig = any[];
884
+ declare type __ΩLintInlineConfig = any[];
885
+ declare type __ΩDocsInlineConfig = any[];
886
+ declare type __ΩDeployInlineConfig = any[];
887
+ declare type __ΩConfigEnv = any[];
888
+ declare type __ΩAnyUserConfig = any[];
889
+ declare type __ΩUserConfigFnObject = any[];
890
+ declare type __ΩUserConfigFnPromise = any[];
891
+ declare type __ΩUserConfigFn = any[];
892
+ declare type __ΩUserConfigExport = any[];
893
+ declare type __ΩDefineConfigInput = any[];
841
894
 
842
- type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
843
- /**
844
- * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
845
- */
846
- type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
847
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
848
- /**
849
- * A configuration tuple for a Powerlines plugin.
850
- */
851
- type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
852
- /**
853
- * A configuration object for a Powerlines plugin.
854
- */
855
- type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
856
- plugin: string | PluginFactory<TContext, TOptions>;
857
- options: TOptions;
858
- } | {
895
+ type BaseHooks<TContext extends PluginContext = PluginContext> = BasePluginHookFunctions<TContext>;
896
+ type BaseHookKeys<TContext extends PluginContext = PluginContext> = keyof BaseHooks<TContext>;
897
+ type ExternalHooks<TContext extends PluginContext = PluginContext> = ExternalPluginHookFunctions<TContext>;
898
+ type ExternalHookKeys<TContext extends PluginContext = PluginContext> = keyof ExternalHooks<TContext>;
899
+ type Hooks<TContext extends PluginContext = PluginContext> = PluginHookFunctions<TContext>;
900
+ type HookKeys<TContext extends PluginContext = PluginContext> = keyof Hooks<TContext>;
901
+ interface BaseHooksListItem<TContext extends PluginContext = PluginContext, TKey extends BaseHookKeys<TContext> = BaseHookKeys<TContext>> extends PluginHookObject<BaseHooks<TContext>[TKey]> {
859
902
  plugin: Plugin<TContext>;
860
- options?: never;
903
+ }
904
+ interface BaseHooksList<TContext extends PluginContext = PluginContext, TKey extends BaseHookKeys<TContext> = BaseHookKeys<TContext>> {
905
+ preOrdered?: BaseHooksListItem<TContext, TKey>[];
906
+ preEnforced?: BaseHooksListItem<TContext, TKey>[];
907
+ normal?: BaseHooksListItem<TContext, TKey>[];
908
+ postEnforced?: BaseHooksListItem<TContext, TKey>[];
909
+ postOrdered?: BaseHooksListItem<TContext, TKey>[];
910
+ }
911
+ interface ExternalHooksListItem<TContext extends PluginContext = PluginContext, TKey extends ExternalHookKeys<TContext> = ExternalHookKeys<TContext>> {
912
+ plugin: Plugin<TContext>;
913
+ handler: ExternalHooks<TContext>[TKey];
914
+ }
915
+ type HooksList<TContext extends PluginContext = PluginContext> = {
916
+ [TKey in BaseHookKeys<TContext>]?: BaseHooksList<TContext, TKey>;
917
+ } & {
918
+ [TKey in ExternalHookKeys<TContext>]?: ExternalHooksListItem<TContext, TKey>[];
861
919
  };
920
+ type InferHookHandler<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Hooks<TContext>[TKey];
921
+ type InferHookReturnType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ReturnType<InferHookHandler<TContext, TKey>> extends Promise<infer U> ? U extends Promise<infer V> ? V : U : ReturnType<InferHookHandler<TContext, TKey>>;
922
+ type InferHookParameters<TContext extends PluginContext, TKey extends HookKeys<TContext>> = Parameters<InferHookHandler<TContext, TKey>>;
923
+ type InferHookThisType<TContext extends PluginContext, TKey extends HookKeys<TContext>> = ThisParameterType<InferHookHandler<TContext, TKey>>;
924
+ declare type __ΩBaseHooks = any[];
925
+ declare type __ΩBaseHookKeys = any[];
926
+ declare type __ΩExternalHooks = any[];
927
+ declare type __ΩExternalHookKeys = any[];
928
+ declare type __ΩHooks = any[];
929
+ declare type __ΩHookKeys = any[];
930
+ declare type __ΩBaseHooksListItem = any[];
931
+ declare type __ΩBaseHooksList = any[];
932
+ declare type __ΩExternalHooksListItem = any[];
933
+ declare type __ΩHooksList = any[];
934
+ declare type __ΩInferHookHandler = any[];
935
+ declare type __ΩInferHookReturnType = any[];
936
+ declare type __ΩInferHookParameters = any[];
937
+ declare type __ΩInferHookThisType = any[];
938
+
862
939
  /**
863
- * A configuration tuple for a Powerlines plugin.
940
+ * The severity level of a {@link LogRecord}.
864
941
  */
865
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
866
- type PartialPlugin<in out TContext extends PluginContext = PluginContext> = DeepPartial$1<Plugin<TContext>>;
867
- type PartialPluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<PartialPlugin<TContext>>;
868
- type ProjectType = "application" | "library";
869
- type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
942
+ type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
943
+ declare const LogLevel: {
944
+ DEBUG: LogLevel;
945
+ INFO: LogLevel;
946
+ WARNING: LogLevel;
947
+ ERROR: LogLevel;
948
+ FATAL: LogLevel;
949
+ };
950
+ type WorkerProcess<TExposedMethods extends ReadonlyArray<string>> = {
951
+ [K in TExposedMethods[number]]: (data: any) => Promise<any>;
952
+ } & {
953
+ close: () => void;
954
+ end: () => ReturnType<Worker["end"]>;
955
+ };
956
+ interface MetaInfo {
870
957
  /**
871
- * The Babel plugins to be used during the build process
958
+ * The checksum generated from the resolved options
872
959
  */
873
- plugins?: BabelTransformPluginOptions[];
960
+ checksum: string;
874
961
  /**
875
- * The Babel presets to be used during the build process
962
+ * The build id
876
963
  */
877
- presets?: BabelTransformPluginOptions[];
878
- };
879
- interface OutputConfig {
964
+ buildId: string;
880
965
  /**
881
- * The path to output the final compiled files to
882
- *
883
- * @remarks
884
- * If a value is not provided, Powerlines will attempt to:
885
- * 1. Use the `outDir` value in the `tsconfig.json` file.
886
- * 2. Use the `dist` directory in the project root directory.
887
- *
888
- * @defaultValue "dist/\{projectRoot\}"
966
+ * The release id
889
967
  */
890
- outputPath?: string;
968
+ releaseId: string;
891
969
  /**
892
- * The output directory path for the project build.
893
- *
894
- * @remarks
895
- * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
896
- *
897
- * @defaultValue "\{projectRoot\}/dist"
970
+ * The build timestamp
898
971
  */
899
- distPath?: string;
972
+ timestamp: number;
900
973
  /**
901
- * The format of the output files
902
- *
903
- * @defaultValue "virtual"
974
+ * A hash that represents the path to the project root directory
904
975
  */
905
- mode?: OutputModeType;
976
+ projectRootHash: string;
906
977
  /**
907
- * The path of the generated runtime declaration file relative to the workspace root.
908
- *
909
- * @defaultValue "\{projectRoot\}/powerlines.d.ts"
978
+ * A hash that represents the path to the project root directory
910
979
  */
911
- dts?: string | false;
980
+ configHash: string;
981
+ }
982
+ interface Resolver extends Jiti {
983
+ plugin: Jiti;
984
+ }
985
+ interface TransformResult {
986
+ code: string;
987
+ map: SourceMap | null;
988
+ }
989
+ /**
990
+ * The format for providing source code to the compiler
991
+ */
992
+ interface SourceFile {
912
993
  /**
913
- * A prefix to use for identifying builtin modules
914
- *
915
- * @remarks
916
- * 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"`.
917
- *
918
- * @defaultValue "powerlines"
994
+ * The name of the file to be compiled
919
995
  */
920
- builtinPrefix?: string;
996
+ id: string;
921
997
  /**
922
- * The folder where the generated runtime artifacts will be located
923
- *
924
- * @remarks
925
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
926
- *
927
- * @defaultValue "\{projectRoot\}/.powerlines"
998
+ * The source code to be compiled
928
999
  */
929
- artifactsFolder?: string;
1000
+ code: MagicString;
930
1001
  /**
931
- * The module format of the output files
932
- *
933
- * @remarks
934
- * 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.
935
- *
936
- * @defaultValue "esm"
1002
+ * The environment variables used in the source code
937
1003
  */
938
- format?: Format | Format[];
1004
+ env: string[];
939
1005
  /**
940
- * A list of assets to copy to the output directory
1006
+ * The result of the transformation
1007
+ */
1008
+ result?: TransformResult;
1009
+ }
1010
+ type UnimportContext = Omit<Unimport, "injectImports"> & {
1011
+ dumpImports: () => Promise<void>;
1012
+ injectImports: (source: SourceFile) => Promise<SourceFile>;
1013
+ refreshRuntimeImports: () => Promise<void>;
1014
+ };
1015
+ interface SelectHooksOptions {
1016
+ order?: "pre" | "post" | "normal";
1017
+ }
1018
+ interface InitContextOptions {
1019
+ /**
1020
+ * If false, the plugin will be loaded after all other plugins.
941
1021
  *
942
- * @remarks
943
- * 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.
1022
+ * @defaultValue true
944
1023
  */
945
- assets?: Array<string | AssetGlob>;
1024
+ isHighPriority: boolean;
946
1025
  }
947
- interface BaseConfig {
1026
+ /**
1027
+ * The unresolved Powerlines context.
1028
+ *
1029
+ * @remarks
1030
+ * This context is used before the user configuration has been fully resolved after the `config`.
1031
+ */
1032
+ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
948
1033
  /**
949
- * The name of the project
1034
+ * The Storm workspace configuration
950
1035
  */
951
- name?: string;
1036
+ workspaceConfig: WorkspaceConfig;
952
1037
  /**
953
- * The project display title
954
- *
955
- * @remarks
956
- * This option is used in documentation generation and other places where a human-readable title is needed.
1038
+ * An object containing the options provided to Powerlines
957
1039
  */
958
- title?: string;
1040
+ config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
1041
+ projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
1042
+ output: TResolvedConfig["output"];
1043
+ };
959
1044
  /**
960
- * A description of the project
961
- *
962
- * @remarks
963
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
1045
+ * A logging function for the Powerlines engine
1046
+ */
1047
+ log: LogFn;
1048
+ /**
1049
+ * A logging function for fatal messages
1050
+ */
1051
+ fatal: (message: string | UnpluginMessage) => void;
1052
+ /**
1053
+ * A logging function for error messages
964
1054
  */
965
- description?: string;
1055
+ error: (message: string | UnpluginMessage) => void;
966
1056
  /**
967
- * The log level to use for the Powerlines processes.
968
- *
969
- * @defaultValue "info"
1057
+ * A logging function for warning messages
970
1058
  */
971
- logLevel?: LogLevelLabel | null;
1059
+ warn: (message: string | UnpluginMessage) => void;
972
1060
  /**
973
- * A custom logger function to use for logging messages
1061
+ * A logging function for informational messages
974
1062
  */
975
- customLogger?: LogFn;
1063
+ info: (message: string | UnpluginMessage) => void;
976
1064
  /**
977
- * 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.
978
- *
979
- * @defaultValue "production"
1065
+ * A logging function for debug messages
980
1066
  */
981
- mode?: "development" | "test" | "production";
1067
+ debug: (message: string | UnpluginMessage) => void;
982
1068
  /**
983
- * The entry point(s) for the application
1069
+ * A logging function for trace messages
984
1070
  */
985
- entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
1071
+ trace: (message: string | UnpluginMessage) => void;
986
1072
  /**
987
- * Configuration for the output of the build process
1073
+ * The metadata information
988
1074
  */
989
- output?: OutputConfig;
1075
+ meta: MetaInfo;
990
1076
  /**
991
- * Configuration for linting the source code
992
- *
993
- * @remarks
994
- * If set to `false`, linting will be disabled.
1077
+ * The metadata information currently written to disk
995
1078
  */
996
- lint?: Record<string, any> | false;
1079
+ persistedMeta?: MetaInfo;
997
1080
  /**
998
- * Configuration for testing the source code
999
- *
1000
- * @remarks
1001
- * If set to `false`, testing will be disabled.
1081
+ * The Powerlines artifacts directory
1002
1082
  */
1003
- test?: Record<string, any> | false;
1083
+ artifactsPath: string;
1004
1084
  /**
1005
- * Configuration for the transformation of the source code
1085
+ * The path to the Powerlines builtin runtime modules directory
1006
1086
  */
1007
- transform?: Record<string, any>;
1087
+ builtinsPath: string;
1008
1088
  /**
1009
- * Configuration provided to build processes
1010
- *
1011
- * @remarks
1012
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1089
+ * The path to the Powerlines entry modules directory
1013
1090
  */
1014
- build?: BuildConfig;
1091
+ entryPath: string;
1015
1092
  /**
1016
- * Configuration for documentation generation
1017
- *
1018
- * @remarks
1019
- * This configuration will be used by the documentation generation plugins during the `docs` command.
1093
+ * The path to the Powerlines TypeScript declaration files directory
1020
1094
  */
1021
- docs?: Record<string, any>;
1095
+ dtsPath: string;
1022
1096
  /**
1023
- * Configuration for deploying the source code
1024
- *
1025
- * @remarks
1026
- * If set to `false`, the deployment will be disabled.
1097
+ * The path to a directory where the reflection data buffers (used by the build processes) are stored
1027
1098
  */
1028
- deploy?: Record<string, any> | false;
1099
+ dataPath: string;
1029
1100
  /**
1030
- * The path to the tsconfig file to be used by the compiler
1031
- *
1032
- * @remarks
1033
- * 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).
1034
- *
1035
- * @defaultValue "\{projectRoot\}/tsconfig.json"
1101
+ * The path to a directory where the project cache (used by the build processes) is stored
1036
1102
  */
1037
- tsconfig?: string;
1103
+ cachePath: string;
1038
1104
  /**
1039
- * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
1040
- *
1041
- * @see https://www.typescriptlang.org/tsconfig
1042
- *
1043
- * @remarks
1044
- * If populated, this option takes higher priority than `tsconfig`
1105
+ * The Powerlines environment paths
1045
1106
  */
1046
- tsconfigRaw?: TSConfig;
1047
- }
1048
- interface EnvironmentConfig extends BaseConfig {
1107
+ envPaths: EnvPaths;
1049
1108
  /**
1050
- * Configuration options for the preview server
1109
+ * The file system path to the Powerlines package installation
1051
1110
  */
1052
- preview?: PreviewOptions;
1111
+ powerlinesPath: string;
1053
1112
  /**
1054
- * A flag indicating whether the build is for a Server-Side Rendering environment.
1113
+ * The relative path to the Powerlines workspace root directory
1055
1114
  */
1056
- ssr?: boolean;
1115
+ relativeToWorkspaceRoot: string;
1057
1116
  /**
1058
- * Define if this environment is used for Server-Side Rendering
1059
- *
1060
- * @defaultValue "server" (if it isn't the client environment)
1117
+ * The project's `package.json` file content
1061
1118
  */
1062
- consumer?: "client" | "server";
1063
- }
1064
- interface CommonUserConfig extends BaseConfig {
1119
+ packageJson: PackageJson & Record<string, any>;
1065
1120
  /**
1066
- * The type of project being built
1067
- *
1068
- * @defaultValue "application"
1121
+ * The project's `project.json` file content
1069
1122
  */
1070
- type?: ProjectType;
1123
+ projectJson?: Record<string, any>;
1071
1124
  /**
1072
- * The root directory of the project
1125
+ * The dependency installations required by the project
1073
1126
  */
1074
- root: string;
1127
+ dependencies: Record<string, string | Range>;
1075
1128
  /**
1076
- * The root directory of the project's source code
1077
- *
1078
- * @defaultValue "\{root\}/src"
1129
+ * The development dependency installations required by the project
1079
1130
  */
1080
- sourceRoot?: string;
1131
+ devDependencies: Record<string, string | Range>;
1081
1132
  /**
1082
- * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
1083
- *
1084
- * @remarks
1085
- * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
1133
+ * The parsed TypeScript configuration from the `tsconfig.json` file
1086
1134
  */
1087
- configFile?: string;
1135
+ tsconfig: ParsedTypeScriptConfig;
1088
1136
  /**
1089
- * Should the Powerlines CLI processes skip installing missing packages?
1090
- *
1091
- * @remarks
1092
- * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
1093
- *
1094
- * @defaultValue false
1137
+ * The entry points of the source code
1095
1138
  */
1096
- skipInstalls?: boolean;
1139
+ entry: ResolvedEntryTypeDefinition[];
1097
1140
  /**
1098
- * Should the compiler processes skip any improvements that make use of cache?
1099
- *
1100
- * @defaultValue false
1141
+ * The virtual file system manager used during the build process to reference generated runtime files
1101
1142
  */
1102
- skipCache?: boolean;
1143
+ fs: VirtualFileSystemInterface;
1103
1144
  /**
1104
- * A list of resolvable paths to plugins used during the build process
1145
+ * The Jiti module resolver
1105
1146
  */
1106
- plugins?: PluginConfig<PluginContext<any>>[];
1147
+ resolver: Resolver;
1107
1148
  /**
1108
- * Environment-specific configurations
1149
+ * The builtin module id that exist in the Powerlines virtual file system
1109
1150
  */
1110
- environments?: Record<string, EnvironmentConfig>;
1151
+ builtins: string[];
1111
1152
  /**
1112
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
1153
+ * The {@link Project} instance used for type reflection and module manipulation
1113
1154
  *
1114
- * @remarks
1115
- * 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.
1155
+ * @see https://ts-morph.com/
1116
1156
  *
1117
- * @defaultValue "powerlines"
1157
+ * @remarks
1158
+ * This instance is created lazily on first access.
1118
1159
  */
1119
- framework?: string;
1120
- }
1121
- type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
1160
+ program: Project;
1122
1161
  /**
1123
- * Configuration provided to build processes
1162
+ * A helper function to resolve modules using the Jiti resolver
1124
1163
  *
1125
1164
  * @remarks
1126
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1165
+ * This function can be used to resolve modules relative to the project root directory.
1166
+ *
1167
+ * @example
1168
+ * ```ts
1169
+ * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1170
+ * ```
1171
+ *
1172
+ * @param id - The module to resolve.
1173
+ * @param importer - An optional path to the importer module.
1174
+ * @param options - Additional resolution options.
1175
+ * @returns A promise that resolves to the resolved module path.
1127
1176
  */
1128
- build: Omit<TBuildConfig, "override"> & {
1129
- /**
1130
- * The build variant being used by the Powerlines engine.
1131
- */
1132
- variant?: TBuildVariant;
1133
- /**
1134
- * An optional set of override options to apply to the selected build variant.
1135
- *
1136
- * @remarks
1137
- * This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
1138
- */
1139
- override?: Partial<TBuildResolvedConfig>;
1140
- };
1141
- };
1142
- type WebpackUserConfig = UserConfig<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
1143
- type RspackUserConfig = UserConfig<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
1144
- type RollupUserConfig = UserConfig<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
1145
- type RolldownUserConfig = UserConfig<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
1146
- type ViteUserConfig = UserConfig<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
1147
- type ESBuildUserConfig = UserConfig<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
1148
- type UnbuildUserConfig = UserConfig<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
1149
- type TsupUserConfig = UserConfig<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
1150
- type FarmUserConfig = UserConfig<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
1151
- type InferUserConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends "webpack" ? WebpackUserConfig : TBuildVariant extends "rspack" ? RspackUserConfig : TBuildVariant extends "vite" ? ViteUserConfig : TBuildVariant extends "esbuild" ? ESBuildUserConfig : TBuildVariant extends "unbuild" ? UnbuildUserConfig : TBuildVariant extends "tsup" ? TsupUserConfig : TBuildVariant extends "rolldown" ? RolldownUserConfig : TBuildVariant extends "rollup" ? RollupUserConfig : TBuildVariant extends "farm" ? FarmUserConfig : UserConfig;
1152
- type InitialUserConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
1153
- root: string;
1154
- };
1155
- type ParsedUserConfig<TUserConfig extends UserConfig = UserConfig> = TUserConfig & ResolvedConfig$1<TUserConfig> & {
1177
+ resolveId: (id: string, importer?: string, options?: ResolveOptions) => Promise<ExternalIdResult | undefined>;
1156
1178
  /**
1157
- * The path to the user configuration file, if it exists.
1179
+ * A helper function to load modules using the Jiti resolver
1158
1180
  *
1159
1181
  * @remarks
1160
- * This is typically the `powerlines.json`, `powerlines.config.js`, or `powerlines.config.ts` file in the project root.
1161
- */
1162
- configFile?: ConfigLayer<TUserConfig>["configFile"];
1163
- };
1164
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
1165
- /**
1166
- * The configuration provided while executing Powerlines commands.
1167
- */
1168
- type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
1169
- /**
1170
- * A string identifier for the Powerlines command being executed
1182
+ * This function can be used to load modules relative to the project root directory.
1183
+ *
1184
+ * @example
1185
+ * ```ts
1186
+ * const module = await context.load("some-module", "/path/to/importer");
1187
+ * ```
1188
+ *
1189
+ * @param id - The module to load.
1190
+ * @returns A promise that resolves to the loaded module.
1171
1191
  */
1172
- command: PowerlinesCommand;
1173
- };
1174
- type NewInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
1192
+ load: (id: string) => Promise<TransformResult | undefined>;
1175
1193
  /**
1176
- * A string identifier for the Powerlines command being executed
1194
+ * The Powerlines builtin virtual files
1177
1195
  */
1178
- command: "new";
1196
+ getBuiltins: () => Promise<VirtualFile[]>;
1179
1197
  /**
1180
- * The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
1198
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
1199
+ *
1200
+ * @param code - The source code of the builtin file
1201
+ * @param id - The unique identifier of the builtin file
1202
+ * @param path - An optional path to write the builtin file to
1181
1203
  */
1182
- packageName?: string;
1183
- };
1184
- type CleanInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
1204
+ emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
1185
1205
  /**
1186
- * A string identifier for the Powerlines command being executed
1206
+ * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1207
+ *
1208
+ * @param code - The source code of the entry file
1209
+ * @param path - An optional path to write the entry file to
1187
1210
  */
1188
- command: "clean";
1189
- };
1190
- type PrepareInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
1211
+ emitEntry: (code: string, path: string) => Promise<void>;
1191
1212
  /**
1192
- * A string identifier for the Powerlines command being executed
1213
+ * A function to update the context fields using a new user configuration options
1193
1214
  */
1194
- command: "prepare";
1195
- };
1196
- type BuildInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
1215
+ withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
1197
1216
  /**
1198
- * A string identifier for the Powerlines command being executed
1217
+ * A function to update the context fields using inline configuration options
1199
1218
  */
1200
- command: "build";
1201
- };
1202
- type LintInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
1219
+ withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
1203
1220
  /**
1204
- * A string identifier for the Powerlines command being executed
1221
+ * Create a new logger instance
1222
+ *
1223
+ * @param name - The name to use for the logger instance
1224
+ * @returns A logger function
1205
1225
  */
1206
- command: "lint";
1207
- };
1208
- type DocsInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
1226
+ createLog: (name: string | null) => LogFn;
1209
1227
  /**
1210
- * A string identifier for the Powerlines command being executed
1228
+ * Extend the current logger instance with a new name
1229
+ *
1230
+ * @param name - The name to use for the extended logger instance
1231
+ * @returns A logger function
1211
1232
  */
1212
- command: "docs";
1213
- };
1214
- type DeployInlineConfig<TUserConfig extends UserConfig = UserConfig> = InlineConfig<TUserConfig> & {
1233
+ extendLog: (name: string) => LogFn;
1215
1234
  /**
1216
- * A string identifier for the Powerlines command being executed
1235
+ * Generates a checksum representing the current context state
1236
+ *
1237
+ * @returns A promise that resolves to a string representing the checksum
1217
1238
  */
1218
- command: "deploy";
1219
- };
1220
- type ConfigEnv = Pick<ResolvedConfig$2, "command" | "mode" | "environments" | "preview">;
1221
- type AnyUserConfig = Record<string, any> & (Partial<UserConfig> | Partial<WebpackUserConfig> | Partial<RspackUserConfig> | Partial<ViteUserConfig> | Partial<ESBuildUserConfig> | Partial<UnbuildUserConfig> | Partial<TsupUserConfig> | Partial<RolldownUserConfig> | Partial<RollupUserConfig> | Partial<FarmUserConfig>);
1222
- type UserConfigFnObject = (env: ConfigEnv) => DeepPartial$1<UserConfig>;
1223
- type UserConfigFnPromise = (env: ConfigEnv) => Promise<DeepPartial$1<UserConfig>>;
1224
- type UserConfigFn = (env: ConfigEnv) => UserConfig | Promise<DeepPartial$1<UserConfig>>;
1225
- type UserConfigExport = DeepPartial$1<UserConfig> | Promise<DeepPartial$1<UserConfig>> | UserConfigFnObject | UserConfigFnPromise | UserConfigFn;
1226
- /**
1227
- * An empty interface to allow augmentation of the defineConfig input type.
1228
- */
1229
- interface DefineConfigInput {
1239
+ generateChecksum: () => Promise<string>;
1230
1240
  }
1231
- declare type __ΩLogFn = any[];
1232
- declare type __ΩWorkspaceConfig = any[];
1233
- declare type __ΩPluginFactory = any[];
1234
- declare type __ΩPluginConfigTuple = any[];
1235
- declare type __ΩPluginConfigObject = any[];
1236
- declare type __ΩPluginConfig = any[];
1237
- declare type __ΩPartialPlugin = any[];
1238
- declare type __ΩPartialPluginFactory = any[];
1239
- declare type __ΩProjectType = any[];
1240
- declare type __ΩBabelUserConfig = any[];
1241
- declare type __ΩOutputConfig = any[];
1242
- declare type __ΩBaseConfig = any[];
1243
- declare type __ΩEnvironmentConfig = any[];
1244
- declare type __ΩCommonUserConfig = any[];
1245
- declare type __ΩUserConfig = any[];
1246
- declare type __ΩWebpackUserConfig = any[];
1247
- declare type __ΩRspackUserConfig = any[];
1248
- declare type __ΩRollupUserConfig = any[];
1249
- declare type __ΩRolldownUserConfig = any[];
1250
- declare type __ΩViteUserConfig = any[];
1251
- declare type __ΩESBuildUserConfig = any[];
1252
- declare type __ΩUnbuildUserConfig = any[];
1253
- declare type __ΩTsupUserConfig = any[];
1254
- declare type __ΩFarmUserConfig = any[];
1255
- declare type __ΩInferUserConfig = any[];
1256
- declare type __ΩInitialUserConfig = any[];
1257
- declare type __ΩParsedUserConfig = any[];
1258
- declare type __ΩPowerlinesCommand = any[];
1259
- declare type __ΩInlineConfig = any[];
1260
- declare type __ΩNewInlineConfig = any[];
1261
- declare type __ΩCleanInlineConfig = any[];
1262
- declare type __ΩPrepareInlineConfig = any[];
1263
- declare type __ΩBuildInlineConfig = any[];
1264
- declare type __ΩLintInlineConfig = any[];
1265
- declare type __ΩDocsInlineConfig = any[];
1266
- declare type __ΩDeployInlineConfig = any[];
1267
- declare type __ΩConfigEnv = any[];
1268
- declare type __ΩAnyUserConfig = any[];
1269
- declare type __ΩUserConfigFnObject = any[];
1270
- declare type __ΩUserConfigFnPromise = any[];
1271
- declare type __ΩUserConfigFn = any[];
1272
- declare type __ΩUserConfigExport = any[];
1273
- declare type __ΩDefineConfigInput = any[];
1274
-
1275
- interface ResolvedEntryTypeDefinition extends TypeDefinition {
1241
+ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1276
1242
  /**
1277
- * The user provided entry point in the source code
1243
+ * The fully resolved Powerlines configuration
1278
1244
  */
1279
- input: TypeDefinition;
1245
+ config: TResolvedConfig;
1246
+ };
1247
+ interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
1280
1248
  /**
1281
- * An optional name to use in the package export during the build process
1249
+ * The expected plugins options for the Powerlines project.
1250
+ *
1251
+ * @remarks
1252
+ * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
1282
1253
  */
1283
- output?: string;
1284
- }
1285
- type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
1286
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
1254
+ plugins: Plugin<PluginContext<TResolvedConfig>>[];
1287
1255
  /**
1288
- * The name of the environment
1256
+ * A function to add a plugin to the context and update the configuration options
1289
1257
  */
1290
- name: string;
1258
+ addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
1291
1259
  /**
1292
- * Configuration options for the preview server
1260
+ * A table for storing the current context for each configured environment
1293
1261
  */
1294
- preview?: ResolvedPreviewOptions;
1295
- };
1296
- type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
1297
- type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
1298
- assets: ResolvedAssetGlob[];
1299
- }>;
1300
- /**
1301
- * The resolved options for the Powerlines project configuration.
1302
- */
1303
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
1262
+ environments: Record<string, EnvironmentContext<TResolvedConfig>>;
1304
1263
  /**
1305
- * The configuration options that were provided inline to the Powerlines CLI.
1264
+ * Retrieves the context for a specific environment by name
1265
+ *
1266
+ * @throws Will throw an error if the environment does not exist
1267
+ *
1268
+ * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
1269
+ * @returns A promise that resolves to the environment context.
1270
+ *
1271
+ * @example
1272
+ * ```ts
1273
+ * const devEnv = await apiContext.getEnvironment("development");
1274
+ * const defaultEnv = await apiContext.getEnvironment();
1275
+ * ```
1306
1276
  */
1307
- inlineConfig: InlineConfig<TUserConfig>;
1277
+ getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
1308
1278
  /**
1309
- * The original configuration options that were provided by the user to the Powerlines process.
1279
+ * Safely retrieves the context for a specific environment by name
1280
+ *
1281
+ * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
1282
+ * @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
1283
+ *
1284
+ * @example
1285
+ * ```ts
1286
+ * const devEnv = await apiContext.getEnvironmentSafe("development");
1287
+ * const defaultEnv = await apiContext.getEnvironmentSafe();
1288
+ * ```
1289
+ *
1290
+ * @remarks
1291
+ * This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
1292
+ * This can be useful in scenarios where the existence of an environment is optional or uncertain.
1293
+ *
1294
+ * ```ts
1295
+ * const testEnv = await apiContext.getEnvironmentSafe("test");
1296
+ * if (testEnv) {
1297
+ * // Environment exists, safe to use it
1298
+ * } else {
1299
+ * // Environment does not exist, handle accordingly
1300
+ * }
1301
+ * ```
1302
+ *
1303
+ * Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
1310
1304
  */
1311
- userConfig: TUserConfig;
1305
+ getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
1312
1306
  /**
1313
- * A string identifier for the Powerlines command being executed.
1307
+ * A function to copy the context and update the fields for a specific environment
1308
+ *
1309
+ * @param environment - The environment configuration to use.
1310
+ * @returns A new context instance with the updated environment.
1314
1311
  */
1315
- command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
1312
+ in: (environment: EnvironmentResolvedConfig) => Promise<EnvironmentContext<TResolvedConfig>>;
1313
+ }
1314
+ interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1315
+ plugin: Plugin<PluginContext<TResolvedConfig>>;
1316
+ context: PluginContext<TResolvedConfig>;
1317
+ }
1318
+ interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
1316
1319
  /**
1317
- * The root directory of the project's source code
1320
+ * The expected plugins options for the Powerlines project.
1318
1321
  *
1319
- * @defaultValue "\{projectRoot\}/src"
1322
+ * @remarks
1323
+ * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
1320
1324
  */
1321
- sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
1325
+ plugins: EnvironmentContextPlugin<TResolvedConfig>[];
1322
1326
  /**
1323
- * The root directory of the project.
1327
+ * A function to add a plugin to the context and update the configuration options
1324
1328
  */
1325
- projectRoot: NonUndefined<TUserConfig["root"]>;
1329
+ addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
1326
1330
  /**
1327
- * The type of project being built.
1331
+ * The environment specific resolved configuration
1328
1332
  */
1329
- projectType: NonUndefined<TUserConfig["type"]>;
1333
+ environment: EnvironmentResolvedConfig;
1330
1334
  /**
1331
- * The output configuration options to use for the build process
1335
+ * A table holding references to hook functions registered by plugins
1332
1336
  */
1333
- output: OutputResolvedConfig;
1337
+ hooks: HooksList<PluginContext<TResolvedConfig>>;
1334
1338
  /**
1335
- * Configuration provided to build processes
1336
- *
1337
- * @remarks
1338
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1339
+ * Retrieves the hook handlers for a specific hook name
1339
1340
  */
1340
- build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
1341
+ selectHooks: <TKey extends HookKeys<PluginContext<TResolvedConfig>>>(hook: TKey, options?: SelectHooksOptions) => Hooks[TKey][];
1342
+ }
1343
+ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1341
1344
  /**
1342
- * The log level to use for the Powerlines processes.
1345
+ * The environment specific resolved configuration
1346
+ */
1347
+ environment: EnvironmentResolvedConfig;
1348
+ /**
1349
+ * An alternative property name for the {@link log} property
1343
1350
  *
1344
- * @defaultValue "info"
1351
+ * @remarks
1352
+ * This is provided for compatibility with other logging libraries that expect a `logger` property.
1345
1353
  */
1346
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
1347
- };
1348
- type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
1349
- type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
1350
- type RspackResolvedConfig = ResolvedConfig<RspackUserConfig>;
1351
- type ESBuildResolvedConfig = ResolvedConfig<ESBuildUserConfig>;
1352
- type RollupResolvedConfig = ResolvedConfig<RollupUserConfig>;
1353
- type RolldownResolvedConfig = ResolvedConfig<RolldownUserConfig>;
1354
- type TsupResolvedConfig = ResolvedConfig<TsupUserConfig>;
1355
- type UnbuildResolvedConfig = ResolvedConfig<UnbuildUserConfig>;
1356
- type FarmResolvedConfig = ResolvedConfig<FarmUserConfig>;
1357
- type InferResolvedConfig<TBuildVariant extends BuildVariant | undefined> = TBuildVariant extends undefined ? ResolvedConfig : TBuildVariant extends "webpack" ? WebpackResolvedConfig : TBuildVariant extends "rspack" ? RspackResolvedConfig : TBuildVariant extends "vite" ? ViteResolvedConfig : TBuildVariant extends "esbuild" ? ESBuildResolvedConfig : TBuildVariant extends "unbuild" ? UnbuildResolvedConfig : TBuildVariant extends "tsup" ? TsupResolvedConfig : TBuildVariant extends "rolldown" ? RolldownResolvedConfig : TBuildVariant extends "rollup" ? RollupResolvedConfig : TBuildVariant extends "farm" ? FarmResolvedConfig : ResolvedConfig;
1358
- declare type __ΩResolvedEntryTypeDefinition = any[];
1359
- declare type __ΩBabelResolvedConfig = any[];
1360
- declare type __ΩEnvironmentResolvedConfig = any[];
1361
- declare type __ΩResolvedAssetGlob = any[];
1362
- declare type __ΩOutputResolvedConfig = any[];
1363
- declare type __ΩResolvedConfig = any[];
1364
- declare type __ΩViteResolvedConfig = any[];
1365
- declare type __ΩWebpackResolvedConfig = any[];
1366
- declare type __ΩRspackResolvedConfig = any[];
1367
- declare type __ΩESBuildResolvedConfig = any[];
1368
- declare type __ΩRollupResolvedConfig = any[];
1369
- declare type __ΩRolldownResolvedConfig = any[];
1370
- declare type __ΩTsupResolvedConfig = any[];
1371
- declare type __ΩUnbuildResolvedConfig = any[];
1372
- declare type __ΩFarmResolvedConfig = any[];
1373
- declare type __ΩInferResolvedConfig = any[];
1354
+ logger: LogFn;
1355
+ }
1356
+ type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1357
+ declare type __ΩLogLevel = any[];
1358
+ declare type __ΩWorkerProcess = any[];
1359
+ declare type __ΩMetaInfo = any[];
1360
+ declare type __ΩResolver = any[];
1361
+ declare type __ΩTransformResult = any[];
1362
+ declare type __ΩSourceFile = any[];
1363
+ declare type __ΩUnimportContext = any[];
1364
+ declare type __ΩSelectHooksOptions = any[];
1365
+ declare type __ΩInitContextOptions = any[];
1366
+ declare type __ΩUnresolvedContext = any[];
1367
+ declare type __ΩContext = any[];
1368
+ declare type __ΩAPIContext = any[];
1369
+ declare type __ΩEnvironmentContextPlugin = any[];
1370
+ declare type __ΩEnvironmentContext = any[];
1371
+ declare type __ΩPluginContext = any[];
1372
+ declare type __ΩBuildPluginContext = any[];
1374
1373
 
1375
- export { type TsupUserConfig as $, type PartialPlugin as A, type BabelPluginPass as B, type CommandType as C, type DefaultImportDefinition as D, type PartialPluginFactory as E, type ProjectType as F, type BabelUserConfig as G, type BaseConfig as H, type ImportDefinition as I, type EnvironmentConfig as J, type CommonUserConfig as K, type LogFn as L, type WebpackUserConfig as M, type NamedImportDefinition as N, type OutputConfig as O, type PluginFactory as P, type RspackUserConfig as Q, type ResolvedBabelTransformPluginOptions as R, SUPPORTED_COMMANDS as S, type RollupUserConfig as T, type UserConfig as U, type RolldownUserConfig as V, type WorkspaceConfig as W, type ViteUserConfig as X, type ESBuildUserConfig as Y, type UnbuildUserConfig as Z, type __ΩNamedImportDefinition as _, type BabelTransformPluginFilter as a, LogLevel as a$, type FarmUserConfig as a0, type InferUserConfig as a1, type InitialUserConfig as a2, type ParsedUserConfig as a3, type PowerlinesCommand as a4, type InlineConfig as a5, type NewInlineConfig as a6, type CleanInlineConfig as a7, type PrepareInlineConfig as a8, type BuildInlineConfig as a9, type __ΩRspackUserConfig as aA, type __ΩRollupUserConfig as aB, type __ΩRolldownUserConfig as aC, type __ΩViteUserConfig as aD, type __ΩESBuildUserConfig as aE, type __ΩUnbuildUserConfig as aF, type __ΩTsupUserConfig as aG, type __ΩFarmUserConfig as aH, type __ΩInferUserConfig as aI, type __ΩInitialUserConfig as aJ, type __ΩParsedUserConfig as aK, type __ΩPowerlinesCommand as aL, type __ΩInlineConfig as aM, type __ΩNewInlineConfig as aN, type __ΩCleanInlineConfig as aO, type __ΩPrepareInlineConfig as aP, type __ΩBuildInlineConfig as aQ, type __ΩLintInlineConfig as aR, type __ΩDocsInlineConfig as aS, type __ΩDeployInlineConfig as aT, type __ΩConfigEnv as aU, type __ΩAnyUserConfig as aV, type __ΩUserConfigFnObject as aW, type __ΩUserConfigFnPromise as aX, type __ΩUserConfigFn as aY, type __ΩUserConfigExport as aZ, type __ΩDefineConfigInput as a_, type LintInlineConfig as aa, type DocsInlineConfig as ab, type DeployInlineConfig as ac, type ConfigEnv as ad, type AnyUserConfig as ae, type UserConfigFnObject as af, type UserConfigFnPromise as ag, type UserConfigFn as ah, type UserConfigExport as ai, type DefineConfigInput as aj, type __ΩLogFn as ak, type __ΩWorkspaceConfig as al, type __ΩPluginFactory as am, type __ΩPluginConfigTuple as an, type __ΩPluginConfigObject as ao, type __ΩPluginConfig as ap, type __ΩPartialPlugin as aq, type __ΩPartialPluginFactory as ar, type __ΩProjectType as as, type __ΩBabelUserConfig as at, type __ΩOutputConfig as au, type __ΩBaseConfig as av, type __ΩEnvironmentConfig as aw, type __ΩCommonUserConfig as ax, type __ΩUserConfig as ay, type __ΩWebpackUserConfig as az, type BabelTransformPlugin as b, type GenerateTypesResult as b$, type WorkerProcess as b0, type MetaInfo as b1, type Resolver as b2, type TransformResult as b3, type SourceFile as b4, type UnimportContext as b5, type SelectHooksOptions as b6, type InitContextOptions as b7, type UnresolvedContext as b8, type Context as b9, type ExternalHookKeys as bA, type Hooks as bB, type HookKeys as bC, type BaseHooksListItem as bD, type BaseHooksList as bE, type ExternalHooksListItem as bF, type HooksList as bG, type InferHookHandler as bH, type InferHookReturnType as bI, type InferHookParameters as bJ, type InferHookThisType as bK, type __ΩBaseHooks as bL, type __ΩBaseHookKeys as bM, type __ΩExternalHooks as bN, type __ΩExternalHookKeys as bO, type __ΩHooks as bP, type __ΩHookKeys as bQ, type __ΩBaseHooksListItem as bR, type __ΩBaseHooksList as bS, type __ΩExternalHooksListItem as bT, type __ΩHooksList as bU, type __ΩInferHookHandler as bV, type __ΩInferHookReturnType as bW, type __ΩInferHookParameters as bX, type __ΩInferHookThisType as bY, type PluginHookObject as bZ, type PluginHook as b_, type APIContext as ba, type EnvironmentContextPlugin as bb, type EnvironmentContext as bc, type PluginContext as bd, type BuildPluginContext as be, type SerializedVirtualFileSystem as bf, type __ΩLogLevel as bg, type __ΩWorkerProcess as bh, type __ΩMetaInfo as bi, type __ΩResolver as bj, type __ΩTransformResult as bk, type __ΩSourceFile as bl, type __ΩUnimportContext as bm, type __ΩSelectHooksOptions as bn, type __ΩInitContextOptions as bo, type __ΩUnresolvedContext as bp, type __ΩContext as bq, type __ΩAPIContext as br, type __ΩEnvironmentContextPlugin as bs, type __ΩEnvironmentContext as bt, type __ΩPluginContext as bu, type __ΩBuildPluginContext as bv, type __ΩSerializedVirtualFileSystem as bw, type BaseHooks as bx, type BaseHookKeys as by, type ExternalHooks as bz, type BabelTransformPluginOptions as c, type ConfigResult as c0, type BasePluginHookFunctions as c1, type BuildPlugin as c2, type ExternalPluginHookFunctionsVariant as c3, type ExternalPluginHookFunctions as c4, type PluginHookFunctions as c5, type PluginHooks as c6, type PluginBuildPlugins as c7, type Plugin as c8, PLUGIN_NON_HOOK_FIELDS as c9, type TsupResolvedConfig as cA, type UnbuildResolvedConfig as cB, type FarmResolvedConfig as cC, type InferResolvedConfig as cD, type __ΩResolvedEntryTypeDefinition as cE, type __ΩBabelResolvedConfig as cF, type __ΩEnvironmentResolvedConfig as cG, type __ΩResolvedAssetGlob as cH, type __ΩOutputResolvedConfig as cI, type __ΩResolvedConfig as cJ, type __ΩViteResolvedConfig as cK, type __ΩWebpackResolvedConfig as cL, type __ΩRspackResolvedConfig as cM, type __ΩESBuildResolvedConfig as cN, type __ΩRollupResolvedConfig as cO, type __ΩRolldownResolvedConfig as cP, type __ΩTsupResolvedConfig as cQ, type __ΩUnbuildResolvedConfig as cR, type __ΩFarmResolvedConfig as cS, type __ΩInferResolvedConfig as cT, type PluginNonHookFields as ca, type __ΩPluginHookObject as cb, type __ΩPluginHook as cc, type __ΩGenerateTypesResult as cd, type __ΩConfigResult as ce, type __ΩBasePluginHookFunctions as cf, type __ΩBuildPlugin as cg, type __ΩExternalPluginHookFunctionsVariant as ch, type __ΩExternalPluginHookFunctions as ci, type __ΩPluginHookFunctions as cj, type __ΩPluginHooks as ck, type __ΩPluginBuildPlugins as cl, type __ΩPlugin as cm, type __ΩPluginNonHookFields as cn, type ResolvedEntryTypeDefinition as co, type BabelResolvedConfig as cp, type EnvironmentResolvedConfig as cq, type ResolvedAssetGlob as cr, type OutputResolvedConfig as cs, type ResolvedConfig as ct, type ViteResolvedConfig as cu, type WebpackResolvedConfig as cv, type RspackResolvedConfig as cw, type ESBuildResolvedConfig as cx, type RollupResolvedConfig as cy, type RolldownResolvedConfig as cz, type BabelTransformInput as d, type BabelTransformPluginBuilderParams as e, type BabelTransformPluginBuilder as f, type DeclareBabelTransformPluginReturn as g, type ImportSpecifier as h, type __ΩDefaultImportDefinition as i, type __ΩImportDefinition as j, type __ΩBabelPluginPass as k, type __ΩBabelTransformPluginFilter as l, type __ΩBabelTransformPlugin as m, type __ΩBabelTransformPluginOptions as n, type __ΩResolvedBabelTransformPluginOptions as o, type __ΩBabelTransformInput as p, type __ΩBabelTransformPluginBuilderParams as q, type __ΩBabelTransformPluginBuilder as r, type __ΩDeclareBabelTransformPluginReturn as s, type __ΩImportSpecifier as t, type Commands as u, type __ΩCommandType as v, type __ΩCommands as w, type PluginConfigTuple as x, type PluginConfigObject as y, type PluginConfig as z };
1374
+ export { type TsupUserConfig as $, type PartialPlugin as A, type BabelPluginPass as B, type CommandType as C, type DefaultImportDefinition as D, type PartialPluginFactory as E, type ProjectType as F, type BabelUserConfig as G, type BaseConfig as H, type ImportDefinition as I, type EnvironmentConfig as J, type CommonUserConfig as K, type LogFn as L, type WebpackUserConfig as M, type NamedImportDefinition as N, type OutputConfig as O, type PluginFactory as P, type RspackUserConfig as Q, type ResolvedBabelTransformPluginOptions as R, SUPPORTED_COMMANDS as S, type RollupUserConfig as T, type UserConfig as U, type RolldownUserConfig as V, type WorkspaceConfig as W, type ViteUserConfig as X, type ESBuildUserConfig as Y, type UnbuildUserConfig as Z, type __ΩNamedImportDefinition as _, type BabelTransformPluginFilter as a, LogLevel as a$, type FarmUserConfig as a0, type InferUserConfig as a1, type InitialUserConfig as a2, type ParsedUserConfig as a3, type PowerlinesCommand as a4, type InlineConfig as a5, type NewInlineConfig as a6, type CleanInlineConfig as a7, type PrepareInlineConfig as a8, type BuildInlineConfig as a9, type __ΩRspackUserConfig as aA, type __ΩRollupUserConfig as aB, type __ΩRolldownUserConfig as aC, type __ΩViteUserConfig as aD, type __ΩESBuildUserConfig as aE, type __ΩUnbuildUserConfig as aF, type __ΩTsupUserConfig as aG, type __ΩFarmUserConfig as aH, type __ΩInferUserConfig as aI, type __ΩInitialUserConfig as aJ, type __ΩParsedUserConfig as aK, type __ΩPowerlinesCommand as aL, type __ΩInlineConfig as aM, type __ΩNewInlineConfig as aN, type __ΩCleanInlineConfig as aO, type __ΩPrepareInlineConfig as aP, type __ΩBuildInlineConfig as aQ, type __ΩLintInlineConfig as aR, type __ΩDocsInlineConfig as aS, type __ΩDeployInlineConfig as aT, type __ΩConfigEnv as aU, type __ΩAnyUserConfig as aV, type __ΩUserConfigFnObject as aW, type __ΩUserConfigFnPromise as aX, type __ΩUserConfigFn as aY, type __ΩUserConfigExport as aZ, type __ΩDefineConfigInput as a_, type LintInlineConfig as aa, type DocsInlineConfig as ab, type DeployInlineConfig as ac, type ConfigEnv as ad, type AnyUserConfig as ae, type UserConfigFnObject as af, type UserConfigFnPromise as ag, type UserConfigFn as ah, type UserConfigExport as ai, type DefineConfigInput as aj, type __ΩLogFn as ak, type __ΩWorkspaceConfig as al, type __ΩPluginFactory as am, type __ΩPluginConfigTuple as an, type __ΩPluginConfigObject as ao, type __ΩPluginConfig as ap, type __ΩPartialPlugin as aq, type __ΩPartialPluginFactory as ar, type __ΩProjectType as as, type __ΩBabelUserConfig as at, type __ΩOutputConfig as au, type __ΩBaseConfig as av, type __ΩEnvironmentConfig as aw, type __ΩCommonUserConfig as ax, type __ΩUserConfig as ay, type __ΩWebpackUserConfig as az, type BabelTransformPlugin as b, type BasePluginHookFunctions as b$, type WorkerProcess as b0, type MetaInfo as b1, type Resolver as b2, type TransformResult as b3, type SourceFile as b4, type UnimportContext as b5, type SelectHooksOptions as b6, type InitContextOptions as b7, type UnresolvedContext as b8, type Context as b9, type HookKeys as bA, type BaseHooksListItem as bB, type BaseHooksList as bC, type ExternalHooksListItem as bD, type HooksList as bE, type InferHookHandler as bF, type InferHookReturnType as bG, type InferHookParameters as bH, type InferHookThisType as bI, type __ΩBaseHooks as bJ, type __ΩBaseHookKeys as bK, type __ΩExternalHooks as bL, type __ΩExternalHookKeys as bM, type __ΩHooks as bN, type __ΩHookKeys as bO, type __ΩBaseHooksListItem as bP, type __ΩBaseHooksList as bQ, type __ΩExternalHooksListItem as bR, type __ΩHooksList as bS, type __ΩInferHookHandler as bT, type __ΩInferHookReturnType as bU, type __ΩInferHookParameters as bV, type __ΩInferHookThisType as bW, type PluginHookObject as bX, type PluginHook as bY, type GenerateTypesResult as bZ, type ConfigResult as b_, type APIContext as ba, type EnvironmentContextPlugin as bb, type EnvironmentContext as bc, type PluginContext as bd, type BuildPluginContext as be, type __ΩLogLevel as bf, type __ΩWorkerProcess as bg, type __ΩMetaInfo as bh, type __ΩResolver as bi, type __ΩTransformResult as bj, type __ΩSourceFile as bk, type __ΩUnimportContext as bl, type __ΩSelectHooksOptions as bm, type __ΩInitContextOptions as bn, type __ΩUnresolvedContext as bo, type __ΩContext as bp, type __ΩAPIContext as bq, type __ΩEnvironmentContextPlugin as br, type __ΩEnvironmentContext as bs, type __ΩPluginContext as bt, type __ΩBuildPluginContext as bu, type BaseHooks as bv, type BaseHookKeys as bw, type ExternalHooks as bx, type ExternalHookKeys as by, type Hooks as bz, type BabelTransformPluginOptions as c, type BuildPlugin as c0, type ExternalPluginHookFunctionsVariant as c1, type ExternalPluginHookFunctions as c2, type PluginHookFunctions as c3, type PluginHooks as c4, type PluginBuildPlugins as c5, type Plugin as c6, PLUGIN_NON_HOOK_FIELDS as c7, type PluginNonHookFields as c8, type __ΩPluginHookObject as c9, type FarmResolvedConfig as cA, type InferResolvedConfig as cB, type __ΩResolvedEntryTypeDefinition as cC, type __ΩBabelResolvedConfig as cD, type __ΩEnvironmentResolvedConfig as cE, type __ΩResolvedAssetGlob as cF, type __ΩOutputResolvedConfig as cG, type __ΩResolvedConfig as cH, type __ΩViteResolvedConfig as cI, type __ΩWebpackResolvedConfig as cJ, type __ΩRspackResolvedConfig as cK, type __ΩESBuildResolvedConfig as cL, type __ΩRollupResolvedConfig as cM, type __ΩRolldownResolvedConfig as cN, type __ΩTsupResolvedConfig as cO, type __ΩUnbuildResolvedConfig as cP, type __ΩFarmResolvedConfig as cQ, type __ΩInferResolvedConfig as cR, type __ΩPluginHook as ca, type __ΩGenerateTypesResult as cb, type __ΩConfigResult as cc, type __ΩBasePluginHookFunctions as cd, type __ΩBuildPlugin as ce, type __ΩExternalPluginHookFunctionsVariant as cf, type __ΩExternalPluginHookFunctions as cg, type __ΩPluginHookFunctions as ch, type __ΩPluginHooks as ci, type __ΩPluginBuildPlugins as cj, type __ΩPlugin as ck, type __ΩPluginNonHookFields as cl, type ResolvedEntryTypeDefinition as cm, type BabelResolvedConfig as cn, type EnvironmentResolvedConfig as co, type ResolvedAssetGlob as cp, type OutputResolvedConfig as cq, type ResolvedConfig as cr, type ViteResolvedConfig as cs, type WebpackResolvedConfig as ct, type RspackResolvedConfig as cu, type ESBuildResolvedConfig as cv, type RollupResolvedConfig as cw, type RolldownResolvedConfig as cx, type TsupResolvedConfig as cy, type UnbuildResolvedConfig as cz, type BabelTransformInput as d, type BabelTransformPluginBuilderParams as e, type BabelTransformPluginBuilder as f, type DeclareBabelTransformPluginReturn as g, type ImportSpecifier as h, type __ΩDefaultImportDefinition as i, type __ΩImportDefinition as j, type __ΩBabelPluginPass as k, type __ΩBabelTransformPluginFilter as l, type __ΩBabelTransformPlugin as m, type __ΩBabelTransformPluginOptions as n, type __ΩResolvedBabelTransformPluginOptions as o, type __ΩBabelTransformInput as p, type __ΩBabelTransformPluginBuilderParams as q, type __ΩBabelTransformPluginBuilder as r, type __ΩDeclareBabelTransformPluginReturn as s, type __ΩImportSpecifier as t, type Commands as u, type __ΩCommandType as v, type __ΩCommands as w, type PluginConfigTuple as x, type PluginConfigObject as y, type PluginConfig as z };