From 5f1fd696c279bfcef494fa98ad8c64c110ac47bd Mon Sep 17 00:00:00 2001 From: SoonIter Date: Sat, 25 Jan 2025 20:09:22 +0800 Subject: [PATCH 1/3] chore(core): remove chalk from dependencies --- packages/cli/package.json | 1 - packages/cli/src/index.ts | 2 +- pnpm-lock.yaml | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index ed6b58dd4..ca4fb17de 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -46,7 +46,6 @@ "@rspress/core": "workspace:*", "@rspress/shared": "workspace:*", "cac": "^6.7.14", - "chalk": "5.4.1", "chokidar": "^3.6.0" }, "devDependencies": { diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index addf85203..dfa60cb9e 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,9 +1,9 @@ import { createRequire } from 'node:module'; import path from 'node:path'; import { build, dev, serve } from '@rspress/core'; +import chalk from '@rspress/shared/chalk'; import { logger } from '@rspress/shared/logger'; import { cac } from 'cac'; -import chalk from 'chalk'; import chokidar from 'chokidar'; import { loadConfigFile, resolveDocRoot } from './config/loadConfigFile'; import update from './update'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55b7de915..4d81d375d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -670,9 +670,6 @@ importers: cac: specifier: ^6.7.14 version: 6.7.14 - chalk: - specifier: 5.4.1 - version: 5.4.1 chokidar: specifier: ^3.6.0 version: 3.6.0 From 93d5b786dd5c2b681854982a9cab69324321e807 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Sat, 25 Jan 2025 20:27:34 +0800 Subject: [PATCH 2/3] chore: remove execa --- packages/plugin-last-updated/package.json | 1 + packages/plugin-last-updated/src/index.ts | 2 +- packages/shared/execa.d.ts | 2 - packages/shared/modern.config.ts | 2 - packages/shared/package.json | 6 --- pnpm-lock.yaml | 46 ++--------------------- 6 files changed, 5 insertions(+), 54 deletions(-) delete mode 100644 packages/shared/execa.d.ts diff --git a/packages/plugin-last-updated/package.json b/packages/plugin-last-updated/package.json index 9b33acb12..eccf88a43 100644 --- a/packages/plugin-last-updated/package.json +++ b/packages/plugin-last-updated/package.json @@ -39,6 +39,7 @@ "@types/node": "^18.11.17", "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", + "execa": "8.0.1", "react": "^18.3.1", "typescript": "^5.5.3", "vitest": "2.1.8" diff --git a/packages/plugin-last-updated/src/index.ts b/packages/plugin-last-updated/src/index.ts index 2e356a6ac..d803b0fb2 100644 --- a/packages/plugin-last-updated/src/index.ts +++ b/packages/plugin-last-updated/src/index.ts @@ -1,5 +1,5 @@ import type { RspressPlugin } from '@rspress/shared'; -import execa from '@rspress/shared/execa'; +import { execa } from 'execa'; function transform(timestamp: number, lang: string) { return new Date(timestamp).toLocaleString(lang || 'zh'); diff --git a/packages/shared/execa.d.ts b/packages/shared/execa.d.ts deleted file mode 100644 index 9f936f589..000000000 --- a/packages/shared/execa.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/execa'; -export { default } from './dist/execa'; diff --git a/packages/shared/modern.config.ts b/packages/shared/modern.config.ts index 7a2e026fe..5dbaf16b3 100644 --- a/packages/shared/modern.config.ts +++ b/packages/shared/modern.config.ts @@ -9,7 +9,6 @@ export default defineConfig({ 'src/logger.ts', 'src/fs-extra.ts', 'src/chalk.ts', - 'src/execa.ts', 'src/node-utils.ts', ], target: 'esnext', @@ -24,7 +23,6 @@ export default defineConfig({ 'src/logger.ts', 'src/fs-extra.ts', 'src/chalk.ts', - 'src/execa.ts', 'src/node-utils.ts', ], target: 'esnext', diff --git a/packages/shared/package.json b/packages/shared/package.json index 1ca663561..13016ab02 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -13,11 +13,6 @@ "import": "./dist/index.mjs", "require": "./dist/index.js" }, - "./execa": { - "types": "./dist/execa.d.ts", - "import": "./dist/execa.mjs", - "require": "./dist/execa.js" - }, "./chalk": { "types": "./dist/chalk.d.ts", "import": "./dist/chalk.mjs", @@ -57,7 +52,6 @@ "dependencies": { "@rsbuild/core": "1.2.0", "chalk": "5.4.1", - "execa": "5.1.1", "fs-extra": "11.2.0", "gray-matter": "4.0.3", "lodash-es": "^4.17.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d81d375d..0f9e64317 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1150,6 +1150,9 @@ importers: '@types/react-dom': specifier: ^18.3.5 version: 18.3.5(@types/react@18.3.18) + execa: + specifier: 8.0.1 + version: 8.0.1 react: specifier: ^18.3.1 version: 18.3.1 @@ -1511,9 +1514,6 @@ importers: chalk: specifier: 5.4.1 version: 5.4.1 - execa: - specifier: 5.1.1 - version: 5.1.1 fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -4105,10 +4105,6 @@ packages: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} - execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} - execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} @@ -4289,10 +4285,6 @@ packages: resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} engines: {node: '>=12'} - get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} @@ -4480,10 +4472,6 @@ packages: human-id@1.0.2: resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} - human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} @@ -4653,10 +4641,6 @@ packages: is-ssh@1.4.0: resolution: {integrity: sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==} - is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - is-stream@3.0.0: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -6192,10 +6176,6 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} - strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} @@ -9443,18 +9423,6 @@ snapshots: events@3.3.0: {} - execa@5.1.1: - dependencies: - cross-spawn: 7.0.6 - get-stream: 6.0.1 - human-signals: 2.1.0 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - execa@8.0.1: dependencies: cross-spawn: 7.0.6 @@ -9628,8 +9596,6 @@ snapshots: get-stdin@9.0.0: {} - get-stream@6.0.1: {} - get-stream@8.0.1: {} git-hooks-list@3.1.0: {} @@ -9925,8 +9891,6 @@ snapshots: human-id@1.0.2: {} - human-signals@2.1.0: {} - human-signals@5.0.0: {} husky@9.1.7: {} @@ -10056,8 +10020,6 @@ snapshots: dependencies: protocols: 2.0.1 - is-stream@2.0.1: {} - is-stream@3.0.0: {} is-subdir@1.2.0: @@ -11938,8 +11900,6 @@ snapshots: strip-bom@3.0.0: {} - strip-final-newline@2.0.0: {} - strip-final-newline@3.0.0: {} strip-json-comments@3.1.1: {} From 37908741344d445a2defe6403fa2ad2ecfc5ec46 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Sat, 25 Jan 2025 23:04:22 +0800 Subject: [PATCH 3/3] chore: remove globby --- .../@nodelib/fs.scandir/out/adapters/fs.d.ts | 20 -- .../@nodelib/fs.scandir/out/index.d.ts | 12 -- .../fs.scandir/out/providers/async.d.ts | 7 - .../@nodelib/fs.scandir/out/settings.d.ts | 20 -- .../@nodelib/fs.scandir/out/types/index.d.ts | 20 -- .../@nodelib/fs.stat/out/adapters/fs.d.ts | 13 -- .../fast-glob/@nodelib/fs.stat/out/index.d.ts | 12 -- .../@nodelib/fs.stat/out/providers/async.d.ts | 4 - .../@nodelib/fs.stat/out/settings.d.ts | 16 -- .../@nodelib/fs.stat/out/types/index.d.ts | 4 - .../fast-glob/@nodelib/fs.walk/out/index.d.ts | 14 -- .../@nodelib/fs.walk/out/providers/async.d.ts | 12 -- .../@nodelib/fs.walk/out/readers/async.d.ts | 30 --- .../@nodelib/fs.walk/out/readers/reader.d.ts | 6 - .../@nodelib/fs.walk/out/settings.d.ts | 30 --- .../@nodelib/fs.walk/out/types/index.d.ts | 8 - packages/core/compiled/fast-glob/index.js | 37 ---- packages/core/compiled/fast-glob/license | 21 -- .../core/compiled/fast-glob/out/index.d.ts | 27 --- .../fast-glob/out/managers/tasks.d.ts | 22 --- .../core/compiled/fast-glob/out/settings.d.ts | 164 --------------- .../compiled/fast-glob/out/types/index.d.ts | 31 --- packages/core/compiled/fast-glob/package.json | 1 - packages/core/compiled/globby/index.d.ts | 186 ------------------ packages/core/compiled/globby/index.js | 1 - packages/core/compiled/globby/license | 9 - packages/core/compiled/globby/package.json | 1 - packages/core/modern.config.ts | 1 - packages/core/package.json | 1 + packages/core/src/node/route/RouteService.ts | 11 +- .../core/src/node/utils/detectCustomIcon.ts | 10 +- packages/core/vitest.config.ts | 4 - packages/modern-plugin-rspress/package.json | 4 +- .../modern-plugin-rspress/src/launchDoc.ts | 8 +- pnpm-lock.yaml | 9 +- 35 files changed, 18 insertions(+), 758 deletions(-) delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts delete mode 100644 packages/core/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/index.js delete mode 100644 packages/core/compiled/fast-glob/license delete mode 100644 packages/core/compiled/fast-glob/out/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/out/managers/tasks.d.ts delete mode 100644 packages/core/compiled/fast-glob/out/settings.d.ts delete mode 100644 packages/core/compiled/fast-glob/out/types/index.d.ts delete mode 100644 packages/core/compiled/fast-glob/package.json delete mode 100644 packages/core/compiled/globby/index.d.ts delete mode 100644 packages/core/compiled/globby/index.js delete mode 100644 packages/core/compiled/globby/license delete mode 100644 packages/core/compiled/globby/package.json diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts deleted file mode 100644 index bca28c152..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type * as fsStat from '../../../@nodelib/fs.stat'; -import type { Dirent, ErrnoException } from '../types'; -export interface ReaddirAsynchronousMethod { - (filepath: string, options: { - withFileTypes: true; - }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void; - (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void; -} -export interface ReaddirSynchronousMethod { - (filepath: string, options: { - withFileTypes: true; - }): Dirent[]; - (filepath: string): string[]; -} -export declare type FileSystemAdapter = fsStat.FileSystemAdapter & { - readdir: ReaddirAsynchronousMethod; - readdirSync: ReaddirSynchronousMethod; -}; -export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; -export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts deleted file mode 100644 index b9da83ed1..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs'; -import * as async from './providers/async'; -import Settings, { Options } from './settings'; -import type { Dirent, Entry } from './types'; -declare type AsyncCallback = async.AsyncCallback; -declare function scandir(path: string, callback: AsyncCallback): void; -declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; -declare namespace scandir { - function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; -} -declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[]; -export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options }; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts deleted file mode 100644 index 5829676df..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/// -import type Settings from '../settings'; -import type { Entry } from '../types'; -export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void; -export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void; -export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void; -export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts deleted file mode 100644 index a1d954fbb..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as fsStat from '../../@nodelib/fs.stat'; -import * as fs from './adapters/fs'; -export interface Options { - followSymbolicLinks?: boolean; - fs?: Partial; - pathSegmentSeparator?: string; - stats?: boolean; - throwErrorOnBrokenSymbolicLink?: boolean; -} -export default class Settings { - private readonly _options; - readonly followSymbolicLinks: boolean; - readonly fs: fs.FileSystemAdapter; - readonly pathSegmentSeparator: string; - readonly stats: boolean; - readonly throwErrorOnBrokenSymbolicLink: boolean; - readonly fsStatSettings: fsStat.Settings; - constructor(_options?: Options); - private _getValue; -} diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts deleted file mode 100644 index f326c5e5e..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// -import type * as fs from 'fs'; -export interface Entry { - dirent: Dirent; - name: string; - path: string; - stats?: Stats; -} -export declare type Stats = fs.Stats; -export declare type ErrnoException = NodeJS.ErrnoException; -export interface Dirent { - isBlockDevice: () => boolean; - isCharacterDevice: () => boolean; - isDirectory: () => boolean; - isFIFO: () => boolean; - isFile: () => boolean; - isSocket: () => boolean; - isSymbolicLink: () => boolean; - name: string; -} diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts deleted file mode 100644 index 3af759c95..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/// -import * as fs from 'fs'; -import type { ErrnoException } from '../types'; -export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void; -export declare type StatSynchronousMethod = (path: string) => fs.Stats; -export interface FileSystemAdapter { - lstat: StatAsynchronousMethod; - stat: StatAsynchronousMethod; - lstatSync: StatSynchronousMethod; - statSync: StatSynchronousMethod; -} -export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; -export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts deleted file mode 100644 index f95db995c..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs'; -import * as async from './providers/async'; -import Settings, { Options } from './settings'; -import type { Stats } from './types'; -declare type AsyncCallback = async.AsyncCallback; -declare function stat(path: string, callback: AsyncCallback): void; -declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; -declare namespace stat { - function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; -} -declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats; -export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod, Options, Stats }; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts deleted file mode 100644 index 85423ce11..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type Settings from '../settings'; -import type { ErrnoException, Stats } from '../types'; -export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void; -export declare function read(path: string, settings: Settings, callback: AsyncCallback): void; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts deleted file mode 100644 index f4b3d4443..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import * as fs from './adapters/fs'; -export interface Options { - followSymbolicLink?: boolean; - fs?: Partial; - markSymbolicLink?: boolean; - throwErrorOnBrokenSymbolicLink?: boolean; -} -export default class Settings { - private readonly _options; - readonly followSymbolicLink: boolean; - readonly fs: fs.FileSystemAdapter; - readonly markSymbolicLink: boolean; - readonly throwErrorOnBrokenSymbolicLink: boolean; - constructor(_options?: Options); - private _getValue; -} diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts deleted file mode 100644 index 74c08ed2f..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// -import type * as fs from 'fs'; -export declare type Stats = fs.Stats; -export declare type ErrnoException = NodeJS.ErrnoException; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts deleted file mode 100644 index 95df96a6e..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/// -import type { Readable } from 'stream'; -import type { Dirent, FileSystemAdapter } from '../../@nodelib/fs.scandir'; -import { AsyncCallback } from './providers/async'; -import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings'; -import type { Entry } from './types'; -declare function walk(directory: string, callback: AsyncCallback): void; -declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; -declare namespace walk { - function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise; -} -declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[]; -declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable; -export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction }; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts deleted file mode 100644 index 0f6717d78..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import AsyncReader from '../readers/async'; -import type Settings from '../settings'; -import type { Entry, Errno } from '../types'; -export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void; -export default class AsyncProvider { - private readonly _root; - private readonly _settings; - protected readonly _reader: AsyncReader; - private readonly _storage; - constructor(_root: string, _settings: Settings); - read(callback: AsyncCallback): void; -} diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts deleted file mode 100644 index 772245ab1..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/// -import { EventEmitter } from 'events'; -import * as fsScandir from '../../../@nodelib/fs.scandir'; -import type Settings from '../settings'; -import type { Entry, Errno } from '../types'; -import Reader from './reader'; -declare type EntryEventCallback = (entry: Entry) => void; -declare type ErrorEventCallback = (error: Errno) => void; -declare type EndEventCallback = () => void; -export default class AsyncReader extends Reader { - protected readonly _settings: Settings; - protected readonly _scandir: typeof fsScandir.scandir; - protected readonly _emitter: EventEmitter; - private readonly _queue; - private _isFatalError; - private _isDestroyed; - constructor(_root: string, _settings: Settings); - read(): EventEmitter; - get isDestroyed(): boolean; - destroy(): void; - onEntry(callback: EntryEventCallback): void; - onError(callback: ErrorEventCallback): void; - onEnd(callback: EndEventCallback): void; - private _pushToQueue; - private _worker; - private _handleError; - private _handleEntry; - private _emitEntry; -} -export {}; diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts deleted file mode 100644 index e1f383b25..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type Settings from '../settings'; -export default class Reader { - protected readonly _root: string; - protected readonly _settings: Settings; - constructor(_root: string, _settings: Settings); -} diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts deleted file mode 100644 index d2397121d..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import * as fsScandir from '../../@nodelib/fs.scandir'; -import type { Entry, Errno } from './types'; -export declare type FilterFunction = (value: T) => boolean; -export declare type DeepFilterFunction = FilterFunction; -export declare type EntryFilterFunction = FilterFunction; -export declare type ErrorFilterFunction = FilterFunction; -export interface Options { - basePath?: string; - concurrency?: number; - deepFilter?: DeepFilterFunction; - entryFilter?: EntryFilterFunction; - errorFilter?: ErrorFilterFunction; - followSymbolicLinks?: boolean; - fs?: Partial; - pathSegmentSeparator?: string; - stats?: boolean; - throwErrorOnBrokenSymbolicLink?: boolean; -} -export default class Settings { - private readonly _options; - readonly basePath?: string; - readonly concurrency: number; - readonly deepFilter: DeepFilterFunction | null; - readonly entryFilter: EntryFilterFunction | null; - readonly errorFilter: ErrorFilterFunction | null; - readonly pathSegmentSeparator: string; - readonly fsScandirSettings: fsScandir.Settings; - constructor(_options?: Options); - private _getValue; -} diff --git a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts b/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts deleted file mode 100644 index 0e2247431..000000000 --- a/packages/core/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/// -import type * as scandir from '../../../@nodelib/fs.scandir'; -export declare type Entry = scandir.Entry; -export declare type Errno = NodeJS.ErrnoException; -export interface QueueItem { - directory: string; - base?: string; -} diff --git a/packages/core/compiled/fast-glob/index.js b/packages/core/compiled/fast-glob/index.js deleted file mode 100644 index ab9f5f9fb..000000000 --- a/packages/core/compiled/fast-glob/index.js +++ /dev/null @@ -1,37 +0,0 @@ -(()=>{var t={6491:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const n=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},6325:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const r=process.versions.node.split(".");if(r[0]===undefined||r[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const n=Number.parseInt(r[0],10);const s=Number.parseInt(r[1],10);const i=10;const o=10;const a=n>i;const u=n===i&&s>=o;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||u},1659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.scandirSync=e.scandir=void 0;const n=r(4715);const s=r(8907);const i=r(3486);e.Settings=i.default;function scandir(t,e,r){if(typeof e==="function"){n.read(t,getSettings(),e);return}n.read(t,getSettings(e),r)}e.scandir=scandir;function scandirSync(t,e){const r=getSettings(e);return s.read(t,r)}e.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof i.default){return t}return new i.default(t)}},4715:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const n=r(3645);const s=r(5341);const i=r(6325);const o=r(946);const a=r(3253);function read(t,e,r){if(!e.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,e,r);return}readdir(t,e,r)}e.read=read;function readdirWithFileTypes(t,e,r){e.fs.readdir(t,{withFileTypes:true},((n,i)=>{if(n!==null){callFailureCallback(r,n);return}const o=i.map((r=>({dirent:r,name:r.name,path:a.joinPathSegments(t,r.name,e.pathSegmentSeparator)})));if(!e.followSymbolicLinks){callSuccessCallback(r,o);return}const u=o.map((t=>makeRplTaskEntry(t,e)));s(u,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,((n,s)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=o.fs.createDirentFromStats(t.name,s);r(null,t)}))}}function readdir(t,e,r){e.fs.readdir(t,((i,u)=>{if(i!==null){callFailureCallback(r,i);return}const c=u.map((r=>{const s=a.joinPathSegments(t,r,e.pathSegmentSeparator);return t=>{n.stat(s,e.fsStatSettings,((n,i)=>{if(n!==null){t(n);return}const a={name:r,path:s,dirent:o.fs.createDirentFromStats(r,i)};if(e.stats){a.stats=i}t(null,a)}))}}));s(c,((t,e)=>{if(t!==null){callFailureCallback(r,t);return}callSuccessCallback(r,e)}))}))}e.readdir=readdir;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},3253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=void 0;function joinPathSegments(t,e,r){if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},8907:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.readdir=e.readdirWithFileTypes=e.read=void 0;const n=r(3645);const s=r(6325);const i=r(946);const o=r(3253);function read(t,e){if(!e.stats&&s.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,e)}return readdir(t,e)}e.read=read;function readdirWithFileTypes(t,e){const r=e.fs.readdirSync(t,{withFileTypes:true});return r.map((r=>{const n={dirent:r,name:r.name,path:o.joinPathSegments(t,r.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks){try{const t=e.fs.statSync(n.path);n.dirent=i.fs.createDirentFromStats(n.name,t)}catch(t){if(e.throwErrorOnBrokenSymbolicLink){throw t}}}return n}))}e.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,e){const r=e.fs.readdirSync(t);return r.map((r=>{const s=o.joinPathSegments(t,r,e.pathSegmentSeparator);const a=n.statSync(s,e.fsStatSettings);const u={name:r,path:s,dirent:i.fs.createDirentFromStats(r,a)};if(e.stats){u.stats=a}return u}))}e.readdir=readdir},3486:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1017);const s=r(3645);const i=r(6491);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=i.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new s.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},2926:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},946:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.fs=void 0;const n=r(2926);e.fs=n},2243:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;const n=r(7147);e.FILE_SYSTEM_ADAPTER={lstat:n.lstat,stat:n.stat,lstatSync:n.lstatSync,statSync:n.statSync};function createFileSystemAdapter(t){if(t===undefined){return e.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),t)}e.createFileSystemAdapter=createFileSystemAdapter},3645:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.statSync=e.stat=e.Settings=void 0;const n=r(6948);const s=r(6750);const i=r(1917);e.Settings=i.default;function stat(t,e,r){if(typeof e==="function"){n.read(t,getSettings(),e);return}n.read(t,getSettings(e),r)}e.stat=stat;function statSync(t,e){const r=getSettings(e);return s.read(t,r)}e.statSync=statSync;function getSettings(t={}){if(t instanceof i.default){return t}return new i.default(t)}},6948:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e,r){e.fs.lstat(t,((n,s)=>{if(n!==null){callFailureCallback(r,n);return}if(!s.isSymbolicLink()||!e.followSymbolicLink){callSuccessCallback(r,s);return}e.fs.stat(t,((t,n)=>{if(t!==null){if(e.throwErrorOnBrokenSymbolicLink){callFailureCallback(r,t);return}callSuccessCallback(r,s);return}if(e.markSymbolicLink){n.isSymbolicLink=()=>true}callSuccessCallback(r,n)}))}))}e.read=read;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},6750:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.read=void 0;function read(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink){return r}try{const r=e.fs.statSync(t);if(e.markSymbolicLink){r.isSymbolicLink=()=>true}return r}catch(t){if(!e.throwErrorOnBrokenSymbolicLink){return r}throw t}}e.read=read},1917:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(2243);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=n.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},4328:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Settings=e.walkStream=e.walkSync=e.walk=void 0;const n=r(4306);const s=r(2686);const i=r(8918);const o=r(8831);e.Settings=o.default;function walk(t,e,r){if(typeof e==="function"){new n.default(t,getSettings()).read(e);return}new n.default(t,getSettings(e)).read(r)}e.walk=walk;function walkSync(t,e){const r=getSettings(e);const n=new i.default(t,r);return n.read()}e.walkSync=walkSync;function walkStream(t,e){const r=getSettings(e);const n=new s.default(t,r);return n.read()}e.walkStream=walkStream;function getSettings(t={}){if(t instanceof o.default){return t}return new o.default(t)}},4306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1293);class AsyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new n.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((e=>{callFailureCallback(t,e)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}e["default"]=AsyncProvider;function callFailureCallback(t,e){t(e)}function callSuccessCallback(t,e){t(null,e)}},2686:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(2781);const s=r(1293);class StreamProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new s.default(this._root,this._settings);this._stream=new n.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}e["default"]=StreamProvider},8918:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(9476);class SyncProvider{constructor(t,e){this._root=t;this._settings=e;this._reader=new n.default(this._root,this._settings)}read(){return this._reader.read()}}e["default"]=SyncProvider},1293:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(2361);const s=r(1659);const i=r(4241);const o=r(1652);const a=r(8376);class AsyncReader extends a.default{constructor(t,e){super(t,e);this._settings=e;this._scandir=s.scandir;this._emitter=new n.EventEmitter;this._queue=i(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,e){const r={directory:t,base:e};this._queue.push(r,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,e){this._scandir(t.directory,this._settings.fsScandirSettings,((r,n)=>{if(r!==null){e(r,undefined);return}for(const e of n){this._handleEntry(e,t.base)}e(null,undefined)}))}_handleError(t){if(this._isDestroyed||!o.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,e){if(this._isDestroyed||this._isFatalError){return}const r=t.path;if(e!==undefined){t.path=o.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(o.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&o.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}e["default"]=AsyncReader},1652:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function isFatalError(t,e){if(t.errorFilter===null){return true}return!t.errorFilter(e)}e.isFatalError=isFatalError;function isAppliedFilter(t,e){return t===null||t(e)}e.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,e){return t.split(/[/\\]/).join(e)}e.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,e,r){if(t===""){return e}if(t.endsWith(r)){return t+e}return t+r+e}e.joinPathSegments=joinPathSegments},8376:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1652);class Reader{constructor(t,e){this._root=t;this._settings=e;this._root=n.replacePathSegmentSeparator(t,e.pathSegmentSeparator)}}e["default"]=Reader},9476:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1659);const s=r(1652);const i=r(8376);class SyncReader extends i.default{constructor(){super(...arguments);this._scandir=n.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,e){this._queue.add({directory:t,base:e})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,e){try{const r=this._scandir(t,this._settings.fsScandirSettings);for(const t of r){this._handleEntry(t,e)}}catch(t){this._handleError(t)}}_handleError(t){if(!s.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,e){const r=t.path;if(e!==undefined){t.path=s.joinPathSegments(e,t.name,this._settings.pathSegmentSeparator)}if(s.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&s.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(r,e===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}e["default"]=SyncReader},8831:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1017);const s=r(1659);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,n.sep);this.fsScandirSettings=new s.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,e){return t!==null&&t!==void 0?t:e}}e["default"]=Settings},1570:(t,e,r)=>{"use strict";const n=r(3625);const s=r(4666);const i=r(6183);const o=r(2467);const braces=(t,e={})=>{let r=[];if(Array.isArray(t)){for(let n of t){let t=braces.create(n,e);if(Array.isArray(t)){r.push(...t)}else{r.push(t)}}}else{r=[].concat(braces.create(t,e))}if(e&&e.expand===true&&e.nodupes===true){r=[...new Set(r)]}return r};braces.parse=(t,e={})=>o(t,e);braces.stringify=(t,e={})=>{if(typeof t==="string"){return n(braces.parse(t,e),e)}return n(t,e)};braces.compile=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}return s(t,e)};braces.expand=(t,e={})=>{if(typeof t==="string"){t=braces.parse(t,e)}let r=i(t,e);if(e.noempty===true){r=r.filter(Boolean)}if(e.nodupes===true){r=[...new Set(r)]}return r};braces.create=(t,e={})=>{if(t===""||t.length<3){return[t]}return e.expand!==true?braces.compile(t,e):braces.expand(t,e)};t.exports=braces},4666:(t,e,r)=>{"use strict";const n=r(442);const s=r(2456);const compile=(t,e={})=>{let walk=(t,r={})=>{let i=s.isInvalidBrace(r);let o=t.invalid===true&&e.escapeInvalid===true;let a=i===true||o===true;let u=e.escapeInvalid===true?"\\":"";let c="";if(t.isOpen===true){return u+t.value}if(t.isClose===true){return u+t.value}if(t.type==="open"){return a?u+t.value:"("}if(t.type==="close"){return a?u+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":a?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){let r=s.reduce(t.nodes);let i=n(...r,{...e,wrap:false,toRegex:true});if(i.length!==0){return r.length>1&&i.length>1?`(${i})`:i}}if(t.nodes){for(let e of t.nodes){c+=walk(e,t)}}return c};return walk(t)};t.exports=compile},487:t=>{"use strict";t.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},6183:(t,e,r)=>{"use strict";const n=r(442);const s=r(3625);const i=r(2456);const append=(t="",e="",r=false)=>{let n=[];t=[].concat(t);e=[].concat(e);if(!e.length)return t;if(!t.length){return r?i.flatten(e).map((t=>`{${t}}`)):e}for(let s of t){if(Array.isArray(s)){for(let t of s){n.push(append(t,e,r))}}else{for(let t of e){if(r===true&&typeof t==="string")t=`{${t}}`;n.push(Array.isArray(t)?append(s,t,r):s+t)}}}return i.flatten(n)};const expand=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit;let walk=(t,o={})=>{t.queue=[];let a=o;let u=o.queue;while(a.type!=="brace"&&a.type!=="root"&&a.parent){a=a.parent;u=a.queue}if(t.invalid||t.dollar){u.push(append(u.pop(),s(t,e)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){u.push(append(u.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){let o=i.reduce(t.nodes);if(i.exceedsLimit(...o,e.step,r)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let a=n(...o,e);if(a.length===0){a=s(t,e)}u.push(append(u.pop(),a));t.nodes=[];return}let c=i.encloseBrace(t);let l=t.queue;let f=t;while(f.type!=="brace"&&f.type!=="root"&&f.parent){f=f.parent;l=f.queue}for(let e=0;e{"use strict";const n=r(3625);const{MAX_LENGTH:s,CHAR_BACKSLASH:i,CHAR_BACKTICK:o,CHAR_COMMA:a,CHAR_DOT:u,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:l,CHAR_LEFT_CURLY_BRACE:f,CHAR_RIGHT_CURLY_BRACE:p,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:_,CHAR_SINGLE_QUOTE:g,CHAR_NO_BREAK_SPACE:y,CHAR_ZERO_WIDTH_NOBREAK_SPACE:S}=r(487);const parse=(t,e={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}let r=e||{};let m=typeof r.maxLength==="number"?Math.min(s,r.maxLength):s;if(t.length>m){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${m})`)}let v={type:"root",input:t,nodes:[]};let E=[v];let A=v;let b=v;let R=0;let P=t.length;let x=0;let k=0;let T;let C={};const advance=()=>t[x++];const push=t=>{if(t.type==="text"&&b.type==="dot"){b.type="text"}if(b&&b.type==="text"&&t.type==="text"){b.value+=t.value;return}A.nodes.push(t);t.parent=A;t.prev=b;b=t;return t};push({type:"bos"});while(x0){if(A.ranges>0){A.ranges=0;let t=A.nodes.shift();A.nodes=[t,{type:"text",value:n(A)}]}push({type:"comma",value:T});A.commas++;continue}if(T===u&&k>0&&A.commas===0){let t=A.nodes;if(k===0||t.length===0){push({type:"text",value:T});continue}if(b.type==="dot"){A.range=[];b.value+=T;b.type="range";if(A.nodes.length!==3&&A.nodes.length!==5){A.invalid=true;A.ranges=0;b.type="text";continue}A.ranges++;A.args=[];continue}if(b.type==="range"){t.pop();let e=t[t.length-1];e.value+=b.value+T;b=e;A.ranges--;continue}push({type:"dot",value:T});continue}push({type:"text",value:T})}do{A=E.pop();if(A.type!=="root"){A.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));let t=E[E.length-1];let e=t.nodes.indexOf(A);t.nodes.splice(e,1,...A.nodes)}}while(E.length>0);push({type:"eos"});return v};t.exports=parse},3625:(t,e,r)=>{"use strict";const n=r(2456);t.exports=(t,e={})=>{let stringify=(t,r={})=>{let s=e.escapeInvalid&&n.isInvalidBrace(r);let i=t.invalid===true&&e.escapeInvalid===true;let o="";if(t.value){if((s||i)&&n.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(let e of t.nodes){o+=stringify(e)}}return o};return stringify(t)}},2456:(t,e)=>{"use strict";e.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};e.find=(t,e)=>t.nodes.find((t=>t.type===e));e.exceedsLimit=(t,r,n=1,s)=>{if(s===false)return false;if(!e.isInteger(t)||!e.isInteger(r))return false;return(Number(r)-Number(t))/Number(n)>=s};e.escapeNode=(t,e=0,r)=>{let n=t.nodes[e];if(!n)return;if(r&&n.type===r||n.type==="open"||n.type==="close"){if(n.escaped!==true){n.value="\\"+n.value;n.escaped=true}}};e.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};e.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};e.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};e.reduce=t=>t.reduce(((t,e)=>{if(e.type==="text")t.push(e.value);if(e.type==="range")e.type="text";return t}),[]);e.flatten=(...t)=>{const e=[];const flat=t=>{for(let r=0;r{"use strict";const n=r(2291);const s=r(8620);const i=r(7900);const o=r(5407);const a=r(1066);const u=r(7190);const c=r(3828);async function FastGlob(t,e){assertPatternsInput(t);const r=getWorks(t,i.default,e);const n=await Promise.all(r);return c.array.flatten(n)}(function(t){function sync(t,e){assertPatternsInput(t);const r=getWorks(t,a.default,e);return c.array.flatten(r)}t.sync=sync;function stream(t,e){assertPatternsInput(t);const r=getWorks(t,o.default,e);return c.stream.merge(r)}t.stream=stream;function generateTasks(t,e){assertPatternsInput(t);const r=s.transform([].concat(t));const i=new u.default(e);return n.generate(r,i)}t.generateTasks=generateTasks;function isDynamicPattern(t,e){assertPatternsInput(t);const r=new u.default(e);return c.pattern.isDynamicPattern(t,r)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return c.path.escape(t)}t.escapePath=escapePath})(FastGlob||(FastGlob={}));function getWorks(t,e,r){const i=s.transform([].concat(t));const o=new u.default(r);const a=n.generate(i,o);const c=new e(o);return a.map(c.read,c)}function assertPatternsInput(t){const e=[].concat(t);const r=e.every((t=>c.string.isString(t)&&!c.string.isEmpty(t)));if(!r){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},8620:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.removeDuplicateSlashes=e.transform=void 0;const r=/(?!^)\/{2,}/g;function transform(t){return t.map((t=>removeDuplicateSlashes(t)))}e.transform=transform;function removeDuplicateSlashes(t){return t.replace(r,"/")}e.removeDuplicateSlashes=removeDuplicateSlashes},2291:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;const n=r(3828);function generate(t,e){const r=getPositivePatterns(t);const s=getNegativePatternsAsPositive(t,e.ignore);const i=r.filter((t=>n.pattern.isStaticPattern(t,e)));const o=r.filter((t=>n.pattern.isDynamicPattern(t,e)));const a=convertPatternsToTasks(i,s,false);const u=convertPatternsToTasks(o,s,true);return a.concat(u)}e.generate=generate;function convertPatternsToTasks(t,e,r){const s=[];const i=n.pattern.getPatternsOutsideCurrentDirectory(t);const o=n.pattern.getPatternsInsideCurrentDirectory(t);const a=groupPatternsByBaseDirectory(i);const u=groupPatternsByBaseDirectory(o);s.push(...convertPatternGroupsToTasks(a,e,r));if("."in u){s.push(convertPatternGroupToTask(".",o,e,r))}else{s.push(...convertPatternGroupsToTasks(u,e,r))}return s}e.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return n.pattern.getPositivePatterns(t)}e.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,e){const r=n.pattern.getNegativePatterns(t).concat(e);const s=r.map(n.pattern.convertToPositivePattern);return s}e.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const e={};return t.reduce(((t,e)=>{const r=n.pattern.getBaseDirectory(e);if(r in t){t[r].push(e)}else{t[r]=[e]}return t}),e)}e.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,e,r){return Object.keys(t).map((n=>convertPatternGroupToTask(n,t[n],e,r)))}e.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,e,r,s){return{dynamic:s,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(n.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=convertPatternGroupToTask},7900:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(8075);const s=r(8845);class ProviderAsync extends s.default{constructor(){super(...arguments);this._reader=new n.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const n=[];return new Promise(((s,i)=>{const o=this.api(e,t,r);o.once("error",i);o.on("data",(t=>n.push(r.transform(t))));o.once("end",(()=>s(n)))}))}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderAsync},4292:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(3828);const s=r(5995);class DeepFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e}getFilter(t,e,r){const n=this._getMatcher(e);const s=this._getNegativePatternsRe(r);return e=>this._filter(t,e,n,s)}_getMatcher(t){return new s.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const e=t.filter(n.pattern.isAffectDepthOfReadingPattern);return n.pattern.convertPatternsToRe(e,this._micromatchOptions)}_filter(t,e,r,s){if(this._isSkippedByDeep(t,e.path)){return false}if(this._isSkippedSymbolicLink(e)){return false}const i=n.path.removeLeadingDotSegment(e.path);if(this._isSkippedByPositivePatterns(i,r)){return false}return this._isSkippedByNegativePatterns(i,s)}_isSkippedByDeep(t,e){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const r=e.split("/").length;if(t===""){return r}const n=t.split("/").length;return r-n}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(t,e){return!n.pattern.matchAny(t,e)}}e["default"]=DeepFilter},659:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(3828);class EntryFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e;this.index=new Map}getFilter(t,e){const r=n.pattern.convertPatternsToRe(t,this._micromatchOptions);const s=n.pattern.convertPatternsToRe(e,this._micromatchOptions);return t=>this._filter(t,r,s)}_filter(t,e,r){if(this._settings.unique&&this._isDuplicateEntry(t)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}if(this._isSkippedByAbsoluteNegativePatterns(t.path,r)){return false}const n=this._settings.baseNameMatch?t.name:t.path;const s=this._isMatchToPatterns(n,e)&&!this._isMatchToPatterns(t.path,r);if(this._settings.unique&&s){this._createIndexRecord(t)}return s}_isDuplicateEntry(t){return this.index.has(t.path)}_createIndexRecord(t){this.index.set(t.path,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,e){if(!this._settings.absolute){return false}const r=n.path.makeAbsolute(this._settings.cwd,t);return n.pattern.matchAny(r,e)}_isMatchToPatterns(t,e){const r=n.path.removeLeadingDotSegment(t);return n.pattern.matchAny(r,e)||n.pattern.matchAny(r+"/",e)}}e["default"]=EntryFilter},9558:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(3828);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return n.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}e["default"]=ErrorFilter},8302:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(3828);class Matcher{constructor(t,e,r){this._patterns=t;this._settings=e;this._micromatchOptions=r;this._storage=[];this._fillStorage()}_fillStorage(){const t=n.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const e of t){const t=this._getPatternSegments(e);const r=this._splitSegmentsIntoSections(t);this._storage.push({complete:r.length<=1,pattern:e,segments:t,sections:r})}}_getPatternSegments(t){const e=n.pattern.getPatternParts(t,this._micromatchOptions);return e.map((t=>{const e=n.pattern.isDynamicPattern(t,this._settings);if(!e){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:n.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return n.array.splitWhen(t,(t=>t.dynamic&&n.pattern.hasGlobStar(t.pattern)))}}e["default"]=Matcher},5995:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(8302);class PartialMatcher extends n.default{match(t){const e=t.split("/");const r=e.length;const n=this._storage.filter((t=>!t.complete||t.segments.length>r));for(const t of n){const n=t.sections[0];if(!t.complete&&r>n.length){return true}const s=e.every(((e,r)=>{const n=t.segments[r];if(n.dynamic&&n.patternRe.test(e)){return true}if(!n.dynamic&&n.pattern===e){return true}return false}));if(s){return true}}return false}}e["default"]=PartialMatcher},8845:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1017);const s=r(4292);const i=r(659);const o=r(9558);const a=r(8460);class Provider{constructor(t){this._settings=t;this.errorFilter=new o.default(this._settings);this.entryFilter=new i.default(this._settings,this._getMicromatchOptions());this.deepFilter=new s.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new a.default(this._settings)}_getRootDirectory(t){return n.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const e=t.base==="."?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.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}}}e["default"]=Provider},5407:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(2781);const s=r(8075);const i=r(8845);class ProviderStream extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=this.api(e,t,r);const i=new n.Readable({objectMode:true,read:()=>{}});s.once("error",(t=>i.emit("error",t))).on("data",(t=>i.emit("data",r.transform(t)))).once("end",(()=>i.emit("end")));i.once("close",(()=>s.destroy()));return i}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderStream},1066:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(8110);const s=r(8845);class ProviderSync extends s.default{constructor(){super(...arguments);this._reader=new n.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const n=this.api(e,t,r);return n.map(r.transform)}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderSync},8460:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(3828);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let e=t.path;if(this._settings.absolute){e=n.path.makeAbsolute(this._settings.cwd,e);e=n.path.unixify(e)}if(this._settings.markDirectories&&t.dirent.isDirectory()){e+="/"}if(!this._settings.objectMode){return e}return Object.assign(Object.assign({},t),{path:e})}}e["default"]=EntryTransformer},5906:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(1017);const s=r(3645);const i=r(3828);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new s.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return n.resolve(this._settings.cwd,t)}_makeEntry(t,e){const r={name:e,path:e,dirent:i.fs.createDirentFromStats(e,t)};if(this._settings.stats){r.stats=t}return r}_isFatalError(t){return!i.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}e["default"]=Reader},8075:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(2781);const s=r(3645);const i=r(4328);const o=r(5906);class ReaderStream extends o.default{constructor(){super(...arguments);this._walkStream=i.walkStream;this._stat=s.stat}dynamic(t,e){return this._walkStream(t,e)}static(t,e){const r=t.map(this._getFullEntryPath,this);const s=new n.PassThrough({objectMode:true});s._write=(n,i,o)=>this._getEntry(r[n],t[n],e).then((t=>{if(t!==null&&e.entryFilter(t)){s.push(t)}if(n===r.length-1){s.end()}o()})).catch(o);for(let t=0;tthis._makeEntry(t,e))).catch((t=>{if(r.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((e,r)=>{this._stat(t,this._fsStatSettings,((t,n)=>t===null?e(n):r(t)))}))}}e["default"]=ReaderStream},8110:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const n=r(3645);const s=r(4328);const i=r(5906);class ReaderSync extends i.default{constructor(){super(...arguments);this._walkSync=s.walkSync;this._statSync=n.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const r=[];for(const n of t){const t=this._getFullEntryPath(n);const s=this._getEntry(t,n,e);if(s===null||!e.entryFilter(s)){continue}r.push(s)}return r}_getEntry(t,e,r){try{const r=this._getStat(t);return this._makeEntry(r,e)}catch(t){if(r.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}e["default"]=ReaderSync},7190:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const n=r(7147);const s=r(2037);const i=Math.max(s.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:n.lstat,lstatSync:n.lstatSync,stat:n.stat,statSync:n.statSync,readdir:n.readdir,readdirSync:n.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,i);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}}_getValue(t,e){return t===undefined?e:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}e["default"]=Settings},5789:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.splitWhen=e.flatten=void 0;function flatten(t){return t.reduce(((t,e)=>[].concat(t,e)),[])}e.flatten=flatten;function splitWhen(t,e){const r=[[]];let n=0;for(const s of t){if(e(s)){n++;r[n]=[]}else{r[n].push(s)}}return r}e.splitWhen=splitWhen},886:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}e.isEnoentCodeError=isEnoentCodeError},9102:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},3828:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;const n=r(5789);e.array=n;const s=r(886);e.errno=s;const i=r(9102);e.fs=i;const o=r(6462);e.path=o;const a=r(2256);e.pattern=a;const u=r(9941);e.stream=u;const c=r(5121);e.string=c},6462:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.removeLeadingDotSegment=e.escape=e.makeAbsolute=e.unixify=void 0;const n=r(1017);const s=2;const i=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function unixify(t){return t.replace(/\\/g,"/")}e.unixify=unixify;function makeAbsolute(t,e){return n.resolve(t,e)}e.makeAbsolute=makeAbsolute;function escape(t){return t.replace(i,"\\$2")}e.escape=escape;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\"){return t.slice(s)}}return t}e.removeLeadingDotSegment=removeLeadingDotSegment},2256:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;const n=r(1017);const s=r(5976);const i=r(8627);const o="**";const a="\\";const u=/[*?]|^!/;const c=/\[[^[]*]/;const l=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const f=/[!*+?@]\([^(]*\)/;const p=/,|\.\./;function isStaticPattern(t,e={}){return!isDynamicPattern(t,e)}e.isStaticPattern=isStaticPattern;function isDynamicPattern(t,e={}){if(t===""){return false}if(e.caseSensitiveMatch===false||t.includes(a)){return true}if(u.test(t)||c.test(t)||l.test(t)){return true}if(e.extglob!==false&&f.test(t)){return true}if(e.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}e.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const e=t.indexOf("{");if(e===-1){return false}const r=t.indexOf("}",e+1);if(r===-1){return false}const n=t.slice(e,r);return p.test(n)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}e.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}e.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}e.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}e.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}e.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}e.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}e.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}e.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}e.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return s(t,{flipBackslashes:false})}e.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(o)}e.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+o)}e.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const e=n.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(e)}e.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,e)=>t.concat(expandBraceExpansion(e))),[])}e.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){return i.braces(t,{expand:true,nodupes:true})}e.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,e){let{parts:r}=i.scan(t,Object.assign(Object.assign({},e),{parts:true}));if(r.length===0){r=[t]}if(r[0].startsWith("/")){r[0]=r[0].slice(1);r.unshift("")}return r}e.getPatternParts=getPatternParts;function makeRe(t,e){return i.makeRe(t,e)}e.makeRe=makeRe;function convertPatternsToRe(t,e){return t.map((t=>makeRe(t,e)))}e.convertPatternsToRe=convertPatternsToRe;function matchAny(t,e){return e.some((e=>e.test(t)))}e.matchAny=matchAny},9941:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.merge=void 0;const n=r(1382);function merge(t){const e=n(t);t.forEach((t=>{t.once("error",(t=>e.emit("error",t)))}));e.once("close",(()=>propagateCloseEventToSources(t)));e.once("end",(()=>propagateCloseEventToSources(t)));return e}e.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},5121:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEmpty=e.isString=void 0;function isString(t){return typeof t==="string"}e.isString=isString;function isEmpty(t){return t===""}e.isEmpty=isEmpty},4241:(t,e,r)=>{"use strict";var n=r(1816);function fastqueue(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}if(r<1){throw new Error("fastqueue concurrency must be greater than 1")}var s=n(Task);var i=null;var o=null;var a=0;var u=null;var c={push:push,drain:noop,saturated:noop,pause:pause,paused:false,concurrency:r,running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return c;function running(){return a}function pause(){c.paused=true}function length(){var t=i;var e=0;while(t){t=t.next;e++}return e}function getQueue(){var t=i;var e=[];while(t){e.push(t.value);t=t.next}return e}function resume(){if(!c.paused)return;c.paused=false;for(var t=0;t{"use strict"; -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */const n=r(3837);const s=r(211);const isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);const transform=t=>e=>t===true?Number(e):String(e);const isValidValue=t=>typeof t==="number"||typeof t==="string"&&t!=="";const isNumber=t=>Number.isInteger(+t);const zeros=t=>{let e=`${t}`;let r=-1;if(e[0]==="-")e=e.slice(1);if(e==="0")return false;while(e[++r]==="0");return r>0};const stringify=(t,e,r)=>{if(typeof t==="string"||typeof e==="string"){return true}return r.stringify===true};const pad=(t,e,r)=>{if(e>0){let r=t[0]==="-"?"-":"";if(r)t=t.slice(1);t=r+t.padStart(r?e-1:e,"0")}if(r===false){return String(t)}return t};const toMaxLen=(t,e)=>{let r=t[0]==="-"?"-":"";if(r){t=t.slice(1);e--}while(t.length{t.negatives.sort(((t,e)=>te?1:0));t.positives.sort(((t,e)=>te?1:0));let r=e.capture?"":"?:";let n="";let s="";let i;if(t.positives.length){n=t.positives.join("|")}if(t.negatives.length){s=`-(${r}${t.negatives.join("|")})`}if(n&&s){i=`${n}|${s}`}else{i=n||s}if(e.wrap){return`(${r}${i})`}return i};const toRange=(t,e,r,n)=>{if(r){return s(t,e,{wrap:false,...n})}let i=String.fromCharCode(t);if(t===e)return i;let o=String.fromCharCode(e);return`[${i}-${o}]`};const toRegex=(t,e,r)=>{if(Array.isArray(t)){let e=r.wrap===true;let n=r.capture?"":"?:";return e?`(${n}${t.join("|")})`:t.join("|")}return s(t,e,r)};const rangeError=(...t)=>new RangeError("Invalid range arguments: "+n.inspect(...t));const invalidRange=(t,e,r)=>{if(r.strictRanges===true)throw rangeError([t,e]);return[]};const invalidStep=(t,e)=>{if(e.strictRanges===true){throw new TypeError(`Expected step "${t}" to be a number`)}return[]};const fillNumbers=(t,e,r=1,n={})=>{let s=Number(t);let i=Number(e);if(!Number.isInteger(s)||!Number.isInteger(i)){if(n.strictRanges===true)throw rangeError([t,e]);return[]}if(s===0)s=0;if(i===0)i=0;let o=s>i;let a=String(t);let u=String(e);let c=String(r);r=Math.max(Math.abs(r),1);let l=zeros(a)||zeros(u)||zeros(c);let f=l?Math.max(a.length,u.length,c.length):0;let p=l===false&&stringify(t,e,n)===false;let h=n.transform||transform(p);if(n.toRegex&&r===1){return toRange(toMaxLen(t,f),toMaxLen(e,f),true,n)}let d={negatives:[],positives:[]};let push=t=>d[t<0?"negatives":"positives"].push(Math.abs(t));let _=[];let g=0;while(o?s>=i:s<=i){if(n.toRegex===true&&r>1){push(s)}else{_.push(pad(h(s,g),f,p))}s=o?s-r:s+r;g++}if(n.toRegex===true){return r>1?toSequence(d,n):toRegex(_,null,{wrap:false,...n})}return _};const fillLetters=(t,e,r=1,n={})=>{if(!isNumber(t)&&t.length>1||!isNumber(e)&&e.length>1){return invalidRange(t,e,n)}let s=n.transform||(t=>String.fromCharCode(t));let i=`${t}`.charCodeAt(0);let o=`${e}`.charCodeAt(0);let a=i>o;let u=Math.min(i,o);let c=Math.max(i,o);if(n.toRegex&&r===1){return toRange(u,c,false,n)}let l=[];let f=0;while(a?i>=o:i<=o){l.push(s(i,f));i=a?i-r:i+r;f++}if(n.toRegex===true){return toRegex(l,null,{wrap:false,options:n})}return l};const fill=(t,e,r,n={})=>{if(e==null&&isValidValue(t)){return[t]}if(!isValidValue(t)||!isValidValue(e)){return invalidRange(t,e,n)}if(typeof r==="function"){return fill(t,e,1,{transform:r})}if(isObject(r)){return fill(t,e,0,r)}let s={...n};if(s.capture===true)s.wrap=true;r=r||s.step||1;if(!isNumber(r)){if(r!=null&&!isObject(r))return invalidStep(r,s);return fill(t,e,1,r)}if(isNumber(t)&&isNumber(e)){return fillNumbers(t,e,r,s)}return fillLetters(t,e,Math.max(Math.abs(r),1),s)};t.exports=fill},5976:(t,e,r)=>{"use strict";var n=r(6654);var s=r(1017).posix.dirname;var i=r(2037).platform()==="win32";var o="/";var a=/\\/g;var u=/[\{\[].*[\}\]]$/;var c=/(^|[^\\])([\{\[]|\([^\)]+$)/;var l=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,e){var r=Object.assign({flipBackslashes:true},e);if(r.flipBackslashes&&i&&t.indexOf(o)<0){t=t.replace(a,o)}if(u.test(t)){t+=o}t+="a";do{t=s(t)}while(n(t)||c.test(t));return t.replace(l,"$1")}},3071:t=>{ -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ -t.exports=function isExtglob(t){if(typeof t!=="string"||t===""){return false}var e;while(e=/(\\).|([@?!+*]\(.*\))/g.exec(t)){if(e[2])return true;t=t.slice(e.index+e[0].length)}return false}},6654:(t,e,r)=>{ -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ -var n=r(3071);var s={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0]==="!"){return true}var e=0;var r=-2;var n=-2;var i=-2;var o=-2;var a=-2;while(ee){if(a===-1||a>n){return true}a=t.indexOf("\\",e);if(a===-1||a>n){return true}}}if(i!==-1&&t[e]==="{"&&t[e+1]!=="}"){i=t.indexOf("}",e);if(i>e){a=t.indexOf("\\",e);if(a===-1||a>i){return true}}}if(o!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"){o=t.indexOf(")",e);if(o>e){a=t.indexOf("\\",e);if(a===-1||a>o){return true}}}if(r!==-1&&t[e]==="("&&t[e+1]!=="|"){if(rr){a=t.indexOf("\\",r);if(a===-1||a>o){return true}}}}if(t[e]==="\\"){var u=t[e+1];e+=2;var c=s[u];if(c){var l=t.indexOf(c,e);if(l!==-1){e=l+1}}if(t[e]==="!"){return true}}else{e++}}return false};var relaxedCheck=function(t){if(t[0]==="!"){return true}var e=0;while(e{"use strict"; -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},1382:(t,e,r)=>{"use strict";const n=r(2781);const s=n.PassThrough;const i=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=i.call(arguments);let r=false;let n=e[e.length-1];if(n&&!Array.isArray(n)&&n.pipe==null){e.pop()}else{n={}}const o=n.end!==false;const a=n.pipeError===true;if(n.objectMode==null){n.objectMode=true}if(n.highWaterMark==null){n.highWaterMark=64*1024}const u=s(n);function addStream(){for(let e=0,r=arguments.length;e0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(a){t.removeListener("error",onerror)}next()}function onerror(t){u.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(a){t.on("error",onerror)}t.pipe(u,{end:false});t.resume()}for(let t=0;t{"use strict";const n=r(3837);const s=r(1570);const i=r(376);const o=r(8658);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,e,r)=>{e=[].concat(e);t=[].concat(t);let n=new Set;let s=new Set;let o=new Set;let a=0;let onResult=t=>{o.add(t.output);if(r&&r.onResult){r.onResult(t)}};for(let o=0;o!n.has(t)));if(r&&c.length===0){if(r.failglob===true){throw new Error(`No matches found for "${e.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}}return c};micromatch.match=micromatch;micromatch.matcher=(t,e)=>i(t,e);micromatch.isMatch=(t,e,r)=>i(e,r)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set;let s=[];let onResult=t=>{if(r.onResult)r.onResult(t);s.push(t.output)};let i=new Set(micromatch(t,e,{...r,onResult:onResult}));for(let t of s){if(!i.has(t)){n.add(t)}}return[...n]};micromatch.contains=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${n.inspect(t)}"`)}if(Array.isArray(e)){return e.some((e=>micromatch.contains(t,e,r)))}if(typeof e==="string"){if(isEmptyString(t)||isEmptyString(e)){return false}if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e)){return true}}return micromatch.isMatch(t,e,{...r,contains:true})};micromatch.matchKeys=(t,e,r)=>{if(!o.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let n=micromatch(Object.keys(t),e,r);let s={};for(let e of n)s[e]=t[e];return s};micromatch.some=(t,e,r)=>{let n=[].concat(t);for(let t of[].concat(e)){let e=i(String(t),r);if(n.some((t=>e(t)))){return true}}return false};micromatch.every=(t,e,r)=>{let n=[].concat(t);for(let t of[].concat(e)){let e=i(String(t),r);if(!n.every((t=>e(t)))){return false}}return true};micromatch.all=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${n.inspect(t)}"`)}return[].concat(e).every((e=>i(e,r)(t)))};micromatch.capture=(t,e,r)=>{let n=o.isWindows(r);let s=i.makeRe(String(t),{...r,capture:true});let a=s.exec(n?o.toPosixSlashes(e):e);if(a){return a.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>i.makeRe(...t);micromatch.scan=(...t)=>i.scan(...t);micromatch.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[])){for(let t of s(String(n),e)){r.push(i.parse(t,e))}}return r};micromatch.braces=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(e&&e.nobrace===true||!/\{.*\}/.test(t)){return[t]}return s(t,e)};micromatch.braceExpand=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...e,expand:true})};t.exports=micromatch},376:(t,e,r)=>{"use strict";t.exports=r(7631)},7820:(t,e,r)=>{"use strict";const n=r(1017);const s="\\\\/";const i=`[^${s}]`;const o="\\.";const a="\\+";const u="\\?";const c="\\/";const l="(?=.)";const f="[^/]";const p=`(?:${c}|$)`;const h=`(?:^|${c})`;const d=`${o}{1,2}${p}`;const _=`(?!${o})`;const g=`(?!${h}${d})`;const y=`(?!${o}{0,1}${p})`;const S=`(?!${d})`;const m=`[^.${c}]`;const v=`${f}*?`;const E={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:u,SLASH_LITERAL:c,ONE_CHAR:l,QMARK:f,END_ANCHOR:p,DOTS_SLASH:d,NO_DOT:_,NO_DOTS:g,NO_DOT_SLASH:y,NO_DOTS_SLASH:S,QMARK_NO_DOT:m,STAR:v,START_ANCHOR:h};const A={...E,SLASH_LITERAL:`[${s}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${o}{1,2}(?:[${s}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${s}])${o}{1,2}(?:[${s}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${s}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${s}]|$))`,QMARK_NO_DOT:`[^.${s}]`,START_ANCHOR:`(?:^|[${s}])`,END_ANCHOR:`(?:[${s}]|$)`};const b={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:b,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:n.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?A:E}}},6986:(t,e,r)=>{"use strict";const n=r(7820);const s=r(8658);const{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:u,REPLACEMENTS:c}=n;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>s.escapeRegex(t))).join("..")}return r};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=c[t]||t;const r={...e};const l=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;let f=t.length;if(f>l){throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${l}`)}const p={type:"bos",value:"",output:r.prepend||""};const h=[p];const d=r.capture?"":"?:";const _=s.isWindows(e);const g=n.globChars(_);const y=n.extglobChars(g);const{DOT_LITERAL:S,PLUS_LITERAL:m,SLASH_LITERAL:v,ONE_CHAR:E,DOTS_SLASH:A,NO_DOT:b,NO_DOT_SLASH:R,NO_DOTS_SLASH:P,QMARK:x,QMARK_NO_DOT:k,STAR:T,START_ANCHOR:C}=g;const globstar=t=>`(${d}(?:(?!${C}${t.dot?A:S}).)*?)`;const w=r.dot?"":b;const O=r.dot?x:k;let L=r.bash===true?globstar(r):T;if(r.capture){L=`(${L})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const H={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:h};t=s.removePrefix(t,H);f=t.length;const D=[];const F=[];const $=[];let M=p;let N;const eos=()=>H.index===f-1;const I=H.peek=(e=1)=>t[H.index+e];const B=H.advance=()=>t[++H.index]||"";const remaining=()=>t.slice(H.index+1);const consume=(t="",e=0)=>{H.consumed+=t;H.index+=e};const append=t=>{H.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(I()==="!"&&(I(2)!=="("||I(3)==="?")){B();H.start++;t++}if(t%2===0){return false}H.negated=true;H.start++;return true};const increment=t=>{H[t]++;$.push(t)};const decrement=t=>{H[t]--;$.pop()};const push=t=>{if(M.type==="globstar"){const e=H.braces>0&&(t.type==="comma"||t.type==="brace");const r=t.extglob===true||D.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!r){H.output=H.output.slice(0,-M.output.length);M.type="star";M.value="*";M.output=L;H.output+=M.output}}if(D.length&&t.type!=="paren"){D[D.length-1].inner+=t.value}if(t.value||t.output)append(t);if(M&&M.type==="text"&&t.type==="text"){M.value+=t.value;M.output=(M.output||"")+t.value;return}t.prev=M;h.push(t);M=t};const extglobOpen=(t,e)=>{const n={...y[e],conditions:1,inner:""};n.prev=M;n.parens=H.parens;n.output=H.output;const s=(r.capture?"(":"")+n.open;increment("parens");push({type:t,value:e,output:H.output?"":E});push({type:"paren",extglob:true,value:B(),output:s});D.push(n)};const extglobClose=t=>{let n=t.close+(r.capture?")":"");let s;if(t.type==="negate"){let i=L;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){i=globstar(r)}if(i!==L||eos()||/^\)+$/.test(remaining())){n=t.close=`)$))${i}`}if(t.inner.includes("*")&&(s=remaining())&&/^\.[^\\/.]+$/.test(s)){const r=parse(s,{...e,fastpaths:false}).output;n=t.close=`)${r})${i})`}if(t.prev.type==="bos"){H.negatedExtglob=true}}push({type:"paren",extglob:true,value:N,output:n});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let n=false;let i=t.replace(u,((t,e,r,s,i,o)=>{if(s==="\\"){n=true;return t}if(s==="?"){if(e){return e+s+(i?x.repeat(i.length):"")}if(o===0){return O+(i?x.repeat(i.length):"")}return x.repeat(r.length)}if(s==="."){return S.repeat(r.length)}if(s==="*"){if(e){return e+s+(i?L:"")}return L}return e?t:`\\${t}`}));if(n===true){if(r.unescape===true){i=i.replace(/\\/g,"")}else{i=i.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(i===t&&r.contains===true){H.output=t;return H}H.output=s.wrapOutput(i,H,e);return H}while(!eos()){N=B();if(N==="\0"){continue}if(N==="\\"){const t=I();if(t==="/"&&r.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){N+="\\";push({type:"text",value:N});continue}const e=/^\\+/.exec(remaining());let n=0;if(e&&e[0].length>2){n=e[0].length;H.index+=n;if(n%2!==0){N+="\\"}}if(r.unescape===true){N=B()}else{N+=B()}if(H.brackets===0){push({type:"text",value:N});continue}}if(H.brackets>0&&(N!=="]"||M.value==="["||M.value==="[^")){if(r.posix!==false&&N===":"){const t=M.value.slice(1);if(t.includes("[")){M.posix=true;if(t.includes(":")){const t=M.value.lastIndexOf("[");const e=M.value.slice(0,t);const r=M.value.slice(t+2);const n=o[r];if(n){M.value=e+n;H.backtrack=true;B();if(!p.output&&h.indexOf(M)===1){p.output=E}continue}}}}if(N==="["&&I()!==":"||N==="-"&&I()==="]"){N=`\\${N}`}if(N==="]"&&(M.value==="["||M.value==="[^")){N=`\\${N}`}if(r.posix===true&&N==="!"&&M.value==="["){N="^"}M.value+=N;append({value:N});continue}if(H.quotes===1&&N!=='"'){N=s.escapeRegex(N);M.value+=N;append({value:N});continue}if(N==='"'){H.quotes=H.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:N})}continue}if(N==="("){increment("parens");push({type:"paren",value:N});continue}if(N===")"){if(H.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=D[D.length-1];if(t&&H.parens===t.parens+1){extglobClose(D.pop());continue}push({type:"paren",value:N,output:H.parens?")":"\\)"});decrement("parens");continue}if(N==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}N=`\\${N}`}else{increment("brackets")}push({type:"bracket",value:N});continue}if(N==="]"){if(r.nobracket===true||M&&M.type==="bracket"&&M.value.length===1){push({type:"text",value:N,output:`\\${N}`});continue}if(H.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:N,output:`\\${N}`});continue}decrement("brackets");const t=M.value.slice(1);if(M.posix!==true&&t[0]==="^"&&!t.includes("/")){N=`/${N}`}M.value+=N;append({value:N});if(r.literalBrackets===false||s.hasRegexChars(t)){continue}const e=s.escapeRegex(M.value);H.output=H.output.slice(0,-M.value.length);if(r.literalBrackets===true){H.output+=e;M.value=e;continue}M.value=`(${d}${e}|${M.value})`;H.output+=M.value;continue}if(N==="{"&&r.nobrace!==true){increment("braces");const t={type:"brace",value:N,output:"(",outputIndex:H.output.length,tokensIndex:H.tokens.length};F.push(t);push(t);continue}if(N==="}"){const t=F[F.length-1];if(r.nobrace===true||!t){push({type:"text",value:N,output:N});continue}let e=")";if(t.dots===true){const t=h.slice();const n=[];for(let e=t.length-1;e>=0;e--){h.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){n.unshift(t[e].value)}}e=expandRange(n,r);H.backtrack=true}if(t.comma!==true&&t.dots!==true){const r=H.output.slice(0,t.outputIndex);const n=H.tokens.slice(t.tokensIndex);t.value=t.output="\\{";N=e="\\}";H.output=r;for(const t of n){H.output+=t.output||t.value}}push({type:"brace",value:N,output:e});decrement("braces");F.pop();continue}if(N==="|"){if(D.length>0){D[D.length-1].conditions++}push({type:"text",value:N});continue}if(N===","){let t=N;const e=F[F.length-1];if(e&&$[$.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:N,output:t});continue}if(N==="/"){if(M.type==="dot"&&H.index===H.start+1){H.start=H.index+1;H.consumed="";H.output="";h.pop();M=p;continue}push({type:"slash",value:N,output:v});continue}if(N==="."){if(H.braces>0&&M.type==="dot"){if(M.value===".")M.output=S;const t=F[F.length-1];M.type="dots";M.output+=N;M.value+=N;t.dots=true;continue}if(H.braces+H.parens===0&&M.type!=="bos"&&M.type!=="slash"){push({type:"text",value:N,output:S});continue}push({type:"dot",value:N,output:S});continue}if(N==="?"){const t=M&&M.value==="(";if(!t&&r.noextglob!==true&&I()==="("&&I(2)!=="?"){extglobOpen("qmark",N);continue}if(M&&M.type==="paren"){const t=I();let e=N;if(t==="<"&&!s.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(M.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${N}`}push({type:"text",value:N,output:e});continue}if(r.dot!==true&&(M.type==="slash"||M.type==="bos")){push({type:"qmark",value:N,output:k});continue}push({type:"qmark",value:N,output:x});continue}if(N==="!"){if(r.noextglob!==true&&I()==="("){if(I(2)!=="?"||!/[!=<:]/.test(I(3))){extglobOpen("negate",N);continue}}if(r.nonegate!==true&&H.index===0){negate();continue}}if(N==="+"){if(r.noextglob!==true&&I()==="("&&I(2)!=="?"){extglobOpen("plus",N);continue}if(M&&M.value==="("||r.regex===false){push({type:"plus",value:N,output:m});continue}if(M&&(M.type==="bracket"||M.type==="paren"||M.type==="brace")||H.parens>0){push({type:"plus",value:N});continue}push({type:"plus",value:m});continue}if(N==="@"){if(r.noextglob!==true&&I()==="("&&I(2)!=="?"){push({type:"at",extglob:true,value:N,output:""});continue}push({type:"text",value:N});continue}if(N!=="*"){if(N==="$"||N==="^"){N=`\\${N}`}const t=a.exec(remaining());if(t){N+=t[0];H.index+=t[0].length}push({type:"text",value:N});continue}if(M&&(M.type==="globstar"||M.star===true)){M.type="star";M.star=true;M.value+=N;M.output=L;H.backtrack=true;H.globstar=true;consume(N);continue}let e=remaining();if(r.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",N);continue}if(M.type==="star"){if(r.noglobstar===true){consume(N);continue}const n=M.prev;const s=n.prev;const i=n.type==="slash"||n.type==="bos";const o=s&&(s.type==="star"||s.type==="globstar");if(r.bash===true&&(!i||e[0]&&e[0]!=="/")){push({type:"star",value:N,output:""});continue}const a=H.braces>0&&(n.type==="comma"||n.type==="brace");const u=D.length&&(n.type==="pipe"||n.type==="paren");if(!i&&n.type!=="paren"&&!a&&!u){push({type:"star",value:N,output:""});continue}while(e.slice(0,3)==="/**"){const r=t[H.index+4];if(r&&r!=="/"){break}e=e.slice(3);consume("/**",3)}if(n.type==="bos"&&eos()){M.type="globstar";M.value+=N;M.output=globstar(r);H.output=M.output;H.globstar=true;consume(N);continue}if(n.type==="slash"&&n.prev.type!=="bos"&&!o&&eos()){H.output=H.output.slice(0,-(n.output+M.output).length);n.output=`(?:${n.output}`;M.type="globstar";M.output=globstar(r)+(r.strictSlashes?")":"|$)");M.value+=N;H.globstar=true;H.output+=n.output+M.output;consume(N);continue}if(n.type==="slash"&&n.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";H.output=H.output.slice(0,-(n.output+M.output).length);n.output=`(?:${n.output}`;M.type="globstar";M.output=`${globstar(r)}${v}|${v}${t})`;M.value+=N;H.output+=n.output+M.output;H.globstar=true;consume(N+B());push({type:"slash",value:"/",output:""});continue}if(n.type==="bos"&&e[0]==="/"){M.type="globstar";M.value+=N;M.output=`(?:^|${v}|${globstar(r)}${v})`;H.output=M.output;H.globstar=true;consume(N+B());push({type:"slash",value:"/",output:""});continue}H.output=H.output.slice(0,-M.output.length);M.type="globstar";M.output=globstar(r);M.value+=N;H.output+=M.output;H.globstar=true;consume(N);continue}const n={type:"star",value:N,output:L};if(r.bash===true){n.output=".*?";if(M.type==="bos"||M.type==="slash"){n.output=w+n.output}push(n);continue}if(M&&(M.type==="bracket"||M.type==="paren")&&r.regex===true){n.output=N;push(n);continue}if(H.index===H.start||M.type==="slash"||M.type==="dot"){if(M.type==="dot"){H.output+=R;M.output+=R}else if(r.dot===true){H.output+=P;M.output+=P}else{H.output+=w;M.output+=w}if(I()!=="*"){H.output+=E;M.output+=E}}push(n)}while(H.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));H.output=s.escapeLast(H.output,"[");decrement("brackets")}while(H.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));H.output=s.escapeLast(H.output,"(");decrement("parens")}while(H.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));H.output=s.escapeLast(H.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(M.type==="star"||M.type==="bracket")){push({type:"maybe_slash",value:"",output:`${v}?`})}if(H.backtrack===true){H.output="";for(const t of H.tokens){H.output+=t.output!=null?t.output:t.value;if(t.suffix){H.output+=t.suffix}}}return H};parse.fastpaths=(t,e)=>{const r={...e};const o=typeof r.maxLength==="number"?Math.min(i,r.maxLength):i;const a=t.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}t=c[t]||t;const u=s.isWindows(e);const{DOT_LITERAL:l,SLASH_LITERAL:f,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:d,NO_DOTS:_,NO_DOTS_SLASH:g,STAR:y,START_ANCHOR:S}=n.globChars(u);const m=r.dot?_:d;const v=r.dot?g:d;const E=r.capture?"":"?:";const A={negated:false,prefix:""};let b=r.bash===true?".*?":y;if(r.capture){b=`(${b})`}const globstar=t=>{if(t.noglobstar===true)return b;return`(${E}(?:(?!${S}${t.dot?h:l}).)*?)`};const create=t=>{switch(t){case"*":return`${m}${p}${b}`;case".*":return`${l}${p}${b}`;case"*.*":return`${m}${b}${l}${p}${b}`;case"*/*":return`${m}${b}${f}${p}${v}${b}`;case"**":return m+globstar(r);case"**/*":return`(?:${m}${globstar(r)}${f})?${v}${p}${b}`;case"**/*.*":return`(?:${m}${globstar(r)}${f})?${v}${b}${l}${p}${b}`;case"**/.*":return`(?:${m}${globstar(r)}${f})?${l}${p}${b}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=create(e[1]);if(!r)return;return r+l+e[2]}}};const R=s.removePrefix(t,A);let P=create(R);if(P&&r.strictSlashes!==true){P+=`${f}?`}return P};t.exports=parse},7631:(t,e,r)=>{"use strict";const n=r(1017);const s=r(8640);const i=r(6986);const o=r(8658);const a=r(7820);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,r=false)=>{if(Array.isArray(t)){const n=t.map((t=>picomatch(t,e,r)));const arrayMatcher=t=>{for(const e of n){const r=e(t);if(r)return r}return false};return arrayMatcher}const n=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!n){throw new TypeError("Expected pattern to be a non-empty string")}const s=e||{};const i=o.isWindows(e);const a=n?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const u=a.state;delete a.state;let isIgnored=()=>false;if(s.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(s.ignore,t,r)}const matcher=(r,n=false)=>{const{isMatch:o,match:c,output:l}=picomatch.test(r,a,e,{glob:t,posix:i});const f={glob:t,state:u,regex:a,posix:i,input:r,output:l,match:c,isMatch:o};if(typeof s.onResult==="function"){s.onResult(f)}if(o===false){f.isMatch=false;return n?f:false}if(isIgnored(r)){if(typeof s.onIgnore==="function"){s.onIgnore(f)}f.isMatch=false;return n?f:false}if(typeof s.onMatch==="function"){s.onMatch(f)}return n?f:true};if(r){matcher.state=u}return matcher};picomatch.test=(t,e,r,{glob:n,posix:s}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const i=r||{};const a=i.format||(s?o.toPosixSlashes:null);let u=t===n;let c=u&&a?a(t):t;if(u===false){c=a?a(t):t;u=c===n}if(u===false||i.capture===true){if(i.matchBase===true||i.basename===true){u=picomatch.matchBase(t,e,r,s)}else{u=e.exec(c)}}return{isMatch:Boolean(u),match:u,output:c}};picomatch.matchBase=(t,e,r,s=o.isWindows(r))=>{const i=e instanceof RegExp?e:picomatch.makeRe(e,r);return i.test(n.basename(t))};picomatch.isMatch=(t,e,r)=>picomatch(e,r)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return i(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>s(t,e);picomatch.compileRe=(t,e,r=false,n=false)=>{if(r===true){return t.output}const s=e||{};const i=s.contains?"":"^";const o=s.contains?"":"$";let a=`${i}(?:${t.output})${o}`;if(t&&t.negated===true){a=`^(?!${a}).*$`}const u=picomatch.toRegex(a,e);if(n===true){u.state=t}return u};picomatch.makeRe=(t,e={},r=false,n=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let s={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){s.output=i.fastpaths(t,e)}if(!s.output){s=i(t,e)}return picomatch.compileRe(s,e,r,n)};picomatch.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=a;t.exports=picomatch},8640:(t,e,r)=>{"use strict";const n=r(8658);const{CHAR_ASTERISK:s,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:u,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:p,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:d,CHAR_QUESTION_MARK:_,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:S}=r(7820);const isPathSeparator=t=>t===l||t===o;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const r=e||{};const m=t.length-1;const v=r.parts===true||r.scanToEnd===true;const E=[];const A=[];const b=[];let R=t;let P=-1;let x=0;let k=0;let T=false;let C=false;let w=false;let O=false;let L=false;let H=false;let D=false;let F=false;let $=false;let M=false;let N=0;let I;let B;let j={value:"",depth:0,isGlob:false};const eos=()=>P>=m;const peek=()=>R.charCodeAt(P+1);const advance=()=>{I=B;return R.charCodeAt(++P)};while(P0){W=R.slice(0,x);R=R.slice(x);k-=x}if(G&&w===true&&k>0){G=R.slice(0,k);U=R.slice(k)}else if(w===true){G="";U=R}else{G=R}if(G&&G!==""&&G!=="/"&&G!==R){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(U)U=n.removeBackslashes(U);if(G&&D===true){G=n.removeBackslashes(G)}}const K={prefix:W,input:t,start:x,base:G,glob:U,isBrace:T,isBracket:C,isGlob:w,isExtglob:O,isGlobstar:L,negated:F,negatedExtglob:$};if(r.tokens===true){K.maxDepth=0;if(!isPathSeparator(B)){A.push(j)}K.tokens=A}if(r.parts===true||r.tokens===true){let e;for(let n=0;n{"use strict";const n=r(1017);const s=process.platform==="win32";const{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:u}=r(7820);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>a.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(u,"\\$1");e.toPosixSlashes=t=>t.replace(i,"/");e.removeBackslashes=t=>t.replace(o,(t=>t==="\\"?"":t));e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return s===true||n.sep==="\\"};e.escapeLast=(t,r,n)=>{const s=t.lastIndexOf(r,n);if(s===-1)return t;if(t[s-1]==="\\")return e.escapeLast(t,r,s-1);return`${t.slice(0,s)}\\${t.slice(s)}`};e.removePrefix=(t,e={})=>{let r=t;if(r.startsWith("./")){r=r.slice(2);e.prefix="./"}return r};e.wrapOutput=(t,e={},r={})=>{const n=r.contains?"":"^";const s=r.contains?"":"$";let i=`${n}(?:${t})${s}`;if(e.negated===true){i=`(?:^(?!${i}).*$)`}return i}},8453:t=>{ -/*! queue-microtask. MIT License. Feross Aboukhadijeh */ -let e;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(e||(e=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},1816:t=>{"use strict";function reusify(t){var e=new t;var r=e;function get(){var n=e;if(n.next){e=n.next}else{e=new t;r=e}n.next=null;return n}function release(t){r.next=t;r=t}return{get:get,release:release}}t.exports=reusify},5341:(t,e,r)=>{ -/*! run-parallel. MIT License. Feross Aboukhadijeh */ -t.exports=runParallel;const n=r(8453);function runParallel(t,e){let r,s,i;let o=true;if(Array.isArray(t)){r=[];s=t.length}else{i=Object.keys(t);r={};s=i.length}function done(t){function end(){if(e)e(t,r);e=null}if(o)n(end);else end()}function each(t,e,n){r[t]=n;if(--s===0||e){done(e)}}if(!s){done(null)}else if(i){i.forEach((function(e){t[e]((function(t,r){each(e,t,r)}))}))}else{t.forEach((function(t,e){t((function(t,r){each(e,t,r)}))}))}o=false}},211:(t,e,r)=>{"use strict"; -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */const n=r(8387);const toRegexRange=(t,e,r)=>{if(n(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(n(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...r};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let i=String(s.relaxZeros);let o=String(s.shorthand);let a=String(s.capture);let u=String(s.wrap);let c=t+":"+e+"="+i+o+a+u;if(toRegexRange.cache.hasOwnProperty(c)){return toRegexRange.cache[c].result}let l=Math.min(t,e);let f=Math.max(t,e);if(Math.abs(l-f)===1){let r=t+"|"+e;if(s.capture){return`(${r})`}if(s.wrap===false){return r}return`(?:${r})`}let p=hasPadding(t)||hasPadding(e);let h={min:t,max:e,a:l,b:f};let d=[];let _=[];if(p){h.isPadded=p;h.maxLen=String(h.max).length}if(l<0){let t=f<0?Math.abs(f):1;_=splitToPatterns(t,Math.abs(l),h,s);l=h.a=0}if(f>=0){d=splitToPatterns(l,f,h,s)}h.negatives=_;h.positives=d;h.result=collatePatterns(_,d,s);if(s.capture===true){h.result=`(${h.result})`}else if(s.wrap!==false&&d.length+_.length>1){h.result=`(?:${h.result})`}toRegexRange.cache[c]=h;return h.result};function collatePatterns(t,e,r){let n=filterPatterns(t,e,"-",false,r)||[];let s=filterPatterns(e,t,"",false,r)||[];let i=filterPatterns(t,e,"-?",true,r)||[];let o=n.concat(i).concat(s);return o.join("|")}function splitToRanges(t,e){let r=1;let n=1;let s=countNines(t,r);let i=new Set([e]);while(t<=s&&s<=e){i.add(s);r+=1;s=countNines(t,r)}s=countZeros(e+1,n)-1;while(t1){a.count.pop()}a.count.push(u.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){c=padZeros(e,r,n)}u.string=c+u.pattern+toQuantifier(u.count);i.push(u);o=e+1;a=u}return i}function filterPatterns(t,e,r,n,s){let i=[];for(let s of t){let{string:t}=s;if(!n&&!contains(e,"string",t)){i.push(r+t)}if(n&&contains(e,"string",t)){i.push(r+t)}}return i}function zip(t,e){let r=[];for(let n=0;ne?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let n=Math.abs(e.maxLen-String(t).length);let s=r.relaxZeros!==false;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:{return s?`0{0,${n}}`:`0{${n}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},2781:t=>{"use strict";t.exports=require("stream")},3837:t=>{"use strict";t.exports=require("util")}};var e={};function __nccwpck_require__(r){var n=e[r];if(n!==undefined){return n.exports}var s=e[r]={exports:{}};var i=true;try{t[r](s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete e[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(3924);module.exports=r})(); \ No newline at end of file diff --git a/packages/core/compiled/fast-glob/license b/packages/core/compiled/fast-glob/license deleted file mode 100644 index 65a999460..000000000 --- a/packages/core/compiled/fast-glob/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Denis Malinochkin - -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/packages/core/compiled/fast-glob/out/index.d.ts b/packages/core/compiled/fast-glob/out/index.d.ts deleted file mode 100644 index 553e5144c..000000000 --- a/packages/core/compiled/fast-glob/out/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// -import * as taskManager from './managers/tasks'; -import { Options as OptionsInternal } from './settings'; -import { Entry as EntryInternal, FileSystemAdapter as FileSystemAdapterInternal, Pattern as PatternInternal } from './types'; -declare type EntryObjectModePredicate = { - [TKey in keyof Pick]-?: true; -}; -declare type EntryStatsPredicate = { - [TKey in keyof Pick]-?: true; -}; -declare type EntryObjectPredicate = EntryObjectModePredicate | EntryStatsPredicate; -declare function FastGlob(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): Promise; -declare function FastGlob(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Promise; -declare namespace FastGlob { - type Options = OptionsInternal; - type Entry = EntryInternal; - type Task = taskManager.Task; - type Pattern = PatternInternal; - type FileSystemAdapter = FileSystemAdapterInternal; - function sync(source: PatternInternal | PatternInternal[], options: OptionsInternal & EntryObjectPredicate): EntryInternal[]; - function sync(source: PatternInternal | PatternInternal[], options?: OptionsInternal): string[]; - function stream(source: PatternInternal | PatternInternal[], options?: OptionsInternal): NodeJS.ReadableStream; - function generateTasks(source: PatternInternal | PatternInternal[], options?: OptionsInternal): Task[]; - function isDynamicPattern(source: PatternInternal, options?: OptionsInternal): boolean; - function escapePath(source: PatternInternal): PatternInternal; -} -export = FastGlob; diff --git a/packages/core/compiled/fast-glob/out/managers/tasks.d.ts b/packages/core/compiled/fast-glob/out/managers/tasks.d.ts deleted file mode 100644 index a1c10954a..000000000 --- a/packages/core/compiled/fast-glob/out/managers/tasks.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import Settings from '../settings'; -import { Pattern, PatternsGroup } from '../types'; -export declare type Task = { - base: string; - dynamic: boolean; - patterns: Pattern[]; - positive: Pattern[]; - negative: Pattern[]; -}; -export declare function generate(patterns: Pattern[], settings: Settings): Task[]; -/** - * Returns tasks grouped by basic pattern directories. - * - * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately. - * This is necessary because directory traversal starts at the base directory and goes deeper. - */ -export declare function convertPatternsToTasks(positive: Pattern[], negative: Pattern[], dynamic: boolean): Task[]; -export declare function getPositivePatterns(patterns: Pattern[]): Pattern[]; -export declare function getNegativePatternsAsPositive(patterns: Pattern[], ignore: Pattern[]): Pattern[]; -export declare function groupPatternsByBaseDirectory(patterns: Pattern[]): PatternsGroup; -export declare function convertPatternGroupsToTasks(positive: PatternsGroup, negative: Pattern[], dynamic: boolean): Task[]; -export declare function convertPatternGroupToTask(base: string, positive: Pattern[], negative: Pattern[], dynamic: boolean): Task; diff --git a/packages/core/compiled/fast-glob/out/settings.d.ts b/packages/core/compiled/fast-glob/out/settings.d.ts deleted file mode 100644 index 1984854fa..000000000 --- a/packages/core/compiled/fast-glob/out/settings.d.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { FileSystemAdapter, Pattern } from './types'; -export declare const DEFAULT_FILE_SYSTEM_ADAPTER: FileSystemAdapter; -export declare type Options = { - /** - * Return the absolute path for entries. - * - * @default false - */ - absolute?: boolean; - /** - * If set to `true`, then patterns without slashes will be matched against - * the basename of the path if it contains slashes. - * - * @default false - */ - baseNameMatch?: boolean; - /** - * Enables Bash-like brace expansion. - * - * @default true - */ - braceExpansion?: boolean; - /** - * Enables a case-sensitive mode for matching files. - * - * @default true - */ - caseSensitiveMatch?: boolean; - /** - * Specifies the maximum number of concurrent requests from a reader to read - * directories. - * - * @default os.cpus().length - */ - concurrency?: number; - /** - * The current working directory in which to search. - * - * @default process.cwd() - */ - cwd?: string; - /** - * Specifies the maximum depth of a read directory relative to the start - * directory. - * - * @default Infinity - */ - deep?: number; - /** - * Allow patterns to match entries that begin with a period (`.`). - * - * @default false - */ - dot?: boolean; - /** - * Enables Bash-like `extglob` functionality. - * - * @default true - */ - extglob?: boolean; - /** - * Indicates whether to traverse descendants of symbolic link directories. - * - * @default true - */ - followSymbolicLinks?: boolean; - /** - * Custom implementation of methods for working with the file system. - * - * @default fs.* - */ - fs?: Partial; - /** - * Enables recursively repeats a pattern containing `**`. - * If `false`, `**` behaves exactly like `*`. - * - * @default true - */ - globstar?: boolean; - /** - * An array of glob patterns to exclude matches. - * This is an alternative way to use negative patterns. - * - * @default [] - */ - ignore?: Pattern[]; - /** - * Mark the directory path with the final slash. - * - * @default false - */ - markDirectories?: boolean; - /** - * Returns objects (instead of strings) describing entries. - * - * @default false - */ - objectMode?: boolean; - /** - * Return only directories. - * - * @default false - */ - onlyDirectories?: boolean; - /** - * Return only files. - * - * @default true - */ - onlyFiles?: boolean; - /** - * Enables an object mode (`objectMode`) with an additional `stats` field. - * - * @default false - */ - stats?: boolean; - /** - * By default this package suppress only `ENOENT` errors. - * Set to `true` to suppress any error. - * - * @default false - */ - suppressErrors?: boolean; - /** - * Throw an error when symbolic link is broken if `true` or safely - * return `lstat` call if `false`. - * - * @default false - */ - throwErrorOnBrokenSymbolicLink?: boolean; - /** - * Ensures that the returned entries are unique. - * - * @default true - */ - unique?: boolean; -}; -export default class Settings { - private readonly _options; - readonly absolute: boolean; - readonly baseNameMatch: boolean; - readonly braceExpansion: boolean; - readonly caseSensitiveMatch: boolean; - readonly concurrency: number; - readonly cwd: string; - readonly deep: number; - readonly dot: boolean; - readonly extglob: boolean; - readonly followSymbolicLinks: boolean; - readonly fs: FileSystemAdapter; - readonly globstar: boolean; - readonly ignore: Pattern[]; - readonly markDirectories: boolean; - readonly objectMode: boolean; - readonly onlyDirectories: boolean; - readonly onlyFiles: boolean; - readonly stats: boolean; - readonly suppressErrors: boolean; - readonly throwErrorOnBrokenSymbolicLink: boolean; - readonly unique: boolean; - constructor(_options?: Options); - private _getValue; - private _getFileSystemMethods; -} diff --git a/packages/core/compiled/fast-glob/out/types/index.d.ts b/packages/core/compiled/fast-glob/out/types/index.d.ts deleted file mode 100644 index 6656d27a0..000000000 --- a/packages/core/compiled/fast-glob/out/types/index.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// -import * as fsWalk from '../../@nodelib/fs.walk'; -export declare type ErrnoException = NodeJS.ErrnoException; -export declare type Entry = fsWalk.Entry; -export declare type EntryItem = string | Entry; -export declare type Pattern = string; -export declare type PatternRe = RegExp; -export declare type PatternsGroup = Record; -export declare type ReaderOptions = fsWalk.Options & { - transform(entry: Entry): EntryItem; - deepFilter: DeepFilterFunction; - entryFilter: EntryFilterFunction; - errorFilter: ErrorFilterFunction; - fs: FileSystemAdapter; - stats: boolean; -}; -export declare type ErrorFilterFunction = fsWalk.ErrorFilterFunction; -export declare type EntryFilterFunction = fsWalk.EntryFilterFunction; -export declare type DeepFilterFunction = fsWalk.DeepFilterFunction; -export declare type EntryTransformerFunction = (entry: Entry) => EntryItem; -export declare type MicromatchOptions = { - dot?: boolean; - matchBase?: boolean; - nobrace?: boolean; - nocase?: boolean; - noext?: boolean; - noglobstar?: boolean; - posix?: boolean; - strictSlashes?: boolean; -}; -export declare type FileSystemAdapter = fsWalk.FileSystemAdapter; diff --git a/packages/core/compiled/fast-glob/package.json b/packages/core/compiled/fast-glob/package.json deleted file mode 100644 index 0a450fd31..000000000 --- a/packages/core/compiled/fast-glob/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"fast-glob","author":{"name":"Denis Malinochkin","url":"https://mrmlnc.com"},"version":"3.2.11","license":"MIT","typings":"out/index.d.ts"} diff --git a/packages/core/compiled/globby/index.d.ts b/packages/core/compiled/globby/index.d.ts deleted file mode 100644 index 8bdda3d20..000000000 --- a/packages/core/compiled/globby/index.d.ts +++ /dev/null @@ -1,186 +0,0 @@ -import {Options as FastGlobOptions, Entry as FastGlobEntry} from '../fast-glob'; - -declare namespace globby { - type ExpandDirectoriesOption = - | boolean - | readonly string[] - | {files?: readonly string[]; extensions?: readonly string[]}; - - type Entry = FastGlobEntry; - - interface GlobbyOptions extends FastGlobOptions { - /** - If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like in the example below. - - Note that if you set this option to `false`, you won't get back matched directories unless you set `onlyFiles: false`. - - @default true - - @example - ``` - import globby = require('./globby'); - - (async () => { - const paths = await globby('images', { - expandDirectories: { - files: ['cat', 'unicorn', '*.jpg'], - extensions: ['png'] - } - }); - - console.log(paths); - //=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg'] - })(); - ``` - */ - readonly expandDirectories?: ExpandDirectoriesOption; - - /** - Respect ignore patterns in `.gitignore` files that apply to the globbed files. - - @default false - */ - readonly gitignore?: boolean; - } - - interface GlobTask { - readonly pattern: string; - readonly options: GlobbyOptions; - } - - interface GitignoreOptions { - readonly cwd?: string; - readonly ignore?: readonly string[]; - } - - type FilterFunction = (path: string) => boolean; -} - -interface Gitignore { - /** - @returns A filter function indicating whether a given path is ignored via a `.gitignore` file. - */ - sync: (options?: globby.GitignoreOptions) => globby.FilterFunction; - - /** - `.gitignore` files matched by the ignore config are not used for the resulting filter function. - - @returns A filter function indicating whether a given path is ignored via a `.gitignore` file. - - @example - ``` - import {gitignore} from './globby'; - - (async () => { - const isIgnored = await gitignore(); - console.log(isIgnored('some/file')); - })(); - ``` - */ - (options?: globby.GitignoreOptions): Promise; -} - -declare const globby: { - /** - Find files and directories using glob patterns. - - Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`. - - @param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). - @param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package. - @returns The matching paths. - */ - sync: (( - patterns: string | readonly string[], - options: globby.GlobbyOptions & {objectMode: true} - ) => globby.Entry[]) & (( - patterns: string | readonly string[], - options?: globby.GlobbyOptions - ) => string[]); - - /** - Find files and directories using glob patterns. - - Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`. - - @param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). - @param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package. - @returns The stream of matching paths. - - @example - ``` - import globby = require('./globby'); - - (async () => { - for await (const path of globby.stream('*.tmp')) { - console.log(path); - } - })(); - ``` - */ - stream: ( - patterns: string | readonly string[], - options?: globby.GlobbyOptions - ) => NodeJS.ReadableStream; - - /** - Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration. - - @param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). - @param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package. - @returns An object in the format `{pattern: string, options: object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages. - */ - generateGlobTasks: ( - patterns: string | readonly string[], - options?: globby.GlobbyOptions - ) => globby.GlobTask[]; - - /** - Note that the options affect the results. - - This function is backed by [`fast-glob`](https://github.com/mrmlnc/fast-glob#isdynamicpatternpattern-options). - - @param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). - @param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3). - @returns Whether there are any special glob characters in the `patterns`. - */ - hasMagic: ( - patterns: string | readonly string[], - options?: FastGlobOptions - ) => boolean; - - readonly gitignore: Gitignore; - - ( - patterns: string | readonly string[], - options: globby.GlobbyOptions & {objectMode: true} - ): Promise; - - /** - Find files and directories using glob patterns. - - Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`. - - @param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns). - @param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package. - @returns The matching paths. - - @example - ``` - import globby = require('./globby'); - - (async () => { - const paths = await globby(['*', '!cake']); - - console.log(paths); - //=> ['unicorn', 'rainbow'] - })(); - ``` - */ - ( - patterns: string | readonly string[], - options?: globby.GlobbyOptions - ): Promise; -}; - -export = globby; diff --git a/packages/core/compiled/globby/index.js b/packages/core/compiled/globby/index.js deleted file mode 100644 index 5767c957b..000000000 --- a/packages/core/compiled/globby/index.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{var t={337:t=>{"use strict";t.exports=(...t)=>[...new Set([].concat(...t))]},352:(t,e,r)=>{"use strict";const n=r(17);const s=r(223);const getExtensions=t=>t.length>1?`{${t.join(",")}}`:t[0];const getPath=(t,e)=>{const r=t[0]==="!"?t.slice(1):t;return n.isAbsolute(r)?r:n.join(e,r)};const addExtensions=(t,e)=>{if(n.extname(t)){return`**/${t}`}return`**/${t}.${getExtensions(e)}`};const getGlob=(t,e)=>{if(e.files&&!Array.isArray(e.files)){throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof e.files}\``)}if(e.extensions&&!Array.isArray(e.extensions)){throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof e.extensions}\``)}if(e.files&&e.extensions){return e.files.map((r=>n.posix.join(t,addExtensions(r,e.extensions))))}if(e.files){return e.files.map((e=>n.posix.join(t,`**/${e}`)))}if(e.extensions){return[n.posix.join(t,`**/*.${getExtensions(e.extensions)}`)]}return[n.posix.join(t,"**")]};t.exports=async(t,e)=>{e={cwd:process.cwd(),...e};if(typeof e.cwd!=="string"){throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``)}const r=await Promise.all([].concat(t).map((async t=>{const r=await s.isDirectory(getPath(t,e.cwd));return r?getGlob(t,e):t})));return[].concat.apply([],r)};t.exports.sync=(t,e)=>{e={cwd:process.cwd(),...e};if(typeof e.cwd!=="string"){throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``)}const r=[].concat(t).map((t=>s.isDirectorySync(getPath(t,e.cwd))?getGlob(t,e):t));return[].concat.apply([],r)}},153:(t,e,r)=>{"use strict";const{promisify:n}=r(837);const s=r(147);const o=r(17);const i=r(592);const c=r(302);const a=r(398);const p=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"];const u=n(s.readFile);const mapGitIgnorePatternTo=t=>e=>{if(e.startsWith("!")){return"!"+o.posix.join(t,e.slice(1))}return o.posix.join(t,e)};const parseGitIgnore=(t,e)=>{const r=a(o.relative(e.cwd,o.dirname(e.fileName)));return t.split(/\r?\n/).filter(Boolean).filter((t=>!t.startsWith("#"))).map(mapGitIgnorePatternTo(r))};const reduceIgnore=t=>{const e=c();for(const r of t){e.add(parseGitIgnore(r.content,{cwd:r.cwd,fileName:r.filePath}))}return e};const ensureAbsolutePathForCwd=(t,e)=>{t=a(t);if(o.isAbsolute(e)){if(a(e).startsWith(t)){return e}throw new Error(`Path ${e} is not in cwd ${t}`)}return o.join(t,e)};const getIsIgnoredPredecate=(t,e)=>r=>t.ignores(a(o.relative(e,ensureAbsolutePathForCwd(e,r.path||r))));const getFile=async(t,e)=>{const r=o.join(e,t);const n=await u(r,"utf8");return{cwd:e,filePath:r,content:n}};const getFileSync=(t,e)=>{const r=o.join(e,t);const n=s.readFileSync(r,"utf8");return{cwd:e,filePath:r,content:n}};const normalizeOptions=({ignore:t=[],cwd:e=a(process.cwd())}={})=>({ignore:t,cwd:e});t.exports=async t=>{t=normalizeOptions(t);const e=await i("**/.gitignore",{ignore:p.concat(t.ignore),cwd:t.cwd});const r=await Promise.all(e.map((e=>getFile(e,t.cwd))));const n=reduceIgnore(r);return getIsIgnoredPredecate(n,t.cwd)};t.exports.sync=t=>{t=normalizeOptions(t);const e=i.sync("**/.gitignore",{ignore:p.concat(t.ignore),cwd:t.cwd});const r=e.map((e=>getFileSync(e,t.cwd)));const n=reduceIgnore(r);return getIsIgnoredPredecate(n,t.cwd)}},718:(t,e,r)=>{"use strict";const n=r(147);const s=r(337);const o=r(382);const i=r(592);const c=r(352);const a=r(153);const{FilterStream:p,UniqueStream:u}=r(546);const DEFAULT_FILTER=()=>false;const isNegative=t=>t[0]==="!";const assertPatternsInput=t=>{if(!t.every((t=>typeof t==="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const checkCwdOption=(t={})=>{if(!t.cwd){return}let e;try{e=n.statSync(t.cwd)}catch{return}if(!e.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const getPathString=t=>t.stats instanceof n.Stats?t.path:t;const generateGlobTasks=(t,e)=>{t=s([].concat(t));assertPatternsInput(t);checkCwdOption(e);const r=[];e={ignore:[],expandDirectories:true,...e};for(const[n,s]of t.entries()){if(isNegative(s)){continue}const o=t.slice(n).filter((t=>isNegative(t))).map((t=>t.slice(1)));const i={...e,ignore:e.ignore.concat(o)};r.push({pattern:s,options:i})}return r};const globDirs=(t,e)=>{let r={};if(t.options.cwd){r.cwd=t.options.cwd}if(Array.isArray(t.options.expandDirectories)){r={...r,files:t.options.expandDirectories}}else if(typeof t.options.expandDirectories==="object"){r={...r,...t.options.expandDirectories}}return e(t.pattern,r)};const getPattern=(t,e)=>t.options.expandDirectories?globDirs(t,e):[t.pattern];const getFilterSync=t=>t&&t.gitignore?a.sync({cwd:t.cwd,ignore:t.ignore}):DEFAULT_FILTER;const globToTask=t=>e=>{const{options:r}=t;if(r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories){r.ignore=c.sync(r.ignore)}return{pattern:e,options:r}};t.exports=async(t,e)=>{const r=generateGlobTasks(t,e);const getFilter=async()=>e&&e.gitignore?a({cwd:e.cwd,ignore:e.ignore}):DEFAULT_FILTER;const getTasks=async()=>{const t=await Promise.all(r.map((async t=>{const e=await getPattern(t,c);return Promise.all(e.map(globToTask(t)))})));return s(...t)};const[n,o]=await Promise.all([getFilter(),getTasks()]);const p=await Promise.all(o.map((t=>i(t.pattern,t.options))));return s(...p).filter((t=>!n(getPathString(t))))};t.exports.sync=(t,e)=>{const r=generateGlobTasks(t,e);const n=[];for(const t of r){const e=getPattern(t,c.sync).map(globToTask(t));n.push(...e)}const o=getFilterSync(e);let a=[];for(const t of n){a=s(a,i.sync(t.pattern,t.options))}return a.filter((t=>!o(t)))};t.exports.stream=(t,e)=>{const r=generateGlobTasks(t,e);const n=[];for(const t of r){const e=getPattern(t,c.sync).map(globToTask(t));n.push(...e)}const s=getFilterSync(e);const a=new p((t=>!s(t)));const l=new u;return o(n.map((t=>i.stream(t.pattern,t.options)))).pipe(a).pipe(l)};t.exports.generateGlobTasks=generateGlobTasks;t.exports.hasMagic=(t,e)=>[].concat(t).some((t=>i.isDynamicPattern(t,e)));t.exports.gitignore=a},546:(t,e,r)=>{"use strict";const{Transform:n}=r(781);class ObjectTransform extends n{constructor(){super({objectMode:true})}}class FilterStream extends ObjectTransform{constructor(t){super();this._filter=t}_transform(t,e,r){if(this._filter(t)){this.push(t)}r()}}class UniqueStream extends ObjectTransform{constructor(){super();this._pushed=new Set}_transform(t,e,r){if(!this._pushed.has(t)){this.push(t);this._pushed.add(t)}r()}}t.exports={FilterStream:FilterStream,UniqueStream:UniqueStream}},302:t=>{function makeArray(t){return Array.isArray(t)?t:[t]}const e="";const r=" ";const n="\\";const s=/^\s+$/;const o=/^\\!/;const i=/^\\#/;const c=/\r?\n/g;const a=/^\.*\/|^\.+$/;const p="/";const u=typeof Symbol!=="undefined"?Symbol.for("node-ignore"):"node-ignore";const define=(t,e,r)=>Object.defineProperty(t,e,{value:r});const l=/([0-z])-([0-z])/g;const RETURN_FALSE=()=>false;const sanitizeRange=t=>t.replace(l,((t,r,n)=>r.charCodeAt(0)<=n.charCodeAt(0)?t:e));const cleanRangeBackSlash=t=>{const{length:e}=t;return t.slice(0,e-e%2)};const f=[[/\\?\s+$/,t=>t.indexOf("\\")===0?r:e],[/\\\s/g,()=>r],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function startingReplacer(){return!/\/(?!$)/.test(this)?"(?:^|\\/)":"^"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6`${e}[^\\/]*`],[/\\\\\\(?=[$.|*+(){^])/g,()=>n],[/\\\\/g,()=>n],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,r,s,o)=>e===n?`\\[${r}${cleanRangeBackSlash(s)}${o}`:o==="]"?s.length%2===0?`[${sanitizeRange(r)}${s}]`:"[]":"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>{const r=e?`${e}[^/]+`:"[^/]*";return`${r}(?=$|\\/$)`}]];const d=Object.create(null);const makeRegex=(t,e)=>{let r=d[t];if(!r){r=f.reduce(((e,r)=>e.replace(r[0],r[1].bind(t))),t);d[t]=r}return e?new RegExp(r,"i"):new RegExp(r)};const isString=t=>typeof t==="string";const checkPattern=t=>t&&isString(t)&&!s.test(t)&&t.indexOf("#")!==0;const splitPattern=t=>t.split(c);class IgnoreRule{constructor(t,e,r,n){this.origin=t;this.pattern=e;this.negative=r;this.regex=n}}const createRule=(t,e)=>{const r=t;let n=false;if(t.indexOf("!")===0){n=true;t=t.substr(1)}t=t.replace(o,"!").replace(i,"#");const s=makeRegex(t,e);return new IgnoreRule(r,t,n,s)};const throwError=(t,e)=>{throw new e(t)};const checkPath=(t,e,r)=>{if(!isString(t)){return r(`path must be a string, but got \`${e}\``,TypeError)}if(!t){return r(`path must not be empty`,TypeError)}if(checkPath.isNotRelative(t)){const t="`path.relative()`d";return r(`path should be a ${t} string, but got "${e}"`,RangeError)}return true};const isNotRelative=t=>a.test(t);checkPath.isNotRelative=isNotRelative;checkPath.convert=t=>t;class Ignore{constructor({ignorecase:t=true,ignoreCase:e=t,allowRelativePaths:r=false}={}){define(this,u,true);this._rules=[];this._ignoreCase=e;this._allowRelativePaths=r;this._initCache()}_initCache(){this._ignoreCache=Object.create(null);this._testCache=Object.create(null)}_addPattern(t){if(t&&t[u]){this._rules=this._rules.concat(t._rules);this._added=true;return}if(checkPattern(t)){const e=createRule(t,this._ignoreCase);this._added=true;this._rules.push(e)}}add(t){this._added=false;makeArray(isString(t)?splitPattern(t):t).forEach(this._addPattern,this);if(this._added){this._initCache()}return this}addPattern(t){return this.add(t)}_testOne(t,e){let r=false;let n=false;this._rules.forEach((s=>{const{negative:o}=s;if(n===o&&r!==n||o&&!r&&!n&&!e){return}const i=s.regex.test(t);if(i){r=!o;n=o}}));return{ignored:r,unignored:n}}_test(t,e,r,n){const s=t&&checkPath.convert(t);checkPath(s,t,this._allowRelativePaths?RETURN_FALSE:throwError);return this._t(s,e,r,n)}_t(t,e,r,n){if(t in e){return e[t]}if(!n){n=t.split(p)}n.pop();if(!n.length){return e[t]=this._testOne(t,r)}const s=this._t(n.join(p)+p,e,r,n);return e[t]=s.ignored?s:this._testOne(t,r)}ignores(t){return this._test(t,this._ignoreCache,false).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return makeArray(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,true)}}const factory=t=>new Ignore(t);const isPathValid=t=>checkPath(t&&checkPath.convert(t),t,RETURN_FALSE);factory.isPathValid=isPathValid;factory.default=factory;t.exports=factory;if(typeof process!=="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){const makePosix=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");checkPath.convert=makePosix;const t=/^[a-z]:\//i;checkPath.isNotRelative=e=>t.test(e)||isNotRelative(e)}},382:(t,e,r)=>{"use strict";const n=r(781);const s=n.PassThrough;const o=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=o.call(arguments);let r=false;let n=e[e.length-1];if(n&&!Array.isArray(n)&&n.pipe==null){e.pop()}else{n={}}const i=n.end!==false;const c=n.pipeError===true;if(n.objectMode==null){n.objectMode=true}if(n.highWaterMark==null){n.highWaterMark=64*1024}const a=s(n);function addStream(){for(let e=0,r=arguments.length;e0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(c){t.removeListener("error",onerror)}next()}function onerror(t){a.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(c){t.on("error",onerror)}t.pipe(a,{end:false});t.resume()}for(let t=0;t{"use strict";const{promisify:n}=r(837);const s=r(147);async function isType(t,e,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{const o=await n(s[t])(r);return o[e]()}catch(t){if(t.code==="ENOENT"){return false}throw t}}function isTypeSync(t,e,r){if(typeof r!=="string"){throw new TypeError(`Expected a string, got ${typeof r}`)}try{return s[t](r)[e]()}catch(t){if(t.code==="ENOENT"){return false}throw t}}e.isFile=isType.bind(null,"stat","isFile");e.isDirectory=isType.bind(null,"stat","isDirectory");e.isSymlink=isType.bind(null,"lstat","isSymbolicLink");e.isFileSync=isTypeSync.bind(null,"statSync","isFile");e.isDirectorySync=isTypeSync.bind(null,"statSync","isDirectory");e.isSymlinkSync=isTypeSync.bind(null,"lstatSync","isSymbolicLink")},398:t=>{"use strict";t.exports=t=>{const e=/^\\\\\?\\/.test(t);const r=/[^\u0000-\u0080]+/.test(t);if(e||r){return t}return t.replace(/\\/g,"/")}},592:t=>{"use strict";t.exports=require("../fast-glob")},147:t=>{"use strict";t.exports=require("fs")},17:t=>{"use strict";t.exports=require("path")},781:t=>{"use strict";t.exports=require("stream")},837:t=>{"use strict";t.exports=require("util")}};var e={};function __nccwpck_require__(r){var n=e[r];if(n!==undefined){return n.exports}var s=e[r]={exports:{}};var o=true;try{t[r](s,s.exports,__nccwpck_require__);o=false}finally{if(o)delete e[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(718);module.exports=r})(); \ No newline at end of file diff --git a/packages/core/compiled/globby/license b/packages/core/compiled/globby/license deleted file mode 100644 index e7af2f771..000000000 --- a/packages/core/compiled/globby/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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/packages/core/compiled/globby/package.json b/packages/core/compiled/globby/package.json deleted file mode 100644 index 07ab860d5..000000000 --- a/packages/core/compiled/globby/package.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"globby","author":{"email":"sindresorhus@gmail.com","name":"Sindre Sorhus","url":"https://sindresorhus.com"},"version":"11.1.0","funding":"https://github.com/sponsors/sindresorhus","license":"MIT"} diff --git a/packages/core/modern.config.ts b/packages/core/modern.config.ts index 43774328a..e733935ab 100644 --- a/packages/core/modern.config.ts +++ b/packages/core/modern.config.ts @@ -23,7 +23,6 @@ export default defineConfig({ 'jsdom', 'tailwindcss', '@rspress/plugin-container-syntax', - '../compiled/globby/index.js', ], banner: { js: 'import { createRequire } from "module";\nconst { url } = import.meta;\nconst require = createRequire(url);', diff --git a/packages/core/package.json b/packages/core/package.json index 91a99de87..5cacacb13 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -88,6 +88,7 @@ "remark": "^14.0.3", "remark-gfm": "3.0.1", "rspack-plugin-virtual-module": "0.1.13", + "tinyglobby": "^0.2.10", "unified": "^10.1.2", "unist-util-visit": "^4.1.2", "unist-util-visit-children": "^3.0.0" diff --git a/packages/core/src/node/route/RouteService.ts b/packages/core/src/node/route/RouteService.ts index b030792b0..c45e2864e 100644 --- a/packages/core/src/node/route/RouteService.ts +++ b/packages/core/src/node/route/RouteService.ts @@ -9,6 +9,7 @@ import { } from '@rspress/shared'; import fs from '@rspress/shared/fs-extra'; import type { ComponentType } from 'react'; +import { glob } from 'tinyglobby'; import type { PluginDriver } from '../PluginDriver'; import { PUBLIC_DIR } from '../constants'; import { getPageKey, normalizePath } from '../utils'; @@ -138,16 +139,9 @@ export class RouteService { } async init() { - const globby = ( - await import( - // @ts-expect-error - // eslint-disable-next-line node/file-extension-in-import - '../compiled/globby/index.js' - ) - ).default as typeof import('../../../compiled/globby'); // 1. internal pages const files = ( - await globby([`**/*.{${this.#extensions.join(',')}}`, ...this.#include], { + await glob([`**/*.{${this.#extensions.join(',')}}`, ...this.#include], { cwd: this.#scanDir, absolute: true, ignore: [ @@ -159,6 +153,7 @@ export class RouteService { ], }) ).sort(); + files.forEach(filePath => { const fileRelativePath = normalizePath( path.relative(this.#scanDir, filePath), diff --git a/packages/core/src/node/utils/detectCustomIcon.ts b/packages/core/src/node/utils/detectCustomIcon.ts index 80bef4855..9a4305566 100644 --- a/packages/core/src/node/utils/detectCustomIcon.ts +++ b/packages/core/src/node/utils/detectCustomIcon.ts @@ -1,5 +1,6 @@ import { existsSync } from 'node:fs'; import path from 'node:path'; +import { glob } from 'tinyglobby'; export const detectCustomIcon = async (customThemeDir: string) => { const assetsDir = path.join(customThemeDir, 'assets'); @@ -9,14 +10,7 @@ export const detectCustomIcon = async (customThemeDir: string) => { return alias; } - const globby = ( - await import( - // @ts-expect-error - // eslint-disable-next-line node/file-extension-in-import - '../compiled/globby/index.js' - ) - ).default as typeof import('../../../compiled/globby'); - const files = await globby('*.svg', { + const files = await glob('*.svg', { cwd: assetsDir, }); files.forEach(file => { diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index faa37baaa..2a214d3e7 100644 --- a/packages/core/vitest.config.ts +++ b/packages/core/vitest.config.ts @@ -10,10 +10,6 @@ export default defineConfig({ resolve: { alias: { '@': path.join(__dirname, 'src'), - '../compiled/globby/index.js': path.join( - __dirname, - 'compiled/globby/index.js', - ), }, }, }); diff --git a/packages/modern-plugin-rspress/package.json b/packages/modern-plugin-rspress/package.json index 217d8cc0d..3db311459 100644 --- a/packages/modern-plugin-rspress/package.json +++ b/packages/modern-plugin-rspress/package.json @@ -31,8 +31,8 @@ "@rspress/core": "workspace:*", "@rspress/plugin-api-docgen": "workspace:*", "@rspress/plugin-preview": "workspace:*", - "fast-glob": "^3.3.3", - "lodash": "^4.17.21" + "lodash": "^4.17.21", + "tinyglobby": "^0.2.10" }, "devDependencies": { "@types/lodash": "^4.17.14", diff --git a/packages/modern-plugin-rspress/src/launchDoc.ts b/packages/modern-plugin-rspress/src/launchDoc.ts index 39c06d8cd..e0957e3cc 100644 --- a/packages/modern-plugin-rspress/src/launchDoc.ts +++ b/packages/modern-plugin-rspress/src/launchDoc.ts @@ -3,7 +3,7 @@ import { join, relative, resolve } from 'node:path'; import type { Sidebar, SidebarGroup, UserConfig } from '@rspress/core'; import { pluginApiDocgen } from '@rspress/plugin-api-docgen'; import { pluginPreview } from '@rspress/plugin-preview'; -import fastGlob from 'fast-glob'; +import { glob } from 'tinyglobby'; import type { PluginOptions } from './types'; import { mergeModuleDocConfig } from './utils'; @@ -57,12 +57,12 @@ export async function launchDoc({ const traverse = async (cwd: string): Promise => { // FIXME: win32 const [files, directories] = await Promise.all([ - fastGlob(source, { + glob(source, { cwd, onlyFiles: true, ignore: ['index.*'], }), - fastGlob(['*'], { + glob(['*'], { cwd, onlyDirectories: true, ignore: ['public'], @@ -88,7 +88,7 @@ export async function launchDoc({ const directoryCwd = join(cwd, directory); const hasIndex = ( - await fastGlob(['index.*'], { + await glob(['index.*'], { cwd: directoryCwd, onlyFiles: true, }) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f9e64317..1bee239af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -797,6 +797,9 @@ importers: rspack-plugin-virtual-module: specifier: 0.1.13 version: 0.1.13 + tinyglobby: + specifier: ^0.2.10 + version: 0.2.10 unified: specifier: ^10.1.2 version: 10.1.2 @@ -928,12 +931,12 @@ importers: '@rspress/plugin-preview': specifier: workspace:* version: link:../plugin-preview - fast-glob: - specifier: ^3.3.3 - version: 3.3.3 lodash: specifier: ^4.17.21 version: 4.17.21 + tinyglobby: + specifier: ^0.2.10 + version: 0.2.10 devDependencies: '@types/lodash': specifier: ^4.17.14