UNPKG

@eslint/config-inspector

Version:

A visual tool for inspecting and understanding your ESLint flat configs

1,657 lines 480 kB
import nodeModule, { builtinModules, createRequire } from "node:module"; import process$1 from "node:process"; import c from "ansis"; import cac from "cac"; import { createDevServer, resolveDevServerPort } from "devframe/adapters/dev"; import fs, { readFile } from "node:fs/promises"; import { createBuild } from "devframe/adapters/build"; import { glob } from "tinyglobby"; import { AsyncLocalStorage } from "node:async_hooks"; import fs$1, { promises, realpathSync, statSync } from "node:fs"; import { fileURLToPath, pathToFileURL } from "node:url"; import path from "node:path"; import { format, inspect, promisify } from "node:util"; import { execFile } from "node:child_process"; import { createJiti } from "jiti"; import assert from "node:assert"; import v8 from "node:v8"; import os from "node:os"; import tty from "node:tty"; import chokidar from "chokidar"; import { defineRpcFunction } from "devframe"; import { defineDevframe } from "devframe/types"; //#region \0rolldown/runtime.js var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res); var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); var __exportAll = (all, no_symbols) => { let target = {}; for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" }); return target; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { key = keys[i]; if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: ((k) => from[k]).bind(null, 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) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __require = /* @__PURE__ */ createRequire(import.meta.url); //#endregion //#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//; function normalizeWindowsPath(input = "") { if (!input) return input; return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase()); } const _UNC_REGEX = /^[/\\]{2}/; const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/; const _DRIVE_LETTER_RE = /^[A-Za-z]:$/; const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/; const normalize$3 = function(path) { if (path.length === 0) return "."; path = normalizeWindowsPath(path); const isUNCPath = path.match(_UNC_REGEX); const isPathAbsolute = isAbsolute$2(path); const trailingSeparator = path[path.length - 1] === "/"; path = normalizeString$2(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$2(path) ? `/${path}` : path; }; function cwd() { if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/"); return "/"; } const resolve$3 = 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] : cwd(); if (!path || path.length === 0) continue; resolvedPath = `${path}/${resolvedPath}`; resolvedAbsolute = isAbsolute$2(path); } resolvedPath = normalizeString$2(resolvedPath, !resolvedAbsolute); if (resolvedAbsolute && !isAbsolute$2(resolvedPath)) return `/${resolvedPath}`; return resolvedPath.length > 0 ? resolvedPath : "."; }; function normalizeString$2(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$2 = function(p) { return _IS_ABSOLUTE_RE.test(p); }; const relative$2 = function(from, to) { const _from = resolve$3(from).replace(_ROOT_FOLDER_RE, "$1").split("/"); const _to = resolve$3(to).replace(_ROOT_FOLDER_RE, "$1").split("/"); if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/"); const _fromCopy = [..._from]; for (const segment of _fromCopy) { if (_to[0] !== segment) break; _from.shift(); _to.shift(); } return [..._from.map(() => ".."), ..._to].join("/"); }; const dirname$2 = 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$2(p) ? "/" : "."); }; const basename$2 = function(p, extension) { const segments = normalizeWindowsPath(p).split("/"); let lastSegment = ""; for (let i = segments.length - 1; i >= 0; i--) { const val = segments[i]; if (val) { lastSegment = val; break; } } return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment; }; //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/providers/async.js var require_async$3 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AsyncProvider = void 0; var AsyncProvider = class { #reader; constructor(reader) { this.#reader = reader; } read(root, callback) { const entries = []; this.#reader.onError((error) => { callFailureCallback(callback, error); }); this.#reader.onEntry((entry) => { entries.push(entry); }); this.#reader.onEnd(() => { callSuccessCallback(callback, entries); }); this.#reader.read(root); } }; exports.AsyncProvider = AsyncProvider; function callFailureCallback(callback, error) { callback(error); } function callSuccessCallback(callback, entries) { callback(null, entries); } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/providers/stream.js var require_stream = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamProvider = void 0; const node_stream_1 = __require("node:stream"); var StreamProvider = class { #reader; #stream; constructor(reader) { this.#reader = reader; this.#stream = this.#createOutputStream(); } read(root) { this.#reader.onError((error) => { this.#stream.emit("error", error); }); this.#reader.onEntry((entry) => { this.#stream.push(entry); }); this.#reader.onEnd(() => { this.#stream.push(null); }); this.#reader.read(root); return this.#stream; } #createOutputStream() { return new node_stream_1.Readable({ objectMode: true, read: () => {}, destroy: (error, callback) => { if (!this.#reader.isDestroyed) this.#reader.destroy(); callback(error); } }); } }; exports.StreamProvider = StreamProvider; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/providers/sync.js var require_sync$3 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.SyncProvider = void 0; var SyncProvider = class { #reader; constructor(reader) { this.#reader = reader; } read(root) { return this.#reader.read(root); } }; exports.SyncProvider = SyncProvider; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/providers/index.js var require_providers = /* @__PURE__ */ __commonJSMin(((exports) => { var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { return m[k]; } }; Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); var __exportStar = exports && exports.__exportStar || function(m, exports$2) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$2, p)) __createBinding(exports$2, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require_async$3(), exports); __exportStar(require_stream(), exports); __exportStar(require_sync$3(), exports); })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.stat@4.0.0/node_modules/@nodelib/fs.stat/out/providers/async.js var require_async$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.read = read; function read(path, settings, callback) { settings.fs.lstat(path, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; } if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { callSuccessCallback(callback, lstat); return; } settings.fs.stat(path, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); return; } callSuccessCallback(callback, lstat); return; } if (settings.markSymbolicLink) stat.isSymbolicLink = () => true; callSuccessCallback(callback, stat); }); }); } function callFailureCallback(callback, error) { callback(error); } function callSuccessCallback(callback, result) { callback(null, result); } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.stat@4.0.0/node_modules/@nodelib/fs.stat/out/providers/sync.js var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.read = read; function read(path, settings) { const lstat = settings.fs.lstatSync(path); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat; try { const stat = settings.fs.statSync(path); if (settings.markSymbolicLink) stat.isSymbolicLink = () => true; return stat; } catch (error) { if (!settings.throwErrorOnBrokenSymbolicLink) return lstat; throw error; } } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.stat@4.0.0/node_modules/@nodelib/fs.stat/out/adapters/fs.js var require_fs$3 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.FILE_SYSTEM_ADAPTER = void 0; exports.createFileSystemAdapter = createFileSystemAdapter; const fs$4 = __require("node:fs"); exports.FILE_SYSTEM_ADAPTER = { lstat: fs$4.lstat, stat: fs$4.stat, lstatSync: fs$4.lstatSync, statSync: fs$4.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; return { ...exports.FILE_SYSTEM_ADAPTER, ...fsMethods }; } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.stat@4.0.0/node_modules/@nodelib/fs.stat/out/settings.js var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = void 0; const fs = require_fs$3(); var Settings = class { followSymbolicLink; fs; markSymbolicLink; throwErrorOnBrokenSymbolicLink; constructor(options = {}) { this.followSymbolicLink = options.followSymbolicLink ?? true; this.fs = fs.createFileSystemAdapter(options.fs); this.markSymbolicLink = options.markSymbolicLink ?? false; this.throwErrorOnBrokenSymbolicLink = options.throwErrorOnBrokenSymbolicLink ?? true; } }; exports.Settings = Settings; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.stat@4.0.0/node_modules/@nodelib/fs.stat/out/stat.js var require_stat = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.stat = stat; exports.statSync = statSync; const async = require_async$2(); const sync = require_sync$2(); const settings_1 = require_settings$2(); function stat(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { async.read(path, getSettings(), optionsOrSettingsOrCallback); return; } async.read(path, getSettings(optionsOrSettingsOrCallback), callback); } function statSync(path, optionsOrSettings) { const settings = getSettings(optionsOrSettings); return sync.read(path, settings); } function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.Settings) return settingsOrOptions; return new settings_1.Settings(settingsOrOptions); } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.stat@4.0.0/node_modules/@nodelib/fs.stat/out/index.js var require_out$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = exports.statSync = exports.stat = void 0; var stat_1 = require_stat(); Object.defineProperty(exports, "stat", { enumerable: true, get: function() { return stat_1.stat; } }); Object.defineProperty(exports, "statSync", { enumerable: true, get: function() { return stat_1.statSync; } }); var settings_1 = require_settings$2(); Object.defineProperty(exports, "Settings", { enumerable: true, get: function() { return settings_1.Settings; } }); })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/adapters/fs.js var require_fs$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.FILE_SYSTEM_ADAPTER = void 0; exports.createFileSystemAdapter = createFileSystemAdapter; const fs$3 = __require("node:fs"); exports.FILE_SYSTEM_ADAPTER = { lstat: fs$3.lstat, stat: fs$3.stat, lstatSync: fs$3.lstatSync, statSync: fs$3.statSync, readdir: fs$3.readdir, readdirSync: fs$3.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER; return { ...exports.FILE_SYSTEM_ADAPTER, ...fsMethods }; } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/settings.js var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = void 0; const path$3 = __require("node:path"); const fsStat = require_out$2(); const fs = require_fs$2(); var Settings = class { followSymbolicLinks; fs; pathSegmentSeparator; stats; throwErrorOnBrokenSymbolicLink; fsStatSettings; constructor(options = {}) { this.followSymbolicLinks = options.followSymbolicLinks ?? false; this.fs = fs.createFileSystemAdapter(options.fs); this.pathSegmentSeparator = options.pathSegmentSeparator ?? path$3.sep; this.stats = options.stats ?? false; this.throwErrorOnBrokenSymbolicLink = options.throwErrorOnBrokenSymbolicLink ?? true; this.fsStatSettings = new fsStat.Settings({ followSymbolicLink: this.followSymbolicLinks, fs: this.fs, throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink }); } }; exports.Settings = Settings; })); //#endregion //#region node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js var require_queue_microtask = /* @__PURE__ */ __commonJSMin(((exports, module) => { /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ let promise; module.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { throw err; }, 0)); })); //#endregion //#region node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js var require_run_parallel = /* @__PURE__ */ __commonJSMin(((exports, module) => { /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ module.exports = runParallel; const queueMicrotask = require_queue_microtask(); function runParallel(tasks, cb) { let results, pending, keys; let isSync = true; if (Array.isArray(tasks)) { results = []; pending = tasks.length; } else { keys = Object.keys(tasks); results = {}; pending = keys.length; } function done(err) { function end() { if (cb) cb(err, results); cb = null; } if (isSync) queueMicrotask(end); else end(); } function each(i, err, result) { results[i] = result; if (--pending === 0 || err) done(err); } if (!pending) done(null); else if (keys) keys.forEach(function(key) { tasks[key](function(err, result) { each(key, err, result); }); }); else tasks.forEach(function(task, i) { task(function(err, result) { each(i, err, result); }); }); isSync = false; } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/utils/fs.js var require_fs$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.DirentFromStats = void 0; exports.createDirentFromStats = createDirentFromStats; const fs$2 = __require("node:fs"); const kStats = Symbol("stats"); function createDirentFromStats(name, stats, parentPath) { return new DirentFromStats(name, stats, parentPath); } var DirentFromStats = class extends fs$2.Dirent { [kStats]; constructor(name, stats, parentPath) { super(name, null, parentPath); this[kStats] = stats; } }; exports.DirentFromStats = DirentFromStats; for (const key of Reflect.ownKeys(fs$2.Dirent.prototype)) { const name = key; const descriptor = Object.getOwnPropertyDescriptor(fs$2.Dirent.prototype, name); if (descriptor?.writable === false || descriptor?.set === void 0) continue; DirentFromStats.prototype[name] = function() { return this[kStats][name](); }; } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/utils/index.js var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.fs = void 0; exports.fs = require_fs$1(); })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/providers/common.js var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.joinPathSegments = joinPathSegments; function joinPathSegments(a, b, separator) { /** * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). */ if (a.endsWith(separator)) return a + b; return a + separator + b; } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/providers/async.js var require_async$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.read = read; const fsStat = require_out$2(); const rpl = require_run_parallel(); const utils = require_utils(); const common = require_common$2(); function read(directory, settings, callback) { settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { if (readdirError !== null) { callFailureCallback(callback, readdirError); return; } const entries = dirents.map((dirent) => ({ dirent, name: dirent.name, path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) })); if (!settings.stats && !settings.followSymbolicLinks) { callSuccessCallback(callback, entries); return; } rpl(makeRplTasks(directory, entries, settings), (rplError) => { if (rplError !== null) { callFailureCallback(callback, rplError); return; } callSuccessCallback(callback, entries); }); }); } function makeRplTasks(directory, entries, settings) { const tasks = []; for (const entry of entries) { const task = makeRplTask(directory, entry, settings); if (task !== void 0) tasks.push(task); } return tasks; } /** * The task mutates the incoming entry object depending on the settings. * Returns the task, or undefined if the task is empty. */ function makeRplTask(directory, entry, settings) { const action = getStatsAction(entry, settings); if (action === void 0) return; return (done) => { action((error, stats) => { if (error !== null) { done(settings.throwErrorOnBrokenSymbolicLink ? error : null); return; } if (settings.stats) entry.stats = stats; if (settings.followSymbolicLinks) entry.dirent = utils.fs.createDirentFromStats(entry.name, stats, directory); done(null, entry); }); }; } function getStatsAction(entry, settings) { if (settings.stats) return (callback) => { fsStat.stat(entry.path, settings.fsStatSettings, callback); }; if (settings.followSymbolicLinks && entry.dirent.isSymbolicLink()) return (callback) => { settings.fs.stat(entry.path, callback); }; } function callFailureCallback(callback, error) { callback(error); } function callSuccessCallback(callback, result) { callback(null, result); } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/providers/sync.js var require_sync$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.read = read; const fsStat = require_out$2(); const utils = require_utils(); const common = require_common$2(); function read(directory, settings) { return settings.fs.readdirSync(directory, { withFileTypes: true }).map((dirent) => { const entry = { dirent, name: dirent.name, path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) }; if (settings.stats) entry.stats = fsStat.statSync(entry.path, settings.fsStatSettings); if (settings.followSymbolicLinks && entry.dirent.isSymbolicLink()) try { const stats = entry.stats ?? settings.fs.statSync(entry.path); entry.dirent = utils.fs.createDirentFromStats(entry.name, stats, directory); } catch (error) { if (settings.throwErrorOnBrokenSymbolicLink) throw error; } return entry; }); } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/scandir.js var require_scandir = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.scandir = scandir; exports.scandirSync = scandirSync; const settings_1 = require_settings$1(); const async = require_async$1(); const sync = require_sync$1(); function scandir(path, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { async.read(path, getSettings(), optionsOrSettingsOrCallback); return; } async.read(path, getSettings(optionsOrSettingsOrCallback), callback); } function scandirSync(path, optionsOrSettings) { const settings = getSettings(optionsOrSettings); return sync.read(path, settings); } function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.Settings) return settingsOrOptions; return new settings_1.Settings(settingsOrOptions); } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.scandir@4.0.1/node_modules/@nodelib/fs.scandir/out/index.js var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = exports.scandirSync = exports.scandir = void 0; var scandir_1 = require_scandir(); Object.defineProperty(exports, "scandir", { enumerable: true, get: function() { return scandir_1.scandir; } }); Object.defineProperty(exports, "scandirSync", { enumerable: true, get: function() { return scandir_1.scandirSync; } }); var settings_1 = require_settings$1(); Object.defineProperty(exports, "Settings", { enumerable: true, get: function() { return settings_1.Settings; } }); })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/settings.js var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = void 0; const path$2 = __require("node:path"); const fsScandir = require_out$1(); var Settings = class { basePath; concurrency; deepFilter; entryFilter; errorFilter; pathSegmentSeparator; fsScandirSettings; signal; constructor(options = {}) { this.basePath = options.basePath ?? void 0; this.concurrency = options.concurrency ?? Number.POSITIVE_INFINITY; this.deepFilter = options.deepFilter ?? null; this.entryFilter = options.entryFilter ?? null; this.errorFilter = options.errorFilter ?? null; this.pathSegmentSeparator = options.pathSegmentSeparator ?? path$2.sep; this.signal = options.signal; this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: options.followSymbolicLinks, fs: options.fs, pathSegmentSeparator: this.pathSegmentSeparator, stats: options.stats, throwErrorOnBrokenSymbolicLink: options.throwErrorOnBrokenSymbolicLink }); } }; exports.Settings = Settings; })); //#endregion //#region node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js var require_reusify = /* @__PURE__ */ __commonJSMin(((exports, module) => { function reusify(Constructor) { var head = new Constructor(); var tail = head; function get() { var current = head; if (current.next) head = current.next; else { head = new Constructor(); tail = head; } current.next = null; return current; } function release(obj) { tail.next = obj; tail = obj; } return { get, release }; } module.exports = reusify; })); //#endregion //#region node_modules/.pnpm/fastq@1.19.1/node_modules/fastq/queue.js var require_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { var reusify = require_reusify(); function fastqueue(context, worker, _concurrency) { if (typeof context === "function") { _concurrency = worker; worker = context; context = null; } if (!(_concurrency >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); var cache = reusify(Task); var queueHead = null; var queueTail = null; var _running = 0; var errorHandler = null; var self = { push, drain: noop, saturated: noop, pause, paused: false, get concurrency() { return _concurrency; }, set concurrency(value) { if (!(value >= 1)) throw new Error("fastqueue concurrency must be equal to or greater than 1"); _concurrency = value; if (self.paused) return; for (; queueHead && _running < _concurrency;) { _running++; release(); } }, running, resume, idle, length, getQueue, unshift, empty: noop, kill, killAndDrain, error }; return self; function running() { return _running; } function pause() { self.paused = true; } function length() { var current = queueHead; var counter = 0; while (current) { current = current.next; counter++; } return counter; } function getQueue() { var current = queueHead; var tasks = []; while (current) { tasks.push(current.value); current = current.next; } return tasks; } function resume() { if (!self.paused) return; self.paused = false; if (queueHead === null) { _running++; release(); return; } for (; queueHead && _running < _concurrency;) { _running++; release(); } } function idle() { return _running === 0 && self.length() === 0; } function push(value, done) { var current = cache.get(); current.context = context; current.release = release; current.value = value; current.callback = done || noop; current.errorHandler = errorHandler; if (_running >= _concurrency || self.paused) if (queueTail) { queueTail.next = current; queueTail = current; } else { queueHead = current; queueTail = current; self.saturated(); } else { _running++; worker.call(context, current.value, current.worked); } } function unshift(value, done) { var current = cache.get(); current.context = context; current.release = release; current.value = value; current.callback = done || noop; current.errorHandler = errorHandler; if (_running >= _concurrency || self.paused) if (queueHead) { current.next = queueHead; queueHead = current; } else { queueHead = current; queueTail = current; self.saturated(); } else { _running++; worker.call(context, current.value, current.worked); } } function release(holder) { if (holder) cache.release(holder); var next = queueHead; if (next && _running <= _concurrency) if (!self.paused) { if (queueTail === queueHead) queueTail = null; queueHead = next.next; next.next = null; worker.call(context, next.value, next.worked); if (queueTail === null) self.empty(); } else _running--; else if (--_running === 0) self.drain(); } function kill() { queueHead = null; queueTail = null; self.drain = noop; } function killAndDrain() { queueHead = null; queueTail = null; self.drain(); self.drain = noop; } function error(handler) { errorHandler = handler; } } function noop() {} function Task() { this.value = null; this.callback = noop; this.next = null; this.release = noop; this.context = null; this.errorHandler = null; var self = this; this.worked = function worked(err, result) { var callback = self.callback; var errorHandler = self.errorHandler; var val = self.value; self.value = null; self.callback = noop; if (self.errorHandler) errorHandler(err, val); callback.call(self.context, err, result); self.release(self); }; } function queueAsPromised(context, worker, _concurrency) { if (typeof context === "function") { _concurrency = worker; worker = context; context = null; } function asyncWrapper(arg, cb) { worker.call(this, arg).then(function(res) { cb(null, res); }, cb); } var queue = fastqueue(context, asyncWrapper, _concurrency); var pushCb = queue.push; var unshiftCb = queue.unshift; queue.push = push; queue.unshift = unshift; queue.drained = drained; return queue; function push(value) { var p = new Promise(function(resolve, reject) { pushCb(value, function(err, result) { if (err) { reject(err); return; } resolve(result); }); }); p.catch(noop); return p; } function unshift(value) { var p = new Promise(function(resolve, reject) { unshiftCb(value, function(err, result) { if (err) { reject(err); return; } resolve(result); }); }); p.catch(noop); return p; } function drained() { return new Promise(function(resolve) { process.nextTick(function() { if (queue.idle()) resolve(); else { var previousDrain = queue.drain; queue.drain = function() { if (typeof previousDrain === "function") previousDrain(); resolve(); queue.drain = previousDrain; }; } }); }); } } module.exports = fastqueue; module.exports.promise = queueAsPromised; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/readers/common.js var require_common$1 = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.isFatalError = isFatalError; exports.isAppliedFilter = isAppliedFilter; exports.replacePathSegmentSeparator = replacePathSegmentSeparator; exports.joinPathSegments = joinPathSegments; function isFatalError(settings, error) { if (settings.errorFilter === null) return true; return !settings.errorFilter(error); } function isAppliedFilter(filter, value) { return filter === null || filter(value); } function replacePathSegmentSeparator(filepath, separator) { return filepath.split(/[/\\]/).join(separator); } function joinPathSegments(a, b, separator) { if (a === "") return b; /** * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). */ if (a.endsWith(separator)) return a + b; return a + separator + b; } })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/readers/async.js var require_async = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.AsyncReader = void 0; const node_events_1 = __require("node:events"); const fastq = require_queue(); const common = require_common$1(); var AsyncReaderEmitter = class { #emitter = new node_events_1.EventEmitter(); onEntry(callback) { this.#emitter.on("entry", callback); } onError(callback) { this.#emitter.once("error", callback); } onEnd(callback) { this.#emitter.once("end", callback); } _emitEntry(entry) { this.#emitter.emit("entry", entry); } _emitEnd() { this.#emitter.emit("end"); } _emitError(error) { this.#emitter.emit("error", error); } }; var AsyncReader = class extends AsyncReaderEmitter { #isFatalError = false; #isDestroyed = false; #fs; #settings; #queue; constructor(fs, settings) { super(); const queue = fastq(this.#worker.bind(this), settings.concurrency); queue.drain = () => { if (!this.#isFatalError) this._emitEnd(); }; this.#fs = fs; this.#settings = settings; this.#queue = queue; } read(root) { this.#isFatalError = false; this.#isDestroyed = false; this.#attachAbortSignal(); const directory = common.replacePathSegmentSeparator(root, this.#settings.pathSegmentSeparator); this.#pushToQueue(directory, this.#settings.basePath); } get isDestroyed() { return this.#isDestroyed; } destroy() { if (this.#isDestroyed) return; this.#isDestroyed = true; this.#queue.killAndDrain(); } #attachAbortSignal() { const signal = this.#settings.signal; if (signal?.aborted === true) this.#handleError(signal.reason); signal?.addEventListener("abort", () => { this.#handleError(signal.reason); }, { once: true }); } #pushToQueue(directory, base) { this.#queue.push({ directory, base }, (error) => { if (error !== null) this.#handleError(error); }); } #worker(item, done) { this.#fs.scandir(item.directory, this.#settings.fsScandirSettings, (error, entries) => { if (error !== null) { done(error, void 0); return; } /** * The user can define their own custom filtering and error handling functions. * If the user throws an error, we need to catch it and emit it to the user error handler. * * Without this, the error will be thrown immediately bypassing the error handler. */ try { for (const entry of entries) this.#handleEntry(entry, item.base); } catch (error) { done(error, void 0); return; } done(null, void 0); }); } #handleError(error) { if (this.#isDestroyed || !common.isFatalError(this.#settings, error)) return; this.#isFatalError = true; this.#isDestroyed = true; this._emitError(error); } #handleEntry(entry, base) { if (this.#isDestroyed || this.#isFatalError) return; const fullpath = entry.path; if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this.#settings.pathSegmentSeparator); if (common.isAppliedFilter(this.#settings.entryFilter, entry)) this._emitEntry(entry); if (entry.dirent.isDirectory() && common.isAppliedFilter(this.#settings.deepFilter, entry)) this.#pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } }; exports.AsyncReader = AsyncReader; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/readers/sync.js var require_sync = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.SyncReader = void 0; const common = require_common$1(); var SyncReader = class { #fs; #settings; #queue = /* @__PURE__ */ new Set(); #storage = []; constructor(fs, settings) { this.#fs = fs; this.#settings = settings; } read(root) { const directory = common.replacePathSegmentSeparator(root, this.#settings.pathSegmentSeparator); this.#pushToQueue(directory, this.#settings.basePath); this.#handleQueue(); return this.#storage; } #pushToQueue(directory, base) { this.#queue.add({ directory, base }); } #handleQueue() { for (const item of this.#queue.values()) this.#handleDirectory(item.directory, item.base); } #handleDirectory(directory, base) { try { const entries = this.#fs.scandirSync(directory, this.#settings.fsScandirSettings); for (const entry of entries) this.#handleEntry(entry, base); } catch (error) { this.#handleError(error); } } #handleError(error) { if (common.isFatalError(this.#settings, error)) throw error; } #handleEntry(entry, base) { const fullpath = entry.path; if (base !== void 0) entry.path = common.joinPathSegments(base, entry.name, this.#settings.pathSegmentSeparator); if (common.isAppliedFilter(this.#settings.entryFilter, entry)) this.#pushToStorage(entry); if (entry.dirent.isDirectory() && common.isAppliedFilter(this.#settings.deepFilter, entry)) this.#pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); } #pushToStorage(entry) { this.#storage.push(entry); } }; exports.SyncReader = SyncReader; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/readers/index.js var require_readers = /* @__PURE__ */ __commonJSMin(((exports) => { var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = { enumerable: true, get: function() { return m[k]; } }; Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === void 0) k2 = k; o[k2] = m[k]; })); var __exportStar = exports && exports.__exportStar || function(m, exports$1) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require_async(), exports); __exportStar(require_sync(), exports); })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/adapters/fs.js var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.FileSystemAdapter = void 0; const fsScandir = require_out$1(); var FileSystemAdapter = class { scandir = fsScandir.scandir; scandirSync = fsScandir.scandirSync; }; exports.FileSystemAdapter = FileSystemAdapter; })); //#endregion //#region node_modules/.pnpm/@nodelib+fs.walk@3.0.1/node_modules/@nodelib/fs.walk/out/walk.js var require_walk = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.walk = walk; exports.walkSync = walkSync; exports.walkStream = walkStream; const providers_1 = require_providers(); const settings_1 = require_settings(); const readers_1 = require_readers(); const fs = new (require_fs()).FileSystemAdapter(); function walk(directory, options, callback) { const optionsIsCallback = typeof options === "function"; const callback_ = optionsIsCallback ? options : callback; const settings = optionsIsCallback ? getSettings() : getSettings(options); const reader = new readers_1.AsyncReader(fs, settings); new providers_1.AsyncProvider(reader).read(directory, callback_); } function walkSync(directory, optionsOrSettings) { const settings = getSettings(optionsOrSettings); const reader = new readers_1.SyncReader(fs, settings); return new providers_1.SyncProvider(reader).read(directory); } function walkStream(directory, optionsOrSettings) { const settings = getSettings(optionsOrSettings); const reader = new readers_1.AsyncReader(fs, settings); return new providers_1.StreamProvider(reader).read(directory); } function getSettings(settingsOrOptions = {}) { if (settingsOrOptions instanceof settings_1.Settings) return settingsOrOptions; return new settings_1.Settings(settingsOrOptions); } })); //#endregion //#region node_modules/.pnpm/yocto-queue@1.2.1/node_modules/yocto-queue/index.js var import_out = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); exports.Settings = exports.walkSync = exports.walkStream = exports.walk = void 0; var walk_1 = require_walk(); Object.defineProperty(exports, "walk", { enumerable: true, get: function() { return walk_1.walk; } }); Object.defineProperty(exports, "walkStream", { enumerable: true, get: function() { return walk_1.walkStream; } }); Object.defineProperty(exports, "walkSync", { enumerable: true, get: function() { return walk_1.walkSync; } }); var settings_1 = require_settings(); Object.defineProperty(exports, "Settings", { enumerable: true, get: function() { return settings_1.Settings; } }); })))(), 1); var Node$1 = class { value; next; constructor(value) { this.value = value; } }; var Queue = class { #head; #tail; #size; constructor() { this.clear(); } enqueue(value) { const node = new Node$1(value); if (this.#head) { this.#tail.next = node; this.#tail = node; } else { this.#head = node; this.#tail = node; } this.#size++; } dequeue() { const current = this.#head; if (!current) return; this.#head = this.#head.next; this.#size--; return current.value; } peek() { if (!this.#head) return; return this.#head.value; } clear() { this.#head = void 0; this.#tail = void 0; this.#size = 0; } get size() { return this.#size; } *[Symbol.iterator]() { let current = this.#head; while (current) { yield current.value; current = current.next; } } *drain() { while (this.#head) yield this.dequeue(); } }; //#endregion //#region node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js function pLimit(concurrency) { if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up"); const queue = new Queue(); let activeCount = 0; const next = () => { activeCount--; if (queue.size > 0) queue.dequeue()(); }; const run = async (fn, resolve, args) => { activeCount++; const result = (async () => fn(...args))(); resolve(result); try { await result; } catch {} next(); }; const enqueue = (fn, resolve, args) => { queue.enqueue(run.bind(void 0, fn, resolve, args)); (async () => { await Promise.resolve(); if (activeCount < concurrency && queue.size > 0) queue.dequeue()(); })(); }; const generator = (fn, ...args) => new Promise((resolve) => { enqueue(fn, resolve, args); }); Object.defineProperties(generator, { activeCount: { get: () => activeCount }, pendingCount: { get: () => queue.size }, clearQueue: { value: () => { queue.clear(); } } }); return generator; } //#endregion //#region node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js var EndError = class extends Error { constructor(value) { super(); this.value = value; } }; const testElement = async (element, tester) => tester(await element); const finder = async (element) => { const values = await Promise.all(element); if (values[1] === true) throw new EndError(values[0]); return false; }; async function pLocate(iterable, tester, { concurrency = Number.POSITIVE_INFINITY, preserveOrder = true } = {}) { const limit = pLimit(concurrency); const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); const checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY); try { await Promise.all(items.map((element) => checkLimit(finder, element))); } catch (error) { if (error instanceof EndError) return error.value; throw error; } } //#endregion //#region node_modules/.pnpm/locate-path@8.0.0/node_modules/locate-path/index.js const typeMappings = { directory: "isDirectory", file: "isFile" }; function checkType(type) { if (type === "both" || Object.hasOwn(typeMappings, type)) return; throw new Error(`Invalid type specified: ${type}`); } const matchType = (type, stat) => type === "both" ? stat.isFile() || stat.isDirectory() : stat[typeMappings[type]](); const toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath; async function locatePath(paths, { cwd = process$1.cwd(), type = "file", allowSymlinks = true, concurrency, preserveOrder } = {}) { checkType(type); cwd = toPath$1(cwd); const statFunction = allowSymlinks ? promises.stat : promises.lstat; return pLocate(paths, async (path_) => { try { return matchType(type, await statFunction(path.resolve(cwd, path_))); } catch { return false; } }, { concurrency, preserveOrder }); } promisify(execFile); function toPath(urlOrPath) { return urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath; } //#endregion //#region node_modules/.pnpm/find-up@8.0.0/node_modules/find-up/index.js const findUpStop = Symbol("findUpStop"); async function findUpMultiple(name, options = {}) { let directory = path.resolve(toPath(options.cwd) ?? ""); const { root } = path.parse(directory); const stopAt = path.resolve(directory, toPath(options.stopAt) ?? root); const limit = options.limit ?? Number.POSITIVE_INFINITY; const paths = [name].flat(); const runMatcher = async (locateOptions) => { if (typeof name !== "function") return locatePath(paths, locateOptions); const foundPath = await name(locateOptions.cwd); if (typeof foundPath === "string") return locatePath([foundPath], locateOptions); return foundPath; }; const matches = []; while (true) { const foundPath = await runMatcher({ ...options, cwd: directory }); if (foundPath === findUpStop) break; if (foundPath) matches.push(path.resolve(directory, foundPath)); if (directory === stopAt || matches.length >= limit) break; directory = path.dirname(directory); } return matches; } async function findUp(name, options = {}) { return (await findUpMultiple(name, { ...options, limit: 1 }))[0]; } //#endregion //#region node_modules/.pnpm/acorn@8.16.0/node_modules/acorn/dist/acorn.mjs var astralIdentifierCodes = [ 509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16