powerlines 0.34.9 → 0.35.1

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 (303) hide show
  1. package/dist/{api-64F6GdFq.d.cts → api-Ch19bYX6.d.cts} +1 -1
  2. package/dist/{api-C8dgNF9j.d.ts → api-DJoWdEeA.d.ts} +1 -1
  3. package/dist/api.cjs +2 -2
  4. package/dist/api.d.cts +3 -3
  5. package/dist/api.d.ts +3 -3
  6. package/dist/api.js +1 -1
  7. package/dist/astro.cjs +4 -4
  8. package/dist/astro.d.cts +2 -2
  9. package/dist/astro.d.ts +2 -2
  10. package/dist/astro.js +3 -3
  11. package/dist/chunk-24F67D36.cjs +12 -0
  12. package/dist/{chunk-WLBT35SV.cjs → chunk-3TJ77HBR.cjs} +5 -5
  13. package/dist/{chunk-3HMEVUF3.js → chunk-4JTXARCZ.js} +3 -3
  14. package/dist/{chunk-JZA7N2M4.js → chunk-4ZM66B4T.js} +3 -3
  15. package/dist/{chunk-MLAI362G.js → chunk-52UMGJQJ.js} +3 -3
  16. package/dist/{chunk-AMPAP7VJ.js → chunk-7GLQATKT.js} +3 -3
  17. package/dist/{chunk-O5QCLZXU.cjs → chunk-AFSF26JE.cjs} +4 -4
  18. package/dist/{chunk-IWD7XNVY.js → chunk-EJZVAP3T.js} +2 -2
  19. package/dist/{chunk-RFPNTMLX.js → chunk-GIOACISS.js} +2 -2
  20. package/dist/{chunk-NJRZDDTZ.cjs → chunk-IJXEMXLH.cjs} +2 -2
  21. package/dist/{chunk-BY2N3ZJV.js → chunk-JEP7MDIY.js} +67 -32
  22. package/dist/{chunk-MBPLCGMU.js → chunk-LUTJ2RSQ.js} +3 -3
  23. package/dist/{chunk-V64P3LPH.cjs → chunk-OOZPDTJM.cjs} +67 -32
  24. package/dist/{chunk-IMRQNWR4.cjs → chunk-QMYQNHIP.cjs} +4 -4
  25. package/dist/chunk-S6KFRQYJ.cjs +12 -0
  26. package/dist/{chunk-BCF2FSIU.cjs → chunk-UMU2MF3G.cjs} +2 -2
  27. package/dist/{context-CD3z3bug.d.ts → context-CWyF5B_6.d.ts} +18 -14
  28. package/dist/{context-CybU4gzB.d.cts → context-HIW4qjIs.d.cts} +18 -14
  29. package/dist/esbuild.cjs +6 -6
  30. package/dist/esbuild.d.cts +2 -2
  31. package/dist/esbuild.d.ts +2 -2
  32. package/dist/esbuild.js +3 -3
  33. package/dist/farm.cjs +3 -3
  34. package/dist/farm.d.cts +2 -2
  35. package/dist/farm.d.ts +2 -2
  36. package/dist/farm.js +2 -2
  37. package/dist/index.cjs +15 -15
  38. package/dist/index.d.cts +4 -4
  39. package/dist/index.d.ts +4 -4
  40. package/dist/index.js +4 -4
  41. package/dist/lib/{api-WGXMngpt.d.ts → api-B8aBolnU.d.ts} +1 -1
  42. package/dist/lib/{api-C-muqDwC.d.cts → api-C6p2jxI9.d.cts} +1 -1
  43. package/dist/lib/build/esbuild.d.cts +2 -2
  44. package/dist/lib/build/esbuild.d.ts +2 -2
  45. package/dist/lib/build/index.d.cts +4 -4
  46. package/dist/lib/build/index.d.ts +4 -4
  47. package/dist/lib/build/rolldown.d.cts +2 -2
  48. package/dist/lib/build/rolldown.d.ts +2 -2
  49. package/dist/lib/build/rollup.d.cts +2 -2
  50. package/dist/lib/build/rollup.d.ts +2 -2
  51. package/dist/lib/build/rspack.d.cts +2 -2
  52. package/dist/lib/build/rspack.d.ts +2 -2
  53. package/dist/lib/build/tsdown.d.cts +2 -2
  54. package/dist/lib/build/tsdown.d.ts +2 -2
  55. package/dist/lib/build/tsup.d.cts +2 -2
  56. package/dist/lib/build/tsup.d.ts +2 -2
  57. package/dist/lib/build/unbuild.d.cts +4 -4
  58. package/dist/lib/build/unbuild.d.ts +4 -4
  59. package/dist/lib/build/vite.d.cts +2 -2
  60. package/dist/lib/build/vite.d.ts +2 -2
  61. package/dist/lib/build/webpack.d.cts +2 -2
  62. package/dist/lib/build/webpack.d.ts +2 -2
  63. package/dist/lib/{chunk-2KYZLGIZ.js → chunk-25C6FCLA.js} +4 -4
  64. package/dist/lib/{chunk-2KYZLGIZ.js.map → chunk-25C6FCLA.js.map} +1 -1
  65. package/dist/lib/{chunk-VPZU5BTK.js → chunk-3BXSIJGU.js} +17 -6
  66. package/dist/lib/chunk-3BXSIJGU.js.map +1 -0
  67. package/dist/lib/{chunk-UWOD2XLX.cjs → chunk-53LK7IG5.cjs} +17 -3
  68. package/dist/lib/chunk-53LK7IG5.cjs.map +1 -0
  69. package/dist/lib/{chunk-RRPFZDGI.cjs → chunk-7XTQMSUB.cjs} +6 -6
  70. package/dist/lib/{chunk-RRPFZDGI.cjs.map → chunk-7XTQMSUB.cjs.map} +1 -1
  71. package/dist/lib/{chunk-HVL3SPVN.js → chunk-FM7R4KTA.js} +40 -30
  72. package/dist/lib/chunk-FM7R4KTA.js.map +1 -0
  73. package/dist/lib/{chunk-VM6LBJ3L.cjs → chunk-NOABJWDK.cjs} +45 -35
  74. package/dist/lib/chunk-NOABJWDK.cjs.map +1 -0
  75. package/dist/lib/{chunk-MBGLVIJD.js → chunk-Q7KX7QCP.js} +3 -3
  76. package/dist/lib/{chunk-MBGLVIJD.js.map → chunk-Q7KX7QCP.js.map} +1 -1
  77. package/dist/lib/{chunk-NXUMUI2Z.js → chunk-TB2ZWKZN.js} +17 -3
  78. package/dist/lib/chunk-TB2ZWKZN.js.map +1 -0
  79. package/dist/lib/{chunk-UZSTEOLF.cjs → chunk-VAIDDF5X.cjs} +19 -8
  80. package/dist/lib/chunk-VAIDDF5X.cjs.map +1 -0
  81. package/dist/lib/{chunk-XXQREHLK.cjs → chunk-VMWMBMXG.cjs} +13 -13
  82. package/dist/lib/{chunk-XXQREHLK.cjs.map → chunk-VMWMBMXG.cjs.map} +1 -1
  83. package/dist/lib/{config-ba1qwxTg.d.ts → config-CGGo9KcK.d.ts} +17 -13
  84. package/dist/lib/{config-Lr7p1CKw.d.cts → config-CYz6Kd4L.d.cts} +17 -13
  85. package/dist/lib/config-file.d.cts +2 -2
  86. package/dist/lib/config-file.d.ts +2 -2
  87. package/dist/lib/contexts/api-context.cjs +5 -5
  88. package/dist/lib/contexts/api-context.d.cts +4 -4
  89. package/dist/lib/contexts/api-context.d.ts +4 -4
  90. package/dist/lib/contexts/api-context.js +4 -4
  91. package/dist/lib/contexts/context.cjs +3 -3
  92. package/dist/lib/contexts/context.d.cts +4 -4
  93. package/dist/lib/contexts/context.d.ts +4 -4
  94. package/dist/lib/contexts/context.js +2 -2
  95. package/dist/lib/contexts/environment-context.cjs +4 -4
  96. package/dist/lib/contexts/environment-context.d.cts +4 -4
  97. package/dist/lib/contexts/environment-context.d.ts +4 -4
  98. package/dist/lib/contexts/environment-context.js +3 -3
  99. package/dist/lib/contexts/index.cjs +7 -7
  100. package/dist/lib/contexts/index.d.cts +4 -4
  101. package/dist/lib/contexts/index.d.ts +4 -4
  102. package/dist/lib/contexts/index.js +4 -4
  103. package/dist/lib/contexts/plugin-context.d.cts +4 -4
  104. package/dist/lib/contexts/plugin-context.d.ts +4 -4
  105. package/dist/lib/entry.d.cts +2 -2
  106. package/dist/lib/entry.d.ts +2 -2
  107. package/dist/lib/fs/index.cjs +2 -2
  108. package/dist/lib/fs/index.d.cts +2 -2
  109. package/dist/lib/fs/index.d.ts +2 -2
  110. package/dist/lib/fs/index.js +1 -1
  111. package/dist/lib/fs/storage/base.d.cts +1 -1
  112. package/dist/lib/fs/storage/base.d.ts +1 -1
  113. package/dist/lib/fs/storage/file-system.d.cts +1 -1
  114. package/dist/lib/fs/storage/file-system.d.ts +1 -1
  115. package/dist/lib/fs/storage/index.d.cts +1 -1
  116. package/dist/lib/fs/storage/index.d.ts +1 -1
  117. package/dist/lib/fs/storage/virtual.d.cts +1 -1
  118. package/dist/lib/fs/storage/virtual.d.ts +1 -1
  119. package/dist/lib/fs/vfs.cjs +2 -2
  120. package/dist/lib/fs/vfs.d.cts +2 -2
  121. package/dist/lib/fs/vfs.d.ts +2 -2
  122. package/dist/lib/fs/vfs.js +1 -1
  123. package/dist/lib/{fs-BkpNEsxT.d.ts → fs-Mx46r7JY.d.cts} +2 -2
  124. package/dist/lib/{fs-BkpNEsxT.d.cts → fs-Mx46r7JY.d.ts} +2 -2
  125. package/dist/lib/index.cjs +10 -10
  126. package/dist/lib/index.d.cts +5 -5
  127. package/dist/lib/index.d.ts +5 -5
  128. package/dist/lib/index.js +5 -5
  129. package/dist/lib/{internal-Cy15nTJD.d.ts → internal-DoGteMoK.d.ts} +2 -2
  130. package/dist/lib/{internal-CSgMKSqU.d.cts → internal-YI5K6rmd.d.cts} +2 -2
  131. package/dist/lib/logger.d.cts +2 -2
  132. package/dist/lib/logger.d.ts +2 -2
  133. package/dist/lib/typescript/import-transformer.d.cts +2 -2
  134. package/dist/lib/typescript/import-transformer.d.ts +2 -2
  135. package/dist/lib/typescript/index.d.cts +2 -2
  136. package/dist/lib/typescript/index.d.ts +2 -2
  137. package/dist/lib/typescript/ts-morph.d.cts +2 -2
  138. package/dist/lib/typescript/ts-morph.d.ts +2 -2
  139. package/dist/lib/unplugin/factory.cjs +6 -6
  140. package/dist/lib/unplugin/factory.d.cts +4 -4
  141. package/dist/lib/unplugin/factory.d.ts +4 -4
  142. package/dist/lib/unplugin/factory.js +5 -5
  143. package/dist/lib/unplugin/helpers.d.cts +2 -2
  144. package/dist/lib/unplugin/helpers.d.ts +2 -2
  145. package/dist/lib/unplugin/index.cjs +6 -6
  146. package/dist/lib/unplugin/index.d.cts +4 -4
  147. package/dist/lib/unplugin/index.d.ts +4 -4
  148. package/dist/lib/unplugin/index.js +5 -5
  149. package/dist/lib/unplugin/plugin.d.cts +4 -4
  150. package/dist/lib/unplugin/plugin.d.ts +4 -4
  151. package/dist/lib/{unplugin-C1FUzEE1.d.ts → unplugin-DYkHIqSU.d.ts} +2 -2
  152. package/dist/lib/{unplugin-DQ_UxGcQ.d.cts → unplugin-Dx_uD4rQ.d.cts} +2 -2
  153. package/dist/lib/utilities/bundle.d.cts +2 -2
  154. package/dist/lib/utilities/bundle.d.ts +2 -2
  155. package/dist/lib/utilities/cache.d.cts +2 -2
  156. package/dist/lib/utilities/cache.d.ts +2 -2
  157. package/dist/lib/utilities/file-header.d.cts +2 -2
  158. package/dist/lib/utilities/file-header.d.ts +2 -2
  159. package/dist/lib/utilities/index.d.cts +2 -2
  160. package/dist/lib/utilities/index.d.ts +2 -2
  161. package/dist/lib/utilities/meta.d.cts +2 -2
  162. package/dist/lib/utilities/meta.d.ts +2 -2
  163. package/dist/lib/utilities/resolve.d.cts +2 -2
  164. package/dist/lib/utilities/resolve.d.ts +2 -2
  165. package/dist/lib/utilities/source-file.d.cts +2 -2
  166. package/dist/lib/utilities/source-file.d.ts +2 -2
  167. package/dist/lib/utilities/source-map.d.cts +2 -2
  168. package/dist/lib/utilities/source-map.d.ts +2 -2
  169. package/dist/lib/utilities/worker.d.cts +2 -2
  170. package/dist/lib/utilities/worker.d.ts +2 -2
  171. package/dist/lib/utilities/write-file.d.cts +2 -2
  172. package/dist/lib/utilities/write-file.d.ts +2 -2
  173. package/dist/next.cjs +4 -4
  174. package/dist/next.js +3 -3
  175. package/dist/nuxt.cjs +7 -7
  176. package/dist/nuxt.d.cts +2 -2
  177. package/dist/nuxt.d.ts +2 -2
  178. package/dist/nuxt.js +5 -5
  179. package/dist/plugin-utils/{chunk-X4BI25Z5.js → chunk-CTG3PTA6.js} +3 -3
  180. package/dist/plugin-utils/chunk-CTG3PTA6.js.map +1 -0
  181. package/dist/plugin-utils/chunk-DO3S34NW.cjs +33 -0
  182. package/dist/plugin-utils/chunk-DO3S34NW.cjs.map +1 -0
  183. package/dist/plugin-utils/{chunk-QQ63YK2G.js → chunk-DYCWCPQP.js} +3 -3
  184. package/dist/plugin-utils/{chunk-QQ63YK2G.js.map → chunk-DYCWCPQP.js.map} +1 -1
  185. package/dist/plugin-utils/{chunk-UXLKUCEY.cjs → chunk-FINF3V34.cjs} +6 -6
  186. package/dist/plugin-utils/{chunk-UXLKUCEY.cjs.map → chunk-FINF3V34.cjs.map} +1 -1
  187. package/dist/plugin-utils/{chunk-VJGI676W.cjs → chunk-IZMPXMCN.cjs} +3 -3
  188. package/dist/plugin-utils/chunk-IZMPXMCN.cjs.map +1 -0
  189. package/dist/plugin-utils/chunk-LRSYWPP2.js +31 -0
  190. package/dist/plugin-utils/chunk-LRSYWPP2.js.map +1 -0
  191. package/dist/plugin-utils/chunk-ORSVDVXT.js +25 -0
  192. package/dist/plugin-utils/chunk-ORSVDVXT.js.map +1 -0
  193. package/dist/plugin-utils/chunk-VW6I3FEY.cjs +27 -0
  194. package/dist/plugin-utils/chunk-VW6I3FEY.cjs.map +1 -0
  195. package/dist/plugin-utils/{context-D7SEhuVP.d.ts → context-BY72cezC.d.cts} +21 -17
  196. package/dist/plugin-utils/{context-D7SEhuVP.d.cts → context-BY72cezC.d.ts} +21 -17
  197. package/dist/plugin-utils/context-helpers.d.cts +2 -2
  198. package/dist/plugin-utils/context-helpers.d.ts +2 -2
  199. package/dist/plugin-utils/enforce.cjs +5 -5
  200. package/dist/plugin-utils/enforce.d.cts +4 -3
  201. package/dist/plugin-utils/enforce.d.ts +4 -3
  202. package/dist/plugin-utils/enforce.js +4 -4
  203. package/dist/plugin-utils/extend.cjs +4 -4
  204. package/dist/plugin-utils/extend.d.cts +6 -3
  205. package/dist/plugin-utils/extend.d.ts +6 -3
  206. package/dist/plugin-utils/extend.js +3 -3
  207. package/dist/plugin-utils/get-config-path.d.cts +2 -2
  208. package/dist/plugin-utils/get-config-path.d.ts +2 -2
  209. package/dist/plugin-utils/helpers.cjs +14 -14
  210. package/dist/plugin-utils/helpers.d.cts +2 -2
  211. package/dist/plugin-utils/helpers.d.ts +2 -2
  212. package/dist/plugin-utils/helpers.js +1 -1
  213. package/dist/plugin-utils/index.cjs +20 -20
  214. package/dist/plugin-utils/index.d.cts +2 -2
  215. package/dist/plugin-utils/index.d.ts +2 -2
  216. package/dist/plugin-utils/index.js +4 -4
  217. package/dist/plugin-utils/merge.cjs +3 -3
  218. package/dist/plugin-utils/merge.d.cts +2 -2
  219. package/dist/plugin-utils/merge.d.ts +2 -2
  220. package/dist/plugin-utils/merge.js +2 -2
  221. package/dist/plugin-utils/paths.d.cts +2 -2
  222. package/dist/plugin-utils/paths.d.ts +2 -2
  223. package/dist/rolldown.cjs +6 -6
  224. package/dist/rolldown.d.cts +2 -2
  225. package/dist/rolldown.d.ts +2 -2
  226. package/dist/rolldown.js +3 -3
  227. package/dist/rollup.cjs +3 -3
  228. package/dist/rollup.d.cts +2 -2
  229. package/dist/rollup.d.ts +2 -2
  230. package/dist/rollup.js +2 -2
  231. package/dist/rspack.cjs +3 -3
  232. package/dist/rspack.d.cts +2 -2
  233. package/dist/rspack.d.ts +2 -2
  234. package/dist/rspack.js +2 -2
  235. package/dist/tsdown.cjs +4 -4
  236. package/dist/tsdown.js +3 -3
  237. package/dist/tsup.cjs +4 -4
  238. package/dist/tsup.js +3 -3
  239. package/dist/types/api.d.cts +3 -3
  240. package/dist/types/api.d.ts +3 -3
  241. package/dist/types/babel.d.cts +2 -2
  242. package/dist/types/babel.d.ts +2 -2
  243. package/dist/types/commands.d.cts +2 -2
  244. package/dist/types/commands.d.ts +2 -2
  245. package/dist/types/config.d.cts +1 -1
  246. package/dist/types/config.d.ts +1 -1
  247. package/dist/types/context.cjs +2 -2
  248. package/dist/types/context.d.cts +2 -2
  249. package/dist/types/context.d.ts +2 -2
  250. package/dist/types/context.js +1 -1
  251. package/dist/types/fs.cjs +3 -3
  252. package/dist/types/fs.d.cts +2 -2
  253. package/dist/types/fs.d.ts +2 -2
  254. package/dist/types/fs.js +1 -1
  255. package/dist/types/hooks.d.cts +2 -2
  256. package/dist/types/hooks.d.ts +2 -2
  257. package/dist/types/index.cjs +5 -5
  258. package/dist/types/index.d.cts +3 -3
  259. package/dist/types/index.d.ts +3 -3
  260. package/dist/types/index.js +2 -2
  261. package/dist/types/internal.d.cts +3 -3
  262. package/dist/types/internal.d.ts +3 -3
  263. package/dist/types/plugin.d.cts +2 -2
  264. package/dist/types/plugin.d.ts +2 -2
  265. package/dist/types/resolved.d.cts +1 -1
  266. package/dist/types/resolved.d.ts +1 -1
  267. package/dist/types/unplugin.d.cts +3 -3
  268. package/dist/types/unplugin.d.ts +3 -3
  269. package/dist/unloader.cjs +3 -3
  270. package/dist/unloader.d.cts +2 -2
  271. package/dist/unloader.d.ts +2 -2
  272. package/dist/unloader.js +2 -2
  273. package/dist/unplugin.cjs +5 -5
  274. package/dist/unplugin.d.cts +3 -3
  275. package/dist/unplugin.d.ts +3 -3
  276. package/dist/unplugin.js +3 -3
  277. package/dist/vite.cjs +6 -6
  278. package/dist/vite.d.cts +2 -2
  279. package/dist/vite.d.ts +2 -2
  280. package/dist/vite.js +3 -3
  281. package/dist/webpack.cjs +6 -6
  282. package/dist/webpack.d.cts +2 -2
  283. package/dist/webpack.d.ts +2 -2
  284. package/dist/webpack.js +3 -3
  285. package/package.json +2 -2
  286. package/dist/chunk-2GKVCE3E.cjs +0 -12
  287. package/dist/chunk-JTZS2TSQ.cjs +0 -12
  288. package/dist/lib/chunk-HVL3SPVN.js.map +0 -1
  289. package/dist/lib/chunk-NXUMUI2Z.js.map +0 -1
  290. package/dist/lib/chunk-UWOD2XLX.cjs.map +0 -1
  291. package/dist/lib/chunk-UZSTEOLF.cjs.map +0 -1
  292. package/dist/lib/chunk-VM6LBJ3L.cjs.map +0 -1
  293. package/dist/lib/chunk-VPZU5BTK.js.map +0 -1
  294. package/dist/plugin-utils/chunk-36OM2X4L.js +0 -30
  295. package/dist/plugin-utils/chunk-36OM2X4L.js.map +0 -1
  296. package/dist/plugin-utils/chunk-DQDBFO67.js +0 -23
  297. package/dist/plugin-utils/chunk-DQDBFO67.js.map +0 -1
  298. package/dist/plugin-utils/chunk-EWPAHNGW.cjs +0 -25
  299. package/dist/plugin-utils/chunk-EWPAHNGW.cjs.map +0 -1
  300. package/dist/plugin-utils/chunk-ID47RJFS.cjs +0 -32
  301. package/dist/plugin-utils/chunk-ID47RJFS.cjs.map +0 -1
  302. package/dist/plugin-utils/chunk-VJGI676W.cjs.map +0 -1
  303. package/dist/plugin-utils/chunk-X4BI25Z5.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk63DAS6TJ_cjs = require('./chunk-63DAS6TJ.cjs');
4
- var chunkUZSTEOLF_cjs = require('./chunk-UZSTEOLF.cjs');
4
+ var chunkVAIDDF5X_cjs = require('./chunk-VAIDDF5X.cjs');
5
5
  var chunkPK6SKIKE_cjs = require('./chunk-PK6SKIKE.cjs');
6
6
  var resolve = require('@stryke/fs/resolve');
7
7
  var isFunction = require('@stryke/type-checks/is-function');
@@ -18,7 +18,7 @@ var PLUGIN_NON_HOOK_FIELDS = [
18
18
  ];
19
19
 
20
20
  // src/lib/contexts/environment-context.ts
21
- var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkUZSTEOLF_cjs.PowerlinesContext {
21
+ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends chunkVAIDDF5X_cjs.PowerlinesContext {
22
22
  static {
23
23
  chunkPK6SKIKE_cjs.__name(this, "PowerlinesEnvironmentContext");
24
24
  }
@@ -67,10 +67,10 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
67
67
  if (!result || isObject.isObject(result) && Object.keys(result).length === 0) {
68
68
  return;
69
69
  }
70
- if (chunkUZSTEOLF_cjs.isPluginConfig(result)) {
70
+ if (chunkVAIDDF5X_cjs.isPluginConfig(result)) {
71
71
  return this.$$internal.addPlugin(result);
72
72
  }
73
- resolvedPlugin = chunkUZSTEOLF_cjs.isPlugin(result) ? result : plugin;
73
+ resolvedPlugin = chunkVAIDDF5X_cjs.isPlugin(result) ? result : plugin;
74
74
  }
75
75
  const context = chunk63DAS6TJ_cjs.createPluginContext(resolvedPlugin, this);
76
76
  this.plugins.push({
@@ -80,28 +80,28 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
80
80
  this.#hooks = Object.keys(resolvedPlugin).filter((key) => !PLUGIN_NON_HOOK_FIELDS.includes(key)).reduce((ret, key) => {
81
81
  const hook = key;
82
82
  const pluginHook = resolvedPlugin[hook];
83
- if (!chunkUZSTEOLF_cjs.isPluginHook(pluginHook)) {
83
+ if (!chunkVAIDDF5X_cjs.isPluginHook(pluginHook)) {
84
84
  return ret;
85
85
  }
86
- if (!chunkUZSTEOLF_cjs.isHookExternal(hook)) {
86
+ if (!chunkVAIDDF5X_cjs.isHookExternal(hook)) {
87
87
  ret[hook] ??= {};
88
88
  if (resolvedPlugin.enforce) {
89
89
  ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];
90
- chunkUZSTEOLF_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
90
+ chunkVAIDDF5X_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${resolvedPlugin.enforce}Enforced`]);
91
91
  return ret;
92
92
  }
93
93
  if (isFunction.isFunction(pluginHook) || !pluginHook.order) {
94
94
  ret[hook].normal ??= [];
95
- chunkUZSTEOLF_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
95
+ chunkVAIDDF5X_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook].normal);
96
96
  return ret;
97
97
  }
98
98
  ret[hook][`${pluginHook.order}Ordered`] ??= [];
99
- chunkUZSTEOLF_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
99
+ chunkVAIDDF5X_cjs.addPluginHook(context, resolvedPlugin, pluginHook, ret[hook][`${pluginHook.order}Ordered`]);
100
100
  } else {
101
101
  ret[hook] ??= [];
102
102
  ret[hook].push({
103
103
  plugin: resolvedPlugin,
104
- hook: chunkUZSTEOLF_cjs.getHookHandler(pluginHook).bind(context)
104
+ hook: chunkVAIDDF5X_cjs.getHookHandler(pluginHook).bind(context)
105
105
  });
106
106
  }
107
107
  return ret;
@@ -113,7 +113,7 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
113
113
  selectHooks(hook, options) {
114
114
  const result = [];
115
115
  if (this.hooks[hook]) {
116
- if (!chunkUZSTEOLF_cjs.isHookExternal(hook)) {
116
+ if (!chunkVAIDDF5X_cjs.isHookExternal(hook)) {
117
117
  const hooks = this.hooks[hook];
118
118
  if (options?.order) {
119
119
  if (options?.order === "pre") {
@@ -203,5 +203,5 @@ var PowerlinesEnvironmentContext = class _PowerlinesEnvironmentContext extends c
203
203
  };
204
204
 
205
205
  exports.PowerlinesEnvironmentContext = PowerlinesEnvironmentContext;
206
- //# sourceMappingURL=chunk-XXQREHLK.cjs.map
207
- //# sourceMappingURL=chunk-XXQREHLK.cjs.map
206
+ //# sourceMappingURL=chunk-VMWMBMXG.cjs.map
207
+ //# sourceMappingURL=chunk-VMWMBMXG.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/plugin.ts","../../src/lib/contexts/environment-context.ts"],"names":["PLUGIN_NON_HOOK_FIELDS","PowerlinesEnvironmentContext","PowerlinesContext","fromConfig","workspaceConfig","config","context","init","powerlinesPath","resolvePackage","Error","environment","plugins","hooks","addPlugin","plugin","resolvedPlugin","isFunction","applyToEnvironment","result","Promise","resolve","isObject","Object","keys","length","isPluginConfig","$$internal","isPlugin","createPluginContext","push","filter","key","includes","reduce","ret","hook","pluginHook","isPluginHook","isHookExternal","enforce","addPluginHook","order","normal","getHookHandler","bind","selectHooks","options","preOrdered","map","h","find","p","name","handle","handler","preEnforced","postOrdered","postEnforced","resolvedConfig"],"mappings":";;;;;;;;;;AA2YO,IAAMA,sBAAAA,GAAyB;AACpC,EAAA,MAAA;AACA,EAAA,KAAA;AACA,EAAA,SAAA;AACA,EAAA,QAAA;AACA,EAAA,WAAA;AACA,EAAA;;;;AClWK,IAAMC,4BAAAA,GAAN,MAAMA,6BAAAA,SAGHC,mCAAAA,CAAAA;EAlDV;;;;;;AAwDE,EAAA,MAAA,GAAoD,EAAC;;;;;;;;EAWrD,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AAA;AACxD,QAAA;MACF,CAAA,MAAO;AACLvB,QAAAA,MAAAA,CAAOW,IAAAA,CAAI,GACN,IAAA,CAAKjB,KAAAA,CAAMuB,IAAAA,CAAAA,CAAMa,GAAAA,CAAIC,CAAAA,CAAAA,KAAAA;AACtB,UAAA,MAAMnC,MAAAA,GAAS,IAAA,CAAKH,OAAAA,CAAQuC,IAAAA,CAC1BC,CAAAA,CAAAA,KAAKA,CAAAA,CAAErC,MAAAA,CAAOsC,IAAAA,KAASH,CAAAA,CAAEnC,MAAAA,CAAOsC,IAAI,CAAA;AAEtC,UAAA,IAAI,CAACtC,MAAAA,EAAQ;AACX,YAAA,MAAM,IAAIL,KAAAA,CACR,CAAA,0CAAA,EAA6CwC,CAAAA,CAAEnC,MAAAA,CAAOsC,IAAI,CAAA,EAAA,CAAI,CAAA;AAElE,UAAA;AAEA,UAAA,OAAO;AACLC,YAAAA,MAAAA,EAAQJ,CAAAA,CAAEK,OAAAA;AACVjD,YAAAA,OAAAA,EAASS,MAAAA,CAAOT;AAClB,WAAA;AACF,QAAA,CAAA,CAAA,CAAA;AAEJ,MAAA;AACF,IAAA;AAEA,IAAA,OAAOa,MAAAA;AACT,EAAA;AAEA,EAAA,WAAA,CACEd,QACAD,eAAAA,EACA;AACA,IAAA,KAAA,CAAMA,eAAAA,CAAAA;AAEN,IAAA,IAAA,CAAKuD,cAAAA,GAAiBtD,MAAAA;AACxB,EAAA;AACF","file":"chunk-XXQREHLK.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 type { ArrayValues } from \"@stryke/types/array\";\nimport type { FunctionLike, MaybePromise } from \"@stryke/types/base\";\nimport type {\n ExternalIdResult,\n HookFilter,\n TransformResult,\n UnpluginOptions\n} from \"unplugin\";\nimport type { UnpluginBuildVariant } from \"./build\";\nimport type { CommandType } from \"./commands\";\nimport type { EnvironmentConfig, PluginConfig } from \"./config\";\nimport type {\n BuildPluginContext,\n PluginContext,\n UnresolvedContext\n} from \"./context\";\nimport type { EnvironmentResolvedConfig, ResolvedConfig } from \"./resolved\";\n\nexport interface PluginHookObject<\n THookFunction extends FunctionLike,\n TFilter extends keyof HookFilter = never\n> {\n /**\n * The order in which the plugin should be applied.\n */\n order?: \"pre\" | \"post\" | null | undefined;\n\n /**\n * A filter to determine when the hook should be called.\n */\n filter?: Pick<HookFilter, TFilter>;\n\n /**\n * The hook function to be called.\n */\n handler: THookFunction;\n}\n\nexport type PluginHook<\n THookFunction extends FunctionLike,\n TFilter extends keyof HookFilter = never\n> = THookFunction | PluginHookObject<THookFunction, TFilter>;\n\n/**\n * A result returned by the plugin from the `types` hook that describes the declaration types output file.\n */\nexport interface TypesResult {\n directives?: string[];\n code: string;\n}\n\ntype DeepPartial<T> = {\n [K in keyof T]?: DeepPartial<T[K]>;\n};\n\nexport type ConfigResult<TContext extends PluginContext = PluginContext> =\n DeepPartial<TContext[\"config\"]> & Record<string, any>;\n\nexport interface BasePluginHookFunctions<\n TContext extends PluginContext = PluginContext\n> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config: (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<ConfigResult<TContext>>;\n\n /**\n * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @remarks\n * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.\n *\n * @see https://vitejs.dev/guide/api-plugin#configenvironment\n *\n * @param this - The build context.\n * @param name - The name of the environment being configured.\n * @param environment - The Vite-like environment object containing information about the current build environment.\n * @returns A promise that resolves when the hook is complete.\n */\n configEnvironment: (\n this: TContext,\n name: string,\n environment: EnvironmentConfig\n ) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;\n\n /**\n * A hook that is called when the plugin is resolved.\n *\n * @see https://vitejs.dev/guide/api-plugin#configresolved\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n configResolved: (this: TContext) => MaybePromise<void>;\n\n /**\n * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.\n *\n * @param this - The build context.\n * @param code - The source code to generate types for.\n * @returns A promise that resolves when the hook is complete.\n */\n types: (\n this: TContext,\n code: string\n ) => MaybePromise<TypesResult | string | undefined | null>;\n\n /**\n * A hook that is called at the start of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildStart: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called at the end of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildEnd: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called to transform the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param code - The source code to transform.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n transform: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n code: string,\n id: string\n ) => MaybePromise<TransformResult>;\n\n /**\n * A hook that is called to load the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n load: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string\n ) => MaybePromise<TransformResult>;\n\n /**\n * A hook that is called to resolve the identifier of the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @param importer - The importer of the source code.\n * @param options - The options for resolving the identifier.\n * @returns A promise that resolves when the hook is complete.\n */\n resolveId: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string,\n importer: string | undefined,\n options: { isEntry: boolean }\n ) => MaybePromise<string | ExternalIdResult | null | undefined>;\n\n /**\n * A hook that is called to write the bundle to disk.\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n writeBundle: (this: TContext) => MaybePromise<void>;\n}\n\nexport type BuildPlugin<\n TContext extends PluginContext = PluginContext,\n TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant,\n TOptions extends Required<UnpluginOptions>[TBuildVariant] =\n Required<UnpluginOptions>[TBuildVariant]\n> = {\n [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike\n ? (\n this: ThisParameterType<TOptions[TKey]> & TContext,\n ...args: Parameters<TOptions[TKey]>\n ) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>>\n : TOptions[TKey];\n};\n\nexport type ExternalPluginHookFunctionsVariant<\n TContext extends PluginContext = PluginContext,\n TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant\n> = {\n [TKey in keyof BuildPlugin<TContext, TBuildVariant> &\n string as `${TBuildVariant}:${TKey}`]: BuildPlugin<\n TContext,\n TBuildVariant\n >[TKey];\n};\n\nexport type ExternalPluginHookFunctions<TContext extends PluginContext> =\n ExternalPluginHookFunctionsVariant<TContext, \"vite\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"esbuild\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"rolldown\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"rollup\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"webpack\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"rspack\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"farm\">;\n\nexport type PluginHookFunctions<\n TContext extends PluginContext = PluginContext\n> = BasePluginHookFunctions<TContext> & ExternalPluginHookFunctions<TContext>;\n\nexport type PluginHooks<TContext extends PluginContext = PluginContext> = {\n [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<\n BasePluginHookFunctions<TContext>[TKey]\n >;\n} & {\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config:\n | PluginHook<\n (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<ConfigResult<TContext>>\n >\n | ConfigResult<TContext>;\n\n /**\n * A hook that is called to transform the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param code - The source code to transform.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n transform: PluginHook<\n (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n code: string,\n id: string\n ) => MaybePromise<TransformResult>,\n \"code\" | \"id\"\n >;\n\n /**\n * A hook that is called to load the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n load: PluginHook<\n (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string\n ) => MaybePromise<TransformResult>,\n \"id\"\n >;\n\n /**\n * A hook that is called to resolve the identifier of the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @param importer - The importer of the source code.\n * @param options - The options for resolving the identifier.\n * @returns A promise that resolves when the hook is complete.\n */\n resolveId: PluginHook<\n (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string,\n importer: string | undefined,\n options: { isEntry: boolean }\n ) => MaybePromise<string | ExternalIdResult | null | undefined>,\n \"id\"\n >;\n};\n\nexport type PluginBuildPlugins<TContext extends PluginContext = PluginContext> =\n {\n [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<\n TContext,\n TBuildVariant\n >;\n };\n\nexport interface Plugin<\n TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>\n>\n extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {\n /**\n * The name of the plugin, for use in deduplication, error messages and logs.\n */\n name: string;\n\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api?: Record<string, any>;\n\n /**\n * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.\n *\n * @remarks\n * The Plugin invocation order is as follows:\n * - `enforce: 'pre'` plugins\n * - `order: 'pre'` plugin hooks\n * - any other plugins (normal)\n * - `order: 'post'` plugin hooks\n * - `enforce: 'post'` plugins\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering\n * @see https://rollupjs.org/plugin-development/#build-hooks\n * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post\n * @see https://esbuild.github.io/plugins/#concepts\n */\n enforce?: \"pre\" | \"post\";\n\n /**\n * A function to determine if two plugins are the same and can be de-duplicated.\n *\n * @remarks\n * If this is not provided, plugins are de-duplicated by comparing their names.\n *\n * @param other - The other plugin to compare against.\n * @returns `true` if the two plugins are the same, `false` otherwise.\n */\n dedupe?: false | ((other: Plugin<TContext>) => boolean);\n\n /**\n * A list of pre-requisite plugins that must be loaded before this plugin can be used.\n */\n dependsOn?: PluginConfig<TContext>[];\n\n /**\n * Define environments where this plugin should be active. By default, the plugin is active in all environments.\n *\n * @param environment - The environment to check.\n * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.\n */\n applyToEnvironment?: (\n environment: EnvironmentResolvedConfig\n ) => boolean | PluginConfig<TContext>;\n}\n\nexport const PLUGIN_NON_HOOK_FIELDS = [\n \"name\",\n \"api\",\n \"enforce\",\n \"dedupe\",\n \"dependsOn\",\n \"applyToEnvironment\"\n] as const;\n\nexport type PluginNonHookFields =\n | ArrayValues<typeof PLUGIN_NON_HOOK_FIELDS>\n | UnpluginBuildVariant;\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { ArrayValues } from \"@stryke/types/array\";\nimport {\n addPluginHook,\n getHookHandler,\n isHookExternal,\n isPlugin,\n isPluginConfig,\n isPluginHook\n} from \"../../plugin-utils/helpers\";\nimport { WorkspaceConfig } from \"../../types/config\";\nimport {\n EnvironmentContext,\n EnvironmentContextPlugin,\n PluginContext,\n SelectHooksOptions,\n SelectHooksResult\n} from \"../../types/context\";\nimport { BaseHooksList, HookKeys, HooksList } from \"../../types/hooks\";\nimport { Plugin, PLUGIN_NON_HOOK_FIELDS } from \"../../types/plugin\";\nimport {\n EnvironmentResolvedConfig,\n ResolvedConfig\n} from \"../../types/resolved\";\nimport { PowerlinesContext } from \"./context\";\nimport { createPluginContext } from \"./plugin-context\";\n\nexport class PowerlinesEnvironmentContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n>\n extends PowerlinesContext<TResolvedConfig>\n implements EnvironmentContext<TResolvedConfig>\n{\n /**\n * The hooks registered by plugins in this environment\n */\n #hooks: HooksList<PluginContext<TResolvedConfig>> = {} as HooksList<\n PluginContext<TResolvedConfig>\n >;\n\n /**\n * Create a new Storm context from the workspace root and user config.\n *\n * @param workspaceConfig - The root directory of the workspace.\n * @param config - The user configuration options.\n * @returns A promise that resolves to the new context.\n */\n public static async fromConfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n >(\n workspaceConfig: WorkspaceConfig,\n config: TResolvedConfig\n ): Promise<PowerlinesEnvironmentContext<TResolvedConfig>> {\n const context = new PowerlinesEnvironmentContext<TResolvedConfig>(\n config,\n workspaceConfig\n );\n await context.init();\n\n const powerlinesPath = await resolvePackage(\"powerlines\");\n if (!powerlinesPath) {\n throw new Error(\"Could not resolve `powerlines` package location.\");\n }\n\n context.powerlinesPath = powerlinesPath;\n\n return context;\n }\n\n /**\n * The resolved environment configuration\n */\n public environment!: EnvironmentResolvedConfig;\n\n /**\n * The list of plugins applied to this environment\n */\n public plugins: EnvironmentContextPlugin<TResolvedConfig>[] = [];\n\n /**\n * The resolved configuration options\n */\n public override get config(): TResolvedConfig {\n return super.config;\n }\n\n public get hooks(): HooksList<PluginContext<TResolvedConfig>> {\n return this.#hooks;\n }\n\n public async addPlugin(plugin: Plugin<PluginContext<TResolvedConfig>>) {\n let resolvedPlugin = plugin;\n if (isFunction(plugin.applyToEnvironment)) {\n const result = await Promise.resolve(\n plugin.applyToEnvironment(this.environment)\n );\n\n if (!result || (isObject(result) && Object.keys(result).length === 0)) {\n return;\n }\n\n if (isPluginConfig(result)) {\n return this.$$internal.addPlugin(result);\n }\n\n resolvedPlugin = isPlugin<TResolvedConfig>(result) ? result : plugin;\n }\n\n const context = createPluginContext<TResolvedConfig>(resolvedPlugin, this);\n\n this.plugins.push({\n plugin: resolvedPlugin,\n context\n });\n\n this.#hooks = Object.keys(resolvedPlugin)\n .filter(\n key =>\n !PLUGIN_NON_HOOK_FIELDS.includes(\n key as ArrayValues<typeof PLUGIN_NON_HOOK_FIELDS>\n )\n )\n .reduce((ret, key) => {\n const hook = key as keyof HooksList<PluginContext<TResolvedConfig>>;\n const pluginHook = resolvedPlugin[hook as keyof typeof resolvedPlugin];\n if (!isPluginHook(pluginHook)) {\n return ret;\n }\n\n if (!isHookExternal(hook)) {\n ret[hook] ??= {};\n if (resolvedPlugin.enforce) {\n ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];\n\n addPluginHook(\n context,\n resolvedPlugin,\n pluginHook,\n ret[hook][`${resolvedPlugin.enforce}Enforced`]!\n );\n\n return ret;\n }\n\n if (isFunction(pluginHook) || !pluginHook.order) {\n ret[hook].normal ??= [];\n\n addPluginHook(\n context,\n resolvedPlugin,\n pluginHook,\n ret[hook].normal\n );\n\n return ret;\n }\n\n ret[hook][`${pluginHook.order}Ordered`] ??= [];\n\n addPluginHook(\n context,\n resolvedPlugin,\n pluginHook,\n ret[hook][`${pluginHook.order}Ordered`]!\n );\n } else {\n ret[hook] ??= [];\n ret[hook].push({\n plugin: resolvedPlugin,\n hook: getHookHandler(pluginHook).bind(context)\n } as any);\n }\n\n return ret;\n }, this.hooks);\n }\n\n /**\n * Retrieves the hook handlers for a specific hook name\n */\n public selectHooks<TKey extends HookKeys<PluginContext<TResolvedConfig>>>(\n hook: TKey,\n options?: SelectHooksOptions\n ): SelectHooksResult<TResolvedConfig, TKey>[] {\n const result = [] as SelectHooksResult<TResolvedConfig, TKey>[];\n\n if (this.hooks[hook]) {\n if (!isHookExternal(hook)) {\n const hooks = this.hooks[hook] as BaseHooksList<\n PluginContext<TResolvedConfig>\n >;\n if (options?.order) {\n if (options?.order === \"pre\") {\n result.push(\n ...(hooks.preOrdered ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n result.push(\n ...(hooks.preEnforced ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n } else if (options?.order === \"post\") {\n result.push(\n ...(hooks.postOrdered ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n result.push(\n ...(hooks.postEnforced ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n } else {\n result.push(\n ...(hooks.normal ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n }\n } else {\n result.push(...this.selectHooks(hook, { order: \"pre\" }));\n result.push(...this.selectHooks(hook, { order: \"normal\" }));\n result.push(...this.selectHooks(hook, { order: \"post\" }));\n }\n } else {\n result.push(\n ...this.hooks[hook].map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${h.plugin.name}\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n }\n }\n\n return result;\n }\n\n protected constructor(\n config: TResolvedConfig,\n workspaceConfig: WorkspaceConfig\n ) {\n super(workspaceConfig);\n\n this.resolvedConfig = config;\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/types/plugin.ts","../../src/lib/contexts/environment-context.ts"],"names":["PLUGIN_NON_HOOK_FIELDS","PowerlinesEnvironmentContext","PowerlinesContext","fromConfig","workspaceConfig","config","context","init","powerlinesPath","resolvePackage","Error","environment","plugins","hooks","addPlugin","plugin","resolvedPlugin","isFunction","applyToEnvironment","result","Promise","resolve","isObject","Object","keys","length","isPluginConfig","$$internal","isPlugin","createPluginContext","push","filter","key","includes","reduce","ret","hook","pluginHook","isPluginHook","isHookExternal","enforce","addPluginHook","order","normal","getHookHandler","bind","selectHooks","options","preOrdered","map","h","find","p","name","handle","handler","preEnforced","postOrdered","postEnforced","resolvedConfig"],"mappings":";;;;;;;;;;AA2YO,IAAMA,sBAAAA,GAAyB;AACpC,EAAA,MAAA;AACA,EAAA,KAAA;AACA,EAAA,SAAA;AACA,EAAA,QAAA;AACA,EAAA,WAAA;AACA,EAAA;;;;AClWK,IAAMC,4BAAAA,GAAN,MAAMA,6BAAAA,SAGHC,mCAAAA,CAAAA;EAlDV;;;;;;AAwDE,EAAA,MAAA,GAAoD,EAAC;;;;;;;;EAWrD,aAAoBC,UAAAA,CAGlBC,iBACAC,MAAAA,EACwD;AACxD,IAAA,MAAMC,OAAAA,GAAU,IAAIL,6BAAAA,CAClBI,MAAAA,EACAD,eAAAA,CAAAA;AAEF,IAAA,MAAME,QAAQC,IAAAA,EAAI;AAElB,IAAA,MAAMC,cAAAA,GAAiB,MAAMC,sBAAAA,CAAe,YAAA,CAAA;AAC5C,IAAA,IAAI,CAACD,cAAAA,EAAgB;AACnB,MAAA,MAAM,IAAIE,MAAM,kDAAA,CA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AAA,CAAEnC,MAAAA,CAAOsC,IAAI,CAAA;AAEtC,UAAA,IAAI,CAACtC,MAAAA,EAAQ;AACX,YAAA,MAAM,IAAIL,KAAAA,CACR,CAAA,0CAAA,EAA6CwC,CAAAA,CAAEnC,MAAAA,CAAOsC,IAAI,CAAA,EAAA,CAAI,CAAA;AAElE,UAAA;AAEA,UAAA,OAAO;AACLC,YAAAA,MAAAA,EAAQJ,CAAAA,CAAEK,OAAAA;AACVjD,YAAAA,OAAAA,EAASS,MAAAA,CAAOT;AAClB,WAAA;AACF,QAAA,CAAA,CAAA,CAAA;AAEJ,MAAA;AACF,IAAA;AAEA,IAAA,OAAOa,MAAAA;AACT,EAAA;AAEA,EAAA,WAAA,CACEd,QACAD,eAAAA,EACA;AACA,IAAA,KAAA,CAAMA,eAAAA,CAAAA;AAEN,IAAA,IAAA,CAAKuD,cAAAA,GAAiBtD,MAAAA;AACxB,EAAA;AACF","file":"chunk-VMWMBMXG.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 type { ArrayValues } from \"@stryke/types/array\";\nimport type { FunctionLike, MaybePromise } from \"@stryke/types/base\";\nimport type {\n ExternalIdResult,\n HookFilter,\n TransformResult,\n UnpluginOptions\n} from \"unplugin\";\nimport type { UnpluginBuildVariant } from \"./build\";\nimport type { CommandType } from \"./commands\";\nimport type { EnvironmentConfig, PluginConfig } from \"./config\";\nimport type {\n BuildPluginContext,\n PluginContext,\n UnresolvedContext\n} from \"./context\";\nimport type { EnvironmentResolvedConfig, ResolvedConfig } from \"./resolved\";\n\nexport interface PluginHookObject<\n THookFunction extends FunctionLike,\n TFilter extends keyof HookFilter = never\n> {\n /**\n * The order in which the plugin should be applied.\n */\n order?: \"pre\" | \"post\" | null | undefined;\n\n /**\n * A filter to determine when the hook should be called.\n */\n filter?: Pick<HookFilter, TFilter>;\n\n /**\n * The hook function to be called.\n */\n handler: THookFunction;\n}\n\nexport type PluginHook<\n THookFunction extends FunctionLike,\n TFilter extends keyof HookFilter = never\n> = THookFunction | PluginHookObject<THookFunction, TFilter>;\n\n/**\n * A result returned by the plugin from the `types` hook that describes the declaration types output file.\n */\nexport interface TypesResult {\n directives?: string[];\n code: string;\n}\n\ntype DeepPartial<T> = {\n [K in keyof T]?: DeepPartial<T[K]>;\n};\n\nexport type ConfigResult<TContext extends PluginContext = PluginContext> =\n DeepPartial<TContext[\"config\"]> & Record<string, any>;\n\nexport interface BasePluginHookFunctions<\n TContext extends PluginContext = PluginContext\n> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config: (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<ConfigResult<TContext>>;\n\n /**\n * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @remarks\n * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.\n *\n * @see https://vitejs.dev/guide/api-plugin#configenvironment\n *\n * @param this - The build context.\n * @param name - The name of the environment being configured.\n * @param environment - The Vite-like environment object containing information about the current build environment.\n * @returns A promise that resolves when the hook is complete.\n */\n configEnvironment: (\n this: TContext,\n name: string,\n environment: EnvironmentConfig\n ) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;\n\n /**\n * A hook that is called when the plugin is resolved.\n *\n * @see https://vitejs.dev/guide/api-plugin#configresolved\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n configResolved: (this: TContext) => MaybePromise<void>;\n\n /**\n * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.\n *\n * @param this - The build context.\n * @param code - The source code to generate types for.\n * @returns A promise that resolves when the hook is complete.\n */\n types: (\n this: TContext,\n code: string\n ) => MaybePromise<TypesResult | string | undefined | null>;\n\n /**\n * A hook that is called at the start of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildStart: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called at the end of the build process.\n *\n * @param this - The build context and unplugin build context.\n * @returns A promise that resolves when the hook is complete.\n */\n buildEnd: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext\n ) => MaybePromise<void>;\n\n /**\n * A hook that is called to transform the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param code - The source code to transform.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n transform: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n code: string,\n id: string\n ) => MaybePromise<TransformResult>;\n\n /**\n * A hook that is called to load the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n load: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string\n ) => MaybePromise<TransformResult>;\n\n /**\n * A hook that is called to resolve the identifier of the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @param importer - The importer of the source code.\n * @param options - The options for resolving the identifier.\n * @returns A promise that resolves when the hook is complete.\n */\n resolveId: (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string,\n importer: string | undefined,\n options: { isEntry: boolean }\n ) => MaybePromise<string | ExternalIdResult | null | undefined>;\n\n /**\n * A hook that is called to write the bundle to disk.\n *\n * @param this - The build context.\n * @returns A promise that resolves when the hook is complete.\n */\n writeBundle: (this: TContext) => MaybePromise<void>;\n}\n\nexport type BuildPlugin<\n TContext extends PluginContext = PluginContext,\n TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant,\n TOptions extends Required<UnpluginOptions>[TBuildVariant] =\n Required<UnpluginOptions>[TBuildVariant]\n> = {\n [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike\n ? (\n this: ThisParameterType<TOptions[TKey]> & TContext,\n ...args: Parameters<TOptions[TKey]>\n ) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>>\n : TOptions[TKey];\n};\n\nexport type ExternalPluginHookFunctionsVariant<\n TContext extends PluginContext = PluginContext,\n TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant\n> = {\n [TKey in keyof BuildPlugin<TContext, TBuildVariant> &\n string as `${TBuildVariant}:${TKey}`]: BuildPlugin<\n TContext,\n TBuildVariant\n >[TKey];\n};\n\nexport type ExternalPluginHookFunctions<TContext extends PluginContext> =\n ExternalPluginHookFunctionsVariant<TContext, \"vite\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"esbuild\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"rolldown\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"rollup\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"webpack\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"rspack\"> &\n ExternalPluginHookFunctionsVariant<TContext, \"farm\">;\n\nexport type PluginHookFunctions<\n TContext extends PluginContext = PluginContext\n> = BasePluginHookFunctions<TContext> & ExternalPluginHookFunctions<TContext>;\n\nexport type PluginHooks<TContext extends PluginContext = PluginContext> = {\n [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<\n BasePluginHookFunctions<TContext>[TKey]\n >;\n} & {\n /**\n * A function that returns configuration options to be merged with the build context's options.\n *\n * @remarks\n * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.\n *\n * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.\n *\n * @see https://vitejs.dev/guide/api-plugin#config\n *\n * @param this - The build context.\n * @param config - The partial configuration object to be modified.\n * @returns A promise that resolves to a partial configuration object.\n */\n config:\n | PluginHook<\n (\n this: UnresolvedContext<TContext[\"config\"]>\n ) => MaybePromise<ConfigResult<TContext>>\n >\n | ConfigResult<TContext>;\n\n /**\n * A hook that is called to transform the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param code - The source code to transform.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n transform: PluginHook<\n (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n code: string,\n id: string\n ) => MaybePromise<TransformResult>,\n \"code\" | \"id\"\n >;\n\n /**\n * A hook that is called to load the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @returns A promise that resolves when the hook is complete.\n */\n load: PluginHook<\n (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string\n ) => MaybePromise<TransformResult>,\n \"id\"\n >;\n\n /**\n * A hook that is called to resolve the identifier of the source code.\n *\n * @param this - The build context, unplugin build context, and unplugin context.\n * @param id - The identifier of the source code.\n * @param importer - The importer of the source code.\n * @param options - The options for resolving the identifier.\n * @returns A promise that resolves when the hook is complete.\n */\n resolveId: PluginHook<\n (\n this: BuildPluginContext<TContext[\"config\"]> & TContext,\n id: string,\n importer: string | undefined,\n options: { isEntry: boolean }\n ) => MaybePromise<string | ExternalIdResult | null | undefined>,\n \"id\"\n >;\n};\n\nexport type PluginBuildPlugins<TContext extends PluginContext = PluginContext> =\n {\n [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<\n TContext,\n TBuildVariant\n >;\n };\n\nexport interface Plugin<\n TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>\n>\n extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {\n /**\n * The name of the plugin, for use in deduplication, error messages and logs.\n */\n name: string;\n\n /**\n * An API object that can be used for inter-plugin communication.\n *\n * @see https://rollupjs.org/plugin-development/#direct-plugin-communication\n */\n api?: Record<string, any>;\n\n /**\n * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.\n *\n * @remarks\n * The Plugin invocation order is as follows:\n * - `enforce: 'pre'` plugins\n * - `order: 'pre'` plugin hooks\n * - any other plugins (normal)\n * - `order: 'post'` plugin hooks\n * - `enforce: 'post'` plugins\n *\n * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering\n * @see https://rollupjs.org/plugin-development/#build-hooks\n * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post\n * @see https://esbuild.github.io/plugins/#concepts\n */\n enforce?: \"pre\" | \"post\";\n\n /**\n * A function to determine if two plugins are the same and can be de-duplicated.\n *\n * @remarks\n * If this is not provided, plugins are de-duplicated by comparing their names.\n *\n * @param other - The other plugin to compare against.\n * @returns `true` if the two plugins are the same, `false` otherwise.\n */\n dedupe?: false | ((other: Plugin<TContext>) => boolean);\n\n /**\n * A list of pre-requisite plugins that must be loaded before this plugin can be used.\n */\n dependsOn?: PluginConfig<TContext>[];\n\n /**\n * Define environments where this plugin should be active. By default, the plugin is active in all environments.\n *\n * @param environment - The environment to check.\n * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.\n */\n applyToEnvironment?: (\n environment: EnvironmentResolvedConfig\n ) => boolean | PluginConfig<TContext>;\n}\n\nexport const PLUGIN_NON_HOOK_FIELDS = [\n \"name\",\n \"api\",\n \"enforce\",\n \"dedupe\",\n \"dependsOn\",\n \"applyToEnvironment\"\n] as const;\n\nexport type PluginNonHookFields =\n | ArrayValues<typeof PLUGIN_NON_HOOK_FIELDS>\n | UnpluginBuildVariant;\n","/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { resolvePackage } from \"@stryke/fs/resolve\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isObject } from \"@stryke/type-checks/is-object\";\nimport { ArrayValues } from \"@stryke/types/array\";\nimport {\n addPluginHook,\n getHookHandler,\n isHookExternal,\n isPlugin,\n isPluginConfig,\n isPluginHook\n} from \"../../plugin-utils/helpers\";\nimport { WorkspaceConfig } from \"../../types/config\";\nimport {\n EnvironmentContext,\n EnvironmentContextPlugin,\n PluginContext,\n SelectHooksOptions,\n SelectHooksResult\n} from \"../../types/context\";\nimport { BaseHooksList, HookKeys, HooksList } from \"../../types/hooks\";\nimport { Plugin, PLUGIN_NON_HOOK_FIELDS } from \"../../types/plugin\";\nimport {\n EnvironmentResolvedConfig,\n ResolvedConfig\n} from \"../../types/resolved\";\nimport { PowerlinesContext } from \"./context\";\nimport { createPluginContext } from \"./plugin-context\";\n\nexport class PowerlinesEnvironmentContext<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n>\n extends PowerlinesContext<TResolvedConfig>\n implements EnvironmentContext<TResolvedConfig>\n{\n /**\n * The hooks registered by plugins in this environment\n */\n #hooks: HooksList<PluginContext<TResolvedConfig>> = {} as HooksList<\n PluginContext<TResolvedConfig>\n >;\n\n /**\n * Create a new Storm context from the workspace root and user config.\n *\n * @param workspaceConfig - The root directory of the workspace.\n * @param config - The user configuration options.\n * @returns A promise that resolves to the new context.\n */\n public static async fromConfig<\n TResolvedConfig extends ResolvedConfig = ResolvedConfig\n >(\n workspaceConfig: WorkspaceConfig,\n config: TResolvedConfig\n ): Promise<PowerlinesEnvironmentContext<TResolvedConfig>> {\n const context = new PowerlinesEnvironmentContext<TResolvedConfig>(\n config,\n workspaceConfig\n );\n await context.init();\n\n const powerlinesPath = await resolvePackage(\"powerlines\");\n if (!powerlinesPath) {\n throw new Error(\"Could not resolve `powerlines` package location.\");\n }\n\n context.powerlinesPath = powerlinesPath;\n\n return context;\n }\n\n /**\n * The resolved environment configuration\n */\n public environment!: EnvironmentResolvedConfig;\n\n /**\n * The list of plugins applied to this environment\n */\n public plugins: EnvironmentContextPlugin<TResolvedConfig>[] = [];\n\n /**\n * The resolved configuration options\n */\n public override get config(): TResolvedConfig {\n return super.config;\n }\n\n public get hooks(): HooksList<PluginContext<TResolvedConfig>> {\n return this.#hooks;\n }\n\n public async addPlugin(plugin: Plugin<PluginContext<TResolvedConfig>>) {\n let resolvedPlugin = plugin;\n if (isFunction(plugin.applyToEnvironment)) {\n const result = await Promise.resolve(\n plugin.applyToEnvironment(this.environment)\n );\n\n if (!result || (isObject(result) && Object.keys(result).length === 0)) {\n return;\n }\n\n if (isPluginConfig(result)) {\n return this.$$internal.addPlugin(result);\n }\n\n resolvedPlugin = isPlugin<TResolvedConfig>(result) ? result : plugin;\n }\n\n const context = createPluginContext<TResolvedConfig>(resolvedPlugin, this);\n\n this.plugins.push({\n plugin: resolvedPlugin,\n context\n });\n\n this.#hooks = Object.keys(resolvedPlugin)\n .filter(\n key =>\n !PLUGIN_NON_HOOK_FIELDS.includes(\n key as ArrayValues<typeof PLUGIN_NON_HOOK_FIELDS>\n )\n )\n .reduce((ret, key) => {\n const hook = key as keyof HooksList<PluginContext<TResolvedConfig>>;\n const pluginHook = resolvedPlugin[hook as keyof typeof resolvedPlugin];\n if (!isPluginHook(pluginHook)) {\n return ret;\n }\n\n if (!isHookExternal(hook)) {\n ret[hook] ??= {};\n if (resolvedPlugin.enforce) {\n ret[hook][`${resolvedPlugin.enforce}Enforced`] ??= [];\n\n addPluginHook(\n context,\n resolvedPlugin,\n pluginHook,\n ret[hook][`${resolvedPlugin.enforce}Enforced`]!\n );\n\n return ret;\n }\n\n if (isFunction(pluginHook) || !pluginHook.order) {\n ret[hook].normal ??= [];\n\n addPluginHook(\n context,\n resolvedPlugin,\n pluginHook,\n ret[hook].normal\n );\n\n return ret;\n }\n\n ret[hook][`${pluginHook.order}Ordered`] ??= [];\n\n addPluginHook(\n context,\n resolvedPlugin,\n pluginHook,\n ret[hook][`${pluginHook.order}Ordered`]!\n );\n } else {\n ret[hook] ??= [];\n ret[hook].push({\n plugin: resolvedPlugin,\n hook: getHookHandler(pluginHook).bind(context)\n } as any);\n }\n\n return ret;\n }, this.hooks);\n }\n\n /**\n * Retrieves the hook handlers for a specific hook name\n */\n public selectHooks<TKey extends HookKeys<PluginContext<TResolvedConfig>>>(\n hook: TKey,\n options?: SelectHooksOptions\n ): SelectHooksResult<TResolvedConfig, TKey>[] {\n const result = [] as SelectHooksResult<TResolvedConfig, TKey>[];\n\n if (this.hooks[hook]) {\n if (!isHookExternal(hook)) {\n const hooks = this.hooks[hook] as BaseHooksList<\n PluginContext<TResolvedConfig>\n >;\n if (options?.order) {\n if (options?.order === \"pre\") {\n result.push(\n ...(hooks.preOrdered ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n result.push(\n ...(hooks.preEnforced ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n } else if (options?.order === \"post\") {\n result.push(\n ...(hooks.postOrdered ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n result.push(\n ...(hooks.postEnforced ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n } else {\n result.push(\n ...(hooks.normal ?? []).map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${\n h.plugin.name\n }\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n }\n } else {\n result.push(...this.selectHooks(hook, { order: \"pre\" }));\n result.push(...this.selectHooks(hook, { order: \"normal\" }));\n result.push(...this.selectHooks(hook, { order: \"post\" }));\n }\n } else {\n result.push(\n ...this.hooks[hook].map(h => {\n const plugin = this.plugins.find(\n p => p.plugin.name === h.plugin.name\n );\n if (!plugin) {\n throw new Error(\n `Could not find plugin context for plugin \"${h.plugin.name}\".`\n );\n }\n\n return {\n handle: h.handler,\n context: plugin.context\n };\n })\n );\n }\n }\n\n return result;\n }\n\n protected constructor(\n config: TResolvedConfig,\n workspaceConfig: WorkspaceConfig\n ) {\n super(workspaceConfig);\n\n this.resolvedConfig = config;\n }\n}\n"]}
@@ -26,7 +26,7 @@ import { Range } from 'semver';
26
26
  import { Project } from 'ts-morph';
27
27
  import { RequestInfo, Response } from 'undici';
28
28
  import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
29
- import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions, b as StoragePort, c as StoragePreset } from './fs-BkpNEsxT.js';
29
+ import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions, b as StoragePort, c as StoragePreset } from './fs-Mx46r7JY.js';
30
30
  import { ArrayValues } from '@stryke/types/array';
31
31
  import { P as ParsedTypeScriptConfig, T as TSConfig } from './tsconfig-Bz-CiFqD.js';
32
32
 
@@ -209,7 +209,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
209
209
  /**
210
210
  * The user provided entry point in the source code
211
211
  */
212
- input: TypeDefinition;
212
+ input?: TypeDefinition;
213
213
  /**
214
214
  * An optional name to use in the package export during the build process
215
215
  */
@@ -615,6 +615,9 @@ interface SourceFile {
615
615
  interface SelectHooksOptions {
616
616
  order?: "pre" | "post" | "normal";
617
617
  }
618
+ /**
619
+ * Options for initializing or updating the context with new configuration values
620
+ */
618
621
  interface InitContextOptions {
619
622
  /**
620
623
  * If false, the plugin will be loaded after all other plugins.
@@ -623,27 +626,28 @@ interface InitContextOptions {
623
626
  */
624
627
  isHighPriority: boolean;
625
628
  }
629
+ /**
630
+ * Options for fetch requests made via the context's {@link Context.fetch} method
631
+ */
626
632
  interface FetchOptions extends FetchRequestOptions {
627
633
  /**
628
634
  * An indicator specifying that the request should bypass any caching
629
635
  */
630
636
  skipCache?: boolean;
631
637
  }
638
+ /**
639
+ * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
640
+ */
632
641
  interface ParseOptions extends ParserOptions {
633
642
  /**
634
643
  * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
635
644
  */
636
645
  allowReturnOutsideFunction?: boolean;
637
646
  }
638
- interface EmitEntryOptions extends WriteOptions {
639
- /**
640
- * The export name of the type definition in the file being emitted
641
- *
642
- * @remarks
643
- * If no value is provided, we will attempt to infer the type definition from the module's `default` export.
644
- */
645
- name?: TypeDefinition["name"];
646
- }
647
+ /**
648
+ * Options for emitting entry virtual files
649
+ */
650
+ type EmitEntryOptions = WriteOptions & Omit<ResolvedEntryTypeDefinition, "file">;
647
651
  /**
648
652
  * The unresolved Powerlines context.
649
653
  *
@@ -1032,7 +1036,7 @@ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
1032
1036
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
1033
1037
  */
1034
1038
  type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
1035
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
1039
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
1036
1040
  /**
1037
1041
  * A configuration tuple for a Powerlines plugin.
1038
1042
  */
@@ -1050,7 +1054,7 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
1050
1054
  /**
1051
1055
  * A configuration tuple for a Powerlines plugin.
1052
1056
  */
1053
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
1057
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Plugin<TContext>[] | Promise<Plugin<TContext> | Plugin<TContext>[]> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
1054
1058
  type ProjectType = "application" | "library";
1055
1059
  interface DeployConfig {
1056
1060
  /**
@@ -26,7 +26,7 @@ import { Range } from 'semver';
26
26
  import { Project } from 'ts-morph';
27
27
  import { RequestInfo, Response } from 'undici';
28
28
  import { TransformResult as TransformResult$1, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginMessage, UnpluginBuildContext } from 'unplugin';
29
- import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions, b as StoragePort, c as StoragePreset } from './fs-BkpNEsxT.cjs';
29
+ import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions, b as StoragePort, c as StoragePreset } from './fs-Mx46r7JY.cjs';
30
30
  import { ArrayValues } from '@stryke/types/array';
31
31
  import { P as ParsedTypeScriptConfig, T as TSConfig } from './tsconfig-Bz-CiFqD.cjs';
32
32
 
@@ -209,7 +209,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
209
209
  /**
210
210
  * The user provided entry point in the source code
211
211
  */
212
- input: TypeDefinition;
212
+ input?: TypeDefinition;
213
213
  /**
214
214
  * An optional name to use in the package export during the build process
215
215
  */
@@ -615,6 +615,9 @@ interface SourceFile {
615
615
  interface SelectHooksOptions {
616
616
  order?: "pre" | "post" | "normal";
617
617
  }
618
+ /**
619
+ * Options for initializing or updating the context with new configuration values
620
+ */
618
621
  interface InitContextOptions {
619
622
  /**
620
623
  * If false, the plugin will be loaded after all other plugins.
@@ -623,27 +626,28 @@ interface InitContextOptions {
623
626
  */
624
627
  isHighPriority: boolean;
625
628
  }
629
+ /**
630
+ * Options for fetch requests made via the context's {@link Context.fetch} method
631
+ */
626
632
  interface FetchOptions extends FetchRequestOptions {
627
633
  /**
628
634
  * An indicator specifying that the request should bypass any caching
629
635
  */
630
636
  skipCache?: boolean;
631
637
  }
638
+ /**
639
+ * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
640
+ */
632
641
  interface ParseOptions extends ParserOptions {
633
642
  /**
634
643
  * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
635
644
  */
636
645
  allowReturnOutsideFunction?: boolean;
637
646
  }
638
- interface EmitEntryOptions extends WriteOptions {
639
- /**
640
- * The export name of the type definition in the file being emitted
641
- *
642
- * @remarks
643
- * If no value is provided, we will attempt to infer the type definition from the module's `default` export.
644
- */
645
- name?: TypeDefinition["name"];
646
- }
647
+ /**
648
+ * Options for emitting entry virtual files
649
+ */
650
+ type EmitEntryOptions = WriteOptions & Omit<ResolvedEntryTypeDefinition, "file">;
647
651
  /**
648
652
  * The unresolved Powerlines context.
649
653
  *
@@ -1032,7 +1036,7 @@ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
1032
1036
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
1033
1037
  */
1034
1038
  type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
1035
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
1039
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
1036
1040
  /**
1037
1041
  * A configuration tuple for a Powerlines plugin.
1038
1042
  */
@@ -1050,7 +1054,7 @@ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions
1050
1054
  /**
1051
1055
  * A configuration tuple for a Powerlines plugin.
1052
1056
  */
1053
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
1057
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Plugin<TContext>[] | Promise<Plugin<TContext> | Plugin<TContext>[]> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
1054
1058
  type ProjectType = "application" | "library";
1055
1059
  interface DeployConfig {
1056
1060
  /**
@@ -1,5 +1,5 @@
1
1
  import { Jiti } from 'jiti';
2
- import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-Lr7p1CKw.cjs';
2
+ import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-CYz6Kd4L.cjs';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -27,7 +27,7 @@ import 'semver';
27
27
  import 'ts-morph';
28
28
  import 'undici';
29
29
  import 'unplugin';
30
- import './fs-BkpNEsxT.cjs';
30
+ import './fs-Mx46r7JY.cjs';
31
31
  import '@stryke/fs/resolve';
32
32
  import '@stryke/types/array';
33
33
  import './tsconfig-Bz-CiFqD.cjs';
@@ -1,5 +1,5 @@
1
1
  import { Jiti } from 'jiti';
2
- import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-ba1qwxTg.js';
2
+ import { C as Context, W as WorkspaceConfig, P as PowerlinesCommand, a as ParsedUserConfig } from './config-CGGo9KcK.js';
3
3
  import '@storm-software/build-tools/types';
4
4
  import '@storm-software/config-tools/types';
5
5
  import '@storm-software/config/types';
@@ -27,7 +27,7 @@ import 'semver';
27
27
  import 'ts-morph';
28
28
  import 'undici';
29
29
  import 'unplugin';
30
- import './fs-BkpNEsxT.js';
30
+ import './fs-Mx46r7JY.js';
31
31
  import '@stryke/fs/resolve';
32
32
  import '@stryke/types/array';
33
33
  import './tsconfig-Bz-CiFqD.js';
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkRRPFZDGI_cjs = require('../chunk-RRPFZDGI.cjs');
4
- require('../chunk-XXQREHLK.cjs');
3
+ var chunk7XTQMSUB_cjs = require('../chunk-7XTQMSUB.cjs');
4
+ require('../chunk-VMWMBMXG.cjs');
5
5
  require('../chunk-63DAS6TJ.cjs');
6
- require('../chunk-UZSTEOLF.cjs');
6
+ require('../chunk-VAIDDF5X.cjs');
7
7
  require('../chunk-BJGMF356.cjs');
8
- require('../chunk-UWOD2XLX.cjs');
8
+ require('../chunk-53LK7IG5.cjs');
9
9
  require('../chunk-AQNUFK3L.cjs');
10
10
  require('../chunk-QBE4SZN6.cjs');
11
11
  require('../chunk-Y5KONJVR.cjs');
@@ -22,7 +22,7 @@ require('../chunk-PK6SKIKE.cjs');
22
22
 
23
23
  Object.defineProperty(exports, "PowerlinesAPIContext", {
24
24
  enumerable: true,
25
- get: function () { return chunkRRPFZDGI_cjs.PowerlinesAPIContext; }
25
+ get: function () { return chunk7XTQMSUB_cjs.PowerlinesAPIContext; }
26
26
  });
27
27
  //# sourceMappingURL=api-context.cjs.map
28
28
  //# sourceMappingURL=api-context.cjs.map
@@ -1,5 +1,5 @@
1
- import { g as ResolvedConfig, A as APIContext, I as InitialUserConfig, L as LogFn, h as Plugin, i as PluginContext, W as WorkspaceConfig, j as EnvironmentResolvedConfig, k as InitContextOptions, l as EnvironmentContext } from '../config-Lr7p1CKw.cjs';
2
- import { a as UNSAFE_ContextInternal, b as UNSAFE_EnvironmentContext } from '../internal-CSgMKSqU.cjs';
1
+ import { g as ResolvedConfig, A as APIContext, I as InitialUserConfig, L as LogFn, h as Plugin, i as PluginContext, W as WorkspaceConfig, j as EnvironmentResolvedConfig, k as InitContextOptions, l as EnvironmentContext } from '../config-CYz6Kd4L.cjs';
2
+ import { a as UNSAFE_ContextInternal, b as UNSAFE_EnvironmentContext } from '../internal-YI5K6rmd.cjs';
3
3
  import { PowerlinesContext } from './context.cjs';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -29,13 +29,13 @@ import 'semver';
29
29
  import 'ts-morph';
30
30
  import 'undici';
31
31
  import 'unplugin';
32
- import '../fs-BkpNEsxT.cjs';
32
+ import '../fs-Mx46r7JY.cjs';
33
33
  import '@stryke/fs/resolve';
34
34
  import '@stryke/types/array';
35
35
  import '../tsconfig-Bz-CiFqD.cjs';
36
36
  import '@stryke/types/tsconfig';
37
37
  import 'typescript';
38
- import '../api-C-muqDwC.cjs';
38
+ import '../api-C6p2jxI9.cjs';
39
39
  import 'flat-cache';
40
40
 
41
41
  declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
@@ -1,5 +1,5 @@
1
- import { g as ResolvedConfig, A as APIContext, I as InitialUserConfig, L as LogFn, h as Plugin, i as PluginContext, W as WorkspaceConfig, j as EnvironmentResolvedConfig, k as InitContextOptions, l as EnvironmentContext } from '../config-ba1qwxTg.js';
2
- import { a as UNSAFE_ContextInternal, b as UNSAFE_EnvironmentContext } from '../internal-Cy15nTJD.js';
1
+ import { g as ResolvedConfig, A as APIContext, I as InitialUserConfig, L as LogFn, h as Plugin, i as PluginContext, W as WorkspaceConfig, j as EnvironmentResolvedConfig, k as InitContextOptions, l as EnvironmentContext } from '../config-CGGo9KcK.js';
2
+ import { a as UNSAFE_ContextInternal, b as UNSAFE_EnvironmentContext } from '../internal-DoGteMoK.js';
3
3
  import { PowerlinesContext } from './context.js';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -29,13 +29,13 @@ import 'semver';
29
29
  import 'ts-morph';
30
30
  import 'undici';
31
31
  import 'unplugin';
32
- import '../fs-BkpNEsxT.js';
32
+ import '../fs-Mx46r7JY.js';
33
33
  import '@stryke/fs/resolve';
34
34
  import '@stryke/types/array';
35
35
  import '../tsconfig-Bz-CiFqD.js';
36
36
  import '@stryke/types/tsconfig';
37
37
  import 'typescript';
38
- import '../api-WGXMngpt.js';
38
+ import '../api-B8aBolnU.js';
39
39
  import 'flat-cache';
40
40
 
41
41
  declare class PowerlinesAPIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends PowerlinesContext<TResolvedConfig> implements APIContext<TResolvedConfig> {
@@ -1,9 +1,9 @@
1
- export { PowerlinesAPIContext } from '../chunk-2KYZLGIZ.js';
2
- import '../chunk-MBGLVIJD.js';
1
+ export { PowerlinesAPIContext } from '../chunk-25C6FCLA.js';
2
+ import '../chunk-Q7KX7QCP.js';
3
3
  import '../chunk-6OGQTUXF.js';
4
- import '../chunk-VPZU5BTK.js';
4
+ import '../chunk-3BXSIJGU.js';
5
5
  import '../chunk-45D4XIOK.js';
6
- import '../chunk-NXUMUI2Z.js';
6
+ import '../chunk-TB2ZWKZN.js';
7
7
  import '../chunk-YJEZASNU.js';
8
8
  import '../chunk-5QMQ5G73.js';
9
9
  import '../chunk-CTMPQSK7.js';
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkUZSTEOLF_cjs = require('../chunk-UZSTEOLF.cjs');
3
+ var chunkVAIDDF5X_cjs = require('../chunk-VAIDDF5X.cjs');
4
4
  require('../chunk-BJGMF356.cjs');
5
- require('../chunk-UWOD2XLX.cjs');
5
+ require('../chunk-53LK7IG5.cjs');
6
6
  require('../chunk-AQNUFK3L.cjs');
7
7
  require('../chunk-QBE4SZN6.cjs');
8
8
  require('../chunk-Y5KONJVR.cjs');
@@ -19,7 +19,7 @@ require('../chunk-PK6SKIKE.cjs');
19
19
 
20
20
  Object.defineProperty(exports, "PowerlinesContext", {
21
21
  enumerable: true,
22
- get: function () { return chunkUZSTEOLF_cjs.PowerlinesContext; }
22
+ get: function () { return chunkVAIDDF5X_cjs.PowerlinesContext; }
23
23
  });
24
24
  //# sourceMappingURL=context.cjs.map
25
25
  //# sourceMappingURL=context.cjs.map
@@ -6,9 +6,9 @@ import { Range } from 'semver';
6
6
  import { Project } from 'ts-morph';
7
7
  import { RequestInfo, Response } from 'undici';
8
8
  import { ExternalIdResult, UnpluginMessage } from 'unplugin';
9
- import { g as ResolvedConfig, C as Context, I as InitialUserConfig, M as MetaInfo, p as Resolver, R as ResolvedEntryTypeDefinition, L as LogFn, W as WorkspaceConfig, F as FetchOptions, q as ParseOptions, r as TransformResult, s as EmitEntryOptions, k as InitContextOptions } from '../config-Lr7p1CKw.cjs';
10
- import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions } from '../fs-BkpNEsxT.cjs';
11
- import { a as UNSAFE_ContextInternal } from '../internal-CSgMKSqU.cjs';
9
+ import { g as ResolvedConfig, C as Context, I as InitialUserConfig, M as MetaInfo, p as Resolver, R as ResolvedEntryTypeDefinition, L as LogFn, W as WorkspaceConfig, F as FetchOptions, q as ParseOptions, r as TransformResult, s as EmitEntryOptions, k as InitContextOptions } from '../config-CYz6Kd4L.cjs';
10
+ import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions } from '../fs-Mx46r7JY.cjs';
11
+ import { a as UNSAFE_ContextInternal } from '../internal-YI5K6rmd.cjs';
12
12
  import { P as ParsedTypeScriptConfig } from '../tsconfig-Bz-CiFqD.cjs';
13
13
  import '@storm-software/build-tools/types';
14
14
  import '@storm-software/config-tools/types';
@@ -33,7 +33,7 @@ import 'jiti';
33
33
  import 'magic-string';
34
34
  import '@stryke/types/array';
35
35
  import '@stryke/fs/resolve';
36
- import '../api-C-muqDwC.cjs';
36
+ import '../api-C6p2jxI9.cjs';
37
37
  import '@stryke/types/tsconfig';
38
38
  import 'typescript';
39
39
 
@@ -6,9 +6,9 @@ import { Range } from 'semver';
6
6
  import { Project } from 'ts-morph';
7
7
  import { RequestInfo, Response } from 'undici';
8
8
  import { ExternalIdResult, UnpluginMessage } from 'unplugin';
9
- import { g as ResolvedConfig, C as Context, I as InitialUserConfig, M as MetaInfo, p as Resolver, R as ResolvedEntryTypeDefinition, L as LogFn, W as WorkspaceConfig, F as FetchOptions, q as ParseOptions, r as TransformResult, s as EmitEntryOptions, k as InitContextOptions } from '../config-ba1qwxTg.js';
10
- import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions } from '../fs-BkpNEsxT.js';
11
- import { a as UNSAFE_ContextInternal } from '../internal-Cy15nTJD.js';
9
+ import { g as ResolvedConfig, C as Context, I as InitialUserConfig, M as MetaInfo, p as Resolver, R as ResolvedEntryTypeDefinition, L as LogFn, W as WorkspaceConfig, F as FetchOptions, q as ParseOptions, r as TransformResult, s as EmitEntryOptions, k as InitContextOptions } from '../config-CGGo9KcK.js';
10
+ import { V as VirtualFileSystemInterface, R as ResolveOptions, a as VirtualFile, W as WriteOptions } from '../fs-Mx46r7JY.js';
11
+ import { a as UNSAFE_ContextInternal } from '../internal-DoGteMoK.js';
12
12
  import { P as ParsedTypeScriptConfig } from '../tsconfig-Bz-CiFqD.js';
13
13
  import '@storm-software/build-tools/types';
14
14
  import '@storm-software/config-tools/types';
@@ -33,7 +33,7 @@ import 'jiti';
33
33
  import 'magic-string';
34
34
  import '@stryke/types/array';
35
35
  import '@stryke/fs/resolve';
36
- import '../api-WGXMngpt.js';
36
+ import '../api-B8aBolnU.js';
37
37
  import '@stryke/types/tsconfig';
38
38
  import 'typescript';
39
39
 
@@ -1,6 +1,6 @@
1
- export { PowerlinesContext } from '../chunk-VPZU5BTK.js';
1
+ export { PowerlinesContext } from '../chunk-3BXSIJGU.js';
2
2
  import '../chunk-45D4XIOK.js';
3
- import '../chunk-NXUMUI2Z.js';
3
+ import '../chunk-TB2ZWKZN.js';
4
4
  import '../chunk-YJEZASNU.js';
5
5
  import '../chunk-5QMQ5G73.js';
6
6
  import '../chunk-CTMPQSK7.js';