���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: analyze.mjs
import { promises } from 'node:fs'; import { c as createApp, e as eventHandler, l as lazyEventHandler, t as toNodeListener } from '../shared/nuxi.066853fe.mjs'; import { listen } from './index2.mjs'; import { d as defu } from '../shared/nuxi.eaa29140.mjs'; import { d as defineCommand } from '../shared/nuxi.fefc5017.mjs'; import { l as loadKit } from '../shared/nuxi.f76c700d.mjs'; import { c as clearDir } from '../shared/nuxi.c6cd7627.mjs'; import { o as overrideEnv } from '../shared/nuxi.2509f57e.mjs'; import { s as sharedArgs, l as legacyRootDirArgs, r as resolve, j as join } from '../shared/nuxi.610c92ff.mjs'; import '../shared/nuxi.deb0a220.mjs'; import 'node:http'; import 'node:https'; import 'node:util'; import 'node:net'; import 'node:os'; import '../shared/nuxi.2155838d.mjs'; import 'http'; import 'https'; import 'node:path'; import 'node:process'; import 'node:tty'; import 'node:child_process'; import 'crypto'; import 'node:fs/promises'; import 'node:url'; import 'node:perf_hooks'; import './satisfies.mjs'; import '../shared/nuxi.de533993.mjs'; import '../shared/nuxi.cd7bfae6.mjs'; import 'node:module'; 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 'tty'; import 'node:crypto'; import '../shared/nuxi.15c58622.mjs'; import '../shared/nuxi.b29fd623.mjs'; const analyze = defineCommand({ meta: { name: "analyze", description: "Build nuxt and analyze production bundle (experimental)" }, args: { ...sharedArgs, ...legacyRootDirArgs, name: { type: "string", description: "Name of the analysis", default: "default" }, serve: { type: "boolean", description: "Serve the analysis results", default: true } }, async run(ctx) { overrideEnv("production"); const cwd = resolve(ctx.args.cwd || ctx.args.rootDir || "."); const name = ctx.args.name || "default"; const slug = name.trim().replace(/[^\w-]/g, "_"); const startTime = Date.now(); const { loadNuxt, buildNuxt } = await loadKit(cwd); const nuxt = await loadNuxt({ cwd, overrides: defu(ctx.data?.overrides, { build: { analyze: { enabled: true } }, logLevel: ctx.args.logLevel }) }); const analyzeDir = nuxt.options.analyzeDir; const buildDir = nuxt.options.buildDir; const outDir = nuxt.options.nitro.output?.dir || join(nuxt.options.rootDir, ".output"); nuxt.options.build.analyze = defu(nuxt.options.build.analyze, { filename: join(analyzeDir, "client.html") }); await clearDir(analyzeDir); await buildNuxt(nuxt); const endTime = Date.now(); const meta = { name, slug, startTime, endTime, analyzeDir, buildDir, outDir }; await nuxt.callHook("build:analyze:done", meta); await promises.writeFile( join(analyzeDir, "meta.json"), JSON.stringify(meta, null, 2), "utf-8" ); console.info("Analyze results are available at: `" + analyzeDir + "`"); console.warn( "Do not deploy analyze results! Use `nuxi build` before deploying." ); if (ctx.args.serve !== false && !process.env.CI) { const app = createApp(); const serveFile = (filePath) => lazyEventHandler(async () => { const contents = await promises.readFile(filePath, "utf-8"); return eventHandler((event) => { event.node.res.end(contents); }); }); console.info("Starting stats server..."); app.use("/client", serveFile(join(analyzeDir, "client.html"))); app.use("/nitro", serveFile(join(analyzeDir, "nitro.html"))); app.use( eventHandler( () => `<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Nuxt Bundle Stats (experimental)</title> </head> <h1>Nuxt Bundle Stats (experimental)</h1> <ul> <li> <a href="/nitro">Nitro server bundle stats</a> </li> <li> <a href="/client">Client bundle stats</a> </li> </ul> </html> ` ) ); await listen(toNodeListener(app)); } } }); export { analyze as default };
Coded With 💗 by
0x6ick Mod By V1rus_Alfa