@nuxt/devtools 1.3.2 → 1.3.4
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/chunks/module-main.mjs +12 -7
- package/dist/chunks/vite-inspect.mjs +1 -1
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +25 -26
- package/dist/client/404.html +25 -26
- package/dist/client/_nuxt/{DTf74veE.js → 6wcy4DsH.js} +1 -1
- package/dist/client/_nuxt/{DDnrbwm6.js → 8B46VhQd.js} +10 -10
- package/dist/client/_nuxt/{D7gBCge-.js → 8SMg7xCe.js} +1 -1
- package/dist/client/_nuxt/{nd9mx79B.js → 98R48OH2.js} +1 -1
- package/dist/client/_nuxt/{CfjSiY3T.js → B-sCWvv9.js} +1 -1
- package/dist/client/_nuxt/B29KOOGn.js +9 -0
- package/dist/client/_nuxt/{CJU5ujxD.js → B894X8py.js} +1 -1
- package/dist/client/_nuxt/{hXtXgLSE.js → B8ZbBSrc.js} +1 -1
- package/dist/client/_nuxt/{DQm4bOV6.js → BFLTkFCL.js} +1 -1
- package/dist/client/_nuxt/{BL_hfvyy.js → BFm6EJTU.js} +1 -1
- package/dist/client/_nuxt/{BO-iudyo.js → BKePb5M9.js} +1 -1
- package/dist/client/_nuxt/BKjxjBjR.js +1 -0
- package/dist/client/_nuxt/{BVJlJdda.js → BYuD4knm.js} +1 -1
- package/dist/client/_nuxt/{D847XyuR.js → BZs3jgFa.js} +1 -1
- package/dist/client/_nuxt/{BVCgwITN.js → Ba3iaRF0.js} +2 -2
- package/dist/client/_nuxt/{C8GUE1SK.js → BcsunUHc.js} +1 -1
- package/dist/client/_nuxt/{B-HJZUhU.js → BdeOTENY.js} +1 -1
- package/dist/client/_nuxt/{BfqSh0jD.js → Bj_XrxMu.js} +1 -1
- package/dist/client/_nuxt/{BeLKwQPd.js → BmiNF6l-.js} +1 -1
- package/dist/client/_nuxt/{DZg4WwSa.js → BoP7AKy2.js} +1 -1
- package/dist/client/_nuxt/{BGq4KZyx.js → Br6ll-O0.js} +1 -1
- package/dist/client/_nuxt/{CYVTKYED.js → BulALiVC.js} +1 -1
- package/dist/client/_nuxt/{V_y36BGi.js → Bxkoe-BC.js} +1 -1
- package/dist/client/_nuxt/{D44vw0ad.js → C54vwF0J.js} +1 -1
- package/dist/client/_nuxt/C8ESOK3J.js +30 -0
- package/dist/client/_nuxt/{DxtaXLVv.js → CBZOn9Tq.js} +1 -1
- package/dist/client/_nuxt/{Cri_jq9f.js → CDfEhAL9.js} +1 -1
- package/dist/client/_nuxt/{Dm8mUwGL.js → CGj_8s-I.js} +1 -1
- package/dist/client/_nuxt/{4DrMDvOf.js → CHQ52sTw.js} +1 -1
- package/dist/client/_nuxt/{BX8u6kVi.js → CIgTPfXa.js} +1 -1
- package/dist/client/_nuxt/{C41DfgCv.js → CO6YgqHh.js} +1 -1
- package/dist/client/_nuxt/{Bwpf36Bl.js → CUJNw4nr.js} +1 -1
- package/dist/client/_nuxt/{Dyh3t1OB.js → CUytAwsx.js} +1 -1
- package/dist/client/_nuxt/{D26FlHPL.js → CYSOmuwz.js} +1 -1
- package/dist/client/_nuxt/{BxZrC5KW.js → Cao9Hf6d.js} +1 -1
- package/dist/client/_nuxt/CeyWeT92.js +1032 -0
- package/dist/client/_nuxt/{s0KB5W3i.js → Cn5ttfU_.js} +1 -1
- package/dist/client/_nuxt/{BhuDhIKJ.js → CpJRPiL9.js} +1 -1
- package/dist/client/_nuxt/CrghN-Ad.js +2 -0
- package/dist/client/_nuxt/{l2Y-wpZG.js → CyeATGho.js} +2 -2
- package/dist/client/_nuxt/{CAWcj-Fr.js → D-4ohUPA.js} +1 -1
- package/dist/client/_nuxt/{BZAoIDF4.js → D3VgjIse.js} +2 -7
- package/dist/client/_nuxt/{8icePJ4I.js → D5WHU7S-.js} +1 -1
- package/dist/client/_nuxt/{DTjbdWHx.js → D6rOzE__.js} +1 -1
- package/dist/client/_nuxt/{B-hub2K2.js → D7I2o642.js} +1 -1
- package/dist/client/_nuxt/D9GqCGb7.js +100 -0
- package/dist/client/_nuxt/{_hj05-RZ.js → DBLkZRmC.js} +1 -1
- package/dist/client/_nuxt/{CQ4DIexe.js → DI2S-mmO.js} +1 -1
- package/dist/client/_nuxt/{D1Dg62su.js → DL0CET1h.js} +1 -1
- package/dist/client/_nuxt/DNH9VLI7.js +43 -0
- package/dist/client/_nuxt/{DGIjOFdj.js → DNTHL55G.js} +1 -1
- package/dist/client/_nuxt/{D_ZAQadg.js → DT3-Im-G.js} +1 -1
- package/dist/client/_nuxt/{CJ4574JA.js → DT7g2OtK.js} +1 -1
- package/dist/client/_nuxt/DZHRk8T6.js +1 -0
- package/dist/client/_nuxt/{D9bWLJbD.js → Da5JKEgm.js} +1 -1
- package/dist/client/_nuxt/DhzPY0Bk.js +1 -0
- package/dist/client/_nuxt/DotVwsdv.js +9 -0
- package/dist/client/_nuxt/{C_mHwna3.js → JMRChio8.js} +1 -1
- package/dist/client/_nuxt/{BZrBobni.js → LSJkDbxe.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.Bcfh0aRP.css → NCodeBlock.BJ-XAY5s.css} +1 -1
- package/dist/client/_nuxt/NSectionBlock.Dnwb6MN5.css +1 -0
- package/dist/client/_nuxt/{CnDX42ER.js → QZOV8EJp.js} +1 -1
- package/dist/client/_nuxt/aYYjZ8bg.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/705c4cfa-d5c7-43a4-9f41-3c069a80d514.json +1 -0
- package/dist/client/_nuxt/entry.CuU2sB_i.css +1 -0
- package/dist/client/_nuxt/error-404.CdZ-8tbX.css +1 -0
- package/dist/client/_nuxt/error-500.4KK_ddFR.css +1 -0
- package/dist/client/_nuxt/{CQ0ZKsih.js → mjGmx9GM.js} +2 -2
- package/dist/client/_nuxt/{73fsk-_M.js → oNeXSGv8.js} +1 -1
- package/dist/client/_nuxt/{C49LnR7I.js → p_veFBpZ.js} +1 -1
- package/dist/client/_nuxt/terminals.dNTO8Cf0.css +1 -0
- package/dist/client/_nuxt/{WIBjn-aJ.js → u_lBCHfa.js} +1 -1
- package/dist/client/_nuxt/{CBxMqsuL.js → z73YSsxO.js} +1 -1
- package/dist/client/index.html +25 -26
- package/dist/module.json +2 -2
- package/dist/runtime/function-metrics-helpers.d.ts +1 -1
- package/dist/runtime/{function-metrics-helpers.mjs → function-metrics-helpers.js} +1 -1
- package/dist/runtime/plugins/{devtools.client.mjs → devtools.client.js} +1 -1
- package/dist/runtime/plugins/view/client.d.ts +1 -1
- package/dist/runtime/plugins/view/{client.mjs → client.js} +2 -2
- package/dist/runtime/plugins/view/state.d.ts +1 -1
- package/dist/runtime/plugins/view/{state.mjs → state.js} +1 -1
- package/dist/runtime/settings.d.ts +2 -2
- package/dist/runtime/shared/hooks.d.ts +1 -1
- package/dist/runtime/use-nuxt-devtools.d.ts +1 -1
- package/package.json +33 -35
- package/dist/client/_nuxt/BVT_pDx1.js +0 -9
- package/dist/client/_nuxt/BYLmgL12.js +0 -1
- package/dist/client/_nuxt/C71Avik8.js +0 -1
- package/dist/client/_nuxt/CI_a6Yq_.js +0 -9
- package/dist/client/_nuxt/CQhVfK23.js +0 -99
- package/dist/client/_nuxt/CYpIh8Vy.js +0 -1
- package/dist/client/_nuxt/C_vNhPYi.js +0 -1031
- package/dist/client/_nuxt/D2pUCviE.js +0 -1
- package/dist/client/_nuxt/DGmtW0X_.js +0 -30
- package/dist/client/_nuxt/DW2rdoo9.js +0 -48
- package/dist/client/_nuxt/Ds6yAegc.js +0 -2
- package/dist/client/_nuxt/NSectionBlock.DF4F_onM.css +0 -1
- package/dist/client/_nuxt/builds/meta/923994c1-a7bd-4c91-b02b-513548587468.json +0 -1
- package/dist/client/_nuxt/entry.C09IdXcP.css +0 -1
- package/dist/client/_nuxt/error-404.ClUqCsUG.css +0 -1
- package/dist/client/_nuxt/error-500.Xj6Xfe4d.css +0 -1
- package/dist/client/_nuxt/terminals.bPBXyte9.css +0 -32
- /package/dist/runtime/nitro/{inline.mjs → inline.js} +0 -0
- /package/dist/runtime/plugins/{devtools.server.mjs → devtools.server.js} +0 -0
- /package/dist/runtime/plugins/view/{utils.mjs → utils.js} +0 -0
- /package/dist/runtime/{settings.mjs → settings.js} +0 -0
- /package/dist/runtime/shared/{hooks.mjs → hooks.js} +0 -0
- /package/dist/runtime/{use-nuxt-devtools.mjs → use-nuxt-devtools.js} +0 -0
- /package/dist/runtime/vue-devtools/{overlay.mjs → overlay.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as L,al as V,ab as M,aL as R,b7 as T,b8 as P,P as E,a as w,h as m,j as n,A as O,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b9 as f,ba as x,bb as $,v as a,aG as F,D as G,M as W,E as H,x as K,Y as U,_ as Y}from"./
|
|
1
|
+
import{d as L,al as V,ab as M,aL as R,b7 as T,b8 as P,P as E,a as w,h as m,j as n,A as O,o as s,f as e,m as c,k as t,i,t as r,p as l,F as h,b9 as f,ba as x,bb as $,v as a,aG as F,D as G,M as W,E as H,x as K,Y as U,_ as Y}from"./DNH9VLI7.js";import{u as q,_ as J}from"./p_veFBpZ.js";import{u as Q}from"./Bj_XrxMu.js";import"./CGj_8s-I.js";import"./8SMg7xCe.js";import"./DBLkZRmC.js";import"./CpJRPiL9.js";const X="1.3.4",Z={key:0},tt={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},et=t("div",{"flex-auto":""},null,-1),ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt=t("span",{op40:""}," Nuxt DevTools ",-1),st={op40:""},at={flex:"~ gap2 wrap"},it=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),ut=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),rt=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),dt=t("div",{"carbon-function":"","text-3xl":""},null,-1),ct=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),pt=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},mt=t("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1),ht={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ft=t("div",{"text-sm":""}," SSR to full load ",-1),xt={"text-right":""},vt=t("div",{"text-sm":""}," Page load ",-1),gt={"text-right":""},bt=t("div",{"text-sm":""}," Navigation ",-1),kt={"text-right":""},yt=t("div",{"text-sm":""}," HMR ",-1),Ct={"text-right":""},wt={flex:"~ col gap2"},Dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},Bt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),a(" Star on GitHub ")],-1),St=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),a(" Ideas & Suggestions ")],-1),zt=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),a(" Project Roadmap ")],-1),Nt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),a(" Bug Reports ")],-1),At=t("div",{"i-carbon-settings-adjust":""},null,-1),jt=t("div",{"flex-auto":""},null,-1),It={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},Lt={flex:"~ gap-1","items-center":""},Vt=t("span",null,"+",-1),Mt=t("span",null,"+",-1),Rt=t("div",{"flex-auto":""},null,-1),Tt={flex:"~ gap-1","items-center":""},Pt=t("span",null,"+",-1),Et=t("span",null,"+",-1),Ot=t("span",null,"+",-1),$t=t("span",null,"+",-1),Ft=t("div",{"flex-auto":""},null,-1),Gt=t("div",null,"Toggle DevTools",-1),Zt=L({__name:"overview",setup(Wt){const v=V(),p=M(),D=Q(),g=R(),B=q(),S=T(),b=P(),z=E();function N(){G.value=!0,z.push("/")}const k=w(()=>v.value?.nuxt.vueApp.version),u=w(()=>v.value?.metrics.loading());function A(){W()}return(o,Ht)=>{const j=H,_=K,y=J,C=U,d=Y,I=O;return s(),m(I,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[e(p)?(s(),c("div",tt,[et,t("div",ot,[i(_,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(j,{"h-10":""})]),_:1}),t("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:N},[nt,t("code",st,"v"+r(e(X)),1),i(y,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",at,[i(_,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[it,i(y,{"package-name":"nuxt",options:{dev:!0}})]),_:1}),e(k)?(s(),m(_,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[lt,t("code",null,"v"+r(e(k)),1)]),_:1})):l("",!0),e(p)?(s(),c(h,{key:1},[e(p)&&e(p).pages&&e(v)?(s(),m(_,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[ut,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(S).length,"page")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[rt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(D).length,"component")),1)]),_:1})):l("",!0),e(p)&&e(g)?(s(),m(_,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[dt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(g).imports.length,"import")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[ct,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(B).length,"module")),1)]),_:1})):l("",!0),e(p)?(s(),m(_,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[pt,t("div",null,r(("pluralizeByCount"in o?o.pluralizeByCount:e(f))(e(p).plugins.length,"plugin")),1)]),_:1})):l("",!0),e(u)?(s(),c("div",_t,[mt,t("div",ht,[e(u).ssrStart?(s(),c(h,{key:0},[ft,t("div",xt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).ssrStart)),1)],64)):l("",!0),vt,t("div",gt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).appLoad-e(u).appInit)),1),bt,t("div",kt,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).pageEnd-e(u).pageStart)),1),e(u).hmrStart?(s(),c(h,{key:1},[yt,t("div",Ct,r(("formatDuration"in o?o.formatDuration:e(x))(e(u).hmrEnd-e(u).hmrStart)),1)],64)):l("",!0)])])):l("",!0)],64)):l("",!0)]),t("div",wt,[("showConnectionWarning"in o?o.showConnectionWarning:e($))?(s(),m(C,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>[a(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):l("",!0),t("button",{title:"Authorize",onClick:A},[("isDevAuthed"in o?o.isDevAuthed:e(F))?l("",!0):(s(),m(C,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>[a(" Access from an untrusted browser, some features are limited. Click to authorize now. ")]),_:1}))])]),t("div",Dt,[Bt,St,zt,Nt,i(_,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>[At,a(" Settings ")]),_:1})]),jt,t("div",It,[t("div",Lt,[e(b)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌘ Cmd ")]),_:1}),Vt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Ctrl ")]),_:1}),Mt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" K ")]),_:1})],64)),Rt,a(" Open Command Palette ")]),t("div",Tt,[e(b)?(s(),c(h,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⇧ Shift ")]),_:1}),Pt,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" ⌥ Option ")]),_:1}),Et,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)):(s(),c(h,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Shift ")]),_:1}),Ot,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" Alt ")]),_:1}),$t,i(d,{n:"xs",class:"px2"},{default:n(()=>[a(" D ")]),_:1})],64)),Ft,Gt])])])):(s(),c("div",Z," Loading... "))]),_:1})}}});export{Zt as default};
|
package/dist/client/index.html
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8">
|
|
1
|
+
<!DOCTYPE html><html data-capo=""><head><meta charset="utf-8">
|
|
2
2
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
3
|
-
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.
|
|
4
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
3
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.CuU2sB_i.css">
|
|
4
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DNH9VLI7.js">
|
|
5
5
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Blr6EMNg.js">
|
|
6
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
6
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Bxkoe-BC.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Br6ll-O0.js">
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CupVZNk8.js">
|
|
9
9
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/C5gCGmDW.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CbYhyuC0.js">
|
|
11
11
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Dch3xQiY.js">
|
|
12
12
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DC8MraHL.js">
|
|
13
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
13
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/8B46VhQd.js">
|
|
14
14
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CbViG2Xw.js">
|
|
15
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
15
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DI2S-mmO.js">
|
|
16
16
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DvyTQcux.js">
|
|
17
17
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/BZfs-ost.js">
|
|
18
18
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CsTmP73Z.js">
|
|
19
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
20
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
19
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CUJNw4nr.js">
|
|
20
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/BcsunUHc.js">
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Cao9Hf6d.js">
|
|
22
22
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/D5r6TWiw.js">
|
|
23
|
-
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.
|
|
24
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
25
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
26
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
28
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
29
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
30
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
31
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
32
|
-
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.
|
|
33
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
34
|
-
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.
|
|
35
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
36
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/
|
|
37
|
-
|
|
38
|
-
<script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
|
23
|
+
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.BJ-XAY5s.css">
|
|
24
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CeyWeT92.js">
|
|
25
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/Da5JKEgm.js">
|
|
26
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CDfEhAL9.js">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/B-sCWvv9.js">
|
|
28
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/8SMg7xCe.js">
|
|
29
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DBLkZRmC.js">
|
|
30
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DL0CET1h.js">
|
|
31
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CrghN-Ad.js">
|
|
32
|
+
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.CdZ-8tbX.css">
|
|
33
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/CUytAwsx.js">
|
|
34
|
+
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.4KK_ddFR.css">
|
|
35
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/BKjxjBjR.js">
|
|
36
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/DNH9VLI7.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"serverRendered":1},false]</script>
|
|
37
|
+
<script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"705c4cfa-d5c7-43a4-9f41-3c069a80d514",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/dist/module.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { markRaw, reactive } from "vue";
|
|
2
2
|
import { parse as parseStrackTrace } from "error-stack-parser-es";
|
|
3
|
-
import { useObjectStorage } from "./plugins/view/utils.
|
|
3
|
+
import { useObjectStorage } from "./plugins/view/utils.js";
|
|
4
4
|
const nonLiteralSymbol = Symbol("nuxt-devtools-fn-metrics-non-literal");
|
|
5
5
|
function getStacktrace() {
|
|
6
6
|
return parseStrackTrace(new Error());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowReactive, watchEffect } from "vue";
|
|
2
|
-
import { setupHooksDebug } from "../shared/hooks.
|
|
2
|
+
import { setupHooksDebug } from "../shared/hooks.js";
|
|
3
3
|
import { defineNuxtPlugin, useRouter, useState } from "#imports";
|
|
4
4
|
export default defineNuxtPlugin((nuxt) => {
|
|
5
5
|
if (typeof document === "undefined" || typeof window === "undefined")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import type { Router } from 'vue-router';
|
|
3
|
-
import type { NuxtDevtoolsHostClient } from '../../../types';
|
|
3
|
+
import type { NuxtDevtoolsHostClient } from '../../../types.js';
|
|
4
4
|
declare const clientRef: import("vue").ShallowRef<NuxtDevtoolsHostClient | undefined>;
|
|
5
5
|
export { clientRef as client };
|
|
6
6
|
export type ColorScheme = 'dark' | 'light';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { computed, createApp, h, markRaw, ref, shallowReactive, shallowRef, watch } from "vue";
|
|
2
2
|
import { createHooks } from "hookable";
|
|
3
3
|
import { debounce } from "perfect-debounce";
|
|
4
|
-
import { initTimelineMetrics } from "../../function-metrics-helpers.
|
|
4
|
+
import { initTimelineMetrics } from "../../function-metrics-helpers.js";
|
|
5
5
|
import Main from "./Main.vue";
|
|
6
|
-
import { popupWindow, state } from "./state.
|
|
6
|
+
import { popupWindow, state } from "./state.js";
|
|
7
7
|
import { useAppConfig, useRuntimeConfig } from "#imports";
|
|
8
8
|
const clientRef = shallowRef();
|
|
9
9
|
export { clientRef as client };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://devtools.nuxt.com",
|
|
7
7
|
"repository": {
|
|
@@ -30,20 +30,19 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"nuxt": "^3.9.0",
|
|
34
33
|
"vite": "*"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
36
|
"@antfu/utils": "^0.7.8",
|
|
38
|
-
"@nuxt/kit": "^3.
|
|
39
|
-
"@vue/devtools-applet": "
|
|
40
|
-
"@vue/devtools-core": "
|
|
41
|
-
"@vue/devtools-kit": "
|
|
37
|
+
"@nuxt/kit": "^3.12.2",
|
|
38
|
+
"@vue/devtools-applet": "7.1.3",
|
|
39
|
+
"@vue/devtools-core": "7.1.3",
|
|
40
|
+
"@vue/devtools-kit": "7.1.3",
|
|
42
41
|
"birpc": "^0.2.17",
|
|
43
42
|
"consola": "^3.2.3",
|
|
44
43
|
"cronstrue": "^2.50.0",
|
|
45
44
|
"destr": "^2.0.3",
|
|
46
|
-
"error-stack-parser-es": "^0.1.
|
|
45
|
+
"error-stack-parser-es": "^0.1.4",
|
|
47
46
|
"execa": "^7.2.0",
|
|
48
47
|
"fast-glob": "^3.3.2",
|
|
49
48
|
"flatted": "^3.3.1",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"hookable": "^5.5.3",
|
|
52
51
|
"image-meta": "^0.2.0",
|
|
53
52
|
"is-installed-globally": "^1.0.0",
|
|
54
|
-
"launch-editor": "^2.
|
|
53
|
+
"launch-editor": "^2.8.0",
|
|
55
54
|
"local-pkg": "^0.5.0",
|
|
56
55
|
"magicast": "^0.3.4",
|
|
57
56
|
"nypm": "^0.3.8",
|
|
@@ -63,35 +62,34 @@
|
|
|
63
62
|
"rc9": "^2.1.2",
|
|
64
63
|
"scule": "^1.3.0",
|
|
65
64
|
"semver": "^7.6.2",
|
|
66
|
-
"simple-git": "^3.
|
|
65
|
+
"simple-git": "^3.25.0",
|
|
67
66
|
"sirv": "^2.0.4",
|
|
68
|
-
"unimport": "^3.7.
|
|
67
|
+
"unimport": "^3.7.2",
|
|
69
68
|
"vite-plugin-inspect": "^0.8.4",
|
|
70
|
-
"vite-plugin-vue-inspector": "^5.1.
|
|
69
|
+
"vite-plugin-vue-inspector": "^5.1.2",
|
|
71
70
|
"which": "^3.0.1",
|
|
72
|
-
"ws": "^8.17.
|
|
73
|
-
"@nuxt/devtools-
|
|
74
|
-
"@nuxt/devtools-
|
|
71
|
+
"ws": "^8.17.1",
|
|
72
|
+
"@nuxt/devtools-wizard": "1.3.4",
|
|
73
|
+
"@nuxt/devtools-kit": "1.3.4"
|
|
75
74
|
},
|
|
76
75
|
"devDependencies": {
|
|
77
76
|
"@iconify-json/bxl": "^1.1.10",
|
|
78
|
-
"@iconify-json/carbon": "^1.1.
|
|
79
|
-
"@iconify-json/logos": "^1.1.
|
|
80
|
-
"@iconify-json/ri": "^1.1.
|
|
81
|
-
"@iconify-json/simple-icons": "^1.1.
|
|
82
|
-
"@iconify-json/tabler": "^1.1.
|
|
83
|
-
"@nuxt/content": "^2.
|
|
77
|
+
"@iconify-json/carbon": "^1.1.36",
|
|
78
|
+
"@iconify-json/logos": "^1.1.43",
|
|
79
|
+
"@iconify-json/ri": "^1.1.21",
|
|
80
|
+
"@iconify-json/simple-icons": "^1.1.106",
|
|
81
|
+
"@iconify-json/tabler": "^1.1.114",
|
|
82
|
+
"@nuxt/content": "^2.13.0",
|
|
84
83
|
"@nuxt/test-utils": "3.9.0",
|
|
85
|
-
"@nuxtjs/color-mode": "^3.4.1",
|
|
86
84
|
"@parcel/watcher": "^2.4.1",
|
|
87
85
|
"@types/markdown-it-link-attributes": "^3.0.5",
|
|
88
86
|
"@types/ua-parser-js": "^0.7.39",
|
|
89
|
-
"@unocss/nuxt": "^0.
|
|
90
|
-
"@unocss/preset-icons": "^0.
|
|
91
|
-
"@unocss/preset-uno": "^0.
|
|
92
|
-
"@unocss/runtime": "^0.
|
|
87
|
+
"@unocss/nuxt": "^0.61.0",
|
|
88
|
+
"@unocss/preset-icons": "^0.61.0",
|
|
89
|
+
"@unocss/preset-uno": "^0.61.0",
|
|
90
|
+
"@unocss/runtime": "^0.61.0",
|
|
93
91
|
"@vitest/ui": "^1.6.0",
|
|
94
|
-
"@vueuse/nuxt": "^10.
|
|
92
|
+
"@vueuse/nuxt": "^10.11.0",
|
|
95
93
|
"esno": "^4.7.0",
|
|
96
94
|
"floating-vue": "5.0.2",
|
|
97
95
|
"fuse.js": "^7.0.0",
|
|
@@ -100,22 +98,22 @@
|
|
|
100
98
|
"markdown-it-link-attributes": "^4.0.1",
|
|
101
99
|
"nanoid": "^5.0.7",
|
|
102
100
|
"nitropack": "^2.9.6",
|
|
103
|
-
"nuxt": "^3.
|
|
101
|
+
"nuxt": "^3.12.2",
|
|
104
102
|
"ofetch": "^1.3.4",
|
|
105
|
-
"quicktype-core": "^23.0.
|
|
106
|
-
"shiki": "^1.
|
|
107
|
-
"theme-vitesse": "^0.
|
|
108
|
-
"ua-parser-js": "^1.0.
|
|
109
|
-
"unocss": "^0.
|
|
103
|
+
"quicktype-core": "^23.0.170",
|
|
104
|
+
"shiki": "^1.9.0",
|
|
105
|
+
"theme-vitesse": "^0.8.0",
|
|
106
|
+
"ua-parser-js": "^1.0.38",
|
|
107
|
+
"unocss": "^0.61.0",
|
|
110
108
|
"unplugin-vue-markdown": "^0.26.2",
|
|
111
|
-
"vanilla-jsoneditor": "^0.23.
|
|
109
|
+
"vanilla-jsoneditor": "^0.23.7",
|
|
112
110
|
"vis-data": "^7.1.9",
|
|
113
111
|
"vis-network": "^9.1.9",
|
|
114
|
-
"vue-tsc": "^2.0.
|
|
112
|
+
"vue-tsc": "^2.0.21",
|
|
115
113
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
116
114
|
"xterm": "^5.3.0",
|
|
117
115
|
"xterm-addon-fit": "^0.8.0",
|
|
118
|
-
"@nuxt/devtools": "1.3.
|
|
116
|
+
"@nuxt/devtools": "1.3.4"
|
|
119
117
|
},
|
|
120
118
|
"scripts": {
|
|
121
119
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as g,al as N,a as m,m as u,f as a,i as E,j as x,k as p,t as d,p as v,h as y,Y as C,o as l,v as b}from"./DW2rdoo9.js";import{_ as S}from"./BeLKwQPd.js";import"./BZrBobni.js";const R=/(^|@)\S+:\d+/,h=/^\s*at .*(\S+:\d+|\(native\))/m,$=/^(eval@)?(\[native code])?$/;function _(n){if(typeof n.stacktrace<"u"||typeof n["opera#sourceloc"]<"u")return A(n);if(n.stack&&n.stack.match(h))return O(n);if(n.stack)return w(n);throw new Error("Cannot parse given Error object")}function f(n){if(!n.includes(":"))return[n];const e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(n.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]}function O(n){return n.stack.split(`
|
|
2
|
-
`).filter(e=>!!e.match(h)).map(e=>{e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const t=s.match(/ (\(.+\)$)/);s=t?s.replace(t[0],""):s;const r=f(t?t[1]:s),o=t&&s||void 0,i=["eval","<anonymous>"].includes(r[0])?void 0:r[0];return{functionName:o,fileName:i,lineNumber:r[1]?+r[1]:void 0,columnNumber:r[2]?+r[2]:void 0,source:e}})}function w(n){return n.stack.split(`
|
|
3
|
-
`).filter(e=>!e.match($)).map(e=>{if(e.includes(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!e.includes("@")&&!e.includes(":"))return{functionName:e};{const s=/((.*".+"[^@]*)?[^@]*)(?:@)/,t=e.match(s),r=t&&t[1]?t[1]:void 0,o=f(e.replace(s,""));return{functionName:r,fileName:o[0],lineNumber:o[1]?+o[1]:void 0,columnNumber:o[2]?+o[2]:void 0,source:e}}})}function A(n){return!n.stacktrace||n.message.includes(`
|
|
4
|
-
`)&&n.message.split(`
|
|
5
|
-
`).length>n.stacktrace.split(`
|
|
6
|
-
`).length?I(n):n.stack?P(n):F(n)}function I(n){const c=/Line (\d+).*script (?:in )?(\S+)/i,e=n.message.split(`
|
|
7
|
-
`),s=[];for(let t=2,r=e.length;t<r;t+=2){const o=c.exec(e[t]);o&&s.push({fileName:o[2],lineNumber:+o[1],source:e[t]})}return s}function F(n){const c=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,e=n.stacktrace.split(`
|
|
8
|
-
`),s=[];for(let t=0,r=e.length;t<r;t+=2){const o=c.exec(e[t]);o&&s.push({functionName:o[3]||void 0,fileName:o[2],lineNumber:o[1]?+o[1]:void 0,source:e[t]})}return s}function P(n){return n.stack.split(`
|
|
9
|
-
`).filter(e=>!!e.match(R)&&!e.match(/^Error created at/)).map(e=>{const s=e.split("@"),t=f(s.pop()),r=s.shift()||"",o=r.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;let i;r.match(/\(([^)]*)\)/)&&(i=r.replace(/^[^(]+\(([^)]*)\)$/,"$1"));const k=i===void 0||i==="[arguments not available]"?void 0:i.split(",");return{functionName:o,args:k,fileName:t[0],lineNumber:t[1]?+t[1]:void 0,columnNumber:t[2]?+t[2]:void 0,source:e}})}const T={p6:""},V={key:0},B={"text-6xl":""},X={key:0,op75:""},D={my4:"","text-xl":"","text-red":""},G={key:1,"of-auto":"",rounded:"","bg-active":"",p2:""},L=p("div",{px1:"",op50:""}," Stacktrace ",-1),M=["textContent"],j={key:1,op50:""},U=g({__name:"error",setup(n){const c=N(),e=m(()=>{const t=c.value?.nuxt?.payload?.error;return t&&(console.error("[Nuxt DevTools] Error in payload:"),console.error(t),console.error({...t})),t}),s=m(()=>{if(!e.value?.stack)return[];try{return e.value.stack.startsWith("<pre>")?_({stack:e.value.stack.replace(/<.*?>/g,"")}):_(e.value)}catch(t){return console.error(t),[]}});return(t,r)=>{const o=C,i=S;return l(),u("div",T,[a(e)?(l(),u("div",V,[E(o,{n:"red",icon:"i-carbon-warning-alt-filled",mb5:""},{default:x(()=>[b(" Error occurred in this page ")]),_:1}),p("div",B,d(a(e).statusCode||"Client Error"),1),a(e).statusMessage?(l(),u("div",X,d(a(e).statusMessage),1)):v("",!0),p("div",D,d(a(e).message||a(e).description||"Unknown error"),1),a(s).length||a(e).stack?(l(),u("div",G,[L,a(s).length?(l(),y(i,{key:0,px2:"",stacktrace:a(s)},null,8,["stacktrace"])):(l(),u("pre",{key:1,textContent:d(a(e).stack)},null,8,M))])):v("",!0)])):(l(),u("div",j," No error "))])}}});export{U as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as G,P as ne,r as D,Q as q,bR as R,aC as ae,w as oe,aB as se,a1 as le,a as re,L as f,M as k,f as t,o as l,h as m,j as u,k as r,i as c,l as U,m as i,F as w,n as A,t as b,G as E,ae as M,v as d,p as F,aw as ue,I as ie,bh as de,af as ce,bS as pe,bT as z,_ as me,X as _e,a6 as fe,ar as ve,A as ye,U as ge,aI as he}from"./DW2rdoo9.js";import{_ as ke}from"./D9bWLJbD.js";import{_ as be}from"./C41DfgCv.js";import{_ as xe}from"./BZrBobni.js";import{e as we}from"./CQhVfK23.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ie={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ne={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},De={key:1},Ue=["onKeyup"],Ae=r("br",null,null,-1),Me={key:0,op50:""},Be={key:1},Le=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),Te={"font-bold":""},qe=r("br",null,null,-1),Re={"text-sm":""},Ee=r("br",null,null,-1),Fe=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=D(""),v=D(""),s=q("storage:current",""),e=D(),y=q("storage:file:state",""),{data:K}=([p,g]=R(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:B}=([p,g]=R(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),Q=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await B(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(Q),oe(s,()=>{B(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(I(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const W=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function X(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function I(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function H(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function J(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const N=me,Y=ke,j=_e,Z=fe,L=be,P=ve,T=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(N,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(Y,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>U(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,A(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>U(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(l(!0),i(w,null,A(t(W),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:E(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>U(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:M(X,["enter"])},null,8,["modelValue"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ie,[r("div",Ne,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:M(J,["enter"])},null,8,["modelValue"])):(l(),i("code",De,[d(b(V(t(e).key))+" ",1),c(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?F("",!0):(l(),m(N,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:E({"border-green":t(e).content!==t(e).updatedContent}),onClick:I},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(N,{n:"red xs",onClick:H},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:M(de(I,["ctrl"]),["enter"])},null,40,Ue)),[[ce,t(e).updatedContent]])])):(l(),m(T,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ae,d("Learn more about "),c(L,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(T,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Me," Select one storage to start: ")):(l(),i("p",Be,[d(" No custom storage defined in "),Le,d("."),Pe,d(" Learn more about "),c(L,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,A(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>s.value=_},{default:u(()=>[r("span",Te,b(_),1),qe,r("span",Re,b(o.driver)+" driver",1),Ee,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),He=G({__name:"storage",setup(O){return(p,g)=>{const C=Fe,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{He as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bO as ke,d as te,bP as re,r as W,a as $,o as y,m as I,k as d,i as O,f as u,t as R,F as B,n as Z,G as F,p as j,a6 as oe,bK as Oe,ab as Te,ay as ie,ac as xe,aB as Se,b0 as we,bL as Xe,e as De,a2 as se,I as G,j as C,v as Y,bH as Ee,h as A,l as ee,aw as Me,ak as ue,V as Ce,_ as le,X as Ie,A as ce,am as $e,a9 as Ue,aa as Le,bQ as Ne,ah as Re,U as Ae,bN as Ve,ar as je}from"./DW2rdoo9.js";import{_ as Be}from"./CnDX42ER.js";import{_ as fe}from"./Dm8mUwGL.js";import{_ as pe}from"./C_mHwna3.js";import{_ as He}from"./D7gBCge-.js";import{S as de}from"./BcJws1i5.js";import{e as We}from"./CQhVfK23.js";import{_ as ze}from"./B-hub2K2.js";import{_ as qe}from"./D1Dg62su.js";import"./BhuDhIKJ.js";import"./D9bWLJbD.js";import"./_hj05-RZ.js";import"./BVJlJdda.js";var he={exports:{}};(function(z,U){(function(x,D){z.exports=D()})(globalThis,()=>(()=>{var L={794:(S,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var r=_(586),k=function(){function m(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return m.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var n=this.parseSpecial(this.expression);e=this.extractParts(n)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},m.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},m.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var n=e[a].split(",").map(function(s){return s.trim()}).filter(function(s){return s!==""}).map(function(s){return isNaN(Number(s))?s:Number(s)}).filter(function(s){return s!==null&&s!==""});n.length===0&&n.push("*"),n.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=n.map(function(s){return s!==null?s.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var o=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";o?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},m.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(f){var h=f.replace(/\D/,""),c=h;return e.dayOfWeekStartIndexZero?h=="7"&&(c="0"):c=(parseInt(h)-1).toString(),f.replace(h,c)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in a)t[5]=t[5].replace(new RegExp(n,"gi"),a[n].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(f){var h=f.replace(/\D/,""),c=h;return e.monthStartIndexZero&&(c=(parseInt(h)+1).toString()),f.replace(h,c)});var o={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in o)t[4]=t[4].replace(new RegExp(s,"gi"),o[s].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(f){return f!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var l=null;switch(i){case 4:l="12";break;case 5:l="6";break;case 6:l="9999";break;default:l=null;break}if(l!==null){var v=t[i].split("/");t[i]="".concat(v[0],"-").concat(l,"/").concat(v[1])}}},m.prototype.validate=function(t){this.assertNoInvalidCharacters("DOW",t[5]),this.assertNoInvalidCharacters("DOM",t[3]),this.validateRange(t)},m.prototype.validateRange=function(t){r.default.secondRange(t[0]),r.default.minuteRange(t[1]),r.default.hourRange(t[2]),r.default.dayOfMonthRange(t[3]),r.default.monthRange(t[4],this.monthStartIndexZero),r.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},m.prototype.assertNoInvalidCharacters=function(t,e){var a=e.match(/[A-KM-VX-Z]+/gi);if(a&&a.length)throw new Error("".concat(t," part contains invalid values: '").concat(a.toString(),"'"))},m}();p.CronParser=k},728:(S,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var r=_(910),k=_(794),m=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var n=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(n,"'.")),this.options.locale=n}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var n=a===void 0?{}:a,o=n.throwExceptionOnParseError,s=o===void 0?!0:o,i=n.verbose,l=i===void 0?!1:i,v=n.dayOfWeekStartIndexZero,f=v===void 0?!0:v,h=n.monthStartIndexZero,c=h===void 0?!1:h,N=n.use24HourTimeFormat,T=n.locale,H=T===void 0?null:T,V=n.tzOffset,E=V===void 0?0:V,q={throwExceptionOnParseError:s,verbose:l,dayOfWeekStartIndexZero:f,monthStartIndexZero:c,use24HourTimeFormat:N,locale:H,tzOffset:E},Q=new t(e,q);return Q.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var a=new k.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var n=this.getTimeOfDayDescription(),o=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),l=this.getYearDescription();e+=n+o+i+s+l,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(v){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(v)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],n=this.expressionParts[2],o="";if(!r.StringUtilities.containsAny(a,t.specialCharacters)&&!r.StringUtilities.containsAny(n,t.specialCharacters)&&!r.StringUtilities.containsAny(e,t.specialCharacters))o+=this.i18n.atSpace()+this.formatTime(n,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!r.StringUtilities.containsAny(n,t.specialCharacters)){var s=a.split("-");o+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(n,s[0],""),this.formatTime(n,s[1],""))}else if(!e&&n.indexOf(",")>-1&&n.indexOf("-")==-1&&n.indexOf("/")==-1&&!r.StringUtilities.containsAny(a,t.specialCharacters)){var i=n.split(",");o+=this.i18n.at();for(var l=0;l<i.length;l++)o+=" ",o+=this.formatTime(i[l],a,""),l<i.length-2&&(o+=","),l==i.length-2&&(o+=this.i18n.spaceAnd())}else{var v=this.getSecondsDescription(),f=this.getMinutesDescription(),h=this.getHoursDescription();if(o+=v,o&&f&&(o+=", "),o+=f,f===h)return o;o&&h&&(o+=", "),o+=h}return o},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(n){return n},function(n){return r.StringUtilities.format(e.i18n.everyX0Seconds(n),n)},function(n){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(n){return n=="0"?"":parseInt(n)<20?e.i18n.atX0SecondsPastTheMinute(n):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(n)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],n=this.expressionParts[2],o=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return r.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&n.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(s)<20?e.i18n.atX0MinutesPastTheHour(s):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(s)}catch{return e.i18n.atX0MinutesPastTheHour(s)}});return o},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],n=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return r.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(n&&a.includes("-")&&this.expressionParts[1]!="0"){var o=Array.from(n.matchAll(/:00/g));if(o.length>1){var s=o[o.length-1].index;n=n.substring(0,s)+":59"+n.substring(s+3)}}return n},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),n=null;return this.expressionParts[5]=="*"?n="":n=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(o,s){var i=o;o.indexOf("#")>-1?i=o.substring(0,o.indexOf("#")):o.indexOf("L")>-1&&(i=i.replace("L",""));var l=parseInt(i);if(e.options.tzOffset){var v=e.expressionParts[2],f=parseInt(v)+(e.options.tzOffset?e.options.tzOffset:0);f>=24?l++:f<0&&l--,l>6?l=0:l<0&&(l=6)}var h=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[l]:a[l];if(o.indexOf("#")>-1){var c=null,N=o.substring(o.indexOf("#")+1),T=o.substring(0,o.indexOf("#"));switch(N){case"1":c=e.i18n.first(T);break;case"2":c=e.i18n.second(T);break;case"3":c=e.i18n.third(T);break;case"4":c=e.i18n.fourth(T);break;case"5":c=e.i18n.fifth(T);break}h=c+" "+h}return h},function(o){return parseInt(o)==1?"":r.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(o),o)},function(o){var s=o.substring(0,o.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(o){var s=null;if(o.indexOf("#")>-1){var i=o.substring(o.indexOf("#")+1);s=e.i18n.commaOnThe(i).trim()+e.i18n.spaceX0OfTheMonth()}else if(o.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(o.replace("L",""));else{var l=e.expressionParts[3]!="*";s=l?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(o)}return s}),n},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),n=this.getSegmentDescription(this.expressionParts[4],"",function(o,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(o)-1]:a[parseInt(o)-1]},function(o){return parseInt(o)==1?"":r.StringUtilities.format(e.i18n.commaEveryX0Months(o),o)},function(o){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(o){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return n},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,n=this.expressionParts[3];switch(n){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var o=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(o){var s=parseInt(o[0].replace("W","")),i=s==1?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var l=n.match(/L-(\d{1,2})/);if(l){var v=l[1];a=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(v),v);break}else{if(n=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(f){return f=="L"?e.i18n.lastDay():e.i18n.dayX0?r.StringUtilities.format(e.i18n.dayX0(),f):f},function(f){return f=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(f)},function(f){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(f)},function(f){return e.i18n.commaOnDayX0OfTheMonth(f)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(n){return/^\d+$/.test(n)?new Date(parseInt(n),1).getFullYear().toString():n},function(n){return r.StringUtilities.format(e.i18n.commaEveryX0Years(n),n)},function(n){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,n,o,s,i){var l=null,v=e.indexOf("/")>-1,f=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)l="";else if(e==="*")l=a;else if(!v&&!f&&!h)l=r.StringUtilities.format(i(e),n(e));else if(h){for(var c=e.split(","),N="",T=0;T<c.length;T++)if(T>0&&c.length>2&&(N+=",",T<c.length-1&&(N+=" ")),T>0&&c.length>1&&(T==c.length-1||c.length==2)&&(N+="".concat(this.i18n.spaceAnd()," ")),c[T].indexOf("/")>-1||c[T].indexOf("-")>-1){var H=c[T].indexOf("-")>-1&&c[T].indexOf("/")==-1,V=this.getSegmentDescription(c[T],a,n,o,H?this.i18n.commaX0ThroughX1:s,i);H&&(V=V.replace(", ","")),N+=V}else v?N+=this.getSegmentDescription(c[T],a,n,o,s,i):N+=n(c[T]);v?l=N:l=r.StringUtilities.format(i(e),N)}else if(v){var c=e.split("/");if(l=r.StringUtilities.format(o(c[1]),c[1]),c[0].indexOf("-")>-1){var E=this.generateRangeSegmentDescription(c[0],s,n);E.indexOf(", ")!=0&&(l+=", "),l+=E}else if(c[0].indexOf("*")==-1){var q=r.StringUtilities.format(i(c[0]),n(c[0]));q=q.replace(", ",""),l+=r.StringUtilities.format(this.i18n.commaStartingX0(),q)}}else f&&(l=this.generateRangeSegmentDescription(e,s,n));return l},t.prototype.generateRangeSegmentDescription=function(e,a,n){var o="",s=e.split("-"),i=n(s[0],1),l=n(s[1],2),v=a(e);return o+=r.StringUtilities.format(v,i,l),o},t.prototype.formatTime=function(e,a,n){var o=0,s=0;this.options.tzOffset&&(o=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),s=parseFloat((this.options.tzOffset%1).toFixed(2)),s!=0&&(s*=60));var i=parseInt(e)+o,l=parseInt(a)+s;l>=60?(l-=60,i+=1):l<0&&(l+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var v="",f=!1;this.options.use24HourTimeFormat||(f=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),v=f?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return n&&(h=":".concat(("00"+n).substring(n.length))),"".concat(f?v:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+l.toString()).substring(l.toString().length)).concat(h).concat(f?"":v)},t.prototype.transformVerbosity=function(e,a){return a||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=m},336:(S,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var r=_(751),k=function(){function m(){}return m.prototype.load=function(t){t.en=new r.en},m}();p.enLocaleLoader=k},751:(S,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function r(){}return r.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},r.prototype.atX0MinutesPastTheHourGt20=function(){return null},r.prototype.commaMonthX0ThroughMonthX1=function(){return null},r.prototype.commaYearX0ThroughYearX1=function(){return null},r.prototype.use24HourTimeFormatByDefault=function(){return!1},r.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},r.prototype.everyMinute=function(){return"every minute"},r.prototype.everyHour=function(){return"every hour"},r.prototype.atSpace=function(){return"At "},r.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},r.prototype.at=function(){return"At"},r.prototype.spaceAnd=function(){return" and"},r.prototype.everySecond=function(){return"every second"},r.prototype.everyX0Seconds=function(){return"every %s seconds"},r.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},r.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},r.prototype.everyX0Minutes=function(){return"every %s minutes"},r.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},r.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},r.prototype.everyX0Hours=function(){return"every %s hours"},r.prototype.betweenX0AndX1=function(){return"between %s and %s"},r.prototype.atX0=function(){return"at %s"},r.prototype.commaEveryDay=function(){return", every day"},r.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},r.prototype.commaX0ThroughX1=function(){return", %s through %s"},r.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},r.prototype.first=function(){return"first"},r.prototype.second=function(){return"second"},r.prototype.third=function(){return"third"},r.prototype.fourth=function(){return"fourth"},r.prototype.fifth=function(){return"fifth"},r.prototype.commaOnThe=function(){return", on the "},r.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},r.prototype.lastDay=function(){return"the last day"},r.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},r.prototype.commaOnlyOnX0=function(){return", only on %s"},r.prototype.commaAndOnX0=function(){return", and on %s"},r.prototype.commaEveryX0Months=function(){return", every %s months"},r.prototype.commaOnlyInX0=function(){return", only in %s"},r.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},r.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},r.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},r.prototype.firstWeekday=function(){return"first weekday"},r.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},r.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},r.prototype.commaEveryX0Days=function(){return", every %s days"},r.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},r.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},r.prototype.commaEveryHour=function(){return", every hour"},r.prototype.commaEveryX0Years=function(){return", every %s years"},r.prototype.commaStartingX0=function(){return", starting %s"},r.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},r.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},r}();p.en=_},586:(S,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(k,m){if(!k)throw new Error(m)}var r=function(){function k(){}return k.secondRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},k.minuteRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},k.hourRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},k.dayOfMonthRange=function(m){for(var t=m.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},k.monthRange=function(m,t){for(var e=m.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var n=parseInt(e[a],10);_(n>=1&&n<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},k.dayOfWeekRange=function(m,t){for(var e=m.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var n=parseInt(e[a],10);_(n>=0&&n<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},k}();p.default=r},910:(S,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function r(){}return r.format=function(k){for(var m=[],t=1;t<arguments.length;t++)m[t-1]=arguments[t];return k.replace(/%s/g,function(e){return m.shift()})},r.containsAny=function(k,m){return m.some(function(t){return k.indexOf(t)>-1})},r}();p.StringUtilities=_}},x={};function D(S){var p=x[S];if(p!==void 0)return p.exports;var _=x[S]={exports:{}};return L[S](_,_.exports,D),_.exports}var X={};return(()=>{var S=X;Object.defineProperty(S,"__esModule",{value:!0}),S.toString=void 0;var p=D(728),_=D(336);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),S.default=p.ExpressionDescriptor;var r=p.ExpressionDescriptor.toString;S.toString=r})(),X})())})(he);var Pe=he.exports;const Ye=ke(Pe),Fe=["title"],Ge={"flex-none":"","text-left":""},Ze={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},Je={class:"truncate"},Qe={"text-xs":"",op50:""},Ke=d("div",{"x-divider":""},null,-1),et={key:0},tt=["onClick"],nt=d("div",{"x-divider":""},null,-1),rt=te({__name:"CronCollection",props:{collection:{}},setup(z){const U=z,L=re(),x=W(!0),D=$(()=>Ye.toString(U.collection.cron));return(X,S)=>{const p=oe,_=fe;return y(),I("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:u(D),onClick:S[0]||(S[0]=r=>x.value=!u(x))},[d("div",Ge,[O(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":u(x)?90:0,transition:""},null,8,["transform-rotate"])]),d("span",Ze,[O(_,{class:"font-mono n-primary",textContent:R(X.collection.cron)},null,8,["textContent"]),d("span",Je,R(u(D)),1),d("span",Qe,"("+R(X.collection.tasks.length)+")",1)])],8,Fe),Ke,u(x)?(y(),I("ul",et,[(y(!0),I(B,null,Z(X.collection.tasks,r=>(y(),I("li",{key:r},[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:F([{"bg-active":u(L)===r}]),onClick:k=>L.value=r},R(r),11,tt),nt]))),128))])):j("",!0)])}}}),ot={"h-full":"","w-full":"",flex:"~ col"},at={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},it={flex:"~ gap2 items-center"},st={relative:"","w-full":""},ut={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},lt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ct={class:"hidden md:block"},ft={flex:"~ gap2","mb--2":"","items-center":"",op50:""},pt=d("div",{"w-5":"","x-divider":""},null,-1),dt=d("div",{"flex-none":""}," Default Inputs ",-1),ht=d("div",{"x-divider":""},null,-1),vt={key:0,border:"b base",relative:"","n-code-block":""},mt={flex:"~ wrap","w-full":""},yt=["onClick"],gt=d("div",{border:"b base","flex-auto":""},null,-1),_t={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},bt=d("div",null,"Result",-1),kt={key:1,"text-xs":"",op50:""},Ot=d("div",{"flex-auto":""},null,-1),Tt=d("div",{op50:""}," Tasks finished in ",-1),xt=te({__name:"ServerTaskDetails",props:{task:{}},emits:["open-default-input"],setup(z,{emit:U}){const L=z,x=U,D=W({payload:{}}),{inputDefaults:X}=ue("serverRoutes"),[S,p]=Oe(),_=Te(),r=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),k=$(()=>JSON.stringify(r.data,null,2)),m=$(()=>r.contentType.includes("application/json")?"json":"text"),t=W(!1),e=W(!1),a=xe(),n=W(),o=["json"],s=W(o[0]),i=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),l=$({get:()=>i[n.value],set:g=>{i[n.value]=g}}),v=$(()=>({...V(X.value.query),...V(i.query)})),f=$(()=>({...V(X.value.headers)})),h=$(()=>Object.keys(D.value?.payload??{}).length?{...D.value}:void 0),c=$(()=>h.value?"POST":"GET"),N=$(()=>{let g=window?.location.origin;return g.charAt(g.length-1)==="/"&&(g=g.slice(0,-1)),g}),T=$(()=>{let g=new URLSearchParams(v.value).toString();g&&(g=`?${g}`);const b=`/_nitro/tasks/${L.task.name}${g}`;let M=_.value?.app.baseURL||"";return(M==="./"||M===".")&&(M=""),M.endsWith("/")&&(M=M.slice(0,-1)),M+b}),H=$(()=>N.value+T.value);function V(g){const b=Object.fromEntries(g.filter(({active:M,key:P,value:J})=>M&&P&&J!==void 0).map(({key:M,value:P})=>[M,P]));return Object.entries(b).length?b:void 0}async function E(){e.value=!0,t.value=!0;const g=Date.now();Ce("server-tasks:run",{method:c.value});try{r.data=await $fetch(H.value,{method:"POST",headers:f.value,query:v.value,body:h.value,onResponse({response:b}){r.contentType=(b.headers.get("content-type")||"").toString().toLowerCase().trim(),r.statusCode=b.status,r.error=void 0},onResponseError(b){r.error=b.response._data,r.data=b.response._data}})}catch{}t.value=!1,r.fetchTime=Date.now()-g}const q=$(()=>{const g=[];return g.push({name:"Query",slug:"query",length:i.query.length}),g.push({name:"Body",slug:"body",length:i.body.length}),g});Se(()=>{if(s.value==="json"&&typeof D.value=="string")try{D.value=JSON.parse(D.value)}catch{}});const Q=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([i,n],()=>{const g=Q.value?.find(b=>b.task===L.task.name);if(g){n.value||(n.value=g.tab),g.tab!==n.value&&(g.tab=n.value);const{body:b,query:M,headers:P}=g.inputs;Object.assign(i,{body:b,query:M,headers:P})}else{const b={task:L.task.name,tab:"query",inputs:i};Q.value.push(b),n.value||(n.value=b.tab)}},{immediate:!0,deep:!0,debounce:500});const me=De();return(g,b)=>{const M=le,P=Ie,J=oe,ae=pe,ye=ce,ge=$e,ne=fe,_e=He,K=se("tooltip");return y(),I("div",ot,[d("div",at,[d("div",it,[G((y(),I("div",null,[O(M,{class:F(["n-badge-base n-sm",("getRequestMethodClass"in g?g.getRequestMethodClass:u(Ee))(u(c))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:C(()=>[Y(R(u(c)),1)]),_:1},8,["class"])])),[[K,`Method is ${u(c)} as ${u(c)==="GET"?"no":""} json body is sent`]]),d("div",st,[O(P,{"model-value":u(T),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),d("div",ut,[G(O(M,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:b[0]||(b[0]=w=>u(me)(u(H),"server-task-url"))},null,512),[[K,"Copy URL"]]),G(O(M,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:b[1]||(b[1]=w=>u(a)(g.task.handler))},null,512),[[K,"Open in Editor"]])])]),O(M,{"h-full":"",n:"primary solid",onClick:E},{default:C(()=>[O(J,{icon:"carbon:send"})]),_:1})])]),d("div",lt,[(y(!0),I(B,null,Z(u(q),w=>G((y(),A(M,{key:w.slug,class:F(u(n)===w.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:be=>n.value=w.slug},{default:C(()=>[O(J,{icon:("ServerRouteTabIcons"in g?g.ServerRouteTabIcons:u(de))[w.slug]},null,8,["icon"]),d("div",ct,[Y(R(w.name)+" "+R(w?.length?`(${w.length})`:"")+" ",1),d("span",null,R(u(X)[w.slug]?.length?`(${u(X)[w.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[K,w.name]])),128))]),O(u(S),null,{default:C(()=>[O(ae,{modelValue:u(l),"onUpdate:modelValue":b[4]||(b[4]=w=>ee(l)?l.value=w:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:C(()=>[u(X)[u(n)]?.length?(y(),I(B,{key:0},[d("div",ft,[pt,dt,O(M,{icon:"i-carbon-edit",border:!1,onClick:b[2]||(b[2]=w=>x("open-default-input"))}),ht]),O(ae,{modelValue:u(X)[u(n)],"onUpdate:modelValue":b[3]||(b[3]=w=>u(X)[u(n)]=w),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),u(l)?(y(),I("div",vt,[u(n)==="body"?(y(),I(B,{key:0},[d("div",mt,[(y(),I(B,null,Z(o,w=>d("button",{key:w,px4:"",py2:"",border:"r base",hover:"bg-active",class:F({"border-b":w!==u(s)}),onClick:be=>s.value=w},[d("div",{class:F({op30:w!==u(s)}),"font-mono":""},R(w),3)],10,yt)),64)),gt]),u(s)==="input"?(y(),A(u(p),{key:0})):u(s)==="json"?(y(),A(u(We),Me({key:1,modelValue:u(D),"onUpdate:modelValue":b[5]||(b[5]=w=>ee(D)?D.value=w:null),class:[[g.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},g.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(y(),A(u(p),{key:1}))])):j("",!0),u(e)?u(t)?(y(),A(ge,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:C(()=>[Y(" Running... ")]),_:1})):(y(),I(B,{key:3},[d("div",_t,[bt,u(r).error?(y(),A(ne,{key:0,n:"red"},{default:C(()=>[Y(" Error ")]),_:1})):j("",!0),O(ne,{n:u(r).error?"orange":"green",textContent:R(u(r).statusCode)},null,8,["n","textContent"]),u(r).contentType?(y(),I("code",kt,R(u(r).contentType),1)):j("",!0),Ot,Tt,O(ne,{n:"green"},{default:C(()=>[Y(R(u(r).fetchTime)+" ms ",1)]),_:1})]),O(_e,{"flex-auto":"","overflow-auto":"","py-2":"",code:u(k),lang:u(m)},null,8,["code","lang"])],64)):(y(),A(ye,{key:1},{default:C(()=>[O(M,{n:"primary",onClick:E},{default:C(()=>[O(J,{icon:"carbon:send"}),Y(" Run task ")]),_:1})]),_:1}))])}}}),St={"flex-none":"","text-left":""},wt={flex:"","items-center":"","text-sm":"","font-mono":""},Xt=d("div",{"x-divider":""},null,-1),ve=te({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(z){const U=W(!0),L=re();return(x,D)=>{const X=oe,S=ve;return y(),I("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:F([{"bg-active":u(L)===x.item.name}]),style:Ue({paddingLeft:`calc(0.5rem + ${x.index*1.5}em)`}),onClick:D[0]||(D[0]=p=>{U.value=!u(U),L.value=x.item.name})},[d("div",St,[x.item.type==="collection"?(y(),A(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":u(U)?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),d("span",wt,[x.item.type==="collection"?(y(),A(X,{key:0,title:`${x.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(y(),A(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+R(x.item.name),1)])],6),Xt,u(U)?Le(x.$slots,"default",{key:0},()=>[(y(!0),I(B,null,Z(x.item.tasks,p=>(y(),A(S,{key:p.name,item:p,index:x.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Dt={flex:"~ gap1","text-sm":""},Et={key:0,op50:""},Mt={op50:""},Ct=d("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1),It=d("span",{op75:""},"Select a task to start",-1),$t=d("div",{p4:"",border:"b base"},[d("span",{"text-lg":""},"Default Inputs"),d("br"),d("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1),Yt=te({__name:"server-tasks",setup(z){const U=W(!1),L=Ne(),x=$(()=>Object.keys(L.value?.tasks??{}).map(n=>({name:n,...L.value.tasks[n],type:"task"}))),D=$(()=>Object.entries(L.value?.scheduledTasks??{}).map(([n,o])=>({cron:n,tasks:o}))),X=re(),{view:S,selectedTask:p,inputDefaults:_}=ue("serverTasks"),r=$(()=>{!X.value&&p.value&&(X.value=p.value.name);const n=x.value.find(o=>o.name===X.value);return X.value!==p.value?.name&&n&&(p.value=n),n}),k=W(""),m=$(()=>new Re(x.value,{keys:["key","description"],shouldSort:!0})),t=$(()=>k.value?m.value.search(k.value).map(o=>o.item):x.value),e=$(()=>{const n=[],o=(i,l)=>{i.tasks||=[],i.tasks.push(l)},s=(i,l)=>{const v=l?l.tasks?.find(h=>h.name===i):n.find(h=>h.name===i);if(v)return{...v,type:"collection"};const f={name:i,handler:i,description:"",type:"collection",tasks:[]};return l?o(l,f):n.push(f),f};return t.value.forEach(i=>{let l;const v={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(c=>{l=s(c,l)}),l?o(l,v):n.push(v)}),n});function a(){S.value=S.value==="tree"?"list":"tree"}return(n,o)=>{const s=le,i=Be,l=rt,v=Ae,f=xt,h=je,c=ce,N=pe,T=ze,H=qe,V=se("tooltip");return y(),I(B,null,[O(v,{"storage-key":"tab-server-tasks"},{left:C(()=>[O(v,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:C(()=>[O(i,{search:u(k),"onUpdate:search":o[1]||(o[1]=E=>ee(k)?k.value=E:null),pb2:""},{actions:C(()=>[G(O(s,{"text-lg":"",icon:u(S)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(O(s,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:o[0]||(o[0]=E=>U.value=!u(U))},null,512),[[V,"Default Inputs"]])]),default:C(()=>[d("div",Dt,[u(k)?(y(),I("span",Et,R(u(t).length)+" matched · ",1)):j("",!0),d("span",Mt,R(u(x)?.length)+" tasks in total",1)])]),_:1},8,["search"]),(y(!0),I(B,null,Z(u(S)==="tree"?u(e):u(t),E=>(y(),A(ve,{key:E.name,item:E},null,8,["item"]))),128))]),right:C(()=>[Ct,d("div",null,[d("ul",null,[(y(!0),I(B,null,Z(u(D),E=>(y(),I("li",{key:E.cron},[O(l,{collection:E},null,8,["collection"])]))),128))])])]),_:1})]),right:C(()=>[(y(),A(Ve,{max:10},[u(r)?(y(),A(f,{key:u(r).name,task:u(r),onOpenDefaultInput:o[2]||(o[2]=E=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),u(r)?j("",!0):(y(),A(c,{key:0},{default:C(()=>[O(h,{px6:"",py2:""},{default:C(()=>[It]),_:1})]),_:1}))]),_:1}),O(H,{modelValue:u(U),"onUpdate:modelValue":o[4]||(o[4]=E=>ee(U)?U.value=E:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:o[5]||(o[5]=E=>U.value=!1)},{default:C(()=>[d("div",null,[$t,O(T,{text:`Query ${u(_).query.length?`(${u(_).query.length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:u(de)).query},{default:C(()=>[O(N,{modelValue:u(_).query,"onUpdate:modelValue":o[3]||(o[3]=E=>u(_).query=E),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Yt as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{d as me,r as P,bG as Se,o as u,m as _,k as c,G as F,h as x,f as e,bH as re,t as N,p as O,v as K,a9 as We,aa as Ke,F as L,n as J,a6 as Te,bw as $e,bx as Re,w as Ee,bu as Qe,bI as Xe,bJ as Ye,aA as Ze,bK as et,ab as tt,al as ot,ay as fe,a as E,ac as nt,aB as st,b0 as at,bL as rt,e as lt,a2 as je,j as w,l as Y,i as m,I as Z,aw as it,ak as De,V as ut,_ as Ve,X as ct,A as Ie,am as dt,bM as pt,ah as ft,U as mt,bN as vt,ar as ht}from"./DW2rdoo9.js";import{_ as yt}from"./CnDX42ER.js";import{_ as Ue}from"./Dm8mUwGL.js";import{_ as _t}from"./D9bWLJbD.js";import{_ as Ne}from"./C_mHwna3.js";import{_ as gt}from"./nd9mx79B.js";import{_ as bt}from"./DZg4WwSa.js";import{_ as kt}from"./D7gBCge-.js";import{C as ke,S as Oe}from"./BcJws1i5.js";import{e as wt}from"./CQhVfK23.js";import{_ as Ct}from"./B-hub2K2.js";import{_ as xt}from"./D1Dg62su.js";import"./BhuDhIKJ.js";import"./_hj05-RZ.js";import"./BVJlJdda.js";const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function St(t,r){if(typeof t!="string")throw new TypeError("argument str must be a string");const n={},h=(r||{}).decode||Rt;let v=0;for(;v<t.length;){const d=t.indexOf("=",v);if(d===-1)break;let f=t.indexOf(";",v);if(f===-1)f=t.length;else if(f<d){v=t.lastIndexOf(";",d-1)+1;continue}const a=t.slice(v,d).trim();if(n[a]===void 0){let S=t.slice(d+1,f).trim();S.codePointAt(0)===34&&(S=S.slice(1,-1)),n[a]=$t(S,h)}v=f+1}return n}function we(t,r,n){const o=n||{},h=o.encode||Et;if(typeof h!="function")throw new TypeError("option encode is invalid");if(!ae.test(t))throw new TypeError("argument name is invalid");const v=h(r);if(v&&!ae.test(v))throw new TypeError("argument val is invalid");let d=t+"="+v;if(o.maxAge!==void 0&&o.maxAge!==null){const f=o.maxAge-0;if(Number.isNaN(f)||!Number.isFinite(f))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(f)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Tt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function Tt(t){return Object.prototype.toString.call(t)==="[object Date]"||t instanceof Date}function $t(t,r){try{return r(t)}catch{return t}}function Rt(t){return t.includes("%")?decodeURIComponent(t):t}function Et(t){return encodeURIComponent(t)}function B(t){if(typeof t!="object")return t;var r,n,o=Object.prototype.toString.call(t);if(o==="[object Object]"){if(t.constructor!==Object&&typeof t.constructor=="function"){n=new t.constructor;for(r in t)t.hasOwnProperty(r)&&n[r]!==t[r]&&(n[r]=B(t[r]))}else{n={};for(r in t)r==="__proto__"?Object.defineProperty(n,r,{value:B(t[r]),configurable:!0,enumerable:!0,writable:!0}):n[r]=B(t[r])}return n}if(o==="[object Array]"){for(r=t.length,n=Array(r);r--;)n[r]=B(t[r]);return n}return o==="[object Set]"?(n=new Set,t.forEach(function(h){n.add(B(h))}),n):o==="[object Map]"?(n=new Map,t.forEach(function(h,v){n.set(B(v),B(h))}),n):o==="[object Date]"?new Date(+t):o==="[object RegExp]"?(n=new RegExp(t.source,t.flags),n.lastIndex=t.lastIndex,n):o==="[object DataView]"?new t.constructor(B(t.buffer)):o==="[object ArrayBuffer]"?t.slice(0):o.slice(-6)==="Array]"?new t.constructor(t):t}const jt=c("div",{"x-divider":""},null,-1),Ae=me({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(t){const r=P(!0),n=Se();return(o,h)=>{const v=Te,d=Ue,f=Ae;return u(),_("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:F([{"bg-active":e(n)===o.item.filepath}]),style:We({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:h[0]||(h[0]=a=>{r.value=!e(r),n.value=o.item.filepath})},[c("div",{class:F({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(u(),x(v,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(r)?90:0,transition:""},null,8,["transform-rotate"])):(u(),x(d,{key:1,class:F(("getRequestMethodClass"in o?o.getRequestMethodClass:e(re))(o.item.method||"*")),textContent:N((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:F({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(u(),x(v,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):O("",!0),K(" "+N(o.item.route),1)],2)],6),jt,e(r)?Ke(o.$slots,"default",{key:0},()=>[(u(!0),_(L,null,J(o.item.routes,a=>(u(),x(f,{key:a.filepath,item:a,index:o.index+1},null,8,["item","index"]))),128))]):O("",!0)])}}}),Dt={path:"/",watch:!0,decode:t=>Xe(decodeURIComponent(t)),encode:t=>encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))},Vt=void 0;function It(t,r){const n={...Dt,...r},o=Ce(n)||{};let h;n.maxAge!==void 0?h=n.maxAge*1e3:n.expires&&(h=n.expires.getTime()-Date.now());const v=h!==void 0&&h<=0,d=B(v?void 0:o[t]??n.default?.()),f=h&&!v?Ot(d,h,n.watch&&n.watch!=="shallow"):P(d);{let a=null;try{!Vt&&typeof BroadcastChannel<"u"&&(a=new BroadcastChannel(`nuxt:cookies:${t}`))}catch{}const S=()=>{n.readonly||Ye(f.value,o[t])||(Nt(t,f.value,n),o[t]=B(f.value),a?.postMessage({value:n.encode(f.value)}))},V=H=>{const ee=H.refresh?Ce(n)?.[t]:n.decode(H.value);A=!0,o[t]=f.value=ee,Ze(()=>{A=!1})};let A=!1;$e()&&Re(()=>{A=!0,S(),a?.close()}),a&&(a.onmessage=({data:H})=>V(H)),n.watch?Ee(f,()=>{A||S()},{deep:n.watch!=="shallow"}):S()}return f}function Ce(t={}){return St(document.cookie,t)}function Ut(t,r,n={}){return r==null?we(t,r,{...n,maxAge:-1}):we(t,r,n)}function Nt(t,r,n={}){document.cookie=Ut(t,r,n)}const xe=2147483647;function Ot(t,r,n){let o,h,v=0;const d=n?P(t):{value:t};return $e()&&Re(()=>{h?.(),clearTimeout(o)}),Qe((f,a)=>{n&&(h=Ee(d,a));function S(){clearTimeout(o);const V=r-v,A=V<xe?V:xe;o=setTimeout(()=>{if(v+=A,v<r)return S();d.value=void 0,a()},A)}return{get(){return f(),d.value},set(V){S(),d.value=V,a()}}})}const At={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},qt={relative:"","w-full":""},Mt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Bt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},Ht=c("div",{"flex-auto":""},null,-1),zt=c("div",{"text-xs":"",op50:""}," Send from ",-1),Gt=c("option",{value:"app"}," App ",-1),Jt=c("option",{value:"devtools"}," DevTools ",-1),Wt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Kt={"text-right":"","font-mono":""},Qt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Xt={flex:"~ gap-4"},Yt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Zt=c("div",{"w-5":"","x-divider":""},null,-1),eo=c("div",{"flex-none":""}," Default Inputs ",-1),to=c("div",{"x-divider":""},null,-1),oo={key:2},no={key:3,border:"b base",relative:"","n-code-block":""},so={flex:"~ wrap","w-full":""},ao=["onClick"],ro=c("div",{border:"b base","flex-auto":""},null,-1),lo={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},io=c("div",null,"Response",-1),uo={key:1,"text-xs":"",op50:""},co=c("div",{"flex-auto":""},null,-1),po=c("div",{op50:""}," Request finished in ",-1),fo={key:0,"flex-auto":"","overflow-auto":""},mo={border:"~ base","h-full":"","w-full":"",rounded:""},vo=["data"],ho={key:2,"flex-auto":"","overflow-auto":"",p4:""},yo={border:"~ base",rounded:""},_o=["src"],go={key:1,controls:"",rounded:""},bo=["src"],ko=me({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(t,{emit:r}){const n=t,o=r,[h,v]=et(),d=tt(),f=ot(),a=fe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),S=E(()=>a.contentType.includes("application/json")?"json":a.contentType.includes("text/html")?"html":a.contentType.includes("text/css")?"css":a.contentType.includes("text/javascript")?"javascript":a.contentType.includes("image")||a.contentType.includes("video")?"media":a.contentType.includes("text/xml")||a.contentType.includes("application/xml")?"xml":a.contentType.includes("application/pdf")?"pdf":"text"),V=E(()=>{if(S.value==="json")return JSON.stringify(a.data,null,2);if(S.value==="media"||S.value==="pdf"){const s=new Blob([a.data],{type:a.contentType});return URL.createObjectURL(s)}return a.data}),A=P(!1),H=P(!1),ee=nt(),j=E(()=>n.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),g=E(()=>j.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),I=P(n.route.method||"GET"),b=P({}),y=fe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),D=P({}),{inputDefaults:T,sendFrom:U}=De("serverRoutes"),q=E(()=>f?.value?.app?.$fetch?U.value:"devtools"),le=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],te=E(()=>ie.includes(I.value.toUpperCase())),k=P(),$=["input","json"],z=P($[0]),oe=E({get:()=>y[k.value],set:s=>{y[k.value]=s}}),ve=E(()=>({...W(T.value.query),...W(y.query)})),he=E(()=>({...W(T.value.headers),...W(y.headers)})),ue=E(()=>te.value?z.value==="json"?{...W(T.value.body),...D.value}:{...W(T.value.body),...W(y.body)}:void 0),Le=E(()=>{let s=window?.location.origin;return s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1)),s}),ne=E(()=>{let s=new URLSearchParams(ve.value).toString();s&&(s=`?${s}`);const i=(j.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&b.value[R]||R).join("")||"")+s;let p=d.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+i}),ye=E(()=>Le.value+ne.value);function W(s){const i=Object.fromEntries(s.filter(({active:p,key:R,value:C})=>p&&R&&C!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(i).length?i:void 0}async function _e(){H.value=!0,A.value=!0;const s=Date.now(),i=q.value==="app"?f.value.app.$fetch:$fetch;ut("server-routes:fetch",{method:I.value,sendFrom:q.value});try{a.data=await i(ye.value,{method:I.value.toUpperCase(),headers:he.value,query:ve.value,body:ue.value,onResponse({response:p}){a.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),a.statusCode=p.status,a.error=void 0},onResponseError(p){a.error=p.response._data,a.data=p.response._data}})}catch{}A.value=!1,a.fetchTime=Date.now()-s}const ge=E(()=>{const s=[],i=[],p=Object.entries(he.value).filter(([C,M])=>C&&M&&!(C==="Content-Type"&&M==="application/json")).map(([C,M])=>` '${C}': '${M}'`).join(`,
|
|
2
|
-
`);I.value.toUpperCase()!=="GET"&&i.push(`method: '${I.value.toUpperCase()}'`),p&&i.push(`headers: {
|
|
3
|
-
${p}
|
|
4
|
-
}`),ue.value&&i.push(`body: ${JSON.stringify(ue.value,null,2)}`);const R=i.length?`, {
|
|
5
|
-
${i.join(`,
|
|
6
|
-
`).split(`
|
|
7
|
-
`).map(C=>` ${C}`).join(`
|
|
8
|
-
`)}
|
|
9
|
-
}`:"";return s.push({name:"useFetch",lang:"javascript",docs:ke.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${ne.value}'${R})`}),s.push({name:"$fetch",lang:"javascript",docs:ke.nuxt.$fetch,code:`await $fetch('${ne.value}'${R})`}),s}),Q=P(qe()),G=fe({key:"",value:""}),Pe=E(()=>{const s=[];return g.value.length&&s.push({name:"Params",slug:"params",length:g.value.length}),s.push({name:"Query",slug:"query",length:y.query.length}),te.value&&s.push({name:"Body",slug:"body",length:y.body.length}),s.push({name:"Headers",slug:"headers",length:y.headers.length}),s.push({name:"Cookies",slug:"cookies",length:Q.value.length}),s.push({name:"Snippets",slug:"snippet"}),s});function qe(){return document.cookie.split("; ").map(s=>{const[i,p]=s.split("=");return{key:i,value:p}}).filter(s=>s.key)}function ce(s,i){if(!s)return;const p=Q.value.find(C=>C.key===s),R=It(s);p!==void 0?i===void 0&&(Q.value=Q.value.filter(C=>C.key!==s)):(Q.value.push({key:s,value:i}),G.key="",G.value=""),R.value=i}st(()=>{z.value==="json"&&typeof D.value=="string"&&(D.value=JSON.parse(D.value))});const de=at("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});rt([y,k],()=>{const s=de.value?.find(i=>i.path===n.route.filepath);if(s){k.value||(k.value=s.tab),s.tab!==k.value&&(s.tab=k.value);const{body:i,query:p,headers:R,params:C}=s.inputs;Object.assign(y,{body:i,query:p,headers:R}),b.value=C}else{const i={path:n.route.filepath,tab:g.value.length?"params":"query",inputs:{...y,...g.value.length?{params:b.value}:{}}};de.value.push(i),k.value||(k.value=i.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){de.value=[],y.body=[],y.query=[],y.headers=[],b.value={},k.value=g.value.length?"params":"query"}const Be=lt();return(s,i)=>{const p=Ve,R=_t,C=ct,M=Te,be=Ne,Fe=gt,He=Ie,ze=dt,pe=Ue,Ge=bt,Je=kt,se=je("tooltip");return u(),_("div",At,[c("div",Lt,[c("div",Pt,[s.route.method?(u(),x(p,{key:0,class:F(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(re))(e(I))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:w(()=>[K(N(e(I).toUpperCase()),1)]),_:1},8,["class"])):(u(),x(R,{key:1,modelValue:e(I),"onUpdate:modelValue":i[0]||(i[0]=l=>Y(I)?I.value=l:null),class:F(["n-badge-base n-sm",("getRequestMethodClass"in s?s.getRequestMethodClass:e(re))(e(I))])},{default:w(()=>[(u(),_(L,null,J(le,l=>c("option",{key:l,class:F(("getRequestMethodClass"in s?s.getRequestMethodClass:e(re))(l))},N(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),c("div",qt,[m(C,{"model-value":e(ne),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),c("div",Mt,[Z(m(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:i[1]||(i[1]=l=>e(Be)(e(ye),"server-route-url"))},null,512),[[se,"Copy URL"]]),Z(m(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:i[2]||(i[2]=l=>e(ee)(s.route.filepath))},null,512),[[se,"Open in Editor"]])])]),m(p,{"h-full":"",n:"primary solid",onClick:_e},{default:w(()=>[m(M,{icon:"carbon:send"})]),_:1})])]),c("div",Bt,[(u(!0),_(L,null,J(e(Pe),l=>Z((u(),x(p,{key:l.slug,class:F(e(k)===l.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:X=>k.value=l.slug},{default:w(()=>[m(M,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Oe))[l.slug]},null,8,["icon"]),c("div",Ft,[K(N(l.name)+" "+N(l?.length?`(${l.length})`:"")+" ",1),c("span",null,N(e(T)[l.slug]?.length?`(${e(T)[l.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[se,l.name]])),128)),Ht,zt,m(R,{modelValue:e(q),"onUpdate:modelValue":i[3]||(i[3]=l=>Y(q)?q.value=l:null),class:"n-xs",disabled:!e(f)?.app?.$fetch},{default:w(()=>[Gt,Jt]),_:1},8,["modelValue","disabled"]),Z(m(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[se,"Clear Inputs Saved Cache"]])]),e(k)==="params"?(u(),_("div",Wt,[(u(!0),_(L,null,J(e(g),l=>(u(),_(L,{key:l},[c("div",Kt,N(l),1),m(C,{modelValue:e(b)[l],"onUpdate:modelValue":X=>e(b)[l]=X,placeholder:l,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):O("",!0),e(k)==="cookies"?(u(),_("div",Qt,[(u(!0),_(L,null,J(e(Q),l=>(u(),_("div",{key:l.key,flex:"~ gap-4 items-center"},[m(C,{placeholder:"Key...","model-value":l.key,disabled:"","op-70":""},null,8,["model-value"]),m(C,{placeholder:"Value...","model-value":l.value,"flex-1":"",n:"primary",onInput:X=>ce(l.key,X.target?.value)},null,8,["model-value","onInput"]),m(p,{title:"Delete",n:"red",onClick:X=>ce(l.key,void 0)},{default:w(()=>[m(M,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),c("div",Xt,[m(C,{modelValue:e(G).key,"onUpdate:modelValue":i[4]||(i[4]=l=>e(G).key=l),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),m(C,{modelValue:e(G).value,"onUpdate:modelValue":i[5]||(i[5]=l=>e(G).value=l),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),m(p,{title:"Add",n:"primary",onClick:i[6]||(i[6]=l=>ce(e(G).key,e(G).value))},{default:w(()=>[m(M,{icon:"i-carbon-save"})]),_:1})])])):O("",!0),m(e(h),null,{default:w(()=>[m(be,{modelValue:e(oe),"onUpdate:modelValue":i[9]||(i[9]=l=>Y(oe)?oe.value=l:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:w(()=>[e(T)[e(k)]?.length?(u(),_(L,{key:0},[c("div",Yt,[Zt,eo,m(p,{icon:"i-carbon-edit",border:!1,onClick:i[7]||(i[7]=l=>o("open-default-input"))}),to]),m(be,{modelValue:e(T)[e(k)],"onUpdate:modelValue":i[8]||(i[8]=l=>e(T)[e(k)]=l),disabled:"",p0:""},null,8,["modelValue"])],64)):O("",!0)]),_:1},8,["modelValue"])]),_:1}),e(k)==="snippet"?(u(),_("div",oo,[e(ge).length?(u(),x(Fe,{key:0,"code-snippets":e(ge)},null,8,["code-snippets"])):O("",!0)])):e(oe)?(u(),_("div",no,[e(k)==="body"?(u(),_(L,{key:0},[c("div",so,[(u(),_(L,null,J($,l=>c("button",{key:l,px4:"",py2:"",border:"r base",hover:"bg-active",class:F({"border-b":l!==e(z)}),onClick:X=>z.value=l},[c("div",{class:F({op30:l!==e(z)}),"font-mono":""},N(l),3)],10,ao)),64)),ro]),e(z)==="input"?(u(),x(e(v),{key:0})):e(z)==="json"?(u(),x(e(wt),it({key:1,modelValue:e(D),"onUpdate:modelValue":i[10]||(i[10]=l=>Y(D)?D.value=l:null),class:[[s.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},s.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):O("",!0)],64)):(u(),x(e(v),{key:1}))])):O("",!0),e(H)?e(A)?(u(),x(ze,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:w(()=>[K(" Fetching... ")]),_:1})):(u(),_(L,{key:6},[c("div",lo,[io,e(a).error?(u(),x(pe,{key:0,n:"red"},{default:w(()=>[K(" Error ")]),_:1})):O("",!0),m(pe,{n:e(a).error?"orange":"green",textContent:N(e(a).statusCode)},null,8,["n","textContent"]),e(a).contentType?(u(),_("code",uo,N(e(a).contentType),1)):O("",!0),e(a).contentType==="application/json"?(u(),x(Ge,{key:2,getter:()=>({input:e(V)})},null,8,["getter"])):O("",!0),co,po,m(pe,{n:"green"},{default:w(()=>[K(N(e(a).fetchTime)+" ms ",1)]),_:1})]),e(S)==="pdf"?(u(),_("div",fo,[c("div",mo,[c("object",{data:e(V),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,vo)])])):e(S)!=="media"?(u(),x(Je,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(V),lang:e(S)},null,8,["code","lang"])):(u(),_("div",ho,[c("div",yo,[e(a).contentType.includes("image")?(u(),_("img",{key:0,rounded:"",src:e(V)},null,8,_o)):(u(),_("video",go,[c("source",{src:e(V),type:"video/mp4"},null,8,bo)]))])]))],64)):(u(),x(He,{key:4},{default:w(()=>[m(p,{n:"primary",onClick:_e},{default:w(()=>[m(M,{icon:"carbon:send"}),K(" Send request ")]),_:1})]),_:1}))])}}}),wo={flex:"~ gap1","text-sm":""},Co={key:0,op50:""},xo={op50:""},So=c("span",{op75:""},"Select a route to start",-1),To=c("div",{p4:"",border:"b base"},[c("span",{"text-lg":""},"Default Inputs"),c("br"),c("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Bo=me({__name:"server-routes",setup(t){const r=P(!1),n=pt(),o=Se(),{selectedRoute:h,view:v,inputDefaults:d}=De("serverRoutes"),f=E(()=>{!o.value&&h.value&&(o.value=h.value.filepath);const j=n.value?.find(g=>g.filepath===o.value);return o.value!==h.value?.filepath&&j&&(h.value=j),j}),a=P(""),S=E(()=>new ft(n.value||[],{keys:["method","route"],shouldSort:!0})),V=E(()=>n.value?a.value?S.value.search(a.value).map(g=>g.item):n.value:[]),A=E(()=>{const j=[],g=(b,y)=>{b.routes=b.routes||[],b.routes.push(y)},I=(b,y)=>{const D=y?y.routes?.find(U=>U.route===b):j.find(U=>U.route===b);if(D)return D;const T={route:b,filepath:b.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return y?g(y,T):j.push(T),T};return V.value.forEach(b=>{let y,D;const T=b.filepath.split("/"),U=T.slice(T.indexOf("server")+1);if(b.type==="runtime"){U[0]="runtime";const q=T.indexOf("dist");q!==-1&&(y=T[q-1],y&&U.splice(1,0,y))}U.length>0&&U[U.length-1].includes(".")&&U.pop(),U.forEach(q=>{D=I(q,D)}),D?g(D,b):j.push(b)}),j});function H(){v.value=v.value==="tree"?"list":"tree"}function ee(j){return j.charAt(0).toUpperCase()+j.slice(1)}return(j,g)=>{const I=Ve,b=yt,y=Ae,D=ko,T=ht,U=Ie,q=mt,le=Ne,ie=Ct,te=xt,k=je("tooltip");return u(),_(L,null,[m(q,{"storage-key":"tab-server-routes"},{left:w(()=>[m(b,{search:e(a),"onUpdate:search":g[1]||(g[1]=$=>Y(a)?a.value=$:null),pb2:""},{actions:w(()=>[Z(m(I,{"text-lg":"",icon:e(v)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:H},null,8,["icon"]),[[k,"Toggle View"]]),Z(m(I,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:g[0]||(g[0]=$=>r.value=!e(r))},null,512),[[k,"Default Inputs"]])]),default:w(()=>[c("div",wo,[e(a)?(u(),_("span",Co,N(e(V).length)+" matched · ",1)):O("",!0),c("span",xo,N(e(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(u(!0),_(L,null,J(e(v)==="tree"?e(A):e(V),$=>(u(),x(y,{key:$.filepath,item:$},null,8,["item"]))),128))]),right:w(()=>[(u(),x(vt,{max:10},[e(f)?(u(),x(D,{key:e(f).filepath,route:e(f),onOpenDefaultInput:g[2]||(g[2]=$=>r.value=!0)},null,8,["route"])):O("",!0)],1024)),e(f)?O("",!0):(u(),x(U,{key:0},{default:w(()=>[m(T,{px6:"",py2:""},{default:w(()=>[So]),_:1})]),_:1}))]),_:1}),m(te,{modelValue:e(r),"onUpdate:modelValue":g[3]||(g[3]=$=>Y(r)?r.value=$:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:g[4]||(g[4]=$=>r.value=!1)},{default:w(()=>[c("div",null,[To,(u(!0),_(L,null,J(Object.keys(e(d)),$=>(u(),x(ie,{key:$,text:`${ee($)} ${e(d)[$].length?`(${e(d)[$].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in j?j.ServerRouteTabIcons:e(Oe))[$]},{default:w(()=>[m(le,{modelValue:e(d)[$],"onUpdate:modelValue":z=>e(d)[$]=z,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Bo as default};
|