diffact 0.1.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 (337) hide show
  1. package/dist/agent-manager.d.ts +32 -0
  2. package/dist/agent-manager.js +502 -0
  3. package/dist/app-server-client.d.ts +38 -0
  4. package/dist/app-server-client.js +249 -0
  5. package/dist/capabilities.d.ts +2 -0
  6. package/dist/capabilities.js +27 -0
  7. package/dist/cli.d.ts +6 -0
  8. package/dist/cli.js +13 -0
  9. package/dist/command-runner.d.ts +83 -0
  10. package/dist/command-runner.js +427 -0
  11. package/dist/editors.d.ts +26 -0
  12. package/dist/editors.js +144 -0
  13. package/dist/gh.d.ts +61 -0
  14. package/dist/gh.js +185 -0
  15. package/dist/git.d.ts +57 -0
  16. package/dist/git.js +482 -0
  17. package/dist/http.d.ts +7 -0
  18. package/dist/http.js +98 -0
  19. package/dist/index-node.d.ts +5 -0
  20. package/dist/index-node.js +51 -0
  21. package/dist/index.d.ts +6 -0
  22. package/dist/index.js +1011 -0
  23. package/dist/list-directories.d.ts +8 -0
  24. package/dist/list-directories.js +32 -0
  25. package/dist/log.d.ts +2 -0
  26. package/dist/log.js +2 -0
  27. package/dist/open-browser.d.ts +5 -0
  28. package/dist/open-browser.js +23 -0
  29. package/dist/project-commands.d.ts +17 -0
  30. package/dist/project-commands.js +152 -0
  31. package/dist/project-path.d.ts +5 -0
  32. package/dist/project-path.js +33 -0
  33. package/dist/runtime.d.ts +65 -0
  34. package/dist/runtime.js +235 -0
  35. package/dist/static.d.ts +10 -0
  36. package/dist/static.js +127 -0
  37. package/dist/types.d.ts +17 -0
  38. package/dist/types.js +1 -0
  39. package/dist/utils.d.ts +3 -0
  40. package/dist/utils.js +26 -0
  41. package/dist/ws-hub.d.ts +20 -0
  42. package/dist/ws-hub.js +123 -0
  43. package/package.json +61 -0
  44. package/web/dist/assets/abap-BdImnpbu.js +1 -0
  45. package/web/dist/assets/actionscript-3-CfeIJUat.js +1 -0
  46. package/web/dist/assets/ada-bCR0ucgS.js +1 -0
  47. package/web/dist/assets/andromeeda-C-Jbm3Hp.js +1 -0
  48. package/web/dist/assets/angular-html-CU67Zn6k.js +1 -0
  49. package/web/dist/assets/angular-ts-BwZT4LLn.js +1 -0
  50. package/web/dist/assets/apache-Pmp26Uib.js +1 -0
  51. package/web/dist/assets/apex-DDbsPZ6N.js +1 -0
  52. package/web/dist/assets/apl-dKokRX4l.js +1 -0
  53. package/web/dist/assets/applescript-Co6uUVPk.js +1 -0
  54. package/web/dist/assets/ara-BRHolxvo.js +1 -0
  55. package/web/dist/assets/asciidoc-Dv7Oe6Be.js +1 -0
  56. package/web/dist/assets/asm-D_Q5rh1f.js +1 -0
  57. package/web/dist/assets/astro-CbQHKStN.js +1 -0
  58. package/web/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
  59. package/web/dist/assets/awk-DMzUqQB5.js +1 -0
  60. package/web/dist/assets/ayu-dark-Cv9koXgw.js +1 -0
  61. package/web/dist/assets/ballerina-BFfxhgS-.js +1 -0
  62. package/web/dist/assets/bat-BkioyH1T.js +1 -0
  63. package/web/dist/assets/beancount-k_qm7-4y.js +1 -0
  64. package/web/dist/assets/berry-uYugtg8r.js +1 -0
  65. package/web/dist/assets/bibtex-CHM0blh-.js +1 -0
  66. package/web/dist/assets/bicep-Bmn6On1c.js +1 -0
  67. package/web/dist/assets/blade-DVc8C-J4.js +1 -0
  68. package/web/dist/assets/bsl-BO_Y6i37.js +1 -0
  69. package/web/dist/assets/c-BIGW1oBm.js +1 -0
  70. package/web/dist/assets/cadence-Bv_4Rxtq.js +1 -0
  71. package/web/dist/assets/cairo-KRGpt6FW.js +1 -0
  72. package/web/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  73. package/web/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  74. package/web/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  75. package/web/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  76. package/web/dist/assets/clarity-D53aC0YG.js +1 -0
  77. package/web/dist/assets/clojure-P80f7IUj.js +1 -0
  78. package/web/dist/assets/cmake-D1j8_8rp.js +1 -0
  79. package/web/dist/assets/cobol-nwyudZeR.js +1 -0
  80. package/web/dist/assets/code-block-37QAKDTI-C97XC0lL.js +2 -0
  81. package/web/dist/assets/codeowners-Bp6g37R7.js +1 -0
  82. package/web/dist/assets/codeql-DsOJ9woJ.js +1 -0
  83. package/web/dist/assets/coffee-Ch7k5sss.js +1 -0
  84. package/web/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
  85. package/web/dist/assets/coq-DkFqJrB1.js +1 -0
  86. package/web/dist/assets/cpp-CofmeUqb.js +1 -0
  87. package/web/dist/assets/crystal-tKQVLTB8.js +1 -0
  88. package/web/dist/assets/csharp-K5feNrxe.js +1 -0
  89. package/web/dist/assets/css-DPfMkruS.js +1 -0
  90. package/web/dist/assets/csv-fuZLfV_i.js +1 -0
  91. package/web/dist/assets/cue-D82EKSYY.js +1 -0
  92. package/web/dist/assets/cypher-COkxafJQ.js +1 -0
  93. package/web/dist/assets/d-85-TOEBH.js +1 -0
  94. package/web/dist/assets/dark-plus-C3mMm8J8.js +1 -0
  95. package/web/dist/assets/dart-CF10PKvl.js +1 -0
  96. package/web/dist/assets/dax-CEL-wOlO.js +1 -0
  97. package/web/dist/assets/desktop-BmXAJ9_W.js +1 -0
  98. package/web/dist/assets/diff-D97Zzqfu.js +1 -0
  99. package/web/dist/assets/docker-BcOcwvcX.js +1 -0
  100. package/web/dist/assets/dotenv-Da5cRb03.js +1 -0
  101. package/web/dist/assets/dracula-BzJJZx-M.js +1 -0
  102. package/web/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
  103. package/web/dist/assets/dream-maker-BtqSS_iP.js +1 -0
  104. package/web/dist/assets/edge-BkV0erSs.js +1 -0
  105. package/web/dist/assets/elixir-CDX3lj18.js +1 -0
  106. package/web/dist/assets/elm-DbKCFpqz.js +1 -0
  107. package/web/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
  108. package/web/dist/assets/erb-BOJIQeun.js +1 -0
  109. package/web/dist/assets/erlang-DsQrWhSR.js +1 -0
  110. package/web/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
  111. package/web/dist/assets/everforest-light-C8M2exoo.js +1 -0
  112. package/web/dist/assets/fennel-BYunw83y.js +1 -0
  113. package/web/dist/assets/fish-BvzEVeQv.js +1 -0
  114. package/web/dist/assets/fluent-C4IJs8-o.js +1 -0
  115. package/web/dist/assets/fortran-fixed-form-BZjJHVRy.js +1 -0
  116. package/web/dist/assets/fortran-free-form-D22FLkUw.js +1 -0
  117. package/web/dist/assets/fsharp-CXgrBDvD.js +1 -0
  118. package/web/dist/assets/gdresource-B7Tvp0Sc.js +1 -0
  119. package/web/dist/assets/gdscript-DTMYz4Jt.js +1 -0
  120. package/web/dist/assets/gdshader-DkwncUOv.js +1 -0
  121. package/web/dist/assets/genie-D0YGMca9.js +1 -0
  122. package/web/dist/assets/gherkin-DyxjwDmM.js +1 -0
  123. package/web/dist/assets/git-commit-F4YmCXRG.js +1 -0
  124. package/web/dist/assets/git-rebase-r7XF79zn.js +1 -0
  125. package/web/dist/assets/github-dark-DHJKELXO.js +1 -0
  126. package/web/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
  127. package/web/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  128. package/web/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  129. package/web/dist/assets/github-light-DAi9KRSo.js +1 -0
  130. package/web/dist/assets/github-light-default-D7oLnXFd.js +1 -0
  131. package/web/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  132. package/web/dist/assets/gleam-BspZqrRM.js +1 -0
  133. package/web/dist/assets/glimmer-js-Rg0-pVw9.js +1 -0
  134. package/web/dist/assets/glimmer-ts-U6CK756n.js +1 -0
  135. package/web/dist/assets/glsl-DplSGwfg.js +1 -0
  136. package/web/dist/assets/gnuplot-DdkO51Og.js +1 -0
  137. package/web/dist/assets/go-Dn2_MT6a.js +1 -0
  138. package/web/dist/assets/graphql-ChdNCCLP.js +1 -0
  139. package/web/dist/assets/groovy-gcz8RCvz.js +1 -0
  140. package/web/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  141. package/web/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  142. package/web/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  143. package/web/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  144. package/web/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  145. package/web/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  146. package/web/dist/assets/hack-CaT9iCJl.js +1 -0
  147. package/web/dist/assets/haml-B8DHNrY2.js +1 -0
  148. package/web/dist/assets/handlebars-BL8al0AC.js +1 -0
  149. package/web/dist/assets/haskell-Df6bDoY_.js +1 -0
  150. package/web/dist/assets/haxe-CzTSHFRz.js +1 -0
  151. package/web/dist/assets/hcl-BWvSN4gD.js +1 -0
  152. package/web/dist/assets/hjson-D5-asLiD.js +1 -0
  153. package/web/dist/assets/hlsl-D3lLCCz7.js +1 -0
  154. package/web/dist/assets/houston-DnULxvSX.js +1 -0
  155. package/web/dist/assets/html-GMplVEZG.js +1 -0
  156. package/web/dist/assets/html-derivative-BFtXZ54Q.js +1 -0
  157. package/web/dist/assets/http-jrhK8wxY.js +1 -0
  158. package/web/dist/assets/hurl-irOxFIW8.js +1 -0
  159. package/web/dist/assets/hxml-Bvhsp5Yf.js +1 -0
  160. package/web/dist/assets/hy-DFXneXwc.js +1 -0
  161. package/web/dist/assets/imba-DGztddWO.js +1 -0
  162. package/web/dist/assets/index-CRDz04kv.css +1 -0
  163. package/web/dist/assets/index-DWCfDth4.js +1497 -0
  164. package/web/dist/assets/ini-BEwlwnbL.js +1 -0
  165. package/web/dist/assets/java-CylS5w8V.js +1 -0
  166. package/web/dist/assets/javascript-wDzz0qaB.js +1 -0
  167. package/web/dist/assets/jinja-4LBKfQ-Z.js +1 -0
  168. package/web/dist/assets/jison-wvAkD_A8.js +1 -0
  169. package/web/dist/assets/json-Cp-IABpG.js +1 -0
  170. package/web/dist/assets/json5-C9tS-k6U.js +1 -0
  171. package/web/dist/assets/jsonc-Des-eS-w.js +1 -0
  172. package/web/dist/assets/jsonl-DcaNXYhu.js +1 -0
  173. package/web/dist/assets/jsonnet-DFQXde-d.js +1 -0
  174. package/web/dist/assets/jssm-C2t-YnRu.js +1 -0
  175. package/web/dist/assets/jsx-g9-lgVsj.js +1 -0
  176. package/web/dist/assets/julia-C8NyazO9.js +1 -0
  177. package/web/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  178. package/web/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  179. package/web/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
  180. package/web/dist/assets/kdl-DV7GczEv.js +1 -0
  181. package/web/dist/assets/kotlin-BdnUsdx6.js +1 -0
  182. package/web/dist/assets/kusto-BvAqAH-y.js +1 -0
  183. package/web/dist/assets/laserwave-DUszq2jm.js +1 -0
  184. package/web/dist/assets/latex-BdAV_C_H.js +1 -0
  185. package/web/dist/assets/lean-Bc6EcWN3.js +1 -0
  186. package/web/dist/assets/less-B1dDrJ26.js +1 -0
  187. package/web/dist/assets/light-plus-B7mTdjB0.js +1 -0
  188. package/web/dist/assets/liquid-DYVedYrR.js +1 -0
  189. package/web/dist/assets/llvm-BtvRca6l.js +1 -0
  190. package/web/dist/assets/log-2UxHyX5q.js +1 -0
  191. package/web/dist/assets/logo-BtOb2qkB.js +1 -0
  192. package/web/dist/assets/lua-BbnMAYS6.js +1 -0
  193. package/web/dist/assets/luau-CXu1NL6O.js +1 -0
  194. package/web/dist/assets/make-CHLpvVh8.js +1 -0
  195. package/web/dist/assets/markdown-Cvjx9yec.js +1 -0
  196. package/web/dist/assets/marko-CPi9NSCl.js +1 -0
  197. package/web/dist/assets/material-theme-D5KoaKCx.js +1 -0
  198. package/web/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
  199. package/web/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  200. package/web/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
  201. package/web/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  202. package/web/dist/assets/matlab-D7o27uSR.js +1 -0
  203. package/web/dist/assets/mdc-DUICxH0z.js +1 -0
  204. package/web/dist/assets/mdx-Cmh6b_Ma.js +1 -0
  205. package/web/dist/assets/mermaid-DKYwYmdq.js +1 -0
  206. package/web/dist/assets/min-dark-CafNBF8u.js +1 -0
  207. package/web/dist/assets/min-light-CTRr51gU.js +1 -0
  208. package/web/dist/assets/mipsasm-CKIfxQSi.js +1 -0
  209. package/web/dist/assets/mojo-1DNp92w6.js +1 -0
  210. package/web/dist/assets/monokai-D4h5O-jR.js +1 -0
  211. package/web/dist/assets/move-Bu9oaDYs.js +1 -0
  212. package/web/dist/assets/narrat-DRg8JJMk.js +1 -0
  213. package/web/dist/assets/nextflow-BrzmwbiE.js +1 -0
  214. package/web/dist/assets/nginx-DknmC5AR.js +1 -0
  215. package/web/dist/assets/night-owl-C39BiMTA.js +1 -0
  216. package/web/dist/assets/nim-CVrawwO9.js +1 -0
  217. package/web/dist/assets/nix-c8nO5XWb.js +1 -0
  218. package/web/dist/assets/nord-Ddv68eIx.js +1 -0
  219. package/web/dist/assets/nushell-C-sUppwS.js +1 -0
  220. package/web/dist/assets/objective-c-DXmwc3jG.js +1 -0
  221. package/web/dist/assets/objective-cpp-CLxacb5B.js +1 -0
  222. package/web/dist/assets/ocaml-C0hk2d4L.js +1 -0
  223. package/web/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  224. package/web/dist/assets/one-light-PoHY5YXO.js +1 -0
  225. package/web/dist/assets/openscad-C4EeE6gA.js +1 -0
  226. package/web/dist/assets/pascal-D93ZcfNL.js +1 -0
  227. package/web/dist/assets/perl-C0TMdlhV.js +1 -0
  228. package/web/dist/assets/php-CDn_0X-4.js +1 -0
  229. package/web/dist/assets/pierre-dark-BXuwtOqb.js +1 -0
  230. package/web/dist/assets/pierre-light-dckrK0oj.js +1 -0
  231. package/web/dist/assets/pkl-u5AG7uiY.js +1 -0
  232. package/web/dist/assets/plastic-3e1v2bzS.js +1 -0
  233. package/web/dist/assets/plsql-ChMvpjG-.js +1 -0
  234. package/web/dist/assets/po-BTJTHyun.js +1 -0
  235. package/web/dist/assets/poimandres-CS3Unz2-.js +1 -0
  236. package/web/dist/assets/polar-C0HS_06l.js +1 -0
  237. package/web/dist/assets/postcss-CXtECtnM.js +1 -0
  238. package/web/dist/assets/powerquery-CEu0bR-o.js +1 -0
  239. package/web/dist/assets/powershell-Dpen1YoG.js +1 -0
  240. package/web/dist/assets/prisma-Dd19v3D-.js +1 -0
  241. package/web/dist/assets/prolog-CbFg5uaA.js +1 -0
  242. package/web/dist/assets/proto-DyJlTyXw.js +1 -0
  243. package/web/dist/assets/pug-CGlum2m_.js +1 -0
  244. package/web/dist/assets/puppet-BMWR74SV.js +1 -0
  245. package/web/dist/assets/purescript-CklMAg4u.js +1 -0
  246. package/web/dist/assets/python-B6aJPvgy.js +1 -0
  247. package/web/dist/assets/qml-3beO22l8.js +1 -0
  248. package/web/dist/assets/qmldir-C8lEn-DE.js +1 -0
  249. package/web/dist/assets/qss-IeuSbFQv.js +1 -0
  250. package/web/dist/assets/r-DiinP2Uv.js +1 -0
  251. package/web/dist/assets/racket-BqYA7rlc.js +1 -0
  252. package/web/dist/assets/raku-DXvB9xmW.js +1 -0
  253. package/web/dist/assets/razor-CE9lU5zL.js +1 -0
  254. package/web/dist/assets/red-bN70gL4F.js +1 -0
  255. package/web/dist/assets/reg-C-SQnVFl.js +1 -0
  256. package/web/dist/assets/regexp-CDVJQ6XC.js +1 -0
  257. package/web/dist/assets/rel-C3B-1QV4.js +1 -0
  258. package/web/dist/assets/riscv-BM1_JUlF.js +1 -0
  259. package/web/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  260. package/web/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  261. package/web/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
  262. package/web/dist/assets/rosmsg-BJDFO7_C.js +1 -0
  263. package/web/dist/assets/rst-B0xPkSld.js +1 -0
  264. package/web/dist/assets/ruby-BvKwtOVI.js +1 -0
  265. package/web/dist/assets/rust-B1yitclQ.js +1 -0
  266. package/web/dist/assets/sas-cz2c8ADy.js +1 -0
  267. package/web/dist/assets/sass-Cj5Yp3dK.js +1 -0
  268. package/web/dist/assets/scala-C151Ov-r.js +1 -0
  269. package/web/dist/assets/scheme-C98Dy4si.js +1 -0
  270. package/web/dist/assets/scss-OYdSNvt2.js +1 -0
  271. package/web/dist/assets/sdbl-DVxCFoDh.js +1 -0
  272. package/web/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
  273. package/web/dist/assets/shellscript-Yzrsuije.js +1 -0
  274. package/web/dist/assets/shellsession-BADoaaVG.js +1 -0
  275. package/web/dist/assets/slack-dark-BthQWCQV.js +1 -0
  276. package/web/dist/assets/slack-ochin-DqwNpetd.js +1 -0
  277. package/web/dist/assets/smalltalk-BERRCDM3.js +1 -0
  278. package/web/dist/assets/snazzy-light-Bw305WKR.js +1 -0
  279. package/web/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
  280. package/web/dist/assets/solarized-light-L9t79GZl.js +1 -0
  281. package/web/dist/assets/solidity-rGO070M0.js +1 -0
  282. package/web/dist/assets/soy-Brmx7dQM.js +1 -0
  283. package/web/dist/assets/sparql-rVzFXLq3.js +1 -0
  284. package/web/dist/assets/splunk-BtCnVYZw.js +1 -0
  285. package/web/dist/assets/sql-BLtJtn59.js +1 -0
  286. package/web/dist/assets/ssh-config-_ykCGR6B.js +1 -0
  287. package/web/dist/assets/stata-BH5u7GGu.js +1 -0
  288. package/web/dist/assets/stylus-BEDo0Tqx.js +1 -0
  289. package/web/dist/assets/svelte-3Dk4HxPD.js +1 -0
  290. package/web/dist/assets/swift-Dg5xB15N.js +1 -0
  291. package/web/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
  292. package/web/dist/assets/system-verilog-CnnmHF94.js +1 -0
  293. package/web/dist/assets/systemd-4A_iFExJ.js +1 -0
  294. package/web/dist/assets/talonscript-CkByrt1z.js +1 -0
  295. package/web/dist/assets/tasl-QIJgUcNo.js +1 -0
  296. package/web/dist/assets/tcl-dwOrl1Do.js +1 -0
  297. package/web/dist/assets/templ-W15q3VgB.js +1 -0
  298. package/web/dist/assets/terraform-BETggiCN.js +1 -0
  299. package/web/dist/assets/tex-CxkMU7Pf.js +1 -0
  300. package/web/dist/assets/tokyo-night-hegEt444.js +1 -0
  301. package/web/dist/assets/toml-vGWfd6FD.js +1 -0
  302. package/web/dist/assets/ts-tags-zn1MmPIZ.js +1 -0
  303. package/web/dist/assets/tsv-B_m7g4N7.js +1 -0
  304. package/web/dist/assets/tsx-COt5Ahok.js +1 -0
  305. package/web/dist/assets/turtle-BsS91CYL.js +1 -0
  306. package/web/dist/assets/twig-CO9l9SDP.js +1 -0
  307. package/web/dist/assets/typescript-BPQ3VLAy.js +1 -0
  308. package/web/dist/assets/typespec-BGHnOYBU.js +1 -0
  309. package/web/dist/assets/typst-DHCkPAjA.js +1 -0
  310. package/web/dist/assets/v-BcVCzyr7.js +1 -0
  311. package/web/dist/assets/vala-CsfeWuGM.js +1 -0
  312. package/web/dist/assets/vb-D17OF-Vu.js +1 -0
  313. package/web/dist/assets/verilog-BQ8w6xss.js +1 -0
  314. package/web/dist/assets/vesper-DU1UobuO.js +1 -0
  315. package/web/dist/assets/vhdl-CeAyd5Ju.js +1 -0
  316. package/web/dist/assets/viml-CJc9bBzg.js +1 -0
  317. package/web/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
  318. package/web/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
  319. package/web/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
  320. package/web/dist/assets/vue-DnHKYNfI.js +1 -0
  321. package/web/dist/assets/vue-html-CChd_i61.js +1 -0
  322. package/web/dist/assets/vue-vine-8moa0y9V.js +1 -0
  323. package/web/dist/assets/vyper-CDx5xZoG.js +1 -0
  324. package/web/dist/assets/wasm-CG6Dc4jp.js +1 -0
  325. package/web/dist/assets/wasm-MzD3tlZU.js +1 -0
  326. package/web/dist/assets/wenyan-BV7otONQ.js +1 -0
  327. package/web/dist/assets/wgsl-Dx-B1_4e.js +1 -0
  328. package/web/dist/assets/wikitext-BhOHFoWU.js +1 -0
  329. package/web/dist/assets/wit-5i3qLPDT.js +1 -0
  330. package/web/dist/assets/wolfram-lXgVvXCa.js +1 -0
  331. package/web/dist/assets/worker-C3lkbYoB.js +153 -0
  332. package/web/dist/assets/xml-sdJ4AIDG.js +1 -0
  333. package/web/dist/assets/xsl-CtQFsRM5.js +1 -0
  334. package/web/dist/assets/yaml-Buea-lGh.js +1 -0
  335. package/web/dist/assets/zenscript-DVFEvuxE.js +1 -0
  336. package/web/dist/assets/zig-VOosw3JB.js +1 -0
  337. package/web/dist/index.html +19 -0
package/dist/git.js ADDED
@@ -0,0 +1,482 @@
1
+ import { execFile, spawn } from "node:child_process";
2
+ import { promisify } from "node:util";
3
+ const execFileAsync = promisify(execFile);
4
+ const MAX_BUFFER = 1024 * 1024 * 20;
5
+ const execGit = (cwd, args) => execFileAsync("git", args, { cwd, maxBuffer: MAX_BUFFER });
6
+ const execGitAllowNonZero = async (cwd, args) => {
7
+ try {
8
+ return await execGit(cwd, args);
9
+ }
10
+ catch (error) {
11
+ if (error && typeof error === "object" && "stdout" in error) {
12
+ const record = error;
13
+ const toText = (value) => typeof value === "string"
14
+ ? value
15
+ : value instanceof Buffer
16
+ ? value.toString("utf8")
17
+ : "";
18
+ return {
19
+ stdout: toText(record.stdout),
20
+ stderr: toText(record.stderr),
21
+ };
22
+ }
23
+ throw error;
24
+ }
25
+ };
26
+ export async function gitDiff(cwd, args = [], paths = []) {
27
+ const diffArgs = ["diff", "--no-color", ...args];
28
+ if (paths.length) {
29
+ diffArgs.push("--", ...paths);
30
+ }
31
+ const { stdout } = await execGit(cwd, diffArgs);
32
+ const includeUntracked = !args.some((arg) => ["--cached", "--staged", "--index"].includes(arg));
33
+ if (!includeUntracked) {
34
+ return stdout;
35
+ }
36
+ const { stdout: untrackedRaw } = await execGit(cwd, [
37
+ "ls-files",
38
+ "--others",
39
+ "--exclude-standard",
40
+ "-z",
41
+ ]);
42
+ const untracked = untrackedRaw
43
+ .split("\0")
44
+ .map((entry) => entry.trim())
45
+ .filter(Boolean);
46
+ const filteredUntracked = paths.length
47
+ ? untracked.filter((file) => paths.some((path) => file === path || file.startsWith(`${path}/`)))
48
+ : untracked;
49
+ if (!filteredUntracked.length) {
50
+ return stdout;
51
+ }
52
+ const untrackedDiffs = [];
53
+ for (const file of filteredUntracked) {
54
+ const { stdout: fileDiff } = await execGitAllowNonZero(cwd, [
55
+ "diff",
56
+ "--no-color",
57
+ "--no-index",
58
+ "--",
59
+ "/dev/null",
60
+ file,
61
+ ]);
62
+ if (fileDiff) {
63
+ untrackedDiffs.push(fileDiff.trimEnd());
64
+ }
65
+ }
66
+ if (!untrackedDiffs.length) {
67
+ return stdout;
68
+ }
69
+ const base = stdout.trimEnd();
70
+ const combined = [base, ...untrackedDiffs].filter(Boolean).join("\n\n");
71
+ return combined ? `${combined}\n` : combined;
72
+ }
73
+ export async function gitListStagedFiles(cwd) {
74
+ const { stdout } = await execGit(cwd, [
75
+ "diff",
76
+ "--name-only",
77
+ "--cached",
78
+ "-z",
79
+ ]);
80
+ return stdout
81
+ .split("\0")
82
+ .map((entry) => entry.trim())
83
+ .filter(Boolean);
84
+ }
85
+ export async function gitStagePaths(cwd, paths) {
86
+ if (!paths.length) {
87
+ return;
88
+ }
89
+ await execGit(cwd, ["add", "-A", "--", ...paths]);
90
+ }
91
+ const isMissingHeadError = (error) => {
92
+ if (!error || typeof error !== "object" || !("stderr" in error)) {
93
+ return false;
94
+ }
95
+ const record = error;
96
+ const message = typeof record.stderr === "string"
97
+ ? record.stderr
98
+ : record.stderr instanceof Buffer
99
+ ? record.stderr.toString("utf8")
100
+ : "";
101
+ return (message.includes("ambiguous argument 'HEAD'") ||
102
+ message.includes("bad revision 'HEAD'") ||
103
+ message.includes("unknown revision or path"));
104
+ };
105
+ export async function gitUnstagePaths(cwd, paths) {
106
+ if (!paths.length) {
107
+ return;
108
+ }
109
+ try {
110
+ await execGit(cwd, ["reset", "-q", "HEAD", "--", ...paths]);
111
+ }
112
+ catch (error) {
113
+ if (!isMissingHeadError(error)) {
114
+ throw error;
115
+ }
116
+ await execGit(cwd, ["rm", "-r", "--cached", "--", ...paths]);
117
+ }
118
+ }
119
+ export async function gitShowFile(cwd, ref, filePath) {
120
+ if (!ref) {
121
+ throw new Error("invalid_ref");
122
+ }
123
+ if (!filePath) {
124
+ throw new Error("invalid_path");
125
+ }
126
+ const { stdout } = await execGit(cwd, ["show", `${ref}:${filePath}`]);
127
+ return stdout;
128
+ }
129
+ export async function gitLog(cwd, skip = 0, limit = 50) {
130
+ const safeSkip = Number.isFinite(skip) && skip > 0 ? Math.floor(skip) : 0;
131
+ const safeLimit = Number.isFinite(limit) && limit > 0 ? Math.floor(limit) : 50;
132
+ const format = "%H%x1f%h%x1f%an%x1f%aI%x1f%s%x1f%b%x1e";
133
+ const { stdout } = await execGit(cwd, [
134
+ "log",
135
+ `--skip=${safeSkip}`,
136
+ "-n",
137
+ `${safeLimit + 1}`,
138
+ `--format=${format}`,
139
+ ]);
140
+ const records = stdout
141
+ .split("\x1e")
142
+ .map((line) => line.trim())
143
+ .filter(Boolean);
144
+ const parsed = records
145
+ .map((line) => {
146
+ const [sha, shortSha, authorName, authoredAt, subject, description] = line.split("\x1f");
147
+ if (!sha) {
148
+ return null;
149
+ }
150
+ return {
151
+ sha,
152
+ shortSha: shortSha || sha.slice(0, 7),
153
+ authorName: authorName || "",
154
+ authoredAt: authoredAt || "",
155
+ subject: subject || "",
156
+ description: description || "",
157
+ };
158
+ })
159
+ .filter((entry) => Boolean(entry));
160
+ const hasMore = parsed.length > safeLimit;
161
+ const items = parsed.slice(0, safeLimit);
162
+ return {
163
+ items,
164
+ hasMore,
165
+ nextSkip: safeSkip + items.length,
166
+ };
167
+ }
168
+ export async function gitCommitDiff(cwd, sha) {
169
+ if (!sha) {
170
+ throw new Error("invalid_commit");
171
+ }
172
+ const { stdout } = await execGit(cwd, [
173
+ "show",
174
+ "--no-color",
175
+ "--no-ext-diff",
176
+ "--format=",
177
+ sha,
178
+ ]);
179
+ return stdout;
180
+ }
181
+ export function gitCommitDiffStream(cwd, sha) {
182
+ if (!sha) {
183
+ throw new Error("invalid_commit");
184
+ }
185
+ const child = spawn("git", ["show", "--no-color", "--no-ext-diff", "--format=", sha], { cwd });
186
+ return new ReadableStream({
187
+ start(controller) {
188
+ const onData = (chunk) => {
189
+ controller.enqueue(chunk);
190
+ };
191
+ const onError = (error) => {
192
+ controller.error(error);
193
+ };
194
+ const onClose = (code) => {
195
+ if (code && code !== 0) {
196
+ controller.error(new Error("git_failed"));
197
+ return;
198
+ }
199
+ controller.close();
200
+ };
201
+ child.stdout.on("data", onData);
202
+ child.stdout.on("error", onError);
203
+ child.on("error", onError);
204
+ child.on("close", onClose);
205
+ },
206
+ cancel() {
207
+ child.kill();
208
+ },
209
+ });
210
+ }
211
+ export async function gitCommitFiles(cwd, sha) {
212
+ if (!sha) {
213
+ throw new Error("invalid_commit");
214
+ }
215
+ const { stdout } = await execGit(cwd, [
216
+ "show",
217
+ "--name-status",
218
+ "--no-ext-diff",
219
+ "--format=",
220
+ sha,
221
+ ]);
222
+ return stdout
223
+ .split("\n")
224
+ .map((line) => line.trim())
225
+ .filter(Boolean)
226
+ .map((line) => {
227
+ const [rawStatus = "", ...paths] = line.split("\t");
228
+ const statusCode = rawStatus[0] || "";
229
+ const pickPath = statusCode === "R" || statusCode === "C"
230
+ ? paths[1] || paths[0] || ""
231
+ : paths[0] || "";
232
+ const previousPath = statusCode === "R" ? paths[0] || "" : "";
233
+ const status = statusCode === "A"
234
+ ? "added"
235
+ : statusCode === "D"
236
+ ? "deleted"
237
+ : statusCode === "R"
238
+ ? "renamed"
239
+ : statusCode === "C"
240
+ ? "added"
241
+ : "modified";
242
+ const entry = {
243
+ path: pickPath,
244
+ status,
245
+ };
246
+ if (previousPath && previousPath !== pickPath) {
247
+ entry.previousPath = previousPath;
248
+ }
249
+ return entry;
250
+ })
251
+ .filter((entry) => entry.path);
252
+ }
253
+ export async function gitCommitDiffLineEstimate(cwd, sha) {
254
+ if (!sha) {
255
+ throw new Error("invalid_commit");
256
+ }
257
+ const { stdout } = await execGit(cwd, [
258
+ "show",
259
+ "--numstat",
260
+ "--no-ext-diff",
261
+ "--format=",
262
+ sha,
263
+ ]);
264
+ let total = 0;
265
+ for (const line of stdout.split("\n")) {
266
+ const trimmed = line.trim();
267
+ if (!trimmed) {
268
+ continue;
269
+ }
270
+ const [addRaw, delRaw] = trimmed.split("\t");
271
+ if (addRaw === "-" || delRaw === "-") {
272
+ return null;
273
+ }
274
+ const additions = Number.parseInt(addRaw || "0", 10);
275
+ const deletions = Number.parseInt(delRaw || "0", 10);
276
+ const safeAdditions = Number.isFinite(additions) ? additions : 0;
277
+ const safeDeletions = Number.isFinite(deletions) ? deletions : 0;
278
+ total += safeAdditions + safeDeletions;
279
+ }
280
+ return total;
281
+ }
282
+ const parseGitFileList = (value) => value.split("\0").filter((entry) => entry);
283
+ const buildFileTree = (files) => {
284
+ const root = {
285
+ name: "",
286
+ path: "",
287
+ type: "folder",
288
+ children: new Map(),
289
+ };
290
+ for (const filePath of files) {
291
+ const normalized = filePath.replace(/\\/g, "/").replace(/^\/+/, "");
292
+ if (!normalized) {
293
+ continue;
294
+ }
295
+ const parts = normalized.split("/").filter((part) => part);
296
+ let current = root;
297
+ let currentPath = "";
298
+ for (const [index, part] of parts.entries()) {
299
+ const nextPath = currentPath ? `${currentPath}/${part}` : part;
300
+ const isFile = index === parts.length - 1;
301
+ const type = isFile ? "file" : "folder";
302
+ let child = current.children.get(part);
303
+ if (!child) {
304
+ child = {
305
+ name: part,
306
+ path: nextPath,
307
+ type,
308
+ children: new Map(),
309
+ };
310
+ current.children.set(part, child);
311
+ }
312
+ current = child;
313
+ currentPath = nextPath;
314
+ }
315
+ }
316
+ const toEntry = (node) => {
317
+ if (node.type === "file") {
318
+ return {
319
+ name: node.name,
320
+ path: node.path,
321
+ type: node.type,
322
+ };
323
+ }
324
+ const children = Array.from(node.children.values()).map(toEntry);
325
+ children.sort((a, b) => {
326
+ if (a.type !== b.type) {
327
+ return a.type === "folder" ? -1 : 1;
328
+ }
329
+ return a.name.localeCompare(b.name);
330
+ });
331
+ return {
332
+ name: node.name,
333
+ path: node.path,
334
+ type: node.type,
335
+ children,
336
+ };
337
+ };
338
+ return Array.from(root.children.values())
339
+ .map(toEntry)
340
+ .sort((a, b) => {
341
+ if (a.type !== b.type) {
342
+ return a.type === "folder" ? -1 : 1;
343
+ }
344
+ return a.name.localeCompare(b.name);
345
+ });
346
+ };
347
+ export async function gitListFileTree(cwd) {
348
+ const [tracked, untracked] = await Promise.all([
349
+ execGit(cwd, ["ls-files", "-z"]),
350
+ execGit(cwd, ["ls-files", "-z", "--others", "--exclude-standard"]),
351
+ ]);
352
+ const files = new Set([
353
+ ...parseGitFileList(tracked.stdout),
354
+ ...parseGitFileList(untracked.stdout),
355
+ ]);
356
+ return buildFileTree(Array.from(files));
357
+ }
358
+ const DEFAULT_BRANCH_PAGE_SIZE = 30;
359
+ export async function gitListBranches(cwd, options = {}) {
360
+ const { stdout } = await execGit(cwd, [
361
+ "for-each-ref",
362
+ "--sort=-committerdate",
363
+ "--format=%(refname:short)\t%(committerdate:iso8601)",
364
+ "refs/heads",
365
+ ]);
366
+ let branches = stdout
367
+ .split("\n")
368
+ .map((line) => line.trim())
369
+ .filter(Boolean)
370
+ .map((line) => {
371
+ const [name = "", updatedAtRaw] = line.split("\t");
372
+ return {
373
+ name,
374
+ updatedAt: updatedAtRaw || null,
375
+ };
376
+ });
377
+ // Apply filter if provided
378
+ if (options.filter) {
379
+ const filterLower = options.filter.toLowerCase();
380
+ branches = branches.filter((b) => b.name.toLowerCase().includes(filterLower));
381
+ }
382
+ // Apply cursor-based pagination
383
+ if (options.cursor) {
384
+ const cursorIndex = branches.findIndex((b) => b.name === options.cursor);
385
+ if (cursorIndex >= 0) {
386
+ branches = branches.slice(cursorIndex + 1);
387
+ }
388
+ }
389
+ // Apply limit
390
+ const limit = options.limit ?? DEFAULT_BRANCH_PAGE_SIZE;
391
+ return branches.slice(0, limit + 1); // Return one extra to detect hasMore
392
+ }
393
+ export async function gitListBranchesPaginated(cwd, options = {}) {
394
+ const limit = options.limit ?? DEFAULT_BRANCH_PAGE_SIZE;
395
+ const allBranches = await gitListBranches(cwd, options);
396
+ const hasMore = allBranches.length > limit;
397
+ const branches = hasMore ? allBranches.slice(0, limit) : allBranches;
398
+ const nextCursor = hasMore
399
+ ? (branches[branches.length - 1]?.name ?? null)
400
+ : null;
401
+ const currentBranch = await gitCurrentBranch(cwd);
402
+ const fullBranchList = await gitListBranches(cwd, {}); // Full list for default branch detection
403
+ const defaultBranch = await gitDefaultBranch(cwd, fullBranchList, currentBranch);
404
+ return {
405
+ current: currentBranch,
406
+ defaultBranch,
407
+ branches,
408
+ hasMore,
409
+ nextCursor,
410
+ };
411
+ }
412
+ export async function gitCurrentBranch(cwd) {
413
+ const { stdout } = await execGit(cwd, ["rev-parse", "--abbrev-ref", "HEAD"]);
414
+ return stdout.trim();
415
+ }
416
+ export async function gitDefaultBranch(cwd, branches, currentBranch) {
417
+ try {
418
+ const { stdout } = await execGit(cwd, [
419
+ "symbolic-ref",
420
+ "--short",
421
+ "refs/remotes/origin/HEAD",
422
+ ]);
423
+ const raw = stdout.trim();
424
+ const parsed = raw.split("/").pop();
425
+ if (parsed) {
426
+ return parsed;
427
+ }
428
+ }
429
+ catch { }
430
+ const names = new Set(branches.map((branch) => branch.name));
431
+ if (names.has("main")) {
432
+ return "main";
433
+ }
434
+ if (names.has("master")) {
435
+ return "master";
436
+ }
437
+ if (currentBranch && currentBranch !== "HEAD") {
438
+ return currentBranch;
439
+ }
440
+ return branches[0]?.name || "";
441
+ }
442
+ const assertValidBranchName = async (cwd, name) => {
443
+ if (!name) {
444
+ throw new Error("invalid_branch");
445
+ }
446
+ try {
447
+ await execGit(cwd, ["check-ref-format", "--branch", name]);
448
+ }
449
+ catch {
450
+ throw new Error("invalid_branch");
451
+ }
452
+ };
453
+ const branchExists = async (cwd, name) => {
454
+ try {
455
+ await execGit(cwd, [
456
+ "show-ref",
457
+ "--verify",
458
+ "--quiet",
459
+ `refs/heads/${name}`,
460
+ ]);
461
+ return true;
462
+ }
463
+ catch {
464
+ return false;
465
+ }
466
+ };
467
+ export async function gitCheckoutBranch(cwd, name) {
468
+ await assertValidBranchName(cwd, name);
469
+ const exists = await branchExists(cwd, name);
470
+ if (!exists) {
471
+ throw new Error("branch_not_found");
472
+ }
473
+ await execGit(cwd, ["checkout", name]);
474
+ }
475
+ export async function gitCreateBranch(cwd, name) {
476
+ await assertValidBranchName(cwd, name);
477
+ const exists = await branchExists(cwd, name);
478
+ if (exists) {
479
+ throw new Error("branch_exists");
480
+ }
481
+ await execGit(cwd, ["checkout", "-b", name]);
482
+ }
package/dist/http.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export declare function withCors(response: Response): Response;
2
+ export declare function jsonResponse(status: number, payload: unknown): Response;
3
+ export declare function textResponse(status: number, message: string): Response;
4
+ export declare function streamResponse(status: number, stream: ReadableStream<Uint8Array>): Response;
5
+ export declare function optionsResponse(): Response;
6
+ export declare function readJson(req: Request): Promise<unknown>;
7
+ export declare function mapErrorResponse(error: unknown): Response;
package/dist/http.js ADDED
@@ -0,0 +1,98 @@
1
+ import { log } from "./log.js";
2
+ const CORS_HEADERS = {
3
+ "Access-Control-Allow-Origin": "*",
4
+ "Access-Control-Allow-Methods": "GET,POST,PATCH,OPTIONS",
5
+ "Access-Control-Allow-Headers": "Content-Type",
6
+ };
7
+ export function withCors(response) {
8
+ const headers = new Headers(response.headers);
9
+ for (const [key, value] of Object.entries(CORS_HEADERS)) {
10
+ headers.set(key, value);
11
+ }
12
+ return new Response(response.body, {
13
+ status: response.status,
14
+ statusText: response.statusText,
15
+ headers,
16
+ });
17
+ }
18
+ export function jsonResponse(status, payload) {
19
+ const response = new Response(JSON.stringify(payload), {
20
+ status,
21
+ headers: {
22
+ "Content-Type": "application/json; charset=utf-8",
23
+ },
24
+ });
25
+ return withCors(response);
26
+ }
27
+ export function textResponse(status, message) {
28
+ const response = new Response(message, {
29
+ status,
30
+ headers: {
31
+ "Content-Type": "text/plain; charset=utf-8",
32
+ },
33
+ });
34
+ return withCors(response);
35
+ }
36
+ export function streamResponse(status, stream) {
37
+ const response = new Response(stream, {
38
+ status,
39
+ headers: {
40
+ "Content-Type": "text/plain; charset=utf-8",
41
+ },
42
+ });
43
+ return withCors(response);
44
+ }
45
+ export function optionsResponse() {
46
+ return withCors(new Response(null, { status: 204 }));
47
+ }
48
+ export async function readJson(req) {
49
+ const text = await req.text();
50
+ if (!text) {
51
+ return null;
52
+ }
53
+ try {
54
+ return JSON.parse(text);
55
+ }
56
+ catch {
57
+ throw new Error("invalid_json");
58
+ }
59
+ }
60
+ export function mapErrorResponse(error) {
61
+ if (error instanceof Error && error.message === "invalid_json") {
62
+ return jsonResponse(400, { error: "invalid_json" });
63
+ }
64
+ if (error instanceof Error && error.message === "not_a_directory") {
65
+ return jsonResponse(400, { error: "not_a_directory" });
66
+ }
67
+ if (error instanceof Error && error.message === "project_not_found") {
68
+ return jsonResponse(404, { error: "project_not_found" });
69
+ }
70
+ if (error instanceof Error && error.message === "project_required") {
71
+ return jsonResponse(400, { error: "project_required" });
72
+ }
73
+ if (error instanceof Error && error.message === "project_not_git") {
74
+ return jsonResponse(400, { error: "project_not_git" });
75
+ }
76
+ if (error instanceof Error && error.message === "invalid_branch") {
77
+ return jsonResponse(400, { error: "invalid_branch" });
78
+ }
79
+ if (error instanceof Error && error.message === "branch_exists") {
80
+ return jsonResponse(409, { error: "branch_exists" });
81
+ }
82
+ if (error instanceof Error && error.message === "branch_not_found") {
83
+ return jsonResponse(404, { error: "branch_not_found" });
84
+ }
85
+ if (error instanceof Error && error.message === "invalid_path") {
86
+ return jsonResponse(400, { error: "invalid_path" });
87
+ }
88
+ if (error instanceof Error && error.message === "app_server_spawn_failed") {
89
+ return jsonResponse(500, { error: "app_server_spawn_failed" });
90
+ }
91
+ if (error && typeof error === "object" && "code" in error) {
92
+ if (error.code === "ENOENT") {
93
+ return jsonResponse(400, { error: "invalid_path" });
94
+ }
95
+ }
96
+ log.error(error, "Unhandled server error");
97
+ return jsonResponse(500, { error: "server_error" });
98
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Node.js entry point for the diffact server.
3
+ * Uses @hono/node-server for HTTP and ws for WebSocket.
4
+ */
5
+ export {};
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Node.js entry point for the diffact server.
3
+ * Uses @hono/node-server for HTTP and ws for WebSocket.
4
+ */
5
+ import { serve } from "@hono/node-server";
6
+ import { WebSocketServer } from "ws";
7
+ import { app, hub, PORT } from "./index.js";
8
+ import { log } from "./log.js";
9
+ import { openBrowser } from "./open-browser.js";
10
+ import { getStaticDir, isStaticEnabled } from "./static.js";
11
+ // CLI flags
12
+ const NO_OPEN = process.argv.includes("--no-open");
13
+ // Start HTTP server
14
+ const server = serve({
15
+ fetch: app.fetch,
16
+ port: PORT,
17
+ });
18
+ // Attach WebSocket server
19
+ const wss = new WebSocketServer({ server });
20
+ wss.on("connection", (ws) => {
21
+ log.info("ws open (node)");
22
+ const handlers = hub.open();
23
+ // Adapter: convert ws events to Hono-compatible events
24
+ const wsContext = {
25
+ send: (data) => ws.send(data),
26
+ close: () => ws.close(),
27
+ binaryType: "arraybuffer",
28
+ readyState: 1,
29
+ url: "",
30
+ protocol: "",
31
+ };
32
+ ws.on("message", (data) => {
33
+ const message = typeof data === "string" ? data : data.toString("utf8");
34
+ handlers.onMessage?.({ data: message }, wsContext);
35
+ });
36
+ ws.on("close", (code, reason) => {
37
+ handlers.onClose?.({ code, reason: reason.toString("utf8") }, wsContext);
38
+ });
39
+ ws.on("error", (error) => {
40
+ log.error({ err: error }, "ws error (node)");
41
+ });
42
+ handlers.onOpen?.({}, wsContext);
43
+ });
44
+ const url = `http://localhost:${PORT}`;
45
+ log.info(`diffact server (node) listening on ${url}`);
46
+ if (isStaticEnabled()) {
47
+ log.info(`serving static files from ${getStaticDir()}`);
48
+ }
49
+ if (!NO_OPEN && isStaticEnabled()) {
50
+ openBrowser(url);
51
+ }
@@ -0,0 +1,6 @@
1
+ import { Hono } from "hono";
2
+ import { WsHub } from "./ws-hub.js";
3
+ declare const PORT: number;
4
+ declare const hub: WsHub;
5
+ declare const app: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
6
+ export { app, hub, PORT };