vitest 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1 -1
- package/dist/chunks/{base.gZAre3Yy.js → base.wKnmhRYd.js} +1 -1
- package/dist/chunks/{cac.Cfe6a4o8.js → cac.B_eDEFh6.js} +4 -4
- package/dist/chunks/{cli-api.BaY17YBo.js → cli-api.az_rB_xZ.js} +207 -78
- package/dist/chunks/{creator.B8v1wNyQ.js → creator.fUJbheb8.js} +2 -2
- package/dist/chunks/{execute.4vt3NSmG.js → execute.PoofJYS5.js} +2 -1
- package/dist/chunks/{index.Bh7wTRhh.js → index.B57_6XMC.js} +7 -7
- package/dist/chunks/{index.DfqWks-F.js → index.NxxmQyK2.js} +7 -7
- package/dist/chunks/{index.CvtAP0DU.js → index.vId0fl99.js} +1 -1
- package/dist/chunks/{reporters.Y8BYiXBN.d.ts → reporters.6vxQttCV.d.ts} +7 -4
- package/dist/chunks/{resolveConfig.9CnFfuqj.js → resolveConfig.BT-MMQUD.js} +24 -14
- package/dist/chunks/{typechecker.ChNaIV36.js → typechecker.CdcjdhoT.js} +17 -11
- package/dist/chunks/{vite.CQ0dHgkN.d.ts → vite.Cu7NWuBa.d.ts} +1 -1
- package/dist/chunks/{vm.CUw7ChSp.js → vm.DXDoSHPT.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/coverage.d.ts +1 -1
- package/dist/coverage.js +3 -3
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/node.d.ts +9 -6
- package/dist/node.js +11 -12
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +2 -2
- package/dist/workers/forks.js +2 -2
- package/dist/workers/threads.js +2 -2
- package/dist/workers/vmForks.js +2 -2
- package/dist/workers/vmThreads.js +2 -2
- package/dist/workers.js +3 -3
- package/package.json +19 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import p from 'node:path';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import process$1 from 'node:process';
|
|
4
4
|
import { promises } from 'node:fs';
|
|
@@ -237,7 +237,7 @@ async function locatePath(
|
|
|
237
237
|
|
|
238
238
|
return pLocate(paths, async path_ => {
|
|
239
239
|
try {
|
|
240
|
-
const stat = await statFunction(
|
|
240
|
+
const stat = await statFunction(p.resolve(cwd, path_));
|
|
241
241
|
return matchType(type, stat);
|
|
242
242
|
} catch {
|
|
243
243
|
return false;
|
|
@@ -250,9 +250,9 @@ const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath)
|
|
|
250
250
|
const findUpStop = Symbol('findUpStop');
|
|
251
251
|
|
|
252
252
|
async function findUpMultiple(name, options = {}) {
|
|
253
|
-
let directory =
|
|
254
|
-
const {root} =
|
|
255
|
-
const stopAt =
|
|
253
|
+
let directory = p.resolve(toPath(options.cwd) || '');
|
|
254
|
+
const {root} = p.parse(directory);
|
|
255
|
+
const stopAt = p.resolve(directory, options.stopAt || root);
|
|
256
256
|
const limit = options.limit || Number.POSITIVE_INFINITY;
|
|
257
257
|
const paths = [name].flat();
|
|
258
258
|
|
|
@@ -280,14 +280,14 @@ async function findUpMultiple(name, options = {}) {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
if (foundPath) {
|
|
283
|
-
matches.push(
|
|
283
|
+
matches.push(p.resolve(directory, foundPath));
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
if (directory === stopAt || matches.length >= limit) {
|
|
287
287
|
break;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
directory =
|
|
290
|
+
directory = p.dirname(directory);
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
return matches;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import fs, { existsSync } from 'node:fs';
|
|
3
3
|
import fsp from 'node:fs/promises';
|
|
4
|
-
import
|
|
4
|
+
import p, { resolve } from 'node:path';
|
|
5
5
|
import { x } from 'tinyexec';
|
|
6
6
|
|
|
7
7
|
const AGENTS = [
|
|
@@ -27,27 +27,27 @@ async function detect(options = {}) {
|
|
|
27
27
|
const { cwd, onUnknown } = options;
|
|
28
28
|
for (const directory of lookup(cwd)) {
|
|
29
29
|
for (const lock of Object.keys(LOCKS)) {
|
|
30
|
-
if (await fileExists(
|
|
30
|
+
if (await fileExists(p.join(directory, lock))) {
|
|
31
31
|
const name = LOCKS[lock];
|
|
32
|
-
const result2 = await parsePackageJson(
|
|
32
|
+
const result2 = await parsePackageJson(p.join(directory, "package.json"), onUnknown);
|
|
33
33
|
if (result2)
|
|
34
34
|
return result2;
|
|
35
35
|
else
|
|
36
36
|
return { name, agent: name };
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const result = await parsePackageJson(
|
|
39
|
+
const result = await parsePackageJson(p.join(directory, "package.json"), onUnknown);
|
|
40
40
|
if (result)
|
|
41
41
|
return result;
|
|
42
42
|
}
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
45
|
function* lookup(cwd = process.cwd()) {
|
|
46
|
-
let directory =
|
|
47
|
-
const { root } =
|
|
46
|
+
let directory = p.resolve(cwd);
|
|
47
|
+
const { root } = p.parse(directory);
|
|
48
48
|
while (directory && directory !== root) {
|
|
49
49
|
yield directory;
|
|
50
|
-
directory =
|
|
50
|
+
directory = p.dirname(directory);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
async function parsePackageJson(filepath, onUnknown) {
|
|
@@ -8,7 +8,7 @@ import { stripVTControlCharacters } from 'node:util';
|
|
|
8
8
|
import { isPrimitive, inspect, positionToOffset, lineSplitRE, toArray, notNullish } from '@vitest/utils';
|
|
9
9
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
10
10
|
import { parseErrorStacktrace, parseStacktrace } from '@vitest/utils/source-map';
|
|
11
|
-
import { T as TypeCheckError, g as getOutputFile, i as isTTY, h as hasFailedSnapshot } from './typechecker.
|
|
11
|
+
import { T as TypeCheckError, g as getOutputFile, i as isTTY, h as hasFailedSnapshot } from './typechecker.CdcjdhoT.js';
|
|
12
12
|
import { mkdir, writeFile, readdir, stat, readFile } from 'node:fs/promises';
|
|
13
13
|
import { Console } from 'node:console';
|
|
14
14
|
import { Writable } from 'node:stream';
|
|
@@ -2177,7 +2177,7 @@ interface UserConfig extends InlineConfig {
|
|
|
2177
2177
|
*/
|
|
2178
2178
|
mergeReports?: string;
|
|
2179
2179
|
}
|
|
2180
|
-
interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters' | 'browser' | 'coverage' | 'testNamePattern' | 'related' | 'api' | 'reporters' | 'resolveSnapshotPath' | 'benchmark' | 'shard' | 'cache' | 'sequence' | 'typecheck' | 'runner' | 'poolOptions' | 'pool' | 'cliExclude' | 'diff' | 'setupFiles' | 'snapshotEnvironment' | 'bail'> {
|
|
2180
|
+
interface ResolvedConfig extends Omit<Required<UserConfig>, 'project' | 'config' | 'filters' | 'browser' | 'coverage' | 'testNamePattern' | 'related' | 'api' | 'reporters' | 'resolveSnapshotPath' | 'benchmark' | 'shard' | 'cache' | 'sequence' | 'typecheck' | 'runner' | 'poolOptions' | 'pool' | 'cliExclude' | 'diff' | 'setupFiles' | 'snapshotEnvironment' | 'bail'> {
|
|
2181
2181
|
mode: VitestRunMode;
|
|
2182
2182
|
base?: string;
|
|
2183
2183
|
diff?: string | SerializedDiffOptions;
|
|
@@ -2195,8 +2195,11 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
|
|
|
2195
2195
|
poolOptions?: ResolvedPoolOptions;
|
|
2196
2196
|
reporters: (InlineReporter | ReporterWithOptions)[];
|
|
2197
2197
|
defines: Record<string, any>;
|
|
2198
|
-
api
|
|
2198
|
+
api: ApiConfig & {
|
|
2199
|
+
token: string;
|
|
2200
|
+
};
|
|
2199
2201
|
cliExclude?: string[];
|
|
2202
|
+
project: string[];
|
|
2200
2203
|
benchmark?: Required<Omit<BenchmarkUserOptions, 'outputFile' | 'compare' | 'outputJson'>> & Pick<BenchmarkUserOptions, 'outputFile' | 'compare' | 'outputJson'>;
|
|
2201
2204
|
shard?: {
|
|
2202
2205
|
index: number;
|
|
@@ -2736,7 +2739,7 @@ declare class StateManager {
|
|
|
2736
2739
|
taskFileMap: WeakMap<Task, File>;
|
|
2737
2740
|
errorsSet: Set<unknown>;
|
|
2738
2741
|
processTimeoutCauses: Set<string>;
|
|
2739
|
-
reportedTasksMap: WeakMap<Task,
|
|
2742
|
+
reportedTasksMap: WeakMap<Task, TestModule | TestCase | TestSuite>;
|
|
2740
2743
|
catchError(err: unknown, type: string): void;
|
|
2741
2744
|
clearErrors(): void;
|
|
2742
2745
|
getUnhandledErrors(): unknown[];
|
|
@@ -2754,7 +2757,7 @@ declare class StateManager {
|
|
|
2754
2757
|
collectFiles(project: TestProject, files?: File[]): void;
|
|
2755
2758
|
clearFiles(project: TestProject, paths?: string[]): void;
|
|
2756
2759
|
updateId(task: Task, project: TestProject): void;
|
|
2757
|
-
getReportedEntity(task: Task):
|
|
2760
|
+
getReportedEntity(task: Task): TestModule | TestCase | TestSuite | undefined;
|
|
2758
2761
|
updateTasks(packs: TaskResultPack[]): void;
|
|
2759
2762
|
updateUserLog(log: UserConsoleLog): void;
|
|
2760
2763
|
getCountOfFailedTests(): number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
1
2
|
import { slash, createDefer, shuffle, toArray } from '@vitest/utils';
|
|
2
3
|
import fs, { statSync, realpathSync, promises as promises$1 } from 'node:fs';
|
|
3
4
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
4
5
|
import { builtinModules, createRequire } from 'node:module';
|
|
5
|
-
import
|
|
6
|
+
import p, { win32, resolve as resolve$1 } from 'node:path';
|
|
6
7
|
import process$1 from 'node:process';
|
|
7
8
|
import { fileURLToPath as fileURLToPath$1, pathToFileURL as pathToFileURL$1, URL as URL$1 } from 'node:url';
|
|
8
9
|
import { relative, resolve, dirname, isAbsolute, join, normalize } from 'pathe';
|
|
@@ -13,13 +14,13 @@ import c from 'tinyrainbow';
|
|
|
13
14
|
import { e as extraInlineDeps, d as defaultPort, a as defaultBrowserPort, b as defaultInspectPort } from './constants.fzPh7AOq.js';
|
|
14
15
|
import * as nodeos from 'node:os';
|
|
15
16
|
import nodeos__default from 'node:os';
|
|
16
|
-
import { w as wrapSerializableConfig, a as Typechecker, b as isWindows } from './typechecker.
|
|
17
|
+
import { w as wrapSerializableConfig, a as Typechecker, b as isWindows } from './typechecker.CdcjdhoT.js';
|
|
17
18
|
import { isCI, provider } from 'std-env';
|
|
18
|
-
import crypto from 'node:crypto';
|
|
19
19
|
import { isatty } from 'node:tty';
|
|
20
20
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers.BFTU3MAI.js';
|
|
21
21
|
import require$$0 from 'util';
|
|
22
22
|
import require$$0$1 from 'path';
|
|
23
|
+
import { version } from 'vite';
|
|
23
24
|
import EventEmitter from 'node:events';
|
|
24
25
|
import { c as createBirpc } from './index.TH3f4LSA.js';
|
|
25
26
|
import Tinypool$1, { Tinypool } from 'tinypool';
|
|
@@ -737,7 +738,7 @@ function read(jsonPath, {base, specifier}) {
|
|
|
737
738
|
let string;
|
|
738
739
|
|
|
739
740
|
try {
|
|
740
|
-
string = fs.readFileSync(
|
|
741
|
+
string = fs.readFileSync(p.toNamespacedPath(jsonPath), 'utf8');
|
|
741
742
|
} catch (error) {
|
|
742
743
|
const exception = /** @type {ErrnoException} */ (error);
|
|
743
744
|
|
|
@@ -1124,7 +1125,7 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
|
1124
1125
|
'DeprecationWarning',
|
|
1125
1126
|
'DEP0151'
|
|
1126
1127
|
);
|
|
1127
|
-
} else if (
|
|
1128
|
+
} else if (p.resolve(packagePath, main) !== urlPath) {
|
|
1128
1129
|
process$1.emitWarning(
|
|
1129
1130
|
`Package ${packagePath} has a "main" field set to "${main}", ` +
|
|
1130
1131
|
`excluding the full filename and extension to the resolved file at "${urlPath.slice(
|
|
@@ -1285,7 +1286,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
1285
1286
|
{
|
|
1286
1287
|
const real = realpathSync(filePath);
|
|
1287
1288
|
const {search, hash} = resolved;
|
|
1288
|
-
resolved = pathToFileURL$1(real + (filePath.endsWith(
|
|
1289
|
+
resolved = pathToFileURL$1(real + (filePath.endsWith(p.sep) ? '/' : ''));
|
|
1289
1290
|
resolved.search = search;
|
|
1290
1291
|
resolved.hash = hash;
|
|
1291
1292
|
}
|
|
@@ -7630,7 +7631,8 @@ function createPool(ctx) {
|
|
|
7630
7631
|
vmForks: null,
|
|
7631
7632
|
typescript: null
|
|
7632
7633
|
};
|
|
7633
|
-
const
|
|
7634
|
+
const viteMajor = Number(version.split(".")[0]);
|
|
7635
|
+
const potentialConditions = new Set(viteMajor >= 6 ? ctx.vite.config.ssr.resolve?.conditions ?? [] : [
|
|
7634
7636
|
"production",
|
|
7635
7637
|
"development",
|
|
7636
7638
|
...ctx.vite.config.resolve.conditions
|
|
@@ -7643,6 +7645,11 @@ function createPool(ctx) {
|
|
|
7643
7645
|
return !ctx.vite.config.isProduction;
|
|
7644
7646
|
}
|
|
7645
7647
|
return true;
|
|
7648
|
+
}).map((condition) => {
|
|
7649
|
+
if (viteMajor >= 6 && condition === "development|production") {
|
|
7650
|
+
return ctx.vite.config.isProduction ? "production" : "development";
|
|
7651
|
+
}
|
|
7652
|
+
return condition;
|
|
7646
7653
|
}).flatMap((c) => ["--conditions", c]);
|
|
7647
7654
|
const execArgv = process.execArgv.filter(
|
|
7648
7655
|
(execArg) => execArg.startsWith("--cpu-prof") || execArg.startsWith("--heap-prof") || execArg.startsWith("--diagnostic-dir")
|
|
@@ -7870,7 +7877,9 @@ function resolveInlineWorkerOption(value) {
|
|
|
7870
7877
|
return Number(value);
|
|
7871
7878
|
}
|
|
7872
7879
|
}
|
|
7873
|
-
function resolveConfig(
|
|
7880
|
+
function resolveConfig(vitest, options, viteConfig) {
|
|
7881
|
+
const mode = vitest.mode;
|
|
7882
|
+
const logger = vitest.logger;
|
|
7874
7883
|
if (options.dom) {
|
|
7875
7884
|
if (viteConfig.test?.environment != null && viteConfig.test.environment !== "happy-dom") {
|
|
7876
7885
|
logger.console.warn(
|
|
@@ -7887,6 +7896,7 @@ function resolveConfig(mode, options, viteConfig, logger) {
|
|
|
7887
7896
|
root: viteConfig.root,
|
|
7888
7897
|
mode
|
|
7889
7898
|
};
|
|
7899
|
+
resolved.project = toArray(resolved.project);
|
|
7890
7900
|
resolved.provide ??= {};
|
|
7891
7901
|
const inspector = resolved.inspect || resolved.inspectBrk;
|
|
7892
7902
|
resolved.inspector = {
|
|
@@ -7967,13 +7977,13 @@ function resolveConfig(mode, options, viteConfig, logger) {
|
|
|
7967
7977
|
}
|
|
7968
7978
|
}
|
|
7969
7979
|
}
|
|
7970
|
-
const playwrightChromiumOnly = isPlaywrightChromiumOnly(resolved);
|
|
7980
|
+
const playwrightChromiumOnly = isPlaywrightChromiumOnly(vitest, resolved);
|
|
7971
7981
|
if (browser.enabled && !playwrightChromiumOnly) {
|
|
7972
7982
|
const browserConfig = {
|
|
7973
7983
|
browser: {
|
|
7974
7984
|
provider: browser.provider,
|
|
7975
7985
|
name: browser.name,
|
|
7976
|
-
instances: browser.instances
|
|
7986
|
+
instances: browser.instances?.map((i) => ({ browser: i.browser }))
|
|
7977
7987
|
}
|
|
7978
7988
|
};
|
|
7979
7989
|
if (resolved.coverage.enabled && resolved.coverage.provider === "v8") {
|
|
@@ -8277,7 +8287,8 @@ ${JSON.stringify({ browser: { provider: "playwright", instances: [{ browser: "ch
|
|
|
8277
8287
|
resolved.diff = resolvePath(resolved.diff, resolved.root);
|
|
8278
8288
|
resolved.forceRerunTriggers.push(resolved.diff);
|
|
8279
8289
|
}
|
|
8280
|
-
|
|
8290
|
+
const api = resolveApiServerConfig(options, defaultPort);
|
|
8291
|
+
resolved.api = { ...api, token: crypto.randomUUID() };
|
|
8281
8292
|
if (options.related) {
|
|
8282
8293
|
resolved.related = toArray(options.related).map(
|
|
8283
8294
|
(file) => resolve(resolved.root, file)
|
|
@@ -8468,7 +8479,7 @@ function resolveCoverageReporters(configReporters) {
|
|
|
8468
8479
|
}
|
|
8469
8480
|
return resolvedReporters;
|
|
8470
8481
|
}
|
|
8471
|
-
function isPlaywrightChromiumOnly(config) {
|
|
8482
|
+
function isPlaywrightChromiumOnly(vitest, config) {
|
|
8472
8483
|
const browser = config.browser;
|
|
8473
8484
|
if (!browser || browser.provider !== "playwright" || !browser.enabled) {
|
|
8474
8485
|
return false;
|
|
@@ -8479,10 +8490,9 @@ function isPlaywrightChromiumOnly(config) {
|
|
|
8479
8490
|
if (!browser.instances) {
|
|
8480
8491
|
return false;
|
|
8481
8492
|
}
|
|
8482
|
-
const filteredProjects = toArray(config.project).map((p) => wildcardPatternToRegExp(p));
|
|
8483
8493
|
for (const instance of browser.instances) {
|
|
8484
8494
|
const name = instance.name || (config.name ? `${config.name} (${instance.browser})` : instance.browser);
|
|
8485
|
-
if (
|
|
8495
|
+
if (!vitest._matchesProjectFilter(name)) {
|
|
8486
8496
|
continue;
|
|
8487
8497
|
}
|
|
8488
8498
|
if (instance.browser !== "chromium") {
|
|
@@ -9,9 +9,9 @@ import '@vitest/utils';
|
|
|
9
9
|
import { parseAstAsync } from 'vite';
|
|
10
10
|
import nodeos__default from 'node:os';
|
|
11
11
|
import url from 'node:url';
|
|
12
|
-
import
|
|
12
|
+
import p$1 from 'node:path';
|
|
13
13
|
import fs from 'node:fs';
|
|
14
|
-
import
|
|
14
|
+
import ve from 'node:module';
|
|
15
15
|
import require$$0 from 'fs';
|
|
16
16
|
|
|
17
17
|
function hasFailedSnapshot(suite) {
|
|
@@ -398,6 +398,12 @@ async function collectTests(ctx, filepath) {
|
|
|
398
398
|
}
|
|
399
399
|
return getName(callee.object?.property);
|
|
400
400
|
}
|
|
401
|
+
if (callee.type === "SequenceExpression" && callee.expressions.length === 2) {
|
|
402
|
+
const [e0, e1] = callee.expressions;
|
|
403
|
+
if (e0.type === "Literal" && e0.value === 0) {
|
|
404
|
+
return getName(e1);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
401
407
|
return null;
|
|
402
408
|
};
|
|
403
409
|
ancestor(ast, {
|
|
@@ -512,15 +518,15 @@ async function collectTests(ctx, filepath) {
|
|
|
512
518
|
};
|
|
513
519
|
}
|
|
514
520
|
|
|
515
|
-
const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I
|
|
521
|
+
const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E$1="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",R=/^\d+$/,O$1=/^(\.{1,2}|node_modules)$/i,w=/\/|\\/;var h$1=(r=>(r.Export="exports",r.Import="imports",r))(h$1||{});const f=(r,t,e,o,c)=>{if(t==null)return [];if(typeof t=="string"){const[n,...i]=t.split(w);if(n===".."||i.some(l=>O$1.test(l)))throw a(E$1,`Invalid "${r}" target "${t}" defined in the package config`);return [c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(n=>f(r,n,e,o,c));if(A(t)){for(const n of Object.keys(t)){if(R.test(n))throw a(_,"Cannot contain numeric property keys");if(n==="default"||o.includes(n))return f(r,t[n],e,o,c)}return []}throw a(E$1,`Invalid "${r}" target "${t}"`)},s="*",m=(r,t)=>{const e=r.indexOf(s),o=t.indexOf(s);return e===o?t.length>r.length:o>e};function d(r,t){if(!t.includes(s)&&r.hasOwnProperty(t))return [t];let e,o;for(const c of Object.keys(r))if(c.includes(s)){const[n,i,l]=c.split(s);if(l===undefined&&t.startsWith(n)&&t.endsWith(i)){const g=t.slice(n.length,-i.length||undefined);g&&(!e||m(e,c))&&(e=c,o=g);}}return [e,o]}const p=r=>Object.keys(r).reduce((t,e)=>{const o=e===""||e[0]!==".";if(t===undefined||t===o)return o;throw a(_,'"exports" cannot contain some keys starting with "." and some not')},undefined),u=/^\w+:/,v=(r,t,e)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||A(r)&&p(r))&&(r={".":r});const[o,c]=d(r,t),n=f(h$1.Export,r[o],t,e,c);if(n.length===0)throw a(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of n)if(!i.startsWith("./")&&!u.test(i))throw a(E$1,`Invalid "exports" target "${i}" defined in the package config`);return n};
|
|
516
522
|
|
|
517
|
-
var
|
|
518
|
-
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const j=
|
|
519
|
-
`),f++,
|
|
520
|
-
`+" ".repeat(t)),new Array(
|
|
521
|
-
`+" ".repeat(t)),new Array(
|
|
522
|
-
`+" ".repeat(t)),new Array(
|
|
523
|
-
`+" ".repeat(t));var x;(function(e){e.DEFAULT={allowTrailingComma:false};})(x||(x={}));function $e(e,t=[],i=x.DEFAULT){let n=null,o=[];const s=[];function r(u){Array.isArray(o)?o.push(u):n!==null&&(o[n]=u);}return l(r,"onValue"),ye(e,{onObjectBegin:l(()=>{const u={};r(u),s.push(o),o=u,n=null;},"onObjectBegin"),onObjectProperty:l(u=>{n=u;},"onObjectProperty"),onObjectEnd:l(()=>{o=s.pop();},"onObjectEnd"),onArrayBegin:l(()=>{const u=[];r(u),s.push(o),o=u,n=null;},"onArrayBegin"),onArrayEnd:l(()=>{o=s.pop();},"onArrayEnd"),onLiteralValue:r,onError:l((u,p,T)=>{t.push({error:u,offset:p,length:T});},"onError")},i),o[0]}l($e,"parse$1");function ye(e,t,i=x.DEFAULT){const n=_e(e,false),o=[];function s(k){return k?()=>k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>true}l(s,"toNoArgVisit");function r(k){return k?()=>k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>true}l(r,"toNoArgVisitWithPath");function f(k){return k?_=>k(_,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>true}l(f,"toOneArgVisit");function u(k){return k?_=>k(_,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>true}l(u,"toOneArgVisitWithPath");const p=r(t.onObjectBegin),T=u(t.onObjectProperty),w=s(t.onObjectEnd),O=r(t.onArrayBegin),v=s(t.onArrayEnd),A=u(t.onLiteralValue),b=f(t.onSeparator),$=s(t.onComment),U=f(t.onError),E=i&&i.disallowComments,c=i&&i.allowTrailingComma;function m(){for(;;){const k=n.scan();switch(n.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:E||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(k){case 12:case 13:E?g(10):$();break;case 16:g(1);break;case 15:case 14:break;default:return k}}}l(m,"scanNext");function g(k,_=[],C=[]){if(U(k),_.length+C.length>0){let d=n.getToken();for(;d!==17;){if(_.indexOf(d)!==-1){m();break}else if(C.indexOf(d)!==-1)break;d=m();}}}l(g,"handleError");function y(k){const _=n.getTokenValue();return k?A(_):(T(_),o.push(_)),m(),true}l(y,"parseString");function j(){switch(n.getToken()){case 11:const k=n.getTokenValue();let _=Number(k);isNaN(_)&&(g(2),_=0),A(_);break;case 7:A(null);break;case 8:A(true);break;case 9:A(false);break;default:return false}return m(),true}l(j,"parseLiteral");function ke(){return n.getToken()!==10?(g(3,[],[2,5]),false):(y(false),n.getToken()===6?(b(":"),m(),V()||g(4,[],[2,5])):g(5,[],[2,5]),o.pop(),true)}l(ke,"parseProperty");function be(){p(),m();let k=false;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(k||g(4,[],[]),b(","),m(),n.getToken()===2&&c)break}else k&&g(6,[],[]);ke()||g(4,[],[2,5]),k=true;}return w(),n.getToken()!==2?g(7,[2],[]):m(),true}l(be,"parseObject");function we(){O(),m();let k=true,_=false;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(_||g(4,[],[]),b(","),m(),n.getToken()===4&&c)break}else _&&g(6,[],[]);k?(o.push(0),k=false):o[o.length-1]++,V()||g(4,[],[4,5]),_=true;}return v(),k||o.pop(),n.getToken()!==4?g(8,[4],[]):m(),true}l(we,"parseArray");function V(){switch(n.getToken()){case 3:return we();case 1:return be();case 10:return y(true);default:return j()}}return l(V,"parseValue"),m(),n.getToken()===17?i.allowEmptyContent?true:(g(4,[],[]),false):V()?(n.getToken()!==17&&g(9,[],[]),true):(g(4,[],[]),false)}l(ye,"visit");var ie;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter";})(ie||(ie={}));var oe;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF";})(oe||(oe={}));const Be=$e;var se;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter";})(se||(se={}));const le=l((e,t)=>Be(je(t,e,"utf8")),"readJsonc"),z=Symbol("implicitBaseUrl"),L="${configDir}",Fe=l(()=>{const{findPnpApi:e}=Te;return e&&e(process.cwd())},"getPnpApi"),Q=l((e,t,i,n)=>{const o=`resolveFromPackageJsonPath:${e}:${t}:${i}`;if(n!=null&&n.has(o))return n.get(o);const s=le(e,n);if(!s)return;let r=t||"tsconfig.json";if(!i&&s.exports)try{const[f]=v(s.exports,t,["require","types"]);r=f;}catch{return false}else !t&&s.tsconfig&&(r=s.tsconfig);return r=a$1.join(e,"..",r),n==null||n.set(o,r),r},"resolveFromPackageJsonPath"),H="package.json",X="tsconfig.json",Le=l((e,t,i)=>{let n=e;if(e===".."&&(n=a$1.join(n,X)),e[0]==="."&&(n=a$1.resolve(t,n)),a$1.isAbsolute(n)){if(F(i,n)){if(P(i,n).isFile())return n}else if(!n.endsWith(".json")){const v=`${n}.json`;if(F(i,v))return v}return}const[o,...s]=e.split("/"),r=o[0]==="@"?`${o}/${s.shift()}`:o,f=s.join("/"),u=Fe();if(u){const{resolveRequest:v}=u;try{if(r===e){const A=v(a$1.join(r,H),t);if(A){const b=Q(A,f,!1,i);if(b&&F(i,b))return b}}else {let A;try{A=v(e,t,{extensions:[".json"]});}catch{A=v(a$1.join(e,X),t);}if(A)return A}}catch{}}const p=ne(a$1.resolve(t),a$1.join("node_modules",r),i);if(!p||!P(i,p).isDirectory())return;const T=a$1.join(p,H);if(F(i,T)){const v=Q(T,f,false,i);if(v===false)return;if(v&&F(i,v)&&P(i,v).isFile())return v}const w=a$1.join(p,f),O=w.endsWith(".json");if(!O){const v=`${w}.json`;if(F(i,v))return v}if(F(i,w)){if(P(i,w).isDirectory()){const v=a$1.join(w,H);if(F(i,v)){const b=Q(v,"",true,i);if(b&&F(i,b))return b}const A=a$1.join(w,X);if(F(i,A))return A}else if(O)return w}},"resolveExtendsPath"),Y=l((e,t)=>M(a$1.relative(e,t)),"pathRelative"),re=["files","include","exclude"],Ue=l((e,t,i,n)=>{const o=Le(e,t,n);if(!o)throw new Error(`File '${e}' not found.`);if(i.has(o))throw new Error(`Circularity detected while resolving configuration: ${o}`);i.add(o);const s=a$1.dirname(o),r=ue(o,n,i);delete r.references;const{compilerOptions:f}=r;if(f){const{baseUrl:u}=f;u&&!u.startsWith(L)&&(f.baseUrl=B(a$1.relative(t,a$1.join(s,u)))||"./");let{outDir:p}=f;p&&(p.startsWith(L)||(p=a$1.relative(t,a$1.join(s,p))),f.outDir=B(p)||"./");}for(const u of re){const p=r[u];p&&(r[u]=p.map(T=>T.startsWith(L)?T:B(a$1.relative(t,a$1.join(s,T)))));}return r},"resolveExtends"),Ee=["outDir","declarationDir"],ue=l((e,t,i=new Set)=>{let n;try{n=le(e,t)||{};}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const o=a$1.dirname(e);if(n.compilerOptions){const{compilerOptions:s}=n;s.paths&&!s.baseUrl&&(s[z]=o);}if(n.extends){const s=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const r of s.reverse()){const f=Ue(r,o,new Set(i),t),u={...f,...n,compilerOptions:{...f.compilerOptions,...n.compilerOptions}};f.watchOptions&&(u.watchOptions={...f.watchOptions,...n.watchOptions}),n=u;}}if(n.compilerOptions){const{compilerOptions:s}=n,r=["baseUrl","rootDir"];for(const f of r){const u=s[f];if(u&&!u.startsWith(L)){const p=a$1.resolve(o,u),T=Y(o,p);s[f]=T;}}for(const f of Ee){let u=s[f];u&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(u)||n.exclude.push(u),u.startsWith(L)||(u=M(u)),s[f]=u);}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(B),n.files&&delete n.files):n.files&&(n.files=n.files.map(s=>s.startsWith(L)?s:M(s))),n.watchOptions){const{watchOptions:s}=n;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(r=>B(a$1.resolve(o,r))));}return n},"_parseTsconfig"),I=l((e,t)=>{if(e.startsWith(L))return B(a$1.join(t,e.slice(L.length)))},"interpolateConfigDir"),Ne=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],fe=l((e,t=new Map)=>{const i=a$1.resolve(e),n=ue(i,t),o=a$1.dirname(i),{compilerOptions:s}=n;if(s){for(const f of Ne){const u=s[f];if(u){const p=I(u,o);s[f]=p?Y(o,p):u;}}for(const f of ["rootDirs","typeRoots"]){const u=s[f];u&&(s[f]=u.map(p=>{const T=I(p,o);return T?Y(o,T):p}));}const{paths:r}=s;if(r)for(const f of Object.keys(r))r[f]=r[f].map(u=>{var p;return (p=I(u,o))!=null?p:u});}for(const r of re){const f=n[r];f&&(n[r]=f.map(u=>{var p;return (p=I(u,o))!=null?p:u}));}return n},"parseTsconfig"),De=l((e=process.cwd(),t="tsconfig.json",i=new Map)=>{const n=ne(B(e),t,i);if(!n)return null;const o=fe(n,i);return {path:n,config:o}},"getTsconfig"),he=/\*/g,ce=l((e,t)=>{const i=e.match(he);if(i&&i.length>1)throw new Error(t)},"assertStarCount"),de=l(e=>{if(e.includes("*")){const[t,i]=e.split("*");return {prefix:t,suffix:i}}return e},"parsePattern"),Pe=l(({prefix:e,suffix:t},i)=>i.startsWith(e)&&i.endsWith(t),"isPatternMatch"),xe=l((e,t,i)=>Object.entries(e).map(([n,o])=>(ce(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:de(n),substitutions:o.map(s=>{if(ce(s,`Substitution '${s}' in pattern '${n}' can have at most one '*' character.`),!t&&!J.test(s))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return a$1.resolve(i,s)})})),"parsePaths");l(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:i,paths:n}=t;if(!i&&!n)return null;const o=z in t&&t[z],s=a$1.resolve(a$1.dirname(e.path),i||o||"."),r=n?xe(n,i,s):[];return f=>{if(J.test(f))return [];const u=[];for(const O of r){if(O.pattern===f)return O.substitutions.map(B);typeof O.pattern!="string"&&u.push(O);}let p,T=-1;for(const O of u)Pe(O.pattern,f)&&O.pattern.prefix.length>T&&(T=O.pattern.prefix.length,p=O);if(!p)return i?[B(a$1.join(s,f))]:[];const w=f.slice(p.pattern.prefix.length,f.length-p.pattern.suffix.length);return p.substitutions.map(O=>B(O.replace("*",w)))}},"createPathsMatcher");const pe=l(e=>{let t="";for(let i=0;i<e.length;i+=1){const n=e[i],o=n.toUpperCase();t+=n===o?n.toLowerCase():o;}return t},"s"),Se=65,We=97,Ve=l(()=>Math.floor(Math.random()*26),"m"),Re=l(e=>Array.from({length:e},()=>String.fromCodePoint(Ve()+(Math.random()>.5?Se:We))).join(""),"S"),Je=l((e=require$$0)=>{const t=process.execPath;if(e.existsSync(t))return !e.existsSync(pe(t));const i=`/${Re(10)}`;e.writeFileSync(i,"");const n=!e.existsSync(pe(i));return e.unlinkSync(i),n},"l"),{join:S}=a$1.posix,Z={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Me=l(e=>{const t=[...Z.ts],i=[...Z.cts],n=[...Z.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),i.push(".cjs"),n.push(".mjs")),[...t,...i,...n]},"getSupportedExtensions"),Ge=l(e=>{const t=[];if(!e)return t;const{outDir:i,declarationDir:n}=e;return i&&t.push(i),n&&t.push(n),t},"getDefaultExcludeSpec"),ae=l(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),ze=["node_modules","bower_components","jspm_packages"],q=`(?!(${ze.join("|")})(/|$))`,Qe=/(?:^|\/)[^.*?]+$/,ge="**/*",W="[^/]",K="[^./]",me=process.platform==="win32";l(({config:e,path:t},i=Je())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!a$1.isAbsolute(t))throw new Error("The tsconfig path must be absolute");me&&(t=B(t));const n=a$1.dirname(t),{files:o,include:s,exclude:r,compilerOptions:f}=e,u=o==null?undefined:o.map(b=>S(n,b)),p=Me(f),T=i?"":"i",O=(r||Ge(f)).map(b=>{const $=S(n,b),U=ae($).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${W}*`).replaceAll(String.raw`\?`,W);return new RegExp(`^${U}($|/)`,T)}),v=o||s?s:[ge],A=v?v.map(b=>{let $=S(n,b);Qe.test($)&&($=S($,ge));const U=ae($).replaceAll(String.raw`/\*\*`,`(/${q}${K}${W}*)*?`).replaceAll(/(\/)?\\\*/g,(E,c)=>{const m=`(${K}|(\\.(?!min\\.js$))?)*`;return c?`/${q}${K}${m}`:m}).replaceAll(/(\/)?\\\?/g,(E,c)=>{const m=W;return c?`/${q}${m}`:m});return new RegExp(`^${U}$`,T)}):undefined;return b=>{if(!a$1.isAbsolute(b))throw new Error("filePath must be absolute");if(me&&(b=B(b)),u!=null&&u.includes(b))return e;if(!(!p.some($=>b.endsWith($))||O.some($=>$.test(b)))&&A&&A.some($=>$.test(b)))return e}},"createFilesMatcher");
|
|
523
|
+
var de=Object.defineProperty;var o=(e,t)=>de(e,"name",{value:t,configurable:true});function E(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}o(E,"slash");const O=o(e=>{const t=fs[e];return (s,...n)=>{const l=`${e}:${n.join(":")}`;let i=s==null?undefined:s.get(l);return i===undefined&&(i=Reflect.apply(t,fs,n),s==null||s.set(l,i)),i}},"cacheFs"),B=O("existsSync"),_e=O("readFileSync"),W=O("statSync"),le=o((e,t,s)=>{for(;;){const n=p$1.posix.join(e,t);if(B(s,n))return n;const l=p$1.dirname(e);if(l===e)return;e=l;}},"findUp"),G=/^\.{1,2}(\/.*)?$/,Q=o(e=>{const t=E(e);return G.test(t)?t:`./${t}`},"normalizeRelativePath");function je(e,t=false){const s=e.length;let n=0,l="",i=0,u=16,f=0,r=0,g=0,T=0,b=0;function _(c,k){let m=0,F=0;for(;m<c;){let j=e.charCodeAt(n);if(j>=48&&j<=57)F=F*16+j-48;else if(j>=65&&j<=70)F=F*16+j-65+10;else if(j>=97&&j<=102)F=F*16+j-97+10;else break;n++,m++;}return m<c&&(F=-1),F}o(_,"scanHexDigits");function d(c){n=c,l="",i=0,u=16,b=0;}o(d,"setPosition");function A(){let c=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&h(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&h(e.charCodeAt(n)))for(n++;n<e.length&&h(e.charCodeAt(n));)n++;else return b=3,e.substring(c,n);let k=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&h(e.charCodeAt(n))){for(n++;n<e.length&&h(e.charCodeAt(n));)n++;k=n;}else b=3;return e.substring(c,k)}o(A,"scanNumber");function w(){let c="",k=n;for(;;){if(n>=s){c+=e.substring(k,n),b=2;break}const m=e.charCodeAt(n);if(m===34){c+=e.substring(k,n),n++;break}if(m===92){if(c+=e.substring(k,n),n++,n>=s){b=2;break}switch(e.charCodeAt(n++)){case 34:c+='"';break;case 92:c+="\\";break;case 47:c+="/";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+=`
|
|
524
|
+
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const j=_(4);j>=0?c+=String.fromCharCode(j):b=4;break;default:b=5;}k=n;continue}if(m>=0&&m<=31)if(N(m)){c+=e.substring(k,n),b=2;break}else b=6;n++;}return c}o(w,"scanString");function y(){if(l="",b=0,i=n,r=f,T=g,n>=s)return i=s,u=17;let c=e.charCodeAt(n);if(H(c)){do n++,l+=String.fromCharCode(c),c=e.charCodeAt(n);while(H(c));return u=15}if(N(c))return n++,l+=String.fromCharCode(c),c===13&&e.charCodeAt(n)===10&&(n++,l+=`
|
|
525
|
+
`),f++,g=n,u=14;switch(c){case 123:return n++,u=1;case 125:return n++,u=2;case 91:return n++,u=3;case 93:return n++,u=4;case 58:return n++,u=6;case 44:return n++,u=5;case 34:return n++,l=w(),u=10;case 47:const k=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<s&&!N(e.charCodeAt(n));)n++;return l=e.substring(k,n),u=12}if(e.charCodeAt(n+1)===42){n+=2;const m=s-1;let F=false;for(;n<m;){const j=e.charCodeAt(n);if(j===42&&e.charCodeAt(n+1)===47){n+=2,F=true;break}n++,N(j)&&(j===13&&e.charCodeAt(n)===10&&n++,f++,g=n);}return F||(n++,b=1),l=e.substring(k,n),u=13}return l+=String.fromCharCode(c),n++,u=16;case 45:if(l+=String.fromCharCode(c),n++,n===s||!h(e.charCodeAt(n)))return u=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return l+=A(),u=11;default:for(;n<s&&I(c);)n++,c=e.charCodeAt(n);if(i!==n){switch(l=e.substring(i,n),l){case "true":return u=8;case "false":return u=9;case "null":return u=7}return u=16}return l+=String.fromCharCode(c),n++,u=16}}o(y,"scanNext");function I(c){if(H(c)||N(c))return false;switch(c){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return false}return true}o(I,"isUnknownContentCharacter");function L(){let c;do c=y();while(c>=12&&c<=15);return c}return o(L,"scanNextNonTrivia"),{setPosition:d,getPosition:o(()=>n,"getPosition"),scan:t?L:y,getToken:o(()=>u,"getToken"),getTokenValue:o(()=>l,"getTokenValue"),getTokenOffset:o(()=>i,"getTokenOffset"),getTokenLength:o(()=>n-i,"getTokenLength"),getTokenStartLine:o(()=>r,"getTokenStartLine"),getTokenStartCharacter:o(()=>i-T,"getTokenStartCharacter"),getTokenError:o(()=>b,"getTokenError")}}o(je,"createScanner");function H(e){return e===32||e===9}o(H,"isWhiteSpace");function N(e){return e===10||e===13}o(N,"isLineBreak");function h(e){return e>=48&&e<=57}o(h,"isDigit");var ie;((function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab";}))(ie||(ie={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const x=200;new Array(x).fill(0).map((e,t)=>`
|
|
526
|
+
`+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>`\r
|
|
527
|
+
`+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>`
|
|
528
|
+
`+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>`\r
|
|
529
|
+
`+" ".repeat(t));var M;(function(e){e.DEFAULT={allowTrailingComma:false};})(M||(M={}));function ye(e,t=[],s=M.DEFAULT){let n=null,l=[];const i=[];function u(r){Array.isArray(l)?l.push(r):n!==null&&(l[n]=r);}return o(u,"onValue"),Fe(e,{onObjectBegin:o(()=>{const r={};u(r),i.push(l),l=r,n=null;},"onObjectBegin"),onObjectProperty:o(r=>{n=r;},"onObjectProperty"),onObjectEnd:o(()=>{l=i.pop();},"onObjectEnd"),onArrayBegin:o(()=>{const r=[];u(r),i.push(l),l=r,n=null;},"onArrayBegin"),onArrayEnd:o(()=>{l=i.pop();},"onArrayEnd"),onLiteralValue:u,onError:o((r,g,T)=>{t.push({error:r,offset:g,length:T});},"onError")},s),l[0]}o(ye,"parse$1");function Fe(e,t,s=M.DEFAULT){const n=je(e,false),l=[];function i(v){return v?()=>v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>true}o(i,"toNoArgVisit");function u(v){return v?()=>v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>l.slice()):()=>true}o(u,"toNoArgVisitWithPath");function f(v){return v?D=>v(D,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>true}o(f,"toOneArgVisit");function r(v){return v?D=>v(D,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>l.slice()):()=>true}o(r,"toOneArgVisitWithPath");const g=u(t.onObjectBegin),T=r(t.onObjectProperty),b=i(t.onObjectEnd),_=u(t.onArrayBegin),d=i(t.onArrayEnd),A=r(t.onLiteralValue),w=f(t.onSeparator),y=i(t.onComment),I=f(t.onError),L=s&&s.disallowComments,c=s&&s.allowTrailingComma;function k(){for(;;){const v=n.scan();switch(n.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:L||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(v){case 12:case 13:L?m(10):y();break;case 16:m(1);break;case 15:case 14:break;default:return v}}}o(k,"scanNext");function m(v,D=[],te=[]){if(I(v),D.length+te.length>0){let P=n.getToken();for(;P!==17;){if(D.indexOf(P)!==-1){k();break}else if(te.indexOf(P)!==-1)break;P=k();}}}o(m,"handleError");function F(v){const D=n.getTokenValue();return v?A(D):(T(D),l.push(D)),k(),true}o(F,"parseString");function j(){switch(n.getToken()){case 11:const v=n.getTokenValue();let D=Number(v);isNaN(D)&&(m(2),D=0),A(D);break;case 7:A(null);break;case 8:A(true);break;case 9:A(false);break;default:return false}return k(),true}o(j,"parseLiteral");function S(){return n.getToken()!==10?(m(3,[],[2,5]),false):(F(false),n.getToken()===6?(w(":"),k(),U()||m(4,[],[2,5])):m(5,[],[2,5]),l.pop(),true)}o(S,"parseProperty");function R(){g(),k();let v=false;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(v||m(4,[],[]),w(","),k(),n.getToken()===2&&c)break}else v&&m(6,[],[]);S()||m(4,[],[2,5]),v=true;}return b(),n.getToken()!==2?m(7,[2],[]):k(),true}o(R,"parseObject");function a(){_(),k();let v=true,D=false;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(D||m(4,[],[]),w(","),k(),n.getToken()===4&&c)break}else D&&m(6,[],[]);v?(l.push(0),v=false):l[l.length-1]++,U()||m(4,[],[4,5]),D=true;}return d(),v||l.pop(),n.getToken()!==4?m(8,[4],[]):k(),true}o(a,"parseArray");function U(){switch(n.getToken()){case 3:return a();case 1:return R();case 10:return F(true);default:return j()}}return o(U,"parseValue"),k(),n.getToken()===17?s.allowEmptyContent?true:(m(4,[],[]),false):U()?(n.getToken()!==17&&m(9,[],[]),true):(m(4,[],[]),false)}o(Fe,"visit");var oe;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter";})(oe||(oe={}));var ue;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF";})(ue||(ue={}));const De=ye;var re;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter";})(re||(re={}));const fe=o((e,t)=>De(_e(t,e,"utf8")),"readJsonc"),X=Symbol("implicitBaseUrl"),$="${configDir}",Ee=o(()=>{const{findPnpApi:e}=ve;return e&&e(process.cwd())},"getPnpApi"),Y=o((e,t,s,n)=>{const l=`resolveFromPackageJsonPath:${e}:${t}:${s}`;if(n!=null&&n.has(l))return n.get(l);const i=fe(e,n);if(!i)return;let u=t||"tsconfig.json";if(!s&&i.exports)try{const[f]=v(i.exports,t,["require","types"]);u=f;}catch{return false}else !t&&i.tsconfig&&(u=i.tsconfig);return u=p$1.join(e,"..",u),n==null||n.set(l,u),u},"resolveFromPackageJsonPath"),Z="package.json",q="tsconfig.json",Be=o((e,t,s)=>{let n=e;if(e===".."&&(n=p$1.join(n,q)),e[0]==="."&&(n=p$1.resolve(t,n)),p$1.isAbsolute(n)){if(B(s,n)){if(W(s,n).isFile())return n}else if(!n.endsWith(".json")){const d=`${n}.json`;if(B(s,d))return d}return}const[l,...i]=e.split("/"),u=l[0]==="@"?`${l}/${i.shift()}`:l,f=i.join("/"),r=Ee();if(r){const{resolveRequest:d}=r;try{if(u===e){const A=d(p$1.join(u,Z),t);if(A){const w=Y(A,f,!1,s);if(w&&B(s,w))return w}}else {let A;try{A=d(e,t,{extensions:[".json"]});}catch{A=d(p$1.join(e,q),t);}if(A)return A}}catch{}}const g=le(p$1.resolve(t),p$1.join("node_modules",u),s);if(!g||!W(s,g).isDirectory())return;const T=p$1.join(g,Z);if(B(s,T)){const d=Y(T,f,false,s);if(d===false)return;if(d&&B(s,d)&&W(s,d).isFile())return d}const b=p$1.join(g,f),_=b.endsWith(".json");if(!_){const d=`${b}.json`;if(B(s,d))return d}if(B(s,b)){if(W(s,b).isDirectory()){const d=p$1.join(b,Z);if(B(s,d)){const w=Y(d,"",true,s);if(w&&B(s,w))return w}const A=p$1.join(b,q);if(B(s,A))return A}else if(_)return b}},"resolveExtendsPath"),K=o((e,t)=>Q(p$1.relative(e,t)),"pathRelative"),ce=["files","include","exclude"],Ie=o((e,t,s,n)=>{const l=Be(e,t,n);if(!l)throw new Error(`File '${e}' not found.`);if(s.has(l))throw new Error(`Circularity detected while resolving configuration: ${l}`);s.add(l);const i=p$1.dirname(l),u=ae(l,n,s);delete u.references;const{compilerOptions:f}=u;if(f){const{baseUrl:r}=f;r&&!r.startsWith($)&&(f.baseUrl=E(p$1.relative(t,p$1.join(i,r)))||"./");let{outDir:g}=f;g&&(g.startsWith($)||(g=p$1.relative(t,p$1.join(i,g))),f.outDir=E(g)||"./");}for(const r of ce){const g=u[r];g&&(u[r]=g.map(T=>T.startsWith($)?T:E(p$1.relative(t,p$1.join(i,T)))));}return u},"resolveExtends"),Le=["outDir","declarationDir"],ae=o((e,t,s=new Set)=>{let n;try{n=fe(e,t)||{};}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const l=p$1.dirname(e);if(n.compilerOptions){const{compilerOptions:i}=n;i.paths&&!i.baseUrl&&(i[X]=l);}if(n.extends){const i=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const u of i.reverse()){const f=Ie(u,l,new Set(s),t),r={...f,...n,compilerOptions:{...f.compilerOptions,...n.compilerOptions}};f.watchOptions&&(r.watchOptions={...f.watchOptions,...n.watchOptions}),n=r;}}if(n.compilerOptions){const{compilerOptions:i}=n,u=["baseUrl","rootDir"];for(const f of u){const r=i[f];if(r&&!r.startsWith($)){const g=p$1.resolve(l,r),T=K(l,g);i[f]=T;}}for(const f of Le){let r=i[f];r&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(r)||n.exclude.push(r),r.startsWith($)||(r=Q(r)),i[f]=r);}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(E),n.files&&delete n.files):n.files&&(n.files=n.files.map(i=>i.startsWith($)?i:Q(i))),n.watchOptions){const{watchOptions:i}=n;i.excludeDirectories&&(i.excludeDirectories=i.excludeDirectories.map(u=>E(p$1.resolve(l,u))));}return n},"_parseTsconfig"),V=o((e,t)=>{if(e.startsWith($))return E(p$1.join(t,e.slice($.length)))},"interpolateConfigDir"),$e=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Ue=o(e=>{if(e.strict){const a=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const U of a)e[U]===undefined&&(e[U]=true);}if(e.target){let a=e.target.toLowerCase();a==="es2015"&&(a="es6"),e.target=a,a==="esnext"&&((e.module)!=null||(e.module="es6"),(e.moduleResolution)!=null||(e.moduleResolution="classic"),(e.useDefineForClassFields)!=null||(e.useDefineForClassFields=true)),(a==="es6"||a==="es2016"||a==="es2017"||a==="es2018"||a==="es2019"||a==="es2020"||a==="es2021"||a==="es2022"||a==="es2023"||a==="es2024")&&((e.module)!=null||(e.module="es6"),(e.moduleResolution)!=null||(e.moduleResolution="classic")),(a==="es2022"||a==="es2023"||a==="es2024")&&((e.useDefineForClassFields)!=null||(e.useDefineForClassFields=true));}if(e.module){let a=e.module.toLowerCase();a==="es2015"&&(a="es6"),e.module=a,(a==="es6"||a==="es2020"||a==="es2022"||a==="esnext"||a==="none"||a==="system"||a==="umd"||a==="amd")&&((e.moduleResolution)!=null||(e.moduleResolution="classic")),a==="system"&&((e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=true)),(a==="node16"||a==="nodenext"||a==="preserve")&&((e.esModuleInterop)!=null||(e.esModuleInterop=true),(e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=true)),(a==="node16"||a==="nodenext")&&((e.moduleDetection)!=null||(e.moduleDetection="force"),(e.useDefineForClassFields)!=null||(e.useDefineForClassFields=true)),a==="node16"&&((e.target)!=null||(e.target="es2022"),(e.moduleResolution)!=null||(e.moduleResolution="node16")),a==="nodenext"&&((e.target)!=null||(e.target="esnext"),(e.moduleResolution)!=null||(e.moduleResolution="nodenext")),a==="preserve"&&((e.moduleResolution)!=null||(e.moduleResolution="bundler"));}if(e.moduleResolution){let a=e.moduleResolution.toLowerCase();a==="node"&&(a="node10"),e.moduleResolution=a,(a==="node16"||a==="nodenext"||a==="bundler")&&((e.resolvePackageJsonExports)!=null||(e.resolvePackageJsonExports=true),(e.resolvePackageJsonImports)!=null||(e.resolvePackageJsonImports=true)),a==="bundler"&&((e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=true),(e.resolveJsonModule)!=null||(e.resolveJsonModule=true));}e.esModuleInterop&&((e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=true)),e.verbatimModuleSyntax&&((e.isolatedModules)!=null||(e.isolatedModules=true),(e.preserveConstEnums)!=null||(e.preserveConstEnums=true)),e.isolatedModules&&((e.preserveConstEnums)!=null||(e.preserveConstEnums=true));},"normalizeCompilerOptions"),ge=o((e,t=new Map)=>{const s=p$1.resolve(e),n=ae(s,t),l=p$1.dirname(s),{compilerOptions:i}=n;if(i){for(const f of $e){const r=i[f];if(r){const g=V(r,l);i[f]=g?K(l,g):r;}}for(const f of ["rootDirs","typeRoots"]){const r=i[f];r&&(i[f]=r.map(g=>{const T=V(g,l);return T?K(l,T):g}));}const{paths:u}=i;if(u)for(const f of Object.keys(u))u[f]=u[f].map(r=>{var g;return (g=V(r,l))!=null?g:r});Ue(i);}for(const u of ce){const f=n[u];f&&(n[u]=f.map(r=>{var g;return (g=V(r,l))!=null?g:r}));}return n},"parseTsconfig"),he=o((e=process.cwd(),t="tsconfig.json",s=new Map)=>{const n=le(E(e),t,s);if(!n)return null;const l=ge(n,s);return {path:n,config:l}},"getTsconfig"),xe=/\*/g,me=o((e,t)=>{const s=e.match(xe);if(s&&s.length>1)throw new Error(t)},"assertStarCount"),Ne=o(e=>{if(e.includes("*")){const[t,s]=e.split("*");return {prefix:t,suffix:s}}return e},"parsePattern"),Se=o(({prefix:e,suffix:t},s)=>s.startsWith(e)&&s.endsWith(t),"isPatternMatch"),Re=o((e,t,s)=>Object.entries(e).map(([n,l])=>(me(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:Ne(n),substitutions:l.map(i=>{if(me(i,`Substitution '${i}' in pattern '${n}' can have at most one '*' character.`),!t&&!G.test(i))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return p$1.resolve(s,i)})})),"parsePaths");o(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:s,paths:n}=t;if(!s&&!n)return null;const l=X in t&&t[X],i=p$1.resolve(p$1.dirname(e.path),s||l||"."),u=n?Re(n,s,i):[];return f=>{if(G.test(f))return [];const r=[];for(const _ of u){if(_.pattern===f)return _.substitutions.map(E);typeof _.pattern!="string"&&r.push(_);}let g,T=-1;for(const _ of r)Se(_.pattern,f)&&_.pattern.prefix.length>T&&(T=_.pattern.prefix.length,g=_);if(!g)return s?[E(p$1.join(i,f))]:[];const b=f.slice(g.pattern.prefix.length,f.length-g.pattern.suffix.length);return g.substitutions.map(_=>E(_.replace("*",b)))}},"createPathsMatcher");const pe=o(e=>{let t="";for(let s=0;s<e.length;s+=1){const n=e[s],l=n.toUpperCase();t+=n===l?n.toLowerCase():l;}return t},"s"),We=65,Me=97,Ve=o(()=>Math.floor(Math.random()*26),"m"),Je=o(e=>Array.from({length:e},()=>String.fromCodePoint(Ve()+(Math.random()>.5?We:Me))).join(""),"S"),ze=o((e=require$$0)=>{const t=process.execPath;if(e.existsSync(t))return !e.existsSync(pe(t));const s=`/${Je(10)}`;e.writeFileSync(s,"");const n=!e.existsSync(pe(s));return e.unlinkSync(s),n},"l"),{join:J}=p$1.posix,C={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Oe=o(e=>{const t=[...C.ts],s=[...C.cts],n=[...C.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),s.push(".cjs"),n.push(".mjs")),[...t,...s,...n]},"getSupportedExtensions"),Ge=o(e=>{const t=[];if(!e)return t;const{outDir:s,declarationDir:n}=e;return s&&t.push(s),n&&t.push(n),t},"getDefaultExcludeSpec"),ke=o(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),Qe=["node_modules","bower_components","jspm_packages"],ee=`(?!(${Qe.join("|")})(/|$))`,He=/(?:^|\/)[^.*?]+$/,we="**/*",z="[^/]",ne="[^./]",be=process.platform==="win32";o(({config:e,path:t},s=ze())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!p$1.isAbsolute(t))throw new Error("The tsconfig path must be absolute");be&&(t=E(t));const n=p$1.dirname(t),{files:l,include:i,exclude:u,compilerOptions:f}=e,r=l==null?undefined:l.map(w=>J(n,w)),g=Oe(f),T=s?"":"i",_=(u||Ge(f)).map(w=>{const y=J(n,w),I=ke(y).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${z}*`).replaceAll(String.raw`\?`,z);return new RegExp(`^${I}($|/)`,T)}),d=l||i?i:[we],A=d?d.map(w=>{let y=J(n,w);He.test(y)&&(y=J(y,we));const I=ke(y).replaceAll(String.raw`/\*\*`,`(/${ee}${ne}${z}*)*?`).replaceAll(/(\/)?\\\*/g,(L,c)=>{const k=`(${ne}|(\\.(?!min\\.js$))?)*`;return c?`/${ee}${ne}${k}`:k}).replaceAll(/(\/)?\\\?/g,(L,c)=>{const k=z;return c?`/${ee}${k}`:k});return new RegExp(`^${I}$`,T)}):undefined;return w=>{if(!p$1.isAbsolute(w))throw new Error("filePath must be absolute");if(be&&(w=E(w)),r!=null&&r.includes(w))return e;if(!(!g.some(y=>w.endsWith(y))||_.some(y=>y.test(w)))&&A&&A.some(y=>y.test(w)))return e}},"createFilesMatcher");
|
|
524
530
|
|
|
525
531
|
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
|
526
532
|
const newLineRegExp = /\r?\n/;
|
|
@@ -564,7 +570,7 @@ async function makeTscErrorInfo(errInfo) {
|
|
|
564
570
|
async function getTsconfig(root, config) {
|
|
565
571
|
const configName = config.tsconfig ? basename(config.tsconfig) : undefined;
|
|
566
572
|
const configSearchPath = config.tsconfig ? dirname(resolve(root, config.tsconfig)) : root;
|
|
567
|
-
const tsconfig =
|
|
573
|
+
const tsconfig = he(configSearchPath, configName);
|
|
568
574
|
if (!tsconfig) {
|
|
569
575
|
throw new Error("no tsconfig.json found");
|
|
570
576
|
}
|
|
@@ -3,7 +3,7 @@ import vm, { isContext } from 'node:vm';
|
|
|
3
3
|
import { dirname, basename, extname, normalize, join, resolve } from 'pathe';
|
|
4
4
|
import { distDir } from '../path.js';
|
|
5
5
|
import { createCustomConsole } from './console.BxE0RUCr.js';
|
|
6
|
-
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.
|
|
6
|
+
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.PoofJYS5.js';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import { dirname as dirname$1 } from 'node:path';
|
|
9
9
|
import { isNodeBuiltin, isPrimitive, toArray, getCachedData, setCacheData } from 'vite-node/utils';
|
package/dist/cli.js
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { R as ResolvedCoverageOptions, d as CoverageV8Options, U as UserWorkspaceConfig, e as UserProjectConfigFn, f as UserProjectConfigExport, T as TestProjectConfiguration } from './chunks/reporters.
|
|
4
|
-
export { W as WorkspaceProjectConfiguration } from './chunks/reporters.
|
|
5
|
-
import './chunks/vite.
|
|
3
|
+
import { R as ResolvedCoverageOptions, d as CoverageV8Options, U as UserWorkspaceConfig, e as UserProjectConfigFn, f as UserProjectConfigExport, T as TestProjectConfiguration } from './chunks/reporters.6vxQttCV.js';
|
|
4
|
+
export { W as WorkspaceProjectConfiguration } from './chunks/reporters.6vxQttCV.js';
|
|
5
|
+
import './chunks/vite.Cu7NWuBa.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import './chunks/environment.d8YfPkTm.js';
|
|
8
8
|
import '@vitest/utils';
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.
|
|
2
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.6vxQttCV.js';
|
|
3
3
|
import { A as AfterSuiteRunMeta } from './chunks/environment.d8YfPkTm.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
package/dist/coverage.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, promises, readdirSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.
|
|
2
|
+
import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.BT-MMQUD.js';
|
|
3
3
|
import { resolve, relative } from 'pathe';
|
|
4
4
|
import c from 'tinyrainbow';
|
|
5
|
+
import 'node:crypto';
|
|
5
6
|
import '@vitest/utils';
|
|
6
7
|
import 'node:fs/promises';
|
|
7
8
|
import 'node:module';
|
|
@@ -13,7 +14,7 @@ import 'node:v8';
|
|
|
13
14
|
import 'node:util';
|
|
14
15
|
import './chunks/constants.fzPh7AOq.js';
|
|
15
16
|
import 'node:os';
|
|
16
|
-
import './chunks/typechecker.
|
|
17
|
+
import './chunks/typechecker.CdcjdhoT.js';
|
|
17
18
|
import 'std-env';
|
|
18
19
|
import 'node:perf_hooks';
|
|
19
20
|
import '@vitest/utils/source-map';
|
|
@@ -21,7 +22,6 @@ import 'tinyexec';
|
|
|
21
22
|
import '@vitest/runner/utils';
|
|
22
23
|
import 'vite';
|
|
23
24
|
import 'fs';
|
|
24
|
-
import 'node:crypto';
|
|
25
25
|
import 'node:tty';
|
|
26
26
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
27
27
|
import 'util';
|
package/dist/execute.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare class ExternalModulesExecutor {
|
|
|
60
60
|
constructor(options: ExternalModulesExecutorOptions);
|
|
61
61
|
import(identifier: string): Promise<object>;
|
|
62
62
|
require(identifier: string): any;
|
|
63
|
-
createRequire(identifier: string):
|
|
63
|
+
createRequire(identifier: string): NodeJS.Require;
|
|
64
64
|
importModuleDynamically: (specifier: string, referencer: VMModule) => Promise<VMModule>;
|
|
65
65
|
resolveModule: (specifier: string, referencer: string) => Promise<VMModule>;
|
|
66
66
|
resolve(specifier: string, parent: string): string;
|
package/dist/execute.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TaskResultPack as TaskResultPack$1, TaskEventPack, File as File$1, TaskPopulated, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, TaskBase as TaskBase$1, TaskResult as TaskResult$1, DoneCallback as DoneCallback$1, RuntimeContext as RuntimeContext$1, SuiteHooks as SuiteHooks$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
|
|
2
2
|
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
import { S as SerializedTestSpecification, b as CoverageProvider$1, a as ReportContext$1, c as CoverageProviderModule$1, g as CoverageReporter$1, h as CoverageProviderName, i as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, j as CoverageIstanbulOptions$1, d as CoverageV8Options$1, k as CustomProviderOptions$1, l as Reporter$1, V as Vitest$1, m as BrowserScript$1, n as BrowserConfigOptions$1, o as BuiltinEnvironment$1, p as VitestEnvironment$1, P as Pool$1, q as PoolOptions$1, r as CSSModuleScopeStrategy$1, A as ApiConfig$1, s as VitestRunMode$1, D as DepsOptimizationOptions$1, t as TransformModePatterns$1, I as InlineConfig$1, u as TypecheckConfig$1, v as UserConfig$1, w as ResolvedConfig$1, x as ProjectConfig$1, U as UserWorkspaceConfig$1, y as BenchmarkUserOptions$1 } from './chunks/reporters.
|
|
3
|
+
import { S as SerializedTestSpecification, b as CoverageProvider$1, a as ReportContext$1, c as CoverageProviderModule$1, g as CoverageReporter$1, h as CoverageProviderName, i as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, j as CoverageIstanbulOptions$1, d as CoverageV8Options$1, k as CustomProviderOptions$1, l as Reporter$1, V as Vitest$1, m as BrowserScript$1, n as BrowserConfigOptions$1, o as BuiltinEnvironment$1, p as VitestEnvironment$1, P as Pool$1, q as PoolOptions$1, r as CSSModuleScopeStrategy$1, A as ApiConfig$1, s as VitestRunMode$1, D as DepsOptimizationOptions$1, t as TransformModePatterns$1, I as InlineConfig$1, u as TypecheckConfig$1, v as UserConfig$1, w as ResolvedConfig$1, x as ProjectConfig$1, U as UserWorkspaceConfig$1, y as BenchmarkUserOptions$1 } from './chunks/reporters.6vxQttCV.js';
|
|
4
4
|
import { W as WorkerContext$1 } from './chunks/worker.B1y96qmv.js';
|
|
5
5
|
import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.CnI8_G5V.js';
|
|
6
6
|
import { M as ModuleGraphData, b as Awaitable$1, U as UserConsoleLog, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d8YfPkTm.js';
|
|
7
7
|
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d8YfPkTm.js';
|
|
8
8
|
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.CIpff8Eg.js';
|
|
9
9
|
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.CIpff8Eg.js';
|
|
10
|
-
import './chunks/vite.
|
|
10
|
+
import './chunks/vite.Cu7NWuBa.js';
|
|
11
11
|
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.BRtC-JeT.js';
|
|
12
12
|
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.BRtC-JeT.js';
|
|
13
13
|
import { ExpectStatic } from '@vitest/expect';
|
|
@@ -112,7 +112,7 @@ declare function runOnce<T>(fn: () => T, key?: string): T;
|
|
|
112
112
|
*/
|
|
113
113
|
declare function isFirstRun(): boolean;
|
|
114
114
|
|
|
115
|
-
declare function getRunningMode(): "
|
|
115
|
+
declare function getRunningMode(): "run" | "watch";
|
|
116
116
|
declare function isWatchMode(): boolean;
|
|
117
117
|
|
|
118
118
|
type WaitForCallback<T> = () => T | Promise<T>;
|