@rstest/core 0.4.1 → 0.5.0

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/worker.js CHANGED
@@ -8,12 +8,10 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__ from "node:os";
8
8
  import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
9
9
  import * as __WEBPACK_EXTERNAL_MODULE_node_tty_c64aab7e__ from "node:tty";
10
10
  import * as __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__ from "node:util";
11
- import * as __WEBPACK_EXTERNAL_MODULE_pathe__ from "pathe";
12
11
  import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
13
12
  import * as __WEBPACK_EXTERNAL_MODULE_node_url_e96de089__ from "node:url";
14
13
  import * as __WEBPACK_EXTERNAL_MODULE_node_vm_bd3d9cea__ from "node:vm";
15
14
  import * as __WEBPACK_EXTERNAL_MODULE_node_v8_d0df5498__ from "node:v8";
16
- import * as __WEBPACK_EXTERNAL_MODULE_birpc__ from "birpc";
17
15
  var __webpack_modules__ = {
18
16
  "../../node_modules/.pnpm/@jest+diff-sequences@30.0.1/node_modules/@jest/diff-sequences/build/index.js": function(module) {
19
17
  /*!
@@ -5089,11 +5087,10 @@ var __webpack_modules__ = {
5089
5087
  fN: ()=>getTaskNameWithPrefix,
5090
5088
  gy: ()=>undoSerializableConfig,
5091
5089
  kV: ()=>prettyTime,
5092
- yW: ()=>picocolors__WEBPACK_IMPORTED_MODULE_2___default.a
5090
+ yW: ()=>picocolors__WEBPACK_IMPORTED_MODULE_1___default.a
5093
5091
  });
5094
- __webpack_require__("pathe");
5095
- var picocolors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
5096
- var picocolors__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/ __webpack_require__.n(picocolors__WEBPACK_IMPORTED_MODULE_2__);
5092
+ var picocolors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
5093
+ var picocolors__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(picocolors__WEBPACK_IMPORTED_MODULE_1__);
5097
5094
  __webpack_require__("./src/utils/constants.ts");
5098
5095
  const isObject = (obj)=>'[object Object]' === Object.prototype.toString.call(obj);
5099
5096
  const castArray = (arr)=>{
@@ -5154,10 +5151,9 @@ var __webpack_modules__ = {
5154
5151
  var constants = __webpack_require__("./src/utils/constants.ts");
5155
5152
  var helper = __webpack_require__("./src/utils/helper.ts");
5156
5153
  __webpack_require__("./src/utils/logger.ts");
5157
- __webpack_require__("fs");
5154
+ __webpack_require__("node:fs");
5158
5155
  __webpack_require__("node:fs/promises");
5159
5156
  __webpack_require__("node:module");
5160
- __webpack_require__("pathe");
5161
5157
  },
5162
5158
  "./src/utils/logger.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5163
5159
  __webpack_require__.d(__webpack_exports__, {
@@ -5443,7 +5439,7 @@ var __webpack_modules__ = {
5443
5439
  "timers/promises": function(module) {
5444
5440
  module.exports = require("timers/promises");
5445
5441
  },
5446
- fs: function(module) {
5442
+ "node:fs": function(module) {
5447
5443
  module.exports = __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__;
5448
5444
  },
5449
5445
  "node:fs/promises": function(module) {
@@ -5455,7 +5451,7 @@ var __webpack_modules__ = {
5455
5451
  "node:os": function(module) {
5456
5452
  module.exports = __WEBPACK_EXTERNAL_MODULE_node_os_74b4b876__;
5457
5453
  },
5458
- "node:path": function(module) {
5454
+ path: function(module) {
5459
5455
  module.exports = __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__;
5460
5456
  },
5461
5457
  "node:tty": function(module) {
@@ -5464,8 +5460,462 @@ var __webpack_modules__ = {
5464
5460
  "node:util": function(module) {
5465
5461
  module.exports = __WEBPACK_EXTERNAL_MODULE_node_util_1b29d436__;
5466
5462
  },
5467
- pathe: function(module) {
5468
- module.exports = __WEBPACK_EXTERNAL_MODULE_pathe__;
5463
+ "../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
5464
+ __webpack_require__.d(__webpack_exports__, {
5465
+ _: ()=>_path,
5466
+ c: ()=>basename,
5467
+ d: ()=>dirname,
5468
+ i: ()=>isAbsolute,
5469
+ j: ()=>join,
5470
+ r: ()=>resolve
5471
+ });
5472
+ let _lazyMatch = ()=>{
5473
+ var __lib__ = (()=>{
5474
+ var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e)=>{
5475
+ for(var n in e)m(r, n, {
5476
+ get: e[n],
5477
+ enumerable: true
5478
+ });
5479
+ }, H = (r, e, n, a)=>{
5480
+ if (e && "object" == typeof e || "function" == typeof e) for (let t of G(e))T.call(r, t) || t === n || m(r, t, {
5481
+ get: ()=>e[t],
5482
+ enumerable: !(a = V(e, t)) || a.enumerable
5483
+ });
5484
+ return r;
5485
+ }, J = (r)=>H(m({}, "__esModule", {
5486
+ value: true
5487
+ }), r), w = {};
5488
+ q(w, {
5489
+ default: ()=>re
5490
+ });
5491
+ 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)=>{
5492
+ const e = new Map;
5493
+ return (n)=>{
5494
+ const a = e.get(n);
5495
+ if (a) return a;
5496
+ const t = r(n);
5497
+ return e.set(n, t), t;
5498
+ };
5499
+ }, rr = (r, e, n = {})=>{
5500
+ const a = {
5501
+ cache: {},
5502
+ input: r,
5503
+ index: 0,
5504
+ indexMax: 0,
5505
+ options: n,
5506
+ output: []
5507
+ };
5508
+ if (v(e)(a) && a.index === r.length) return a.output;
5509
+ throw new Error(`Failed to parse at index ${a.indexMax}`);
5510
+ }, i = (r, e)=>A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e)=>{
5511
+ const n = {};
5512
+ for (const a of r){
5513
+ if (1 !== a.length) throw new Error(`Invalid character: "${a}"`);
5514
+ const t = a.charCodeAt(0);
5515
+ n[t] = true;
5516
+ }
5517
+ return (a)=>{
5518
+ const t = a.index, o = a.input;
5519
+ for(; a.index < o.length && o.charCodeAt(a.index) in n;)a.index += 1;
5520
+ const u = a.index;
5521
+ if (u > t) {
5522
+ if (!h(e) && !a.options.silent) {
5523
+ const s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
5524
+ h(c) || a.output.push(c);
5525
+ }
5526
+ a.indexMax = Math.max(a.indexMax, a.index);
5527
+ }
5528
+ return true;
5529
+ };
5530
+ }, nr = (r, e)=>{
5531
+ const n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
5532
+ return g((o)=>{
5533
+ t.lastIndex = o.index;
5534
+ const u = t.exec(o.input);
5535
+ if (!u) return false;
5536
+ if (!h(e) && !o.options.silent) {
5537
+ const s = d(e) ? e(...u, o.input, String(o.index)) : e;
5538
+ h(s) || o.output.push(s);
5539
+ }
5540
+ return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
5541
+ });
5542
+ }, ar = (r, e)=>(n)=>{
5543
+ if (!n.input.startsWith(r, n.index)) return false;
5544
+ if (!h(e) && !n.options.silent) {
5545
+ const t = d(e) ? e(r, n.input, String(n.index)) : e;
5546
+ h(t) || n.output.push(t);
5547
+ }
5548
+ return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
5549
+ }, C = (r, e, n, a)=>{
5550
+ const t = v(r);
5551
+ return g(_(M((o)=>{
5552
+ let u = 0;
5553
+ for(; u < n;){
5554
+ const s = o.index;
5555
+ if (!t(o) || (u += 1, o.index === s)) break;
5556
+ }
5557
+ return u >= e;
5558
+ })));
5559
+ }, tr = (r, e)=>C(r, 0, 1), f = (r, e)=>C(r, 0, 1 / 0), x = (r, e)=>{
5560
+ const n = r.map(v);
5561
+ return g(_(M((a)=>{
5562
+ for(let t = 0, o = n.length; t < o; t++)if (!n[t](a)) return false;
5563
+ return true;
5564
+ })));
5565
+ }, l = (r, e)=>{
5566
+ const n = r.map(v);
5567
+ return g(_((a)=>{
5568
+ for(let t = 0, o = n.length; t < o; t++)if (n[t](a)) return true;
5569
+ return false;
5570
+ }));
5571
+ }, M = (r, e = false)=>{
5572
+ const n = v(r);
5573
+ return (a)=>{
5574
+ const t = a.index, o = a.output.length, u = n(a);
5575
+ return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
5576
+ };
5577
+ }, _ = (r, e)=>{
5578
+ const n = v(r);
5579
+ return n;
5580
+ }, g = (()=>{
5581
+ let r = 0;
5582
+ return (e)=>{
5583
+ const n = v(e), a = r += 1;
5584
+ return (t)=>{
5585
+ var o;
5586
+ if (false === t.options.memoization) return n(t);
5587
+ const u = t.index, s = (o = t.cache)[a] || (o[a] = new Map), c = s.get(u);
5588
+ if (false === c) return false;
5589
+ if (W(c)) return t.index = c, true;
5590
+ if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), true;
5591
+ {
5592
+ const Z = t.output.length;
5593
+ if (!n(t)) return s.set(u, false), false;
5594
+ {
5595
+ const D = t.index, U = t.output.length;
5596
+ if (U > Z) {
5597
+ const ee = t.output.slice(Z, U);
5598
+ s.set(u, {
5599
+ index: D,
5600
+ output: ee
5601
+ });
5602
+ } else s.set(u, D);
5603
+ return true;
5604
+ }
5605
+ }
5606
+ };
5607
+ };
5608
+ })(), E = (r)=>{
5609
+ let e;
5610
+ return (n)=>(e || (e = v(r())), e(n));
5611
+ }, v = Y((r)=>{
5612
+ if (d(r)) return Q(r) ? E(r) : r;
5613
+ if (b(r) || X(r)) return i(r);
5614
+ if (A(r)) return x(r);
5615
+ if (K(r)) return l(Object.values(r));
5616
+ throw new Error("Invalid rule");
5617
+ }), P = "abcdefghijklmnopqrstuvwxyz", ir = (r)=>{
5618
+ let e = "";
5619
+ for(; r > 0;){
5620
+ const n = (r - 1) % 26;
5621
+ e = P[n] + e, r = Math.floor((r - 1) / 26);
5622
+ }
5623
+ return e;
5624
+ }, O = (r)=>{
5625
+ let e = 0;
5626
+ for(let n = 0, a = r.length; n < a; n++)e = 26 * e + P.indexOf(r[n]) + 1;
5627
+ return e;
5628
+ }, S = (r, e)=>{
5629
+ if (e < r) return S(e, r);
5630
+ const n = [];
5631
+ for(; r <= e;)n.push(r++);
5632
+ return n;
5633
+ }, 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, {
5634
+ memoization: false
5635
+ }).join("")), ur = (r)=>{
5636
+ const e = {};
5637
+ return (n)=>e[n] ?? (e[n] = r(n));
5638
+ }, 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([
5639
+ hr,
5640
+ dr
5641
+ ]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([
5642
+ xr,
5643
+ gr,
5644
+ mr,
5645
+ _r
5646
+ ]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([
5647
+ Sr,
5648
+ yr
5649
+ ]), 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([
5650
+ y,
5651
+ Cr,
5652
+ br,
5653
+ Mr
5654
+ ]), B = x([
5655
+ $r,
5656
+ tr(Ar),
5657
+ f(Er),
5658
+ wr
5659
+ ]), 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([
5660
+ Rr,
5661
+ zr,
5662
+ jr
5663
+ ]), I = x([
5664
+ Pr,
5665
+ Nr,
5666
+ Or
5667
+ ]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r)=>`\\${r}`), Lr = i(/[^}]/, p), Zr = E(()=>F), Dr = l([
5668
+ j,
5669
+ N,
5670
+ k,
5671
+ B,
5672
+ I,
5673
+ Zr,
5674
+ y,
5675
+ Fr,
5676
+ Ir,
5677
+ Lr
5678
+ ]), F = x([
5679
+ kr,
5680
+ f(Dr),
5681
+ Br
5682
+ ]), Ur = f(l([
5683
+ sr,
5684
+ cr,
5685
+ lr,
5686
+ fr,
5687
+ j,
5688
+ N,
5689
+ k,
5690
+ B,
5691
+ I,
5692
+ F,
5693
+ y,
5694
+ pr,
5695
+ vr
5696
+ ])), 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([
5697
+ Tr,
5698
+ Hr,
5699
+ Jr,
5700
+ Qr,
5701
+ qr
5702
+ ])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e)=>{
5703
+ const n = Array.isArray(r) ? r : [
5704
+ r
5705
+ ];
5706
+ if (!n.length) return false;
5707
+ const a = n.map($.compile), t = n.every((s)=>/(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
5708
+ return a.some((s)=>s.test(o));
5709
+ };
5710
+ $.compile = (r)=>new RegExp(`^${L(Yr(r))}$`, "s");
5711
+ var re = $;
5712
+ return J(w);
5713
+ })();
5714
+ return __lib__.default || __lib__;
5715
+ };
5716
+ let _match;
5717
+ const zeptomatch = (path, pattern)=>{
5718
+ if (!_match) {
5719
+ _match = _lazyMatch();
5720
+ _lazyMatch = null;
5721
+ }
5722
+ return _match(path, pattern);
5723
+ };
5724
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
5725
+ function normalizeWindowsPath(input = "") {
5726
+ if (!input) return input;
5727
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r)=>r.toUpperCase());
5728
+ }
5729
+ const _UNC_REGEX = /^[/\\]{2}/;
5730
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
5731
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
5732
+ const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
5733
+ const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
5734
+ const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
5735
+ const sep = "/";
5736
+ const normalize = function(path) {
5737
+ if (0 === path.length) return ".";
5738
+ path = normalizeWindowsPath(path);
5739
+ const isUNCPath = path.match(_UNC_REGEX);
5740
+ const isPathAbsolute = isAbsolute(path);
5741
+ const trailingSeparator = "/" === path[path.length - 1];
5742
+ path = normalizeString(path, !isPathAbsolute);
5743
+ if (0 === path.length) {
5744
+ if (isPathAbsolute) return "/";
5745
+ return trailingSeparator ? "./" : ".";
5746
+ }
5747
+ if (trailingSeparator) path += "/";
5748
+ if (_DRIVE_LETTER_RE.test(path)) path += "/";
5749
+ if (isUNCPath) {
5750
+ if (!isPathAbsolute) return `//./${path}`;
5751
+ return `//${path}`;
5752
+ }
5753
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
5754
+ };
5755
+ const join = function(...segments) {
5756
+ let path = "";
5757
+ for (const seg of segments)if (seg) if (path.length > 0) {
5758
+ const pathTrailing = "/" === path[path.length - 1];
5759
+ const segLeading = "/" === seg[0];
5760
+ const both = pathTrailing && segLeading;
5761
+ if (both) path += seg.slice(1);
5762
+ else path += pathTrailing || segLeading ? seg : `/${seg}`;
5763
+ } else path += seg;
5764
+ return normalize(path);
5765
+ };
5766
+ function cwd() {
5767
+ if ("undefined" != typeof process && "function" == typeof process.cwd) return process.cwd().replace(/\\/g, "/");
5768
+ return "/";
5769
+ }
5770
+ const resolve = function(...arguments_) {
5771
+ arguments_ = arguments_.map((argument)=>normalizeWindowsPath(argument));
5772
+ let resolvedPath = "";
5773
+ let resolvedAbsolute = false;
5774
+ for(let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--){
5775
+ const path = index >= 0 ? arguments_[index] : cwd();
5776
+ if (path && 0 !== path.length) {
5777
+ resolvedPath = `${path}/${resolvedPath}`;
5778
+ resolvedAbsolute = isAbsolute(path);
5779
+ }
5780
+ }
5781
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
5782
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
5783
+ return resolvedPath.length > 0 ? resolvedPath : ".";
5784
+ };
5785
+ function normalizeString(path, allowAboveRoot) {
5786
+ let res = "";
5787
+ let lastSegmentLength = 0;
5788
+ let lastSlash = -1;
5789
+ let dots = 0;
5790
+ let char = null;
5791
+ for(let index = 0; index <= path.length; ++index){
5792
+ if (index < path.length) char = path[index];
5793
+ else if ("/" === char) break;
5794
+ else char = "/";
5795
+ if ("/" === char) {
5796
+ if (lastSlash === index - 1 || 1 === dots) ;
5797
+ else if (2 === dots) {
5798
+ if (res.length < 2 || 2 !== lastSegmentLength || "." !== res[res.length - 1] || "." !== res[res.length - 2]) {
5799
+ if (res.length > 2) {
5800
+ const lastSlashIndex = res.lastIndexOf("/");
5801
+ if (-1 === lastSlashIndex) {
5802
+ res = "";
5803
+ lastSegmentLength = 0;
5804
+ } else {
5805
+ res = res.slice(0, lastSlashIndex);
5806
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
5807
+ }
5808
+ lastSlash = index;
5809
+ dots = 0;
5810
+ continue;
5811
+ } else if (res.length > 0) {
5812
+ res = "";
5813
+ lastSegmentLength = 0;
5814
+ lastSlash = index;
5815
+ dots = 0;
5816
+ continue;
5817
+ }
5818
+ }
5819
+ if (allowAboveRoot) {
5820
+ res += res.length > 0 ? "/.." : "..";
5821
+ lastSegmentLength = 2;
5822
+ }
5823
+ } else {
5824
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
5825
+ else res = path.slice(lastSlash + 1, index);
5826
+ lastSegmentLength = index - lastSlash - 1;
5827
+ }
5828
+ lastSlash = index;
5829
+ dots = 0;
5830
+ } else if ("." === char && -1 !== dots) ++dots;
5831
+ else dots = -1;
5832
+ }
5833
+ return res;
5834
+ }
5835
+ const isAbsolute = function(p) {
5836
+ return _IS_ABSOLUTE_RE.test(p);
5837
+ };
5838
+ const toNamespacedPath = function(p) {
5839
+ return normalizeWindowsPath(p);
5840
+ };
5841
+ const extname = function(p) {
5842
+ if (".." === p) return "";
5843
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
5844
+ return match && match[1] || "";
5845
+ };
5846
+ const relative = function(from, to) {
5847
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
5848
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
5849
+ if (":" === _to[0][1] && ":" === _from[0][1] && _from[0] !== _to[0]) return _to.join("/");
5850
+ const _fromCopy = [
5851
+ ..._from
5852
+ ];
5853
+ for (const segment of _fromCopy){
5854
+ if (_to[0] !== segment) break;
5855
+ _from.shift();
5856
+ _to.shift();
5857
+ }
5858
+ return [
5859
+ ..._from.map(()=>".."),
5860
+ ..._to
5861
+ ].join("/");
5862
+ };
5863
+ const dirname = function(p) {
5864
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
5865
+ if (1 === segments.length && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
5866
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
5867
+ };
5868
+ const format = function(p) {
5869
+ const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
5870
+ const segments = [
5871
+ p.root,
5872
+ p.dir,
5873
+ p.base ?? (p.name ?? "") + ext
5874
+ ].filter(Boolean);
5875
+ return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
5876
+ };
5877
+ const basename = function(p, extension) {
5878
+ const segments = normalizeWindowsPath(p).split("/");
5879
+ let lastSegment = "";
5880
+ for(let i = segments.length - 1; i >= 0; i--){
5881
+ const val = segments[i];
5882
+ if (val) {
5883
+ lastSegment = val;
5884
+ break;
5885
+ }
5886
+ }
5887
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
5888
+ };
5889
+ const parse = function(p) {
5890
+ const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
5891
+ const base = basename(p);
5892
+ const extension = extname(base);
5893
+ return {
5894
+ root,
5895
+ dir: dirname(p),
5896
+ base,
5897
+ ext: extension,
5898
+ name: base.slice(0, base.length - extension.length)
5899
+ };
5900
+ };
5901
+ const matchesGlob = (path, pattern)=>zeptomatch(pattern, normalize(path));
5902
+ const _path = {
5903
+ __proto__: null,
5904
+ basename: basename,
5905
+ dirname: dirname,
5906
+ extname: extname,
5907
+ format: format,
5908
+ isAbsolute: isAbsolute,
5909
+ join: join,
5910
+ matchesGlob: matchesGlob,
5911
+ normalize: normalize,
5912
+ normalizeString: normalizeString,
5913
+ parse: parse,
5914
+ relative: relative,
5915
+ resolve: resolve,
5916
+ sep: sep,
5917
+ toNamespacedPath: toNamespacedPath
5918
+ };
5469
5919
  }
5470
5920
  };
5471
5921
  var __webpack_module_cache__ = {};
@@ -5632,8 +6082,23 @@ async function createCoverageProvider(options, root) {
5632
6082
  var constants = __webpack_require__("./src/utils/constants.ts");
5633
6083
  var helper = __webpack_require__("./src/utils/helper.ts");
5634
6084
  var util = __webpack_require__("./src/runtime/util.ts");
5635
- var external_node_path_ = __webpack_require__("node:path");
5636
- var external_pathe_ = __webpack_require__("pathe");
6085
+ var external_node_path_ = __webpack_require__("path");
6086
+ var pathe_M_eThtNZ = __webpack_require__("../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs");
6087
+ const delimiter = /* @__PURE__ */ (()=>globalThis.process?.platform === "win32" ? ";" : ":")();
6088
+ const _platforms = {
6089
+ posix: void 0,
6090
+ win32: void 0
6091
+ };
6092
+ const mix = (del = delimiter)=>new Proxy(pathe_M_eThtNZ._, {
6093
+ get (_, prop) {
6094
+ if ("delimiter" === prop) return del;
6095
+ if ("posix" === prop) return posix;
6096
+ if ("win32" === prop) return win32;
6097
+ return _platforms[prop] || pathe_M_eThtNZ._[prop];
6098
+ }
6099
+ });
6100
+ const posix = /* @__PURE__ */ mix(":");
6101
+ const win32 = /* @__PURE__ */ mix(";");
5637
6102
  var logger = __webpack_require__("./src/utils/logger.ts");
5638
6103
  const shouldInterop = ({ interopDefault = true, modulePath, mod })=>{
5639
6104
  if (!interopDefault) return false;
@@ -5687,8 +6152,8 @@ const worker_createRequire = (filename, distPath, rstestContext, assetFiles, int
5687
6152
  }
5688
6153
  })();
5689
6154
  const require = (id)=>{
5690
- const currentDirectory = external_pathe_["default"].dirname(distPath);
5691
- const joinedPath = isRelativePath(id) ? external_pathe_["default"].join(currentDirectory, id) : id;
6155
+ const currentDirectory = posix.dirname(distPath);
6156
+ const joinedPath = isRelativePath(id) ? posix.join(currentDirectory, id) : id;
5692
6157
  const content = assetFiles[joinedPath];
5693
6158
  if (content) try {
5694
6159
  return cacheableLoadModule({
@@ -5744,7 +6209,7 @@ const defineRstestDynamicImport = ({ testPath, interopDefault, returnModule = fa
5744
6209
  return importedModule;
5745
6210
  };
5746
6211
  const loadModule = ({ codeContent, distPath, testPath, rstestContext, assetFiles, interopDefault })=>{
5747
- const fileDir = external_pathe_["default"].dirname(testPath);
6212
+ const fileDir = posix.dirname(testPath);
5748
6213
  const localModule = {
5749
6214
  children: [],
5750
6215
  exports: {},
@@ -5795,6 +6260,168 @@ const cacheableLoadModule = ({ codeContent, distPath, testPath, rstestContext, a
5795
6260
  moduleCache.set(testPath, mod);
5796
6261
  return mod;
5797
6262
  };
6263
+ const TYPE_REQUEST = "q";
6264
+ const TYPE_RESPONSE = "s";
6265
+ const DEFAULT_TIMEOUT = 6e4;
6266
+ function defaultSerialize(i) {
6267
+ return i;
6268
+ }
6269
+ const defaultDeserialize = defaultSerialize;
6270
+ const { clearTimeout: dist_clearTimeout, setTimeout: dist_setTimeout } = globalThis;
6271
+ const random = Math.random.bind(Math);
6272
+ function createBirpc(functions, options) {
6273
+ const { post, on, off = ()=>{}, eventNames = [], serialize = defaultSerialize, deserialize = defaultDeserialize, resolver, bind = "rpc", timeout = DEFAULT_TIMEOUT } = options;
6274
+ const rpcPromiseMap = /* @__PURE__ */ new Map();
6275
+ let _promise;
6276
+ let closed = false;
6277
+ const rpc = new Proxy({}, {
6278
+ get (_, method) {
6279
+ if ("$functions" === method) return functions;
6280
+ if ("$close" === method) return close;
6281
+ if ("$rejectPendingCalls" === method) return rejectPendingCalls;
6282
+ if ("$closed" === method) return closed;
6283
+ if ("then" === method && !eventNames.includes("then") && !("then" in functions)) return;
6284
+ const sendEvent = (...args)=>{
6285
+ post(serialize({
6286
+ m: method,
6287
+ a: args,
6288
+ t: TYPE_REQUEST
6289
+ }));
6290
+ };
6291
+ if (eventNames.includes(method)) {
6292
+ sendEvent.asEvent = sendEvent;
6293
+ return sendEvent;
6294
+ }
6295
+ const sendCall = async (...args)=>{
6296
+ if (closed) throw new Error(`[birpc] rpc is closed, cannot call "${method}"`);
6297
+ if (_promise) try {
6298
+ await _promise;
6299
+ } finally{
6300
+ _promise = void 0;
6301
+ }
6302
+ return new Promise((resolve, reject)=>{
6303
+ const id = nanoid();
6304
+ let timeoutId;
6305
+ if (timeout >= 0) {
6306
+ timeoutId = dist_setTimeout(()=>{
6307
+ try {
6308
+ const handleResult = options.onTimeoutError?.(method, args);
6309
+ if (true !== handleResult) throw new Error(`[birpc] timeout on calling "${method}"`);
6310
+ } catch (e) {
6311
+ reject(e);
6312
+ }
6313
+ rpcPromiseMap.delete(id);
6314
+ }, timeout);
6315
+ if ("object" == typeof timeoutId) timeoutId = timeoutId.unref?.();
6316
+ }
6317
+ rpcPromiseMap.set(id, {
6318
+ resolve,
6319
+ reject,
6320
+ timeoutId,
6321
+ method
6322
+ });
6323
+ post(serialize({
6324
+ m: method,
6325
+ a: args,
6326
+ i: id,
6327
+ t: "q"
6328
+ }));
6329
+ });
6330
+ };
6331
+ sendCall.asEvent = sendEvent;
6332
+ return sendCall;
6333
+ }
6334
+ });
6335
+ function close(customError) {
6336
+ closed = true;
6337
+ rpcPromiseMap.forEach(({ reject, method })=>{
6338
+ const error = new Error(`[birpc] rpc is closed, cannot call "${method}"`);
6339
+ if (customError) {
6340
+ customError.cause ??= error;
6341
+ return reject(customError);
6342
+ }
6343
+ reject(error);
6344
+ });
6345
+ rpcPromiseMap.clear();
6346
+ off(onMessage);
6347
+ }
6348
+ function rejectPendingCalls(handler) {
6349
+ const entries = Array.from(rpcPromiseMap.values());
6350
+ const handlerResults = entries.map(({ method, reject })=>{
6351
+ if (!handler) return reject(new Error(`[birpc]: rejected pending call "${method}".`));
6352
+ return handler({
6353
+ method,
6354
+ reject
6355
+ });
6356
+ });
6357
+ rpcPromiseMap.clear();
6358
+ return handlerResults;
6359
+ }
6360
+ async function onMessage(data, ...extra) {
6361
+ let msg;
6362
+ try {
6363
+ msg = deserialize(data);
6364
+ } catch (e) {
6365
+ if (options.onGeneralError?.(e) !== true) throw e;
6366
+ return;
6367
+ }
6368
+ if (msg.t === TYPE_REQUEST) {
6369
+ const { m: method, a: args } = msg;
6370
+ let result, error;
6371
+ const fn = resolver ? resolver(method, functions[method]) : functions[method];
6372
+ if (fn) try {
6373
+ result = await fn.apply("rpc" === bind ? rpc : functions, args);
6374
+ } catch (e) {
6375
+ error = e;
6376
+ }
6377
+ else error = new Error(`[birpc] function "${method}" not found`);
6378
+ if (msg.i) {
6379
+ if (error && options.onError) options.onError(error, method, args);
6380
+ if (error && options.onFunctionError) {
6381
+ if (true === options.onFunctionError(error, method, args)) return;
6382
+ }
6383
+ if (!error) try {
6384
+ post(serialize({
6385
+ t: TYPE_RESPONSE,
6386
+ i: msg.i,
6387
+ r: result
6388
+ }), ...extra);
6389
+ return;
6390
+ } catch (e) {
6391
+ error = e;
6392
+ if (options.onGeneralError?.(e, method, args) !== true) throw e;
6393
+ }
6394
+ try {
6395
+ post(serialize({
6396
+ t: TYPE_RESPONSE,
6397
+ i: msg.i,
6398
+ e: error
6399
+ }), ...extra);
6400
+ } catch (e) {
6401
+ if (options.onGeneralError?.(e, method, args) !== true) throw e;
6402
+ }
6403
+ }
6404
+ } else {
6405
+ const { i: ack, r: result, e: error } = msg;
6406
+ const promise = rpcPromiseMap.get(ack);
6407
+ if (promise) {
6408
+ dist_clearTimeout(promise.timeoutId);
6409
+ if (error) promise.reject(error);
6410
+ else promise.resolve(result);
6411
+ }
6412
+ rpcPromiseMap.delete(ack);
6413
+ }
6414
+ }
6415
+ _promise = on(onMessage);
6416
+ return rpc;
6417
+ }
6418
+ const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
6419
+ function nanoid(size = 21) {
6420
+ let id = "";
6421
+ let i = size;
6422
+ while(i--)id += urlAlphabet[64 * random() | 0];
6423
+ return id;
6424
+ }
5798
6425
  const processSend = process.send.bind(process);
5799
6426
  const processOn = process.on.bind(process);
5800
6427
  const processOff = process.off.bind(process);
@@ -5817,12 +6444,12 @@ function createForksRpcOptions(nodeV8 = __WEBPACK_EXTERNAL_MODULE_node_v8_d0df54
5817
6444
  };
5818
6445
  }
5819
6446
  function createRuntimeRpc(options) {
5820
- const rpc = (0, __WEBPACK_EXTERNAL_MODULE_birpc__.createBirpc)({}, options);
6447
+ const rpc = createBirpc({}, options);
5821
6448
  return {
5822
6449
  rpc
5823
6450
  };
5824
6451
  }
5825
- var external_node_fs_ = __webpack_require__("fs");
6452
+ var external_node_fs_ = __webpack_require__("node:fs");
5826
6453
  class NodeSnapshotEnvironment {
5827
6454
  constructor(options = {}){
5828
6455
  this.options = options;
@@ -5834,10 +6461,10 @@ class NodeSnapshotEnvironment {
5834
6461
  return `// Snapshot v${this.getVersion()}`;
5835
6462
  }
5836
6463
  async resolveRawPath(testPath, rawPath) {
5837
- return (0, external_pathe_.isAbsolute)(rawPath) ? rawPath : (0, external_pathe_.resolve)((0, external_pathe_.dirname)(testPath), rawPath);
6464
+ return (0, pathe_M_eThtNZ.i)(rawPath) ? rawPath : (0, pathe_M_eThtNZ.r)((0, pathe_M_eThtNZ.d)(testPath), rawPath);
5838
6465
  }
5839
6466
  async resolvePath(filepath) {
5840
- return (0, external_pathe_.join)((0, external_pathe_.join)((0, external_pathe_.dirname)(filepath), this.options.snapshotsDirName ?? "__snapshots__"), `${(0, external_pathe_.basename)(filepath)}.snap`);
6467
+ return (0, pathe_M_eThtNZ.j)((0, pathe_M_eThtNZ.j)((0, pathe_M_eThtNZ.d)(filepath), this.options.snapshotsDirName ?? "__snapshots__"), `${(0, pathe_M_eThtNZ.c)(filepath)}.snap`);
5841
6468
  }
5842
6469
  async prepareDirectory(dirPath) {
5843
6470
  await external_node_fs_.promises.mkdir(dirPath, {
@@ -5845,7 +6472,7 @@ class NodeSnapshotEnvironment {
5845
6472
  });
5846
6473
  }
5847
6474
  async saveSnapshotFile(filepath, snapshot) {
5848
- await external_node_fs_.promises.mkdir((0, external_pathe_.dirname)(filepath), {
6475
+ await external_node_fs_.promises.mkdir((0, pathe_M_eThtNZ.d)(filepath), {
5849
6476
  recursive: true
5850
6477
  });
5851
6478
  await external_node_fs_.promises.writeFile(filepath, snapshot, "utf-8");
@@ -6075,6 +6702,7 @@ const runInPool = async (options)=>{
6075
6702
  if (coverageProvider) {
6076
6703
  const coverageMap = coverageProvider.collect();
6077
6704
  if (coverageMap) test.coverage = coverageMap.toJSON();
6705
+ coverageProvider.cleanup();
6078
6706
  }
6079
6707
  await rpc.onTestFileResult(test);
6080
6708
  },