powerlines 0.14.1 → 0.14.5

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