@nuxt/devtools 1.0.8 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/chunks/module-main.mjs +99 -34
- package/dist/chunks/vite-inspect.mjs +1 -1
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/chunks/vue-devtools.mjs +30 -0
- package/dist/client/200.html +35 -35
- package/dist/client/404.html +35 -35
- package/dist/client/_nuxt/2bKi2e5w.js +1 -0
- package/dist/client/_nuxt/8EggbMwu.js +1 -0
- package/dist/client/_nuxt/9xk-6Ftp.js +1 -0
- package/dist/client/_nuxt/A1WiD9SJ.js +1 -0
- package/dist/client/_nuxt/B9hwBRIe.js +1 -0
- package/dist/client/_nuxt/BDWyeyq_.js +30 -0
- package/dist/client/_nuxt/BEjaWloH.js +1 -0
- package/dist/client/_nuxt/BIG-xU8F.js +1 -0
- package/dist/client/_nuxt/BMDCUlkj.js +1 -0
- package/dist/client/_nuxt/BOnTdqFq.js +1 -0
- package/dist/client/_nuxt/BVYSsK7b.js +1 -0
- package/dist/client/_nuxt/BZ4OC5-6.js +1 -0
- package/dist/client/_nuxt/BZ5b_UHE.js +1 -0
- package/dist/client/_nuxt/Ba4DdyWR.js +1 -0
- package/dist/client/_nuxt/Bdtkoq5_.js +1 -0
- package/dist/client/_nuxt/BgkphNq2.js +1 -0
- package/dist/client/_nuxt/{open-graph.ibydGna7.js → BkuzPiAP.js} +2 -2
- package/dist/client/_nuxt/Blr6EMNg.js +16 -0
- package/dist/client/_nuxt/BnqTDRTQ.js +1 -0
- package/dist/client/_nuxt/{components.bafJJWkk.js → Buf8bEqg.js} +1 -1
- package/dist/client/_nuxt/{terminals.WAexfEk0.js → C3QlK_7B.js} +1 -1
- package/dist/client/_nuxt/C54XRc8l.js +2 -0
- package/dist/client/_nuxt/C5gCGmDW.js +200 -0
- package/dist/client/_nuxt/C6khTLBN.js +2 -0
- package/dist/client/_nuxt/{modules.7QVx6VBW.js → C9nlvRuE.js} +2 -2
- package/dist/client/_nuxt/CB59kvvk.js +1 -0
- package/dist/client/_nuxt/CD_YezWg.js +1 -0
- package/dist/client/_nuxt/CMLG2-wm.js +1 -0
- package/dist/client/_nuxt/CXHl10-y.js +1 -0
- package/dist/client/_nuxt/CXNvZAmn.js +1 -0
- package/dist/client/_nuxt/CXiebJPP.js +1 -0
- package/dist/client/_nuxt/CY8m9THH.js +1 -0
- package/dist/client/_nuxt/C_MnmfmV.js +1 -0
- package/dist/client/_nuxt/CbViG2Xw.js +74 -0
- package/dist/client/_nuxt/{css.a-KJtBLB.js → CbYhyuC0.js} +347 -347
- package/dist/client/_nuxt/{vue.c6DnC5ch.js → Cd6DbZRp.js} +1518 -1518
- package/dist/client/_nuxt/ChqQx1p4.js +1 -0
- package/dist/client/_nuxt/CrUxNsPP.js +1 -0
- package/dist/client/_nuxt/{onig.mBJmD8D5.js → CsTmP73Z.js} +1 -1
- package/dist/client/_nuxt/CtILACI6.js +48 -0
- package/dist/client/_nuxt/CtdhE1f3.js +1 -0
- package/dist/client/_nuxt/CupVZNk8.js +25 -0
- package/dist/client/_nuxt/CwIrUz6t.js +9 -0
- package/dist/client/_nuxt/CyGasit_.js +1 -0
- package/dist/client/_nuxt/D4f0f7UU.js +1 -0
- package/dist/client/_nuxt/D89IPr06.js +1 -0
- package/dist/client/_nuxt/DBpZLuBg.js +1 -0
- package/dist/client/_nuxt/{typescript.b1Nw_bQe.js → DC8MraHL.js} +489 -489
- package/dist/client/_nuxt/DDNphti6.js +16 -0
- package/dist/client/_nuxt/DDu9F5dm.js +1 -0
- package/dist/client/_nuxt/DE14FQNr.js +2 -0
- package/dist/client/_nuxt/DEHAvi9d.js +982 -0
- package/dist/client/_nuxt/DN9uS3r9.js +1 -0
- package/dist/client/_nuxt/DRyh6x-M.js +1 -0
- package/dist/client/_nuxt/DW-UQrvA.js +4 -0
- package/dist/client/_nuxt/DZNF9_Ts.js +1 -0
- package/dist/client/_nuxt/D_qxg9CZ.js +1 -0
- package/dist/client/_nuxt/{javascript.Of8SnKfU.js → Dch3xQiY.js} +509 -509
- package/dist/client/_nuxt/DdbkFw3c.js +1 -0
- package/dist/client/_nuxt/DfFJQbG4.js +8 -0
- package/dist/client/_nuxt/DggdVF2v.js +1 -0
- package/dist/client/_nuxt/DnNA5yXt.js +1 -0
- package/dist/client/_nuxt/DnXIYXpO.js +1 -0
- package/dist/client/_nuxt/DwPRkQcZ.js +1 -0
- package/dist/client/_nuxt/Elk39DYk.js +1 -0
- package/dist/client/_nuxt/LysmJLvR.js +1 -0
- package/dist/client/_nuxt/QRQ0ln8W.js +1 -0
- package/dist/client/_nuxt/Z8_3SdCx.js +1 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/ca0a12b4-0fff-4e13-ae05-41075030e4de.json +1 -0
- package/dist/client/_nuxt/{error.U9HBYLgA.js → e8Aij11V.js} +1 -1
- package/dist/client/_nuxt/entry.C4Fmc-BV.css +1 -0
- package/dist/client/_nuxt/hRYdrzP_.js +1 -0
- package/dist/client/_nuxt/pinia.uD6MMfzP.css +1 -0
- package/dist/client/_nuxt/tH7Oq52e.js +1 -0
- package/dist/client/_nuxt/ud_P3M-F.js +1 -0
- package/dist/client/_nuxt/vzR1DB7b.js +105 -0
- package/dist/client/_nuxt/z8NVlzAs.js +1 -0
- package/dist/client/index.html +35 -35
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/FrameBox.vue +26 -25
- package/dist/runtime/plugins/view/client.mjs +1 -5
- package/dist/runtime/vue-devtools/overlay.d.mts +1 -0
- package/dist/runtime/vue-devtools/overlay.mjs +6 -0
- package/dist/shared/{devtools.fc176ede.mjs → devtools.68e43ed6.mjs} +10 -0
- package/package.json +45 -41
- package/dist/client/_nuxt/CodeDiff.vue.yvGsYwMX.js +0 -3
- package/dist/client/_nuxt/ComposableItem.vue.T22_QMe3.js +0 -1
- package/dist/client/_nuxt/DataSchemaButton.vue.kfghTUAM.js +0 -1
- package/dist/client/_nuxt/DataSchemaDrawer.pFnTVL_R.js +0 -1000
- package/dist/client/_nuxt/DurationDisplay.vue.zHxKl3h_.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.e1n0RyHZ.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.9P-8iMDH.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.Mrnd5FUf.js +0 -1
- package/dist/client/_nuxt/NBadge.02P0N0hm.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.m1__cenQ.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.D7jhLEjr.js +0 -2
- package/dist/client/_nuxt/NDrawer.vue.biTr62KW.js +0 -1
- package/dist/client/_nuxt/NDropdown.vue.sigVLPdp.js +0 -1
- package/dist/client/_nuxt/NIconTitle.vue.B_Ui7cce.js +0 -1
- package/dist/client/_nuxt/NLink.vue.Bj0qXc3J.js +0 -1
- package/dist/client/_nuxt/NMarkdown.vue.Ej8wmZFm.js +0 -1
- package/dist/client/_nuxt/NNavbar.vue.VnwEajb6.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.vAf-kGVD.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.zI1gfDpy.js +0 -1
- package/dist/client/_nuxt/NSelectTabs.vue.AydEyuDp.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.b9xL28U5.js +0 -1
- package/dist/client/_nuxt/StacktraceList.vue.K3UX7GrW.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.XC13TBO8.js +0 -1
- package/dist/client/_nuxt/__blank.4nEfHodO.js +0 -1
- package/dist/client/_nuxt/analyze-build.PnmanOmc.js +0 -1
- package/dist/client/_nuxt/assets.4NpI16LC.js +0 -16
- package/dist/client/_nuxt/builds/meta/6a0559dc-da71-46a5-8a3c-8d631ecd5320.json +0 -1
- package/dist/client/_nuxt/client.UdRQ7dYn.js +0 -1
- package/dist/client/_nuxt/custom-_name_.i-QCiHcq.js +0 -1
- package/dist/client/_nuxt/default.64CCr6pQ.js +0 -1
- package/dist/client/_nuxt/entry.AC_HBPW1.css +0 -1
- package/dist/client/_nuxt/entry.Li7bMdxw.js +0 -48
- package/dist/client/_nuxt/error-404.uYSk40lm.js +0 -1
- package/dist/client/_nuxt/error-500._o_7fJYd.js +0 -1
- package/dist/client/_nuxt/full.WnKVk-q6.js +0 -1
- package/dist/client/_nuxt/hooks.5KumR8Qp.js +0 -1
- package/dist/client/_nuxt/html.0DSFJ4KV.js +0 -74
- package/dist/client/_nuxt/imports.-jRZwNS0.js +0 -1
- package/dist/client/_nuxt/index.9SQHhWq3.js +0 -16
- package/dist/client/_nuxt/index._ARgFaAV.js +0 -1
- package/dist/client/_nuxt/json-editor-vue.qZEps2wJ.js +0 -105
- package/dist/client/_nuxt/json.t1qiHl76.js +0 -25
- package/dist/client/_nuxt/none.du_ft3bP.js +0 -1
- package/dist/client/_nuxt/overview.Vfo3spsD.js +0 -1
- package/dist/client/_nuxt/pages.OsyANSwf.js +0 -1
- package/dist/client/_nuxt/payload.LvslHyQ-.js +0 -1
- package/dist/client/_nuxt/plugins.-waaP_qB.js +0 -1
- package/dist/client/_nuxt/runtime-configs.6C1y42GJ.js +0 -1
- package/dist/client/_nuxt/server-routes.8nS5VL6V.js +0 -9
- package/dist/client/_nuxt/settings.Aj2LNb0U.js +0 -1
- package/dist/client/_nuxt/shellscript.h1L64xId.js +0 -4
- package/dist/client/_nuxt/state-components.PdQ1tKRe.js +0 -1
- package/dist/client/_nuxt/state-modules.ZsAhN2-A.js +0 -1
- package/dist/client/_nuxt/storage-options.-PhoDnIp.js +0 -1
- package/dist/client/_nuxt/storage.4TsT27Mw.js +0 -1
- package/dist/client/_nuxt/timeline.M76ZIEAr.js +0 -30
- package/dist/client/_nuxt/unocss-runtime.PEXBUXPL.js +0 -2
- package/dist/client/_nuxt/vanilla-picker-NKbIFE8h.vtyeXros.js +0 -8
- package/dist/client/_nuxt/virtual-files.NKByCwiv.js +0 -1
- package/dist/client/_nuxt/vitesse-dark.5VceXvs6.js +0 -1
- package/dist/client/_nuxt/vitesse-light.HOMMxGxw.js +0 -1
- package/dist/client/_nuxt/vue-html.KfgsLQjp.js +0 -1
- package/dist/client/_nuxt/yaml.FtfhlYqU.js +0 -200
- /package/dist/client/_nuxt/{constants.jFgWOlQV.js → BcJws1i5.js} +0 -0
- /package/dist/client/_nuxt/{nuxt-docs.83FO1Cbd.js → D5r6TWiw.js} +0 -0
- /package/dist/client/_nuxt/{diff.-l9-nN5b.js → DvyTQcux.js} +0 -0
- /package/dist/client/_nuxt/{HelpFab.x07F_IqA.css → HelpFab.DHTsX8io.css} +0 -0
- /package/dist/client/_nuxt/{NCodeBlock.XH4dGkTz.css → NCodeBlock.Bcfh0aRP.css} +0 -0
- /package/dist/client/_nuxt/{NSectionBlock.a3MwpCxg.css → NSectionBlock.BrczCkLG.css} +0 -0
- /package/dist/client/_nuxt/{assets.xk970LH3.css → assets.DGT3vQsf.css} +0 -0
- /package/dist/client/_nuxt/{error-404.m36D2jj-.css → error-404.CbfoPaOP.css} +0 -0
- /package/dist/client/_nuxt/{error-500.oAiyMzGs.css → error-500.CgCLIzMa.css} +0 -0
- /package/dist/client/_nuxt/{open-graph.PgUMoob_.css → open-graph.-BQyihv8.css} +0 -0
- /package/dist/client/_nuxt/{terminals.GzwV8rXv.css → terminals.bPBXyte9.css} +0 -0
- /package/dist/client/_nuxt/{timeline.7wyW2pbe.css → timeline.DvDJbalt.css} +0 -0
- /package/dist/client/_nuxt/{virtual-files.lmRDNyeH.css → virtual-files.CWZEM3J4.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{av as m,bb as n,a as s,L as o}from"./CtILACI6.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const n=Object.freeze({displayName:"JSON",name:"json",patterns:[{include:"#value"}],repository:{array:{begin:"\\[",beginCaptures:{0:{name:"punctuation.definition.array.begin.json"}},end:"\\]",endCaptures:{0:{name:"punctuation.definition.array.end.json"}},name:"meta.structure.array.json",patterns:[{include:"#value"},{match:",",name:"punctuation.separator.array.json"},{match:"[^\\s\\]]",name:"invalid.illegal.expected-array-separator.json"}]},comments:{patterns:[{begin:"/\\*\\*(?!/)",captures:{0:{name:"punctuation.definition.comment.json"}},end:"\\*/",name:"comment.block.documentation.json"},{begin:"/\\*",captures:{0:{name:"punctuation.definition.comment.json"}},end:"\\*/",name:"comment.block.json"},{captures:{1:{name:"punctuation.definition.comment.json"}},match:"(//).*$\\n?",name:"comment.line.double-slash.js"}]},constant:{match:"\\b(?:true|false|null)\\b",name:"constant.language.json"},number:{match:`(?x)
|
|
2
|
+
-?
|
|
3
|
+
(?:
|
|
4
|
+
0
|
|
5
|
+
|
|
|
6
|
+
[1-9]
|
|
7
|
+
\\d*
|
|
8
|
+
)
|
|
9
|
+
(?:
|
|
10
|
+
(?:
|
|
11
|
+
\\.
|
|
12
|
+
\\d+
|
|
13
|
+
)?
|
|
14
|
+
(?:
|
|
15
|
+
[eE]
|
|
16
|
+
[+-]?
|
|
17
|
+
\\d+
|
|
18
|
+
)?
|
|
19
|
+
)?`,name:"constant.numeric.json"},object:{begin:"\\{",beginCaptures:{0:{name:"punctuation.definition.dictionary.begin.json"}},end:"\\}",endCaptures:{0:{name:"punctuation.definition.dictionary.end.json"}},name:"meta.structure.dictionary.json",patterns:[{comment:"the JSON object key",include:"#objectkey"},{include:"#comments"},{begin:":",beginCaptures:{0:{name:"punctuation.separator.dictionary.key-value.json"}},end:"(,)|(?=\\})",endCaptures:{1:{name:"punctuation.separator.dictionary.pair.json"}},name:"meta.structure.dictionary.value.json",patterns:[{comment:"the JSON object value",include:"#value"},{match:"[^\\s,]",name:"invalid.illegal.expected-dictionary-separator.json"}]},{match:"[^\\s\\}]",name:"invalid.illegal.expected-dictionary-separator.json"}]},objectkey:{begin:'"',beginCaptures:{0:{name:"punctuation.support.type.property-name.begin.json"}},end:'"',endCaptures:{0:{name:"punctuation.support.type.property-name.end.json"}},name:"string.json support.type.property-name.json",patterns:[{include:"#stringcontent"}]},string:{begin:'"',beginCaptures:{0:{name:"punctuation.definition.string.begin.json"}},end:'"',endCaptures:{0:{name:"punctuation.definition.string.end.json"}},name:"string.quoted.double.json",patterns:[{include:"#stringcontent"}]},stringcontent:{patterns:[{match:`(?x)
|
|
20
|
+
\\\\
|
|
21
|
+
(?:
|
|
22
|
+
["\\\\/bfnrt]
|
|
23
|
+
|
|
|
24
|
+
u
|
|
25
|
+
[0-9a-fA-F]{4})`,name:"constant.character.escape.json"},{match:"\\\\.",name:"invalid.illegal.unrecognized-string-escape.json"}]},value:{patterns:[{include:"#constant"},{include:"#number"},{include:"#string"},{include:"#array"},{include:"#object"},{include:"#comments"}]}},scopeName:"source.json"});var e=[n];export{e as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{d as me,r as q,bE as Se,o as u,m as _,k as c,G as F,h as x,f as e,bF as re,t as O,p as N,v as K,a9 as We,aa as Ke,F as L,n as J,a6 as Te,by as $e,bz as Re,w as Ee,bv as Qe,bG as Xe,bH as Ye,az as Ze,bI as et,ab as tt,av as ot,ax as fe,a as E,ac as nt,aA as st,a$ as at,bJ as rt,e as lt,a2 as je,j as w,l as Y,i as m,I as Z,au as it,ak as De,V as ut,_ as Ve,X as ct,A as Ie,bB as dt,bK as pt,ah as ft,U as mt,bL as vt,ap as ht}from"./CtILACI6.js";import{_ as yt}from"./CB59kvvk.js";import{_ as Ue}from"./BIG-xU8F.js";import{_ as _t}from"./DBpZLuBg.js";import{_ as Oe}from"./DnXIYXpO.js";import{_ as gt}from"./CyGasit_.js";import{_ as bt}from"./CY8m9THH.js";import{_ as kt}from"./C6khTLBN.js";import{C as ke,S as Ne}from"./BcJws1i5.js";import{U as wt}from"./vzR1DB7b.js";import{_ as Ct}from"./DRyh6x-M.js";import{_ as xt}from"./Bdtkoq5_.js";import"./Elk39DYk.js";import"./D_qxg9CZ.js";import"./DwPRkQcZ.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 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 M(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]=M(t[r]))}else{n={};for(r in t)r==="__proto__"?Object.defineProperty(n,r,{value:M(t[r]),configurable:!0,enumerable:!0,writable:!0}):n[r]=M(t[r])}return n}if(o==="[object Array]"){for(r=t.length,n=Array(r);r--;)n[r]=M(t[r]);return n}return o==="[object Set]"?(n=new Set,t.forEach(function(h){n.add(M(h))}),n):o==="[object Map]"?(n=new Map,t.forEach(function(h,v){n.set(M(v),M(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(M(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=q(!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:O((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"])):N("",!0),K(" "+O(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))]):N("",!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=M(v?void 0:o[t]??n.default?.()),f=h&&!v?Nt(d,h,n.watch&&n.watch!=="shallow"):q(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])||(Ot(t,f.value,n),o[t]=M(f.value),a?.postMessage({value:n.encode(f.value)}))},V=z=>{const ee=z.refresh?Ce(n)?.[t]:n.decode(z.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:z})=>V(z)),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 Ot(t,r,n={}){document.cookie=Ut(t,r,n)}const xe=2147483647;function Nt(t,r,n){let o,h,v=0;const d=n?q(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":""},qt={flex:"~ gap2 items-center"},Pt={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},zt=c("div",{"flex-auto":""},null,-1),Ht=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=q(!1),z=q(!1),ee=nt(),j=E(()=>n.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),g=E(()=>j.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),I=q(n.route.method||"GET"),b=q({}),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=q({}),{inputDefaults:T,sendFrom:U}=De("serverRoutes"),P=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=q(),$=["input","json"],H=q($[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?H.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(){z.value=!0,A.value=!0;const s=Date.now(),i=P.value==="app"?f.value.app.$fetch:$fetch;ut("server-routes:fetch",{method:I.value,sendFrom:P.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,B])=>C&&B&&!(C==="Content-Type"&&B==="application/json")).map(([C,B])=>` '${C}': '${B}'`).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=q(Pe()),G=fe({key:"",value:""}),qe=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 Pe(){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(()=>{H.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 Be(){de.value=[],y.body=[],y.query=[],y.headers=[],b.value={},k.value=g.value.length?"params":"query"}const Me=lt();return(s,i)=>{const p=Ve,R=_t,C=ct,B=Te,be=Oe,Fe=gt,ze=Ie,He=dt,pe=Ue,Ge=bt,Je=kt,se=je("tooltip");return u(),_("div",At,[c("div",Lt,[c("div",qt,[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(O(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))},O(l.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),c("div",Pt,[m(C,{"model-value":e(ne),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),c("div",Bt,[Z(m(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:i[1]||(i[1]=l=>e(Me)(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(B,{icon:"carbon:send"})]),_:1})])]),c("div",Mt,[(u(!0),_(L,null,J(e(qe),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(B,{icon:("ServerRouteTabIcons"in s?s.ServerRouteTabIcons:e(Ne))[l.slug]},null,8,["icon"]),c("div",Ft,[K(O(l.name)+" "+O(l?.length?`(${l.length})`:"")+" ",1),c("span",null,O(e(T)[l.slug]?.length?`(${e(T)[l.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[se,l.name]])),128)),zt,Ht,m(R,{modelValue:e(P),"onUpdate:modelValue":i[3]||(i[3]=l=>Y(P)?P.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:Be},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,O(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))])):N("",!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(B,{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(B,{icon:"i-carbon-save"})]),_:1})])])):N("",!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)):N("",!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"])):N("",!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(H)}),onClick:X=>H.value=l},[c("div",{class:F({op30:l!==e(H)}),"font-mono":""},O(l),3)],10,ao)),64)),ro]),e(H)==="input"?(u(),x(e(v),{key:0})):e(H)==="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"])):N("",!0)],64)):(u(),x(e(v),{key:1}))])):N("",!0),e(z)?e(A)?(u(),x(He,{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})):N("",!0),m(pe,{n:e(a).error?"orange":"green",textContent:O(e(a).statusCode)},null,8,["n","textContent"]),e(a).contentType?(u(),_("code",uo,O(e(a).contentType),1)):N("",!0),e(a).contentType==="application/json"?(u(),x(Ge,{key:2,getter:()=>({input:e(V)})},null,8,["getter"])):N("",!0),co,po,m(pe,{n:"green"},{default:w(()=>[K(O(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(ze,{key:4},{default:w(()=>[m(p,{n:"primary",onClick:_e},{default:w(()=>[m(B,{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),Mo=me({__name:"server-routes",setup(t){const r=q(!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=q(""),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 P=T.indexOf("dist");P!==-1&&(y=T[P-1],y&&U.splice(1,0,y))}U.length>0&&U[U.length-1].includes(".")&&U.pop(),U.forEach(P=>{D=I(P,D)}),D?g(D,b):j.push(b)}),j});function z(){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,P=mt,le=Oe,ie=Ct,te=xt,k=je("tooltip");return u(),_(L,null,[m(P,{"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:z},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,O(e(V).length)+" matched · ",1)):N("",!0),c("span",xo,O(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"])):N("",!0)],1024)),e(f)?N("",!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(Ne))[$]},{default:w(()=>[m(le,{modelValue:e(d)[$],"onUpdate:modelValue":H=>e(d)[$]=H,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Mo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as C}from"./C6khTLBN.js";import{d as h,bM as S,e as x,a as w,aA as B,o as n,m as s,k as a,F as i,n as N,G as u,f as o,t as $,i as _,j as m,v as f,h as V,p,_ as T}from"./CtILACI6.js";const D={key:0,relative:"","n-code-block":""},E={flex:"~ wrap","w-full":""},F=["onClick"],L=a("div",{border:"b base","flex-auto":""},null,-1),j={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},M=h({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(v){const c=v,e=S(c.codeSnippets[0]),b=x(),k=w(()=>e.value?.lang||"text");return B(()=>{c.codeSnippets.includes(e.value)||(e.value=c.codeSnippets[0])}),(l,r)=>{const y=C,d=T;return l.codeSnippets.length?(n(),s("div",D,[a("div",E,[(n(!0),s(i,null,N(l.codeSnippets,(t,g)=>(n(),s("button",{key:g,px4:"",py2:"",border:"r base",hover:"bg-active",class:u(t===o(e)?"":"border-b"),onClick:z=>e.value=t},[a("div",{class:u(t===o(e)?"":"op30"),"font-mono":""},$(t.name),3)],10,F))),128)),L]),o(e)?(n(),s(i,{key:0},[_(y,{code:o(e).code,lang:o(k),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),a("div",j,[_(d,{icon:"carbon-copy",onClick:r[0]||(r[0]=t=>o(b)(o(e).code,l.eventType||`code-snippet-${o(e).name}`))},{default:m(()=>[f(" Copy ")]),_:1}),o(e)?.docs?(n(),V(d,{key:0,to:o(e).docs,target:"_blank",icon:"carbon-catalog"},{default:m(()=>[f(" Docs ")]),_:1},8,["to"])):p("",!0)])],64)):p("",!0)])):p("",!0)}}});export{M as _};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./CtILACI6.js";import{_ as ce}from"./BOnTdqFq.js";import{_ as me}from"./C6khTLBN.js";import{_ as _e}from"./Elk39DYk.js";import{_ as pe}from"./9xk-6Ftp.js";import"./D_qxg9CZ.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Ze=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Je=e("p",{op50:""}," Enter the name of the build: ",-1),Qe=e("div",{my3:"","x-divider":""},null,-1),Xe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},an=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ee,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Ze,Je,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Qe,Xe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{an as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as G,P as ne,r as j,Q as R,bQ as T,aB as ae,w as oe,aA 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 A,m as i,F as w,n as D,t as b,G as E,ae as M,v as d,p as F,au as ue,I as ie,bg as de,af as ce,bR as pe,bS as z,_ as me,X as _e,a6 as fe,ap as ve,A as ye,U as ge,aH as he}from"./CtILACI6.js";import{_ as ke}from"./DBpZLuBg.js";import{_ as be}from"./CMLG2-wm.js";import{_ as xe}from"./BOnTdqFq.js";import{U as we}from"./vzR1DB7b.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),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},je={key:1},Ae=["onKeyup"],De=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),qe={"font-bold":""},Re=r("br",null,null,-1),Te={"text-sm":""},Ee=r("br",null,null,-1),Fe=G({__name:"StorageDetails",async setup(Q){let p,g;const C=pe(),h=ne(),x=j(""),v=j(""),s=R("storage:current",""),e=j(),y=R("storage:file:state",""),{data:K}=([p,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:B}=([p,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),H=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(H),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)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const O=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 W(){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 N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function X(){!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 I=me,Y=ke,U=_e,Z=fe,L=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{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=>A(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,D(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(U,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>A(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,D(t(O),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(U,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>A(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(W,["enter"])},null,8,["modelValue"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",Ue,[t(e).editingKey?(l(),m(U,{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",je,[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(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:E({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:X},{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(N,["ctrl"]),["enter"])},null,40,Ae)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),De,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(q,{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,D(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",qe,b(_),1),Re,r("span",Te,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}))}}}),Xe=G({__name:"storage",setup(Q){return(p,g)=>{const C=Fe,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{Xe as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as p,a0 as m,o,m as l,aa as n,h as f,p as t,I as b,c4 as h,f as v,k,t as y,l as V,G as d,a6 as B}from"./CtILACI6.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},C=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=m(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),f(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{C as _};
|