@nuxt/devtools 4.0.0-alpha.15 → 4.0.0-alpha.17
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/_nuxt/AuthRequiredPanel-znjaI7oT.js.map.json +1 -0
- package/dist/_nuxt/CodeDiff-DgjeLx6z.js.map.json +1 -0
- package/dist/_nuxt/CodeSnippets-CgfcaS4Z.js.map.json +1 -0
- package/dist/_nuxt/ComposableItem-BWQR7_fI.js.map.json +1 -0
- package/dist/_nuxt/DataSchemaButton-CqEfc2TV.js.map.json +1 -0
- package/dist/_nuxt/DataSchemaDrawer-Xj8YzNJN.js.map.json +1 -0
- package/dist/_nuxt/DurationDisplay-Dzweg1by.js.map.json +1 -0
- package/dist/_nuxt/FilepathItem-D75bkTSa.js.map.json +1 -0
- package/dist/_nuxt/HelpFab-CH7NlsDf.js.map.json +1 -0
- package/dist/_nuxt/LaunchPage-ByG-3KVi.js.map.json +1 -0
- package/dist/_nuxt/NBadge-BNJzHbtD.js.map.json +1 -0
- package/dist/_nuxt/NCard-mHVN2GYZ.js.map.json +1 -0
- package/dist/_nuxt/NCheckbox-OMIu_LTG.js.map.json +1 -0
- package/dist/_nuxt/NCodeBlock-C2Ewa6VO.js.map.json +1 -0
- package/dist/_nuxt/NDrawer-C6Opm19C.js.map.json +1 -0
- package/dist/_nuxt/NDropdown-DseEG3tA.js.map.json +1 -0
- package/dist/_nuxt/NIcon-cjduOh_B.js.map.json +1 -0
- package/dist/_nuxt/NIconTitle-C75MU0px.js.map.json +1 -0
- package/dist/_nuxt/NLink-Rsxlt1NN.js.map.json +1 -0
- package/dist/_nuxt/NMarkdown-DFwJ-ppZ.js.map.json +1 -0
- package/dist/_nuxt/NNavbar-CS-Z1Cle.js.map.json +1 -0
- package/dist/_nuxt/NPanelGrids-CEorXUWJ.js.map.json +1 -0
- package/dist/_nuxt/NSectionBlock-C7kcMkbf.js.map.json +1 -0
- package/dist/_nuxt/NSelect-geGP1eOG.js.map.json +1 -0
- package/dist/_nuxt/NSelectTabs-nUMnNQy-.js.map.json +1 -0
- package/dist/_nuxt/NSplitPane-Bh0o_t5e.js.map.json +1 -0
- package/dist/_nuxt/NTip-DRnTpLjG.js.map.json +1 -0
- package/dist/_nuxt/ServerRouteInputs-BhIrPxPN.js.map.json +1 -0
- package/dist/_nuxt/StacktraceList-B-ehJIQ-.js.map.json +1 -0
- package/dist/_nuxt/StateEditor-Yqdbqk_c.js.map.json +1 -0
- package/dist/_nuxt/__blank-BM2yOFO6.js.map.json +1 -0
- package/dist/_nuxt/analyze-build-Cemp_oBq.js.map.json +1 -0
- package/dist/_nuxt/assets-rTFAaows.js.map.json +1 -0
- package/dist/_nuxt/client-r5qP-99Q.js.map.json +1 -0
- package/dist/_nuxt/color-BL_mIEWV.js.map.json +1 -0
- package/dist/_nuxt/components-BJnHweOE.js.map.json +1 -0
- package/dist/_nuxt/constants-D9kP6ji9.js.map.json +1 -0
- package/dist/_nuxt/custom-_name_-DI8dnRDD.js.map.json +1 -0
- package/dist/_nuxt/debug-BcJZ8M6i.js.map.json +1 -0
- package/dist/_nuxt/default-Bzh4dZQ5.js.map.json +1 -0
- package/dist/_nuxt/entry-DZwY6FLS.js.map.json +1 -0
- package/dist/_nuxt/error-404-dySA7T2P.js.map.json +1 -0
- package/dist/_nuxt/error-500-2Ody89Er.js.map.json +1 -0
- package/dist/_nuxt/error-hGc4cWUU.js.map.json +1 -0
- package/dist/_nuxt/full-CvSnaO29.js.map.json +1 -0
- package/dist/_nuxt/head-BTCtirw3.js.map.json +1 -0
- package/dist/_nuxt/hooks-BVzlIVXR.js.map.json +1 -0
- package/dist/_nuxt/imports-B3k4BZF7.js.map.json +1 -0
- package/dist/_nuxt/modules-Ck915TxZ.js.map.json +1 -0
- package/dist/_nuxt/none-Df66KJph.js.map.json +1 -0
- package/dist/_nuxt/nuxt-C5VITehY.js.map.json +1 -0
- package/dist/_nuxt/nuxt-link-C-BBeF5l.js.map.json +1 -0
- package/dist/_nuxt/open-graph-ll_bjX_m.js.map.json +1 -0
- package/dist/_nuxt/overview-CyqDmfdE.js.map.json +1 -0
- package/dist/_nuxt/pages-BddDWJsZ.js.map.json +1 -0
- package/dist/_nuxt/pages-CrUWMxGz.js.map.json +1 -0
- package/dist/_nuxt/pages-DWELoQlh.js.map.json +1 -0
- package/dist/_nuxt/payload-29bFuqLh.js.map.json +1 -0
- package/dist/_nuxt/plugins-fmmRaH-S.js.map.json +1 -0
- package/dist/_nuxt/ready-BQ1fhXgL.js.map.json +1 -0
- package/dist/_nuxt/runtime-configs-iL68LNkj.js.map.json +1 -0
- package/dist/_nuxt/server-routes-Dy5_Ljmu.js.map.json +1 -0
- package/dist/_nuxt/server-tasks-CD-7IPFD.js.map.json +1 -0
- package/dist/_nuxt/settings-Qa45tU8e.js.map.json +1 -0
- package/dist/_nuxt/state-components-CksF081b.js.map.json +1 -0
- package/dist/_nuxt/state-modules-CyH4hWeN.js.map.json +1 -0
- package/dist/_nuxt/state-tabs-m1o-BX5R.js.map.json +1 -0
- package/dist/_nuxt/storage-BylO3p9r.js.map.json +1 -0
- package/dist/_nuxt/timeline-Dukbqafi.js.map.json +1 -0
- package/dist/_nuxt/utils-BfB0tRbX.js.map.json +1 -0
- package/dist/_nuxt/virtual-files-BQJM45QE.js.map.json +1 -0
- package/dist/chunks/module-main.mjs +1 -1
- package/dist/dirs.d.cts +1 -0
- package/dist/index.mjs.map.json +1 -0
- package/dist/module.d.cts +2 -0
- package/dist/module.json +1 -1
- package/dist/server.mjs.map.json +1 -0
- package/dist/types.d.cts +2 -0
- package/dist/webcomponents/index.d.cts +1 -0
- package/package.json +30 -30
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"server-routes-Dy5_Ljmu.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAA,kEAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO;EACL,MAAM,CAAC;EACP,OAAO,EAAE,SAAS,E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C,GAAG,MAAM,GAAG,CAAC,cAAc,qBAAqB,CAAC,CACnD,CAAC;OACD,GAAG;MACL,GAAG,MAAM,CAAC,QAAQ,MAAM,CAAC;KAC3B,CAAC,GAAG,GAAG,EACT,CAAC,CACH;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,UAAU;EAClB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/ServerRouteListItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ServerRouteListItem.vue","../../../../../../../../../../../node_modules/.pnpm/nuxt-nightly@5.0.0-29806258.d070492f_@oxc-project+types@0.148.0_@parcel+watcher@2.6.0_@_957e8ef33542258853c773b09ad5865f/node_modules/nuxt-nightly/dist/app/composables/cookie.js","../../../../../../../../components/ServerRouteDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ServerRouteDetails.vue","../../../../../../../../pages/modules/server-routes.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/server-routes.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderClass as _ssrRenderClass, ssrRenderStyle as _ssrRenderStyle, ssrRenderSlot as _ssrRenderSlot, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { ServerRouteInfo } from '~/../src/types'\nimport { ref } from 'vue'\nimport { useCurrentServeRoute } from '~/composables/state-routes'\nimport { getRequestMethodClass } from '~/composables/utils'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ServerRouteListItem',\n __ssrInlineRender: true,\n props: {\n item: {},\n index: { default: 0 }\n },\n setup(__props: any) {\n\n\n\nconst open = ref(true)\nconst currentServerRoute = useCurrentServeRoute()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_NBadge = _resolveComponent(\"NBadge\")!\n const _component_ServerRouteListItem = _resolveComponent(\"ServerRouteListItem\", true)!\n\n _push(`<div${\n _ssrRenderAttrs(_attrs)\n }><button flex=\"~ gap-2\" w-full items-start items-center px2 py1 hover-bg-active class=\"${\n _ssrRenderClass([{ 'bg-active': _unref(currentServerRoute) === __props.item.filepath }])\n }\" style=\"${\n _ssrRenderStyle({ paddingLeft: `calc(0.5rem + ${__props.index * 1.5}em)` })\n }\"><div class=\"${\n _ssrRenderClass({ 'w-12': !__props.item.routes })\n }\" flex-none text-left>`)\n if (__props.item.type === 'collection') {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon:chevron-right\",\n \"mb0.5\": \"\",\n \"transform-rotate\": open.value ? 90 : 0,\n transition: \"\"\n }, null, _parent))\n } else {\n _push(_ssrRenderComponent(_component_NBadge, {\n class: _unref(getRequestMethodClass)(__props.item.method || '*')\n }, null, _parent))\n }\n _push(`</div><span class=\"${_ssrRenderClass({ 'flex items-center': __props.item.routes })}\" text-sm font-mono>`)\n if (__props.item.type === 'collection') {\n _push(_ssrRenderComponent(_component_NIcon, {\n title: `${__props.item.routes?.length} routes`,\n icon: \"carbon:folder\",\n mr1: \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(` ${_ssrInterpolate(__props.item.route)}</span></button><div x-divider></div>`)\n if (open.value) {\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, () => {\n _push(`<!--[-->`)\n _ssrRenderList(__props.item.routes, (subItem) => {\n _push(_ssrRenderComponent(_component_ServerRouteListItem, {\n key: subItem.filepath,\n item: subItem,\n index: __props.index + 1\n }, null, _parent))\n })\n _push(`<!--]-->`)\n }, _push, _parent)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { ServerRouteInfo } from '~/../src/types'\nimport { ref } from 'vue'\nimport { useCurrentServeRoute } from '~/composables/state-routes'\nimport { getRequestMethodClass } from '~/composables/utils'\n\nwithDefaults(defineProps<{\n item: ServerRouteInfo\n index?: number\n}>(), {\n index: 0,\n})\n\nconst open = ref(true)\nconst currentServerRoute = useCurrentServeRoute()\n</script>\n\n<template>\n <div>\n <button\n flex=\"~ gap-2\" w-full items-start items-center px2 py1 hover-bg-active\n :class=\"[{ 'bg-active': currentServerRoute === item.filepath }]\"\n :style=\"{ paddingLeft: `calc(0.5rem + ${index * 1.5}em)` }\"\n @click=\"open = !open;currentServerRoute = item.filepath\"\n >\n <div :class=\"{ 'w-12': !item.routes }\" flex-none text-left>\n <NIcon v-if=\"item.type === 'collection'\" icon=\"carbon:chevron-right\" mb0.5 :transform-rotate=\"open ? 90 : 0\" transition />\n <NBadge\n v-else\n :class=\"getRequestMethodClass(item.method || '*')\"\n v-text=\"(item.method || '*').toUpperCase()\"\n />\n </div>\n <span :class=\"{ 'flex items-center': item.routes }\" text-sm font-mono>\n <NIcon v-if=\"item.type === 'collection'\" :title=\"`${item.routes?.length} routes`\" icon=\"carbon:folder\" mr1 />\n {{ item.route }}\n </span>\n <!-- TODO: maybe add options to create/delete/copy ... -->\n <!-- <NDropdown v-model=\"dropdown\" position=\"right\" n=\"sm\">\n <template #trigger=\"{ click }\">\n <NButton icon=\"carbon-overflow-menu-vertical\" :border=\"false\" @click.stop.prevent=\"click()\" />\n </template>\n </NDropdown> -->\n </button>\n <div x-divider />\n <slot v-if=\"open\">\n <ServerRouteListItem\n v-for=\"subItem in item.routes\"\n :key=\"subItem.filepath\"\n :item=\"subItem\"\n :index=\"index + 1\"\n />\n </slot>\n </div>\n</template>\n","import { useNuxtApp } from \"../nuxt.js\";\nimport { stateDiagnostics } from \"../diagnostics/state.js\";\nimport { useRequestEvent } from \"./ssr.js\";\nimport { customRef, getCurrentScope, nextTick, onScopeDispose, ref, watch } from \"vue\";\nimport { klona } from \"klona\";\nimport { cookieStore } from \"#build/nuxt.config.mjs\";\nimport { parse, parseSetCookie, serialize } from \"cookie-es\";\nimport { isEqual } from \"ohash\";\n//#region src/app/composables/cookie.ts\nfunction parseCookieValue(value) {\n\tif (value === \"undefined\") return;\n\ttry {\n\t\tconst parsed = JSON.parse(value);\n\t\tif (typeof parsed === \"number\" && String(parsed) !== value) return value;\n\t\treturn parsed;\n\t} catch {\n\t\treturn value;\n\t}\n}\nfunction resolveExpires(expires) {\n\treturn typeof expires === \"function\" ? expires() : expires;\n}\nconst CookieDefaults = {\n\tpath: \"/\",\n\twatch: true,\n\tdecode: (val) => val ? parseCookieValue(decodeURIComponent(val)) : val,\n\tencode: (val) => {\n\t\tif (typeof val !== \"string\" || val === \"undefined\") return encodeURIComponent(JSON.stringify(val));\n\t\ttry {\n\t\t\tif (typeof JSON.parse(val) !== \"string\") return encodeURIComponent(JSON.stringify(val));\n\t\t} catch {}\n\t\treturn encodeURIComponent(val);\n\t},\n\trefresh: false\n};\nconst store = import.meta.client && cookieStore ? globalThis.cookieStore : void 0;\nfunction useCookie(name, _opts) {\n\tconst opts = {\n\t\t...CookieDefaults,\n\t\t..._opts\n\t};\n\topts.filter ??= (key) => key === name;\n\tconst cookies = readRawCookies(opts) || {};\n\tlet delay;\n\tif (opts.maxAge !== void 0) delay = opts.maxAge * 1e3;\n\telse if (opts.expires) {\n\t\tconst expires = resolveExpires(opts.expires);\n\t\tif (expires) delay = expires.getTime() - Date.now();\n\t}\n\tconst getDelay = () => {\n\t\tif (opts.maxAge !== void 0) return opts.maxAge * 1e3;\n\t\tif (!opts.expires) return;\n\t\tconst expires = resolveExpires(opts.expires);\n\t\treturn expires ? expires.getTime() - Date.now() : void 0;\n\t};\n\tconst hasExpired = delay !== void 0 && delay <= 0;\n\tconst shouldSetInitialClientCookie = import.meta.client && !opts.readonly && (hasExpired || cookies[name] === void 0 || cookies[name] === null);\n\tconst cookieValue = klona(hasExpired ? void 0 : cookies[name] ?? opts.default?.());\n\tconst cookie = import.meta.client && (typeof opts.expires === \"function\" || delay && !hasExpired) ? cookieRef(cookieValue, delay, getDelay, opts.watch && opts.watch !== \"shallow\") : import.meta.server ? cookieServerRef(name, cookieValue) : ref(cookieValue);\n\tif (import.meta.dev && hasExpired) stateDiagnostics.NUXT_E7005({ name });\n\tif (import.meta.client) {\n\t\tlet channel = null;\n\t\ttry {\n\t\t\tif (!store && typeof BroadcastChannel !== \"undefined\") channel = new BroadcastChannel(`nuxt:cookies:${name}`);\n\t\t} catch {}\n\t\tconst callback = (force = false) => {\n\t\t\tif (!force) {\n\t\t\t\tif (opts.readonly || isEqual(cookie.value, cookies[name])) return;\n\t\t\t}\n\t\t\twriteClientCookie(name, cookie.value === null || cookie.value === void 0 ? void 0 : opts.encode(cookie.value), opts);\n\t\t\tcookies[name] = klona(cookie.value);\n\t\t\tchannel?.postMessage({ value: opts.encode(cookie.value) });\n\t\t};\n\t\tlet cookieWatcher;\n\t\tconst handleChange = (data) => {\n\t\t\tconst value = data.refresh ? readRawCookies(opts)?.[name] : opts.decode(data.value);\n\t\t\tcookieWatcher?.pause();\n\t\t\tcookie.value = value;\n\t\t\tcookies[name] = klona(value);\n\t\t\tnextTick(() => cookieWatcher?.resume());\n\t\t};\n\t\tconst hasScope = !!getCurrentScope();\n\t\tif (hasScope) onScopeDispose(() => {\n\t\t\tcookieWatcher?.pause();\n\t\t\tcallback();\n\t\t\tchannel?.close();\n\t\t});\n\t\tif (store) {\n\t\t\tconst changeHandler = (event) => {\n\t\t\t\tconst changedCookie = event.changed.find((c) => c.name === name);\n\t\t\t\tconst removedCookie = event.deleted.find((c) => c.name === name);\n\t\t\t\tif (changedCookie) handleChange({ value: changedCookie.value });\n\t\t\t\tif (removedCookie) handleChange({ value: null });\n\t\t\t};\n\t\t\tstore.addEventListener(\"change\", changeHandler);\n\t\t\tif (hasScope) onScopeDispose(() => store.removeEventListener(\"change\", changeHandler));\n\t\t} else if (channel) channel.onmessage = ({ data }) => handleChange(data);\n\t\tif (opts.watch && !opts.readonly) cookieWatcher = watch(cookie, () => callback(opts.refresh), { deep: opts.watch !== \"shallow\" });\n\t\tif (shouldSetInitialClientCookie) callback(shouldSetInitialClientCookie);\n\t} else if (import.meta.server) {\n\t\tconst nuxtApp = useNuxtApp();\n\t\tconst writeFinalCookieValue = () => {\n\t\t\tconst valueIsSame = isEqual(cookie.value, cookies[name]);\n\t\t\tif (opts.readonly || valueIsSame && !opts.refresh) return;\n\t\t\tnuxtApp._cookiesChanged ||= {};\n\t\t\tif (valueIsSame && opts.refresh && !nuxtApp._cookiesChanged[name]) return;\n\t\t\tnuxtApp._cookies ||= {};\n\t\t\tif (name in nuxtApp._cookies) {\n\t\t\t\tif (isEqual(cookie.value, nuxtApp._cookies[name])) return;\n\t\t\t\tif (import.meta.dev) stateDiagnostics.NUXT_E7006({\n\t\t\t\t\tname,\n\t\t\t\t\tprevious: opts.encode(nuxtApp._cookies[name]),\n\t\t\t\t\tnext: opts.encode(cookie.value)\n\t\t\t\t});\n\t\t\t}\n\t\t\tnuxtApp._cookies[name] = cookie.value;\n\t\t\tconst encoded = cookie.value === null || cookie.value === void 0 ? void 0 : opts.encode(cookie.value);\n\t\t\twriteServerCookie(useRequestEvent(nuxtApp), name, encoded, opts);\n\t\t};\n\t\tconst unhook = nuxtApp.hooks.hookOnce(\"app:rendered\", writeFinalCookieValue);\n\t\tnuxtApp.hooks.hookOnce(\"app:error\", () => {\n\t\t\tunhook();\n\t\t\treturn writeFinalCookieValue();\n\t\t});\n\t}\n\treturn cookie;\n}\n/** @since 3.10.0 */\nfunction refreshCookie(name) {\n\tif (import.meta.server || store || typeof BroadcastChannel === \"undefined\") return;\n\ttry {\n\t\tconst channel = new BroadcastChannel(`nuxt:cookies:${name}`);\n\t\tchannel.postMessage({ refresh: true });\n\t\tchannel.close();\n\t} catch {}\n}\nfunction readRawCookies(opts = {}) {\n\tif (import.meta.server) return parse(useRequestEvent().req.headers.get(\"cookie\") || \"\", opts);\n\telse if (import.meta.client) return parse(document.cookie, opts);\n}\nconst identityEncode = (val) => val;\nfunction toSerializeOptions(opts) {\n\tconst { encode: _encode, decode: _decode, expires, ...rest } = opts;\n\treturn {\n\t\t...rest,\n\t\texpires: resolveExpires(expires),\n\t\tencode: identityEncode\n\t};\n}\nfunction serializeCookie(name, value, opts = {}) {\n\tconst serializeOpts = toSerializeOptions(opts);\n\tif (value === void 0) return serialize(name, \"\", {\n\t\t...serializeOpts,\n\t\tmaxAge: -1\n\t});\n\treturn serialize(name, value, serializeOpts);\n}\nfunction writeClientCookie(name, value, opts = {}) {\n\tif (import.meta.client) document.cookie = serializeCookie(name, value, opts);\n}\nfunction writeServerCookie(event, name, value, opts = {}) {\n\tif (event) {\n\t\tconst serializeOpts = toSerializeOptions(opts);\n\t\tif (value !== void 0) return setResponseCookie(event, name, value, serializeOpts);\n\t\tif (parse(event.req.headers.get(\"cookie\") || \"\")[name] !== void 0) return setResponseCookie(event, name, \"\", {\n\t\t\t...serializeOpts,\n\t\t\tmaxAge: 0\n\t\t});\n\t}\n}\nfunction cookieKey(name, opts) {\n\treturn [\n\t\tname,\n\t\t(opts.domain || \"\").replace(/^\\./, \"\").toLowerCase(),\n\t\topts.path || \"/\"\n\t].join(\";\");\n}\nfunction setResponseCookie(event, name, value, opts) {\n\tconst newCookie = serialize(name, value, {\n\t\tpath: \"/\",\n\t\t...opts\n\t});\n\tconst currentCookies = event.res.headers.getSetCookie();\n\tif (currentCookies.length === 0) {\n\t\tevent.res.headers.set(\"set-cookie\", newCookie);\n\t\treturn;\n\t}\n\tconst namePrefix = `${name}=`;\n\tif (!currentCookies.some((cookie) => cookie.startsWith(namePrefix))) {\n\t\tevent.res.headers.append(\"set-cookie\", newCookie);\n\t\treturn;\n\t}\n\tconst newCookieKey = cookieKey(name, opts);\n\tevent.res.headers.delete(\"set-cookie\");\n\tfor (const cookie of currentCookies) {\n\t\tconst parsed = parseSetCookie(cookie);\n\t\tif (parsed ? cookieKey(parsed.name, parsed) === newCookieKey : cookie.startsWith(namePrefix)) continue;\n\t\tevent.res.headers.append(\"set-cookie\", cookie);\n\t}\n\tevent.res.headers.append(\"set-cookie\", newCookie);\n}\n/**\n* The maximum value allowed on a timeout delay.\n*\n* Reference: https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout#maximum_delay_value\n*/\nconst MAX_TIMEOUT_DELAY = 2147483647;\nfunction cookieRef(value, initialDelay, getDelay, shouldWatch) {\n\tlet timeout;\n\tlet unsubscribe;\n\tlet elapsed = 0;\n\tlet delay = initialDelay;\n\tconst internalRef = shouldWatch ? ref(value) : { value };\n\tif (getCurrentScope()) onScopeDispose(() => {\n\t\tunsubscribe?.();\n\t\tclearTimeout(timeout);\n\t});\n\treturn customRef((track, trigger) => {\n\t\tif (shouldWatch) unsubscribe = watch(internalRef, trigger);\n\t\tfunction scheduleTimeout() {\n\t\t\tconst currentDelay = delay;\n\t\t\tif (currentDelay === void 0) return;\n\t\t\tconst timeRemaining = currentDelay - elapsed;\n\t\t\tconst timeoutLength = timeRemaining < MAX_TIMEOUT_DELAY ? timeRemaining : MAX_TIMEOUT_DELAY;\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\telapsed += timeoutLength;\n\t\t\t\tif (elapsed < currentDelay) return scheduleTimeout();\n\t\t\t\tinternalRef.value = void 0;\n\t\t\t\ttrigger();\n\t\t\t}, timeoutLength);\n\t\t}\n\t\tfunction createExpirationTimeout() {\n\t\t\telapsed = 0;\n\t\t\tdelay = getDelay();\n\t\t\tclearTimeout(timeout);\n\t\t\tscheduleTimeout();\n\t\t}\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn internalRef.value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tcreateExpirationTimeout();\n\t\t\t\tinternalRef.value = newValue;\n\t\t\t\ttrigger();\n\t\t\t}\n\t\t};\n\t});\n}\n/**\n* Custom ref that tracks explicit cookie writes on the server.\n*\n* This is required for the `refresh` option to ensure the cookie is\n* re-written on SSR even when the value remains unchanged.\n*/\nfunction cookieServerRef(name, value) {\n\tconst internalRef = ref(value);\n\tconst nuxtApp = useNuxtApp();\n\treturn customRef((track, trigger) => {\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn internalRef.value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tnuxtApp._cookiesChanged ||= {};\n\t\t\t\tnuxtApp._cookiesChanged[name] = true;\n\t\t\t\tinternalRef.value = newValue;\n\t\t\t\ttrigger();\n\t\t\t}\n\t\t};\n\t});\n}\n//#endregion\nexport { refreshCookie, useCookie };\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, createVNode as _createVNode, resolveDirective as _resolveDirective, mergeProps as _mergeProps, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderClass as _ssrRenderClass, ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderAttr as _ssrRenderAttr, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { $Fetch } from 'ofetch'\nimport type { CodeSnippet, ServerRouteInfo, ServerRouteInput } from '~/../src/types'\nimport { createReusableTemplate, useLocalStorage, watchDebounced } from '@vueuse/core'\nimport JsonEditorVue from 'json-editor-vue'\nimport { computed, reactive, ref, watchEffect } from 'vue'\nimport { useCookie } from '#app/composables/cookie'\nimport { getColorMode, useClient } from '~/composables/client'\nimport { ComposablesDocs } from '~/composables/constants'\nimport { useOpenInEditor } from '~/composables/editor'\nimport { useServerConfig } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\nimport { telemetry } from '~/composables/telemetry'\nimport { ServerRouteTabIcons } from '../composables/constants'\nimport { useCopy } from '../composables/editor'\nimport { getRequestMethodClass } from '../composables/utils'\n\ntype RouteInputs = keyof typeof routeInputs\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ServerRouteDetails',\n __ssrInlineRender: true,\n props: {\n route: {}\n },\n emits: [\"openDefaultInput\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst [DefineDefaultInputs, UseDefaultInputs] = createReusableTemplate()\n\nconst colorMode = getColorMode()\nconst config = useServerConfig()\nconst client = useClient()\n\nconst response = reactive({\n contentType: 'text/plain',\n data: '' as any,\n statusCode: 200,\n error: undefined as Error | undefined,\n fetchTime: 0,\n})\n\nconst responseLang = computed(() => {\n if (response.contentType.includes('application/json'))\n return 'json'\n if (response.contentType.includes('text/html'))\n return 'html'\n if (response.contentType.includes('text/css'))\n return 'css'\n if (response.contentType.includes('text/javascript'))\n return 'javascript'\n if (response.contentType.includes('image') || response.contentType.includes('video'))\n return 'media'\n if (response.contentType.includes('text/xml') || response.contentType.includes('application/xml'))\n return 'xml'\n if (response.contentType.includes('application/pdf'))\n return 'pdf'\n return 'text'\n})\n\nconst responseContent = computed(() => {\n if (responseLang.value === 'json')\n return JSON.stringify(response.data, null, 2)\n if (responseLang.value === 'media' || responseLang.value === 'pdf') {\n const blob = new Blob([response.data], { type: response.contentType })\n return URL.createObjectURL(blob)\n }\n return response.data\n})\n\nconst fetching = ref(false)\nconst started = ref(false)\n\nconst openInEditor = useOpenInEditor()\n\nconst ROUTE_PARAM_RE = /((?:\\*\\*)?:\\w+)/g\n\nconst parsedRoute = computed(() => props.route.route?.split(ROUTE_PARAM_RE))\nconst paramNames = computed(() => parsedRoute.value?.filter(i => i.startsWith(':') || i.startsWith('**:')) || [])\n\nconst routeMethod = ref(props.route.method || 'GET')\nconst routeParams = ref<{ [key: string]: string }>({})\nconst routeInputs = reactive({\n query: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n body: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n headers: [{ active: true, key: 'Content-Type', value: 'application/json', type: 'string' }] as ServerRouteInput[],\n})\nconst routeInputBodyJSON = ref<any>({})\nconst {\n inputDefaults,\n sendFrom,\n} = useDevToolsOptions('serverRoutes')\n\nconst resolvedSendFrom = computed(() => {\n if (!client?.value?.app?.$fetch)\n return 'devtools'\n return sendFrom.value\n})\n\nconst methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD']\n// https://github.com/unjs/h3/blob/main/src/utils/body.ts#L19\nconst bodyPayloadMethods = ['PATCH', 'POST', 'PUT', 'DELETE']\nconst hasBody = computed(() => bodyPayloadMethods.includes(routeMethod.value.toUpperCase()))\n\nconst activeTab = ref()\n\nconst tabInputs = ['input', 'json']\nconst selectedTabInput = ref(tabInputs[0])\n\n// TODO: fix routeInputs[activeTab.value] type\nconst currentParams = computed({\n get: () => routeInputs[activeTab.value as RouteInputs],\n set: (value: any) => {\n routeInputs[activeTab.value as RouteInputs] = value\n },\n})\n\nconst parsedQuery = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.query),\n ...parseInputs(routeInputs.query),\n }\n})\nconst parsedHeader = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.headers),\n ...parseInputs(routeInputs.headers),\n }\n})\nconst parsedBody = computed(() => {\n return hasBody.value\n ? selectedTabInput.value === 'json'\n ? {\n ...parseInputs(inputDefaults.value.body),\n ...routeInputBodyJSON.value,\n }\n : {\n ...parseInputs(inputDefaults.value.body),\n ...parseInputs(routeInputs.body),\n }\n : undefined\n})\n\nconst domain = computed(() => {\n let url = window?.location.origin\n if (url.charAt(url.length - 1) === '/')\n url = url.slice(0, -1)\n return url\n})\n\nconst finalPath = computed(() => {\n let query = new URLSearchParams(parsedQuery.value).toString()\n if (query)\n query = `?${query}`\n const path = (parsedRoute.value?.map((i) => {\n if (i.startsWith(':') || i.startsWith('**:'))\n return routeParams.value[i] || i\n return i\n }).join('') || '') + query\n\n let base = config.value?.app.baseURL || ''\n if (base === './' || base === '.')\n base = ''\n if (base.endsWith('/'))\n base = base.slice(0, -1)\n return (base + path)\n})\nconst finalURL = computed(() => domain.value + finalPath.value)\n\nfunction parseInputs(inputs: ServerRouteInput[] = []) {\n const formatted = Object.fromEntries(\n inputs.filter(({ active, key, value }) => active && key && value !== undefined).map(({ key, value }) => [key, value]),\n )\n return Object.entries(formatted).length ? formatted : undefined\n}\n\nasync function fetchData() {\n started.value = true\n fetching.value = true\n\n const start = Date.now()\n\n const f = resolvedSendFrom.value === 'app'\n ? client.value!.app!.$fetch\n // eslint-disable-next-line unimport/auto-insert\n : $fetch as $Fetch\n\n telemetry('server-routes:fetch', {\n method: routeMethod.value,\n sendFrom: resolvedSendFrom.value,\n })\n\n try {\n response.data = await f(finalURL.value, {\n method: routeMethod.value.toUpperCase() as any,\n headers: parsedHeader.value,\n query: parsedQuery.value,\n body: parsedBody.value,\n onResponse({ response: res }) {\n response.contentType = (res.headers.get('content-type') || '').toString().toLowerCase().trim()\n response.statusCode = res.status\n response.error = undefined\n },\n onResponseError(res) {\n response.error = res.response._data\n response.data = res.response._data\n },\n })\n }\n catch {}\n\n fetching.value = false\n response.fetchTime = Date.now() - start\n}\n\nconst codeSnippets = computed(() => {\n const snippets: CodeSnippet[] = []\n\n const items: string[] = []\n const headers = Object.entries(parsedHeader.value)\n .filter(([key, value]) => key && value && !(key === 'Content-Type' && value === 'application/json'))\n .map(([key, value]) => ` '${key}': '${value}'`)\n .join(',\\n')\n\n if (routeMethod.value.toUpperCase() !== 'GET')\n items.push(`method: '${routeMethod.value.toUpperCase()}'`)\n if (headers)\n items.push(`headers: {\\n${headers}\\n}`)\n if (parsedBody.value)\n items.push(`body: ${JSON.stringify(parsedBody.value, null, 2)}`)\n\n const options = items.length\n ? `, {\n${items.join(',\\n').split('\\n').map(line => ` ${line}`).join('\\n')}\n}`\n : ''\n\n snippets.push({\n name: 'useFetch',\n lang: 'javascript',\n docs: ComposablesDocs.nuxt.useFetch,\n code: `const { data, pending, error, refresh } = useFetch('${finalPath.value}'${options})`,\n })\n\n snippets.push({\n name: '$fetch',\n lang: 'javascript',\n docs: ComposablesDocs.nuxt.$fetch,\n code: `await $fetch('${finalPath.value}'${options})`,\n })\n\n return snippets\n})\n\nconst cookies = ref(getCookies())\nconst newCookie = reactive({ key: '', value: '' })\n\nconst tabs = computed(() => {\n const items = []\n if (paramNames.value.length) {\n items.push({\n name: 'Params',\n slug: 'params',\n length: paramNames.value.length,\n })\n }\n items.push({\n name: 'Query',\n slug: 'query',\n length: routeInputs.query.length,\n })\n if (hasBody.value) {\n items.push({\n name: 'Body',\n slug: 'body',\n length: routeInputs.body.length,\n })\n }\n items.push({\n name: 'Headers',\n slug: 'headers',\n length: routeInputs.headers.length,\n })\n items.push({\n name: 'Cookies',\n slug: 'cookies',\n length: cookies.value.length,\n })\n items.push({\n name: 'Snippets',\n slug: 'snippet',\n })\n return items\n})\n\nfunction getCookies() {\n return document.cookie.split('; ').map((i) => {\n const [key, value] = i.split('=')\n return { key, value }\n }).filter(i => i.key)\n}\n\nfunction updateCookie(key: string, value: any) {\n if (!key)\n return\n const exist = cookies.value.find(cookie => cookie.key === key)\n const cookie = useCookie(key)\n if (exist !== undefined) {\n if (value === undefined)\n cookies.value = cookies.value.filter(cookie => cookie.key !== key)\n }\n else {\n cookies.value.push({ key, value })\n newCookie.key = ''\n newCookie.value = ''\n }\n cookie.value = value\n}\n\nwatchEffect(() => {\n if (selectedTabInput.value === 'json') {\n if (typeof routeInputBodyJSON.value === 'string')\n routeInputBodyJSON.value = JSON.parse(routeInputBodyJSON.value)\n }\n})\n\nconst savedRouteInputs = useLocalStorage<{ path: string, tab: string, inputs: any }[]>('nuxt-devtools:server-routes:inputs', () => [], {\n window: window.parent,\n})\n\nwatchDebounced([routeInputs, activeTab], () => {\n const savedEntry = savedRouteInputs.value?.find((entry: any) => entry.path === props.route.filepath)\n\n if (!savedEntry) {\n const newEntry = {\n path: props.route.filepath,\n tab: paramNames.value.length ? 'params' : 'query',\n inputs: {\n ...routeInputs,\n ...(paramNames.value.length ? { params: routeParams.value } : {}),\n },\n }\n savedRouteInputs.value.push(newEntry)\n\n if (!activeTab.value)\n activeTab.value = newEntry.tab\n }\n else {\n if (!activeTab.value)\n activeTab.value = savedEntry.tab\n\n if (savedEntry.tab !== activeTab.value)\n savedEntry.tab = activeTab.value\n\n // update routeInputs with local storage\n const { body, query, headers, params } = savedEntry.inputs\n Object.assign(routeInputs, { body, query, headers })\n routeParams.value = params\n }\n}, { immediate: true, deep: true, debounce: 500 })\n\nfunction clearSavedCache() {\n savedRouteInputs.value = []\n routeInputs.body = []\n routeInputs.query = []\n routeInputs.headers = []\n routeParams.value = {}\n activeTab.value = paramNames.value.length ? 'params' : 'query'\n}\n\nconst copy = useCopy()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NSelect = _resolveComponent(\"NSelect\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_ServerRouteInputs = _resolveComponent(\"ServerRouteInputs\")!\n const _component_CodeSnippets = _resolveComponent(\"CodeSnippets\")!\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_NLoading = _resolveComponent(\"NLoading\")!\n const _component_NBadge = _resolveComponent(\"NBadge\")!\n const _component_DataSchemaButton = _resolveComponent(\"DataSchemaButton\")!\n const _component_NCodeBlock = _resolveComponent(\"NCodeBlock\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<div${_ssrRenderAttrs(_mergeProps({\n \"h-full\": \"\",\n \"w-full\": \"\",\n flex: \"~ col\"\n }, _attrs))}><div flex=\"~ col gap-2\" n-navbar-glass flex-none p4><div flex=\"~ gap2 items-center\">`)\n if (__props.route.method) {\n _push(_ssrRenderComponent(_component_NButton, {\n class: [\"n-badge-base n-sm\", _unref(getRequestMethodClass)(routeMethod.value)],\n \"pointer-events-none\": \"\",\n \"font-mono\": \"\",\n tabindex: \"-1\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`${_ssrInterpolate(routeMethod.value.toUpperCase())}`)\n } else {\n return [\n _createTextVNode(_toDisplayString(routeMethod.value.toUpperCase()), 1)\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(_ssrRenderComponent(_component_NSelect, {\n modelValue: routeMethod.value,\n \"onUpdate:modelValue\": ($event: any) => ((routeMethod).value = $event),\n class: [\"n-badge-base n-sm\", _unref(getRequestMethodClass)(routeMethod.value)]\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<!--[-->`)\n _ssrRenderList(methods, (method) => {\n _push(`<option class=\"${\n _ssrRenderClass(_unref(getRequestMethodClass)(method))\n }\"${\n _scopeId\n }>${\n _ssrInterpolate(method.toUpperCase())\n }</option>`)\n })\n _push(`<!--]-->`)\n } else {\n return [\n (_openBlock(), _createBlock(_Fragment, null, _renderList(methods, (method) => {\n return _createVNode(\"option\", {\n key: method,\n class: _unref(getRequestMethodClass)(method)\n }, _toDisplayString(method.toUpperCase()), 3)\n }), 64))\n ]\n }\n }),\n _: 1\n }, _parent))\n }\n _push(`<div relative w-full>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n \"model-value\": finalPath.value,\n readonly: \"\",\n \"flex-auto\": \"\",\n \"font-mono\": \"\",\n p: \"x5 y2\",\n n: \"sm\"\n }, null, _parent))\n _push(`<div absolute right-2 top-1.5 flex=\"~ gap-1\">`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n title: \"Copy URL\",\n n: \"xs blue\",\n icon: \"carbon:copy\",\n border: false,\n onClick: ($event: any) => (_unref(copy)(finalURL.value, 'server-route-url'))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Copy URL')), null, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n title: \"Open in Editor\",\n icon: \"carbon-launch\",\n n: \"xs blue\",\n border: false,\n onClick: ($event: any) => (_unref(openInEditor)(__props.route.filepath))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Open in Editor')), null, _parent))\n _push(`</div></div>`)\n _push(_ssrRenderComponent(_component_NButton, {\n \"h-full\": \"\",\n n: \"primary solid\",\n onClick: fetchData\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon:send\" }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon:send\" })\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div></div><div flex=\"~ gap2 wrap\" w-full items-center px4 pb2 text-center text-sm border=\"b base\"><!--[-->`)\n _ssrRenderList(tabs.value, (tab) => {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n key: tab.slug,\n class: activeTab.value === tab.slug ? 'text-primary n-primary' : 'border-transparent shadow-none',\n onClick: ($event: any) => (activeTab.value = tab.slug)\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, tab.name)), {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: _unref(ServerRouteTabIcons)[tab.slug]\n }, null, _parent, _scopeId))\n _push(`<div class=\"hidden md:block\"${\n _scopeId\n }>${\n _ssrInterpolate(tab.name)\n } ${\n _ssrInterpolate(tab?.length ? `(${tab.length})` : '')\n } <span${\n _scopeId\n }>${\n _ssrInterpolate(_unref(inputDefaults)[tab.slug]?.length ? `(${_unref(inputDefaults)[tab.slug]!.length})` : '')\n }</span></div>`)\n } else {\n return [\n _createVNode(_component_NIcon, {\n icon: _unref(ServerRouteTabIcons)[tab.slug]\n }, null, 8, [\"icon\"]),\n _createVNode(\"div\", { class: \"hidden md:block\" }, [\n _createTextVNode(_toDisplayString(tab.name) + \" \" + _toDisplayString(tab?.length ? `(${tab.length})` : '') + \" \", 1),\n _createVNode(\"span\", null, _toDisplayString(_unref(inputDefaults)[tab.slug]?.length ? `(${_unref(inputDefaults)[tab.slug]!.length})` : ''), 1)\n ])\n ]\n }\n }),\n _: 2\n }, _parent))\n })\n _push(`<!--]--><div flex-auto></div><div text-xs op50> Send from </div>`)\n _push(_ssrRenderComponent(_component_NSelect, {\n modelValue: resolvedSendFrom.value,\n \"onUpdate:modelValue\": ($event: any) => ((resolvedSendFrom).value = $event),\n class: \"n-xs\",\n disabled: !_unref(client)?.app?.$fetch\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<option value=\"app\"${\n _scopeId\n }> App </option><option value=\"devtools\"${\n _scopeId\n }> DevTools </option>`)\n } else {\n return [\n _createVNode(\"option\", { value: \"app\" }, \" App \"),\n _createVNode(\"option\", { value: \"devtools\" }, \" DevTools \")\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n n: \"orange\",\n class: \"p-3\",\n icon: \"i-carbon-clean\",\n onClick: clearSavedCache\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Clear Inputs Saved Cache')), null, _parent))\n _push(`</div>`)\n if (activeTab.value === 'params') {\n _push(`<div border=\"b base\" items-center px4 py2 grid=\"~ cols-[max-content_1fr] gap-2\"><!--[-->`)\n _ssrRenderList(paramNames.value, (name) => {\n _push(`<!--[--><div text-right font-mono>${_ssrInterpolate(name)}</div>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: routeParams.value[name],\n \"onUpdate:modelValue\": ($event: any) => ((routeParams.value[name]) = $event),\n placeholder: name,\n \"flex-1\": \"\"\n }, null, _parent))\n _push(`<!--]-->`)\n })\n _push(`<!--]--></div>`)\n } else {\n _push(`<!---->`)\n }\n if (activeTab.value === 'cookies') {\n _push(`<div border=\"b base\" p4 flex=\"~ col gap-4\" font-mono><!--[-->`)\n _ssrRenderList(cookies.value, (cookie) => {\n _push(`<div flex=\"~ gap-4 items-center\">`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n placeholder: \"Key...\",\n \"model-value\": cookie.key,\n disabled: \"\",\n \"op-70\": \"\"\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NTextInput, {\n placeholder: \"Value...\",\n \"model-value\": cookie.value,\n \"flex-1\": \"\",\n n: \"primary\",\n onInput: ($event: any) => (updateCookie(cookie.key!, ($event as any).target?.value))\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NButton, {\n title: \"Delete\",\n n: \"red\",\n onClick: ($event: any) => (updateCookie(cookie.key!, undefined))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"i-carbon-trash-can\" }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"i-carbon-trash-can\" })\n ]\n }\n }),\n _: 2\n }, _parent))\n _push(`</div>`)\n })\n _push(`<!--]--><div flex=\"~ gap-4\">`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: newCookie.key,\n \"onUpdate:modelValue\": ($event: any) => ((newCookie.key) = $event),\n placeholder: \"Key\",\n n: \"primary\",\n \"flex-1\": \"\"\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NTextInput, {\n modelValue: newCookie.value,\n \"onUpdate:modelValue\": ($event: any) => ((newCookie.value) = $event),\n placeholder: \"Value\",\n n: \"primary\",\n \"flex-1\": \"\"\n }, null, _parent))\n _push(_ssrRenderComponent(_component_NButton, {\n title: \"Add\",\n n: \"primary\",\n onClick: ($event: any) => (updateCookie(newCookie.key, newCookie.value))\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"i-carbon-save\" }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"i-carbon-save\" })\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div></div>`)\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_unref(DefineDefaultInputs), null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_ServerRouteInputs, {\n modelValue: currentParams.value,\n \"onUpdate:modelValue\": ($event: any) => ((currentParams).value = $event),\n default: { active: true, type: 'string' },\n \"max-h-xs\": \"\",\n \"of-auto\": \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (_unref(inputDefaults)[activeTab.value]?.length) {\n _push(`<!--[--><div flex=\"~ gap2\" mb--2 items-center op50${\n _scopeId\n }><div w-5 x-divider${\n _scopeId\n }></div><div flex-none${\n _scopeId\n }> Default Inputs </div>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"i-carbon-edit\",\n border: false,\n onClick: ($event: any) => (emit('openDefaultInput'))\n }, null, _parent, _scopeId))\n _push(`<div x-divider${_scopeId}></div></div>`)\n _push(_ssrRenderComponent(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[activeTab.value],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[activeTab.value]) = $event),\n disabled: \"\",\n p0: \"\"\n }, null, _parent, _scopeId))\n _push(`<!--]-->`)\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (_unref(inputDefaults)[activeTab.value]?.length)\n ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n _createVNode(\"div\", {\n flex: \"~ gap2\",\n \"mb--2\": \"\",\n \"items-center\": \"\",\n op50: \"\"\n }, [\n _createVNode(\"div\", {\n \"w-5\": \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"div\", { \"flex-none\": \"\" }, \" Default Inputs \"),\n _createVNode(_component_NButton, {\n icon: \"i-carbon-edit\",\n border: false,\n onClick: ($event: any) => (emit('openDefaultInput'))\n }, null, 8, [\"onClick\"]),\n _createVNode(\"div\", { \"x-divider\": \"\" })\n ]),\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[activeTab.value],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[activeTab.value]) = $event),\n disabled: \"\",\n p0: \"\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_ServerRouteInputs, {\n modelValue: currentParams.value,\n \"onUpdate:modelValue\": ($event: any) => ((currentParams).value = $event),\n default: { active: true, type: 'string' },\n \"max-h-xs\": \"\",\n \"of-auto\": \"\"\n }, {\n default: _withCtx(() => [\n (_unref(inputDefaults)[activeTab.value]?.length)\n ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n _createVNode(\"div\", {\n flex: \"~ gap2\",\n \"mb--2\": \"\",\n \"items-center\": \"\",\n op50: \"\"\n }, [\n _createVNode(\"div\", {\n \"w-5\": \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"div\", { \"flex-none\": \"\" }, \" Default Inputs \"),\n _createVNode(_component_NButton, {\n icon: \"i-carbon-edit\",\n border: false,\n onClick: ($event: any) => (emit('openDefaultInput'))\n }, null, 8, [\"onClick\"]),\n _createVNode(\"div\", { \"x-divider\": \"\" })\n ]),\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[activeTab.value],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[activeTab.value]) = $event),\n disabled: \"\",\n p0: \"\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]\n }\n }),\n _: 1\n }, _parent))\n if (activeTab.value === 'snippet') {\n _push(`<div>`)\n if (codeSnippets.value.length) {\n _push(_ssrRenderComponent(_component_CodeSnippets, { \"code-snippets\": codeSnippets.value }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n } else if (currentParams.value) {\n _push(`<div border=\"b base\" relative n-code-block>`)\n if (activeTab.value === 'body') {\n _push(`<!--[--><div flex=\"~ wrap\" w-full><!--[-->`)\n _ssrRenderList(tabInputs, (item) => {\n _push(`<button px4 py2 border=\"r base\" hover=\"bg-active\" class=\"${\n _ssrRenderClass({ 'border-b': item !== selectedTabInput.value })\n }\"><div class=\"${\n _ssrRenderClass({ op30: item !== selectedTabInput.value } )\n }\" font-mono>${\n _ssrInterpolate(item)\n }</div></button>`)\n })\n _push(`<!--]--><div border=\"b base\" flex-auto></div></div>`)\n if (selectedTabInput.value === 'input') {\n _push(_ssrRenderComponent(_unref(UseDefaultInputs), null, null, _parent))\n } else if (selectedTabInput.value === 'json') {\n _push(_ssrRenderComponent(_unref(JsonEditorVue), _mergeProps({\n modelValue: routeInputBodyJSON.value,\n \"onUpdate:modelValue\": ($event: any) => ((routeInputBodyJSON).value = $event),\n class: [_unref(colorMode) === 'dark' ? 'jse-theme-dark' : 'light', \"json-editor-vue of-auto text-sm outline-none\"]\n }, _ctx.$attrs, {\n mode: ('text' as any),\n \"navigation-bar\": false,\n indentation: 2,\n \"tab-size\": 2\n }), null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n } else {\n _push(_ssrRenderComponent(_unref(UseDefaultInputs), null, null, _parent))\n }\n _push(`</div>`)\n } else {\n _push(`<!---->`)\n }\n if (!started.value) {\n _push(_ssrRenderComponent(_component_NPanelGrids, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary\",\n onClick: fetchData\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon:send\" }, null, _parent, _scopeId))\n _push(` Send request `)\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon:send\" }),\n _createTextVNode(\" Send request \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NButton, {\n n: \"primary\",\n onClick: fetchData\n }, {\n default: _withCtx(() => [\n _createVNode(_component_NIcon, { icon: \"carbon:send\" }),\n _createTextVNode(\" Send request \")\n ]),\n _: 1\n })\n ]\n }\n }),\n _: 1\n }, _parent))\n } else if (fetching.value) {\n _push(_ssrRenderComponent(_component_NLoading, {\n \"z-10\": \"\",\n \"flex-auto\": \"\",\n \"backdrop-blur\": \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Fetching... `)\n } else {\n return [\n _createTextVNode(\" Fetching... \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!--[--><div border=\"b base\" flex=\"~ gap2\" items-center px4 py2><div>Response</div>`)\n if (response.error) {\n _push(_ssrRenderComponent(_component_NBadge, { n: \"red\" }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Error `)\n } else {\n return [\n _createTextVNode(\" Error \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NBadge, {\n n: response.error ? 'orange' : 'green'\n }, null, _parent))\n if (response.contentType) {\n _push(`<code text-xs op50>${_ssrInterpolate(response.contentType)}</code>`)\n } else {\n _push(`<!---->`)\n }\n if (response.contentType === 'application/json') {\n _push(_ssrRenderComponent(_component_DataSchemaButton, {\n getter: () => ({ input: responseContent.value })\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`<div flex-auto></div><div op50> Request finished in </div>`)\n _push(_ssrRenderComponent(_component_NBadge, { n: \"green\" }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`${_ssrInterpolate(response.fetchTime)} ms `)\n } else {\n return [\n _createTextVNode(_toDisplayString(response.fetchTime) + \" ms \", 1)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div>`)\n if (responseLang.value === 'pdf') {\n _push(`<div flex-auto overflow-auto><div border=\"~ base\" h-full w-full rounded><object${_ssrRenderAttr(\"data\", responseContent.value)} type=\"application/pdf\" flex-auto width=\"100%\" height=\"100%\" rounded></object></div></div>`)\n } else if (responseLang.value !== 'media') {\n _push(_ssrRenderComponent(_component_NCodeBlock, {\n \"flex-auto\": \"\",\n \"overflow-auto\": \"\",\n \"py-2\": \"\",\n code: responseContent.value,\n lang: responseLang.value\n }, null, _parent))\n } else {\n _push(`<div flex-auto overflow-auto p4><div border=\"~ base\" rounded>`)\n if (response.contentType.includes('image')) {\n _push(`<img rounded${_ssrRenderAttr(\"src\", responseContent.value)}>`)\n } else {\n _push(`<video controls rounded><source${_ssrRenderAttr(\"src\", responseContent.value)} type=\"video/mp4\"></video>`)\n }\n _push(`</div></div>`)\n }\n _push(`<!--]-->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { $Fetch } from 'ofetch'\nimport type { CodeSnippet, ServerRouteInfo, ServerRouteInput } from '~/../src/types'\nimport { createReusableTemplate, useLocalStorage, watchDebounced } from '@vueuse/core'\nimport JsonEditorVue from 'json-editor-vue'\nimport { computed, reactive, ref, watchEffect } from 'vue'\nimport { useCookie } from '#app/composables/cookie'\nimport { getColorMode, useClient } from '~/composables/client'\nimport { ComposablesDocs } from '~/composables/constants'\nimport { useOpenInEditor } from '~/composables/editor'\nimport { useServerConfig } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\nimport { telemetry } from '~/composables/telemetry'\nimport { ServerRouteTabIcons } from '../composables/constants'\nimport { useCopy } from '../composables/editor'\nimport { getRequestMethodClass } from '../composables/utils'\n\nconst props = defineProps<{\n route: ServerRouteInfo\n}>()\n\nconst emit = defineEmits<{\n (event: 'openDefaultInput'): void\n}>()\n\nconst [DefineDefaultInputs, UseDefaultInputs] = createReusableTemplate()\n\nconst colorMode = getColorMode()\nconst config = useServerConfig()\nconst client = useClient()\n\nconst response = reactive({\n contentType: 'text/plain',\n data: '' as any,\n statusCode: 200,\n error: undefined as Error | undefined,\n fetchTime: 0,\n})\n\nconst responseLang = computed(() => {\n if (response.contentType.includes('application/json'))\n return 'json'\n if (response.contentType.includes('text/html'))\n return 'html'\n if (response.contentType.includes('text/css'))\n return 'css'\n if (response.contentType.includes('text/javascript'))\n return 'javascript'\n if (response.contentType.includes('image') || response.contentType.includes('video'))\n return 'media'\n if (response.contentType.includes('text/xml') || response.contentType.includes('application/xml'))\n return 'xml'\n if (response.contentType.includes('application/pdf'))\n return 'pdf'\n return 'text'\n})\n\nconst responseContent = computed(() => {\n if (responseLang.value === 'json')\n return JSON.stringify(response.data, null, 2)\n if (responseLang.value === 'media' || responseLang.value === 'pdf') {\n const blob = new Blob([response.data], { type: response.contentType })\n return URL.createObjectURL(blob)\n }\n return response.data\n})\n\nconst fetching = ref(false)\nconst started = ref(false)\n\nconst openInEditor = useOpenInEditor()\n\nconst ROUTE_PARAM_RE = /((?:\\*\\*)?:\\w+)/g\n\nconst parsedRoute = computed(() => props.route.route?.split(ROUTE_PARAM_RE))\nconst paramNames = computed(() => parsedRoute.value?.filter(i => i.startsWith(':') || i.startsWith('**:')) || [])\n\nconst routeMethod = ref(props.route.method || 'GET')\nconst routeParams = ref<{ [key: string]: string }>({})\nconst routeInputs = reactive({\n query: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n body: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n headers: [{ active: true, key: 'Content-Type', value: 'application/json', type: 'string' }] as ServerRouteInput[],\n})\nconst routeInputBodyJSON = ref<any>({})\nconst {\n inputDefaults,\n sendFrom,\n} = useDevToolsOptions('serverRoutes')\n\nconst resolvedSendFrom = computed(() => {\n if (!client?.value?.app?.$fetch)\n return 'devtools'\n return sendFrom.value\n})\n\nconst methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD']\n// https://github.com/unjs/h3/blob/main/src/utils/body.ts#L19\nconst bodyPayloadMethods = ['PATCH', 'POST', 'PUT', 'DELETE']\nconst hasBody = computed(() => bodyPayloadMethods.includes(routeMethod.value.toUpperCase()))\n\nconst activeTab = ref()\n\nconst tabInputs = ['input', 'json']\nconst selectedTabInput = ref(tabInputs[0])\n\n// TODO: fix routeInputs[activeTab.value] type\ntype RouteInputs = keyof typeof routeInputs\nconst currentParams = computed({\n get: () => routeInputs[activeTab.value as RouteInputs],\n set: (value: any) => {\n routeInputs[activeTab.value as RouteInputs] = value\n },\n})\n\nconst parsedQuery = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.query),\n ...parseInputs(routeInputs.query),\n }\n})\nconst parsedHeader = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.headers),\n ...parseInputs(routeInputs.headers),\n }\n})\nconst parsedBody = computed(() => {\n return hasBody.value\n ? selectedTabInput.value === 'json'\n ? {\n ...parseInputs(inputDefaults.value.body),\n ...routeInputBodyJSON.value,\n }\n : {\n ...parseInputs(inputDefaults.value.body),\n ...parseInputs(routeInputs.body),\n }\n : undefined\n})\n\nconst domain = computed(() => {\n let url = window?.location.origin\n if (url.charAt(url.length - 1) === '/')\n url = url.slice(0, -1)\n return url\n})\n\nconst finalPath = computed(() => {\n let query = new URLSearchParams(parsedQuery.value).toString()\n if (query)\n query = `?${query}`\n const path = (parsedRoute.value?.map((i) => {\n if (i.startsWith(':') || i.startsWith('**:'))\n return routeParams.value[i] || i\n return i\n }).join('') || '') + query\n\n let base = config.value?.app.baseURL || ''\n if (base === './' || base === '.')\n base = ''\n if (base.endsWith('/'))\n base = base.slice(0, -1)\n return (base + path)\n})\nconst finalURL = computed(() => domain.value + finalPath.value)\n\nfunction parseInputs(inputs: ServerRouteInput[] = []) {\n const formatted = Object.fromEntries(\n inputs.filter(({ active, key, value }) => active && key && value !== undefined).map(({ key, value }) => [key, value]),\n )\n return Object.entries(formatted).length ? formatted : undefined\n}\n\nasync function fetchData() {\n started.value = true\n fetching.value = true\n\n const start = Date.now()\n\n const f = resolvedSendFrom.value === 'app'\n ? client.value!.app!.$fetch\n // eslint-disable-next-line unimport/auto-insert\n : $fetch as $Fetch\n\n telemetry('server-routes:fetch', {\n method: routeMethod.value,\n sendFrom: resolvedSendFrom.value,\n })\n\n try {\n response.data = await f(finalURL.value, {\n method: routeMethod.value.toUpperCase() as any,\n headers: parsedHeader.value,\n query: parsedQuery.value,\n body: parsedBody.value,\n onResponse({ response: res }) {\n response.contentType = (res.headers.get('content-type') || '').toString().toLowerCase().trim()\n response.statusCode = res.status\n response.error = undefined\n },\n onResponseError(res) {\n response.error = res.response._data\n response.data = res.response._data\n },\n })\n }\n catch {}\n\n fetching.value = false\n response.fetchTime = Date.now() - start\n}\n\nconst codeSnippets = computed(() => {\n const snippets: CodeSnippet[] = []\n\n const items: string[] = []\n const headers = Object.entries(parsedHeader.value)\n .filter(([key, value]) => key && value && !(key === 'Content-Type' && value === 'application/json'))\n .map(([key, value]) => ` '${key}': '${value}'`)\n .join(',\\n')\n\n if (routeMethod.value.toUpperCase() !== 'GET')\n items.push(`method: '${routeMethod.value.toUpperCase()}'`)\n if (headers)\n items.push(`headers: {\\n${headers}\\n}`)\n if (parsedBody.value)\n items.push(`body: ${JSON.stringify(parsedBody.value, null, 2)}`)\n\n const options = items.length\n ? `, {\n${items.join(',\\n').split('\\n').map(line => ` ${line}`).join('\\n')}\n}`\n : ''\n\n snippets.push({\n name: 'useFetch',\n lang: 'javascript',\n docs: ComposablesDocs.nuxt.useFetch,\n code: `const { data, pending, error, refresh } = useFetch('${finalPath.value}'${options})`,\n })\n\n snippets.push({\n name: '$fetch',\n lang: 'javascript',\n docs: ComposablesDocs.nuxt.$fetch,\n code: `await $fetch('${finalPath.value}'${options})`,\n })\n\n return snippets\n})\n\nconst cookies = ref(getCookies())\nconst newCookie = reactive({ key: '', value: '' })\n\nconst tabs = computed(() => {\n const items = []\n if (paramNames.value.length) {\n items.push({\n name: 'Params',\n slug: 'params',\n length: paramNames.value.length,\n })\n }\n items.push({\n name: 'Query',\n slug: 'query',\n length: routeInputs.query.length,\n })\n if (hasBody.value) {\n items.push({\n name: 'Body',\n slug: 'body',\n length: routeInputs.body.length,\n })\n }\n items.push({\n name: 'Headers',\n slug: 'headers',\n length: routeInputs.headers.length,\n })\n items.push({\n name: 'Cookies',\n slug: 'cookies',\n length: cookies.value.length,\n })\n items.push({\n name: 'Snippets',\n slug: 'snippet',\n })\n return items\n})\n\nfunction getCookies() {\n return document.cookie.split('; ').map((i) => {\n const [key, value] = i.split('=')\n return { key, value }\n }).filter(i => i.key)\n}\n\nfunction updateCookie(key: string, value: any) {\n if (!key)\n return\n const exist = cookies.value.find(cookie => cookie.key === key)\n const cookie = useCookie(key)\n if (exist !== undefined) {\n if (value === undefined)\n cookies.value = cookies.value.filter(cookie => cookie.key !== key)\n }\n else {\n cookies.value.push({ key, value })\n newCookie.key = ''\n newCookie.value = ''\n }\n cookie.value = value\n}\n\nwatchEffect(() => {\n if (selectedTabInput.value === 'json') {\n if (typeof routeInputBodyJSON.value === 'string')\n routeInputBodyJSON.value = JSON.parse(routeInputBodyJSON.value)\n }\n})\n\nconst savedRouteInputs = useLocalStorage<{ path: string, tab: string, inputs: any }[]>('nuxt-devtools:server-routes:inputs', () => [], {\n window: window.parent,\n})\n\nwatchDebounced([routeInputs, activeTab], () => {\n const savedEntry = savedRouteInputs.value?.find((entry: any) => entry.path === props.route.filepath)\n\n if (!savedEntry) {\n const newEntry = {\n path: props.route.filepath,\n tab: paramNames.value.length ? 'params' : 'query',\n inputs: {\n ...routeInputs,\n ...(paramNames.value.length ? { params: routeParams.value } : {}),\n },\n }\n savedRouteInputs.value.push(newEntry)\n\n if (!activeTab.value)\n activeTab.value = newEntry.tab\n }\n else {\n if (!activeTab.value)\n activeTab.value = savedEntry.tab\n\n if (savedEntry.tab !== activeTab.value)\n savedEntry.tab = activeTab.value\n\n // update routeInputs with local storage\n const { body, query, headers, params } = savedEntry.inputs\n Object.assign(routeInputs, { body, query, headers })\n routeParams.value = params\n }\n}, { immediate: true, deep: true, debounce: 500 })\n\nfunction clearSavedCache() {\n savedRouteInputs.value = []\n routeInputs.body = []\n routeInputs.query = []\n routeInputs.headers = []\n routeParams.value = {}\n activeTab.value = paramNames.value.length ? 'params' : 'query'\n}\n\nconst copy = useCopy()\n</script>\n\n<template>\n <div h-full w-full flex=\"~ col\">\n <div flex=\"~ col gap-2\" n-navbar-glass flex-none p4>\n <div flex=\"~ gap2 items-center\">\n <NButton\n v-if=\"route.method\"\n class=\"n-badge-base n-sm\"\n :class=\"getRequestMethodClass(routeMethod)\"\n pointer-events-none font-mono tabindex=\"-1\"\n >\n {{ routeMethod.toUpperCase() }}\n </NButton>\n <NSelect\n v-else\n v-model=\"routeMethod\"\n class=\"n-badge-base n-sm\"\n :class=\"getRequestMethodClass(routeMethod)\"\n >\n <option v-for=\"method of methods\" :key=\"method\" :class=\"getRequestMethodClass(method)\">\n {{ method.toUpperCase() }}\n </option>\n </NSelect>\n <div relative w-full>\n <NTextInput\n :model-value=\"finalPath\"\n readonly flex-auto font-mono\n p=\"x5 y2\"\n n=\"sm\"\n />\n <div absolute right-2 top-1.5 flex=\"~ gap-1\">\n <NButton\n v-tooltip=\"'Copy URL'\"\n title=\"Copy URL\"\n n=\"xs blue\"\n icon=\"carbon:copy\"\n :border=\"false\"\n @click=\"copy(finalURL, 'server-route-url')\"\n />\n <NButton\n v-tooltip=\"'Open in Editor'\"\n title=\"Open in Editor\"\n icon=\"carbon-launch\"\n n=\"xs blue\"\n :border=\"false\"\n @click=\"openInEditor(route.filepath)\"\n />\n </div>\n </div>\n <NButton h-full n=\"primary solid\" @click=\"fetchData\">\n <NIcon icon=\"carbon:send\" />\n </NButton>\n </div>\n </div>\n\n <div flex=\"~ gap2 wrap\" w-full items-center px4 pb2 text-center text-sm border=\"b base\">\n <NButton\n v-for=\"tab of tabs\"\n :key=\"tab.slug\"\n v-tooltip=\"tab.name\"\n :class=\"activeTab === tab.slug ? 'text-primary n-primary' : 'border-transparent shadow-none'\"\n @click=\"activeTab = tab.slug\"\n >\n <NIcon :icon=\"ServerRouteTabIcons[tab.slug]\" />\n <div class=\"hidden md:block\">\n {{ tab.name }}\n {{ tab?.length ? `(${tab.length})` : '' }}\n <span>\n {{ inputDefaults[tab.slug]?.length ? `(${inputDefaults[tab.slug]!.length})` : '' }}\n </span>\n </div>\n </NButton>\n <div flex-auto />\n <div text-xs op50>\n Send from\n </div>\n <NSelect\n v-model=\"resolvedSendFrom\"\n class=\"n-xs\"\n :disabled=\"!client?.app?.$fetch\"\n >\n <option value=\"app\">\n App\n </option>\n <option value=\"devtools\">\n DevTools\n </option>\n </NSelect>\n <NButton v-tooltip=\"'Clear Inputs Saved Cache'\" n=\"orange\" class=\"p-3\" icon=\"i-carbon-clean\" @click=\"clearSavedCache\" />\n </div>\n <div\n v-if=\"activeTab === 'params'\"\n border=\"b base\" items-center px4 py2\n grid=\"~ cols-[max-content_1fr] gap-2\"\n >\n <template v-for=\"name in paramNames\" :key=\"name\">\n <div text-right font-mono>\n {{ name }}\n </div>\n <NTextInput\n v-model=\"routeParams[name]\"\n :placeholder=\"name\"\n flex-1\n />\n </template>\n </div>\n <div\n v-if=\"activeTab === 'cookies'\"\n border=\"b base\" p4 flex=\"~ col gap-4\" font-mono\n >\n <div v-for=\"cookie in cookies\" :key=\"cookie.key\" flex=\"~ gap-4 items-center\">\n <NTextInput\n placeholder=\"Key...\"\n :model-value=\"cookie.key\"\n disabled op-70\n />\n <NTextInput\n placeholder=\"Value...\"\n :model-value=\"cookie.value\"\n flex-1 n=\"primary\"\n @input=\"updateCookie(cookie.key!, ($event as any).target?.value)\"\n />\n <NButton title=\"Delete\" n=\"red\" @click=\"updateCookie(cookie.key!, undefined)\">\n <NIcon icon=\"i-carbon-trash-can\" />\n </NButton>\n </div>\n <div flex=\"~ gap-4\">\n <NTextInput\n v-model=\"newCookie.key\"\n placeholder=\"Key\"\n n=\"primary\" flex-1\n />\n <NTextInput\n v-model=\"newCookie.value\"\n placeholder=\"Value\"\n n=\"primary\" flex-1\n />\n <NButton title=\"Add\" n=\"primary\" @click=\"updateCookie(newCookie.key, newCookie.value)\">\n <NIcon icon=\"i-carbon-save\" />\n </NButton>\n </div>\n </div>\n <DefineDefaultInputs>\n <ServerRouteInputs v-model=\"currentParams\" :default=\"{ active: true, type: 'string' }\" max-h-xs of-auto>\n <template v-if=\"inputDefaults[activeTab]?.length\">\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div w-5 x-divider />\n <div flex-none>\n Default Inputs\n </div>\n <NButton\n icon=\"i-carbon-edit\"\n :border=\"false\"\n @click=\"emit('openDefaultInput')\"\n />\n <div x-divider />\n </div>\n <ServerRouteInputs v-model=\"inputDefaults[activeTab]\" disabled p0 />\n </template>\n </ServerRouteInputs>\n </DefineDefaultInputs>\n <div v-if=\"activeTab === 'snippet'\">\n <CodeSnippets\n v-if=\"codeSnippets.length\"\n :code-snippets=\"codeSnippets\"\n />\n </div>\n <div v-else-if=\"currentParams\" border=\"b base\" relative n-code-block>\n <template v-if=\"activeTab === 'body'\">\n <div flex=\"~ wrap\" w-full>\n <template v-for=\"item of tabInputs\" :key=\"item\">\n <button\n px4 py2 border=\"r base\"\n hover=\"bg-active\"\n :class=\"{ 'border-b': item !== selectedTabInput }\"\n @click=\"selectedTabInput = item\"\n >\n <div :class=\"{ op30: item !== selectedTabInput } \" font-mono>\n {{ item }}\n </div>\n </button>\n </template>\n <div border=\"b base\" flex-auto />\n </div>\n\n <UseDefaultInputs v-if=\"selectedTabInput === 'input'\" />\n <!-- TODO: Mode does not have correct type, remove when upstream fixes -->\n <JsonEditorVue\n v-else-if=\"selectedTabInput === 'json'\"\n v-model=\"routeInputBodyJSON\"\n :class=\"colorMode === 'dark' ? 'jse-theme-dark' : 'light'\"\n class=\"json-editor-vue of-auto text-sm outline-none\"\n v-bind=\"$attrs\"\n :mode=\"('text' as any)\"\n :navigation-bar=\"false\"\n :indentation=\"2\"\n :tab-size=\"2\"\n />\n </template>\n <UseDefaultInputs v-else />\n </div>\n\n <NPanelGrids v-if=\"!started\">\n <NButton n=\"primary\" @click=\"fetchData\">\n <NIcon icon=\"carbon:send\" />\n Send request\n </NButton>\n </NPanelGrids>\n <NLoading v-else-if=\"fetching\" z-10 flex-auto backdrop-blur>\n Fetching...\n </NLoading>\n <template v-else>\n <div border=\"b base\" flex=\"~ gap2\" items-center px4 py2>\n <div>Response</div>\n <NBadge\n v-if=\"response.error\"\n n=\"red\"\n >\n Error\n </NBadge>\n <NBadge :n=\"response.error ? 'orange' : 'green'\" v-text=\"response.statusCode\" />\n <code v-if=\"response.contentType\" text-xs op50>\n {{ response.contentType }}\n </code>\n <DataSchemaButton\n v-if=\"response.contentType === 'application/json'\"\n :getter=\"() => ({ input: responseContent })\"\n />\n <div flex-auto />\n <div op50>\n Request finished in\n </div>\n <NBadge n=\"green\">\n {{ response.fetchTime }} ms\n </NBadge>\n </div>\n <div v-if=\"responseLang === 'pdf'\" flex-auto overflow-auto>\n <div border=\"~ base\" h-full w-full rounded>\n <object :data=\"responseContent\" type=\"application/pdf\" flex-auto width=\"100%\" height=\"100%\" rounded />\n </div>\n </div>\n <!-- Rich response data -->\n <NCodeBlock\n v-else-if=\"responseLang !== 'media'\"\n flex-auto overflow-auto py-2\n :code=\"responseContent\"\n :lang=\"responseLang\"\n />\n <div v-else flex-auto overflow-auto p4>\n <div border=\"~ base\" rounded>\n <img v-if=\"response.contentType.includes('image')\" rounded :src=\"responseContent\">\n <video v-else controls rounded>\n <source :src=\"responseContent\" type=\"video/mp4\">\n </video>\n </div>\n </div>\n </template>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, withDirectives as _withDirectives, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, KeepAlive as _KeepAlive } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { ServerRouteInfo } from '~/../../src/types'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { ServerRouteTabIcons } from '~/composables/constants'\nimport { useServerRoutes } from '~/composables/state'\nimport { useCurrentServeRoute } from '~/composables/state-routes'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'server-routes',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'carbon-cloud',\n title: 'Server Routes',\n layout: 'full',\n category: 'server',\n show() {\n const routes = useServerRoutes()\n return () => routes.value?.length\n },\n})\n\nconst NON_WORD_CHARS_RE = /\\W/g\n\nconst inputDefaultsDrawer = ref(false)\n\nconst serverRoutes = useServerRoutes()\nconst currentServerRoute = useCurrentServeRoute()\n\nconst { selectedRoute, view, inputDefaults } = useDevToolsOptions('serverRoutes')\n\nconst selected = computed(() => {\n if (!currentServerRoute.value && selectedRoute.value)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n currentServerRoute.value = selectedRoute.value.filepath\n\n const route = serverRoutes.value?.find(i => i.filepath === currentServerRoute.value)\n\n if (currentServerRoute.value !== selectedRoute.value?.filepath && route)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n selectedRoute.value = route\n\n return route\n})\n\nconst search = ref('')\nconst fuse = computed(() => new Fuse(serverRoutes.value || [], {\n keys: [\n 'method',\n 'route',\n ],\n shouldSort: true,\n}))\n\nconst filtered = computed(() => {\n const result = !serverRoutes.value\n ? []\n : !search.value\n ? serverRoutes.value\n : fuse.value.search(search.value).map(i => i.item)\n return result\n})\n\nconst filterByCollection = computed(() => {\n const collections: ServerRouteInfo[] = []\n\n const addRouteToCollection = (collection: ServerRouteInfo, route: ServerRouteInfo) => {\n collection.routes = collection.routes || []\n collection.routes.push(route)\n }\n\n const findOrCreateCollection = (routeName: string, parentCollection?: ServerRouteInfo) => {\n const existingCollection = parentCollection\n ? parentCollection.routes?.find(r => r.route === routeName)\n : collections.find(c => c.route === routeName)\n\n if (existingCollection)\n return existingCollection\n\n const newCollection: ServerRouteInfo = {\n route: routeName,\n filepath: routeName.replace(NON_WORD_CHARS_RE, '-').toLowerCase(),\n type: 'collection',\n routes: [],\n }\n\n if (parentCollection)\n addRouteToCollection(parentCollection, newCollection)\n\n else\n collections.push(newCollection)\n\n return newCollection\n }\n\n filtered.value.forEach((item) => {\n let prefix: string | undefined\n let parentCollection: ServerRouteInfo | undefined\n\n const filepathParts = item.filepath.split('/')\n const collectionNames = filepathParts.slice(filepathParts.indexOf('server') + 1)\n\n if (item.type === 'runtime') {\n collectionNames[0] = 'runtime'\n const indexOfDist = filepathParts.indexOf('dist')\n if (indexOfDist !== -1) {\n prefix = filepathParts[indexOfDist - 1]\n if (prefix)\n collectionNames.splice(1, 0, prefix)\n }\n }\n\n if (collectionNames.length > 0 && collectionNames.at(-1)!.includes('.'))\n collectionNames.pop()\n\n collectionNames.forEach((collectionName) => {\n parentCollection = findOrCreateCollection(collectionName, parentCollection)\n })\n\n if (parentCollection)\n addRouteToCollection(parentCollection, item)\n else\n collections.push(item)\n })\n\n return collections\n})\n\nfunction toggleView() {\n view.value = view.value === 'tree' ? 'list' : 'tree'\n}\n\nfunction capitalize(str: string) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NSplitPane = _resolveComponent(\"NSplitPane\")!\n const _component_NNavbar = _resolveComponent(\"NNavbar\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_ServerRouteListItem = _resolveComponent(\"ServerRouteListItem\")!\n const _component_ServerRouteDetails = _resolveComponent(\"ServerRouteDetails\")!\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_NCard = _resolveComponent(\"NCard\")!\n const _component_NDrawer = _resolveComponent(\"NDrawer\")!\n const _component_NSectionBlock = _resolveComponent(\"NSectionBlock\")!\n const _component_ServerRouteInputs = _resolveComponent(\"ServerRouteInputs\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<!--[-->`)\n _push(_ssrRenderComponent(_component_NSplitPane, { \"storage-key\": \"tab-server-routes\" }, {\n left: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NNavbar, {\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Toggle View')), null, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Default Inputs')), null, _parent, _scopeId))\n } else {\n return [\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [_directive_tooltip, 'Toggle View']\n ]),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, null, 8, [\"onClick\"]), [\n [_directive_tooltip, 'Default Inputs']\n ])\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ gap1\" text-sm${_scopeId}>`)\n if (search.value) {\n _push(`<span op50${\n _scopeId\n }>${\n _ssrInterpolate(filtered.value.length)\n } matched · </span>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<span op50${\n _scopeId\n }>${\n _ssrInterpolate(_unref(serverRoutes)?.length)\n } routes in total</span></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ gap1\",\n \"text-sm\": \"\"\n }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", {\n key: 0,\n op50: \"\"\n }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", { op50: \"\" }, _toDisplayString(_unref(serverRoutes)?.length) + \" routes in total\", 1)\n ])\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`<!--[-->`)\n _ssrRenderList(_unref(view) === 'tree' ? filterByCollection.value : filtered.value, (item) => {\n _push(_ssrRenderComponent(_component_ServerRouteListItem, {\n key: item.filepath,\n item: item\n }, null, _parent, _scopeId))\n })\n _push(`<!--]-->`)\n } else {\n return [\n _createVNode(_component_NNavbar, {\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx(() => [\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [_directive_tooltip, 'Toggle View']\n ]),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, null, 8, [\"onClick\"]), [\n [_directive_tooltip, 'Default Inputs']\n ])\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ gap1\",\n \"text-sm\": \"\"\n }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", {\n key: 0,\n op50: \"\"\n }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", { op50: \"\" }, _toDisplayString(_unref(serverRoutes)?.length) + \" routes in total\", 1)\n ])\n ]),\n _: 1\n }, 8, [\"search\", \"onUpdate:search\"]),\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(view) === 'tree' ? filterByCollection.value : filtered.value, (item) => {\n return (_openBlock(), _createBlock(_component_ServerRouteListItem, {\n key: item.filepath,\n item: item\n }, null, 8, [\"item\"]))\n }), 128))\n ]\n }\n }),\n right: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(``)\n if (selected.value) {\n _push(_ssrRenderComponent(_component_ServerRouteDetails, {\n key: selected.value.filepath,\n route: selected.value,\n onOpenDefaultInput: ($event: any) => (inputDefaultsDrawer.value = true)\n }, null, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n if (!selected.value) {\n _push(_ssrRenderComponent(_component_NPanelGrids, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NCard, {\n px6: \"\",\n py2: \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Select a route to start</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Select a route to start\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NCard, {\n px6: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Select a route to start\")\n ]),\n _: 1\n })\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (_openBlock(), _createBlock(_KeepAlive, { max: 10 }, [\n (selected.value)\n ? (_openBlock(), _createBlock(_component_ServerRouteDetails, {\n key: selected.value.filepath,\n route: selected.value,\n onOpenDefaultInput: ($event: any) => (inputDefaultsDrawer.value = true)\n }, null, 8, [\"route\", \"onOpenDefaultInput\"]))\n : _createCommentVNode(\"\", true)\n ], 1024)),\n (!selected.value)\n ? (_openBlock(), _createBlock(_component_NPanelGrids, { key: 0 }, {\n default: _withCtx(() => [\n _createVNode(_component_NCard, {\n px6: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Select a route to start\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NDrawer, {\n modelValue: inputDefaultsDrawer.value,\n \"onUpdate:modelValue\": ($event: any) => ((inputDefaultsDrawer).value = $event),\n \"auto-close\": \"\",\n \"max-w-xl\": \"\",\n \"min-w-xl\": \"\",\n onClose: ($event: any) => (inputDefaultsDrawer.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div${\n _scopeId\n }><div p4 border=\"b base\"${\n _scopeId\n }><span text-lg${\n _scopeId\n }>Default Inputs</span><br${\n _scopeId\n }><span text-black op50 dark:text-white${\n _scopeId\n }>Merged as default for every request in DevTools</span></div><!--[-->`)\n _ssrRenderList(Object.keys(_unref(inputDefaults)), (tab) => {\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n key: tab,\n text: `${capitalize(tab)} ${_unref(inputDefaults)[tab]?.length ? `(${_unref(inputDefaults)[tab]!.length})` : ''}`,\n padding: false,\n icon: _unref(ServerRouteTabIcons)[tab]\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[tab],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[tab]) = $event),\n py0: \"\",\n default: { active: true, type: 'string' }\n }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[tab],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[tab]) = $event),\n py0: \"\",\n default: { active: true, type: 'string' }\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]\n }\n }),\n _: 2\n }, _parent, _scopeId))\n })\n _push(`<!--]--></div>`)\n } else {\n return [\n _createVNode(\"div\", null, [\n _createVNode(\"div\", {\n p4: \"\",\n border: \"b base\"\n }, [\n _createVNode(\"span\", { \"text-lg\": \"\" }, \"Default Inputs\"),\n _createVNode(\"br\"),\n _createVNode(\"span\", {\n \"text-black\": \"\",\n op50: \"\",\n \"dark:text-white\": \"\"\n }, \"Merged as default for every request in DevTools\")\n ]),\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(Object.keys(_unref(inputDefaults)), (tab) => {\n return (_openBlock(), _createBlock(_component_NSectionBlock, {\n key: tab,\n text: `${capitalize(tab)} ${_unref(inputDefaults)[tab]?.length ? `(${_unref(inputDefaults)[tab]!.length})` : ''}`,\n padding: false,\n icon: _unref(ServerRouteTabIcons)[tab]\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[tab],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[tab]) = $event),\n py0: \"\",\n default: { active: true, type: 'string' }\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]),\n _: 2\n }, 1032, [\"text\", \"icon\"]))\n }), 128))\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { ServerRouteInfo } from '~/../../src/types'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport { ServerRouteTabIcons } from '~/composables/constants'\nimport { useServerRoutes } from '~/composables/state'\nimport { useCurrentServeRoute } from '~/composables/state-routes'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\ndefinePageMeta({\n icon: 'carbon-cloud',\n title: 'Server Routes',\n layout: 'full',\n category: 'server',\n show() {\n const routes = useServerRoutes()\n return () => routes.value?.length\n },\n})\n\nconst NON_WORD_CHARS_RE = /\\W/g\n\nconst inputDefaultsDrawer = ref(false)\n\nconst serverRoutes = useServerRoutes()\nconst currentServerRoute = useCurrentServeRoute()\n\nconst { selectedRoute, view, inputDefaults } = useDevToolsOptions('serverRoutes')\n\nconst selected = computed(() => {\n if (!currentServerRoute.value && selectedRoute.value)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n currentServerRoute.value = selectedRoute.value.filepath\n\n const route = serverRoutes.value?.find(i => i.filepath === currentServerRoute.value)\n\n if (currentServerRoute.value !== selectedRoute.value?.filepath && route)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n selectedRoute.value = route\n\n return route\n})\n\nconst search = ref('')\nconst fuse = computed(() => new Fuse(serverRoutes.value || [], {\n keys: [\n 'method',\n 'route',\n ],\n shouldSort: true,\n}))\n\nconst filtered = computed(() => {\n const result = !serverRoutes.value\n ? []\n : !search.value\n ? serverRoutes.value\n : fuse.value.search(search.value).map(i => i.item)\n return result\n})\n\nconst filterByCollection = computed(() => {\n const collections: ServerRouteInfo[] = []\n\n const addRouteToCollection = (collection: ServerRouteInfo, route: ServerRouteInfo) => {\n collection.routes = collection.routes || []\n collection.routes.push(route)\n }\n\n const findOrCreateCollection = (routeName: string, parentCollection?: ServerRouteInfo) => {\n const existingCollection = parentCollection\n ? parentCollection.routes?.find(r => r.route === routeName)\n : collections.find(c => c.route === routeName)\n\n if (existingCollection)\n return existingCollection\n\n const newCollection: ServerRouteInfo = {\n route: routeName,\n filepath: routeName.replace(NON_WORD_CHARS_RE, '-').toLowerCase(),\n type: 'collection',\n routes: [],\n }\n\n if (parentCollection)\n addRouteToCollection(parentCollection, newCollection)\n\n else\n collections.push(newCollection)\n\n return newCollection\n }\n\n filtered.value.forEach((item) => {\n let prefix: string | undefined\n let parentCollection: ServerRouteInfo | undefined\n\n const filepathParts = item.filepath.split('/')\n const collectionNames = filepathParts.slice(filepathParts.indexOf('server') + 1)\n\n if (item.type === 'runtime') {\n collectionNames[0] = 'runtime'\n const indexOfDist = filepathParts.indexOf('dist')\n if (indexOfDist !== -1) {\n prefix = filepathParts[indexOfDist - 1]\n if (prefix)\n collectionNames.splice(1, 0, prefix)\n }\n }\n\n if (collectionNames.length > 0 && collectionNames.at(-1)!.includes('.'))\n collectionNames.pop()\n\n collectionNames.forEach((collectionName) => {\n parentCollection = findOrCreateCollection(collectionName, parentCollection)\n })\n\n if (parentCollection)\n addRouteToCollection(parentCollection, item)\n else\n collections.push(item)\n })\n\n return collections\n})\n\nfunction toggleView() {\n view.value = view.value === 'tree' ? 'list' : 'tree'\n}\n\nfunction capitalize(str: string) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n</script>\n\n<template>\n <NSplitPane storage-key=\"tab-server-routes\">\n <template #left>\n <NNavbar v-model:search=\"search\" pb2>\n <template #actions>\n <NButton\n v-tooltip=\"'Toggle View'\"\n text-lg\n :icon=\"view === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt'\"\n title=\"Toggle view\"\n :border=\"false\"\n @click=\"toggleView\"\n />\n <NButton\n v-tooltip=\"'Default Inputs'\"\n text-lg\n icon=\"i-carbon-cics-sit-overrides\"\n title=\"Default Inputs\"\n :border=\"false\"\n @click=\"inputDefaultsDrawer = !inputDefaultsDrawer\"\n />\n </template>\n <div flex=\"~ gap1\" text-sm>\n <span v-if=\"search\" op50>{{ filtered.length }} matched · </span>\n <span op50>{{ serverRoutes?.length }} routes in total</span>\n </div>\n </NNavbar>\n\n <ServerRouteListItem\n v-for=\"item in view === 'tree' ? filterByCollection : filtered\"\n :key=\"item.filepath\"\n :item=\"item\"\n />\n </template>\n <template #right>\n <KeepAlive :max=\"10\">\n <ServerRouteDetails\n v-if=\"selected\"\n :key=\"selected.filepath\"\n :route=\"selected\"\n @open-default-input=\"inputDefaultsDrawer = true\"\n />\n </KeepAlive>\n <NPanelGrids v-if=\"!selected\">\n <NCard px6 py2>\n <span op75>Select a route to start</span>\n </NCard>\n </NPanelGrids>\n </template>\n </NSplitPane>\n <NDrawer v-model=\"inputDefaultsDrawer\" auto-close max-w-xl min-w-xl @close=\"inputDefaultsDrawer = false\">\n <div>\n <div p4 border=\"b base\">\n <span text-lg>Default Inputs</span>\n <br>\n <span text-black op50 dark:text-white>Merged as default for every request in DevTools</span>\n </div>\n <NSectionBlock\n v-for=\"tab of Object.keys(inputDefaults)\"\n :key=\"tab\"\n :text=\"`${capitalize(tab)} ${inputDefaults[tab]?.length ? `(${inputDefaults[tab]!.length})` : ''}`\"\n :padding=\"false\"\n :icon=\"ServerRouteTabIcons[tab]\"\n >\n <ServerRouteInputs v-model=\"inputDefaults[tab]\" py0 :default=\"{ active: true, type: 'string' }\" />\n </NSectionBlock>\n </div>\n </NDrawer>\n</template>\n"],"version":3}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"server-tasks-CD-7IPFD.js","mappings":";;;;;;;;;;;;;;;;;;;;AAUA,IAAA,6DAA4B,8BAAiB;CAC3C,QAAQ;CACR,mBAAmB;CACnB,OAAO,EACL,YAAY,CAAC,EACf;CACA,MAAM,SAAc;EAEtB,MAAM,QAAQ;EAEd,MAAM,mBAAmB,qBAAqB;EAC9C,MAAM,OAAO,IAAI,IAAI;EAErB,MAAM,oBAAoB,eAAe;GACvC,OAAO,UAAU,SAAS,MAAM,WAAW,IAAI;EACjD,CAAC;EAED,QAAQ,MAAU,OAAW,SAAa,WAAgB;GACxD,MAAM,mBAAmB;GACzB,MAAM,oBAAoB;GAE1B,MAAM,OACJ,eAAgB,MAAM,EACvB,4EACC,cAAe,SAAS,kBAAkB,KAAK,EAChD,2BAA2B;GAC5B,MAAM,mBAAoB,kBAAkB;IAC1C,MAAM;IACN,SAAS;IACT,oBAAoB,KAAK,QAAQ,KAAK;IACtC,YAAY;GACd,GAAG,MAAM,OAAO,CAAC;GACjB,MAAM,0DAA0D;GAChE,MAAM,mBAAoB,mBAAmB,EAAE,OA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AK;OACL,SAAS;QAAE,QAAQ;QAAM,MAAM;OAAS;MAC1C,GAAG,MAAM,GAAG,CAAC,cAAc,qBAAqB,CAAC,CACnD,CAAC;MACD,GAAG;KACL,GAAG,GAAG,CAAC,QAAQ,MAAM,CAAC,CACxB,CAAC,CACH;IAEJ,CAAC;IACD,GAAG;GACL,GAAG,OAAO,CAAC;GACX,MAAM,UAAU;EAClB;CACA;AAEA,CAAC","names":[],"sources":["../../../../../../../../components/CronCollection.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/CronCollection.vue","../../../../../../../../components/ServerTaskDetails.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ServerTaskDetails.vue","../../../../../../../../components/ServerTaskListItem.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../components/ServerTaskListItem.vue","../../../../../../../../pages/modules/server-tasks.vue?vue&type=script&setup=true&lang.ts","../../../../../../../../pages/modules/server-tasks.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderAttr as _ssrRenderAttr, ssrRenderClass as _ssrRenderClass, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { CronCollection } from '../../src/types/tasks'\nimport cronstrue from 'cronstrue'\nimport { computed, ref } from 'vue'\nimport { useCurrentServerTask } from '~/composables/state-routes'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'CronCollection',\n __ssrInlineRender: true,\n props: {\n collection: {}\n },\n setup(__props: any) {\n\nconst props = __props\n\nconst currentTaskRoute = useCurrentServerTask()\nconst open = ref(true)\n\nconst humanReadableCron = computed(() => {\n return cronstrue.toString(props.collection.cron)\n})\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_NBadge = _resolveComponent(\"NBadge\")!\n\n _push(`<div${\n _ssrRenderAttrs(_attrs)\n }><button flex=\"~ gap-2\" w-full items-start items-center p2 hover-bg-active${\n _ssrRenderAttr(\"title\", humanReadableCron.value)\n }><div flex-none text-left>`)\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon:chevron-right\",\n \"mb0.5\": \"\",\n \"transform-rotate\": open.value ? 90 : 0,\n transition: \"\"\n }, null, _parent))\n _push(`</div><span flex=\"~ gap-2\" min-w-0 items-center text-sm>`)\n _push(_ssrRenderComponent(_component_NBadge, { class: \"font-mono n-primary\" }, null, _parent))\n _push(`<span class=\"truncate\">${\n _ssrInterpolate(humanReadableCron.value)\n }</span><span text-xs op50>(${\n _ssrInterpolate(__props.collection.tasks.length)\n })</span></span></button><div x-divider></div>`)\n if (open.value) {\n _push(`<ul><!--[-->`)\n _ssrRenderList(__props.collection.tasks, (task) => {\n _push(`<li><button flex=\"~ gap-2\" w-full items-start items-center px2 py1 pl-9 font-mono hover-bg-active class=\"${\n _ssrRenderClass([{ 'bg-active': _unref(currentTaskRoute) === task }])\n }\">${\n _ssrInterpolate(task)\n }</button><div x-divider></div></li>`)\n })\n _push(`<!--]--></ul>`)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { CronCollection } from '../../src/types/tasks'\nimport cronstrue from 'cronstrue'\nimport { computed, ref } from 'vue'\nimport { useCurrentServerTask } from '~/composables/state-routes'\n\nconst props = defineProps<{\n collection: CronCollection\n}>()\n\nconst currentTaskRoute = useCurrentServerTask()\nconst open = ref(true)\n\nconst humanReadableCron = computed(() => {\n return cronstrue.toString(props.collection.cron)\n})\n</script>\n\n<template>\n <div>\n <button\n flex=\"~ gap-2\" w-full items-start items-center p2 hover-bg-active\n :title=\"humanReadableCron\"\n @click=\"open = !open\"\n >\n <div flex-none text-left>\n <NIcon icon=\"carbon:chevron-right\" mb0.5 :transform-rotate=\"open ? 90 : 0\" transition />\n </div>\n <span flex=\"~ gap-2\" min-w-0 items-center text-sm>\n <NBadge\n class=\"font-mono n-primary\"\n v-text=\"collection.cron\"\n />\n <span class=\"truncate\">{{ humanReadableCron }}</span>\n <span text-xs op50>({{ collection.tasks.length }})</span>\n </span>\n </button>\n <div x-divider />\n <ul v-if=\"open\">\n <li v-for=\"task in collection.tasks\" :key=\"task\">\n <button\n flex=\"~ gap-2\" w-full items-start items-center px2 py1 pl-9 font-mono hover-bg-active\n :class=\"[{ 'bg-active': currentTaskRoute === task }]\"\n @click=\"currentTaskRoute = task\"\n >\n {{ task }}\n </button>\n <div x-divider />\n </li>\n </ul>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective, mergeProps as _mergeProps, createVNode as _createVNode, Fragment as _Fragment, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderAttrs as _ssrRenderAttrs, ssrRenderClass as _ssrRenderClass, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { $Fetch } from 'ofetch'\nimport type { ServerRouteInput, ServerTaskInfo } from '~/../src/types'\nimport { createReusableTemplate, useLocalStorage, watchDebounced } from '@vueuse/core'\nimport JsonEditorVue from 'json-editor-vue'\nimport { computed, reactive, ref, watchEffect } from 'vue'\nimport { getColorMode } from '~/composables/client'\nimport { useOpenInEditor } from '~/composables/editor'\nimport { useServerConfig } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\nimport { telemetry } from '~/composables/telemetry'\nimport { ServerRouteTabIcons } from '../composables/constants'\nimport { useCopy } from '../composables/editor'\nimport { getRequestMethodClass } from '../composables/utils'\n\ntype RouteInputs = keyof typeof routeInputs\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ServerTaskDetails',\n __ssrInlineRender: true,\n props: {\n task: {}\n },\n emits: [\"openDefaultInput\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\n\nconst emit = __emit\n\nconst routeInputBodyJSON = ref<any>({ payload: {} })\nconst { inputDefaults } = useDevToolsOptions('serverRoutes')\nconst [DefineDefaultInputs, UseDefaultInputs] = createReusableTemplate()\n\nconst colorMode = getColorMode()\nconst config = useServerConfig()\n\nconst response = reactive({\n contentType: 'text/plain',\n data: '' as any,\n statusCode: 200,\n error: undefined as Error | undefined,\n fetchTime: 0,\n})\n\nconst responseContent = computed(() => {\n return JSON.stringify(response.data, null, 2)\n})\n\nconst responseLang = computed(() => {\n if (response.contentType.includes('application/json'))\n return 'json'\n return 'text'\n})\n\nconst fetching = ref(false)\nconst started = ref(false)\n\nconst openInEditor = useOpenInEditor()\n\nconst activeTab = ref()\n\nconst tabInputs = ['json']\nconst selectedTabInput = ref(tabInputs[0])\n\nconst routeInputs = reactive({\n query: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n body: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n headers: [] as ServerRouteInput[],\n})\n\nconst currentParams = computed({\n get: () => routeInputs[activeTab.value as RouteInputs],\n set: (value: any) => {\n routeInputs[activeTab.value as RouteInputs] = value\n },\n})\n\nconst parsedQuery = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.query),\n ...parseInputs(routeInputs.query),\n }\n})\nconst parsedHeader = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.headers),\n }\n})\nconst parsedBody = computed(() => {\n return Object.keys(routeInputBodyJSON.value?.payload ?? {}).length\n ? {\n ...routeInputBodyJSON.value,\n }\n : undefined\n})\n\nconst method = computed(() => {\n return parsedBody.value ? 'POST' : 'GET'\n})\n\nconst domain = computed(() => {\n let url = window?.location.origin\n if (url.charAt(url.length - 1) === '/')\n url = url.slice(0, -1)\n return url\n})\n\nconst finalPath = computed(() => {\n let query = new URLSearchParams(parsedQuery.value).toString()\n if (query)\n query = `?${query}`\n const path = `/_nitro/tasks/${props.task.name}${query}`\n\n let base = config.value?.app.baseURL || ''\n if (base === './' || base === '.')\n base = ''\n if (base.endsWith('/'))\n base = base.slice(0, -1)\n return (base + path)\n})\nconst finalURL = computed(() => domain.value + finalPath.value)\n\nfunction parseInputs(inputs: ServerRouteInput[] = []) {\n const formatted = Object.fromEntries(\n inputs.filter(({ active, key, value }) => active && key && value !== undefined).map(({ key, value }) => [key, value]),\n )\n return Object.entries(formatted).length ? formatted : undefined\n}\n\nasync function fetchData() {\n started.value = true\n fetching.value = true\n\n const start = Date.now()\n\n telemetry('server-tasks:run', {\n method: method.value,\n })\n\n try {\n // eslint-disable-next-line unimport/auto-insert\n response.data = await ($fetch as $Fetch)(finalURL.value, {\n method: 'POST', // routeMethod.value.toUpperCase() as any,\n headers: parsedHeader.value,\n query: parsedQuery.value,\n body: parsedBody.value,\n onResponse({ response: res }) {\n response.contentType = (res.headers.get('content-type') || '').toString().toLowerCase().trim()\n response.statusCode = res.status\n response.error = undefined\n },\n onResponseError(res) {\n response.error = res.response._data\n response.data = res.response._data\n },\n })\n }\n catch {}\n\n fetching.value = false\n response.fetchTime = Date.now() - start\n}\n\nconst tabs = computed(() => {\n const items = []\n items.push({\n name: 'Query',\n slug: 'query',\n length: routeInputs.query.length,\n })\n items.push({\n name: 'Body',\n slug: 'body',\n length: routeInputs.body.length,\n })\n return items\n})\n\nwatchEffect(() => {\n if (selectedTabInput.value === 'json') {\n if (typeof routeInputBodyJSON.value === 'string') {\n try {\n routeInputBodyJSON.value = JSON.parse(routeInputBodyJSON.value)\n }\n catch {}\n }\n }\n})\n\nconst savedRouteInputs = useLocalStorage<{ task: string, tab: string, inputs: any }[]>('nuxt-devtools:server-tasks:inputs', () => [], {\n window: window.parent,\n})\n\nwatchDebounced([routeInputs, activeTab], () => {\n const savedEntry = savedRouteInputs.value?.find(entry => entry.task === props.task.name)\n\n if (!savedEntry) {\n const newEntry = {\n task: props.task.name,\n tab: 'query',\n inputs: routeInputs,\n }\n savedRouteInputs.value.push(newEntry)\n\n if (!activeTab.value)\n activeTab.value = newEntry.tab\n }\n else {\n if (!activeTab.value)\n activeTab.value = savedEntry.tab\n\n if (savedEntry.tab !== activeTab.value)\n savedEntry.tab = activeTab.value\n\n // update routeInputs with local storage\n const { body, query, headers } = savedEntry.inputs\n Object.assign(routeInputs, { body, query, headers })\n }\n}, { immediate: true, deep: true, debounce: 500 })\n\nconst copy = useCopy()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_NTextInput = _resolveComponent(\"NTextInput\")!\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_ServerRouteInputs = _resolveComponent(\"ServerRouteInputs\")!\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_NLoading = _resolveComponent(\"NLoading\")!\n const _component_NBadge = _resolveComponent(\"NBadge\")!\n const _component_NCodeBlock = _resolveComponent(\"NCodeBlock\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<div${\n _ssrRenderAttrs(_mergeProps({\n \"h-full\": \"\",\n \"w-full\": \"\",\n flex: \"~ col\"\n }, _attrs))\n }><div flex=\"~ col gap-2\" n-navbar-glass flex-none p4><div flex=\"~ gap2 items-center\"><div${\n _ssrRenderAttrs(_ssrGetDirectiveProps(_ctx, _directive_tooltip, `Method is ${method.value} as ${method.value === 'GET' ? 'no' : ''} json body is sent`))\n }>`)\n _push(_ssrRenderComponent(_component_NButton, {\n class: [\"n-badge-base n-sm\", _unref(getRequestMethodClass)(method.value)],\n \"pointer-events-none\": \"\",\n \"font-mono\": \"\",\n tabindex: \"-1\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`${_ssrInterpolate(method.value)}`)\n } else {\n return [\n _createTextVNode(_toDisplayString(method.value), 1)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div><div relative w-full>`)\n _push(_ssrRenderComponent(_component_NTextInput, {\n \"model-value\": finalPath.value,\n readonly: \"\",\n \"flex-auto\": \"\",\n \"font-mono\": \"\",\n p: \"x5 y2\",\n n: \"sm\"\n }, null, _parent))\n _push(`<div absolute right-2 top-1.5 flex=\"~ gap-1\">`)\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n title: \"Copy URL\",\n n: \"xs blue\",\n icon: \"carbon:copy\",\n border: false,\n onClick: ($event: any) => (_unref(copy)(finalURL.value, 'server-task-url'))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Copy URL')), null, _parent))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n title: \"Open in Editor\",\n icon: \"carbon-launch\",\n n: \"xs blue\",\n border: false,\n onClick: ($event: any) => (_unref(openInEditor)(__props.task.handler))\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Open in Editor')), null, _parent))\n _push(`</div></div>`)\n _push(_ssrRenderComponent(_component_NButton, {\n \"h-full\": \"\",\n n: \"primary solid\",\n onClick: fetchData\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon:send\" }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon:send\" })\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div></div><div flex=\"~ gap2 wrap\" w-full items-center px4 pb2 text-center text-sm border=\"b base\"><!--[-->`)\n _ssrRenderList(tabs.value, (tab) => {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n key: tab.slug,\n class: activeTab.value === tab.slug ? 'text-primary n-primary' : 'border-transparent shadow-none',\n onClick: ($event: any) => (activeTab.value = tab.slug)\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, tab.name)), {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: _unref(ServerRouteTabIcons)[tab.slug]\n }, null, _parent, _scopeId))\n _push(`<div class=\"hidden md:block\"${\n _scopeId\n }>${\n _ssrInterpolate(tab.name)\n } ${\n _ssrInterpolate(tab?.length ? `(${tab.length})` : '')\n } <span${\n _scopeId\n }>${\n _ssrInterpolate(_unref(inputDefaults)[tab.slug]?.length ? `(${_unref(inputDefaults)[tab.slug]!.length})` : '')\n }</span></div>`)\n } else {\n return [\n _createVNode(_component_NIcon, {\n icon: _unref(ServerRouteTabIcons)[tab.slug]\n }, null, 8, [\"icon\"]),\n _createVNode(\"div\", { class: \"hidden md:block\" }, [\n _createTextVNode(_toDisplayString(tab.name) + \" \" + _toDisplayString(tab?.length ? `(${tab.length})` : '') + \" \", 1),\n _createVNode(\"span\", null, _toDisplayString(_unref(inputDefaults)[tab.slug]?.length ? `(${_unref(inputDefaults)[tab.slug]!.length})` : ''), 1)\n ])\n ]\n }\n }),\n _: 2\n }, _parent))\n })\n _push(`<!--]--></div>`)\n _push(_ssrRenderComponent(_unref(DefineDefaultInputs), null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_ServerRouteInputs, {\n modelValue: currentParams.value,\n \"onUpdate:modelValue\": ($event: any) => ((currentParams).value = $event),\n default: { active: true, type: 'string' },\n \"max-h-xs\": \"\",\n \"of-auto\": \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n if (_unref(inputDefaults)[activeTab.value]?.length) {\n _push(`<!--[--><div flex=\"~ gap2\" mb--2 items-center op50${\n _scopeId\n }><div w-5 x-divider${\n _scopeId\n }></div><div flex-none${\n _scopeId\n }> Default Inputs </div>`)\n _push(_ssrRenderComponent(_component_NButton, {\n icon: \"i-carbon-edit\",\n border: false,\n onClick: ($event: any) => (emit('openDefaultInput'))\n }, null, _parent, _scopeId))\n _push(`<div x-divider${_scopeId}></div></div>`)\n _push(_ssrRenderComponent(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[activeTab.value],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[activeTab.value]) = $event),\n disabled: \"\",\n p0: \"\"\n }, null, _parent, _scopeId))\n _push(`<!--]-->`)\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (_unref(inputDefaults)[activeTab.value]?.length)\n ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n _createVNode(\"div\", {\n flex: \"~ gap2\",\n \"mb--2\": \"\",\n \"items-center\": \"\",\n op50: \"\"\n }, [\n _createVNode(\"div\", {\n \"w-5\": \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"div\", { \"flex-none\": \"\" }, \" Default Inputs \"),\n _createVNode(_component_NButton, {\n icon: \"i-carbon-edit\",\n border: false,\n onClick: ($event: any) => (emit('openDefaultInput'))\n }, null, 8, [\"onClick\"]),\n _createVNode(\"div\", { \"x-divider\": \"\" })\n ]),\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[activeTab.value],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[activeTab.value]) = $event),\n disabled: \"\",\n p0: \"\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_ServerRouteInputs, {\n modelValue: currentParams.value,\n \"onUpdate:modelValue\": ($event: any) => ((currentParams).value = $event),\n default: { active: true, type: 'string' },\n \"max-h-xs\": \"\",\n \"of-auto\": \"\"\n }, {\n default: _withCtx(() => [\n (_unref(inputDefaults)[activeTab.value]?.length)\n ? (_openBlock(), _createBlock(_Fragment, { key: 0 }, [\n _createVNode(\"div\", {\n flex: \"~ gap2\",\n \"mb--2\": \"\",\n \"items-center\": \"\",\n op50: \"\"\n }, [\n _createVNode(\"div\", {\n \"w-5\": \"\",\n \"x-divider\": \"\"\n }),\n _createVNode(\"div\", { \"flex-none\": \"\" }, \" Default Inputs \"),\n _createVNode(_component_NButton, {\n icon: \"i-carbon-edit\",\n border: false,\n onClick: ($event: any) => (emit('openDefaultInput'))\n }, null, 8, [\"onClick\"]),\n _createVNode(\"div\", { \"x-divider\": \"\" })\n ]),\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults)[activeTab.value],\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults)[activeTab.value]) = $event),\n disabled: \"\",\n p0: \"\"\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ], 64))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]\n }\n }),\n _: 1\n }, _parent))\n if (currentParams.value) {\n _push(`<div border=\"b base\" relative n-code-block>`)\n if (activeTab.value === 'body') {\n _push(`<!--[--><div flex=\"~ wrap\" w-full><!--[-->`)\n _ssrRenderList(tabInputs, (item) => {\n _push(`<button px4 py2 border=\"r base\" hover=\"bg-active\" class=\"${\n _ssrRenderClass({ 'border-b': item !== selectedTabInput.value })\n }\"><div class=\"${\n _ssrRenderClass({ op30: item !== selectedTabInput.value } )\n }\" font-mono>${\n _ssrInterpolate(item)\n }</div></button>`)\n })\n _push(`<!--]--><div border=\"b base\" flex-auto></div></div>`)\n if (selectedTabInput.value === 'input') {\n _push(_ssrRenderComponent(_unref(UseDefaultInputs), null, null, _parent))\n } else if (selectedTabInput.value === 'json') {\n _push(_ssrRenderComponent(_unref(JsonEditorVue), _mergeProps({\n modelValue: routeInputBodyJSON.value,\n \"onUpdate:modelValue\": ($event: any) => ((routeInputBodyJSON).value = $event),\n class: [_unref(colorMode) === 'dark' ? 'jse-theme-dark' : 'light', \"json-editor-vue of-auto text-sm outline-none\"]\n }, _ctx.$attrs, {\n mode: ('text' as any),\n \"navigation-bar\": false,\n indentation: 2,\n \"tab-size\": 2\n }), null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`<!--]-->`)\n } else {\n _push(_ssrRenderComponent(_unref(UseDefaultInputs), null, null, _parent))\n }\n _push(`</div>`)\n } else {\n _push(`<!---->`)\n }\n if (!started.value) {\n _push(_ssrRenderComponent(_component_NPanelGrids, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NButton, {\n n: \"primary\",\n onClick: fetchData\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NIcon, { icon: \"carbon:send\" }, null, _parent, _scopeId))\n _push(` Run task `)\n } else {\n return [\n _createVNode(_component_NIcon, { icon: \"carbon:send\" }),\n _createTextVNode(\" Run task \")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NButton, {\n n: \"primary\",\n onClick: fetchData\n }, {\n default: _withCtx(() => [\n _createVNode(_component_NIcon, { icon: \"carbon:send\" }),\n _createTextVNode(\" Run task \")\n ]),\n _: 1\n })\n ]\n }\n }),\n _: 1\n }, _parent))\n } else if (fetching.value) {\n _push(_ssrRenderComponent(_component_NLoading, {\n \"z-10\": \"\",\n \"flex-auto\": \"\",\n \"backdrop-blur\": \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Running... `)\n } else {\n return [\n _createTextVNode(\" Running... \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!--[--><div border=\"b base\" flex=\"~ gap2\" items-center px4 py2><div>Result</div>`)\n if (response.error) {\n _push(_ssrRenderComponent(_component_NBadge, { n: \"red\" }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(` Error `)\n } else {\n return [\n _createTextVNode(\" Error \")\n ]\n }\n }),\n _: 1\n }, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(_ssrRenderComponent(_component_NBadge, {\n n: response.error ? 'orange' : 'green'\n }, null, _parent))\n if (response.contentType) {\n _push(`<code text-xs op50>${_ssrInterpolate(response.contentType)}</code>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<div flex-auto></div><div op50> Tasks finished in </div>`)\n _push(_ssrRenderComponent(_component_NBadge, { n: \"green\" }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`${_ssrInterpolate(response.fetchTime)} ms `)\n } else {\n return [\n _createTextVNode(_toDisplayString(response.fetchTime) + \" ms \", 1)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`</div>`)\n _push(_ssrRenderComponent(_component_NCodeBlock, {\n \"flex-auto\": \"\",\n \"overflow-auto\": \"\",\n \"py-2\": \"\",\n code: responseContent.value,\n lang: responseLang.value\n }, null, _parent))\n _push(`<!--]-->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { $Fetch } from 'ofetch'\nimport type { ServerRouteInput, ServerTaskInfo } from '~/../src/types'\nimport { createReusableTemplate, useLocalStorage, watchDebounced } from '@vueuse/core'\nimport JsonEditorVue from 'json-editor-vue'\nimport { computed, reactive, ref, watchEffect } from 'vue'\nimport { getColorMode } from '~/composables/client'\nimport { useOpenInEditor } from '~/composables/editor'\nimport { useServerConfig } from '~/composables/state'\nimport { useDevToolsOptions } from '~/composables/storage-options'\nimport { telemetry } from '~/composables/telemetry'\nimport { ServerRouteTabIcons } from '../composables/constants'\nimport { useCopy } from '../composables/editor'\nimport { getRequestMethodClass } from '../composables/utils'\n\nconst props = defineProps<{\n task: ServerTaskInfo\n}>()\n\nconst emit = defineEmits<{\n (event: 'openDefaultInput'): void\n}>()\n\nconst routeInputBodyJSON = ref<any>({ payload: {} })\nconst { inputDefaults } = useDevToolsOptions('serverRoutes')\nconst [DefineDefaultInputs, UseDefaultInputs] = createReusableTemplate()\n\nconst colorMode = getColorMode()\nconst config = useServerConfig()\n\nconst response = reactive({\n contentType: 'text/plain',\n data: '' as any,\n statusCode: 200,\n error: undefined as Error | undefined,\n fetchTime: 0,\n})\n\nconst responseContent = computed(() => {\n return JSON.stringify(response.data, null, 2)\n})\n\nconst responseLang = computed(() => {\n if (response.contentType.includes('application/json'))\n return 'json'\n return 'text'\n})\n\nconst fetching = ref(false)\nconst started = ref(false)\n\nconst openInEditor = useOpenInEditor()\n\nconst activeTab = ref()\n\nconst tabInputs = ['json']\nconst selectedTabInput = ref(tabInputs[0])\n\nconst routeInputs = reactive({\n query: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n body: [{ active: true, key: '', value: '', type: 'string' }] as ServerRouteInput[],\n headers: [] as ServerRouteInput[],\n})\n\ntype RouteInputs = keyof typeof routeInputs\nconst currentParams = computed({\n get: () => routeInputs[activeTab.value as RouteInputs],\n set: (value: any) => {\n routeInputs[activeTab.value as RouteInputs] = value\n },\n})\n\nconst parsedQuery = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.query),\n ...parseInputs(routeInputs.query),\n }\n})\nconst parsedHeader = computed(() => {\n return {\n ...parseInputs(inputDefaults.value.headers),\n }\n})\nconst parsedBody = computed(() => {\n return Object.keys(routeInputBodyJSON.value?.payload ?? {}).length\n ? {\n ...routeInputBodyJSON.value,\n }\n : undefined\n})\n\nconst method = computed(() => {\n return parsedBody.value ? 'POST' : 'GET'\n})\n\nconst domain = computed(() => {\n let url = window?.location.origin\n if (url.charAt(url.length - 1) === '/')\n url = url.slice(0, -1)\n return url\n})\n\nconst finalPath = computed(() => {\n let query = new URLSearchParams(parsedQuery.value).toString()\n if (query)\n query = `?${query}`\n const path = `/_nitro/tasks/${props.task.name}${query}`\n\n let base = config.value?.app.baseURL || ''\n if (base === './' || base === '.')\n base = ''\n if (base.endsWith('/'))\n base = base.slice(0, -1)\n return (base + path)\n})\nconst finalURL = computed(() => domain.value + finalPath.value)\n\nfunction parseInputs(inputs: ServerRouteInput[] = []) {\n const formatted = Object.fromEntries(\n inputs.filter(({ active, key, value }) => active && key && value !== undefined).map(({ key, value }) => [key, value]),\n )\n return Object.entries(formatted).length ? formatted : undefined\n}\n\nasync function fetchData() {\n started.value = true\n fetching.value = true\n\n const start = Date.now()\n\n telemetry('server-tasks:run', {\n method: method.value,\n })\n\n try {\n // eslint-disable-next-line unimport/auto-insert\n response.data = await ($fetch as $Fetch)(finalURL.value, {\n method: 'POST', // routeMethod.value.toUpperCase() as any,\n headers: parsedHeader.value,\n query: parsedQuery.value,\n body: parsedBody.value,\n onResponse({ response: res }) {\n response.contentType = (res.headers.get('content-type') || '').toString().toLowerCase().trim()\n response.statusCode = res.status\n response.error = undefined\n },\n onResponseError(res) {\n response.error = res.response._data\n response.data = res.response._data\n },\n })\n }\n catch {}\n\n fetching.value = false\n response.fetchTime = Date.now() - start\n}\n\nconst tabs = computed(() => {\n const items = []\n items.push({\n name: 'Query',\n slug: 'query',\n length: routeInputs.query.length,\n })\n items.push({\n name: 'Body',\n slug: 'body',\n length: routeInputs.body.length,\n })\n return items\n})\n\nwatchEffect(() => {\n if (selectedTabInput.value === 'json') {\n if (typeof routeInputBodyJSON.value === 'string') {\n try {\n routeInputBodyJSON.value = JSON.parse(routeInputBodyJSON.value)\n }\n catch {}\n }\n }\n})\n\nconst savedRouteInputs = useLocalStorage<{ task: string, tab: string, inputs: any }[]>('nuxt-devtools:server-tasks:inputs', () => [], {\n window: window.parent,\n})\n\nwatchDebounced([routeInputs, activeTab], () => {\n const savedEntry = savedRouteInputs.value?.find(entry => entry.task === props.task.name)\n\n if (!savedEntry) {\n const newEntry = {\n task: props.task.name,\n tab: 'query',\n inputs: routeInputs,\n }\n savedRouteInputs.value.push(newEntry)\n\n if (!activeTab.value)\n activeTab.value = newEntry.tab\n }\n else {\n if (!activeTab.value)\n activeTab.value = savedEntry.tab\n\n if (savedEntry.tab !== activeTab.value)\n savedEntry.tab = activeTab.value\n\n // update routeInputs with local storage\n const { body, query, headers } = savedEntry.inputs\n Object.assign(routeInputs, { body, query, headers })\n }\n}, { immediate: true, deep: true, debounce: 500 })\n\nconst copy = useCopy()\n</script>\n\n<template>\n <div h-full w-full flex=\"~ col\">\n <div flex=\"~ col gap-2\" n-navbar-glass flex-none p4>\n <div flex=\"~ gap2 items-center\">\n <div v-tooltip=\"`Method is ${method} as ${method === 'GET' ? 'no' : ''} json body is sent`\">\n <NButton\n class=\"n-badge-base n-sm\"\n :class=\"getRequestMethodClass(method)\" pointer-events-none font-mono\n tabindex=\"-1\"\n >\n {{ method }}\n </NButton>\n </div>\n <div relative w-full>\n <NTextInput\n :model-value=\"finalPath\"\n readonly flex-auto font-mono\n p=\"x5 y2\"\n n=\"sm\"\n />\n <div absolute right-2 top-1.5 flex=\"~ gap-1\">\n <NButton\n v-tooltip=\"'Copy URL'\"\n title=\"Copy URL\"\n n=\"xs blue\"\n icon=\"carbon:copy\"\n :border=\"false\"\n @click=\"copy(finalURL, 'server-task-url')\"\n />\n <NButton\n v-tooltip=\"'Open in Editor'\"\n title=\"Open in Editor\"\n icon=\"carbon-launch\"\n n=\"xs blue\"\n :border=\"false\"\n @click=\"openInEditor(task.handler)\"\n />\n </div>\n </div>\n <NButton h-full n=\"primary solid\" @click=\"fetchData\">\n <NIcon icon=\"carbon:send\" />\n </NButton>\n </div>\n </div>\n <div flex=\"~ gap2 wrap\" w-full items-center px4 pb2 text-center text-sm border=\"b base\">\n <NButton\n v-for=\"tab of tabs\"\n :key=\"tab.slug\"\n v-tooltip=\"tab.name\"\n :class=\"activeTab === tab.slug ? 'text-primary n-primary' : 'border-transparent shadow-none'\"\n @click=\"activeTab = tab.slug\"\n >\n <NIcon :icon=\"ServerRouteTabIcons[tab.slug]\" />\n <div class=\"hidden md:block\">\n {{ tab.name }}\n {{ tab?.length ? `(${tab.length})` : '' }}\n <span>\n {{ inputDefaults[tab.slug]?.length ? `(${inputDefaults[tab.slug]!.length})` : '' }}\n </span>\n </div>\n </NButton>\n </div>\n <DefineDefaultInputs>\n <ServerRouteInputs v-model=\"currentParams\" :default=\"{ active: true, type: 'string' }\" max-h-xs of-auto>\n <template v-if=\"inputDefaults[activeTab]?.length\">\n <div flex=\"~ gap2\" mb--2 items-center op50>\n <div w-5 x-divider />\n <div flex-none>\n Default Inputs\n </div>\n <NButton\n icon=\"i-carbon-edit\"\n :border=\"false\"\n @click=\"emit('openDefaultInput')\"\n />\n <div x-divider />\n </div>\n <ServerRouteInputs v-model=\"inputDefaults[activeTab]\" disabled p0 />\n </template>\n </ServerRouteInputs>\n </DefineDefaultInputs>\n <div v-if=\"currentParams\" border=\"b base\" relative n-code-block>\n <template v-if=\"activeTab === 'body'\">\n <div flex=\"~ wrap\" w-full>\n <template v-for=\"item of tabInputs\" :key=\"item\">\n <button\n px4 py2 border=\"r base\"\n hover=\"bg-active\"\n :class=\"{ 'border-b': item !== selectedTabInput }\"\n @click=\"selectedTabInput = item\"\n >\n <div :class=\"{ op30: item !== selectedTabInput } \" font-mono>\n {{ item }}\n </div>\n </button>\n </template>\n <div border=\"b base\" flex-auto />\n </div>\n\n <UseDefaultInputs v-if=\"selectedTabInput === 'input'\" />\n <JsonEditorVue\n v-else-if=\"selectedTabInput === 'json'\"\n v-model=\"routeInputBodyJSON\"\n :class=\"colorMode === 'dark' ? 'jse-theme-dark' : 'light'\"\n class=\"json-editor-vue of-auto text-sm outline-none\"\n v-bind=\"$attrs\"\n :mode=\"('text' as any)\"\n :navigation-bar=\"false\"\n :indentation=\"2\"\n :tab-size=\"2\"\n />\n </template>\n <UseDefaultInputs v-else />\n </div>\n <NPanelGrids v-if=\"!started\">\n <NButton n=\"primary\" @click=\"fetchData\">\n <NIcon icon=\"carbon:send\" />\n Run task\n </NButton>\n </NPanelGrids>\n <NLoading v-else-if=\"fetching\" z-10 flex-auto backdrop-blur>\n Running...\n </NLoading>\n <template v-else>\n <div border=\"b base\" flex=\"~ gap2\" items-center px4 py2>\n <div>Result</div>\n <NBadge\n v-if=\"response.error\"\n n=\"red\"\n >\n Error\n </NBadge>\n <NBadge :n=\"response.error ? 'orange' : 'green'\" v-text=\"response.statusCode\" />\n <code v-if=\"response.contentType\" text-xs op50>\n {{ response.contentType }}\n </code>\n <div flex-auto />\n <div op50>\n Tasks finished in\n </div>\n <NBadge n=\"green\">\n {{ response.fetchTime }} ms\n </NBadge>\n </div>\n <NCodeBlock\n flex-auto overflow-auto py-2\n :code=\"responseContent\"\n :lang=\"responseLang\"\n />\n </template>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent } from \"vue\"\nimport { ssrRenderComponent as _ssrRenderComponent, ssrRenderClass as _ssrRenderClass, ssrRenderStyle as _ssrRenderStyle, ssrRenderSlot as _ssrRenderSlot, ssrRenderAttrs as _ssrRenderAttrs, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { ServerTaskInfo } from '~/../../src/types'\nimport { ref } from 'vue'\nimport { useCurrentServerTask } from '~/composables/state-routes'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'ServerTaskListItem',\n __ssrInlineRender: true,\n props: {\n item: {},\n index: { default: 0 }\n },\n setup(__props: any) {\n\n\n\nconst open = ref(true)\nconst currentTaskRoute = useCurrentServerTask()\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NIcon = _resolveComponent(\"NIcon\")!\n const _component_ServerTaskListItem = _resolveComponent(\"ServerTaskListItem\", true)!\n\n _push(`<div${\n _ssrRenderAttrs(_attrs)\n }><button flex=\"~ gap-2\" w-full items-start items-center px2 py1 hover-bg-active class=\"${\n _ssrRenderClass([{ 'bg-active': _unref(currentTaskRoute) === __props.item.name }])\n }\" style=\"${\n _ssrRenderStyle({ paddingLeft: `calc(0.5rem + ${__props.index * 1.5}em)` })\n }\"><div flex-none text-left>`)\n if (__props.item.type === 'collection') {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon:chevron-right\",\n \"mb0.5\": \"\",\n \"transform-rotate\": open.value ? 90 : 0,\n transition: \"\"\n }, null, _parent))\n } else {\n _push(`<!---->`)\n }\n _push(`</div><span flex items-center text-sm font-mono>`)\n if (__props.item.type === 'collection') {\n _push(_ssrRenderComponent(_component_NIcon, {\n title: `${__props.item.tasks?.length} tasks`,\n icon: \"carbon:folder\",\n mr1: \"\"\n }, null, _parent))\n } else {\n _push(_ssrRenderComponent(_component_NIcon, {\n icon: \"carbon:play\",\n ml3: \"\",\n mr1: \"\"\n }, null, _parent))\n }\n _push(` ${_ssrInterpolate(__props.item.name)}</span></button><div x-divider></div>`)\n if (open.value) {\n _ssrRenderSlot(_ctx.$slots, \"default\", {}, () => {\n _push(`<!--[-->`)\n _ssrRenderList(__props.item.tasks, (subItem) => {\n _push(_ssrRenderComponent(_component_ServerTaskListItem, {\n key: subItem.name,\n item: subItem,\n index: __props.index + 1\n }, null, _parent))\n })\n _push(`<!--]-->`)\n }, _push, _parent)\n } else {\n _push(`<!---->`)\n }\n _push(`</div>`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { ServerTaskInfo } from '~/../../src/types'\nimport { ref } from 'vue'\nimport { useCurrentServerTask } from '~/composables/state-routes'\n\nwithDefaults(defineProps<{\n item: ServerTaskInfo\n index?: number\n}>(), {\n index: 0,\n})\n\nconst open = ref(true)\nconst currentTaskRoute = useCurrentServerTask()\n</script>\n\n<template>\n <div>\n <button\n flex=\"~ gap-2\" w-full items-start items-center px2 py1 hover-bg-active\n :class=\"[{ 'bg-active': currentTaskRoute === item.name }]\"\n :style=\"{ paddingLeft: `calc(0.5rem + ${index * 1.5}em)` }\"\n @click=\"open = !open;currentTaskRoute = item.name\"\n >\n <div flex-none text-left>\n <NIcon v-if=\"item.type === 'collection'\" icon=\"carbon:chevron-right\" mb0.5 :transform-rotate=\"open ? 90 : 0\" transition />\n </div>\n <span flex items-center text-sm font-mono>\n <template v-if=\"item.type === 'collection'\">\n <NIcon :title=\"`${item.tasks?.length} tasks`\" icon=\"carbon:folder\" mr1 />\n </template>\n <template v-else>\n <NIcon icon=\"carbon:play\" ml3 mr1 />\n </template>\n {{ item.name }}\n </span>\n <!-- TODO: maybe add options to create/delete/copy ... -->\n <!-- <NDropdown v-model=\"dropdown\" position=\"right\" n=\"sm\">\n <template #trigger=\"{ click }\">\n <NButton icon=\"carbon-overflow-menu-vertical\" :border=\"false\" @click.stop.prevent=\"click()\" />\n </template>\n </NDropdown> -->\n </button>\n <div x-divider />\n <slot v-if=\"open\">\n <ServerTaskListItem\n v-for=\"subItem in item.tasks\"\n :key=\"subItem.name\"\n :item=\"subItem\"\n :index=\"index + 1\"\n />\n </slot>\n </div>\n</template>\n","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, resolveDirective as _resolveDirective, mergeProps as _mergeProps, withCtx as _withCtx, createVNode as _createVNode, withDirectives as _withDirectives, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, KeepAlive as _KeepAlive } from \"vue\"\nimport { ssrGetDirectiveProps as _ssrGetDirectiveProps, ssrRenderComponent as _ssrRenderComponent, ssrInterpolate as _ssrInterpolate, ssrRenderList as _ssrRenderList } from \"vue/server-renderer\"\n\nimport type { ServerTaskInfo } from '~/../../src/types'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport ServerTaskListItem from '~/components/ServerTaskListItem.vue'\nimport { ServerRouteTabIcons } from '~/composables/constants'\nimport { useServerTasks } from '~/composables/state'\nimport { useCurrentServerTask } from '~/composables/state-routes'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\n\nexport default /*@__PURE__*/_defineComponent({\n __name: 'server-tasks',\n __ssrInlineRender: true,\n setup(__props) {\n\ndefinePageMeta({\n icon: 'codicon-run-all',\n title: 'Server Tasks',\n layout: 'full',\n category: 'server',\n show() {\n const { enabled } = useDevToolsOptions('serverTasks')\n const serverTasks = useServerTasks()\n return () => {\n if (!enabled.value)\n return false\n\n return Object.keys(serverTasks.value?.tasks ?? {}).length\n }\n },\n})\n\nconst inputDefaultsDrawer = ref(false)\n\nconst serverTasks = useServerTasks()\nconst tasks = computed<ServerTaskInfo[]>(() => Object.keys(serverTasks.value?.tasks ?? {}).map(taskKey => ({\n name: taskKey,\n ...serverTasks.value!.tasks[taskKey]!,\n type: 'task',\n})))\n\nconst scheduledTasks = computed(() => {\n return Object\n .entries(serverTasks.value?.scheduledTasks ?? {})\n .map(([cron, tasks]) => ({ cron, tasks }))\n})\n\nconst currentServerTask = useCurrentServerTask()\n\nconst { view, selectedTask, inputDefaults } = useDevToolsOptions('serverTasks')\n\nconst selected = computed(() => {\n if (!currentServerTask.value && selectedTask.value)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n currentServerTask.value = selectedTask.value.name\n\n const task = tasks.value.find(i => i.name === currentServerTask.value)\n\n if (currentServerTask.value !== selectedTask.value?.name && task)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n selectedTask.value = task\n return task\n})\n\nconst search = ref('')\nconst fuse = computed(() => new Fuse(tasks.value, {\n keys: [\n 'key',\n 'description',\n ],\n shouldSort: true,\n}))\n\nconst filtered = computed(() => {\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : tasks.value\n return result\n})\n\nconst filterByCollection = computed(() => {\n const collections: ServerTaskInfo[] = []\n\n const addTaskToCollection = (collection: ServerTaskInfo, route: ServerTaskInfo) => {\n collection.tasks ||= []\n collection.tasks.push(route)\n }\n\n const findOrCreateCollection = (taskName: string, parentCollection?: ServerTaskInfo) => {\n const existingCollection = parentCollection\n ? parentCollection.tasks?.find(t => t.name === taskName)\n : collections.find(c => c.name === taskName)\n\n if (existingCollection) {\n return {\n ...existingCollection,\n type: 'collection',\n } satisfies ServerTaskInfo\n }\n\n const newCollection: ServerTaskInfo = {\n name: taskName,\n handler: taskName,\n description: '',\n type: 'collection',\n tasks: [],\n }\n\n if (parentCollection)\n addTaskToCollection(parentCollection, newCollection)\n\n else\n collections.push(newCollection)\n\n return newCollection\n }\n\n filtered.value.forEach((item) => {\n let parentCollection: ServerTaskInfo | undefined\n const taskItem = {\n ...item,\n type: 'task',\n } satisfies ServerTaskInfo\n\n const taskParts = item.name.split(':')\n const collectionNames = taskParts.concat()\n\n if (collectionNames.length > 0 && collectionNames.at(-1)?.includes('.'))\n collectionNames.pop()\n\n collectionNames.forEach((collectionName) => {\n parentCollection = findOrCreateCollection(collectionName, parentCollection)\n })\n\n if (parentCollection)\n addTaskToCollection(parentCollection, taskItem)\n else\n collections.push(taskItem)\n })\n\n return collections\n})\n\nfunction toggleView() {\n view.value = view.value === 'tree' ? 'list' : 'tree'\n}\n\nreturn (_ctx: any,_push: any,_parent: any,_attrs: any) => {\n const _component_NSplitPane = _resolveComponent(\"NSplitPane\")!\n const _component_NNavbar = _resolveComponent(\"NNavbar\")!\n const _component_NButton = _resolveComponent(\"NButton\")!\n const _component_CronCollection = _resolveComponent(\"CronCollection\")!\n const _component_ServerTaskDetails = _resolveComponent(\"ServerTaskDetails\")!\n const _component_NPanelGrids = _resolveComponent(\"NPanelGrids\")!\n const _component_NCard = _resolveComponent(\"NCard\")!\n const _component_NDrawer = _resolveComponent(\"NDrawer\")!\n const _component_NSectionBlock = _resolveComponent(\"NSectionBlock\")!\n const _component_ServerRouteInputs = _resolveComponent(\"ServerRouteInputs\")!\n const _directive_tooltip = _resolveDirective(\"tooltip\")!\n\n _push(`<!--[-->`)\n _push(_ssrRenderComponent(_component_NSplitPane, { \"storage-key\": \"tab-server-tasks\" }, {\n left: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NSplitPane, {\n horizontal: \"\",\n \"storage-key\": \"tab-server-tasks-split\"\n }, {\n left: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NNavbar, {\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Toggle View')), null, _parent, _scopeId))\n _push(_ssrRenderComponent(_component_NButton, _mergeProps({\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, _ssrGetDirectiveProps(_ctx, _directive_tooltip, 'Default Inputs')), null, _parent, _scopeId))\n } else {\n return [\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [_directive_tooltip, 'Toggle View']\n ]),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, null, 8, [\"onClick\"]), [\n [_directive_tooltip, 'Default Inputs']\n ])\n ]\n }\n }),\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div flex=\"~ gap1\" text-sm${_scopeId}>`)\n if (search.value) {\n _push(`<span op50${\n _scopeId\n }>${\n _ssrInterpolate(filtered.value.length)\n } matched · </span>`)\n } else {\n _push(`<!---->`)\n }\n _push(`<span op50${\n _scopeId\n }>${\n _ssrInterpolate(tasks.value?.length)\n } tasks in total</span></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n flex: \"~ gap1\",\n \"text-sm\": \"\"\n }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", {\n key: 0,\n op50: \"\"\n }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", { op50: \"\" }, _toDisplayString(tasks.value?.length) + \" tasks in total\", 1)\n ])\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`<!--[-->`)\n _ssrRenderList(_unref(view) === 'tree' ? filterByCollection.value : filtered.value, (item) => {\n _push(_ssrRenderComponent(ServerTaskListItem, {\n key: item.name,\n item: item\n }, null, _parent, _scopeId))\n })\n _push(`<!--]-->`)\n } else {\n return [\n _createVNode(_component_NNavbar, {\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx(() => [\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [_directive_tooltip, 'Toggle View']\n ]),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, null, 8, [\"onClick\"]), [\n [_directive_tooltip, 'Default Inputs']\n ])\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ gap1\",\n \"text-sm\": \"\"\n }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", {\n key: 0,\n op50: \"\"\n }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", { op50: \"\" }, _toDisplayString(tasks.value?.length) + \" tasks in total\", 1)\n ])\n ]),\n _: 1\n }, 8, [\"search\", \"onUpdate:search\"]),\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(view) === 'tree' ? filterByCollection.value : filtered.value, (item) => {\n return (_openBlock(), _createBlock(ServerTaskListItem, {\n key: item.name,\n item: item\n }, null, 8, [\"item\"]))\n }), 128))\n ]\n }\n }),\n right: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div px4 py2 border=\"b base\"${\n _scopeId\n }> Cron groups </div><div${\n _scopeId\n }><ul${\n _scopeId\n }><!--[-->`)\n _ssrRenderList(scheduledTasks.value, (cronCollection) => {\n _push(`<li${_scopeId}>`)\n _push(_ssrRenderComponent(_component_CronCollection, { collection: cronCollection }, null, _parent, _scopeId))\n _push(`</li>`)\n })\n _push(`<!--]--></ul></div>`)\n } else {\n return [\n _createVNode(\"div\", {\n px4: \"\",\n py2: \"\",\n border: \"b base\"\n }, \" Cron groups \"),\n _createVNode(\"div\", null, [\n _createVNode(\"ul\", null, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(scheduledTasks.value, (cronCollection) => {\n return (_openBlock(), _createBlock(\"li\", {\n key: cronCollection.cron\n }, [\n _createVNode(_component_CronCollection, { collection: cronCollection }, null, 8, [\"collection\"])\n ]))\n }), 128))\n ])\n ])\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NSplitPane, {\n horizontal: \"\",\n \"storage-key\": \"tab-server-tasks-split\"\n }, {\n left: _withCtx(() => [\n _createVNode(_component_NNavbar, {\n search: search.value,\n \"onUpdate:search\": ($event: any) => ((search).value = $event),\n pb2: \"\"\n }, {\n actions: _withCtx(() => [\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: _unref(view) === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt',\n title: \"Toggle view\",\n border: false,\n onClick: toggleView\n }, null, 8, [\"icon\"]), [\n [_directive_tooltip, 'Toggle View']\n ]),\n _withDirectives(_createVNode(_component_NButton, {\n \"text-lg\": \"\",\n icon: \"i-carbon-cics-sit-overrides\",\n title: \"Default Inputs\",\n border: false,\n onClick: ($event: any) => (inputDefaultsDrawer.value = !inputDefaultsDrawer.value)\n }, null, 8, [\"onClick\"]), [\n [_directive_tooltip, 'Default Inputs']\n ])\n ]),\n default: _withCtx(() => [\n _createVNode(\"div\", {\n flex: \"~ gap1\",\n \"text-sm\": \"\"\n }, [\n (search.value)\n ? (_openBlock(), _createBlock(\"span\", {\n key: 0,\n op50: \"\"\n }, _toDisplayString(filtered.value.length) + \" matched · \", 1))\n : _createCommentVNode(\"\", true),\n _createVNode(\"span\", { op50: \"\" }, _toDisplayString(tasks.value?.length) + \" tasks in total\", 1)\n ])\n ]),\n _: 1\n }, 8, [\"search\", \"onUpdate:search\"]),\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(_unref(view) === 'tree' ? filterByCollection.value : filtered.value, (item) => {\n return (_openBlock(), _createBlock(ServerTaskListItem, {\n key: item.name,\n item: item\n }, null, 8, [\"item\"]))\n }), 128))\n ]),\n right: _withCtx(() => [\n _createVNode(\"div\", {\n px4: \"\",\n py2: \"\",\n border: \"b base\"\n }, \" Cron groups \"),\n _createVNode(\"div\", null, [\n _createVNode(\"ul\", null, [\n (_openBlock(true), _createBlock(_Fragment, null, _renderList(scheduledTasks.value, (cronCollection) => {\n return (_openBlock(), _createBlock(\"li\", {\n key: cronCollection.cron\n }, [\n _createVNode(_component_CronCollection, { collection: cronCollection }, null, 8, [\"collection\"])\n ]))\n }), 128))\n ])\n ])\n ]),\n _: 1\n })\n ]\n }\n }),\n right: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(``)\n if (selected.value) {\n _push(_ssrRenderComponent(_component_ServerTaskDetails, {\n key: selected.value.name,\n task: selected.value,\n onOpenDefaultInput: ($event: any) => (inputDefaultsDrawer.value = true)\n }, null, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n if (!selected.value) {\n _push(_ssrRenderComponent(_component_NPanelGrids, null, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_NCard, {\n px6: \"\",\n py2: \"\"\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<span op75${_scopeId}>Select a task to start</span>`)\n } else {\n return [\n _createVNode(\"span\", { op75: \"\" }, \"Select a task to start\")\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_NCard, {\n px6: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Select a task to start\")\n ]),\n _: 1\n })\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n } else {\n _push(`<!---->`)\n }\n } else {\n return [\n (_openBlock(), _createBlock(_KeepAlive, { max: 10 }, [\n (selected.value)\n ? (_openBlock(), _createBlock(_component_ServerTaskDetails, {\n key: selected.value.name,\n task: selected.value,\n onOpenDefaultInput: ($event: any) => (inputDefaultsDrawer.value = true)\n }, null, 8, [\"task\", \"onOpenDefaultInput\"]))\n : _createCommentVNode(\"\", true)\n ], 1024)),\n (!selected.value)\n ? (_openBlock(), _createBlock(_component_NPanelGrids, { key: 0 }, {\n default: _withCtx(() => [\n _createVNode(_component_NCard, {\n px6: \"\",\n py2: \"\"\n }, {\n default: _withCtx(() => [\n _createVNode(\"span\", { op75: \"\" }, \"Select a task to start\")\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n : _createCommentVNode(\"\", true)\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(_ssrRenderComponent(_component_NDrawer, {\n modelValue: inputDefaultsDrawer.value,\n \"onUpdate:modelValue\": ($event: any) => ((inputDefaultsDrawer).value = $event),\n \"auto-close\": \"\",\n \"max-w-xl\": \"\",\n \"min-w-xl\": \"\",\n onClose: ($event: any) => (inputDefaultsDrawer.value = false)\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(`<div${\n _scopeId\n }><div p4 border=\"b base\"${\n _scopeId\n }><span text-lg${\n _scopeId\n }>Default Inputs</span><br${\n _scopeId\n }><span text-white op50${\n _scopeId\n }>Merged as default for every task in DevTools</span></div>`)\n _push(_ssrRenderComponent(_component_NSectionBlock, {\n text: `Query ${_unref(inputDefaults).query?.length ? `(${_unref(inputDefaults).query.length})` : ''}`,\n padding: false,\n icon: _unref(ServerRouteTabIcons).query\n }, {\n default: _withCtx((_, _push, _parent, _scopeId) => {\n if (_push) {\n _push(_ssrRenderComponent(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults).query,\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults).query) = $event),\n py0: \"\",\n default: { active: true, type: 'string' }\n }, null, _parent, _scopeId))\n } else {\n return [\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults).query,\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults).query) = $event),\n py0: \"\",\n default: { active: true, type: 'string' }\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]\n }\n }),\n _: 1\n }, _parent, _scopeId))\n _push(`</div>`)\n } else {\n return [\n _createVNode(\"div\", null, [\n _createVNode(\"div\", {\n p4: \"\",\n border: \"b base\"\n }, [\n _createVNode(\"span\", { \"text-lg\": \"\" }, \"Default Inputs\"),\n _createVNode(\"br\"),\n _createVNode(\"span\", {\n \"text-white\": \"\",\n op50: \"\"\n }, \"Merged as default for every task in DevTools\")\n ]),\n _createVNode(_component_NSectionBlock, {\n text: `Query ${_unref(inputDefaults).query?.length ? `(${_unref(inputDefaults).query.length})` : ''}`,\n padding: false,\n icon: _unref(ServerRouteTabIcons).query\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ServerRouteInputs, {\n modelValue: _unref(inputDefaults).query,\n \"onUpdate:modelValue\": ($event: any) => ((_unref(inputDefaults).query) = $event),\n py0: \"\",\n default: { active: true, type: 'string' }\n }, null, 8, [\"modelValue\", \"onUpdate:modelValue\"])\n ]),\n _: 1\n }, 8, [\"text\", \"icon\"])\n ])\n ]\n }\n }),\n _: 1\n }, _parent))\n _push(`<!--]-->`)\n}\n}\n\n})","<script setup lang=\"ts\">\nimport type { ServerTaskInfo } from '~/../../src/types'\nimport Fuse from 'fuse.js'\nimport { computed, ref } from 'vue'\nimport { definePageMeta } from '#imports'\nimport ServerTaskListItem from '~/components/ServerTaskListItem.vue'\nimport { ServerRouteTabIcons } from '~/composables/constants'\nimport { useServerTasks } from '~/composables/state'\nimport { useCurrentServerTask } from '~/composables/state-routes'\nimport { useDevToolsOptions } from '~/composables/storage-options'\n\ndefinePageMeta({\n icon: 'codicon-run-all',\n title: 'Server Tasks',\n layout: 'full',\n category: 'server',\n show() {\n const { enabled } = useDevToolsOptions('serverTasks')\n const serverTasks = useServerTasks()\n return () => {\n if (!enabled.value)\n return false\n\n return Object.keys(serverTasks.value?.tasks ?? {}).length\n }\n },\n})\n\nconst inputDefaultsDrawer = ref(false)\n\nconst serverTasks = useServerTasks()\nconst tasks = computed<ServerTaskInfo[]>(() => Object.keys(serverTasks.value?.tasks ?? {}).map(taskKey => ({\n name: taskKey,\n ...serverTasks.value!.tasks[taskKey]!,\n type: 'task',\n})))\n\nconst scheduledTasks = computed(() => {\n return Object\n .entries(serverTasks.value?.scheduledTasks ?? {})\n .map(([cron, tasks]) => ({ cron, tasks }))\n})\n\nconst currentServerTask = useCurrentServerTask()\n\nconst { view, selectedTask, inputDefaults } = useDevToolsOptions('serverTasks')\n\nconst selected = computed(() => {\n if (!currentServerTask.value && selectedTask.value)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n currentServerTask.value = selectedTask.value.name\n\n const task = tasks.value.find(i => i.name === currentServerTask.value)\n\n if (currentServerTask.value !== selectedTask.value?.name && task)\n // eslint-disable-next-line vue/no-side-effects-in-computed-properties\n selectedTask.value = task\n return task\n})\n\nconst search = ref('')\nconst fuse = computed(() => new Fuse(tasks.value, {\n keys: [\n 'key',\n 'description',\n ],\n shouldSort: true,\n}))\n\nconst filtered = computed(() => {\n const result = search.value\n ? fuse.value.search(search.value).map(i => i.item)\n : tasks.value\n return result\n})\n\nconst filterByCollection = computed(() => {\n const collections: ServerTaskInfo[] = []\n\n const addTaskToCollection = (collection: ServerTaskInfo, route: ServerTaskInfo) => {\n collection.tasks ||= []\n collection.tasks.push(route)\n }\n\n const findOrCreateCollection = (taskName: string, parentCollection?: ServerTaskInfo) => {\n const existingCollection = parentCollection\n ? parentCollection.tasks?.find(t => t.name === taskName)\n : collections.find(c => c.name === taskName)\n\n if (existingCollection) {\n return {\n ...existingCollection,\n type: 'collection',\n } satisfies ServerTaskInfo\n }\n\n const newCollection: ServerTaskInfo = {\n name: taskName,\n handler: taskName,\n description: '',\n type: 'collection',\n tasks: [],\n }\n\n if (parentCollection)\n addTaskToCollection(parentCollection, newCollection)\n\n else\n collections.push(newCollection)\n\n return newCollection\n }\n\n filtered.value.forEach((item) => {\n let parentCollection: ServerTaskInfo | undefined\n const taskItem = {\n ...item,\n type: 'task',\n } satisfies ServerTaskInfo\n\n const taskParts = item.name.split(':')\n const collectionNames = taskParts.concat()\n\n if (collectionNames.length > 0 && collectionNames.at(-1)?.includes('.'))\n collectionNames.pop()\n\n collectionNames.forEach((collectionName) => {\n parentCollection = findOrCreateCollection(collectionName, parentCollection)\n })\n\n if (parentCollection)\n addTaskToCollection(parentCollection, taskItem)\n else\n collections.push(taskItem)\n })\n\n return collections\n})\n\nfunction toggleView() {\n view.value = view.value === 'tree' ? 'list' : 'tree'\n}\n</script>\n\n<template>\n <NSplitPane storage-key=\"tab-server-tasks\">\n <template #left>\n <NSplitPane horizontal storage-key=\"tab-server-tasks-split\">\n <template #left>\n <NNavbar v-model:search=\"search\" pb2>\n <template #actions>\n <NButton\n v-tooltip=\"'Toggle View'\"\n text-lg\n :icon=\"view === 'list' ? 'i-carbon-list' : 'i-carbon-tree-view-alt'\"\n title=\"Toggle view\"\n :border=\"false\"\n @click=\"toggleView\"\n />\n <NButton\n v-tooltip=\"'Default Inputs'\"\n text-lg\n icon=\"i-carbon-cics-sit-overrides\"\n title=\"Default Inputs\"\n :border=\"false\"\n @click=\"inputDefaultsDrawer = !inputDefaultsDrawer\"\n />\n </template>\n <div flex=\"~ gap1\" text-sm>\n <span v-if=\"search\" op50>{{ filtered.length }} matched · </span>\n <span op50>{{ tasks?.length }} tasks in total</span>\n </div>\n </NNavbar>\n <ServerTaskListItem\n v-for=\"item in view === 'tree' ? filterByCollection : filtered\"\n :key=\"item.name\"\n :item=\"item\"\n />\n </template>\n <template #right>\n <div px4 py2 border=\"b base\">\n Cron groups\n </div>\n <div>\n <ul>\n <li v-for=\"cronCollection in scheduledTasks\" :key=\"cronCollection.cron\">\n <CronCollection :collection=\"cronCollection\" />\n </li>\n </ul>\n </div>\n </template>\n </NSplitPane>\n </template>\n <template #right>\n <KeepAlive :max=\"10\">\n <ServerTaskDetails\n v-if=\"selected\"\n :key=\"selected.name\"\n :task=\"selected\"\n @open-default-input=\"inputDefaultsDrawer = true\"\n />\n </KeepAlive>\n <NPanelGrids v-if=\"!selected\">\n <NCard px6 py2>\n <span op75>Select a task to start</span>\n </NCard>\n </NPanelGrids>\n </template>\n </NSplitPane>\n <NDrawer v-model=\"inputDefaultsDrawer\" auto-close max-w-xl min-w-xl @close=\"inputDefaultsDrawer = false\">\n <div>\n <div p4 border=\"b base\">\n <span text-lg>Default Inputs</span>\n <br>\n <span text-white op50>Merged as default for every task in DevTools</span>\n </div>\n <NSectionBlock\n :text=\"`Query ${inputDefaults.query?.length ? `(${inputDefaults.query.length})` : ''}`\"\n :padding=\"false\"\n :icon=\"ServerRouteTabIcons.query\"\n >\n <ServerRouteInputs v-model=\"inputDefaults.query\" py0 :default=\"{ active: true, type: 'string' }\" />\n </NSectionBlock>\n </div>\n </NDrawer>\n</template>\n"],"version":3}
|