@rstest/core 0.7.7 → 0.7.9

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.
Files changed (57) hide show
  1. package/LICENSE.md +294 -0
  2. package/dist/0~130.js +2 -2
  3. package/dist/0~1472.js +48 -0
  4. package/dist/0~1981.js +3 -0
  5. package/dist/0~2173.js +25 -10
  6. package/dist/0~2255.js +2 -2
  7. package/dist/0~3062.js +0 -5
  8. package/dist/0~3919.js +1 -1
  9. package/dist/0~4403.js +6 -5
  10. package/dist/0~4809.js +4 -4
  11. package/dist/0~5835.js +2 -2
  12. package/dist/0~62.js +3 -3
  13. package/dist/0~6588.js +3 -3
  14. package/dist/0~6923.js +2 -2
  15. package/dist/0~7583.js +9 -8
  16. package/dist/0~7882.js +1144 -0
  17. package/dist/0~8426.js +1 -2
  18. package/dist/0~89.js +33 -24
  19. package/dist/0~9348.js +953 -0
  20. package/dist/0~9634.js +58 -10
  21. package/dist/1157.js +13 -118
  22. package/dist/{7913.js → 1294.js} +51 -1745
  23. package/dist/2672.js +647 -0
  24. package/dist/3278.js +3 -450
  25. package/dist/4484.js +38 -0
  26. package/dist/487.js +1739 -0
  27. package/dist/4899.js +11 -0
  28. package/dist/5734.js +1 -1
  29. package/dist/{0~6151.js → 6151.js} +169 -21
  30. package/dist/{0~6973.js → 6973.js} +5 -5
  31. package/dist/721.js +9 -0
  32. package/dist/9131.js +559 -502
  33. package/dist/browser-runtime/2~907.js +1211 -0
  34. package/dist/browser-runtime/2~907.js.map +1 -0
  35. package/dist/browser-runtime/389.js +22071 -0
  36. package/dist/browser-runtime/389.js.LICENSE.txt +329 -0
  37. package/dist/browser-runtime/389.js.map +1 -0
  38. package/dist/browser-runtime/index.d.ts +2806 -0
  39. package/dist/browser-runtime/index.js +1 -0
  40. package/dist/browser-runtime/rslib-runtime.js +50 -0
  41. package/dist/browser-runtime/rslib-runtime.js.map +1 -0
  42. package/dist/browser.d.ts +3329 -0
  43. package/dist/browser.js +14 -0
  44. package/dist/cssFilterLoader.mjs +1 -1
  45. package/dist/globalSetupWorker.js +3 -2
  46. package/dist/index.d.ts +67 -2
  47. package/dist/index.js +2 -1
  48. package/dist/rslib-runtime.js +27 -0
  49. package/dist/rstestSuppressWarnings.cjs +9 -0
  50. package/dist/worker.d.ts +66 -2
  51. package/dist/worker.js +415 -1
  52. package/package.json +29 -14
  53. package/dist/0~8957.js +0 -149
  54. package/dist/554.js +0 -417
  55. package/dist/5693.js +0 -91
  56. /package/dist/{7913.js.LICENSE.txt → 1294.js.LICENSE.txt} +0 -0
  57. /package/dist/{0~6151.js.LICENSE.txt → 6151.js.LICENSE.txt} +0 -0
package/dist/2672.js ADDED
@@ -0,0 +1,647 @@
1
+ import 'module';
2
+ /*#__PURE__*/ import.meta.url;
3
+ import * as __rspack_external_node_fs_5ea92f0c from "node:fs";
4
+ import * as __rspack_external_node_os_74b4b876 from "node:os";
5
+ import * as __rspack_external_node_path_c5b9b54f from "node:path";
6
+ import * as __rspack_external_node_tty_c64aab7e from "node:tty";
7
+ import { __webpack_require__ } from "./rslib-runtime.js";
8
+ __webpack_require__.add({
9
+ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js" (module) {
10
+ let p = process || {}, argv = p.argv || [], env = p.env || {};
11
+ let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || "win32" === p.platform || (p.stdout || {}).isTTY && "dumb" !== env.TERM || !!env.CI);
12
+ let formatter = (open, close, replace = open)=>(input)=>{
13
+ let string = "" + input, index = string.indexOf(close, open.length);
14
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
15
+ };
16
+ let replaceClose = (string, close, replace, index)=>{
17
+ let result = "", cursor = 0;
18
+ do {
19
+ result += string.substring(cursor, index) + replace;
20
+ cursor = index + close.length;
21
+ index = string.indexOf(close, cursor);
22
+ }while (~index);
23
+ return result + string.substring(cursor);
24
+ };
25
+ let createColors = (enabled = isColorSupported)=>{
26
+ let f = enabled ? formatter : ()=>String;
27
+ return {
28
+ isColorSupported: enabled,
29
+ reset: f("\x1b[0m", "\x1b[0m"),
30
+ bold: f("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m"),
31
+ dim: f("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m"),
32
+ italic: f("\x1b[3m", "\x1b[23m"),
33
+ underline: f("\x1b[4m", "\x1b[24m"),
34
+ inverse: f("\x1b[7m", "\x1b[27m"),
35
+ hidden: f("\x1b[8m", "\x1b[28m"),
36
+ strikethrough: f("\x1b[9m", "\x1b[29m"),
37
+ black: f("\x1b[30m", "\x1b[39m"),
38
+ red: f("\x1b[31m", "\x1b[39m"),
39
+ green: f("\x1b[32m", "\x1b[39m"),
40
+ yellow: f("\x1b[33m", "\x1b[39m"),
41
+ blue: f("\x1b[34m", "\x1b[39m"),
42
+ magenta: f("\x1b[35m", "\x1b[39m"),
43
+ cyan: f("\x1b[36m", "\x1b[39m"),
44
+ white: f("\x1b[37m", "\x1b[39m"),
45
+ gray: f("\x1b[90m", "\x1b[39m"),
46
+ bgBlack: f("\x1b[40m", "\x1b[49m"),
47
+ bgRed: f("\x1b[41m", "\x1b[49m"),
48
+ bgGreen: f("\x1b[42m", "\x1b[49m"),
49
+ bgYellow: f("\x1b[43m", "\x1b[49m"),
50
+ bgBlue: f("\x1b[44m", "\x1b[49m"),
51
+ bgMagenta: f("\x1b[45m", "\x1b[49m"),
52
+ bgCyan: f("\x1b[46m", "\x1b[49m"),
53
+ bgWhite: f("\x1b[47m", "\x1b[49m"),
54
+ blackBright: f("\x1b[90m", "\x1b[39m"),
55
+ redBright: f("\x1b[91m", "\x1b[39m"),
56
+ greenBright: f("\x1b[92m", "\x1b[39m"),
57
+ yellowBright: f("\x1b[93m", "\x1b[39m"),
58
+ blueBright: f("\x1b[94m", "\x1b[39m"),
59
+ magentaBright: f("\x1b[95m", "\x1b[39m"),
60
+ cyanBright: f("\x1b[96m", "\x1b[39m"),
61
+ whiteBright: f("\x1b[97m", "\x1b[39m"),
62
+ bgBlackBright: f("\x1b[100m", "\x1b[49m"),
63
+ bgRedBright: f("\x1b[101m", "\x1b[49m"),
64
+ bgGreenBright: f("\x1b[102m", "\x1b[49m"),
65
+ bgYellowBright: f("\x1b[103m", "\x1b[49m"),
66
+ bgBlueBright: f("\x1b[104m", "\x1b[49m"),
67
+ bgMagentaBright: f("\x1b[105m", "\x1b[49m"),
68
+ bgCyanBright: f("\x1b[106m", "\x1b[49m"),
69
+ bgWhiteBright: f("\x1b[107m", "\x1b[49m")
70
+ };
71
+ };
72
+ module.exports = createColors();
73
+ module.exports.createColors = createColors;
74
+ },
75
+ fs (module) {
76
+ module.exports = __rspack_external_node_fs_5ea92f0c;
77
+ },
78
+ "node:os" (module) {
79
+ module.exports = __rspack_external_node_os_74b4b876;
80
+ },
81
+ "node:path" (module) {
82
+ module.exports = __rspack_external_node_path_c5b9b54f;
83
+ },
84
+ "node:tty" (module) {
85
+ module.exports = __rspack_external_node_tty_c64aab7e;
86
+ }
87
+ });
88
+ let _lazyMatch = ()=>{
89
+ var __lib__ = (()=>{
90
+ var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e)=>{
91
+ for(var n in e)m(r, n, {
92
+ get: e[n],
93
+ enumerable: true
94
+ });
95
+ }, H = (r, e, n, a)=>{
96
+ if (e && "object" == typeof e || "function" == typeof e) for (let t of G(e))T.call(r, t) || t === n || m(r, t, {
97
+ get: ()=>e[t],
98
+ enumerable: !(a = V(e, t)) || a.enumerable
99
+ });
100
+ return r;
101
+ }, J = (r)=>H(m({}, "__esModule", {
102
+ value: true
103
+ }), r), w = {};
104
+ q(w, {
105
+ default: ()=>re
106
+ });
107
+ var A = (r)=>Array.isArray(r), d = (r)=>"function" == typeof r, Q = (r)=>0 === r.length, W = (r)=>"number" == typeof r, K = (r)=>"object" == typeof r && null !== r, X = (r)=>r instanceof RegExp, b = (r)=>"string" == typeof r, h = (r)=>void 0 === r, Y = (r)=>{
108
+ const e = new Map;
109
+ return (n)=>{
110
+ const a = e.get(n);
111
+ if (a) return a;
112
+ const t = r(n);
113
+ return e.set(n, t), t;
114
+ };
115
+ }, rr = (r, e, n = {})=>{
116
+ const a = {
117
+ cache: {},
118
+ input: r,
119
+ index: 0,
120
+ indexMax: 0,
121
+ options: n,
122
+ output: []
123
+ };
124
+ if (v(e)(a) && a.index === r.length) return a.output;
125
+ throw new Error(`Failed to parse at index ${a.indexMax}`);
126
+ }, i = (r, e)=>A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e)=>{
127
+ const n = {};
128
+ for (const a of r){
129
+ if (1 !== a.length) throw new Error(`Invalid character: "${a}"`);
130
+ const t = a.charCodeAt(0);
131
+ n[t] = true;
132
+ }
133
+ return (a)=>{
134
+ const t = a.index, o = a.input;
135
+ for(; a.index < o.length && o.charCodeAt(a.index) in n;)a.index += 1;
136
+ const u = a.index;
137
+ if (u > t) {
138
+ if (!h(e) && !a.options.silent) {
139
+ const s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
140
+ h(c) || a.output.push(c);
141
+ }
142
+ a.indexMax = Math.max(a.indexMax, a.index);
143
+ }
144
+ return true;
145
+ };
146
+ }, nr = (r, e)=>{
147
+ const n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
148
+ return g((o)=>{
149
+ t.lastIndex = o.index;
150
+ const u = t.exec(o.input);
151
+ if (!u) return false;
152
+ if (!h(e) && !o.options.silent) {
153
+ const s = d(e) ? e(...u, o.input, String(o.index)) : e;
154
+ h(s) || o.output.push(s);
155
+ }
156
+ return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
157
+ });
158
+ }, ar = (r, e)=>(n)=>{
159
+ if (!n.input.startsWith(r, n.index)) return false;
160
+ if (!h(e) && !n.options.silent) {
161
+ const t = d(e) ? e(r, n.input, String(n.index)) : e;
162
+ h(t) || n.output.push(t);
163
+ }
164
+ return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
165
+ }, C = (r, e, n, a)=>{
166
+ const t = v(r);
167
+ return g(_(M((o)=>{
168
+ let u = 0;
169
+ for(; u < n;){
170
+ const s = o.index;
171
+ if (!t(o) || (u += 1, o.index === s)) break;
172
+ }
173
+ return u >= e;
174
+ })));
175
+ }, tr = (r, e)=>C(r, 0, 1), f = (r, e)=>C(r, 0, 1 / 0), x = (r, e)=>{
176
+ const n = r.map(v);
177
+ return g(_(M((a)=>{
178
+ for(let t = 0, o = n.length; t < o; t++)if (!n[t](a)) return false;
179
+ return true;
180
+ })));
181
+ }, l = (r, e)=>{
182
+ const n = r.map(v);
183
+ return g(_((a)=>{
184
+ for(let t = 0, o = n.length; t < o; t++)if (n[t](a)) return true;
185
+ return false;
186
+ }));
187
+ }, M = (r, e = false)=>{
188
+ const n = v(r);
189
+ return (a)=>{
190
+ const t = a.index, o = a.output.length, u = n(a);
191
+ return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
192
+ };
193
+ }, _ = (r, e)=>{
194
+ const n = v(r);
195
+ return n;
196
+ }, g = (()=>{
197
+ let r = 0;
198
+ return (e)=>{
199
+ const n = v(e), a = r += 1;
200
+ return (t)=>{
201
+ var o;
202
+ if (false === t.options.memoization) return n(t);
203
+ const u = t.index, s = (o = t.cache)[a] || (o[a] = new Map), c = s.get(u);
204
+ if (false === c) return false;
205
+ if (W(c)) return t.index = c, true;
206
+ if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), true;
207
+ {
208
+ const Z = t.output.length;
209
+ if (!n(t)) return s.set(u, false), false;
210
+ {
211
+ const D = t.index, U = t.output.length;
212
+ if (U > Z) {
213
+ const ee = t.output.slice(Z, U);
214
+ s.set(u, {
215
+ index: D,
216
+ output: ee
217
+ });
218
+ } else s.set(u, D);
219
+ return true;
220
+ }
221
+ }
222
+ };
223
+ };
224
+ })(), E = (r)=>{
225
+ let e;
226
+ return (n)=>(e || (e = v(r())), e(n));
227
+ }, v = Y((r)=>{
228
+ if (d(r)) return Q(r) ? E(r) : r;
229
+ if (b(r) || X(r)) return i(r);
230
+ if (A(r)) return x(r);
231
+ if (K(r)) return l(Object.values(r));
232
+ throw new Error("Invalid rule");
233
+ }), P = "abcdefghijklmnopqrstuvwxyz", ir = (r)=>{
234
+ let e = "";
235
+ for(; r > 0;){
236
+ const n = (r - 1) % 26;
237
+ e = P[n] + e, r = Math.floor((r - 1) / 26);
238
+ }
239
+ return e;
240
+ }, O = (r)=>{
241
+ let e = 0;
242
+ for(let n = 0, a = r.length; n < a; n++)e = 26 * e + P.indexOf(r[n]) + 1;
243
+ return e;
244
+ }, S = (r, e)=>{
245
+ if (e < r) return S(e, r);
246
+ const n = [];
247
+ for(; r <= e;)n.push(r++);
248
+ return n;
249
+ }, or = (r, e, n)=>S(r, e).map((a)=>String(a).padStart(n, "0")), R = (r, e)=>S(O(r), O(e)).map(ir), p = (r)=>r, z = (r)=>ur((e)=>rr(e, r, {
250
+ memoization: false
251
+ }).join("")), ur = (r)=>{
252
+ const e = {};
253
+ return (n)=>e[n] ?? (e[n] = r(n));
254
+ }, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n)=>`.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a)=>`.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r)=>`\\${r}`), vr = i(/./, p), hr = i(/^(?:!!)*!(.*)$/, (r, e)=>`(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([
255
+ hr,
256
+ dr
257
+ ]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([
258
+ xr,
259
+ gr,
260
+ mr,
261
+ _r
262
+ ]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([
263
+ Sr,
264
+ yr
265
+ ]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r)=>`\\${r}`), Mr = i(/[^\]]/, p), Er = l([
266
+ y,
267
+ Cr,
268
+ br,
269
+ Mr
270
+ ]), B = x([
271
+ $r,
272
+ tr(Ar),
273
+ f(Er),
274
+ wr
275
+ ]), Pr = i("{", "(?:"), Or = i("}", ")"), Rr = i(/(\d+)\.\.(\d+)/, (r, e, n)=>or(+e, +n, Math.min(e.length, n.length)).join("|")), zr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n)=>R(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n)=>R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([
276
+ Rr,
277
+ zr,
278
+ jr
279
+ ]), I = x([
280
+ Pr,
281
+ Nr,
282
+ Or
283
+ ]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r)=>`\\${r}`), Lr = i(/[^}]/, p), Zr = E(()=>F), Dr = l([
284
+ j,
285
+ N,
286
+ k,
287
+ B,
288
+ I,
289
+ Zr,
290
+ y,
291
+ Fr,
292
+ Ir,
293
+ Lr
294
+ ]), F = x([
295
+ kr,
296
+ f(Dr),
297
+ Br
298
+ ]), Ur = f(l([
299
+ sr,
300
+ cr,
301
+ lr,
302
+ fr,
303
+ j,
304
+ N,
305
+ k,
306
+ B,
307
+ I,
308
+ F,
309
+ y,
310
+ pr,
311
+ vr
312
+ ])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e)=>`${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e)=>`${e}*`), Wr = f(l([
313
+ Tr,
314
+ Hr,
315
+ Jr,
316
+ Qr,
317
+ qr
318
+ ])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e)=>{
319
+ const n = Array.isArray(r) ? r : [
320
+ r
321
+ ];
322
+ if (!n.length) return false;
323
+ const a = n.map($.compile), t = n.every((s)=>/(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
324
+ return a.some((s)=>s.test(o));
325
+ };
326
+ $.compile = (r)=>new RegExp(`^${L(Yr(r))}$`, "s");
327
+ var re = $;
328
+ return J(w);
329
+ })();
330
+ return __lib__.default || __lib__;
331
+ };
332
+ let _match;
333
+ const zeptomatch = (path, pattern)=>{
334
+ if (!_match) {
335
+ _match = _lazyMatch();
336
+ _lazyMatch = null;
337
+ }
338
+ return _match(path, pattern);
339
+ };
340
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
341
+ function normalizeWindowsPath(input = "") {
342
+ if (!input) return input;
343
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r)=>r.toUpperCase());
344
+ }
345
+ const _UNC_REGEX = /^[/\\]{2}/;
346
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
347
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
348
+ const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
349
+ const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
350
+ const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
351
+ const sep = "/";
352
+ const normalize = function(path) {
353
+ if (0 === path.length) return ".";
354
+ path = normalizeWindowsPath(path);
355
+ const isUNCPath = path.match(_UNC_REGEX);
356
+ const isPathAbsolute = isAbsolute(path);
357
+ const trailingSeparator = "/" === path[path.length - 1];
358
+ path = normalizeString(path, !isPathAbsolute);
359
+ if (0 === path.length) {
360
+ if (isPathAbsolute) return "/";
361
+ return trailingSeparator ? "./" : ".";
362
+ }
363
+ if (trailingSeparator) path += "/";
364
+ if (_DRIVE_LETTER_RE.test(path)) path += "/";
365
+ if (isUNCPath) {
366
+ if (!isPathAbsolute) return `//./${path}`;
367
+ return `//${path}`;
368
+ }
369
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
370
+ };
371
+ const join = function(...segments) {
372
+ let path = "";
373
+ for (const seg of segments)if (seg) if (path.length > 0) {
374
+ const pathTrailing = "/" === path[path.length - 1];
375
+ const segLeading = "/" === seg[0];
376
+ const both = pathTrailing && segLeading;
377
+ if (both) path += seg.slice(1);
378
+ else path += pathTrailing || segLeading ? seg : `/${seg}`;
379
+ } else path += seg;
380
+ return normalize(path);
381
+ };
382
+ function cwd() {
383
+ if ("u" > typeof process && "function" == typeof process.cwd) return process.cwd().replace(/\\/g, "/");
384
+ return "/";
385
+ }
386
+ const resolve = function(...arguments_) {
387
+ arguments_ = arguments_.map((argument)=>normalizeWindowsPath(argument));
388
+ let resolvedPath = "";
389
+ let resolvedAbsolute = false;
390
+ for(let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--){
391
+ const path = index >= 0 ? arguments_[index] : cwd();
392
+ if (path && 0 !== path.length) {
393
+ resolvedPath = `${path}/${resolvedPath}`;
394
+ resolvedAbsolute = isAbsolute(path);
395
+ }
396
+ }
397
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
398
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
399
+ return resolvedPath.length > 0 ? resolvedPath : ".";
400
+ };
401
+ function normalizeString(path, allowAboveRoot) {
402
+ let res = "";
403
+ let lastSegmentLength = 0;
404
+ let lastSlash = -1;
405
+ let dots = 0;
406
+ let char = null;
407
+ for(let index = 0; index <= path.length; ++index){
408
+ if (index < path.length) char = path[index];
409
+ else if ("/" === char) break;
410
+ else char = "/";
411
+ if ("/" === char) {
412
+ if (lastSlash === index - 1 || 1 === dots) ;
413
+ else if (2 === dots) {
414
+ if (res.length < 2 || 2 !== lastSegmentLength || "." !== res[res.length - 1] || "." !== res[res.length - 2]) {
415
+ if (res.length > 2) {
416
+ const lastSlashIndex = res.lastIndexOf("/");
417
+ if (-1 === lastSlashIndex) {
418
+ res = "";
419
+ lastSegmentLength = 0;
420
+ } else {
421
+ res = res.slice(0, lastSlashIndex);
422
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
423
+ }
424
+ lastSlash = index;
425
+ dots = 0;
426
+ continue;
427
+ } else if (res.length > 0) {
428
+ res = "";
429
+ lastSegmentLength = 0;
430
+ lastSlash = index;
431
+ dots = 0;
432
+ continue;
433
+ }
434
+ }
435
+ if (allowAboveRoot) {
436
+ res += res.length > 0 ? "/.." : "..";
437
+ lastSegmentLength = 2;
438
+ }
439
+ } else {
440
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
441
+ else res = path.slice(lastSlash + 1, index);
442
+ lastSegmentLength = index - lastSlash - 1;
443
+ }
444
+ lastSlash = index;
445
+ dots = 0;
446
+ } else if ("." === char && -1 !== dots) ++dots;
447
+ else dots = -1;
448
+ }
449
+ return res;
450
+ }
451
+ const isAbsolute = function(p) {
452
+ return _IS_ABSOLUTE_RE.test(p);
453
+ };
454
+ const toNamespacedPath = function(p) {
455
+ return normalizeWindowsPath(p);
456
+ };
457
+ const extname = function(p) {
458
+ if (".." === p) return "";
459
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
460
+ return match && match[1] || "";
461
+ };
462
+ const relative = function(from, to) {
463
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
464
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
465
+ if (":" === _to[0][1] && ":" === _from[0][1] && _from[0] !== _to[0]) return _to.join("/");
466
+ const _fromCopy = [
467
+ ..._from
468
+ ];
469
+ for (const segment of _fromCopy){
470
+ if (_to[0] !== segment) break;
471
+ _from.shift();
472
+ _to.shift();
473
+ }
474
+ return [
475
+ ..._from.map(()=>".."),
476
+ ..._to
477
+ ].join("/");
478
+ };
479
+ const dirname = function(p) {
480
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
481
+ if (1 === segments.length && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
482
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
483
+ };
484
+ const format = function(p) {
485
+ const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
486
+ const segments = [
487
+ p.root,
488
+ p.dir,
489
+ p.base ?? (p.name ?? "") + ext
490
+ ].filter(Boolean);
491
+ return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
492
+ };
493
+ const basename = function(p, extension) {
494
+ const segments = normalizeWindowsPath(p).split("/");
495
+ let lastSegment = "";
496
+ for(let i = segments.length - 1; i >= 0; i--){
497
+ const val = segments[i];
498
+ if (val) {
499
+ lastSegment = val;
500
+ break;
501
+ }
502
+ }
503
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
504
+ };
505
+ const parse = function(p) {
506
+ const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
507
+ const base = basename(p);
508
+ const extension = extname(base);
509
+ return {
510
+ root,
511
+ dir: dirname(p),
512
+ base,
513
+ ext: extension,
514
+ name: base.slice(0, base.length - extension.length)
515
+ };
516
+ };
517
+ const matchesGlob = (path, pattern)=>zeptomatch(pattern, normalize(path));
518
+ const _path = {
519
+ __proto__: null,
520
+ basename: basename,
521
+ dirname: dirname,
522
+ extname: extname,
523
+ format: format,
524
+ isAbsolute: isAbsolute,
525
+ join: join,
526
+ matchesGlob: matchesGlob,
527
+ normalize: normalize,
528
+ normalizeString: normalizeString,
529
+ parse: parse,
530
+ relative: relative,
531
+ resolve: resolve,
532
+ sep: sep,
533
+ toNamespacedPath: toNamespacedPath
534
+ };
535
+ const picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
536
+ var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
537
+ const formatRootStr = (rootStr, root)=>rootStr.replace('<rootDir>', normalize(root));
538
+ function getAbsolutePath(base, filepath) {
539
+ return isAbsolute(filepath) ? filepath : join(base, filepath);
540
+ }
541
+ const parsePosix = (filePath)=>{
542
+ const { dir, base } = parse(filePath);
543
+ return {
544
+ dir: dir.split("/").join('/'),
545
+ base
546
+ };
547
+ };
548
+ const isObject = (obj)=>'[object Object]' === Object.prototype.toString.call(obj);
549
+ const castArray = (arr)=>{
550
+ if (void 0 === arr) return [];
551
+ return Array.isArray(arr) ? arr : [
552
+ arr
553
+ ];
554
+ };
555
+ const isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && Object.getPrototypeOf(obj) === Object.prototype;
556
+ function formatError(error) {
557
+ if ('string' == typeof error || error instanceof Error) return error;
558
+ if (isPlainObject(error) && error.message) {
559
+ const e = new Error(error.name || 'unknown error');
560
+ e.message = error.message;
561
+ e.stack = error.stack;
562
+ return e;
563
+ }
564
+ return String(error);
565
+ }
566
+ const prettyTime = (milliseconds)=>{
567
+ if (milliseconds < 1000) return `${Math.round(milliseconds)}ms`;
568
+ const seconds = milliseconds / 1000;
569
+ const getSecond = (seconds, needDigits)=>{
570
+ if (!needDigits || seconds === Math.ceil(seconds)) return `${Math.round(seconds).toString()}s`;
571
+ const digits = seconds < 10 ? seconds >= 0.01 ? 2 : 3 : 1;
572
+ return `${seconds.toFixed(digits)}s`;
573
+ };
574
+ const minutes = Math.floor(seconds / 60);
575
+ const secondsRemainder = seconds % 60;
576
+ let time = '';
577
+ if (minutes > 0) time += `${minutes}m`;
578
+ if (secondsRemainder > 0) {
579
+ if (minutes > 0) time += ' ';
580
+ time += getSecond(secondsRemainder, !minutes);
581
+ }
582
+ return time;
583
+ };
584
+ const getTaskNames = (test)=>(test.parentNames || []).concat(test.name).filter(Boolean);
585
+ const getTaskNameWithPrefix = (test, delimiter = ">")=>getTaskNames(test).join(` ${delimiter} `);
586
+ const REGEXP_FLAG_PREFIX = 'RSTEST_REGEXP:';
587
+ const wrapRegex = (value)=>`${REGEXP_FLAG_PREFIX}${value.toString()}`;
588
+ const unwrapRegex = (value)=>{
589
+ if (value.startsWith(REGEXP_FLAG_PREFIX)) {
590
+ const regexStr = value.slice(REGEXP_FLAG_PREFIX.length);
591
+ const matches = regexStr.match(/^\/(.+)\/([gimuy]*)$/);
592
+ if (matches) {
593
+ const [, pattern, flags] = matches;
594
+ return new RegExp(pattern, flags);
595
+ }
596
+ }
597
+ return value;
598
+ };
599
+ const serializableConfig = (normalizedConfig)=>{
600
+ const { testNamePattern } = normalizedConfig;
601
+ return {
602
+ ...normalizedConfig,
603
+ testNamePattern: testNamePattern && 'string' != typeof testNamePattern ? wrapRegex(testNamePattern) : testNamePattern
604
+ };
605
+ };
606
+ const undoSerializableConfig = (normalizedConfig)=>{
607
+ const { testNamePattern } = normalizedConfig;
608
+ return {
609
+ ...normalizedConfig,
610
+ testNamePattern: testNamePattern && 'string' == typeof testNamePattern ? unwrapRegex(testNamePattern) : testNamePattern
611
+ };
612
+ };
613
+ const getNodeVersion = ()=>{
614
+ if ('string' == typeof process.versions?.node) {
615
+ const [major = 0, minor = 0, patch = 0] = process.versions.node.split('.').map(Number);
616
+ return {
617
+ major,
618
+ minor,
619
+ patch
620
+ };
621
+ }
622
+ return {
623
+ major: 0,
624
+ minor: 0,
625
+ patch: 0
626
+ };
627
+ };
628
+ const needFlagExperimentalDetectModule = ()=>{
629
+ const { major, minor } = getNodeVersion();
630
+ if (20 === major && minor >= 10) return true;
631
+ if (22 === major && minor < 7) return true;
632
+ return false;
633
+ };
634
+ const ADDITIONAL_NODE_BUILTINS = [
635
+ /^node:/,
636
+ 'pnpapi'
637
+ ];
638
+ const bgColor = (background, str)=>{
639
+ if ([
640
+ 'bgRed',
641
+ 'bgBlack'
642
+ ].includes(background)) return picocolors_default()[background](picocolors_default().white(picocolors_default().bold(str)));
643
+ return picocolors_default()[background](picocolors_default().blackBright(picocolors_default().bold(str)));
644
+ };
645
+ const isTTY = (type = 'stdout')=>('stdin' === type ? process.stdin.isTTY : process.stdout.isTTY) && !process.env.CI;
646
+ const isDeno = "u" > typeof process && process.versions?.deno !== void 0;
647
+ export { ADDITIONAL_NODE_BUILTINS, _path, basename, bgColor, castArray, dirname, formatError, formatRootStr, getAbsolutePath, getTaskNameWithPrefix, isAbsolute, isDeno, isObject, isTTY, join, needFlagExperimentalDetectModule, normalize, parsePosix, prettyTime, relative, resolve, serializableConfig, undoSerializableConfig };