���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
node_modules.2
/
nitropack
/
dist
/
runtime
/
routes
/
Viewing: openapi.mjs
import { eventHandler, getRequestURL } from "h3"; import { joinURL } from "ufo"; import { handlersMeta } from "#internal/nitro/virtual/server-handlers"; import { useRuntimeConfig } from "#internal/nitro"; export default eventHandler((event) => { const base = useRuntimeConfig()?.app?.baseURL; const url = joinURL(getRequestURL(event).origin, base); return { openapi: "3.1.0", info: { title: "Nitro Server Routes", version: null }, servers: [ { url, description: "Local Development Server", variables: {} } ], paths: getPaths() }; }); function getPaths() { const paths = {}; for (const h of handlersMeta) { const { route, parameters } = normalizeRoute(h.route); const tags = defaultTags(h.route); const method = (h.method || "get").toLowerCase(); const item = { [method]: { tags, parameters, responses: { 200: { description: "OK" } } } }; if (paths[route] === void 0) { paths[route] = item; } else { Object.assign(paths[route], item); } } return paths; } function normalizeRoute(_route) { const parameters = []; let anonymousCtr = 0; const route = _route.replace(/:(\w+)/g, (_, name) => `{${name}}`).replace(/\/(\*)\//g, () => `/{param${++anonymousCtr}}/`).replace(/\*\*{/, "{").replace(/\/(\*\*)$/g, () => `/{*param${++anonymousCtr}}`); const paramMatches = route.matchAll(/{(\*?\w+)}/g); for (const match of paramMatches) { const name = match[1]; if (!parameters.some((p) => p.name === name)) { parameters.push({ name, in: "path", required: true, schema: { type: "string" } }); } } return { route, parameters }; } function defaultTags(route) { const tags = []; if (route.startsWith("/api/")) { tags.push("API Routes"); } else if (route.startsWith("/_")) { tags.push("Internal"); } else { tags.push("App Routes"); } return tags; }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa