@modern-js/eslint-generator
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
1,453 lines (1,447 loc) • 5.2 MB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __pow = Math.pow;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
// ../../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/compiled/import-lazy/index.js
var require_import_lazy = __commonJS({
"../../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/compiled/import-lazy/index.js"(exports, module2) {
(() => {
"use strict";
var e = { 42: (e2) => {
const lazy = (e3, r2, t2) => e3 === void 0 ? r2(t2) : e3;
e2.exports = (e3) => (r2) => {
let t2;
const _ = { get: (_2, n) => {
t2 = lazy(t2, e3, r2);
return Reflect.get(t2, n);
}, apply: (_2, n, u) => {
t2 = lazy(t2, e3, r2);
return Reflect.apply(t2, n, u);
}, construct: (_2, n) => {
t2 = lazy(t2, e3, r2);
return Reflect.construct(t2, n);
} };
return new Proxy(function() {
}, _);
};
} };
var r = {};
function __nccwpck_require__(t2) {
var _ = r[t2];
if (_ !== void 0) {
return _.exports;
}
var n = r[t2] = { exports: {} };
var u = true;
try {
e[t2](n, n.exports, __nccwpck_require__);
u = false;
} finally {
if (u)
delete r[t2];
}
return n.exports;
}
if (typeof __nccwpck_require__ !== "undefined")
__nccwpck_require__.ab = __dirname + "/";
var t = __nccwpck_require__(42);
module2.exports = t;
})();
}
});
// ../../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/dist/import.js
var require_import = __commonJS({
"../../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/dist/import.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Import = exports.lazyImport = void 0;
var lazy = (moduleName, requireFn) => {
const importLazyLocal = require_import_lazy()(requireFn);
return importLazyLocal(moduleName);
};
exports.lazyImport = lazy;
exports.Import = { lazy };
}
});
// ../../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/compiled/fs-extra/index.js
var require_fs_extra = __commonJS({
"../../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/compiled/fs-extra/index.js"(exports, module2) {
(() => {
var e = { 571: (e2, t2, r2) => {
"use strict";
const n = r2(127);
const i = r2(17);
const o = r2(971).mkdirsSync;
const c = r2(309).utimesMillisSync;
const s = r2(883);
function copySync(e3, t3, r3) {
if (typeof r3 === "function") {
r3 = { filter: r3 };
}
r3 = r3 || {};
r3.clobber = "clobber" in r3 ? !!r3.clobber : true;
r3.overwrite = "overwrite" in r3 ? !!r3.overwrite : r3.clobber;
if (r3.preserveTimestamps && process.arch === "ia32") {
console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`);
}
const { srcStat: n2, destStat: i2 } = s.checkPathsSync(e3, t3, "copy", r3);
s.checkParentPathsSync(e3, n2, t3, "copy");
return handleFilterAndCopy(i2, e3, t3, r3);
}
function handleFilterAndCopy(e3, t3, r3, c2) {
if (c2.filter && !c2.filter(t3, r3))
return;
const s2 = i.dirname(r3);
if (!n.existsSync(s2))
o(s2);
return getStats(e3, t3, r3, c2);
}
function startCopy(e3, t3, r3, n2) {
if (n2.filter && !n2.filter(t3, r3))
return;
return getStats(e3, t3, r3, n2);
}
function getStats(e3, t3, r3, i2) {
const o2 = i2.dereference ? n.statSync : n.lstatSync;
const c2 = o2(t3);
if (c2.isDirectory())
return onDir(c2, e3, t3, r3, i2);
else if (c2.isFile() || c2.isCharacterDevice() || c2.isBlockDevice())
return onFile(c2, e3, t3, r3, i2);
else if (c2.isSymbolicLink())
return onLink(e3, t3, r3, i2);
else if (c2.isSocket())
throw new Error(`Cannot copy a socket file: ${t3}`);
else if (c2.isFIFO())
throw new Error(`Cannot copy a FIFO pipe: ${t3}`);
throw new Error(`Unknown file: ${t3}`);
}
function onFile(e3, t3, r3, n2, i2) {
if (!t3)
return copyFile(e3, r3, n2, i2);
return mayCopyFile(e3, r3, n2, i2);
}
function mayCopyFile(e3, t3, r3, i2) {
if (i2.overwrite) {
n.unlinkSync(r3);
return copyFile(e3, t3, r3, i2);
} else if (i2.errorOnExist) {
throw new Error(`'${r3}' already exists`);
}
}
function copyFile(e3, t3, r3, i2) {
n.copyFileSync(t3, r3);
if (i2.preserveTimestamps)
handleTimestamps(e3.mode, t3, r3);
return setDestMode(r3, e3.mode);
}
function handleTimestamps(e3, t3, r3) {
if (fileIsNotWritable(e3))
makeFileWritable(r3, e3);
return setDestTimestamps(t3, r3);
}
function fileIsNotWritable(e3) {
return (e3 & 128) === 0;
}
function makeFileWritable(e3, t3) {
return setDestMode(e3, t3 | 128);
}
function setDestMode(e3, t3) {
return n.chmodSync(e3, t3);
}
function setDestTimestamps(e3, t3) {
const r3 = n.statSync(e3);
return c(t3, r3.atime, r3.mtime);
}
function onDir(e3, t3, r3, n2, i2) {
if (!t3)
return mkDirAndCopy(e3.mode, r3, n2, i2);
return copyDir(r3, n2, i2);
}
function mkDirAndCopy(e3, t3, r3, i2) {
n.mkdirSync(r3);
copyDir(t3, r3, i2);
return setDestMode(r3, e3);
}
function copyDir(e3, t3, r3) {
n.readdirSync(e3).forEach((n2) => copyDirItem(n2, e3, t3, r3));
}
function copyDirItem(e3, t3, r3, n2) {
const o2 = i.join(t3, e3);
const c2 = i.join(r3, e3);
const { destStat: a } = s.checkPathsSync(o2, c2, "copy", n2);
return startCopy(a, o2, c2, n2);
}
function onLink(e3, t3, r3, o2) {
let c2 = n.readlinkSync(t3);
if (o2.dereference) {
c2 = i.resolve(process.cwd(), c2);
}
if (!e3) {
return n.symlinkSync(c2, r3);
} else {
let e4;
try {
e4 = n.readlinkSync(r3);
} catch (e5) {
if (e5.code === "EINVAL" || e5.code === "UNKNOWN")
return n.symlinkSync(c2, r3);
throw e5;
}
if (o2.dereference) {
e4 = i.resolve(process.cwd(), e4);
}
if (s.isSrcSubdir(c2, e4)) {
throw new Error(`Cannot copy '${c2}' to a subdirectory of itself, '${e4}'.`);
}
if (n.statSync(r3).isDirectory() && s.isSrcSubdir(e4, c2)) {
throw new Error(`Cannot overwrite '${e4}' with '${c2}'.`);
}
return copyLink(c2, r3);
}
}
function copyLink(e3, t3) {
n.unlinkSync(t3);
return n.symlinkSync(e3, t3);
}
e2.exports = copySync;
}, 987: (e2, t2, r2) => {
"use strict";
const n = r2(127);
const i = r2(17);
const o = r2(971).mkdirs;
const c = r2(725).pathExists;
const s = r2(309).utimesMillis;
const a = r2(883);
function copy(e3, t3, r3, n2) {
if (typeof r3 === "function" && !n2) {
n2 = r3;
r3 = {};
} else if (typeof r3 === "function") {
r3 = { filter: r3 };
}
n2 = n2 || function() {
};
r3 = r3 || {};
r3.clobber = "clobber" in r3 ? !!r3.clobber : true;
r3.overwrite = "overwrite" in r3 ? !!r3.overwrite : r3.clobber;
if (r3.preserveTimestamps && process.arch === "ia32") {
console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
see https://github.com/jprichardson/node-fs-extra/issues/269`);
}
a.checkPaths(e3, t3, "copy", r3, (i2, o2) => {
if (i2)
return n2(i2);
const { srcStat: c2, destStat: s2 } = o2;
a.checkParentPaths(e3, c2, t3, "copy", (i3) => {
if (i3)
return n2(i3);
if (r3.filter)
return handleFilter(checkParentDir, s2, e3, t3, r3, n2);
return checkParentDir(s2, e3, t3, r3, n2);
});
});
}
function checkParentDir(e3, t3, r3, n2, s2) {
const a2 = i.dirname(r3);
c(a2, (i2, c2) => {
if (i2)
return s2(i2);
if (c2)
return getStats(e3, t3, r3, n2, s2);
o(a2, (i3) => {
if (i3)
return s2(i3);
return getStats(e3, t3, r3, n2, s2);
});
});
}
function handleFilter(e3, t3, r3, n2, i2, o2) {
Promise.resolve(i2.filter(r3, n2)).then((c2) => {
if (c2)
return e3(t3, r3, n2, i2, o2);
return o2();
}, (e4) => o2(e4));
}
function startCopy(e3, t3, r3, n2, i2) {
if (n2.filter)
return handleFilter(getStats, e3, t3, r3, n2, i2);
return getStats(e3, t3, r3, n2, i2);
}
function getStats(e3, t3, r3, i2, o2) {
const c2 = i2.dereference ? n.stat : n.lstat;
c2(t3, (n2, c3) => {
if (n2)
return o2(n2);
if (c3.isDirectory())
return onDir(c3, e3, t3, r3, i2, o2);
else if (c3.isFile() || c3.isCharacterDevice() || c3.isBlockDevice())
return onFile(c3, e3, t3, r3, i2, o2);
else if (c3.isSymbolicLink())
return onLink(e3, t3, r3, i2, o2);
else if (c3.isSocket())
return o2(new Error(`Cannot copy a socket file: ${t3}`));
else if (c3.isFIFO())
return o2(new Error(`Cannot copy a FIFO pipe: ${t3}`));
return o2(new Error(`Unknown file: ${t3}`));
});
}
function onFile(e3, t3, r3, n2, i2, o2) {
if (!t3)
return copyFile(e3, r3, n2, i2, o2);
return mayCopyFile(e3, r3, n2, i2, o2);
}
function mayCopyFile(e3, t3, r3, i2, o2) {
if (i2.overwrite) {
n.unlink(r3, (n2) => {
if (n2)
return o2(n2);
return copyFile(e3, t3, r3, i2, o2);
});
} else if (i2.errorOnExist) {
return o2(new Error(`'${r3}' already exists`));
} else
return o2();
}
function copyFile(e3, t3, r3, i2, o2) {
n.copyFile(t3, r3, (n2) => {
if (n2)
return o2(n2);
if (i2.preserveTimestamps)
return handleTimestampsAndMode(e3.mode, t3, r3, o2);
return setDestMode(r3, e3.mode, o2);
});
}
function handleTimestampsAndMode(e3, t3, r3, n2) {
if (fileIsNotWritable(e3)) {
return makeFileWritable(r3, e3, (i2) => {
if (i2)
return n2(i2);
return setDestTimestampsAndMode(e3, t3, r3, n2);
});
}
return setDestTimestampsAndMode(e3, t3, r3, n2);
}
function fileIsNotWritable(e3) {
return (e3 & 128) === 0;
}
function makeFileWritable(e3, t3, r3) {
return setDestMode(e3, t3 | 128, r3);
}
function setDestTimestampsAndMode(e3, t3, r3, n2) {
setDestTimestamps(t3, r3, (t4) => {
if (t4)
return n2(t4);
return setDestMode(r3, e3, n2);
});
}
function setDestMode(e3, t3, r3) {
return n.chmod(e3, t3, r3);
}
function setDestTimestamps(e3, t3, r3) {
n.stat(e3, (e4, n2) => {
if (e4)
return r3(e4);
return s(t3, n2.atime, n2.mtime, r3);
});
}
function onDir(e3, t3, r3, n2, i2, o2) {
if (!t3)
return mkDirAndCopy(e3.mode, r3, n2, i2, o2);
return copyDir(r3, n2, i2, o2);
}
function mkDirAndCopy(e3, t3, r3, i2, o2) {
n.mkdir(r3, (n2) => {
if (n2)
return o2(n2);
copyDir(t3, r3, i2, (t4) => {
if (t4)
return o2(t4);
return setDestMode(r3, e3, o2);
});
});
}
function copyDir(e3, t3, r3, i2) {
n.readdir(e3, (n2, o2) => {
if (n2)
return i2(n2);
return copyDirItems(o2, e3, t3, r3, i2);
});
}
function copyDirItems(e3, t3, r3, n2, i2) {
const o2 = e3.pop();
if (!o2)
return i2();
return copyDirItem(e3, o2, t3, r3, n2, i2);
}
function copyDirItem(e3, t3, r3, n2, o2, c2) {
const s2 = i.join(r3, t3);
const u = i.join(n2, t3);
a.checkPaths(s2, u, "copy", o2, (t4, i2) => {
if (t4)
return c2(t4);
const { destStat: a2 } = i2;
startCopy(a2, s2, u, o2, (t5) => {
if (t5)
return c2(t5);
return copyDirItems(e3, r3, n2, o2, c2);
});
});
}
function onLink(e3, t3, r3, o2, c2) {
n.readlink(t3, (t4, s2) => {
if (t4)
return c2(t4);
if (o2.dereference) {
s2 = i.resolve(process.cwd(), s2);
}
if (!e3) {
return n.symlink(s2, r3, c2);
} else {
n.readlink(r3, (t5, u) => {
if (t5) {
if (t5.code === "EINVAL" || t5.code === "UNKNOWN")
return n.symlink(s2, r3, c2);
return c2(t5);
}
if (o2.dereference) {
u = i.resolve(process.cwd(), u);
}
if (a.isSrcSubdir(s2, u)) {
return c2(new Error(`Cannot copy '${s2}' to a subdirectory of itself, '${u}'.`));
}
if (e3.isDirectory() && a.isSrcSubdir(u, s2)) {
return c2(new Error(`Cannot overwrite '${u}' with '${s2}'.`));
}
return copyLink(s2, r3, c2);
});
}
});
}
function copyLink(e3, t3, r3) {
n.unlink(t3, (i2) => {
if (i2)
return r3(i2);
return n.symlink(e3, t3, r3);
});
}
e2.exports = copy;
}, 2: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
e2.exports = { copy: n(r2(987)), copySync: r2(571) };
}, 708: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromPromise;
const i = r2(812);
const o = r2(17);
const c = r2(971);
const s = r2(95);
const a = n(function emptyDir(e3) {
return __async(this, null, function* () {
let t3;
try {
t3 = yield i.readdir(e3);
} catch (e4) {
return c.mkdirs(e3);
}
return Promise.all(t3.map((t4) => s.remove(o.join(e3, t4))));
});
});
function emptyDirSync(e3) {
let t3;
try {
t3 = i.readdirSync(e3);
} catch (e4) {
return c.mkdirsSync(e3);
}
t3.forEach((t4) => {
t4 = o.join(e3, t4);
s.removeSync(t4);
});
}
e2.exports = { emptyDirSync, emptydirSync: emptyDirSync, emptyDir: a, emptydir: a };
}, 102: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
const i = r2(17);
const o = r2(127);
const c = r2(971);
function createFile(e3, t3) {
function makeFile() {
o.writeFile(e3, "", (e4) => {
if (e4)
return t3(e4);
t3();
});
}
o.stat(e3, (r3, n2) => {
if (!r3 && n2.isFile())
return t3();
const s = i.dirname(e3);
o.stat(s, (e4, r4) => {
if (e4) {
if (e4.code === "ENOENT") {
return c.mkdirs(s, (e5) => {
if (e5)
return t3(e5);
makeFile();
});
}
return t3(e4);
}
if (r4.isDirectory())
makeFile();
else {
o.readdir(s, (e5) => {
if (e5)
return t3(e5);
});
}
});
});
}
function createFileSync(e3) {
let t3;
try {
t3 = o.statSync(e3);
} catch (e4) {
}
if (t3 && t3.isFile())
return;
const r3 = i.dirname(e3);
try {
if (!o.statSync(r3).isDirectory()) {
o.readdirSync(r3);
}
} catch (e4) {
if (e4 && e4.code === "ENOENT")
c.mkdirsSync(r3);
else
throw e4;
}
o.writeFileSync(e3, "");
}
e2.exports = { createFile: n(createFile), createFileSync };
}, 726: (e2, t2, r2) => {
"use strict";
const { createFile: n, createFileSync: i } = r2(102);
const { createLink: o, createLinkSync: c } = r2(161);
const { createSymlink: s, createSymlinkSync: a } = r2(294);
e2.exports = { createFile: n, createFileSync: i, ensureFile: n, ensureFileSync: i, createLink: o, createLinkSync: c, ensureLink: o, ensureLinkSync: c, createSymlink: s, createSymlinkSync: a, ensureSymlink: s, ensureSymlinkSync: a };
}, 161: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
const i = r2(17);
const o = r2(127);
const c = r2(971);
const s = r2(725).pathExists;
const { areIdentical: a } = r2(883);
function createLink(e3, t3, r3) {
function makeLink(e4, t4) {
o.link(e4, t4, (e5) => {
if (e5)
return r3(e5);
r3(null);
});
}
o.lstat(t3, (n2, u) => {
o.lstat(e3, (n3, o2) => {
if (n3) {
n3.message = n3.message.replace("lstat", "ensureLink");
return r3(n3);
}
if (u && a(o2, u))
return r3(null);
const f = i.dirname(t3);
s(f, (n4, i2) => {
if (n4)
return r3(n4);
if (i2)
return makeLink(e3, t3);
c.mkdirs(f, (n5) => {
if (n5)
return r3(n5);
makeLink(e3, t3);
});
});
});
});
}
function createLinkSync(e3, t3) {
let r3;
try {
r3 = o.lstatSync(t3);
} catch (e4) {
}
try {
const t4 = o.lstatSync(e3);
if (r3 && a(t4, r3))
return;
} catch (e4) {
e4.message = e4.message.replace("lstat", "ensureLink");
throw e4;
}
const n2 = i.dirname(t3);
const s2 = o.existsSync(n2);
if (s2)
return o.linkSync(e3, t3);
c.mkdirsSync(n2);
return o.linkSync(e3, t3);
}
e2.exports = { createLink: n(createLink), createLinkSync };
}, 332: (e2, t2, r2) => {
"use strict";
const n = r2(17);
const i = r2(127);
const o = r2(725).pathExists;
function symlinkPaths(e3, t3, r3) {
if (n.isAbsolute(e3)) {
return i.lstat(e3, (t4) => {
if (t4) {
t4.message = t4.message.replace("lstat", "ensureSymlink");
return r3(t4);
}
return r3(null, { toCwd: e3, toDst: e3 });
});
} else {
const c = n.dirname(t3);
const s = n.join(c, e3);
return o(s, (t4, o2) => {
if (t4)
return r3(t4);
if (o2) {
return r3(null, { toCwd: s, toDst: e3 });
} else {
return i.lstat(e3, (t5) => {
if (t5) {
t5.message = t5.message.replace("lstat", "ensureSymlink");
return r3(t5);
}
return r3(null, { toCwd: e3, toDst: n.relative(c, e3) });
});
}
});
}
}
function symlinkPathsSync(e3, t3) {
let r3;
if (n.isAbsolute(e3)) {
r3 = i.existsSync(e3);
if (!r3)
throw new Error("absolute srcpath does not exist");
return { toCwd: e3, toDst: e3 };
} else {
const o2 = n.dirname(t3);
const c = n.join(o2, e3);
r3 = i.existsSync(c);
if (r3) {
return { toCwd: c, toDst: e3 };
} else {
r3 = i.existsSync(e3);
if (!r3)
throw new Error("relative srcpath does not exist");
return { toCwd: e3, toDst: n.relative(o2, e3) };
}
}
}
e2.exports = { symlinkPaths, symlinkPathsSync };
}, 894: (e2, t2, r2) => {
"use strict";
const n = r2(127);
function symlinkType(e3, t3, r3) {
r3 = typeof t3 === "function" ? t3 : r3;
t3 = typeof t3 === "function" ? false : t3;
if (t3)
return r3(null, t3);
n.lstat(e3, (e4, n2) => {
if (e4)
return r3(null, "file");
t3 = n2 && n2.isDirectory() ? "dir" : "file";
r3(null, t3);
});
}
function symlinkTypeSync(e3, t3) {
let r3;
if (t3)
return t3;
try {
r3 = n.lstatSync(e3);
} catch (e4) {
return "file";
}
return r3 && r3.isDirectory() ? "dir" : "file";
}
e2.exports = { symlinkType, symlinkTypeSync };
}, 294: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
const i = r2(17);
const o = r2(812);
const c = r2(971);
const s = c.mkdirs;
const a = c.mkdirsSync;
const u = r2(332);
const f = u.symlinkPaths;
const l = u.symlinkPathsSync;
const y = r2(894);
const d = y.symlinkType;
const m = y.symlinkTypeSync;
const p = r2(725).pathExists;
const { areIdentical: h } = r2(883);
function createSymlink(e3, t3, r3, n2) {
n2 = typeof r3 === "function" ? r3 : n2;
r3 = typeof r3 === "function" ? false : r3;
o.lstat(t3, (i2, c2) => {
if (!i2 && c2.isSymbolicLink()) {
Promise.all([o.stat(e3), o.stat(t3)]).then(([i3, o2]) => {
if (h(i3, o2))
return n2(null);
_createSymlink(e3, t3, r3, n2);
});
} else
_createSymlink(e3, t3, r3, n2);
});
}
function _createSymlink(e3, t3, r3, n2) {
f(e3, t3, (c2, a2) => {
if (c2)
return n2(c2);
e3 = a2.toDst;
d(a2.toCwd, r3, (r4, c3) => {
if (r4)
return n2(r4);
const a3 = i.dirname(t3);
p(a3, (r5, i2) => {
if (r5)
return n2(r5);
if (i2)
return o.symlink(e3, t3, c3, n2);
s(a3, (r6) => {
if (r6)
return n2(r6);
o.symlink(e3, t3, c3, n2);
});
});
});
});
}
function createSymlinkSync(e3, t3, r3) {
let n2;
try {
n2 = o.lstatSync(t3);
} catch (e4) {
}
if (n2 && n2.isSymbolicLink()) {
const r4 = o.statSync(e3);
const n3 = o.statSync(t3);
if (h(r4, n3))
return;
}
const c2 = l(e3, t3);
e3 = c2.toDst;
r3 = m(c2.toCwd, r3);
const s2 = i.dirname(t3);
const u2 = o.existsSync(s2);
if (u2)
return o.symlinkSync(e3, t3, r3);
a(s2);
return o.symlinkSync(e3, t3, r3);
}
e2.exports = { createSymlink: n(createSymlink), createSymlinkSync };
}, 812: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
const i = r2(127);
const o = ["access", "appendFile", "chmod", "chown", "close", "copyFile", "fchmod", "fchown", "fdatasync", "fstat", "fsync", "ftruncate", "futimes", "lchmod", "lchown", "link", "lstat", "mkdir", "mkdtemp", "open", "opendir", "readdir", "readFile", "readlink", "realpath", "rename", "rm", "rmdir", "stat", "symlink", "truncate", "unlink", "utimes", "writeFile"].filter((e3) => typeof i[e3] === "function");
Object.assign(t2, i);
o.forEach((e3) => {
t2[e3] = n(i[e3]);
});
t2.realpath.native = n(i.realpath.native);
t2.exists = function(e3, t3) {
if (typeof t3 === "function") {
return i.exists(e3, t3);
}
return new Promise((t4) => i.exists(e3, t4));
};
t2.read = function(e3, t3, r3, n2, o2, c) {
if (typeof c === "function") {
return i.read(e3, t3, r3, n2, o2, c);
}
return new Promise((c2, s) => {
i.read(e3, t3, r3, n2, o2, (e4, t4, r4) => {
if (e4)
return s(e4);
c2({ bytesRead: t4, buffer: r4 });
});
});
};
t2.write = function(e3, t3, ...r3) {
if (typeof r3[r3.length - 1] === "function") {
return i.write(e3, t3, ...r3);
}
return new Promise((n2, o2) => {
i.write(e3, t3, ...r3, (e4, t4, r4) => {
if (e4)
return o2(e4);
n2({ bytesWritten: t4, buffer: r4 });
});
});
};
if (typeof i.writev === "function") {
t2.writev = function(e3, t3, ...r3) {
if (typeof r3[r3.length - 1] === "function") {
return i.writev(e3, t3, ...r3);
}
return new Promise((n2, o2) => {
i.writev(e3, t3, ...r3, (e4, t4, r4) => {
if (e4)
return o2(e4);
n2({ bytesWritten: t4, buffers: r4 });
});
});
};
}
}, 81: (e2, t2, r2) => {
"use strict";
e2.exports = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, r2(812)), r2(2)), r2(708)), r2(726)), r2(779)), r2(971)), r2(511)), r2(701)), r2(725)), r2(95));
}, 779: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromPromise;
const i = r2(901);
i.outputJson = n(r2(410));
i.outputJsonSync = r2(925);
i.outputJSON = i.outputJson;
i.outputJSONSync = i.outputJsonSync;
i.writeJSON = i.writeJson;
i.writeJSONSync = i.writeJsonSync;
i.readJSON = i.readJson;
i.readJSONSync = i.readJsonSync;
e2.exports = i;
}, 901: (e2, t2, r2) => {
"use strict";
const n = r2(654);
e2.exports = { readJson: n.readFile, readJsonSync: n.readFileSync, writeJson: n.writeFile, writeJsonSync: n.writeFileSync };
}, 925: (e2, t2, r2) => {
"use strict";
const { stringify: n } = r2(208);
const { outputFileSync: i } = r2(701);
function outputJsonSync(e3, t3, r3) {
const o = n(t3, r3);
i(e3, o, r3);
}
e2.exports = outputJsonSync;
}, 410: (e2, t2, r2) => {
"use strict";
const { stringify: n } = r2(208);
const { outputFile: i } = r2(701);
function outputJson(_0, _1) {
return __async(this, arguments, function* (e3, t3, r3 = {}) {
const o = n(t3, r3);
yield i(e3, o, r3);
});
}
e2.exports = outputJson;
}, 971: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromPromise;
const { makeDir: i, makeDirSync: o } = r2(284);
const c = n(i);
e2.exports = { mkdirs: c, mkdirsSync: o, mkdirp: c, mkdirpSync: o, ensureDir: c, ensureDirSync: o };
}, 284: (e2, t2, r2) => {
"use strict";
const n = r2(812);
const { checkPath: i } = r2(216);
const getMode = (e3) => {
const t3 = { mode: 511 };
if (typeof e3 === "number")
return e3;
return __spreadValues(__spreadValues({}, t3), e3).mode;
};
e2.exports.makeDir = (e3, t3) => __async(exports, null, function* () {
i(e3);
return n.mkdir(e3, { mode: getMode(t3), recursive: true });
});
e2.exports.makeDirSync = (e3, t3) => {
i(e3);
return n.mkdirSync(e3, { mode: getMode(t3), recursive: true });
};
}, 216: (e2, t2, r2) => {
"use strict";
const n = r2(17);
e2.exports.checkPath = function checkPath(e3) {
if (process.platform === "win32") {
const t3 = /[<>:"|?*]/.test(e3.replace(n.parse(e3).root, ""));
if (t3) {
const t4 = new Error(`Path contains invalid characters: ${e3}`);
t4.code = "EINVAL";
throw t4;
}
}
};
}, 511: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
e2.exports = { move: n(r2(795)), moveSync: r2(429) };
}, 429: (e2, t2, r2) => {
"use strict";
const n = r2(127);
const i = r2(17);
const o = r2(2).copySync;
const c = r2(95).removeSync;
const s = r2(971).mkdirpSync;
const a = r2(883);
function moveSync(e3, t3, r3) {
r3 = r3 || {};
const n2 = r3.overwrite || r3.clobber || false;
const { srcStat: o2, isChangingCase: c2 = false } = a.checkPathsSync(e3, t3, "move", r3);
a.checkParentPathsSync(e3, o2, t3, "move");
if (!isParentRoot(t3))
s(i.dirname(t3));
return doRename(e3, t3, n2, c2);
}
function isParentRoot(e3) {
const t3 = i.dirname(e3);
const r3 = i.parse(t3);
return r3.root === t3;
}
function doRename(e3, t3, r3, i2) {
if (i2)
return rename(e3, t3, r3);
if (r3) {
c(t3);
return rename(e3, t3, r3);
}
if (n.existsSync(t3))
throw new Error("dest already exists.");
return rename(e3, t3, r3);
}
function rename(e3, t3, r3) {
try {
n.renameSync(e3, t3);
} catch (n2) {
if (n2.code !== "EXDEV")
throw n2;
return moveAcrossDevice(e3, t3, r3);
}
}
function moveAcrossDevice(e3, t3, r3) {
const n2 = { overwrite: r3, errorOnExist: true };
o(e3, t3, n2);
return c(e3);
}
e2.exports = moveSync;
}, 795: (e2, t2, r2) => {
"use strict";
const n = r2(127);
const i = r2(17);
const o = r2(2).copy;
const c = r2(95).remove;
const s = r2(971).mkdirp;
const a = r2(725).pathExists;
const u = r2(883);
function move(e3, t3, r3, n2) {
if (typeof r3 === "function") {
n2 = r3;
r3 = {};
}
const o2 = r3.overwrite || r3.clobber || false;
u.checkPaths(e3, t3, "move", r3, (r4, c2) => {
if (r4)
return n2(r4);
const { srcStat: a2, isChangingCase: f = false } = c2;
u.checkParentPaths(e3, a2, t3, "move", (r5) => {
if (r5)
return n2(r5);
if (isParentRoot(t3))
return doRename(e3, t3, o2, f, n2);
s(i.dirname(t3), (r6) => {
if (r6)
return n2(r6);
return doRename(e3, t3, o2, f, n2);
});
});
});
}
function isParentRoot(e3) {
const t3 = i.dirname(e3);
const r3 = i.parse(t3);
return r3.root === t3;
}
function doRename(e3, t3, r3, n2, i2) {
if (n2)
return rename(e3, t3, r3, i2);
if (r3) {
return c(t3, (n3) => {
if (n3)
return i2(n3);
return rename(e3, t3, r3, i2);
});
}
a(t3, (n3, o2) => {
if (n3)
return i2(n3);
if (o2)
return i2(new Error("dest already exists."));
return rename(e3, t3, r3, i2);
});
}
function rename(e3, t3, r3, i2) {
n.rename(e3, t3, (n2) => {
if (!n2)
return i2();
if (n2.code !== "EXDEV")
return i2(n2);
return moveAcrossDevice(e3, t3, r3, i2);
});
}
function moveAcrossDevice(e3, t3, r3, n2) {
const i2 = { overwrite: r3, errorOnExist: true };
o(e3, t3, i2, (t4) => {
if (t4)
return n2(t4);
return c(e3, n2);
});
}
e2.exports = move;
}, 701: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromCallback;
const i = r2(127);
const o = r2(17);
const c = r2(971);
const s = r2(725).pathExists;
function outputFile(e3, t3, r3, n2) {
if (typeof r3 === "function") {
n2 = r3;
r3 = "utf8";
}
const a = o.dirname(e3);
s(a, (o2, s2) => {
if (o2)
return n2(o2);
if (s2)
return i.writeFile(e3, t3, r3, n2);
c.mkdirs(a, (o3) => {
if (o3)
return n2(o3);
i.writeFile(e3, t3, r3, n2);
});
});
}
function outputFileSync(e3, ...t3) {
const r3 = o.dirname(e3);
if (i.existsSync(r3)) {
return i.writeFileSync(e3, ...t3);
}
c.mkdirsSync(r3);
i.writeFileSync(e3, ...t3);
}
e2.exports = { outputFile: n(outputFile), outputFileSync };
}, 725: (e2, t2, r2) => {
"use strict";
const n = r2(5).fromPromise;
const i = r2(812);
function pathExists(e3) {
return i.access(e3).then(() => true).catch(() => false);
}
e2.exports = { pathExists: n(pathExists), pathExistsSync: i.existsSync };
}, 95: (e2, t2, r2) => {
"use strict";
const n = r2(127);
const i = r2(5).fromCallback;
const o = r2(193);
function remove(e3, t3) {
if (n.rm)
return n.rm(e3, { recursive: true, force: true }, t3);
o(e3, t3);
}
function removeSync(e3) {
if (n.rmSync)
return n.rmSync(e3, { recursive: true, force: true });
o.sync(e3);
}
e2.exports = { remove: i(remove), removeSync };
}, 193: (e2, t2, r2) => {
"use strict";
const n = r2(127);
const i = r2(17);
const o = r2(491);
const c = process.platform === "win32";
function defaults(e3) {
const t3 = ["unlink", "chmod", "stat", "lstat", "rmdir", "readdir"];
t3.forEach((t4) => {
e3[t4] = e3[t4] || n[t4];
t4 = t4 + "Sync";
e3[t4] = e3[t4] || n[t4];
});
e3.maxBusyTries = e3.maxBusyTries || 3;
}
function rimraf(e3, t3, r3) {
let n2 = 0;
if (typeof t3 === "function") {
r3 = t3;
t3 = {};
}
o(e3, "rimraf: missing path");
o.strictEqual(typeof e3, "string", "rimraf: path should be a string");
o.strictEqual(typeof r3, "function", "rimraf: callback function required");
o(t3, "rimraf: invalid options argument provided");
o.strictEqual(typeof t3, "object", "rimraf: options should be object");
defaults(t3);
rimraf_(e3, t3, function CB(i2) {
if (i2) {
if ((i2.code === "EBUSY" || i2.code === "ENOTEMPTY" || i2.code === "EPERM") && n2 < t3.maxBusyTries) {
n2++;
const r4 = n2 * 100;
return setTimeout(() => rimraf_(e3, t3, CB), r4);
}
if (i2.code === "ENOENT")
i2 = null;
}
r3(i2);
});
}
function rimraf_(e3, t3, r3) {
o(e3);
o(t3);
o(typeof r3 === "function");
t3.lstat(e3, (n2, i2) => {
if (n2 && n2.code === "ENOENT") {
return r3(null);
}
if (n2 && n2.code === "EPERM" && c) {
return fixWinEPERM(e3, t3, n2, r3);
}
if (i2 && i2.isDirectory()) {
return rmdir(e3, t3, n2, r3);
}
t3.unlink(e3, (n3) => {
if (n3) {
if (n3.code === "ENOENT") {
return r3(null);
}
if (n3.code === "EPERM") {
return c ? fixWinEPERM(e3, t3, n3, r3) : rmdir(e3, t3, n3, r3);
}
if (n3.code === "EISDIR") {
return rmdir(e3, t3, n3, r3);
}
}
return r3(n3);
});
});
}
function fixWinEPERM(e3, t3, r3, n2) {
o(e3);
o(t3);
o(typeof n2 === "function");
t3.chmod(e3, 438, (i2) => {
if (i2) {
n2(i2.code === "ENOENT" ? null : r3);
} else {
t3.stat(e3, (i3, o2) => {
if (i3) {
n2(i3.code === "ENOENT" ? null : r3);
} else if (o2.isDirectory()) {
rmdir(e3, t3, r3, n2);
} else {
t3.unlink(e3, n2);
}
});
}
});
}
function fixWinEPERMSync(e3, t3, r3) {
let n2;
o(e3);
o(t3);
try {
t3.chmodSync(e3, 438);
} catch (e4) {
if (e4.code === "ENOENT") {
return;
} else {
throw r3;
}
}
try {
n2 = t3.statSync(e3);
} catch (e4) {
if (e4.code === "ENOENT") {
return;
} else {
throw r3;
}
}
if (n2.isDirectory()) {
rmdirSync(e3, t3, r3);
} else {
t3.unlinkSync(e3);
}
}
function rmdir(e3, t3, r3, n2) {
o(e3);
o(t3);
o(typeof n2 === "function");
t3.rmdir(e3, (i2) => {
if (i2 && (i2.code === "ENOTEMPTY" || i2.code === "EEXIST" || i2.code === "EPERM")) {
rmkids(e3, t3, n2);
} else if (i2 && i2.code === "ENOTDIR") {
n2(r3);
} else {
n2(i2);
}
});
}
function rmkids(e3, t3, r3) {
o(e3);
o(t3);
o(typeof r3 === "function");
t3.readdir(e3, (n2, o2) => {
if (n2)
return r3(n2);
let c2 = o2.length;
let s;
if (c2 === 0)
return t3.rmdir(e3, r3);
o2.forEach((n3) => {
rimraf(i.join(e3, n3), t3, (n4) => {
if (s) {
return;
}
if (n4)
return r3(s = n4);
if (--c2 === 0) {
t3.rmdir(e3, r3);
}
});
});
});
}
function rimrafSync(e3, t3) {
let r3;
t3 = t3 || {};
defaults(t3);
o(e3, "rimraf: missing path");
o.strictEqual(typeof e3, "string", "rimraf: path should be a string");
o(t3, "rimraf: missing options");
o.strictEqual(typeof t3, "object", "rimraf: options should be object");
try {
r3 = t3.lstatSync(e3);
} catch (r4) {
if (r4.code === "ENOENT") {
return;
}
if (r4.code === "EPERM" && c) {
fixWinEPERMSync(e3, t3, r4);
}
}
try {
if (r3 && r3.isDirectory()) {
rmdirSync(e3, t3, null);
} else {
t3.unlinkSync(e3);
}
} catch (r4) {
if (r4.code === "ENOENT") {
return;
} else if (r4.code === "EPERM") {
return c ? fixWinEPERMSync(e3, t3, r4) : rmdirSync(e3, t3, r4);
} else if (r4.code !== "EISDIR") {
throw r4;
}
rmdirSync(e3, t3, r4);
}
}
function rmdirSync(e3, t3, r3) {
o(e3);
o(t3);
try {
t3.rmdirSync(e3);
} catch (n2) {
if (n2.code === "ENOTDIR") {
throw r3;
} else if (n2.code === "ENOTEMPTY" || n2.code === "EEXIST" || n2.code === "EPERM") {
rmkidsSync(e3, t3);
} else if (n2.code !== "ENOENT") {
throw n2;
}
}
}
function rmkidsSync(e3, t3) {
o(e3);
o(t3);
t3.readdirSync(e3).forEach((r3) => rimrafSync(i.join(e3, r3), t3));
if (c) {
const r3 = Date.now();
do {
try {
const r4 = t3.rmdirSync(e3, t3);
return r4;
} catch (e4) {
}
} while (Date.now() - r3 < 500);
} else {
const r3 = t3.rmdirSync(e3, t3);
return r3;
}
}
e2.exports = rimraf;
rimraf.sync = rimrafSync;
}, 883: (e2, t2, r2) => {
"use strict";
const n = r2(812);
const i = r2(17);
const o = r2(837);
function getStats(e3, t3, r3) {
const i2 = r3.dereference ? (e4) => n.stat(e4, { bigint: true }) : (e4) => n.lstat(e4, { bigint: true });
return Promise.all([i2(e3), i2(t3).catch((e4) => {
if (e4.code === "ENOENT")
return null;
throw e4;
})]).then(([e4, t4]) => ({ srcStat: e4, destStat: t4 }));
}
function getStatsSync(e3, t3, r3) {
let i2;
const o2 = r3.dereference ? (e4) => n.statSync(e4, { bigint: true }) : (e4) => n.lstatSync(e4, { bigint: true });
const c = o2(e3);
try {
i2 = o2(t3);
} catch (e4) {
if (e4.code === "ENOENT")
return { srcStat: c, destStat: null };
throw e4;
}
return { srcStat: c, destStat: i2 };
}
function checkPaths(e3, t3, r3, n2, c) {
o.callbackify(getStats)(e3, t3, n2, (n3, o2) => {
if (n3)
return c(n3);
const { srcStat: s, destStat: a } = o2;
if (a) {
if (areIdentical(s, a)) {
const n4 = i.basename(e3);
const o3 = i.basename(t3);
if (r3 === "move" && n4 !== o3 && n4.toLowerCase() === o3.toLowerCase()) {
return c(null, { srcStat: s, destStat: a, isChangingCase: true });
}
return c(new Error("Source and destination must not be the same."));
}
if (s.isDirectory() && !a.isDirectory()) {
return c(new Error(`Cannot overwrite non-directory '${t3}' with directory '${e3}'.`));
}
if (!s.isDirectory() && a.isDirectory()) {
return c(new Error(`Cannot overwrite directory '${t3}' with non-directory '${e3}'.`));
}
}
if (s.isDirectory() && isSrcSubdir(e3, t3)) {
return c(new Error(errMsg(e3, t3, r3)));
}
return c(null, { srcStat: s, destStat: a });
});
}
function checkPathsSync(e3, t3, r3, n2) {
const { srcStat: o2, destStat: c } = getStatsSync(e3, t3, n2);
if (c) {
if (areIdentical(o2, c)) {
const n3 = i.basename(e3);
const s = i.basename(t3);
if (r3 === "move" && n3 !== s && n3.toLowerCase() === s.toLowerCase()) {
return { srcStat: o2, destStat: c, isChangingCase: true };
}
throw new Error("Source and destination must not be the same.");
}
if (o2.isDirectory() && !c.isDirectory()) {
throw new Error(`Cannot overwrite non-directory '${t3}' with directory '${e3}'.`);
}
if (!o2.isDirectory() && c.isDirectory()) {
throw new Error(`Cannot overwrite directory '${t3}' with non-directory '${e3}'.`);
}
}
if (o2.isDirectory() && isSrcSubdir(e3, t3)) {
throw new Error(errMsg(e3, t3, r3));
}
return { srcStat: o2, destStat: c };
}
function checkParentPaths(e3, t3, r3, o2, c) {
const s = i.resolve(i.dirname(e3));
const a = i.resolve(i.dirname(r3));
if (a === s || a === i.parse(a).root)
return c();
n.stat(a, { bigint: true }, (n2, i2) => {
if (n2) {
if (n2.code === "ENOENT")
return c();
return c(n2);
}
if (areIdentical(t3, i2)) {
return c(new Error(errMsg(e3, r3, o2)));
}
return checkParentPaths(e3, t3, a, o2, c);