@pubinfo-pr/devtools 0.1.1 → 0.171.2
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/dist/client/assets/Navbar-D8ux538U.css +18 -0
- package/dist/client/assets/Navbar-f6u8nv1A.js +190 -0
- package/dist/client/assets/PanelGrids-B1uPlpXo.js +8 -0
- package/dist/client/assets/angular-html-C_XNpd6d.js +5 -0
- package/dist/client/assets/{angular-html-BPWgfvBc.js → angular-html-xcXDdDxt.js} +1 -1
- package/dist/client/assets/{angular-ts-DGzTDMev.js → angular-ts-DD9ACpiD.js} +5 -5
- package/dist/client/assets/{apl-BPuavpVx.js → apl-DmHUHJpj.js} +6 -6
- package/dist/client/assets/{astro-S5XuEH5N.js → astro-DDh1X0zj.js} +6 -6
- package/dist/client/assets/{beancount-CFAdYWr2.js → beancount-Bz84L4pZ.js} +1 -1
- package/dist/client/assets/{blade-BD3Ti8S8.js → blade-DSiefmOm.js} +8 -8
- package/dist/client/assets/{bsl-FJCc2ZjR.js → bsl-B5rPHHQR.js} +1 -1
- package/dist/client/assets/c-z_CBvR-7.js +2 -0
- package/dist/client/assets/cadence-ClJ3N6y1.js +3 -0
- package/dist/client/assets/{cairo-CT1kFY4g.js → cairo-CibIWXXr.js} +1 -1
- package/dist/client/assets/catppuccin-frappe-DZStY-Pp.js +2 -0
- package/dist/client/assets/catppuccin-latte-DN5l0gng.js +2 -0
- package/dist/client/assets/catppuccin-macchiato-CQ07VMBV.js +2 -0
- package/dist/client/assets/catppuccin-mocha-BZQavwvR.js +2 -0
- package/dist/client/assets/clarity-2rxwVrD_.js +3 -0
- package/dist/client/assets/cmake-hgeKAf6L.js +2 -0
- package/dist/client/assets/{cobol-CE0tFF5i.js → cobol-D4I6b-S-.js} +4 -4
- package/dist/client/assets/{coffee-D8rtNx1a.js → coffee-De9Ahhbk.js} +1 -1
- package/dist/client/assets/component-CAiGJCHL.js +517 -0
- package/dist/client/assets/cpp-BZS_uuBN.js +6 -0
- package/dist/client/assets/{cpp-C4U1u9xk.js → cpp-DQfrxaSK.js} +3 -3
- package/dist/client/assets/{crystal-C51LLczf.js → crystal-DPw2ul3_.js} +6 -6
- package/dist/client/assets/csharp-9SPrJBrf.js +3 -0
- package/dist/client/assets/csharp-C36TKsxo.js +2 -0
- package/dist/client/assets/css-DR-9FJvj.js +2 -0
- package/dist/client/assets/{csv-rLH0WuQO.js → csv-De8OeUXw.js} +1 -1
- package/dist/client/assets/{dark-plus-Db9rRSHq.js → dark-plus-B5VW4UtG.js} +1 -1
- package/dist/client/assets/diff-DaXl9_BL.js +2 -0
- package/dist/client/assets/{edge-WSoBDjCt.js → edge-Rvj64lc9.js} +5 -5
- package/dist/client/assets/{elixir-4Bcc41kI.js → elixir-CoeM723j.js} +3 -3
- package/dist/client/assets/{elm-DisSriNR.js → elm-Bd7OM9qn.js} +2 -2
- package/dist/client/assets/{erb-BuJIU0wX.js → erb-MtET9AJK.js} +19 -19
- package/dist/client/assets/{erlang-BbsDmeCk.js → erlang-C2LMbUyn.js} +1 -1
- package/dist/client/assets/{fetch-CTfoU6yt.js → fetch-Vqmvg8bB.js} +99 -3
- package/dist/client/assets/fish-Dg2ABucE.js +3 -0
- package/dist/client/assets/{fortran-fixed-form-DvnLkzBN.js → fortran-fixed-form-2tZ26fHw.js} +1 -1
- package/dist/client/assets/{fortran-free-form-xkm1udFL.js → fortran-free-form-DHi82dZv.js} +1 -1
- package/dist/client/assets/fsharp-BLIM__N6.js +4 -0
- package/dist/client/assets/{gdresource-Ddtxl8Ni.js → gdresource-BqLhMx8o.js} +2 -2
- package/dist/client/assets/gdscript-Bf4AGzTd.js +2 -0
- package/dist/client/assets/gdshader-D8eohhwr.js +2 -0
- package/dist/client/assets/{git-commit-4JodcKYl.js → git-commit-CuACZQ6M.js} +1 -1
- package/dist/client/assets/{git-rebase-DZ3MZg-o.js → git-rebase-BpEGiwgf.js} +1 -1
- package/dist/client/assets/{glimmer-js-Dw1YG46K.js → glimmer-js-BYOiNDSp.js} +4 -4
- package/dist/client/assets/{glimmer-ts-BoTKtLAn.js → glimmer-ts-DQ3A-M4A.js} +4 -4
- package/dist/client/assets/{glsl-BcvqNIzr.js → glsl-B38FqIrO.js} +1 -1
- package/dist/client/assets/glsl-xv19v6C3.js +3 -0
- package/dist/client/assets/go-C3PtlDL7.js +2 -0
- package/dist/client/assets/{graphql-CZtSUIVW.js → graphql-DazeCgwe.js} +4 -4
- package/dist/client/assets/graphql-v1D07dEi.js +6 -0
- package/dist/client/assets/{gruvbox-dark-hard-BddnLFai.js → gruvbox-dark-hard-BAs6lRWB.js} +1 -1
- package/dist/client/assets/{gruvbox-dark-medium-DClLifyq.js → gruvbox-dark-medium-3GYOc_7i.js} +1 -1
- package/dist/client/assets/{gruvbox-dark-soft-CoL2WoEr.js → gruvbox-dark-soft-CLjRrw1t.js} +1 -1
- package/dist/client/assets/{gruvbox-light-hard-CF2FUQYG.js → gruvbox-light-hard-B5pDyJmT.js} +1 -1
- package/dist/client/assets/{gruvbox-light-medium-DdKpn-Z3.js → gruvbox-light-medium-Czo7iHvp.js} +1 -1
- package/dist/client/assets/{gruvbox-light-soft-CXnF8CjV.js → gruvbox-light-soft-MdVOuSwf.js} +1 -1
- package/dist/client/assets/hack-AkEaSIiG.js +11 -0
- package/dist/client/assets/haml-12DF4L6t.js +4 -0
- package/dist/client/assets/{haml-BImF9_sT.js → haml-D7SdiIb2.js} +2 -2
- package/dist/client/assets/{handlebars-BioaJ5nM.js → handlebars-BF5SsGSc.js} +4 -4
- package/dist/client/assets/haxe-qVl2C22S.js +2 -0
- package/dist/client/assets/hlsl-7q7KfwR3.js +2 -0
- package/dist/client/assets/{html-BLAmfzfF.js → html-CygGKEU-.js} +2 -2
- package/dist/client/assets/html-XPHP1ctB.js +4 -0
- package/dist/client/assets/{html-derivative-D5DGRC4b.js → html-derivative-BRUyLBYr.js} +4 -4
- package/dist/client/assets/{html-derivative-EjRHFpnu.js → html-derivative-CDHXe1rc.js} +1 -1
- package/dist/client/assets/{http-lZvWEzFG.js → http-BTiGLdVM.js} +9 -9
- package/dist/client/assets/{hxml-ee_Yi0Bv.js → hxml-eH6B7Ggs.js} +1 -1
- package/dist/client/assets/{index-BSkduMKH.js → index-BCCYVO0H.js} +23 -11
- package/dist/client/assets/index-r9fa78NA.css +443 -0
- package/dist/client/assets/java-JqMAxu8h.js +2 -0
- package/dist/client/assets/{javascript-239S-npV.js → javascript-D8V2UVzz.js} +1 -1
- package/dist/client/assets/javascript-LJ6D4L7Q.js +2 -0
- package/dist/client/assets/{jinja-Bg3R28jD.js → jinja-DPlrL6lm.js} +3 -3
- package/dist/client/assets/{jison-BC1q7dZB.js → jison-0ZlyxLzz.js} +1 -1
- package/dist/client/assets/json-DiZTWJxw.js +2 -0
- package/dist/client/assets/jsx-kOdHP25g.js +2 -0
- package/dist/client/assets/{julia-EKUZwWmm.js → julia-BSZQ7UdI.js} +8 -8
- package/dist/client/assets/latex-eg89ZWIS.js +5 -0
- package/dist/client/assets/lean-CI_7uWok.js +3 -0
- package/dist/client/assets/less-DyvK2mij.js +2 -0
- package/dist/client/assets/{liquid-PHiGTwj1.js → liquid-ChIPyGY6.js} +4 -4
- package/dist/client/assets/{llvm-I5QJoasC.js → llvm-ClGsJD4P.js} +1 -1
- package/dist/client/assets/{lua-CBf0ggeL.js → lua-DE8lfN39.js} +1 -1
- package/dist/client/assets/lua-DmTtkYij.js +3 -0
- package/dist/client/assets/markdown-mlSUc649.js +2 -0
- package/dist/client/assets/{marko-CE_g888v.js → marko-DgW77q7w.js} +4 -4
- package/dist/client/assets/{mdc-CTYOzD1j.js → mdc-D-3CUGp6.js} +6 -6
- package/dist/client/assets/move-XM2padQY.js +3 -0
- package/dist/client/assets/{nginx-Dj2-Xu09.js → nginx-CtF2jNry.js} +2 -2
- package/dist/client/assets/{nim-Btzc76t3.js → nim-TErUbZAu.js} +8 -8
- package/dist/client/assets/nix-YSTOikLh.js +3 -0
- package/dist/client/assets/{nushell-BRDcl2mr.js → nushell-stskKkpE.js} +1 -1
- package/dist/client/assets/pages-Bx84dNCY.js +239 -0
- package/dist/client/assets/pages-DQ8FtB9Y.css +17 -0
- package/dist/client/assets/{perl-DLie958B.js → perl-BBy5Zwm3.js} +6 -6
- package/dist/client/assets/{php-CeVstFNC.js → php-BxmWfIjG.js} +6 -6
- package/dist/client/assets/php-Dwoa08mV.js +9 -0
- package/dist/client/assets/postcss-mk7NO3GE.js +2 -0
- package/dist/client/assets/{pug-D9BazAbt.js → pug-_0lXH97N.js} +3 -3
- package/dist/client/assets/python-wZG5a_HU.js +2 -0
- package/dist/client/assets/{qml-Dsl5qRow.js → qml-BbSTJdwY.js} +1 -1
- package/dist/client/assets/r-C_0je1kM.js +2 -0
- package/dist/client/assets/{razor-BjH6275R.js → razor-B-gWLra0.js} +4 -4
- package/dist/client/assets/regexp-BV7LsrGP.js +2 -0
- package/dist/client/assets/{rst-Pxh4TKKn.js → rst-vq3PUEe9.js} +22 -22
- package/dist/client/assets/{ruby-CAlvFaP5.js → ruby-Py1CEke6.js} +12 -12
- package/dist/client/assets/ruby-djifmDsY.js +20 -0
- package/dist/client/assets/{sas-BQQp9-K3.js → sas-Crv05x8i.js} +1 -1
- package/dist/client/assets/scss-Cl-VEz3E.js +3 -0
- package/dist/client/assets/{scss-CJyb8K_U.js → scss-Cw2rR0Nw.js} +1 -1
- package/dist/client/assets/sdbl-ZdJzdy9k.js +2 -0
- package/dist/client/assets/{server-router-BiZSSnZD.css → server-router-6GvTqPc1.css} +0 -18
- package/dist/client/assets/{server-router-BPUoghL2.js → server-router-DLDLUF9W.js} +297 -529
- package/dist/client/assets/{shaderlab-C8C8_BgV.js → shaderlab-BhQ9G_fS.js} +1 -1
- package/dist/client/assets/shellscript-3NHz9REQ.js +2 -0
- package/dist/client/assets/{shellsession-YAJaKmo5.js → shellsession-GL5OwgNh.js} +1 -1
- package/dist/client/assets/{soy-BwO6v7SS.js → soy-DWTMTRvm.js} +3 -3
- package/dist/client/assets/{sparql-Ctv9JmsW.js → sparql-Bhv-NULD.js} +1 -1
- package/dist/client/assets/sql-D9X2mMUX.js +2 -0
- package/dist/client/assets/{stata-CBQSMhJu.js → stata-BlmwGy5v.js} +1 -1
- package/dist/client/assets/stylus-CltJUoH-.js +2 -0
- package/dist/client/assets/{svelte-C7A5FsG_.js → svelte-Cz0fJMJu.js} +4 -4
- package/dist/client/assets/{templ-Dan_9-H5.js → templ-DJEM4Dsn.js} +3 -3
- package/dist/client/assets/tex-V5JgLFQ3.js +4 -0
- package/dist/client/assets/tex-k6SW7rO1.js +3 -0
- package/dist/client/assets/{ts-tags-BSSXKo8m.js → ts-tags-DftD3xuW.js} +9 -9
- package/dist/client/assets/tsx-B7G7qOdJ.js +2 -0
- package/dist/client/assets/turtle-Bg9WlzE1.js +2 -0
- package/dist/client/assets/{twig-CUV6hi0h.js → twig-BH71GbCE.js} +23 -23
- package/dist/client/assets/typescript-D838FC1-.js +2 -0
- package/dist/client/assets/{typescript-Crma8FE2.js → typescript-Dx74cANe.js} +1 -1
- package/dist/client/assets/v-pJSB2935.js +3 -0
- package/dist/client/assets/{vue-CahofuY8.js → vue-CtiaKG90.js} +6 -6
- package/dist/client/assets/vue-TeT-q0PM.js +8 -0
- package/dist/client/assets/{vue-html-B9xEgjjB.js → vue-html-Dn0drGR_.js} +7 -7
- package/dist/client/assets/{vue-vine-B9sh5nZz.js → vue-vine-Cl9MyVkQ.js} +11 -11
- package/dist/client/assets/xml-CbEHzi2l.js +3 -0
- package/dist/client/assets/{xml-dAX-08G9.js → xml-DNc0do_Y.js} +1 -1
- package/dist/client/assets/{xsl-mTp08Xh_.js → xsl-HF12enVp.js} +2 -2
- package/dist/client/assets/yaml-C44YtPPc.js +2 -0
- package/dist/client/component.svg +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/logo.svg +1 -0
- package/dist/dirs.js +1 -1
- package/dist/index.js +1243 -49
- package/dist/panel/index.js +37 -0
- package/package.json +9 -4
- package/dist/client/assets/angular-html-CAmvPqke.js +0 -5
- package/dist/client/assets/c-0S9FUYVg.js +0 -2
- package/dist/client/assets/cadence-Du0qqjuO.js +0 -3
- package/dist/client/assets/catppuccin-frappe-DZIny9D9.js +0 -2
- package/dist/client/assets/catppuccin-latte-HfmdJgD2.js +0 -2
- package/dist/client/assets/catppuccin-macchiato-1ffQHJ6s.js +0 -2
- package/dist/client/assets/catppuccin-mocha-DRYMSOp4.js +0 -2
- package/dist/client/assets/clarity-CW1NMBSy.js +0 -3
- package/dist/client/assets/cmake-87ADX9pg.js +0 -2
- package/dist/client/assets/cpp-B4kRV-Mr.js +0 -6
- package/dist/client/assets/csharp-CxX8v9Z1.js +0 -2
- package/dist/client/assets/csharp-DYqgfnaO.js +0 -3
- package/dist/client/assets/css-BmwDvvHL.js +0 -2
- package/dist/client/assets/csv-B2eUHTA8.js +0 -2
- package/dist/client/assets/diff-pjHYd3BC.js +0 -2
- package/dist/client/assets/fish-BlTQgKCk.js +0 -3
- package/dist/client/assets/fsharp-DyWqhI4o.js +0 -4
- package/dist/client/assets/gdscript-DLFBRMyo.js +0 -2
- package/dist/client/assets/gdshader-tCO8fx4f.js +0 -2
- package/dist/client/assets/glsl-D7d1_ns-.js +0 -3
- package/dist/client/assets/go-C2ti7VbT.js +0 -2
- package/dist/client/assets/graphql-CeZ4pvez.js +0 -6
- package/dist/client/assets/hack-BYb9BCJH.js +0 -11
- package/dist/client/assets/haml-DW6kjLLA.js +0 -4
- package/dist/client/assets/haxe-DIufun--.js +0 -2
- package/dist/client/assets/hlsl-C0jZ0PCe.js +0 -2
- package/dist/client/assets/html-BpqLChx7.js +0 -4
- package/dist/client/assets/hurl-Cq9E8TWb.js +0 -16
- package/dist/client/assets/index-Co6hzA6u.css +0 -443
- package/dist/client/assets/java-BUOns_Ip.js +0 -2
- package/dist/client/assets/javascript-qk0JMc6B.js +0 -2
- package/dist/client/assets/json-B7uypvxJ.js +0 -2
- package/dist/client/assets/jsx-CsU_AUfl.js +0 -2
- package/dist/client/assets/kdl-DVROzgs-.js +0 -3
- package/dist/client/assets/latex-CflrJF-D.js +0 -5
- package/dist/client/assets/lean-CPP8F_7u.js +0 -3
- package/dist/client/assets/less-CICUgOj-.js +0 -2
- package/dist/client/assets/lua-crOEWYZ0.js +0 -3
- package/dist/client/assets/markdown-BIZO6UqW.js +0 -2
- package/dist/client/assets/move-jfk5_q-h.js +0 -3
- package/dist/client/assets/nix-D9NfD_az.js +0 -3
- package/dist/client/assets/pages-BPB-93sD.js +0 -18
- package/dist/client/assets/php-Dqyegpf1.js +0 -9
- package/dist/client/assets/pkl-CTBspQUg.js +0 -3
- package/dist/client/assets/postcss-C4klqPVI.js +0 -2
- package/dist/client/assets/python-BmLHvQtk.js +0 -2
- package/dist/client/assets/r-CbolghQs.js +0 -2
- package/dist/client/assets/regexp-DJtnbMg9.js +0 -2
- package/dist/client/assets/rosmsg-CIAJEgNV.js +0 -3
- package/dist/client/assets/ruby-Y14tynbZ.js +0 -20
- package/dist/client/assets/scss-BP3WrVDm.js +0 -3
- package/dist/client/assets/sdbl-CLmP1IYn.js +0 -2
- package/dist/client/assets/shellscript-Bd0FHBYA.js +0 -2
- package/dist/client/assets/sql-DxeQhHVR.js +0 -2
- package/dist/client/assets/stylus-BcbGHyGm.js +0 -2
- package/dist/client/assets/tex-CrNYpU8F.js +0 -3
- package/dist/client/assets/tex-DQvqQIPT.js +0 -4
- package/dist/client/assets/tsx-BzJMQxCY.js +0 -2
- package/dist/client/assets/turtle-vZsG0FWM.js +0 -2
- package/dist/client/assets/typescript-nzfneafv.js +0 -2
- package/dist/client/assets/v-DMA-YYXE.js +0 -3
- package/dist/client/assets/vue-BuGHx9kw.js +0 -8
- package/dist/client/assets/xml-yLaOmctb.js +0 -3
- package/dist/client/assets/yaml-C5_iem5C.js +0 -2
- /package/dist/client/assets/{abap-C4bT1QEl.js → abap-BneqOAQn.js} +0 -0
- /package/dist/client/assets/{actionscript-3-BCWJ3mFB.js → actionscript-3-JJevXHHI.js} +0 -0
- /package/dist/client/assets/{ada-BwfYJ3cr.js → ada-Sz8xeSJ2.js} +0 -0
- /package/dist/client/assets/{andromeeda-B_6dIUNk.js → andromeeda-B43VcKOE.js} +0 -0
- /package/dist/client/assets/{apache-kfYmMYjJ.js → apache-CH7oaL9w.js} +0 -0
- /package/dist/client/assets/{apex-BEradrtF.js → apex-BpA7UqIt.js} +0 -0
- /package/dist/client/assets/{applescript-CuHZw4Cf.js → applescript-CINTpQFD.js} +0 -0
- /package/dist/client/assets/{ara-BkKR-TQQ.js → ara-C4GBn5cG.js} +0 -0
- /package/dist/client/assets/{asciidoc-CBayNp_C.js → asciidoc-CRs92jJ9.js} +0 -0
- /package/dist/client/assets/{asm-BwfqIsue.js → asm-Dcn9XRtC.js} +0 -0
- /package/dist/client/assets/{aurora-x-BXNTnfne.js → aurora-x-Blua-2Ng.js} +0 -0
- /package/dist/client/assets/{awk-BTtzreuE.js → awk-i3TwHhsk.js} +0 -0
- /package/dist/client/assets/{ayu-dark-DqipJzHd.js → ayu-dark-rqcwfyq7.js} +0 -0
- /package/dist/client/assets/{ballerina-Cr0e12Uh.js → ballerina-XubCZIu_.js} +0 -0
- /package/dist/client/assets/{bat--mz103Th.js → bat-CJDZmMbE.js} +0 -0
- /package/dist/client/assets/{berry-Bzd2YdCH.js → berry-CPchONJa.js} +0 -0
- /package/dist/client/assets/{bibtex-DT-WcF1n.js → bibtex-DVvKgGnw.js} +0 -0
- /package/dist/client/assets/{bicep-DUXUP27W.js → bicep-AnktATo6.js} +0 -0
- /package/dist/client/assets/{c-DcdCmnmu.js → c-vo15i6HS.js} +0 -0
- /package/dist/client/assets/{clojure-DkHpOkH2.js → clojure-C0jiC_f1.js} +0 -0
- /package/dist/client/assets/{cmake-CXVvo3Mh.js → cmake-es1DOjpX.js} +0 -0
- /package/dist/client/assets/{codeowners-DYf_YsrY.js → codeowners-DQKqJDHd.js} +0 -0
- /package/dist/client/assets/{codeql-BeSKjUdD.js → codeql-Dz54F1mo.js} +0 -0
- /package/dist/client/assets/{common-lisp-CsedMwlK.js → common-lisp-DMXHEDsU.js} +0 -0
- /package/dist/client/assets/{coq-Cfs5oQ5z.js → coq-B3EyCE2_.js} +0 -0
- /package/dist/client/assets/{css-DVW7ZXKV.js → css-BIIpc795.js} +0 -0
- /package/dist/client/assets/{cue-CzLrU992.js → cue-bqy7mysW.js} +0 -0
- /package/dist/client/assets/{cypher-C2RENEAP.js → cypher-CnGGPPF8.js} +0 -0
- /package/dist/client/assets/{d-BJOAQFpK.js → d-_v-0qIMo.js} +0 -0
- /package/dist/client/assets/{dart-B-KTJ0-J.js → dart-D7mvjjnO.js} +0 -0
- /package/dist/client/assets/{dax-B7qtS36S.js → dax-id_v9k01.js} +0 -0
- /package/dist/client/assets/{desktop-DfgAqZ8-.js → desktop-C63sB2uB.js} +0 -0
- /package/dist/client/assets/{diff-akky_HM9.js → diff-B5GyjU4M.js} +0 -0
- /package/dist/client/assets/{docker-CRnIvYqh.js → docker-5gOQFWt6.js} +0 -0
- /package/dist/client/assets/{dotenv-CwGZ7tJA.js → dotenv-CBz9ZAVs.js} +0 -0
- /package/dist/client/assets/{dracula-C0nacXF8.js → dracula-CVkeaATE.js} +0 -0
- /package/dist/client/assets/{dracula-soft-wdVBcfBY.js → dracula-soft-CMoFpNDM.js} +0 -0
- /package/dist/client/assets/{dream-maker-B9ezz9kX.js → dream-maker-DA2xoZVW.js} +0 -0
- /package/dist/client/assets/{emacs-lisp-fLGPzin6.js → emacs-lisp-BegAz5NS.js} +0 -0
- /package/dist/client/assets/{everforest-dark-NN95DCJl.js → everforest-dark-7_cjN5Ls.js} +0 -0
- /package/dist/client/assets/{everforest-light-idPY23JU.js → everforest-light-CZ9uP19Z.js} +0 -0
- /package/dist/client/assets/{fennel-CSR5Mk7N.js → fennel-CD-2iDIW.js} +0 -0
- /package/dist/client/assets/{fluent-TT7fQWak.js → fluent-DVPJ3-hM.js} +0 -0
- /package/dist/client/assets/{fortran-free-form-B1QQVoTU.js → fortran-free-form-1RD0EiW1.js} +0 -0
- /package/dist/client/assets/{gdscript-DLJhaHhX.js → gdscript-Ct_7YOkG.js} +0 -0
- /package/dist/client/assets/{gdshader-BFRlv_nM.js → gdshader-DirlFY6X.js} +0 -0
- /package/dist/client/assets/{genie-BmogPuVq.js → genie-AuuHiNUM.js} +0 -0
- /package/dist/client/assets/{gherkin-uh-Mxnsi.js → gherkin-DFKTJFbA.js} +0 -0
- /package/dist/client/assets/{github-dark-C6J_EBvu.js → github-dark-CPRAlY9A.js} +0 -0
- /package/dist/client/assets/{github-dark-default-DQDadoHp.js → github-dark-default-CZbASOwg.js} +0 -0
- /package/dist/client/assets/{github-dark-dimmed-DU7K1EZq.js → github-dark-dimmed-DhBVNpZK.js} +0 -0
- /package/dist/client/assets/{github-dark-high-contrast-BfsjVJDY.js → github-dark-high-contrast-Sr2JvhDL.js} +0 -0
- /package/dist/client/assets/{github-light-default-B_A-12O3.js → github-light-default-CcwDY4o-.js} +0 -0
- /package/dist/client/assets/{github-light-high-contrast-BhG28-t6.js → github-light-high-contrast-DiYFdlG4.js} +0 -0
- /package/dist/client/assets/{github-light-CM4f7fBZ.js → github-light-nsZZ__b4.js} +0 -0
- /package/dist/client/assets/{gleam-BByYw7_b.js → gleam-BHyqnKuN.js} +0 -0
- /package/dist/client/assets/{gnuplot-CgWtMBol.js → gnuplot-BLvFISGO.js} +0 -0
- /package/dist/client/assets/{go-B0RP9LHI.js → go-DdZjW6By.js} +0 -0
- /package/dist/client/assets/{groovy-Bpl59neu.js → groovy-cVQ6ZwgN.js} +0 -0
- /package/dist/client/assets/{haskell-BmWZ6TRE.js → haskell-Btp_MfgK.js} +0 -0
- /package/dist/client/assets/{haxe-D-HM2q7w.js → haxe-BRg8mBSK.js} +0 -0
- /package/dist/client/assets/{hcl-S6uG4iQ0.js → hcl-CApdjmWo.js} +0 -0
- /package/dist/client/assets/{hjson-mO0ORdeS.js → hjson-B8yyLN8N.js} +0 -0
- /package/dist/client/assets/{hlsl-hj232ngO.js → hlsl-DWQGecR0.js} +0 -0
- /package/dist/client/assets/{houston-CdK1CUz1.js → houston-Dq9ylkJH.js} +0 -0
- /package/dist/client/assets/{hy-DICTrdi3.js → hy-BeCIpdlw.js} +0 -0
- /package/dist/client/assets/{imba-kv1YCcqW.js → imba-DpPztiU8.js} +0 -0
- /package/dist/client/assets/{ini-CeoNvVsQ.js → ini-DebGZPuX.js} +0 -0
- /package/dist/client/assets/{java-DvTil0N3.js → java-CSuGW7pk.js} +0 -0
- /package/dist/client/assets/{json-DugJQEGz.js → json-N1bXK1S4.js} +0 -0
- /package/dist/client/assets/{json5-7yQVqemE.js → json5-BJHJ0To6.js} +0 -0
- /package/dist/client/assets/{jsonc-D8JMlU2y.js → jsonc-BRhkMZMN.js} +0 -0
- /package/dist/client/assets/{jsonl-C08qrvBf.js → jsonl-Dqt2JMW8.js} +0 -0
- /package/dist/client/assets/{jsonnet-BvmZyW4T.js → jsonnet-f3ibr2Yq.js} +0 -0
- /package/dist/client/assets/{jssm-DKBgqWqY.js → jssm-Cnr_fb09.js} +0 -0
- /package/dist/client/assets/{jsx-CT1RQ-OJ.js → jsx-BcRPVPD9.js} +0 -0
- /package/dist/client/assets/{kanagawa-dragon-CT0GKJCY.js → kanagawa-dragon-BV9Zk8qt.js} +0 -0
- /package/dist/client/assets/{kanagawa-lotus-BnTLrrY2.js → kanagawa-lotus-Axn-Auo6.js} +0 -0
- /package/dist/client/assets/{kanagawa-wave-DZKSoWHj.js → kanagawa-wave-DUnLhLrF.js} +0 -0
- /package/dist/client/assets/{kotlin-DccTc7ae.js → kotlin-B35H-nQ1.js} +0 -0
- /package/dist/client/assets/{kusto-DfjJ0A2b.js → kusto-JpEPj3V4.js} +0 -0
- /package/dist/client/assets/{laserwave-tIFKC5tj.js → laserwave-DiD8Onb6.js} +0 -0
- /package/dist/client/assets/{less-C1zBW-s6.js → less-DYcvZ1vs.js} +0 -0
- /package/dist/client/assets/{light-plus-DhWyKCGQ.js → light-plus-m_bgcHIo.js} +0 -0
- /package/dist/client/assets/{log-gyTYf2xU.js → log-BUigt4UI.js} +0 -0
- /package/dist/client/assets/{logo-DfMKoOqX.js → logo-BCINIXU4.js} +0 -0
- /package/dist/client/assets/{luau-B17X0UH2.js → luau-BZzhLdC_.js} +0 -0
- /package/dist/client/assets/{make-B8j2I5oP.js → make-kRm5bKuA.js} +0 -0
- /package/dist/client/assets/{markdown-DVA_ZXYg.js → markdown-6PLSK6_0.js} +0 -0
- /package/dist/client/assets/{material-theme-darker-FEG2rAOf.js → material-theme-darker-C4z_i_mu.js} +0 -0
- /package/dist/client/assets/{material-theme-CoPt-P4I.js → material-theme-kKgGr_7i.js} +0 -0
- /package/dist/client/assets/{material-theme-lighter-BF7TTIIN.js → material-theme-lighter-DbQ48hUl.js} +0 -0
- /package/dist/client/assets/{material-theme-ocean-DLZ8d_BI.js → material-theme-ocean-CpswQGq-.js} +0 -0
- /package/dist/client/assets/{material-theme-palenight-DDSTuCs0.js → material-theme-palenight-B9YdP00v.js} +0 -0
- /package/dist/client/assets/{matlab-k1xjK_b6.js → matlab-DFqu3muE.js} +0 -0
- /package/dist/client/assets/{mdx-BQUZJDaf.js → mdx-CDUtDhJ1.js} +0 -0
- /package/dist/client/assets/{mermaid-DJ04LSyL.js → mermaid-J0yr3y0m.js} +0 -0
- /package/dist/client/assets/{min-dark-B0gHld8V.js → min-dark-fcEqhRpI.js} +0 -0
- /package/dist/client/assets/{min-light-DsiXGiCk.js → min-light-DWVresoN.js} +0 -0
- /package/dist/client/assets/{mipsasm-eWlP57CF.js → mipsasm-5ppLD5jH.js} +0 -0
- /package/dist/client/assets/{mojo-DPKjCktn.js → mojo-Bk5yI3fr.js} +0 -0
- /package/dist/client/assets/{monokai-wE1Oe3ZE.js → monokai-BN_TBhb9.js} +0 -0
- /package/dist/client/assets/{narrat-pUgLLkv0.js → narrat-C6VnUWXS.js} +0 -0
- /package/dist/client/assets/{nextflow-Cc6ZMjG9.js → nextflow-sVcVU_R2.js} +0 -0
- /package/dist/client/assets/{night-owl-Bhwe1yQ8.js → night-owl-B29_KAmr.js} +0 -0
- /package/dist/client/assets/{nord-BSQfXDuM.js → nord-DH5uOgoE.js} +0 -0
- /package/dist/client/assets/{objective-c-DlHl8NyP.js → objective-c-BNhcDvrR.js} +0 -0
- /package/dist/client/assets/{objective-cpp-B0dcjsTM.js → objective-cpp-H1Owc-ej.js} +0 -0
- /package/dist/client/assets/{ocaml-F3DDYO_6.js → ocaml-BDFFD8DR.js} +0 -0
- /package/dist/client/assets/{one-dark-pro-B5HIL-pf.js → one-dark-pro-Hhca3JzB.js} +0 -0
- /package/dist/client/assets/{one-light-hd3TKOg4.js → one-light-CkAyoF0j.js} +0 -0
- /package/dist/client/assets/{pascal-k-jf8TbO.js → pascal-datMNmKx.js} +0 -0
- /package/dist/client/assets/{plastic-DTqiHuTe.js → plastic-1ETRJ1D-.js} +0 -0
- /package/dist/client/assets/{plsql-CronX4zK.js → plsql-DdbZbPNj.js} +0 -0
- /package/dist/client/assets/{po-DIoaMCjY.js → po-C6c1vTCK.js} +0 -0
- /package/dist/client/assets/{poimandres-Ct2BSofG.js → poimandres-CnlY1rVk.js} +0 -0
- /package/dist/client/assets/{polar-B5raTfsD.js → polar-2mcakGk2.js} +0 -0
- /package/dist/client/assets/{postcss-4oWH01ol.js → postcss-DRXKdNvs.js} +0 -0
- /package/dist/client/assets/{powerquery-Cq13nLq4.js → powerquery-Bskx_J2g.js} +0 -0
- /package/dist/client/assets/{powershell-u1gI72JX.js → powershell-BDMMRQG8.js} +0 -0
- /package/dist/client/assets/{prisma-HKQ5cqp8.js → prisma-B9kjRwd3.js} +0 -0
- /package/dist/client/assets/{prolog-BesjPHql.js → prolog-krySb6Vx.js} +0 -0
- /package/dist/client/assets/{proto-AagVn4-5.js → proto-BaKE0120.js} +0 -0
- /package/dist/client/assets/{puppet-DH-RAFaa.js → puppet-Do5i4j8B.js} +0 -0
- /package/dist/client/assets/{purescript-DfNGfmFP.js → purescript-BRN1yDPC.js} +0 -0
- /package/dist/client/assets/{python-Dn88StJc.js → python-CSI6xDEM.js} +0 -0
- /package/dist/client/assets/{qmldir-DDMrTfWZ.js → qmldir-CH4NwF2P.js} +0 -0
- /package/dist/client/assets/{qss-CHdy7svE.js → qss-Dy8PrTp1.js} +0 -0
- /package/dist/client/assets/{r-DT24G0Sx.js → r-B4QMIUOL.js} +0 -0
- /package/dist/client/assets/{racket-B79KAvJY.js → racket-wuRvcgGp.js} +0 -0
- /package/dist/client/assets/{raku-CTMhaGVX.js → raku-DsVSEccV.js} +0 -0
- /package/dist/client/assets/{red-CEj0QRPt.js → red-CSHNpN1R.js} +0 -0
- /package/dist/client/assets/{reg-Cypx77mL.js → reg-DYEGF8g9.js} +0 -0
- /package/dist/client/assets/{regexp-ClZtLNbS.js → regexp-BYt9QUJK.js} +0 -0
- /package/dist/client/assets/{rel-BpE3syVu.js → rel-B2-IkXcx.js} +0 -0
- /package/dist/client/assets/{riscv-DyE_5IvB.js → riscv-DVzb-nnG.js} +0 -0
- /package/dist/client/assets/{rose-pine-6IUiFzUI.js → rose-pine-CpIPLGs4.js} +0 -0
- /package/dist/client/assets/{rose-pine-dawn-DoRlotcg.js → rose-pine-dawn-BruRtD0n.js} +0 -0
- /package/dist/client/assets/{rose-pine-moon-B5Df1HyW.js → rose-pine-moon-CuLUPl8L.js} +0 -0
- /package/dist/client/assets/{rust-DJhGYCa5.js → rust-DIxn70Bc.js} +0 -0
- /package/dist/client/assets/{sass-DeLGkK3L.js → sass-PfnQUa_g.js} +0 -0
- /package/dist/client/assets/{scala-cReyE3Yh.js → scala-BBzrXTKG.js} +0 -0
- /package/dist/client/assets/{scheme-B1Lo-75f.js → scheme-YR9NA8ZM.js} +0 -0
- /package/dist/client/assets/{sdbl-BKlGfwqV.js → sdbl-t_ZuHY19.js} +0 -0
- /package/dist/client/assets/{shellscript-DsF2JDJS.js → shellscript-DudglamS.js} +0 -0
- /package/dist/client/assets/{slack-dark-BmjvCrQc.js → slack-dark-D6KJ2ZHk.js} +0 -0
- /package/dist/client/assets/{slack-ochin-PXT7PX3o.js → slack-ochin-CgGPHUxy.js} +0 -0
- /package/dist/client/assets/{smalltalk-B3peVJF-.js → smalltalk-9xhKYkIL.js} +0 -0
- /package/dist/client/assets/{snazzy-light-DJv4SeqQ.js → snazzy-light-CYNZ3aPZ.js} +0 -0
- /package/dist/client/assets/{solarized-dark-BvCiP_16.js → solarized-dark-C-DYAQzw.js} +0 -0
- /package/dist/client/assets/{solarized-light-Bcu-a8JZ.js → solarized-light-klFMqjBj.js} +0 -0
- /package/dist/client/assets/{solidity-2avG4OxK.js → solidity-Ozd5FRLq.js} +0 -0
- /package/dist/client/assets/{splunk-UTnMmJ7Q.js → splunk-BeKRTE5f.js} +0 -0
- /package/dist/client/assets/{sql-DJRi7-HS.js → sql-BNXsYZV2.js} +0 -0
- /package/dist/client/assets/{ssh-config-Du7ucyU5.js → ssh-config-CrEKc8er.js} +0 -0
- /package/dist/client/assets/{stylus-ESl0ir-D.js → stylus-BwRZfacm.js} +0 -0
- /package/dist/client/assets/{swift-BEUwwDAA.js → swift-BCxbwyiK.js} +0 -0
- /package/dist/client/assets/{synthwave-84-BIVTX2kK.js → synthwave-84-DrmUwzTK.js} +0 -0
- /package/dist/client/assets/{system-verilog-jIIGzizp.js → system-verilog-BxAPtrDd.js} +0 -0
- /package/dist/client/assets/{systemd-Do-I7Dk6.js → systemd-BUuSsiDV.js} +0 -0
- /package/dist/client/assets/{talonscript-B8BQ8lUi.js → talonscript-Cuu-B8IR.js} +0 -0
- /package/dist/client/assets/{tasl-Yr56vlbD.js → tasl-i94Nm9X2.js} +0 -0
- /package/dist/client/assets/{tcl-DHCz_jpi.js → tcl-JtwPeyJe.js} +0 -0
- /package/dist/client/assets/{terraform-CFJJDCa4.js → terraform-H_gFhmGE.js} +0 -0
- /package/dist/client/assets/{tokyo-night-C-8sx9_4.js → tokyo-night-DJ3fbRL-.js} +0 -0
- /package/dist/client/assets/{toml-CBSc9ib7.js → toml-Czn4TMmG.js} +0 -0
- /package/dist/client/assets/{tsv-B0JD-xkP.js → tsv-D7JVv6cM.js} +0 -0
- /package/dist/client/assets/{tsx-BV_Ie_mt.js → tsx-CSxn0co8.js} +0 -0
- /package/dist/client/assets/{turtle-kxVyEHLU.js → turtle-gL243zka.js} +0 -0
- /package/dist/client/assets/{typespec-DCuJQu6m.js → typespec-ChNe-9Bn.js} +0 -0
- /package/dist/client/assets/{typst-BDgLoDzV.js → typst-lzp37gIG.js} +0 -0
- /package/dist/client/assets/{vala-BtBKHkJB.js → vala-DQwyfTuQ.js} +0 -0
- /package/dist/client/assets/{vb-CyVTXibQ.js → vb-DG-y450E.js} +0 -0
- /package/dist/client/assets/{verilog-CC_Yo3jQ.js → verilog-CGyXGbfs.js} +0 -0
- /package/dist/client/assets/{vesper-BLuvFGfg.js → vesper-onTZvQE4.js} +0 -0
- /package/dist/client/assets/{vhdl-C7ADyr0o.js → vhdl-Bmc1tQry.js} +0 -0
- /package/dist/client/assets/{viml-hax2M4w6.js → viml-HNAopjhZ.js} +0 -0
- /package/dist/client/assets/{vitesse-black-58mZKXM9.js → vitesse-black-Dpu_nmGn.js} +0 -0
- /package/dist/client/assets/{vitesse-dark-BE2jsHp9.js → vitesse-dark-COIKPj8_.js} +0 -0
- /package/dist/client/assets/{vitesse-light-Bko17iRe.js → vitesse-light-BGqXUuET.js} +0 -0
- /package/dist/client/assets/{vyper-BDpDemAA.js → vyper-BcdH-HiN.js} +0 -0
- /package/dist/client/assets/{wasm-C9wAFEif.js → wasm-B7JigFSi.js} +0 -0
- /package/dist/client/assets/{wasm-BuJrhBgW.js → wasm-CGqR8-aw.js} +0 -0
- /package/dist/client/assets/{wenyan-DSsQqdmG.js → wenyan-BTFknrNi.js} +0 -0
- /package/dist/client/assets/{wgsl-CMOam7bY.js → wgsl-BPUHKtQI.js} +0 -0
- /package/dist/client/assets/{wikitext-BqkWeRVY.js → wikitext-DUrIafj7.js} +0 -0
- /package/dist/client/assets/{wit-CHHZn0fR.js → wit-CQC-whBg.js} +0 -0
- /package/dist/client/assets/{wolfram-DhJOgCbz.js → wolfram-DNZpEQsI.js} +0 -0
- /package/dist/client/assets/{yaml-CN2n3pDD.js → yaml-QnybJTzt.js} +0 -0
- /package/dist/client/assets/{zenscript-BmWf_m5U.js → zenscript-CK7CgSxa.js} +0 -0
- /package/dist/client/assets/{zig-QOlp4jTZ.js → zig-CHGlMKvF.js} +0 -0
- /package/dist/{constants-UFbHdbb_.d.ts → constants.d.ts} +0 -0
- /package/dist/{dirs-BhGo-R8f.d.ts → dirs.d.ts} +0 -0
- /package/dist/{dirs-CGtxqpuD.js → dirs2.js} +0 -0
- /package/dist/{index-5Ryyp7rL.d.ts → index.d.ts} +0 -0
- /package/dist/panel/{index-DEctj04d.d.ts → index.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { t as DIR_CLIENT } from "./
|
|
1
|
+
import { t as DIR_CLIENT } from "./dirs2.js";
|
|
2
2
|
import { basename, dirname, extname, join, relative } from "node:path";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import sirv from "sirv";
|
|
5
|
-
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
5
|
+
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
6
6
|
import { readdir } from "node:fs/promises";
|
|
7
|
+
import { js, ts, tsx } from "@ast-grep/napi";
|
|
7
8
|
|
|
8
9
|
//#region src/server/controller/api.ts
|
|
9
10
|
const REQUEST_MODULE_EXTENSIONS = [
|
|
@@ -191,7 +192,7 @@ async function loadOpenapiConfig(configPath) {
|
|
|
191
192
|
* @returns 解析得到的 API 函数列表
|
|
192
193
|
*/
|
|
193
194
|
function extractApiFunctions(content, filePath, requestClient, requestModulePath, requestModuleResolvedPath) {
|
|
194
|
-
const functions = [];
|
|
195
|
+
const functions$1 = [];
|
|
195
196
|
const functionRegex = /\/\*\*\s*\n([^*]*(?:\*(?!\/)[^*]*)*)\*\/\s*export\s+function\s+(\w+)[^(]*\(([^)]*)\)/g;
|
|
196
197
|
let match = functionRegex.exec(content);
|
|
197
198
|
while (match !== null) {
|
|
@@ -216,7 +217,7 @@ function extractApiFunctions(content, filePath, requestClient, requestModulePath
|
|
|
216
217
|
let returnType;
|
|
217
218
|
const returnTypeMatch = /R\s*=\s*(API\.\w+)/.exec(params);
|
|
218
219
|
if (returnTypeMatch) returnType = returnTypeMatch[1];
|
|
219
|
-
functions.push({
|
|
220
|
+
functions$1.push({
|
|
220
221
|
name: functionName,
|
|
221
222
|
description,
|
|
222
223
|
url,
|
|
@@ -231,7 +232,7 @@ function extractApiFunctions(content, filePath, requestClient, requestModulePath
|
|
|
231
232
|
});
|
|
232
233
|
match = functionRegex.exec(content);
|
|
233
234
|
}
|
|
234
|
-
return functions;
|
|
235
|
+
return functions$1;
|
|
235
236
|
}
|
|
236
237
|
/**
|
|
237
238
|
* 将 TypeScript 类型(字面量对象类型)解析为简化的 JSON Schema 片段。
|
|
@@ -395,8 +396,8 @@ async function scanApiDirectory(dir, root, aliasEntries) {
|
|
|
395
396
|
module.types.push(...types);
|
|
396
397
|
}
|
|
397
398
|
} else if (entry.name !== "index.ts") {
|
|
398
|
-
const functions = extractApiFunctions(content, relativePath, requestClient, requestModulePath, requestModuleResolvedPath);
|
|
399
|
-
if (functions.length > 0) {
|
|
399
|
+
const functions$1 = extractApiFunctions(content, relativePath, requestClient, requestModulePath, requestModuleResolvedPath);
|
|
400
|
+
if (functions$1.length > 0) {
|
|
400
401
|
const moduleDir = relative(root, dir);
|
|
401
402
|
let module = modules.find((m) => m.path === moduleDir);
|
|
402
403
|
if (!module) {
|
|
@@ -407,7 +408,7 @@ async function scanApiDirectory(dir, root, aliasEntries) {
|
|
|
407
408
|
};
|
|
408
409
|
modules.push(module);
|
|
409
410
|
}
|
|
410
|
-
if (typingsContent) for (const func of functions) {
|
|
411
|
+
if (typingsContent) for (const func of functions$1) {
|
|
411
412
|
if (func.paramType) {
|
|
412
413
|
const schema = parseTypeToSchema(typingsContent, func.paramType);
|
|
413
414
|
if (schema) func.paramSchema = schema;
|
|
@@ -417,7 +418,7 @@ async function scanApiDirectory(dir, root, aliasEntries) {
|
|
|
417
418
|
if (schema) func.returnSchema = schema;
|
|
418
419
|
}
|
|
419
420
|
}
|
|
420
|
-
module.functions.push(...functions);
|
|
421
|
+
module.functions.push(...functions$1);
|
|
421
422
|
}
|
|
422
423
|
}
|
|
423
424
|
}
|
|
@@ -486,49 +487,1174 @@ async function getRequestList(root) {
|
|
|
486
487
|
}
|
|
487
488
|
|
|
488
489
|
//#endregion
|
|
489
|
-
//#region src/
|
|
490
|
+
//#region src/@data/pubinfo.ts
|
|
491
|
+
const pubinfoImport = [
|
|
492
|
+
{
|
|
493
|
+
type: "import",
|
|
494
|
+
name: "createPubinfoProvider",
|
|
495
|
+
package: "pubinfo-pr"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
type: "import",
|
|
499
|
+
name: "pubinfoInjectionKey",
|
|
500
|
+
package: "pubinfo-pr"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
type: "import",
|
|
504
|
+
name: "createRequest",
|
|
505
|
+
package: "pubinfo-pr"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
type: "import",
|
|
509
|
+
name: "defineIconModule",
|
|
510
|
+
package: "pubinfo-pr"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
type: "import",
|
|
514
|
+
name: "defineRouteModule",
|
|
515
|
+
package: "pubinfo-pr"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
type: "import",
|
|
519
|
+
name: "getAllIconModules",
|
|
520
|
+
package: "pubinfo-pr"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
type: "import",
|
|
524
|
+
name: "getAllRouteModules",
|
|
525
|
+
package: "pubinfo-pr"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
type: "import",
|
|
529
|
+
name: "readProjectModules",
|
|
530
|
+
package: "pubinfo-pr"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
type: "import",
|
|
534
|
+
name: "updateWatermark",
|
|
535
|
+
package: "pubinfo-pr"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
type: "import",
|
|
539
|
+
name: "cleanup",
|
|
540
|
+
package: "pubinfo-pr"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
type: "import",
|
|
544
|
+
name: "cleanupWithoutUser",
|
|
545
|
+
package: "pubinfo-pr"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
type: "import",
|
|
549
|
+
name: "clearPersistedState",
|
|
550
|
+
package: "pubinfo-pr"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
type: "import",
|
|
554
|
+
name: "createContext",
|
|
555
|
+
package: "pubinfo-pr"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
type: "import",
|
|
559
|
+
name: "createRawContext",
|
|
560
|
+
package: "pubinfo-pr"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
type: "import",
|
|
564
|
+
name: "getPersistedState",
|
|
565
|
+
package: "pubinfo-pr"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
type: "import",
|
|
569
|
+
name: "getPubinfoNamespace",
|
|
570
|
+
package: "pubinfo-pr"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
type: "import",
|
|
574
|
+
name: "publicKeyEncryption",
|
|
575
|
+
package: "pubinfo-pr"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
type: "import",
|
|
579
|
+
name: "setPersistedState",
|
|
580
|
+
package: "pubinfo-pr"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
type: "import",
|
|
584
|
+
name: "storage",
|
|
585
|
+
package: "pubinfo-pr"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
type: "import",
|
|
589
|
+
name: "wrapProxy",
|
|
590
|
+
package: "pubinfo-pr"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
type: "import",
|
|
594
|
+
name: "createPubinfo",
|
|
595
|
+
package: "pubinfo-pr"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
type: "import",
|
|
599
|
+
name: "useAuth",
|
|
600
|
+
package: "pubinfo-pr"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
type: "import",
|
|
604
|
+
name: "createLog",
|
|
605
|
+
package: "pubinfo-pr"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
type: "import",
|
|
609
|
+
name: "useError",
|
|
610
|
+
package: "pubinfo-pr"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
type: "import",
|
|
614
|
+
name: "useSuccess",
|
|
615
|
+
package: "pubinfo-pr"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
type: "import",
|
|
619
|
+
name: "useWarn",
|
|
620
|
+
package: "pubinfo-pr"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
type: "import",
|
|
624
|
+
name: "useInfo",
|
|
625
|
+
package: "pubinfo-pr"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
type: "import",
|
|
629
|
+
name: "useStart",
|
|
630
|
+
package: "pubinfo-pr"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
type: "import",
|
|
634
|
+
name: "useBox",
|
|
635
|
+
package: "pubinfo-pr"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
type: "import",
|
|
639
|
+
name: "usePartyLogin",
|
|
640
|
+
package: "pubinfo-pr"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
type: "import",
|
|
644
|
+
name: "useTheme",
|
|
645
|
+
package: "pubinfo-pr"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
type: "import",
|
|
649
|
+
name: "watchDiffObject",
|
|
650
|
+
package: "pubinfo-pr"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
type: "import",
|
|
654
|
+
name: "createPubinfoContext",
|
|
655
|
+
package: "pubinfo-pr"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
type: "import",
|
|
659
|
+
name: "usePubinfoContext",
|
|
660
|
+
package: "pubinfo-pr"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
type: "import",
|
|
664
|
+
name: "defineSystemRoutes",
|
|
665
|
+
package: "pubinfo-pr"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
type: "import",
|
|
669
|
+
name: "getSystemRoutes",
|
|
670
|
+
package: "pubinfo-pr"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
type: "import",
|
|
674
|
+
name: "defineAsyncRoutes",
|
|
675
|
+
package: "pubinfo-pr"
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
type: "import",
|
|
679
|
+
name: "getAsyncRoutes",
|
|
680
|
+
package: "pubinfo-pr"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
type: "import",
|
|
684
|
+
name: "defineSettings",
|
|
685
|
+
package: "pubinfo-pr"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
type: "import",
|
|
689
|
+
name: "getSettings",
|
|
690
|
+
package: "pubinfo-pr"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
type: "import",
|
|
694
|
+
name: "useFavoritesStore",
|
|
695
|
+
package: "pubinfo-pr"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
type: "import",
|
|
699
|
+
name: "useIframeStore",
|
|
700
|
+
package: "pubinfo-pr"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
type: "import",
|
|
704
|
+
name: "useKeepAliveStore",
|
|
705
|
+
package: "pubinfo-pr"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
type: "import",
|
|
709
|
+
name: "useMenuStore",
|
|
710
|
+
package: "pubinfo-pr"
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
type: "import",
|
|
714
|
+
name: "useRouteStore",
|
|
715
|
+
package: "pubinfo-pr"
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
type: "import",
|
|
719
|
+
name: "useSettingsStore",
|
|
720
|
+
package: "pubinfo-pr"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
type: "import",
|
|
724
|
+
name: "useTabbarStore",
|
|
725
|
+
package: "pubinfo-pr"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
type: "import",
|
|
729
|
+
name: "useUserStore",
|
|
730
|
+
package: "pubinfo-pr"
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
type: "import",
|
|
734
|
+
name: "formatBackRoutes",
|
|
735
|
+
package: "pubinfo-pr"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
type: "import",
|
|
739
|
+
name: "filterEmptyComponentRoutes",
|
|
740
|
+
package: "pubinfo-pr"
|
|
741
|
+
}
|
|
742
|
+
];
|
|
743
|
+
const pubinfoComponent = [
|
|
744
|
+
{
|
|
745
|
+
type: "component",
|
|
746
|
+
name: "PubinfoDev",
|
|
747
|
+
package: "pubinfo-pr"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
type: "component",
|
|
751
|
+
name: "Copyright",
|
|
752
|
+
package: "pubinfo-pr"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
type: "component",
|
|
756
|
+
name: "Layout",
|
|
757
|
+
package: "pubinfo-pr"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
type: "component",
|
|
761
|
+
name: "LayoutHeader",
|
|
762
|
+
package: "pubinfo-pr"
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
type: "component",
|
|
766
|
+
name: "LayoutContent",
|
|
767
|
+
package: "pubinfo-pr"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
type: "component",
|
|
771
|
+
name: "LayoutProvider",
|
|
772
|
+
package: "pubinfo-pr"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
type: "component",
|
|
776
|
+
name: "LayoutSidebar",
|
|
777
|
+
package: "pubinfo-pr"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
type: "component",
|
|
781
|
+
name: "LayoutTopbar",
|
|
782
|
+
package: "pubinfo-pr"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
type: "component",
|
|
786
|
+
name: "Logo",
|
|
787
|
+
package: "pubinfo-pr"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
type: "component",
|
|
791
|
+
name: "NotAllowed",
|
|
792
|
+
package: "pubinfo-pr"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
type: "component",
|
|
796
|
+
name: "Tool",
|
|
797
|
+
package: "pubinfo-pr"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
type: "component",
|
|
801
|
+
name: "Tools",
|
|
802
|
+
package: "pubinfo-pr"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
type: "component",
|
|
806
|
+
name: "PageHeader",
|
|
807
|
+
package: "pubinfo-pr"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
type: "component",
|
|
811
|
+
name: "PageMain",
|
|
812
|
+
package: "pubinfo-pr"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
type: "component",
|
|
816
|
+
name: "PartyLoginModal",
|
|
817
|
+
package: "pubinfo-pr"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
type: "component",
|
|
821
|
+
name: "PassStrengthValidator",
|
|
822
|
+
package: "pubinfo-pr"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
type: "component",
|
|
826
|
+
name: "PubinfoApp",
|
|
827
|
+
package: "pubinfo-pr"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
type: "component",
|
|
831
|
+
name: "PubinfoIcon",
|
|
832
|
+
package: "pubinfo-pr"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
type: "component",
|
|
836
|
+
name: "PubinfoIconPrismBox",
|
|
837
|
+
package: "pubinfo-pr"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
type: "component",
|
|
841
|
+
name: "PubinfoIconSquareBox",
|
|
842
|
+
package: "pubinfo-pr"
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
type: "component",
|
|
846
|
+
name: "PubinfoProvider",
|
|
847
|
+
package: "pubinfo-pr"
|
|
848
|
+
}
|
|
849
|
+
];
|
|
850
|
+
|
|
851
|
+
//#endregion
|
|
852
|
+
//#region src/@data/vue.ts
|
|
853
|
+
const vueImport = [
|
|
854
|
+
{
|
|
855
|
+
type: "import",
|
|
856
|
+
name: "onActivated",
|
|
857
|
+
package: "vue"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
type: "import",
|
|
861
|
+
name: "onBeforeMount",
|
|
862
|
+
package: "vue"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
type: "import",
|
|
866
|
+
name: "onBeforeUnmount",
|
|
867
|
+
package: "vue"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
type: "import",
|
|
871
|
+
name: "onBeforeUpdate",
|
|
872
|
+
package: "vue"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
type: "import",
|
|
876
|
+
name: "onErrorCaptured",
|
|
877
|
+
package: "vue"
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
type: "import",
|
|
881
|
+
name: "onDeactivated",
|
|
882
|
+
package: "vue"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
type: "import",
|
|
886
|
+
name: "onMounted",
|
|
887
|
+
package: "vue"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
type: "import",
|
|
891
|
+
name: "onServerPrefetch",
|
|
892
|
+
package: "vue"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
type: "import",
|
|
896
|
+
name: "onUnmounted",
|
|
897
|
+
package: "vue"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
type: "import",
|
|
901
|
+
name: "onUpdated",
|
|
902
|
+
package: "vue"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
type: "import",
|
|
906
|
+
name: "useAttrs",
|
|
907
|
+
package: "vue"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
type: "import",
|
|
911
|
+
name: "useSlots",
|
|
912
|
+
package: "vue"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
type: "import",
|
|
916
|
+
name: "computed",
|
|
917
|
+
package: "vue"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
type: "import",
|
|
921
|
+
name: "customRef",
|
|
922
|
+
package: "vue"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
type: "import",
|
|
926
|
+
name: "isReadonly",
|
|
927
|
+
package: "vue"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
type: "import",
|
|
931
|
+
name: "isRef",
|
|
932
|
+
package: "vue"
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
type: "import",
|
|
936
|
+
name: "isShallow",
|
|
937
|
+
package: "vue"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
type: "import",
|
|
941
|
+
name: "isProxy",
|
|
942
|
+
package: "vue"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
type: "import",
|
|
946
|
+
name: "isReactive",
|
|
947
|
+
package: "vue"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
type: "import",
|
|
951
|
+
name: "markRaw",
|
|
952
|
+
package: "vue"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
type: "import",
|
|
956
|
+
name: "reactive",
|
|
957
|
+
package: "vue"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
type: "import",
|
|
961
|
+
name: "readonly",
|
|
962
|
+
package: "vue"
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
type: "import",
|
|
966
|
+
name: "ref",
|
|
967
|
+
package: "vue"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
type: "import",
|
|
971
|
+
name: "shallowReactive",
|
|
972
|
+
package: "vue"
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
type: "import",
|
|
976
|
+
name: "shallowReadonly",
|
|
977
|
+
package: "vue"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
type: "import",
|
|
981
|
+
name: "shallowRef",
|
|
982
|
+
package: "vue"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
type: "import",
|
|
986
|
+
name: "triggerRef",
|
|
987
|
+
package: "vue"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
type: "import",
|
|
991
|
+
name: "toRaw",
|
|
992
|
+
package: "vue"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
type: "import",
|
|
996
|
+
name: "toRef",
|
|
997
|
+
package: "vue"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
type: "import",
|
|
1001
|
+
name: "toRefs",
|
|
1002
|
+
package: "vue"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
type: "import",
|
|
1006
|
+
name: "toValue",
|
|
1007
|
+
package: "vue"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
type: "import",
|
|
1011
|
+
name: "unref",
|
|
1012
|
+
package: "vue"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
type: "import",
|
|
1016
|
+
name: "watch",
|
|
1017
|
+
package: "vue"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
type: "import",
|
|
1021
|
+
name: "watchEffect",
|
|
1022
|
+
package: "vue"
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
type: "import",
|
|
1026
|
+
name: "watchPostEffect",
|
|
1027
|
+
package: "vue"
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
type: "import",
|
|
1031
|
+
name: "watchSyncEffect",
|
|
1032
|
+
package: "vue"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
type: "import",
|
|
1036
|
+
name: "defineComponent",
|
|
1037
|
+
package: "vue"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
type: "import",
|
|
1041
|
+
name: "defineAsyncComponent",
|
|
1042
|
+
package: "vue"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
type: "import",
|
|
1046
|
+
name: "getCurrentInstance",
|
|
1047
|
+
package: "vue"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
type: "import",
|
|
1051
|
+
name: "h",
|
|
1052
|
+
package: "vue"
|
|
1053
|
+
},
|
|
1054
|
+
{
|
|
1055
|
+
type: "import",
|
|
1056
|
+
name: "inject",
|
|
1057
|
+
package: "vue"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
type: "import",
|
|
1061
|
+
name: "nextTick",
|
|
1062
|
+
package: "vue"
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
type: "import",
|
|
1066
|
+
name: "provide",
|
|
1067
|
+
package: "vue"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
type: "import",
|
|
1071
|
+
name: "useCssModule",
|
|
1072
|
+
package: "vue"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
type: "import",
|
|
1076
|
+
name: "createApp",
|
|
1077
|
+
package: "vue"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
type: "import",
|
|
1081
|
+
name: "effectScope",
|
|
1082
|
+
package: "vue"
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
type: "import",
|
|
1086
|
+
name: "EffectScope",
|
|
1087
|
+
package: "vue"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
type: "import",
|
|
1091
|
+
name: "getCurrentScope",
|
|
1092
|
+
package: "vue"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
type: "import",
|
|
1096
|
+
name: "onScopeDispose",
|
|
1097
|
+
package: "vue"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
type: "import",
|
|
1101
|
+
name: "onRenderTracked",
|
|
1102
|
+
package: "vue"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
type: "import",
|
|
1106
|
+
name: "onRenderTriggered",
|
|
1107
|
+
package: "vue"
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
type: "import",
|
|
1111
|
+
name: "resolveComponent",
|
|
1112
|
+
package: "vue"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
type: "import",
|
|
1116
|
+
name: "useCssVars",
|
|
1117
|
+
package: "vue"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
type: "import",
|
|
1121
|
+
name: "useModel",
|
|
1122
|
+
package: "vue"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
type: "import",
|
|
1126
|
+
name: "getCurrentWatcher",
|
|
1127
|
+
package: "vue"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
type: "import",
|
|
1131
|
+
name: "onWatcherCleanup",
|
|
1132
|
+
package: "vue"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
type: "import",
|
|
1136
|
+
name: "useId",
|
|
1137
|
+
package: "vue"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
type: "import",
|
|
1141
|
+
name: "useTemplateRef",
|
|
1142
|
+
package: "vue"
|
|
1143
|
+
}
|
|
1144
|
+
];
|
|
1145
|
+
const vueComponent = [
|
|
1146
|
+
{
|
|
1147
|
+
type: "component",
|
|
1148
|
+
name: "Transition",
|
|
1149
|
+
package: "vue"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
type: "component",
|
|
1153
|
+
name: "TransitionGroup",
|
|
1154
|
+
package: "vue"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
type: "component",
|
|
1158
|
+
name: "KeepAlive",
|
|
1159
|
+
package: "vue"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
type: "component",
|
|
1163
|
+
name: "Teleport",
|
|
1164
|
+
package: "vue"
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
type: "component",
|
|
1168
|
+
name: "Suspense",
|
|
1169
|
+
package: "vue"
|
|
1170
|
+
}
|
|
1171
|
+
];
|
|
1172
|
+
|
|
1173
|
+
//#endregion
|
|
1174
|
+
//#region src/@data/index.ts
|
|
1175
|
+
const functions = [...vueImport, ...pubinfoImport];
|
|
1176
|
+
const components = [...vueComponent, ...pubinfoComponent];
|
|
1177
|
+
|
|
1178
|
+
//#endregion
|
|
1179
|
+
//#region src/server/utils/ast-analyzer.ts
|
|
490
1180
|
/**
|
|
491
|
-
*
|
|
492
|
-
* 这些目录通常体积较大或为构建产物,对健康检查意义不大。
|
|
1181
|
+
* 递归扫描目录获取所有源文件
|
|
493
1182
|
*/
|
|
494
|
-
|
|
495
|
-
".
|
|
496
|
-
"
|
|
497
|
-
"
|
|
498
|
-
|
|
1183
|
+
function getAllSourceFiles(dir, extensions = [
|
|
1184
|
+
".ts",
|
|
1185
|
+
".tsx",
|
|
1186
|
+
".js",
|
|
1187
|
+
".jsx",
|
|
1188
|
+
".vue"
|
|
1189
|
+
]) {
|
|
1190
|
+
const files = [];
|
|
1191
|
+
function scan(currentDir) {
|
|
1192
|
+
try {
|
|
1193
|
+
const entries = readdirSync(currentDir);
|
|
1194
|
+
for (const entry of entries) {
|
|
1195
|
+
const fullPath = join(currentDir, entry);
|
|
1196
|
+
try {
|
|
1197
|
+
const stat = statSync(fullPath);
|
|
1198
|
+
if (stat.isDirectory()) {
|
|
1199
|
+
if (![
|
|
1200
|
+
"node_modules",
|
|
1201
|
+
"dist",
|
|
1202
|
+
"build",
|
|
1203
|
+
".git",
|
|
1204
|
+
"coverage",
|
|
1205
|
+
".pubinfo"
|
|
1206
|
+
].includes(entry)) scan(fullPath);
|
|
1207
|
+
} else if (stat.isFile()) {
|
|
1208
|
+
const ext = extname(fullPath);
|
|
1209
|
+
if (extensions.includes(ext)) files.push(fullPath);
|
|
1210
|
+
}
|
|
1211
|
+
} catch (error) {
|
|
1212
|
+
console.warn(`无法访问: ${fullPath}`, error);
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
} catch (error) {
|
|
1216
|
+
console.warn(`无法读取目录: ${currentDir}`, error);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
scan(dir);
|
|
1220
|
+
return files;
|
|
1221
|
+
}
|
|
499
1222
|
/**
|
|
500
|
-
*
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
1223
|
+
* 根据文件扩展名选择解析器
|
|
1224
|
+
*/
|
|
1225
|
+
function getParser(filePath) {
|
|
1226
|
+
switch (extname(filePath)) {
|
|
1227
|
+
case ".tsx":
|
|
1228
|
+
case ".jsx": return tsx;
|
|
1229
|
+
case ".js": return js;
|
|
1230
|
+
case ".ts":
|
|
1231
|
+
case ".vue":
|
|
1232
|
+
default: return ts;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* 分析 Vue 组件使用情况
|
|
1237
|
+
*/
|
|
1238
|
+
function analyzeComponentUsage(content, componentName, filePath) {
|
|
1239
|
+
const locations = [];
|
|
1240
|
+
try {
|
|
1241
|
+
const matches = getParser(filePath).parse(content).root().findAll({ rule: {
|
|
1242
|
+
kind: "jsx_opening_element",
|
|
1243
|
+
pattern: `<${componentName}`
|
|
1244
|
+
} });
|
|
1245
|
+
for (const match of matches) {
|
|
1246
|
+
const range = match.range();
|
|
1247
|
+
locations.push({
|
|
1248
|
+
file: filePath,
|
|
1249
|
+
line: range.start.line + 1,
|
|
1250
|
+
column: range.start.column + 1,
|
|
1251
|
+
code: match.text().slice(0, 100)
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
} catch (error) {}
|
|
1255
|
+
if (filePath.endsWith(".vue")) {
|
|
1256
|
+
const templateRegex = new RegExp(`<${componentName}[\\s>]`, "g");
|
|
1257
|
+
const lines = content.split("\n");
|
|
1258
|
+
let match = templateRegex.exec(content);
|
|
1259
|
+
while (match !== null) {
|
|
1260
|
+
const pos = match.index;
|
|
1261
|
+
let lineNum = 0;
|
|
1262
|
+
let charCount = 0;
|
|
1263
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1264
|
+
charCount += lines[i].length + 1;
|
|
1265
|
+
if (charCount > pos) {
|
|
1266
|
+
lineNum = i + 1;
|
|
1267
|
+
break;
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
locations.push({
|
|
1271
|
+
file: filePath,
|
|
1272
|
+
line: lineNum,
|
|
1273
|
+
column: pos - (charCount - lines[lineNum - 1].length - 1) + 1,
|
|
1274
|
+
code: lines[lineNum - 1].trim().slice(0, 100)
|
|
1275
|
+
});
|
|
1276
|
+
match = templateRegex.exec(content);
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
return locations;
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* 分析函数/方法使用情况
|
|
1283
|
+
*/
|
|
1284
|
+
function analyzeFunctionUsage(content, functionName, filePath) {
|
|
1285
|
+
const locations = [];
|
|
1286
|
+
try {
|
|
1287
|
+
const root = getParser(filePath).parse(content);
|
|
1288
|
+
const callMatches = root.root().findAll({ rule: {
|
|
1289
|
+
kind: "call_expression",
|
|
1290
|
+
pattern: `${functionName}($$$)`
|
|
1291
|
+
} });
|
|
1292
|
+
for (const match of callMatches) {
|
|
1293
|
+
const range = match.range();
|
|
1294
|
+
locations.push({
|
|
1295
|
+
file: filePath,
|
|
1296
|
+
line: range.start.line + 1,
|
|
1297
|
+
column: range.start.column + 1,
|
|
1298
|
+
code: match.text().slice(0, 100)
|
|
1299
|
+
});
|
|
1300
|
+
}
|
|
1301
|
+
const importMatches = root.root().findAll({ rule: {
|
|
1302
|
+
kind: "import_specifier",
|
|
1303
|
+
pattern: functionName
|
|
1304
|
+
} });
|
|
1305
|
+
for (const match of importMatches) {
|
|
1306
|
+
const range = match.range();
|
|
1307
|
+
locations.push({
|
|
1308
|
+
file: filePath,
|
|
1309
|
+
line: range.start.line + 1,
|
|
1310
|
+
column: range.start.column + 1,
|
|
1311
|
+
code: match.text()
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
} catch (error) {}
|
|
1315
|
+
return locations;
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* 扫描项目中的使用情况
|
|
1319
|
+
* @param projectRoot 项目根目录
|
|
1320
|
+
* @param functionsToTrack 要追踪的函数列表
|
|
1321
|
+
* @param componentsToTrack 要追踪的组件列表
|
|
1322
|
+
*/
|
|
1323
|
+
async function scanUsageStats(projectRoot, functionsToTrack, componentsToTrack) {
|
|
1324
|
+
const result = {
|
|
1325
|
+
functions: [],
|
|
1326
|
+
components: [],
|
|
1327
|
+
totalFiles: 0,
|
|
1328
|
+
scannedFiles: 0
|
|
1329
|
+
};
|
|
1330
|
+
const files = getAllSourceFiles(projectRoot);
|
|
1331
|
+
result.totalFiles = files.length;
|
|
1332
|
+
const functionStatsMap = /* @__PURE__ */ new Map();
|
|
1333
|
+
const componentStatsMap = /* @__PURE__ */ new Map();
|
|
1334
|
+
for (const func of functionsToTrack) functionStatsMap.set(func.name, {
|
|
1335
|
+
name: func.name,
|
|
1336
|
+
type: "import",
|
|
1337
|
+
package: func.package,
|
|
1338
|
+
count: 0,
|
|
1339
|
+
locations: []
|
|
1340
|
+
});
|
|
1341
|
+
for (const comp of componentsToTrack) componentStatsMap.set(comp.name, {
|
|
1342
|
+
name: comp.name,
|
|
1343
|
+
type: "component",
|
|
1344
|
+
package: comp.package,
|
|
1345
|
+
count: 0,
|
|
1346
|
+
locations: []
|
|
1347
|
+
});
|
|
1348
|
+
for (const file of files) try {
|
|
1349
|
+
const content = readFileSync(file, "utf-8");
|
|
1350
|
+
result.scannedFiles++;
|
|
1351
|
+
for (const func of functionsToTrack) {
|
|
1352
|
+
const locations = analyzeFunctionUsage(content, func.name, file);
|
|
1353
|
+
if (locations.length > 0) {
|
|
1354
|
+
const stats = functionStatsMap.get(func.name);
|
|
1355
|
+
stats.locations.push(...locations);
|
|
1356
|
+
stats.count += locations.length;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
for (const comp of componentsToTrack) {
|
|
1360
|
+
const locations = analyzeComponentUsage(content, comp.name, file);
|
|
1361
|
+
if (locations.length > 0) {
|
|
1362
|
+
const stats = componentStatsMap.get(comp.name);
|
|
1363
|
+
stats.locations.push(...locations);
|
|
1364
|
+
stats.count += locations.length;
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
} catch (error) {
|
|
1368
|
+
console.warn(`无法读取文件: ${file}`, error);
|
|
1369
|
+
}
|
|
1370
|
+
result.functions = Array.from(functionStatsMap.values());
|
|
1371
|
+
result.components = Array.from(componentStatsMap.values());
|
|
1372
|
+
return result;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
//#endregion
|
|
1376
|
+
//#region src/server/utils/module-counter.ts
|
|
1377
|
+
/**
|
|
1378
|
+
* 统计项目中通过 createPubinfo 注册的模块数量。
|
|
508
1379
|
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
1380
|
+
* 解析项目里的所有源文件,查找 createPubinfo 调用,并分析其 options.modules
|
|
1381
|
+
* 字段(含本地变量引用与展开语法)来估算注册的模块个数。
|
|
1382
|
+
*/
|
|
1383
|
+
function countRegisteredModules(projectRoot) {
|
|
1384
|
+
const files = getAllSourceFiles(projectRoot);
|
|
1385
|
+
let totalModules = 0;
|
|
1386
|
+
for (const filePath of files) {
|
|
1387
|
+
let content;
|
|
1388
|
+
try {
|
|
1389
|
+
content = readFileSync(filePath, "utf-8");
|
|
1390
|
+
} catch {
|
|
1391
|
+
continue;
|
|
1392
|
+
}
|
|
1393
|
+
if (!content.includes("createPubinfo")) continue;
|
|
1394
|
+
try {
|
|
1395
|
+
const rootNode = getParser(filePath).parse(content).root();
|
|
1396
|
+
const context = {
|
|
1397
|
+
rootNode,
|
|
1398
|
+
initializerCache: /* @__PURE__ */ new Map()
|
|
1399
|
+
};
|
|
1400
|
+
const callExpressions = rootNode.findAll({ rule: { kind: "call_expression" } });
|
|
1401
|
+
for (const call of callExpressions) {
|
|
1402
|
+
if (!isCreatePubinfoCall(call)) continue;
|
|
1403
|
+
totalModules += extractModulesFromCall(call, context);
|
|
1404
|
+
}
|
|
1405
|
+
} catch {
|
|
1406
|
+
continue;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
return totalModules;
|
|
1410
|
+
}
|
|
1411
|
+
function isCreatePubinfoCall(callNode) {
|
|
1412
|
+
const name = callNode.field("function")?.text() ?? "";
|
|
1413
|
+
return name === "createPubinfo" || name.endsWith(".createPubinfo");
|
|
1414
|
+
}
|
|
1415
|
+
function extractModulesFromCall(callNode, context) {
|
|
1416
|
+
const optionsNode = resolveOptionsObject(callNode, context);
|
|
1417
|
+
if (!optionsNode) return 0;
|
|
1418
|
+
const modulesPair = findModulesPair(optionsNode);
|
|
1419
|
+
if (!modulesPair) return 0;
|
|
1420
|
+
const valueNode = modulesPair.field("value");
|
|
1421
|
+
if (!valueNode) return 0;
|
|
1422
|
+
return countModulesFromValue(valueNode, context, /* @__PURE__ */ new Set());
|
|
1423
|
+
}
|
|
1424
|
+
function resolveOptionsObject(callNode, context) {
|
|
1425
|
+
const argsNode = callNode.field("arguments");
|
|
1426
|
+
if (!argsNode) return null;
|
|
1427
|
+
const directObject = argsNode.children().find((child) => child.kind() === "object");
|
|
1428
|
+
if (directObject) return directObject;
|
|
1429
|
+
const firstArg = getFirstNamedChild(argsNode);
|
|
1430
|
+
if (firstArg?.kind() === "identifier") {
|
|
1431
|
+
const initializer = findInitializer(context, firstArg.text());
|
|
1432
|
+
if (initializer?.kind() === "object") return initializer;
|
|
1433
|
+
}
|
|
1434
|
+
return null;
|
|
1435
|
+
}
|
|
1436
|
+
function findModulesPair(objectNode) {
|
|
1437
|
+
const pairs = objectNode.children().filter((child) => child.kind() === "pair");
|
|
1438
|
+
for (const pair of pairs) {
|
|
1439
|
+
const key = pair.field("key");
|
|
1440
|
+
if ((key ? normalizeKeyText(key.text()) : null) === "modules") return pair;
|
|
1441
|
+
}
|
|
1442
|
+
return null;
|
|
1443
|
+
}
|
|
1444
|
+
function normalizeKeyText(raw) {
|
|
1445
|
+
if (raw.startsWith("'") || raw.startsWith("\"") || raw.startsWith("`")) return raw.slice(1, -1);
|
|
1446
|
+
return raw;
|
|
1447
|
+
}
|
|
1448
|
+
function countModulesFromValue(valueNode, context, visited) {
|
|
1449
|
+
switch (valueNode.kind()) {
|
|
1450
|
+
case "array": return countArrayEntries(valueNode, context, visited);
|
|
1451
|
+
case "identifier": return countIdentifierReference(valueNode.text(), context, visited);
|
|
1452
|
+
case "parenthesized_expression":
|
|
1453
|
+
case "as_expression":
|
|
1454
|
+
case "type_assertion":
|
|
1455
|
+
case "non_null_expression": {
|
|
1456
|
+
const inner = getFirstNamedChild(valueNode);
|
|
1457
|
+
return inner ? countModulesFromValue(inner, context, visited) : 0;
|
|
1458
|
+
}
|
|
1459
|
+
default: return 0;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
function countArrayEntries(arrayNode, context, visited) {
|
|
1463
|
+
let count = 0;
|
|
1464
|
+
for (const child of arrayNode.children()) {
|
|
1465
|
+
if (!child.isNamed()) continue;
|
|
1466
|
+
if (child.kind() === "spread_element") {
|
|
1467
|
+
const spreadTarget = getFirstNamedChild(child);
|
|
1468
|
+
if (spreadTarget) count += countModulesFromValue(spreadTarget, context, visited);
|
|
1469
|
+
continue;
|
|
1470
|
+
}
|
|
1471
|
+
count += 1;
|
|
1472
|
+
}
|
|
1473
|
+
return count;
|
|
1474
|
+
}
|
|
1475
|
+
function countIdentifierReference(identifierName, context, visited) {
|
|
1476
|
+
if (!identifierName || visited.has(identifierName)) return 0;
|
|
1477
|
+
visited.add(identifierName);
|
|
1478
|
+
const initializer = findInitializer(context, identifierName);
|
|
1479
|
+
let result = 0;
|
|
1480
|
+
if (initializer) result = countModulesFromValue(initializer, context, visited);
|
|
1481
|
+
visited.delete(identifierName);
|
|
1482
|
+
return result;
|
|
1483
|
+
}
|
|
1484
|
+
function findInitializer(context, identifierName) {
|
|
1485
|
+
if (context.initializerCache.has(identifierName)) return context.initializerCache.get(identifierName) ?? null;
|
|
1486
|
+
let found = null;
|
|
1487
|
+
const stack = [context.rootNode];
|
|
1488
|
+
while (stack.length > 0) {
|
|
1489
|
+
const node = stack.pop();
|
|
1490
|
+
if (node.kind() === "variable_declarator") {
|
|
1491
|
+
if (node.field("name")?.text() === identifierName) {
|
|
1492
|
+
const valueNode = node.field("value");
|
|
1493
|
+
if (valueNode) {
|
|
1494
|
+
found = valueNode;
|
|
1495
|
+
break;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
stack.push(...node.children());
|
|
1500
|
+
}
|
|
1501
|
+
context.initializerCache.set(identifierName, found);
|
|
1502
|
+
return found;
|
|
1503
|
+
}
|
|
1504
|
+
function getFirstNamedChild(node) {
|
|
1505
|
+
for (const child of node.children()) if (child.isNamed()) return child;
|
|
1506
|
+
return null;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
//#endregion
|
|
1510
|
+
//#region src/server/controller/usage.ts
|
|
1511
|
+
/**
|
|
1512
|
+
* 将 PascalCase/CamelCase 名称转换为 kebab-case(用于搜索匹配)
|
|
1513
|
+
*/
|
|
1514
|
+
function toKebabCase(name) {
|
|
1515
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* 获取 Overview 数据
|
|
1519
|
+
* 返回项目中实际使用的 functions 和 components(仅 count > 0)
|
|
1520
|
+
*/
|
|
1521
|
+
async function getOverview(projectRoot) {
|
|
1522
|
+
const statsPromise = scanUsageStats(projectRoot, functions, components);
|
|
1523
|
+
const apiListPromise = getRequestList(projectRoot);
|
|
1524
|
+
const [stats, apiList] = await Promise.all([statsPromise, apiListPromise]);
|
|
1525
|
+
const apiMethodCount = apiList.modules.reduce((total, module) => {
|
|
1526
|
+
return total + module.functions.length;
|
|
1527
|
+
}, 0);
|
|
1528
|
+
const moduleCount = countRegisteredModules(projectRoot);
|
|
1529
|
+
return {
|
|
1530
|
+
functions: stats.functions.filter((item) => item.count > 0),
|
|
1531
|
+
components: stats.components.filter((item) => item.count > 0),
|
|
1532
|
+
totalFiles: stats.totalFiles,
|
|
1533
|
+
scannedFiles: stats.scannedFiles,
|
|
1534
|
+
apiMethodCount,
|
|
1535
|
+
moduleCount
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* 获取完整的使用统计数据
|
|
1540
|
+
* 返回所有追踪项的使用情况(包括未使用的 count = 0)
|
|
511
1541
|
*/
|
|
512
|
-
async function
|
|
513
|
-
|
|
514
|
-
|
|
1542
|
+
async function getUsageStats(projectRoot) {
|
|
1543
|
+
return await scanUsageStats(projectRoot, functions, components);
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* 获取组件使用详情,附带统计摘要
|
|
1547
|
+
*/
|
|
1548
|
+
async function getComponentUsage(projectRoot) {
|
|
1549
|
+
const componentsWithMeta = (await getUsageStats(projectRoot)).components.map((component) => {
|
|
1550
|
+
const dependents = Array.from(new Set(component.locations.map((location) => location.file))).sort();
|
|
1551
|
+
const componentFilePath = component.locations[0]?.file;
|
|
1552
|
+
return {
|
|
1553
|
+
...component,
|
|
1554
|
+
pascalName: component.name,
|
|
1555
|
+
kebabName: toKebabCase(component.name),
|
|
1556
|
+
filePath: componentFilePath,
|
|
1557
|
+
dependents,
|
|
1558
|
+
dependencies: []
|
|
1559
|
+
};
|
|
1560
|
+
});
|
|
1561
|
+
const used = componentsWithMeta.filter((item) => item.count > 0).length;
|
|
1562
|
+
return {
|
|
1563
|
+
components: componentsWithMeta,
|
|
1564
|
+
stats: {
|
|
1565
|
+
total: componentsWithMeta.length,
|
|
1566
|
+
used,
|
|
1567
|
+
unused: componentsWithMeta.length - used
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
//#endregion
|
|
1573
|
+
//#region src/server/controller/version.ts
|
|
1574
|
+
/**
|
|
1575
|
+
* 从 node_modules 中查找实际安装的包版本
|
|
1576
|
+
* 这比从 package.json 读取更准确,因为反映了实际安装的版本
|
|
1577
|
+
*/
|
|
1578
|
+
function findPackageVersion(root, packageName) {
|
|
515
1579
|
try {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
1580
|
+
const nodeModulesPath = join(root, "node_modules", packageName, "package.json");
|
|
1581
|
+
if (!existsSync(nodeModulesPath)) {
|
|
1582
|
+
const parentNodeModulesPath = join(root, "..", "node_modules", packageName, "package.json");
|
|
1583
|
+
if (!existsSync(parentNodeModulesPath)) return null;
|
|
1584
|
+
return JSON.parse(readFileSync(parentNodeModulesPath, "utf-8")).version || null;
|
|
1585
|
+
}
|
|
1586
|
+
return JSON.parse(readFileSync(nodeModulesPath, "utf-8")).version || null;
|
|
1587
|
+
} catch (error) {
|
|
1588
|
+
console.error(`Error reading package version from node_modules: ${error}`);
|
|
1589
|
+
return null;
|
|
522
1590
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* 从 fast-npm-meta 服务获取包的最新版本
|
|
1594
|
+
*/
|
|
1595
|
+
async function fetchLatestVersion(packageName) {
|
|
1596
|
+
try {
|
|
1597
|
+
const response = await fetch(`https://npm.elonehoo.cn/${packageName}`);
|
|
1598
|
+
if (!response.ok) {
|
|
1599
|
+
console.error(`Failed to fetch package info: ${response.status} ${response.statusText}`);
|
|
1600
|
+
return null;
|
|
1601
|
+
}
|
|
1602
|
+
return (await response.json()).version || null;
|
|
1603
|
+
} catch (error) {
|
|
1604
|
+
console.error(`Error fetching latest version from npm meta service: ${error}`);
|
|
1605
|
+
return null;
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* 比较两个语义化版本号
|
|
1610
|
+
* 返回 true 如果 current 版本低于 latest 版本
|
|
1611
|
+
*/
|
|
1612
|
+
function isOutdated(current, latest) {
|
|
1613
|
+
if (!current || !latest) return false;
|
|
1614
|
+
try {
|
|
1615
|
+
const currentParts = current.split(".").map(Number);
|
|
1616
|
+
const latestParts = latest.split(".").map(Number);
|
|
1617
|
+
for (let i = 0; i < Math.max(currentParts.length, latestParts.length); i++) {
|
|
1618
|
+
const currentPart = currentParts[i] || 0;
|
|
1619
|
+
const latestPart = latestParts[i] || 0;
|
|
1620
|
+
if (currentPart < latestPart) return true;
|
|
1621
|
+
if (currentPart > latestPart) return false;
|
|
1622
|
+
}
|
|
1623
|
+
return false;
|
|
1624
|
+
} catch (error) {
|
|
1625
|
+
console.error(`Error comparing versions: ${error}`);
|
|
1626
|
+
return false;
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
/**
|
|
1630
|
+
* 获取包的版本信息
|
|
1631
|
+
*/
|
|
1632
|
+
async function getPackageVersion(root, packageName) {
|
|
1633
|
+
try {
|
|
1634
|
+
if (!packageName || typeof packageName !== "string") return {
|
|
1635
|
+
packageName: packageName || "",
|
|
1636
|
+
currentVersion: null,
|
|
1637
|
+
latestVersion: null,
|
|
1638
|
+
isOutdated: false,
|
|
1639
|
+
error: "Package name is required"
|
|
1640
|
+
};
|
|
1641
|
+
const currentVersion = findPackageVersion(root, packageName);
|
|
1642
|
+
const latestVersion = await fetchLatestVersion(packageName);
|
|
1643
|
+
return {
|
|
1644
|
+
packageName,
|
|
1645
|
+
currentVersion,
|
|
1646
|
+
latestVersion,
|
|
1647
|
+
isOutdated: isOutdated(currentVersion, latestVersion)
|
|
1648
|
+
};
|
|
1649
|
+
} catch (error) {
|
|
1650
|
+
return {
|
|
1651
|
+
packageName,
|
|
1652
|
+
currentVersion: null,
|
|
1653
|
+
latestVersion: null,
|
|
1654
|
+
isOutdated: false,
|
|
1655
|
+
error: error instanceof Error ? error.message : String(error)
|
|
1656
|
+
};
|
|
530
1657
|
}
|
|
531
|
-
return total;
|
|
532
1658
|
}
|
|
533
1659
|
|
|
534
1660
|
//#endregion
|
|
@@ -549,7 +1675,7 @@ async function countFiles(root) {
|
|
|
549
1675
|
*/
|
|
550
1676
|
function pubinfoDevtools() {
|
|
551
1677
|
return {
|
|
552
|
-
name: "vite-plugin-
|
|
1678
|
+
name: "vite-plugin-pubinfo-devtools",
|
|
553
1679
|
enforce: "pre",
|
|
554
1680
|
configureServer(server) {
|
|
555
1681
|
const baseURL = "__pubinfo_devtools";
|
|
@@ -559,10 +1685,51 @@ function pubinfoDevtools() {
|
|
|
559
1685
|
}));
|
|
560
1686
|
server.middlewares.use(`/${baseURL}_api`, async (req, res, next) => {
|
|
561
1687
|
if (!req.url) return next();
|
|
562
|
-
if (req.url === "/") {
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
1688
|
+
if (req.url === "/overview") {
|
|
1689
|
+
try {
|
|
1690
|
+
const overview = await getOverview(server.config.root);
|
|
1691
|
+
res.setHeader("Content-Type", "application/json");
|
|
1692
|
+
res.write(JSON.stringify(overview, null, 2));
|
|
1693
|
+
} catch (error) {
|
|
1694
|
+
res.statusCode = 500;
|
|
1695
|
+
res.setHeader("Content-Type", "application/json");
|
|
1696
|
+
res.write(JSON.stringify({
|
|
1697
|
+
error: "Failed to get overview data",
|
|
1698
|
+
message: error instanceof Error ? error.message : String(error)
|
|
1699
|
+
}));
|
|
1700
|
+
}
|
|
1701
|
+
res.end();
|
|
1702
|
+
return;
|
|
1703
|
+
}
|
|
1704
|
+
if (req.url === "/usage-stats") {
|
|
1705
|
+
try {
|
|
1706
|
+
const usageStats = await getUsageStats(server.config.root);
|
|
1707
|
+
res.setHeader("Content-Type", "application/json");
|
|
1708
|
+
res.write(JSON.stringify(usageStats, null, 2));
|
|
1709
|
+
} catch (error) {
|
|
1710
|
+
res.statusCode = 500;
|
|
1711
|
+
res.setHeader("Content-Type", "application/json");
|
|
1712
|
+
res.write(JSON.stringify({
|
|
1713
|
+
error: "Failed to get usage statistics",
|
|
1714
|
+
message: error instanceof Error ? error.message : String(error)
|
|
1715
|
+
}));
|
|
1716
|
+
}
|
|
1717
|
+
res.end();
|
|
1718
|
+
return;
|
|
1719
|
+
}
|
|
1720
|
+
if (req.url === "/component-usage") {
|
|
1721
|
+
try {
|
|
1722
|
+
const componentUsage = await getComponentUsage(server.config.root);
|
|
1723
|
+
res.setHeader("Content-Type", "application/json");
|
|
1724
|
+
res.write(JSON.stringify(componentUsage, null, 2));
|
|
1725
|
+
} catch (error) {
|
|
1726
|
+
res.statusCode = 500;
|
|
1727
|
+
res.setHeader("Content-Type", "application/json");
|
|
1728
|
+
res.write(JSON.stringify({
|
|
1729
|
+
error: "Failed to get component usage",
|
|
1730
|
+
message: error instanceof Error ? error.message : String(error)
|
|
1731
|
+
}));
|
|
1732
|
+
}
|
|
566
1733
|
res.end();
|
|
567
1734
|
return;
|
|
568
1735
|
}
|
|
@@ -582,6 +1749,33 @@ function pubinfoDevtools() {
|
|
|
582
1749
|
res.end();
|
|
583
1750
|
return;
|
|
584
1751
|
}
|
|
1752
|
+
if (req.url.startsWith("/package-version")) {
|
|
1753
|
+
try {
|
|
1754
|
+
const packageName = new URLSearchParams(req.url.slice(16)).get("package") || "";
|
|
1755
|
+
if (!packageName) {
|
|
1756
|
+
res.statusCode = 400;
|
|
1757
|
+
res.setHeader("Content-Type", "application/json");
|
|
1758
|
+
res.write(JSON.stringify({
|
|
1759
|
+
error: "Missing package parameter",
|
|
1760
|
+
message: "Please provide a package name using ?package=<package-name>"
|
|
1761
|
+
}));
|
|
1762
|
+
res.end();
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
const versionInfo = await getPackageVersion(server.config.root, packageName);
|
|
1766
|
+
res.setHeader("Content-Type", "application/json");
|
|
1767
|
+
res.write(JSON.stringify(versionInfo, null, 2));
|
|
1768
|
+
} catch (error) {
|
|
1769
|
+
res.statusCode = 500;
|
|
1770
|
+
res.setHeader("Content-Type", "application/json");
|
|
1771
|
+
res.write(JSON.stringify({
|
|
1772
|
+
error: "Failed to get package version",
|
|
1773
|
+
message: error instanceof Error ? error.message : String(error)
|
|
1774
|
+
}));
|
|
1775
|
+
}
|
|
1776
|
+
res.end();
|
|
1777
|
+
return;
|
|
1778
|
+
}
|
|
585
1779
|
next();
|
|
586
1780
|
});
|
|
587
1781
|
}
|