chore: add pkg dependencies

This commit is contained in:
Rim
2025-04-01 23:48:10 -04:00
parent e32a4c6abc
commit 86f0782a98
1210 changed files with 125948 additions and 3593 deletions

9
node_modules/fast-glob/out/providers/async.d.ts generated vendored Normal file
View File

@ -0,0 +1,9 @@
import { Task } from '../managers/tasks';
import { Entry, EntryItem, ReaderOptions } from '../types';
import ReaderAsync from '../readers/async';
import Provider from './provider';
export default class ProviderAsync extends Provider<Promise<EntryItem[]>> {
protected _reader: ReaderAsync;
read(task: Task): Promise<EntryItem[]>;
api(root: string, task: Task, options: ReaderOptions): Promise<Entry[]>;
}

23
node_modules/fast-glob/out/providers/async.js generated vendored Normal file
View File

@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const async_1 = require("../readers/async");
const provider_1 = require("./provider");
class ProviderAsync extends provider_1.default {
constructor() {
super(...arguments);
this._reader = new async_1.default(this._settings);
}
async read(task) {
const root = this._getRootDirectory(task);
const options = this._getReaderOptions(task);
const entries = await this.api(root, task, options);
return entries.map((entry) => options.transform(entry));
}
api(root, task, options) {
if (task.dynamic) {
return this._reader.dynamic(root, options);
}
return this._reader.static(task.patterns, options);
}
}
exports.default = ProviderAsync;

16
node_modules/fast-glob/out/providers/filters/deep.d.ts generated vendored Normal file
View File

@ -0,0 +1,16 @@
import { MicromatchOptions, EntryFilterFunction, Pattern } from '../../types';
import Settings from '../../settings';
export default class DeepFilter {
private readonly _settings;
private readonly _micromatchOptions;
constructor(_settings: Settings, _micromatchOptions: MicromatchOptions);
getFilter(basePath: string, positive: Pattern[], negative: Pattern[]): EntryFilterFunction;
private _getMatcher;
private _getNegativePatternsRe;
private _filter;
private _isSkippedByDeep;
private _getEntryLevel;
private _isSkippedSymbolicLink;
private _isSkippedByPositivePatterns;
private _isSkippedByNegativePatterns;
}

62
node_modules/fast-glob/out/providers/filters/deep.js generated vendored Normal file
View File

@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
const partial_1 = require("../matchers/partial");
class DeepFilter {
constructor(_settings, _micromatchOptions) {
this._settings = _settings;
this._micromatchOptions = _micromatchOptions;
}
getFilter(basePath, positive, negative) {
const matcher = this._getMatcher(positive);
const negativeRe = this._getNegativePatternsRe(negative);
return (entry) => this._filter(basePath, entry, matcher, negativeRe);
}
_getMatcher(patterns) {
return new partial_1.default(patterns, this._settings, this._micromatchOptions);
}
_getNegativePatternsRe(patterns) {
const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
}
_filter(basePath, entry, matcher, negativeRe) {
if (this._isSkippedByDeep(basePath, entry.path)) {
return false;
}
if (this._isSkippedSymbolicLink(entry)) {
return false;
}
const filepath = utils.path.removeLeadingDotSegment(entry.path);
if (this._isSkippedByPositivePatterns(filepath, matcher)) {
return false;
}
return this._isSkippedByNegativePatterns(filepath, negativeRe);
}
_isSkippedByDeep(basePath, entryPath) {
/**
* Avoid unnecessary depth calculations when it doesn't matter.
*/
if (this._settings.deep === Infinity) {
return false;
}
return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;
}
_getEntryLevel(basePath, entryPath) {
const entryPathDepth = entryPath.split('/').length;
if (basePath === '') {
return entryPathDepth;
}
const basePathDepth = basePath.split('/').length;
return entryPathDepth - basePathDepth;
}
_isSkippedSymbolicLink(entry) {
return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
}
_isSkippedByPositivePatterns(entryPath, matcher) {
return !this._settings.baseNameMatch && !matcher.match(entryPath);
}
_isSkippedByNegativePatterns(entryPath, patternsRe) {
return !utils.pattern.matchAny(entryPath, patternsRe);
}
}
exports.default = DeepFilter;

View File

@ -0,0 +1,17 @@
import Settings from '../../settings';
import { EntryFilterFunction, MicromatchOptions, Pattern } from '../../types';
export default class EntryFilter {
private readonly _settings;
private readonly _micromatchOptions;
readonly index: Map<string, undefined>;
constructor(_settings: Settings, _micromatchOptions: MicromatchOptions);
getFilter(positive: Pattern[], negative: Pattern[]): EntryFilterFunction;
private _filter;
private _isDuplicateEntry;
private _createIndexRecord;
private _onlyFileFilter;
private _onlyDirectoryFilter;
private _isMatchToPatternsSet;
private _isMatchToAbsoluteNegative;
private _isMatchToPatterns;
}

85
node_modules/fast-glob/out/providers/filters/entry.js generated vendored Normal file
View File

@ -0,0 +1,85 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
class EntryFilter {
constructor(_settings, _micromatchOptions) {
this._settings = _settings;
this._micromatchOptions = _micromatchOptions;
this.index = new Map();
}
getFilter(positive, negative) {
const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
const patterns = {
positive: {
all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
},
negative: {
absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
}
};
return (entry) => this._filter(entry, patterns);
}
_filter(entry, patterns) {
const filepath = utils.path.removeLeadingDotSegment(entry.path);
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
return false;
}
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
return false;
}
const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
if (this._settings.unique && isMatched) {
this._createIndexRecord(filepath);
}
return isMatched;
}
_isDuplicateEntry(filepath) {
return this.index.has(filepath);
}
_createIndexRecord(filepath) {
this.index.set(filepath, undefined);
}
_onlyFileFilter(entry) {
return this._settings.onlyFiles && !entry.dirent.isFile();
}
_onlyDirectoryFilter(entry) {
return this._settings.onlyDirectories && !entry.dirent.isDirectory();
}
_isMatchToPatternsSet(filepath, patterns, isDirectory) {
const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);
if (!isMatched) {
return false;
}
const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);
if (isMatchedByRelativeNegative) {
return false;
}
const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);
if (isMatchedByAbsoluteNegative) {
return false;
}
return true;
}
_isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {
if (patternsRe.length === 0) {
return false;
}
const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);
}
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
if (patternsRe.length === 0) {
return false;
}
// Trying to match files and directories by patterns.
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
// A pattern with a trailling slash can be used for directory matching.
// To apply such pattern, we need to add a tralling slash to the path.
if (!isMatched && isDirectory) {
return utils.pattern.matchAny(filepath + '/', patternsRe);
}
return isMatched;
}
}
exports.default = EntryFilter;

View File

@ -0,0 +1,8 @@
import Settings from '../../settings';
import { ErrorFilterFunction } from '../../types';
export default class ErrorFilter {
private readonly _settings;
constructor(_settings: Settings);
getFilter(): ErrorFilterFunction;
private _isNonFatalError;
}

15
node_modules/fast-glob/out/providers/filters/error.js generated vendored Normal file
View File

@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
class ErrorFilter {
constructor(_settings) {
this._settings = _settings;
}
getFilter() {
return (error) => this._isNonFatalError(error);
}
_isNonFatalError(error) {
return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
}
}
exports.default = ErrorFilter;

View File

@ -0,0 +1,33 @@
import { Pattern, MicromatchOptions, PatternRe } from '../../types';
import Settings from '../../settings';
export type PatternSegment = StaticPatternSegment | DynamicPatternSegment;
type StaticPatternSegment = {
dynamic: false;
pattern: Pattern;
};
type DynamicPatternSegment = {
dynamic: true;
pattern: Pattern;
patternRe: PatternRe;
};
export type PatternSection = PatternSegment[];
export type PatternInfo = {
/**
* Indicates that the pattern has a globstar (more than a single section).
*/
complete: boolean;
pattern: Pattern;
segments: PatternSegment[];
sections: PatternSection[];
};
export default abstract class Matcher {
private readonly _patterns;
private readonly _settings;
private readonly _micromatchOptions;
protected readonly _storage: PatternInfo[];
constructor(_patterns: Pattern[], _settings: Settings, _micromatchOptions: MicromatchOptions);
private _fillStorage;
private _getPatternSegments;
private _splitSegmentsIntoSections;
}
export {};

View File

@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
class Matcher {
constructor(_patterns, _settings, _micromatchOptions) {
this._patterns = _patterns;
this._settings = _settings;
this._micromatchOptions = _micromatchOptions;
this._storage = [];
this._fillStorage();
}
_fillStorage() {
for (const pattern of this._patterns) {
const segments = this._getPatternSegments(pattern);
const sections = this._splitSegmentsIntoSections(segments);
this._storage.push({
complete: sections.length <= 1,
pattern,
segments,
sections
});
}
}
_getPatternSegments(pattern) {
const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);
return parts.map((part) => {
const dynamic = utils.pattern.isDynamicPattern(part, this._settings);
if (!dynamic) {
return {
dynamic: false,
pattern: part
};
}
return {
dynamic: true,
pattern: part,
patternRe: utils.pattern.makeRe(part, this._micromatchOptions)
};
});
}
_splitSegmentsIntoSections(segments) {
return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));
}
}
exports.default = Matcher;

View File

@ -0,0 +1,4 @@
import Matcher from './matcher';
export default class PartialMatcher extends Matcher {
match(filepath: string): boolean;
}

View File

@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const matcher_1 = require("./matcher");
class PartialMatcher extends matcher_1.default {
match(filepath) {
const parts = filepath.split('/');
const levels = parts.length;
const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);
for (const pattern of patterns) {
const section = pattern.sections[0];
/**
* In this case, the pattern has a globstar and we must read all directories unconditionally,
* but only if the level has reached the end of the first group.
*
* fixtures/{a,b}/**
* ^ true/false ^ always true
*/
if (!pattern.complete && levels > section.length) {
return true;
}
const match = parts.every((part, index) => {
const segment = pattern.segments[index];
if (segment.dynamic && segment.patternRe.test(part)) {
return true;
}
if (!segment.dynamic && segment.pattern === part) {
return true;
}
return false;
});
if (match) {
return true;
}
}
return false;
}
}
exports.default = PartialMatcher;

19
node_modules/fast-glob/out/providers/provider.d.ts generated vendored Normal file
View File

@ -0,0 +1,19 @@
import { Task } from '../managers/tasks';
import Settings from '../settings';
import { MicromatchOptions, ReaderOptions } from '../types';
import DeepFilter from './filters/deep';
import EntryFilter from './filters/entry';
import ErrorFilter from './filters/error';
import EntryTransformer from './transformers/entry';
export default abstract class Provider<T> {
protected readonly _settings: Settings;
readonly errorFilter: ErrorFilter;
readonly entryFilter: EntryFilter;
readonly deepFilter: DeepFilter;
readonly entryTransformer: EntryTransformer;
constructor(_settings: Settings);
abstract read(_task: Task): T;
protected _getRootDirectory(task: Task): string;
protected _getReaderOptions(task: Task): ReaderOptions;
protected _getMicromatchOptions(): MicromatchOptions;
}

48
node_modules/fast-glob/out/providers/provider.js generated vendored Normal file
View File

@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const deep_1 = require("./filters/deep");
const entry_1 = require("./filters/entry");
const error_1 = require("./filters/error");
const entry_2 = require("./transformers/entry");
class Provider {
constructor(_settings) {
this._settings = _settings;
this.errorFilter = new error_1.default(this._settings);
this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
this.entryTransformer = new entry_2.default(this._settings);
}
_getRootDirectory(task) {
return path.resolve(this._settings.cwd, task.base);
}
_getReaderOptions(task) {
const basePath = task.base === '.' ? '' : task.base;
return {
basePath,
pathSegmentSeparator: '/',
concurrency: this._settings.concurrency,
deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
errorFilter: this.errorFilter.getFilter(),
followSymbolicLinks: this._settings.followSymbolicLinks,
fs: this._settings.fs,
stats: this._settings.stats,
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
transform: this.entryTransformer.getTransformer()
};
}
_getMicromatchOptions() {
return {
dot: this._settings.dot,
matchBase: this._settings.baseNameMatch,
nobrace: !this._settings.braceExpansion,
nocase: !this._settings.caseSensitiveMatch,
noext: !this._settings.extglob,
noglobstar: !this._settings.globstar,
posix: true,
strictSlashes: false
};
}
}
exports.default = Provider;

11
node_modules/fast-glob/out/providers/stream.d.ts generated vendored Normal file
View File

@ -0,0 +1,11 @@
/// <reference types="node" />
import { Readable } from 'stream';
import { Task } from '../managers/tasks';
import ReaderStream from '../readers/stream';
import { ReaderOptions } from '../types';
import Provider from './provider';
export default class ProviderStream extends Provider<Readable> {
protected _reader: ReaderStream;
read(task: Task): Readable;
api(root: string, task: Task, options: ReaderOptions): Readable;
}

31
node_modules/fast-glob/out/providers/stream.js generated vendored Normal file
View File

@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const stream_1 = require("stream");
const stream_2 = require("../readers/stream");
const provider_1 = require("./provider");
class ProviderStream extends provider_1.default {
constructor() {
super(...arguments);
this._reader = new stream_2.default(this._settings);
}
read(task) {
const root = this._getRootDirectory(task);
const options = this._getReaderOptions(task);
const source = this.api(root, task, options);
const destination = new stream_1.Readable({ objectMode: true, read: () => { } });
source
.once('error', (error) => destination.emit('error', error))
.on('data', (entry) => destination.emit('data', options.transform(entry)))
.once('end', () => destination.emit('end'));
destination
.once('close', () => source.destroy());
return destination;
}
api(root, task, options) {
if (task.dynamic) {
return this._reader.dynamic(root, options);
}
return this._reader.static(task.patterns, options);
}
}
exports.default = ProviderStream;

9
node_modules/fast-glob/out/providers/sync.d.ts generated vendored Normal file
View File

@ -0,0 +1,9 @@
import { Task } from '../managers/tasks';
import ReaderSync from '../readers/sync';
import { Entry, EntryItem, ReaderOptions } from '../types';
import Provider from './provider';
export default class ProviderSync extends Provider<EntryItem[]> {
protected _reader: ReaderSync;
read(task: Task): EntryItem[];
api(root: string, task: Task, options: ReaderOptions): Entry[];
}

23
node_modules/fast-glob/out/providers/sync.js generated vendored Normal file
View File

@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sync_1 = require("../readers/sync");
const provider_1 = require("./provider");
class ProviderSync extends provider_1.default {
constructor() {
super(...arguments);
this._reader = new sync_1.default(this._settings);
}
read(task) {
const root = this._getRootDirectory(task);
const options = this._getReaderOptions(task);
const entries = this.api(root, task, options);
return entries.map(options.transform);
}
api(root, task, options) {
if (task.dynamic) {
return this._reader.dynamic(root, options);
}
return this._reader.static(task.patterns, options);
}
}
exports.default = ProviderSync;

View File

@ -0,0 +1,8 @@
import Settings from '../../settings';
import { EntryTransformerFunction } from '../../types';
export default class EntryTransformer {
private readonly _settings;
constructor(_settings: Settings);
getTransformer(): EntryTransformerFunction;
private _transform;
}

View File

@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils = require("../../utils");
class EntryTransformer {
constructor(_settings) {
this._settings = _settings;
}
getTransformer() {
return (entry) => this._transform(entry);
}
_transform(entry) {
let filepath = entry.path;
if (this._settings.absolute) {
filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
filepath = utils.path.unixify(filepath);
}
if (this._settings.markDirectories && entry.dirent.isDirectory()) {
filepath += '/';
}
if (!this._settings.objectMode) {
return filepath;
}
return Object.assign(Object.assign({}, entry), { path: filepath });
}
}
exports.default = EntryTransformer;