powerlines 0.14.1 → 0.14.4

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