powerlines 0.23.9 → 0.24.0

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 (273) hide show
  1. package/dist/{api-5H3zEedD.d.ts → api-C32Buv5_.d.ts} +1 -1
  2. package/dist/{api-B77aqxGC.d.cts → api-wzd5AREv.d.cts} +1 -1
  3. package/dist/api.cjs +2 -2
  4. package/dist/api.d.cts +4 -2
  5. package/dist/api.d.ts +4 -2
  6. package/dist/api.js +1 -1
  7. package/dist/astro.cjs +4 -4
  8. package/dist/astro.d.cts +3 -1
  9. package/dist/astro.d.ts +3 -1
  10. package/dist/astro.js +3 -3
  11. package/dist/babel-types.d.ts +292 -0
  12. package/dist/chunk-2TWFBWKA.cjs +133 -0
  13. package/dist/{chunk-UYJXRMS3.js → chunk-7V3LWCLB.js} +1 -1
  14. package/dist/chunk-EXQM3KGH.js +130 -0
  15. package/dist/{chunk-6ZKM7WOB.cjs → chunk-FGH3MZTQ.cjs} +535 -659
  16. package/dist/{chunk-ITL6JGKX.cjs → chunk-FPB2O7FD.cjs} +2 -2
  17. package/dist/{chunk-KOBCKTHY.js → chunk-H74SWU2C.js} +1 -1
  18. package/dist/{chunk-2QLM4MYP.cjs → chunk-HTGCHSLH.cjs} +2 -2
  19. package/dist/{chunk-G5K3I7JU.cjs → chunk-TIBYAWZZ.cjs} +2 -2
  20. package/dist/{chunk-S47BU5QR.js → chunk-ZEE73BCY.js} +1 -1
  21. package/dist/{chunk-FDEGM4CR.js → chunk-ZT2J55YE.js} +538 -659
  22. package/dist/config.d.cts +3 -1
  23. package/dist/config.d.ts +3 -1
  24. package/dist/esbuild.cjs +6 -6
  25. package/dist/esbuild.d.cts +3 -1
  26. package/dist/esbuild.d.ts +3 -1
  27. package/dist/esbuild.js +3 -3
  28. package/dist/farm.cjs +3 -3
  29. package/dist/farm.d.cts +3 -1
  30. package/dist/farm.d.ts +3 -1
  31. package/dist/farm.js +2 -2
  32. package/dist/index.cjs +11 -23
  33. package/dist/index.d.cts +6 -135
  34. package/dist/index.d.ts +6 -135
  35. package/dist/index.js +2 -2
  36. package/dist/lib/{api-Cm51oVbC.d.cts → api-BRMITKt-.d.cts} +1 -1
  37. package/dist/lib/{api-mja4jirh.d.ts → api-CDUN9en8.d.ts} +1 -1
  38. package/dist/lib/build/esbuild.d.cts +3 -1
  39. package/dist/lib/build/esbuild.d.ts +3 -1
  40. package/dist/lib/build/index.d.cts +5 -3
  41. package/dist/lib/build/index.d.ts +5 -3
  42. package/dist/lib/build/rolldown.d.cts +3 -1
  43. package/dist/lib/build/rolldown.d.ts +3 -1
  44. package/dist/lib/build/rollup.d.cts +3 -1
  45. package/dist/lib/build/rollup.d.ts +3 -1
  46. package/dist/lib/build/rspack.d.cts +3 -1
  47. package/dist/lib/build/rspack.d.ts +3 -1
  48. package/dist/lib/build/tsup.d.cts +3 -1
  49. package/dist/lib/build/tsup.d.ts +3 -1
  50. package/dist/lib/build/unbuild.d.cts +5 -3
  51. package/dist/lib/build/unbuild.d.ts +5 -3
  52. package/dist/lib/build/vite.d.cts +3 -1
  53. package/dist/lib/build/vite.d.ts +3 -1
  54. package/dist/lib/build/webpack.d.cts +3 -1
  55. package/dist/lib/build/webpack.d.ts +3 -1
  56. package/dist/lib/{chunk-52VDUP5J.js → chunk-6I5PL7H2.js} +5 -17
  57. package/dist/lib/{chunk-UPVFKXB7.cjs → chunk-6PPZCPME.cjs} +1 -2
  58. package/dist/lib/{chunk-OI7EHXNE.js → chunk-7CVPZOH4.js} +3 -3
  59. package/dist/lib/{chunk-7XHBIYIN.cjs → chunk-7VJ42H2I.cjs} +0 -16
  60. package/dist/lib/{chunk-SEWUUTNA.js → chunk-A2NFSQ5K.js} +1 -1
  61. package/dist/lib/{chunk-B3DJ4CXY.cjs → chunk-AA6RBP44.cjs} +10 -10
  62. package/dist/lib/{chunk-BGGENJH4.js → chunk-CGRHZJY5.js} +42 -83
  63. package/dist/lib/{chunk-AHONHQGB.js → chunk-DFW5FGEO.js} +1 -1
  64. package/dist/lib/{chunk-VL63QEPF.cjs → chunk-DUZJ7ZF2.cjs} +2 -2
  65. package/dist/lib/{chunk-EFYMNU53.cjs → chunk-EV357RFB.cjs} +5 -17
  66. package/dist/lib/{chunk-YH5GOJS3.js → chunk-FQLZZYYO.js} +1 -16
  67. package/dist/lib/{chunk-54XNJQTH.js → chunk-HAXL7QE7.js} +3 -3
  68. package/dist/lib/chunk-K3NBD5LL.cjs +75 -0
  69. package/dist/lib/{chunk-63MH3ERQ.js → chunk-KFWMKDJQ.js} +395 -591
  70. package/dist/lib/{chunk-3KR6TYGW.cjs → chunk-MS3CD2U6.cjs} +52 -94
  71. package/dist/lib/{chunk-LQEGZT5U.cjs → chunk-RNHKEPFD.cjs} +397 -594
  72. package/dist/lib/{chunk-4EIXDLFP.cjs → chunk-SAS5EPBD.cjs} +7 -5
  73. package/dist/lib/{chunk-EUDKQWSB.js → chunk-VHLINWXG.js} +1 -2
  74. package/dist/lib/{chunk-SMZ672RP.cjs → chunk-VMLQATMA.cjs} +6 -6
  75. package/dist/lib/{chunk-IBPA3VN5.cjs → chunk-WUYK74EH.cjs} +3 -3
  76. package/dist/lib/chunk-XBM7FHNK.js +68 -0
  77. package/dist/lib/{chunk-RD5AUWXN.js → chunk-YQ3ODCHV.js} +7 -5
  78. package/dist/lib/{config-BnJpgcGr.d.cts → config-D8KrE7SZ.d.cts} +109 -35
  79. package/dist/lib/{config-7Q2dBjJE.d.ts → config-DBIFdRoq.d.ts} +109 -35
  80. package/dist/lib/config-file.cjs +3 -3
  81. package/dist/lib/config-file.d.cts +3 -1
  82. package/dist/lib/config-file.d.ts +3 -1
  83. package/dist/lib/config-file.js +1 -1
  84. package/dist/lib/contexts/api-context.cjs +7 -6
  85. package/dist/lib/contexts/api-context.d.cts +5 -3
  86. package/dist/lib/contexts/api-context.d.ts +5 -3
  87. package/dist/lib/contexts/api-context.js +6 -5
  88. package/dist/lib/contexts/context.cjs +5 -4
  89. package/dist/lib/contexts/context.d.cts +47 -4
  90. package/dist/lib/contexts/context.d.ts +47 -4
  91. package/dist/lib/contexts/context.js +4 -3
  92. package/dist/lib/contexts/environment-context.cjs +6 -5
  93. package/dist/lib/contexts/environment-context.d.cts +5 -3
  94. package/dist/lib/contexts/environment-context.d.ts +5 -3
  95. package/dist/lib/contexts/environment-context.js +5 -4
  96. package/dist/lib/contexts/index.cjs +9 -8
  97. package/dist/lib/contexts/index.d.cts +5 -3
  98. package/dist/lib/contexts/index.d.ts +5 -3
  99. package/dist/lib/contexts/index.js +6 -5
  100. package/dist/lib/contexts/plugin-context.d.cts +5 -3
  101. package/dist/lib/contexts/plugin-context.d.ts +5 -3
  102. package/dist/lib/entry.d.cts +3 -1
  103. package/dist/lib/entry.d.ts +3 -1
  104. package/dist/lib/index.cjs +49 -59
  105. package/dist/lib/index.d.cts +68 -49
  106. package/dist/lib/index.d.ts +68 -49
  107. package/dist/lib/index.js +14 -16
  108. package/dist/lib/{internal-BEygquYh.d.ts → internal-1qCyw7bA.d.ts} +2 -2
  109. package/dist/lib/{internal-BeR8fOB1.d.cts → internal-CaGANOWK.d.cts} +2 -2
  110. package/dist/lib/logger.d.cts +3 -1
  111. package/dist/lib/logger.d.ts +3 -1
  112. package/dist/lib/typescript/compiler-host.cjs +7 -7
  113. package/dist/lib/typescript/compiler-host.d.cts +3 -1
  114. package/dist/lib/typescript/compiler-host.d.ts +3 -1
  115. package/dist/lib/typescript/compiler-host.js +6 -6
  116. package/dist/lib/typescript/import-transformer.cjs +1 -1
  117. package/dist/lib/typescript/import-transformer.d.cts +3 -1
  118. package/dist/lib/typescript/import-transformer.d.ts +3 -1
  119. package/dist/lib/typescript/import-transformer.js +1 -1
  120. package/dist/lib/typescript/index.cjs +8 -8
  121. package/dist/lib/typescript/index.d.cts +3 -2
  122. package/dist/lib/typescript/index.d.ts +3 -2
  123. package/dist/lib/typescript/index.js +2 -2
  124. package/dist/lib/typescript/program.cjs +6 -6
  125. package/dist/lib/typescript/program.d.cts +3 -1
  126. package/dist/lib/typescript/program.d.ts +3 -1
  127. package/dist/lib/typescript/program.js +1 -1
  128. package/dist/lib/typescript/ts-morph.cjs +2 -2
  129. package/dist/lib/typescript/ts-morph.d.cts +5 -3
  130. package/dist/lib/typescript/ts-morph.d.ts +5 -3
  131. package/dist/lib/typescript/ts-morph.js +1 -1
  132. package/dist/lib/unplugin/factory.cjs +8 -8
  133. package/dist/lib/unplugin/factory.d.cts +5 -3
  134. package/dist/lib/unplugin/factory.d.ts +5 -3
  135. package/dist/lib/unplugin/factory.js +7 -7
  136. package/dist/lib/unplugin/helpers.d.cts +3 -1
  137. package/dist/lib/unplugin/helpers.d.ts +3 -1
  138. package/dist/lib/unplugin/index.cjs +13 -13
  139. package/dist/lib/unplugin/index.d.cts +6 -4
  140. package/dist/lib/unplugin/index.d.ts +6 -4
  141. package/dist/lib/unplugin/index.js +9 -9
  142. package/dist/lib/unplugin/plugin.cjs +2 -3
  143. package/dist/lib/unplugin/plugin.d.cts +6 -4
  144. package/dist/lib/unplugin/plugin.d.ts +6 -4
  145. package/dist/lib/unplugin/plugin.js +1 -2
  146. package/dist/lib/{unplugin-CbbNDduM.d.ts → unplugin-CEeJqADD.d.ts} +2 -2
  147. package/dist/lib/{unplugin-ppAOzR__.d.cts → unplugin-bUSyjd0S.d.cts} +2 -2
  148. package/dist/lib/utilities/bundle.cjs +2 -3
  149. package/dist/lib/utilities/bundle.d.cts +3 -1
  150. package/dist/lib/utilities/bundle.d.ts +3 -1
  151. package/dist/lib/utilities/bundle.js +1 -2
  152. package/dist/lib/utilities/cache.d.cts +3 -1
  153. package/dist/lib/utilities/cache.d.ts +3 -1
  154. package/dist/lib/utilities/file-header.d.cts +3 -1
  155. package/dist/lib/utilities/file-header.d.ts +3 -1
  156. package/dist/lib/utilities/index.cjs +21 -30
  157. package/dist/lib/utilities/index.d.cts +4 -3
  158. package/dist/lib/utilities/index.d.ts +4 -3
  159. package/dist/lib/utilities/index.js +5 -6
  160. package/dist/lib/utilities/meta.cjs +7 -11
  161. package/dist/lib/utilities/meta.d.cts +4 -3
  162. package/dist/lib/utilities/meta.d.ts +4 -3
  163. package/dist/lib/utilities/meta.js +1 -1
  164. package/dist/lib/utilities/resolve.cjs +3 -4
  165. package/dist/lib/utilities/resolve.d.cts +3 -1
  166. package/dist/lib/utilities/resolve.d.ts +3 -1
  167. package/dist/lib/utilities/resolve.js +2 -3
  168. package/dist/lib/utilities/source-file.d.cts +3 -1
  169. package/dist/lib/utilities/source-file.d.ts +3 -1
  170. package/dist/lib/utilities/source-map.d.cts +3 -1
  171. package/dist/lib/utilities/source-map.d.ts +3 -1
  172. package/dist/lib/utilities/worker.d.cts +3 -1
  173. package/dist/lib/utilities/worker.d.ts +3 -1
  174. package/dist/lib/utilities/write-file.d.cts +3 -1
  175. package/dist/lib/utilities/write-file.d.ts +3 -1
  176. package/dist/next.cjs +4 -4
  177. package/dist/next.js +3 -3
  178. package/dist/nuxt.cjs +6 -6
  179. package/dist/nuxt.js +4 -4
  180. package/dist/plugin-utils/{context-Cg11S-CE.d.ts → context-BITGF5LZ.d.cts} +118 -39
  181. package/dist/plugin-utils/{context-Cg11S-CE.d.cts → context-BITGF5LZ.d.ts} +118 -39
  182. package/dist/plugin-utils/context-helpers.d.cts +4 -1
  183. package/dist/plugin-utils/context-helpers.d.ts +4 -1
  184. package/dist/plugin-utils/enforce.d.cts +4 -1
  185. package/dist/plugin-utils/enforce.d.ts +4 -1
  186. package/dist/plugin-utils/extend.d.cts +4 -1
  187. package/dist/plugin-utils/extend.d.ts +4 -1
  188. package/dist/plugin-utils/get-config-path.d.cts +4 -1
  189. package/dist/plugin-utils/get-config-path.d.ts +4 -1
  190. package/dist/plugin-utils/helpers.d.cts +4 -1
  191. package/dist/plugin-utils/helpers.d.ts +4 -1
  192. package/dist/plugin-utils/index.d.cts +4 -1
  193. package/dist/plugin-utils/index.d.ts +4 -1
  194. package/dist/plugin-utils/merge.d.cts +4 -1
  195. package/dist/plugin-utils/merge.d.ts +4 -1
  196. package/dist/plugin-utils/paths.d.cts +4 -1
  197. package/dist/plugin-utils/paths.d.ts +4 -1
  198. package/dist/{resolved-B3BSdXCt.d.ts → resolved-BABoCnXm.d.ts} +43 -1
  199. package/dist/{resolved-DGrpILrS.d.cts → resolved-CSqGKlA5.d.cts} +43 -1
  200. package/dist/rolldown.cjs +3 -3
  201. package/dist/rolldown.d.cts +3 -1
  202. package/dist/rolldown.d.ts +3 -1
  203. package/dist/rolldown.js +2 -2
  204. package/dist/rollup.cjs +3 -3
  205. package/dist/rollup.d.cts +3 -1
  206. package/dist/rollup.d.ts +3 -1
  207. package/dist/rollup.js +2 -2
  208. package/dist/rspack.cjs +3 -3
  209. package/dist/rspack.d.cts +3 -1
  210. package/dist/rspack.d.ts +3 -1
  211. package/dist/rspack.js +2 -2
  212. package/dist/tsup.cjs +4 -4
  213. package/dist/tsup.js +3 -3
  214. package/dist/types/api.d.cts +4 -2
  215. package/dist/types/api.d.ts +4 -2
  216. package/dist/types/babel.d.cts +3 -1
  217. package/dist/types/babel.d.ts +3 -1
  218. package/dist/types/commands.d.cts +3 -1
  219. package/dist/types/commands.d.ts +3 -1
  220. package/dist/types/config.d.cts +3 -1
  221. package/dist/types/config.d.ts +3 -1
  222. package/dist/types/context.d.cts +3 -1
  223. package/dist/types/context.d.ts +3 -1
  224. package/dist/types/fs.d.cts +68 -36
  225. package/dist/types/fs.d.ts +68 -36
  226. package/dist/types/hooks.d.cts +3 -1
  227. package/dist/types/hooks.d.ts +3 -1
  228. package/dist/types/index.d.cts +5 -3
  229. package/dist/types/index.d.ts +5 -3
  230. package/dist/types/internal.d.cts +4 -2
  231. package/dist/types/internal.d.ts +4 -2
  232. package/dist/types/plugin.d.cts +3 -1
  233. package/dist/types/plugin.d.ts +3 -1
  234. package/dist/types/resolved.d.cts +3 -1
  235. package/dist/types/resolved.d.ts +3 -1
  236. package/dist/types/unplugin.d.cts +4 -2
  237. package/dist/types/unplugin.d.ts +4 -2
  238. package/dist/unloader.cjs +3 -3
  239. package/dist/unloader.d.cts +3 -1
  240. package/dist/unloader.d.ts +3 -1
  241. package/dist/unloader.js +2 -2
  242. package/dist/unplugin.cjs +12 -28
  243. package/dist/unplugin.d.cts +104 -31
  244. package/dist/unplugin.d.ts +104 -31
  245. package/dist/unplugin.js +10 -23
  246. package/dist/vite.cjs +6 -6
  247. package/dist/vite.d.cts +3 -1
  248. package/dist/vite.d.ts +3 -1
  249. package/dist/vite.js +3 -3
  250. package/dist/webpack.cjs +6 -6
  251. package/dist/webpack.d.cts +3 -1
  252. package/dist/webpack.d.ts +3 -1
  253. package/dist/webpack.js +3 -3
  254. package/package.json +16 -14
  255. package/schemas/fs.capnp +35 -38
  256. package/dist/chunk-FJWXCUGQ.cjs +0 -234
  257. package/dist/chunk-RKMUBSYG.js +0 -230
  258. package/dist/lib/chunk-7JAGT5GC.cjs +0 -74
  259. package/dist/lib/chunk-G7S5PIAC.js +0 -89
  260. package/dist/lib/chunk-MZJWK36Q.cjs +0 -37
  261. package/dist/lib/chunk-NWAD7K4D.js +0 -35
  262. package/dist/lib/chunk-PVCAB6BZ.js +0 -67
  263. package/dist/lib/chunk-ZBDVQVUK.cjs +0 -91
  264. package/dist/lib/unplugin/resolve-id.cjs +0 -11
  265. package/dist/lib/unplugin/resolve-id.d.cts +0 -57
  266. package/dist/lib/unplugin/resolve-id.d.ts +0 -57
  267. package/dist/lib/unplugin/resolve-id.js +0 -2
  268. package/dist/lib/utilities/resolve-path.cjs +0 -11
  269. package/dist/lib/utilities/resolve-path.d.cts +0 -40
  270. package/dist/lib/utilities/resolve-path.d.ts +0 -40
  271. package/dist/lib/utilities/resolve-path.js +0 -2
  272. /package/dist/lib/{chunk-HMO3LAYL.js → chunk-I2DQRMX3.js} +0 -0
  273. /package/dist/lib/{chunk-EJ25PQEL.cjs → chunk-YK4PYVLM.cjs} +0 -0
package/dist/webpack.cjs CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunk2QLM4MYP_cjs = require('./chunk-2QLM4MYP.cjs');
6
- require('./chunk-FJWXCUGQ.cjs');
7
- require('./chunk-6ZKM7WOB.cjs');
5
+ var chunkHTGCHSLH_cjs = require('./chunk-HTGCHSLH.cjs');
6
+ require('./chunk-2TWFBWKA.cjs');
7
+ require('./chunk-FGH3MZTQ.cjs');
8
8
  require('./chunk-ETKZMGLN.cjs');
9
9
  require('./chunk-PAMSESZV.cjs');
10
10
  require('./chunk-AYKZK666.cjs');
@@ -14,13 +14,13 @@ require('./chunk-USNT2KNT.cjs');
14
14
 
15
15
  Object.defineProperty(exports, "default", {
16
16
  enumerable: true,
17
- get: function () { return chunk2QLM4MYP_cjs.webpack_default; }
17
+ get: function () { return chunkHTGCHSLH_cjs.webpack_default; }
18
18
  });
19
19
  Object.defineProperty(exports, "module.exports", {
20
20
  enumerable: true,
21
- get: function () { return chunk2QLM4MYP_cjs.webpack; }
21
+ get: function () { return chunkHTGCHSLH_cjs.webpack; }
22
22
  });
23
23
  Object.defineProperty(exports, "webpack", {
24
24
  enumerable: true,
25
- get: function () { return chunk2QLM4MYP_cjs.webpack; }
25
+ get: function () { return chunkHTGCHSLH_cjs.webpack; }
26
26
  });
@@ -1,5 +1,5 @@
1
1
  import * as _webpack from 'webpack';
2
- import { M as WebpackUserConfig } from './resolved-DGrpILrS.cjs';
2
+ import { M as WebpackUserConfig } from './resolved-CSqGKlA5.cjs';
3
3
  import '@stryke/types/base';
4
4
  import '@stryke/types/configuration';
5
5
  import '@stryke/types/file';
@@ -25,9 +25,11 @@ import 'jiti';
25
25
  import 'magic-string';
26
26
  import 'memfs';
27
27
  import 'semver';
28
+ import 'ts-morph';
28
29
  import 'unimport';
29
30
  import 'unplugin';
30
31
  import './types/fs.cjs';
32
+ import '@stryke/fs/resolve';
31
33
  import 'node:fs';
32
34
  import '@stryke/types/array';
33
35
  import './types/tsconfig.cjs';
package/dist/webpack.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _webpack from 'webpack';
2
- import { M as WebpackUserConfig } from './resolved-B3BSdXCt.js';
2
+ import { M as WebpackUserConfig } from './resolved-BABoCnXm.js';
3
3
  import '@stryke/types/base';
4
4
  import '@stryke/types/configuration';
5
5
  import '@stryke/types/file';
@@ -25,9 +25,11 @@ import 'jiti';
25
25
  import 'magic-string';
26
26
  import 'memfs';
27
27
  import 'semver';
28
+ import 'ts-morph';
28
29
  import 'unimport';
29
30
  import 'unplugin';
30
31
  import './types/fs.js';
32
+ import '@stryke/fs/resolve';
31
33
  import 'node:fs';
32
34
  import '@stryke/types/array';
33
35
  import './types/tsconfig.js';
package/dist/webpack.js CHANGED
@@ -1,6 +1,6 @@
1
- export { webpack_default as default, webpack as "module.exports", webpack } from './chunk-S47BU5QR.js';
2
- import './chunk-RKMUBSYG.js';
3
- import './chunk-FDEGM4CR.js';
1
+ export { webpack_default as default, webpack as "module.exports", webpack } from './chunk-ZEE73BCY.js';
2
+ import './chunk-EXQM3KGH.js';
3
+ import './chunk-ZT2J55YE.js';
4
4
  import './chunk-JQCWV4DT.js';
5
5
  import './chunk-JKBJF3UI.js';
6
6
  import './chunk-VT7NVLLU.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powerlines",
3
- "version": "0.23.9",
3
+ "version": "0.24.0",
4
4
  "type": "module",
5
5
  "description": "The \"any framework\" framework that simplifies modern dev tool usage, generates virtual (or actual) code modules, and improves DX across the board.",
6
6
  "repository": {
@@ -513,17 +513,17 @@
513
513
  "@storm-software/esbuild": "^0.53.48",
514
514
  "@storm-software/tsup": "^0.2.46",
515
515
  "@storm-software/unbuild": "^0.57.48",
516
- "@stryke/capnp": "^0.12.21",
517
- "@stryke/convert": "^0.6.2",
518
- "@stryke/env": "^0.20.14",
519
- "@stryke/fs": "^0.32.13",
520
- "@stryke/hash": "^0.12.3",
521
- "@stryke/helpers": "^0.9.4",
522
- "@stryke/json": "^0.9.5",
523
- "@stryke/path": "^0.19.2",
524
- "@stryke/string-format": "^0.12.2",
525
- "@stryke/type-checks": "^0.3.12",
526
- "@stryke/unique-id": "^0.3.8",
516
+ "@stryke/capnp": "^0.12.24",
517
+ "@stryke/convert": "^0.6.5",
518
+ "@stryke/env": "^0.20.17",
519
+ "@stryke/fs": "^0.33.0",
520
+ "@stryke/hash": "^0.12.6",
521
+ "@stryke/helpers": "^0.9.7",
522
+ "@stryke/json": "^0.9.8",
523
+ "@stryke/path": "^0.20.0",
524
+ "@stryke/string-format": "^0.12.5",
525
+ "@stryke/type-checks": "^0.3.15",
526
+ "@stryke/unique-id": "^0.3.11",
527
527
  "@typescript-eslint/utils": "^8.47.0",
528
528
  "babel-dead-code-elimination": "^1.0.10",
529
529
  "babel-plugin-parameter-decorator": "^1.0.16",
@@ -538,6 +538,8 @@
538
538
  "jest-worker": "^30.2.0",
539
539
  "jiti": "^2.6.1",
540
540
  "magic-string": "^0.30.21",
541
+ "flat-cache": "^6.1.19",
542
+ "@cacheable/memory": "^2.0.5",
541
543
  "prettier": "^3.6.2",
542
544
  "rollup-plugin-typescript2": "^0.36.0",
543
545
  "ts-morph": "^27.0.2",
@@ -551,7 +553,7 @@
551
553
  "devDependencies": {
552
554
  "@microsoft/tsdoc": "^0.15.1",
553
555
  "@storm-software/testing-tools": "^1.119.48",
554
- "@stryke/types": "^0.10.2",
556
+ "@stryke/types": "^0.10.5",
555
557
  "@types/babel__core": "^7.20.5",
556
558
  "@types/babel__helper-module-imports": "^7.18.3",
557
559
  "@types/babel__helper-plugin-utils": "^7.10.3",
@@ -566,5 +568,5 @@
566
568
  "typescript": "^5.9.3"
567
569
  },
568
570
  "publishConfig": { "access": "public" },
569
- "gitHead": "d217b583335e4615b4e28fba7325f51fbd78a3f6"
571
+ "gitHead": "73acce2067b9d81822a59cb03a4b1e7fa8873bf9"
570
572
  }
package/schemas/fs.capnp CHANGED
@@ -34,43 +34,43 @@ struct FileMetadata {
34
34
  }
35
35
  }
36
36
 
37
- # Additional metadata associated with a file in the file system.
38
- struct ChunkData {
39
- # The identifier for the file data.
40
- id @0 :Text;
41
- # An additional name for the file.
42
- name @1 :Text;
43
- # Files that are implicitly loaded after one of the specified files.
44
- implicitlyLoadedAfterOneOf @2 :List(Text);
45
- # The importer of the file.
46
- importer @3 :Text;
47
- # The signature preservation mode for the file.
48
- preserveSignature @4 :PreserveSignatureType;
49
- }
37
+ # # Additional metadata associated with a file in the file system.
38
+ # struct ChunkData {
39
+ # # The identifier for the file data.
40
+ # id @0 :Text;
41
+ # # An additional name for the file.
42
+ # name @1 :Text;
43
+ # # Files that are implicitly loaded after one of the specified files.
44
+ # implicitlyLoadedAfterOneOf @2 :List(Text);
45
+ # # The importer of the file.
46
+ # importer @3 :Text;
47
+ # # The signature preservation mode for the file.
48
+ # preserveSignature @4 :PreserveSignatureType;
49
+ # }
50
50
 
51
- # Additional metadata associated with a file in the file system.
52
- struct PrebuiltData {
53
- # The identifier for the file data.
54
- id @0 :Text;
55
- # An additional name for the file.
56
- name @1 :Text;
57
- # The file exports.
58
- exports @2 :List(Text);
59
- # The source map for the file.
60
- map @3 :Text;
61
- }
51
+ # # Additional metadata associated with a file in the file system.
52
+ # struct PrebuiltData {
53
+ # # The identifier for the file data.
54
+ # id @0 :Text;
55
+ # # An additional name for the file.
56
+ # name @1 :Text;
57
+ # # The file exports.
58
+ # exports @2 :List(Text);
59
+ # # The source map for the file.
60
+ # map @3 :Text;
61
+ # }
62
62
 
63
- # Additional metadata associated with a file in the file system.
64
- struct AssetData {
65
- # The identifier for the file data.
66
- id @0 :Text;
67
- # An additional name for the file.
68
- name @1 :Text;
69
- # Indicates whether the file needs a code reference.
70
- needsCodeReference @2 :Bool;
71
- # The original file name before any transformations.
72
- originalFileName @3 :Text;
73
- }
63
+ # # Additional metadata associated with a file in the file system.
64
+ # struct AssetData {
65
+ # # The identifier for the file data.
66
+ # id @0 :Text;
67
+ # # An additional name for the file.
68
+ # name @1 :Text;
69
+ # # Indicates whether the file needs a code reference.
70
+ # needsCodeReference @2 :Bool;
71
+ # # The original file name before any transformations.
72
+ # originalFileName @3 :Text;
73
+ # }
74
74
 
75
75
  # A mapping between a file path and its unique identifier.
76
76
  # Note: Multiple paths can map to the same identifier (e.g., symlinks).
@@ -94,7 +94,4 @@ struct FileSystem {
94
94
  ids @0 :List(FileId);
95
95
  files @1 :List(FileData);
96
96
  metadata @2 :List(FileMetadata);
97
- assets @3 :List(AssetData);
98
- chunks @4 :List(ChunkData);
99
- prebuilt @5 :List(PrebuiltData);
100
97
  }
@@ -1,234 +0,0 @@
1
- 'use strict';
2
-
3
- var chunk6ZKM7WOB_cjs = require('./chunk-6ZKM7WOB.cjs');
4
- var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
5
- var join = require('@stryke/path/join');
6
- var bundleRequire = require('bundle-require');
7
- var types = require('@storm-software/config-tools/types');
8
- var getWorkspaceRoot = require('@stryke/fs/get-workspace-root');
9
- require('@stryke/fs/read-file');
10
- var isSetObject = require('@stryke/type-checks/is-set-object');
11
- var isString = require('@stryke/type-checks/is-string');
12
- require('magic-string');
13
-
14
- var NON_NODE_MODULE_REGEX = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
15
- async function handleResolveId(context, args, options = {}) {
16
- if (args.id) {
17
- if (context.fs.isVirtual(args.id) || args.importer && context.fs.isVirtual(args.id, {
18
- paths: [
19
- args.importer
20
- ]
21
- })) {
22
- const resolvedPath = args.importer ? context.fs.resolve(args.id, {
23
- paths: [
24
- args.importer
25
- ]
26
- }) : context.fs.resolve(args.id);
27
- if (resolvedPath) {
28
- return {
29
- id: resolvedPath,
30
- external: context.config.projectType !== "application"
31
- };
32
- }
33
- }
34
- if (!!context.tsconfig.options.paths && Object.keys(context.tsconfig.options.paths).some((path) => args.id.startsWith(path.replaceAll("*", "")))) {
35
- let tsconfigPath = false;
36
- if (context.tsconfig.options.paths) {
37
- for (const tsconfigPathKey of Object.keys(context.tsconfig.options.paths).filter((tsconfigPath2) => args.id.startsWith(tsconfigPath2.replaceAll("*", "")))) {
38
- const resolvedPath = context.tsconfig.options.paths[tsconfigPathKey]?.find((tsconfigPath2) => context.fs.resolve(join.joinPaths(context.workspaceConfig.workspaceRoot, tsconfigPath2.replaceAll("*", ""), args.id.replace(tsconfigPathKey.replaceAll("*", ""), ""))) || context.fs.formatPath(tsconfigPath2) === context.fs.formatPath(args.id));
39
- if (resolvedPath) {
40
- tsconfigPath = context.fs.formatPath(resolvedPath) === context.fs.formatPath(args.id) ? context.fs.formatPath(resolvedPath) : context.fs.resolve(join.joinPaths(context.workspaceConfig.workspaceRoot, resolvedPath.replaceAll("*", ""), args.id.replace(tsconfigPathKey.replaceAll("*", ""), "")));
41
- }
42
- }
43
- }
44
- let tsconfigPathPackage = false;
45
- if (context.tsconfig.options.paths) {
46
- const tsconfigPathKeys = Object.keys(context.tsconfig.options.paths).filter((tsconfigPath2) => args.id.startsWith(tsconfigPath2.replaceAll("*", "")));
47
- if (tsconfigPathKeys.length > 0 && tsconfigPathKeys[0]) {
48
- tsconfigPathPackage = tsconfigPathKeys[0].replace(/\/\*$/, "");
49
- }
50
- }
51
- if (tsconfigPath && tsconfigPathPackage) {
52
- return {
53
- id: tsconfigPath,
54
- external: Boolean(!options.noExternal?.includes(tsconfigPathPackage) && (options.external?.includes(tsconfigPathPackage) ?? context.config.projectType !== "application"))
55
- };
56
- }
57
- }
58
- if (options.skipResolve) {
59
- return void 0;
60
- }
61
- if (options.skipNodeModulesBundle) {
62
- if (bundleRequire.match(args.id, options.resolvePatterns) || bundleRequire.match(args.id, options.noExternal) || args.id.startsWith("internal:") || args.id.startsWith("virtual:")) {
63
- return void 0;
64
- }
65
- if (bundleRequire.match(args.id, options.external) || args.id.startsWith("node:")) {
66
- return {
67
- id: args.id,
68
- external: true
69
- };
70
- }
71
- if (!NON_NODE_MODULE_REGEX.test(args.id)) {
72
- return {
73
- id: args.id,
74
- external: true
75
- };
76
- }
77
- } else {
78
- const resolvedPath = context.fs.resolve(args.id, {
79
- paths: args.importer ? [
80
- args.importer
81
- ] : []
82
- });
83
- if (bundleRequire.match(args.id, options.noExternal) || resolvedPath && context.fs.metadata[resolvedPath]?.type === "builtin") {
84
- return void 0;
85
- }
86
- if (bundleRequire.match(args.id, options.external) || args.id.startsWith("node:")) {
87
- return {
88
- id: args.id,
89
- external: true
90
- };
91
- }
92
- }
93
- }
94
- return void 0;
95
- }
96
- chunkUSNT2KNT_cjs.__name(handleResolveId, "handleResolveId");
97
- function getString(code) {
98
- if (!code) {
99
- return "";
100
- }
101
- if (isString.isString(code)) {
102
- return code;
103
- }
104
- if (isSetObject.isSetObject(code) && "code" in code) {
105
- return code.code;
106
- }
107
- return code.toString();
108
- }
109
- chunkUSNT2KNT_cjs.__name(getString, "getString");
110
-
111
- // src/lib/unplugin/factory.ts
112
- function createUnpluginFactory(variant, decorate) {
113
- return (config, meta) => {
114
- const log = chunk6ZKM7WOB_cjs.createLog("unplugin", config);
115
- log(types.LogLevelLabel.DEBUG, "Initializing Unplugin");
116
- try {
117
- const userConfig = {
118
- ...config,
119
- variant,
120
- unplugin: meta
121
- };
122
- let api;
123
- let resolvePatterns = [];
124
- async function buildStart() {
125
- log(types.LogLevelLabel.DEBUG, "Powerlines build plugin starting...");
126
- const workspaceRoot = getWorkspaceRoot.getWorkspaceRoot(process.cwd());
127
- api = await chunk6ZKM7WOB_cjs.PowerlinesAPI.from(workspaceRoot, userConfig);
128
- if (api.context.config.build.skipNodeModulesBundle) {
129
- resolvePatterns = bundleRequire.tsconfigPathsToRegExp(api.context.tsconfig.options.paths ?? []);
130
- }
131
- log(types.LogLevelLabel.DEBUG, "Preparing build artifacts for the Powerlines project...");
132
- await api.prepare({
133
- command: "build"
134
- });
135
- }
136
- chunkUSNT2KNT_cjs.__name(buildStart, "buildStart");
137
- async function resolveId(id, importer, options = {
138
- isEntry: false
139
- }) {
140
- return handleResolveId(api.context, {
141
- id,
142
- importer,
143
- options
144
- }, {
145
- skipNodeModulesBundle: api.context.config.build.skipNodeModulesBundle,
146
- external: api.context.config.build.external,
147
- noExternal: api.context.config.build.noExternal,
148
- resolvePatterns
149
- });
150
- }
151
- chunkUSNT2KNT_cjs.__name(resolveId, "resolveId");
152
- async function load(id) {
153
- const environment = await api.context.getEnvironment();
154
- if (id) {
155
- const resolvedPath = environment.fs.resolve(id);
156
- if (resolvedPath) {
157
- return environment.fs.readFile(resolvedPath);
158
- }
159
- }
160
- let result2 = await api.callPreHook(environment, "load", id);
161
- if (result2) {
162
- return result2;
163
- }
164
- result2 = await api.callNormalHook(environment, "load", id);
165
- if (result2) {
166
- return result2;
167
- }
168
- return api.callPostHook(environment, "load", id);
169
- }
170
- chunkUSNT2KNT_cjs.__name(load, "load");
171
- async function transform(code, id) {
172
- const environment = await api.context.getEnvironment();
173
- let transformed = code;
174
- let result2 = await api.callPreHook(environment, "transform", getString(transformed), id);
175
- if (result2) {
176
- transformed = result2;
177
- }
178
- result2 = await api.callNormalHook(environment, "transform", getString(transformed), id);
179
- if (result2) {
180
- transformed = result2;
181
- }
182
- result2 = await api.callPostHook(environment, "transform", getString(transformed), id);
183
- if (result2) {
184
- transformed = result2;
185
- }
186
- return transformed;
187
- }
188
- chunkUSNT2KNT_cjs.__name(transform, "transform");
189
- async function writeBundle() {
190
- log(types.LogLevelLabel.DEBUG, "Finalizing Powerlines project output...");
191
- const environment = await api.context.getEnvironment();
192
- await api.callHook(environment, "writeBundle");
193
- }
194
- chunkUSNT2KNT_cjs.__name(writeBundle, "writeBundle");
195
- const result = {
196
- name: "powerlines",
197
- api,
198
- resolveId: {
199
- filter: {
200
- id: {
201
- include: [
202
- /.*/
203
- ]
204
- }
205
- },
206
- handler: resolveId
207
- },
208
- load: {
209
- filter: {
210
- id: {
211
- include: [
212
- /.*/,
213
- /^storm:/
214
- ]
215
- }
216
- },
217
- handler: load
218
- },
219
- transform,
220
- buildStart,
221
- writeBundle
222
- };
223
- return decorate ? decorate(api, result) : result;
224
- } catch (error) {
225
- log(types.LogLevelLabel.FATAL, error?.message);
226
- throw error;
227
- }
228
- };
229
- }
230
- chunkUSNT2KNT_cjs.__name(createUnpluginFactory, "createUnpluginFactory");
231
-
232
- exports.createUnpluginFactory = createUnpluginFactory;
233
- exports.getString = getString;
234
- exports.handleResolveId = handleResolveId;