@nuxt/devtools 4.0.0-alpha.7 → 4.0.0-alpha.9
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/README.md +2 -2
- package/dist/chunks/analyze-build.mjs +32 -0
- package/dist/chunks/code-server.mjs +75 -0
- package/dist/chunks/module-main.mjs +633 -304
- package/dist/chunks/timeline.mjs +2 -2
- package/dist/chunks/vite-inspect.mjs +75 -39
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/__blank-e7n6afwb.js +1 -0
- package/dist/client/_nuxt/analyze-build-hl5kov9g.js +1 -0
- package/dist/client/_nuxt/assets-mhs93a2v.js +6 -0
- package/dist/client/_nuxt/{auth-required-panel-gwrodxrm.js → auth-required-panel-fp6njgq4.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f408df35-fbed-4f67-b31a-84e2dcf7d5f4.json +1 -0
- package/dist/client/_nuxt/{client-jwk7bkap.js → client-e4xweo15.js} +1 -1
- package/dist/client/_nuxt/client-ox3ztino.js +2 -0
- package/dist/client/_nuxt/code-diff-g3koa3wx.js +8 -0
- package/dist/client/_nuxt/code-snippets-jiqnd4op.js +1 -0
- package/dist/client/_nuxt/components-jjqi3963.js +1 -0
- package/dist/client/_nuxt/composable-item-nslyhu40.js +1 -0
- package/dist/client/_nuxt/composables-jsh6xr6n.js +1 -0
- package/dist/client/_nuxt/custom-_name_-nby2wkqs.js +1 -0
- package/dist/client/_nuxt/data-schema-button-n858k5no.js +1 -0
- package/dist/client/_nuxt/data-schema-drawer-nd5v2dc8.js +2 -0
- package/dist/client/_nuxt/debug-iqz97avh.js +1 -0
- package/dist/client/_nuxt/{default-ibmlv6hu.js → default-kms351ji.js} +1 -1
- package/dist/client/_nuxt/dist-cwkxp5t4.js +1 -0
- package/dist/client/_nuxt/dist-das2ggjj.js +1 -0
- package/dist/client/_nuxt/dist-hhnji3pn.js +1 -0
- package/dist/client/_nuxt/{duration-display-cfe3xsok.js → duration-display-kvy6t3q5.js} +1 -1
- package/dist/client/_nuxt/entry.css-hsdbnv92.css +1 -0
- package/dist/client/_nuxt/error-404-m7lxn6po.js +1 -0
- package/dist/client/_nuxt/error-404.css-kodsrozu.css +1 -0
- package/dist/client/_nuxt/error-500-fa1284ej.js +1 -0
- package/dist/client/_nuxt/error-500.css-mq6ubyvk.css +1 -0
- package/dist/client/_nuxt/error-dnpxky1s.js +9 -0
- package/dist/client/_nuxt/{filepath-item-calgslzq.js → filepath-item-elq07qqm.js} +1 -1
- package/dist/client/_nuxt/full-muovlha1.js +1 -0
- package/dist/client/_nuxt/{help-fab-ietvwhig.js → help-fab-mk77l527.js} +1 -1
- package/dist/client/_nuxt/hooks-fuegc0zi.js +1 -0
- package/dist/client/_nuxt/imports-dxp64giy.js +1 -0
- package/dist/client/_nuxt/launch-page-ldhzltru.js +1 -0
- package/dist/client/_nuxt/mbruyqke.js +4 -0
- package/dist/client/_nuxt/modules-ip395o4i.js +1 -0
- package/dist/client/_nuxt/nbadge-odjar6lb.js +1 -0
- package/dist/client/_nuxt/ncheckbox-ecu968cz.js +1 -0
- package/dist/client/_nuxt/ncode-block-ivymjiov.js +2 -0
- package/dist/client/_nuxt/ndrawer-fbwc78mp.js +1 -0
- package/dist/client/_nuxt/ndropdown-j9whus4q.js +1 -0
- package/dist/client/_nuxt/{nicon-title-f3ho3hah.js → nicon-title-lthyup78.js} +1 -1
- package/dist/client/_nuxt/{nlink-endeyoly.js → nlink-iv6gnrhx.js} +1 -1
- package/dist/client/_nuxt/{nmarkdown-iw4stzqp.js → nmarkdown-mbwbivxu.js} +1 -1
- package/dist/client/_nuxt/{nnavbar-n8fcnalx.js → nnavbar-ivws4py6.js} +1 -1
- package/dist/client/_nuxt/none-f6zkixpn.js +1 -0
- package/dist/client/_nuxt/npanel-grids-jzjbt8z8.js +1 -0
- package/dist/client/_nuxt/nsection-block-xwt9b4fq.js +1 -0
- package/dist/client/_nuxt/nselect-efk0r1bm.js +1 -0
- package/dist/client/_nuxt/nselect-tabs-o18hum8e.js +1 -0
- package/dist/client/_nuxt/nsplit-pane-nl6gqw3a.js +1 -0
- package/dist/client/_nuxt/nsplit-pane.css-o64elxn9.css +1 -0
- package/dist/client/_nuxt/{ntip-m8x8y44j.js → ntip-e476flgx.js} +1 -1
- package/dist/client/_nuxt/nuxt-ck1m833g.js +2 -0
- package/dist/client/_nuxt/open-graph-fevqc4qw.js +3 -0
- package/dist/client/_nuxt/overview-mov3ns5a.js +1 -0
- package/dist/client/_nuxt/pages-hl3ggxo7.js +1 -0
- package/dist/client/_nuxt/payload-i1xm1c2a.js +1 -0
- package/dist/client/_nuxt/pinia-j5ib0mm9.js +1 -0
- package/dist/client/_nuxt/plugins-dmozf1ud.js +1 -0
- package/dist/client/_nuxt/ready-mci0xx49.js +1 -0
- package/dist/client/_nuxt/render-tree-ht6m4wvr.js +1 -0
- package/dist/client/_nuxt/runtime-configs-lwkz00jf.js +1 -0
- package/dist/client/_nuxt/server-route-inputs-oyv7niet.js +1 -0
- package/dist/client/_nuxt/server-routes-e2av60g4.js +7 -0
- package/dist/client/_nuxt/server-tasks-jdi82ndh.js +1 -0
- package/dist/client/_nuxt/settings-nqvn74vj.js +1 -0
- package/dist/client/_nuxt/splitpanes.esm-e6jbjw2k.js +1 -0
- package/dist/client/_nuxt/stacktrace-list-bw2f6i1o.js +1 -0
- package/dist/client/_nuxt/state-components-frowf3zr.js +1 -0
- package/dist/client/_nuxt/state-editor-dnnm0b1r.js +1 -0
- package/dist/client/_nuxt/state-modules-b9ourhpx.js +1 -0
- package/dist/client/_nuxt/storage-dtuxyb3g.js +1 -0
- package/dist/client/_nuxt/storage-options-o7q1mchx.js +1 -0
- package/dist/client/_nuxt/timeline-dtcyzchh.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-kfral2d7.js → unocss-runtime-l66gafm5.js} +1 -1
- package/dist/client/_nuxt/utils-d9q1xry0.js +1 -0
- package/dist/client/_nuxt/vendor/json-editor-vue-l1ffxhko.js +3861 -0
- package/dist/client/_nuxt/vendor/{markdown-it-gg8o3tmh.js → markdown-it-cx0uvu2o.js} +1 -1
- package/dist/client/_nuxt/vendor/{quicktype-core-ozubcbyl.js → quicktype-core-otmjigaj.js} +65 -65
- package/dist/client/_nuxt/vendor/shiki-mgsi4s2l.js +153 -0
- package/dist/client/_nuxt/vendor/unocss-b56v4bpd.js +3 -0
- package/dist/client/_nuxt/virtual-files-odf1l0xb.js +1 -0
- package/dist/client/_nuxt/vue-devtools-bho31pmk.js +4 -0
- package/dist/client/_nuxt/vue-router-d5qsebus.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.js +20 -3
- package/dist/shared/devtools.CCWq4fFE.mjs +113 -0
- package/dist/types.d.mts +1 -5
- package/dist/webcomponents/index.mjs +1 -1
- package/package.json +45 -52
- package/.discoveryrc.cjs +0 -13
- package/dist/chunks/vscode.mjs +0 -170
- package/dist/client/_nuxt/__blank-ekrx7eve.js +0 -1
- package/dist/client/_nuxt/analyze-build-gtjxxh9s.js +0 -1
- package/dist/client/_nuxt/assets-fxuoynew.js +0 -6
- package/dist/client/_nuxt/builds/meta/23fee0aa-9df9-4da8-b519-ce0799e7da4e.json +0 -1
- package/dist/client/_nuxt/code-diff-d1bf4mlz.js +0 -8
- package/dist/client/_nuxt/code-snippets-nodldh90.js +0 -1
- package/dist/client/_nuxt/components-ibu6c1zd.js +0 -1
- package/dist/client/_nuxt/composable-item-lb3qexrh.js +0 -1
- package/dist/client/_nuxt/custom-_name_-dt22ybu3.js +0 -1
- package/dist/client/_nuxt/data-schema-button-m4wb470q.js +0 -1
- package/dist/client/_nuxt/data-schema-drawer-5ccj6aug.js +0 -2
- package/dist/client/_nuxt/debug-nxl66qh3.js +0 -1
- package/dist/client/_nuxt/dist-nsuzcp77.js +0 -1
- package/dist/client/_nuxt/entry.css-m21ytcnz.css +0 -1
- package/dist/client/_nuxt/error-404-izmgsqlm.js +0 -1
- package/dist/client/_nuxt/error-404.css-l9jcssuy.css +0 -1
- package/dist/client/_nuxt/error-500-fejd4grh.js +0 -1
- package/dist/client/_nuxt/error-500.css-he4ew8b1.css +0 -1
- package/dist/client/_nuxt/error-mm873c55.js +0 -9
- package/dist/client/_nuxt/full-pesi6bu3.js +0 -1
- package/dist/client/_nuxt/hooks-mqgelnks.js +0 -1
- package/dist/client/_nuxt/imports-bofdhcsr.js +0 -1
- package/dist/client/_nuxt/launch-page-i8mgxym7.js +0 -1
- package/dist/client/_nuxt/modules-b6uha2ss.js +0 -1
- package/dist/client/_nuxt/nbadge-ft1i3ddy.js +0 -1
- package/dist/client/_nuxt/ncheckbox-gl62y715.js +0 -1
- package/dist/client/_nuxt/ncode-block-ksrq5ppu.js +0 -2
- package/dist/client/_nuxt/ndrawer-evv584t1.js +0 -1
- package/dist/client/_nuxt/ndropdown-dqqc8bnq.js +0 -1
- package/dist/client/_nuxt/none-gr24yqiq.js +0 -1
- package/dist/client/_nuxt/nsection-block-n5u7wj9x.js +0 -1
- package/dist/client/_nuxt/nselect-kdzalcm2.js +0 -1
- package/dist/client/_nuxt/nselect-tabs-e440xayq.js +0 -1
- package/dist/client/_nuxt/nswitch-pdw73751.js +0 -1
- package/dist/client/_nuxt/nuxt-kphganvs.js +0 -1
- package/dist/client/_nuxt/o7y7c26x.js +0 -4
- package/dist/client/_nuxt/open-graph-mtq8qyx5.js +0 -3
- package/dist/client/_nuxt/overview-idjgy9u4.js +0 -1
- package/dist/client/_nuxt/pages-g3tcvbsn.js +0 -1
- package/dist/client/_nuxt/pages-lk0hxlsc.js +0 -1
- package/dist/client/_nuxt/payload-ovd8emqe.js +0 -1
- package/dist/client/_nuxt/pinia-e6em75yg.js +0 -1
- package/dist/client/_nuxt/plugins-ojph2z4c.js +0 -1
- package/dist/client/_nuxt/ready-b5u27bv4.js +0 -1
- package/dist/client/_nuxt/render-tree-iwtso0n9.js +0 -1
- package/dist/client/_nuxt/rpc-ewzip6fb.js +0 -4
- package/dist/client/_nuxt/runtime-configs-gyhmrfcz.js +0 -1
- package/dist/client/_nuxt/server-discovery-cfu428ir.js +0 -1
- package/dist/client/_nuxt/server-route-inputs-hhxdu10p.js +0 -1
- package/dist/client/_nuxt/server-routes-efc7olve.js +0 -7
- package/dist/client/_nuxt/server-tasks-o59rfww6.js +0 -1
- package/dist/client/_nuxt/settings-c6tbo50r.js +0 -1
- package/dist/client/_nuxt/stacktrace-list-c5b46nul.js +0 -1
- package/dist/client/_nuxt/state-components-eaw2evd3.js +0 -1
- package/dist/client/_nuxt/state-editor-jm35t8p1.js +0 -1
- package/dist/client/_nuxt/state-modules-oox7nhib.js +0 -1
- package/dist/client/_nuxt/storage-fdd2zc94.js +0 -1
- package/dist/client/_nuxt/storage-options-ho965h55.js +0 -1
- package/dist/client/_nuxt/terminals-b8awmi75.js +0 -1
- package/dist/client/_nuxt/terminals.css-mejv43xm.css +0 -1
- package/dist/client/_nuxt/timeline-nsh72kov.js +0 -31
- package/dist/client/_nuxt/utils-hgmynvjd.js +0 -2
- package/dist/client/_nuxt/vendor/json-editor-vue-mkw4apmc.js +0 -3869
- package/dist/client/_nuxt/vendor/shiki-c7z35hpo.js +0 -293
- package/dist/client/_nuxt/vendor/unocss-lkro8gbr.js +0 -3
- package/dist/client/_nuxt/vendor/xterm-eb5atty5.js +0 -36
- package/dist/client/_nuxt/vendor/xterm.css-j9zpjwmg.css +0 -1
- package/dist/client/_nuxt/virtual-files-met9zkti.js +0 -1
- package/dist/client/_nuxt/vue-devtools-bl144b70.js +0 -4
- package/dist/client/_nuxt/vue-router-cnnrtyb0.js +0 -1
- package/dist/client/discovery/index.html +0 -611
- package/dist/shared/devtools.nEotcg1R.mjs +0 -113
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,F as t,K as n,St as r,T as i,Tt as a,bt as o,j as s,jt as c,k as l,p as u,st as d}from"./vendor/json-editor-vue-l1ffxhko.js";function f(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function p(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&f(e.default)}var m=Object.assign;function h(e,t){let n={};for(let r in t){let i=t[r];n[r]=_(i)?i.map(e):e(i)}return n}var g=()=>{},_=Array.isArray;function v(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var y=Symbol(``);function b(e,t){return m(Error(),{type:e,[y]:!0},t)}function x(e,t){return e instanceof Error&&y in e&&(t==null||!!(e.type&t))}var ee=Symbol(``),S=Symbol(``),te=Symbol(``),C=Symbol(``),ne=Symbol(``);function re(e){return s(C)}var w=typeof document<`u`,T=/#/g,ie=/&/g,E=/\//g,D=/=/g,ae=/\?/g,O=/\+/g,oe=/%5B/g,k=/%5D/g,A=/%5E/g,se=/%60/g,j=/%7B/g,M=/%7C/g,N=/%7D/g,P=/%20/g;function F(e){return e==null?``:encodeURI(``+e).replace(M,`|`).replace(oe,`[`).replace(k,`]`)}function ce(e){return F(e).replace(j,`{`).replace(N,`}`).replace(A,`^`)}function I(e){return F(e).replace(O,`%2B`).replace(P,`+`).replace(T,`%23`).replace(ie,`%26`).replace(se,"`").replace(j,`{`).replace(N,`}`).replace(A,`^`)}function L(e){return I(e).replace(D,`%3D`)}function le(e){return F(e).replace(T,`%23`).replace(ae,`%3F`)}function ue(e){return le(e).replace(E,`%2F`)}function R(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var z=/\/$/,B=e=>e.replace(z,``);function V(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=q(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:R(o)}}function de(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function H(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function fe(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&U(t.matched[r],n.matched[i])&&W(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function W(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!G(e[n],t[n]))return!1;return!0}function G(e,t){return _(e)?K(e,t):_(t)?K(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function K(e,t){return _(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function q(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var J={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function Y(e){if(!e)if(w){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),B(e)}var X=/^[^#]+#/;function pe(e,t){return e.replace(X,`#`)+t}function me(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Z=()=>({left:window.scrollX,top:window.scrollY});function he(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=me(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function ge(e,t){return(history.state?history.state.position-t:-1)+e}var _e=new Map;function ve(e,t){_e.set(e,t)}function ye(e){let t=_e.get(e);return _e.delete(e),t}function be(e){return typeof e==`string`||e&&typeof e==`object`}function xe(e){return typeof e==`string`||typeof e==`symbol`}function Se(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(O,` `),i=r.indexOf(`=`),a=R(i<0?r:r.slice(0,i)),o=i<0?null:R(r.slice(i+1));if(a in t){let e=t[a];_(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Ce(e){let t=``;for(let n in e){let r=e[n];if(n=L(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(_(r)?r.map(e=>e&&I(e)):[r&&I(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function we(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=_(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Q(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(b(4,{from:n,to:t})):e instanceof Error?c(e):be(e)?c(b(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Te(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(f(s)){let c=(s.__vccOpts||s)[t];c&&a.push($(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=p(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&$(c,n,r,o,e,i)()}))}}return a}function Ee(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>U(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>U(e,s))||i.push(s))}return[n,r,i]}var De=()=>location.protocol+`//`+location.host;function Oe(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),H(n,``)}return H(n,e)+r+i}function ke(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Oe(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(m({},e.state,{scroll:Z()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Ae(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Z():null}}function je(e){let{history:t,location:n}=window,r={value:Oe(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:De()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,m({},t.state,Ae(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=m({},i.value,t.state,{forward:e,scroll:Z()});a(o.current,o,!0),a(e,m({},Ae(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Me(e){e=Y(e);let t=je(e),n=ke(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=m({location:``,base:e,go:r,createHref:pe.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Ne(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Me(e)}var Pe={type:0,value:``},Fe=/[a-zA-Z0-9_]/;function Ie(e){if(!e)return[[]];if(e===`/`)return[[Pe]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Fe.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Le=`[^/]+?`,Re={sensitive:!1,strict:!1,start:!0,end:!0},ze=/[.+*?^${}()[\]/\\]/g;function Be(e,t){let n=m({},Re,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(ze,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Le;if(u!==Le){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(_(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=_(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Ve(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function He(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Ve(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Ue(r))return 1;if(Ue(i))return-1}return i.length-r.length}function Ue(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var We={strict:!1,end:!0,sensitive:!1};function Ge(e,t,n){let r=m(Be(Ie(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ke(e,t){let n=[],r=new Map;t=v(We,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Je(e);s.aliasOf=r&&r.record;let l=v(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Je(m({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Ge(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Xe(d)&&o(e.name)),et(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:g}function o(e){if(xe(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Qe(e,n);n.splice(t,0,e),e.record.name&&!Xe(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw b(1,{location:e});s=i.record.name,a=m(qe(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&qe(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw b(1,{location:e,currentLocation:t});s=i.record.name,a=m({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Ze(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function qe(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Je(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ye(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ye(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Xe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ze(e){return e.reduce((e,t)=>m(e,t.meta),{})}function Qe(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;He(e,t[i])<0?r=i:n=i+1}let i=$e(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function $e(e){let t=e;for(;t=t.parent;)if(et(t)&&He(e,t)===0)return t}function et({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tt(e){let t=s(te),n=s(C),r=u(()=>{let n=c(e.to);return t.resolve(n)}),i=u(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(U.bind(null,i));if(o>-1)return o;let s=ot(e[t-2]);return t>1&&ot(i)===s&&a[a.length-1].path!==s?a.findIndex(U.bind(null,e[t-2])):o}),a=u(()=>i.value>-1&&at(n.params,r.value.params)),o=u(()=>i.value>-1&&i.value===n.matched.length-1&&W(n.params,r.value.params));function l(n={}){if(it(n)){let n=t[c(e.replace)?`replace`:`push`](c(e.to)).catch(g);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:u(()=>r.value.href),isActive:a,isExactActive:o,navigate:l}}function nt(e){return e.length===1?e[0]:e}var rt=i({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:tt,setup(e,{slots:t}){let n=o(tt(e)),{options:r}=s(te),i=u(()=>({[st(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[st(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&nt(t.default(n));return e.custom?r:l(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function it(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function at(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!_(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function ot(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var st=(e,t,n)=>e??t??n,ct=i({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){let a=s(ne),o=u(()=>e.route||a.value),f=s(S,0),p=u(()=>{let e=c(f),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),h=u(()=>o.value.matched[p.value]);n(S,u(()=>p.value+1)),n(ee,h),n(ne,o);let g=r();return d(()=>[g.value,h.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!U(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let n=o.value,r=e.name,a=h.value,s=a&&a.components[r];if(!s)return lt(i.default,{Component:s,route:n});let c=a.props[r],u=l(s,m({},c?c===!0?n.params:typeof c==`function`?c(n):c:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[r]=null)},ref:g}));return lt(i.default,{Component:u,route:n})||u}}});function lt(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var ut=ct;function dt(n){let r=Ke(n.routes,n),i=n.parseQuery||Se,o=n.stringifyQuery||Ce,s=n.history,l=Q(),u=Q(),d=Q(),f=a(J),p=J;w&&n.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let v=h.bind(null,e=>``+e),y=h.bind(null,ue),ee=h.bind(null,R);function S(e,t){let n,i;return xe(e)?(n=r.getRecordMatcher(e),i=t):i=e,r.addRoute(i,n)}function re(e){let t=r.getRecordMatcher(e);t&&r.removeRoute(t)}function T(){return r.getRoutes().map(e=>e.record)}function ie(e){return!!r.getRecordMatcher(e)}function E(e,t){if(t=m({},t||f.value),typeof e==`string`){let n=V(i,e,t.path),a=r.resolve({path:n.path},t),o=s.createHref(n.fullPath);return m(n,a,{params:ee(a.params),redirectedFrom:void 0,href:o})}let n;if(e.path!=null)n=m({},e,{path:V(i,e.path,t.path).path});else{let r=m({},e.params);for(let e in r)r[e]??delete r[e];n=m({},e,{params:y(r)}),t.params=y(t.params)}let a=r.resolve(n,t),c=e.hash||``;a.params=v(ee(a.params));let l=de(o,m({},e,{hash:ce(c),path:a.path})),u=s.createHref(l);return m({fullPath:l,hash:c,query:o===Ce?we(e.query):e.query||{}},a,{redirectedFrom:void 0,href:u})}function D(e){return typeof e==`string`?V(i,e,f.value.path):m({},e)}function ae(e,t){if(p!==e)return b(8,{from:t,to:e})}function O(e){return A(e)}function oe(e){return O(m(D(e),{replace:!0}))}function k(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=D(i):{path:i},i.params={}),m({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function A(e,t){let n=p=E(e),r=f.value,i=e.state,a=e.force,s=e.replace===!0,c=k(n,r);if(c)return A(m(D(c),{state:typeof c==`object`?m({},i,c.state):i,force:a,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!a&&fe(o,r,n)&&(u=b(16,{to:l,from:r}),W(r,r,!0,!1)),(u?Promise.resolve(u):M(l,r)).catch(e=>x(e)?x(e,2)?e:U(e):B(e,l,r)).then(e=>{if(e){if(x(e,2))return A(m({replace:s},D(e.to),{state:typeof e.to==`object`?m({},i,e.to.state):i,force:a}),t||l)}else e=P(l,r,!0,s,i);return N(l,r,e),e})}function se(e,t){let n=ae(e,t);return n?Promise.reject(n):Promise.resolve()}function j(e){let t=q.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function M(e,t){let n,[r,i,a]=Ee(e,t);n=Te(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push($(r,e,t))});let o=se.bind(null,e,t);return n.push(o),X(n).then(()=>{n=[];for(let r of l.list())n.push($(r,e,t));return n.push(o),X(n)}).then(()=>{n=Te(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push($(r,e,t))});return n.push(o),X(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(_(r.beforeEnter))for(let i of r.beforeEnter)n.push($(i,e,t));else n.push($(r.beforeEnter,e,t));return n.push(o),X(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Te(a,`beforeRouteEnter`,e,t,j),n.push(o),X(n))).then(()=>{n=[];for(let r of u.list())n.push($(r,e,t));return n.push(o),X(n)}).catch(e=>x(e,8)?e:Promise.reject(e))}function N(e,t,n){d.list().forEach(r=>j(()=>r(e,t,n)))}function P(e,t,n,r,i){let a=ae(e,t);if(a)return a;let o=t===J,c=w?history.state:{};n&&(r||o?s.replace(e.fullPath,m({scroll:o&&c&&c.scroll},i)):s.push(e.fullPath,i)),f.value=e,W(e,t,n,o),U()}let F;function I(){F||=s.listen((e,t,n)=>{if(!Y.listening)return;let r=E(e),i=k(r,Y.currentRoute.value);if(i){A(m(i,{replace:!0,force:!0}),r).catch(g);return}p=r;let a=f.value;w&&ve(ge(a.fullPath,n.delta),Z()),M(r,a).catch(e=>x(e,12)?e:x(e,2)?(A(m(D(e.to),{force:!0}),r).then(e=>{x(e,20)&&!n.delta&&n.type===`pop`&&s.go(-1,!1)}).catch(g),Promise.reject()):(n.delta&&s.go(-n.delta,!1),B(e,r,a))).then(e=>{e||=P(r,a,!1),e&&(n.delta&&!x(e,8)?s.go(-n.delta,!1):n.type===`pop`&&x(e,20)&&s.go(-1,!1)),N(r,a,e)}).catch(g)})}let L=Q(),le=Q(),z;function B(e,t,n){U(e);let r=le.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function H(){return z&&f.value!==J?Promise.resolve():new Promise((e,t)=>{L.add([e,t])})}function U(e){return z||(z=!e,I(),L.list().forEach(([t,n])=>e?n(e):t()),L.reset()),e}function W(e,r,i,a){let{scrollBehavior:o}=n;if(!w||!o)return Promise.resolve();let s=!i&&ye(ge(e.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return t().then(()=>o(e,r,s)).then(t=>e===f.value&&t&&he(t)).catch(t=>e===f.value&&B(t,e,r))}let G=e=>s.go(e),K,q=new Set,Y={currentRoute:f,listening:!0,addRoute:S,removeRoute:re,clearRoutes:r.clearRoutes,hasRoute:ie,getRoutes:T,resolve:E,options:n,push:O,replace:oe,go:G,back:()=>G(-1),forward:()=>G(1),beforeEach:l.add,beforeResolve:u.add,afterEach:d.add,onError:le.add,isReady:H,install(t){t.component(`RouterLink`,rt),t.component(`RouterView`,ut),t.config.globalProperties.$router=Y,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>c(f)}),w&&!K&&f.value===J&&(K=!0,O(s.location).catch(e=>{}));let n={};for(let e in J)Object.defineProperty(n,e,{get:()=>f.value[e],enumerable:!0});t.provide(te,Y),t.provide(C,e(n)),t.provide(ne,f);let r=t.unmount;q.add(t),t.unmount=function(){q.delete(t),q.size<1&&(p=J,F&&F(),F=null,f.value=J,K=!1,z=!1),r()}}};function X(e){return e.reduce((e,t)=>e.then(()=>j(t)),Promise.resolve())}return Y}export{J as a,Me as i,dt as n,re as o,Ne as r,ut as t};
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/mbruyqke.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-hsdbnv92.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/mbruyqke.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-l1ffxhko.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-d9q1xry0.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-ox3ztino.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-mgsi4s2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-mci0xx49.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-cwkxp5t4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-ck1m833g.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-d5qsebus.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hhnji3pn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-b56v4bpd.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-jsh6xr6n.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-o7q1mchx.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/mbruyqke.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-cx0uvu2o.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-kms351ji.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-muovlha1.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-f6zkixpn.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-ivoxtfjk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-nd5v2dc8.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-otmjigaj.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block-ivymjiov.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-e4xweo15.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer-fbwc78mp.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown-j9whus4q.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect-efk0r1bm.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-l66gafm5.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-mq6ubyvk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-fa1284ej.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"f408df35-fbed-4f67-b31a-84e2dcf7d5f4",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1784892383929,false]</script></body></html>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '@nuxt/kit';
|
|
2
|
-
export { m as default } from './shared/devtools.
|
|
2
|
+
export { m as default } from './shared/devtools.CCWq4fFE.mjs';
|
|
@@ -9,6 +9,8 @@ import { useAppConfig, useRuntimeConfig } from "#imports";
|
|
|
9
9
|
import { initTimelineMetrics } from "../../function-metrics-helpers.js";
|
|
10
10
|
import { state } from "./state.js";
|
|
11
11
|
const MULTIPLE_SLASHES_RE = /\/+/g;
|
|
12
|
+
const NUXT_DOCK_GROUP_ID = "nuxt";
|
|
13
|
+
const NUXT_DOCK_ANCHOR_ID = "nuxt:devtools";
|
|
12
14
|
function getViteDevToolsContext() {
|
|
13
15
|
return getDevToolsClientContext();
|
|
14
16
|
}
|
|
@@ -34,7 +36,7 @@ export async function setupDevToolsClient({
|
|
|
34
36
|
toggle() {
|
|
35
37
|
const ctx = getViteDevToolsContext();
|
|
36
38
|
if (ctx)
|
|
37
|
-
ctx.docks.toggleEntry(
|
|
39
|
+
ctx.docks.toggleEntry(NUXT_DOCK_GROUP_ID);
|
|
38
40
|
},
|
|
39
41
|
close() {
|
|
40
42
|
const ctx = getViteDevToolsContext();
|
|
@@ -45,14 +47,14 @@ export async function setupDevToolsClient({
|
|
|
45
47
|
const ctx = getViteDevToolsContext();
|
|
46
48
|
if (ctx) {
|
|
47
49
|
ctx.panel.store.value.open = true;
|
|
48
|
-
ctx.docks.switchEntry(
|
|
50
|
+
ctx.docks.switchEntry(NUXT_DOCK_GROUP_ID);
|
|
49
51
|
}
|
|
50
52
|
},
|
|
51
53
|
async navigate(path) {
|
|
52
54
|
const ctx = getViteDevToolsContext();
|
|
53
55
|
if (ctx) {
|
|
54
56
|
ctx.panel.store.value.open = true;
|
|
55
|
-
ctx.docks.switchEntry(
|
|
57
|
+
ctx.docks.switchEntry(NUXT_DOCK_GROUP_ID);
|
|
56
58
|
}
|
|
57
59
|
await client.hooks.callHook("host:action:navigate", path);
|
|
58
60
|
},
|
|
@@ -222,11 +224,26 @@ export async function setupDevToolsClient({
|
|
|
222
224
|
}
|
|
223
225
|
setupRouteTracking(timeline, router);
|
|
224
226
|
setupReactivity(client, router, timeline);
|
|
227
|
+
bindVueDevToolsIframe();
|
|
225
228
|
clientRef.value = client;
|
|
226
229
|
window.addEventListener("keydown", (e) => {
|
|
227
230
|
if (e.code === "KeyD" && e.altKey && e.shiftKey)
|
|
228
231
|
client.devtools.toggle();
|
|
229
232
|
});
|
|
233
|
+
function bindVueDevToolsIframe() {
|
|
234
|
+
let bound;
|
|
235
|
+
const bind = () => {
|
|
236
|
+
const ctx = getViteDevToolsContext();
|
|
237
|
+
const dockIframe = ctx?.docks?.getStateById?.(NUXT_DOCK_ANCHOR_ID)?.domElements?.iframe;
|
|
238
|
+
if (!dockIframe || dockIframe === bound)
|
|
239
|
+
return;
|
|
240
|
+
bound = dockIframe;
|
|
241
|
+
iframe = dockIframe;
|
|
242
|
+
setIframeServerContext(dockIframe);
|
|
243
|
+
};
|
|
244
|
+
bind();
|
|
245
|
+
setInterval(bind, 500);
|
|
246
|
+
}
|
|
230
247
|
}
|
|
231
248
|
export function useClientColorMode() {
|
|
232
249
|
const explicitColor = ref();
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
|
+
|
|
3
|
+
const e=globalThis.process?.env||Object.create(null),t=globalThis.process||{env:e},n=t!==void 0&&t.env&&t.env.NODE_ENV||void 0,r=[[`claude`,[`CLAUDECODE`,`CLAUDE_CODE`]],[`replit`,[`REPL_ID`]],[`gemini`,[`GEMINI_CLI`]],[`codex`,[`CODEX_SANDBOX`,`CODEX_THREAD_ID`]],[`opencode`,[`OPENCODE`]],[`pi`,[i(`PATH`,/\.pi[\\/]agent/)]],[`auggie`,[`AUGMENT_AGENT`]],[`goose`,[`GOOSE_PROVIDER`]],[`junie`,[`JUNIE_DATA`,`JUNIE_SHIM_PATH`]],[`devin`,[i(`EDITOR`,/devin/)]],[`cursor`,[`CURSOR_AGENT`]],[`kiro`,[i(`TERM_PROGRAM`,/kiro/,{noTTY:true})]]];function i(n,r,i){return ()=>{if(i?.noTTY&&t.stdout?.isTTY)return false;let a=e[n];return a?r.test(a):false}}function a(){let t=e.AI_AGENT;if(t)return {name:t.toLowerCase()};for(let[t,n]of r)for(let r of n)if(typeof r==`string`?e[r]:r())return {name:t};return {}}const o=a();o.name;!!o.name;const l=[[`APPVEYOR`],[`AWS_AMPLIFY`,`AWS_APP_ID`,{ci:true}],[`AZURE_PIPELINES`,`SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],[`AZURE_STATIC`,`INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],[`APPCIRCLE`,`AC_APPCIRCLE`],[`BAMBOO`,`bamboo_planKey`],[`BITBUCKET`,`BITBUCKET_COMMIT`],[`BITRISE`,`BITRISE_IO`],[`BUDDY`,`BUDDY_WORKSPACE_ID`],[`BUILDKITE`],[`CIRCLE`,`CIRCLECI`],[`CIRRUS`,`CIRRUS_CI`],[`CLOUDFLARE_PAGES`,`CF_PAGES`,{ci:true}],[`CLOUDFLARE_WORKERS`,`WORKERS_CI`,{ci:true}],[`GOOGLE_CLOUDRUN`,`K_SERVICE`],[`GOOGLE_CLOUDRUN_JOB`,`CLOUD_RUN_JOB`],[`CODEBUILD`,`CODEBUILD_BUILD_ARN`],[`CODEFRESH`,`CF_BUILD_ID`],[`DRONE`],[`DRONE`,`DRONE_BUILD_EVENT`],[`DSARI`],[`GITHUB_ACTIONS`],[`GITLAB`,`GITLAB_CI`],[`GITLAB`,`CI_MERGE_REQUEST_ID`],[`GOCD`,`GO_PIPELINE_LABEL`],[`LAYERCI`],[`JENKINS`,`JENKINS_URL`],[`HUDSON`,`HUDSON_URL`],[`MAGNUM`],[`NETLIFY`],[`NETLIFY`,`NETLIFY_LOCAL`,{ci:false}],[`NEVERCODE`],[`RENDER`],[`SAIL`,`SAILCI`],[`SEMAPHORE`],[`SCREWDRIVER`],[`SHIPPABLE`],[`SOLANO`,`TDDIUM`],[`STRIDER`],[`TEAMCITY`,`TEAMCITY_VERSION`],[`TRAVIS`],[`VERCEL`,`NOW_BUILDER`],[`VERCEL`,`VERCEL`,{ci:false}],[`VERCEL`,`VERCEL_ENV`,{ci:false}],[`APPCENTER`,`APPCENTER_BUILD_ID`],[`CODESANDBOX`,`CODESANDBOX_SSE`,{ci:false}],[`CODESANDBOX`,`CODESANDBOX_HOST`,{ci:false}],[`STACKBLITZ`],[`STORMKIT`],[`CLEAVR`],[`ZEABUR`],[`CODESPHERE`,`CODESPHERE_APP_ID`,{ci:true}],[`RAILWAY`,`RAILWAY_PROJECT_ID`],[`RAILWAY`,`RAILWAY_SERVICE_ID`],[`DENO-DEPLOY`,`DENO_DEPLOY`],[`DENO-DEPLOY`,`DENO_DEPLOYMENT_ID`],[`FIREBASE_APP_HOSTING`,`FIREBASE_APP_HOSTING`,{ci:true}],[`EDGEONE_PAGES`,`EO_PAGES_CI`,{ci:true}]];function u(){for(let t of l)if(e[t[1]||t[0]])return {name:t[0].toLowerCase(),...t[2]};return e.SHELL===`/bin/jsh`&&t.versions?.webcontainer?{name:`stackblitz`,ci:false}:{name:``,ci:false}}const d=u(),f=d.name,p=t.platform||``,m=!!e.CI||d.ci!==false,h=!!t.stdout?.isTTY;!!e.DEBUG;const v=n===`test`||!!e.TEST;n===`production`||e.MODE===`production`;n===`dev`||n===`development`||e.MODE===`development`;!!e.MINIMAL||m||v||!h;const S=/^win/i.test(p);!e.NO_COLOR&&(!!e.FORCE_COLOR||(h||S)&&e.TERM!==`dumb`||m);const E=(t.versions?.node||``).replace(/^v/,``)||null;Number(E?.split(`.`)[0])||null;const O=!!t?.versions?.node,k=`Bun`in globalThis,A=`Deno`in globalThis,j=`fastly`in globalThis,M=`Netlify`in globalThis,N=`EdgeRuntime`in globalThis,P=globalThis.navigator?.userAgent===`Cloudflare-Workers`,F=[[M,`netlify`],[N,`edge-light`],[P,`workerd`],[j,`fastly`],[A,`deno`],[k,`bun`],[O,`node`]];function I(){let e=F.find(e=>e[0]);if(e)return {name:e[1]}}const L=I();L?.name||``;
|
|
4
|
+
|
|
5
|
+
const isSandboxed = f === "stackblitz" || f === "codesandbox";
|
|
6
|
+
const defaultOptions = {
|
|
7
|
+
enabled: void 0,
|
|
8
|
+
// determine multiple conditions
|
|
9
|
+
componentInspector: true,
|
|
10
|
+
viteInspect: true,
|
|
11
|
+
codeServer: {
|
|
12
|
+
enabled: true
|
|
13
|
+
},
|
|
14
|
+
disableAuthorization: isSandboxed
|
|
15
|
+
};
|
|
16
|
+
let serverTasksEnabledByDefault = false;
|
|
17
|
+
function setServerTasksEnabledByDefault(enabled) {
|
|
18
|
+
serverTasksEnabledByDefault = enabled;
|
|
19
|
+
}
|
|
20
|
+
function createDefaultTabOptions() {
|
|
21
|
+
return {
|
|
22
|
+
behavior: {
|
|
23
|
+
telemetry: null,
|
|
24
|
+
openInEditor: void 0
|
|
25
|
+
},
|
|
26
|
+
ui: {
|
|
27
|
+
componentsView: "list",
|
|
28
|
+
componentsGraphShowNodeModules: false,
|
|
29
|
+
componentsGraphShowGlobalComponents: true,
|
|
30
|
+
componentsGraphShowPages: false,
|
|
31
|
+
componentsGraphShowLayouts: false,
|
|
32
|
+
componentsGraphShowWorkspace: true,
|
|
33
|
+
showExperimentalFeatures: false,
|
|
34
|
+
showHelpButtons: true,
|
|
35
|
+
scale: 1,
|
|
36
|
+
hiddenTabs: [],
|
|
37
|
+
pinnedTabs: [],
|
|
38
|
+
hiddenTabCategories: []
|
|
39
|
+
},
|
|
40
|
+
serverRoutes: {
|
|
41
|
+
selectedRoute: null,
|
|
42
|
+
view: "tree",
|
|
43
|
+
inputDefaults: {
|
|
44
|
+
query: [],
|
|
45
|
+
body: [],
|
|
46
|
+
headers: []
|
|
47
|
+
},
|
|
48
|
+
sendFrom: "app"
|
|
49
|
+
},
|
|
50
|
+
serverTasks: {
|
|
51
|
+
enabled: serverTasksEnabledByDefault,
|
|
52
|
+
selectedTask: null,
|
|
53
|
+
view: "list",
|
|
54
|
+
inputDefaults: {
|
|
55
|
+
query: [],
|
|
56
|
+
body: [],
|
|
57
|
+
headers: [{ active: true, key: "Content-Type", value: "application/json", type: "string" }]
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
assets: {
|
|
61
|
+
view: "grid"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const defaultAllowedExtensions = [
|
|
66
|
+
"png",
|
|
67
|
+
"jpg",
|
|
68
|
+
"jpeg",
|
|
69
|
+
"gif",
|
|
70
|
+
"svg",
|
|
71
|
+
"webp",
|
|
72
|
+
"ico",
|
|
73
|
+
"mp4",
|
|
74
|
+
"ogg",
|
|
75
|
+
"mp3",
|
|
76
|
+
"wav",
|
|
77
|
+
"mov",
|
|
78
|
+
"mkv",
|
|
79
|
+
"mpg",
|
|
80
|
+
"txt",
|
|
81
|
+
"ttf",
|
|
82
|
+
"woff",
|
|
83
|
+
"woff2",
|
|
84
|
+
"eot",
|
|
85
|
+
"json",
|
|
86
|
+
"js",
|
|
87
|
+
"jsx",
|
|
88
|
+
"ts",
|
|
89
|
+
"tsx",
|
|
90
|
+
"md",
|
|
91
|
+
"mdx",
|
|
92
|
+
"vue",
|
|
93
|
+
"webm"
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
const module$1 = defineNuxtModule({
|
|
97
|
+
meta: {
|
|
98
|
+
name: "@nuxt/devtools",
|
|
99
|
+
configKey: "devtools"
|
|
100
|
+
},
|
|
101
|
+
defaults: defaultOptions,
|
|
102
|
+
setup(options, nuxt) {
|
|
103
|
+
if (process.env.VITEST || process.env.TEST)
|
|
104
|
+
return;
|
|
105
|
+
if (typeof options === "boolean")
|
|
106
|
+
options = { enabled: options };
|
|
107
|
+
if (options.enabled === false)
|
|
108
|
+
return;
|
|
109
|
+
return import('../chunks/module-main.mjs').then(function (n) { return n.m; }).then(({ enableModule }) => enableModule(options, nuxt));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export { createDefaultTabOptions as c, defaultAllowedExtensions as d, module$1 as m, setServerTasksEnabledByDefault as s };
|
package/dist/types.d.mts
CHANGED
|
@@ -32,10 +32,6 @@ interface InstallingModulestate {
|
|
|
32
32
|
info: ModuleStaticInfo;
|
|
33
33
|
processId: string;
|
|
34
34
|
}
|
|
35
|
-
interface AnalyzeBuildingState {
|
|
36
|
-
name: string;
|
|
37
|
-
processId: string;
|
|
38
|
-
}
|
|
39
35
|
type ModuleActionType = 'install' | 'uninstall';
|
|
40
36
|
|
|
41
|
-
export type {
|
|
37
|
+
export type { InstallingModulestate, ModuleActionType, NormalizedHeadTag, SocialPreviewCard, SocialPreviewResolved };
|
|
@@ -730,7 +730,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
730
730
|
/* STABLE_FRAGMENT */
|
|
731
731
|
);
|
|
732
732
|
}
|
|
733
|
-
const Component =
|
|
733
|
+
const Component = /*#__PURE__*/ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/devtools/devtools/packages/devtools/src/webcomponents/components/NuxtDevtoolsInspectPanel.vue"]]);
|
|
734
734
|
|
|
735
735
|
const NuxtDevtoolsInspectPanel = defineCustomElement(
|
|
736
736
|
Component,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.9",
|
|
5
5
|
"description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devtools.nuxt.com",
|
|
@@ -32,103 +32,96 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"vite": "
|
|
35
|
+
"vite": "^8.0.14"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@
|
|
38
|
+
"@devframes/plugin-code-server": "^0.7.13",
|
|
39
|
+
"@devframes/plugin-data-inspector": "^0.7.13",
|
|
40
|
+
"@nuxt/kit": "^4.5.0",
|
|
41
|
+
"@vitejs/devtools": "^0.4.7",
|
|
42
|
+
"@vitejs/devtools-kit": "^0.4.7",
|
|
43
|
+
"@vue/devtools-core": "^8.1.5",
|
|
44
|
+
"@vue/devtools-kit": "^8.1.5",
|
|
43
45
|
"birpc": "^4.0.0",
|
|
44
46
|
"consola": "^3.4.2",
|
|
45
47
|
"destr": "^2.0.5",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
48
|
+
"diff": "^8.0.4",
|
|
49
|
+
"error-stack-parser-es": "^2.0.1",
|
|
50
|
+
"fast-npm-meta": "^2.2.0",
|
|
49
51
|
"hookable": "^6.1.1",
|
|
50
52
|
"image-meta": "^0.2.2",
|
|
51
|
-
"launch-editor": "^2.
|
|
53
|
+
"launch-editor": "^2.14.1",
|
|
52
54
|
"local-pkg": "^1.2.1",
|
|
53
55
|
"magicast": "^0.5.3",
|
|
54
56
|
"ohash": "^2.0.11",
|
|
55
57
|
"pathe": "^2.0.3",
|
|
56
58
|
"perfect-debounce": "^2.1.0",
|
|
57
59
|
"pkg-types": "^2.3.1",
|
|
58
|
-
"semver": "^7.8.1",
|
|
59
60
|
"sirv": "^3.0.2",
|
|
60
61
|
"structured-clone-es": "^2.0.0",
|
|
61
|
-
"tinyexec": "^1.2.
|
|
62
|
-
"tinyglobby": "^0.2.
|
|
62
|
+
"tinyexec": "^1.2.4",
|
|
63
|
+
"tinyglobby": "^0.2.17",
|
|
63
64
|
"unstorage": "^1.17.5",
|
|
64
|
-
"
|
|
65
|
+
"verkit": "^0.2.0",
|
|
66
|
+
"vite-plugin-inspect": "^12.0.2",
|
|
65
67
|
"vite-plugin-vue-tracer": "^1.4.0",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"@nuxt/devtools-kit": "4.0.0-alpha.7"
|
|
68
|
+
"ws": "^8.21.1",
|
|
69
|
+
"@nuxt/devtools-kit": "4.0.0-alpha.9"
|
|
69
70
|
},
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"@antfu/utils": "^9.3.0",
|
|
72
|
-
"@discoveryjs/cli": "^2.14.7",
|
|
73
|
-
"@discoveryjs/discovery": "1.0.0-beta.92",
|
|
74
73
|
"@iconify-json/bxl": "^1.2.4",
|
|
75
|
-
"@iconify-json/carbon": "^1.2.
|
|
74
|
+
"@iconify-json/carbon": "^1.2.24",
|
|
76
75
|
"@iconify-json/logos": "^1.2.11",
|
|
77
76
|
"@iconify-json/ph": "^1.2.2",
|
|
78
77
|
"@iconify-json/ri": "^1.2.10",
|
|
79
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
80
|
-
"@iconify-json/tabler": "^1.2.
|
|
81
|
-
"@
|
|
82
|
-
"@parcel/watcher": "^2.5.6",
|
|
78
|
+
"@iconify-json/simple-icons": "^1.2.91",
|
|
79
|
+
"@iconify-json/tabler": "^1.2.37",
|
|
80
|
+
"@parcel/watcher": "^2.6.0",
|
|
83
81
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
84
|
-
"@unhead/schema": "^3.
|
|
85
|
-
"@unocss/nuxt": "^66.7.
|
|
86
|
-
"@unocss/preset-icons": "^66.7.
|
|
87
|
-
"@unocss/preset-uno": "^66.7.
|
|
88
|
-
"@unocss/runtime": "^66.7.
|
|
89
|
-
"@vitejs/devtools": "^0.
|
|
90
|
-
"@
|
|
91
|
-
"@vue/devtools-applet": "^8.1.2",
|
|
82
|
+
"@unhead/schema": "^3.2.3",
|
|
83
|
+
"@unocss/nuxt": "^66.7.5",
|
|
84
|
+
"@unocss/preset-icons": "^66.7.5",
|
|
85
|
+
"@unocss/preset-uno": "^66.7.5",
|
|
86
|
+
"@unocss/runtime": "^66.7.5",
|
|
87
|
+
"@vitejs/devtools": "^0.4.7",
|
|
88
|
+
"@vue/devtools-applet": "^8.1.5",
|
|
92
89
|
"@vueuse/nuxt": "^14.3.0",
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"cronstrue": "^3.14.0",
|
|
96
|
-
"exsolve": "^1.0.8",
|
|
90
|
+
"cronstrue": "^3.24.0",
|
|
91
|
+
"exsolve": "^1.1.0",
|
|
97
92
|
"floating-vue": "^5.2.2",
|
|
98
|
-
"fuse.js": "^7.
|
|
93
|
+
"fuse.js": "^7.5.0",
|
|
99
94
|
"json-editor-vue": "^0.18.1",
|
|
100
|
-
"lightningcss": "^1.
|
|
101
|
-
"markdown-it": "^14.
|
|
95
|
+
"lightningcss": "^1.33.0",
|
|
96
|
+
"markdown-it": "^14.3.0",
|
|
102
97
|
"markdown-it-link-attributes": "^4.0.1",
|
|
103
98
|
"nitropack": "^2.13.4",
|
|
104
|
-
"nuxt": "^4.
|
|
99
|
+
"nuxt": "^4.5.0",
|
|
105
100
|
"ofetch": "^1.5.1",
|
|
106
|
-
"package-manager-detector": "^1.
|
|
101
|
+
"package-manager-detector": "^1.8.0",
|
|
107
102
|
"quicktype-core": "22.0.0",
|
|
108
103
|
"scule": "^1.3.0",
|
|
109
|
-
"shiki": "^4.1
|
|
110
|
-
"shiki-codegen": "^4.1
|
|
104
|
+
"shiki": "^4.3.1",
|
|
105
|
+
"shiki-codegen": "^4.3.1",
|
|
111
106
|
"theme-vitesse": "^1.0.0",
|
|
112
|
-
"tsx": "^4.
|
|
107
|
+
"tsx": "^4.23.1",
|
|
113
108
|
"ua-parser-modern": "^0.1.1",
|
|
114
|
-
"unimport": "^6.3.
|
|
115
|
-
"unocss": "^66.7.
|
|
109
|
+
"unimport": "^6.3.1",
|
|
110
|
+
"unocss": "^66.7.5",
|
|
116
111
|
"unplugin-vue": "^7.2.0",
|
|
117
112
|
"unplugin-vue-markdown": "^32.0.0",
|
|
118
113
|
"vanilla-jsoneditor": "^3.12.0",
|
|
119
114
|
"vis-data": "^8.0.4",
|
|
120
115
|
"vis-network": "^10.1.0",
|
|
121
|
-
"vue-tsc": "^3.3.
|
|
116
|
+
"vue-tsc": "^3.3.8",
|
|
122
117
|
"vue-virtual-scroller": "^3.0.4"
|
|
123
118
|
},
|
|
124
119
|
"scripts": {
|
|
125
|
-
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:
|
|
120
|
+
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client",
|
|
126
121
|
"build:client": "nuxi generate client && node scripts/copy-client.mjs",
|
|
127
122
|
"build:module": "nuxt-build-module build",
|
|
128
|
-
"build:discovery": "npx discovery-build -c .discoveryrc.cjs -s -o client/public/discovery",
|
|
129
|
-
"dev:discovery": "discovery -c .discoveryrc.cjs",
|
|
130
123
|
"stub": "nuxt-build-module build --stub",
|
|
131
|
-
"dev": "
|
|
124
|
+
"dev": "nuxi dev client",
|
|
132
125
|
"dev:playground": "pnpm build && nuxi dev playground",
|
|
133
126
|
"dev:prepare": "pnpm run stub && nuxi prepare client"
|
|
134
127
|
}
|
package/.discoveryrc.cjs
DELETED
package/dist/chunks/vscode.mjs
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
2
|
-
import fs from 'node:fs/promises';
|
|
3
|
-
import { hostname } from 'node:os';
|
|
4
|
-
import { resolve } from 'node:path';
|
|
5
|
-
import { startSubprocess } from '@nuxt/devtools-kit';
|
|
6
|
-
import { logger } from '@nuxt/kit';
|
|
7
|
-
import { checkPort, getPort } from 'get-port-please';
|
|
8
|
-
import { x } from 'tinyexec';
|
|
9
|
-
import which from 'which';
|
|
10
|
-
import { colors } from 'consola/utils';
|
|
11
|
-
|
|
12
|
-
const LOG_PREFIX = colors.cyan("Nuxt DevTools:");
|
|
13
|
-
|
|
14
|
-
const codeBinaryOptions = {
|
|
15
|
-
"ms-code-cli": {
|
|
16
|
-
codeBinary: "code",
|
|
17
|
-
launchArg: "serve-web",
|
|
18
|
-
licenseTermsArg: "--accept-server-license-terms",
|
|
19
|
-
connectionTokenArg: "--without-connection-token"
|
|
20
|
-
},
|
|
21
|
-
"ms-code-server": {
|
|
22
|
-
codeBinary: "code-server",
|
|
23
|
-
launchArg: "serve-local",
|
|
24
|
-
licenseTermsArg: "--accept-server-license-terms",
|
|
25
|
-
connectionTokenArg: "--without-connection-token"
|
|
26
|
-
},
|
|
27
|
-
"coder-code-server": {
|
|
28
|
-
codeBinary: "code-server",
|
|
29
|
-
launchArg: "serve-local",
|
|
30
|
-
licenseTermsArg: "",
|
|
31
|
-
connectionTokenArg: ""
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
async function setup({ nuxt, options, openInEditorHooks, rpc }) {
|
|
35
|
-
const vsOptions = options?.vscode || {};
|
|
36
|
-
const codeServer = vsOptions?.codeServer || "ms-code-server";
|
|
37
|
-
const { codeBinary, launchArg, licenseTermsArg, connectionTokenArg } = codeBinaryOptions[codeServer];
|
|
38
|
-
const installed = !!await which(codeBinary).catch(() => null);
|
|
39
|
-
let port = vsOptions?.port || 3080;
|
|
40
|
-
let url = `http://localhost:${port}`;
|
|
41
|
-
const host = vsOptions?.host ? `--host=${vsOptions.host}` : "--host=127.0.0.1";
|
|
42
|
-
let loaded = false;
|
|
43
|
-
let promise = null;
|
|
44
|
-
const mode = vsOptions?.mode || "local-serve";
|
|
45
|
-
const computerHostName = vsOptions.tunnel?.name || hostname().split(".").join("");
|
|
46
|
-
const root = nuxt.options.rootDir;
|
|
47
|
-
const vscodeServerControllerFile = resolve(root, ".vscode", ".server-controller-port.log");
|
|
48
|
-
openInEditorHooks.push(async (file) => {
|
|
49
|
-
if (!existsSync(vscodeServerControllerFile))
|
|
50
|
-
return false;
|
|
51
|
-
try {
|
|
52
|
-
const { port: port2 } = JSON.parse(await fs.readFile(vscodeServerControllerFile, "utf-8"));
|
|
53
|
-
const url2 = `http://localhost:${port2}/open?path=${encodeURIComponent(`${root}/${file}`)}`;
|
|
54
|
-
await fetch(url2);
|
|
55
|
-
rpc.broadcast.navigateTo("/modules/custom-builtin-vscode");
|
|
56
|
-
return true;
|
|
57
|
-
} catch (e) {
|
|
58
|
-
console.debug(`Failed to open file "${file}" in VS Code Server`);
|
|
59
|
-
console.debug(e);
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
async function startCodeServer() {
|
|
64
|
-
if (existsSync(vscodeServerControllerFile))
|
|
65
|
-
await fs.rm(vscodeServerControllerFile, { force: true });
|
|
66
|
-
if (vsOptions?.reuseExistingServer && !await checkPort(port)) {
|
|
67
|
-
loaded = true;
|
|
68
|
-
url = `http://localhost:${port}/?folder=${encodeURIComponent(root)}`;
|
|
69
|
-
logger.info(LOG_PREFIX, `Existing VS Code Server found at port ${port}...`);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
port = await getPort({ port });
|
|
73
|
-
url = `http://localhost:${port}/?folder=${encodeURIComponent(root)}`;
|
|
74
|
-
logger.info(LOG_PREFIX, `Starting VS Code Server at ${url} ...`);
|
|
75
|
-
x(codeBinary, [
|
|
76
|
-
"--install-extension",
|
|
77
|
-
"antfu.vscode-server-controller"
|
|
78
|
-
], { nodeOptions: { stdio: ["pipe", "ignore", "inherit"] } });
|
|
79
|
-
startSubprocess(
|
|
80
|
-
{
|
|
81
|
-
command: codeBinary,
|
|
82
|
-
args: [
|
|
83
|
-
launchArg,
|
|
84
|
-
licenseTermsArg,
|
|
85
|
-
connectionTokenArg,
|
|
86
|
-
`--port=${port}`,
|
|
87
|
-
host
|
|
88
|
-
]
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
id: "devtools:vscode",
|
|
92
|
-
name: "VS Code Server",
|
|
93
|
-
icon: "logos-visual-studio-code"
|
|
94
|
-
},
|
|
95
|
-
nuxt
|
|
96
|
-
);
|
|
97
|
-
for (let i = 0; i < 100; i++) {
|
|
98
|
-
if (await fetch(url).then((r) => r.ok).catch(() => false))
|
|
99
|
-
break;
|
|
100
|
-
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
101
|
-
}
|
|
102
|
-
await new Promise((resolve2) => setTimeout(resolve2, 2e3));
|
|
103
|
-
loaded = true;
|
|
104
|
-
}
|
|
105
|
-
async function startCodeTunnel() {
|
|
106
|
-
const { stdout: currentDir } = await x("pwd");
|
|
107
|
-
url = `https://vscode.dev/tunnel/${computerHostName}${currentDir.trim()}`;
|
|
108
|
-
logger.info(LOG_PREFIX, `Starting VS Code tunnel at ${url} ...`);
|
|
109
|
-
const command = x("code", [
|
|
110
|
-
"tunnel",
|
|
111
|
-
"--accept-server-license-terms",
|
|
112
|
-
"--name",
|
|
113
|
-
`${computerHostName}`
|
|
114
|
-
]);
|
|
115
|
-
command.process?.stderr?.pipe(process.stderr);
|
|
116
|
-
command.process?.stdout?.pipe(process.stdout);
|
|
117
|
-
nuxt.hook("close", () => {
|
|
118
|
-
command.kill();
|
|
119
|
-
});
|
|
120
|
-
for (let i = 0; i < 100; i++) {
|
|
121
|
-
if (await fetch(url).then((r) => r.ok).catch(() => false))
|
|
122
|
-
break;
|
|
123
|
-
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
124
|
-
}
|
|
125
|
-
await new Promise((resolve2) => setTimeout(resolve2, 2e3));
|
|
126
|
-
loaded = true;
|
|
127
|
-
}
|
|
128
|
-
async function start() {
|
|
129
|
-
if (mode === "tunnel")
|
|
130
|
-
await startCodeTunnel();
|
|
131
|
-
else
|
|
132
|
-
await startCodeServer();
|
|
133
|
-
}
|
|
134
|
-
nuxt.hook("devtools:customTabs", (tabs) => {
|
|
135
|
-
tabs.push({
|
|
136
|
-
name: "builtin-vscode",
|
|
137
|
-
title: "VS Code",
|
|
138
|
-
icon: "bxl-visual-studio",
|
|
139
|
-
category: "modules",
|
|
140
|
-
requireAuth: true,
|
|
141
|
-
view: !installed && !(vsOptions?.mode === "tunnel") ? {
|
|
142
|
-
type: "launch",
|
|
143
|
-
title: "Install VS Code Server",
|
|
144
|
-
description: `It seems you don't have code-server installed.
|
|
145
|
-
|
|
146
|
-
Learn more about it with <a href="https://code.visualstudio.com/blogs/2022/07/07/vscode-server" target="_blank">this guide</a>.
|
|
147
|
-
Once installed, restart Nuxt and visit this tab again.`,
|
|
148
|
-
actions: []
|
|
149
|
-
} : !loaded ? {
|
|
150
|
-
type: "launch",
|
|
151
|
-
description: "Launch VS Code right in the devtools!",
|
|
152
|
-
actions: [{
|
|
153
|
-
label: promise ? "Starting..." : "Launch",
|
|
154
|
-
pending: !!promise,
|
|
155
|
-
handle: () => {
|
|
156
|
-
promise = promise || start();
|
|
157
|
-
return promise;
|
|
158
|
-
}
|
|
159
|
-
}]
|
|
160
|
-
} : {
|
|
161
|
-
type: "iframe",
|
|
162
|
-
src: url
|
|
163
|
-
}
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
if (vsOptions?.startOnBoot)
|
|
167
|
-
promise = promise || start();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export { setup };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as e,U as t,_ as n}from"./vendor/json-editor-vue-mkw4apmc.js";import"./composables-ioamscf4.js";var r={"h-screen":``,"w-screen":``,"bg-black":``},i=e({__name:`__blank`,setup(e){return(e,i)=>(t(),n(`div`,r))}});export{i as default};
|