���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.1
/
nuxi
/
dist
/
chunks
/
Viewing: dev.mjs
import { fork } from 'node:child_process'; import { d as defineCommand, L, C } from '../shared/nuxi.fefc5017.mjs'; import './index2.mjs'; import 'node:http'; import 'node:https'; import 'node:util'; import 'node:net'; import 'node:os'; import 'node:path'; import 'node:process'; import 'node:tty'; import 'node:fs'; import 'node:fs/promises'; import { s as showVersions } from '../shared/nuxi.a5aa4ada.mjs'; import { l as loadKit } from '../shared/nuxi.f76c700d.mjs'; import { i as importModule } from '../shared/nuxi.b29fd623.mjs'; import { o as overrideEnv } from '../shared/nuxi.2509f57e.mjs'; import { s as sharedArgs, l as legacyRootDirArgs, r as resolve } from '../shared/nuxi.610c92ff.mjs'; import { s as setupDotenv } from '../shared/nuxi.16bb8ddb.mjs'; import 'node:url'; import '../shared/nuxi.2155838d.mjs'; import 'http'; import 'https'; import '../shared/nuxi.eaa29140.mjs'; import 'crypto'; import '../shared/nuxi.d3241ca4.mjs'; import 'tty'; import '../shared/nuxi.5aaa4630.mjs'; import 'node:module'; import 'node:perf_hooks'; import './satisfies.mjs'; import '../shared/nuxi.de533993.mjs'; import '../shared/nuxi.cd7bfae6.mjs'; import '../shared/nuxi.deb0a220.mjs'; import 'node:assert'; import 'node:v8'; import '../shared/nuxi.88c35b8d.mjs'; import 'fs'; import 'module'; import 'path'; import 'perf_hooks'; import 'os'; import 'vm'; import 'url'; import 'assert'; import 'process'; import 'v8'; import 'util'; import 'node:crypto'; import '../shared/nuxi.15c58622.mjs'; function getArgs() { return { port: { type: "string", description: "Port to listen on (use `PORT` environment variable to override)" }, host: { description: "Host to listen on. If no value or an empty string provided, will listen on all available interfaces (use `HOST` environment variable to override)" }, clipboard: { type: "boolean", description: "Copy the URL to the clipboard" }, open: { type: "boolean", description: "Open the URL in the browser" }, https: { type: "boolean", description: "Enable HTTPS" }, "https.cert": { type: "string", description: "Path to TLS certificate used with HTTPS in PEM format" }, "https.key": { type: "string", description: "Path to TLS key used with HTTPS in PEM format" }, "https.pfx": { type: "string", description: "Path to PKCS#12 (.p12/.pfx) keystore containing a TLS certificate and Key" }, "https.passphrase": { type: "string", description: "Passphrase used for TLS key or keystore" }, "https.validityDays": { type: "string", description: "Validity in days of the autogenerated TLS certificate (https: true)" }, "https.domains": { type: "string", description: "Comma seperated list of domains and IPs, the autogenerated certificate should be valid for (https: true)" }, publicURL: { type: "string", description: "Displayed public URL (used for QR code)", required: false }, qr: { type: "boolean", description: "Display The QR code of public URL when available", required: false }, public: { type: "boolean", description: "Listen to all network interfaces", required: false }, tunnel: { type: "boolean", description: "Open a tunnel using https://github.com/unjs/untun", required: false } }; } function parseArgs(args) { return { port: args.port, // prettier-ignore hostname: typeof args.host === "string" ? args.host : args.host === true ? "" : void 0, clipboard: args.clipboard, open: args.open, qr: args.qr, publicURL: args.publicURL, public: args.public, tunnel: args.tunnel, https: args.https ? { cert: args["https.cert"], key: args["https.key"], pfx: args["https.pfx"], passphrase: args["https.passphrase"], validityDays: args["https.validityDays"] ? +args["https.validityDays"] : void 0, domains: args["https.domains"] ? args["https.domains"].split(",") : void 0 } : false }; } const forkSupported = !L && !C; const command = defineCommand({ meta: { name: "dev", description: "Run Nuxt development server" }, args: { ...sharedArgs, ...legacyRootDirArgs, ...getArgs(), dotenv: { type: "string", description: "Path to .env file" }, clear: { type: "boolean", description: "Clear console on restart" }, fork: { type: "boolean", description: forkSupported ? "Disable forked mode" : "Enable forked mode", default: forkSupported } }, async run(ctx) { overrideEnv("development"); const cwd = resolve(ctx.args.cwd || ctx.args.rootDir || "."); showVersions(cwd); await setupDotenv({ cwd, fileName: ctx.args.dotenv }); const { loadNuxtConfig } = await loadKit(cwd); const nuxtOptions = await loadNuxtConfig({ cwd, overrides: { dev: true, logLevel: ctx.args.logLevel, ...ctx.data?.overrides } }); const listenOptions = _resolveListenOptions(nuxtOptions, ctx.args); if (ctx.args.fork) { const devProxy = await _createDevProxy(nuxtOptions, listenOptions); await _startSubprocess(devProxy, ctx.rawArgs); return { listener: devProxy?.listener }; } else { const { createNuxtDevServer } = await import('./dev2.mjs'); const devServer = await createNuxtDevServer( { cwd, overrides: ctx.data?.overrides, logLevel: ctx.args.logLevel, clear: ctx.args.clear, dotenv: !!ctx.args.dotenv, loadingTemplate: nuxtOptions.devServer.loadingTemplate, devContext: {} }, listenOptions ); await devServer.init(); return { listener: devServer?.listener }; } } }); async function _createDevProxy(nuxtOptions, listenOptions) { let loadingMessage = "Nuxt dev server is starting..."; const loadingTemplate = nuxtOptions.devServer.loadingTemplate ?? await importModule("@nuxt/ui-templates", nuxtOptions.modulesDir).then( (r) => r.loading ); const { createProxyServer } = await import('./index4.mjs'); const proxy = createProxyServer({}); let address; const handler = (req, res) => { if (!address) { res.statusCode = 503; res.setHeader("Content-Type", "text/html"); res.end(loadingTemplate({ loading: loadingMessage })); return; } return proxy.web(req, res, { target: address }); }; const wsHandler = (req, socket, head) => { if (!address) { socket.destroy(); return; } return proxy.ws(req, socket, { target: address }, head); }; const { listen } = await import('./index2.mjs'); const listener = await listen(handler, listenOptions); listener.server.on("upgrade", wsHandler); return { listener, handler, wsHandler, setAddress: (_addr) => { address = _addr; }, setLoadingMessage: (_msg) => { loadingMessage = _msg; } }; } async function _startSubprocess(devProxy, rawArgs) { let childProc; const kill = (signal) => { if (childProc) { childProc.kill(signal); childProc = void 0; } }; const restart = async () => { kill("SIGHUP"); childProc = fork(globalThis.__nuxt_cli__.entry, ["_dev", ...rawArgs], { execArgv: [ "--enable-source-maps", process.argv.includes("--inspect") && "--inspect" ].filter(Boolean), env: { ...process.env, __NUXT_DEV__: JSON.stringify({ proxy: { url: devProxy.listener.url, urls: await devProxy.listener.getURLs(), https: devProxy.listener.https } }) } }); childProc.on("close", (errorCode) => { if (errorCode) { process.exit(errorCode); } }); childProc.on("message", (message) => { if (message.type === "nuxt:internal:dev:ready") { devProxy.setAddress(`http://127.0.0.1:${message.port}`); } else if (message.type === "nuxt:internal:dev:loading") { devProxy.setAddress(void 0); devProxy.setLoadingMessage(message.message); } else if (message.type === "nuxt:internal:dev:restart") { restart(); } }); }; for (const signal of [ "exit", "SIGTERM", "SIGINT", "SIGQUIT" ]) { process.once(signal, () => { kill(signal === "exit" ? 0 : signal); }); } await restart(); return { restart, kill }; } function _resolveListenOptions(nuxtOptions, args) { const _port = args.port ?? args.p ?? process.env.NUXT_PORT ?? process.env.NITRO_PORT ?? process.env.PORT ?? nuxtOptions.devServer.port; const _hostname = typeof args.host === "string" ? args.host : (args.host === true ? "" : void 0) ?? process.env.NUXT_HOST ?? process.env.NITRO_HOST ?? process.env.HOST ?? nuxtOptions._layers?.[0].config?.devServer?.host ?? void 0; const _public = args.public ?? (_hostname && !["localhost", "127.0.0.1", "::1"].includes(_hostname)) ? true : void 0; const _httpsCert = args["https.cert"] || args.sslCert || process.env.NUXT_SSL_CERT || process.env.NITRO_SSL_CERT || typeof nuxtOptions.devServer.https !== "boolean" && nuxtOptions.devServer.https?.cert || ""; const _httpsKey = args["https.key"] || args.sslKey || process.env.NUXT_SSL_KEY || process.env.NITRO_SSL_KEY || typeof nuxtOptions.devServer.https !== "boolean" && nuxtOptions.devServer.https?.key || ""; const httpsEnabled = args.https == true || args.https === void 0 && !!nuxtOptions.devServer.https; const _listhenOptions = parseArgs({ ...args, "open": args.o || args.open, "https": httpsEnabled, "https.cert": _httpsCert, "https.key": _httpsKey }); const httpsOptions = httpsEnabled && { ...nuxtOptions.devServer.https, ..._listhenOptions.https }; return { ..._listhenOptions, port: _port, hostname: _hostname, public: _public, https: httpsOptions, baseURL: nuxtOptions.app.baseURL }; } export { command as default };
Coded With 💗 by
0x6ick Mod By V1rus_Alfa