aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/tinyglobby
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/tinyglobby')
-rw-r--r--node_modules/tinyglobby/LICENSE21
-rw-r--r--node_modules/tinyglobby/README.md25
-rw-r--r--node_modules/tinyglobby/dist/index.cjs335
-rw-r--r--node_modules/tinyglobby/dist/index.d.cts148
-rw-r--r--node_modules/tinyglobby/dist/index.d.mts148
-rw-r--r--node_modules/tinyglobby/dist/index.mjs307
-rw-r--r--node_modules/tinyglobby/package.json70
7 files changed, 1054 insertions, 0 deletions
diff --git a/node_modules/tinyglobby/LICENSE b/node_modules/tinyglobby/LICENSE
new file mode 100644
index 0000000..8657364
--- /dev/null
+++ b/node_modules/tinyglobby/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Madeline GurriarĂ¡n
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/tinyglobby/README.md b/node_modules/tinyglobby/README.md
new file mode 100644
index 0000000..c298e31
--- /dev/null
+++ b/node_modules/tinyglobby/README.md
@@ -0,0 +1,25 @@
+# tinyglobby
+
+[![npm version](https://img.shields.io/npm/v/tinyglobby.svg?maxAge=3600)](https://npmjs.com/package/tinyglobby)
+[![weekly downloads](https://img.shields.io/npm/dw/tinyglobby.svg?maxAge=3600)](https://npmjs.com/package/tinyglobby)
+
+A fast and minimal alternative to globby and fast-glob, meant to behave the same way.
+
+Both globby and fast-glob present some behavior no other globbing lib has,
+which makes it hard to manually replace with something smaller and better.
+
+This library uses only two subdependencies, compared to `globby`'s [23](https://npmgraph.js.org/?q=globby@16.2.0)
+and `fast-glob`'s [17](https://npmgraph.js.org/?q=fast-glob@3.3.3).
+
+## Usage
+
+```js
+import { glob, globSync } from 'tinyglobby';
+
+await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
+globSync('src/**/*.ts', { ignore: '**/*.d.ts' });
+```
+
+## Documentation
+
+Visit https://superchupu.dev/tinyglobby to read the full documentation.
diff --git a/node_modules/tinyglobby/dist/index.cjs b/node_modules/tinyglobby/dist/index.cjs
new file mode 100644
index 0000000..c93b233
--- /dev/null
+++ b/node_modules/tinyglobby/dist/index.cjs
@@ -0,0 +1,335 @@
+Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
+//#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 __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));
+//#endregion
+let fs = require("fs");
+let path = require("path");
+let url = require("url");
+let fdir = require("fdir");
+let picomatch = require("picomatch");
+picomatch = __toESM(picomatch, 1);
+//#region src/utils.ts
+const isReadonlyArray = Array.isArray;
+const BACKSLASHES = /\\/g;
+const DRIVE_RELATIVE_PATH = /^[A-Za-z]:$/;
+const isWin = process.platform === "win32";
+const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
+function getPartialMatcher(patterns, options = {}) {
+ const patternsCount = patterns.length;
+ const patternsParts = Array(patternsCount);
+ const matchers = Array(patternsCount);
+ let i, j;
+ for (i = 0; i < patternsCount; i++) {
+ const parts = splitPattern(patterns[i]);
+ patternsParts[i] = parts;
+ const partsCount = parts.length;
+ const partMatchers = Array(partsCount);
+ for (j = 0; j < partsCount; j++) partMatchers[j] = (0, picomatch.default)(parts[j], options);
+ matchers[i] = partMatchers;
+ }
+ return (input) => {
+ const inputParts = input.split("/");
+ if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
+ for (i = 0; i < patternsCount; i++) {
+ const patternParts = patternsParts[i];
+ const matcher = matchers[i];
+ const inputPatternCount = inputParts.length;
+ const minParts = Math.min(inputPatternCount, patternParts.length);
+ j = 0;
+ while (j < minParts) {
+ const part = patternParts[j];
+ if (part.includes("/")) return true;
+ if (!matcher[j](inputParts[j])) break;
+ if (!options.noglobstar && part === "**") return true;
+ j++;
+ }
+ if (j === inputPatternCount) return true;
+ }
+ return false;
+ };
+}
+/* node:coverage ignore next 2 */
+const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
+const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
+function buildFormat(cwd, root, absolute) {
+ if (cwd === root || root.startsWith(`${cwd}/`)) {
+ if (absolute) {
+ const start = cwd.length + +!isRoot(cwd);
+ return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
+ }
+ const prefix = root.slice(cwd.length + 1);
+ if (prefix) return (p, isDir) => {
+ if (p === ".") return prefix;
+ const result = `${prefix}/${p}`;
+ return isDir ? result.slice(0, -1) : result;
+ };
+ return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
+ }
+ if (absolute) return (p) => path.posix.relative(cwd, p) || ".";
+ return (p) => path.posix.relative(cwd, `${root}/${p}`) || ".";
+}
+function buildRelative(cwd, root) {
+ if (root.startsWith(`${cwd}/`)) {
+ const prefix = root.slice(cwd.length + 1);
+ return (p) => `${prefix}/${p}`;
+ }
+ return (p) => {
+ const result = path.posix.relative(cwd, `${root}/${p}`);
+ return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
+ };
+}
+function ensureNonDriveRelativePath(path$1) {
+ return path$1.replace(DRIVE_RELATIVE_PATH, (match) => `${match}/`);
+}
+const splitPatternOptions = { parts: true };
+function splitPattern(path$2) {
+ var _result$parts;
+ const result = picomatch.default.scan(path$2, splitPatternOptions);
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$2];
+}
+const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
+function convertPosixPathToPattern(path$3) {
+ return escapePosixPath(path$3);
+}
+function convertWin32PathToPattern(path$4) {
+ return escapeWin32Path(path$4).replace(ESCAPED_WIN32_BACKSLASHES, "/");
+}
+/**
+* Converts a path to a pattern depending on the platform.
+* Identical to {@link escapePath} on POSIX systems.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
+*/
+/* node:coverage ignore next 3 */
+const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
+const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
+const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
+const escapePosixPath = (path$5) => path$5.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
+const escapeWin32Path = (path$6) => path$6.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
+/**
+* Escapes a path's special characters depending on the platform.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
+*/
+/* node:coverage ignore next */
+const escapePath = isWin ? escapeWin32Path : escapePosixPath;
+/**
+* Checks if a pattern has dynamic parts.
+*
+* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
+*
+* - Doesn't necessarily return `false` on patterns that include `\`.
+* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
+* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
+* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
+*
+* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
+*/
+function isDynamicPattern(pattern, options) {
+ if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
+ const scan = picomatch.default.scan(pattern);
+ return scan.isGlob || scan.negated;
+}
+function log(...tasks) {
+ console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
+}
+function ensureStringArray(value) {
+ return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
+}
+//#endregion
+//#region src/patterns.ts
+const PARENT_DIRECTORY = /^(\/?\.\.)+/;
+const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
+function normalizePattern(pattern, opts, props, isIgnore) {
+ var _PARENT_DIRECTORY$exe;
+ const cwd = opts.cwd;
+ let result = pattern;
+ if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
+ if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
+ const escapedCwd = escapePath(cwd);
+ result = (0, path.isAbsolute)(result.replace(ESCAPING_BACKSLASHES, "")) ? path.posix.relative(escapedCwd, result) : path.posix.normalize(result);
+ const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
+ const parts = splitPattern(result);
+ if (parentDir) {
+ const n = (parentDir.length + 1) / 3;
+ let i = 0;
+ const cwdParts = escapedCwd.split("/");
+ while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
+ result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
+ i++;
+ }
+ const potentialRoot = path.posix.join(cwd, parentDir.slice(i * 3));
+ if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
+ props.root = ensureNonDriveRelativePath(potentialRoot);
+ props.depthOffset = -n + i;
+ }
+ }
+ if (!isIgnore && props.depthOffset >= 0) {
+ var _props$commonPath;
+ (_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
+ const newCommonPath = [];
+ const length = Math.min(props.commonPath.length, parts.length);
+ for (let i = 0; i < length; i++) {
+ const part = parts[i];
+ if (part === "**" && !parts[i + 1]) {
+ newCommonPath.pop();
+ break;
+ }
+ if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
+ newCommonPath.push(part);
+ }
+ props.depthOffset = newCommonPath.length;
+ props.commonPath = newCommonPath;
+ props.root = ensureNonDriveRelativePath(newCommonPath.length > 0 ? path.posix.join(cwd, ...newCommonPath) : cwd);
+ }
+ return result;
+}
+function processPatterns(options, patterns, props) {
+ const matchPatterns = [];
+ const ignorePatterns = [];
+ for (const pattern of options.ignore) {
+ if (!pattern) continue;
+ if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
+ }
+ for (const pattern of patterns) {
+ if (!pattern) continue;
+ if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
+ else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
+ }
+ return {
+ match: matchPatterns,
+ ignore: ignorePatterns
+ };
+}
+//#endregion
+//#region src/crawler.ts
+function buildCrawler(options, patterns) {
+ const cwd = options.cwd;
+ const props = {
+ root: cwd,
+ depthOffset: 0
+ };
+ const processed = processPatterns(options, patterns, props);
+ if (options.debug) log("internal processing patterns:", processed);
+ const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
+ const root = props.root.replace(BACKSLASHES, "");
+ const matchOptions = {
+ dot,
+ nobrace: options.braceExpansion === false,
+ nocase: !caseSensitiveMatch,
+ noextglob: options.extglob === false,
+ noglobstar: options.globstar === false,
+ posix: true
+ };
+ const matcher = (0, picomatch.default)(processed.match, matchOptions);
+ const ignore = (0, picomatch.default)(processed.ignore, matchOptions);
+ const partialMatcher = getPartialMatcher(processed.match, matchOptions);
+ const format = buildFormat(cwd, root, absolute);
+ const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
+ const excludePredicate = (_, p) => {
+ const relativePath = excludeFormatter(p, true);
+ return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
+ };
+ let maxDepth;
+ if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
+ const crawler = new fdir.fdir({
+ filters: [debug ? (p, isDirectory) => {
+ const path = format(p, isDirectory);
+ const matches = matcher(path) && !ignore(path);
+ if (matches) log(`matched ${path}`);
+ return matches;
+ } : (p, isDirectory) => {
+ const path = format(p, isDirectory);
+ return matcher(path) && !ignore(path);
+ }],
+ exclude: debug ? (_, p) => {
+ const skipped = excludePredicate(_, p);
+ log(`${skipped ? "skipped" : "crawling"} ${p}`);
+ return skipped;
+ } : excludePredicate,
+ fs: options.fs,
+ pathSeparator: "/",
+ relativePaths: !absolute,
+ resolvePaths: absolute,
+ includeBasePath: absolute,
+ resolveSymlinks: followSymbolicLinks,
+ excludeSymlinks: !followSymbolicLinks,
+ excludeFiles: onlyDirectories,
+ includeDirs: onlyDirectories || !options.onlyFiles,
+ maxDepth,
+ signal: options.signal
+ }).crawl(root);
+ if (options.debug) log("internal properties:", {
+ ...props,
+ root
+ });
+ return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
+}
+//#endregion
+//#region src/index.ts
+function formatPaths(paths, mapper) {
+ if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
+ return paths;
+}
+const defaultOptions = {
+ caseSensitiveMatch: true,
+ debug: !!process.env.TINYGLOBBY_DEBUG,
+ expandDirectories: true,
+ followSymbolicLinks: true,
+ onlyFiles: true
+};
+function getOptions(options) {
+ const opts = Object.assign({}, options);
+ for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
+ opts.cwd = (opts.cwd instanceof URL ? (0, url.fileURLToPath)(opts.cwd) : (0, path.resolve)(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
+ opts.ignore = ensureStringArray(opts.ignore);
+ opts.fs && (opts.fs = {
+ readdir: opts.fs.readdir || fs.readdir,
+ readdirSync: opts.fs.readdirSync || fs.readdirSync,
+ realpath: opts.fs.realpath || fs.realpath,
+ realpathSync: opts.fs.realpathSync || fs.realpathSync,
+ stat: opts.fs.stat || fs.stat,
+ statSync: opts.fs.statSync || fs.statSync
+ });
+ if (opts.debug) log("globbing with options:", opts);
+ return opts;
+}
+function getCrawler(globInput, inputOptions = {}) {
+ var _ref;
+ if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
+ const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
+ const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
+ const options = getOptions(isModern ? inputOptions : globInput);
+ return patterns.length > 0 ? buildCrawler(options, patterns) : [];
+}
+async function glob(globInput, options) {
+ const [crawler, relative] = getCrawler(globInput, options);
+ return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
+}
+function globSync(globInput, options) {
+ const [crawler, relative] = getCrawler(globInput, options);
+ return crawler ? formatPaths(crawler.sync(), relative) : [];
+}
+//#endregion
+exports.convertPathToPattern = convertPathToPattern;
+exports.escapePath = escapePath;
+exports.glob = glob;
+exports.globSync = globSync;
+exports.isDynamicPattern = isDynamicPattern;
diff --git a/node_modules/tinyglobby/dist/index.d.cts b/node_modules/tinyglobby/dist/index.d.cts
new file mode 100644
index 0000000..b6e4902
--- /dev/null
+++ b/node_modules/tinyglobby/dist/index.d.cts
@@ -0,0 +1,148 @@
+import { FSLike } from "fdir";
+
+//#region src/types.d.ts
+type FileSystemAdapter = Partial<FSLike>;
+interface GlobOptions {
+ /**
+ * Whether to return absolute paths. Disable to have relative paths.
+ * @default false
+ */
+ absolute?: boolean;
+ /**
+ * Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`.
+ * @default true
+ */
+ braceExpansion?: boolean;
+ /**
+ * Whether to match in case-sensitive mode.
+ * @default true
+ */
+ caseSensitiveMatch?: boolean;
+ /**
+ * The working directory in which to search. Results will be returned relative to this directory, unless
+ * {@link absolute} is set.
+ *
+ * It is important to avoid globbing outside this directory when possible, even with absolute paths enabled,
+ * as doing so can harm performance due to having to recalculate relative paths.
+ * @default process.cwd()
+ */
+ cwd?: string | URL;
+ /**
+ * Logs useful debug information. Meant for development purposes. Logs can change at any time.
+ * @default false
+ */
+ debug?: boolean;
+ /**
+ * Maximum directory depth to crawl.
+ * @default Infinity
+ */
+ deep?: number;
+ /**
+ * Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`.
+ * @default false
+ */
+ dot?: boolean;
+ /**
+ * Whether to automatically expand directory patterns.
+ *
+ * Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob).
+ * @default true
+ */
+ expandDirectories?: boolean;
+ /**
+ * Enables support for extglobs, like `+(pattern)`.
+ * @default true
+ */
+ extglob?: boolean;
+ /**
+ * Whether to traverse and include symbolic links. Can slightly affect performance.
+ * @default true
+ */
+ followSymbolicLinks?: boolean;
+ /**
+ * An object that overrides `node:fs` functions.
+ * @default import('node:fs')
+ */
+ fs?: FileSystemAdapter;
+ /**
+ * Enables support for matching nested directories with globstars (`**`).
+ * If `false`, `**` behaves exactly like `*`.
+ * @default true
+ */
+ globstar?: boolean;
+ /**
+ * Glob patterns to exclude from the results.
+ * @default []
+ */
+ ignore?: string | readonly string[];
+ /**
+ * Enable to only return directories.
+ * If `true`, disables {@link onlyFiles}.
+ * @default false
+ */
+ onlyDirectories?: boolean;
+ /**
+ * Enable to only return files.
+ * @default true
+ */
+ onlyFiles?: boolean;
+ /**
+ * @deprecated Provide patterns as the first argument instead.
+ */
+ patterns?: string | readonly string[];
+ /**
+ * An `AbortSignal` to abort crawling the file system.
+ * @default undefined
+ */
+ signal?: AbortSignal;
+}
+//#endregion
+//#region src/utils.d.ts
+/**
+* Converts a path to a pattern depending on the platform.
+* Identical to {@link escapePath} on POSIX systems.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
+*/
+declare const convertPathToPattern: (path: string) => string;
+/**
+* Escapes a path's special characters depending on the platform.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
+*/
+declare const escapePath: (path: string) => string;
+/**
+* Checks if a pattern has dynamic parts.
+*
+* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
+*
+* - Doesn't necessarily return `false` on patterns that include `\`.
+* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
+* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
+* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
+*
+* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
+*/
+declare function isDynamicPattern(pattern: string, options?: {
+ caseSensitiveMatch: boolean;
+}): boolean;
+//#endregion
+//#region src/index.d.ts
+/**
+* Asynchronously match files following a glob pattern.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#glob}
+*/
+declare function glob(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
+/**
+* @deprecated Provide patterns as the first argument instead.
+*/
+declare function glob(options: GlobOptions): Promise<string[]>;
+/**
+* Synchronously match files following a glob pattern.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync}
+*/
+declare function globSync(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): string[];
+/**
+* @deprecated Provide patterns as the first argument instead.
+*/
+declare function globSync(options: GlobOptions): string[];
+//#endregion
+export { type FileSystemAdapter, type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; \ No newline at end of file
diff --git a/node_modules/tinyglobby/dist/index.d.mts b/node_modules/tinyglobby/dist/index.d.mts
new file mode 100644
index 0000000..b6e4902
--- /dev/null
+++ b/node_modules/tinyglobby/dist/index.d.mts
@@ -0,0 +1,148 @@
+import { FSLike } from "fdir";
+
+//#region src/types.d.ts
+type FileSystemAdapter = Partial<FSLike>;
+interface GlobOptions {
+ /**
+ * Whether to return absolute paths. Disable to have relative paths.
+ * @default false
+ */
+ absolute?: boolean;
+ /**
+ * Enables support for brace expansion syntax, like `{a,b}` or `{1..9}`.
+ * @default true
+ */
+ braceExpansion?: boolean;
+ /**
+ * Whether to match in case-sensitive mode.
+ * @default true
+ */
+ caseSensitiveMatch?: boolean;
+ /**
+ * The working directory in which to search. Results will be returned relative to this directory, unless
+ * {@link absolute} is set.
+ *
+ * It is important to avoid globbing outside this directory when possible, even with absolute paths enabled,
+ * as doing so can harm performance due to having to recalculate relative paths.
+ * @default process.cwd()
+ */
+ cwd?: string | URL;
+ /**
+ * Logs useful debug information. Meant for development purposes. Logs can change at any time.
+ * @default false
+ */
+ debug?: boolean;
+ /**
+ * Maximum directory depth to crawl.
+ * @default Infinity
+ */
+ deep?: number;
+ /**
+ * Whether to return entries that start with a dot, like `.gitignore` or `.prettierrc`.
+ * @default false
+ */
+ dot?: boolean;
+ /**
+ * Whether to automatically expand directory patterns.
+ *
+ * Important to disable if migrating from [`fast-glob`](https://github.com/mrmlnc/fast-glob).
+ * @default true
+ */
+ expandDirectories?: boolean;
+ /**
+ * Enables support for extglobs, like `+(pattern)`.
+ * @default true
+ */
+ extglob?: boolean;
+ /**
+ * Whether to traverse and include symbolic links. Can slightly affect performance.
+ * @default true
+ */
+ followSymbolicLinks?: boolean;
+ /**
+ * An object that overrides `node:fs` functions.
+ * @default import('node:fs')
+ */
+ fs?: FileSystemAdapter;
+ /**
+ * Enables support for matching nested directories with globstars (`**`).
+ * If `false`, `**` behaves exactly like `*`.
+ * @default true
+ */
+ globstar?: boolean;
+ /**
+ * Glob patterns to exclude from the results.
+ * @default []
+ */
+ ignore?: string | readonly string[];
+ /**
+ * Enable to only return directories.
+ * If `true`, disables {@link onlyFiles}.
+ * @default false
+ */
+ onlyDirectories?: boolean;
+ /**
+ * Enable to only return files.
+ * @default true
+ */
+ onlyFiles?: boolean;
+ /**
+ * @deprecated Provide patterns as the first argument instead.
+ */
+ patterns?: string | readonly string[];
+ /**
+ * An `AbortSignal` to abort crawling the file system.
+ * @default undefined
+ */
+ signal?: AbortSignal;
+}
+//#endregion
+//#region src/utils.d.ts
+/**
+* Converts a path to a pattern depending on the platform.
+* Identical to {@link escapePath} on POSIX systems.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
+*/
+declare const convertPathToPattern: (path: string) => string;
+/**
+* Escapes a path's special characters depending on the platform.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
+*/
+declare const escapePath: (path: string) => string;
+/**
+* Checks if a pattern has dynamic parts.
+*
+* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
+*
+* - Doesn't necessarily return `false` on patterns that include `\`.
+* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
+* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
+* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
+*
+* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
+*/
+declare function isDynamicPattern(pattern: string, options?: {
+ caseSensitiveMatch: boolean;
+}): boolean;
+//#endregion
+//#region src/index.d.ts
+/**
+* Asynchronously match files following a glob pattern.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#glob}
+*/
+declare function glob(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): Promise<string[]>;
+/**
+* @deprecated Provide patterns as the first argument instead.
+*/
+declare function glob(options: GlobOptions): Promise<string[]>;
+/**
+* Synchronously match files following a glob pattern.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#globSync}
+*/
+declare function globSync(patterns: string | readonly string[], options?: Omit<GlobOptions, "patterns">): string[];
+/**
+* @deprecated Provide patterns as the first argument instead.
+*/
+declare function globSync(options: GlobOptions): string[];
+//#endregion
+export { type FileSystemAdapter, type GlobOptions, convertPathToPattern, escapePath, glob, globSync, isDynamicPattern }; \ No newline at end of file
diff --git a/node_modules/tinyglobby/dist/index.mjs b/node_modules/tinyglobby/dist/index.mjs
new file mode 100644
index 0000000..f5db1ed
--- /dev/null
+++ b/node_modules/tinyglobby/dist/index.mjs
@@ -0,0 +1,307 @@
+import { readdir, readdirSync, realpath, realpathSync, stat, statSync } from "fs";
+import { isAbsolute, posix, resolve } from "path";
+import { fileURLToPath } from "url";
+import { fdir } from "fdir";
+import picomatch from "picomatch";
+//#region src/utils.ts
+const isReadonlyArray = Array.isArray;
+const BACKSLASHES = /\\/g;
+const DRIVE_RELATIVE_PATH = /^[A-Za-z]:$/;
+const isWin = process.platform === "win32";
+const ONLY_PARENT_DIRECTORIES = /^(\/?\.\.)+$/;
+function getPartialMatcher(patterns, options = {}) {
+ const patternsCount = patterns.length;
+ const patternsParts = Array(patternsCount);
+ const matchers = Array(patternsCount);
+ let i, j;
+ for (i = 0; i < patternsCount; i++) {
+ const parts = splitPattern(patterns[i]);
+ patternsParts[i] = parts;
+ const partsCount = parts.length;
+ const partMatchers = Array(partsCount);
+ for (j = 0; j < partsCount; j++) partMatchers[j] = picomatch(parts[j], options);
+ matchers[i] = partMatchers;
+ }
+ return (input) => {
+ const inputParts = input.split("/");
+ if (inputParts[0] === ".." && ONLY_PARENT_DIRECTORIES.test(input)) return true;
+ for (i = 0; i < patternsCount; i++) {
+ const patternParts = patternsParts[i];
+ const matcher = matchers[i];
+ const inputPatternCount = inputParts.length;
+ const minParts = Math.min(inputPatternCount, patternParts.length);
+ j = 0;
+ while (j < minParts) {
+ const part = patternParts[j];
+ if (part.includes("/")) return true;
+ if (!matcher[j](inputParts[j])) break;
+ if (!options.noglobstar && part === "**") return true;
+ j++;
+ }
+ if (j === inputPatternCount) return true;
+ }
+ return false;
+ };
+}
+/* node:coverage ignore next 2 */
+const WIN32_ROOT_DIR = /^[A-Z]:\/$/i;
+const isRoot = isWin ? (p) => WIN32_ROOT_DIR.test(p) : (p) => p === "/";
+function buildFormat(cwd, root, absolute) {
+ if (cwd === root || root.startsWith(`${cwd}/`)) {
+ if (absolute) {
+ const start = cwd.length + +!isRoot(cwd);
+ return (p, isDir) => p.slice(start, isDir ? -1 : void 0) || ".";
+ }
+ const prefix = root.slice(cwd.length + 1);
+ if (prefix) return (p, isDir) => {
+ if (p === ".") return prefix;
+ const result = `${prefix}/${p}`;
+ return isDir ? result.slice(0, -1) : result;
+ };
+ return (p, isDir) => isDir && p !== "." ? p.slice(0, -1) : p;
+ }
+ if (absolute) return (p) => posix.relative(cwd, p) || ".";
+ return (p) => posix.relative(cwd, `${root}/${p}`) || ".";
+}
+function buildRelative(cwd, root) {
+ if (root.startsWith(`${cwd}/`)) {
+ const prefix = root.slice(cwd.length + 1);
+ return (p) => `${prefix}/${p}`;
+ }
+ return (p) => {
+ const result = posix.relative(cwd, `${root}/${p}`);
+ return p[p.length - 1] === "/" && result !== "" ? `${result}/` : result || ".";
+ };
+}
+function ensureNonDriveRelativePath(path) {
+ return path.replace(DRIVE_RELATIVE_PATH, (match) => `${match}/`);
+}
+const splitPatternOptions = { parts: true };
+function splitPattern(path) {
+ var _result$parts;
+ const result = picomatch.scan(path, splitPatternOptions);
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
+}
+const ESCAPED_WIN32_BACKSLASHES = /\\(?![()[\]{}!+@])/g;
+function convertPosixPathToPattern(path) {
+ return escapePosixPath(path);
+}
+function convertWin32PathToPattern(path) {
+ return escapeWin32Path(path).replace(ESCAPED_WIN32_BACKSLASHES, "/");
+}
+/**
+* Converts a path to a pattern depending on the platform.
+* Identical to {@link escapePath} on POSIX systems.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#convertPathToPattern}
+*/
+/* node:coverage ignore next 3 */
+const convertPathToPattern = isWin ? convertWin32PathToPattern : convertPosixPathToPattern;
+const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
+const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
+const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
+const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
+/**
+* Escapes a path's special characters depending on the platform.
+* @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
+*/
+/* node:coverage ignore next */
+const escapePath = isWin ? escapeWin32Path : escapePosixPath;
+/**
+* Checks if a pattern has dynamic parts.
+*
+* Has a few minor differences with [`fast-glob`](https://github.com/mrmlnc/fast-glob) for better accuracy:
+*
+* - Doesn't necessarily return `false` on patterns that include `\`.
+* - Returns `true` if the pattern includes parentheses, regardless of them representing one single pattern or not.
+* - Returns `true` for unfinished glob extensions i.e. `(h`, `+(h`.
+* - Returns `true` for unfinished brace expansions as long as they include `,` or `..`.
+*
+* @see {@link https://superchupu.dev/tinyglobby/documentation#isDynamicPattern}
+*/
+function isDynamicPattern(pattern, options) {
+ if ((options === null || options === void 0 ? void 0 : options.caseSensitiveMatch) === false) return true;
+ const scan = picomatch.scan(pattern);
+ return scan.isGlob || scan.negated;
+}
+function log(...tasks) {
+ console.log(`[tinyglobby ${(/* @__PURE__ */ new Date()).toLocaleTimeString("es")}]`, ...tasks);
+}
+function ensureStringArray(value) {
+ return typeof value === "string" ? [value] : value !== null && value !== void 0 ? value : [];
+}
+//#endregion
+//#region src/patterns.ts
+const PARENT_DIRECTORY = /^(\/?\.\.)+/;
+const ESCAPING_BACKSLASHES = /\\(?=[()[\]{}!*+?@|])/g;
+function normalizePattern(pattern, opts, props, isIgnore) {
+ var _PARENT_DIRECTORY$exe;
+ const cwd = opts.cwd;
+ let result = pattern;
+ if (pattern[pattern.length - 1] === "/") result = pattern.slice(0, -1);
+ if (result[result.length - 1] !== "*" && opts.expandDirectories) result += "/**";
+ const escapedCwd = escapePath(cwd);
+ result = isAbsolute(result.replace(ESCAPING_BACKSLASHES, "")) ? posix.relative(escapedCwd, result) : posix.normalize(result);
+ const parentDir = (_PARENT_DIRECTORY$exe = PARENT_DIRECTORY.exec(result)) === null || _PARENT_DIRECTORY$exe === void 0 ? void 0 : _PARENT_DIRECTORY$exe[0];
+ const parts = splitPattern(result);
+ if (parentDir) {
+ const n = (parentDir.length + 1) / 3;
+ let i = 0;
+ const cwdParts = escapedCwd.split("/");
+ while (i < n && parts[i + n] === cwdParts[cwdParts.length + i - n]) {
+ result = result.slice(0, (n - i - 1) * 3) + result.slice((n - i) * 3 + parts[i + n].length + 1) || ".";
+ i++;
+ }
+ const potentialRoot = posix.join(cwd, parentDir.slice(i * 3));
+ if (potentialRoot[0] !== "." && props.root.length > potentialRoot.length) {
+ props.root = ensureNonDriveRelativePath(potentialRoot);
+ props.depthOffset = -n + i;
+ }
+ }
+ if (!isIgnore && props.depthOffset >= 0) {
+ var _props$commonPath;
+ (_props$commonPath = props.commonPath) !== null && _props$commonPath !== void 0 || (props.commonPath = parts);
+ const newCommonPath = [];
+ const length = Math.min(props.commonPath.length, parts.length);
+ for (let i = 0; i < length; i++) {
+ const part = parts[i];
+ if (part === "**" && !parts[i + 1]) {
+ newCommonPath.pop();
+ break;
+ }
+ if (i === parts.length - 1 || part !== props.commonPath[i] || isDynamicPattern(part)) break;
+ newCommonPath.push(part);
+ }
+ props.depthOffset = newCommonPath.length;
+ props.commonPath = newCommonPath;
+ props.root = ensureNonDriveRelativePath(newCommonPath.length > 0 ? posix.join(cwd, ...newCommonPath) : cwd);
+ }
+ return result;
+}
+function processPatterns(options, patterns, props) {
+ const matchPatterns = [];
+ const ignorePatterns = [];
+ for (const pattern of options.ignore) {
+ if (!pattern) continue;
+ if (pattern[0] !== "!" || pattern[1] === "(") ignorePatterns.push(normalizePattern(pattern, options, props, true));
+ }
+ for (const pattern of patterns) {
+ if (!pattern) continue;
+ if (pattern[0] !== "!" || pattern[1] === "(") matchPatterns.push(normalizePattern(pattern, options, props, false));
+ else if (pattern[1] !== "!" || pattern[2] === "(") ignorePatterns.push(normalizePattern(pattern.slice(1), options, props, true));
+ }
+ return {
+ match: matchPatterns,
+ ignore: ignorePatterns
+ };
+}
+//#endregion
+//#region src/crawler.ts
+function buildCrawler(options, patterns) {
+ const cwd = options.cwd;
+ const props = {
+ root: cwd,
+ depthOffset: 0
+ };
+ const processed = processPatterns(options, patterns, props);
+ if (options.debug) log("internal processing patterns:", processed);
+ const { absolute, caseSensitiveMatch, debug, dot, followSymbolicLinks, onlyDirectories } = options;
+ const root = props.root.replace(BACKSLASHES, "");
+ const matchOptions = {
+ dot,
+ nobrace: options.braceExpansion === false,
+ nocase: !caseSensitiveMatch,
+ noextglob: options.extglob === false,
+ noglobstar: options.globstar === false,
+ posix: true
+ };
+ const matcher = picomatch(processed.match, matchOptions);
+ const ignore = picomatch(processed.ignore, matchOptions);
+ const partialMatcher = getPartialMatcher(processed.match, matchOptions);
+ const format = buildFormat(cwd, root, absolute);
+ const excludeFormatter = absolute ? format : buildFormat(cwd, root, true);
+ const excludePredicate = (_, p) => {
+ const relativePath = excludeFormatter(p, true);
+ return relativePath !== "." && !partialMatcher(relativePath) || ignore(relativePath);
+ };
+ let maxDepth;
+ if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
+ const crawler = new fdir({
+ filters: [debug ? (p, isDirectory) => {
+ const path = format(p, isDirectory);
+ const matches = matcher(path) && !ignore(path);
+ if (matches) log(`matched ${path}`);
+ return matches;
+ } : (p, isDirectory) => {
+ const path = format(p, isDirectory);
+ return matcher(path) && !ignore(path);
+ }],
+ exclude: debug ? (_, p) => {
+ const skipped = excludePredicate(_, p);
+ log(`${skipped ? "skipped" : "crawling"} ${p}`);
+ return skipped;
+ } : excludePredicate,
+ fs: options.fs,
+ pathSeparator: "/",
+ relativePaths: !absolute,
+ resolvePaths: absolute,
+ includeBasePath: absolute,
+ resolveSymlinks: followSymbolicLinks,
+ excludeSymlinks: !followSymbolicLinks,
+ excludeFiles: onlyDirectories,
+ includeDirs: onlyDirectories || !options.onlyFiles,
+ maxDepth,
+ signal: options.signal
+ }).crawl(root);
+ if (options.debug) log("internal properties:", {
+ ...props,
+ root
+ });
+ return [crawler, cwd !== root && !absolute && buildRelative(cwd, root)];
+}
+//#endregion
+//#region src/index.ts
+function formatPaths(paths, mapper) {
+ if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
+ return paths;
+}
+const defaultOptions = {
+ caseSensitiveMatch: true,
+ debug: !!process.env.TINYGLOBBY_DEBUG,
+ expandDirectories: true,
+ followSymbolicLinks: true,
+ onlyFiles: true
+};
+function getOptions(options) {
+ const opts = Object.assign({}, options);
+ for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
+ opts.cwd = (opts.cwd instanceof URL ? fileURLToPath(opts.cwd) : resolve(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
+ opts.ignore = ensureStringArray(opts.ignore);
+ opts.fs && (opts.fs = {
+ readdir: opts.fs.readdir || readdir,
+ readdirSync: opts.fs.readdirSync || readdirSync,
+ realpath: opts.fs.realpath || realpath,
+ realpathSync: opts.fs.realpathSync || realpathSync,
+ stat: opts.fs.stat || stat,
+ statSync: opts.fs.statSync || statSync
+ });
+ if (opts.debug) log("globbing with options:", opts);
+ return opts;
+}
+function getCrawler(globInput, inputOptions = {}) {
+ var _ref;
+ if (globInput && (inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.patterns)) throw new Error("Cannot pass patterns as both an argument and an option");
+ const isModern = isReadonlyArray(globInput) || typeof globInput === "string";
+ const patterns = ensureStringArray((_ref = isModern ? globInput : globInput.patterns) !== null && _ref !== void 0 ? _ref : "**/*");
+ const options = getOptions(isModern ? inputOptions : globInput);
+ return patterns.length > 0 ? buildCrawler(options, patterns) : [];
+}
+async function glob(globInput, options) {
+ const [crawler, relative] = getCrawler(globInput, options);
+ return crawler ? formatPaths(await crawler.withPromise(), relative) : [];
+}
+function globSync(globInput, options) {
+ const [crawler, relative] = getCrawler(globInput, options);
+ return crawler ? formatPaths(crawler.sync(), relative) : [];
+}
+//#endregion
+export { convertPathToPattern, escapePath, glob, globSync, isDynamicPattern };
diff --git a/node_modules/tinyglobby/package.json b/node_modules/tinyglobby/package.json
new file mode 100644
index 0000000..a42d447
--- /dev/null
+++ b/node_modules/tinyglobby/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "tinyglobby",
+ "version": "0.2.17",
+ "description": "A fast and minimal alternative to globby and fast-glob",
+ "type": "module",
+ "main": "./dist/index.cjs",
+ "module": "./dist/index.mjs",
+ "types": "./dist/index.d.cts",
+ "exports": {
+ ".": {
+ "import": "./dist/index.mjs",
+ "require": "./dist/index.cjs"
+ },
+ "./package.json": "./package.json"
+ },
+ "sideEffects": false,
+ "files": [
+ "dist"
+ ],
+ "author": "Superchupu",
+ "license": "MIT",
+ "keywords": [
+ "glob",
+ "patterns",
+ "tiny",
+ "fast"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/SuperchupuDev/tinyglobby.git"
+ },
+ "bugs": {
+ "url": "https://github.com/SuperchupuDev/tinyglobby/issues"
+ },
+ "homepage": "https://superchupu.dev/tinyglobby",
+ "funding": {
+ "url": "https://github.com/sponsors/SuperchupuDev"
+ },
+ "dependencies": {
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.4"
+ },
+ "devDependencies": {
+ "@biomejs/biome": "^2.4.16",
+ "@types/node": "^25.9.1",
+ "@types/picomatch": "^4.0.3",
+ "fast-glob": "^3.3.3",
+ "fs-fixture": "^2.14.0",
+ "glob": "^13.0.6",
+ "tinybench": "^6.0.2",
+ "tsdown": "^0.22.1",
+ "typescript": "^6.0.3"
+ },
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "scripts": {
+ "bench": "node benchmark/bench.ts",
+ "bench:setup": "node benchmark/setup.ts",
+ "build": "tsdown",
+ "check": "biome check",
+ "check:fix": "biome check --write --unsafe",
+ "format": "biome format --write",
+ "lint": "biome lint",
+ "test": "node --test \"test/**/*.ts\"",
+ "test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"",
+ "test:only": "node --test --test-only \"test/**/*.ts\"",
+ "typecheck": "tsc --noEmit"
+ }
+} \ No newline at end of file