@powerlines/core 0.14.5 → 0.15.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 (391) hide show
  1. package/dist/constants/api.cjs +6 -5
  2. package/dist/constants/api.d.cts +3 -3
  3. package/dist/constants/api.d.cts.map +1 -1
  4. package/dist/constants/api.d.mts +3 -3
  5. package/dist/constants/api.d.mts.map +1 -1
  6. package/dist/constants/api.mjs +4 -4
  7. package/dist/constants/api.mjs.map +1 -1
  8. package/dist/constants/commands.cjs +3 -2
  9. package/dist/constants/commands.d.cts +1 -1
  10. package/dist/constants/commands.d.mts +1 -1
  11. package/dist/constants/commands.mjs +2 -2
  12. package/dist/constants/commands.mjs.map +1 -1
  13. package/dist/constants/devtools.cjs +23 -0
  14. package/dist/constants/devtools.d.cts +13 -0
  15. package/dist/constants/devtools.d.cts.map +1 -0
  16. package/dist/constants/devtools.d.mts +13 -0
  17. package/dist/constants/devtools.d.mts.map +1 -0
  18. package/dist/constants/devtools.mjs +14 -0
  19. package/dist/constants/devtools.mjs.map +1 -0
  20. package/dist/constants/environments.cjs +1 -0
  21. package/dist/constants/extensions.cjs +21 -0
  22. package/dist/constants/extensions.d.cts +5 -0
  23. package/dist/constants/extensions.d.cts.map +1 -0
  24. package/dist/constants/extensions.d.mts +5 -0
  25. package/dist/constants/extensions.d.mts.map +1 -0
  26. package/dist/constants/extensions.mjs +20 -0
  27. package/dist/constants/extensions.mjs.map +1 -0
  28. package/dist/constants/fs.cjs +1 -0
  29. package/dist/constants/hooks.cjs +1 -0
  30. package/dist/constants/index.cjs +48 -30
  31. package/dist/constants/index.d.cts +5 -3
  32. package/dist/constants/index.d.mts +5 -3
  33. package/dist/constants/index.mjs +5 -3
  34. package/dist/constants/log-level.cjs +90 -0
  35. package/dist/constants/log-level.d.cts +63 -0
  36. package/dist/constants/log-level.d.cts.map +1 -0
  37. package/dist/constants/log-level.d.mts +63 -0
  38. package/dist/constants/log-level.d.mts.map +1 -0
  39. package/dist/constants/log-level.mjs +82 -0
  40. package/dist/constants/log-level.mjs.map +1 -0
  41. package/dist/constants/meta.cjs +1 -0
  42. package/dist/constants/plugin.cjs +3 -2
  43. package/dist/constants/plugin.d.cts +2 -2
  44. package/dist/constants/plugin.d.mts +2 -2
  45. package/dist/context/base-context.cjs +127 -0
  46. package/dist/context/base-context.d.cts +81 -0
  47. package/dist/context/base-context.d.cts.map +1 -0
  48. package/dist/context/base-context.d.mts +81 -0
  49. package/dist/context/base-context.d.mts.map +1 -0
  50. package/dist/context/base-context.mjs +125 -0
  51. package/dist/context/base-context.mjs.map +1 -0
  52. package/dist/context/context.cjs +934 -0
  53. package/dist/context/context.d.cts +369 -0
  54. package/dist/context/context.d.cts.map +1 -0
  55. package/dist/context/context.d.mts +369 -0
  56. package/dist/context/context.d.mts.map +1 -0
  57. package/dist/context/context.mjs +932 -0
  58. package/dist/context/context.mjs.map +1 -0
  59. package/dist/context/environment-context.cjs +219 -0
  60. package/dist/context/environment-context.d.cts +100 -0
  61. package/dist/context/environment-context.d.cts.map +1 -0
  62. package/dist/context/environment-context.d.mts +100 -0
  63. package/dist/context/environment-context.d.mts.map +1 -0
  64. package/dist/context/environment-context.mjs +218 -0
  65. package/dist/context/environment-context.mjs.map +1 -0
  66. package/dist/context/execution-context.cjs +230 -0
  67. package/dist/context/execution-context.d.cts +101 -0
  68. package/dist/context/execution-context.d.cts.map +1 -0
  69. package/dist/context/execution-context.d.mts +101 -0
  70. package/dist/context/execution-context.d.mts.map +1 -0
  71. package/dist/context/execution-context.mjs +228 -0
  72. package/dist/context/execution-context.mjs.map +1 -0
  73. package/dist/context/index.cjs +12 -0
  74. package/dist/context/index.d.cts +6 -0
  75. package/dist/context/index.d.mts +6 -0
  76. package/dist/context/index.mjs +7 -0
  77. package/dist/context/plugin-context.cjs +83 -0
  78. package/dist/context/plugin-context.d.cts +18 -0
  79. package/dist/context/plugin-context.d.cts.map +1 -0
  80. package/dist/context/plugin-context.d.mts +18 -0
  81. package/dist/context/plugin-context.d.mts.map +1 -0
  82. package/dist/context/plugin-context.mjs +82 -0
  83. package/dist/context/plugin-context.mjs.map +1 -0
  84. package/dist/index.cjs +62 -9
  85. package/dist/index.d.cts +20 -9
  86. package/dist/index.d.mts +20 -9
  87. package/dist/index.mjs +17 -5
  88. package/dist/lib/config.cjs +160 -15
  89. package/dist/lib/config.d.cts +92 -6
  90. package/dist/lib/config.d.cts.map +1 -1
  91. package/dist/lib/config.d.mts +92 -6
  92. package/dist/lib/config.d.mts.map +1 -1
  93. package/dist/lib/config.mjs +154 -16
  94. package/dist/lib/config.mjs.map +1 -1
  95. package/dist/lib/context-helpers.cjs +43 -0
  96. package/dist/lib/context-helpers.d.cts +19 -0
  97. package/dist/lib/context-helpers.d.cts.map +1 -0
  98. package/dist/lib/context-helpers.d.mts +19 -0
  99. package/dist/lib/context-helpers.d.mts.map +1 -0
  100. package/dist/lib/context-helpers.mjs +41 -0
  101. package/dist/lib/context-helpers.mjs.map +1 -0
  102. package/dist/lib/entry.cjs +5 -5
  103. package/dist/lib/entry.d.cts.map +1 -1
  104. package/dist/lib/entry.d.mts.map +1 -1
  105. package/dist/lib/entry.mjs +5 -5
  106. package/dist/lib/entry.mjs.map +1 -1
  107. package/dist/lib/environment.cjs +72 -0
  108. package/dist/lib/environment.d.cts +12 -0
  109. package/dist/lib/environment.d.cts.map +1 -0
  110. package/dist/lib/environment.d.mts +12 -0
  111. package/dist/lib/environment.d.mts.map +1 -0
  112. package/dist/lib/environment.mjs +67 -0
  113. package/dist/lib/environment.mjs.map +1 -0
  114. package/dist/lib/events.cjs +43 -0
  115. package/dist/lib/events.d.cts +10 -0
  116. package/dist/lib/events.d.cts.map +1 -0
  117. package/dist/lib/events.d.mts +10 -0
  118. package/dist/lib/events.d.mts.map +1 -0
  119. package/dist/lib/events.mjs +42 -0
  120. package/dist/lib/events.mjs.map +1 -0
  121. package/dist/lib/generate-types.cjs +371 -0
  122. package/dist/lib/generate-types.d.cts +67 -0
  123. package/dist/lib/generate-types.d.cts.map +1 -0
  124. package/dist/lib/generate-types.d.mts +67 -0
  125. package/dist/lib/generate-types.d.mts.map +1 -0
  126. package/dist/lib/generate-types.mjs +368 -0
  127. package/dist/lib/generate-types.mjs.map +1 -0
  128. package/dist/lib/hooks.cjs +152 -0
  129. package/dist/lib/hooks.d.cts +28 -0
  130. package/dist/lib/hooks.d.cts.map +1 -0
  131. package/dist/lib/hooks.d.mts +28 -0
  132. package/dist/lib/hooks.d.mts.map +1 -0
  133. package/dist/lib/hooks.mjs +147 -0
  134. package/dist/lib/hooks.mjs.map +1 -0
  135. package/dist/lib/index.cjs +64 -9
  136. package/dist/lib/index.d.cts +15 -3
  137. package/dist/lib/index.d.mts +15 -3
  138. package/dist/lib/index.mjs +19 -5
  139. package/dist/lib/install-dependencies.cjs +25 -0
  140. package/dist/lib/install-dependencies.d.cts +12 -0
  141. package/dist/lib/install-dependencies.d.cts.map +1 -0
  142. package/dist/lib/install-dependencies.d.mts +12 -0
  143. package/dist/lib/install-dependencies.d.mts.map +1 -0
  144. package/dist/lib/install-dependencies.mjs +24 -0
  145. package/dist/lib/install-dependencies.mjs.map +1 -0
  146. package/dist/lib/meta.cjs +57 -0
  147. package/dist/lib/meta.d.cts +34 -0
  148. package/dist/lib/meta.d.cts.map +1 -0
  149. package/dist/lib/meta.d.mts +34 -0
  150. package/dist/lib/meta.d.mts.map +1 -0
  151. package/dist/lib/meta.mjs +54 -0
  152. package/dist/lib/meta.mjs.map +1 -0
  153. package/dist/lib/plugins.cjs +150 -0
  154. package/dist/lib/plugins.d.cts +40 -0
  155. package/dist/lib/plugins.d.cts.map +1 -0
  156. package/dist/lib/plugins.d.mts +40 -0
  157. package/dist/lib/plugins.d.mts.map +1 -0
  158. package/dist/lib/plugins.mjs +146 -0
  159. package/dist/lib/plugins.mjs.map +1 -0
  160. package/dist/lib/resolver.cjs +35 -0
  161. package/dist/lib/resolver.d.cts +21 -0
  162. package/dist/lib/resolver.d.cts.map +1 -0
  163. package/dist/lib/resolver.d.mts +21 -0
  164. package/dist/lib/resolver.d.mts.map +1 -0
  165. package/dist/lib/resolver.mjs +33 -0
  166. package/dist/lib/resolver.mjs.map +1 -0
  167. package/dist/lib/schemas.cjs +9 -0
  168. package/dist/lib/schemas.d.cts +2 -0
  169. package/dist/lib/schemas.d.mts +2 -0
  170. package/dist/lib/schemas.mjs +3 -0
  171. package/dist/lib/streaming-channel.cjs +260 -0
  172. package/dist/lib/streaming-channel.d.cts +133 -0
  173. package/dist/lib/streaming-channel.d.cts.map +1 -0
  174. package/dist/lib/streaming-channel.d.mts +133 -0
  175. package/dist/lib/streaming-channel.d.mts.map +1 -0
  176. package/dist/lib/streaming-channel.mjs +258 -0
  177. package/dist/lib/streaming-channel.mjs.map +1 -0
  178. package/dist/lib/typescript/index.cjs +16 -0
  179. package/dist/lib/typescript/index.d.cts +3 -0
  180. package/dist/lib/typescript/index.d.mts +3 -0
  181. package/dist/lib/typescript/index.mjs +4 -0
  182. package/dist/lib/typescript/ts-morph.cjs +105 -0
  183. package/dist/lib/typescript/ts-morph.d.cts +38 -0
  184. package/dist/lib/typescript/ts-morph.d.cts.map +1 -0
  185. package/dist/lib/typescript/ts-morph.d.mts +38 -0
  186. package/dist/lib/typescript/ts-morph.d.mts.map +1 -0
  187. package/dist/lib/typescript/ts-morph.mjs +102 -0
  188. package/dist/lib/typescript/ts-morph.mjs.map +1 -0
  189. package/dist/lib/typescript/tsconfig.cjs +253 -0
  190. package/dist/lib/typescript/tsconfig.d.cts +77 -0
  191. package/dist/lib/typescript/tsconfig.d.cts.map +1 -0
  192. package/dist/lib/typescript/tsconfig.d.mts +77 -0
  193. package/dist/lib/typescript/tsconfig.d.mts.map +1 -0
  194. package/dist/lib/typescript/tsconfig.mjs +240 -0
  195. package/dist/lib/typescript/tsconfig.mjs.map +1 -0
  196. package/dist/lib/unplugin/helpers.cjs +2 -2
  197. package/dist/lib/unplugin/module-resolution.cjs +18 -18
  198. package/dist/lib/unplugin/module-resolution.mjs +18 -18
  199. package/dist/lib/unplugin/module-resolution.mjs.map +1 -1
  200. package/dist/lib/unplugin/plugin.cjs +55 -62
  201. package/dist/lib/unplugin/plugin.d.cts +10 -11
  202. package/dist/lib/unplugin/plugin.d.cts.map +1 -1
  203. package/dist/lib/unplugin/plugin.d.mts +10 -11
  204. package/dist/lib/unplugin/plugin.d.mts.map +1 -1
  205. package/dist/lib/unplugin/plugin.mjs +55 -62
  206. package/dist/lib/unplugin/plugin.mjs.map +1 -1
  207. package/dist/lib/utilities/file-header.cjs +2 -2
  208. package/dist/lib/utilities/file-header.mjs +2 -2
  209. package/dist/lib/utilities/file-header.mjs.map +1 -1
  210. package/dist/lib/utilities/format.cjs +1 -1
  211. package/dist/lib/utilities/format.mjs +1 -1
  212. package/dist/lib/utilities/index.cjs +2 -2
  213. package/dist/lib/utilities/index.mjs +2 -2
  214. package/dist/lib/utilities/write-file.cjs +1 -2
  215. package/dist/lib/utilities/write-file.d.cts +1 -1
  216. package/dist/lib/utilities/write-file.d.cts.map +1 -1
  217. package/dist/lib/utilities/write-file.d.mts +1 -1
  218. package/dist/lib/utilities/write-file.d.mts.map +1 -1
  219. package/dist/lib/utilities/write-file.mjs +1 -2
  220. package/dist/lib/utilities/write-file.mjs.map +1 -1
  221. package/dist/lib/vfs.cjs +1104 -0
  222. package/dist/lib/vfs.d.cts +321 -0
  223. package/dist/lib/vfs.d.cts.map +1 -0
  224. package/dist/lib/vfs.d.mts +321 -0
  225. package/dist/lib/vfs.d.mts.map +1 -0
  226. package/dist/lib/vfs.mjs +1102 -0
  227. package/dist/lib/vfs.mjs.map +1 -0
  228. package/dist/plugin-base.cjs +1 -1
  229. package/dist/plugin-base.mjs +1 -1
  230. package/dist/plugin-base.mjs.map +1 -1
  231. package/dist/plugin-utils/build-helpers.cjs +2 -2
  232. package/dist/plugin-utils/build-helpers.mjs +2 -2
  233. package/dist/plugin-utils/build-helpers.mjs.map +1 -1
  234. package/dist/plugin-utils/context-helpers.cjs +22 -12
  235. package/dist/plugin-utils/context-helpers.d.cts +9 -1
  236. package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
  237. package/dist/plugin-utils/context-helpers.d.mts +9 -1
  238. package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
  239. package/dist/plugin-utils/context-helpers.mjs +22 -13
  240. package/dist/plugin-utils/context-helpers.mjs.map +1 -1
  241. package/dist/plugin-utils/filter.cjs +13 -5
  242. package/dist/plugin-utils/filter.d.cts +2 -1
  243. package/dist/plugin-utils/filter.d.cts.map +1 -1
  244. package/dist/plugin-utils/filter.d.mts +2 -1
  245. package/dist/plugin-utils/filter.d.mts.map +1 -1
  246. package/dist/plugin-utils/filter.mjs +13 -6
  247. package/dist/plugin-utils/filter.mjs.map +1 -1
  248. package/dist/plugin-utils/format.cjs +44 -0
  249. package/dist/plugin-utils/format.d.cts +11 -0
  250. package/dist/plugin-utils/format.d.cts.map +1 -0
  251. package/dist/plugin-utils/format.d.mts +11 -0
  252. package/dist/plugin-utils/format.d.mts.map +1 -0
  253. package/dist/plugin-utils/format.mjs +43 -0
  254. package/dist/plugin-utils/format.mjs.map +1 -0
  255. package/dist/plugin-utils/helpers.cjs +6 -6
  256. package/dist/plugin-utils/helpers.d.cts +15 -15
  257. package/dist/plugin-utils/helpers.d.cts.map +1 -1
  258. package/dist/plugin-utils/helpers.d.mts +15 -15
  259. package/dist/plugin-utils/helpers.d.mts.map +1 -1
  260. package/dist/plugin-utils/helpers.mjs +1 -1
  261. package/dist/plugin-utils/helpers.mjs.map +1 -1
  262. package/dist/plugin-utils/index.cjs +34 -4
  263. package/dist/plugin-utils/index.d.cts +7 -4
  264. package/dist/plugin-utils/index.d.mts +7 -4
  265. package/dist/plugin-utils/index.mjs +9 -6
  266. package/dist/plugin-utils/install.cjs +47 -0
  267. package/dist/plugin-utils/install.d.cts +23 -0
  268. package/dist/plugin-utils/install.d.cts.map +1 -0
  269. package/dist/plugin-utils/install.d.mts +23 -0
  270. package/dist/plugin-utils/install.d.mts.map +1 -0
  271. package/dist/plugin-utils/install.mjs +45 -0
  272. package/dist/plugin-utils/install.mjs.map +1 -0
  273. package/dist/plugin-utils/logging.cjs +588 -1
  274. package/dist/plugin-utils/logging.d.cts +93 -1
  275. package/dist/plugin-utils/logging.d.cts.map +1 -1
  276. package/dist/plugin-utils/logging.d.mts +93 -1
  277. package/dist/plugin-utils/logging.d.mts.map +1 -1
  278. package/dist/plugin-utils/logging.mjs +572 -1
  279. package/dist/plugin-utils/logging.mjs.map +1 -1
  280. package/dist/plugin-utils/merge.cjs +1 -1
  281. package/dist/plugin-utils/merge.mjs +1 -1
  282. package/dist/plugin-utils/modules.cjs +1 -1
  283. package/dist/plugin-utils/modules.mjs +1 -1
  284. package/dist/plugin-utils/modules.mjs.map +1 -1
  285. package/dist/plugin-utils/paths.cjs +6 -2
  286. package/dist/plugin-utils/paths.mjs +6 -2
  287. package/dist/plugin-utils/paths.mjs.map +1 -1
  288. package/dist/plugin-utils/virtual.cjs +80 -0
  289. package/dist/plugin-utils/virtual.d.cts +69 -0
  290. package/dist/plugin-utils/virtual.d.cts.map +1 -0
  291. package/dist/plugin-utils/virtual.d.mts +69 -0
  292. package/dist/plugin-utils/virtual.d.mts.map +1 -0
  293. package/dist/plugin-utils/virtual.mjs +73 -0
  294. package/dist/plugin-utils/virtual.mjs.map +1 -0
  295. package/dist/schemas/fs.cjs +232 -0
  296. package/dist/schemas/fs.d.cts +127 -0
  297. package/dist/schemas/fs.d.cts.map +1 -0
  298. package/dist/schemas/fs.d.mts +127 -0
  299. package/dist/schemas/fs.d.mts.map +1 -0
  300. package/dist/schemas/fs.mjs +226 -0
  301. package/dist/schemas/fs.mjs.map +1 -0
  302. package/dist/storage/base.cjs +216 -0
  303. package/dist/storage/base.d.cts +201 -0
  304. package/dist/storage/base.d.cts.map +1 -0
  305. package/dist/storage/base.d.mts +201 -0
  306. package/dist/storage/base.d.mts.map +1 -0
  307. package/dist/storage/base.mjs +215 -0
  308. package/dist/storage/base.mjs.map +1 -0
  309. package/dist/storage/file-system.cjs +180 -0
  310. package/dist/storage/file-system.d.cts +129 -0
  311. package/dist/storage/file-system.d.cts.map +1 -0
  312. package/dist/storage/file-system.d.mts +129 -0
  313. package/dist/storage/file-system.d.mts.map +1 -0
  314. package/dist/storage/file-system.mjs +179 -0
  315. package/dist/storage/file-system.mjs.map +1 -0
  316. package/dist/storage/helpers.cjs +37 -0
  317. package/dist/storage/helpers.d.cts +25 -0
  318. package/dist/storage/helpers.d.cts.map +1 -0
  319. package/dist/storage/helpers.d.mts +25 -0
  320. package/dist/storage/helpers.d.mts.map +1 -0
  321. package/dist/storage/helpers.mjs +34 -0
  322. package/dist/storage/helpers.mjs.map +1 -0
  323. package/dist/storage/index.cjs +12 -0
  324. package/dist/storage/index.d.cts +5 -0
  325. package/dist/storage/index.d.mts +5 -0
  326. package/dist/storage/index.mjs +6 -0
  327. package/dist/storage/virtual.cjs +98 -0
  328. package/dist/storage/virtual.d.cts +80 -0
  329. package/dist/storage/virtual.d.cts.map +1 -0
  330. package/dist/storage/virtual.d.mts +80 -0
  331. package/dist/storage/virtual.d.mts.map +1 -0
  332. package/dist/storage/virtual.mjs +97 -0
  333. package/dist/storage/virtual.mjs.map +1 -0
  334. package/dist/types/api.d.cts +18 -152
  335. package/dist/types/api.d.cts.map +1 -1
  336. package/dist/types/api.d.mts +18 -152
  337. package/dist/types/api.d.mts.map +1 -1
  338. package/dist/types/config.d.cts +194 -135
  339. package/dist/types/config.d.cts.map +1 -1
  340. package/dist/types/config.d.mts +195 -136
  341. package/dist/types/config.d.mts.map +1 -1
  342. package/dist/types/context.d.cts +152 -128
  343. package/dist/types/context.d.cts.map +1 -1
  344. package/dist/types/context.d.mts +155 -131
  345. package/dist/types/context.d.mts.map +1 -1
  346. package/dist/types/fs.d.mts +1 -1
  347. package/dist/types/index.d.cts +5 -6
  348. package/dist/types/index.d.mts +5 -6
  349. package/dist/types/logging.d.cts +161 -0
  350. package/dist/types/logging.d.cts.map +1 -0
  351. package/dist/types/logging.d.mts +161 -0
  352. package/dist/types/logging.d.mts.map +1 -0
  353. package/dist/types/plugin.d.cts +6 -9
  354. package/dist/types/plugin.d.cts.map +1 -1
  355. package/dist/types/plugin.d.mts +6 -9
  356. package/dist/types/plugin.d.mts.map +1 -1
  357. package/dist/types/tsconfig.d.mts +1 -1
  358. package/dist/types/unplugin.d.cts +5 -26
  359. package/dist/types/unplugin.d.cts.map +1 -1
  360. package/dist/types/unplugin.d.mts +5 -26
  361. package/dist/types/unplugin.d.mts.map +1 -1
  362. package/package.json +259 -457
  363. package/schemas/fs.capnp +42 -0
  364. package/dist/constants/virtual-modules.cjs +0 -8
  365. package/dist/constants/virtual-modules.d.cts +0 -6
  366. package/dist/constants/virtual-modules.d.cts.map +0 -1
  367. package/dist/constants/virtual-modules.d.mts +0 -6
  368. package/dist/constants/virtual-modules.d.mts.map +0 -1
  369. package/dist/constants/virtual-modules.mjs +0 -7
  370. package/dist/constants/virtual-modules.mjs.map +0 -1
  371. package/dist/lib/logger.cjs +0 -99
  372. package/dist/lib/logger.d.cts +0 -53
  373. package/dist/lib/logger.d.cts.map +0 -1
  374. package/dist/lib/logger.d.mts +0 -53
  375. package/dist/lib/logger.d.mts.map +0 -1
  376. package/dist/lib/logger.mjs +0 -93
  377. package/dist/lib/logger.mjs.map +0 -1
  378. package/dist/types/_internal.cjs +0 -0
  379. package/dist/types/_internal.d.cts +0 -106
  380. package/dist/types/_internal.d.cts.map +0 -1
  381. package/dist/types/_internal.d.mts +0 -106
  382. package/dist/types/_internal.d.mts.map +0 -1
  383. package/dist/types/_internal.mjs +0 -1
  384. package/dist/types/commands.d.cts +0 -16
  385. package/dist/types/commands.d.cts.map +0 -1
  386. package/dist/types/commands.d.mts +0 -16
  387. package/dist/types/commands.d.mts.map +0 -1
  388. package/dist/types/utils.d.cts +0 -9
  389. package/dist/types/utils.d.cts.map +0 -1
  390. package/dist/types/utils.d.mts +0 -9
  391. package/dist/types/utils.d.mts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.mjs","names":[],"sources":["../../src/lib/plugins.ts"],"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 { toArray } from \"@stryke/convert/to-array\";\nimport { install } from \"@stryke/fs/install\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { isError } from \"@stryke/type-checks/is-error\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isPromiseLike } from \"@stryke/type-checks/is-promise\";\nimport { isSetString } from \"@stryke/type-checks/is-set-string\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { MaybePromise } from \"@stryke/types/base\";\nimport chalk from \"chalk\";\nimport {\n findInvalidPluginConfig,\n isDuplicate,\n isPlugin,\n isPluginConfig,\n isPluginConfigObject,\n isPluginConfigTuple\n} from \"../plugin-utils\";\nimport type {\n EnvironmentContext,\n ExecutionContext,\n Plugin,\n PluginConfig,\n PluginConfigTuple,\n PluginContext,\n PluginFactory,\n ResolvedConfig\n} from \"../types\";\n\n/**\n * Resolve a plugin module based on the provided plugin path. This function checks if the plugin package is installed, attempts to import the plugin module, and handles various error cases such as missing packages or invalid module exports. It supports both direct plugin exports and plugins exported from a \"plugin\" subdirectory within the package.\n *\n * @param context - The execution context in which the plugin will be initialized. This context provides access to configuration, logging, and other utilities that may be needed during plugin initialization.\n * @param pluginPath - The path to the plugin module. This can be a package name, a scoped package name, or a path to a local module.\n * @returns A promise that resolves to the plugin module, which can be a plugin instance, a factory function that returns a plugin, or an array of plugins.\n */\nexport async function resolvePlugin<\n TResolvedConfig extends ResolvedConfig,\n TSystemContext,\n TContext extends\n | EnvironmentContext<TResolvedConfig, TSystemContext>\n | ExecutionContext<TResolvedConfig, TSystemContext> =\n | EnvironmentContext<TResolvedConfig, TSystemContext>\n | ExecutionContext<TResolvedConfig, TSystemContext>,\n TPluginContext extends PluginContext<TResolvedConfig, TSystemContext> =\n PluginContext<TResolvedConfig, TSystemContext>\n>(\n context: TContext,\n pluginPath: string\n): Promise<\n | Plugin<TPluginContext>\n | Plugin<TPluginContext>[]\n | ((\n options?: any\n ) => MaybePromise<Plugin<TPluginContext> | Plugin<TPluginContext>[]>)\n> {\n if (\n pluginPath.startsWith(\"@\") &&\n pluginPath.split(\"/\").filter(Boolean).length > 2\n ) {\n const splits = pluginPath.split(\"/\").filter(Boolean);\n pluginPath = `${splits[0]}/${splits[1]}`;\n }\n\n const isInstalled = isPackageExists(pluginPath, {\n paths: [context.config.cwd, context.config.root]\n });\n if (!isInstalled && context.config.autoInstall) {\n context.warn(\n `The plugin package \"${\n pluginPath\n }\" is not installed. It will be installed automatically.`\n );\n\n const result = await install(pluginPath, {\n cwd: context.config.root\n });\n if (isNumber(result.exitCode) && result.exitCode > 0) {\n context.error(result.stderr);\n\n throw new Error(\n `An error occurred while installing the build plugin package \"${\n pluginPath\n }\" `\n );\n }\n }\n\n try {\n // First check if the package has a \"plugin\" subdirectory - @scope/package/plugin\n const module = await context.resolver.plugin.import<{\n plugin?:\n | Plugin<TPluginContext>\n | ((options?: any) => MaybePromise<Plugin<TPluginContext>>);\n default?:\n | Plugin<TPluginContext>\n | ((options?: any) => MaybePromise<Plugin<TPluginContext>>);\n }>(context.resolver.plugin.esmResolve(joinPaths(pluginPath, \"plugin\")));\n\n const result = module.plugin ?? module.default;\n if (!result) {\n throw new Error(\n `The plugin package \"${pluginPath}\" does not export a valid module.`\n );\n }\n\n return result;\n } catch (error) {\n try {\n const module = await context.resolver.plugin.import<{\n plugin?:\n | Plugin<TPluginContext>\n | ((options?: any) => MaybePromise<Plugin<TPluginContext>>);\n default?:\n | Plugin<TPluginContext>\n | ((options?: any) => MaybePromise<Plugin<TPluginContext>>);\n }>(context.resolver.plugin.esmResolve(pluginPath));\n\n const result = module.plugin ?? module.default;\n if (!result) {\n throw new Error(\n `The plugin package \"${pluginPath}\" does not export a valid module.`\n );\n }\n\n return result;\n } catch {\n if (!isInstalled) {\n throw new Error(\n `The plugin package \"${\n pluginPath\n }\" is not installed. Please install the package using the command: \"npm install ${\n pluginPath\n } --save-dev\"`\n );\n } else {\n throw new Error(\n `An error occurred while importing the build plugin package \"${\n pluginPath\n }\":\n${isError(error) ? error.message : String(error)}\n\nNote: Please ensure the plugin package's default export is a class that extends \\`Plugin\\` with a constructor that excepts a single arguments of type \\`PluginOptions\\`.`\n );\n }\n }\n }\n}\n\n/**\n * Initialize a plugin based on the provided plugin configuration. This function handles various forms of plugin configurations, including direct plugin instances, factory functions, string paths to plugins, and arrays of plugins or plugin configurations. It validates the plugin configuration, resolves any plugin paths, and returns an array of initialized plugins.\n *\n * @param context - The execution context in which the plugin will be initialized. This context provides access to configuration, logging, and other utilities that may be needed during plugin initialization.\n * @param config - The plugin configuration, which can be in various forms such as a direct plugin instance, a string path to a plugin, a factory function that returns a plugin, or an array of plugins or plugin configurations. This configuration will be processed and validated to initialize the appropriate plugins.\n * @returns A promise that resolves to an array of initialized plugins based on the provided configuration. If the configuration is invalid, an error will be thrown with details about the issue.\n */\nexport async function initPlugin<\n TResolvedConfig extends ResolvedConfig,\n TSystemContext,\n TContext extends\n | EnvironmentContext<TResolvedConfig, TSystemContext>\n | ExecutionContext<TResolvedConfig, TSystemContext> =\n | EnvironmentContext<TResolvedConfig, TSystemContext>\n | ExecutionContext<TResolvedConfig, TSystemContext>,\n TPluginContext extends PluginContext<TResolvedConfig, TSystemContext> =\n PluginContext<TResolvedConfig, TSystemContext>\n>(\n context: TContext,\n config: PluginConfig<TPluginContext>,\n options: ResolvePluginsOptions = {}\n): Promise<Plugin<TPluginContext>[] | null> {\n const { skipLogging = false } = options;\n\n let awaited = config;\n if (isPromiseLike(config)) {\n awaited = (await Promise.resolve(\n config as Promise<any>\n )) as PluginConfig<TPluginContext>;\n }\n\n if (!isPluginConfig<TPluginContext>(awaited)) {\n const invalid = findInvalidPluginConfig(awaited);\n\n throw new Error(\n `Invalid ${\n invalid && invalid.length > 1 ? \"plugins\" : \"plugin\"\n } specified in the configuration - ${\n invalid && invalid.length > 0\n ? JSON.stringify(awaited)\n : invalid?.join(\"\\n\\n\")\n } \\n\\nPlease ensure the value is one of the following: \\n - an instance of \\`Plugin\\` \\n - a plugin name \\n - an object with the \\`plugin\\` and \\`options\\` properties \\n - a tuple array with the plugin and options \\n - a factory function that returns a plugin or array of plugins \\n - an array of plugins or plugin configurations`\n );\n }\n\n let plugins!: Plugin<TPluginContext>[];\n if (isPlugin<TPluginContext>(awaited)) {\n plugins = [awaited];\n } else if (isFunction(awaited)) {\n plugins = toArray(await Promise.resolve(awaited()));\n } else if (isString(awaited)) {\n const resolved = await resolvePlugin<\n TResolvedConfig,\n TSystemContext,\n TContext\n >(context, awaited);\n if (isFunction(resolved)) {\n plugins = toArray(await Promise.resolve(resolved()));\n } else {\n plugins = toArray(resolved);\n }\n } else if (\n Array.isArray(awaited) &&\n (awaited as TPluginContext[]).every(isPlugin<TPluginContext>)\n ) {\n plugins = awaited as Plugin<TPluginContext>[];\n } else if (\n Array.isArray(awaited) &&\n (awaited as PluginConfig<TPluginContext>[]).every(\n isPluginConfig<TPluginContext>\n )\n ) {\n plugins = [];\n for (const pluginConfig of awaited as PluginConfig<TPluginContext>[]) {\n const initialized = await initPlugin<\n TResolvedConfig,\n TSystemContext,\n TContext,\n TPluginContext\n >(context, pluginConfig);\n if (initialized) {\n plugins.push(...initialized);\n }\n }\n } else if (\n isPluginConfigTuple<TPluginContext>(awaited) ||\n isPluginConfigObject<TPluginContext>(awaited)\n ) {\n let pluginConfig!:\n | string\n | PluginFactory<TPluginContext>\n | Plugin<TPluginContext>;\n let pluginOptions: any;\n\n if (isPluginConfigTuple<TPluginContext>(awaited)) {\n pluginConfig = awaited[0] as Plugin<TPluginContext>;\n pluginOptions =\n (awaited as PluginConfigTuple)?.length === 2 ? awaited[1] : undefined;\n } else {\n pluginConfig = awaited.plugin as Plugin<TPluginContext>;\n pluginOptions = awaited.options;\n }\n\n if (isSetString(pluginConfig)) {\n const resolved = await resolvePlugin<\n TResolvedConfig,\n TSystemContext,\n TContext,\n TPluginContext\n >(context, pluginConfig);\n if (isFunction(resolved)) {\n plugins = toArray(\n await Promise.resolve(\n pluginOptions ? resolved(pluginOptions) : resolved()\n )\n );\n } else {\n plugins = toArray(resolved);\n }\n } else if (isFunction(pluginConfig)) {\n plugins = toArray(await Promise.resolve(pluginConfig(pluginOptions)));\n } else if (\n Array.isArray(pluginConfig) &&\n pluginConfig.every(isPlugin<TPluginContext>)\n ) {\n plugins = pluginConfig;\n } else if (isPlugin<TPluginContext>(pluginConfig)) {\n plugins = toArray(pluginConfig);\n }\n }\n\n if (!plugins) {\n throw new Error(\n `The plugin configuration ${JSON.stringify(awaited)} is invalid. This configuration must point to a valid Powerlines plugin module.`\n );\n }\n\n if (plugins.length > 0 && !plugins.every(isPlugin<TPluginContext>)) {\n throw new Error(\n `The plugin option ${JSON.stringify(plugins)} does not export a valid module. This configuration must point to a valid Powerlines plugin module.`\n );\n }\n\n const result = [] as Plugin<TPluginContext>[];\n for (const plugin of plugins) {\n if (isDuplicate<TPluginContext>(plugin, context.plugins)) {\n if (!skipLogging) {\n context.trace({\n meta: {\n category: \"plugins\"\n },\n message: `Duplicate ${chalk.bold.cyanBright(\n plugin.name\n )} plugin dependency detected - Skipping initialization.`\n });\n }\n } else {\n result.push(plugin);\n\n if (!skipLogging) {\n context.trace({\n meta: {\n category: \"plugins\"\n },\n message: `Initializing the ${chalk.bold.cyanBright(plugin.name)} plugin...`\n });\n }\n }\n }\n\n return result;\n}\n\nexport interface ResolvePluginsOptions {\n /**\n * If true, the plugin resolution process will skip logging messages about the plugin initialization. This can be useful in scenarios where you want to suppress plugin-related logs, such as when running in a non-interactive environment or when you want to reduce log verbosity. By default, this option is false, and plugin initialization messages will be logged using the context's logger.\n */\n skipLogging?: boolean;\n}\n\n/**\n * Initialize a plugin based on the provided plugin configuration. This function handles various forms of plugin configurations, including direct plugin instances, plugin names, factory functions, and arrays of plugins. It validates the configuration, resolves plugin modules if necessary, and returns an array of initialized plugins ready to be added to the execution context.\n *\n * @param context - The execution context in which the plugin will be initialized. This context provides access to configuration, logging, and other utilities that may be needed during plugin initialization.\n * @param config - The plugin configuration, which can be in various forms such as a plugin instance, a plugin name string, a factory function that returns a plugin or an array of plugins, or an array of plugin configurations. The function will handle the resolution and initialization of the plugin(s) based on the provided configuration.\n * @returns A promise that resolves to an array of initialized plugins that can be added to the execution context, or null if the configuration is invalid or results in no plugins being initialized.\n */\nexport async function resolvePlugins<\n TResolvedConfig extends ResolvedConfig,\n TSystemContext,\n TContext extends\n | EnvironmentContext<TResolvedConfig, TSystemContext>\n | ExecutionContext<TResolvedConfig, TSystemContext> =\n | EnvironmentContext<TResolvedConfig, TSystemContext>\n | ExecutionContext<TResolvedConfig, TSystemContext>,\n TPluginContext extends PluginContext<TResolvedConfig, TSystemContext> =\n PluginContext<TResolvedConfig, TSystemContext>\n>(\n context: TContext,\n config: PluginConfig<TPluginContext>,\n options: ResolvePluginsOptions = {}\n) {\n const { skipLogging = false } = options;\n\n const plugins = [] as Plugin<TPluginContext>[];\n if (config) {\n const result = await initPlugin<\n TResolvedConfig,\n TSystemContext,\n TContext,\n TPluginContext\n >(context, config);\n if (result) {\n for (const plugin of result) {\n if (!skipLogging) {\n context.debug({\n meta: {\n category: \"plugins\"\n },\n message: `Successfully initialized the ${chalk.bold.cyanBright(\n plugin.name\n )} plugin`\n });\n }\n\n plugins.push(plugin);\n }\n }\n }\n\n return plugins;\n}\n"],"m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AAM;IACZ,MAAM,EACJ,UAAU,WACX;IACD,SAAS,gCAAgC,MAAM,KAAK,WAClD,OAAO,KACR,CAAC;IACH,CAAC;AAGJ,WAAQ,KAAK,OAAO;;;AAK1B,QAAO"}
@@ -0,0 +1,35 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ let _stryke_path_join_paths = require("@stryke/path/join-paths");
4
+ let defu = require("defu");
5
+ defu = require_runtime.__toESM(defu, 1);
6
+ let jiti = require("jiti");
7
+
8
+ //#region src/lib/resolver.ts
9
+ /**
10
+ * Create a Jiti resolver for the given workspace and project root.
11
+ *
12
+ * @param options - The options for creating the resolver.
13
+ * @returns A Jiti instance configured for the specified workspace and project root.
14
+ */
15
+ function resolveOptions(options) {
16
+ return (0, defu.default)(options, {
17
+ interopDefault: true,
18
+ fsCache: options.mode !== "development" ? (0, _stryke_path_join_paths.joinPaths)(options.cacheDir, "jiti") : false,
19
+ moduleCache: options.mode !== "development"
20
+ });
21
+ }
22
+ /**
23
+ * Create a Jiti resolver for the given workspace and project root.
24
+ *
25
+ * @param options - The options for creating the resolver.
26
+ * @returns A Jiti instance configured for the specified workspace and project root.
27
+ */
28
+ function createResolver(options) {
29
+ const baseResolver = (0, jiti.createJiti)((0, _stryke_path_join_paths.joinPaths)(options.cwd, options.root), resolveOptions(options));
30
+ baseResolver.plugin = (0, jiti.createJiti)((0, _stryke_path_join_paths.joinPaths)(options.cwd, options.root), resolveOptions(options));
31
+ return baseResolver;
32
+ }
33
+
34
+ //#endregion
35
+ exports.createResolver = createResolver;
@@ -0,0 +1,21 @@
1
+ import { Resolver } from "../types/context.cjs";
2
+ import { ResolvedConfig } from "../types/config.cjs";
3
+ import { JitiOptions } from "jiti";
4
+
5
+ //#region src/lib/resolver.d.ts
6
+ type CreateResolverOptions = Omit<JitiOptions, "fsCache" | "moduleCache" | "interopDefault"> & Partial<Pick<ResolvedConfig, "mode" | "skipCache">> & {
7
+ cwd: string;
8
+ root: string;
9
+ cacheDir: string;
10
+ };
11
+ /**
12
+ * Create a Jiti resolver for the given workspace and project root.
13
+ *
14
+ * @param options - The options for creating the resolver.
15
+ * @returns A Jiti instance configured for the specified workspace and project root.
16
+ */
17
+ declare function createResolver(options: CreateResolverOptions): Resolver;
18
+ declare type __ΩCreateResolverOptions = any[];
19
+ //#endregion
20
+ export { CreateResolverOptions, __ΩCreateResolverOptions, createResolver };
21
+ //# sourceMappingURL=resolver.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.d.cts","names":[],"sources":["../../src/lib/resolver.ts"],"mappings":";;;;;KAwBY,qBAAA,GAAwB,IAAA,CAClC,WAAA,kDAGA,OAAA,CAAQ,IAAA,CAAK,cAAA;EACX,GAAA;EACA,IAAA;EACA,QAAA;AAAA;;;;;;;iBA0BY,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAwB,QAAA;AAAA"}
@@ -0,0 +1,21 @@
1
+ import { Resolver } from "../types/context.mjs";
2
+ import { ResolvedConfig } from "../types/config.mjs";
3
+ import { JitiOptions } from "jiti";
4
+
5
+ //#region src/lib/resolver.d.ts
6
+ type CreateResolverOptions = Omit<JitiOptions, "fsCache" | "moduleCache" | "interopDefault"> & Partial<Pick<ResolvedConfig, "mode" | "skipCache">> & {
7
+ cwd: string;
8
+ root: string;
9
+ cacheDir: string;
10
+ };
11
+ /**
12
+ * Create a Jiti resolver for the given workspace and project root.
13
+ *
14
+ * @param options - The options for creating the resolver.
15
+ * @returns A Jiti instance configured for the specified workspace and project root.
16
+ */
17
+ declare function createResolver(options: CreateResolverOptions): Resolver;
18
+ declare type __ΩCreateResolverOptions = any[];
19
+ //#endregion
20
+ export { CreateResolverOptions, __ΩCreateResolverOptions, createResolver };
21
+ //# sourceMappingURL=resolver.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.d.mts","names":[],"sources":["../../src/lib/resolver.ts"],"mappings":";;;;;KAwBY,qBAAA,GAAwB,IAAA,CAClC,WAAA,kDAGA,OAAA,CAAQ,IAAA,CAAK,cAAA;EACX,GAAA;EACA,IAAA;EACA,QAAA;AAAA;;;;;;;iBA0BY,cAAA,CAAe,OAAA,EAAS,qBAAA,GAAwB,QAAA;AAAA"}
@@ -0,0 +1,33 @@
1
+ import { joinPaths } from "@stryke/path/join-paths";
2
+ import defu from "defu";
3
+ import { createJiti } from "jiti";
4
+
5
+ //#region src/lib/resolver.ts
6
+ /**
7
+ * Create a Jiti resolver for the given workspace and project root.
8
+ *
9
+ * @param options - The options for creating the resolver.
10
+ * @returns A Jiti instance configured for the specified workspace and project root.
11
+ */
12
+ function resolveOptions(options) {
13
+ return defu(options, {
14
+ interopDefault: true,
15
+ fsCache: options.mode !== "development" ? joinPaths(options.cacheDir, "jiti") : false,
16
+ moduleCache: options.mode !== "development"
17
+ });
18
+ }
19
+ /**
20
+ * Create a Jiti resolver for the given workspace and project root.
21
+ *
22
+ * @param options - The options for creating the resolver.
23
+ * @returns A Jiti instance configured for the specified workspace and project root.
24
+ */
25
+ function createResolver(options) {
26
+ const baseResolver = createJiti(joinPaths(options.cwd, options.root), resolveOptions(options));
27
+ baseResolver.plugin = createJiti(joinPaths(options.cwd, options.root), resolveOptions(options));
28
+ return baseResolver;
29
+ }
30
+
31
+ //#endregion
32
+ export { createResolver };
33
+ //# sourceMappingURL=resolver.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.mjs","names":[],"sources":["../../src/lib/resolver.ts"],"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 { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport { JitiOptions, createJiti } from \"jiti\";\nimport { ResolvedConfig } from \"../types/config\";\nimport { Resolver } from \"../types/context\";\n\nexport type CreateResolverOptions = Omit<\n JitiOptions,\n \"fsCache\" | \"moduleCache\" | \"interopDefault\"\n> &\n Partial<Pick<ResolvedConfig, \"mode\" | \"skipCache\">> & {\n cwd: string;\n root: string;\n cacheDir: string;\n };\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nfunction resolveOptions(options: CreateResolverOptions): JitiOptions {\n return defu(options, {\n interopDefault: true,\n fsCache:\n options.mode !== \"development\"\n ? joinPaths(options.cacheDir, \"jiti\")\n : false,\n moduleCache: options.mode !== \"development\"\n });\n}\n\n/**\n * Create a Jiti resolver for the given workspace and project root.\n *\n * @param options - The options for creating the resolver.\n * @returns A Jiti instance configured for the specified workspace and project root.\n */\nexport function createResolver(options: CreateResolverOptions): Resolver {\n const baseResolver = createJiti(\n joinPaths(options.cwd, options.root),\n resolveOptions(options)\n ) as Resolver;\n baseResolver.plugin = createJiti(\n joinPaths(options.cwd, options.root),\n resolveOptions(options)\n );\n\n return baseResolver;\n}\n"],"mappings":";;;;;;;;;;;AAwCA,SAAS,eAAe,SAA6C;AACnE,QAAO,KAAK,SAAS;EACnB,gBAAgB;EAChB,SACE,QAAQ,SAAS,gBACb,UAAU,QAAQ,UAAU,OAAO,GACnC;EACN,aAAa,QAAQ,SAAS;EAC/B,CAAC;;;;;;;;AASJ,SAAgB,eAAe,SAA0C;CACvE,MAAM,eAAe,WACnB,UAAU,QAAQ,KAAK,QAAQ,KAAK,EACpC,eAAe,QAAQ,CACxB;AACD,cAAa,SAAS,WACpB,UAAU,QAAQ,KAAK,QAAQ,KAAK,EACpC,eAAe,QAAQ,CACxB;AAED,QAAO"}
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_fs = require('../schemas/fs.cjs');
3
+
4
+ exports.FileId = require_fs.FileId;
5
+ exports.FileMetadata = require_fs.FileMetadata;
6
+ exports.FileMetadata_KeyValuePair = require_fs.FileMetadata_KeyValuePair;
7
+ exports.FileStorage = require_fs.FileStorage;
8
+ exports.FileSystem = require_fs.FileSystem;
9
+ exports._capnpFileId = require_fs._capnpFileId;
@@ -0,0 +1,2 @@
1
+ import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "../schemas/fs.cjs";
2
+ export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId };
@@ -0,0 +1,2 @@
1
+ import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "../schemas/fs.mjs";
2
+ export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId };
@@ -0,0 +1,3 @@
1
+ import { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId } from "../schemas/fs.mjs";
2
+
3
+ export { FileId, FileMetadata, FileMetadata_KeyValuePair, FileStorage, FileSystem, _capnpFileId };
@@ -0,0 +1,260 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
+ const require_lib_events = require('./events.cjs');
4
+ let _stryke_unique_id_nanoid_client = require("@stryke/unique-id/nanoid-client");
5
+
6
+ //#region src/lib/streaming-channel.ts
7
+ const DEFAULT_HIGH_WATER_MARK = 256;
8
+ var StreamClosedError = class extends Error {
9
+ name = "StreamClosedError";
10
+ };
11
+ /**
12
+ * Build a server-side stream sink. RPC-agnostic — the RPC host wires
13
+ * `events.on('chunk' | 'end')` to broadcast, and reads `buffer` to replay
14
+ * for late or reconnecting subscribers.
15
+ */
16
+ function createStreamSink(options = {}) {
17
+ const id = options.id ?? (0, _stryke_unique_id_nanoid_client.nanoid)();
18
+ const replayWindow = Math.max(0, options.replayWindow ?? 0);
19
+ const events = require_lib_events.createEventEmitter();
20
+ const controller = new AbortController();
21
+ const buffer = [];
22
+ let closed = false;
23
+ let lastSeq = 0;
24
+ function write(chunk) {
25
+ if (closed) throw new StreamClosedError(`Cannot write to a closed stream "${id}"`);
26
+ lastSeq += 1;
27
+ if (replayWindow > 0) {
28
+ buffer.push({
29
+ seq: lastSeq,
30
+ chunk
31
+ });
32
+ if (buffer.length > replayWindow) buffer.splice(0, buffer.length - replayWindow);
33
+ }
34
+ events.emit("chunk", lastSeq, chunk);
35
+ }
36
+ function error(reason) {
37
+ if (closed) return;
38
+ closed = true;
39
+ const payload = toErrorPayload(reason);
40
+ controller.abort(reason);
41
+ events.emit("end", payload);
42
+ }
43
+ function close() {
44
+ if (closed) return;
45
+ closed = true;
46
+ if (!controller.signal.aborted) controller.abort("stream closed");
47
+ events.emit("end", void 0);
48
+ }
49
+ function abort(reason) {
50
+ if (closed) return;
51
+ if (!controller.signal.aborted) controller.abort(reason ?? "aborted");
52
+ }
53
+ const writable = new WritableStream({
54
+ write(chunk) {
55
+ write(chunk);
56
+ },
57
+ close() {
58
+ close();
59
+ },
60
+ abort(reason) {
61
+ error(reason);
62
+ }
63
+ });
64
+ return {
65
+ id,
66
+ signal: controller.signal,
67
+ get closed() {
68
+ return closed;
69
+ },
70
+ get lastSeq() {
71
+ return lastSeq;
72
+ },
73
+ write,
74
+ error,
75
+ close,
76
+ abort,
77
+ writable,
78
+ events,
79
+ buffer
80
+ };
81
+ }
82
+ /**
83
+ * Build a client-side stream reader. RPC-agnostic — the RPC host calls
84
+ * `_push(seq, chunk)` on each incoming chunk and `_end(error?)` on the
85
+ * terminal frame. Consumers iterate with `for await` or pipe `readable`.
86
+ */
87
+ function createStreamReader(options = {}) {
88
+ const id = options.id ?? (0, _stryke_unique_id_nanoid_client.nanoid)();
89
+ const highWaterMark = Math.max(1, options.highWaterMark ?? DEFAULT_HIGH_WATER_MARK);
90
+ const queue = [];
91
+ let lastSeenSeq = 0;
92
+ let done = false;
93
+ let cancelled = false;
94
+ let endError;
95
+ let pending;
96
+ let pullController;
97
+ let readableInstance;
98
+ function drainNext() {
99
+ if (!pending) return;
100
+ if (queue.length > 0) {
101
+ const value = queue.shift();
102
+ const r = pending;
103
+ pending = void 0;
104
+ r.resolve({
105
+ value,
106
+ done: false
107
+ });
108
+ return;
109
+ }
110
+ if (done) {
111
+ const r = pending;
112
+ pending = void 0;
113
+ if (endError) {
114
+ const err = new Error(endError.message);
115
+ err.name = endError.name;
116
+ r.reject(err);
117
+ } else r.resolve({
118
+ value: void 0,
119
+ done: true
120
+ });
121
+ }
122
+ }
123
+ function feedReadable() {
124
+ if (!pullController) return;
125
+ while (queue.length > 0) {
126
+ const v = queue.shift();
127
+ try {
128
+ pullController.enqueue(v);
129
+ } catch {
130
+ break;
131
+ }
132
+ }
133
+ if (done && pullController) {
134
+ try {
135
+ if (endError) {
136
+ const err = new Error(endError.message);
137
+ err.name = endError.name;
138
+ pullController.error(err);
139
+ } else pullController.close();
140
+ } catch {}
141
+ pullController = void 0;
142
+ }
143
+ }
144
+ function push(seq, chunk) {
145
+ if (done || cancelled) return;
146
+ if (seq <= lastSeenSeq) return;
147
+ lastSeenSeq = seq;
148
+ queue.push(chunk);
149
+ if (queue.length > highWaterMark) {
150
+ const overflow = queue.length - highWaterMark;
151
+ queue.splice(0, overflow);
152
+ options.onOverflow?.(overflow);
153
+ }
154
+ drainNext();
155
+ if (readableInstance) feedReadable();
156
+ }
157
+ function end(error) {
158
+ if (done) return;
159
+ done = true;
160
+ endError = error;
161
+ drainNext();
162
+ if (readableInstance) feedReadable();
163
+ }
164
+ function cancel() {
165
+ if (cancelled || done) return;
166
+ cancelled = true;
167
+ options.onCancel?.();
168
+ end(void 0);
169
+ }
170
+ function getReadable() {
171
+ if (readableInstance) return readableInstance;
172
+ readableInstance = new ReadableStream({
173
+ start(controller) {
174
+ pullController = controller;
175
+ feedReadable();
176
+ },
177
+ cancel() {
178
+ cancel();
179
+ }
180
+ });
181
+ return readableInstance;
182
+ }
183
+ return {
184
+ id,
185
+ get cancelled() {
186
+ return cancelled;
187
+ },
188
+ get done() {
189
+ return done;
190
+ },
191
+ get lastSeenSeq() {
192
+ return lastSeenSeq;
193
+ },
194
+ get readable() {
195
+ return getReadable();
196
+ },
197
+ cancel,
198
+ _push: push,
199
+ _end: end,
200
+ [Symbol.asyncIterator]() {
201
+ return {
202
+ async next() {
203
+ if (queue.length > 0) return Promise.resolve({
204
+ value: queue.shift(),
205
+ done: false
206
+ });
207
+ if (done) {
208
+ if (endError) {
209
+ const err = new Error(endError.message);
210
+ err.name = endError.name;
211
+ return Promise.reject(err);
212
+ }
213
+ return Promise.resolve({
214
+ value: void 0,
215
+ done: true
216
+ });
217
+ }
218
+ return new Promise((resolve, reject) => {
219
+ pending = {
220
+ resolve,
221
+ reject
222
+ };
223
+ });
224
+ },
225
+ async return() {
226
+ cancel();
227
+ return Promise.resolve({
228
+ value: void 0,
229
+ done: true
230
+ });
231
+ }
232
+ };
233
+ }
234
+ };
235
+ }
236
+ function toErrorPayload(reason) {
237
+ if (reason instanceof Error) return {
238
+ name: reason.name || "Error",
239
+ message: reason.message
240
+ };
241
+ if (typeof reason === "string") return {
242
+ name: "Error",
243
+ message: reason
244
+ };
245
+ try {
246
+ return {
247
+ name: "Error",
248
+ message: JSON.stringify(reason)
249
+ };
250
+ } catch {
251
+ return {
252
+ name: "Error",
253
+ message: String(reason)
254
+ };
255
+ }
256
+ }
257
+
258
+ //#endregion
259
+ exports.createStreamReader = createStreamReader;
260
+ exports.createStreamSink = createStreamSink;
@@ -0,0 +1,133 @@
1
+ import { EventEmitter } from "devframe/types";
2
+
3
+ //#region src/lib/streaming-channel.d.ts
4
+ /**
5
+ * Serialized error shape sent over the wire when a stream ends with a failure.
6
+ * Stays JSON-safe so the strict-JSON encoder can carry it without coercion.
7
+ */
8
+ interface StreamErrorPayload {
9
+ name: string;
10
+ message: string;
11
+ }
12
+ /**
13
+ * Single buffered chunk in the server-side ring buffer.
14
+ *
15
+ * Sequence numbers start at 1 and increment per write. Subscribers track
16
+ * `lastSeenSeq` and ask for `afterSeq` on resubscribe so the server can
17
+ * replay any chunks the client missed during a brief disconnect.
18
+ */
19
+ interface BufferedChunk<T> {
20
+ seq: number;
21
+ chunk: T;
22
+ }
23
+ interface StreamSinkEvents<T> {
24
+ /** Fired for each `write()`. The RPC layer subscribes and broadcasts. */
25
+ chunk: (seq: number, chunk: T) => void;
26
+ /** Terminal — fired exactly once per sink lifetime. */
27
+ end: (error?: StreamErrorPayload) => void;
28
+ }
29
+ interface CreateStreamSinkOptions {
30
+ id?: string;
31
+ /**
32
+ * Size of the per-stream ring buffer kept for replay-on-resubscribe.
33
+ * `0` (default) disables replay.
34
+ */
35
+ replayWindow?: number;
36
+ }
37
+ /**
38
+ * Server-side producer handle. Two equivalent surfaces share one piece of
39
+ * state: the imperative `write/error/close` triple, and a `WritableStream<T>`
40
+ * for `pipeTo`-style consumption.
41
+ */
42
+ interface StreamSink<T> {
43
+ /** Stable id used by clients to subscribe. */
44
+ readonly id: string;
45
+ /**
46
+ * Aborts when the consumer cancels (server-side) or when the transport
47
+ * loses every subscriber. Producers should poll `signal.aborted` and exit
48
+ * cleanly.
49
+ */
50
+ readonly signal: AbortSignal;
51
+ /** `true` after `close()` / `error()`. Further writes throw. */
52
+ readonly closed: boolean;
53
+ /** Last allocated sequence number. `0` until the first write. */
54
+ readonly lastSeq: number;
55
+ write: (chunk: T) => void;
56
+ error: (reason: unknown) => void;
57
+ close: () => void;
58
+ /** External-cancel path. Aborts the signal so handlers can short-circuit. */
59
+ abort: (reason?: unknown) => void;
60
+ /** `WritableStream<T>` adapter — same in-memory state as the imperative API. */
61
+ readonly writable: WritableStream<T>;
62
+ /**
63
+ * Internal — RPC layer subscribes to receive chunk/end notifications.
64
+ * Not part of the public contract; do not call directly.
65
+ *
66
+ * @internal
67
+ */
68
+ readonly events: EventEmitter<StreamSinkEvents<T>>;
69
+ /**
70
+ * Internal — replay buffer. RPC layer reads on (re)subscribe to feed
71
+ * missed chunks before going live.
72
+ *
73
+ * @internal
74
+ */
75
+ readonly buffer: ReadonlyArray<BufferedChunk<T>>;
76
+ }
77
+ interface CreateStreamReaderOptions {
78
+ id?: string;
79
+ /**
80
+ * Maximum number of buffered chunks held client-side while the consumer
81
+ * isn't draining. On overflow, the oldest chunk is dropped.
82
+ */
83
+ highWaterMark?: number;
84
+ /**
85
+ * Called when the chunk queue overflows the high-water mark. The RPC
86
+ * layer wires this to a coded warning; the primitive itself is
87
+ * RPC-agnostic.
88
+ */
89
+ onOverflow?: (dropped: number) => void;
90
+ /** Called when the consumer cancels — the RPC layer sends `:cancel` upstream. */
91
+ onCancel?: () => void;
92
+ }
93
+ /**
94
+ * Client-side consumer handle. Both an `AsyncIterable<T>` (for `for await`)
95
+ * and exposes `readable: ReadableStream<T>` (for `pipeTo`). Pick one — they
96
+ * share a single internal queue, so concurrent draining will race.
97
+ */
98
+ interface StreamReader<T> extends AsyncIterable<T> {
99
+ readonly id: string;
100
+ readonly cancelled: boolean;
101
+ readonly done: boolean;
102
+ /** Highest `seq` observed. Used for replay on reconnect. */
103
+ readonly lastSeenSeq: number;
104
+ /** `ReadableStream<T>` adapter for `pipeTo`-style consumption. */
105
+ readonly readable: ReadableStream<T>;
106
+ cancel: () => void;
107
+ /** @internal */
108
+ _push: (seq: number, chunk: T) => void;
109
+ /** @internal */
110
+ _end: (error?: StreamErrorPayload) => void;
111
+ }
112
+ /**
113
+ * Build a server-side stream sink. RPC-agnostic — the RPC host wires
114
+ * `events.on('chunk' | 'end')` to broadcast, and reads `buffer` to replay
115
+ * for late or reconnecting subscribers.
116
+ */
117
+ declare function createStreamSink<T>(options?: CreateStreamSinkOptions): StreamSink<T>;
118
+ /**
119
+ * Build a client-side stream reader. RPC-agnostic — the RPC host calls
120
+ * `_push(seq, chunk)` on each incoming chunk and `_end(error?)` on the
121
+ * terminal frame. Consumers iterate with `for await` or pipe `readable`.
122
+ */
123
+ declare function createStreamReader<T>(options?: CreateStreamReaderOptions): StreamReader<T>;
124
+ declare type __ΩStreamErrorPayload = any[];
125
+ declare type __ΩBufferedChunk = any[];
126
+ declare type __ΩStreamSinkEvents = any[];
127
+ declare type __ΩCreateStreamSinkOptions = any[];
128
+ declare type __ΩStreamSink = any[];
129
+ declare type __ΩCreateStreamReaderOptions = any[];
130
+ declare type __ΩStreamReader = any[];
131
+ //#endregion
132
+ export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, __ΩBufferedChunk, __ΩCreateStreamReaderOptions, __ΩCreateStreamSinkOptions, __ΩStreamErrorPayload, __ΩStreamReader, __ΩStreamSink, __ΩStreamSinkEvents, createStreamReader, createStreamSink };
133
+ //# sourceMappingURL=streaming-channel.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streaming-channel.d.cts","names":[],"sources":["../../src/lib/streaming-channel.ts"],"mappings":";;;;;AA0BA;;UAAiB,kBAAA;EACf,IAAA;EACA,OAAA;AAAA;;;;;;;;UAUe,aAAA;EACf,GAAA;EACA,KAAA,EAAO,CAAA;AAAA;AAAA,UAGQ,gBAAA;EAIiB;EAFhC,KAAA,GAAQ,GAAA,UAAa,KAAA,EAAO,CAAA;EAA5B;EAEA,GAAA,GAAM,KAAA,GAAQ,kBAAA;AAAA;AAAA,UAGC,uBAAA;EACf,EAAA;EAJc;;;;EASd,YAAA;AAAA;;;;AAQF;;UAAiB,UAAA;EAQE;EAAA,SANR,EAAA;EAmByB;;;;;EAAA,SAbzB,MAAA,EAAQ,WAAA;EA6Bc;EAAA,SA3BtB,MAAA;EA2BqB;EAAA,SAzBrB,OAAA;EAET,KAAA,GAAQ,KAAA,EAAO,CAAA;EACf,KAAA,GAAQ,MAAA;EACR,KAAA;EARiB;EAUjB,KAAA,GAAQ,MAAA;EANC;EAA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