@zoer7788/mcp-nexus-node 0.1.6 → 0.1.7
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.
- package/package.json +4 -5
- package/vendor/devspace/dist/cli.js +374 -0
- package/vendor/devspace/dist/config.js +253 -0
- package/vendor/devspace/dist/dashboard.js +545 -0
- package/vendor/devspace/dist/db/client.js +29 -0
- package/vendor/devspace/dist/db/migrations.js +123 -0
- package/vendor/devspace/dist/db/schema.js +52 -0
- package/vendor/devspace/dist/git-worktrees.js +134 -0
- package/vendor/devspace/dist/git.js +41 -0
- package/vendor/devspace/dist/logger.js +69 -0
- package/vendor/devspace/dist/oauth-provider.js +237 -0
- package/vendor/devspace/dist/oauth-store.js +138 -0
- package/vendor/devspace/dist/pi-tools.js +81 -0
- package/vendor/devspace/dist/review-checkpoints.js +142 -0
- package/vendor/devspace/dist/roots.js +34 -0
- package/vendor/devspace/dist/server.js +1204 -0
- package/vendor/devspace/dist/skills.js +45 -0
- package/vendor/devspace/dist/ui/.vite/manifest.json +2520 -0
- package/vendor/devspace/dist/ui/assets/abap-CLvhMVsD.js +1 -0
- package/vendor/devspace/dist/ui/assets/actionscript-3--17pq3dv.js +1 -0
- package/vendor/devspace/dist/ui/assets/ada-C5qYipkI.js +1 -0
- package/vendor/devspace/dist/ui/assets/andromeeda-vGVdxbeo.js +1 -0
- package/vendor/devspace/dist/ui/assets/angular-html-Dj4LysSE.js +1 -0
- package/vendor/devspace/dist/ui/assets/angular-ts-CxuC_FFh.js +1 -0
- package/vendor/devspace/dist/ui/assets/apache-U0d_L8uA.js +1 -0
- package/vendor/devspace/dist/ui/assets/apex-CGTLDQj6.js +1 -0
- package/vendor/devspace/dist/ui/assets/apl-RwuvNFFo.js +1 -0
- package/vendor/devspace/dist/ui/assets/applescript-CCn79oCD.js +1 -0
- package/vendor/devspace/dist/ui/assets/ara-4CJ0cIlV.js +1 -0
- package/vendor/devspace/dist/ui/assets/asciidoc-DE70LPWp.js +1 -0
- package/vendor/devspace/dist/ui/assets/asm-Cmm7eHzH.js +1 -0
- package/vendor/devspace/dist/ui/assets/astro-ncoaUbsO.js +1 -0
- package/vendor/devspace/dist/ui/assets/aurora-x-CDeNXAV0.js +1 -0
- package/vendor/devspace/dist/ui/assets/awk-BWXHIvNe.js +1 -0
- package/vendor/devspace/dist/ui/assets/ayu-dark-DluEY0Gj.js +1 -0
- package/vendor/devspace/dist/ui/assets/ayu-light-C3h-C4tm.js +1 -0
- package/vendor/devspace/dist/ui/assets/ayu-mirage-Bqwy1Gya.js +1 -0
- package/vendor/devspace/dist/ui/assets/ballerina-B7ZEbQpA.js +1 -0
- package/vendor/devspace/dist/ui/assets/bat-Bo4NYOV-.js +1 -0
- package/vendor/devspace/dist/ui/assets/beancount-D-usSTwE.js +1 -0
- package/vendor/devspace/dist/ui/assets/berry-DKpUyyne.js +1 -0
- package/vendor/devspace/dist/ui/assets/bibtex-Ci_nEsc7.js +1 -0
- package/vendor/devspace/dist/ui/assets/bicep-CUHmPFLl.js +1 -0
- package/vendor/devspace/dist/ui/assets/bird2-C2hNVINV.js +1 -0
- package/vendor/devspace/dist/ui/assets/blade-Dw8-Lzux.js +1 -0
- package/vendor/devspace/dist/ui/assets/bsl-BkkzgIyY.js +1 -0
- package/vendor/devspace/dist/ui/assets/c-Dpbbo_f2.js +1 -0
- package/vendor/devspace/dist/ui/assets/c3-CnJL0r0V.js +1 -0
- package/vendor/devspace/dist/ui/assets/cadence-CQ2zXKGN.js +1 -0
- package/vendor/devspace/dist/ui/assets/cairo-DLTphjLi.js +1 -0
- package/vendor/devspace/dist/ui/assets/catppuccin-frappe-3VR1Za6u.js +1 -0
- package/vendor/devspace/dist/ui/assets/catppuccin-latte-DwIHMF0Q.js +1 -0
- package/vendor/devspace/dist/ui/assets/catppuccin-macchiato-DYnBP6_5.js +1 -0
- package/vendor/devspace/dist/ui/assets/catppuccin-mocha-DYhrFGRu.js +1 -0
- package/vendor/devspace/dist/ui/assets/clarity-SemFz856.js +1 -0
- package/vendor/devspace/dist/ui/assets/clojure-DqKBuwfJ.js +1 -0
- package/vendor/devspace/dist/ui/assets/cmake-Bj61d0ZC.js +1 -0
- package/vendor/devspace/dist/ui/assets/cobol-4ddX3THy.js +1 -0
- package/vendor/devspace/dist/ui/assets/codeowners-C8r90Shi.js +1 -0
- package/vendor/devspace/dist/ui/assets/codeql-oeQT6MSM.js +1 -0
- package/vendor/devspace/dist/ui/assets/coffee-Bn-a5KqK.js +1 -0
- package/vendor/devspace/dist/ui/assets/common-lisp-Cv5bFMCO.js +1 -0
- package/vendor/devspace/dist/ui/assets/coq-BrsZFFmf.js +1 -0
- package/vendor/devspace/dist/ui/assets/cpp-DoRrlM_T.js +1 -0
- package/vendor/devspace/dist/ui/assets/crystal-DiZfCxn-.js +1 -0
- package/vendor/devspace/dist/ui/assets/csharp-Ct8U2NOr.js +1 -0
- package/vendor/devspace/dist/ui/assets/css-DiQoSjDH.js +1 -0
- package/vendor/devspace/dist/ui/assets/csv-Dx-8-gkx.js +1 -0
- package/vendor/devspace/dist/ui/assets/cue-CE9AQfxI.js +1 -0
- package/vendor/devspace/dist/ui/assets/cypher-ClKdZ_lG.js +1 -0
- package/vendor/devspace/dist/ui/assets/d-qD-0Kul2.js +1 -0
- package/vendor/devspace/dist/ui/assets/dark-plus-Cs2F2srj.js +1 -0
- package/vendor/devspace/dist/ui/assets/dart-DkHntEIa.js +1 -0
- package/vendor/devspace/dist/ui/assets/dax-BkyTk9wS.js +1 -0
- package/vendor/devspace/dist/ui/assets/desktop-Dlh5hvp9.js +1 -0
- package/vendor/devspace/dist/ui/assets/diff-woXpYk--.js +1 -0
- package/vendor/devspace/dist/ui/assets/docker-IyjqRm3v.js +1 -0
- package/vendor/devspace/dist/ui/assets/dotenv-_5a1GRtc.js +1 -0
- package/vendor/devspace/dist/ui/assets/dracula-BHWKrbxM.js +1 -0
- package/vendor/devspace/dist/ui/assets/dracula-soft-5eyTD99u.js +1 -0
- package/vendor/devspace/dist/ui/assets/dream-maker-DW3nJb8Q.js +1 -0
- package/vendor/devspace/dist/ui/assets/edge-wEhCUoEt.js +1 -0
- package/vendor/devspace/dist/ui/assets/elixir-C3obhm0H.js +1 -0
- package/vendor/devspace/dist/ui/assets/elm-DyTBfh1L.js +1 -0
- package/vendor/devspace/dist/ui/assets/emacs-lisp-C9PiwqqW.js +1 -0
- package/vendor/devspace/dist/ui/assets/erb-f4TnXRuY.js +1 -0
- package/vendor/devspace/dist/ui/assets/erlang-Cphh6RMH.js +1 -0
- package/vendor/devspace/dist/ui/assets/everforest-dark-sB-x3p7T.js +1 -0
- package/vendor/devspace/dist/ui/assets/everforest-light-Df2xbC6M.js +1 -0
- package/vendor/devspace/dist/ui/assets/fennel-DQxkIbk2.js +1 -0
- package/vendor/devspace/dist/ui/assets/fish-BJitypiv.js +1 -0
- package/vendor/devspace/dist/ui/assets/fluent-C03EYrpw.js +1 -0
- package/vendor/devspace/dist/ui/assets/fortran-fixed-form-DEKoE2YW.js +1 -0
- package/vendor/devspace/dist/ui/assets/fortran-free-form-CYNrtFtB.js +1 -0
- package/vendor/devspace/dist/ui/assets/fsharp-D13ZGOAj.js +1 -0
- package/vendor/devspace/dist/ui/assets/gdresource-C0sCabJj.js +1 -0
- package/vendor/devspace/dist/ui/assets/gdscript-Cp2uCuqX.js +1 -0
- package/vendor/devspace/dist/ui/assets/gdshader-CBce3t8t.js +1 -0
- package/vendor/devspace/dist/ui/assets/genie-CV2tkWYe.js +1 -0
- package/vendor/devspace/dist/ui/assets/gherkin-DExj1W_8.js +1 -0
- package/vendor/devspace/dist/ui/assets/git-commit-BSykSTBG.js +1 -0
- package/vendor/devspace/dist/ui/assets/git-rebase-vhZbWNfp.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-dark-C-LZuMrd.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-dark-default-DXG-b-1a.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-light-EUqPIrTm.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-light-default-BXViO-2h.js +1 -0
- package/vendor/devspace/dist/ui/assets/github-light-high-contrast-B68TUdTA.js +1 -0
- package/vendor/devspace/dist/ui/assets/gleam-CSRkHgEL.js +1 -0
- package/vendor/devspace/dist/ui/assets/glimmer-js-BG7puL6Y.js +1 -0
- package/vendor/devspace/dist/ui/assets/glimmer-ts-CNCfLLL1.js +1 -0
- package/vendor/devspace/dist/ui/assets/glsl-DhT76AL5.js +1 -0
- package/vendor/devspace/dist/ui/assets/gn-ilITqXS6.js +1 -0
- package/vendor/devspace/dist/ui/assets/gnuplot-7GGW24-e.js +1 -0
- package/vendor/devspace/dist/ui/assets/go-BJwz_mda.js +1 -0
- package/vendor/devspace/dist/ui/assets/graphql-CJX08w8y.js +1 -0
- package/vendor/devspace/dist/ui/assets/groovy-CacY0gHj.js +1 -0
- package/vendor/devspace/dist/ui/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
- package/vendor/devspace/dist/ui/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
- package/vendor/devspace/dist/ui/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
- package/vendor/devspace/dist/ui/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
- package/vendor/devspace/dist/ui/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
- package/vendor/devspace/dist/ui/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
- package/vendor/devspace/dist/ui/assets/hack-DY4NGCCL.js +1 -0
- package/vendor/devspace/dist/ui/assets/haml-DwSkmVcG.js +1 -0
- package/vendor/devspace/dist/ui/assets/handlebars-CQ_1dEmi.js +1 -0
- package/vendor/devspace/dist/ui/assets/haskell-D8IpX4py.js +1 -0
- package/vendor/devspace/dist/ui/assets/haxe-OTjmBuCE.js +1 -0
- package/vendor/devspace/dist/ui/assets/hcl-Dh228itO.js +1 -0
- package/vendor/devspace/dist/ui/assets/heavy-payload-2rGBiitA.js +4 -0
- package/vendor/devspace/dist/ui/assets/hjson-CxZEssPk.js +1 -0
- package/vendor/devspace/dist/ui/assets/hlsl-Cvrh5tZx.js +1 -0
- package/vendor/devspace/dist/ui/assets/horizon-CE9ld1lL.js +1 -0
- package/vendor/devspace/dist/ui/assets/horizon-bright-Br1oVSNq.js +1 -0
- package/vendor/devspace/dist/ui/assets/houston-CsvMBhTu.js +1 -0
- package/vendor/devspace/dist/ui/assets/html-B_e3Njif.js +1 -0
- package/vendor/devspace/dist/ui/assets/html-derivative-_nHZ_Bk-.js +1 -0
- package/vendor/devspace/dist/ui/assets/http-CfcvPIru.js +1 -0
- package/vendor/devspace/dist/ui/assets/hurl-9vWDQIMO.js +1 -0
- package/vendor/devspace/dist/ui/assets/hxml-B0Qn7Nwc.js +1 -0
- package/vendor/devspace/dist/ui/assets/hy-CZbG8q4J.js +1 -0
- package/vendor/devspace/dist/ui/assets/imba-DsUTQ-LC.js +1 -0
- package/vendor/devspace/dist/ui/assets/ini-B5eOa1yu.js +1 -0
- package/vendor/devspace/dist/ui/assets/java-C4S5r6L5.js +1 -0
- package/vendor/devspace/dist/ui/assets/javascript-BRwqbMMC.js +1 -0
- package/vendor/devspace/dist/ui/assets/jinja-DHxzMMc5.js +1 -0
- package/vendor/devspace/dist/ui/assets/jison-B1DqeWXb.js +1 -0
- package/vendor/devspace/dist/ui/assets/json-DcFTkEdd.js +1 -0
- package/vendor/devspace/dist/ui/assets/json5-BR5RXkoi.js +1 -0
- package/vendor/devspace/dist/ui/assets/jsonc-CYpm1nAK.js +1 -0
- package/vendor/devspace/dist/ui/assets/jsonl-CmCQp5Yx.js +1 -0
- package/vendor/devspace/dist/ui/assets/jsonnet-CJTPZ8u_.js +1 -0
- package/vendor/devspace/dist/ui/assets/jssm-DXw9l8Rf.js +1 -0
- package/vendor/devspace/dist/ui/assets/jsx-DgfmYa9f.js +1 -0
- package/vendor/devspace/dist/ui/assets/julia-3M8SJ8iF.js +1 -0
- package/vendor/devspace/dist/ui/assets/just-UyH7_DNz.js +1 -0
- package/vendor/devspace/dist/ui/assets/kanagawa-dragon-CXtmUGW6.js +1 -0
- package/vendor/devspace/dist/ui/assets/kanagawa-lotus-BN08jTvb.js +1 -0
- package/vendor/devspace/dist/ui/assets/kanagawa-wave-CTweb8Dz.js +1 -0
- package/vendor/devspace/dist/ui/assets/kdl-CsD5j6eV.js +1 -0
- package/vendor/devspace/dist/ui/assets/kotlin-DhhofPvG.js +1 -0
- package/vendor/devspace/dist/ui/assets/kusto-BUv0MjJC.js +1 -0
- package/vendor/devspace/dist/ui/assets/laserwave-C_8bwKvT.js +1 -0
- package/vendor/devspace/dist/ui/assets/latex-wUbha6EX.js +1 -0
- package/vendor/devspace/dist/ui/assets/lean-CewbzKMR.js +1 -0
- package/vendor/devspace/dist/ui/assets/less-DVTAwKKz.js +1 -0
- package/vendor/devspace/dist/ui/assets/light-plus-DVQuIRkW.js +1 -0
- package/vendor/devspace/dist/ui/assets/liquid-DqNTB9kN.js +1 -0
- package/vendor/devspace/dist/ui/assets/llvm-Cm23YOpf.js +1 -0
- package/vendor/devspace/dist/ui/assets/log-BNLmms1o.js +1 -0
- package/vendor/devspace/dist/ui/assets/logo-Cluzi2Zq.js +1 -0
- package/vendor/devspace/dist/ui/assets/lua-DrEQ1QTW.js +1 -0
- package/vendor/devspace/dist/ui/assets/luau-CNKltnaQ.js +1 -0
- package/vendor/devspace/dist/ui/assets/make-Dixweg8N.js +1 -0
- package/vendor/devspace/dist/ui/assets/markdown-BYOwaDjH.js +1 -0
- package/vendor/devspace/dist/ui/assets/marko-B3GJw9Md.js +1 -0
- package/vendor/devspace/dist/ui/assets/material-theme-Bm3Qr25_.js +1 -0
- package/vendor/devspace/dist/ui/assets/material-theme-darker-2IIEA8gg.js +1 -0
- package/vendor/devspace/dist/ui/assets/material-theme-lighter-uhdI0v04.js +1 -0
- package/vendor/devspace/dist/ui/assets/material-theme-ocean-CHQ94UKr.js +1 -0
- package/vendor/devspace/dist/ui/assets/material-theme-palenight-B5W6OYN7.js +1 -0
- package/vendor/devspace/dist/ui/assets/matlab-D7qyCx1q.js +1 -0
- package/vendor/devspace/dist/ui/assets/mdc-BnThk82m.js +1 -0
- package/vendor/devspace/dist/ui/assets/mdx-DQZ5AkYe.js +1 -0
- package/vendor/devspace/dist/ui/assets/mermaid-Bk4SNUv9.js +1 -0
- package/vendor/devspace/dist/ui/assets/min-dark-BSWPekZh.js +1 -0
- package/vendor/devspace/dist/ui/assets/min-light-DDpmG2fV.js +1 -0
- package/vendor/devspace/dist/ui/assets/mipsasm-BMqwQI7S.js +1 -0
- package/vendor/devspace/dist/ui/assets/mojo-BgCJLMeH.js +1 -0
- package/vendor/devspace/dist/ui/assets/monokai-CdkpiU2Y.js +1 -0
- package/vendor/devspace/dist/ui/assets/moonbit-CaWjb8XO.js +1 -0
- package/vendor/devspace/dist/ui/assets/move-B1IS1UjX.js +1 -0
- package/vendor/devspace/dist/ui/assets/narrat-_X_XdTYD.js +1 -0
- package/vendor/devspace/dist/ui/assets/nextflow-Bbiyy34d.js +1 -0
- package/vendor/devspace/dist/ui/assets/nextflow-groovy-Dc_ddanL.js +1 -0
- package/vendor/devspace/dist/ui/assets/nginx-B5IeSsOX.js +1 -0
- package/vendor/devspace/dist/ui/assets/night-owl-DhmEMT88.js +1 -0
- package/vendor/devspace/dist/ui/assets/night-owl-light-eJ-hLW7d.js +1 -0
- package/vendor/devspace/dist/ui/assets/nim-BJraatnS.js +1 -0
- package/vendor/devspace/dist/ui/assets/nix-IvuFDN5E.js +1 -0
- package/vendor/devspace/dist/ui/assets/nord-Cb4Vim4T.js +1 -0
- package/vendor/devspace/dist/ui/assets/nushell-DcLAeLz5.js +1 -0
- package/vendor/devspace/dist/ui/assets/objective-c-D1A_Heim.js +1 -0
- package/vendor/devspace/dist/ui/assets/objective-cpp-BsSzOQcm.js +1 -0
- package/vendor/devspace/dist/ui/assets/ocaml-O90oeIOV.js +1 -0
- package/vendor/devspace/dist/ui/assets/odin-B1RWQWA5.js +1 -0
- package/vendor/devspace/dist/ui/assets/one-dark-pro-CLwyXe_n.js +1 -0
- package/vendor/devspace/dist/ui/assets/one-light-D7Lr4KcI.js +1 -0
- package/vendor/devspace/dist/ui/assets/openscad-BUDT5pXO.js +1 -0
- package/vendor/devspace/dist/ui/assets/pascal-4ZHwLPI5.js +1 -0
- package/vendor/devspace/dist/ui/assets/perl-BAhrR4gt.js +1 -0
- package/vendor/devspace/dist/ui/assets/php-BKRCk_wX.js +1 -0
- package/vendor/devspace/dist/ui/assets/pierre-dark-sU4Zdns8.js +1 -0
- package/vendor/devspace/dist/ui/assets/pierre-dark-soft-HXgun5vs.js +1 -0
- package/vendor/devspace/dist/ui/assets/pierre-light-DWBk51d8.js +1 -0
- package/vendor/devspace/dist/ui/assets/pierre-light-soft-CodEzPxf.js +1 -0
- package/vendor/devspace/dist/ui/assets/pkl-ot-7Btpt.js +1 -0
- package/vendor/devspace/dist/ui/assets/plastic-DQwYfKfQ.js +1 -0
- package/vendor/devspace/dist/ui/assets/plsql-DGHpHOYJ.js +1 -0
- package/vendor/devspace/dist/ui/assets/po-BiJDBrnU.js +1 -0
- package/vendor/devspace/dist/ui/assets/poimandres-DRFjx7u4.js +1 -0
- package/vendor/devspace/dist/ui/assets/polar-C7UOKdEL.js +1 -0
- package/vendor/devspace/dist/ui/assets/postcss-BXeXVLqQ.js +1 -0
- package/vendor/devspace/dist/ui/assets/powerquery-DNMTfnFr.js +1 -0
- package/vendor/devspace/dist/ui/assets/powershell-DshXNtvi.js +1 -0
- package/vendor/devspace/dist/ui/assets/prisma-BsRQq5mF.js +1 -0
- package/vendor/devspace/dist/ui/assets/prolog-iXnhIJG7.js +1 -0
- package/vendor/devspace/dist/ui/assets/proto-DB4EqR-F.js +1 -0
- package/vendor/devspace/dist/ui/assets/pug-B8gmSV7z.js +1 -0
- package/vendor/devspace/dist/ui/assets/puppet-CDv2pdJW.js +1 -0
- package/vendor/devspace/dist/ui/assets/purescript-9MfHhQsQ.js +1 -0
- package/vendor/devspace/dist/ui/assets/python-gzcpVVnB.js +1 -0
- package/vendor/devspace/dist/ui/assets/qml-DKrxIjHR.js +1 -0
- package/vendor/devspace/dist/ui/assets/qmldir-DCQb3MpD.js +1 -0
- package/vendor/devspace/dist/ui/assets/qss-Fe1Jh2GI.js +1 -0
- package/vendor/devspace/dist/ui/assets/r-YASBZvTH.js +1 -0
- package/vendor/devspace/dist/ui/assets/racket-DcIDlBhZ.js +1 -0
- package/vendor/devspace/dist/ui/assets/raku-B3gFvitq.js +1 -0
- package/vendor/devspace/dist/ui/assets/razor-P-XFZqh6.js +1 -0
- package/vendor/devspace/dist/ui/assets/red-CJ3rzSJv.js +1 -0
- package/vendor/devspace/dist/ui/assets/reg-CRGYupPL.js +1 -0
- package/vendor/devspace/dist/ui/assets/regexp-CCpiH6nO.js +1 -0
- package/vendor/devspace/dist/ui/assets/rel-BtDbiS_P.js +1 -0
- package/vendor/devspace/dist/ui/assets/review-payload-BLYwg6t8.js +1 -0
- package/vendor/devspace/dist/ui/assets/riscv-Ckw8ddFX.js +1 -0
- package/vendor/devspace/dist/ui/assets/ron-VUp2lXgN.js +1 -0
- package/vendor/devspace/dist/ui/assets/rose-pine-BthvhNj6.js +1 -0
- package/vendor/devspace/dist/ui/assets/rose-pine-dawn-Dg85fqjY.js +1 -0
- package/vendor/devspace/dist/ui/assets/rose-pine-moon-hon4tzzS.js +1 -0
- package/vendor/devspace/dist/ui/assets/rosmsg-CAekHB0j.js +1 -0
- package/vendor/devspace/dist/ui/assets/rst-CFAzckbn.js +1 -0
- package/vendor/devspace/dist/ui/assets/ruby-Dyp_Rx-S.js +1 -0
- package/vendor/devspace/dist/ui/assets/rust-Cfkwpbl8.js +1 -0
- package/vendor/devspace/dist/ui/assets/sas-YkWZIXxT.js +1 -0
- package/vendor/devspace/dist/ui/assets/sass-DXrisJhu.js +1 -0
- package/vendor/devspace/dist/ui/assets/scala-DKOlJaKm.js +1 -0
- package/vendor/devspace/dist/ui/assets/scheme-DQCgrYNe.js +1 -0
- package/vendor/devspace/dist/ui/assets/scss-Cf89idGl.js +1 -0
- package/vendor/devspace/dist/ui/assets/sdbl-bTVj8UrX.js +1 -0
- package/vendor/devspace/dist/ui/assets/shaderlab-TOUzSsQk.js +1 -0
- package/vendor/devspace/dist/ui/assets/shellscript-BFMb52q8.js +1 -0
- package/vendor/devspace/dist/ui/assets/shellsession-DuthW-5v.js +1 -0
- package/vendor/devspace/dist/ui/assets/slack-dark-DnToyrRv.js +1 -0
- package/vendor/devspace/dist/ui/assets/slack-ochin-B2OO5cIa.js +1 -0
- package/vendor/devspace/dist/ui/assets/smalltalk-B16xEiuN.js +1 -0
- package/vendor/devspace/dist/ui/assets/snazzy-light-4G7pJPwS.js +1 -0
- package/vendor/devspace/dist/ui/assets/solarized-dark-DV17i1UV.js +1 -0
- package/vendor/devspace/dist/ui/assets/solarized-light-DSh2HLQt.js +1 -0
- package/vendor/devspace/dist/ui/assets/solidity-CKzVLygQ.js +1 -0
- package/vendor/devspace/dist/ui/assets/soy-BohVVlJU.js +1 -0
- package/vendor/devspace/dist/ui/assets/sparql-D_iOobhT.js +1 -0
- package/vendor/devspace/dist/ui/assets/splunk-BC2Px7Mm.js +1 -0
- package/vendor/devspace/dist/ui/assets/sql-CnK9R2Gt.js +1 -0
- package/vendor/devspace/dist/ui/assets/ssh-config-BgfXC-Er.js +1 -0
- package/vendor/devspace/dist/ui/assets/stata-D-sV4Vbr.js +1 -0
- package/vendor/devspace/dist/ui/assets/stylus-B6D30XZt.js +1 -0
- package/vendor/devspace/dist/ui/assets/surrealql-ChAy0gHv.js +1 -0
- package/vendor/devspace/dist/ui/assets/svelte-3HBVqG-H.js +1 -0
- package/vendor/devspace/dist/ui/assets/swift-DonLKvLd.js +1 -0
- package/vendor/devspace/dist/ui/assets/synthwave-84-nFMaYfgc.js +1 -0
- package/vendor/devspace/dist/ui/assets/system-verilog-DJ5XKQeo.js +1 -0
- package/vendor/devspace/dist/ui/assets/systemd-BxMlprV5.js +1 -0
- package/vendor/devspace/dist/ui/assets/talonscript-CohzipZa.js +1 -0
- package/vendor/devspace/dist/ui/assets/tasl-DMoTqEGO.js +1 -0
- package/vendor/devspace/dist/ui/assets/tcl-CZd0xW_V.js +1 -0
- package/vendor/devspace/dist/ui/assets/templ-BixlV4Cp.js +1 -0
- package/vendor/devspace/dist/ui/assets/terraform-DswuEJGm.js +1 -0
- package/vendor/devspace/dist/ui/assets/tex-DWoJKHvD.js +1 -0
- package/vendor/devspace/dist/ui/assets/tokyo-night-oM2G3aXe.js +1 -0
- package/vendor/devspace/dist/ui/assets/toml-CcmNWLt0.js +1 -0
- package/vendor/devspace/dist/ui/assets/ts-tags-DLA8eH13.js +1 -0
- package/vendor/devspace/dist/ui/assets/tsv-sltzmVWM.js +1 -0
- package/vendor/devspace/dist/ui/assets/tsx-BYWa5JUz.js +1 -0
- package/vendor/devspace/dist/ui/assets/turtle-ByJddavk.js +1 -0
- package/vendor/devspace/dist/ui/assets/twig-CnY65vAo.js +1 -0
- package/vendor/devspace/dist/ui/assets/typescript-ByInUsro.js +1 -0
- package/vendor/devspace/dist/ui/assets/typespec-B88KGewJ.js +1 -0
- package/vendor/devspace/dist/ui/assets/typst-DI99ib-x.js +1 -0
- package/vendor/devspace/dist/ui/assets/useFileDiffInstance-Dg0pWcJV.js +244 -0
- package/vendor/devspace/dist/ui/assets/v-DETTlOr0.js +1 -0
- package/vendor/devspace/dist/ui/assets/vala-zf12oZj6.js +1 -0
- package/vendor/devspace/dist/ui/assets/vb-Djn5o6TS.js +1 -0
- package/vendor/devspace/dist/ui/assets/verilog-CiiDBU1e.js +1 -0
- package/vendor/devspace/dist/ui/assets/vesper-D5bVUKB1.js +1 -0
- package/vendor/devspace/dist/ui/assets/vhdl-BroJfC0k.js +1 -0
- package/vendor/devspace/dist/ui/assets/viml-DvXPmvsu.js +1 -0
- package/vendor/devspace/dist/ui/assets/vitesse-black-fwtXNY1n.js +1 -0
- package/vendor/devspace/dist/ui/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/vendor/devspace/dist/ui/assets/vitesse-light-VbXTXTou.js +1 -0
- package/vendor/devspace/dist/ui/assets/vue-Qngt2rkz.js +1 -0
- package/vendor/devspace/dist/ui/assets/vue-html-DDue9upr.js +1 -0
- package/vendor/devspace/dist/ui/assets/vue-vine-DBcAKsA6.js +1 -0
- package/vendor/devspace/dist/ui/assets/vyper-CgoNMtux.js +1 -0
- package/vendor/devspace/dist/ui/assets/wasm-BnjxR4X6.js +1 -0
- package/vendor/devspace/dist/ui/assets/wasm-ByWQv1Qj.js +1 -0
- package/vendor/devspace/dist/ui/assets/wenyan-C8pVoKbM.js +1 -0
- package/vendor/devspace/dist/ui/assets/wgsl-BsKzXJz4.js +1 -0
- package/vendor/devspace/dist/ui/assets/wikitext-ClFFjSW2.js +1 -0
- package/vendor/devspace/dist/ui/assets/wit-DdvCle-K.js +1 -0
- package/vendor/devspace/dist/ui/assets/wolfram-DLL8P-h_.js +1 -0
- package/vendor/devspace/dist/ui/assets/workspace-app-DGD9R89D.css +1 -0
- package/vendor/devspace/dist/ui/assets/workspace-app-DuzpU4Hf.js +118 -0
- package/vendor/devspace/dist/ui/assets/xml-CRLR5jiL.js +1 -0
- package/vendor/devspace/dist/ui/assets/xsl-CmcwyXbm.js +1 -0
- package/vendor/devspace/dist/ui/assets/yaml-Dpe6Eg-k.js +1 -0
- package/vendor/devspace/dist/ui/assets/zenscript-BnlCZFoB.js +1 -0
- package/vendor/devspace/dist/ui/assets/zig-CMLA9XwU.js +1 -0
- package/vendor/devspace/dist/ui/workspace-app.html +15 -0
- package/vendor/devspace/dist/user-config.js +57 -0
- package/vendor/devspace/dist/workspace-store.js +75 -0
- package/vendor/devspace/dist/workspaces.js +226 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { InvalidRequestError } from "@modelcontextprotocol/sdk/server/auth/errors.js";
|
|
3
|
+
import { openDatabase } from "./db/client.js";
|
|
4
|
+
function redirectHostAllowed(redirectUri, allowedHosts) {
|
|
5
|
+
let parsed;
|
|
6
|
+
try {
|
|
7
|
+
parsed = new URL(redirectUri);
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
if (["localhost", "127.0.0.1", "[::1]"].includes(parsed.hostname))
|
|
13
|
+
return true;
|
|
14
|
+
return allowedHosts.includes(parsed.hostname);
|
|
15
|
+
}
|
|
16
|
+
export class SqliteOAuthStore {
|
|
17
|
+
database;
|
|
18
|
+
constructor(stateDir) {
|
|
19
|
+
this.database = openDatabase(stateDir);
|
|
20
|
+
this.deleteExpiredTokens(Math.floor(Date.now() / 1000));
|
|
21
|
+
}
|
|
22
|
+
getClient(clientId) {
|
|
23
|
+
const row = this.database.sqlite
|
|
24
|
+
.prepare("select client_json from oauth_clients where client_id = ?")
|
|
25
|
+
.get(clientId);
|
|
26
|
+
return row ? JSON.parse(row.client_json) : undefined;
|
|
27
|
+
}
|
|
28
|
+
registerClient(client, allowedRedirectHosts) {
|
|
29
|
+
if (!client.redirect_uris.every((uri) => redirectHostAllowed(String(uri), allowedRedirectHosts))) {
|
|
30
|
+
throw new InvalidRequestError("Client redirect_uri is not allowed for this DevSpace server");
|
|
31
|
+
}
|
|
32
|
+
const now = Math.floor(Date.now() / 1000);
|
|
33
|
+
const registered = {
|
|
34
|
+
...client,
|
|
35
|
+
client_id: `devspace-${randomUUID()}`,
|
|
36
|
+
client_id_issued_at: now,
|
|
37
|
+
token_endpoint_auth_method: client.token_endpoint_auth_method ?? "none",
|
|
38
|
+
grant_types: client.grant_types ?? ["authorization_code", "refresh_token"],
|
|
39
|
+
response_types: client.response_types ?? ["code"],
|
|
40
|
+
};
|
|
41
|
+
this.database.sqlite
|
|
42
|
+
.prepare("insert into oauth_clients (client_id, client_json, issued_at) values (?, ?, ?)")
|
|
43
|
+
.run(registered.client_id, JSON.stringify(registered), now);
|
|
44
|
+
return registered;
|
|
45
|
+
}
|
|
46
|
+
saveAccessToken(tokenHash, record) {
|
|
47
|
+
this.database.sqlite
|
|
48
|
+
.prepare(`insert into oauth_access_tokens (token_hash, client_id, scopes_json, expires_at, resource)
|
|
49
|
+
values (?, ?, ?, ?, ?)
|
|
50
|
+
on conflict(token_hash) do update set
|
|
51
|
+
client_id = excluded.client_id,
|
|
52
|
+
scopes_json = excluded.scopes_json,
|
|
53
|
+
expires_at = excluded.expires_at,
|
|
54
|
+
resource = excluded.resource`)
|
|
55
|
+
.run(tokenHash, record.clientId, JSON.stringify(record.scopes), record.expiresAt, record.resource ?? null);
|
|
56
|
+
}
|
|
57
|
+
getAccessToken(tokenHash) {
|
|
58
|
+
const row = this.database.sqlite
|
|
59
|
+
.prepare("select client_id, scopes_json, expires_at, resource from oauth_access_tokens where token_hash = ?")
|
|
60
|
+
.get(tokenHash);
|
|
61
|
+
return row ? rowToAccessTokenRecord(row) : undefined;
|
|
62
|
+
}
|
|
63
|
+
deleteAccessToken(tokenHash) {
|
|
64
|
+
this.database.sqlite.prepare("delete from oauth_access_tokens where token_hash = ?").run(tokenHash);
|
|
65
|
+
}
|
|
66
|
+
saveRefreshToken(tokenHash, record) {
|
|
67
|
+
this.database.sqlite
|
|
68
|
+
.prepare(`insert into oauth_refresh_tokens (token_hash, client_id, scopes_json, expires_at, resource)
|
|
69
|
+
values (?, ?, ?, ?, ?)
|
|
70
|
+
on conflict(token_hash) do update set
|
|
71
|
+
client_id = excluded.client_id,
|
|
72
|
+
scopes_json = excluded.scopes_json,
|
|
73
|
+
expires_at = excluded.expires_at,
|
|
74
|
+
resource = excluded.resource`)
|
|
75
|
+
.run(tokenHash, record.clientId, JSON.stringify(record.scopes), record.expiresAt, record.resource ?? null);
|
|
76
|
+
}
|
|
77
|
+
saveTokenPair(pair, consumedRefreshTokenHash) {
|
|
78
|
+
const save = this.database.sqlite.transaction(() => {
|
|
79
|
+
if (consumedRefreshTokenHash) {
|
|
80
|
+
const result = this.database.sqlite
|
|
81
|
+
.prepare("delete from oauth_refresh_tokens where token_hash = ?")
|
|
82
|
+
.run(consumedRefreshTokenHash);
|
|
83
|
+
if (result.changes !== 1)
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
this.saveAccessToken(pair.accessTokenHash, pair.accessToken);
|
|
87
|
+
this.saveRefreshToken(pair.refreshTokenHash, pair.refreshToken);
|
|
88
|
+
return true;
|
|
89
|
+
});
|
|
90
|
+
return save.immediate();
|
|
91
|
+
}
|
|
92
|
+
getRefreshToken(tokenHash) {
|
|
93
|
+
const row = this.database.sqlite
|
|
94
|
+
.prepare("select client_id, scopes_json, expires_at, resource from oauth_refresh_tokens where token_hash = ?")
|
|
95
|
+
.get(tokenHash);
|
|
96
|
+
return row ? rowToRefreshTokenRecord(row) : undefined;
|
|
97
|
+
}
|
|
98
|
+
deleteRefreshToken(tokenHash) {
|
|
99
|
+
this.database.sqlite.prepare("delete from oauth_refresh_tokens where token_hash = ?").run(tokenHash);
|
|
100
|
+
}
|
|
101
|
+
close() {
|
|
102
|
+
this.database.close();
|
|
103
|
+
}
|
|
104
|
+
deleteExpiredTokens(nowSeconds) {
|
|
105
|
+
this.database.sqlite.prepare("delete from oauth_access_tokens where expires_at < ?").run(nowSeconds);
|
|
106
|
+
this.database.sqlite.prepare("delete from oauth_refresh_tokens where expires_at < ?").run(nowSeconds);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export class SqliteOAuthClientsStore {
|
|
110
|
+
store;
|
|
111
|
+
allowedRedirectHosts;
|
|
112
|
+
constructor(store, allowedRedirectHosts) {
|
|
113
|
+
this.store = store;
|
|
114
|
+
this.allowedRedirectHosts = allowedRedirectHosts;
|
|
115
|
+
}
|
|
116
|
+
getClient(clientId) {
|
|
117
|
+
return this.store.getClient(clientId);
|
|
118
|
+
}
|
|
119
|
+
registerClient(client) {
|
|
120
|
+
return this.store.registerClient(client, this.allowedRedirectHosts);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function rowToAccessTokenRecord(row) {
|
|
124
|
+
return {
|
|
125
|
+
clientId: row.client_id,
|
|
126
|
+
scopes: JSON.parse(row.scopes_json),
|
|
127
|
+
expiresAt: row.expires_at,
|
|
128
|
+
resource: row.resource ?? undefined,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function rowToRefreshTokenRecord(row) {
|
|
132
|
+
return {
|
|
133
|
+
clientId: row.client_id,
|
|
134
|
+
scopes: JSON.parse(row.scopes_json),
|
|
135
|
+
expiresAt: row.expires_at,
|
|
136
|
+
resource: row.resource ?? undefined,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createBashTool, createEditTool, createFindTool, createGrepTool, createLsTool, createReadTool, createWriteTool, } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { resolveAllowedPath } from "./roots.js";
|
|
3
|
+
function toMcpContent(result) {
|
|
4
|
+
return result.content.map((content) => {
|
|
5
|
+
if (content.type === "text") {
|
|
6
|
+
return { type: "text", text: content.text };
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
type: "image",
|
|
10
|
+
data: content.data,
|
|
11
|
+
mimeType: content.mimeType,
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function formatToolError(error) {
|
|
16
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
17
|
+
return [{ type: "text", text: message }];
|
|
18
|
+
}
|
|
19
|
+
async function runTool(execute, input, context) {
|
|
20
|
+
try {
|
|
21
|
+
const result = await execute(input);
|
|
22
|
+
return {
|
|
23
|
+
content: toMcpContent(result),
|
|
24
|
+
details: result.details,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
return { content: formatToolError(error), isError: true };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export async function readFileTool(input, context) {
|
|
32
|
+
const path = resolveAllowedPath(input.path, context.cwd, context.readRoots ?? [context.root]);
|
|
33
|
+
const tool = createReadTool(context.cwd);
|
|
34
|
+
return runTool((params) => tool.execute("read_file", params), {
|
|
35
|
+
path,
|
|
36
|
+
offset: input.offset,
|
|
37
|
+
limit: input.limit,
|
|
38
|
+
}, context);
|
|
39
|
+
}
|
|
40
|
+
export async function writeFileTool(input, context) {
|
|
41
|
+
const path = resolveAllowedPath(input.path, context.cwd, [context.root]);
|
|
42
|
+
const tool = createWriteTool(context.cwd);
|
|
43
|
+
return runTool((params) => tool.execute("write_file", params), {
|
|
44
|
+
path,
|
|
45
|
+
content: input.content,
|
|
46
|
+
}, context);
|
|
47
|
+
}
|
|
48
|
+
export async function editFileTool(input, context) {
|
|
49
|
+
const path = resolveAllowedPath(input.path, context.cwd, [context.root]);
|
|
50
|
+
const tool = createEditTool(context.cwd);
|
|
51
|
+
return runTool((params) => tool.execute("edit_file", params), {
|
|
52
|
+
path,
|
|
53
|
+
edits: input.edits,
|
|
54
|
+
}, context);
|
|
55
|
+
}
|
|
56
|
+
export async function grepFilesTool(input, context) {
|
|
57
|
+
if (input.path)
|
|
58
|
+
resolveAllowedPath(input.path, context.cwd, [context.root]);
|
|
59
|
+
const tool = createGrepTool(context.cwd);
|
|
60
|
+
return runTool((params) => tool.execute("grep_files", params), input, context);
|
|
61
|
+
}
|
|
62
|
+
export async function findFilesTool(input, context) {
|
|
63
|
+
if (input.path)
|
|
64
|
+
resolveAllowedPath(input.path, context.cwd, [context.root]);
|
|
65
|
+
const tool = createFindTool(context.cwd);
|
|
66
|
+
return runTool((params) => tool.execute("find_files", params), input, context);
|
|
67
|
+
}
|
|
68
|
+
export async function listDirectoryTool(input, context) {
|
|
69
|
+
if (input.path)
|
|
70
|
+
resolveAllowedPath(input.path, context.cwd, [context.root]);
|
|
71
|
+
const tool = createLsTool(context.cwd);
|
|
72
|
+
return runTool((params) => tool.execute("list_directory", params), input, context);
|
|
73
|
+
}
|
|
74
|
+
export async function runShellTool(input, context) {
|
|
75
|
+
const tool = createBashTool(context.cwd);
|
|
76
|
+
const timeout = input.timeout === undefined ? 30 : Math.min(input.timeout, 300);
|
|
77
|
+
return runTool((params) => tool.execute("run_shell", params), {
|
|
78
|
+
command: input.command,
|
|
79
|
+
timeout,
|
|
80
|
+
}, context);
|
|
81
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { git, getGitEligibility, safeWorkspaceRefSegment } from "./git.js";
|
|
5
|
+
const REVIEW_REF_PREFIX = "refs/devspace/review";
|
|
6
|
+
export function createReviewCheckpointManager() {
|
|
7
|
+
const states = new Map();
|
|
8
|
+
return {
|
|
9
|
+
async initializeWorkspace({ workspaceId, root }) {
|
|
10
|
+
const refs = reviewRefs(workspaceId);
|
|
11
|
+
const state = { root, ...refs };
|
|
12
|
+
states.set(workspaceId, state);
|
|
13
|
+
try {
|
|
14
|
+
const eligibility = await getGitEligibility(root);
|
|
15
|
+
if (!eligibility.ok || !eligibility.gitRoot) {
|
|
16
|
+
state.diagnostic = eligibility.message ?? "show_changes requires a Git workspace in this version.";
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
state.gitRoot = eligibility.gitRoot;
|
|
20
|
+
const commit = await createWorkingTreeSnapshot(eligibility.gitRoot);
|
|
21
|
+
await git(eligibility.gitRoot, ["update-ref", state.openRef, commit]);
|
|
22
|
+
await git(eligibility.gitRoot, ["update-ref", state.baselineRef, commit]);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
state.diagnostic = error instanceof Error ? error.message : String(error);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
async reviewChanges({ workspaceId, root, since = "last_shown", markReviewed = true }) {
|
|
29
|
+
let state = states.get(workspaceId);
|
|
30
|
+
if (!state) {
|
|
31
|
+
await this.initializeWorkspace({ workspaceId, root });
|
|
32
|
+
state = states.get(workspaceId);
|
|
33
|
+
}
|
|
34
|
+
if (!state?.gitRoot) {
|
|
35
|
+
throw new Error(state?.diagnostic ?? "show_changes requires a Git workspace in this version.");
|
|
36
|
+
}
|
|
37
|
+
const baselineRef = since === "workspace_open" ? state.openRef : state.baselineRef;
|
|
38
|
+
const baseline = (await git(state.gitRoot, ["rev-parse", "--verify", `${baselineRef}^{commit}`])).stdout.trim();
|
|
39
|
+
const current = await createWorkingTreeSnapshot(state.gitRoot);
|
|
40
|
+
const patch = (await git(state.gitRoot, ["diff", "--binary", "--no-color", baseline, current], {
|
|
41
|
+
maxBuffer: 50 * 1024 * 1024,
|
|
42
|
+
})).stdout;
|
|
43
|
+
const numstat = (await git(state.gitRoot, ["diff", "--numstat", "-z", baseline, current], {
|
|
44
|
+
maxBuffer: 50 * 1024 * 1024,
|
|
45
|
+
})).stdout;
|
|
46
|
+
const files = parseNumstat(numstat);
|
|
47
|
+
const summary = summarizeFiles(files);
|
|
48
|
+
if (markReviewed) {
|
|
49
|
+
await git(state.gitRoot, ["update-ref", state.baselineRef, current]);
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
result: summary.files === 0
|
|
53
|
+
? `No changes since ${since === "workspace_open" ? "workspace open" : "last shown changes"}.`
|
|
54
|
+
: `Changed ${summary.files} ${summary.files === 1 ? "file" : "files"} (+${summary.additions} -${summary.removals}).`,
|
|
55
|
+
summary,
|
|
56
|
+
files,
|
|
57
|
+
patch,
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function reviewRefs(workspaceId) {
|
|
63
|
+
const segment = safeWorkspaceRefSegment(workspaceId);
|
|
64
|
+
return {
|
|
65
|
+
openRef: `${REVIEW_REF_PREFIX}/${segment}/open`,
|
|
66
|
+
baselineRef: `${REVIEW_REF_PREFIX}/${segment}/baseline`,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
async function createWorkingTreeSnapshot(gitRoot) {
|
|
70
|
+
const tempDir = await mkdtemp(join(tmpdir(), "devspace-review-index-"));
|
|
71
|
+
const indexPath = join(tempDir, "index");
|
|
72
|
+
const env = checkpointEnv(indexPath);
|
|
73
|
+
try {
|
|
74
|
+
await git(gitRoot, ["read-tree", "HEAD"], { env });
|
|
75
|
+
await git(gitRoot, ["add", "-A", "--", "."], { env });
|
|
76
|
+
const tree = (await git(gitRoot, ["write-tree"], { env })).stdout.trim();
|
|
77
|
+
const parent = (await git(gitRoot, ["rev-parse", "--verify", "HEAD^{commit}"])).stdout.trim();
|
|
78
|
+
return (await git(gitRoot, ["commit-tree", tree, "-p", parent, "-m", "DevSpace review snapshot"], { env })).stdout.trim();
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function checkpointEnv(indexPath) {
|
|
85
|
+
return {
|
|
86
|
+
GIT_INDEX_FILE: indexPath,
|
|
87
|
+
GIT_AUTHOR_NAME: "DevSpace",
|
|
88
|
+
GIT_AUTHOR_EMAIL: "devspace@users.noreply.local",
|
|
89
|
+
GIT_COMMITTER_NAME: "DevSpace",
|
|
90
|
+
GIT_COMMITTER_EMAIL: "devspace@users.noreply.local",
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function parseNumstat(output) {
|
|
94
|
+
const fields = output.split("\0").filter((field) => field.length > 0);
|
|
95
|
+
const files = [];
|
|
96
|
+
for (let index = 0; index < fields.length;) {
|
|
97
|
+
const header = fields[index++] ?? "";
|
|
98
|
+
const parts = header.split("\t");
|
|
99
|
+
const additions = parseStatNumber(parts[0]);
|
|
100
|
+
const removals = parseStatNumber(parts[1]);
|
|
101
|
+
if (parts.length >= 3) {
|
|
102
|
+
const path = parts[2] ?? "";
|
|
103
|
+
if (path)
|
|
104
|
+
files.push({ path, type: fileType(path, undefined, additions, removals), additions, removals });
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const previousPath = fields[index++];
|
|
108
|
+
const path = fields[index++];
|
|
109
|
+
if (!path)
|
|
110
|
+
continue;
|
|
111
|
+
files.push({
|
|
112
|
+
path,
|
|
113
|
+
previousPath,
|
|
114
|
+
type: fileType(path, previousPath, additions, removals),
|
|
115
|
+
additions,
|
|
116
|
+
removals,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return files;
|
|
120
|
+
}
|
|
121
|
+
function parseStatNumber(value) {
|
|
122
|
+
if (!value || value === "-")
|
|
123
|
+
return 0;
|
|
124
|
+
const parsed = Number(value);
|
|
125
|
+
return Number.isFinite(parsed) ? parsed : 0;
|
|
126
|
+
}
|
|
127
|
+
function fileType(path, previousPath, additions, removals) {
|
|
128
|
+
if (previousPath)
|
|
129
|
+
return additions === 0 && removals === 0 ? "rename-pure" : "rename-changed";
|
|
130
|
+
if (additions > 0 && removals === 0)
|
|
131
|
+
return "new";
|
|
132
|
+
if (additions === 0 && removals > 0)
|
|
133
|
+
return "deleted";
|
|
134
|
+
return "change";
|
|
135
|
+
}
|
|
136
|
+
function summarizeFiles(files) {
|
|
137
|
+
return files.reduce((summary, file) => ({
|
|
138
|
+
files: summary.files + 1,
|
|
139
|
+
additions: summary.additions + file.additions,
|
|
140
|
+
removals: summary.removals + file.removals,
|
|
141
|
+
}), { files: 0, additions: 0, removals: 0 });
|
|
142
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { relative, resolve, sep } from "node:path";
|
|
3
|
+
export class AccessDeniedError extends Error {
|
|
4
|
+
constructor(message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = "AccessDeniedError";
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export function expandHomePath(path) {
|
|
10
|
+
if (path === "~")
|
|
11
|
+
return homedir();
|
|
12
|
+
if (path.startsWith("~/") || path.startsWith("~\\")) {
|
|
13
|
+
return resolve(homedir(), path.slice(2));
|
|
14
|
+
}
|
|
15
|
+
return path;
|
|
16
|
+
}
|
|
17
|
+
export function isPathInsideRoot(path, root) {
|
|
18
|
+
const resolvedPath = resolve(expandHomePath(path));
|
|
19
|
+
const resolvedRoot = resolve(expandHomePath(root));
|
|
20
|
+
const relationship = relative(resolvedRoot, resolvedPath);
|
|
21
|
+
return (relationship === "" ||
|
|
22
|
+
(!relationship.startsWith("..") && relationship !== ".." && !relationship.includes(`..${sep}`)));
|
|
23
|
+
}
|
|
24
|
+
export function assertAllowedPath(path, allowedRoots) {
|
|
25
|
+
const resolvedPath = resolve(expandHomePath(path));
|
|
26
|
+
if (allowedRoots.some((root) => isPathInsideRoot(resolvedPath, root))) {
|
|
27
|
+
return resolvedPath;
|
|
28
|
+
}
|
|
29
|
+
throw new AccessDeniedError(`Path is outside allowed roots: ${path}`);
|
|
30
|
+
}
|
|
31
|
+
export function resolveAllowedPath(inputPath, cwd, allowedRoots) {
|
|
32
|
+
const absolutePath = resolve(cwd, inputPath);
|
|
33
|
+
return assertAllowedPath(absolutePath, allowedRoots);
|
|
34
|
+
}
|