���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
/
unplugin
/
dist
/
rspack
/
loaders
/
Viewing: load.js
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/rspack/loaders/load.ts var load_exports = {}; __export(load_exports, { default: () => load }); module.exports = __toCommonJS(load_exports); // src/rspack/context.ts var import_path = require("path"); var import_buffer = require("buffer"); var import_acorn = require("acorn"); function contextOptionsFromCompilation(compilation) { return { addWatchFile(file) { compilation.fileDependencies.add(file); }, getWatchFiles() { return Array.from(compilation.fileDependencies); } }; } function createBuildContext(options, compilation) { return { parse(code, opts = {}) { return import_acorn.Parser.parse(code, { sourceType: "module", ecmaVersion: "latest", locations: true, ...opts }); }, addWatchFile(id) { options.addWatchFile((0, import_path.resolve)(process.cwd(), id)); }, emitFile(emittedFile) { const outFileName = emittedFile.fileName || emittedFile.name; if (emittedFile.source && outFileName) { const { sources } = compilation.compiler.webpack; compilation.emitAsset( outFileName, new sources.RawSource( typeof emittedFile.source === "string" ? emittedFile.source : import_buffer.Buffer.from(emittedFile.source) ) ); } }, getWatchFiles() { return options.getWatchFiles(); } }; } function createContext(loader) { return { error: (error) => loader.emitError(normalizeMessage(error)), warn: (message) => loader.emitWarning(normalizeMessage(message)) }; } function normalizeMessage(error) { const err = new Error(typeof error === "string" ? error : error.message); if (typeof error === "object") { err.stack = error.stack; err.cause = error.meta; } return err; } // src/utils.ts var import_path2 = require("path"); function normalizeAbsolutePath(path) { if ((0, import_path2.isAbsolute)(path)) return (0, import_path2.normalize)(path); else return path; } // src/rspack/utils.ts function decodeVirtualModuleId(encoded, plugin) { return decodeURIComponent(encoded.slice(plugin.__virtualModulePrefix.length)); } function isVirtualModuleId(encoded, plugin) { return encoded.startsWith(plugin.__virtualModulePrefix); } // src/rspack/loaders/load.ts async function load(source, map) { var _a; const callback = this.async(); const { unpluginName } = this.query; const plugin = (_a = this._compiler) == null ? void 0 : _a.$unpluginContext[unpluginName]; let id = this.resource; if (!(plugin == null ? void 0 : plugin.load) || !id) return callback(null, source, map); if (isVirtualModuleId(id, plugin)) id = decodeVirtualModuleId(id, plugin); const context = createContext(this); const res = await plugin.load.call( Object.assign( {}, this._compilation && createBuildContext(contextOptionsFromCompilation(this._compilation), this._compilation), context ), normalizeAbsolutePath(id) ); if (res == null) callback(null, source, map); else if (typeof res !== "string") callback(null, res.code, res.map ?? map); else callback(null, res, map); }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa