powerlines 0.23.3 → 0.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/api--9pVSIbm.d.cts +168 -0
  2. package/dist/api-DxPACGY4.d.ts +168 -0
  3. package/dist/api.cjs +3 -3
  4. package/dist/api.d.cts +16 -7
  5. package/dist/api.d.ts +16 -7
  6. package/dist/api.js +2 -2
  7. package/dist/astro.cjs +8 -8
  8. package/dist/astro.d.cts +3 -5
  9. package/dist/astro.d.ts +3 -5
  10. package/dist/astro.js +5 -5
  11. package/dist/babel-types.d.ts +292 -0
  12. package/dist/{chunk-ZFO3FUM4.cjs → chunk-2FLICTDF.cjs} +2 -2
  13. package/dist/{chunk-JAJ4CI2F.cjs → chunk-3OQXZ5MM.cjs} +2 -2
  14. package/dist/{chunk-KFRKOIP3.js → chunk-5B6P2VUG.js} +1 -1
  15. package/dist/{chunk-GNNF5SG6.cjs → chunk-6ACGI52O.cjs} +2 -2
  16. package/dist/{chunk-JZAQW55G.cjs → chunk-AF5VNWZD.cjs} +2 -2
  17. package/dist/{chunk-J7MZRPLN.cjs → chunk-AIC2EHPW.cjs} +5 -4
  18. package/dist/{chunk-3WDMXRK6.cjs → chunk-AYKZK666.cjs} +1 -1
  19. package/dist/chunk-CHNKTBUA.cjs +32 -0
  20. package/dist/{chunk-M4QJ2474.cjs → chunk-CTSSNO5L.cjs} +4 -4
  21. package/dist/{chunk-5A7FM72H.cjs → chunk-GP6XGAJ4.cjs} +2 -2
  22. package/dist/{chunk-DUYZ3TCT.js → chunk-HLQGKQZY.js} +1 -1
  23. package/dist/{chunk-LKN52AAX.js → chunk-HNJC47JM.js} +1 -1
  24. package/dist/{chunk-IGWSCIES.js → chunk-ISLX4Z3L.js} +3 -2
  25. package/dist/{chunk-J5LKLH5Z.js → chunk-KFSVTJMR.js} +1 -1
  26. package/dist/{chunk-RWVNX2CP.js → chunk-MI3U2GAT.js} +1 -1
  27. package/dist/{chunk-4ODWTALP.js → chunk-N3F54RFW.js} +2 -2
  28. package/dist/{chunk-Q7HBETZW.js → chunk-O2WB6QZ6.js} +1 -1
  29. package/dist/{chunk-DWV5QAGZ.cjs → chunk-OEKSQ22R.cjs} +2997 -2710
  30. package/dist/{chunk-WSLPUUGZ.js → chunk-PTZB4LWS.js} +1 -1
  31. package/dist/{chunk-CPRXGMH2.js → chunk-QSNFMINQ.js} +1 -1
  32. package/dist/{chunk-YQ76DZYD.cjs → chunk-QUZ4T5AX.cjs} +2 -2
  33. package/dist/chunk-UTAJPBVT.js +29 -0
  34. package/dist/{chunk-WG55ZHJL.cjs → chunk-UW3MXOWV.cjs} +2 -2
  35. package/dist/{chunk-F6BDL4HD.js → chunk-VDBKZJV6.js} +1 -1
  36. package/dist/{chunk-J3LN5HOC.cjs → chunk-VFLCP3SA.cjs} +2 -2
  37. package/dist/{chunk-FM4ABZQ2.js → chunk-VT7NVLLU.js} +1 -1
  38. package/dist/{chunk-WDBPA4RQ.cjs → chunk-VXAKPZ3A.cjs} +2 -2
  39. package/dist/{chunk-WXU3KLBP.cjs → chunk-XOI5CY62.cjs} +2 -2
  40. package/dist/{chunk-NH7U3PTV.js → chunk-ZQ7PDXYO.js} +1 -1
  41. package/dist/{chunk-TNYZH6EG.js → chunk-ZYCPZLIG.js} +2982 -2700
  42. package/dist/config.d.cts +3 -5
  43. package/dist/config.d.ts +3 -5
  44. package/dist/esbuild.cjs +7 -7
  45. package/dist/esbuild.d.cts +3 -5
  46. package/dist/esbuild.d.ts +3 -5
  47. package/dist/esbuild.js +4 -4
  48. package/dist/farm.cjs +4 -4
  49. package/dist/farm.d.cts +3 -5
  50. package/dist/farm.d.ts +3 -5
  51. package/dist/farm.js +3 -3
  52. package/dist/index.cjs +54 -33
  53. package/dist/index.d.cts +188 -36
  54. package/dist/index.d.ts +188 -36
  55. package/dist/index.js +18 -17
  56. package/dist/lib/api-B6hfFxVS.d.ts +167 -0
  57. package/dist/lib/api-CD2QlMig.d.cts +167 -0
  58. package/dist/lib/build/esbuild.d.cts +2 -4
  59. package/dist/lib/build/esbuild.d.ts +2 -4
  60. package/dist/lib/build/index.d.cts +4 -5
  61. package/dist/lib/build/index.d.ts +4 -5
  62. package/dist/lib/build/rolldown.d.cts +2 -4
  63. package/dist/lib/build/rolldown.d.ts +2 -4
  64. package/dist/lib/build/rollup.d.cts +2 -4
  65. package/dist/lib/build/rollup.d.ts +2 -4
  66. package/dist/lib/build/rspack.d.cts +2 -4
  67. package/dist/lib/build/rspack.d.ts +2 -4
  68. package/dist/lib/build/tsup.d.cts +2 -4
  69. package/dist/lib/build/tsup.d.ts +2 -4
  70. package/dist/lib/build/unbuild.d.cts +4 -23
  71. package/dist/lib/build/unbuild.d.ts +4 -23
  72. package/dist/lib/build/vite.d.cts +2 -4
  73. package/dist/lib/build/vite.d.ts +2 -4
  74. package/dist/lib/build/webpack.d.cts +2 -4
  75. package/dist/lib/build/webpack.d.ts +2 -4
  76. package/dist/lib/chunk-32Q2PG5D.js +9 -0
  77. package/dist/lib/chunk-35FGUJFD.cjs +2 -0
  78. package/dist/lib/{chunk-LIN4KAV3.js → chunk-52VDUP5J.js} +5 -7
  79. package/dist/lib/chunk-B3EE3VHZ.cjs +127 -0
  80. package/dist/lib/{chunk-UWHGJ4JS.js → chunk-BLNW3ZQA.js} +483 -1776
  81. package/dist/lib/chunk-DX2VAXZB.cjs +11 -0
  82. package/dist/lib/{chunk-VGSV2BEL.cjs → chunk-EFYMNU53.cjs} +6 -12
  83. package/dist/lib/chunk-FBQIPNRV.cjs +146 -0
  84. package/dist/lib/chunk-FFT4PWRM.js +1 -0
  85. package/dist/lib/{chunk-L4NEN725.js → chunk-G7S5PIAC.js} +1 -1
  86. package/dist/lib/chunk-KFJCWNVG.js +120 -0
  87. package/dist/lib/chunk-M2U6XIQ2.js +144 -0
  88. package/dist/lib/chunk-MVIKYHBX.cjs +2 -0
  89. package/dist/lib/chunk-NYNHNTHT.js +1 -0
  90. package/dist/lib/{chunk-A5SB72VO.cjs → chunk-PYQADZVV.cjs} +493 -1779
  91. package/dist/lib/chunk-QP6WX3Q3.js +1190 -0
  92. package/dist/lib/chunk-S7LLEDQM.cjs +1218 -0
  93. package/dist/lib/chunk-UHGGYHSK.cjs +175 -0
  94. package/dist/lib/chunk-YNKFRPUY.js +168 -0
  95. package/dist/lib/{chunk-ULJVBW4L.cjs → chunk-ZBDVQVUK.cjs} +1 -1
  96. package/dist/lib/{config-BoGlIhnH.d.cts → config-DTSdCZsw.d.cts} +650 -633
  97. package/dist/lib/{config-CTej7RMP.d.ts → config-DeUaQYc_.d.ts} +650 -633
  98. package/dist/lib/config-file.d.cts +2 -4
  99. package/dist/lib/config-file.d.ts +2 -4
  100. package/dist/lib/contexts/api-context.cjs +18 -0
  101. package/dist/lib/contexts/api-context.d.cts +69 -0
  102. package/dist/lib/contexts/api-context.d.ts +69 -0
  103. package/dist/lib/contexts/api-context.js +9 -0
  104. package/dist/lib/contexts/context.cjs +15 -0
  105. package/dist/lib/contexts/context.d.cts +255 -0
  106. package/dist/lib/contexts/context.d.ts +255 -0
  107. package/dist/lib/contexts/context.js +6 -0
  108. package/dist/lib/contexts/environment-context.cjs +17 -0
  109. package/dist/lib/contexts/environment-context.d.cts +65 -0
  110. package/dist/lib/contexts/environment-context.d.ts +65 -0
  111. package/dist/lib/contexts/environment-context.js +8 -0
  112. package/dist/lib/contexts/index.cjs +31 -0
  113. package/dist/lib/contexts/index.d.cts +35 -0
  114. package/dist/lib/contexts/index.d.ts +35 -0
  115. package/dist/lib/contexts/index.js +10 -0
  116. package/dist/lib/contexts/plugin-context.cjs +11 -0
  117. package/dist/lib/contexts/plugin-context.d.cts +42 -0
  118. package/dist/lib/contexts/plugin-context.d.ts +42 -0
  119. package/dist/lib/contexts/plugin-context.js +2 -0
  120. package/dist/lib/entry.d.cts +2 -4
  121. package/dist/lib/entry.d.ts +2 -4
  122. package/dist/lib/index.cjs +96 -74
  123. package/dist/lib/index.d.cts +17 -14
  124. package/dist/lib/index.d.ts +17 -14
  125. package/dist/lib/index.js +18 -12
  126. package/dist/lib/internal-CpVMJCaU.d.ts +39 -0
  127. package/dist/lib/internal-ypnrUNZy.d.cts +39 -0
  128. package/dist/lib/logger.d.cts +2 -4
  129. package/dist/lib/logger.d.ts +2 -4
  130. package/dist/lib/typescript/compiler-host.cjs +1 -1
  131. package/dist/lib/typescript/compiler-host.d.cts +2 -4
  132. package/dist/lib/typescript/compiler-host.d.ts +2 -4
  133. package/dist/lib/typescript/compiler-host.js +1 -1
  134. package/dist/lib/typescript/import-transformer.d.cts +2 -4
  135. package/dist/lib/typescript/import-transformer.d.ts +2 -4
  136. package/dist/lib/typescript/index.cjs +29 -24
  137. package/dist/lib/typescript/index.d.cts +4 -4
  138. package/dist/lib/typescript/index.d.ts +4 -4
  139. package/dist/lib/typescript/index.js +3 -2
  140. package/dist/lib/typescript/program.d.cts +2 -4
  141. package/dist/lib/typescript/program.d.ts +2 -4
  142. package/dist/lib/typescript/ts-morph.cjs +11 -0
  143. package/dist/lib/{create-program.d.ts → typescript/ts-morph.d.cts} +3 -5
  144. package/dist/lib/{create-program.d.cts → typescript/ts-morph.d.ts} +3 -5
  145. package/dist/lib/typescript/ts-morph.js +2 -0
  146. package/dist/lib/unplugin/factory.cjs +8 -4
  147. package/dist/lib/unplugin/factory.d.cts +27 -10
  148. package/dist/lib/unplugin/factory.d.ts +27 -10
  149. package/dist/lib/unplugin/factory.js +7 -3
  150. package/dist/lib/unplugin/helpers.cjs +11 -0
  151. package/dist/lib/unplugin/helpers.d.cts +128 -0
  152. package/dist/lib/unplugin/helpers.d.ts +128 -0
  153. package/dist/lib/unplugin/helpers.js +2 -0
  154. package/dist/lib/unplugin/index.cjs +12 -7
  155. package/dist/lib/unplugin/index.d.cts +4 -6
  156. package/dist/lib/unplugin/index.d.ts +4 -6
  157. package/dist/lib/unplugin/index.js +9 -4
  158. package/dist/lib/unplugin/plugin.cjs +4 -3
  159. package/dist/lib/unplugin/plugin.d.cts +2 -4
  160. package/dist/lib/unplugin/plugin.d.ts +2 -4
  161. package/dist/lib/unplugin/plugin.js +3 -2
  162. package/dist/lib/unplugin/resolve-id.cjs +2 -2
  163. package/dist/lib/unplugin/resolve-id.d.cts +2 -4
  164. package/dist/lib/unplugin/resolve-id.d.ts +2 -4
  165. package/dist/lib/unplugin/resolve-id.js +1 -1
  166. package/dist/lib/utilities/bundle.d.cts +2 -4
  167. package/dist/lib/utilities/bundle.d.ts +2 -4
  168. package/dist/lib/utilities/cache.d.cts +2 -4
  169. package/dist/lib/utilities/cache.d.ts +2 -4
  170. package/dist/lib/utilities/file-header.d.cts +2 -4
  171. package/dist/lib/utilities/file-header.d.ts +2 -4
  172. package/dist/lib/utilities/index.cjs +18 -18
  173. package/dist/lib/utilities/index.d.cts +2 -4
  174. package/dist/lib/utilities/index.d.ts +2 -4
  175. package/dist/lib/utilities/index.js +4 -4
  176. package/dist/lib/utilities/meta.d.cts +2 -4
  177. package/dist/lib/utilities/meta.d.ts +2 -4
  178. package/dist/lib/utilities/resolve-path.d.cts +2 -4
  179. package/dist/lib/utilities/resolve-path.d.ts +2 -4
  180. package/dist/lib/utilities/resolve.d.cts +2 -4
  181. package/dist/lib/utilities/resolve.d.ts +2 -4
  182. package/dist/lib/utilities/source-file.d.cts +2 -4
  183. package/dist/lib/utilities/source-file.d.ts +2 -4
  184. package/dist/lib/utilities/source-map.d.cts +2 -4
  185. package/dist/lib/utilities/source-map.d.ts +2 -4
  186. package/dist/lib/utilities/worker.d.cts +2 -4
  187. package/dist/lib/utilities/worker.d.ts +2 -4
  188. package/dist/lib/utilities/write-file.d.cts +2 -4
  189. package/dist/lib/utilities/write-file.d.ts +2 -4
  190. package/dist/next.cjs +8 -8
  191. package/dist/next.js +5 -5
  192. package/dist/nuxt.cjs +9 -9
  193. package/dist/nuxt.js +6 -6
  194. package/dist/plugin-utils/{context-D1I2JQgs.d.cts → context-DRFZE3XI.d.cts} +535 -518
  195. package/dist/plugin-utils/{context-D1I2JQgs.d.ts → context-DRFZE3XI.d.ts} +535 -518
  196. package/dist/plugin-utils/context-helpers.d.cts +2 -4
  197. package/dist/plugin-utils/context-helpers.d.ts +2 -4
  198. package/dist/plugin-utils/enforce.d.cts +2 -4
  199. package/dist/plugin-utils/enforce.d.ts +2 -4
  200. package/dist/plugin-utils/extend.d.cts +2 -4
  201. package/dist/plugin-utils/extend.d.ts +2 -4
  202. package/dist/plugin-utils/get-config-path.d.cts +2 -4
  203. package/dist/plugin-utils/get-config-path.d.ts +2 -4
  204. package/dist/plugin-utils/helpers.d.cts +2 -4
  205. package/dist/plugin-utils/helpers.d.ts +2 -4
  206. package/dist/plugin-utils/index.d.cts +2 -4
  207. package/dist/plugin-utils/index.d.ts +2 -4
  208. package/dist/plugin-utils/merge.d.cts +2 -4
  209. package/dist/plugin-utils/merge.d.ts +2 -4
  210. package/dist/plugin-utils/paths.d.cts +2 -4
  211. package/dist/plugin-utils/paths.d.ts +2 -4
  212. package/dist/{resolved-Dem-rX6I.d.cts → resolved-C00CJgsk.d.cts} +9 -8
  213. package/dist/{resolved-BVakEeek.d.ts → resolved-DKFZ11S7.d.ts} +9 -8
  214. package/dist/rolldown.cjs +7 -7
  215. package/dist/rolldown.d.cts +3 -5
  216. package/dist/rolldown.d.ts +3 -5
  217. package/dist/rolldown.js +4 -4
  218. package/dist/rollup.cjs +7 -7
  219. package/dist/rollup.d.cts +3 -5
  220. package/dist/rollup.d.ts +3 -5
  221. package/dist/rollup.js +4 -4
  222. package/dist/rspack.cjs +7 -7
  223. package/dist/rspack.d.cts +3 -5
  224. package/dist/rspack.d.ts +3 -5
  225. package/dist/rspack.js +4 -4
  226. package/dist/tsup.cjs +8 -8
  227. package/dist/tsup.js +5 -5
  228. package/dist/types/api.cjs +4 -0
  229. package/dist/types/api.d.cts +36 -0
  230. package/dist/types/api.d.ts +36 -0
  231. package/dist/types/api.js +1 -0
  232. package/dist/types/babel.d.cts +3 -5
  233. package/dist/types/babel.d.ts +3 -5
  234. package/dist/types/commands.d.cts +3 -5
  235. package/dist/types/commands.d.ts +3 -5
  236. package/dist/types/config.d.cts +3 -5
  237. package/dist/types/config.d.ts +3 -5
  238. package/dist/types/context.d.cts +3 -5
  239. package/dist/types/context.d.ts +3 -5
  240. package/dist/types/{vfs.cjs → fs.cjs} +3 -3
  241. package/dist/types/{vfs.d.cts → fs.d.cts} +43 -38
  242. package/dist/types/{vfs.d.ts → fs.d.ts} +43 -38
  243. package/dist/types/fs.js +2 -0
  244. package/dist/types/hooks.d.cts +3 -5
  245. package/dist/types/hooks.d.ts +3 -5
  246. package/dist/types/index.cjs +9 -8
  247. package/dist/types/index.d.cts +5 -6
  248. package/dist/types/index.d.ts +5 -6
  249. package/dist/types/index.js +3 -2
  250. package/dist/types/internal.d.cts +44 -9
  251. package/dist/types/internal.d.ts +44 -9
  252. package/dist/types/plugin.d.cts +3 -5
  253. package/dist/types/plugin.d.ts +3 -5
  254. package/dist/types/resolved.d.cts +3 -5
  255. package/dist/types/resolved.d.ts +3 -5
  256. package/dist/types/unplugin.d.cts +20 -12
  257. package/dist/types/unplugin.d.ts +20 -12
  258. package/dist/unloader.cjs +7 -7
  259. package/dist/unloader.d.cts +12 -14
  260. package/dist/unloader.d.ts +12 -14
  261. package/dist/unloader.js +4 -4
  262. package/dist/unplugin.cjs +18 -18
  263. package/dist/unplugin.d.cts +6 -9
  264. package/dist/unplugin.d.ts +6 -9
  265. package/dist/unplugin.js +15 -15
  266. package/dist/vite.cjs +7 -7
  267. package/dist/vite.d.cts +3 -5
  268. package/dist/vite.d.ts +3 -5
  269. package/dist/vite.js +4 -4
  270. package/dist/webpack.cjs +7 -7
  271. package/dist/webpack.d.cts +3 -5
  272. package/dist/webpack.d.ts +3 -5
  273. package/dist/webpack.js +4 -4
  274. package/package.json +38 -10
  275. package/schemas/fs.capnp +73 -15
  276. package/dist/chunk-RODEAGIJ.cjs +0 -32
  277. package/dist/chunk-SKLSRHBU.js +0 -29
  278. package/dist/hooks-B3vzw6La.d.ts +0 -28
  279. package/dist/hooks-YACA4jMY.d.cts +0 -28
  280. package/dist/lib/create-program.cjs +0 -11
  281. package/dist/lib/create-program.js +0 -2
  282. package/dist/lib/hooks-CDLPWf7j.d.cts +0 -28
  283. package/dist/lib/hooks-Cn-IqwYp.d.ts +0 -28
  284. package/dist/types/vfs.js +0 -2
  285. /package/dist/{chunk-KIKTWMI3.cjs → chunk-2NCILNCH.cjs} +0 -0
  286. /package/dist/{chunk-XVLT2RQ2.js → chunk-BLNT5INX.js} +0 -0
  287. /package/dist/{lib/chunk-RJ4277VZ.cjs → chunk-GRU7B3QM.cjs} +0 -0
  288. /package/dist/{lib/chunk-ZBLDAREE.js → chunk-T2P533I5.js} +0 -0
  289. /package/dist/lib/{chunk-CGYAL3S2.cjs → chunk-4EIXDLFP.cjs} +0 -0
  290. /package/dist/lib/{chunk-CXRSMYEX.js → chunk-RD5AUWXN.js} +0 -0
@@ -0,0 +1,292 @@
1
+ /* -------------------------------------------------------------------
2
+
3
+ ⚡ Storm Software - Powerlines
4
+
5
+ This code was released as part of the Powerlines project. Powerlines
6
+ is maintained by Storm Software under the Apache-2.0 license, and is
7
+ free for commercial and private use. For more information, please visit
8
+ our licensing page at https://stormsoftware.com/licenses/projects/powerlines.
9
+
10
+ Website: https://stormsoftware.com
11
+ Repository: https://github.com/storm-software/powerlines
12
+ Documentation: https://docs.stormsoftware.com/projects/powerlines
13
+ Contact: https://stormsoftware.com/contact
14
+
15
+ SPDX-License-Identifier: Apache-2.0
16
+
17
+ ------------------------------------------------------------------- */
18
+
19
+ import type { ConfigAPI, NodePath, types as t } from "@babel/core";
20
+ import type { HubInterface } from "@babel/traverse";
21
+
22
+ declare module "@babel/helper-plugin-utils" {
23
+ const knownAssumptions: readonly [
24
+ "arrayLikeIsIterable",
25
+ "constantReexports",
26
+ "constantSuper",
27
+ "enumerableModuleMeta",
28
+ "ignoreFunctionLength",
29
+ "ignoreToPrimitiveHint",
30
+ "iterableIsArray",
31
+ "mutableTemplateObject",
32
+ "noClassCalls",
33
+ "noDocumentAll",
34
+ "noIncompleteNsImportDetection",
35
+ "noNewArrows",
36
+ "noUninitializedPrivateFieldAccess",
37
+ "objectRestNoSymbols",
38
+ "privateFieldsAsSymbols",
39
+ "privateFieldsAsProperties",
40
+ "pureGetters",
41
+ "setClassMethods",
42
+ "setComputedProperties",
43
+ "setPublicClassFields",
44
+ "setSpreadProperties",
45
+ "skipForOfIteratorClosing",
46
+ "superIsCallableConstructor"
47
+ ];
48
+
49
+ export type AssumptionName = (typeof knownAssumptions)[number];
50
+
51
+ type AssumptionFunction = (name: AssumptionName) => boolean | undefined;
52
+
53
+ export type Target =
54
+ | "node"
55
+ | "deno"
56
+ | "chrome"
57
+ | "opera"
58
+ | "edge"
59
+ | "firefox"
60
+ | "safari"
61
+ | "ie"
62
+ | "ios"
63
+ | "android"
64
+ | "electron"
65
+ | "samsung"
66
+ | "opera_mobile";
67
+
68
+ export type Targets = {
69
+ [target in Target]?: string;
70
+ };
71
+
72
+ type TargetsFunction = () => Targets;
73
+
74
+ export type PresetAPI = {
75
+ targets: TargetsFunction;
76
+ addExternalDependency: (ref: string) => void;
77
+ } & ConfigAPI;
78
+
79
+ export type PluginAPI = {
80
+ assumption: AssumptionFunction;
81
+ } & PresetAPI &
82
+ BabelAPI;
83
+ }
84
+
85
+ declare module "@babel/core" {
86
+ export interface BabelFile
87
+ extends HubInterface,
88
+ Pick<PluginPass, "get" | "set"> {}
89
+ }
90
+
91
+ declare module "@babel/helper-module-transforms" {
92
+ interface LocalExportMetadata {
93
+ /**
94
+ * names of exports
95
+ */
96
+ names: string[];
97
+ kind: "import" | "hoisted" | "block" | "var";
98
+ }
99
+
100
+ type InteropType =
101
+ /**
102
+ * Babel interop for default-only imports
103
+ */
104
+ | "default"
105
+ /**
106
+ * Babel interop for namespace or default+named imports
107
+ */
108
+ | "namespace"
109
+ /**
110
+ * Node.js interop for default-only imports
111
+ */
112
+ | "node-default"
113
+ /**
114
+ * Node.js interop for namespace or default+named imports
115
+ */
116
+ | "node-namespace"
117
+ /**
118
+ * No interop, or named-only imports
119
+ */
120
+ | "none";
121
+
122
+ interface SourceModuleMetadata {
123
+ /**
124
+ * A unique variable name to use for this namespace object.
125
+ * Centralized for simplicity.
126
+ */
127
+ name: string;
128
+ loc: t.SourceLocation | undefined | null;
129
+ interop: InteropType;
130
+ /**
131
+ * Local binding to reference from this source namespace.
132
+ * Key: Local name, value: Import name
133
+ */
134
+ imports: Map<string, string>;
135
+ /**
136
+ * Local names that reference namespace object.
137
+ */
138
+ importsNamespace: Set<string>;
139
+ /**
140
+ * Reexports to create for namespace. Key: Export name, value: Import name
141
+ */
142
+ reexports: Map<string, string>;
143
+ /**
144
+ * List of names to re-export namespace as.
145
+ */
146
+ reexportNamespace: Set<string>;
147
+ /**
148
+ * Tracks if the source should be re-exported.
149
+ */
150
+ reexportAll: null | {
151
+ loc: t.SourceLocation | undefined | null;
152
+ };
153
+ wrap?: unknown;
154
+ referenced: boolean;
155
+ }
156
+
157
+ interface ModuleMetadata {
158
+ exportName: string;
159
+ /**
160
+ * The name of the variable that will reference an object
161
+ * containing export names.
162
+ */
163
+ exportNameListName: null | string;
164
+ hasExports: boolean;
165
+ /**
166
+ * Lookup from local binding to export information.
167
+ */
168
+ local: Map<string, LocalExportMetadata>;
169
+ /**
170
+ * Lookup of source file to source file metadata.
171
+ */
172
+ source: Map<string, SourceModuleMetadata>;
173
+ /**
174
+ * List of names that should only be printed as string literals.
175
+ * i.e. `import { "any unicode" as foo } from "some-module"`
176
+ * `stringSpecifiers` is `Set(1) ["any unicode"]`
177
+ * In most cases `stringSpecifiers` is an empty Set
178
+ */
179
+ stringSpecifiers: Set<string>;
180
+ }
181
+
182
+ type ImportInterop =
183
+ | "none"
184
+ | "babel"
185
+ | "node"
186
+ | ((source: string, filename?: string) => "none" | "babel" | "node");
187
+
188
+ type Lazy = boolean | string[] | ((source: string) => boolean);
189
+
190
+ interface RootOptions {
191
+ filename?: string | null;
192
+ filenameRelative?: string | null;
193
+ sourceRoot?: string | null;
194
+ }
195
+
196
+ export interface PluginOptions {
197
+ moduleId?: string;
198
+ moduleIds?: boolean;
199
+ getModuleId?: (moduleName: string) => string | null | undefined;
200
+ moduleRoot?: string;
201
+ }
202
+
203
+ export function getModuleName(
204
+ rootOpts: RootOptions,
205
+ pluginOpts: PluginOptions
206
+ ): string | null;
207
+
208
+ export interface RewriteModuleStatementsAndPrepareHeaderOptions {
209
+ exportName?: string;
210
+ strict?: boolean;
211
+ allowTopLevelThis?: boolean;
212
+ strictMode?: boolean;
213
+ loose?: boolean;
214
+ importInterop?: ImportInterop;
215
+ noInterop?: boolean;
216
+ lazy?: Lazy;
217
+ getWrapperPayload?: (
218
+ source: string,
219
+ metadata: SourceModuleMetadata,
220
+ importNodes: t.Node[]
221
+ ) => unknown;
222
+ wrapReference?: (
223
+ ref: t.Expression,
224
+ payload: unknown
225
+ ) => t.Expression | null | undefined;
226
+ esNamespaceOnly?: boolean;
227
+ filename: string | undefined | null;
228
+ constantReexports?: boolean | void;
229
+ enumerableModuleMeta?: boolean | void;
230
+ noIncompleteNsImportDetection?: boolean | void;
231
+ }
232
+
233
+ /**
234
+ * Perform all of the generic ES6 module rewriting needed to handle initial
235
+ * module processing. This function will rewrite the majority of the given
236
+ * program to reference the modules described by the returned metadata,
237
+ * and returns a list of statements for use when initializing the module.
238
+ */
239
+ export function rewriteModuleStatementsAndPrepareHeader(
240
+ path: NodePath<t.Program>,
241
+ options: RewriteModuleStatementsAndPrepareHeaderOptions
242
+ ): {
243
+ meta: ModuleMetadata;
244
+ headers: t.Statement[];
245
+ };
246
+
247
+ /**
248
+ * Check if a given source is an anonymous import, e.g. `import 'foo';`
249
+ */
250
+ export function isSideEffectImport(source: SourceModuleMetadata): boolean;
251
+
252
+ /**
253
+ * Create the runtime initialization statements for a given requested source.
254
+ * These will initialize all of the runtime import/export logic that
255
+ * can't be handled statically by the statements created by
256
+ * `buildExportInitializationStatements()`.
257
+ */
258
+ export function buildNamespaceInitStatements(
259
+ metadata: ModuleMetadata,
260
+ sourceMetadata: SourceModuleMetadata,
261
+ constantReexports?: boolean | void,
262
+ wrapReference?: (
263
+ ref: t.Identifier,
264
+ payload: unknown
265
+ ) => t.Expression | null | undefined
266
+ ): t.Statement[];
267
+
268
+ /**
269
+ * Flag a set of statements as hoisted above all else so that module init
270
+ * statements all run before user code.
271
+ */
272
+ export function ensureStatementsHoisted(statements: t.Statement[]): void;
273
+
274
+ /**
275
+ * Given an expression for a standard import object, like `require('foo')`,
276
+ * wrap it in a call to the interop helpers based on the type.
277
+ */
278
+ export function wrapInterop(
279
+ programPath: NodePath<t.Program>,
280
+ expr: t.Expression,
281
+ type: InteropType
282
+ ): t.CallExpression;
283
+
284
+ export function buildDynamicImport(
285
+ node: t.CallExpression | t.ImportExpression,
286
+ deferToThen: boolean,
287
+ wrapWithPromise: boolean,
288
+ builder: (specifier: t.Expression) => t.Expression
289
+ ): t.Expression;
290
+ }
291
+
292
+ export {};
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkJZAQW55G_cjs = require('./chunk-JZAQW55G.cjs');
3
+ var chunkAF5VNWZD_cjs = require('./chunk-AF5VNWZD.cjs');
4
4
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
5
  var omit = require('@stryke/helpers/omit');
6
6
 
@@ -8,7 +8,7 @@ function tsup(options = {}) {
8
8
  return {
9
9
  ...options,
10
10
  esbuildPlugins: [
11
- chunkJZAQW55G_cjs.esbuild_default({
11
+ chunkAF5VNWZD_cjs.esbuild_default({
12
12
  output: {
13
13
  outputPath: options.outDir,
14
14
  format: options.format
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ7MZRPLN_cjs = require('./chunk-J7MZRPLN.cjs');
3
+ var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
4
4
  var unplugin = require('unplugin');
5
5
 
6
- var webpack = unplugin.createWebpackPlugin(chunkJ7MZRPLN_cjs.createUnpluginFactory("webpack"));
6
+ var webpack = unplugin.createWebpackPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("webpack"));
7
7
  var webpack_default = webpack;
8
8
 
9
9
  exports.webpack = webpack;
@@ -1,4 +1,4 @@
1
- import { createUnpluginFactory } from './chunk-IGWSCIES.js';
1
+ import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
2
2
  import { createRolldownPlugin } from 'unplugin';
3
3
 
4
4
  var rolldown = createRolldownPlugin(createUnpluginFactory("rolldown"));
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ7MZRPLN_cjs = require('./chunk-J7MZRPLN.cjs');
3
+ var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
4
4
  var unplugin = require('unplugin');
5
5
 
6
- var rollup = unplugin.createRollupPlugin(chunkJ7MZRPLN_cjs.createUnpluginFactory("rollup"));
6
+ var rollup = unplugin.createRollupPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("rollup"));
7
7
  var rollup_default = rollup;
8
8
 
9
9
  exports.rollup = rollup;
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5IBA5HC2_cjs = require('./chunk-5IBA5HC2.cjs');
4
- var chunkJ7MZRPLN_cjs = require('./chunk-J7MZRPLN.cjs');
4
+ var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
5
5
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
6
6
  var isUndefined = require('@stryke/type-checks/is-undefined');
7
7
  var unplugin = require('unplugin');
8
8
 
9
- var esbuild = unplugin.createEsbuildPlugin(chunkJ7MZRPLN_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
9
+ var esbuild = unplugin.createEsbuildPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("esbuild", (api, plugin) => {
10
10
  return {
11
11
  ...plugin,
12
12
  esbuild: {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkDWV5QAGZ_cjs = require('./chunk-DWV5QAGZ.cjs');
3
+ var chunkOEKSQ22R_cjs = require('./chunk-OEKSQ22R.cjs');
4
4
  var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
5
  var types = require('@storm-software/config-tools/types');
6
6
  var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
@@ -93,7 +93,7 @@ async function handleResolveId(context, args, options = {}) {
93
93
  args.importer
94
94
  ] : []
95
95
  });
96
- if (bundleRequire.match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.variant === "builtin") {
96
+ if (bundleRequire.match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.type === "builtin") {
97
97
  return void 0;
98
98
  }
99
99
  if (bundleRequire.match(args.id, options.external) || args.id.startsWith("node:")) {
@@ -111,7 +111,7 @@ chunkUSNT2KNT_cjs.__name(handleResolveId, "handleResolveId");
111
111
  // src/lib/unplugin/factory.ts
112
112
  function createUnpluginFactory(variant, decorate) {
113
113
  return (config, meta) => {
114
- const log = chunkDWV5QAGZ_cjs.createLog("unplugin", config);
114
+ const log = chunkOEKSQ22R_cjs.createLog("unplugin", config);
115
115
  log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
116
116
  try {
117
117
  const userConfig = {
@@ -124,7 +124,7 @@ function createUnpluginFactory(variant, decorate) {
124
124
  async function buildStart() {
125
125
  log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
126
126
  const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(process.cwd());
127
- api = await chunkDWV5QAGZ_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
127
+ api = await chunkOEKSQ22R_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
128
128
  if (api.context.config.build.skipNodeModulesBundle) {
129
129
  resolvePatterns = bundleRequire.tsconfigPathsToRegExp(api.context.tsconfig.options.paths ?? []);
130
130
  }
@@ -194,6 +194,7 @@ function createUnpluginFactory(variant, decorate) {
194
194
  chunkUSNT2KNT_cjs.__name(writeBundle, "writeBundle");
195
195
  const result = {
196
196
  name: "powerlines",
197
+ api,
197
198
  resolveId: {
198
199
  filter: {
199
200
  id: {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- // src/types/vfs.ts
3
+ // src/types/fs.ts
4
4
  var __VFS_PATCH__ = "__VFS_PATCH__";
5
5
  var __VFS_REVERT__ = "__VFS_REVERT__";
6
6
 
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ var chunkXOI5CY62_cjs = require('./chunk-XOI5CY62.cjs');
4
+ var chunk6ACGI52O_cjs = require('./chunk-6ACGI52O.cjs');
5
+ var chunkQUZ4T5AX_cjs = require('./chunk-QUZ4T5AX.cjs');
6
+ var chunk2FLICTDF_cjs = require('./chunk-2FLICTDF.cjs');
7
+ var chunkGP6XGAJ4_cjs = require('./chunk-GP6XGAJ4.cjs');
8
+ var chunkVXAKPZ3A_cjs = require('./chunk-VXAKPZ3A.cjs');
9
+ var chunkAF5VNWZD_cjs = require('./chunk-AF5VNWZD.cjs');
10
+ var chunkVFLCP3SA_cjs = require('./chunk-VFLCP3SA.cjs');
11
+ var chunkCTSSNO5L_cjs = require('./chunk-CTSSNO5L.cjs');
12
+ var chunkUW3MXOWV_cjs = require('./chunk-UW3MXOWV.cjs');
13
+ var chunk3OQXZ5MM_cjs = require('./chunk-3OQXZ5MM.cjs');
14
+
15
+ // src/unplugin.ts
16
+ var plugins = {
17
+ astro: chunkVXAKPZ3A_cjs.astro_default,
18
+ esbuild: chunkAF5VNWZD_cjs.esbuild_default,
19
+ next: chunkVFLCP3SA_cjs.next_default,
20
+ nuxt: chunkCTSSNO5L_cjs.nuxt_default,
21
+ rolldown: chunkXOI5CY62_cjs.rolldown_default,
22
+ rollup: chunk6ACGI52O_cjs.rollup_default,
23
+ rspack: chunkQUZ4T5AX_cjs.rspack_default,
24
+ tsup: chunk2FLICTDF_cjs.tsup_default,
25
+ unloader: chunkGP6XGAJ4_cjs.unloader_default,
26
+ vite: chunkUW3MXOWV_cjs.vite_default,
27
+ webpack: chunk3OQXZ5MM_cjs.webpack_default
28
+ };
29
+ var unplugin_default = plugins;
30
+
31
+ exports.plugins = plugins;
32
+ exports.unplugin_default = unplugin_default;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkWG55ZHJL_cjs = require('./chunk-WG55ZHJL.cjs');
4
- var chunkJAJ4CI2F_cjs = require('./chunk-JAJ4CI2F.cjs');
3
+ var chunkUW3MXOWV_cjs = require('./chunk-UW3MXOWV.cjs');
4
+ var chunk3OQXZ5MM_cjs = require('./chunk-3OQXZ5MM.cjs');
5
5
  var kit = require('@nuxt/kit');
6
6
  require('@nuxt/schema');
7
7
 
@@ -12,8 +12,8 @@ var nuxt = kit.defineNuxtModule({
12
12
  },
13
13
  defaults: {},
14
14
  setup(options, _nuxt) {
15
- kit.addVitePlugin(() => chunkWG55ZHJL_cjs.vite_default(options));
16
- kit.addWebpackPlugin(() => chunkJAJ4CI2F_cjs.webpack_default(options));
15
+ kit.addVitePlugin(() => chunkUW3MXOWV_cjs.vite_default(options));
16
+ kit.addWebpackPlugin(() => chunk3OQXZ5MM_cjs.webpack_default(options));
17
17
  }
18
18
  });
19
19
  var nuxt_default = nuxt;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkJ7MZRPLN_cjs = require('./chunk-J7MZRPLN.cjs');
3
+ var chunkAIC2EHPW_cjs = require('./chunk-AIC2EHPW.cjs');
4
4
  var unplugin = require('unplugin');
5
5
 
6
- var unloader = unplugin.createUnloaderPlugin(chunkJ7MZRPLN_cjs.createUnpluginFactory("unloader"));
6
+ var unloader = unplugin.createUnloaderPlugin(chunkAIC2EHPW_cjs.createUnpluginFactory("unloader"));
7
7
  var unloader_default = unloader;
8
8
 
9
9
  exports.unloader = unloader;
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-VBR53KGY.js';
2
- import { createUnpluginFactory } from './chunk-IGWSCIES.js';
2
+ import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { isDevelopmentMode, isTestMode } from '@stryke/env/environment-checks';
5
5
  import defu from 'defu';
@@ -1,5 +1,5 @@
1
1
  import { extractESBuildConfig } from './chunk-VBR53KGY.js';
2
- import { createUnpluginFactory } from './chunk-IGWSCIES.js';
2
+ import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
3
3
  import { __name } from './chunk-SHUYVCID.js';
4
4
  import { isUndefined } from '@stryke/type-checks/is-undefined';
5
5
  import { createEsbuildPlugin } from 'unplugin';
@@ -1,4 +1,4 @@
1
- import { createLog, PowerlinesAPI } from './chunk-TNYZH6EG.js';
1
+ import { createLog, PowerlinesAPI } from './chunk-ZYCPZLIG.js';
2
2
  import { __name } from './chunk-SHUYVCID.js';
3
3
  import { LogLevelLabel } from '@storm-software/config-tools/types';
4
4
  import { getWorkspaceRoot } from '@stryke/fs/get-workspace-root';
@@ -91,7 +91,7 @@ async function handleResolveId(context, args, options = {}) {
91
91
  args.importer
92
92
  ] : []
93
93
  });
94
- if (match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.variant === "builtin") {
94
+ if (match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.type === "builtin") {
95
95
  return void 0;
96
96
  }
97
97
  if (match(args.id, options.external) || args.id.startsWith("node:")) {
@@ -192,6 +192,7 @@ function createUnpluginFactory(variant, decorate) {
192
192
  __name(writeBundle, "writeBundle");
193
193
  const result = {
194
194
  name: "powerlines",
195
+ api,
195
196
  resolveId: {
196
197
  filter: {
197
198
  id: {
@@ -1,4 +1,4 @@
1
- import { webpack_default } from './chunk-Q7HBETZW.js';
1
+ import { webpack_default } from './chunk-O2WB6QZ6.js';
2
2
  import { __name } from './chunk-SHUYVCID.js';
3
3
 
4
4
  // src/next.ts
@@ -1,4 +1,4 @@
1
- import { createUnpluginFactory } from './chunk-IGWSCIES.js';
1
+ import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
2
2
  import { createRollupPlugin } from 'unplugin';
3
3
 
4
4
  var rollup = createRollupPlugin(createUnpluginFactory("rollup"));
@@ -1,5 +1,5 @@
1
- import { vite_default } from './chunk-DUYZ3TCT.js';
2
- import { webpack_default } from './chunk-Q7HBETZW.js';
1
+ import { vite_default } from './chunk-HLQGKQZY.js';
2
+ import { webpack_default } from './chunk-O2WB6QZ6.js';
3
3
  import { defineNuxtModule, addVitePlugin, addWebpackPlugin } from '@nuxt/kit';
4
4
  import '@nuxt/schema';
5
5
 
@@ -1,4 +1,4 @@
1
- import { createUnpluginFactory } from './chunk-IGWSCIES.js';
1
+ import { createUnpluginFactory } from './chunk-ISLX4Z3L.js';
2
2
  import { createWebpackPlugin } from 'unplugin';
3
3
 
4
4
  var webpack = createWebpackPlugin(createUnpluginFactory("webpack"));