@p4code/cli 0.0.29
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/LICENSE +21 -0
- package/dist/BunPtyAdapter-DogtLQSx.mjs +122 -0
- package/dist/NodePtyAdapter-CS1weRcq.mjs +118 -0
- package/dist/NodeSqliteClient-BUlNQAY0.mjs +191 -0
- package/dist/PtyAdapter-DO4FyE0R.mjs +54 -0
- package/dist/bin.mjs +78161 -0
- package/dist/client/apple-touch-icon.png +0 -0
- package/dist/client/assets/DiffPanel-ISmUh6EE.js +98 -0
- package/dist/client/assets/FilePreviewPanel-CYqEF-Ly.js +1778 -0
- package/dist/client/assets/PreviewPanel-CXM2ps-_.js +2 -0
- package/dist/client/assets/abap-CLvhMVsD.js +2 -0
- package/dist/client/assets/actionscript-3--17pq3dv.js +2 -0
- package/dist/client/assets/ada-C5qYipkI.js +2 -0
- package/dist/client/assets/andromeeda-WkhI09AS.js +2 -0
- package/dist/client/assets/andromeeda-vGVdxbeo.js +2 -0
- package/dist/client/assets/angular-html-DNsrGRc9.js +2 -0
- package/dist/client/assets/angular-ts-C6-plvuT.js +2 -0
- package/dist/client/assets/apache-U0d_L8uA.js +2 -0
- package/dist/client/assets/apex-VAyPSnFM.js +2 -0
- package/dist/client/assets/apl-VqfbyG85.js +2 -0
- package/dist/client/assets/applescript-CCn79oCD.js +2 -0
- package/dist/client/assets/ara-4CJ0cIlV.js +2 -0
- package/dist/client/assets/arrow-right-DursbRoR.js +2 -0
- package/dist/client/assets/asciidoc-DE70LPWp.js +2 -0
- package/dist/client/assets/asm-Cmm7eHzH.js +2 -0
- package/dist/client/assets/astro-8YYimDdZ.js +2 -0
- package/dist/client/assets/aurora-x-C7CFqhAd.js +2 -0
- package/dist/client/assets/aurora-x-CDeNXAV0.js +2 -0
- package/dist/client/assets/awk-BWXHIvNe.js +2 -0
- package/dist/client/assets/ayu-dark-CRu61w6_.js +2 -0
- package/dist/client/assets/ayu-dark-DluEY0Gj.js +2 -0
- package/dist/client/assets/ayu-light-C3h-C4tm.js +2 -0
- package/dist/client/assets/ayu-light-Dn6O_aYR.js +2 -0
- package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +2 -0
- package/dist/client/assets/ayu-mirage-CTjYAbs-.js +2 -0
- package/dist/client/assets/ballerina-B7ZEbQpA.js +2 -0
- package/dist/client/assets/bat-Bo4NYOV-.js +2 -0
- package/dist/client/assets/beancount-D-usSTwE.js +2 -0
- package/dist/client/assets/berry-DKpUyyne.js +2 -0
- package/dist/client/assets/bibtex-Ci_nEsc7.js +2 -0
- package/dist/client/assets/bicep-CUHmPFLl.js +2 -0
- package/dist/client/assets/bird2-C6vDhewU.js +2 -0
- package/dist/client/assets/blade-CzBZSrIV.js +2 -0
- package/dist/client/assets/bsl-BkkzgIyY.js +2 -0
- package/dist/client/assets/c-CNPMmwne.js +2 -0
- package/dist/client/assets/c3-BFHwR3_K.js +2 -0
- package/dist/client/assets/cadence-CQ2zXKGN.js +2 -0
- package/dist/client/assets/cairo-DLTphjLi.js +2 -0
- package/dist/client/assets/catppuccin-frappe-3VR1Za6u.js +2 -0
- package/dist/client/assets/catppuccin-frappe-DFlFW5gh.js +2 -0
- package/dist/client/assets/catppuccin-latte-CpxdcXpJ.js +2 -0
- package/dist/client/assets/catppuccin-latte-DwIHMF0Q.js +2 -0
- package/dist/client/assets/catppuccin-macchiato-DIdIQ04K.js +2 -0
- package/dist/client/assets/catppuccin-macchiato-DYnBP6_5.js +2 -0
- package/dist/client/assets/catppuccin-mocha-Co3Xjl64.js +2 -0
- package/dist/client/assets/catppuccin-mocha-DYhrFGRu.js +2 -0
- package/dist/client/assets/clarity-SemFz856.js +2 -0
- package/dist/client/assets/clojure-DqKBuwfJ.js +2 -0
- package/dist/client/assets/cmake-Bj61d0ZC.js +2 -0
- package/dist/client/assets/cobol-86pJcKMz.js +2 -0
- package/dist/client/assets/codeowners-C8r90Shi.js +2 -0
- package/dist/client/assets/codeql-oeQT6MSM.js +2 -0
- package/dist/client/assets/coffee-CGkeiuBX.js +2 -0
- package/dist/client/assets/common-lisp-Cv5bFMCO.js +2 -0
- package/dist/client/assets/coq-BrsZFFmf.js +2 -0
- package/dist/client/assets/cpp-B8k9jaKZ.js +2 -0
- package/dist/client/assets/crystal-Dx8rl20L.js +2 -0
- package/dist/client/assets/csharp-oqKa8noW.js +2 -0
- package/dist/client/assets/css-2puI5lgX.js +2 -0
- package/dist/client/assets/csv-Dx-8-gkx.js +2 -0
- package/dist/client/assets/cue-CE9AQfxI.js +2 -0
- package/dist/client/assets/cypher-ClKdZ_lG.js +2 -0
- package/dist/client/assets/d-qD-0Kul2.js +2 -0
- package/dist/client/assets/dark-plus-Cs2F2srj.js +2 -0
- package/dist/client/assets/dark-plus-GAt2ZgX8.js +2 -0
- package/dist/client/assets/dart-CnvKMtbv.js +2 -0
- package/dist/client/assets/dax-BkyTk9wS.js +2 -0
- package/dist/client/assets/desktop-Dlh5hvp9.js +2 -0
- package/dist/client/assets/diff-woXpYk--.js +2 -0
- package/dist/client/assets/dm-sans-latin-ext-wght-normal-BOFOeGcA.woff2 +0 -0
- package/dist/client/assets/dm-sans-latin-wght-normal-Xz1IZZA0.woff2 +0 -0
- package/dist/client/assets/docker-IyjqRm3v.js +2 -0
- package/dist/client/assets/dotenv-_5a1GRtc.js +2 -0
- package/dist/client/assets/dracula-BHWKrbxM.js +2 -0
- package/dist/client/assets/dracula-C2uKkzgK.js +2 -0
- package/dist/client/assets/dracula-soft-5eyTD99u.js +2 -0
- package/dist/client/assets/dracula-soft-D1bVjxWZ.js +2 -0
- package/dist/client/assets/dream-maker-DW3nJb8Q.js +2 -0
- package/dist/client/assets/edge-D4FUIorq.js +2 -0
- package/dist/client/assets/elixir-BRtF9YiH.js +2 -0
- package/dist/client/assets/elm-BNdqh0xn.js +2 -0
- package/dist/client/assets/emacs-lisp-B4R74twV.js +2 -0
- package/dist/client/assets/erb-QiZUayOm.js +2 -0
- package/dist/client/assets/erlang-Cphh6RMH.js +2 -0
- package/dist/client/assets/everforest-dark-D-DlICQR.js +2 -0
- package/dist/client/assets/everforest-dark-sB-x3p7T.js +2 -0
- package/dist/client/assets/everforest-light-CeVdGHYG.js +2 -0
- package/dist/client/assets/everforest-light-Df2xbC6M.js +2 -0
- package/dist/client/assets/fennel-DQxkIbk2.js +2 -0
- package/dist/client/assets/fileCommentAnnotations-_ckxu-Nq.js +2 -0
- package/dist/client/assets/fish-BJitypiv.js +2 -0
- package/dist/client/assets/fluent-C03EYrpw.js +2 -0
- package/dist/client/assets/fortran-fixed-form-DEKoE2YW.js +2 -0
- package/dist/client/assets/fortran-free-form-CYNrtFtB.js +2 -0
- package/dist/client/assets/fsharp-D13ZGOAj.js +2 -0
- package/dist/client/assets/gdresource-C0sCabJj.js +2 -0
- package/dist/client/assets/gdscript-Cp2uCuqX.js +2 -0
- package/dist/client/assets/gdshader-CBce3t8t.js +2 -0
- package/dist/client/assets/genie-CV2tkWYe.js +2 -0
- package/dist/client/assets/gherkin-DExj1W_8.js +2 -0
- package/dist/client/assets/git-commit-BSykSTBG.js +2 -0
- package/dist/client/assets/git-rebase-FjYcYaMh.js +2 -0
- package/dist/client/assets/github-dark-C-LZuMrd.js +2 -0
- package/dist/client/assets/github-dark-DwbbXv51.js +2 -0
- package/dist/client/assets/github-dark-default-CxjRwzl6.js +2 -0
- package/dist/client/assets/github-dark-default-DXG-b-1a.js +2 -0
- package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +2 -0
- package/dist/client/assets/github-dark-dimmed-Cr1oaoul.js +2 -0
- package/dist/client/assets/github-dark-high-contrast-B4qJZLZa.js +2 -0
- package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +2 -0
- package/dist/client/assets/github-light-CsVXhIlR.js +2 -0
- package/dist/client/assets/github-light-EUqPIrTm.js +2 -0
- package/dist/client/assets/github-light-default-BXViO-2h.js +2 -0
- package/dist/client/assets/github-light-default-DB_IwZa6.js +2 -0
- package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +2 -0
- package/dist/client/assets/github-light-high-contrast-DLgVeSB-.js +2 -0
- package/dist/client/assets/gleam-CSRkHgEL.js +2 -0
- package/dist/client/assets/glimmer-js-D-mQJ6qV.js +2 -0
- package/dist/client/assets/glimmer-ts-alq8R4io.js +2 -0
- package/dist/client/assets/glsl-Dd1BHD7z.js +2 -0
- package/dist/client/assets/gn-ilITqXS6.js +2 -0
- package/dist/client/assets/gnuplot-7GGW24-e.js +2 -0
- package/dist/client/assets/go-rLFTqkRN.js +2 -0
- package/dist/client/assets/graphql-CcSmOucl.js +2 -0
- package/dist/client/assets/groovy-CacY0gHj.js +2 -0
- package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +2 -0
- package/dist/client/assets/gruvbox-dark-hard-DXm60lX3.js +2 -0
- package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +2 -0
- package/dist/client/assets/gruvbox-dark-medium-GE2thSmD.js +2 -0
- package/dist/client/assets/gruvbox-dark-soft-04Cj-4VZ.js +2 -0
- package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +2 -0
- package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +2 -0
- package/dist/client/assets/gruvbox-light-hard-K6wSn29D.js +2 -0
- package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +2 -0
- package/dist/client/assets/gruvbox-light-medium-CVy3aSlc.js +2 -0
- package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +2 -0
- package/dist/client/assets/gruvbox-light-soft-DNgJjaY0.js +2 -0
- package/dist/client/assets/hack-1D68uw0q.js +2 -0
- package/dist/client/assets/haml-CCJx-f9Y.js +2 -0
- package/dist/client/assets/handlebars-BTmd7K38.js +2 -0
- package/dist/client/assets/haskell-D8IpX4py.js +2 -0
- package/dist/client/assets/haxe-OTjmBuCE.js +2 -0
- package/dist/client/assets/hcl-Dh228itO.js +2 -0
- package/dist/client/assets/hjson-CxZEssPk.js +2 -0
- package/dist/client/assets/hlsl-Cvrh5tZx.js +2 -0
- package/dist/client/assets/horizon-0-RkHfro.js +2 -0
- package/dist/client/assets/horizon-CE9ld1lL.js +2 -0
- package/dist/client/assets/horizon-bright-BgL2X9oq.js +2 -0
- package/dist/client/assets/horizon-bright-DSNQnXHK.js +2 -0
- package/dist/client/assets/houston-CsvMBhTu.js +2 -0
- package/dist/client/assets/houston-KyjWKfuY.js +2 -0
- package/dist/client/assets/html-OwAg4yxZ.js +2 -0
- package/dist/client/assets/html-derivative-CfSpQJVI.js +2 -0
- package/dist/client/assets/http-D-zv8Dkv.js +2 -0
- package/dist/client/assets/hurl-C_9QVrls.js +2 -0
- package/dist/client/assets/hxml-B0Qn7Nwc.js +2 -0
- package/dist/client/assets/hy-CZbG8q4J.js +2 -0
- package/dist/client/assets/imba-DsUTQ-LC.js +2 -0
- package/dist/client/assets/index-D1nhcl1-.js +581 -0
- package/dist/client/assets/index-Dv7jVqzc.css +1 -0
- package/dist/client/assets/ini-B5eOa1yu.js +2 -0
- package/dist/client/assets/java-CphFez3D.js +2 -0
- package/dist/client/assets/javascript-CuhWhnHV.js +2 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/client/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/client/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/client/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/client/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/client/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/client/assets/jinja-QC4NTfW8.js +2 -0
- package/dist/client/assets/jison-D2UaLeRw.js +2 -0
- package/dist/client/assets/json-B_6EXKs9.js +2 -0
- package/dist/client/assets/json5-BR5RXkoi.js +2 -0
- package/dist/client/assets/jsonc-CYpm1nAK.js +2 -0
- package/dist/client/assets/jsonl-CmCQp5Yx.js +2 -0
- package/dist/client/assets/jsonnet-CJTPZ8u_.js +2 -0
- package/dist/client/assets/jssm-DXw9l8Rf.js +2 -0
- package/dist/client/assets/jsx-BKePIkG8.js +2 -0
- package/dist/client/assets/julia-DOXGRp4q.js +2 -0
- package/dist/client/assets/just-dysLm0XN.js +2 -0
- package/dist/client/assets/kanagawa-dragon-7TqgsUPC.js +2 -0
- package/dist/client/assets/kanagawa-dragon-CXtmUGW6.js +2 -0
- package/dist/client/assets/kanagawa-lotus-BN08jTvb.js +2 -0
- package/dist/client/assets/kanagawa-lotus-CqxMQulh.js +2 -0
- package/dist/client/assets/kanagawa-wave-CTweb8Dz.js +2 -0
- package/dist/client/assets/kanagawa-wave-D8CNn6T_.js +2 -0
- package/dist/client/assets/kdl-CsD5j6eV.js +2 -0
- package/dist/client/assets/kotlin-DhhofPvG.js +2 -0
- package/dist/client/assets/kusto-C7mF5XQf.js +2 -0
- package/dist/client/assets/laserwave-CQkdhozh.js +2 -0
- package/dist/client/assets/laserwave-C_8bwKvT.js +2 -0
- package/dist/client/assets/latex-DKJgwkV8.js +2 -0
- package/dist/client/assets/lean-CewbzKMR.js +2 -0
- package/dist/client/assets/less-DVTAwKKz.js +2 -0
- package/dist/client/assets/light-plus-CNQ8_7Y0.js +2 -0
- package/dist/client/assets/light-plus-DVQuIRkW.js +2 -0
- package/dist/client/assets/liquid-B2BaWaG_.js +2 -0
- package/dist/client/assets/llvm-Cm23YOpf.js +2 -0
- package/dist/client/assets/log-BNLmms1o.js +2 -0
- package/dist/client/assets/logo-Cluzi2Zq.js +2 -0
- package/dist/client/assets/lua-Dl0oNuDI.js +2 -0
- package/dist/client/assets/luau-FMPmPwt6.js +2 -0
- package/dist/client/assets/make-Dixweg8N.js +2 -0
- package/dist/client/assets/markdown-BYOwaDjH.js +2 -0
- package/dist/client/assets/marko-ZYdRdmRt.js +2 -0
- package/dist/client/assets/material-theme-Bm3Qr25_.js +2 -0
- package/dist/client/assets/material-theme-CAtLaHa3.js +2 -0
- package/dist/client/assets/material-theme-darker-2IIEA8gg.js +2 -0
- package/dist/client/assets/material-theme-darker-k-s5Bc6K.js +2 -0
- package/dist/client/assets/material-theme-lighter-CD6a-c4d.js +2 -0
- package/dist/client/assets/material-theme-lighter-uhdI0v04.js +2 -0
- package/dist/client/assets/material-theme-ocean-B3mraInd.js +2 -0
- package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +2 -0
- package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +2 -0
- package/dist/client/assets/material-theme-palenight-DEhAARHw.js +2 -0
- package/dist/client/assets/matlab-D7qyCx1q.js +2 -0
- package/dist/client/assets/mdc-BT4iz0CW.js +2 -0
- package/dist/client/assets/mdx-DQZ5AkYe.js +2 -0
- package/dist/client/assets/mermaid-Bk4SNUv9.js +2 -0
- package/dist/client/assets/min-dark-BFqTAwCr.js +2 -0
- package/dist/client/assets/min-dark-BSWPekZh.js +2 -0
- package/dist/client/assets/min-light-DDpmG2fV.js +2 -0
- package/dist/client/assets/min-light-O7UdaaxX.js +2 -0
- package/dist/client/assets/mipsasm-BMqwQI7S.js +2 -0
- package/dist/client/assets/mojo-BgCJLMeH.js +2 -0
- package/dist/client/assets/monokai-C0p7Qecz.js +2 -0
- package/dist/client/assets/monokai-CdkpiU2Y.js +2 -0
- package/dist/client/assets/moonbit-CaWjb8XO.js +2 -0
- package/dist/client/assets/move-B1IS1UjX.js +2 -0
- package/dist/client/assets/narrat-_X_XdTYD.js +2 -0
- package/dist/client/assets/nextflow-BJtWHP5T.js +2 -0
- package/dist/client/assets/nextflow-groovy-DJMQeKeT.js +2 -0
- package/dist/client/assets/nginx-BMG7_x1D.js +2 -0
- package/dist/client/assets/night-owl-BsnCLAKc.js +2 -0
- package/dist/client/assets/night-owl-DhmEMT88.js +2 -0
- package/dist/client/assets/night-owl-light-BODRhcTU.js +2 -0
- package/dist/client/assets/night-owl-light-eJ-hLW7d.js +2 -0
- package/dist/client/assets/nim-HSz65QwX.js +2 -0
- package/dist/client/assets/nix-IvuFDN5E.js +2 -0
- package/dist/client/assets/nord-Cb4Vim4T.js +2 -0
- package/dist/client/assets/nord-Cd-F4txO.js +2 -0
- package/dist/client/assets/nushell-DcLAeLz5.js +2 -0
- package/dist/client/assets/objective-c-D1A_Heim.js +2 -0
- package/dist/client/assets/objective-cpp-BsSzOQcm.js +2 -0
- package/dist/client/assets/ocaml-O90oeIOV.js +2 -0
- package/dist/client/assets/odin-B1RWQWA5.js +2 -0
- package/dist/client/assets/one-dark-pro-CLwyXe_n.js +2 -0
- package/dist/client/assets/one-dark-pro-DUS_IGRK.js +2 -0
- package/dist/client/assets/one-light-CVUd7yD5.js +2 -0
- package/dist/client/assets/one-light-D7Lr4KcI.js +2 -0
- package/dist/client/assets/openscad-BUDT5pXO.js +2 -0
- package/dist/client/assets/pascal-4ZHwLPI5.js +2 -0
- package/dist/client/assets/perl-K3PESIyz.js +2 -0
- package/dist/client/assets/php-CbSsTKrV.js +2 -0
- package/dist/client/assets/pierre-dark-sU4Zdns8.js +2 -0
- package/dist/client/assets/pierre-dark-soft-HXgun5vs.js +2 -0
- package/dist/client/assets/pierre-dark-vibrant-D4RhcSIK.js +2 -0
- package/dist/client/assets/pierre-light-DWBk51d8.js +2 -0
- package/dist/client/assets/pierre-light-soft-CodEzPxf.js +2 -0
- package/dist/client/assets/pierre-light-vibrant-B76X7i5Y.js +2 -0
- package/dist/client/assets/pkl-ot-7Btpt.js +2 -0
- package/dist/client/assets/plastic-CF8VZTnn.js +2 -0
- package/dist/client/assets/plastic-DQwYfKfQ.js +2 -0
- package/dist/client/assets/plsql-DGHpHOYJ.js +2 -0
- package/dist/client/assets/po-BiJDBrnU.js +2 -0
- package/dist/client/assets/poimandres-BX2TyY6j.js +2 -0
- package/dist/client/assets/poimandres-DRFjx7u4.js +2 -0
- package/dist/client/assets/polar-C7UOKdEL.js +2 -0
- package/dist/client/assets/postcss-BXeXVLqQ.js +2 -0
- package/dist/client/assets/powerquery-DNMTfnFr.js +2 -0
- package/dist/client/assets/powershell-DshXNtvi.js +2 -0
- package/dist/client/assets/prisma-BsRQq5mF.js +2 -0
- package/dist/client/assets/prolog-iXnhIJG7.js +2 -0
- package/dist/client/assets/proto-DB4EqR-F.js +2 -0
- package/dist/client/assets/pug-DVfkpZFq.js +2 -0
- package/dist/client/assets/puppet-CDv2pdJW.js +2 -0
- package/dist/client/assets/purescript-9MfHhQsQ.js +2 -0
- package/dist/client/assets/python-gzcpVVnB.js +2 -0
- package/dist/client/assets/qml-Bi7irMPq.js +2 -0
- package/dist/client/assets/qmldir-DCQb3MpD.js +2 -0
- package/dist/client/assets/qss-Fe1Jh2GI.js +2 -0
- package/dist/client/assets/r-C1yhio2_.js +2 -0
- package/dist/client/assets/racket-DcIDlBhZ.js +2 -0
- package/dist/client/assets/raku-B3gFvitq.js +2 -0
- package/dist/client/assets/razor-CWmmhrPd.js +2 -0
- package/dist/client/assets/red-7ga_dcKu.js +2 -0
- package/dist/client/assets/red-CJ3rzSJv.js +2 -0
- package/dist/client/assets/reg-CRGYupPL.js +2 -0
- package/dist/client/assets/regexp-BDALIP0p.js +2 -0
- package/dist/client/assets/rel-BtDbiS_P.js +2 -0
- package/dist/client/assets/riscv-Ckw8ddFX.js +2 -0
- package/dist/client/assets/ron-VUp2lXgN.js +2 -0
- package/dist/client/assets/rose-pine-BthvhNj6.js +2 -0
- package/dist/client/assets/rose-pine-dawn-DSuRaP6u.js +2 -0
- package/dist/client/assets/rose-pine-dawn-Dg85fqjY.js +2 -0
- package/dist/client/assets/rose-pine-moon-DdHjCvFQ.js +2 -0
- package/dist/client/assets/rose-pine-moon-hon4tzzS.js +2 -0
- package/dist/client/assets/rose-pine-rh6ipraJ.js +2 -0
- package/dist/client/assets/rosmsg-CAekHB0j.js +2 -0
- package/dist/client/assets/rst-DY6alFvJ.js +2 -0
- package/dist/client/assets/ruby-DfGLHu1I.js +2 -0
- package/dist/client/assets/rust-Cfkwpbl8.js +2 -0
- package/dist/client/assets/sas-eNjd7tYS.js +2 -0
- package/dist/client/assets/sass-DXrisJhu.js +2 -0
- package/dist/client/assets/scala-DKOlJaKm.js +2 -0
- package/dist/client/assets/scheme-DQCgrYNe.js +2 -0
- package/dist/client/assets/scss-CD6m7-Bl.js +2 -0
- package/dist/client/assets/sdbl-bTVj8UrX.js +2 -0
- package/dist/client/assets/shaderlab-TOUzSsQk.js +2 -0
- package/dist/client/assets/shellscript-CgJVKvdu.js +2 -0
- package/dist/client/assets/shellsession-DfhT55_a.js +2 -0
- package/dist/client/assets/slack-dark-DYvUXyrP.js +2 -0
- package/dist/client/assets/slack-dark-DnToyrRv.js +2 -0
- package/dist/client/assets/slack-ochin-B2OO5cIa.js +2 -0
- package/dist/client/assets/slack-ochin-bqtMVDfH.js +2 -0
- package/dist/client/assets/smalltalk-B16xEiuN.js +2 -0
- package/dist/client/assets/snazzy-light-4G7pJPwS.js +2 -0
- package/dist/client/assets/snazzy-light-D8dzFmq5.js +2 -0
- package/dist/client/assets/solarized-dark-BQwPDzxK.js +2 -0
- package/dist/client/assets/solarized-dark-DV17i1UV.js +2 -0
- package/dist/client/assets/solarized-light-BLaijb3X.js +2 -0
- package/dist/client/assets/solarized-light-DSh2HLQt.js +2 -0
- package/dist/client/assets/solidity-CKzVLygQ.js +2 -0
- package/dist/client/assets/soy-BMxyGli1.js +2 -0
- package/dist/client/assets/sparql-D_iOobhT.js +2 -0
- package/dist/client/assets/splunk-BC2Px7Mm.js +2 -0
- package/dist/client/assets/sql-T1RdWILZ.js +2 -0
- package/dist/client/assets/ssh-config-BgfXC-Er.js +2 -0
- package/dist/client/assets/stata-CSHSc9y1.js +2 -0
- package/dist/client/assets/stylus-B6D30XZt.js +2 -0
- package/dist/client/assets/surrealql-BNNNyZkj.js +2 -0
- package/dist/client/assets/svelte-C4LkhGOG.js +2 -0
- package/dist/client/assets/swift-DonLKvLd.js +2 -0
- package/dist/client/assets/synthwave-84-CIknw8y7.js +2 -0
- package/dist/client/assets/synthwave-84-nFMaYfgc.js +2 -0
- package/dist/client/assets/system-verilog-DJ5XKQeo.js +2 -0
- package/dist/client/assets/systemd-BxMlprV5.js +2 -0
- package/dist/client/assets/talonscript-CohzipZa.js +2 -0
- package/dist/client/assets/tasl-DMoTqEGO.js +2 -0
- package/dist/client/assets/tcl-CZd0xW_V.js +2 -0
- package/dist/client/assets/templ-Ar04ka0k.js +2 -0
- package/dist/client/assets/terraform-DswuEJGm.js +2 -0
- package/dist/client/assets/tex-CWmNB2Lj.js +2 -0
- package/dist/client/assets/textarea-ChQXZeGG.js +46 -0
- package/dist/client/assets/tokyo-night-iIspnLcq.js +2 -0
- package/dist/client/assets/tokyo-night-oM2G3aXe.js +2 -0
- package/dist/client/assets/toml-CcmNWLt0.js +2 -0
- package/dist/client/assets/ts-tags-D568Q_BZ.js +2 -0
- package/dist/client/assets/tsv-sltzmVWM.js +2 -0
- package/dist/client/assets/tsx-Bi2dY_9w.js +2 -0
- package/dist/client/assets/turtle-ByJddavk.js +2 -0
- package/dist/client/assets/twig-D5gCvoXn.js +2 -0
- package/dist/client/assets/typescript-DfzSrRla.js +2 -0
- package/dist/client/assets/typespec-BRdr0IET.js +2 -0
- package/dist/client/assets/typst-DI99ib-x.js +2 -0
- package/dist/client/assets/v-DETTlOr0.js +2 -0
- package/dist/client/assets/vala-zf12oZj6.js +2 -0
- package/dist/client/assets/vb-Djn5o6TS.js +2 -0
- package/dist/client/assets/verilog-CiiDBU1e.js +2 -0
- package/dist/client/assets/vesper-BIFK_oDq.js +2 -0
- package/dist/client/assets/vesper-DdrHHSXu.js +2 -0
- package/dist/client/assets/vhdl-BroJfC0k.js +2 -0
- package/dist/client/assets/viml-DvXPmvsu.js +2 -0
- package/dist/client/assets/vitesse-black-D082JcaE.js +2 -0
- package/dist/client/assets/vitesse-black-fwtXNY1n.js +2 -0
- package/dist/client/assets/vitesse-dark-BZCL-v6S.js +2 -0
- package/dist/client/assets/vitesse-dark-z-nr_5O8.js +2 -0
- package/dist/client/assets/vitesse-light-VbXTXTou.js +2 -0
- package/dist/client/assets/vitesse-light-ojz42ZLy.js +2 -0
- package/dist/client/assets/vue-Cr3u1yii.js +2 -0
- package/dist/client/assets/vue-html-B1KNQm8Q.js +2 -0
- package/dist/client/assets/vue-vine-DUvg6lrb.js +2 -0
- package/dist/client/assets/vyper-CgoNMtux.js +2 -0
- package/dist/client/assets/wasm-BnjxR4X6.js +2 -0
- package/dist/client/assets/wasm-ByWQv1Qj.js +2 -0
- package/dist/client/assets/wenyan-C8pVoKbM.js +2 -0
- package/dist/client/assets/wgsl-BsKzXJz4.js +2 -0
- package/dist/client/assets/wikitext-ClFFjSW2.js +2 -0
- package/dist/client/assets/wit-DdvCle-K.js +2 -0
- package/dist/client/assets/wolfram-DLL8P-h_.js +2 -0
- package/dist/client/assets/worker-aIZfs-9q.js +159 -0
- package/dist/client/assets/xml-Ba8gVYaX.js +2 -0
- package/dist/client/assets/xsl-DD6bwSDU.js +2 -0
- package/dist/client/assets/yaml-DUYA-AHd.js +2 -0
- package/dist/client/assets/zenscript-BnlCZFoB.js +2 -0
- package/dist/client/assets/zig-CMLA9XwU.js +2 -0
- package/dist/client/favicon-16x16.png +0 -0
- package/dist/client/favicon-32x32.png +0 -0
- package/dist/client/favicon.ico +0 -0
- package/dist/client/index.html +101 -0
- package/dist/client/mockServiceWorker.js +349 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 T3 Tools Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { c as HostProcessPlatform, n as PtySpawnError, t as PtyAdapter } from "./PtyAdapter-DO4FyE0R.mjs";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
7
|
+
//#region src/terminal/BunPtyAdapter.ts
|
|
8
|
+
var BunPtyUnsupportedPlatformError = class extends Schema.TaggedErrorClass()("BunPtyUnsupportedPlatformError", { platform: Schema.Literal("win32") }) {
|
|
9
|
+
get message() {
|
|
10
|
+
return `Bun PTY terminal support is unavailable on ${this.platform}. Please use Node.js (e.g. by running \`npx p4\`) instead.`;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var BunPtyOperationUnavailableError = class extends Schema.TaggedErrorClass()("BunPtyOperationUnavailableError", {
|
|
14
|
+
operation: Schema.Literals(["write", "resize"]),
|
|
15
|
+
pid: Schema.Number
|
|
16
|
+
}) {
|
|
17
|
+
get message() {
|
|
18
|
+
return `Bun PTY ${this.operation} is unavailable for process ${this.pid}.`;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var BunPtyProcess = class {
|
|
22
|
+
dataListeners = /* @__PURE__ */ new Set();
|
|
23
|
+
exitListeners = /* @__PURE__ */ new Set();
|
|
24
|
+
decoder = new TextDecoder();
|
|
25
|
+
process;
|
|
26
|
+
didExit = false;
|
|
27
|
+
constructor(process) {
|
|
28
|
+
this.process = process;
|
|
29
|
+
this.process.exited.then((exitCode) => {
|
|
30
|
+
this.emitExit({
|
|
31
|
+
exitCode: Number.isInteger(exitCode) ? exitCode : 0,
|
|
32
|
+
signal: typeof this.process.signalCode === "number" ? this.process.signalCode : null
|
|
33
|
+
});
|
|
34
|
+
}).catch(() => {
|
|
35
|
+
this.emitExit({
|
|
36
|
+
exitCode: 1,
|
|
37
|
+
signal: null
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
get pid() {
|
|
42
|
+
return this.process.pid;
|
|
43
|
+
}
|
|
44
|
+
write(data) {
|
|
45
|
+
if (!this.process.terminal) throw new BunPtyOperationUnavailableError({
|
|
46
|
+
operation: "write",
|
|
47
|
+
pid: this.pid
|
|
48
|
+
});
|
|
49
|
+
this.process.terminal.write(data);
|
|
50
|
+
}
|
|
51
|
+
resize(cols, rows) {
|
|
52
|
+
if (!this.process.terminal?.resize) throw new BunPtyOperationUnavailableError({
|
|
53
|
+
operation: "resize",
|
|
54
|
+
pid: this.pid
|
|
55
|
+
});
|
|
56
|
+
this.process.terminal.resize(cols, rows);
|
|
57
|
+
}
|
|
58
|
+
kill(signal) {
|
|
59
|
+
if (!signal) {
|
|
60
|
+
this.process.kill();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.process.kill(signal);
|
|
64
|
+
}
|
|
65
|
+
onData(callback) {
|
|
66
|
+
this.dataListeners.add(callback);
|
|
67
|
+
return () => {
|
|
68
|
+
this.dataListeners.delete(callback);
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
onExit(callback) {
|
|
72
|
+
this.exitListeners.add(callback);
|
|
73
|
+
return () => {
|
|
74
|
+
this.exitListeners.delete(callback);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
emitData(data) {
|
|
78
|
+
if (this.didExit) return;
|
|
79
|
+
const text = this.decoder.decode(data, { stream: true });
|
|
80
|
+
if (text.length === 0) return;
|
|
81
|
+
for (const listener of this.dataListeners) listener(text);
|
|
82
|
+
}
|
|
83
|
+
emitExit(event) {
|
|
84
|
+
if (this.didExit) return;
|
|
85
|
+
this.didExit = true;
|
|
86
|
+
const remainder = this.decoder.decode();
|
|
87
|
+
if (remainder.length > 0) for (const listener of this.dataListeners) listener(remainder);
|
|
88
|
+
for (const listener of this.exitListeners) listener(event);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const make = Effect.fn("BunPtyAdapter.make")(function* () {
|
|
92
|
+
const platform = yield* HostProcessPlatform;
|
|
93
|
+
if (platform === "win32") return yield* Effect.die(new BunPtyUnsupportedPlatformError({ platform }));
|
|
94
|
+
return PtyAdapter.of({ spawn: (input) => Effect.try({
|
|
95
|
+
try: () => {
|
|
96
|
+
let processHandle = null;
|
|
97
|
+
const command = [input.shell, ...input.args ?? []];
|
|
98
|
+
processHandle = new BunPtyProcess(Bun.spawn(command, {
|
|
99
|
+
cwd: input.cwd,
|
|
100
|
+
env: input.env,
|
|
101
|
+
terminal: {
|
|
102
|
+
cols: input.cols,
|
|
103
|
+
rows: input.rows,
|
|
104
|
+
data: (_terminal, data) => {
|
|
105
|
+
processHandle?.emitData(data);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}));
|
|
109
|
+
return processHandle;
|
|
110
|
+
},
|
|
111
|
+
catch: (cause) => new PtySpawnError({
|
|
112
|
+
adapter: "bun",
|
|
113
|
+
shell: input.shell,
|
|
114
|
+
cause
|
|
115
|
+
})
|
|
116
|
+
}) });
|
|
117
|
+
});
|
|
118
|
+
const layer = Layer.effect(PtyAdapter, make());
|
|
119
|
+
//#endregion
|
|
120
|
+
export { BunPtyOperationUnavailableError, BunPtyUnsupportedPlatformError, layer, make };
|
|
121
|
+
|
|
122
|
+
//# sourceMappingURL=BunPtyAdapter-DogtLQSx.mjs.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { c as HostProcessPlatform, n as PtySpawnError, r as HostProcessArchitecture, t as PtyAdapter } from "./PtyAdapter-DO4FyE0R.mjs";
|
|
4
|
+
import * as NodeModule from "node:module";
|
|
5
|
+
import * as Effect from "effect/Effect";
|
|
6
|
+
import * as Layer from "effect/Layer";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import * as FileSystem from "effect/FileSystem";
|
|
9
|
+
import * as Path from "effect/Path";
|
|
10
|
+
//#region src/terminal/NodePtyAdapter.ts
|
|
11
|
+
var NodePtyModuleLoadError = class extends Schema.TaggedErrorClass()("NodePtyModuleLoadError", {
|
|
12
|
+
platform: Schema.String,
|
|
13
|
+
architecture: Schema.String,
|
|
14
|
+
cause: Schema.Defect()
|
|
15
|
+
}) {
|
|
16
|
+
get message() {
|
|
17
|
+
return `Failed to load node-pty for ${this.platform}-${this.architecture}.`;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
let didEnsureSpawnHelperExecutable = false;
|
|
21
|
+
const resolveNodePtySpawnHelperPath = Effect.gen(function* () {
|
|
22
|
+
const requireForNodePty = NodeModule.createRequire(import.meta.url);
|
|
23
|
+
const path = yield* Path.Path;
|
|
24
|
+
const fs = yield* FileSystem.FileSystem;
|
|
25
|
+
const platform = yield* HostProcessPlatform;
|
|
26
|
+
const architecture = yield* HostProcessArchitecture;
|
|
27
|
+
const packageJsonPath = requireForNodePty.resolve("node-pty/package.json");
|
|
28
|
+
const packageDir = path.dirname(packageJsonPath);
|
|
29
|
+
const candidates = [
|
|
30
|
+
path.join(packageDir, "build", "Release", "spawn-helper"),
|
|
31
|
+
path.join(packageDir, "build", "Debug", "spawn-helper"),
|
|
32
|
+
path.join(packageDir, "prebuilds", `${platform}-${architecture}`, "spawn-helper")
|
|
33
|
+
];
|
|
34
|
+
for (const candidate of candidates) if (yield* fs.exists(candidate)) return candidate;
|
|
35
|
+
return null;
|
|
36
|
+
}).pipe(Effect.orElseSucceed(() => null));
|
|
37
|
+
const ensureNodePtySpawnHelperExecutable = Effect.fn(function* () {
|
|
38
|
+
const fs = yield* FileSystem.FileSystem;
|
|
39
|
+
if ((yield* HostProcessPlatform) === "win32") return;
|
|
40
|
+
if (didEnsureSpawnHelperExecutable) return;
|
|
41
|
+
const helperPath = yield* resolveNodePtySpawnHelperPath;
|
|
42
|
+
if (!helperPath) return;
|
|
43
|
+
didEnsureSpawnHelperExecutable = true;
|
|
44
|
+
if (!(yield* fs.exists(helperPath))) return;
|
|
45
|
+
yield* fs.chmod(helperPath, 493).pipe(Effect.orElseSucceed(() => void 0));
|
|
46
|
+
});
|
|
47
|
+
var NodePtyProcess = class {
|
|
48
|
+
process;
|
|
49
|
+
constructor(process) {
|
|
50
|
+
this.process = process;
|
|
51
|
+
}
|
|
52
|
+
get pid() {
|
|
53
|
+
return this.process.pid;
|
|
54
|
+
}
|
|
55
|
+
write(data) {
|
|
56
|
+
this.process.write(data);
|
|
57
|
+
}
|
|
58
|
+
resize(cols, rows) {
|
|
59
|
+
this.process.resize(cols, rows);
|
|
60
|
+
}
|
|
61
|
+
kill(signal) {
|
|
62
|
+
this.process.kill(signal);
|
|
63
|
+
}
|
|
64
|
+
onData(callback) {
|
|
65
|
+
const disposable = this.process.onData(callback);
|
|
66
|
+
return () => {
|
|
67
|
+
disposable.dispose();
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
onExit(callback) {
|
|
71
|
+
const disposable = this.process.onExit((event) => {
|
|
72
|
+
callback({
|
|
73
|
+
exitCode: event.exitCode,
|
|
74
|
+
signal: event.signal ?? null
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
return () => {
|
|
78
|
+
disposable.dispose();
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
const make = Effect.fn("NodePtyAdapter.make")(function* (loadNodePtyModule = () => import("node-pty")) {
|
|
83
|
+
const fs = yield* FileSystem.FileSystem;
|
|
84
|
+
const path = yield* Path.Path;
|
|
85
|
+
const platform = yield* HostProcessPlatform;
|
|
86
|
+
const architecture = yield* HostProcessArchitecture;
|
|
87
|
+
const nodePty = yield* Effect.tryPromise({
|
|
88
|
+
try: loadNodePtyModule,
|
|
89
|
+
catch: (cause) => new NodePtyModuleLoadError({
|
|
90
|
+
platform,
|
|
91
|
+
architecture,
|
|
92
|
+
cause
|
|
93
|
+
})
|
|
94
|
+
}).pipe(Effect.orDie);
|
|
95
|
+
const ensureNodePtySpawnHelperExecutableCached = yield* Effect.cached(ensureNodePtySpawnHelperExecutable().pipe(Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path), Effect.provideService(HostProcessPlatform, platform), Effect.provideService(HostProcessArchitecture, architecture), Effect.orElseSucceed(() => void 0)));
|
|
96
|
+
return PtyAdapter.of({ spawn: Effect.fn("NodePtyAdapter.spawn")(function* (input) {
|
|
97
|
+
yield* ensureNodePtySpawnHelperExecutableCached;
|
|
98
|
+
return new NodePtyProcess(yield* Effect.try({
|
|
99
|
+
try: () => nodePty.spawn(input.shell, input.args ?? [], {
|
|
100
|
+
cwd: input.cwd,
|
|
101
|
+
cols: input.cols,
|
|
102
|
+
rows: input.rows,
|
|
103
|
+
env: input.env,
|
|
104
|
+
name: platform === "win32" ? "xterm-color" : "xterm-256color"
|
|
105
|
+
}),
|
|
106
|
+
catch: (cause) => new PtySpawnError({
|
|
107
|
+
adapter: "node-pty",
|
|
108
|
+
shell: input.shell,
|
|
109
|
+
cause
|
|
110
|
+
})
|
|
111
|
+
}));
|
|
112
|
+
}) });
|
|
113
|
+
});
|
|
114
|
+
const layer = Layer.effect(PtyAdapter, make());
|
|
115
|
+
//#endregion
|
|
116
|
+
export { NodePtyModuleLoadError, layer, make };
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=NodePtyAdapter-CS1weRcq.mjs.map
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Layer from "effect/Layer";
|
|
5
|
+
import * as Context from "effect/Context";
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
7
|
+
import * as Duration from "effect/Duration";
|
|
8
|
+
import * as Stream from "effect/Stream";
|
|
9
|
+
import * as Client from "effect/unstable/sql/SqlClient";
|
|
10
|
+
import * as Config from "effect/Config";
|
|
11
|
+
import { identity } from "effect/Function";
|
|
12
|
+
import * as Cache from "effect/Cache";
|
|
13
|
+
import * as Scope from "effect/Scope";
|
|
14
|
+
import * as Semaphore from "effect/Semaphore";
|
|
15
|
+
import * as Fiber from "effect/Fiber";
|
|
16
|
+
import * as NodeSqlite from "node:sqlite";
|
|
17
|
+
import * as Reactivity from "effect/unstable/reactivity/Reactivity";
|
|
18
|
+
import { SqlError, classifySqliteError } from "effect/unstable/sql/SqlError";
|
|
19
|
+
import * as Statement from "effect/unstable/sql/Statement";
|
|
20
|
+
//#region src/persistence/NodeSqliteClient.ts
|
|
21
|
+
/**
|
|
22
|
+
* Port of `@effect/sql-sqlite-node` that uses the native `node:sqlite`
|
|
23
|
+
* bindings instead of `better-sqlite3`.
|
|
24
|
+
*
|
|
25
|
+
* @module SqliteClient
|
|
26
|
+
*/
|
|
27
|
+
const ATTR_DB_SYSTEM_NAME = "db.system.name";
|
|
28
|
+
const TypeId = "~local/sqlite-node/SqliteClient";
|
|
29
|
+
var UnsupportedNodeSqliteVersionError = class extends Schema.TaggedErrorClass()("UnsupportedNodeSqliteVersionError", {
|
|
30
|
+
nodeVersion: Schema.String,
|
|
31
|
+
requirement: Schema.String
|
|
32
|
+
}) {
|
|
33
|
+
get message() {
|
|
34
|
+
return `Node.js ${this.nodeVersion} is missing required node:sqlite APIs. Upgrade to ${this.requirement}.`;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var UnsupportedNodeSqliteOperationError = class extends Schema.TaggedErrorClass()("UnsupportedNodeSqliteOperationError", {}) {
|
|
38
|
+
get message() {
|
|
39
|
+
return "Node SQLite does not support executeStream.";
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Verify that the current Node.js version includes the `node:sqlite` APIs
|
|
44
|
+
* used by `NodeSqliteClient` — specifically `StatementSync.columns()` (added
|
|
45
|
+
* in Node 22.16.0 / 23.11.0).
|
|
46
|
+
*
|
|
47
|
+
* @see https://github.com/nodejs/node/pull/57490
|
|
48
|
+
*/
|
|
49
|
+
const checkNodeSqliteCompat = () => {
|
|
50
|
+
const parts = process.versions.node.split(".").map(Number);
|
|
51
|
+
const major = parts[0] ?? 0;
|
|
52
|
+
const minor = parts[1] ?? 0;
|
|
53
|
+
if (!(major === 22 && minor >= 16 || major === 23 && minor >= 11 || major >= 24)) return Effect.die(new UnsupportedNodeSqliteVersionError({
|
|
54
|
+
nodeVersion: process.versions.node,
|
|
55
|
+
requirement: "Node.js >=22.16, >=23.11, or >=24"
|
|
56
|
+
}));
|
|
57
|
+
return Effect.void;
|
|
58
|
+
};
|
|
59
|
+
const makeWithDatabase = Effect.fn("makeWithDatabase")(function* (options, openDatabase) {
|
|
60
|
+
yield* checkNodeSqliteCompat();
|
|
61
|
+
const compiler = Statement.makeCompilerSqlite(options.transformQueryNames);
|
|
62
|
+
const transformRows = options.transformResultNames ? Statement.defaultTransforms(options.transformResultNames).array : void 0;
|
|
63
|
+
const makeConnection = Effect.gen(function* () {
|
|
64
|
+
const scope = yield* Effect.scope;
|
|
65
|
+
const db = yield* Effect.try({
|
|
66
|
+
try: openDatabase,
|
|
67
|
+
catch: (cause) => new SqlError({ reason: classifySqliteError(cause, {
|
|
68
|
+
message: "Failed to open database",
|
|
69
|
+
operation: "open"
|
|
70
|
+
}) })
|
|
71
|
+
});
|
|
72
|
+
yield* Scope.addFinalizer(scope, Effect.try({
|
|
73
|
+
try: () => db.close(),
|
|
74
|
+
catch: (cause) => new SqlError({ reason: classifySqliteError(cause, {
|
|
75
|
+
message: "Failed to close database",
|
|
76
|
+
operation: "close"
|
|
77
|
+
}) })
|
|
78
|
+
}).pipe(Effect.orDie));
|
|
79
|
+
const statementReaderCache = /* @__PURE__ */ new WeakMap();
|
|
80
|
+
const hasRows = (statement) => {
|
|
81
|
+
const cached = statementReaderCache.get(statement);
|
|
82
|
+
if (cached !== void 0) return cached;
|
|
83
|
+
const value = statement.columns().length > 0;
|
|
84
|
+
statementReaderCache.set(statement, value);
|
|
85
|
+
return value;
|
|
86
|
+
};
|
|
87
|
+
const prepare = (sql) => Effect.try({
|
|
88
|
+
try: () => db.prepare(sql),
|
|
89
|
+
catch: (cause) => new SqlError({ reason: classifySqliteError(cause, {
|
|
90
|
+
message: "Failed to prepare statement",
|
|
91
|
+
operation: "prepare"
|
|
92
|
+
}) })
|
|
93
|
+
});
|
|
94
|
+
const prepareCache = yield* Cache.make({
|
|
95
|
+
capacity: options.prepareCacheSize ?? 200,
|
|
96
|
+
timeToLive: options.prepareCacheTTL ?? Duration.minutes(10),
|
|
97
|
+
lookup: prepare
|
|
98
|
+
});
|
|
99
|
+
const runStatement = (statement, params, raw) => Effect.withFiber((fiber) => {
|
|
100
|
+
try {
|
|
101
|
+
statement.setReadBigInts(Boolean(Context.get(fiber.context, Client.SafeIntegers)));
|
|
102
|
+
if (hasRows(statement)) return Effect.succeed(statement.all(...params));
|
|
103
|
+
const result = statement.run(...params);
|
|
104
|
+
return Effect.succeed(raw ? result : []);
|
|
105
|
+
} catch (cause) {
|
|
106
|
+
return Effect.fail(new SqlError({ reason: classifySqliteError(cause, {
|
|
107
|
+
message: "Failed to execute statement",
|
|
108
|
+
operation: "execute"
|
|
109
|
+
}) }));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const run = (sql, params, raw = false) => Effect.flatMap(Cache.get(prepareCache, sql), (s) => runStatement(s, params, raw));
|
|
113
|
+
const runStatementValues = (statement, params) => Effect.acquireUseRelease(Effect.succeed(statement), (statement) => Effect.try({
|
|
114
|
+
try: () => {
|
|
115
|
+
if (hasRows(statement)) {
|
|
116
|
+
statement.setReturnArrays(true);
|
|
117
|
+
return statement.all(...params);
|
|
118
|
+
}
|
|
119
|
+
statement.run(...params);
|
|
120
|
+
return [];
|
|
121
|
+
},
|
|
122
|
+
catch: (cause) => new SqlError({ reason: classifySqliteError(cause, {
|
|
123
|
+
message: "Failed to execute statement",
|
|
124
|
+
operation: "execute"
|
|
125
|
+
}) })
|
|
126
|
+
}), (statement) => Effect.try({
|
|
127
|
+
try: () => {
|
|
128
|
+
if (hasRows(statement)) statement.setReturnArrays(false);
|
|
129
|
+
},
|
|
130
|
+
catch: (cause) => new SqlError({ reason: classifySqliteError(cause, {
|
|
131
|
+
message: "Failed to reset statement result mode",
|
|
132
|
+
operation: "resetResultMode"
|
|
133
|
+
}) })
|
|
134
|
+
}).pipe(Effect.orDie));
|
|
135
|
+
const runValues = (sql, params) => Effect.flatMap(Cache.get(prepareCache, sql), (statement) => runStatementValues(statement, params));
|
|
136
|
+
return identity({
|
|
137
|
+
execute(sql, params, rowTransform) {
|
|
138
|
+
return rowTransform ? Effect.map(run(sql, params), rowTransform) : run(sql, params);
|
|
139
|
+
},
|
|
140
|
+
executeRaw(sql, params) {
|
|
141
|
+
return run(sql, params, true);
|
|
142
|
+
},
|
|
143
|
+
executeValues(sql, params) {
|
|
144
|
+
return runValues(sql, params);
|
|
145
|
+
},
|
|
146
|
+
executeValuesUnprepared(sql, params) {
|
|
147
|
+
return Effect.flatMap(prepare(sql), (statement) => runStatementValues(statement, params ?? []));
|
|
148
|
+
},
|
|
149
|
+
executeUnprepared(sql, params, rowTransform) {
|
|
150
|
+
const effect = prepare(sql).pipe(Effect.flatMap((statement) => runStatement(statement, params ?? [], false)));
|
|
151
|
+
return rowTransform ? Effect.map(effect, rowTransform) : effect;
|
|
152
|
+
},
|
|
153
|
+
executeStream(_sql, _params) {
|
|
154
|
+
return Stream.die(new UnsupportedNodeSqliteOperationError());
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
const semaphore = yield* Semaphore.make(1);
|
|
159
|
+
const connection = yield* makeConnection;
|
|
160
|
+
const acquirer = semaphore.withPermits(1)(Effect.succeed(connection));
|
|
161
|
+
const transactionAcquirer = Effect.uninterruptibleMask((restore) => {
|
|
162
|
+
const fiber = Fiber.getCurrent();
|
|
163
|
+
const scope = Context.getUnsafe(fiber.context, Scope.Scope);
|
|
164
|
+
return Effect.as(Effect.tap(restore(semaphore.take(1)), () => Scope.addFinalizer(scope, semaphore.release(1))), connection);
|
|
165
|
+
});
|
|
166
|
+
return yield* Client.make({
|
|
167
|
+
acquirer,
|
|
168
|
+
compiler,
|
|
169
|
+
transactionAcquirer,
|
|
170
|
+
spanAttributes: [...options.spanAttributes ? Object.entries(options.spanAttributes) : [], [ATTR_DB_SYSTEM_NAME, "sqlite"]],
|
|
171
|
+
transformRows
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
const make = (options) => makeWithDatabase(options, () => new NodeSqlite.DatabaseSync(options.filename, {
|
|
175
|
+
readOnly: options.readonly ?? false,
|
|
176
|
+
allowExtension: options.allowExtension ?? false
|
|
177
|
+
}));
|
|
178
|
+
const makeMemory = (config = {}) => makeWithDatabase({
|
|
179
|
+
...config,
|
|
180
|
+
filename: ":memory:",
|
|
181
|
+
readonly: false
|
|
182
|
+
}, () => {
|
|
183
|
+
return new NodeSqlite.DatabaseSync(":memory:", { allowExtension: config.allowExtension ?? false });
|
|
184
|
+
});
|
|
185
|
+
const layerConfig = (config) => Layer.effect(Client.SqlClient, Config.unwrap(config).pipe(Effect.flatMap(make))).pipe(Layer.provide(Reactivity.layer));
|
|
186
|
+
const layer = (config) => Layer.effect(Client.SqlClient, make(config)).pipe(Layer.provide(Reactivity.layer));
|
|
187
|
+
const layerMemory = (config = {}) => Layer.effect(Client.SqlClient, makeMemory(config)).pipe(Layer.provide(Reactivity.layer));
|
|
188
|
+
//#endregion
|
|
189
|
+
export { TypeId, UnsupportedNodeSqliteOperationError, UnsupportedNodeSqliteVersionError, layer, layerConfig, layerMemory };
|
|
190
|
+
|
|
191
|
+
//# sourceMappingURL=NodeSqliteClient-BUlNQAY0.mjs.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Context from "effect/Context";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
import * as NodeOS from "node:os";
|
|
7
|
+
//#region ../../packages/shared/src/hostProcess.ts
|
|
8
|
+
const HostProcessPlatform = Context.Reference("@p4code/shared/hostProcess/HostProcessPlatform", { defaultValue: () => process.platform });
|
|
9
|
+
const HostProcessArchitecture = Context.Reference("@p4code/shared/hostProcess/HostProcessArchitecture", { defaultValue: () => process.arch });
|
|
10
|
+
const HostProcessHostname = Context.Reference("@p4code/shared/hostProcess/HostProcessHostname", { defaultValue: () => NodeOS.hostname() });
|
|
11
|
+
const HostProcessEnvironment = Context.Reference("@p4code/shared/hostProcess/HostProcessEnvironment", { defaultValue: () => process.env });
|
|
12
|
+
Context.Reference("@p4code/shared/hostProcess/HostProcessWorkingDirectory", { defaultValue: () => process.cwd() });
|
|
13
|
+
const HostProcessExecutablePath = Context.Reference("@p4code/shared/hostProcess/HostProcessExecutablePath", { defaultValue: () => process.execPath });
|
|
14
|
+
const HostProcessArguments = Context.Reference("@p4code/shared/hostProcess/HostProcessArguments", { defaultValue: () => process.argv });
|
|
15
|
+
/**
|
|
16
|
+
* Numeric uid of the calling user. `launchctl` addresses per-user domains as
|
|
17
|
+
* `gui/<uid>`, so the macOS boot service cannot be managed without it.
|
|
18
|
+
* `process.getuid` is undefined on Windows, where -1 stands in for "no uid".
|
|
19
|
+
*/
|
|
20
|
+
const HostProcessUserId = Context.Reference("@p4code/shared/hostProcess/HostProcessUserId", { defaultValue: () => process.getuid?.() ?? -1 });
|
|
21
|
+
Effect.map(HostProcessPlatform, (platform) => platform === "win32");
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/terminal/PtyAdapter.ts
|
|
24
|
+
/**
|
|
25
|
+
* PtyAdapter - Terminal PTY adapter service contract.
|
|
26
|
+
*
|
|
27
|
+
* Defines the process primitives required by terminal session management
|
|
28
|
+
* without binding to a specific PTY implementation.
|
|
29
|
+
*
|
|
30
|
+
* @module PtyAdapter
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* PtySpawnError - Error type for PTY spawn failures.
|
|
34
|
+
*/
|
|
35
|
+
var PtySpawnError = class extends Schema.TaggedErrorClass()("PtySpawnError", {
|
|
36
|
+
adapter: Schema.String,
|
|
37
|
+
shell: Schema.optional(Schema.String),
|
|
38
|
+
attemptedShells: Schema.optional(Schema.Array(Schema.String)),
|
|
39
|
+
cause: Schema.optional(Schema.Defect())
|
|
40
|
+
}) {
|
|
41
|
+
get message() {
|
|
42
|
+
const shell = this.shell === void 0 ? "" : ` '${this.shell}'`;
|
|
43
|
+
const attemptedShells = this.attemptedShells === void 0 || this.attemptedShells.length === 0 ? "" : ` Tried shells: ${this.attemptedShells.join(", ")}.`;
|
|
44
|
+
return `Failed to spawn PTY process${shell} with ${this.adapter}.${attemptedShells}`;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* PtyAdapter - Service tag for PTY process integration.
|
|
49
|
+
*/
|
|
50
|
+
var PtyAdapter = class extends Context.Service()("@p4code/cli/terminal/PtyAdapter") {};
|
|
51
|
+
//#endregion
|
|
52
|
+
export { HostProcessEnvironment as a, HostProcessPlatform as c, HostProcessArguments as i, HostProcessUserId as l, PtySpawnError as n, HostProcessExecutablePath as o, HostProcessArchitecture as r, HostProcessHostname as s, PtyAdapter as t };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=PtyAdapter-DO4FyE0R.mjs.map
|