powerlines 0.14.0 → 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-2VIXD2XB.js +0 -3
  179. package/dist/chunk-4AKYOJXA.cjs +0 -20
  180. package/dist/chunk-4HGQJ4KR.js +0 -11
  181. package/dist/chunk-4JCNAKOE.cjs +0 -4
  182. package/dist/chunk-5VPVJHJO.cjs +0 -18
  183. package/dist/chunk-6TJGZR5X.js +0 -46
  184. package/dist/chunk-6ZGIV2SU.cjs +0 -4
  185. package/dist/chunk-7BZQBW77.cjs +0 -4
  186. package/dist/chunk-7MTW3KR2.cjs +0 -12
  187. package/dist/chunk-7QVYU63E.js +0 -6
  188. package/dist/chunk-7UIYU6SC.js +0 -39
  189. package/dist/chunk-7WMWRX2S.cjs +0 -12
  190. package/dist/chunk-A3BBPLTY.js +0 -9
  191. package/dist/chunk-AFJCY3R6.js +0 -3
  192. package/dist/chunk-APVMN2H7.cjs +0 -14
  193. package/dist/chunk-AXIRZAL7.js +0 -3
  194. package/dist/chunk-BHP6KBGK.js +0 -16
  195. package/dist/chunk-BOIEJ5I6.js +0 -109
  196. package/dist/chunk-DELRP3WY.js +0 -31
  197. package/dist/chunk-DFLNRC3B.cjs +0 -4
  198. package/dist/chunk-DS7OM4NX.cjs +0 -4
  199. package/dist/chunk-DURCSSLV.js +0 -3
  200. package/dist/chunk-EBMELFCF.js +0 -12
  201. package/dist/chunk-ELHJY5WG.cjs +0 -34
  202. package/dist/chunk-FANQC345.cjs +0 -116
  203. package/dist/chunk-GC3BRYAK.cjs +0 -13
  204. package/dist/chunk-GIE6OE3X.js +0 -3
  205. package/dist/chunk-GV3S7ZR3.cjs +0 -34
  206. package/dist/chunk-HJW7OH6E.js +0 -3
  207. package/dist/chunk-IHUNA3MO.cjs +0 -4
  208. package/dist/chunk-KMLFL4CW.js +0 -14
  209. package/dist/chunk-L3DAMAEC.js +0 -21
  210. package/dist/chunk-LC6FLEJS.cjs +0 -12
  211. package/dist/chunk-LO77RPRV.js +0 -16
  212. package/dist/chunk-MAEKW52U.js +0 -31
  213. package/dist/chunk-MXJWCZDP.cjs +0 -12
  214. package/dist/chunk-NGKWITCO.js +0 -9
  215. package/dist/chunk-OC7CCD5M.cjs +0 -19
  216. package/dist/chunk-OYASPHNL.js +0 -3
  217. package/dist/chunk-P4BOYWXT.js +0 -3570
  218. package/dist/chunk-PJRHRDLS.cjs +0 -3602
  219. package/dist/chunk-PK6SKIKE.cjs +0 -8
  220. package/dist/chunk-Q7EJVZVI.cjs +0 -4
  221. package/dist/chunk-RBRFT2R6.js +0 -9
  222. package/dist/chunk-RU6BHTIP.cjs +0 -24
  223. package/dist/chunk-SIZKRND7.js +0 -12
  224. package/dist/chunk-SNARILEC.cjs +0 -24
  225. package/dist/chunk-SY7N6FC3.js +0 -9
  226. package/dist/chunk-TLHFXGYV.js +0 -3
  227. package/dist/chunk-UZQYBO6Z.cjs +0 -52
  228. package/dist/chunk-V5D5NVV7.cjs +0 -42
  229. package/dist/chunk-V7LXFIGK.js +0 -199
  230. package/dist/chunk-VNRXLY2T.js +0 -3
  231. package/dist/chunk-VQCQRLGM.cjs +0 -4
  232. package/dist/chunk-WCTOTE3T.cjs +0 -201
  233. package/dist/chunk-WD4363UW.cjs +0 -12
  234. package/dist/chunk-XBF43VLE.cjs +0 -4
  235. package/dist/chunk-XZO6ZJQP.cjs +0 -4
  236. package/dist/chunk-YIWHO6SW.cjs +0 -14
  237. package/dist/chunk-YZCTXGFH.js +0 -11
  238. package/dist/chunk-Z5H7LD6W.js +0 -3
  239. package/dist/chunk-ZP5QLZQ2.js +0 -21
  240. package/dist/chunk-ZQ7U35QZ.js +0 -9
  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,68 +0,0 @@
1
- import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
2
- import ts from 'typescript';
3
-
4
- type ReflectionMode = "default" | "explicit" | "never";
5
- type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
6
- /**
7
- * Defines the level of reflection to be used during the transpilation process.
8
- *
9
- * @remarks
10
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
11
- * - `minimal` - Only the essential type information is captured.
12
- * - `normal` - Additional type information is captured, including some contextual data.
13
- * - `verbose` - All available type information is captured, including detailed contextual data.
14
- */
15
- type ReflectionLevel = "minimal" | "normal" | "verbose";
16
- interface DeepkitOptions {
17
- /**
18
- * Either true to activate reflection for all files compiled using this tsconfig,
19
- * or a list of globs/file paths relative to this tsconfig.json.
20
- * Globs/file paths can be prefixed with a ! to exclude them.
21
- */
22
- reflection?: RawReflectionMode;
23
- /**
24
- * Defines the level of reflection to be used during the transpilation process.
25
- *
26
- * @remarks
27
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
28
- * - `minimal` - Only the essential type information is captured.
29
- * - `normal` - Additional type information is captured, including some contextual data.
30
- * - `verbose` - All available type information is captured, including detailed contextual data.
31
- */
32
- reflectionLevel?: ReflectionLevel;
33
- }
34
- type TSCompilerOptions = CompilerOptions & DeepkitOptions;
35
- /**
36
- * The TypeScript compiler configuration.
37
- *
38
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
39
- */
40
- interface TSConfig extends Omit<TsConfigJson, "reflection"> {
41
- /**
42
- * Either true to activate reflection for all files compiled using this tsconfig,
43
- * or a list of globs/file paths relative to this tsconfig.json.
44
- * Globs/file paths can be prefixed with a ! to exclude them.
45
- */
46
- reflection?: RawReflectionMode;
47
- /**
48
- * Defines the level of reflection to be used during the transpilation process.
49
- *
50
- * @remarks
51
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
52
- * - `minimal` - Only the essential type information is captured.
53
- * - `normal` - Additional type information is captured, including some contextual data.
54
- * - `verbose` - All available type information is captured, including detailed contextual data.
55
- */
56
- reflectionLevel?: ReflectionLevel;
57
- /**
58
- * Instructs the TypeScript compiler how to compile `.ts` files.
59
- */
60
- compilerOptions?: TSCompilerOptions;
61
- }
62
- type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
63
- originalTsconfigJson: TsConfigJson;
64
- tsconfigJson: TSConfig;
65
- tsconfigFilePath: string;
66
- };
67
-
68
- export type { ParsedTypeScriptConfig as P, TSConfig as T };
@@ -1,166 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkRLMEYZ5I_cjs = require('../chunk-RLMEYZ5I.cjs');
4
- var chunkLJZEN4HP_cjs = require('../chunk-LJZEN4HP.cjs');
5
- var chunkPK6SKIKE_cjs = require('../chunk-PK6SKIKE.cjs');
6
- var types = require('@storm-software/config-tools/types');
7
- var resolve = require('@stryke/fs/resolve');
8
- var joinPaths = require('@stryke/path/join-paths');
9
- var replace = require('@stryke/path/replace');
10
- var isFunction = require('@stryke/type-checks/is-function');
11
- var defu = require('defu');
12
- var typescript = require('typescript');
13
-
14
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
-
16
- var defu__default = /*#__PURE__*/_interopDefault(defu);
17
-
18
- function createVirtualSystem(context) {
19
- return {
20
- args: [],
21
- createDirectory: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((path) => {
22
- context.fs.mkdirSync(path);
23
- }, "createDirectory"),
24
- // TODO: could make a real file tree
25
- directoryExists: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((directoryName) => {
26
- return context.fs.existsSync(directoryName);
27
- }, "directoryExists"),
28
- exit: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name(() => {
29
- throw new Error("Not implemented: exit");
30
- }, "exit"),
31
- fileExists: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((fileName) => context.fs.existsSync(fileName), "fileExists"),
32
- getCurrentDirectory: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name(() => "/", "getCurrentDirectory"),
33
- getDirectories: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name(() => [], "getDirectories"),
34
- getExecutingFilePath: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name(() => {
35
- throw new Error("Not implemented: getExecutingFilePath");
36
- }, "getExecutingFilePath"),
37
- readDirectory: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((directoryName) => {
38
- return context.fs.readdirSync(directoryName);
39
- }, "readDirectory"),
40
- readFile: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((fileName) => {
41
- if (context.fs.existsSync(fileName)) {
42
- return context.fs.readFileSync(fileName);
43
- }
44
- return void 0;
45
- }, "readFile"),
46
- resolvePath: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((path) => context.fs.resolve(path) || path, "resolvePath"),
47
- newLine: "\n",
48
- useCaseSensitiveFileNames: true,
49
- write: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name(() => {
50
- throw new Error("Not implemented: write");
51
- }, "write"),
52
- writeFile: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((fileName, contents) => {
53
- context.fs.writeFileSync(fileName, contents);
54
- }, "writeFile"),
55
- deleteFile: /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((fileName) => {
56
- context.fs.unlinkSync(fileName);
57
- }, "deleteFile")
58
- };
59
- }
60
- chunkPK6SKIKE_cjs.__name(createVirtualSystem, "createVirtualSystem");
61
- function createCompilerHost(context, compilerOptions) {
62
- const host = typescript.createCompilerHost(compilerOptions);
63
- return {
64
- ...host,
65
- require(baseDir, moduleName) {
66
- const modulePath = context.fs.resolve(moduleName);
67
- if (modulePath) {
68
- return {
69
- module: context.fs.readFileSync(modulePath),
70
- modulePath,
71
- error: void 0
72
- };
73
- }
74
- if (isFunction.isFunction(typescript.sys?.require)) {
75
- return typescript.sys.require(baseDir, moduleName);
76
- }
77
- return {
78
- module: {},
79
- error: new Error(`Failed to resolve module '${moduleName}' from '${baseDir}' during TypeScript compilation. This is likely due to a missing dependency or an incorrect module path.`)
80
- };
81
- },
82
- getCanonicalFileName(fileName) {
83
- return context.fs.resolve(fileName) || host.getCanonicalFileName(fileName);
84
- },
85
- realpath(fileName) {
86
- return context.fs.resolve(fileName) || host.realpath?.(fileName);
87
- },
88
- fileExists(fileName) {
89
- if (context.fs.existsSync(fileName)) {
90
- return true;
91
- }
92
- if (fileName.includes("tsconfig.json")) {
93
- return false;
94
- }
95
- return host.fileExists(fileName);
96
- },
97
- readFile(fileName) {
98
- if (context.fs.existsSync(fileName)) {
99
- return context.fs.readFileSync(fileName);
100
- }
101
- return host.readFile(fileName);
102
- },
103
- writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
104
- context.fs.existsSync(fileName) ? context.fs.writeFileSync(fileName, text) : host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
105
- },
106
- getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
107
- const path = context.fs.resolve(fileName);
108
- if (path) {
109
- try {
110
- return typescript.createSourceFile(path, context.fs.readFileSync(path), languageVersionOrOptions ?? compilerOptions.target ?? chunkRLMEYZ5I_cjs.getDefaultCompilerOptions().target, false);
111
- } catch (error) {
112
- context.log(types.LogLevelLabel.ERROR, `Failed to create source file for '${fileName}': ${error.message}`);
113
- throw error;
114
- }
115
- }
116
- return host.getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
117
- }
118
- };
119
- }
120
- chunkPK6SKIKE_cjs.__name(createCompilerHost, "createCompilerHost");
121
- async function createProgram(context, fileNames, _options = {}) {
122
- context.log(types.LogLevelLabel.TRACE, "Adding TypeScript library files.");
123
- const typescriptPath = await resolve.resolvePackage("typescript");
124
- if (!typescriptPath) {
125
- throw new Error("Could not resolve TypeScript package location. Please ensure TypeScript is installed.");
126
- }
127
- const files = fileNames.reduce((ret, fileName) => {
128
- const formatted = replace.replacePath(fileName, context.workspaceConfig.workspaceRoot);
129
- if (!ret.includes(formatted)) {
130
- ret.push(formatted);
131
- }
132
- return ret;
133
- }, [
134
- joinPaths.joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")
135
- ]);
136
- context.log(types.LogLevelLabel.TRACE, "Parsing TypeScript configuration for the Powerlines project.");
137
- const resolvedTsconfig = chunkLJZEN4HP_cjs.getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.tsconfig.tsconfigFilePath, defu__default.default({
138
- compilerOptions: {
139
- strict: false,
140
- noEmit: false,
141
- declaration: true,
142
- declarationMap: false,
143
- emitDeclarationOnly: true,
144
- skipLibCheck: true
145
- },
146
- exclude: [
147
- "node_modules",
148
- "dist"
149
- ],
150
- include: fileNames
151
- }, context.config.tsconfigRaw ?? {}));
152
- resolvedTsconfig.options.configFilePath = joinPaths.joinPaths(context.workspaceConfig.workspaceRoot, context.tsconfig.tsconfigFilePath);
153
- resolvedTsconfig.options.pathsBasePath = context.workspaceConfig.workspaceRoot;
154
- resolvedTsconfig.options.suppressOutputPathCheck = true;
155
- context.log(types.LogLevelLabel.TRACE, "Creating the TypeScript compiler host");
156
- const host = createCompilerHost(context, resolvedTsconfig.options);
157
- context.log(types.LogLevelLabel.TRACE, "Creating the TypeScript compiler program");
158
- return typescript.createProgram(files, resolvedTsconfig.options, host);
159
- }
160
- chunkPK6SKIKE_cjs.__name(createProgram, "createProgram");
161
-
162
- exports.createCompilerHost = createCompilerHost;
163
- exports.createProgram = createProgram;
164
- exports.createVirtualSystem = createVirtualSystem;
165
- //# sourceMappingURL=compiler-host.cjs.map
166
- //# sourceMappingURL=compiler-host.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/typescript/compiler-host.ts"],"names":["createVirtualSystem","context","args","createDirectory","path","fs","mkdirSync","directoryExists","directoryName","existsSync","exit","__name","Error","fileExists","fileName","getCurrentDirectory","getDirectories","getExecutingFilePath","readDirectory","readdirSync","readFile","readFileSync","undefined","resolvePath","resolve","newLine","useCaseSensitiveFileNames","write","writeFile","contents","writeFileSync","deleteFile","unlinkSync","createCompilerHost","compilerOptions","host","createCompilerHostWorker","require","baseDir","moduleName","modulePath","module","error","isFunction","sys","getCanonicalFileName","realpath","includes","text","writeByteOrderMark","onError","sourceFiles","data","getSourceFile","languageVersionOrOptions","shouldCreateNewSourceFile","createSourceFile","target","getDefaultCompilerOptions","log","LogLevelLabel","ERROR","message","createProgram","fileNames","_options","TRACE","typescriptPath","resolvePackage","files","reduce","ret","formatted","replacePath","workspaceConfig","workspaceRoot","push","joinPaths","resolvedTsconfig","getParsedTypeScriptConfig","config","projectRoot","tsconfig","tsconfigFilePath","defu","strict","noEmit","declaration","declarationMap","emitDeclarationOnly","skipLibCheck","exclude","include","tsconfigRaw","options","configFilePath","pathsBasePath","suppressOutputPathCheck","createProgramWorker"],"mappings":";;;;;;;;;;;;;;;;;AAqEO,SAASA,oBAAoBC,OAAAA,EAAgB;AAClD,EAAA,OAAO;AACLC,IAAAA,IAAAA,EAAM,EAAA;AACNC,IAAAA,eAAAA,4CAAiBC,IAAAA,KAAAA;AACfH,MAAAA,OAAAA,CAAQI,EAAAA,CAAGC,UAAUF,IAAAA,CAAAA;IACvB,CAAA,EAFiBA,iBAAAA,CAAAA;;AAIjBG,IAAAA,eAAAA,4CAAkBC,aAAAA,KAAAA;AAChB,MAAA,OAAOP,OAAAA,CAAQI,EAAAA,CAAGI,UAAAA,CAAWD,aAAAA,CAAAA;IAC/B,CAAA,EAFiB,iBAAA,CAAA;AAGjBE,IAAAA,IAAAA,kBAAMC,wBAAA,CAAA,MAAA;AACJ,MAAA,MAAM,IAAIC,MAAM,uBAAA,CAAA;IAClB,CAAA,EAFM,MAAA,CAAA;AAGNC,IAAAA,UAAAA,4CAAYC,QAAAA,KAAYb,OAAAA,CAAQI,EAAAA,CAAGI,UAAAA,CAAWK,QAAAA,CAAAA,EAAlCA,YAAAA,CAAAA;AACZC,IAAAA,mBAAAA,iDAA2B,GAAA,EAAN,qBAAA,CAAA;IACrBC,cAAAA,kBAAgBL,wBAAA,CAAA,MAAM,EAAA,EAAN,gBAAA,CAAA;AAChBM,IAAAA,oBAAAA,kBAAsBN,wBAAA,CAAA,MAAA;AACpB,MAAA,MAAM,IAAIC,MAAM,u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BgB,OAAO,CAAA;AAEjE7F,EAAAA,OAAAA,CAAQ0D,GAAAA,CAAIC,mBAAAA,CAAcM,KAAAA,EAAO,0CAAA,CAAA;AAEjC,EAAA,OAAOgC,wBAAAA,CAAoB7B,KAAAA,EAAOS,gBAAAA,CAAiBgB,OAAAA,EAAS3D,IAAAA,CAAAA;AAC9D;AAtEsB4B,wBAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"compiler-host.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 { resolvePackage } from \"@stryke/fs/resolve\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport {\n CompilerHost,\n CompilerOptions,\n createCompilerHost as createCompilerHostWorker,\n createProgram as createProgramWorker,\n createSourceFile,\n CreateSourceFileOptions,\n Program,\n ScriptTarget,\n SourceFile,\n sys,\n System,\n WriteFileCallbackData\n} from \"typescript\";\nimport { Context } from \"../../types/context\";\nimport { getDefaultCompilerOptions } from \"./program\";\nimport { getParsedTypeScriptConfig } from \"./tsconfig\";\n\nexport type ModuleImportResult =\n | { module: unknown; error: undefined }\n | { module: undefined; error: { stack?: string; message?: string } };\n\nexport interface TypeScriptSystem extends System {\n require: (baseDir: string, moduleName: string) => ModuleImportResult;\n}\n\n// function getDefaultCompilerOptions(): CompilerOptions {\n// return {\n// ...tsGetDefaultCompilerOptions(),\n// jsx: JsxEmit.React,\n// strict: true,\n// esModuleInterop: true,\n// module: ModuleKind.ESNext,\n// suppressOutputPathCheck: true,\n// skipLibCheck: true,\n// skipDefaultLibCheck: true,\n// moduleResolution: ModuleResolutionKind.Node10\n// };\n// }\n\n/**\n * Creates an in-memory System object which can be used in a TypeScript program, this\n * is what provides read/write aspects of the virtual fs\n */\nexport function createVirtualSystem(context: Context): System {\n return {\n args: [],\n createDirectory: path => {\n context.fs.mkdirSync(path);\n },\n // TODO: could make a real file tree\n directoryExists: (directoryName: string): boolean => {\n return context.fs.existsSync(directoryName);\n },\n exit: () => {\n throw new Error(\"Not implemented: exit\");\n },\n fileExists: fileName => context.fs.existsSync(fileName),\n getCurrentDirectory: () => \"/\",\n getDirectories: () => [],\n getExecutingFilePath: () => {\n throw new Error(\"Not implemented: getExecutingFilePath\");\n },\n readDirectory: (directoryName: string): string[] => {\n return context.fs.readdirSync(directoryName);\n },\n readFile: (fileName: string): string | undefined => {\n if (context.fs.existsSync(fileName)) {\n return context.fs.readFileSync(fileName);\n }\n\n return undefined;\n },\n resolvePath: path => context.fs.resolve(path) || path,\n newLine: \"\\n\",\n useCaseSensitiveFileNames: true,\n write: () => {\n throw new Error(\"Not implemented: write\");\n },\n writeFile: (fileName, contents) => {\n context.fs.writeFileSync(fileName, contents);\n },\n deleteFile: fileName => {\n context.fs.unlinkSync(fileName);\n }\n };\n}\n\n/**\n * Creates a TypeScript compiler host that uses the virtual file system (VFS) from the provided context to resolve paths.\n *\n * @param context - The context containing the virtual file system.\n * @param compilerOptions - The TypeScript compiler options.\n * @returns A TypeScript compiler host with VFS path resolution.\n */\nexport function createCompilerHost(\n context: Context,\n compilerOptions: CompilerOptions\n): CompilerHost {\n const host = createCompilerHostWorker(compilerOptions);\n\n return {\n ...host,\n require(baseDir: string, moduleName: string) {\n const modulePath = context.fs.resolve(moduleName);\n if (modulePath) {\n return {\n module: context.fs.readFileSync(modulePath),\n modulePath,\n error: undefined\n };\n }\n\n if (isFunction((sys as TypeScriptSystem)?.require)) {\n return (sys as TypeScriptSystem).require(baseDir, moduleName);\n }\n\n return {\n module: {},\n error: new Error(\n `Failed to resolve module '${moduleName}' from '${\n baseDir\n }' during TypeScript compilation. This is likely due to a missing dependency or an incorrect module path.`\n )\n };\n },\n getCanonicalFileName(fileName: string): string {\n return (\n context.fs.resolve(fileName) || host.getCanonicalFileName(fileName)\n );\n },\n realpath(fileName: string) {\n return context.fs.resolve(fileName) || host.realpath?.(fileName);\n },\n fileExists(fileName: string): boolean {\n if (context.fs.existsSync(fileName)) {\n return true;\n }\n\n if (fileName.includes(\"tsconfig.json\")) {\n return false;\n }\n\n return host.fileExists(fileName);\n },\n readFile(fileName: string): string | undefined {\n if (context.fs.existsSync(fileName)) {\n return context.fs.readFileSync(fileName);\n }\n\n return host.readFile(fileName);\n },\n writeFile(\n fileName: string,\n text: string,\n writeByteOrderMark: boolean,\n onError?: ((message: string) => void) | undefined,\n sourceFiles?: readonly SourceFile[] | undefined,\n data?: WriteFileCallbackData\n ): void {\n context.fs.existsSync(fileName)\n ? context.fs.writeFileSync(fileName, text)\n : host.writeFile(\n fileName,\n text,\n writeByteOrderMark,\n onError,\n sourceFiles,\n data\n );\n },\n getSourceFile(\n fileName: string,\n languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions,\n onError?: (message: string) => void,\n shouldCreateNewSourceFile?: boolean\n ): SourceFile | undefined {\n const path = context.fs.resolve(fileName);\n if (path) {\n try {\n return createSourceFile(\n path,\n context.fs.readFileSync(path)!,\n languageVersionOrOptions ??\n compilerOptions.target ??\n getDefaultCompilerOptions().target!,\n false\n );\n } catch (error: unknown) {\n context.log(\n LogLevelLabel.ERROR,\n `Failed to create source file for '${fileName}': ${\n (error as Error).message\n }`\n );\n throw error;\n }\n }\n\n return host.getSourceFile(\n fileName,\n languageVersionOrOptions,\n onError,\n shouldCreateNewSourceFile\n );\n }\n } as CompilerHost;\n}\n\nexport async function createProgram(\n context: Context,\n fileNames: string[],\n _options: Partial<CompilerOptions> = {}\n): Promise<Program> {\n context.log(LogLevelLabel.TRACE, \"Adding TypeScript library files.\");\n\n const typescriptPath = await resolvePackage(\"typescript\");\n if (!typescriptPath) {\n throw new Error(\n \"Could not resolve TypeScript package location. Please ensure TypeScript is installed.\"\n );\n }\n\n const files = fileNames.reduce<string[]>(\n (ret, fileName) => {\n const formatted = replacePath(\n fileName,\n context.workspaceConfig.workspaceRoot\n );\n if (!ret.includes(formatted)) {\n ret.push(formatted);\n }\n\n return ret;\n },\n [joinPaths(typescriptPath, \"lib\", \"lib.esnext.full.d.ts\")]\n );\n\n context.log(\n LogLevelLabel.TRACE,\n \"Parsing TypeScript configuration for the Powerlines project.\"\n );\n\n const resolvedTsconfig = getParsedTypeScriptConfig(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n context.tsconfig.tsconfigFilePath,\n defu(\n {\n compilerOptions: {\n strict: false,\n noEmit: false,\n declaration: true,\n declarationMap: false,\n emitDeclarationOnly: true,\n skipLibCheck: true\n },\n exclude: [\"node_modules\", \"dist\"],\n include: fileNames\n },\n context.config.tsconfigRaw ?? {}\n ) as TsConfigJson\n );\n resolvedTsconfig.options.configFilePath = joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.tsconfig.tsconfigFilePath\n );\n resolvedTsconfig.options.pathsBasePath =\n context.workspaceConfig.workspaceRoot;\n resolvedTsconfig.options.suppressOutputPathCheck = true;\n\n context.log(LogLevelLabel.TRACE, \"Creating the TypeScript compiler host\");\n\n // const host = createCompilerHostWorker(resolvedTsconfig.options);\n const host = createCompilerHost(context, resolvedTsconfig.options);\n\n context.log(LogLevelLabel.TRACE, \"Creating the TypeScript compiler program\");\n\n return createProgramWorker(files, resolvedTsconfig.options, host);\n}\n"]}
@@ -1,64 +0,0 @@
1
- import { System, CompilerOptions, CompilerHost, Program } from 'typescript';
2
- import { C as Context } from '../config-Ro14HmyO.cjs';
3
- import '@storm-software/build-tools/types';
4
- import '@storm-software/config-tools/types';
5
- import '@storm-software/config/types';
6
- import '@stryke/types/base';
7
- import '@stryke/types/configuration';
8
- import '@stryke/types/file';
9
- import 'c12';
10
- import 'vite';
11
- import '@farmfe/core';
12
- import '@rspack/core';
13
- import '@storm-software/esbuild/types';
14
- import '@storm-software/unbuild/types';
15
- import 'esbuild';
16
- import 'rolldown';
17
- import 'rollup';
18
- import 'webpack';
19
- import '@stryke/env/get-env-paths';
20
- import '@stryke/types/package-json';
21
- import 'jest-worker';
22
- import 'jiti';
23
- import 'oxc-parser';
24
- import 'semver';
25
- import 'unplugin';
26
- import '@stryke/types/array';
27
- import '../tsconfig-Bz-CiFqD.cjs';
28
- import '@stryke/types/tsconfig';
29
- import '@stryke/json/types';
30
- import 'memfs';
31
- import 'node:fs';
32
- import 'unionfs';
33
-
34
- type ModuleImportResult = {
35
- module: unknown;
36
- error: undefined;
37
- } | {
38
- module: undefined;
39
- error: {
40
- stack?: string;
41
- message?: string;
42
- };
43
- };
44
- interface TypeScriptSystem extends System {
45
- require: (baseDir: string, moduleName: string) => ModuleImportResult;
46
- }
47
- /**
48
- * Creates an in-memory System object which can be used in a TypeScript program, this
49
- * is what provides read/write aspects of the virtual fs
50
- */
51
- declare function createVirtualSystem(context: Context): System;
52
- /**
53
- * Creates a TypeScript compiler host that uses the virtual file system (VFS) from the provided context to resolve paths.
54
- *
55
- * @param context - The context containing the virtual file system.
56
- * @param compilerOptions - The TypeScript compiler options.
57
- * @returns A TypeScript compiler host with VFS path resolution.
58
- */
59
- declare function createCompilerHost(context: Context, compilerOptions: CompilerOptions): CompilerHost;
60
- declare function createProgram(context: Context, fileNames: string[], _options?: Partial<CompilerOptions>): Promise<Program>;
61
- declare type __ΩModuleImportResult = any[];
62
- declare type __ΩTypeScriptSystem = any[];
63
-
64
- export { type ModuleImportResult, type TypeScriptSystem, type __ΩModuleImportResult, type __ΩTypeScriptSystem, createCompilerHost, createProgram, createVirtualSystem };
@@ -1,64 +0,0 @@
1
- import { System, CompilerOptions, CompilerHost, Program } from 'typescript';
2
- import { C as Context } from '../config-DnifzkPt.js';
3
- import '@storm-software/build-tools/types';
4
- import '@storm-software/config-tools/types';
5
- import '@storm-software/config/types';
6
- import '@stryke/types/base';
7
- import '@stryke/types/configuration';
8
- import '@stryke/types/file';
9
- import 'c12';
10
- import 'vite';
11
- import '@farmfe/core';
12
- import '@rspack/core';
13
- import '@storm-software/esbuild/types';
14
- import '@storm-software/unbuild/types';
15
- import 'esbuild';
16
- import 'rolldown';
17
- import 'rollup';
18
- import 'webpack';
19
- import '@stryke/env/get-env-paths';
20
- import '@stryke/types/package-json';
21
- import 'jest-worker';
22
- import 'jiti';
23
- import 'oxc-parser';
24
- import 'semver';
25
- import 'unplugin';
26
- import '@stryke/types/array';
27
- import '../tsconfig-Bz-CiFqD.js';
28
- import '@stryke/types/tsconfig';
29
- import '@stryke/json/types';
30
- import 'memfs';
31
- import 'node:fs';
32
- import 'unionfs';
33
-
34
- type ModuleImportResult = {
35
- module: unknown;
36
- error: undefined;
37
- } | {
38
- module: undefined;
39
- error: {
40
- stack?: string;
41
- message?: string;
42
- };
43
- };
44
- interface TypeScriptSystem extends System {
45
- require: (baseDir: string, moduleName: string) => ModuleImportResult;
46
- }
47
- /**
48
- * Creates an in-memory System object which can be used in a TypeScript program, this
49
- * is what provides read/write aspects of the virtual fs
50
- */
51
- declare function createVirtualSystem(context: Context): System;
52
- /**
53
- * Creates a TypeScript compiler host that uses the virtual file system (VFS) from the provided context to resolve paths.
54
- *
55
- * @param context - The context containing the virtual file system.
56
- * @param compilerOptions - The TypeScript compiler options.
57
- * @returns A TypeScript compiler host with VFS path resolution.
58
- */
59
- declare function createCompilerHost(context: Context, compilerOptions: CompilerOptions): CompilerHost;
60
- declare function createProgram(context: Context, fileNames: string[], _options?: Partial<CompilerOptions>): Promise<Program>;
61
- declare type __ΩModuleImportResult = any[];
62
- declare type __ΩTypeScriptSystem = any[];
63
-
64
- export { type ModuleImportResult, type TypeScriptSystem, type __ΩModuleImportResult, type __ΩTypeScriptSystem, createCompilerHost, createProgram, createVirtualSystem };
@@ -1,158 +0,0 @@
1
- import { getDefaultCompilerOptions } from '../chunk-V2T4H24I.js';
2
- import { getParsedTypeScriptConfig } from '../chunk-OO4BIM7N.js';
3
- import { __name } from '../chunk-7QVYU63E.js';
4
- import { LogLevelLabel } from '@storm-software/config-tools/types';
5
- import { resolvePackage } from '@stryke/fs/resolve';
6
- import { joinPaths } from '@stryke/path/join-paths';
7
- import { replacePath } from '@stryke/path/replace';
8
- import { isFunction } from '@stryke/type-checks/is-function';
9
- import defu from 'defu';
10
- import { createCompilerHost as createCompilerHost$1, createSourceFile, sys, createProgram as createProgram$1 } from 'typescript';
11
-
12
- function createVirtualSystem(context) {
13
- return {
14
- args: [],
15
- createDirectory: /* @__PURE__ */ __name((path) => {
16
- context.fs.mkdirSync(path);
17
- }, "createDirectory"),
18
- // TODO: could make a real file tree
19
- directoryExists: /* @__PURE__ */ __name((directoryName) => {
20
- return context.fs.existsSync(directoryName);
21
- }, "directoryExists"),
22
- exit: /* @__PURE__ */ __name(() => {
23
- throw new Error("Not implemented: exit");
24
- }, "exit"),
25
- fileExists: /* @__PURE__ */ __name((fileName) => context.fs.existsSync(fileName), "fileExists"),
26
- getCurrentDirectory: /* @__PURE__ */ __name(() => "/", "getCurrentDirectory"),
27
- getDirectories: /* @__PURE__ */ __name(() => [], "getDirectories"),
28
- getExecutingFilePath: /* @__PURE__ */ __name(() => {
29
- throw new Error("Not implemented: getExecutingFilePath");
30
- }, "getExecutingFilePath"),
31
- readDirectory: /* @__PURE__ */ __name((directoryName) => {
32
- return context.fs.readdirSync(directoryName);
33
- }, "readDirectory"),
34
- readFile: /* @__PURE__ */ __name((fileName) => {
35
- if (context.fs.existsSync(fileName)) {
36
- return context.fs.readFileSync(fileName);
37
- }
38
- return void 0;
39
- }, "readFile"),
40
- resolvePath: /* @__PURE__ */ __name((path) => context.fs.resolve(path) || path, "resolvePath"),
41
- newLine: "\n",
42
- useCaseSensitiveFileNames: true,
43
- write: /* @__PURE__ */ __name(() => {
44
- throw new Error("Not implemented: write");
45
- }, "write"),
46
- writeFile: /* @__PURE__ */ __name((fileName, contents) => {
47
- context.fs.writeFileSync(fileName, contents);
48
- }, "writeFile"),
49
- deleteFile: /* @__PURE__ */ __name((fileName) => {
50
- context.fs.unlinkSync(fileName);
51
- }, "deleteFile")
52
- };
53
- }
54
- __name(createVirtualSystem, "createVirtualSystem");
55
- function createCompilerHost(context, compilerOptions) {
56
- const host = createCompilerHost$1(compilerOptions);
57
- return {
58
- ...host,
59
- require(baseDir, moduleName) {
60
- const modulePath = context.fs.resolve(moduleName);
61
- if (modulePath) {
62
- return {
63
- module: context.fs.readFileSync(modulePath),
64
- modulePath,
65
- error: void 0
66
- };
67
- }
68
- if (isFunction(sys?.require)) {
69
- return sys.require(baseDir, moduleName);
70
- }
71
- return {
72
- module: {},
73
- error: new Error(`Failed to resolve module '${moduleName}' from '${baseDir}' during TypeScript compilation. This is likely due to a missing dependency or an incorrect module path.`)
74
- };
75
- },
76
- getCanonicalFileName(fileName) {
77
- return context.fs.resolve(fileName) || host.getCanonicalFileName(fileName);
78
- },
79
- realpath(fileName) {
80
- return context.fs.resolve(fileName) || host.realpath?.(fileName);
81
- },
82
- fileExists(fileName) {
83
- if (context.fs.existsSync(fileName)) {
84
- return true;
85
- }
86
- if (fileName.includes("tsconfig.json")) {
87
- return false;
88
- }
89
- return host.fileExists(fileName);
90
- },
91
- readFile(fileName) {
92
- if (context.fs.existsSync(fileName)) {
93
- return context.fs.readFileSync(fileName);
94
- }
95
- return host.readFile(fileName);
96
- },
97
- writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
98
- context.fs.existsSync(fileName) ? context.fs.writeFileSync(fileName, text) : host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
99
- },
100
- getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
101
- const path = context.fs.resolve(fileName);
102
- if (path) {
103
- try {
104
- return createSourceFile(path, context.fs.readFileSync(path), languageVersionOrOptions ?? compilerOptions.target ?? getDefaultCompilerOptions().target, false);
105
- } catch (error) {
106
- context.log(LogLevelLabel.ERROR, `Failed to create source file for '${fileName}': ${error.message}`);
107
- throw error;
108
- }
109
- }
110
- return host.getSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile);
111
- }
112
- };
113
- }
114
- __name(createCompilerHost, "createCompilerHost");
115
- async function createProgram(context, fileNames, _options = {}) {
116
- context.log(LogLevelLabel.TRACE, "Adding TypeScript library files.");
117
- const typescriptPath = await resolvePackage("typescript");
118
- if (!typescriptPath) {
119
- throw new Error("Could not resolve TypeScript package location. Please ensure TypeScript is installed.");
120
- }
121
- const files = fileNames.reduce((ret, fileName) => {
122
- const formatted = replacePath(fileName, context.workspaceConfig.workspaceRoot);
123
- if (!ret.includes(formatted)) {
124
- ret.push(formatted);
125
- }
126
- return ret;
127
- }, [
128
- joinPaths(typescriptPath, "lib", "lib.esnext.full.d.ts")
129
- ]);
130
- context.log(LogLevelLabel.TRACE, "Parsing TypeScript configuration for the Powerlines project.");
131
- const resolvedTsconfig = getParsedTypeScriptConfig(context.workspaceConfig.workspaceRoot, context.config.projectRoot, context.tsconfig.tsconfigFilePath, defu({
132
- compilerOptions: {
133
- strict: false,
134
- noEmit: false,
135
- declaration: true,
136
- declarationMap: false,
137
- emitDeclarationOnly: true,
138
- skipLibCheck: true
139
- },
140
- exclude: [
141
- "node_modules",
142
- "dist"
143
- ],
144
- include: fileNames
145
- }, context.config.tsconfigRaw ?? {}));
146
- resolvedTsconfig.options.configFilePath = joinPaths(context.workspaceConfig.workspaceRoot, context.tsconfig.tsconfigFilePath);
147
- resolvedTsconfig.options.pathsBasePath = context.workspaceConfig.workspaceRoot;
148
- resolvedTsconfig.options.suppressOutputPathCheck = true;
149
- context.log(LogLevelLabel.TRACE, "Creating the TypeScript compiler host");
150
- const host = createCompilerHost(context, resolvedTsconfig.options);
151
- context.log(LogLevelLabel.TRACE, "Creating the TypeScript compiler program");
152
- return createProgram$1(files, resolvedTsconfig.options, host);
153
- }
154
- __name(createProgram, "createProgram");
155
-
156
- export { createCompilerHost, createProgram, createVirtualSystem };
157
- //# sourceMappingURL=compiler-host.js.map
158
- //# sourceMappingURL=compiler-host.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/lib/typescript/compiler-host.ts"],"names":["createVirtualSystem","context","args","createDirectory","path","fs","mkdirSync","directoryExists","directoryName","existsSync","exit","Error","fileExists","fileName","getCurrentDirectory","getDirectories","getExecutingFilePath","readDirectory","readdirSync","readFile","readFileSync","undefined","resolvePath","resolve","newLine","useCaseSensitiveFileNames","write","writeFile","contents","writeFileSync","deleteFile","unlinkSync","createCompilerHost","compilerOptions","host","createCompilerHostWorker","require","baseDir","moduleName","modulePath","module","error","isFunction","sys","getCanonicalFileName","realpath","includes","text","writeByteOrderMark","onError","sourceFiles","data","getSourceFile","languageVersionOrOptions","shouldCreateNewSourceFile","createSourceFile","target","getDefaultCompilerOptions","log","LogLevelLabel","ERROR","message","createProgram","fileNames","_options","TRACE","typescriptPath","resolvePackage","files","reduce","ret","formatted","replacePath","workspaceConfig","workspaceRoot","push","joinPaths","resolvedTsconfig","getParsedTypeScriptConfig","config","projectRoot","tsconfig","tsconfigFilePath","defu","strict","noEmit","declaration","declarationMap","emitDeclarationOnly","skipLibCheck","exclude","include","tsconfigRaw","options","configFilePath","pathsBasePath","suppressOutputPathCheck","createProgramWorker"],"mappings":";;;;;;;;;;;AAqEO,SAASA,oBAAoBC,OAAAA,EAAgB;AAClD,EAAA,OAAO;AACLC,IAAAA,IAAAA,EAAM,EAAA;AACNC,IAAAA,eAAAA,0BAAiBC,IAAAA,KAAAA;AACfH,MAAAA,OAAAA,CAAQI,EAAAA,CAAGC,UAAUF,IAAAA,CAAAA;IACvB,CAAA,EAFiBA,iBAAAA,CAAAA;;AAIjBG,IAAAA,eAAAA,0BAAkBC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A,EACA9D,OAAAA,CAAQ8E,MAAAA,CAAOa,WAAAA,IAAe,EAAC,CAAA,CAAA;AAGnCf,EAAAA,gBAAAA,CAAiBgB,OAAAA,CAAQC,iBAAiBlB,SAAAA,CACxC3E,OAAAA,CAAQwE,gBAAgBC,aAAAA,EACxBzE,OAAAA,CAAQgF,SAASC,gBAAgB,CAAA;AAEnCL,EAAAA,gBAAAA,CAAiBgB,OAAAA,CAAQE,aAAAA,GACvB9F,OAAAA,CAAQwE,eAAAA,CAAgBC,aAAAA;AAC1BG,EAAAA,gBAAAA,CAAiBgB,QAAQG,uBAAAA,GAA0B,IAAA;AAEnD/F,EAAAA,OAAAA,CAAQyD,GAAAA,CAAIC,aAAAA,CAAcM,KAAAA,EAAO,uCAAA,CAAA;AAGjC,EAAA,MAAM/B,IAAAA,GAAOF,kBAAAA,CAAmB/B,OAAAA,EAAS4E,gBAAAA,CAAiBgB,OAAO,CAAA;AAEjE5F,EAAAA,OAAAA,CAAQyD,GAAAA,CAAIC,aAAAA,CAAcM,KAAAA,EAAO,0CAAA,CAAA;AAEjC,EAAA,OAAOgC,eAAAA,CAAoB7B,KAAAA,EAAOS,gBAAAA,CAAiBgB,OAAAA,EAAS3D,IAAAA,CAAAA;AAC9D;AAtEsB4B,MAAAA,CAAAA,aAAAA,EAAAA,eAAAA,CAAAA","file":"compiler-host.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 { LogLevelLabel } from \"@storm-software/config-tools/types\";\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { TsConfigJson } from \"@stryke/types/tsconfig\";\nimport defu from \"defu\";\nimport {\n CompilerHost,\n CompilerOptions,\n createCompilerHost as createCompilerHostWorker,\n createProgram as createProgramWorker,\n createSourceFile,\n CreateSourceFileOptions,\n Program,\n ScriptTarget,\n SourceFile,\n sys,\n System,\n WriteFileCallbackData\n} from \"typescript\";\nimport { Context } from \"../../types/context\";\nimport { getDefaultCompilerOptions } from \"./program\";\nimport { getParsedTypeScriptConfig } from \"./tsconfig\";\n\nexport type ModuleImportResult =\n | { module: unknown; error: undefined }\n | { module: undefined; error: { stack?: string; message?: string } };\n\nexport interface TypeScriptSystem extends System {\n require: (baseDir: string, moduleName: string) => ModuleImportResult;\n}\n\n// function getDefaultCompilerOptions(): CompilerOptions {\n// return {\n// ...tsGetDefaultCompilerOptions(),\n// jsx: JsxEmit.React,\n// strict: true,\n// esModuleInterop: true,\n// module: ModuleKind.ESNext,\n// suppressOutputPathCheck: true,\n// skipLibCheck: true,\n// skipDefaultLibCheck: true,\n// moduleResolution: ModuleResolutionKind.Node10\n// };\n// }\n\n/**\n * Creates an in-memory System object which can be used in a TypeScript program, this\n * is what provides read/write aspects of the virtual fs\n */\nexport function createVirtualSystem(context: Context): System {\n return {\n args: [],\n createDirectory: path => {\n context.fs.mkdirSync(path);\n },\n // TODO: could make a real file tree\n directoryExists: (directoryName: string): boolean => {\n return context.fs.existsSync(directoryName);\n },\n exit: () => {\n throw new Error(\"Not implemented: exit\");\n },\n fileExists: fileName => context.fs.existsSync(fileName),\n getCurrentDirectory: () => \"/\",\n getDirectories: () => [],\n getExecutingFilePath: () => {\n throw new Error(\"Not implemented: getExecutingFilePath\");\n },\n readDirectory: (directoryName: string): string[] => {\n return context.fs.readdirSync(directoryName);\n },\n readFile: (fileName: string): string | undefined => {\n if (context.fs.existsSync(fileName)) {\n return context.fs.readFileSync(fileName);\n }\n\n return undefined;\n },\n resolvePath: path => context.fs.resolve(path) || path,\n newLine: \"\\n\",\n useCaseSensitiveFileNames: true,\n write: () => {\n throw new Error(\"Not implemented: write\");\n },\n writeFile: (fileName, contents) => {\n context.fs.writeFileSync(fileName, contents);\n },\n deleteFile: fileName => {\n context.fs.unlinkSync(fileName);\n }\n };\n}\n\n/**\n * Creates a TypeScript compiler host that uses the virtual file system (VFS) from the provided context to resolve paths.\n *\n * @param context - The context containing the virtual file system.\n * @param compilerOptions - The TypeScript compiler options.\n * @returns A TypeScript compiler host with VFS path resolution.\n */\nexport function createCompilerHost(\n context: Context,\n compilerOptions: CompilerOptions\n): CompilerHost {\n const host = createCompilerHostWorker(compilerOptions);\n\n return {\n ...host,\n require(baseDir: string, moduleName: string) {\n const modulePath = context.fs.resolve(moduleName);\n if (modulePath) {\n return {\n module: context.fs.readFileSync(modulePath),\n modulePath,\n error: undefined\n };\n }\n\n if (isFunction((sys as TypeScriptSystem)?.require)) {\n return (sys as TypeScriptSystem).require(baseDir, moduleName);\n }\n\n return {\n module: {},\n error: new Error(\n `Failed to resolve module '${moduleName}' from '${\n baseDir\n }' during TypeScript compilation. This is likely due to a missing dependency or an incorrect module path.`\n )\n };\n },\n getCanonicalFileName(fileName: string): string {\n return (\n context.fs.resolve(fileName) || host.getCanonicalFileName(fileName)\n );\n },\n realpath(fileName: string) {\n return context.fs.resolve(fileName) || host.realpath?.(fileName);\n },\n fileExists(fileName: string): boolean {\n if (context.fs.existsSync(fileName)) {\n return true;\n }\n\n if (fileName.includes(\"tsconfig.json\")) {\n return false;\n }\n\n return host.fileExists(fileName);\n },\n readFile(fileName: string): string | undefined {\n if (context.fs.existsSync(fileName)) {\n return context.fs.readFileSync(fileName);\n }\n\n return host.readFile(fileName);\n },\n writeFile(\n fileName: string,\n text: string,\n writeByteOrderMark: boolean,\n onError?: ((message: string) => void) | undefined,\n sourceFiles?: readonly SourceFile[] | undefined,\n data?: WriteFileCallbackData\n ): void {\n context.fs.existsSync(fileName)\n ? context.fs.writeFileSync(fileName, text)\n : host.writeFile(\n fileName,\n text,\n writeByteOrderMark,\n onError,\n sourceFiles,\n data\n );\n },\n getSourceFile(\n fileName: string,\n languageVersionOrOptions: ScriptTarget | CreateSourceFileOptions,\n onError?: (message: string) => void,\n shouldCreateNewSourceFile?: boolean\n ): SourceFile | undefined {\n const path = context.fs.resolve(fileName);\n if (path) {\n try {\n return createSourceFile(\n path,\n context.fs.readFileSync(path)!,\n languageVersionOrOptions ??\n compilerOptions.target ??\n getDefaultCompilerOptions().target!,\n false\n );\n } catch (error: unknown) {\n context.log(\n LogLevelLabel.ERROR,\n `Failed to create source file for '${fileName}': ${\n (error as Error).message\n }`\n );\n throw error;\n }\n }\n\n return host.getSourceFile(\n fileName,\n languageVersionOrOptions,\n onError,\n shouldCreateNewSourceFile\n );\n }\n } as CompilerHost;\n}\n\nexport async function createProgram(\n context: Context,\n fileNames: string[],\n _options: Partial<CompilerOptions> = {}\n): Promise<Program> {\n context.log(LogLevelLabel.TRACE, \"Adding TypeScript library files.\");\n\n const typescriptPath = await resolvePackage(\"typescript\");\n if (!typescriptPath) {\n throw new Error(\n \"Could not resolve TypeScript package location. Please ensure TypeScript is installed.\"\n );\n }\n\n const files = fileNames.reduce<string[]>(\n (ret, fileName) => {\n const formatted = replacePath(\n fileName,\n context.workspaceConfig.workspaceRoot\n );\n if (!ret.includes(formatted)) {\n ret.push(formatted);\n }\n\n return ret;\n },\n [joinPaths(typescriptPath, \"lib\", \"lib.esnext.full.d.ts\")]\n );\n\n context.log(\n LogLevelLabel.TRACE,\n \"Parsing TypeScript configuration for the Powerlines project.\"\n );\n\n const resolvedTsconfig = getParsedTypeScriptConfig(\n context.workspaceConfig.workspaceRoot,\n context.config.projectRoot,\n context.tsconfig.tsconfigFilePath,\n defu(\n {\n compilerOptions: {\n strict: false,\n noEmit: false,\n declaration: true,\n declarationMap: false,\n emitDeclarationOnly: true,\n skipLibCheck: true\n },\n exclude: [\"node_modules\", \"dist\"],\n include: fileNames\n },\n context.config.tsconfigRaw ?? {}\n ) as TsConfigJson\n );\n resolvedTsconfig.options.configFilePath = joinPaths(\n context.workspaceConfig.workspaceRoot,\n context.tsconfig.tsconfigFilePath\n );\n resolvedTsconfig.options.pathsBasePath =\n context.workspaceConfig.workspaceRoot;\n resolvedTsconfig.options.suppressOutputPathCheck = true;\n\n context.log(LogLevelLabel.TRACE, \"Creating the TypeScript compiler host\");\n\n // const host = createCompilerHostWorker(resolvedTsconfig.options);\n const host = createCompilerHost(context, resolvedTsconfig.options);\n\n context.log(LogLevelLabel.TRACE, \"Creating the TypeScript compiler program\");\n\n return createProgramWorker(files, resolvedTsconfig.options, host);\n}\n"]}
@@ -1,51 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkPK6SKIKE_cjs = require('../chunk-PK6SKIKE.cjs');
4
- var typescript = require('typescript');
5
-
6
- function isDynamicImport(node) {
7
- return typescript.isCallExpression(node) && node.expression.kind === typescript.SyntaxKind.ImportKeyword;
8
- }
9
- chunkPK6SKIKE_cjs.__name(isDynamicImport, "isDynamicImport");
10
- function createImportTransformer(context) {
11
- return (ctx) => {
12
- return (sourceFile) => {
13
- const visitor = /* @__PURE__ */ chunkPK6SKIKE_cjs.__name((node) => {
14
- let importPath;
15
- if ((typescript.isImportDeclaration(node) || typescript.isExportDeclaration(node)) && node.moduleSpecifier) {
16
- const importPathWithQuotes = node.moduleSpecifier.getText(sourceFile);
17
- importPath = importPathWithQuotes.substr(1, importPathWithQuotes.length - 2);
18
- } else if (isDynamicImport(node)) {
19
- const importPathWithQuotes = node.arguments[0].getText(sourceFile);
20
- importPath = importPathWithQuotes.substr(1, importPathWithQuotes.length - 2);
21
- } else if (typescript.isImportTypeNode(node) && typescript.isLiteralTypeNode(node.argument) && typescript.isStringLiteral(node.argument.literal)) {
22
- importPath = node.argument.literal.text;
23
- }
24
- if (importPath) {
25
- const resolvedImportPath = context.fs.resolve(importPath) || importPath;
26
- if (resolvedImportPath !== importPath) {
27
- if (typescript.isImportDeclaration(node)) {
28
- return ctx.factory.updateImportDeclaration(node, node.modifiers, node.importClause, ctx.factory.createStringLiteral(resolvedImportPath), node.attributes);
29
- } else if (typescript.isExportDeclaration(node)) {
30
- return ctx.factory.updateExportDeclaration(node, node.modifiers, node.isTypeOnly, node.exportClause, ctx.factory.createStringLiteral(resolvedImportPath), node.attributes);
31
- } else if (isDynamicImport(node)) {
32
- return ctx.factory.updateCallExpression(node, node.expression, node.typeArguments, ctx.factory.createNodeArray([
33
- ctx.factory.createStringLiteral(resolvedImportPath)
34
- ]));
35
- } else if (typescript.isImportTypeNode(node)) {
36
- return ctx.factory.updateImportTypeNode(node, ctx.factory.createLiteralTypeNode(ctx.factory.createStringLiteral(resolvedImportPath)), node.attributes, node.qualifier, node.typeArguments, node.isTypeOf);
37
- }
38
- }
39
- return node;
40
- }
41
- return typescript.visitEachChild(node, visitor, ctx);
42
- }, "visitor");
43
- return typescript.visitNode(sourceFile, visitor);
44
- };
45
- };
46
- }
47
- chunkPK6SKIKE_cjs.__name(createImportTransformer, "createImportTransformer");
48
-
49
- exports.createImportTransformer = createImportTransformer;
50
- //# sourceMappingURL=import-transformer.cjs.map
51
- //# sourceMappingURL=import-transformer.cjs.map