@powerlines/core 0.48.27 → 0.48.29

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 (641) hide show
  1. package/dist/api-DTCbbtSH.d.cts +6 -0
  2. package/dist/api-DTCbbtSH.d.cts.map +1 -0
  3. package/dist/api-DTCbbtSH.d.mts +6 -0
  4. package/dist/api-DTCbbtSH.d.mts.map +1 -0
  5. package/dist/base-context-BmxgDD3S.d.mts +79 -0
  6. package/dist/base-context-BmxgDD3S.d.mts.map +1 -0
  7. package/dist/base-context-mHoSEqHf.d.cts +79 -0
  8. package/dist/base-context-mHoSEqHf.d.cts.map +1 -0
  9. package/dist/{_virtual/_rolldown/runtime.cjs → chunk-C_NdSu1c.cjs} +6 -9
  10. package/dist/commands-DzGd8pnR.d.cts +5 -0
  11. package/dist/commands-DzGd8pnR.d.cts.map +1 -0
  12. package/dist/commands-DzGd8pnR.d.mts +5 -0
  13. package/dist/commands-DzGd8pnR.d.mts.map +1 -0
  14. package/dist/config-BnV_o0Es.d.cts +2461 -0
  15. package/dist/config-BnV_o0Es.d.cts.map +1 -0
  16. package/dist/config-DKeDSykZ.d.cts +138 -0
  17. package/dist/config-DKeDSykZ.d.cts.map +1 -0
  18. package/dist/config-DbOP5nVu.d.mts +138 -0
  19. package/dist/config-DbOP5nVu.d.mts.map +1 -0
  20. package/dist/config-DboKmDhl.d.mts +2461 -0
  21. package/dist/config-DboKmDhl.d.mts.map +1 -0
  22. package/dist/constants/api.cjs +0 -8
  23. package/dist/constants/api.d.cts +2 -6
  24. package/dist/constants/api.d.mts +2 -8
  25. package/dist/constants/api.mjs +0 -8
  26. package/dist/constants/api.mjs.map +1 -1
  27. package/dist/constants/commands.cjs +0 -8
  28. package/dist/constants/commands.d.cts +2 -5
  29. package/dist/constants/commands.d.mts +2 -7
  30. package/dist/constants/commands.mjs +0 -8
  31. package/dist/constants/commands.mjs.map +1 -1
  32. package/dist/constants/devtools.cjs +0 -8
  33. package/dist/constants/devtools.d.cts +2 -13
  34. package/dist/constants/devtools.d.mts +2 -15
  35. package/dist/constants/devtools.mjs +0 -8
  36. package/dist/constants/devtools.mjs.map +1 -1
  37. package/dist/constants/environments.cjs +0 -8
  38. package/dist/constants/environments.d.cts +2 -10
  39. package/dist/constants/environments.d.mts +2 -12
  40. package/dist/constants/environments.mjs +0 -8
  41. package/dist/constants/environments.mjs.map +1 -1
  42. package/dist/constants/extensions.cjs +0 -8
  43. package/dist/constants/extensions.d.cts +2 -5
  44. package/dist/constants/extensions.d.mts +2 -7
  45. package/dist/constants/extensions.mjs +0 -8
  46. package/dist/constants/extensions.mjs.map +1 -1
  47. package/dist/constants/fs.cjs +0 -8
  48. package/dist/constants/fs.d.cts +2 -7
  49. package/dist/constants/fs.d.mts +2 -9
  50. package/dist/constants/fs.mjs +0 -8
  51. package/dist/constants/fs.mjs.map +1 -1
  52. package/dist/constants/hooks.cjs +0 -8
  53. package/dist/constants/hooks.d.cts +2 -5
  54. package/dist/constants/hooks.d.mts +2 -7
  55. package/dist/constants/hooks.mjs +0 -8
  56. package/dist/constants/hooks.mjs.map +1 -1
  57. package/dist/constants/index.cjs +0 -8
  58. package/dist/constants/index.d.cts +10 -10
  59. package/dist/constants/index.d.mts +10 -12
  60. package/dist/constants/index.mjs +0 -8
  61. package/dist/constants/log-level.cjs +0 -8
  62. package/dist/constants/log-level.d.cts +2 -67
  63. package/dist/constants/log-level.d.mts +2 -69
  64. package/dist/constants/log-level.mjs +0 -8
  65. package/dist/constants/log-level.mjs.map +1 -1
  66. package/dist/constants/meta.cjs +0 -8
  67. package/dist/constants/meta.d.cts +2 -6
  68. package/dist/constants/meta.d.mts +2 -8
  69. package/dist/constants/meta.mjs +0 -8
  70. package/dist/constants/meta.mjs.map +1 -1
  71. package/dist/constants/plugin.cjs +0 -8
  72. package/dist/constants/plugin.d.cts +2 -9
  73. package/dist/constants/plugin.d.mts +2 -11
  74. package/dist/constants/plugin.mjs +0 -8
  75. package/dist/constants/plugin.mjs.map +1 -1
  76. package/dist/context/base-context.cjs +2 -10
  77. package/dist/context/base-context.d.cts +2 -81
  78. package/dist/context/base-context.d.mts +2 -83
  79. package/dist/context/base-context.mjs +0 -8
  80. package/dist/context/base-context.mjs.map +1 -1
  81. package/dist/context/context.cjs +2 -10
  82. package/dist/context/context.d.cts +2 -373
  83. package/dist/context/context.d.mts +2 -375
  84. package/dist/context/context.mjs +0 -8
  85. package/dist/context/context.mjs.map +1 -1
  86. package/dist/context/environment-context.cjs +0 -8
  87. package/dist/context/environment-context.d.cts +2 -5
  88. package/dist/context/environment-context.d.cts.map +1 -1
  89. package/dist/context/environment-context.d.mts +2 -7
  90. package/dist/context/environment-context.d.mts.map +1 -1
  91. package/dist/context/environment-context.mjs +0 -8
  92. package/dist/context/environment-context.mjs.map +1 -1
  93. package/dist/context/execution-context.cjs +2 -10
  94. package/dist/context/execution-context.d.cts +2 -6
  95. package/dist/context/execution-context.d.cts.map +1 -1
  96. package/dist/context/execution-context.d.mts +2 -8
  97. package/dist/context/execution-context.d.mts.map +1 -1
  98. package/dist/context/execution-context.mjs +0 -8
  99. package/dist/context/execution-context.mjs.map +1 -1
  100. package/dist/context/index.cjs +0 -8
  101. package/dist/context/index.d.cts +2 -2
  102. package/dist/context/index.d.mts +2 -4
  103. package/dist/context/index.mjs +0 -8
  104. package/dist/context/plugin-context.cjs +0 -8
  105. package/dist/context/plugin-context.d.cts +1 -3
  106. package/dist/context/plugin-context.d.cts.map +1 -1
  107. package/dist/context/plugin-context.d.mts +1 -5
  108. package/dist/context/plugin-context.d.mts.map +1 -1
  109. package/dist/context/plugin-context.mjs +0 -8
  110. package/dist/context/plugin-context.mjs.map +1 -1
  111. package/dist/context-C6oL3mPw.d.mts +368 -0
  112. package/dist/context-C6oL3mPw.d.mts.map +1 -0
  113. package/dist/context-DcY6YqBQ.d.cts +368 -0
  114. package/dist/context-DcY6YqBQ.d.cts.map +1 -0
  115. package/dist/context-helpers-BKxpDArS.d.mts +15 -0
  116. package/dist/context-helpers-BKxpDArS.d.mts.map +1 -0
  117. package/dist/context-helpers-zXovPE7i.d.cts +15 -0
  118. package/dist/context-helpers-zXovPE7i.d.cts.map +1 -0
  119. package/dist/devtools-h0du-bSj.d.cts +13 -0
  120. package/dist/devtools-h0du-bSj.d.cts.map +1 -0
  121. package/dist/devtools-h0du-bSj.d.mts +13 -0
  122. package/dist/devtools-h0du-bSj.d.mts.map +1 -0
  123. package/dist/entry-BC_V2K2U.d.cts +46 -0
  124. package/dist/entry-BC_V2K2U.d.cts.map +1 -0
  125. package/dist/entry-CHIaWcmk.d.mts +46 -0
  126. package/dist/entry-CHIaWcmk.d.mts.map +1 -0
  127. package/dist/environments-BYv_kHRG.d.cts +10 -0
  128. package/dist/environments-BYv_kHRG.d.cts.map +1 -0
  129. package/dist/environments-BYv_kHRG.d.mts +10 -0
  130. package/dist/environments-BYv_kHRG.d.mts.map +1 -0
  131. package/dist/events-NA1XM2Vz.d.cts +10 -0
  132. package/dist/events-NA1XM2Vz.d.cts.map +1 -0
  133. package/dist/events-NA1XM2Vz.d.mts +10 -0
  134. package/dist/events-NA1XM2Vz.d.mts.map +1 -0
  135. package/dist/extensions-ctxXzgay.d.cts +5 -0
  136. package/dist/extensions-ctxXzgay.d.cts.map +1 -0
  137. package/dist/extensions-ctxXzgay.d.mts +5 -0
  138. package/dist/extensions-ctxXzgay.d.mts.map +1 -0
  139. package/dist/file-header-Co9oo7aI.d.cts +41 -0
  140. package/dist/file-header-Co9oo7aI.d.cts.map +1 -0
  141. package/dist/file-header-rHqeXgRV.d.mts +41 -0
  142. package/dist/file-header-rHqeXgRV.d.mts.map +1 -0
  143. package/dist/format-Cf-cgZ-s.d.cts +24 -0
  144. package/dist/format-Cf-cgZ-s.d.cts.map +1 -0
  145. package/dist/format-IQPqgWIe.d.mts +24 -0
  146. package/dist/format-IQPqgWIe.d.mts.map +1 -0
  147. package/dist/fs-BzXT5ZPj.d.cts +7 -0
  148. package/dist/fs-BzXT5ZPj.d.cts.map +1 -0
  149. package/dist/fs-BzXT5ZPj.d.mts +7 -0
  150. package/dist/fs-BzXT5ZPj.d.mts.map +1 -0
  151. package/dist/{schemas/fs.cjs → fs-C2lru696.cjs} +38 -16
  152. package/dist/{schemas/fs.mjs → fs-DqLn15uU.mjs} +2 -10
  153. package/dist/fs-DqLn15uU.mjs.map +1 -0
  154. package/dist/generate-types-CDkVosrS.d.cts +65 -0
  155. package/dist/generate-types-CDkVosrS.d.cts.map +1 -0
  156. package/dist/generate-types-Dw6p3cB_.d.mts +65 -0
  157. package/dist/generate-types-Dw6p3cB_.d.mts.map +1 -0
  158. package/dist/helpers-CrRRFQl5.d.mts +22 -0
  159. package/dist/helpers-CrRRFQl5.d.mts.map +1 -0
  160. package/dist/helpers-DBLIQW3U.d.cts +22 -0
  161. package/dist/helpers-DBLIQW3U.d.cts.map +1 -0
  162. package/dist/hooks-Dhc3ahex.d.cts +5 -0
  163. package/dist/hooks-Dhc3ahex.d.cts.map +1 -0
  164. package/dist/hooks-Dhc3ahex.d.mts +5 -0
  165. package/dist/hooks-Dhc3ahex.d.mts.map +1 -0
  166. package/dist/index-BKZ67WMa.d.cts +1 -0
  167. package/dist/index-BKZ67WMa.d.mts +1 -0
  168. package/dist/index-BVVgDSdq.d.cts +1 -0
  169. package/dist/index-BVVgDSdq.d.mts +1 -0
  170. package/dist/index-Den-MsLx.d.cts +1 -0
  171. package/dist/index-Den-MsLx.d.mts +1 -0
  172. package/dist/index-DmtQKWjk.d.cts +1 -0
  173. package/dist/index-DmtQKWjk.d.mts +1 -0
  174. package/dist/index-LtpXjuJR.d.mts +25 -0
  175. package/dist/index-LtpXjuJR.d.mts.map +1 -0
  176. package/dist/index-_6s0AX1B.d.cts +1 -0
  177. package/dist/index-_6s0AX1B.d.mts +1 -0
  178. package/dist/index-xk4vSgtB.d.cts +25 -0
  179. package/dist/index-xk4vSgtB.d.cts.map +1 -0
  180. package/dist/index.cjs +1 -9
  181. package/dist/index.d.cts +24 -32
  182. package/dist/index.d.mts +24 -34
  183. package/dist/index.mjs +1 -9
  184. package/dist/install-dependencies-CCjZfS9Y.d.mts +12 -0
  185. package/dist/install-dependencies-CCjZfS9Y.d.mts.map +1 -0
  186. package/dist/install-dependencies-CyeYsrfz.d.cts +12 -0
  187. package/dist/install-dependencies-CyeYsrfz.d.cts.map +1 -0
  188. package/dist/lib/config.cjs +2 -10
  189. package/dist/lib/config.d.cts +2 -140
  190. package/dist/lib/config.d.mts +2 -142
  191. package/dist/lib/config.mjs +0 -8
  192. package/dist/lib/config.mjs.map +1 -1
  193. package/dist/lib/context-helpers.cjs +0 -8
  194. package/dist/lib/context-helpers.d.cts +2 -16
  195. package/dist/lib/context-helpers.d.mts +2 -18
  196. package/dist/lib/context-helpers.mjs +0 -8
  197. package/dist/lib/context-helpers.mjs.map +1 -1
  198. package/dist/lib/entry.cjs +0 -8
  199. package/dist/lib/entry.d.cts +2 -47
  200. package/dist/lib/entry.d.mts +2 -49
  201. package/dist/lib/entry.mjs +0 -8
  202. package/dist/lib/entry.mjs.map +1 -1
  203. package/dist/lib/environment.cjs +2 -10
  204. package/dist/lib/environment.d.cts +1 -2
  205. package/dist/lib/environment.d.cts.map +1 -1
  206. package/dist/lib/environment.d.mts +1 -4
  207. package/dist/lib/environment.d.mts.map +1 -1
  208. package/dist/lib/environment.mjs +0 -8
  209. package/dist/lib/environment.mjs.map +1 -1
  210. package/dist/lib/events.cjs +0 -8
  211. package/dist/lib/events.d.cts +2 -10
  212. package/dist/lib/events.d.mts +2 -12
  213. package/dist/lib/events.mjs +0 -8
  214. package/dist/lib/events.mjs.map +1 -1
  215. package/dist/lib/generate-types.cjs +0 -8
  216. package/dist/lib/generate-types.d.cts +2 -66
  217. package/dist/lib/generate-types.d.mts +2 -68
  218. package/dist/lib/generate-types.mjs +0 -8
  219. package/dist/lib/generate-types.mjs.map +1 -1
  220. package/dist/lib/hooks.cjs +2 -10
  221. package/dist/lib/hooks.d.cts +2 -28
  222. package/dist/lib/hooks.d.mts +2 -30
  223. package/dist/lib/hooks.mjs +0 -8
  224. package/dist/lib/hooks.mjs.map +1 -1
  225. package/dist/lib/index.cjs +1 -9
  226. package/dist/lib/index.d.cts +23 -23
  227. package/dist/lib/index.d.mts +23 -25
  228. package/dist/lib/index.mjs +1 -9
  229. package/dist/lib/install-dependencies.cjs +0 -8
  230. package/dist/lib/install-dependencies.d.cts +2 -12
  231. package/dist/lib/install-dependencies.d.mts +2 -14
  232. package/dist/lib/install-dependencies.mjs +0 -8
  233. package/dist/lib/install-dependencies.mjs.map +1 -1
  234. package/dist/lib/meta.cjs +0 -8
  235. package/dist/lib/meta.d.cts +2 -33
  236. package/dist/lib/meta.d.mts +2 -35
  237. package/dist/lib/meta.mjs +0 -8
  238. package/dist/lib/meta.mjs.map +1 -1
  239. package/dist/lib/plugins.cjs +2 -10
  240. package/dist/lib/plugins.d.cts +2 -39
  241. package/dist/lib/plugins.d.mts +2 -41
  242. package/dist/lib/plugins.mjs +0 -8
  243. package/dist/lib/plugins.mjs.map +1 -1
  244. package/dist/lib/resolver.cjs +2 -10
  245. package/dist/lib/resolver.d.cts +2 -20
  246. package/dist/lib/resolver.d.mts +2 -22
  247. package/dist/lib/resolver.mjs +0 -8
  248. package/dist/lib/resolver.mjs.map +1 -1
  249. package/dist/lib/schemas.cjs +1 -9
  250. package/dist/lib/schemas.d.cts +1 -1
  251. package/dist/lib/schemas.d.mts +1 -3
  252. package/dist/lib/schemas.mjs +1 -9
  253. package/dist/lib/streaming-channel.cjs +0 -8
  254. package/dist/lib/streaming-channel.d.cts +2 -126
  255. package/dist/lib/streaming-channel.d.mts +2 -128
  256. package/dist/lib/streaming-channel.mjs +0 -8
  257. package/dist/lib/streaming-channel.mjs.map +1 -1
  258. package/dist/lib/typescript/index.cjs +0 -8
  259. package/dist/lib/typescript/index.d.cts +2 -2
  260. package/dist/lib/typescript/index.d.mts +2 -4
  261. package/dist/lib/typescript/index.mjs +0 -8
  262. package/dist/lib/typescript/ts-morph.cjs +2 -10
  263. package/dist/lib/typescript/ts-morph.d.cts +2 -38
  264. package/dist/lib/typescript/ts-morph.d.mts +2 -40
  265. package/dist/lib/typescript/ts-morph.mjs +0 -8
  266. package/dist/lib/typescript/ts-morph.mjs.map +1 -1
  267. package/dist/lib/typescript/tsconfig.cjs +4 -12
  268. package/dist/lib/typescript/tsconfig.d.cts +2 -77
  269. package/dist/lib/typescript/tsconfig.d.mts +2 -79
  270. package/dist/lib/typescript/tsconfig.mjs +0 -8
  271. package/dist/lib/typescript/tsconfig.mjs.map +1 -1
  272. package/dist/lib/unplugin/helpers.cjs +0 -8
  273. package/dist/lib/unplugin/helpers.d.cts +2 -23
  274. package/dist/lib/unplugin/helpers.d.mts +2 -25
  275. package/dist/lib/unplugin/helpers.mjs +0 -8
  276. package/dist/lib/unplugin/helpers.mjs.map +1 -1
  277. package/dist/lib/unplugin/index.cjs +0 -8
  278. package/dist/lib/unplugin/index.d.cts +3 -3
  279. package/dist/lib/unplugin/index.d.mts +3 -5
  280. package/dist/lib/unplugin/index.mjs +0 -8
  281. package/dist/lib/unplugin/module-resolution.cjs +2 -10
  282. package/dist/lib/unplugin/module-resolution.d.cts +2 -41
  283. package/dist/lib/unplugin/module-resolution.d.mts +2 -43
  284. package/dist/lib/unplugin/module-resolution.mjs +0 -8
  285. package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
  286. package/dist/lib/unplugin/plugin.cjs +0 -8
  287. package/dist/lib/unplugin/plugin.d.cts +2 -40
  288. package/dist/lib/unplugin/plugin.d.mts +2 -42
  289. package/dist/lib/unplugin/plugin.mjs +0 -8
  290. package/dist/lib/unplugin/plugin.mjs.map +1 -1
  291. package/dist/lib/utilities/file-header.cjs +0 -8
  292. package/dist/lib/utilities/file-header.d.cts +2 -41
  293. package/dist/lib/utilities/file-header.d.mts +2 -43
  294. package/dist/lib/utilities/file-header.mjs +0 -8
  295. package/dist/lib/utilities/file-header.mjs.map +1 -1
  296. package/dist/lib/utilities/format.cjs +2 -10
  297. package/dist/lib/utilities/format.d.cts +2 -24
  298. package/dist/lib/utilities/format.d.mts +2 -26
  299. package/dist/lib/utilities/format.mjs +0 -8
  300. package/dist/lib/utilities/format.mjs.map +1 -1
  301. package/dist/lib/utilities/index.cjs +0 -8
  302. package/dist/lib/utilities/index.d.cts +5 -5
  303. package/dist/lib/utilities/index.d.mts +5 -7
  304. package/dist/lib/utilities/index.mjs +0 -8
  305. package/dist/lib/utilities/source-file.cjs +2 -10
  306. package/dist/lib/utilities/source-file.d.cts +2 -30
  307. package/dist/lib/utilities/source-file.d.mts +2 -32
  308. package/dist/lib/utilities/source-file.mjs +0 -8
  309. package/dist/lib/utilities/source-file.mjs.map +1 -1
  310. package/dist/lib/utilities/source-map.cjs +2 -10
  311. package/dist/lib/utilities/source-map.d.cts +2 -16
  312. package/dist/lib/utilities/source-map.d.mts +2 -18
  313. package/dist/lib/utilities/source-map.mjs +0 -8
  314. package/dist/lib/utilities/source-map.mjs.map +1 -1
  315. package/dist/lib/utilities/write-file.cjs +0 -8
  316. package/dist/lib/utilities/write-file.d.cts +2 -15
  317. package/dist/lib/utilities/write-file.d.mts +2 -17
  318. package/dist/lib/utilities/write-file.mjs +0 -8
  319. package/dist/lib/utilities/write-file.mjs.map +1 -1
  320. package/dist/lib/vfs.cjs +3 -11
  321. package/dist/lib/vfs.d.cts +2 -321
  322. package/dist/lib/vfs.d.mts +2 -323
  323. package/dist/lib/vfs.mjs +1 -9
  324. package/dist/lib/vfs.mjs.map +1 -1
  325. package/dist/log-level-BC8g4BBL.d.cts +67 -0
  326. package/dist/log-level-BC8g4BBL.d.cts.map +1 -0
  327. package/dist/log-level-BC8g4BBL.d.mts +67 -0
  328. package/dist/log-level-BC8g4BBL.d.mts.map +1 -0
  329. package/dist/meta-CdDd2ykC.d.cts +33 -0
  330. package/dist/meta-CdDd2ykC.d.cts.map +1 -0
  331. package/dist/meta-CfTCHU_o.d.mts +33 -0
  332. package/dist/meta-CfTCHU_o.d.mts.map +1 -0
  333. package/dist/meta-QA_SN1j3.d.cts +6 -0
  334. package/dist/meta-QA_SN1j3.d.cts.map +1 -0
  335. package/dist/meta-QA_SN1j3.d.mts +6 -0
  336. package/dist/meta-QA_SN1j3.d.mts.map +1 -0
  337. package/dist/module-resolution-CRMNPsdn.d.mts +40 -0
  338. package/dist/module-resolution-CRMNPsdn.d.mts.map +1 -0
  339. package/dist/module-resolution-D-w-EZaK.d.cts +40 -0
  340. package/dist/module-resolution-D-w-EZaK.d.cts.map +1 -0
  341. package/dist/plugin-B_b7XqaN.d.mts +39 -0
  342. package/dist/plugin-B_b7XqaN.d.mts.map +1 -0
  343. package/dist/plugin-CzV-aFwU.d.cts +39 -0
  344. package/dist/plugin-CzV-aFwU.d.cts.map +1 -0
  345. package/dist/plugin-base.cjs +0 -8
  346. package/dist/plugin-base.d.cts +1 -3
  347. package/dist/plugin-base.d.cts.map +1 -1
  348. package/dist/plugin-base.d.mts +1 -5
  349. package/dist/plugin-base.d.mts.map +1 -1
  350. package/dist/plugin-base.mjs +0 -8
  351. package/dist/plugin-base.mjs.map +1 -1
  352. package/dist/plugin-fhBG7SSQ.d.cts +9 -0
  353. package/dist/plugin-fhBG7SSQ.d.cts.map +1 -0
  354. package/dist/plugin-fhBG7SSQ.d.mts +9 -0
  355. package/dist/plugin-fhBG7SSQ.d.mts.map +1 -0
  356. package/dist/plugin-utils/build-helpers.cjs +0 -8
  357. package/dist/plugin-utils/build-helpers.d.cts +1 -2
  358. package/dist/plugin-utils/build-helpers.d.cts.map +1 -1
  359. package/dist/plugin-utils/build-helpers.d.mts +1 -4
  360. package/dist/plugin-utils/build-helpers.d.mts.map +1 -1
  361. package/dist/plugin-utils/build-helpers.mjs +0 -8
  362. package/dist/plugin-utils/build-helpers.mjs.map +1 -1
  363. package/dist/plugin-utils/combine-plugins.cjs +0 -8
  364. package/dist/plugin-utils/combine-plugins.d.cts +1 -1
  365. package/dist/plugin-utils/combine-plugins.d.mts +1 -3
  366. package/dist/plugin-utils/combine-plugins.d.mts.map +1 -1
  367. package/dist/plugin-utils/combine-plugins.mjs +0 -8
  368. package/dist/plugin-utils/combine-plugins.mjs.map +1 -1
  369. package/dist/plugin-utils/context-helpers.cjs +0 -8
  370. package/dist/plugin-utils/context-helpers.d.cts +1 -1
  371. package/dist/plugin-utils/context-helpers.d.mts +1 -3
  372. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  373. package/dist/plugin-utils/context-helpers.mjs +0 -8
  374. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  375. package/dist/plugin-utils/docs-helper.cjs +0 -8
  376. package/dist/plugin-utils/docs-helper.d.mts +0 -2
  377. package/dist/plugin-utils/docs-helper.d.mts.map +1 -1
  378. package/dist/plugin-utils/docs-helper.mjs +0 -8
  379. package/dist/plugin-utils/docs-helper.mjs.map +1 -1
  380. package/dist/plugin-utils/enable-plugin.cjs +0 -8
  381. package/dist/plugin-utils/enable-plugin.d.cts +1 -2
  382. package/dist/plugin-utils/enable-plugin.d.cts.map +1 -1
  383. package/dist/plugin-utils/enable-plugin.d.mts +1 -4
  384. package/dist/plugin-utils/enable-plugin.d.mts.map +1 -1
  385. package/dist/plugin-utils/enable-plugin.mjs +0 -8
  386. package/dist/plugin-utils/enable-plugin.mjs.map +1 -1
  387. package/dist/plugin-utils/extend.cjs +0 -8
  388. package/dist/plugin-utils/extend.d.cts +1 -3
  389. package/dist/plugin-utils/extend.d.cts.map +1 -1
  390. package/dist/plugin-utils/extend.d.mts +1 -5
  391. package/dist/plugin-utils/extend.d.mts.map +1 -1
  392. package/dist/plugin-utils/extend.mjs +0 -8
  393. package/dist/plugin-utils/extend.mjs.map +1 -1
  394. package/dist/plugin-utils/filter.cjs +2 -10
  395. package/dist/plugin-utils/filter.d.cts +1 -1
  396. package/dist/plugin-utils/filter.d.mts +1 -3
  397. package/dist/plugin-utils/filter.d.mts.map +1 -1
  398. package/dist/plugin-utils/filter.mjs +0 -8
  399. package/dist/plugin-utils/filter.mjs.map +1 -1
  400. package/dist/plugin-utils/format-package-json.cjs +0 -8
  401. package/dist/plugin-utils/format-package-json.d.cts +1 -1
  402. package/dist/plugin-utils/format-package-json.d.mts +1 -3
  403. package/dist/plugin-utils/format-package-json.d.mts.map +1 -1
  404. package/dist/plugin-utils/format-package-json.mjs +0 -8
  405. package/dist/plugin-utils/format-package-json.mjs.map +1 -1
  406. package/dist/plugin-utils/format.cjs +0 -8
  407. package/dist/plugin-utils/format.d.mts +0 -2
  408. package/dist/plugin-utils/format.d.mts.map +1 -1
  409. package/dist/plugin-utils/format.mjs +0 -8
  410. package/dist/plugin-utils/format.mjs.map +1 -1
  411. package/dist/plugin-utils/get-config-path.cjs +0 -8
  412. package/dist/plugin-utils/get-config-path.d.cts +1 -1
  413. package/dist/plugin-utils/get-config-path.d.mts +1 -3
  414. package/dist/plugin-utils/get-config-path.d.mts.map +1 -1
  415. package/dist/plugin-utils/get-config-path.mjs +0 -8
  416. package/dist/plugin-utils/get-config-path.mjs.map +1 -1
  417. package/dist/plugin-utils/helpers.cjs +0 -8
  418. package/dist/plugin-utils/helpers.d.cts +1 -5
  419. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  420. package/dist/plugin-utils/helpers.d.mts +1 -7
  421. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  422. package/dist/plugin-utils/helpers.mjs +0 -8
  423. package/dist/plugin-utils/helpers.mjs.map +1 -1
  424. package/dist/plugin-utils/index.cjs +0 -8
  425. package/dist/plugin-utils/index.d.mts +0 -2
  426. package/dist/plugin-utils/index.mjs +0 -8
  427. package/dist/plugin-utils/install.cjs +0 -8
  428. package/dist/plugin-utils/install.d.cts +1 -1
  429. package/dist/plugin-utils/install.d.mts +1 -3
  430. package/dist/plugin-utils/install.d.mts.map +1 -1
  431. package/dist/plugin-utils/install.mjs +0 -8
  432. package/dist/plugin-utils/install.mjs.map +1 -1
  433. package/dist/plugin-utils/logging.cjs +2 -10
  434. package/dist/plugin-utils/logging.d.cts +1 -3
  435. package/dist/plugin-utils/logging.d.cts.map +1 -1
  436. package/dist/plugin-utils/logging.d.mts +1 -5
  437. package/dist/plugin-utils/logging.d.mts.map +1 -1
  438. package/dist/plugin-utils/logging.mjs +0 -8
  439. package/dist/plugin-utils/logging.mjs.map +1 -1
  440. package/dist/plugin-utils/merge.cjs +2 -10
  441. package/dist/plugin-utils/merge.d.cts +1 -3
  442. package/dist/plugin-utils/merge.d.cts.map +1 -1
  443. package/dist/plugin-utils/merge.d.mts +1 -5
  444. package/dist/plugin-utils/merge.d.mts.map +1 -1
  445. package/dist/plugin-utils/merge.mjs +0 -8
  446. package/dist/plugin-utils/merge.mjs.map +1 -1
  447. package/dist/plugin-utils/modules.cjs +0 -8
  448. package/dist/plugin-utils/modules.d.cts +1 -1
  449. package/dist/plugin-utils/modules.d.mts +1 -3
  450. package/dist/plugin-utils/modules.d.mts.map +1 -1
  451. package/dist/plugin-utils/modules.mjs +0 -8
  452. package/dist/plugin-utils/modules.mjs.map +1 -1
  453. package/dist/plugin-utils/paths.cjs +0 -8
  454. package/dist/plugin-utils/paths.d.cts +1 -1
  455. package/dist/plugin-utils/paths.d.mts +1 -3
  456. package/dist/plugin-utils/paths.d.mts.map +1 -1
  457. package/dist/plugin-utils/paths.mjs +0 -8
  458. package/dist/plugin-utils/paths.mjs.map +1 -1
  459. package/dist/plugin-utils/virtual.cjs +0 -8
  460. package/dist/plugin-utils/virtual.d.mts +0 -2
  461. package/dist/plugin-utils/virtual.d.mts.map +1 -1
  462. package/dist/plugin-utils/virtual.mjs +0 -8
  463. package/dist/plugin-utils/virtual.mjs.map +1 -1
  464. package/dist/plugins-DfL1fBZi.d.cts +37 -0
  465. package/dist/plugins-DfL1fBZi.d.cts.map +1 -0
  466. package/dist/plugins-zG2X2LA8.d.mts +37 -0
  467. package/dist/plugins-zG2X2LA8.d.mts.map +1 -0
  468. package/dist/resolver-CdBAh8dA.d.mts +19 -0
  469. package/dist/resolver-CdBAh8dA.d.mts.map +1 -0
  470. package/dist/resolver-CfCl--Eh.d.cts +19 -0
  471. package/dist/resolver-CfCl--Eh.d.cts.map +1 -0
  472. package/dist/{schemas/fs.d.cts → schemas-Zvqwdrw_.d.cts} +2 -2
  473. package/dist/schemas-Zvqwdrw_.d.cts.map +1 -0
  474. package/dist/{schemas/fs.d.mts → schemas-Zvqwdrw_.d.mts} +2 -4
  475. package/dist/schemas-Zvqwdrw_.d.mts.map +1 -0
  476. package/dist/source-file-CLw13fKE.d.mts +30 -0
  477. package/dist/source-file-CLw13fKE.d.mts.map +1 -0
  478. package/dist/source-file-CuuHaBL5.d.cts +30 -0
  479. package/dist/source-file-CuuHaBL5.d.cts.map +1 -0
  480. package/dist/source-map-Cy0aqSpe.d.mts +16 -0
  481. package/dist/source-map-Cy0aqSpe.d.mts.map +1 -0
  482. package/dist/source-map-HU4IoICc.d.cts +16 -0
  483. package/dist/source-map-HU4IoICc.d.cts.map +1 -0
  484. package/dist/storage/base.cjs +0 -8
  485. package/dist/storage/base.d.cts +1 -2
  486. package/dist/storage/base.d.cts.map +1 -1
  487. package/dist/storage/base.d.mts +1 -4
  488. package/dist/storage/base.d.mts.map +1 -1
  489. package/dist/storage/base.mjs +0 -8
  490. package/dist/storage/base.mjs.map +1 -1
  491. package/dist/storage/file-system.cjs +0 -8
  492. package/dist/storage/file-system.d.cts +1 -1
  493. package/dist/storage/file-system.d.mts +1 -3
  494. package/dist/storage/file-system.d.mts.map +1 -1
  495. package/dist/storage/file-system.mjs +0 -8
  496. package/dist/storage/file-system.mjs.map +1 -1
  497. package/dist/storage/helpers.cjs +0 -8
  498. package/dist/storage/helpers.d.mts +0 -2
  499. package/dist/storage/helpers.d.mts.map +1 -1
  500. package/dist/storage/helpers.mjs +0 -8
  501. package/dist/storage/helpers.mjs.map +1 -1
  502. package/dist/storage/index.cjs +0 -8
  503. package/dist/storage/index.d.mts +0 -2
  504. package/dist/storage/index.mjs +0 -8
  505. package/dist/storage/virtual.cjs +0 -8
  506. package/dist/storage/virtual.d.cts +1 -1
  507. package/dist/storage/virtual.d.cts.map +1 -1
  508. package/dist/storage/virtual.d.mts +1 -3
  509. package/dist/storage/virtual.d.mts.map +1 -1
  510. package/dist/storage/virtual.mjs +0 -8
  511. package/dist/storage/virtual.mjs.map +1 -1
  512. package/dist/streaming-channel-CiyFd_6l.d.cts +126 -0
  513. package/dist/streaming-channel-CiyFd_6l.d.cts.map +1 -0
  514. package/dist/streaming-channel-CiyFd_6l.d.mts +126 -0
  515. package/dist/streaming-channel-CiyFd_6l.d.mts.map +1 -0
  516. package/dist/ts-morph-BGgjbOgM.d.cts +38 -0
  517. package/dist/ts-morph-BGgjbOgM.d.cts.map +1 -0
  518. package/dist/ts-morph-zLvdifpA.d.mts +38 -0
  519. package/dist/ts-morph-zLvdifpA.d.mts.map +1 -0
  520. package/dist/tsconfig-DExoZEQ0.d.cts +75 -0
  521. package/dist/tsconfig-DExoZEQ0.d.cts.map +1 -0
  522. package/dist/tsconfig-De09cBeX.d.mts +75 -0
  523. package/dist/tsconfig-De09cBeX.d.mts.map +1 -0
  524. package/dist/vfs-B9Vhnajc.d.cts +320 -0
  525. package/dist/vfs-B9Vhnajc.d.cts.map +1 -0
  526. package/dist/vfs-Dl6nPqdS.d.mts +320 -0
  527. package/dist/vfs-Dl6nPqdS.d.mts.map +1 -0
  528. package/dist/write-file-BVMnXVPo.d.cts +15 -0
  529. package/dist/write-file-BVMnXVPo.d.cts.map +1 -0
  530. package/dist/write-file-CWf9Xxwd.d.mts +15 -0
  531. package/dist/write-file-CWf9Xxwd.d.mts.map +1 -0
  532. package/package.json +17 -17
  533. package/dist/constants/api.d.cts.map +0 -1
  534. package/dist/constants/api.d.mts.map +0 -1
  535. package/dist/constants/commands.d.cts.map +0 -1
  536. package/dist/constants/commands.d.mts.map +0 -1
  537. package/dist/constants/devtools.d.cts.map +0 -1
  538. package/dist/constants/devtools.d.mts.map +0 -1
  539. package/dist/constants/environments.d.cts.map +0 -1
  540. package/dist/constants/environments.d.mts.map +0 -1
  541. package/dist/constants/extensions.d.cts.map +0 -1
  542. package/dist/constants/extensions.d.mts.map +0 -1
  543. package/dist/constants/fs.d.cts.map +0 -1
  544. package/dist/constants/fs.d.mts.map +0 -1
  545. package/dist/constants/hooks.d.cts.map +0 -1
  546. package/dist/constants/hooks.d.mts.map +0 -1
  547. package/dist/constants/log-level.d.cts.map +0 -1
  548. package/dist/constants/log-level.d.mts.map +0 -1
  549. package/dist/constants/meta.d.cts.map +0 -1
  550. package/dist/constants/meta.d.mts.map +0 -1
  551. package/dist/constants/plugin.d.cts.map +0 -1
  552. package/dist/constants/plugin.d.mts.map +0 -1
  553. package/dist/context/base-context.d.cts.map +0 -1
  554. package/dist/context/base-context.d.mts.map +0 -1
  555. package/dist/context/context.d.cts.map +0 -1
  556. package/dist/context/context.d.mts.map +0 -1
  557. package/dist/lib/config.d.cts.map +0 -1
  558. package/dist/lib/config.d.mts.map +0 -1
  559. package/dist/lib/context-helpers.d.cts.map +0 -1
  560. package/dist/lib/context-helpers.d.mts.map +0 -1
  561. package/dist/lib/entry.d.cts.map +0 -1
  562. package/dist/lib/entry.d.mts.map +0 -1
  563. package/dist/lib/events.d.cts.map +0 -1
  564. package/dist/lib/events.d.mts.map +0 -1
  565. package/dist/lib/generate-types.d.cts.map +0 -1
  566. package/dist/lib/generate-types.d.mts.map +0 -1
  567. package/dist/lib/hooks.d.cts.map +0 -1
  568. package/dist/lib/hooks.d.mts.map +0 -1
  569. package/dist/lib/install-dependencies.d.cts.map +0 -1
  570. package/dist/lib/install-dependencies.d.mts.map +0 -1
  571. package/dist/lib/meta.d.cts.map +0 -1
  572. package/dist/lib/meta.d.mts.map +0 -1
  573. package/dist/lib/plugins.d.cts.map +0 -1
  574. package/dist/lib/plugins.d.mts.map +0 -1
  575. package/dist/lib/resolver.d.cts.map +0 -1
  576. package/dist/lib/resolver.d.mts.map +0 -1
  577. package/dist/lib/streaming-channel.d.cts.map +0 -1
  578. package/dist/lib/streaming-channel.d.mts.map +0 -1
  579. package/dist/lib/typescript/ts-morph.d.cts.map +0 -1
  580. package/dist/lib/typescript/ts-morph.d.mts.map +0 -1
  581. package/dist/lib/typescript/tsconfig.d.cts.map +0 -1
  582. package/dist/lib/typescript/tsconfig.d.mts.map +0 -1
  583. package/dist/lib/unplugin/helpers.d.cts.map +0 -1
  584. package/dist/lib/unplugin/helpers.d.mts.map +0 -1
  585. package/dist/lib/unplugin/module-resolution.d.cts.map +0 -1
  586. package/dist/lib/unplugin/module-resolution.d.mts.map +0 -1
  587. package/dist/lib/unplugin/plugin.d.cts.map +0 -1
  588. package/dist/lib/unplugin/plugin.d.mts.map +0 -1
  589. package/dist/lib/utilities/file-header.d.cts.map +0 -1
  590. package/dist/lib/utilities/file-header.d.mts.map +0 -1
  591. package/dist/lib/utilities/format.d.cts.map +0 -1
  592. package/dist/lib/utilities/format.d.mts.map +0 -1
  593. package/dist/lib/utilities/source-file.d.cts.map +0 -1
  594. package/dist/lib/utilities/source-file.d.mts.map +0 -1
  595. package/dist/lib/utilities/source-map.d.cts.map +0 -1
  596. package/dist/lib/utilities/source-map.d.mts.map +0 -1
  597. package/dist/lib/utilities/write-file.d.cts.map +0 -1
  598. package/dist/lib/utilities/write-file.d.mts.map +0 -1
  599. package/dist/lib/vfs.d.cts.map +0 -1
  600. package/dist/lib/vfs.d.mts.map +0 -1
  601. package/dist/schemas/fs.d.cts.map +0 -1
  602. package/dist/schemas/fs.d.mts.map +0 -1
  603. package/dist/schemas/fs.mjs.map +0 -1
  604. package/dist/types/api.d.cts +0 -16
  605. package/dist/types/api.d.cts.map +0 -1
  606. package/dist/types/api.d.mts +0 -18
  607. package/dist/types/api.d.mts.map +0 -1
  608. package/dist/types/config.d.cts +0 -739
  609. package/dist/types/config.d.cts.map +0 -1
  610. package/dist/types/config.d.mts +0 -741
  611. package/dist/types/config.d.mts.map +0 -1
  612. package/dist/types/context.d.cts +0 -682
  613. package/dist/types/context.d.cts.map +0 -1
  614. package/dist/types/context.d.mts +0 -684
  615. package/dist/types/context.d.mts.map +0 -1
  616. package/dist/types/fs.d.cts +0 -538
  617. package/dist/types/fs.d.cts.map +0 -1
  618. package/dist/types/fs.d.mts +0 -540
  619. package/dist/types/fs.d.mts.map +0 -1
  620. package/dist/types/hooks.d.cts +0 -96
  621. package/dist/types/hooks.d.cts.map +0 -1
  622. package/dist/types/hooks.d.mts +0 -98
  623. package/dist/types/hooks.d.mts.map +0 -1
  624. package/dist/types/index.d.cts +0 -9
  625. package/dist/types/index.d.mts +0 -11
  626. package/dist/types/logging.d.cts +0 -145
  627. package/dist/types/logging.d.cts.map +0 -1
  628. package/dist/types/logging.d.mts +0 -147
  629. package/dist/types/logging.d.mts.map +0 -1
  630. package/dist/types/plugin.d.cts +0 -207
  631. package/dist/types/plugin.d.cts.map +0 -1
  632. package/dist/types/plugin.d.mts +0 -209
  633. package/dist/types/plugin.d.mts.map +0 -1
  634. package/dist/types/tsconfig.d.cts +0 -73
  635. package/dist/types/tsconfig.d.cts.map +0 -1
  636. package/dist/types/tsconfig.d.mts +0 -75
  637. package/dist/types/tsconfig.d.mts.map +0 -1
  638. package/dist/types/unplugin.d.cts +0 -22
  639. package/dist/types/unplugin.d.cts.map +0 -1
  640. package/dist/types/unplugin.d.mts +0 -24
  641. package/dist/types/unplugin.d.mts.map +0 -1
@@ -1,684 +0,0 @@
1
- import __tsdown_shims_path from 'node:path';
2
- import __tsdown_shims_url from 'node:url';
3
- import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions } from "./fs.mjs";
4
- import { Plugin } from "./plugin.mjs";
5
- import { CallHookOptions, HooksList, HooksListItem, InferHookParameters, InferHookReturnType } from "./hooks.mjs";
6
- import { LogFn, LogMessage, Logger, LoggerOptions } from "./logging.mjs";
7
- import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
8
- import { EnvironmentResolvedConfig, ExecutionOptions, Options, PluginConfig, ResolvedConfig, ResolvedEntryFileReference, UserConfig } from "./config.mjs";
9
- import { EnvPaths } from "@stryke/env/get-env-paths";
10
- import { Jiti } from "jiti";
11
- import { ExternalIdResult, UnpluginBuildContext } from "unplugin";
12
- import MagicString, { SourceMap } from "magic-string";
13
- import { ParseResult, ParserOptions } from "oxc-parser";
14
- import { RequestInfo, Response } from "undici";
15
- import { DeepPartial } from "@stryke/types/base";
16
- import { PackageJson } from "@stryke/types/package-json";
17
- import { Range } from "semver";
18
- import { Unimport } from "unimport";
19
-
20
- //#region src/types/context.d.ts
21
- type MetaInfo = Record<string, any> & {
22
- /**
23
- * The checksum generated from the resolved options
24
- */
25
- checksum: string;
26
- /**
27
- * The unique identifier of the execution, which can be used for logging and other purposes to distinguish between different executions in the same process.
28
- */
29
- executionId: string;
30
- /**
31
- * The build id, which is a unique identifier for the current build process. This can be used for logging and other purposes to distinguish between different builds in the same process.
32
- */
33
- buildId: string;
34
- /**
35
- * The release id, which is a unique identifier for the current release. This can be used for logging and other purposes to distinguish between different releases in the same process.
36
- */
37
- releaseId: string;
38
- /**
39
- * The timestamp when the execution context was initialized
40
- */
41
- timestamp: number;
42
- /**
43
- * A hash that represents the path to the project root directory
44
- */
45
- rootHash: string;
46
- /**
47
- * A hash that represents the path to the configuration root directory
48
- */
49
- configHash: string;
50
- };
51
- interface Resolver extends Jiti {
52
- plugin: Jiti;
53
- }
54
- interface TransformResult$1 {
55
- code: string;
56
- map: SourceMap | null;
57
- }
58
- /**
59
- * The format for providing source code to the compiler
60
- */
61
- interface SourceFile {
62
- /**
63
- * The name of the file to be compiled
64
- */
65
- id: string;
66
- /**
67
- * The source code to be compiled
68
- */
69
- code: MagicString;
70
- /**
71
- * The environment variables used in the source code
72
- */
73
- env: string[];
74
- /**
75
- * The result of the transformation
76
- */
77
- result?: TransformResult$1;
78
- }
79
- type UnimportContext = Omit<Unimport, "injectImports"> & {
80
- dumpImports: () => Promise<void>;
81
- injectImports: (source: SourceFile) => Promise<SourceFile>;
82
- refreshRuntimeImports: () => Promise<void>;
83
- };
84
- interface SelectHooksOptions {
85
- order?: "pre" | "post" | "normal";
86
- }
87
- /**
88
- * Options for initializing or updating the context with new configuration values
89
- */
90
- interface InitContextOptions {
91
- /**
92
- * If false, the plugin will be loaded after all other plugins.
93
- *
94
- * @defaultValue true
95
- */
96
- isHighPriority: boolean;
97
- }
98
- /**
99
- * Options for fetch requests made via the context's {@link Context.fetch} method
100
- */
101
- interface FetchOptions extends RequestInit {
102
- /**
103
- * An indicator specifying that the request should bypass any caching
104
- */
105
- skipCache?: boolean;
106
- /**
107
- * The maximum time in milliseconds to wait for the request to complete.
108
- *
109
- * @defaultValue 30000
110
- */
111
- timeout?: number;
112
- }
113
- /**
114
- * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
115
- */
116
- interface ParseOptions extends ParserOptions {
117
- /**
118
- * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
119
- */
120
- allowReturnOutsideFunction?: boolean;
121
- }
122
- interface EmitOptions extends WriteOptions {
123
- /**
124
- * The file extension to use when emitting the file
125
- */
126
- extension?: string;
127
- /**
128
- * If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
129
- */
130
- emitWithBundler?: boolean;
131
- needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
132
- originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
133
- }
134
- /**
135
- * Options for emitting entry virtual files
136
- */
137
- type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryFileReference, "file">;
138
- interface ResolveResult extends ExternalIdResult {
139
- /**
140
- * A flag indicating whether the resolved module is part of the generated runtime modules
141
- */
142
- virtual?: boolean;
143
- }
144
- /**
145
- * The base Powerlines context.
146
- *
147
- * @remarks
148
- * This context provides the foundational structure for interacting with the Powerlines engine.
149
- */
150
- interface BaseContext<TSystemContext = any> extends Pick<Required<Options>, "cwd"> {
151
- /**
152
- * The system instance associated with the context, which can be used to interact with the Powerlines engine and perform various operations during the build process. The specific type of the system may vary depending on the environment and use case, but it typically provides methods for logging, file system operations, and other interactions with the Powerlines engine.
153
- */
154
- system: TSystemContext;
155
- /**
156
- * The timestamp when the context was initialized
157
- */
158
- timestamp: number;
159
- /**
160
- * The Powerlines environment paths
161
- */
162
- envPaths: EnvPaths;
163
- /**
164
- * The file system path to the Powerlines package installation
165
- */
166
- powerlinesPath: string;
167
- /**
168
- * The options provided to the Powerlines process.
169
- */
170
- options: Options;
171
- /**
172
- * An instance of the Powerlines logger client that can be used to generate log messages with consistent formatting and metadata.
173
- */
174
- logger: Logger;
175
- /**
176
- * A logging function for fatal messages
177
- */
178
- fatal: (message: string | LogMessage | Error) => void;
179
- /**
180
- * A logging function for error messages
181
- */
182
- error: (message: string | LogMessage | Error) => void;
183
- /**
184
- * A logging function for warning messages
185
- */
186
- warn: (message: string | LogMessage) => void;
187
- /**
188
- * A logging function for informational messages
189
- */
190
- info: (message: string | LogMessage) => void;
191
- /**
192
- * A logging function for debug messages
193
- */
194
- debug: (message: string | LogMessage) => void;
195
- /**
196
- * A logging function for trace messages
197
- */
198
- trace: (message: string | LogMessage) => void;
199
- /**
200
- * A function to create a timer for measuring the duration of asynchronous operations
201
- *
202
- * @example
203
- * ```ts
204
- * const stopTimer = context.timer("Your Async Operation");
205
- * await performAsyncOperation();
206
- * stopTimer(); // "Your Async Operation completed in 123.45 milliseconds"
207
- * ```
208
- *
209
- * @param name - The name of the timer.
210
- * @returns A function that, when called, stops the timer and logs the duration.
211
- */
212
- timer: (name: string) => () => void;
213
- /**
214
- * Create a new logger instance
215
- *
216
- * @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
217
- * @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
218
- */
219
- createLogger: (options: LoggerOptions, logFn?: LogFn) => Logger;
220
- /**
221
- * Extend the current logger instance with a new source
222
- *
223
- * @param options - The overlay metadata to use for the badge in the log output.
224
- * @returns A logger client instance that extends the current logger with the provided configuration options.
225
- */
226
- extendLogger: (options: LoggerOptions, logFn?: LogFn) => Logger;
227
- }
228
- /**
229
- * The unresolved Powerlines context.
230
- *
231
- * @remarks
232
- * This context is used before the user configuration has been fully resolved after the `config`.
233
- */
234
- interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = any> extends BaseContext<TSystemContext> {
235
- /**
236
- * The options provided to the Powerlines process, resolved with default values and merged with any configuration provided by plugins or other sources. This is typically the final configuration used during the build process, but may also include additional options that are relevant to the context and its interactions with the Powerlines engine.
237
- */
238
- options: ExecutionOptions;
239
- /**
240
- * An object containing the options provided to Powerlines
241
- */
242
- config: Omit<TResolvedConfig, "pluginConfig">;
243
- /**
244
- * A place to store metadata information on the context for access in plugins and other parts of the system. This can be used to store information about the current execution, such as a unique identifier for the execution, timestamps, or any other relevant data that may be useful for plugins or other parts of the system to access during the build process.
245
- */
246
- meta: MetaInfo;
247
- /**
248
- * The metadata information currently written to disk
249
- */
250
- persistedMeta?: MetaInfo;
251
- /**
252
- * The path to a directory where the reflection data buffers (used by the build processes) are stored
253
- */
254
- readonly dataPath: string;
255
- /**
256
- * The path to a directory where the project cache (used by the build processes) is stored
257
- */
258
- readonly cachePath: string;
259
- /**
260
- * The Powerlines artifacts directory
261
- */
262
- readonly artifactsPath: string;
263
- /**
264
- * The path to the Powerlines builtin runtime modules directory
265
- */
266
- readonly builtinsPath: string;
267
- /**
268
- * The path to the Powerlines entry modules directory
269
- */
270
- readonly entryPath: string;
271
- /**
272
- * The path to the Powerlines infrastructure modules directory
273
- */
274
- readonly infrastructurePath: string;
275
- /**
276
- * The path to the Powerlines TypeScript declaration files directory
277
- */
278
- readonly typesPath: string;
279
- /**
280
- * Invokes the configured plugin hooks
281
- *
282
- * @remarks
283
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
284
- *
285
- * @param hook - The hook to call
286
- * @param options - The options to provide to the hook
287
- * @param args - The arguments to pass to the hook
288
- * @returns The result of the hook call
289
- */
290
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
291
- environment?: string | EnvironmentContext<TResolvedConfig>;
292
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
293
- /**
294
- * The virtual file system interface for managing files during the build process
295
- */
296
- fs: VirtualFileSystemInterface;
297
- /**
298
- * The project's `package.json` file content
299
- */
300
- packageJson: PackageJson & Record<string, any>;
301
- /**
302
- * The project's `project.json` file content
303
- */
304
- projectJson?: Record<string, any>;
305
- /**
306
- * The dependency installations required by the project
307
- */
308
- dependencies: Record<string, string | Range>;
309
- /**
310
- * The development dependency installations required by the project
311
- */
312
- devDependencies: Record<string, string | Range>;
313
- /**
314
- * The parsed TypeScript configuration from the `tsconfig.json` file
315
- */
316
- tsconfig: ParsedTypeScriptConfig;
317
- /**
318
- * The entry points of the source code
319
- */
320
- entry: ResolvedEntryFileReference[];
321
- /**
322
- * The Jiti module resolver
323
- */
324
- resolver: Resolver;
325
- /**
326
- * The builtin module id that exist in the Powerlines virtual file system
327
- */
328
- builtins: string[];
329
- /**
330
- * The alias mappings for the project used during module resolution
331
- *
332
- * @remarks
333
- * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
334
- */
335
- alias: Record<string, string>;
336
- /**
337
- * The resolved tsconfig file paths for the project
338
- */
339
- resolvePatterns: RegExp[];
340
- /**
341
- * Additional arguments provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed.
342
- */
343
- additionalArgs: Record<string, string | string[]>;
344
- /**
345
- * A function to perform HTTP fetch requests
346
- *
347
- * @remarks
348
- * This function uses a caching layer to avoid duplicate requests during the Powerlines process.
349
- *
350
- * @example
351
- * ```ts
352
- * const response = await context.fetch("https://api.example.com/data");
353
- * const data = await response.json();
354
- * ```
355
- *
356
- * @see https://github.com/nodejs/undici
357
- *
358
- * @param input - The URL to fetch.
359
- * @param options - The fetch request options.
360
- * @returns A promise that resolves to a response returned by the fetch.
361
- */
362
- fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
363
- /**
364
- * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
365
- *
366
- * @remarks
367
- * This function can be used to parse TypeScript code into an AST for further analysis or transformation.
368
- *
369
- * @example
370
- * ```ts
371
- * const ast = context.parse("const x: number = 42;");
372
- * ```
373
- *
374
- * @see https://rollupjs.org/plugin-development/#this-parse
375
- * @see https://github.com/oxc/oxc
376
- *
377
- * @param code - The source code to parse.
378
- * @param options - The options to pass to the parser.
379
- * @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
380
- */
381
- parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
382
- /**
383
- * A helper function to resolve modules using the Jiti resolver
384
- *
385
- * @remarks
386
- * This function can be used to resolve modules relative to the project root directory.
387
- *
388
- * @example
389
- * ```ts
390
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
391
- * ```
392
- *
393
- * @param id - The module to resolve.
394
- * @param importer - An optional path to the importer module.
395
- * @param options - Additional resolution options.
396
- * @returns A promise that resolves to the resolved module path.
397
- */
398
- resolve: (id: string, importer?: string, options?: ResolveOptions) => Promise<ResolveResult | undefined>;
399
- /**
400
- * A helper function to load modules using the Jiti resolver
401
- *
402
- * @remarks
403
- * This function can be used to load modules relative to the project root directory.
404
- *
405
- * @example
406
- * ```ts
407
- * const module = await context.load("some-module", "/path/to/importer");
408
- * ```
409
- *
410
- * @param id - The module to load.
411
- * @returns A promise that resolves to the loaded module.
412
- */
413
- load: (id: string) => Promise<TransformResult$1 | undefined>;
414
- /**
415
- * The Powerlines builtin virtual files
416
- */
417
- getBuiltins: () => Promise<VirtualFile[]>;
418
- /**
419
- * Resolves a file and writes it to the VFS if it does not already exist
420
- *
421
- * @param code - The source code of the file
422
- * @param path - The path to write the file to
423
- * @param options - Additional options for writing the file
424
- */
425
- emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
426
- /**
427
- * Synchronously resolves a file and writes it to the VFS if it does not already exist
428
- *
429
- * @param code - The source code of the file
430
- * @param path - The path to write the file to
431
- * @param options - Additional options for writing the file
432
- */
433
- emitSync: (code: string, path: string, options?: EmitOptions) => void;
434
- /**
435
- * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
436
- *
437
- * @param code - The source code of the builtin file
438
- * @param id - The unique identifier of the builtin file
439
- * @param options - Additional options for writing the builtin file
440
- */
441
- emitBuiltin: (code: string, id: string, options?: EmitOptions) => Promise<void>;
442
- /**
443
- * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
444
- *
445
- * @param code - The source code of the builtin file
446
- * @param id - The unique identifier of the builtin file
447
- * @param options - Additional options for writing the builtin file
448
- */
449
- emitBuiltinSync: (code: string, id: string, options?: EmitOptions) => void;
450
- /**
451
- * Resolves a entry virtual file and writes it to the VFS if it does not already exist
452
- *
453
- * @param code - The source code of the entry file
454
- * @param path - An optional path to write the entry file to
455
- * @param options - Additional options for writing the entry file
456
- */
457
- emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
458
- /**
459
- * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
460
- *
461
- * @param code - The source code of the entry file
462
- * @param path - An optional path to write the entry file to
463
- * @param options - Additional options for writing the entry file
464
- */
465
- emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
466
- /**
467
- * Resolves a infrastructure virtual file and writes it to the VFS if it does not already exist
468
- *
469
- * @param code - The source code of the infrastructure file
470
- * @param id - The unique identifier of the infrastructure file
471
- * @param options - Additional options for writing the infrastructure file
472
- */
473
- emitInfrastructure: (code: string, id: string, options?: EmitOptions) => Promise<void>;
474
- /**
475
- * Synchronously resolves a infrastructure virtual file and writes it to the VFS if it does not already exist
476
- *
477
- * @param code - The source code of the infrastructure file
478
- * @param id - The unique identifier of the infrastructure file
479
- * @param options - Additional options for writing the infrastructure file
480
- */
481
- emitInfrastructureSync: (code: string, id: string, options?: EmitOptions) => void;
482
- /**
483
- * Generates a checksum representing the current context state
484
- *
485
- * @returns A promise that resolves to a string representing the checksum
486
- */
487
- generateChecksum: () => Promise<string>;
488
- }
489
- /**
490
- * The resolved Powerlines context.
491
- *
492
- * @remarks
493
- * This context is used after the user configuration has been fully resolved and merged with default values, providing access to the final configuration options and utility functions for interacting with the Powerlines engine.
494
- */
495
- type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = any> = Omit<UnresolvedContext<TResolvedConfig, TSystemContext>, "config" | "callHook"> & {
496
- /**
497
- * The fully resolved Powerlines configuration
498
- */
499
- config: TResolvedConfig;
500
- /**
501
- * A setter function to populate the plugin config values provided during execution of the command, such as CLI flags or other parameters that may be relevant to the command being executed. This function can be used to update the context with the plugin configuration values, which may be used during the configuration resolution process to ensure that the final configuration reflects both the user configuration and any plugin configuration provided during execution.
502
- *
503
- * @param config - The plugin configuration values to set.
504
- * @returns A promise that resolves when the plugin configuration values have been set.
505
- */
506
- setPluginConfig: (config: DeepPartial<UserConfig>) => Promise<void>;
507
- /**
508
- * Invokes the configured plugin hooks
509
- *
510
- * @remarks
511
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
512
- *
513
- * @param hook - The hook to call
514
- * @param options - The options to provide to the hook
515
- * @param args - The arguments to pass to the hook
516
- * @returns The result of the hook call
517
- */
518
- callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
519
- environment?: string | EnvironmentContext<any, any>;
520
- }, ...args: InferHookParameters<PluginContext<any, any>, TKey>) => Promise<InferHookReturnType<PluginContext<any, any>, TKey> | undefined>;
521
- };
522
- interface ExecutionContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = any> extends Context<TResolvedConfig, TSystemContext> {
523
- /**
524
- * The unique identifier of the execution context, which can be used for logging and other purposes to distinguish between different executions in the same process.
525
- */
526
- readonly id: string;
527
- /**
528
- * The expected plugins options for the Powerlines project.
529
- *
530
- * @remarks
531
- * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
532
- */
533
- plugins: Plugin<PluginContext<TResolvedConfig, TSystemContext>>[];
534
- /**
535
- * A table for storing the current context for each configured environment
536
- */
537
- environments: Record<string, EnvironmentContext<TResolvedConfig, TSystemContext>>;
538
- /**
539
- * Retrieves the context for a specific environment by name
540
- *
541
- * @throws Will throw an error if the environment does not exist
542
- *
543
- * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
544
- * @returns A promise that resolves to the environment context.
545
- *
546
- * @example
547
- * ```ts
548
- * const devEnv = await apiContext.getEnvironment("development");
549
- * const defaultEnv = await apiContext.getEnvironment();
550
- * ```
551
- */
552
- getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig, TSystemContext>>;
553
- /**
554
- * Safely retrieves the context for a specific environment by name
555
- *
556
- * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
557
- * @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
558
- *
559
- * @example
560
- * ```ts
561
- * const devEnv = await apiContext.getEnvironmentSafe("development");
562
- * const defaultEnv = await apiContext.getEnvironmentSafe();
563
- * ```
564
- *
565
- * @remarks
566
- * This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
567
- * This can be useful in scenarios where the existence of an environment is optional or uncertain.
568
- *
569
- * ```ts
570
- * const testEnv = await apiContext.getEnvironmentSafe("test");
571
- * if (testEnv) {
572
- * // Environment exists, safe to use it
573
- * } else {
574
- * // Environment does not exist, handle accordingly
575
- * }
576
- * ```
577
- *
578
- * Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
579
- */
580
- getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig, TSystemContext> | undefined>;
581
- /**
582
- * A function to copy the context and update the fields for a specific environment
583
- *
584
- * @param environment - The environment configuration to use.
585
- * @returns A new context instance with the updated environment.
586
- */
587
- createEnvironment: (environment: EnvironmentResolvedConfig<TResolvedConfig>["environment"]) => Promise<EnvironmentContext<TResolvedConfig, TSystemContext>>;
588
- /**
589
- * A function to merge all configured environments into a single context
590
- *
591
- * @returns A promise that resolves to the merged environment context.
592
- */
593
- toEnvironment: () => Promise<EnvironmentContext<TResolvedConfig, TSystemContext>>;
594
- /**
595
- * A function used internally to add a plugin to the context and update the configuration options
596
- *
597
- * @danger
598
- * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
599
- *
600
- * @internal
601
- */
602
- unstable_addPlugin: (plugin: PluginConfig<PluginContext<TResolvedConfig, TSystemContext>>) => Promise<void>;
603
- }
604
- interface EnvironmentPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = any> extends Plugin<PluginContext<TResolvedConfig, TSystemContext>> {
605
- /**
606
- * A internal field to store the plugin configuration and context for the environment context
607
- *
608
- * @danger
609
- * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
610
- *
611
- * @internal
612
- */
613
- "~internal": {
614
- /**
615
- * The unique identifier of the plugin, which can be used for logging and other purposes to distinguish between different plugins in the same process.
616
- */
617
- readonly id: string;
618
- /**
619
- * The context for the plugin, which provides access to the Powerlines engine and other utilities for interacting with the build process.
620
- *
621
- * @remarks
622
- * This context is specific to the plugin and environment, allowing for environment-specific modifications without affecting the global context.
623
- */
624
- readonly context: PluginContext<TResolvedConfig, TSystemContext>;
625
- };
626
- }
627
- type SelectHookResultItem<TContext extends PluginContext, TKey extends string> = HooksListItem<TContext, TKey> & {
628
- context: TContext;
629
- };
630
- type SelectHookResult<TContext extends PluginContext, TKey extends string> = SelectHookResultItem<TContext, TKey>[];
631
- interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = any> extends Context<EnvironmentResolvedConfig<TResolvedConfig>, TSystemContext> {
632
- /**
633
- * The unique identifier of the environment associated with this context, which can be used for logging and other purposes to distinguish between different environments in the same process.
634
- */
635
- readonly id: string;
636
- /**
637
- * The expected plugins options for the Powerlines project.
638
- *
639
- * @remarks
640
- * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
641
- */
642
- plugins: EnvironmentPlugin<TResolvedConfig, TSystemContext>[];
643
- /**
644
- * A table holding references to hook functions registered by plugins
645
- */
646
- hooks: HooksList<PluginContext<TResolvedConfig, TSystemContext>>;
647
- /**
648
- * The execution context associated with this environment, which provides access to the project configuration, environment, and utility functions for performing the build. The execution context is used to manage the state and behavior of the build process across multiple environments, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
649
- *
650
- * @danger
651
- * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
652
- *
653
- * @internal
654
- */
655
- unstable_execution: ExecutionContext<TResolvedConfig, TSystemContext>;
656
- /**
657
- * Retrieves the hook handlers for a specific hook name
658
- */
659
- selectHooks: <TKey extends string>(key: TKey, options?: SelectHooksOptions) => SelectHookResult<PluginContext<TResolvedConfig, TSystemContext>, TKey>;
660
- /**
661
- * A function used internally to add a plugin to the context and update the configuration options
662
- *
663
- * @danger
664
- * This field is for internal use only and should not be accessed or modified directly. It is unstable and can be changed at anytime.
665
- *
666
- * @internal
667
- */
668
- unstable_addPlugin: (plugin: PluginConfig<PluginContext<TResolvedConfig, TSystemContext>>) => Promise<void>;
669
- }
670
- interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig, TSystemContext = any> extends Context<EnvironmentResolvedConfig<TResolvedConfig>, TSystemContext> {
671
- /**
672
- * The unique identifier of the plugin associated with this context, which can be used for logging and other purposes to distinguish between different plugins in the same process.
673
- */
674
- readonly id: string;
675
- /**
676
- * The context for the environment associated with this plugin context, which provides access to the Powerlines engine and other utilities for interacting with the build process. This context is specific to the plugin and environment, allowing for environment-specific modifications without affecting the global context.
677
- */
678
- readonly environment: EnvironmentContext;
679
- }
680
- type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
681
- type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
682
- //#endregion
683
- export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EnvironmentContext, EnvironmentPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext };
684
- //# sourceMappingURL=context.d.mts.map