initial commit
This commit is contained in:
52
node_modules/nuxi/dist/shared/nuxi.1b1e0b8b.mjs
generated
vendored
Normal file
52
node_modules/nuxi/dist/shared/nuxi.1b1e0b8b.mjs
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import require$$0 from 'assert';
|
||||
import { g as gray, b as bold, a as green } from './nuxi.a3b9dacd.mjs';
|
||||
import { t as tryRequireModule } from './nuxi.e551a86b.mjs';
|
||||
|
||||
const version = "3.0.0";
|
||||
const engines = {
|
||||
node: "^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
};
|
||||
|
||||
var assert = require$$0;
|
||||
|
||||
var clear = function clear(opts) {
|
||||
if (typeof (opts) === 'boolean') {
|
||||
opts = {
|
||||
fullClear: opts
|
||||
};
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
assert(typeof (opts) === 'object', 'opts must be an object');
|
||||
|
||||
opts.fullClear = opts.hasOwnProperty('fullClear') ?
|
||||
opts.fullClear : true;
|
||||
|
||||
assert(typeof (opts.fullClear) === 'boolean',
|
||||
'opts.fullClear must be a boolean');
|
||||
|
||||
if (opts.fullClear === true) {
|
||||
process.stdout.write('\x1b[2J');
|
||||
}
|
||||
|
||||
process.stdout.write('\x1b[0f');
|
||||
};
|
||||
|
||||
function showBanner(_clear) {
|
||||
if (_clear) {
|
||||
clear();
|
||||
}
|
||||
console.log(gray(`Nuxi ${bold(version)}`));
|
||||
}
|
||||
function showVersions(cwd) {
|
||||
const getPkgVersion = (pkg) => {
|
||||
return tryRequireModule(`${pkg}/package.json`, cwd)?.version || "";
|
||||
};
|
||||
const nuxtVersion = getPkgVersion("nuxt") || getPkgVersion("nuxt-edge");
|
||||
const nitroVersion = getPkgVersion("nitropack");
|
||||
console.log(gray(
|
||||
green(`Nuxt ${bold(nuxtVersion)}`) + (nitroVersion ? ` with Nitro ${bold(nitroVersion)}` : "")
|
||||
));
|
||||
}
|
||||
|
||||
export { showVersions as a, engines as e, showBanner as s };
|
||||
17
node_modules/nuxi/dist/shared/nuxi.2135311a.mjs
generated
vendored
Normal file
17
node_modules/nuxi/dist/shared/nuxi.2135311a.mjs
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { m as magenta, c as cyan } from './nuxi.a3b9dacd.mjs';
|
||||
|
||||
function showHelp(meta) {
|
||||
const sections = [];
|
||||
if (meta) {
|
||||
if (meta.usage) {
|
||||
sections.push(magenta("> ") + "Usage: " + cyan(meta.usage));
|
||||
}
|
||||
if (meta.description) {
|
||||
sections.push(magenta("\u22EE ") + meta.description);
|
||||
}
|
||||
}
|
||||
sections.push(`Use ${cyan("npx nuxi [command] --help")} to see help for each command`);
|
||||
console.log(sections.join("\n\n") + "\n");
|
||||
}
|
||||
|
||||
export { showHelp as s };
|
||||
25
node_modules/nuxi/dist/shared/nuxi.24a0f992.mjs
generated
vendored
Normal file
25
node_modules/nuxi/dist/shared/nuxi.24a0f992.mjs
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { execSync } from 'node:child_process';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { f as findup } from './nuxi.74850c25.mjs';
|
||||
import { r as resolve } from './nuxi.a2d9d2e1.mjs';
|
||||
|
||||
const packageManagerLocks = {
|
||||
yarn: "yarn.lock",
|
||||
npm: "package-lock.json",
|
||||
pnpm: "pnpm-lock.yaml"
|
||||
};
|
||||
function getPackageManager(rootDir) {
|
||||
return findup(rootDir, (dir) => {
|
||||
for (const name in packageManagerLocks) {
|
||||
const path = packageManagerLocks[name];
|
||||
if (path && existsSync(resolve(dir, path))) {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function getPackageManagerVersion(name) {
|
||||
return execSync(`${name} --version`).toString("utf8").trim();
|
||||
}
|
||||
|
||||
export { getPackageManagerVersion as a, getPackageManager as g, packageManagerLocks as p };
|
||||
92
node_modules/nuxi/dist/shared/nuxi.30988785.mjs
generated
vendored
Normal file
92
node_modules/nuxi/dist/shared/nuxi.30988785.mjs
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import { promises } from 'node:fs';
|
||||
import { d as defu } from './nuxi.d0ea9d71.mjs';
|
||||
import { g as getModulePaths, a as getNearestPackage } from './nuxi.e551a86b.mjs';
|
||||
import { a as relative, j as join, r as resolve, i as isAbsolute } from './nuxi.a2d9d2e1.mjs';
|
||||
|
||||
const writeTypes = async (nuxt) => {
|
||||
const modulePaths = getModulePaths(nuxt.options.modulesDir);
|
||||
const tsConfig = defu(nuxt.options.typescript?.tsConfig, {
|
||||
compilerOptions: {
|
||||
jsx: "preserve",
|
||||
target: "ESNext",
|
||||
module: "ESNext",
|
||||
moduleResolution: "Node",
|
||||
skipLibCheck: true,
|
||||
strict: nuxt.options.typescript?.strict ?? false,
|
||||
allowJs: true,
|
||||
noEmit: true,
|
||||
resolveJsonModule: true,
|
||||
allowSyntheticDefaultImports: true,
|
||||
types: ["node"],
|
||||
baseUrl: relative(nuxt.options.buildDir, nuxt.options.rootDir),
|
||||
paths: {}
|
||||
},
|
||||
include: [
|
||||
"./nuxt.d.ts",
|
||||
join(relative(nuxt.options.buildDir, nuxt.options.rootDir), "**/*"),
|
||||
...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), "**/*")] : [],
|
||||
...nuxt.options.typescript.includeWorkspace && nuxt.options.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), "**/*")] : []
|
||||
],
|
||||
exclude: [
|
||||
relative(nuxt.options.buildDir, resolve(nuxt.options.rootDir, "dist"))
|
||||
]
|
||||
});
|
||||
const aliases = {
|
||||
...nuxt.options.alias,
|
||||
"#build": nuxt.options.buildDir
|
||||
};
|
||||
const excludedAlias = [/^@vue\/.*$/];
|
||||
for (const alias in aliases) {
|
||||
if (excludedAlias.some((re) => re.test(alias))) {
|
||||
continue;
|
||||
}
|
||||
const relativePath = isAbsolute(aliases[alias]) ? relative(nuxt.options.rootDir, aliases[alias]) || "." : aliases[alias];
|
||||
const stats = await promises.stat(resolve(nuxt.options.rootDir, relativePath)).catch(() => null);
|
||||
tsConfig.compilerOptions = tsConfig.compilerOptions || {};
|
||||
if (stats?.isDirectory()) {
|
||||
tsConfig.compilerOptions.paths[alias] = [relativePath];
|
||||
tsConfig.compilerOptions.paths[`${alias}/*`] = [`${relativePath}/*`];
|
||||
} else {
|
||||
tsConfig.compilerOptions.paths[alias] = [relativePath.replace(/(?<=\w)\.\w+$/g, "")];
|
||||
}
|
||||
}
|
||||
const references = [
|
||||
...nuxt.options.modules,
|
||||
...nuxt.options._modules
|
||||
].filter((f) => typeof f === "string").map((id) => ({ types: getNearestPackage(id, modulePaths)?.name || id }));
|
||||
if (nuxt.options.experimental?.reactivityTransform) {
|
||||
references.push({ types: "vue/macros-global" });
|
||||
}
|
||||
const declarations = [];
|
||||
await nuxt.callHook("prepare:types", { references, declarations, tsConfig });
|
||||
const declaration = [
|
||||
...references.map((ref) => {
|
||||
if ("path" in ref && isAbsolute(ref.path)) {
|
||||
ref.path = relative(nuxt.options.buildDir, ref.path);
|
||||
}
|
||||
return `/// <reference ${renderAttrs(ref)} />`;
|
||||
}),
|
||||
...declarations,
|
||||
"",
|
||||
"export {}",
|
||||
""
|
||||
].join("\n");
|
||||
async function writeFile() {
|
||||
const GeneratedBy = "// Generated by nuxi";
|
||||
const tsConfigPath = resolve(nuxt.options.buildDir, "tsconfig.json");
|
||||
await promises.mkdir(nuxt.options.buildDir, { recursive: true });
|
||||
await promises.writeFile(tsConfigPath, GeneratedBy + "\n" + JSON.stringify(tsConfig, null, 2));
|
||||
const declarationPath = resolve(nuxt.options.buildDir, "nuxt.d.ts");
|
||||
await promises.writeFile(declarationPath, GeneratedBy + "\n" + declaration);
|
||||
}
|
||||
nuxt.hook("builder:prepared", writeFile);
|
||||
await writeFile();
|
||||
};
|
||||
function renderAttrs(obj) {
|
||||
return Object.entries(obj).map((e) => renderAttr(e[0], e[1])).join(" ");
|
||||
}
|
||||
function renderAttr(key, value) {
|
||||
return value ? `${key}="${value}"` : "";
|
||||
}
|
||||
|
||||
export { writeTypes as w };
|
||||
1065
node_modules/nuxi/dist/shared/nuxi.30bccfab.mjs
generated
vendored
Normal file
1065
node_modules/nuxi/dist/shared/nuxi.30bccfab.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1071
node_modules/nuxi/dist/shared/nuxi.6b390535.mjs
generated
vendored
Normal file
1071
node_modules/nuxi/dist/shared/nuxi.6b390535.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
33
node_modules/nuxi/dist/shared/nuxi.74850c25.mjs
generated
vendored
Normal file
33
node_modules/nuxi/dist/shared/nuxi.74850c25.mjs
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { promises } from 'node:fs';
|
||||
import { c as consola } from './nuxi.b2fdb45d.mjs';
|
||||
import { d as dirname } from './nuxi.a2d9d2e1.mjs';
|
||||
|
||||
async function clearDir(path) {
|
||||
await promises.rm(path, { recursive: true, force: true });
|
||||
await promises.mkdir(path, { recursive: true });
|
||||
}
|
||||
async function rmRecursive(paths) {
|
||||
await Promise.all(paths.filter((p) => typeof p === "string").map(async (path) => {
|
||||
consola.debug("Removing recursive path", path);
|
||||
await promises.rm(path, { recursive: true, force: true }).catch(() => {
|
||||
});
|
||||
}));
|
||||
}
|
||||
async function touchFile(path) {
|
||||
const time = new Date();
|
||||
await promises.utimes(path, time, time).catch(() => {
|
||||
});
|
||||
}
|
||||
function findup(rootDir, fn) {
|
||||
let dir = rootDir;
|
||||
while (dir !== dirname(dir)) {
|
||||
const res = fn(dir);
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
dir = dirname(dir);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export { clearDir as c, findup as f, rmRecursive as r, touchFile as t };
|
||||
530
node_modules/nuxi/dist/shared/nuxi.8adf0664.mjs
generated
vendored
Normal file
530
node_modules/nuxi/dist/shared/nuxi.8adf0664.mjs
generated
vendored
Normal file
@@ -0,0 +1,530 @@
|
||||
import { promises } from 'node:fs';
|
||||
import { c as consola } from './nuxi.b2fdb45d.mjs';
|
||||
import { r as rmRecursive } from './nuxi.74850c25.mjs';
|
||||
import { r as resolve, d as dirname } from './nuxi.a2d9d2e1.mjs';
|
||||
|
||||
const defaults = {
|
||||
ignoreUnknown: false,
|
||||
respectType: false,
|
||||
respectFunctionNames: false,
|
||||
respectFunctionProperties: false,
|
||||
unorderedObjects: true,
|
||||
unorderedArrays: false,
|
||||
unorderedSets: false
|
||||
};
|
||||
function objectHash(object, options = {}) {
|
||||
options = { ...defaults, ...options };
|
||||
const hasher = createHasher(options);
|
||||
hasher.dispatch(object);
|
||||
return hasher.toString();
|
||||
}
|
||||
function createHasher(options) {
|
||||
const buff = [];
|
||||
let context = [];
|
||||
const write = (str) => {
|
||||
buff.push(str);
|
||||
};
|
||||
return {
|
||||
toString() {
|
||||
return buff.join("");
|
||||
},
|
||||
getContext() {
|
||||
return context;
|
||||
},
|
||||
dispatch(value) {
|
||||
if (options.replacer) {
|
||||
value = options.replacer(value);
|
||||
}
|
||||
const type = value === null ? "null" : typeof value;
|
||||
return this["_" + type](value);
|
||||
},
|
||||
_object(object) {
|
||||
const pattern = /\[object (.*)]/i;
|
||||
const objString = Object.prototype.toString.call(object);
|
||||
const _objType = pattern.exec(objString);
|
||||
const objType = _objType ? _objType[1].toLowerCase() : "unknown:[" + objString.toLowerCase() + "]";
|
||||
let objectNumber = null;
|
||||
if ((objectNumber = context.indexOf(object)) >= 0) {
|
||||
return this.dispatch("[CIRCULAR:" + objectNumber + "]");
|
||||
} else {
|
||||
context.push(object);
|
||||
}
|
||||
if (typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(object)) {
|
||||
write("buffer:");
|
||||
return write(object.toString("utf8"));
|
||||
}
|
||||
if (objType !== "object" && objType !== "function" && objType !== "asyncfunction") {
|
||||
if (this["_" + objType]) {
|
||||
this["_" + objType](object);
|
||||
} else if (options.ignoreUnknown) {
|
||||
return write("[" + objType + "]");
|
||||
} else {
|
||||
throw new Error('Unknown object type "' + objType + '"');
|
||||
}
|
||||
} else {
|
||||
let keys = Object.keys(object);
|
||||
if (options.unorderedObjects) {
|
||||
keys = keys.sort();
|
||||
}
|
||||
if (options.respectType !== false && !isNativeFunction(object)) {
|
||||
keys.splice(0, 0, "prototype", "__proto__", "letructor");
|
||||
}
|
||||
if (options.excludeKeys) {
|
||||
keys = keys.filter(function(key) {
|
||||
return !options.excludeKeys(key);
|
||||
});
|
||||
}
|
||||
write("object:" + keys.length + ":");
|
||||
for (const key of keys) {
|
||||
this.dispatch(key);
|
||||
write(":");
|
||||
if (!options.excludeValues) {
|
||||
this.dispatch(object[key]);
|
||||
}
|
||||
write(",");
|
||||
}
|
||||
}
|
||||
},
|
||||
_array(arr, unordered) {
|
||||
unordered = typeof unordered !== "undefined" ? unordered : options.unorderedArrays !== false;
|
||||
write("array:" + arr.length + ":");
|
||||
if (!unordered || arr.length <= 1) {
|
||||
for (const entry of arr) {
|
||||
this.dispatch(entry);
|
||||
}
|
||||
return;
|
||||
}
|
||||
const contextAdditions = [];
|
||||
const entries = arr.map((entry) => {
|
||||
const hasher = createHasher(options);
|
||||
hasher.dispatch(entry);
|
||||
contextAdditions.push(hasher.getContext());
|
||||
return hasher.toString();
|
||||
});
|
||||
context = [...context, ...contextAdditions];
|
||||
entries.sort();
|
||||
return this._array(entries, false);
|
||||
},
|
||||
_date(date) {
|
||||
return write("date:" + date.toJSON());
|
||||
},
|
||||
_symbol(sym) {
|
||||
return write("symbol:" + sym.toString());
|
||||
},
|
||||
_error(err) {
|
||||
return write("error:" + err.toString());
|
||||
},
|
||||
_boolean(bool) {
|
||||
return write("bool:" + bool.toString());
|
||||
},
|
||||
_string(string) {
|
||||
write("string:" + string.length + ":");
|
||||
write(string.toString());
|
||||
},
|
||||
_function(fn) {
|
||||
write("fn:");
|
||||
if (isNativeFunction(fn)) {
|
||||
this.dispatch("[native]");
|
||||
} else {
|
||||
this.dispatch(fn.toString());
|
||||
}
|
||||
if (options.respectFunctionNames !== false) {
|
||||
this.dispatch("function-name:" + String(fn.name));
|
||||
}
|
||||
if (options.respectFunctionProperties) {
|
||||
this._object(fn);
|
||||
}
|
||||
},
|
||||
_number(number) {
|
||||
return write("number:" + number.toString());
|
||||
},
|
||||
_xml(xml) {
|
||||
return write("xml:" + xml.toString());
|
||||
},
|
||||
_null() {
|
||||
return write("Null");
|
||||
},
|
||||
_undefined() {
|
||||
return write("Undefined");
|
||||
},
|
||||
_regexp(regex) {
|
||||
return write("regex:" + regex.toString());
|
||||
},
|
||||
_uint8array(arr) {
|
||||
write("uint8array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_uint8clampedarray(arr) {
|
||||
write("uint8clampedarray:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_int8array(arr) {
|
||||
write("int8array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_uint16array(arr) {
|
||||
write("uint16array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_int16array(arr) {
|
||||
write("int16array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_uint32array(arr) {
|
||||
write("uint32array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_int32array(arr) {
|
||||
write("int32array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_float32array(arr) {
|
||||
write("float32array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_float64array(arr) {
|
||||
write("float64array:");
|
||||
return this.dispatch(Array.prototype.slice.call(arr));
|
||||
},
|
||||
_arraybuffer(arr) {
|
||||
write("arraybuffer:");
|
||||
return this.dispatch(new Uint8Array(arr));
|
||||
},
|
||||
_url(url) {
|
||||
return write("url:" + url.toString());
|
||||
},
|
||||
_map(map) {
|
||||
write("map:");
|
||||
const arr = [...map];
|
||||
return this._array(arr, options.unorderedSets !== false);
|
||||
},
|
||||
_set(set) {
|
||||
write("set:");
|
||||
const arr = [...set];
|
||||
return this._array(arr, options.unorderedSets !== false);
|
||||
},
|
||||
_file(file) {
|
||||
write("file:");
|
||||
return this.dispatch([file.name, file.size, file.type, file.lastModfied]);
|
||||
},
|
||||
_blob() {
|
||||
if (options.ignoreUnknown) {
|
||||
return write("[blob]");
|
||||
}
|
||||
throw new Error('Hashing Blob objects is currently not supported\nUse "options.replacer" or "options.ignoreUnknown"\n');
|
||||
},
|
||||
_domwindow() {
|
||||
return write("domwindow");
|
||||
},
|
||||
_bigint(number) {
|
||||
return write("bigint:" + number.toString());
|
||||
},
|
||||
_process() {
|
||||
return write("process");
|
||||
},
|
||||
_timer() {
|
||||
return write("timer");
|
||||
},
|
||||
_pipe() {
|
||||
return write("pipe");
|
||||
},
|
||||
_tcp() {
|
||||
return write("tcp");
|
||||
},
|
||||
_udp() {
|
||||
return write("udp");
|
||||
},
|
||||
_tty() {
|
||||
return write("tty");
|
||||
},
|
||||
_statwatcher() {
|
||||
return write("statwatcher");
|
||||
},
|
||||
_securecontext() {
|
||||
return write("securecontext");
|
||||
},
|
||||
_connection() {
|
||||
return write("connection");
|
||||
},
|
||||
_zlib() {
|
||||
return write("zlib");
|
||||
},
|
||||
_context() {
|
||||
return write("context");
|
||||
},
|
||||
_nodescript() {
|
||||
return write("nodescript");
|
||||
},
|
||||
_httpparser() {
|
||||
return write("httpparser");
|
||||
},
|
||||
_dataview() {
|
||||
return write("dataview");
|
||||
},
|
||||
_signal() {
|
||||
return write("signal");
|
||||
},
|
||||
_fsevent() {
|
||||
return write("fsevent");
|
||||
},
|
||||
_tlswrap() {
|
||||
return write("tlswrap");
|
||||
}
|
||||
};
|
||||
}
|
||||
function isNativeFunction(f) {
|
||||
if (typeof f !== "function") {
|
||||
return false;
|
||||
}
|
||||
const exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code]\s+}$/i;
|
||||
return exp.exec(Function.prototype.toString.call(f)) != null;
|
||||
}
|
||||
|
||||
class WordArray {
|
||||
constructor(words, sigBytes) {
|
||||
words = this.words = words || [];
|
||||
this.sigBytes = sigBytes !== void 0 ? sigBytes : words.length * 4;
|
||||
}
|
||||
toString(encoder) {
|
||||
return (encoder || Hex).stringify(this);
|
||||
}
|
||||
concat(wordArray) {
|
||||
this.clamp();
|
||||
if (this.sigBytes % 4) {
|
||||
for (let i = 0; i < wordArray.sigBytes; i++) {
|
||||
const thatByte = wordArray.words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
||||
this.words[this.sigBytes + i >>> 2] |= thatByte << 24 - (this.sigBytes + i) % 4 * 8;
|
||||
}
|
||||
} else {
|
||||
for (let j = 0; j < wordArray.sigBytes; j += 4) {
|
||||
this.words[this.sigBytes + j >>> 2] = wordArray.words[j >>> 2];
|
||||
}
|
||||
}
|
||||
this.sigBytes += wordArray.sigBytes;
|
||||
return this;
|
||||
}
|
||||
clamp() {
|
||||
this.words[this.sigBytes >>> 2] &= 4294967295 << 32 - this.sigBytes % 4 * 8;
|
||||
this.words.length = Math.ceil(this.sigBytes / 4);
|
||||
}
|
||||
clone() {
|
||||
return new WordArray([...this.words]);
|
||||
}
|
||||
}
|
||||
const Hex = {
|
||||
stringify(wordArray) {
|
||||
const hexChars = [];
|
||||
for (let i = 0; i < wordArray.sigBytes; i++) {
|
||||
const bite = wordArray.words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
||||
hexChars.push(
|
||||
(bite >>> 4).toString(16),
|
||||
(bite & 15).toString(16)
|
||||
);
|
||||
}
|
||||
return hexChars.join("");
|
||||
}
|
||||
};
|
||||
const Base64 = {
|
||||
stringify(wordArray) {
|
||||
const keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
const base64Chars = [];
|
||||
for (let i = 0; i < wordArray.sigBytes; i += 3) {
|
||||
const byte1 = wordArray.words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
||||
const byte2 = wordArray.words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
|
||||
const byte3 = wordArray.words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
|
||||
const triplet = byte1 << 16 | byte2 << 8 | byte3;
|
||||
for (let j = 0; j < 4 && i * 8 + j * 6 < wordArray.sigBytes * 8; j++) {
|
||||
base64Chars.push(keyStr.charAt(triplet >>> 6 * (3 - j) & 63));
|
||||
}
|
||||
}
|
||||
return base64Chars.join("");
|
||||
}
|
||||
};
|
||||
const Latin1 = {
|
||||
parse(latin1Str) {
|
||||
const latin1StrLength = latin1Str.length;
|
||||
const words = [];
|
||||
for (let i = 0; i < latin1StrLength; i++) {
|
||||
words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
|
||||
}
|
||||
return new WordArray(words, latin1StrLength);
|
||||
}
|
||||
};
|
||||
const Utf8 = {
|
||||
parse(utf8Str) {
|
||||
return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
|
||||
}
|
||||
};
|
||||
class BufferedBlockAlgorithm {
|
||||
constructor() {
|
||||
this._minBufferSize = 0;
|
||||
this.blockSize = 512 / 32;
|
||||
this.reset();
|
||||
}
|
||||
reset() {
|
||||
this._data = new WordArray();
|
||||
this._nDataBytes = 0;
|
||||
}
|
||||
_append(data) {
|
||||
if (typeof data === "string") {
|
||||
data = Utf8.parse(data);
|
||||
}
|
||||
this._data.concat(data);
|
||||
this._nDataBytes += data.sigBytes;
|
||||
}
|
||||
_doProcessBlock(_dataWords, _offset) {
|
||||
}
|
||||
_process(doFlush) {
|
||||
let processedWords;
|
||||
let nBlocksReady = this._data.sigBytes / (this.blockSize * 4);
|
||||
if (doFlush) {
|
||||
nBlocksReady = Math.ceil(nBlocksReady);
|
||||
} else {
|
||||
nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
|
||||
}
|
||||
const nWordsReady = nBlocksReady * this.blockSize;
|
||||
const nBytesReady = Math.min(nWordsReady * 4, this._data.sigBytes);
|
||||
if (nWordsReady) {
|
||||
for (let offset = 0; offset < nWordsReady; offset += this.blockSize) {
|
||||
this._doProcessBlock(this._data.words, offset);
|
||||
}
|
||||
processedWords = this._data.words.splice(0, nWordsReady);
|
||||
this._data.sigBytes -= nBytesReady;
|
||||
}
|
||||
return new WordArray(processedWords, nBytesReady);
|
||||
}
|
||||
}
|
||||
class Hasher extends BufferedBlockAlgorithm {
|
||||
update(messageUpdate) {
|
||||
this._append(messageUpdate);
|
||||
this._process();
|
||||
return this;
|
||||
}
|
||||
finalize(messageUpdate) {
|
||||
if (messageUpdate) {
|
||||
this._append(messageUpdate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const H = [1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225];
|
||||
const K = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998];
|
||||
const W = [];
|
||||
class SHA256 extends Hasher {
|
||||
constructor() {
|
||||
super();
|
||||
this.reset();
|
||||
}
|
||||
reset() {
|
||||
super.reset();
|
||||
this._hash = new WordArray([...H]);
|
||||
}
|
||||
_doProcessBlock(M, offset) {
|
||||
const H2 = this._hash.words;
|
||||
let a = H2[0];
|
||||
let b = H2[1];
|
||||
let c = H2[2];
|
||||
let d = H2[3];
|
||||
let e = H2[4];
|
||||
let f = H2[5];
|
||||
let g = H2[6];
|
||||
let h = H2[7];
|
||||
for (let i = 0; i < 64; i++) {
|
||||
if (i < 16) {
|
||||
W[i] = M[offset + i] | 0;
|
||||
} else {
|
||||
const gamma0x = W[i - 15];
|
||||
const gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
|
||||
const gamma1x = W[i - 2];
|
||||
const gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
|
||||
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
|
||||
}
|
||||
const ch = e & f ^ ~e & g;
|
||||
const maj = a & b ^ a & c ^ b & c;
|
||||
const sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
|
||||
const sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
|
||||
const t1 = h + sigma1 + ch + K[i] + W[i];
|
||||
const t2 = sigma0 + maj;
|
||||
h = g;
|
||||
g = f;
|
||||
f = e;
|
||||
e = d + t1 | 0;
|
||||
d = c;
|
||||
c = b;
|
||||
b = a;
|
||||
a = t1 + t2 | 0;
|
||||
}
|
||||
H2[0] = H2[0] + a | 0;
|
||||
H2[1] = H2[1] + b | 0;
|
||||
H2[2] = H2[2] + c | 0;
|
||||
H2[3] = H2[3] + d | 0;
|
||||
H2[4] = H2[4] + e | 0;
|
||||
H2[5] = H2[5] + f | 0;
|
||||
H2[6] = H2[6] + g | 0;
|
||||
H2[7] = H2[7] + h | 0;
|
||||
}
|
||||
finalize(messageUpdate) {
|
||||
super.finalize(messageUpdate);
|
||||
const nBitsTotal = this._nDataBytes * 8;
|
||||
const nBitsLeft = this._data.sigBytes * 8;
|
||||
this._data.words[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
||||
this._data.words[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 4294967296);
|
||||
this._data.words[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
|
||||
this._data.sigBytes = this._data.words.length * 4;
|
||||
this._process();
|
||||
return this._hash;
|
||||
}
|
||||
}
|
||||
function sha256base64(message) {
|
||||
return new SHA256().finalize(message).toString(Base64);
|
||||
}
|
||||
|
||||
function hash(object, options = {}) {
|
||||
const hashed = typeof object === "string" ? object : objectHash(object, options);
|
||||
return sha256base64(hashed).slice(0, 10);
|
||||
}
|
||||
|
||||
async function cleanupNuxtDirs(rootDir) {
|
||||
consola.info("Cleaning up generated nuxt files and caches...");
|
||||
await rmRecursive([
|
||||
".nuxt",
|
||||
".output",
|
||||
"dist",
|
||||
"node_modules/.vite",
|
||||
"node_modules/.cache"
|
||||
].map((dir) => resolve(rootDir, dir)));
|
||||
}
|
||||
function nuxtVersionToGitIdentifier(version) {
|
||||
const id = /\.([0-9a-f]{7,8})$/.exec(version);
|
||||
if (id?.[1]) {
|
||||
return id[1];
|
||||
}
|
||||
return `v${version}`;
|
||||
}
|
||||
function resolveNuxtManifest(nuxt) {
|
||||
const manifest = {
|
||||
_hash: null,
|
||||
project: {
|
||||
rootDir: nuxt.options.rootDir
|
||||
},
|
||||
versions: {
|
||||
nuxt: nuxt._version
|
||||
}
|
||||
};
|
||||
manifest._hash = hash(manifest);
|
||||
return manifest;
|
||||
}
|
||||
async function writeNuxtManifest(nuxt) {
|
||||
const manifest = resolveNuxtManifest(nuxt);
|
||||
const manifestPath = resolve(nuxt.options.buildDir, "nuxt.json");
|
||||
await promises.mkdir(dirname(manifestPath), { recursive: true });
|
||||
await promises.writeFile(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
|
||||
return manifest;
|
||||
}
|
||||
async function loadNuxtManifest(buildDir) {
|
||||
const manifestPath = resolve(buildDir, "nuxt.json");
|
||||
const manifest = await promises.readFile(manifestPath, "utf-8").then((data) => JSON.parse(data)).catch(() => null);
|
||||
return manifest;
|
||||
}
|
||||
|
||||
export { cleanupNuxtDirs as c, loadNuxtManifest as l, nuxtVersionToGitIdentifier as n, writeNuxtManifest as w };
|
||||
14
node_modules/nuxi/dist/shared/nuxi.8cc4a579.mjs
generated
vendored
Normal file
14
node_modules/nuxi/dist/shared/nuxi.8cc4a579.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { i as importModule } from './nuxi.e551a86b.mjs';
|
||||
|
||||
const loadKit = async (rootDir) => {
|
||||
try {
|
||||
return await importModule("@nuxt/kit", rootDir);
|
||||
} catch (e) {
|
||||
if (e.toString().includes("Cannot find module '@nuxt/kit'")) {
|
||||
throw new Error("nuxi requires `@nuxt/kit` to be installed in your project. Try installing `nuxt3` or `@nuxt/bridge` first.");
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
|
||||
export { loadKit as l };
|
||||
160
node_modules/nuxi/dist/shared/nuxi.a2d9d2e1.mjs
generated
vendored
Normal file
160
node_modules/nuxi/dist/shared/nuxi.a2d9d2e1.mjs
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
function normalizeWindowsPath(input = "") {
|
||||
if (!input || !input.includes("\\")) {
|
||||
return input;
|
||||
}
|
||||
return input.replace(/\\/g, "/");
|
||||
}
|
||||
|
||||
const _UNC_REGEX = /^[/\\]{2}/;
|
||||
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
||||
const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
||||
const normalize = function(path) {
|
||||
if (path.length === 0) {
|
||||
return ".";
|
||||
}
|
||||
path = normalizeWindowsPath(path);
|
||||
const isUNCPath = path.match(_UNC_REGEX);
|
||||
const isPathAbsolute = isAbsolute(path);
|
||||
const trailingSeparator = path[path.length - 1] === "/";
|
||||
path = normalizeString(path, !isPathAbsolute);
|
||||
if (path.length === 0) {
|
||||
if (isPathAbsolute) {
|
||||
return "/";
|
||||
}
|
||||
return trailingSeparator ? "./" : ".";
|
||||
}
|
||||
if (trailingSeparator) {
|
||||
path += "/";
|
||||
}
|
||||
if (_DRIVE_LETTER_RE.test(path)) {
|
||||
path += "/";
|
||||
}
|
||||
if (isUNCPath) {
|
||||
if (!isPathAbsolute) {
|
||||
return `//./${path}`;
|
||||
}
|
||||
return `//${path}`;
|
||||
}
|
||||
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
||||
};
|
||||
const join = function(...arguments_) {
|
||||
if (arguments_.length === 0) {
|
||||
return ".";
|
||||
}
|
||||
let joined;
|
||||
for (const argument of arguments_) {
|
||||
if (argument && argument.length > 0) {
|
||||
if (joined === void 0) {
|
||||
joined = argument;
|
||||
} else {
|
||||
joined += `/${argument}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (joined === void 0) {
|
||||
return ".";
|
||||
}
|
||||
return normalize(joined.replace(/\/\/+/g, "/"));
|
||||
};
|
||||
const resolve = function(...arguments_) {
|
||||
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
||||
let resolvedPath = "";
|
||||
let resolvedAbsolute = false;
|
||||
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
||||
const path = index >= 0 ? arguments_[index] : process.cwd().replace(/\\/g, "/");
|
||||
if (!path || path.length === 0) {
|
||||
continue;
|
||||
}
|
||||
resolvedPath = `${path}/${resolvedPath}`;
|
||||
resolvedAbsolute = isAbsolute(path);
|
||||
}
|
||||
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
||||
if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
|
||||
return `/${resolvedPath}`;
|
||||
}
|
||||
return resolvedPath.length > 0 ? resolvedPath : ".";
|
||||
};
|
||||
function normalizeString(path, allowAboveRoot) {
|
||||
let res = "";
|
||||
let lastSegmentLength = 0;
|
||||
let lastSlash = -1;
|
||||
let dots = 0;
|
||||
let char = null;
|
||||
for (let index = 0; index <= path.length; ++index) {
|
||||
if (index < path.length) {
|
||||
char = path[index];
|
||||
} else if (char === "/") {
|
||||
break;
|
||||
} else {
|
||||
char = "/";
|
||||
}
|
||||
if (char === "/") {
|
||||
if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
|
||||
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
||||
if (res.length > 2) {
|
||||
const lastSlashIndex = res.lastIndexOf("/");
|
||||
if (lastSlashIndex === -1) {
|
||||
res = "";
|
||||
lastSegmentLength = 0;
|
||||
} else {
|
||||
res = res.slice(0, lastSlashIndex);
|
||||
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
||||
}
|
||||
lastSlash = index;
|
||||
dots = 0;
|
||||
continue;
|
||||
} else if (res.length > 0) {
|
||||
res = "";
|
||||
lastSegmentLength = 0;
|
||||
lastSlash = index;
|
||||
dots = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (allowAboveRoot) {
|
||||
res += res.length > 0 ? "/.." : "..";
|
||||
lastSegmentLength = 2;
|
||||
}
|
||||
} else {
|
||||
if (res.length > 0) {
|
||||
res += `/${path.slice(lastSlash + 1, index)}`;
|
||||
} else {
|
||||
res = path.slice(lastSlash + 1, index);
|
||||
}
|
||||
lastSegmentLength = index - lastSlash - 1;
|
||||
}
|
||||
lastSlash = index;
|
||||
dots = 0;
|
||||
} else if (char === "." && dots !== -1) {
|
||||
++dots;
|
||||
} else {
|
||||
dots = -1;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
const isAbsolute = function(p) {
|
||||
return _IS_ABSOLUTE_RE.test(p);
|
||||
};
|
||||
const relative = function(from, to) {
|
||||
const _from = resolve(from).split("/");
|
||||
const _to = resolve(to).split("/");
|
||||
const _fromCopy = [..._from];
|
||||
for (const segment of _fromCopy) {
|
||||
if (_to[0] !== segment) {
|
||||
break;
|
||||
}
|
||||
_from.shift();
|
||||
_to.shift();
|
||||
}
|
||||
return [..._from.map(() => ".."), ..._to].join("/");
|
||||
};
|
||||
const dirname = function(p) {
|
||||
const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
||||
if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
|
||||
segments[0] += "/";
|
||||
}
|
||||
return segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
||||
};
|
||||
|
||||
export { relative as a, dirname as d, isAbsolute as i, join as j, normalize as n, resolve as r };
|
||||
152
node_modules/nuxi/dist/shared/nuxi.a3b9dacd.mjs
generated
vendored
Normal file
152
node_modules/nuxi/dist/shared/nuxi.a3b9dacd.mjs
generated
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
import * as tty from 'tty';
|
||||
|
||||
const {
|
||||
env = {},
|
||||
argv = [],
|
||||
platform = "",
|
||||
} = typeof process === "undefined" ? {} : process;
|
||||
|
||||
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
||||
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
||||
const isWindows = platform === "win32";
|
||||
const isDumbTerminal = env.TERM === "dumb";
|
||||
|
||||
const isCompatibleTerminal =
|
||||
tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
||||
|
||||
const isCI =
|
||||
"CI" in env &&
|
||||
("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
||||
|
||||
const isColorSupported =
|
||||
!isDisabled &&
|
||||
(isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
|
||||
|
||||
const replaceClose = (
|
||||
index,
|
||||
string,
|
||||
close,
|
||||
replace,
|
||||
head = string.substring(0, index) + replace,
|
||||
tail = string.substring(index + close.length),
|
||||
next = tail.indexOf(close)
|
||||
) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
||||
|
||||
const clearBleed = (index, string, open, close, replace) =>
|
||||
index < 0
|
||||
? open + string + close
|
||||
: open + replaceClose(index, string, close, replace) + close;
|
||||
|
||||
const filterEmpty =
|
||||
(open, close, replace = open, at = open.length + 1) =>
|
||||
(string) =>
|
||||
string || !(string === "" || string === undefined)
|
||||
? clearBleed(
|
||||
("" + string).indexOf(close, at),
|
||||
string,
|
||||
open,
|
||||
close,
|
||||
replace
|
||||
)
|
||||
: "";
|
||||
|
||||
const init = (open, close, replace) =>
|
||||
filterEmpty(`\x1b[${open}m`, `\x1b[${close}m`, replace);
|
||||
|
||||
const colors = {
|
||||
reset: init(0, 0),
|
||||
bold: init(1, 22, "\x1b[22m\x1b[1m"),
|
||||
dim: init(2, 22, "\x1b[22m\x1b[2m"),
|
||||
italic: init(3, 23),
|
||||
underline: init(4, 24),
|
||||
inverse: init(7, 27),
|
||||
hidden: init(8, 28),
|
||||
strikethrough: init(9, 29),
|
||||
black: init(30, 39),
|
||||
red: init(31, 39),
|
||||
green: init(32, 39),
|
||||
yellow: init(33, 39),
|
||||
blue: init(34, 39),
|
||||
magenta: init(35, 39),
|
||||
cyan: init(36, 39),
|
||||
white: init(37, 39),
|
||||
gray: init(90, 39),
|
||||
bgBlack: init(40, 49),
|
||||
bgRed: init(41, 49),
|
||||
bgGreen: init(42, 49),
|
||||
bgYellow: init(43, 49),
|
||||
bgBlue: init(44, 49),
|
||||
bgMagenta: init(45, 49),
|
||||
bgCyan: init(46, 49),
|
||||
bgWhite: init(47, 49),
|
||||
blackBright: init(90, 39),
|
||||
redBright: init(91, 39),
|
||||
greenBright: init(92, 39),
|
||||
yellowBright: init(93, 39),
|
||||
blueBright: init(94, 39),
|
||||
magentaBright: init(95, 39),
|
||||
cyanBright: init(96, 39),
|
||||
whiteBright: init(97, 39),
|
||||
bgBlackBright: init(100, 49),
|
||||
bgRedBright: init(101, 49),
|
||||
bgGreenBright: init(102, 49),
|
||||
bgYellowBright: init(103, 49),
|
||||
bgBlueBright: init(104, 49),
|
||||
bgMagentaBright: init(105, 49),
|
||||
bgCyanBright: init(106, 49),
|
||||
bgWhiteBright: init(107, 49),
|
||||
};
|
||||
|
||||
const createColors = ({ useColor = isColorSupported } = {}) =>
|
||||
useColor
|
||||
? colors
|
||||
: Object.keys(colors).reduce(
|
||||
(colors, key) => ({ ...colors, [key]: String }),
|
||||
{}
|
||||
);
|
||||
|
||||
const {
|
||||
reset,
|
||||
bold,
|
||||
dim,
|
||||
italic,
|
||||
underline,
|
||||
inverse,
|
||||
hidden,
|
||||
strikethrough,
|
||||
black,
|
||||
red,
|
||||
green,
|
||||
yellow,
|
||||
blue,
|
||||
magenta,
|
||||
cyan,
|
||||
white,
|
||||
gray,
|
||||
bgBlack,
|
||||
bgRed,
|
||||
bgGreen,
|
||||
bgYellow,
|
||||
bgBlue,
|
||||
bgMagenta,
|
||||
bgCyan,
|
||||
bgWhite,
|
||||
blackBright,
|
||||
redBright,
|
||||
greenBright,
|
||||
yellowBright,
|
||||
blueBright,
|
||||
magentaBright,
|
||||
cyanBright,
|
||||
whiteBright,
|
||||
bgBlackBright,
|
||||
bgRedBright,
|
||||
bgGreenBright,
|
||||
bgYellowBright,
|
||||
bgBlueBright,
|
||||
bgMagentaBright,
|
||||
bgCyanBright,
|
||||
bgWhiteBright,
|
||||
} = createColors();
|
||||
|
||||
export { green as a, bold as b, cyan as c, gray as g, magenta as m, red as r, underline as u };
|
||||
147
node_modules/nuxi/dist/shared/nuxi.a865ab6b.mjs
generated
vendored
Normal file
147
node_modules/nuxi/dist/shared/nuxi.a865ab6b.mjs
generated
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
function toArr(any) {
|
||||
return any == null ? [] : Array.isArray(any) ? any : [any];
|
||||
}
|
||||
|
||||
function toVal(out, key, val, opts) {
|
||||
var x, old=out[key], nxt=(
|
||||
!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))
|
||||
: typeof val === 'boolean' ? val
|
||||
: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))
|
||||
: (x = +val,x * 0 === 0) ? x : val
|
||||
);
|
||||
out[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);
|
||||
}
|
||||
|
||||
function mri (args, opts) {
|
||||
args = args || [];
|
||||
opts = opts || {};
|
||||
|
||||
var k, arr, arg, name, val, out={ _:[] };
|
||||
var i=0, j=0, idx=0, len=args.length;
|
||||
|
||||
const alibi = opts.alias !== void 0;
|
||||
const strict = opts.unknown !== void 0;
|
||||
const defaults = opts.default !== void 0;
|
||||
|
||||
opts.alias = opts.alias || {};
|
||||
opts.string = toArr(opts.string);
|
||||
opts.boolean = toArr(opts.boolean);
|
||||
|
||||
if (alibi) {
|
||||
for (k in opts.alias) {
|
||||
arr = opts.alias[k] = toArr(opts.alias[k]);
|
||||
for (i=0; i < arr.length; i++) {
|
||||
(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i=opts.boolean.length; i-- > 0;) {
|
||||
arr = opts.alias[opts.boolean[i]] || [];
|
||||
for (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);
|
||||
}
|
||||
|
||||
for (i=opts.string.length; i-- > 0;) {
|
||||
arr = opts.alias[opts.string[i]] || [];
|
||||
for (j=arr.length; j-- > 0;) opts.string.push(arr[j]);
|
||||
}
|
||||
|
||||
if (defaults) {
|
||||
for (k in opts.default) {
|
||||
name = typeof opts.default[k];
|
||||
arr = opts.alias[k] = opts.alias[k] || [];
|
||||
if (opts[name] !== void 0) {
|
||||
opts[name].push(k);
|
||||
for (i=0; i < arr.length; i++) {
|
||||
opts[name].push(arr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const keys = strict ? Object.keys(opts.alias) : [];
|
||||
|
||||
for (i=0; i < len; i++) {
|
||||
arg = args[i];
|
||||
|
||||
if (arg === '--') {
|
||||
out._ = out._.concat(args.slice(++i));
|
||||
break;
|
||||
}
|
||||
|
||||
for (j=0; j < arg.length; j++) {
|
||||
if (arg.charCodeAt(j) !== 45) break; // "-"
|
||||
}
|
||||
|
||||
if (j === 0) {
|
||||
out._.push(arg);
|
||||
} else if (arg.substring(j, j + 3) === 'no-') {
|
||||
name = arg.substring(j + 3);
|
||||
if (strict && !~keys.indexOf(name)) {
|
||||
return opts.unknown(arg);
|
||||
}
|
||||
out[name] = false;
|
||||
} else {
|
||||
for (idx=j+1; idx < arg.length; idx++) {
|
||||
if (arg.charCodeAt(idx) === 61) break; // "="
|
||||
}
|
||||
|
||||
name = arg.substring(j, idx);
|
||||
val = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);
|
||||
arr = (j === 2 ? [name] : name);
|
||||
|
||||
for (idx=0; idx < arr.length; idx++) {
|
||||
name = arr[idx];
|
||||
if (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);
|
||||
toVal(out, name, (idx + 1 < arr.length) || val, opts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (defaults) {
|
||||
for (k in opts.default) {
|
||||
if (out[k] === void 0) {
|
||||
out[k] = opts.default[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (alibi) {
|
||||
for (k in out) {
|
||||
arr = opts.alias[k] || [];
|
||||
while (arr.length > 0) {
|
||||
out[arr.shift()] = out[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
const _rDefault = (r) => r.default || r;
|
||||
const commands = {
|
||||
dev: () => import('../chunks/dev.mjs').then(_rDefault),
|
||||
build: () => import('../chunks/build.mjs').then(_rDefault),
|
||||
"build-module": () => import('../chunks/build-module.mjs').then(_rDefault),
|
||||
cleanup: () => import('../chunks/cleanup.mjs').then(_rDefault),
|
||||
clean: () => import('../chunks/cleanup.mjs').then(_rDefault),
|
||||
preview: () => import('../chunks/preview.mjs').then(_rDefault),
|
||||
start: () => import('../chunks/preview.mjs').then(_rDefault),
|
||||
analyze: () => import('../chunks/analyze.mjs').then(_rDefault),
|
||||
generate: () => import('../chunks/generate.mjs').then(_rDefault),
|
||||
prepare: () => import('../chunks/prepare.mjs').then(_rDefault),
|
||||
typecheck: () => import('../chunks/typecheck.mjs').then(_rDefault),
|
||||
usage: () => import('../chunks/usage.mjs').then(_rDefault),
|
||||
info: () => import('../chunks/info.mjs').then(_rDefault),
|
||||
init: () => import('../chunks/init.mjs').then(function (n) { return n.i; }).then(_rDefault),
|
||||
create: () => import('../chunks/init.mjs').then(function (n) { return n.i; }).then(_rDefault),
|
||||
upgrade: () => import('../chunks/upgrade.mjs').then(_rDefault),
|
||||
test: () => import('../chunks/test.mjs').then(_rDefault),
|
||||
add: () => import('../chunks/add.mjs').then(_rDefault),
|
||||
new: () => import('../chunks/add.mjs').then(_rDefault)
|
||||
};
|
||||
function defineNuxtCommand(command) {
|
||||
return command;
|
||||
}
|
||||
|
||||
export { commands as c, defineNuxtCommand as d, mri as m };
|
||||
131
node_modules/nuxi/dist/shared/nuxi.af709901.mjs
generated
vendored
Normal file
131
node_modules/nuxi/dist/shared/nuxi.af709901.mjs
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
const PLUS_RE = /\+/g;
|
||||
function decode(text = "") {
|
||||
try {
|
||||
return decodeURIComponent("" + text);
|
||||
} catch {
|
||||
return "" + text;
|
||||
}
|
||||
}
|
||||
function decodeQueryValue(text) {
|
||||
return decode(text.replace(PLUS_RE, " "));
|
||||
}
|
||||
|
||||
function parseQuery(parametersString = "") {
|
||||
const object = {};
|
||||
if (parametersString[0] === "?") {
|
||||
parametersString = parametersString.slice(1);
|
||||
}
|
||||
for (const parameter of parametersString.split("&")) {
|
||||
const s = parameter.match(/([^=]+)=?(.*)/) || [];
|
||||
if (s.length < 2) {
|
||||
continue;
|
||||
}
|
||||
const key = decode(s[1]);
|
||||
if (key === "__proto__" || key === "constructor") {
|
||||
continue;
|
||||
}
|
||||
const value = decodeQueryValue(s[2] || "");
|
||||
if (object[key]) {
|
||||
if (Array.isArray(object[key])) {
|
||||
object[key].push(value);
|
||||
} else {
|
||||
object[key] = [object[key], value];
|
||||
}
|
||||
} else {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
const PROTOCOL_REGEX = /^\w+:(\/\/)?/;
|
||||
const PROTOCOL_RELATIVE_REGEX = /^\/\/[^/]+/;
|
||||
function hasProtocol(inputString, acceptProtocolRelative = false) {
|
||||
return PROTOCOL_REGEX.test(inputString) || acceptProtocolRelative && PROTOCOL_RELATIVE_REGEX.test(inputString);
|
||||
}
|
||||
const TRAILING_SLASH_RE = /\/$|\/\?/;
|
||||
function hasTrailingSlash(input = "", queryParameters = false) {
|
||||
if (!queryParameters) {
|
||||
return input.endsWith("/");
|
||||
}
|
||||
return TRAILING_SLASH_RE.test(input);
|
||||
}
|
||||
function withoutTrailingSlash(input = "", queryParameters = false) {
|
||||
if (!queryParameters) {
|
||||
return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || "/";
|
||||
}
|
||||
if (!hasTrailingSlash(input, true)) {
|
||||
return input || "/";
|
||||
}
|
||||
const [s0, ...s] = input.split("?");
|
||||
return (s0.slice(0, -1) || "/") + (s.length > 0 ? `?${s.join("?")}` : "");
|
||||
}
|
||||
function withTrailingSlash(input = "", queryParameters = false) {
|
||||
if (!queryParameters) {
|
||||
return input.endsWith("/") ? input : input + "/";
|
||||
}
|
||||
if (hasTrailingSlash(input, true)) {
|
||||
return input || "/";
|
||||
}
|
||||
const [s0, ...s] = input.split("?");
|
||||
return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "");
|
||||
}
|
||||
function hasLeadingSlash(input = "") {
|
||||
return input.startsWith("/");
|
||||
}
|
||||
function withoutLeadingSlash(input = "") {
|
||||
return (hasLeadingSlash(input) ? input.slice(1) : input) || "/";
|
||||
}
|
||||
function withoutBase(input, base) {
|
||||
if (isEmptyURL(base)) {
|
||||
return input;
|
||||
}
|
||||
const _base = withoutTrailingSlash(base);
|
||||
if (!input.startsWith(_base)) {
|
||||
return input;
|
||||
}
|
||||
const trimmed = input.slice(_base.length);
|
||||
return trimmed[0] === "/" ? trimmed : "/" + trimmed;
|
||||
}
|
||||
function getQuery(input) {
|
||||
return parseQuery(parseURL(input).search);
|
||||
}
|
||||
function isEmptyURL(url) {
|
||||
return !url || url === "/";
|
||||
}
|
||||
function isNonEmptyURL(url) {
|
||||
return url && url !== "/";
|
||||
}
|
||||
function joinURL(base, ...input) {
|
||||
let url = base || "";
|
||||
for (const index of input.filter((url2) => isNonEmptyURL(url2))) {
|
||||
url = url ? withTrailingSlash(url) + withoutLeadingSlash(index) : index;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
function parseURL(input = "", defaultProto) {
|
||||
if (!hasProtocol(input, true)) {
|
||||
return defaultProto ? parseURL(defaultProto + input) : parsePath(input);
|
||||
}
|
||||
const [protocol = "", auth, hostAndPath = ""] = (input.replace(/\\/g, "/").match(/([^/:]+:)?\/\/([^/@]+@)?(.*)/) || []).splice(1);
|
||||
const [host = "", path = ""] = (hostAndPath.match(/([^#/?]*)(.*)?/) || []).splice(1);
|
||||
const { pathname, search, hash } = parsePath(path.replace(/\/(?=[A-Za-z]:)/, ""));
|
||||
return {
|
||||
protocol,
|
||||
auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "",
|
||||
host,
|
||||
pathname,
|
||||
search,
|
||||
hash
|
||||
};
|
||||
}
|
||||
function parsePath(input = "") {
|
||||
const [pathname = "", search = "", hash = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
|
||||
return {
|
||||
pathname,
|
||||
search,
|
||||
hash
|
||||
};
|
||||
}
|
||||
|
||||
export { withoutTrailingSlash as a, withoutBase as b, getQuery as g, joinURL as j, withTrailingSlash as w };
|
||||
14
node_modules/nuxi/dist/shared/nuxi.b2fdb45d.mjs
generated
vendored
Normal file
14
node_modules/nuxi/dist/shared/nuxi.b2fdb45d.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
443
node_modules/nuxi/dist/shared/nuxi.cc8dd4a9.mjs
generated
vendored
Normal file
443
node_modules/nuxi/dist/shared/nuxi.cc8dd4a9.mjs
generated
vendored
Normal file
@@ -0,0 +1,443 @@
|
||||
var iterator;
|
||||
var hasRequiredIterator;
|
||||
|
||||
function requireIterator () {
|
||||
if (hasRequiredIterator) return iterator;
|
||||
hasRequiredIterator = 1;
|
||||
iterator = function (Yallist) {
|
||||
Yallist.prototype[Symbol.iterator] = function* () {
|
||||
for (let walker = this.head; walker; walker = walker.next) {
|
||||
yield walker.value;
|
||||
}
|
||||
};
|
||||
};
|
||||
return iterator;
|
||||
}
|
||||
|
||||
var yallist = Yallist;
|
||||
|
||||
Yallist.Node = Node;
|
||||
Yallist.create = Yallist;
|
||||
|
||||
function Yallist (list) {
|
||||
var self = this;
|
||||
if (!(self instanceof Yallist)) {
|
||||
self = new Yallist();
|
||||
}
|
||||
|
||||
self.tail = null;
|
||||
self.head = null;
|
||||
self.length = 0;
|
||||
|
||||
if (list && typeof list.forEach === 'function') {
|
||||
list.forEach(function (item) {
|
||||
self.push(item);
|
||||
});
|
||||
} else if (arguments.length > 0) {
|
||||
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||
self.push(arguments[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return self
|
||||
}
|
||||
|
||||
Yallist.prototype.removeNode = function (node) {
|
||||
if (node.list !== this) {
|
||||
throw new Error('removing node which does not belong to this list')
|
||||
}
|
||||
|
||||
var next = node.next;
|
||||
var prev = node.prev;
|
||||
|
||||
if (next) {
|
||||
next.prev = prev;
|
||||
}
|
||||
|
||||
if (prev) {
|
||||
prev.next = next;
|
||||
}
|
||||
|
||||
if (node === this.head) {
|
||||
this.head = next;
|
||||
}
|
||||
if (node === this.tail) {
|
||||
this.tail = prev;
|
||||
}
|
||||
|
||||
node.list.length--;
|
||||
node.next = null;
|
||||
node.prev = null;
|
||||
node.list = null;
|
||||
|
||||
return next
|
||||
};
|
||||
|
||||
Yallist.prototype.unshiftNode = function (node) {
|
||||
if (node === this.head) {
|
||||
return
|
||||
}
|
||||
|
||||
if (node.list) {
|
||||
node.list.removeNode(node);
|
||||
}
|
||||
|
||||
var head = this.head;
|
||||
node.list = this;
|
||||
node.next = head;
|
||||
if (head) {
|
||||
head.prev = node;
|
||||
}
|
||||
|
||||
this.head = node;
|
||||
if (!this.tail) {
|
||||
this.tail = node;
|
||||
}
|
||||
this.length++;
|
||||
};
|
||||
|
||||
Yallist.prototype.pushNode = function (node) {
|
||||
if (node === this.tail) {
|
||||
return
|
||||
}
|
||||
|
||||
if (node.list) {
|
||||
node.list.removeNode(node);
|
||||
}
|
||||
|
||||
var tail = this.tail;
|
||||
node.list = this;
|
||||
node.prev = tail;
|
||||
if (tail) {
|
||||
tail.next = node;
|
||||
}
|
||||
|
||||
this.tail = node;
|
||||
if (!this.head) {
|
||||
this.head = node;
|
||||
}
|
||||
this.length++;
|
||||
};
|
||||
|
||||
Yallist.prototype.push = function () {
|
||||
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||
push(this, arguments[i]);
|
||||
}
|
||||
return this.length
|
||||
};
|
||||
|
||||
Yallist.prototype.unshift = function () {
|
||||
for (var i = 0, l = arguments.length; i < l; i++) {
|
||||
unshift(this, arguments[i]);
|
||||
}
|
||||
return this.length
|
||||
};
|
||||
|
||||
Yallist.prototype.pop = function () {
|
||||
if (!this.tail) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
var res = this.tail.value;
|
||||
this.tail = this.tail.prev;
|
||||
if (this.tail) {
|
||||
this.tail.next = null;
|
||||
} else {
|
||||
this.head = null;
|
||||
}
|
||||
this.length--;
|
||||
return res
|
||||
};
|
||||
|
||||
Yallist.prototype.shift = function () {
|
||||
if (!this.head) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
var res = this.head.value;
|
||||
this.head = this.head.next;
|
||||
if (this.head) {
|
||||
this.head.prev = null;
|
||||
} else {
|
||||
this.tail = null;
|
||||
}
|
||||
this.length--;
|
||||
return res
|
||||
};
|
||||
|
||||
Yallist.prototype.forEach = function (fn, thisp) {
|
||||
thisp = thisp || this;
|
||||
for (var walker = this.head, i = 0; walker !== null; i++) {
|
||||
fn.call(thisp, walker.value, i, this);
|
||||
walker = walker.next;
|
||||
}
|
||||
};
|
||||
|
||||
Yallist.prototype.forEachReverse = function (fn, thisp) {
|
||||
thisp = thisp || this;
|
||||
for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
|
||||
fn.call(thisp, walker.value, i, this);
|
||||
walker = walker.prev;
|
||||
}
|
||||
};
|
||||
|
||||
Yallist.prototype.get = function (n) {
|
||||
for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
|
||||
// abort out of the list early if we hit a cycle
|
||||
walker = walker.next;
|
||||
}
|
||||
if (i === n && walker !== null) {
|
||||
return walker.value
|
||||
}
|
||||
};
|
||||
|
||||
Yallist.prototype.getReverse = function (n) {
|
||||
for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
|
||||
// abort out of the list early if we hit a cycle
|
||||
walker = walker.prev;
|
||||
}
|
||||
if (i === n && walker !== null) {
|
||||
return walker.value
|
||||
}
|
||||
};
|
||||
|
||||
Yallist.prototype.map = function (fn, thisp) {
|
||||
thisp = thisp || this;
|
||||
var res = new Yallist();
|
||||
for (var walker = this.head; walker !== null;) {
|
||||
res.push(fn.call(thisp, walker.value, this));
|
||||
walker = walker.next;
|
||||
}
|
||||
return res
|
||||
};
|
||||
|
||||
Yallist.prototype.mapReverse = function (fn, thisp) {
|
||||
thisp = thisp || this;
|
||||
var res = new Yallist();
|
||||
for (var walker = this.tail; walker !== null;) {
|
||||
res.push(fn.call(thisp, walker.value, this));
|
||||
walker = walker.prev;
|
||||
}
|
||||
return res
|
||||
};
|
||||
|
||||
Yallist.prototype.reduce = function (fn, initial) {
|
||||
var acc;
|
||||
var walker = this.head;
|
||||
if (arguments.length > 1) {
|
||||
acc = initial;
|
||||
} else if (this.head) {
|
||||
walker = this.head.next;
|
||||
acc = this.head.value;
|
||||
} else {
|
||||
throw new TypeError('Reduce of empty list with no initial value')
|
||||
}
|
||||
|
||||
for (var i = 0; walker !== null; i++) {
|
||||
acc = fn(acc, walker.value, i);
|
||||
walker = walker.next;
|
||||
}
|
||||
|
||||
return acc
|
||||
};
|
||||
|
||||
Yallist.prototype.reduceReverse = function (fn, initial) {
|
||||
var acc;
|
||||
var walker = this.tail;
|
||||
if (arguments.length > 1) {
|
||||
acc = initial;
|
||||
} else if (this.tail) {
|
||||
walker = this.tail.prev;
|
||||
acc = this.tail.value;
|
||||
} else {
|
||||
throw new TypeError('Reduce of empty list with no initial value')
|
||||
}
|
||||
|
||||
for (var i = this.length - 1; walker !== null; i--) {
|
||||
acc = fn(acc, walker.value, i);
|
||||
walker = walker.prev;
|
||||
}
|
||||
|
||||
return acc
|
||||
};
|
||||
|
||||
Yallist.prototype.toArray = function () {
|
||||
var arr = new Array(this.length);
|
||||
for (var i = 0, walker = this.head; walker !== null; i++) {
|
||||
arr[i] = walker.value;
|
||||
walker = walker.next;
|
||||
}
|
||||
return arr
|
||||
};
|
||||
|
||||
Yallist.prototype.toArrayReverse = function () {
|
||||
var arr = new Array(this.length);
|
||||
for (var i = 0, walker = this.tail; walker !== null; i++) {
|
||||
arr[i] = walker.value;
|
||||
walker = walker.prev;
|
||||
}
|
||||
return arr
|
||||
};
|
||||
|
||||
Yallist.prototype.slice = function (from, to) {
|
||||
to = to || this.length;
|
||||
if (to < 0) {
|
||||
to += this.length;
|
||||
}
|
||||
from = from || 0;
|
||||
if (from < 0) {
|
||||
from += this.length;
|
||||
}
|
||||
var ret = new Yallist();
|
||||
if (to < from || to < 0) {
|
||||
return ret
|
||||
}
|
||||
if (from < 0) {
|
||||
from = 0;
|
||||
}
|
||||
if (to > this.length) {
|
||||
to = this.length;
|
||||
}
|
||||
for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
|
||||
walker = walker.next;
|
||||
}
|
||||
for (; walker !== null && i < to; i++, walker = walker.next) {
|
||||
ret.push(walker.value);
|
||||
}
|
||||
return ret
|
||||
};
|
||||
|
||||
Yallist.prototype.sliceReverse = function (from, to) {
|
||||
to = to || this.length;
|
||||
if (to < 0) {
|
||||
to += this.length;
|
||||
}
|
||||
from = from || 0;
|
||||
if (from < 0) {
|
||||
from += this.length;
|
||||
}
|
||||
var ret = new Yallist();
|
||||
if (to < from || to < 0) {
|
||||
return ret
|
||||
}
|
||||
if (from < 0) {
|
||||
from = 0;
|
||||
}
|
||||
if (to > this.length) {
|
||||
to = this.length;
|
||||
}
|
||||
for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
|
||||
walker = walker.prev;
|
||||
}
|
||||
for (; walker !== null && i > from; i--, walker = walker.prev) {
|
||||
ret.push(walker.value);
|
||||
}
|
||||
return ret
|
||||
};
|
||||
|
||||
Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
|
||||
if (start > this.length) {
|
||||
start = this.length - 1;
|
||||
}
|
||||
if (start < 0) {
|
||||
start = this.length + start;
|
||||
}
|
||||
|
||||
for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
|
||||
walker = walker.next;
|
||||
}
|
||||
|
||||
var ret = [];
|
||||
for (var i = 0; walker && i < deleteCount; i++) {
|
||||
ret.push(walker.value);
|
||||
walker = this.removeNode(walker);
|
||||
}
|
||||
if (walker === null) {
|
||||
walker = this.tail;
|
||||
}
|
||||
|
||||
if (walker !== this.head && walker !== this.tail) {
|
||||
walker = walker.prev;
|
||||
}
|
||||
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
walker = insert(this, walker, nodes[i]);
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
Yallist.prototype.reverse = function () {
|
||||
var head = this.head;
|
||||
var tail = this.tail;
|
||||
for (var walker = head; walker !== null; walker = walker.prev) {
|
||||
var p = walker.prev;
|
||||
walker.prev = walker.next;
|
||||
walker.next = p;
|
||||
}
|
||||
this.head = tail;
|
||||
this.tail = head;
|
||||
return this
|
||||
};
|
||||
|
||||
function insert (self, node, value) {
|
||||
var inserted = node === self.head ?
|
||||
new Node(value, null, node, self) :
|
||||
new Node(value, node, node.next, self);
|
||||
|
||||
if (inserted.next === null) {
|
||||
self.tail = inserted;
|
||||
}
|
||||
if (inserted.prev === null) {
|
||||
self.head = inserted;
|
||||
}
|
||||
|
||||
self.length++;
|
||||
|
||||
return inserted
|
||||
}
|
||||
|
||||
function push (self, item) {
|
||||
self.tail = new Node(item, self.tail, null, self);
|
||||
if (!self.head) {
|
||||
self.head = self.tail;
|
||||
}
|
||||
self.length++;
|
||||
}
|
||||
|
||||
function unshift (self, item) {
|
||||
self.head = new Node(item, null, self.head, self);
|
||||
if (!self.tail) {
|
||||
self.tail = self.head;
|
||||
}
|
||||
self.length++;
|
||||
}
|
||||
|
||||
function Node (value, prev, next, list) {
|
||||
if (!(this instanceof Node)) {
|
||||
return new Node(value, prev, next, list)
|
||||
}
|
||||
|
||||
this.list = list;
|
||||
this.value = value;
|
||||
|
||||
if (prev) {
|
||||
prev.next = this;
|
||||
this.prev = prev;
|
||||
} else {
|
||||
this.prev = null;
|
||||
}
|
||||
|
||||
if (next) {
|
||||
next.prev = this;
|
||||
this.next = next;
|
||||
} else {
|
||||
this.next = null;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// add if support for Symbol.iterator is present
|
||||
requireIterator()(Yallist);
|
||||
} catch (er) {}
|
||||
|
||||
export { yallist as y };
|
||||
35
node_modules/nuxi/dist/shared/nuxi.d0ea9d71.mjs
generated
vendored
Normal file
35
node_modules/nuxi/dist/shared/nuxi.d0ea9d71.mjs
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
function isObject(value) {
|
||||
return value !== null && typeof value === "object";
|
||||
}
|
||||
function _defu(baseObject, defaults, namespace = ".", merger) {
|
||||
if (!isObject(defaults)) {
|
||||
return _defu(baseObject, {}, namespace, merger);
|
||||
}
|
||||
const object = Object.assign({}, defaults);
|
||||
for (const key in baseObject) {
|
||||
if (key === "__proto__" || key === "constructor") {
|
||||
continue;
|
||||
}
|
||||
const value = baseObject[key];
|
||||
if (value === null || value === void 0) {
|
||||
continue;
|
||||
}
|
||||
if (merger && merger(object, key, value, namespace)) {
|
||||
continue;
|
||||
}
|
||||
if (Array.isArray(value) && Array.isArray(object[key])) {
|
||||
object[key] = [...value, ...object[key]];
|
||||
} else if (isObject(value) && isObject(object[key])) {
|
||||
object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
||||
} else {
|
||||
object[key] = value;
|
||||
}
|
||||
}
|
||||
return object;
|
||||
}
|
||||
function createDefu(merger) {
|
||||
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
||||
}
|
||||
const defu = createDefu();
|
||||
|
||||
export { defu as d };
|
||||
9
node_modules/nuxi/dist/shared/nuxi.d21ab543.mjs
generated
vendored
Normal file
9
node_modules/nuxi/dist/shared/nuxi.d21ab543.mjs
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
const overrideEnv = (targetEnv) => {
|
||||
const currentEnv = process.env.NODE_ENV;
|
||||
if (currentEnv && currentEnv !== targetEnv) {
|
||||
console.warn(`Changing \`NODE_ENV\` from \`${currentEnv}\` to \`${targetEnv}\`, to avoid unintended behavior.`);
|
||||
}
|
||||
process.env.NODE_ENV = targetEnv;
|
||||
};
|
||||
|
||||
export { overrideEnv as o };
|
||||
49
node_modules/nuxi/dist/shared/nuxi.e551a86b.mjs
generated
vendored
Normal file
49
node_modules/nuxi/dist/shared/nuxi.e551a86b.mjs
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import { createRequire } from 'node:module';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
import { n as normalize, d as dirname } from './nuxi.a2d9d2e1.mjs';
|
||||
|
||||
function getModulePaths(paths) {
|
||||
return [].concat(
|
||||
global.__NUXT_PREPATHS__,
|
||||
paths,
|
||||
process.cwd(),
|
||||
global.__NUXT_PATHS__
|
||||
).filter(Boolean);
|
||||
}
|
||||
const _require = createRequire(process.cwd());
|
||||
function resolveModule(id, paths) {
|
||||
return normalize(_require.resolve(id, { paths: getModulePaths(paths) }));
|
||||
}
|
||||
function tryResolveModule(id, paths) {
|
||||
try {
|
||||
return resolveModule(id, paths);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function requireModule(id, paths) {
|
||||
return _require(resolveModule(id, paths));
|
||||
}
|
||||
function tryRequireModule(id, paths) {
|
||||
try {
|
||||
return requireModule(id, paths);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
function importModule(id, paths) {
|
||||
const resolvedPath = resolveModule(id, paths);
|
||||
return import(pathToFileURL(resolvedPath).href);
|
||||
}
|
||||
function getNearestPackage(id, paths) {
|
||||
while (dirname(id) !== id) {
|
||||
try {
|
||||
return requireModule(id + "/package.json", paths);
|
||||
} catch {
|
||||
}
|
||||
id = dirname(id);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export { getNearestPackage as a, tryResolveModule as b, getModulePaths as g, importModule as i, tryRequireModule as t };
|
||||
53
node_modules/nuxi/dist/shared/nuxi.e5ae87db.mjs
generated
vendored
Normal file
53
node_modules/nuxi/dist/shared/nuxi.e5ae87db.mjs
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
const NUMBER_CHAR_RE = /\d/;
|
||||
const STR_SPLITTERS = ["-", "_", "/", "."];
|
||||
function isUppercase(char = "") {
|
||||
if (NUMBER_CHAR_RE.test(char)) {
|
||||
return void 0;
|
||||
}
|
||||
return char.toUpperCase() === char;
|
||||
}
|
||||
function splitByCase(string_, separators) {
|
||||
const splitters = separators ?? STR_SPLITTERS;
|
||||
const parts = [];
|
||||
if (!string_ || typeof string_ !== "string") {
|
||||
return parts;
|
||||
}
|
||||
let buff = "";
|
||||
let previousUpper;
|
||||
let previousSplitter;
|
||||
for (const char of string_) {
|
||||
const isSplitter = splitters.includes(char);
|
||||
if (isSplitter === true) {
|
||||
parts.push(buff);
|
||||
buff = "";
|
||||
previousUpper = void 0;
|
||||
continue;
|
||||
}
|
||||
const isUpper = isUppercase(char);
|
||||
if (previousSplitter === false) {
|
||||
if (previousUpper === false && isUpper === true) {
|
||||
parts.push(buff);
|
||||
buff = char;
|
||||
previousUpper = isUpper;
|
||||
continue;
|
||||
}
|
||||
if (previousUpper === true && isUpper === false && buff.length > 1) {
|
||||
const lastChar = buff[buff.length - 1];
|
||||
parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
|
||||
buff = lastChar + char;
|
||||
previousUpper = isUpper;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
buff += char;
|
||||
previousUpper = isUpper;
|
||||
previousSplitter = isSplitter;
|
||||
}
|
||||
parts.push(buff);
|
||||
return parts;
|
||||
}
|
||||
function upperFirst(string_) {
|
||||
return !string_ ? "" : string_[0].toUpperCase() + string_.slice(1);
|
||||
}
|
||||
|
||||
export { splitByCase as s, upperFirst as u };
|
||||
52
node_modules/nuxi/dist/shared/nuxi.e90bf846.mjs
generated
vendored
Normal file
52
node_modules/nuxi/dist/shared/nuxi.e90bf846.mjs
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
||||
const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
||||
const JsonSigRx = /^["[{]|^-?\d[\d.]{0,14}$/;
|
||||
function jsonParseTransform(key, value) {
|
||||
if (key === "__proto__" || key === "constructor") {
|
||||
return;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
function destr(value, options = {}) {
|
||||
if (typeof value !== "string") {
|
||||
return value;
|
||||
}
|
||||
const _lval = value.toLowerCase();
|
||||
if (_lval === "true") {
|
||||
return true;
|
||||
}
|
||||
if (_lval === "false") {
|
||||
return false;
|
||||
}
|
||||
if (_lval === "null") {
|
||||
return null;
|
||||
}
|
||||
if (_lval === "nan") {
|
||||
return Number.NaN;
|
||||
}
|
||||
if (_lval === "infinity") {
|
||||
return Number.POSITIVE_INFINITY;
|
||||
}
|
||||
if (_lval === "undefined") {
|
||||
return void 0;
|
||||
}
|
||||
if (!JsonSigRx.test(value)) {
|
||||
if (options.strict) {
|
||||
throw new SyntaxError("Invalid JSON");
|
||||
}
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
if (suspectProtoRx.test(value) || suspectConstructorRx.test(value)) {
|
||||
return JSON.parse(value, jsonParseTransform);
|
||||
}
|
||||
return JSON.parse(value);
|
||||
} catch (error) {
|
||||
if (options.strict) {
|
||||
throw error;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
export { destr as d };
|
||||
28
node_modules/nuxi/dist/shared/nuxi.ed696fbc.mjs
generated
vendored
Normal file
28
node_modules/nuxi/dist/shared/nuxi.ed696fbc.mjs
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||
|
||||
function getDefaultExportFromCjs (x) {
|
||||
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
||||
}
|
||||
|
||||
function getAugmentedNamespace(n) {
|
||||
var f = n.default;
|
||||
if (typeof f == "function") {
|
||||
var a = function () {
|
||||
return f.apply(this, arguments);
|
||||
};
|
||||
a.prototype = f.prototype;
|
||||
} else a = {};
|
||||
Object.defineProperty(a, '__esModule', {value: true});
|
||||
Object.keys(n).forEach(function (k) {
|
||||
var d = Object.getOwnPropertyDescriptor(n, k);
|
||||
Object.defineProperty(a, k, d.get ? d : {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return n[k];
|
||||
}
|
||||
});
|
||||
});
|
||||
return a;
|
||||
}
|
||||
|
||||
export { getDefaultExportFromCjs as a, commonjsGlobal as c, getAugmentedNamespace as g };
|
||||
292
node_modules/nuxi/dist/shared/nuxi.ff602b95.mjs
generated
vendored
Normal file
292
node_modules/nuxi/dist/shared/nuxi.ff602b95.mjs
generated
vendored
Normal file
@@ -0,0 +1,292 @@
|
||||
import { existsSync, promises } from 'node:fs';
|
||||
import require$$0 from 'fs';
|
||||
import require$$0$1 from 'path';
|
||||
import require$$0$2 from 'os';
|
||||
import { g as getAugmentedNamespace } from './nuxi.ed696fbc.mjs';
|
||||
import 'node:os';
|
||||
import 'crypto';
|
||||
import 'module';
|
||||
import 'util';
|
||||
import 'perf_hooks';
|
||||
import 'vm';
|
||||
import 'url';
|
||||
import 'assert';
|
||||
import 'buffer';
|
||||
import 'tty';
|
||||
import { r as resolve } from './nuxi.a2d9d2e1.mjs';
|
||||
|
||||
var main$1 = {exports: {}};
|
||||
|
||||
const name = "dotenv";
|
||||
const version$1 = "16.0.3";
|
||||
const description = "Loads environment variables from .env file";
|
||||
const main = "lib/main.js";
|
||||
const types = "lib/main.d.ts";
|
||||
const exports = {
|
||||
".": {
|
||||
require: "./lib/main.js",
|
||||
types: "./lib/main.d.ts",
|
||||
"default": "./lib/main.js"
|
||||
},
|
||||
"./config": "./config.js",
|
||||
"./config.js": "./config.js",
|
||||
"./lib/env-options": "./lib/env-options.js",
|
||||
"./lib/env-options.js": "./lib/env-options.js",
|
||||
"./lib/cli-options": "./lib/cli-options.js",
|
||||
"./lib/cli-options.js": "./lib/cli-options.js",
|
||||
"./package.json": "./package.json"
|
||||
};
|
||||
const scripts = {
|
||||
"dts-check": "tsc --project tests/types/tsconfig.json",
|
||||
lint: "standard",
|
||||
"lint-readme": "standard-markdown",
|
||||
pretest: "npm run lint && npm run dts-check",
|
||||
test: "tap tests/*.js --100 -Rspec",
|
||||
prerelease: "npm test",
|
||||
release: "standard-version"
|
||||
};
|
||||
const repository = {
|
||||
type: "git",
|
||||
url: "git://github.com/motdotla/dotenv.git"
|
||||
};
|
||||
const keywords = [
|
||||
"dotenv",
|
||||
"env",
|
||||
".env",
|
||||
"environment",
|
||||
"variables",
|
||||
"config",
|
||||
"settings"
|
||||
];
|
||||
const readmeFilename = "README.md";
|
||||
const license = "BSD-2-Clause";
|
||||
const devDependencies = {
|
||||
"@types/node": "^17.0.9",
|
||||
decache: "^4.6.1",
|
||||
dtslint: "^3.7.0",
|
||||
sinon: "^12.0.1",
|
||||
standard: "^16.0.4",
|
||||
"standard-markdown": "^7.1.0",
|
||||
"standard-version": "^9.3.2",
|
||||
tap: "^15.1.6",
|
||||
tar: "^6.1.11",
|
||||
typescript: "^4.5.4"
|
||||
};
|
||||
const engines = {
|
||||
node: ">=12"
|
||||
};
|
||||
const _package = {
|
||||
name: name,
|
||||
version: version$1,
|
||||
description: description,
|
||||
main: main,
|
||||
types: types,
|
||||
exports: exports,
|
||||
scripts: scripts,
|
||||
repository: repository,
|
||||
keywords: keywords,
|
||||
readmeFilename: readmeFilename,
|
||||
license: license,
|
||||
devDependencies: devDependencies,
|
||||
engines: engines
|
||||
};
|
||||
|
||||
const _package$1 = {
|
||||
__proto__: null,
|
||||
name: name,
|
||||
version: version$1,
|
||||
description: description,
|
||||
main: main,
|
||||
types: types,
|
||||
exports: exports,
|
||||
scripts: scripts,
|
||||
repository: repository,
|
||||
keywords: keywords,
|
||||
readmeFilename: readmeFilename,
|
||||
license: license,
|
||||
devDependencies: devDependencies,
|
||||
engines: engines,
|
||||
default: _package
|
||||
};
|
||||
|
||||
const require$$3 = /*@__PURE__*/getAugmentedNamespace(_package$1);
|
||||
|
||||
const fs = require$$0;
|
||||
const path = require$$0$1;
|
||||
const os = require$$0$2;
|
||||
const packageJson = require$$3;
|
||||
|
||||
const version = packageJson.version;
|
||||
|
||||
const LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
||||
|
||||
// Parser src into an Object
|
||||
function parse (src) {
|
||||
const obj = {};
|
||||
|
||||
// Convert buffer to string
|
||||
let lines = src.toString();
|
||||
|
||||
// Convert line breaks to same format
|
||||
lines = lines.replace(/\r\n?/mg, '\n');
|
||||
|
||||
let match;
|
||||
while ((match = LINE.exec(lines)) != null) {
|
||||
const key = match[1];
|
||||
|
||||
// Default undefined or null to empty string
|
||||
let value = (match[2] || '');
|
||||
|
||||
// Remove whitespace
|
||||
value = value.trim();
|
||||
|
||||
// Check if double quoted
|
||||
const maybeQuote = value[0];
|
||||
|
||||
// Remove surrounding quotes
|
||||
value = value.replace(/^(['"`])([\s\S]*)\1$/mg, '$2');
|
||||
|
||||
// Expand newlines if double quoted
|
||||
if (maybeQuote === '"') {
|
||||
value = value.replace(/\\n/g, '\n');
|
||||
value = value.replace(/\\r/g, '\r');
|
||||
}
|
||||
|
||||
// Add to object
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj
|
||||
}
|
||||
|
||||
function _log (message) {
|
||||
console.log(`[dotenv@${version}][DEBUG] ${message}`);
|
||||
}
|
||||
|
||||
function _resolveHome (envPath) {
|
||||
return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath
|
||||
}
|
||||
|
||||
// Populates process.env from .env file
|
||||
function config (options) {
|
||||
let dotenvPath = path.resolve(process.cwd(), '.env');
|
||||
let encoding = 'utf8';
|
||||
const debug = Boolean(options && options.debug);
|
||||
const override = Boolean(options && options.override);
|
||||
|
||||
if (options) {
|
||||
if (options.path != null) {
|
||||
dotenvPath = _resolveHome(options.path);
|
||||
}
|
||||
if (options.encoding != null) {
|
||||
encoding = options.encoding;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// Specifying an encoding returns a string instead of a buffer
|
||||
const parsed = DotenvModule.parse(fs.readFileSync(dotenvPath, { encoding }));
|
||||
|
||||
Object.keys(parsed).forEach(function (key) {
|
||||
if (!Object.prototype.hasOwnProperty.call(process.env, key)) {
|
||||
process.env[key] = parsed[key];
|
||||
} else {
|
||||
if (override === true) {
|
||||
process.env[key] = parsed[key];
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
if (override === true) {
|
||||
_log(`"${key}" is already defined in \`process.env\` and WAS overwritten`);
|
||||
} else {
|
||||
_log(`"${key}" is already defined in \`process.env\` and was NOT overwritten`);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return { parsed }
|
||||
} catch (e) {
|
||||
if (debug) {
|
||||
_log(`Failed to load ${dotenvPath} ${e.message}`);
|
||||
}
|
||||
|
||||
return { error: e }
|
||||
}
|
||||
}
|
||||
|
||||
const DotenvModule = {
|
||||
config,
|
||||
parse
|
||||
};
|
||||
|
||||
main$1.exports.config = DotenvModule.config;
|
||||
var parse_1 = main$1.exports.parse = DotenvModule.parse;
|
||||
main$1.exports = DotenvModule;
|
||||
|
||||
async function setupDotenv(options) {
|
||||
const targetEnvironment = options.env ?? process.env;
|
||||
const environment = await loadDotenv({
|
||||
cwd: options.cwd,
|
||||
fileName: options.fileName ?? ".env",
|
||||
env: targetEnvironment,
|
||||
interpolate: options.interpolate ?? true
|
||||
});
|
||||
for (const key in environment) {
|
||||
if (!key.startsWith("_") && targetEnvironment[key] === void 0) {
|
||||
targetEnvironment[key] = environment[key];
|
||||
}
|
||||
}
|
||||
return environment;
|
||||
}
|
||||
async function loadDotenv(options) {
|
||||
const environment = /* @__PURE__ */ Object.create(null);
|
||||
const dotenvFile = resolve(options.cwd, options.fileName);
|
||||
if (existsSync(dotenvFile)) {
|
||||
const parsed = parse_1(await promises.readFile(dotenvFile, "utf8"));
|
||||
Object.assign(environment, parsed);
|
||||
}
|
||||
if (!options.env._applied) {
|
||||
Object.assign(environment, options.env);
|
||||
environment._applied = true;
|
||||
}
|
||||
if (options.interpolate) {
|
||||
interpolate(environment);
|
||||
}
|
||||
return environment;
|
||||
}
|
||||
function interpolate(target, source = {}, parse = (v) => v) {
|
||||
function getValue(key) {
|
||||
return source[key] !== void 0 ? source[key] : target[key];
|
||||
}
|
||||
function interpolate2(value, parents = []) {
|
||||
if (typeof value !== "string") {
|
||||
return value;
|
||||
}
|
||||
const matches = value.match(/(.?\${?(?:[\w:]+)?}?)/g) || [];
|
||||
return parse(matches.reduce((newValue, match) => {
|
||||
const parts = /(.?)\${?([\w:]+)?}?/g.exec(match);
|
||||
const prefix = parts[1];
|
||||
let value2, replacePart;
|
||||
if (prefix === "\\") {
|
||||
replacePart = parts[0];
|
||||
value2 = replacePart.replace("\\$", "$");
|
||||
} else {
|
||||
const key = parts[2];
|
||||
replacePart = parts[0].slice(prefix.length);
|
||||
if (parents.includes(key)) {
|
||||
console.warn(`Please avoid recursive environment variables ( loop: ${parents.join(" > ")} > ${key} )`);
|
||||
return "";
|
||||
}
|
||||
value2 = getValue(key);
|
||||
value2 = interpolate2(value2, [...parents, key]);
|
||||
}
|
||||
return value2 !== void 0 ? newValue.replace(replacePart, value2) : newValue;
|
||||
}, value));
|
||||
}
|
||||
for (const key in target) {
|
||||
target[key] = interpolate2(getValue(key));
|
||||
}
|
||||
}
|
||||
|
||||
export { setupDotenv as s };
|
||||
Reference in New Issue
Block a user