vite8.3.81.3 MB
Shown as plain text from the published tarball, after apm checked it against the version's checksum. Nothing in it runs on this page.
if (file === assets) return true;
const parent = path.dirname(file);
if (fs.readdirSync(parent).includes(path.basename(file))) return hasCorrectCase(parent, assets);
return false;
}
function removeLeadingSlash(str) {
return str[0] === "/" ? str.slice(1) : str;
}
function stripBase(path, base) {
if (path === base) return "/";
const devBase = withTrailingSlash(base);
return path.startsWith(devBase) ? path.slice(devBase.length - 1) : path;
}
function arrayEqual(a, b) {
if (a === b) return true;
if (a.length !== b.length) return false;
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
return true;
}
function evalValue(rawValue) {
return new Function(`
var console, exports, global, module, process, require
return (\n${rawValue}\n)
`)();
}
function getNpmPackageName(importPath) {
const parts = importPath.split("/");
if (parts[0][0] === "@") {
if (!parts[1]) return null;
return `${parts[0]}/${parts[1]}`;
} else return parts[0];
}
function getPkgName(name) {
return name[0] === "@" ? name.split("/")[1] : name;
}
const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
function escapeRegex(str) {
return str.replace(escapeRegexRE, "\\$&");
}
function getPackageManagerCommand(type = "install") {
const packageManager = process.env.npm_config_user_agent?.split(" ")[0].split("/")[0] || "npm";
This file is 1.3 MB, over the 1.0 MB the full view shows, so apm shows the lines around the cited one. Lines longer than 4 kB are cut.