powerlines 0.14.1 → 0.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (728) hide show
  1. package/README.md +30 -21
  2. package/dist/_virtual/_rolldown/runtime.cjs +29 -0
  3. package/dist/_virtual/_rolldown/runtime.mjs +36 -0
  4. package/dist/api.cjs +10 -0
  5. package/dist/api.d.cts +2 -0
  6. package/dist/api.d.mts +2 -0
  7. package/dist/api.mjs +3 -0
  8. package/dist/astro.cjs +24 -28
  9. package/dist/astro.d.cts +14 -47
  10. package/dist/astro.d.cts.map +1 -0
  11. package/dist/astro.d.mts +25 -0
  12. package/dist/astro.d.mts.map +1 -0
  13. package/dist/astro.mjs +25 -0
  14. package/dist/astro.mjs.map +1 -0
  15. package/dist/config.cjs +9 -0
  16. package/dist/config.d.cts +1 -0
  17. package/dist/config.d.mts +1 -0
  18. package/dist/config.mjs +3 -0
  19. package/dist/constants.cjs +9 -0
  20. package/dist/constants.d.cts +1 -0
  21. package/dist/constants.d.mts +1 -0
  22. package/dist/constants.mjs +3 -0
  23. package/dist/context.cjs +9 -0
  24. package/dist/context.d.cts +1 -0
  25. package/dist/context.d.mts +1 -0
  26. package/dist/context.mjs +3 -0
  27. package/dist/engine.cjs +30 -0
  28. package/dist/engine.d.cts +24 -0
  29. package/dist/engine.d.cts.map +1 -0
  30. package/dist/engine.d.mts +24 -0
  31. package/dist/engine.d.mts.map +1 -0
  32. package/dist/engine.mjs +29 -0
  33. package/dist/engine.mjs.map +1 -0
  34. package/dist/esbuild.cjs +51 -23
  35. package/dist/esbuild.d.cts +13 -45
  36. package/dist/esbuild.d.cts.map +1 -0
  37. package/dist/esbuild.d.mts +25 -0
  38. package/dist/esbuild.d.mts.map +1 -0
  39. package/dist/esbuild.mjs +43 -0
  40. package/dist/esbuild.mjs.map +1 -0
  41. package/dist/farm.cjs +26 -18
  42. package/dist/farm.d.cts +15 -47
  43. package/dist/farm.d.cts.map +1 -0
  44. package/dist/farm.d.mts +25 -0
  45. package/dist/farm.d.mts.map +1 -0
  46. package/dist/farm.mjs +26 -0
  47. package/dist/farm.mjs.map +1 -0
  48. package/dist/index.cjs +40 -91
  49. package/dist/index.d.cts +21 -60
  50. package/dist/index.d.cts.map +1 -0
  51. package/dist/index.d.mts +26 -0
  52. package/dist/index.d.mts.map +1 -0
  53. package/dist/index.mjs +34 -0
  54. package/dist/index.mjs.map +1 -0
  55. package/dist/next.cjs +35 -27
  56. package/dist/next.d.cts +6 -4
  57. package/dist/next.d.cts.map +1 -0
  58. package/dist/{next.d.ts → next.d.mts} +6 -4
  59. package/dist/next.d.mts.map +1 -0
  60. package/dist/next.mjs +36 -0
  61. package/dist/next.mjs.map +1 -0
  62. package/dist/nuxt.cjs +44 -29
  63. package/dist/nuxt.d.cts +19 -10
  64. package/dist/nuxt.d.cts.map +1 -0
  65. package/dist/nuxt.d.mts +29 -0
  66. package/dist/nuxt.d.mts.map +1 -0
  67. package/dist/nuxt.mjs +44 -0
  68. package/dist/nuxt.mjs.map +1 -0
  69. package/dist/package.cjs +18 -0
  70. package/dist/package.mjs +7 -0
  71. package/dist/package.mjs.map +1 -0
  72. package/dist/plugin-utils.cjs +9 -0
  73. package/dist/plugin-utils.d.cts +1 -0
  74. package/dist/plugin-utils.d.mts +1 -0
  75. package/dist/plugin-utils.mjs +3 -0
  76. package/dist/rolldown.cjs +43 -22
  77. package/dist/rolldown.d.cts +10 -43
  78. package/dist/rolldown.d.cts.map +1 -0
  79. package/dist/rolldown.d.mts +24 -0
  80. package/dist/rolldown.d.mts.map +1 -0
  81. package/dist/rolldown.mjs +35 -0
  82. package/dist/rolldown.mjs.map +1 -0
  83. package/dist/rollup.cjs +34 -22
  84. package/dist/rollup.d.cts +11 -43
  85. package/dist/rollup.d.cts.map +1 -0
  86. package/dist/rollup.d.mts +25 -0
  87. package/dist/rollup.d.mts.map +1 -0
  88. package/dist/rollup.mjs +26 -0
  89. package/dist/rollup.mjs.map +1 -0
  90. package/dist/rspack.cjs +34 -22
  91. package/dist/rspack.d.cts +14 -46
  92. package/dist/rspack.d.cts.map +1 -0
  93. package/dist/rspack.d.mts +25 -0
  94. package/dist/rspack.d.mts.map +1 -0
  95. package/dist/rspack.mjs +26 -0
  96. package/dist/rspack.mjs.map +1 -0
  97. package/dist/schemas.cjs +9 -0
  98. package/dist/schemas.d.cts +1 -0
  99. package/dist/schemas.d.mts +1 -0
  100. package/dist/schemas.mjs +3 -0
  101. package/dist/storage.cjs +9 -0
  102. package/dist/storage.d.cts +1 -0
  103. package/dist/storage.d.mts +1 -0
  104. package/dist/storage.mjs +3 -0
  105. package/dist/tsdown.cjs +96 -0
  106. package/dist/tsdown.d.cts +31 -0
  107. package/dist/tsdown.d.cts.map +1 -0
  108. package/dist/tsdown.d.mts +31 -0
  109. package/dist/tsdown.d.mts.map +1 -0
  110. package/dist/tsdown.mjs +82 -0
  111. package/dist/tsdown.mjs.map +1 -0
  112. package/dist/tsup.cjs +67 -24
  113. package/dist/tsup.d.cts +12 -8
  114. package/dist/tsup.d.cts.map +1 -0
  115. package/dist/{tsup.d.ts → tsup.d.mts} +12 -8
  116. package/dist/tsup.d.mts.map +1 -0
  117. package/dist/tsup.mjs +59 -0
  118. package/dist/tsup.mjs.map +1 -0
  119. package/dist/types.cjs +0 -0
  120. package/dist/types.d.cts +8 -0
  121. package/dist/types.d.cts.map +1 -0
  122. package/dist/types.d.mts +8 -0
  123. package/dist/types.d.mts.map +1 -0
  124. package/dist/types.mjs +1 -0
  125. package/dist/typescript.cjs +9 -0
  126. package/dist/typescript.d.cts +1 -0
  127. package/dist/typescript.d.mts +1 -0
  128. package/dist/typescript.mjs +3 -0
  129. package/dist/unbuild.cjs +17 -0
  130. package/dist/unbuild.d.cts +2 -0
  131. package/dist/unbuild.d.mts +2 -0
  132. package/dist/unbuild.mjs +3 -0
  133. package/dist/unloader.cjs +23 -26
  134. package/dist/unloader.d.cts +11 -45
  135. package/dist/unloader.d.cts.map +1 -0
  136. package/dist/unloader.d.mts +22 -0
  137. package/dist/unloader.d.mts.map +1 -0
  138. package/dist/unloader.mjs +23 -0
  139. package/dist/unloader.mjs.map +1 -0
  140. package/dist/unplugin.cjs +105 -37
  141. package/dist/unplugin.d.cts +9 -69
  142. package/dist/unplugin.d.cts.map +1 -0
  143. package/dist/unplugin.d.mts +17 -0
  144. package/dist/unplugin.d.mts.map +1 -0
  145. package/dist/unplugin.mjs +101 -0
  146. package/dist/unplugin.mjs.map +1 -0
  147. package/dist/utils.cjs +25 -0
  148. package/dist/utils.d.cts +3 -0
  149. package/dist/utils.d.mts +3 -0
  150. package/dist/utils.mjs +7 -0
  151. package/dist/vite.cjs +76 -24
  152. package/dist/vite.d.cts +12 -44
  153. package/dist/vite.d.cts.map +1 -0
  154. package/dist/vite.d.mts +25 -0
  155. package/dist/vite.d.mts.map +1 -0
  156. package/dist/vite.mjs +66 -0
  157. package/dist/vite.mjs.map +1 -0
  158. package/dist/webpack.cjs +34 -23
  159. package/dist/webpack.d.cts +10 -43
  160. package/dist/webpack.d.cts.map +1 -0
  161. package/dist/webpack.d.mts +24 -0
  162. package/dist/webpack.d.mts.map +1 -0
  163. package/dist/webpack.mjs +25 -0
  164. package/dist/webpack.mjs.map +1 -0
  165. package/files/application/README.md.hbs +16 -42
  166. package/files/application/package.json.hbs +7 -28
  167. package/files/common/jest.config.ts.hbs +2 -3
  168. package/files/common/tsconfig.json.hbs +5 -10
  169. package/files/common/tsconfig.spec.json.hbs +3 -13
  170. package/files/library/README.md.hbs +11 -34
  171. package/files/library/package.json.hbs +9 -32
  172. package/package.json +253 -342
  173. package/schemas/fs.capnp +42 -0
  174. package/dist/astro.d.ts +0 -58
  175. package/dist/astro.js +0 -11
  176. package/dist/babel-types.d.ts +0 -292
  177. package/dist/chunk-22K72CJ5.cjs +0 -18
  178. package/dist/chunk-2OGPXWHG.js +0 -21
  179. package/dist/chunk-2VIXD2XB.js +0 -3
  180. package/dist/chunk-3IM6CTCB.cjs +0 -12
  181. package/dist/chunk-4AKYOJXA.cjs +0 -20
  182. package/dist/chunk-4FZTGBHW.cjs +0 -12
  183. package/dist/chunk-4HGQJ4KR.js +0 -11
  184. package/dist/chunk-4JCNAKOE.cjs +0 -4
  185. package/dist/chunk-5A5AK6JI.js +0 -31
  186. package/dist/chunk-5S33UKRI.js +0 -9
  187. package/dist/chunk-5VPVJHJO.cjs +0 -18
  188. package/dist/chunk-6TJGZR5X.js +0 -46
  189. package/dist/chunk-6ZGIV2SU.cjs +0 -4
  190. package/dist/chunk-7BZQBW77.cjs +0 -4
  191. package/dist/chunk-7GVRTQLJ.js +0 -16
  192. package/dist/chunk-7HF3SEKY.cjs +0 -24
  193. package/dist/chunk-7QQZH7V2.js +0 -9
  194. package/dist/chunk-7QVYU63E.js +0 -6
  195. package/dist/chunk-AFJCY3R6.js +0 -3
  196. package/dist/chunk-APVMN2H7.cjs +0 -14
  197. package/dist/chunk-AXIRZAL7.js +0 -3
  198. package/dist/chunk-DFLNRC3B.cjs +0 -4
  199. package/dist/chunk-DS7OM4NX.cjs +0 -4
  200. package/dist/chunk-DURCSSLV.js +0 -3
  201. package/dist/chunk-EBMELFCF.js +0 -12
  202. package/dist/chunk-GC3BRYAK.cjs +0 -13
  203. package/dist/chunk-GIE6OE3X.js +0 -3
  204. package/dist/chunk-HJW7OH6E.js +0 -3
  205. package/dist/chunk-IHUNA3MO.cjs +0 -4
  206. package/dist/chunk-KMLFL4CW.js +0 -14
  207. package/dist/chunk-LO77RPRV.js +0 -16
  208. package/dist/chunk-M6XRJI44.js +0 -9
  209. package/dist/chunk-MW2CYPK5.cjs +0 -34
  210. package/dist/chunk-N2RUZCWA.js +0 -9
  211. package/dist/chunk-N6L2CYXV.js +0 -21
  212. package/dist/chunk-NVNMK4CE.js +0 -39
  213. package/dist/chunk-O7GICJVN.cjs +0 -116
  214. package/dist/chunk-OYASPHNL.js +0 -3
  215. package/dist/chunk-P4BOYWXT.js +0 -3570
  216. package/dist/chunk-PJRHRDLS.cjs +0 -3602
  217. package/dist/chunk-PK6SKIKE.cjs +0 -8
  218. package/dist/chunk-Q7EJVZVI.cjs +0 -4
  219. package/dist/chunk-RIOZPUCZ.cjs +0 -34
  220. package/dist/chunk-SIZKRND7.js +0 -12
  221. package/dist/chunk-TLHFXGYV.js +0 -3
  222. package/dist/chunk-TLRPAJU2.cjs +0 -12
  223. package/dist/chunk-TSWMWZ4U.cjs +0 -12
  224. package/dist/chunk-UFEM5JTE.cjs +0 -42
  225. package/dist/chunk-UZQYBO6Z.cjs +0 -52
  226. package/dist/chunk-V7LXFIGK.js +0 -199
  227. package/dist/chunk-VNRXLY2T.js +0 -3
  228. package/dist/chunk-VQCQRLGM.cjs +0 -4
  229. package/dist/chunk-WA6IOZHV.js +0 -109
  230. package/dist/chunk-WCTOTE3T.cjs +0 -201
  231. package/dist/chunk-XBF43VLE.cjs +0 -4
  232. package/dist/chunk-XZO6ZJQP.cjs +0 -4
  233. package/dist/chunk-Y5CDUGSN.cjs +0 -12
  234. package/dist/chunk-YFP5GQWW.js +0 -9
  235. package/dist/chunk-YIWHO6SW.cjs +0 -14
  236. package/dist/chunk-YQXNZNGK.js +0 -31
  237. package/dist/chunk-YTOIG4CV.cjs +0 -24
  238. package/dist/chunk-YZCTXGFH.js +0 -11
  239. package/dist/chunk-Z5H7LD6W.js +0 -3
  240. package/dist/chunk-ZEJHPSLK.cjs +0 -19
  241. package/dist/define-config.cjs +0 -13
  242. package/dist/define-config.d.cts +0 -50
  243. package/dist/define-config.d.ts +0 -50
  244. package/dist/define-config.js +0 -4
  245. package/dist/esbuild.d.ts +0 -57
  246. package/dist/esbuild.js +0 -10
  247. package/dist/extend-plugin.cjs +0 -13
  248. package/dist/extend-plugin.d.cts +0 -48
  249. package/dist/extend-plugin.d.ts +0 -48
  250. package/dist/extend-plugin.js +0 -4
  251. package/dist/farm.d.ts +0 -57
  252. package/dist/farm.js +0 -14
  253. package/dist/hooks-Wrj1dKJ9.d.cts +0 -28
  254. package/dist/hooks-q1Az_C64.d.ts +0 -28
  255. package/dist/index.d.ts +0 -65
  256. package/dist/index.js +0 -40
  257. package/dist/internal/api.cjs +0 -16
  258. package/dist/internal/api.cjs.map +0 -1
  259. package/dist/internal/api.d.cts +0 -192
  260. package/dist/internal/api.d.ts +0 -192
  261. package/dist/internal/api.js +0 -7
  262. package/dist/internal/api.js.map +0 -1
  263. package/dist/lib/build/esbuild.cjs +0 -22
  264. package/dist/lib/build/esbuild.cjs.map +0 -1
  265. package/dist/lib/build/esbuild.d.cts +0 -51
  266. package/dist/lib/build/esbuild.d.ts +0 -51
  267. package/dist/lib/build/esbuild.js +0 -5
  268. package/dist/lib/build/esbuild.js.map +0 -1
  269. package/dist/lib/build/index.cjs +0 -82
  270. package/dist/lib/build/index.cjs.map +0 -1
  271. package/dist/lib/build/index.d.cts +0 -41
  272. package/dist/lib/build/index.d.ts +0 -41
  273. package/dist/lib/build/index.js +0 -13
  274. package/dist/lib/build/index.js.map +0 -1
  275. package/dist/lib/build/rolldown.cjs +0 -14
  276. package/dist/lib/build/rolldown.cjs.map +0 -1
  277. package/dist/lib/build/rolldown.d.cts +0 -42
  278. package/dist/lib/build/rolldown.d.ts +0 -42
  279. package/dist/lib/build/rolldown.js +0 -5
  280. package/dist/lib/build/rolldown.js.map +0 -1
  281. package/dist/lib/build/rollup.cjs +0 -17
  282. package/dist/lib/build/rollup.cjs.map +0 -1
  283. package/dist/lib/build/rollup.d.cts +0 -49
  284. package/dist/lib/build/rollup.d.ts +0 -49
  285. package/dist/lib/build/rollup.js +0 -4
  286. package/dist/lib/build/rollup.js.map +0 -1
  287. package/dist/lib/build/rspack.cjs +0 -13
  288. package/dist/lib/build/rspack.cjs.map +0 -1
  289. package/dist/lib/build/rspack.d.cts +0 -42
  290. package/dist/lib/build/rspack.d.ts +0 -42
  291. package/dist/lib/build/rspack.js +0 -4
  292. package/dist/lib/build/rspack.js.map +0 -1
  293. package/dist/lib/build/tsup.cjs +0 -23
  294. package/dist/lib/build/tsup.cjs.map +0 -1
  295. package/dist/lib/build/tsup.d.cts +0 -51
  296. package/dist/lib/build/tsup.d.ts +0 -51
  297. package/dist/lib/build/tsup.js +0 -6
  298. package/dist/lib/build/tsup.js.map +0 -1
  299. package/dist/lib/build/unbuild.cjs +0 -23
  300. package/dist/lib/build/unbuild.cjs.map +0 -1
  301. package/dist/lib/build/unbuild.d.cts +0 -63
  302. package/dist/lib/build/unbuild.d.ts +0 -63
  303. package/dist/lib/build/unbuild.js +0 -6
  304. package/dist/lib/build/unbuild.js.map +0 -1
  305. package/dist/lib/build/vite.cjs +0 -19
  306. package/dist/lib/build/vite.cjs.map +0 -1
  307. package/dist/lib/build/vite.d.cts +0 -43
  308. package/dist/lib/build/vite.d.ts +0 -43
  309. package/dist/lib/build/vite.js +0 -6
  310. package/dist/lib/build/vite.js.map +0 -1
  311. package/dist/lib/build/webpack.cjs +0 -13
  312. package/dist/lib/build/webpack.cjs.map +0 -1
  313. package/dist/lib/build/webpack.d.cts +0 -42
  314. package/dist/lib/build/webpack.d.ts +0 -42
  315. package/dist/lib/build/webpack.js +0 -4
  316. package/dist/lib/build/webpack.js.map +0 -1
  317. package/dist/lib/chunk-35EO5Y7R.js +0 -50
  318. package/dist/lib/chunk-35EO5Y7R.js.map +0 -1
  319. package/dist/lib/chunk-367E23MI.js +0 -48
  320. package/dist/lib/chunk-367E23MI.js.map +0 -1
  321. package/dist/lib/chunk-3GMJQ5G3.cjs +0 -4
  322. package/dist/lib/chunk-3GMJQ5G3.cjs.map +0 -1
  323. package/dist/lib/chunk-3I2YOM2E.js +0 -58
  324. package/dist/lib/chunk-3I2YOM2E.js.map +0 -1
  325. package/dist/lib/chunk-4BPHC6QQ.js +0 -3
  326. package/dist/lib/chunk-4BPHC6QQ.js.map +0 -1
  327. package/dist/lib/chunk-4XUVP2LL.cjs +0 -39
  328. package/dist/lib/chunk-4XUVP2LL.cjs.map +0 -1
  329. package/dist/lib/chunk-56LQSSQ3.js +0 -62
  330. package/dist/lib/chunk-56LQSSQ3.js.map +0 -1
  331. package/dist/lib/chunk-5PNLONNN.cjs +0 -30
  332. package/dist/lib/chunk-5PNLONNN.cjs.map +0 -1
  333. package/dist/lib/chunk-62ZJYXT3.cjs +0 -54
  334. package/dist/lib/chunk-62ZJYXT3.cjs.map +0 -1
  335. package/dist/lib/chunk-632PWWU7.cjs +0 -57
  336. package/dist/lib/chunk-632PWWU7.cjs.map +0 -1
  337. package/dist/lib/chunk-6BRTJXZ2.js +0 -3333
  338. package/dist/lib/chunk-6BRTJXZ2.js.map +0 -1
  339. package/dist/lib/chunk-6IJTWIVJ.cjs +0 -107
  340. package/dist/lib/chunk-6IJTWIVJ.cjs.map +0 -1
  341. package/dist/lib/chunk-7EAV6Q7B.cjs +0 -78
  342. package/dist/lib/chunk-7EAV6Q7B.cjs.map +0 -1
  343. package/dist/lib/chunk-7LLECRBP.cjs +0 -41
  344. package/dist/lib/chunk-7LLECRBP.cjs.map +0 -1
  345. package/dist/lib/chunk-7QVYU63E.js +0 -6
  346. package/dist/lib/chunk-7QVYU63E.js.map +0 -1
  347. package/dist/lib/chunk-7R23HVGQ.js +0 -27
  348. package/dist/lib/chunk-7R23HVGQ.js.map +0 -1
  349. package/dist/lib/chunk-BEKLDCTV.cjs +0 -95
  350. package/dist/lib/chunk-BEKLDCTV.cjs.map +0 -1
  351. package/dist/lib/chunk-BW3VFCTS.cjs +0 -110
  352. package/dist/lib/chunk-BW3VFCTS.cjs.map +0 -1
  353. package/dist/lib/chunk-CAPN4FSS.js +0 -152
  354. package/dist/lib/chunk-CAPN4FSS.js.map +0 -1
  355. package/dist/lib/chunk-ESYYL5UH.js +0 -105
  356. package/dist/lib/chunk-ESYYL5UH.js.map +0 -1
  357. package/dist/lib/chunk-GJNFAFKR.cjs +0 -66
  358. package/dist/lib/chunk-GJNFAFKR.cjs.map +0 -1
  359. package/dist/lib/chunk-GWYTWFZE.cjs +0 -72
  360. package/dist/lib/chunk-GWYTWFZE.cjs.map +0 -1
  361. package/dist/lib/chunk-HJWJNSSZ.js +0 -3
  362. package/dist/lib/chunk-HJWJNSSZ.js.map +0 -1
  363. package/dist/lib/chunk-HQ6TGY34.js +0 -27
  364. package/dist/lib/chunk-HQ6TGY34.js.map +0 -1
  365. package/dist/lib/chunk-IK3ABDPP.cjs +0 -64
  366. package/dist/lib/chunk-IK3ABDPP.cjs.map +0 -1
  367. package/dist/lib/chunk-JTUL3477.cjs +0 -137
  368. package/dist/lib/chunk-JTUL3477.cjs.map +0 -1
  369. package/dist/lib/chunk-KOCDKJDJ.js +0 -96
  370. package/dist/lib/chunk-KOCDKJDJ.js.map +0 -1
  371. package/dist/lib/chunk-KSBESEOF.js +0 -169
  372. package/dist/lib/chunk-KSBESEOF.js.map +0 -1
  373. package/dist/lib/chunk-LBMMBFQE.js +0 -65
  374. package/dist/lib/chunk-LBMMBFQE.js.map +0 -1
  375. package/dist/lib/chunk-LEIOWD2W.js +0 -28
  376. package/dist/lib/chunk-LEIOWD2W.js.map +0 -1
  377. package/dist/lib/chunk-LJZEN4HP.cjs +0 -110
  378. package/dist/lib/chunk-LJZEN4HP.cjs.map +0 -1
  379. package/dist/lib/chunk-LTVWU4J2.js +0 -47
  380. package/dist/lib/chunk-LTVWU4J2.js.map +0 -1
  381. package/dist/lib/chunk-LYD5OTBI.cjs +0 -3362
  382. package/dist/lib/chunk-LYD5OTBI.cjs.map +0 -1
  383. package/dist/lib/chunk-MAHHHINV.js +0 -67
  384. package/dist/lib/chunk-MAHHHINV.js.map +0 -1
  385. package/dist/lib/chunk-MFC7UJHT.cjs +0 -30
  386. package/dist/lib/chunk-MFC7UJHT.cjs.map +0 -1
  387. package/dist/lib/chunk-MGEZC2RV.cjs +0 -69
  388. package/dist/lib/chunk-MGEZC2RV.cjs.map +0 -1
  389. package/dist/lib/chunk-MVQSM5WM.cjs +0 -73
  390. package/dist/lib/chunk-MVQSM5WM.cjs.map +0 -1
  391. package/dist/lib/chunk-NANLYIUO.cjs +0 -70
  392. package/dist/lib/chunk-NANLYIUO.cjs.map +0 -1
  393. package/dist/lib/chunk-NE46WXNJ.js +0 -58
  394. package/dist/lib/chunk-NE46WXNJ.js.map +0 -1
  395. package/dist/lib/chunk-ODJBZ6PS.js +0 -39
  396. package/dist/lib/chunk-ODJBZ6PS.js.map +0 -1
  397. package/dist/lib/chunk-OF5IJ4WG.js +0 -65
  398. package/dist/lib/chunk-OF5IJ4WG.js.map +0 -1
  399. package/dist/lib/chunk-OO4BIM7N.js +0 -98
  400. package/dist/lib/chunk-OO4BIM7N.js.map +0 -1
  401. package/dist/lib/chunk-PEZXLKQD.cjs +0 -4
  402. package/dist/lib/chunk-PEZXLKQD.cjs.map +0 -1
  403. package/dist/lib/chunk-PK6SKIKE.cjs +0 -8
  404. package/dist/lib/chunk-PK6SKIKE.cjs.map +0 -1
  405. package/dist/lib/chunk-PXSRMP4E.js +0 -39
  406. package/dist/lib/chunk-PXSRMP4E.js.map +0 -1
  407. package/dist/lib/chunk-Q2L3FNJO.js +0 -120
  408. package/dist/lib/chunk-Q2L3FNJO.js.map +0 -1
  409. package/dist/lib/chunk-Q3KJZ3B5.js +0 -161
  410. package/dist/lib/chunk-Q3KJZ3B5.js.map +0 -1
  411. package/dist/lib/chunk-RK2VVGL6.cjs +0 -107
  412. package/dist/lib/chunk-RK2VVGL6.cjs.map +0 -1
  413. package/dist/lib/chunk-RLMEYZ5I.cjs +0 -167
  414. package/dist/lib/chunk-RLMEYZ5I.cjs.map +0 -1
  415. package/dist/lib/chunk-RQICHHZM.cjs +0 -29
  416. package/dist/lib/chunk-RQICHHZM.cjs.map +0 -1
  417. package/dist/lib/chunk-RXQWNSZX.js +0 -37
  418. package/dist/lib/chunk-RXQWNSZX.js.map +0 -1
  419. package/dist/lib/chunk-STAKGAWR.js +0 -86
  420. package/dist/lib/chunk-STAKGAWR.js.map +0 -1
  421. package/dist/lib/chunk-U36VZLW6.cjs +0 -172
  422. package/dist/lib/chunk-U36VZLW6.cjs.map +0 -1
  423. package/dist/lib/chunk-UGRFAVAJ.js +0 -93
  424. package/dist/lib/chunk-UGRFAVAJ.js.map +0 -1
  425. package/dist/lib/chunk-UQJWVRRE.cjs +0 -47
  426. package/dist/lib/chunk-UQJWVRRE.cjs.map +0 -1
  427. package/dist/lib/chunk-V2T4H24I.js +0 -156
  428. package/dist/lib/chunk-V2T4H24I.js.map +0 -1
  429. package/dist/lib/chunk-V5OY4ALI.cjs +0 -56
  430. package/dist/lib/chunk-V5OY4ALI.cjs.map +0 -1
  431. package/dist/lib/chunk-VJN72T2O.js +0 -50
  432. package/dist/lib/chunk-VJN72T2O.js.map +0 -1
  433. package/dist/lib/chunk-W4OMKQ7W.cjs +0 -128
  434. package/dist/lib/chunk-W4OMKQ7W.cjs.map +0 -1
  435. package/dist/lib/chunk-XGH6JWRO.js +0 -3
  436. package/dist/lib/chunk-XGH6JWRO.js.map +0 -1
  437. package/dist/lib/chunk-XQMVE2NH.cjs +0 -4
  438. package/dist/lib/chunk-XQMVE2NH.cjs.map +0 -1
  439. package/dist/lib/chunk-XZD7S5TU.cjs +0 -53
  440. package/dist/lib/chunk-XZD7S5TU.cjs.map +0 -1
  441. package/dist/lib/chunk-YBIWVB66.js +0 -76
  442. package/dist/lib/chunk-YBIWVB66.js.map +0 -1
  443. package/dist/lib/chunk-YF3YHK4X.js +0 -127
  444. package/dist/lib/chunk-YF3YHK4X.js.map +0 -1
  445. package/dist/lib/chunk-YVDJCVE5.cjs +0 -160
  446. package/dist/lib/chunk-YVDJCVE5.cjs.map +0 -1
  447. package/dist/lib/chunk-ZP7PDTVE.cjs +0 -167
  448. package/dist/lib/chunk-ZP7PDTVE.cjs.map +0 -1
  449. package/dist/lib/compiler-CuQLTmTB.d.cts +0 -32
  450. package/dist/lib/compiler-CuQLTmTB.d.ts +0 -32
  451. package/dist/lib/config-DnifzkPt.d.ts +0 -1474
  452. package/dist/lib/config-Ro14HmyO.d.cts +0 -1474
  453. package/dist/lib/config-file.cjs +0 -17
  454. package/dist/lib/config-file.cjs.map +0 -1
  455. package/dist/lib/config-file.d.cts +0 -57
  456. package/dist/lib/config-file.d.ts +0 -57
  457. package/dist/lib/config-file.js +0 -4
  458. package/dist/lib/config-file.js.map +0 -1
  459. package/dist/lib/create-program.cjs +0 -13
  460. package/dist/lib/create-program.cjs.map +0 -1
  461. package/dist/lib/create-program.d.cts +0 -42
  462. package/dist/lib/create-program.d.ts +0 -42
  463. package/dist/lib/create-program.js +0 -4
  464. package/dist/lib/create-program.js.map +0 -1
  465. package/dist/lib/entry.cjs +0 -41
  466. package/dist/lib/entry.cjs.map +0 -1
  467. package/dist/lib/entry.d.cts +0 -69
  468. package/dist/lib/entry.d.ts +0 -69
  469. package/dist/lib/entry.js +0 -4
  470. package/dist/lib/entry.js.map +0 -1
  471. package/dist/lib/hooks-B6Ow5MtE.d.ts +0 -28
  472. package/dist/lib/hooks-CM-BbMzz.d.cts +0 -28
  473. package/dist/lib/index.cjs +0 -281
  474. package/dist/lib/index.cjs.map +0 -1
  475. package/dist/lib/index.d.cts +0 -57
  476. package/dist/lib/index.d.ts +0 -57
  477. package/dist/lib/index.js +0 -28
  478. package/dist/lib/index.js.map +0 -1
  479. package/dist/lib/logger.cjs +0 -17
  480. package/dist/lib/logger.cjs.map +0 -1
  481. package/dist/lib/logger.d.cts +0 -51
  482. package/dist/lib/logger.d.ts +0 -51
  483. package/dist/lib/logger.js +0 -4
  484. package/dist/lib/logger.js.map +0 -1
  485. package/dist/lib/tsconfig-Bz-CiFqD.d.cts +0 -68
  486. package/dist/lib/tsconfig-Bz-CiFqD.d.ts +0 -68
  487. package/dist/lib/typescript/compiler-host.cjs +0 -166
  488. package/dist/lib/typescript/compiler-host.cjs.map +0 -1
  489. package/dist/lib/typescript/compiler-host.d.cts +0 -64
  490. package/dist/lib/typescript/compiler-host.d.ts +0 -64
  491. package/dist/lib/typescript/compiler-host.js +0 -158
  492. package/dist/lib/typescript/compiler-host.js.map +0 -1
  493. package/dist/lib/typescript/import-transformer.cjs +0 -51
  494. package/dist/lib/typescript/import-transformer.cjs.map +0 -1
  495. package/dist/lib/typescript/import-transformer.d.cts +0 -36
  496. package/dist/lib/typescript/import-transformer.d.ts +0 -36
  497. package/dist/lib/typescript/import-transformer.js +0 -49
  498. package/dist/lib/typescript/import-transformer.js.map +0 -1
  499. package/dist/lib/typescript/index.cjs +0 -60
  500. package/dist/lib/typescript/index.cjs.map +0 -1
  501. package/dist/lib/typescript/index.d.cts +0 -35
  502. package/dist/lib/typescript/index.d.ts +0 -35
  503. package/dist/lib/typescript/index.js +0 -7
  504. package/dist/lib/typescript/index.js.map +0 -1
  505. package/dist/lib/typescript/isolated-decl.cjs +0 -13
  506. package/dist/lib/typescript/isolated-decl.cjs.map +0 -1
  507. package/dist/lib/typescript/isolated-decl.d.cts +0 -11
  508. package/dist/lib/typescript/isolated-decl.d.ts +0 -11
  509. package/dist/lib/typescript/isolated-decl.js +0 -4
  510. package/dist/lib/typescript/isolated-decl.js.map +0 -1
  511. package/dist/lib/typescript/program.cjs +0 -29
  512. package/dist/lib/typescript/program.cjs.map +0 -1
  513. package/dist/lib/typescript/program.d.cts +0 -69
  514. package/dist/lib/typescript/program.d.ts +0 -69
  515. package/dist/lib/typescript/program.js +0 -4
  516. package/dist/lib/typescript/program.js.map +0 -1
  517. package/dist/lib/typescript/tsconfig.cjs +0 -33
  518. package/dist/lib/typescript/tsconfig.cjs.map +0 -1
  519. package/dist/lib/typescript/tsconfig.d.cts +0 -61
  520. package/dist/lib/typescript/tsconfig.d.ts +0 -61
  521. package/dist/lib/typescript/tsconfig.js +0 -4
  522. package/dist/lib/typescript/tsconfig.js.map +0 -1
  523. package/dist/lib/unplugin/factory.cjs +0 -23
  524. package/dist/lib/unplugin/factory.cjs.map +0 -1
  525. package/dist/lib/unplugin/factory.d.cts +0 -200
  526. package/dist/lib/unplugin/factory.d.ts +0 -200
  527. package/dist/lib/unplugin/factory.js +0 -14
  528. package/dist/lib/unplugin/factory.js.map +0 -1
  529. package/dist/lib/unplugin/index.cjs +0 -33
  530. package/dist/lib/unplugin/index.cjs.map +0 -1
  531. package/dist/lib/unplugin/index.d.cts +0 -36
  532. package/dist/lib/unplugin/index.d.ts +0 -36
  533. package/dist/lib/unplugin/index.js +0 -16
  534. package/dist/lib/unplugin/index.js.map +0 -1
  535. package/dist/lib/unplugin/plugin.cjs +0 -16
  536. package/dist/lib/unplugin/plugin.cjs.map +0 -1
  537. package/dist/lib/unplugin/plugin.d.cts +0 -55
  538. package/dist/lib/unplugin/plugin.d.ts +0 -55
  539. package/dist/lib/unplugin/plugin.js +0 -7
  540. package/dist/lib/unplugin/plugin.js.map +0 -1
  541. package/dist/lib/unplugin/resolve-id.cjs +0 -13
  542. package/dist/lib/unplugin/resolve-id.cjs.map +0 -1
  543. package/dist/lib/unplugin/resolve-id.d.cts +0 -60
  544. package/dist/lib/unplugin/resolve-id.d.ts +0 -60
  545. package/dist/lib/unplugin/resolve-id.js +0 -4
  546. package/dist/lib/unplugin/resolve-id.js.map +0 -1
  547. package/dist/lib/utilities/bundle.cjs +0 -16
  548. package/dist/lib/utilities/bundle.cjs.map +0 -1
  549. package/dist/lib/utilities/bundle.d.cts +0 -44
  550. package/dist/lib/utilities/bundle.d.ts +0 -44
  551. package/dist/lib/utilities/bundle.js +0 -7
  552. package/dist/lib/utilities/bundle.js.map +0 -1
  553. package/dist/lib/utilities/cache.cjs +0 -18
  554. package/dist/lib/utilities/cache.cjs.map +0 -1
  555. package/dist/lib/utilities/cache.d.cts +0 -7
  556. package/dist/lib/utilities/cache.d.ts +0 -7
  557. package/dist/lib/utilities/cache.js +0 -5
  558. package/dist/lib/utilities/cache.js.map +0 -1
  559. package/dist/lib/utilities/file-header.cjs +0 -17
  560. package/dist/lib/utilities/file-header.cjs.map +0 -1
  561. package/dist/lib/utilities/file-header.d.cts +0 -42
  562. package/dist/lib/utilities/file-header.d.ts +0 -42
  563. package/dist/lib/utilities/file-header.js +0 -4
  564. package/dist/lib/utilities/file-header.js.map +0 -1
  565. package/dist/lib/utilities/index.cjs +0 -159
  566. package/dist/lib/utilities/index.cjs.map +0 -1
  567. package/dist/lib/utilities/index.d.cts +0 -45
  568. package/dist/lib/utilities/index.d.ts +0 -45
  569. package/dist/lib/utilities/index.js +0 -18
  570. package/dist/lib/utilities/index.js.map +0 -1
  571. package/dist/lib/utilities/meta.cjs +0 -37
  572. package/dist/lib/utilities/meta.cjs.map +0 -1
  573. package/dist/lib/utilities/meta.d.cts +0 -68
  574. package/dist/lib/utilities/meta.d.ts +0 -68
  575. package/dist/lib/utilities/meta.js +0 -4
  576. package/dist/lib/utilities/meta.js.map +0 -1
  577. package/dist/lib/utilities/plugin-helpers.cjs +0 -61
  578. package/dist/lib/utilities/plugin-helpers.cjs.map +0 -1
  579. package/dist/lib/utilities/plugin-helpers.d.cts +0 -153
  580. package/dist/lib/utilities/plugin-helpers.d.ts +0 -153
  581. package/dist/lib/utilities/plugin-helpers.js +0 -4
  582. package/dist/lib/utilities/plugin-helpers.js.map +0 -1
  583. package/dist/lib/utilities/resolve-path.cjs +0 -13
  584. package/dist/lib/utilities/resolve-path.cjs.map +0 -1
  585. package/dist/lib/utilities/resolve-path.d.cts +0 -43
  586. package/dist/lib/utilities/resolve-path.d.ts +0 -43
  587. package/dist/lib/utilities/resolve-path.js +0 -4
  588. package/dist/lib/utilities/resolve-path.js.map +0 -1
  589. package/dist/lib/utilities/resolve.cjs +0 -17
  590. package/dist/lib/utilities/resolve.cjs.map +0 -1
  591. package/dist/lib/utilities/resolve.d.cts +0 -44
  592. package/dist/lib/utilities/resolve.d.ts +0 -44
  593. package/dist/lib/utilities/resolve.js +0 -8
  594. package/dist/lib/utilities/resolve.js.map +0 -1
  595. package/dist/lib/utilities/source-file.cjs +0 -21
  596. package/dist/lib/utilities/source-file.cjs.map +0 -1
  597. package/dist/lib/utilities/source-file.d.cts +0 -28
  598. package/dist/lib/utilities/source-file.d.ts +0 -28
  599. package/dist/lib/utilities/source-file.js +0 -4
  600. package/dist/lib/utilities/source-file.js.map +0 -1
  601. package/dist/lib/utilities/source-map.cjs +0 -13
  602. package/dist/lib/utilities/source-map.cjs.map +0 -1
  603. package/dist/lib/utilities/source-map.d.cts +0 -14
  604. package/dist/lib/utilities/source-map.d.ts +0 -14
  605. package/dist/lib/utilities/source-map.js +0 -4
  606. package/dist/lib/utilities/source-map.js.map +0 -1
  607. package/dist/lib/utilities/worker.cjs +0 -18
  608. package/dist/lib/utilities/worker.cjs.map +0 -1
  609. package/dist/lib/utilities/worker.d.cts +0 -58
  610. package/dist/lib/utilities/worker.d.ts +0 -58
  611. package/dist/lib/utilities/worker.js +0 -5
  612. package/dist/lib/utilities/worker.js.map +0 -1
  613. package/dist/lib/utilities/write-file.cjs +0 -13
  614. package/dist/lib/utilities/write-file.cjs.map +0 -1
  615. package/dist/lib/utilities/write-file.d.cts +0 -44
  616. package/dist/lib/utilities/write-file.d.ts +0 -44
  617. package/dist/lib/utilities/write-file.js +0 -4
  618. package/dist/lib/utilities/write-file.js.map +0 -1
  619. package/dist/next.js +0 -10
  620. package/dist/nuxt.d.ts +0 -20
  621. package/dist/nuxt.js +0 -12
  622. package/dist/resolved-DtY60yLh.d.cts +0 -1351
  623. package/dist/resolved-wPXZS7aW.d.ts +0 -1351
  624. package/dist/rolldown.d.ts +0 -57
  625. package/dist/rolldown.js +0 -9
  626. package/dist/rollup.d.ts +0 -57
  627. package/dist/rollup.js +0 -9
  628. package/dist/rspack.d.ts +0 -57
  629. package/dist/rspack.js +0 -9
  630. package/dist/tsup.js +0 -11
  631. package/dist/types/babel.cjs +0 -6
  632. package/dist/types/babel.cjs.map +0 -1
  633. package/dist/types/babel.d.cts +0 -38
  634. package/dist/types/babel.d.ts +0 -38
  635. package/dist/types/babel.js +0 -3
  636. package/dist/types/babel.js.map +0 -1
  637. package/dist/types/build.cjs +0 -6
  638. package/dist/types/build.cjs.map +0 -1
  639. package/dist/types/build.d.cts +0 -111
  640. package/dist/types/build.d.ts +0 -111
  641. package/dist/types/build.js +0 -3
  642. package/dist/types/build.js.map +0 -1
  643. package/dist/types/commands.cjs +0 -13
  644. package/dist/types/commands.cjs.map +0 -1
  645. package/dist/types/commands.d.cts +0 -38
  646. package/dist/types/commands.d.ts +0 -38
  647. package/dist/types/commands.js +0 -4
  648. package/dist/types/commands.js.map +0 -1
  649. package/dist/types/compiler.cjs +0 -6
  650. package/dist/types/compiler.cjs.map +0 -1
  651. package/dist/types/compiler.d.cts +0 -38
  652. package/dist/types/compiler.d.ts +0 -38
  653. package/dist/types/compiler.js +0 -3
  654. package/dist/types/compiler.js.map +0 -1
  655. package/dist/types/config.cjs +0 -6
  656. package/dist/types/config.cjs.map +0 -1
  657. package/dist/types/config.d.cts +0 -38
  658. package/dist/types/config.d.ts +0 -38
  659. package/dist/types/config.js +0 -3
  660. package/dist/types/config.js.map +0 -1
  661. package/dist/types/context.cjs +0 -13
  662. package/dist/types/context.cjs.map +0 -1
  663. package/dist/types/context.d.cts +0 -38
  664. package/dist/types/context.d.ts +0 -38
  665. package/dist/types/context.js +0 -4
  666. package/dist/types/context.js.map +0 -1
  667. package/dist/types/hooks.cjs +0 -6
  668. package/dist/types/hooks.cjs.map +0 -1
  669. package/dist/types/hooks.d.cts +0 -38
  670. package/dist/types/hooks.d.ts +0 -38
  671. package/dist/types/hooks.js +0 -3
  672. package/dist/types/hooks.js.map +0 -1
  673. package/dist/types/index.cjs +0 -58
  674. package/dist/types/index.cjs.map +0 -1
  675. package/dist/types/index.d.cts +0 -42
  676. package/dist/types/index.d.ts +0 -42
  677. package/dist/types/index.js +0 -17
  678. package/dist/types/index.js.map +0 -1
  679. package/dist/types/internal.cjs +0 -4
  680. package/dist/types/internal.cjs.map +0 -1
  681. package/dist/types/internal.d.cts +0 -61
  682. package/dist/types/internal.d.ts +0 -61
  683. package/dist/types/internal.js +0 -3
  684. package/dist/types/internal.js.map +0 -1
  685. package/dist/types/plugin.cjs +0 -13
  686. package/dist/types/plugin.cjs.map +0 -1
  687. package/dist/types/plugin.d.cts +0 -38
  688. package/dist/types/plugin.d.ts +0 -38
  689. package/dist/types/plugin.js +0 -4
  690. package/dist/types/plugin.js.map +0 -1
  691. package/dist/types/resolved.cjs +0 -6
  692. package/dist/types/resolved.cjs.map +0 -1
  693. package/dist/types/resolved.d.cts +0 -38
  694. package/dist/types/resolved.d.ts +0 -38
  695. package/dist/types/resolved.js +0 -3
  696. package/dist/types/resolved.js.map +0 -1
  697. package/dist/types/tsconfig.cjs +0 -6
  698. package/dist/types/tsconfig.cjs.map +0 -1
  699. package/dist/types/tsconfig.d.cts +0 -75
  700. package/dist/types/tsconfig.d.ts +0 -75
  701. package/dist/types/tsconfig.js +0 -3
  702. package/dist/types/tsconfig.js.map +0 -1
  703. package/dist/types/typedoc.cjs +0 -6
  704. package/dist/types/typedoc.cjs.map +0 -1
  705. package/dist/types/typedoc.d.cts +0 -25
  706. package/dist/types/typedoc.d.ts +0 -25
  707. package/dist/types/typedoc.js +0 -3
  708. package/dist/types/typedoc.js.map +0 -1
  709. package/dist/types/unplugin.cjs +0 -6
  710. package/dist/types/unplugin.cjs.map +0 -1
  711. package/dist/types/unplugin.d.cts +0 -54
  712. package/dist/types/unplugin.d.ts +0 -54
  713. package/dist/types/unplugin.js +0 -3
  714. package/dist/types/unplugin.js.map +0 -1
  715. package/dist/types/vfs.cjs +0 -33
  716. package/dist/types/vfs.cjs.map +0 -1
  717. package/dist/types/vfs.d.cts +0 -408
  718. package/dist/types/vfs.d.ts +0 -408
  719. package/dist/types/vfs.js +0 -4
  720. package/dist/types/vfs.js.map +0 -1
  721. package/dist/unloader.d.ts +0 -56
  722. package/dist/unloader.js +0 -9
  723. package/dist/unplugin.d.ts +0 -77
  724. package/dist/unplugin.js +0 -21
  725. package/dist/vite.d.ts +0 -57
  726. package/dist/vite.js +0 -10
  727. package/dist/webpack.d.ts +0 -57
  728. package/dist/webpack.js +0 -9
@@ -1,107 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
4
- var join = require('@stryke/path/join');
5
- var tsMorph = require('ts-morph');
6
-
7
- var VirtualFileSystemHost = class VirtualFileSystemHost2 extends tsMorph.InMemoryFileSystemHost {
8
- static {
9
- chunkPK6SKIKE_cjs.__name(this, "VirtualFileSystemHost");
10
- }
11
- #fs;
12
- constructor(fs) {
13
- super();
14
- this.#fs = fs;
15
- }
16
- deleteSync(path) {
17
- this.#fs.rmSync(path);
18
- }
19
- readDirSync(dirPath) {
20
- return this.#fs.readdirSync(dirPath).reduce((ret, entry) => {
21
- const fullPath = this.#fs.resolve(join.joinPaths(dirPath, entry));
22
- if (fullPath) {
23
- ret.push({
24
- name: entry,
25
- isDirectory: this.#fs.isDirectory(fullPath),
26
- isFile: this.#fs.isFile(fullPath),
27
- isSymlink: false
28
- });
29
- }
30
- return ret;
31
- }, []);
32
- }
33
- async readFile(filePath) {
34
- if (!this.#fs.existsSync(filePath)) {
35
- throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
36
- }
37
- return await this.#fs.readFile(filePath);
38
- }
39
- readFileSync(filePath) {
40
- if (!this.#fs.existsSync(filePath)) {
41
- throw new Error(`File not found: '${filePath}'. Please check the path and try again.`);
42
- }
43
- return this.#fs.readFileSync(filePath);
44
- }
45
- async writeFile(filePath, fileText) {
46
- return this.#fs.writeFile(filePath, fileText);
47
- }
48
- writeFileSync(filePath, fileText) {
49
- this.#fs.writeFileSync(filePath, fileText);
50
- }
51
- async mkdir(dirPath) {
52
- await this.#fs.mkdir(dirPath);
53
- }
54
- mkdirSync(dirPath) {
55
- this.#fs.mkdirSync(dirPath);
56
- }
57
- async move(srcPath, destPath) {
58
- await this.#fs.move(srcPath, destPath);
59
- }
60
- moveSync(srcPath, destPath) {
61
- this.#fs.moveSync(srcPath, destPath);
62
- }
63
- async copy(srcPath, destPath) {
64
- await this.#fs.copy(srcPath, destPath);
65
- }
66
- copySync(srcPath, destPath) {
67
- this.#fs.copySync(srcPath, destPath);
68
- }
69
- async fileExists(filePath) {
70
- return this.#fs.isFile(filePath);
71
- }
72
- fileExistsSync(filePath) {
73
- return this.#fs.isFile(filePath);
74
- }
75
- async directoryExists(dirPath) {
76
- return this.#fs.isDirectory(dirPath);
77
- }
78
- directoryExistsSync(dirPath) {
79
- return this.#fs.isDirectory(dirPath);
80
- }
81
- realpathSync(path) {
82
- return this.#fs.resolve(path) || path;
83
- }
84
- getCurrentDirectory() {
85
- return "/";
86
- }
87
- async glob(patterns) {
88
- return this.#fs.glob(patterns);
89
- }
90
- globSync(patterns) {
91
- return this.#fs.globSync(patterns);
92
- }
93
- };
94
- function createProgram(context) {
95
- return new tsMorph.Project({
96
- compilerOptions: {
97
- ...context.tsconfig.options
98
- },
99
- tsConfigFilePath: context.tsconfig.tsconfigFilePath,
100
- fileSystem: new VirtualFileSystemHost(context.fs)
101
- });
102
- }
103
- chunkPK6SKIKE_cjs.__name(createProgram, "createProgram");
104
-
105
- exports.createProgram = createProgram;
106
- //# sourceMappingURL=chunk-6IJTWIVJ.cjs.map
107
- //# sourceMappingURL=chunk-6IJTWIVJ.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/create-program.ts"],"names":["VirtualFileSystemHost","InMemoryFileSystemHost","fs","deleteSync","path","rmSync","readDirSync","dirPath","readdirSync","reduce","ret","entry","fullPath","resolve","joinPaths","push","name","isDirectory","isFile","isSymlink","readFile","filePath","existsSync","Error","readFileSync","writeFile","fileText","writeFileSync","mkdir","mkdirSync","move","srcPath","destPath","moveSync","copy","copySync","fileExists","fileExistsSync","directoryExists","directoryExistsSync","realpathSync","getCurrentDirectory","glob","patterns","globSync","createProgram","context","Project","compilerOptions","tsconfig","options","tsConfigFilePath","tsconfigFilePath","fileSystem"],"mappings":";;;;;;AA4BA,IAAMA,qBAAAA,GAAN,MAAMA,sBAAAA,SACIC,8BAAAA,CAAAA;EA7BV;;;AAgCE,EAAA,GAAA;AAEA,EAAA,WAAA,CAAmBC,EAAAA,EAAgC;AACjD,IAAA,KAAA,EAAK;AACL,IAAA,IAAA,CAAK,GAAA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IAAAA,gBAAAA,EAAkBL,QAAQG,QAAAA,CAASG,gBAAAA;IACnCC,UAAAA,EAAY,IAAIrD,qBAAAA,CAAsB8C,OAAAA,CAAQ5C,EAAE;GAClD,CAAA;AACF;AARgB2C,wBAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"chunk-6IJTWIVJ.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join\";\nimport {\n FileSystemHost,\n InMemoryFileSystemHost,\n Project,\n RuntimeDirEntry\n} from \"ts-morph\";\nimport { Context } from \"../types/context\";\nimport { VirtualFileSystemInterface } from \"../types/vfs\";\n\nclass VirtualFileSystemHost\n extends InMemoryFileSystemHost\n implements FileSystemHost\n{\n #fs: VirtualFileSystemInterface;\n\n public constructor(fs: VirtualFileSystemInterface) {\n super();\n this.#fs = fs;\n }\n\n public override deleteSync(path: string) {\n this.#fs.rmSync(path);\n }\n\n public override readDirSync(dirPath: string): RuntimeDirEntry[] {\n return this.#fs.readdirSync(dirPath).reduce((ret, entry) => {\n const fullPath = this.#fs.resolve(joinPaths(dirPath, entry));\n if (fullPath) {\n ret.push({\n name: entry,\n isDirectory: this.#fs.isDirectory(fullPath),\n isFile: this.#fs.isFile(fullPath),\n isSymlink: false\n });\n }\n\n return ret;\n }, [] as RuntimeDirEntry[]);\n }\n\n public override async readFile(filePath: string) {\n if (!this.#fs.existsSync(filePath)) {\n throw new Error(\n `File not found: '${filePath}'. Please check the path and try again.`\n );\n }\n\n return (await this.#fs.readFile(filePath))!;\n }\n\n public override readFileSync(filePath: string) {\n if (!this.#fs.existsSync(filePath)) {\n throw new Error(\n `File not found: '${filePath}'. Please check the path and try again.`\n );\n }\n\n return this.#fs.readFileSync(filePath)!;\n }\n\n public override async writeFile(filePath: string, fileText: string) {\n return this.#fs.writeFile(filePath, fileText);\n }\n\n public override writeFileSync(filePath: string, fileText: string) {\n this.#fs.writeFileSync(filePath, fileText);\n }\n\n public override async mkdir(dirPath: string) {\n await this.#fs.mkdir(dirPath);\n }\n\n public override mkdirSync(dirPath: string) {\n this.#fs.mkdirSync(dirPath);\n }\n\n public override async move(srcPath: string, destPath: string) {\n await this.#fs.move(srcPath, destPath);\n }\n\n public override moveSync(srcPath: string, destPath: string) {\n this.#fs.moveSync(srcPath, destPath);\n }\n\n public override async copy(srcPath: string, destPath: string) {\n await this.#fs.copy(srcPath, destPath);\n }\n\n public override copySync(srcPath: string, destPath: string) {\n this.#fs.copySync(srcPath, destPath);\n }\n\n public override async fileExists(filePath: string) {\n return this.#fs.isFile(filePath);\n }\n\n public override fileExistsSync(filePath: string) {\n return this.#fs.isFile(filePath);\n }\n\n public override async directoryExists(dirPath: string) {\n return this.#fs.isDirectory(dirPath);\n }\n\n public override directoryExistsSync(dirPath: string): boolean {\n return this.#fs.isDirectory(dirPath);\n }\n\n public override realpathSync(path: string) {\n return this.#fs.resolve(path) || path;\n }\n\n public override getCurrentDirectory() {\n return \"/\";\n }\n\n public override async glob(\n patterns: ReadonlyArray<string>\n ): Promise<string[]> {\n return this.#fs.glob(patterns as string[]);\n }\n\n public override globSync(patterns: ReadonlyArray<string>): string[] {\n return this.#fs.globSync(patterns as string[]);\n }\n}\n\n/**\n * Create a ts-morph {@link Project} instance used for type reflection and module manipulation during processing\n *\n * @returns A ts-morph {@link Project} instance\n */\nexport function createProgram(context: Context): Project {\n return new Project({\n compilerOptions: {\n ...context.tsconfig.options\n },\n tsConfigFilePath: context.tsconfig.tsconfigFilePath,\n fileSystem: new VirtualFileSystemHost(context.fs)\n });\n}\n"]}
@@ -1,78 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
4
- var bundleRequire = require('bundle-require');
5
-
6
- var NON_NODE_MODULE_REGEX = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
7
- async function handleResolveId(context, args, options = {}) {
8
- if (args.id) {
9
- if (context.fs.isVirtual(args.id) || args.importer && context.fs.isVirtual(args.id, {
10
- paths: [
11
- args.importer
12
- ]
13
- })) {
14
- const resolvedPath = args.importer ? context.fs.resolve(args.id, {
15
- paths: [
16
- args.importer
17
- ]
18
- }) : context.fs.resolve(args.id);
19
- if (resolvedPath) {
20
- return {
21
- id: resolvedPath,
22
- external: context.config.projectType !== "application"
23
- };
24
- }
25
- }
26
- if (context.fs.isTsconfigPath(args.id)) {
27
- const tsconfigPath = context.fs.resolveTsconfigPath(args.id);
28
- const tsconfigPathPackage = context.fs.resolveTsconfigPathPackage(args.id);
29
- if (tsconfigPath && tsconfigPathPackage) {
30
- return {
31
- id: tsconfigPath,
32
- external: Boolean(!options.noExternal?.includes(tsconfigPathPackage) && (options.external?.includes(tsconfigPathPackage) ?? context.config.projectType !== "application"))
33
- };
34
- }
35
- }
36
- if (options.skipResolve) {
37
- return void 0;
38
- }
39
- if (options.skipNodeModulesBundle) {
40
- if (bundleRequire.match(args.id, options.resolvePatterns) || bundleRequire.match(args.id, options.noExternal) || args.id.startsWith("internal:") || args.id.startsWith("virtual:")) {
41
- return void 0;
42
- }
43
- if (bundleRequire.match(args.id, options.external) || args.id.startsWith("node:")) {
44
- return {
45
- id: args.id,
46
- external: true
47
- };
48
- }
49
- if (!NON_NODE_MODULE_REGEX.test(args.id)) {
50
- return {
51
- id: args.id,
52
- external: true
53
- };
54
- }
55
- } else {
56
- const resolvedPath = context.fs.resolve(args.id, {
57
- paths: args.importer ? [
58
- args.importer
59
- ] : []
60
- });
61
- if (bundleRequire.match(args.id, options.noExternal) || resolvedPath && context.fs.meta[resolvedPath]?.variant === "builtin") {
62
- return void 0;
63
- }
64
- if (bundleRequire.match(args.id, options.external) || args.id.startsWith("node:")) {
65
- return {
66
- id: args.id,
67
- external: true
68
- };
69
- }
70
- }
71
- }
72
- return void 0;
73
- }
74
- chunkPK6SKIKE_cjs.__name(handleResolveId, "handleResolveId");
75
-
76
- exports.handleResolveId = handleResolveId;
77
- //# sourceMappingURL=chunk-7EAV6Q7B.cjs.map
78
- //# sourceMappingURL=chunk-7EAV6Q7B.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/unplugin/resolve-id.ts"],"names":["NON_NODE_MODULE_REGEX","handleResolveId","context","args","options","id","fs","isVirtual","importer","paths","resolvedPath","resolve","external","config","projectType","isTsconfigPath","tsconfigPath","resolveTsconfigPath","tsconfigPathPackage","resolveTsconfigPathPackage","Boolean","noExternal","includes","skipResolve","undefined","skipNodeModulesBundle","match","resolvePatterns","startsWith","test","meta","variant"],"mappings":";;;;;AAuBA,IAAMA,qBAAAA,GAAwB,mCAAA;AA0B9B,eAAsBC,eAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,OAAAA,GAAqC,EAAC,EAAC;AAEvC,EAAA,IAAID,KAAKE,EAAAA,EAAI;AACX,IAAA,IACEH,OAAAA,CAAQI,EAAAA,CAAGC,SAAAA,CAAUJ,IAAAA,CAAKE,EAAE,CAAA,IAC3BF,IAAAA,CAAKK,QAAAA,IACJN,OAAAA,CAAQI,EAAAA,CAAGC,SAAAA,CAAUJ,IAAAA,CAAKE,EAAAA,EAAI;MAC5BI,KAAAA,EAAO;QAACN,IAAAA,CAAKK;;AACf,KAAA,CAAA,EACF;AACA,MAAA,MAAME,eAAeP,IAAAA,CAAKK,QAAAA,GACtBN,QAAQI,EAAAA,CAAGK,OAAAA,CAAQR,KAAKE,EAAAA,EAAI;QAC1BI,KAAAA,EAAO;UAACN,IAAAA,CAAKK;;AACf,OAAA,CAAA,GACAN,OAAAA,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K,SAAA;AACvC,MAAA;AACF,IAAA;AACF,EAAA;AAEA,EAAA,OAAOY,MAAAA;AACT;AAtFsBvB,wBAAAA,CAAAA,eAAAA,EAAAA,iBAAAA,CAAAA","file":"chunk-7EAV6Q7B.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { match } from \"bundle-require\";\nimport type { ExternalIdResult } from \"unplugin\";\nimport type { Context } from \"../../types/context\";\n\n// Must not start with \"/\" or \"./\" or \"../\" or \"C:\\\" or be the exact strings \"..\" or \".\"\nconst NON_NODE_MODULE_REGEX = /^[A-Z]:[/\\\\]|^\\.{0,2}\\/|^\\.{1,2}$/;\n\nexport interface ResolveIdArgs {\n id: string;\n importer: string | undefined;\n options: {\n isEntry: boolean;\n };\n}\n\nexport interface ResolveIdOptions {\n skipResolve?: boolean;\n skipNodeModulesBundle?: boolean;\n external: (string | RegExp)[];\n noExternal: (string | RegExp)[];\n resolvePatterns: (string | RegExp)[];\n}\n\n/**\n * Handle the resolveId hook for the unplugin.\n *\n * @param context - The plugin context.\n * @param args - The arguments for the hook.\n * @param options - The options for the hook.\n * @returns The resolved id or null if not found.\n */\nexport async function handleResolveId(\n context: Context,\n args: ResolveIdArgs,\n options: Partial<ResolveIdOptions> = {}\n): Promise<ExternalIdResult | null | undefined> {\n if (args.id) {\n if (\n context.fs.isVirtual(args.id) ||\n (args.importer &&\n context.fs.isVirtual(args.id, {\n paths: [args.importer]\n }))\n ) {\n const resolvedPath = args.importer\n ? context.fs.resolve(args.id, {\n paths: [args.importer]\n })\n : context.fs.resolve(args.id);\n if (resolvedPath) {\n return {\n id: resolvedPath,\n external: context.config.projectType !== \"application\"\n };\n }\n }\n\n if (context.fs.isTsconfigPath(args.id)) {\n const tsconfigPath = context.fs.resolveTsconfigPath(args.id);\n const tsconfigPathPackage = context.fs.resolveTsconfigPathPackage(\n args.id\n );\n if (tsconfigPath && tsconfigPathPackage) {\n return {\n id: tsconfigPath,\n external: Boolean(\n !options.noExternal?.includes(tsconfigPathPackage) &&\n (options.external?.includes(tsconfigPathPackage) ??\n context.config.projectType !== \"application\")\n )\n };\n }\n }\n\n if (options.skipResolve) {\n return undefined;\n }\n\n if (options.skipNodeModulesBundle) {\n if (\n match(args.id, options.resolvePatterns) ||\n match(args.id, options.noExternal) ||\n args.id.startsWith(\"internal:\") ||\n args.id.startsWith(\"virtual:\")\n ) {\n return undefined;\n }\n\n if (match(args.id, options.external) || args.id.startsWith(\"node:\")) {\n return { id: args.id, external: true };\n }\n\n // Exclude any other import that looks like a Node module\n if (!NON_NODE_MODULE_REGEX.test(args.id)) {\n return {\n id: args.id,\n external: true\n };\n }\n } else {\n const resolvedPath = context.fs.resolve(args.id, {\n paths: args.importer ? [args.importer] : []\n });\n if (\n match(args.id, options.noExternal) ||\n (resolvedPath && context.fs.meta[resolvedPath]?.variant === \"builtin\")\n ) {\n return undefined;\n }\n\n if (match(args.id, options.external) || args.id.startsWith(\"node:\")) {\n return { id: args.id, external: true };\n }\n }\n }\n\n return undefined;\n}\n"]}
@@ -1,41 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk4XUVP2LL_cjs = require('./chunk-4XUVP2LL.cjs');
4
- var chunkGJNFAFKR_cjs = require('./chunk-GJNFAFKR.cjs');
5
- var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
- var types = require('@storm-software/config-tools/types');
7
- var esbuild = require('esbuild');
8
-
9
- async function bundle(context, file, overrides = {}) {
10
- const path = await chunk4XUVP2LL_cjs.resolvePath(context, file);
11
- if (!path || !context.fs.existsSync(path)) {
12
- throw new Error(`Module not found: "${file}". Please check the path and try again.`);
13
- }
14
- const result = await esbuild.build({
15
- ...chunkGJNFAFKR_cjs.extractESBuildConfig(context),
16
- entry: [
17
- path
18
- ],
19
- write: false,
20
- sourcemap: false,
21
- splitting: false,
22
- treeShaking: false,
23
- bundle: true,
24
- ...overrides
25
- });
26
- if (result.errors.length > 0) {
27
- throw new Error(`Failed to transpile ${file}: ${result.errors.map((error) => error.text).join(", ")}`);
28
- }
29
- if (result.warnings.length > 0) {
30
- context.log(types.LogLevelLabel.WARN, `Warnings while transpiling ${file}: ${result.warnings.map((warning) => warning.text).join(", ")}`);
31
- }
32
- if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {
33
- throw new Error(`No output files generated for ${file}. Please check the configuration and try again.`);
34
- }
35
- return result.outputFiles.filter(Boolean)[0];
36
- }
37
- chunkPK6SKIKE_cjs.__name(bundle, "bundle");
38
-
39
- exports.bundle = bundle;
40
- //# sourceMappingURL=chunk-7LLECRBP.cjs.map
41
- //# sourceMappingURL=chunk-7LLECRBP.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utilities/bundle.ts"],"names":["bundle","context","file","overrides","path","resolvePath","fs","existsSync","Error","result","build","extractESBuildConfig","entry","write","sourcemap","splitting","treeShaking","errors","length","map","error","text","join","warnings","log","LogLevelLabel","WARN","warning","outputFiles","filter","Boolean"],"mappings":";;;;;;;;AAiCA,eAAsBA,MAAAA,CACpBC,OAAAA,EACAC,IAAAA,EACAC,SAAAA,GAAiD,EAAC,EAAC;AAEnD,EAAA,MAAMC,IAAAA,GAAO,MAAMC,6BAAAA,CAAYJ,OAAAA,EAASC,IAAAA,CAAAA;AACxC,EAAA,IAAI,CAACE,IAAAA,IAAQ,CAACH,QAAQK,EAAAA,CAAGC,UAAAA,CAAWH,IAAAA,CAAAA,EAAO;AACzC,IAAA,MAAM,IAAII,KAAAA,CACR,CAAA,mBAAA,EAAsBN,IAAAA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,MAAAA,CAAOC,OAAAA,EAAS,CAAA,CAAA;AAC5C;AA9CsB9B,wBAAAA,CAAAA,MAAAA,EAAAA,QAAAA,CAAAA","file":"chunk-7LLECRBP.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { build, BuildOptions, OutputFile } from \"esbuild\";\nimport { ESBuildResolvedBuildConfig } from \"../../types/build\";\nimport { Context } from \"../../types/context\";\nimport { extractESBuildConfig } from \"../build/esbuild\";\nimport { resolvePath } from \"./resolve-path\";\n\n/**\n * Bundle a type definition to a module.\n *\n * @param context - The context object containing the environment paths.\n * @param file - The file path to bundle.\n * @param overrides - Optional overrides for the ESBuild configuration.\n * @returns A promise that resolves to the bundled module.\n */\nexport async function bundle(\n context: Context,\n file: string,\n overrides: Partial<ESBuildResolvedBuildConfig> = {}\n): Promise<OutputFile> {\n const path = await resolvePath(context, file);\n if (!path || !context.fs.existsSync(path)) {\n throw new Error(\n `Module not found: \"${file}\". Please check the path and try again.`\n );\n }\n\n const result = await build({\n ...extractESBuildConfig(context),\n entry: [path],\n write: false,\n sourcemap: false,\n splitting: false,\n treeShaking: false,\n bundle: true,\n ...overrides\n } as BuildOptions);\n if (result.errors.length > 0) {\n throw new Error(\n `Failed to transpile ${file}: ${result.errors\n .map(error => error.text)\n .join(\", \")}`\n );\n }\n if (result.warnings.length > 0) {\n context.log(\n LogLevelLabel.WARN,\n `Warnings while transpiling ${file}: ${result.warnings\n .map(warning => warning.text)\n .join(\", \")}`\n );\n }\n if (!result.outputFiles || result.outputFiles.filter(Boolean).length === 0) {\n throw new Error(\n `No output files generated for ${\n file\n }. Please check the configuration and try again.`\n );\n }\n\n return result.outputFiles.filter(Boolean)[0]!;\n}\n"]}
@@ -1,6 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- export { __name };
5
- //# sourceMappingURL=chunk-7QVYU63E.js.map
6
- //# sourceMappingURL=chunk-7QVYU63E.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-7QVYU63E.js"}
@@ -1,27 +0,0 @@
1
- import { __name } from './chunk-7QVYU63E.js';
2
- import { titleCase } from '@stryke/string-format/title-case';
3
-
4
- function getBaseFileHeader(context) {
5
- return `
6
- // Generated with ${titleCase(context.config.framework)}
7
- // Note: Do not edit this file manually - it will be overwritten automatically
8
- `;
9
- }
10
- __name(getBaseFileHeader, "getBaseFileHeader");
11
- function getFileHeader(context, options = {}) {
12
- const { directive = null, prettierIgnore = false } = options;
13
- return `/* eslint-disable */
14
- // biome-ignore lint: disable
15
- ${prettierIgnore ? `// prettier-ignore` : ""}${directive ? `
16
-
17
- ${directive}
18
- ` : "\n"}
19
- ${getBaseFileHeader(context)}
20
-
21
- `;
22
- }
23
- __name(getFileHeader, "getFileHeader");
24
-
25
- export { getBaseFileHeader, getFileHeader };
26
- //# sourceMappingURL=chunk-7R23HVGQ.js.map
27
- //# sourceMappingURL=chunk-7R23HVGQ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/utilities/file-header.ts"],"names":["getBaseFileHeader","context","titleCase","config","framework","getFileHeader","options","directive","prettierIgnore"],"mappings":";;;AA0BO,SAASA,kBAAkBC,OAAAA,EAAgB;AAChD,EAAA,OAAO;oBACWC,SAAAA,CAAUD,OAAAA,CAAQE,MAAAA,CAAOC,SAAS,CAAA;;;AAGtD;AALgBJ,MAAAA,CAAAA,iBAAAA,EAAAA,mBAAAA,CAAAA;AAOT,SAASK,aAAAA,CACdJ,OAAAA,EACAK,OAAAA,GAA6B,EAAC,EAAC;AAE/B,EAAA,MAAM,EAAEC,SAAAA,GAAY,IAAA,EAAMC,cAAAA,GAAiB,OAAK,GAAKF,OAAAA;AAErD,EAAA,OAAO,CAAA;;EAEPE,cAAAA,GAAiB,CAAA,kBAAA,CAAA,GAAuB,EAAA,CAAA,EAAKD,SAAAA,GAAY;;EAAOA,SAAAA;IAAgB,IAAA;AAChFP,EAAAA,iBAAAA,CAAkBC,OAAAA,CAAAA;;;AAGpB;AAZgBI,MAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"chunk-7R23HVGQ.js","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { Context } from \"../../types/context\";\n\nexport interface FileHeaderOptions {\n directive?: string | null;\n prettierIgnore?: boolean;\n}\n\nexport function getBaseFileHeader(context: Context): string {\n return `\n// Generated with ${titleCase(context.config.framework)}\n// Note: Do not edit this file manually - it will be overwritten automatically\n`;\n}\n\nexport function getFileHeader(\n context: Context,\n options: FileHeaderOptions = {}\n): string {\n const { directive = null, prettierIgnore = false } = options;\n\n return `/* eslint-disable */\n// biome-ignore lint: disable\n${prettierIgnore ? `// prettier-ignore` : \"\"}${directive ? `\\n\\n${directive}\\n` : \"\\n\"}\n${getBaseFileHeader(context)}\n\n`;\n}\n"]}
@@ -1,95 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
4
- var parseTypeDefinition = require('@stryke/convert/parse-type-definition');
5
- var toArray = require('@stryke/convert/to-array');
6
- var listFiles = require('@stryke/fs/list-files');
7
- var murmurhash = require('@stryke/hash/murmurhash');
8
- var getUnique = require('@stryke/helpers/get-unique');
9
- var append = require('@stryke/path/append');
10
- var filePathFns = require('@stryke/path/file-path-fns');
11
- var joinPaths = require('@stryke/path/join-paths');
12
- var replace = require('@stryke/path/replace');
13
- var isSetString = require('@stryke/type-checks/is-set-string');
14
-
15
- function resolveEntryInputFile(context, typeDefinition) {
16
- return replace.replacePath(typeDefinition.file, joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot));
17
- }
18
- chunkPK6SKIKE_cjs.__name(resolveEntryInputFile, "resolveEntryInputFile");
19
- function resolveEntryInput(context, typeDefinition) {
20
- return {
21
- file: resolveEntryInputFile(context, typeDefinition),
22
- name: typeDefinition.name
23
- };
24
- }
25
- chunkPK6SKIKE_cjs.__name(resolveEntryInput, "resolveEntryInput");
26
- function resolveEntryOutput(context, typeDefinition) {
27
- return joinPaths.joinPaths(replace.replacePath(replace.replacePath(replace.replacePath(replace.replacePath(typeDefinition.file, joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.sourceRoot)), joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot)), context.config.sourceRoot), context.config.projectRoot)).replace(`.${filePathFns.findFileExtensionSafe(typeDefinition.file)}`, "");
28
- }
29
- chunkPK6SKIKE_cjs.__name(resolveEntryOutput, "resolveEntryOutput");
30
- function resolveEntry(context, typeDefinition) {
31
- const input = resolveEntryInput(context, typeDefinition);
32
- return {
33
- ...input,
34
- input,
35
- output: resolveEntryOutput(context, typeDefinition)
36
- };
37
- }
38
- chunkPK6SKIKE_cjs.__name(resolveEntry, "resolveEntry");
39
- async function resolveEntries(context, typeDefinitions) {
40
- return (await Promise.all(typeDefinitions.map(async (typeDefinition) => {
41
- const parsed = parseTypeDefinition.parseTypeDefinition(typeDefinition);
42
- return (await listFiles.listFiles(append.appendPath(parsed.file, context.config.projectRoot))).map((file) => resolveEntry(context, {
43
- file,
44
- name: parsed.name
45
- }));
46
- }))).flat().filter(Boolean);
47
- }
48
- chunkPK6SKIKE_cjs.__name(resolveEntries, "resolveEntries");
49
- function resolveEntriesSync(context, typeDefinitions) {
50
- return typeDefinitions.map((typeDefinition) => {
51
- const parsed = parseTypeDefinition.parseTypeDefinition(typeDefinition);
52
- return listFiles.listFilesSync(append.appendPath(parsed.file, context.config.projectRoot)).map((file) => resolveEntry(context, {
53
- file,
54
- name: parsed.name
55
- }));
56
- }).flat().filter(Boolean);
57
- }
58
- chunkPK6SKIKE_cjs.__name(resolveEntriesSync, "resolveEntriesSync");
59
- function resolveVirtualEntry(context, typeDefinition) {
60
- const parsed = parseTypeDefinition.parseTypeDefinition(typeDefinition);
61
- const resolved = resolveEntry(context, parsed);
62
- const file = joinPaths.joinPaths(context.artifactsPath, `entry-${murmurhash.murmurhash({
63
- file: resolved.file,
64
- name: resolved.name
65
- }, {
66
- maxLength: 24
67
- }).replaceAll("-", "0").replaceAll("_", "1")}.ts`);
68
- return {
69
- file,
70
- name: resolved.name,
71
- input: {
72
- file,
73
- name: resolved.name
74
- },
75
- output: file
76
- };
77
- }
78
- chunkPK6SKIKE_cjs.__name(resolveVirtualEntry, "resolveVirtualEntry");
79
- function getUniqueEntries(entries = []) {
80
- return getUnique.getUniqueBy(toArray.toArray(entries), (item) => isSetString.isSetString(item) ? item : murmurhash.murmurhash(item ?? {}, {
81
- maxLength: 24
82
- }));
83
- }
84
- chunkPK6SKIKE_cjs.__name(getUniqueEntries, "getUniqueEntries");
85
-
86
- exports.getUniqueEntries = getUniqueEntries;
87
- exports.resolveEntries = resolveEntries;
88
- exports.resolveEntriesSync = resolveEntriesSync;
89
- exports.resolveEntry = resolveEntry;
90
- exports.resolveEntryInput = resolveEntryInput;
91
- exports.resolveEntryInputFile = resolveEntryInputFile;
92
- exports.resolveEntryOutput = resolveEntryOutput;
93
- exports.resolveVirtualEntry = resolveVirtualEntry;
94
- //# sourceMappingURL=chunk-BEKLDCTV.cjs.map
95
- //# sourceMappingURL=chunk-BEKLDCTV.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/lib/entry.ts"],"names":["resolveEntryInputFile","context","typeDefinition","replacePath","file","joinPaths","workspaceConfig","workspaceRoot","config","projectRoot","resolveEntryInput","name","resolveEntryOutput","sourceRoot","replace","findFileExtensionSafe","resolveEntry","input","output","resolveEntries","typeDefinitions","Promise","all","map","parsed","parseTypeDefinition","listFiles","appendPath","flat","filter","Boolean","resolveEntriesSync","listFilesSync","resolveVirtualEntry","resolved","artifactsPath","murmurhash","maxLength","replaceAll","getUniqueEntries","entries","getUniqueBy","toArray","item","isSetString"],"mappings":";;;;;;;;;;;;;;AAmCO,SAASA,qBAAAA,CACdC,SACAC,cAAAA,EAA8B;AAE9B,EAAA,OAAOC,mBAAAA,CACLD,cAAAA,CAAeE,IAAAA,EACfC,mBAAAA,CAAUJ,OAAAA,CAAQK,gBAAgBC,aAAAA,EAAeN,OAAAA,CAAQO,MAAAA,CAAOC,WAAW,CAAA,CAAA;AAE/E;AARgBT,wBAAAA,CAAAA,qBAAAA,EAAAA,uBAAAA,CAAAA;AAUT,SAASU,iBAAAA,CACdT,SACAC,cAAAA,EAA8B;AAE9B,EAAA,OAAO;IACLE,IAAAA,EAAMJ,qBAAAA,CAAsBC,SAASC,cAAAA,CAAAA;AACrCS,IAAAA,IAAAA,EAAMT,cAAAA,CAAeS;AACvB,GAAA;AACF;AARgBD,wBAAAA,CAAAA,iBAAAA,EAAAA,mBAAAA,CAAAA;AAUT,SAASE,kBAAAA,CACdX,SACAC,cAAAA,EAA8B;AAE9B,EAAA,OAAOG,oBACLF,mBAAAA,CACEA,mBAAAA,CACEA,oBACEA,mBAAAA,CACED,cAAAA,CAAeE,MACfC,mBAAAA,CACEJ,OAAAA,C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CAAW,GAAA,EAAK,GAAA,CAAA,CAAA,GAAA,CAAS,CAAA;AAG9B,EAAA,OAAO;AACLlC,IAAAA,IAAAA;AACAO,IAAAA,IAAAA,EAAMuB,QAAAA,CAASvB,IAAAA;IACfM,KAAAA,EAAO;AACLb,MAAAA,IAAAA;AACAO,MAAAA,IAAAA,EAAMuB,QAAAA,CAASvB;AACjB,KAAA;IACAO,MAAAA,EAAQd;AACV,GAAA;AACF;AAzBgB6B,wBAAAA,CAAAA,mBAAAA,EAAAA,qBAAAA,CAAAA;AAiCT,SAASM,gBAAAA,CACdC,OAAAA,GAA+D,EAAA,EAAE;AAEjE,EAAA,OAAOC,qBAAAA,CAAYC,eAAAA,CAAQF,OAAAA,CAAAA,EAAU,CAACG,IAAAA,KACpCC,uBAAAA,CAAYD,IAAAA,CAAAA,GAAQA,IAAAA,GAAOP,qBAAAA,CAAWO,IAAAA,IAAQ,EAAC,EAAG;IAAEN,SAAAA,EAAW;AAAG,GAAA,CAAA,CAAA;AAEtE;AANgBE,wBAAAA,CAAAA,gBAAAA,EAAAA,kBAAAA,CAAAA","file":"chunk-BEKLDCTV.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { parseTypeDefinition } from \"@stryke/convert/parse-type-definition\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { listFiles, listFilesSync } from \"@stryke/fs/list-files\";\nimport { murmurhash } from \"@stryke/hash/murmurhash\";\nimport { getUniqueBy } from \"@stryke/helpers/get-unique\";\nimport { appendPath } from \"@stryke/path/append\";\nimport { findFileExtensionSafe } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport type {\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport type { Context } from \"../types/context\";\nimport { ResolvedEntryTypeDefinition } from \"../types/resolved\";\n\nexport function resolveEntryInputFile(\n context: Context,\n typeDefinition: TypeDefinition\n): string {\n return replacePath(\n typeDefinition.file,\n joinPaths(context.workspaceConfig.workspaceRoot, context.config.projectRoot)\n );\n}\n\nexport function resolveEntryInput(\n context: Context,\n typeDefinition: TypeDefinition\n): TypeDefinition {\n return {\n file: resolveEntryInputFile(context, typeDefinition),\n name: typeDefinition.name\n };\n}\n\nexport function resolveEntryOutput(\n context: Context,\n typeDefinition: TypeDefinition\n): string {\n return joinPaths(\n replacePath(\n replacePath(\n replacePath(\n replacePath(\n typeDefinition.file,\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.sourceRoot\n )\n ),\n joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot\n )\n ),\n context.config.sourceRoot\n ),\n context.config.projectRoot\n )\n ).replace(`.${findFileExtensionSafe(typeDefinition.file)}`, \"\");\n}\n\nexport function resolveEntry(\n context: Context,\n typeDefinition: TypeDefinition\n): ResolvedEntryTypeDefinition {\n const input = resolveEntryInput(context, typeDefinition);\n\n return {\n ...input,\n input,\n output: resolveEntryOutput(context, typeDefinition)\n };\n}\n\n/**\n * Resolves multiple type definitions into their corresponding resolved entry type definitions.\n *\n * @param context - The current context\n * @param typeDefinitions - The type definitions to resolve.\n * @returns A promise that resolves to an array of resolved entry type definitions.\n */\nexport async function resolveEntries(\n context: Context,\n typeDefinitions: TypeDefinitionParameter[]\n): Promise<ResolvedEntryTypeDefinition[]> {\n return (\n await Promise.all(\n typeDefinitions.map(async typeDefinition => {\n const parsed = parseTypeDefinition(typeDefinition)!;\n\n return (\n await listFiles(appendPath(parsed.file, context.config.projectRoot))\n ).map(file =>\n resolveEntry(context, {\n file,\n name: parsed.name\n })\n );\n })\n )\n )\n .flat()\n .filter(Boolean);\n}\n\n/**\n * Resolves multiple type definitions into their corresponding resolved entry type definitions.\n *\n * @param context - The current context\n * @param typeDefinitions - The type definitions to resolve.\n * @returns A promise that resolves to an array of resolved entry type definitions.\n */\nexport function resolveEntriesSync(\n context: Context,\n typeDefinitions: TypeDefinitionParameter[]\n): ResolvedEntryTypeDefinition[] {\n return typeDefinitions\n .map(typeDefinition => {\n const parsed = parseTypeDefinition(typeDefinition)!;\n\n return listFilesSync(\n appendPath(parsed.file, context.config.projectRoot)\n ).map(file =>\n resolveEntry(context, {\n file,\n name: parsed.name\n })\n );\n })\n .flat()\n .filter(Boolean);\n}\n\n/** Resolve a virtual entry point by generating a unique file path in the artifacts directory.\n *\n * @param context - The current context\n * @param typeDefinition - The type definition to resolve.\n * @returns The resolved entry type definition with a unique virtual file path.\n */\nexport function resolveVirtualEntry(\n context: Context,\n typeDefinition: TypeDefinitionParameter\n): ResolvedEntryTypeDefinition {\n const parsed = parseTypeDefinition(typeDefinition)!;\n const resolved = resolveEntry(context, parsed);\n const file = joinPaths(\n context.artifactsPath,\n `entry-${murmurhash(\n { file: resolved.file, name: resolved.name },\n { maxLength: 24 }\n )\n .replaceAll(\"-\", \"0\")\n .replaceAll(\"_\", \"1\")}.ts`\n );\n\n return {\n file,\n name: resolved.name,\n input: {\n file,\n name: resolved.name\n },\n output: file\n };\n}\n\n/**\n * Get unique entries from the provided list.\n *\n * @param entries - The entries to process.\n * @returns An array of unique entries (by file path or content hash).\n */\nexport function getUniqueEntries(\n entries: TypeDefinitionParameter | TypeDefinitionParameter[] = []\n): TypeDefinitionParameter[] {\n return getUniqueBy(toArray(entries), (item: TypeDefinitionParameter) =>\n isSetString(item) ? item : murmurhash(item ?? {}, { maxLength: 24 })\n );\n}\n"]}
@@ -1,110 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
4
- var types = require('@storm-software/config-tools/types');
5
- var exists = require('@stryke/fs/exists');
6
- var json = require('@stryke/fs/json');
7
- var listFiles = require('@stryke/fs/list-files');
8
- var removeFile = require('@stryke/fs/remove-file');
9
- var hashFiles = require('@stryke/hash/hash-files');
10
- var getUnique = require('@stryke/helpers/get-unique');
11
- var filePathFns = require('@stryke/path/file-path-fns');
12
- var joinPaths = require('@stryke/path/join-paths');
13
- var kebabCase = require('@stryke/string-format/kebab-case');
14
-
15
- // src/types/vfs.ts
16
- var __VFS_INIT__ = "__VFS_INIT__";
17
- var __VFS_REVERT__ = "__VFS_REVERT__";
18
- var __VFS_CACHE__ = "__VFS_CACHE__";
19
- var __VFS_RESOLVER__ = "__VFS_RESOLVER__";
20
- var __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
21
- var __VFS_UNIFIED__ = "__VFS_UNIFIED__";
22
-
23
- // src/lib/utilities/meta.ts
24
- var PROJECT_ROOT_HASH_LENGTH = 45;
25
- var CACHE_HASH_LENGTH = 62;
26
- function getPrefixedProjectRootHash(name, projectRootHash) {
27
- const combined = `${kebabCase.kebabCase(name)}_${projectRootHash}`;
28
- return combined.length > PROJECT_ROOT_HASH_LENGTH ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH) : combined;
29
- }
30
- chunkPK6SKIKE_cjs.__name(getPrefixedProjectRootHash, "getPrefixedProjectRootHash");
31
- async function discoverTemplatePath(path) {
32
- return (await Promise.all([
33
- Promise.resolve(/.tsx?$/.test(path) && !path.includes("*") && path),
34
- Promise.resolve(!filePathFns.hasFileExtension(path) && joinPaths.joinPaths(path, ".ts")),
35
- Promise.resolve(!filePathFns.hasFileExtension(path) && joinPaths.joinPaths(path, ".tsx")),
36
- Promise.resolve(!filePathFns.hasFileExtension(path) && listFiles.listFiles(joinPaths.joinPaths(path, "**/*.ts"))),
37
- Promise.resolve(!filePathFns.hasFileExtension(path) && listFiles.listFiles(joinPaths.joinPaths(path, "**/*.tsx")))
38
- ])).flat().filter(Boolean);
39
- }
40
- chunkPK6SKIKE_cjs.__name(discoverTemplatePath, "discoverTemplatePath");
41
- async function discoverTemplates(context, paths = []) {
42
- return getUnique.getUnique((await Promise.all([
43
- ...paths.map(discoverTemplatePath),
44
- discoverTemplatePath(joinPaths.joinPaths(context.config.sourceRoot, "plugin")),
45
- discoverTemplatePath(joinPaths.joinPaths(context.envPaths.config, "templates")),
46
- discoverTemplatePath(joinPaths.joinPaths(context.config.projectRoot, "templates"))
47
- ])).flat().reduce((ret, path) => {
48
- if (exists.existsSync(path)) {
49
- ret.push(path);
50
- }
51
- return ret;
52
- }, []));
53
- }
54
- chunkPK6SKIKE_cjs.__name(discoverTemplates, "discoverTemplates");
55
- async function getChecksum(path) {
56
- return hashFiles.hashDirectory(path, {
57
- ignore: [
58
- "node_modules",
59
- ".git",
60
- ".nx",
61
- ".cache",
62
- ".storm",
63
- "tmp",
64
- "dist"
65
- ]
66
- });
67
- }
68
- chunkPK6SKIKE_cjs.__name(getChecksum, "getChecksum");
69
- async function getPersistedMeta(context) {
70
- const metaFilePath = joinPaths.joinPaths(context.dataPath, "meta.json");
71
- if (exists.existsSync(metaFilePath)) {
72
- try {
73
- return await json.readJsonFile(metaFilePath);
74
- } catch {
75
- context.log(types.LogLevelLabel.WARN, `Failed to read meta file at ${metaFilePath}. It may be corrupted.`);
76
- await removeFile.removeFile(metaFilePath);
77
- context.persistedMeta = void 0;
78
- }
79
- }
80
- return void 0;
81
- }
82
- chunkPK6SKIKE_cjs.__name(getPersistedMeta, "getPersistedMeta");
83
- async function writeMetaFile(context) {
84
- const metaFilePath = joinPaths.joinPaths(context.dataPath, "meta.json");
85
- context.log(types.LogLevelLabel.DEBUG, `Writing runtime metadata to ${metaFilePath}`);
86
- await context.fs.writeFile(metaFilePath, JSON.stringify({
87
- ...context.meta,
88
- virtualFiles: context.fs[__VFS_VIRTUAL__].toJSON(context.artifactsPath),
89
- virtualFilesMeta: context.fs.getPartialMeta()
90
- }, null, 2), {
91
- mode: "fs"
92
- });
93
- }
94
- chunkPK6SKIKE_cjs.__name(writeMetaFile, "writeMetaFile");
95
-
96
- exports.CACHE_HASH_LENGTH = CACHE_HASH_LENGTH;
97
- exports.PROJECT_ROOT_HASH_LENGTH = PROJECT_ROOT_HASH_LENGTH;
98
- exports.__VFS_CACHE__ = __VFS_CACHE__;
99
- exports.__VFS_INIT__ = __VFS_INIT__;
100
- exports.__VFS_RESOLVER__ = __VFS_RESOLVER__;
101
- exports.__VFS_REVERT__ = __VFS_REVERT__;
102
- exports.__VFS_UNIFIED__ = __VFS_UNIFIED__;
103
- exports.__VFS_VIRTUAL__ = __VFS_VIRTUAL__;
104
- exports.discoverTemplates = discoverTemplates;
105
- exports.getChecksum = getChecksum;
106
- exports.getPersistedMeta = getPersistedMeta;
107
- exports.getPrefixedProjectRootHash = getPrefixedProjectRootHash;
108
- exports.writeMetaFile = writeMetaFile;
109
- //# sourceMappingURL=chunk-BW3VFCTS.cjs.map
110
- //# sourceMappingURL=chunk-BW3VFCTS.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/vfs.ts","../../src/lib/utilities/meta.ts"],"names":["__VFS_INIT__","__VFS_REVERT__","__VFS_CACHE__","__VFS_RESOLVER__","__VFS_VIRTUAL__","__VFS_UNIFIED__","PROJECT_ROOT_HASH_LENGTH","CACHE_HASH_LENGTH","getPrefixedProjectRootHash","name","projectRootHash","combined","kebabCase","length","slice","discoverTemplatePath","path","Promise","all","resolve","test","includes","hasFileExtension","joinPaths","listFiles","flat","filter","Boolean","discoverTemplates","context","paths","getUnique","map","config","sourceRoot","envPaths","projectRoot","reduce","ret","existsSync","push","getChecksum","hashDirectory","ignore","getPersistedMeta","metaFilePath","dataPath","readJsonFile","log","LogLevelLabel","WARN","removeFile","persistedMeta","undefined","writeMetaFile","DEBUG","fs","writeFile","JSON","stringify","meta","virtualFiles","toJSON","artifactsPath","vir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Q2B,EAAAA,CAAGpD,eAAAA,CAAAA,CAAiB0D,MAAAA,CAAOjC,QAAQkC,aAAa,CAAA;IACtEC,gBAAAA,EAAkBnC,OAAAA,CAAQ2B,GAAGS,cAAAA;GAC/B,EACA,IAAA,EACA,CAAA,CAAA,EAEF;IACEC,IAAAA,EAAM;GACR,CAAA;AAEJ;AAvBsBZ,wBAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"chunk-BW3VFCTS.cjs","sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { PrimitiveJsonValue } from \"@stryke/json/types\";\nimport type { Volume } from \"memfs\";\nimport type {\n MakeDirectoryOptions as FsMakeDirectoryOptions,\n WriteFileOptions as FsWriteFileOptions,\n Mode,\n PathLike,\n PathOrFileDescriptor,\n RmDirOptions,\n RmOptions,\n Stats,\n StatSyncOptions\n} from \"node:fs\";\nimport type { IUnionFs } from \"unionfs\";\n\nexport type VirtualFileExtension = \"js\" | \"ts\" | \"jsx\" | \"tsx\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_INIT__ = \"__VFS_INIT__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_REVERT__ = \"__VFS_REVERT__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_CACHE__ = \"__VFS_CACHE__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_RESOLVER__ = \"__VFS_RESOLVER__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_VIRTUAL__ = \"__VFS_VIRTUAL__\";\n\n// eslint-disable-next-line ts/naming-convention\nexport const __VFS_UNIFIED__ = \"__VFS_UNIFIED__\";\n\nexport type OutputModeType = \"fs\" | \"virtual\";\n\nexport interface VirtualFile {\n /**\n * The unique identifier for the virtual file.\n *\n * @remarks\n * If no specific id is provided, it defaults to the file's {@link path}.\n */\n id: string;\n\n /**\n * Additional metadata associated with the virtual file.\n */\n details: Record<string, PrimitiveJsonValue>;\n\n /**\n * The variant of the file.\n *\n * @remarks\n * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:\n * - `builtin`: Indicates that the file is a built-in module provided by the system.\n * - `entry`: Indicates that the file is an entry point for execution.\n * - `normal`: Indicates that the file is a standard file without any special role.\n */\n variant: string;\n\n /**\n * The output mode of the file.\n *\n * @remarks\n * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).\n */\n mode: OutputModeType;\n\n /**\n * A virtual (or actual) path to the file in the file system.\n */\n path: string;\n\n /**\n * The contents of the file.\n */\n code: string | NodeJS.ArrayBufferView;\n}\n\nexport type VirtualFileSystemMetadata = Pick<\n VirtualFile,\n \"id\" | \"details\" | \"variant\" | \"mode\"\n>;\n\nexport interface ResolveFSOptions {\n mode?: OutputModeType;\n}\n\nexport type MakeDirectoryOptions = (Mode | FsMakeDirectoryOptions) &\n ResolveFSOptions;\n\nexport interface PowerlinesWriteFileOptions extends ResolveFSOptions {\n skipFormat?: boolean;\n}\n\nexport type NodeWriteFileOptions = FsWriteFileOptions;\n\nexport type WriteFileOptions =\n | NodeWriteFileOptions\n | PowerlinesWriteFileOptions;\n\nexport type PowerLinesWriteFileData = Partial<\n Omit<VirtualFile, \"path\" | \"mode\" | \"code\">\n> &\n Pick<VirtualFile, \"code\">;\n\nexport type WriteFileData =\n | string\n | NodeJS.ArrayBufferView\n | PowerLinesWriteFileData;\n\nexport interface ResolvePathOptions extends ResolveFSOptions {\n /**\n * Should the resolved path include the file extension?\n *\n * @defaultValue true\n */\n withExtension?: boolean;\n\n /**\n * The paths to search for the file.\n */\n paths?: string[];\n\n /**\n * The type of the path to resolve.\n */\n type?: \"file\" | \"directory\";\n}\n\nexport interface VirtualFileSystemInterface {\n [__VFS_INIT__]: () => void;\n [__VFS_REVERT__]: () => void;\n\n /**\n * The underlying file metadata.\n */\n meta: Record<string, VirtualFileSystemMetadata | undefined>;\n\n /**\n * A map of module ids to their file paths.\n */\n ids: Record<string, string>;\n\n /**\n * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.\n *\n * @param pathOrId - The path or id to check.\n * @param options - Optional parameters for resolving the path.\n * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.\n */\n isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;\n\n /**\n * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.\n *\n * @param pathOrId - The path or id to check.\n * @param options - Optional parameters for resolving the path.\n * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.\n */\n isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;\n\n /**\n * Checks if a file exists in the virtual file system (VFS).\n *\n * @param path - The path of the file to check.\n * @returns `true` if the file exists, otherwise `false`.\n */\n isFile: (path: string) => boolean;\n\n /**\n * Checks if a directory exists in the virtual file system (VFS).\n *\n * @param path - The path of the directory to check.\n * @returns `true` if the directory exists, otherwise `false`.\n */\n isDirectory: (path: string) => boolean;\n\n /**\n * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.\n *\n * @see https://www.typescriptlang.org/tsconfig#paths\n *\n * @param pathOrId - The path or id to check.\n * @returns Whether the path or id corresponds to a virtual file.\n */\n isTsconfigPath: (pathOrId: string) => boolean;\n\n /**\n * Checks if a file exists in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns `true` if the file exists, otherwise `false`.\n */\n existsSync: (pathOrId: string) => boolean;\n\n /**\n * Gets the metadata of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The metadata of the file if it exists, otherwise undefined.\n */\n getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @param options - Optional parameters for getting the stats.\n * @returns The stats of the file if it exists, otherwise undefined.\n */\n lstat: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Promise<Stats>;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @param options - Optional parameters for getting the stats.\n * @returns The stats of the file if it exists, otherwise undefined.\n */\n lstatSync: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Stats | undefined;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The stats of the file if it exists, otherwise false.\n */\n stat: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Promise<Stats>;\n\n /**\n * Gets the stats of a file in the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The stats of the file if it exists, otherwise false.\n */\n statSync: (\n pathOrId: string,\n options?: StatSyncOptions & {\n bigint?: false | undefined;\n throwIfNoEntry: false;\n }\n ) => Stats | undefined;\n\n /**\n * Lists files in a given path.\n *\n * @param path - The path to list files from.\n * @param options - Options for listing files, such as encoding and recursion.\n * @returns An array of file names in the specified path.\n */\n readdirSync: (\n path: string,\n options?:\n | {\n encoding: BufferEncoding | null;\n withFileTypes?: false | undefined;\n recursive?: boolean | undefined;\n }\n | BufferEncoding\n ) => string[];\n\n /**\n * Lists files in a given path.\n *\n * @param path - The path to list files from.\n * @param options - Options for listing files, such as encoding and recursion.\n * @returns An array of file names in the specified path.\n */\n readdir: (\n path: string,\n options?:\n | {\n encoding: BufferEncoding | null;\n withFileTypes?: false | undefined;\n recursive?: boolean | undefined;\n }\n | BufferEncoding\n ) => Promise<string[]>;\n\n /**\n * Removes a file or symbolic link in the virtual file system (VFS).\n *\n * @param path - The path to the file to remove.\n * @returns A promise that resolves when the file is removed.\n */\n unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;\n\n /**\n * Asynchronously removes a file or symbolic link in the virtual file system (VFS).\n *\n * @param path - The path to the file to remove.\n * @returns A promise that resolves when the file is removed.\n */\n unlink: (path: string, options?: ResolveFSOptions) => Promise<void>;\n\n /**\n * Removes a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n */\n rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;\n\n /**\n * Removes a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.\n */\n rmdir: (\n path: PathLike,\n options?: RmDirOptions & ResolveFSOptions\n ) => Promise<void>;\n\n /**\n * Removes a file or directory in the virtual file system (VFS).\n *\n * @param path - The path to the file or directory to remove.\n * @param options - Options for removing the file or directory.\n * @returns A promise that resolves when the file or directory is removed.\n */\n rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;\n\n /**\n * Synchronously removes a file or directory in the virtual file system (VFS).\n *\n * @param path - The path to the file or directory to remove.\n * @param options - Options for removing the file or directory.\n */\n rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;\n\n /**\n * Creates a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.\n */\n mkdirSync: (\n path: PathLike,\n options?: MakeDirectoryOptions\n ) => string | undefined;\n\n /**\n * Creates a directory in the virtual file system (VFS).\n *\n * @param path - The path to create the directory at.\n * @param options - Options for creating the directory.\n * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.\n */\n mkdir: (\n path: PathLike,\n options?: MakeDirectoryOptions\n ) => Promise<string | undefined>;\n\n /**\n * Reads a file from the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n * @returns The contents of the file if it exists, otherwise undefined.\n */\n readFile: (pathOrId: string) => Promise<string | undefined>;\n\n /**\n * Reads a file from the virtual file system (VFS).\n *\n * @param pathOrId - The path or id of the file.\n */\n readFileSync: (pathOrId: string) => string | undefined;\n\n /**\n * Writes a file to the virtual file system (VFS).\n *\n * @param path - The path to the file.\n * @param data - The contents of the file.\n * @param options - Optional parameters for writing the file.\n * @returns A promise that resolves when the file is written.\n */\n writeFile: (\n path: PathOrFileDescriptor,\n data?: WriteFileData,\n options?: WriteFileOptions\n ) => Promise<void>;\n\n /**\n * Writes a file to the virtual file system (VFS).\n *\n * @param path - The path to the file.\n * @param data - The contents of the file.\n * @param options - Optional parameters for writing the file.\n */\n writeFileSync: (\n path: PathOrFileDescriptor,\n data?: WriteFileData,\n options?: WriteFileOptions\n ) => void;\n\n /**\n * Moves a file from one path to another in the virtual file system (VFS).\n *\n * @param srcPath - The source path to move\n * @param destPath - The destination path to move to\n */\n move: (srcPath: string, destPath: string) => Promise<void>;\n\n /**\n * Synchronously moves a file from one path to another in the virtual file system (VFS).\n *\n * @param srcPath - The source path to move\n * @param destPath - The destination path to move to\n */\n moveSync: (srcPath: string, destPath: string) => void;\n\n /**\n * Copies a file from one path to another in the virtual file system (VFS).\n *\n * @param srcPath - The source path to copy\n * @param destPath - The destination path to copy to\n */\n copy: (srcPath: string, destPath: string) => Promise<void>;\n\n /**\n * Synchronously copies a file from one path to another in the virtual file system (VFS).\n *\n * @param srcPath - The source path to copy\n * @param destPath - The destination path to copy to\n */\n copySync: (srcPath: string, destPath: string) => void;\n\n /**\n * Glob files in the virtual file system (VFS) based on the provided pattern(s).\n *\n * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return\n * @returns An array of file paths matching the provided pattern(s)\n */\n glob: (pattern: string | string[]) => Promise<string[]>;\n\n /**\n * Synchronously glob files in the virtual file system (VFS) based on the provided pattern(s).\n *\n * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return\n * @returns An array of file paths matching the provided pattern(s)\n */\n globSync: (pattern: string | string[]) => string[];\n\n /**\n * Resolves a path or id to a file path in the virtual file system.\n *\n * @param pathOrId - The path or id of the file to resolve.\n * @param options - Optional parameters for resolving the path.\n * @returns The resolved path of the file if it exists, otherwise false.\n */\n resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;\n\n /**\n * Resolves a path based on TypeScript's `tsconfig.json` paths.\n *\n * @see https://www.typescriptlang.org/tsconfig#paths\n *\n * @param path - The path to check.\n * @returns The resolved file path if it exists, otherwise undefined.\n */\n resolveTsconfigPath: (path: string) => string | false;\n\n /**\n * Resolves a package name based on TypeScript's `tsconfig.json` paths.\n *\n * @see https://www.typescriptlang.org/tsconfig#paths\n *\n * @param path - The path to check.\n * @returns The resolved package name if it exists, otherwise undefined.\n */\n resolveTsconfigPathPackage: (path: string) => string | false;\n\n /**\n * Resolves a path or id to a file path in the virtual file system.\n *\n * @param pathOrId - The path or id of the file to resolve.\n * @returns The resolved path of the file if it exists, otherwise false.\n */\n realpathSync: (pathOrId: string) => string;\n\n /**\n * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).\n *\n * @returns A record mapping file paths to their partial metadata.\n */\n getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;\n\n /**\n * A map of cached file paths to their underlying file content.\n */\n [__VFS_CACHE__]: Map<string, string>;\n\n /**\n * A reference to the underlying virtual file system.\n */\n [__VFS_VIRTUAL__]: Volume;\n\n /**\n * A reference to the underlying unified file system.\n */\n [__VFS_UNIFIED__]: IUnionFs;\n}\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { readJsonFile } from \"@stryke/fs/json\";\nimport { listFiles } from \"@stryke/fs/list-files\";\nimport { removeFile } from \"@stryke/fs/remove-file\";\nimport { hashDirectory } from \"@stryke/hash/hash-files\";\nimport { getUnique } from \"@stryke/helpers/get-unique\";\nimport { hasFileExtension } from \"@stryke/path/file-path-fns\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { Context, MetaInfo } from \"../../types/context\";\nimport { __VFS_VIRTUAL__ } from \"../../types/vfs\";\n\nexport interface CreateContextOptions {\n name?: string;\n}\n\nexport const PROJECT_ROOT_HASH_LENGTH = 45;\nexport const CACHE_HASH_LENGTH = 62;\n\n/**\n * Generates a prefixed project root hash object.\n *\n * @remarks\n * This function returns a string where the project root hash is prefixed with the project name plus a hyphen. If the total length of this string combination exceeds 45 characters, it will truncate the hash.\n *\n * @param name - The name of the project.\n * @param projectRootHash - The hash of the project root.\n * @returns An object containing the name and project root hash.\n */\nexport function getPrefixedProjectRootHash(\n name: string,\n projectRootHash: string\n): string {\n const combined = `${kebabCase(name)}_${projectRootHash}`;\n\n return combined.length > PROJECT_ROOT_HASH_LENGTH\n ? combined.slice(0, PROJECT_ROOT_HASH_LENGTH)\n : combined;\n}\n\nasync function discoverTemplatePath(path: string): Promise<string[]> {\n return (\n await Promise.all([\n Promise.resolve(/.tsx?$/.test(path) && !path.includes(\"*\") && path),\n Promise.resolve(!hasFileExtension(path) && joinPaths(path, \".ts\")),\n Promise.resolve(!hasFileExtension(path) && joinPaths(path, \".tsx\")),\n Promise.resolve(\n !hasFileExtension(path) && listFiles(joinPaths(path, \"**/*.ts\"))\n ),\n Promise.resolve(\n !hasFileExtension(path) && listFiles(joinPaths(path, \"**/*.tsx\"))\n )\n ])\n )\n .flat()\n .filter(Boolean) as string[];\n}\n\nexport async function discoverTemplates(\n context: Context,\n paths: string[] = []\n): Promise<string[]> {\n return getUnique(\n (\n await Promise.all([\n ...paths.map(discoverTemplatePath),\n discoverTemplatePath(joinPaths(context.config.sourceRoot, \"plugin\")),\n discoverTemplatePath(joinPaths(context.envPaths.config, \"templates\")),\n discoverTemplatePath(joinPaths(context.config.projectRoot, \"templates\"))\n ])\n )\n .flat()\n .reduce((ret, path) => {\n if (existsSync(path)) {\n ret.push(path);\n }\n\n return ret;\n }, [] as string[])\n );\n}\n\nexport async function getChecksum(path: string): Promise<string> {\n return hashDirectory(path, {\n ignore: [\"node_modules\", \".git\", \".nx\", \".cache\", \".storm\", \"tmp\", \"dist\"]\n });\n}\n\n/**\n * Retrieves the persisted meta information from the context's data path.\n *\n * @param context - The build context.\n * @returns A promise that resolves to the persisted meta information, or undefined if not found.\n */\nexport async function getPersistedMeta(\n context: Context\n): Promise<MetaInfo | undefined> {\n const metaFilePath = joinPaths(context.dataPath, \"meta.json\");\n if (existsSync(metaFilePath)) {\n try {\n return await readJsonFile<MetaInfo>(metaFilePath);\n } catch {\n context.log(\n LogLevelLabel.WARN,\n `Failed to read meta file at ${metaFilePath}. It may be corrupted.`\n );\n await removeFile(metaFilePath);\n\n context.persistedMeta = undefined;\n }\n }\n\n return undefined;\n}\n\n/**\n * Writes the meta file for the context.\n *\n * @param context - The context to write the meta file for.\n * @returns A promise that resolves when the meta file has been written.\n */\nexport async function writeMetaFile(context: Context): Promise<void> {\n const metaFilePath = joinPaths(context.dataPath, \"meta.json\");\n\n context.log(\n LogLevelLabel.DEBUG,\n `Writing runtime metadata to ${metaFilePath}`\n );\n\n await context.fs.writeFile(\n metaFilePath,\n JSON.stringify(\n {\n ...context.meta,\n virtualFiles: context.fs[__VFS_VIRTUAL__].toJSON(context.artifactsPath),\n virtualFilesMeta: context.fs.getPartialMeta()\n },\n null,\n 2\n ),\n {\n mode: \"fs\"\n }\n );\n}\n"]}