weapp-vite 5.6.1 → 5.6.3

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.
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-C5ZVOPAJ.mjs";
6
+ } from "./chunk-SSQGJIB5.mjs";
7
7
 
8
8
  // ../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.js
9
9
  var require_debug = __commonJS({
@@ -163,13 +163,13 @@ var require_identifiers = __commonJS({
163
163
  "../../node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.js"(exports, module) {
164
164
  "use strict";
165
165
  init_esm_shims();
166
- var numeric = /^[0-9]+$/;
166
+ var numeric2 = /^[0-9]+$/;
167
167
  var compareIdentifiers = (a, b) => {
168
168
  if (typeof a === "number" && typeof b === "number") {
169
169
  return a === b ? 0 : a < b ? -1 : 1;
170
170
  }
171
- const anum = numeric.test(a);
172
- const bnum = numeric.test(b);
171
+ const anum = numeric2.test(a);
172
+ const bnum = numeric2.test(b);
173
173
  if (anum && bnum) {
174
174
  a = +a;
175
175
  b = +b;
@@ -195,31 +195,31 @@ var require_semver = __commonJS({
195
195
  var parseOptions = require_parse_options();
196
196
  var { compareIdentifiers } = require_identifiers();
197
197
  var SemVer = class _SemVer {
198
- constructor(version3, options) {
198
+ constructor(version2, options) {
199
199
  options = parseOptions(options);
200
- if (version3 instanceof _SemVer) {
201
- if (version3.loose === !!options.loose && version3.includePrerelease === !!options.includePrerelease) {
202
- return version3;
200
+ if (version2 instanceof _SemVer) {
201
+ if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) {
202
+ return version2;
203
203
  } else {
204
- version3 = version3.version;
204
+ version2 = version2.version;
205
205
  }
206
- } else if (typeof version3 !== "string") {
207
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`);
206
+ } else if (typeof version2 !== "string") {
207
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`);
208
208
  }
209
- if (version3.length > MAX_LENGTH) {
209
+ if (version2.length > MAX_LENGTH) {
210
210
  throw new TypeError(
211
211
  `version is longer than ${MAX_LENGTH} characters`
212
212
  );
213
213
  }
214
- debug4("SemVer", version3, options);
214
+ debug4("SemVer", version2, options);
215
215
  this.options = options;
216
216
  this.loose = !!options.loose;
217
217
  this.includePrerelease = !!options.includePrerelease;
218
- const m = version3.trim().match(options.loose ? re[t2.LOOSE] : re[t2.FULL]);
218
+ const m = version2.trim().match(options.loose ? re[t2.LOOSE] : re[t2.FULL]);
219
219
  if (!m) {
220
- throw new TypeError(`Invalid Version: ${version3}`);
220
+ throw new TypeError(`Invalid Version: ${version2}`);
221
221
  }
222
- this.raw = version3;
222
+ this.raw = version2;
223
223
  this.major = +m[1];
224
224
  this.minor = +m[2];
225
225
  this.patch = +m[3];
@@ -481,219 +481,8 @@ var require_gte = __commonJS({
481
481
  "use strict";
482
482
  init_esm_shims();
483
483
  var compare = require_compare();
484
- var gte = (a, b, loose) => compare(a, b, loose) >= 0;
485
- module.exports = gte;
486
- }
487
- });
488
-
489
- // ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
490
- var require_balanced_match = __commonJS({
491
- "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module) {
492
- "use strict";
493
- init_esm_shims();
494
- module.exports = balanced;
495
- function balanced(a, b, str) {
496
- if (a instanceof RegExp) a = maybeMatch(a, str);
497
- if (b instanceof RegExp) b = maybeMatch(b, str);
498
- var r2 = range(a, b, str);
499
- return r2 && {
500
- start: r2[0],
501
- end: r2[1],
502
- pre: str.slice(0, r2[0]),
503
- body: str.slice(r2[0] + a.length, r2[1]),
504
- post: str.slice(r2[1] + b.length)
505
- };
506
- }
507
- function maybeMatch(reg, str) {
508
- var m = str.match(reg);
509
- return m ? m[0] : null;
510
- }
511
- balanced.range = range;
512
- function range(a, b, str) {
513
- var begs, beg, left, right, result;
514
- var ai = str.indexOf(a);
515
- var bi = str.indexOf(b, ai + 1);
516
- var i = ai;
517
- if (ai >= 0 && bi > 0) {
518
- if (a === b) {
519
- return [ai, bi];
520
- }
521
- begs = [];
522
- left = str.length;
523
- while (i >= 0 && !result) {
524
- if (i == ai) {
525
- begs.push(i);
526
- ai = str.indexOf(a, i + 1);
527
- } else if (begs.length == 1) {
528
- result = [begs.pop(), bi];
529
- } else {
530
- beg = begs.pop();
531
- if (beg < left) {
532
- left = beg;
533
- right = bi;
534
- }
535
- bi = str.indexOf(b, i + 1);
536
- }
537
- i = ai < bi && ai >= 0 ? ai : bi;
538
- }
539
- if (begs.length) {
540
- result = [left, right];
541
- }
542
- }
543
- return result;
544
- }
545
- }
546
- });
547
-
548
- // ../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
549
- var require_brace_expansion = __commonJS({
550
- "../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module) {
551
- "use strict";
552
- init_esm_shims();
553
- var balanced = require_balanced_match();
554
- module.exports = expandTop;
555
- var escSlash = "\0SLASH" + Math.random() + "\0";
556
- var escOpen = "\0OPEN" + Math.random() + "\0";
557
- var escClose = "\0CLOSE" + Math.random() + "\0";
558
- var escComma = "\0COMMA" + Math.random() + "\0";
559
- var escPeriod = "\0PERIOD" + Math.random() + "\0";
560
- function numeric(str) {
561
- return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
562
- }
563
- function escapeBraces(str) {
564
- return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
565
- }
566
- function unescapeBraces(str) {
567
- return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
568
- }
569
- function parseCommaParts(str) {
570
- if (!str)
571
- return [""];
572
- var parts = [];
573
- var m = balanced("{", "}", str);
574
- if (!m)
575
- return str.split(",");
576
- var pre = m.pre;
577
- var body = m.body;
578
- var post = m.post;
579
- var p = pre.split(",");
580
- p[p.length - 1] += "{" + body + "}";
581
- var postParts = parseCommaParts(post);
582
- if (post.length) {
583
- p[p.length - 1] += postParts.shift();
584
- p.push.apply(p, postParts);
585
- }
586
- parts.push.apply(parts, p);
587
- return parts;
588
- }
589
- function expandTop(str) {
590
- if (!str)
591
- return [];
592
- if (str.substr(0, 2) === "{}") {
593
- str = "\\{\\}" + str.substr(2);
594
- }
595
- return expand2(escapeBraces(str), true).map(unescapeBraces);
596
- }
597
- function embrace(str) {
598
- return "{" + str + "}";
599
- }
600
- function isPadded(el) {
601
- return /^-?0\d/.test(el);
602
- }
603
- function lte(i, y) {
604
- return i <= y;
605
- }
606
- function gte(i, y) {
607
- return i >= y;
608
- }
609
- function expand2(str, isTop) {
610
- var expansions = [];
611
- var m = balanced("{", "}", str);
612
- if (!m) return [str];
613
- var pre = m.pre;
614
- var post = m.post.length ? expand2(m.post, false) : [""];
615
- if (/\$$/.test(m.pre)) {
616
- for (var k = 0; k < post.length; k++) {
617
- var expansion = pre + "{" + m.body + "}" + post[k];
618
- expansions.push(expansion);
619
- }
620
- } else {
621
- var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
622
- var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
623
- var isSequence = isNumericSequence || isAlphaSequence;
624
- var isOptions = m.body.indexOf(",") >= 0;
625
- if (!isSequence && !isOptions) {
626
- if (m.post.match(/,.*\}/)) {
627
- str = m.pre + "{" + m.body + escClose + m.post;
628
- return expand2(str);
629
- }
630
- return [str];
631
- }
632
- var n2;
633
- if (isSequence) {
634
- n2 = m.body.split(/\.\./);
635
- } else {
636
- n2 = parseCommaParts(m.body);
637
- if (n2.length === 1) {
638
- n2 = expand2(n2[0], false).map(embrace);
639
- if (n2.length === 1) {
640
- return post.map(function(p) {
641
- return m.pre + n2[0] + p;
642
- });
643
- }
644
- }
645
- }
646
- var N;
647
- if (isSequence) {
648
- var x = numeric(n2[0]);
649
- var y = numeric(n2[1]);
650
- var width = Math.max(n2[0].length, n2[1].length);
651
- var incr = n2.length == 3 ? Math.abs(numeric(n2[2])) : 1;
652
- var test = lte;
653
- var reverse = y < x;
654
- if (reverse) {
655
- incr *= -1;
656
- test = gte;
657
- }
658
- var pad = n2.some(isPadded);
659
- N = [];
660
- for (var i = x; test(i, y); i += incr) {
661
- var c;
662
- if (isAlphaSequence) {
663
- c = String.fromCharCode(i);
664
- if (c === "\\")
665
- c = "";
666
- } else {
667
- c = String(i);
668
- if (pad) {
669
- var need = width - c.length;
670
- if (need > 0) {
671
- var z = new Array(need + 1).join("0");
672
- if (i < 0)
673
- c = "-" + z + c.slice(1);
674
- else
675
- c = z + c;
676
- }
677
- }
678
- }
679
- N.push(c);
680
- }
681
- } else {
682
- N = [];
683
- for (var j = 0; j < n2.length; j++) {
684
- N.push.apply(N, expand2(n2[j], false));
685
- }
686
- }
687
- for (var j = 0; j < N.length; j++) {
688
- for (var k = 0; k < post.length; k++) {
689
- var expansion = pre + N[j] + post[k];
690
- if (!isTop || isSequence || expansion)
691
- expansions.push(expansion);
692
- }
693
- }
694
- }
695
- return expansions;
696
- }
484
+ var gte2 = (a, b, loose) => compare(a, b, loose) >= 0;
485
+ module.exports = gte2;
697
486
  }
698
487
  });
699
488
 
@@ -906,14 +695,14 @@ function getRuntime() {
906
695
  throw new Error("Unknown runtime: cannot determine Node.js / Deno / Bun");
907
696
  }
908
697
  function checkRuntime(minVersions) {
909
- const { runtime, version: version3 } = getRuntime();
698
+ const { runtime, version: version2 } = getRuntime();
910
699
  const required = minVersions[runtime];
911
700
  if (!required) {
912
701
  logger_default.warn(`No minimum version specified for ${runtime}, skipping check.`);
913
702
  return;
914
703
  }
915
- if (!(0, import_gte.default)(version3, required)) {
916
- logger_default.warn(`\u5F53\u524D ${runtime} \u7248\u672C\u4E3A ${version3} \u65E0\u6CD5\u6EE1\u8DB3 \`weapp-vite\` \u6700\u4F4E\u8981\u6C42\u7684\u7248\u672C(>= ${required})`);
704
+ if (!(0, import_gte.default)(version2, required)) {
705
+ logger_default.warn(`\u5F53\u524D ${runtime} \u7248\u672C\u4E3A ${version2} \u65E0\u6CD5\u6EE1\u8DB3 \`weapp-vite\` \u6700\u4F4E\u8981\u6C42\u7684\u7248\u672C(>= ${required})`);
917
706
  }
918
707
  }
919
708
 
@@ -4483,6 +4272,7 @@ function createAutoRoutesServicePlugin(ctx) {
4483
4272
 
4484
4273
  // src/runtime/buildPlugin.ts
4485
4274
  init_esm_shims();
4275
+ import fs6 from "fs";
4486
4276
  import process3 from "process";
4487
4277
 
4488
4278
  // ../../node_modules/.pnpm/chokidar@4.0.3/node_modules/chokidar/esm/index.js
@@ -6054,8 +5844,8 @@ var FSWatcher = class extends EventEmitter {
6054
5844
  }
6055
5845
  return this._userIgnored(path36, stats);
6056
5846
  }
6057
- _isntIgnored(path36, stat6) {
6058
- return !this._isIgnored(path36, stat6);
5847
+ _isntIgnored(path36, stat5) {
5848
+ return !this._isIgnored(path36, stat5);
6059
5849
  }
6060
5850
  /**
6061
5851
  * Provides a set of common helpers and properties relating to symlink handling.
@@ -6182,17 +5972,231 @@ var esm_default = { watch, FSWatcher };
6182
5972
  // src/runtime/buildPlugin.ts
6183
5973
  import path11 from "pathe";
6184
5974
 
6185
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/index.js
5975
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/index.js
6186
5976
  init_esm_shims();
6187
5977
 
6188
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/index.js
5978
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/index.js
6189
5979
  init_esm_shims();
6190
5980
 
6191
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.js
5981
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js
6192
5982
  init_esm_shims();
6193
- var import_brace_expansion = __toESM(require_brace_expansion(), 1);
6194
5983
 
6195
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/assert-valid-pattern.js
5984
+ // ../../node_modules/.pnpm/@isaacs+brace-expansion@5.0.0/node_modules/@isaacs/brace-expansion/dist/esm/index.js
5985
+ init_esm_shims();
5986
+
5987
+ // ../../node_modules/.pnpm/@isaacs+balanced-match@4.0.1/node_modules/@isaacs/balanced-match/dist/esm/index.js
5988
+ init_esm_shims();
5989
+ var balanced = (a, b, str) => {
5990
+ const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
5991
+ const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
5992
+ const r2 = ma !== null && mb != null && range(ma, mb, str);
5993
+ return r2 && {
5994
+ start: r2[0],
5995
+ end: r2[1],
5996
+ pre: str.slice(0, r2[0]),
5997
+ body: str.slice(r2[0] + ma.length, r2[1]),
5998
+ post: str.slice(r2[1] + mb.length)
5999
+ };
6000
+ };
6001
+ var maybeMatch = (reg, str) => {
6002
+ const m = str.match(reg);
6003
+ return m ? m[0] : null;
6004
+ };
6005
+ var range = (a, b, str) => {
6006
+ let begs, beg, left, right = void 0, result;
6007
+ let ai = str.indexOf(a);
6008
+ let bi = str.indexOf(b, ai + 1);
6009
+ let i = ai;
6010
+ if (ai >= 0 && bi > 0) {
6011
+ if (a === b) {
6012
+ return [ai, bi];
6013
+ }
6014
+ begs = [];
6015
+ left = str.length;
6016
+ while (i >= 0 && !result) {
6017
+ if (i === ai) {
6018
+ begs.push(i);
6019
+ ai = str.indexOf(a, i + 1);
6020
+ } else if (begs.length === 1) {
6021
+ const r2 = begs.pop();
6022
+ if (r2 !== void 0)
6023
+ result = [r2, bi];
6024
+ } else {
6025
+ beg = begs.pop();
6026
+ if (beg !== void 0 && beg < left) {
6027
+ left = beg;
6028
+ right = bi;
6029
+ }
6030
+ bi = str.indexOf(b, i + 1);
6031
+ }
6032
+ i = ai < bi && ai >= 0 ? ai : bi;
6033
+ }
6034
+ if (begs.length && right !== void 0) {
6035
+ result = [left, right];
6036
+ }
6037
+ }
6038
+ return result;
6039
+ };
6040
+
6041
+ // ../../node_modules/.pnpm/@isaacs+brace-expansion@5.0.0/node_modules/@isaacs/brace-expansion/dist/esm/index.js
6042
+ var escSlash = "\0SLASH" + Math.random() + "\0";
6043
+ var escOpen = "\0OPEN" + Math.random() + "\0";
6044
+ var escClose = "\0CLOSE" + Math.random() + "\0";
6045
+ var escComma = "\0COMMA" + Math.random() + "\0";
6046
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
6047
+ var escSlashPattern = new RegExp(escSlash, "g");
6048
+ var escOpenPattern = new RegExp(escOpen, "g");
6049
+ var escClosePattern = new RegExp(escClose, "g");
6050
+ var escCommaPattern = new RegExp(escComma, "g");
6051
+ var escPeriodPattern = new RegExp(escPeriod, "g");
6052
+ var slashPattern = /\\\\/g;
6053
+ var openPattern = /\\{/g;
6054
+ var closePattern = /\\}/g;
6055
+ var commaPattern = /\\,/g;
6056
+ var periodPattern = /\\./g;
6057
+ function numeric(str) {
6058
+ return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
6059
+ }
6060
+ function escapeBraces(str) {
6061
+ return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
6062
+ }
6063
+ function unescapeBraces(str) {
6064
+ return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
6065
+ }
6066
+ function parseCommaParts(str) {
6067
+ if (!str) {
6068
+ return [""];
6069
+ }
6070
+ const parts = [];
6071
+ const m = balanced("{", "}", str);
6072
+ if (!m) {
6073
+ return str.split(",");
6074
+ }
6075
+ const { pre, body, post } = m;
6076
+ const p = pre.split(",");
6077
+ p[p.length - 1] += "{" + body + "}";
6078
+ const postParts = parseCommaParts(post);
6079
+ if (post.length) {
6080
+ ;
6081
+ p[p.length - 1] += postParts.shift();
6082
+ p.push.apply(p, postParts);
6083
+ }
6084
+ parts.push.apply(parts, p);
6085
+ return parts;
6086
+ }
6087
+ function expand(str) {
6088
+ if (!str) {
6089
+ return [];
6090
+ }
6091
+ if (str.slice(0, 2) === "{}") {
6092
+ str = "\\{\\}" + str.slice(2);
6093
+ }
6094
+ return expand_(escapeBraces(str), true).map(unescapeBraces);
6095
+ }
6096
+ function embrace(str) {
6097
+ return "{" + str + "}";
6098
+ }
6099
+ function isPadded(el) {
6100
+ return /^-?0\d/.test(el);
6101
+ }
6102
+ function lte(i, y) {
6103
+ return i <= y;
6104
+ }
6105
+ function gte(i, y) {
6106
+ return i >= y;
6107
+ }
6108
+ function expand_(str, isTop) {
6109
+ const expansions = [];
6110
+ const m = balanced("{", "}", str);
6111
+ if (!m)
6112
+ return [str];
6113
+ const pre = m.pre;
6114
+ const post = m.post.length ? expand_(m.post, false) : [""];
6115
+ if (/\$$/.test(m.pre)) {
6116
+ for (let k = 0; k < post.length; k++) {
6117
+ const expansion = pre + "{" + m.body + "}" + post[k];
6118
+ expansions.push(expansion);
6119
+ }
6120
+ } else {
6121
+ const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
6122
+ const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
6123
+ const isSequence = isNumericSequence || isAlphaSequence;
6124
+ const isOptions = m.body.indexOf(",") >= 0;
6125
+ if (!isSequence && !isOptions) {
6126
+ if (m.post.match(/,(?!,).*\}/)) {
6127
+ str = m.pre + "{" + m.body + escClose + m.post;
6128
+ return expand_(str);
6129
+ }
6130
+ return [str];
6131
+ }
6132
+ let n2;
6133
+ if (isSequence) {
6134
+ n2 = m.body.split(/\.\./);
6135
+ } else {
6136
+ n2 = parseCommaParts(m.body);
6137
+ if (n2.length === 1 && n2[0] !== void 0) {
6138
+ n2 = expand_(n2[0], false).map(embrace);
6139
+ if (n2.length === 1) {
6140
+ return post.map((p) => m.pre + n2[0] + p);
6141
+ }
6142
+ }
6143
+ }
6144
+ let N;
6145
+ if (isSequence && n2[0] !== void 0 && n2[1] !== void 0) {
6146
+ const x = numeric(n2[0]);
6147
+ const y = numeric(n2[1]);
6148
+ const width = Math.max(n2[0].length, n2[1].length);
6149
+ let incr = n2.length === 3 && n2[2] !== void 0 ? Math.abs(numeric(n2[2])) : 1;
6150
+ let test = lte;
6151
+ const reverse = y < x;
6152
+ if (reverse) {
6153
+ incr *= -1;
6154
+ test = gte;
6155
+ }
6156
+ const pad = n2.some(isPadded);
6157
+ N = [];
6158
+ for (let i = x; test(i, y); i += incr) {
6159
+ let c;
6160
+ if (isAlphaSequence) {
6161
+ c = String.fromCharCode(i);
6162
+ if (c === "\\") {
6163
+ c = "";
6164
+ }
6165
+ } else {
6166
+ c = String(i);
6167
+ if (pad) {
6168
+ const need = width - c.length;
6169
+ if (need > 0) {
6170
+ const z = new Array(need + 1).join("0");
6171
+ if (i < 0) {
6172
+ c = "-" + z + c.slice(1);
6173
+ } else {
6174
+ c = z + c;
6175
+ }
6176
+ }
6177
+ }
6178
+ }
6179
+ N.push(c);
6180
+ }
6181
+ } else {
6182
+ N = [];
6183
+ for (let j = 0; j < n2.length; j++) {
6184
+ N.push.apply(N, expand_(n2[j], false));
6185
+ }
6186
+ }
6187
+ for (let j = 0; j < N.length; j++) {
6188
+ for (let k = 0; k < post.length; k++) {
6189
+ const expansion = pre + N[j] + post[k];
6190
+ if (!isTop || isSequence || expansion) {
6191
+ expansions.push(expansion);
6192
+ }
6193
+ }
6194
+ }
6195
+ }
6196
+ return expansions;
6197
+ }
6198
+
6199
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/assert-valid-pattern.js
6196
6200
  init_esm_shims();
6197
6201
  var MAX_PATTERN_LENGTH = 1024 * 64;
6198
6202
  var assertValidPattern = (pattern) => {
@@ -6204,10 +6208,10 @@ var assertValidPattern = (pattern) => {
6204
6208
  }
6205
6209
  };
6206
6210
 
6207
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/ast.js
6211
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/ast.js
6208
6212
  init_esm_shims();
6209
6213
 
6210
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/brace-expressions.js
6214
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/brace-expressions.js
6211
6215
  init_esm_shims();
6212
6216
  var posixClasses = {
6213
6217
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
@@ -6317,13 +6321,16 @@ var parseClass = (glob2, position) => {
6317
6321
  return [comb, uflag, endPos - pos, true];
6318
6322
  };
6319
6323
 
6320
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/unescape.js
6324
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/unescape.js
6321
6325
  init_esm_shims();
6322
- var unescape2 = (s, { windowsPathsNoEscape = false } = {}) => {
6323
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
6326
+ var unescape2 = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
6327
+ if (magicalBraces) {
6328
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
6329
+ }
6330
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
6324
6331
  };
6325
6332
 
6326
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/ast.js
6333
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/ast.js
6327
6334
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
6328
6335
  var isExtglobType = (c) => types.has(c);
6329
6336
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
@@ -6674,7 +6681,7 @@ var AST = class _AST {
6674
6681
  if (this.#root === this)
6675
6682
  this.#fillNegs();
6676
6683
  if (!this.type) {
6677
- const noEmpty = this.isStart() && this.isEnd();
6684
+ const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
6678
6685
  const src = this.#parts.map((p) => {
6679
6686
  const [re, _, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
6680
6687
  this.#hasMagic = this.#hasMagic || hasMagic2;
@@ -6784,10 +6791,7 @@ var AST = class _AST {
6784
6791
  }
6785
6792
  }
6786
6793
  if (c === "*") {
6787
- if (noEmpty && glob2 === "*")
6788
- re += starNoEmpty;
6789
- else
6790
- re += star;
6794
+ re += noEmpty && glob2 === "*" ? starNoEmpty : star;
6791
6795
  hasMagic2 = true;
6792
6796
  continue;
6793
6797
  }
@@ -6802,13 +6806,16 @@ var AST = class _AST {
6802
6806
  }
6803
6807
  };
6804
6808
 
6805
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/escape.js
6809
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/escape.js
6806
6810
  init_esm_shims();
6807
- var escape = (s, { windowsPathsNoEscape = false } = {}) => {
6811
+ var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
6812
+ if (magicalBraces) {
6813
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
6814
+ }
6808
6815
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
6809
6816
  };
6810
6817
 
6811
- // ../../node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.js
6818
+ // ../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js
6812
6819
  var minimatch = (p, pattern, options = {}) => {
6813
6820
  assertValidPattern(pattern);
6814
6821
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -6924,7 +6931,7 @@ var braceExpand = (pattern, options = {}) => {
6924
6931
  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
6925
6932
  return [pattern];
6926
6933
  }
6927
- return (0, import_brace_expansion.default)(pattern);
6934
+ return expand(pattern);
6928
6935
  };
6929
6936
  minimatch.braceExpand = braceExpand;
6930
6937
  var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
@@ -7445,16 +7452,27 @@ var Minimatch = class {
7445
7452
  pp2[i] = twoStar;
7446
7453
  }
7447
7454
  } else if (next === void 0) {
7448
- pp2[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
7455
+ pp2[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
7449
7456
  } else if (next !== GLOBSTAR) {
7450
7457
  pp2[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
7451
7458
  pp2[i + 1] = GLOBSTAR;
7452
7459
  }
7453
7460
  });
7454
- return pp2.filter((p) => p !== GLOBSTAR).join("/");
7461
+ const filtered = pp2.filter((p) => p !== GLOBSTAR);
7462
+ if (this.partial && filtered.length >= 1) {
7463
+ const prefixes = [];
7464
+ for (let i = 1; i <= filtered.length; i++) {
7465
+ prefixes.push(filtered.slice(0, i).join("/"));
7466
+ }
7467
+ return "(?:" + prefixes.join("|") + ")";
7468
+ }
7469
+ return filtered.join("/");
7455
7470
  }).join("|");
7456
7471
  const [open2, close] = set3.length > 1 ? ["(?:", ")"] : ["", ""];
7457
7472
  re = "^" + open2 + re + close + "$";
7473
+ if (this.partial) {
7474
+ re = "^(?:\\/|" + open2 + re.slice(1, -1) + close + ")$";
7475
+ }
7458
7476
  if (this.negate)
7459
7477
  re = "^(?!" + re + ").+$";
7460
7478
  try {
@@ -7526,7 +7544,7 @@ minimatch.Minimatch = Minimatch;
7526
7544
  minimatch.escape = escape;
7527
7545
  minimatch.unescape = unescape2;
7528
7546
 
7529
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/glob.js
7547
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/glob.js
7530
7548
  init_esm_shims();
7531
7549
  import { fileURLToPath as fileURLToPath2 } from "url";
7532
7550
 
@@ -10143,7 +10161,7 @@ var PathScurryDarwin = class extends PathScurryPosix {
10143
10161
  var Path = process.platform === "win32" ? PathWin32 : PathPosix;
10144
10162
  var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
10145
10163
 
10146
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/pattern.js
10164
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/pattern.js
10147
10165
  init_esm_shims();
10148
10166
  var isPatternList = (pl2) => pl2.length >= 1;
10149
10167
  var isGlobList = (gl) => gl.length >= 1;
@@ -10309,10 +10327,10 @@ var Pattern = class _Pattern {
10309
10327
  }
10310
10328
  };
10311
10329
 
10312
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/walker.js
10330
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/walker.js
10313
10331
  init_esm_shims();
10314
10332
 
10315
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/ignore.js
10333
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/ignore.js
10316
10334
  init_esm_shims();
10317
10335
  var defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
10318
10336
  var Ignore = class {
@@ -10400,7 +10418,7 @@ var Ignore = class {
10400
10418
  }
10401
10419
  };
10402
10420
 
10403
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/processor.js
10421
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/processor.js
10404
10422
  init_esm_shims();
10405
10423
  var HasWalkedCache = class _HasWalkedCache {
10406
10424
  store;
@@ -10622,7 +10640,7 @@ var Processor = class _Processor {
10622
10640
  }
10623
10641
  };
10624
10642
 
10625
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/walker.js
10643
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/walker.js
10626
10644
  var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
10627
10645
  var GlobUtil = class {
10628
10646
  path;
@@ -10949,7 +10967,7 @@ var GlobStream = class extends GlobUtil {
10949
10967
  }
10950
10968
  };
10951
10969
 
10952
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/glob.js
10970
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/glob.js
10953
10971
  var defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
10954
10972
  var Glob = class {
10955
10973
  absolute;
@@ -11149,7 +11167,7 @@ var Glob = class {
11149
11167
  }
11150
11168
  };
11151
11169
 
11152
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/has-magic.js
11170
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/has-magic.js
11153
11171
  init_esm_shims();
11154
11172
  var hasMagic = (pattern, options = {}) => {
11155
11173
  if (!Array.isArray(pattern)) {
@@ -11162,7 +11180,7 @@ var hasMagic = (pattern, options = {}) => {
11162
11180
  return false;
11163
11181
  };
11164
11182
 
11165
- // ../../node_modules/.pnpm/glob@11.0.2/node_modules/glob/dist/esm/index.js
11183
+ // ../../node_modules/.pnpm/glob@11.0.3/node_modules/glob/dist/esm/index.js
11166
11184
  function globStreamSync(pattern, options = {}) {
11167
11185
  return new Glob(pattern, options).streamSync();
11168
11186
  }
@@ -11210,7 +11228,7 @@ var glob = Object.assign(glob_, {
11210
11228
  });
11211
11229
  glob.glob = glob;
11212
11230
 
11213
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/opt-arg.js
11231
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/opt-arg.js
11214
11232
  init_esm_shims();
11215
11233
  var typeOrUndef = (val, t2) => typeof val === "undefined" || typeof val === t2;
11216
11234
  var isRimrafOptions = (o) => !!o && typeof o === "object" && typeOrUndef(o.preserveRoot, "boolean") && typeOrUndef(o.tmp, "string") && typeOrUndef(o.maxRetries, "number") && typeOrUndef(o.retryDelay, "number") && typeOrUndef(o.backoff, "number") && typeOrUndef(o.maxBackoff, "number") && (typeOrUndef(o.glob, "boolean") || o.glob && typeof o.glob === "object") && typeOrUndef(o.filter, "function");
@@ -11243,16 +11261,10 @@ var optArgT = (opt) => {
11243
11261
  var optArg = (opt = {}) => optArgT(opt);
11244
11262
  var optArgSync = (opt = {}) => optArgT(opt);
11245
11263
 
11246
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/path-arg.js
11264
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/path-arg.js
11247
11265
  init_esm_shims();
11248
11266
  import { parse as parse2, resolve as resolve3 } from "path";
11249
11267
  import { inspect } from "util";
11250
-
11251
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/platform.js
11252
- init_esm_shims();
11253
- var platform_default = process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform;
11254
-
11255
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/path-arg.js
11256
11268
  var pathArg = (path36, opt = {}) => {
11257
11269
  const type = typeof path36;
11258
11270
  if (type !== "string") {
@@ -11280,7 +11292,7 @@ var pathArg = (path36, opt = {}) => {
11280
11292
  code: "ERR_PRESERVE_ROOT"
11281
11293
  });
11282
11294
  }
11283
- if (platform_default === "win32") {
11295
+ if (process.platform === "win32") {
11284
11296
  const badWinChars = /[*|"<>?:]/;
11285
11297
  const { root: root2 } = parse2(path36);
11286
11298
  if (badWinChars.test(path36.substring(root2.length))) {
@@ -11294,46 +11306,37 @@ var pathArg = (path36, opt = {}) => {
11294
11306
  };
11295
11307
  var path_arg_default = pathArg;
11296
11308
 
11297
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-manual.js
11309
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-manual.js
11298
11310
  init_esm_shims();
11299
11311
 
11300
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-posix.js
11312
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-posix.js
11301
11313
  init_esm_shims();
11302
11314
 
11303
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/fs.js
11315
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/fs.js
11304
11316
  init_esm_shims();
11305
- import fs6 from "fs";
11306
- import { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync as lstatSync2, unlinkSync } from "fs";
11307
11317
  import { readdirSync as rdSync } from "fs";
11318
+ import fsPromises from "fs/promises";
11319
+ import { chmodSync, mkdirSync, renameSync, rmdirSync, rmSync, statSync, lstatSync as lstatSync2, unlinkSync } from "fs";
11308
11320
  var readdirSync2 = (path36) => rdSync(path36, { withFileTypes: true });
11309
- var chmod = (path36, mode) => new Promise((res, rej) => fs6.chmod(path36, mode, (er, ...d) => er ? rej(er) : res(...d)));
11310
- var mkdir = (path36, options) => new Promise((res, rej) => fs6.mkdir(path36, options, (er, made) => er ? rej(er) : res(made)));
11311
- var readdir4 = (path36) => new Promise((res, rej) => fs6.readdir(path36, { withFileTypes: true }, (er, data2) => er ? rej(er) : res(data2)));
11312
- var rename = (oldPath, newPath) => new Promise((res, rej) => fs6.rename(oldPath, newPath, (er, ...d) => er ? rej(er) : res(...d)));
11313
- var rm = (path36, options) => new Promise((res, rej) => fs6.rm(path36, options, (er, ...d) => er ? rej(er) : res(...d)));
11314
- var rmdir = (path36) => new Promise((res, rej) => fs6.rmdir(path36, (er, ...d) => er ? rej(er) : res(...d)));
11315
- var stat4 = (path36) => new Promise((res, rej) => fs6.stat(path36, (er, data2) => er ? rej(er) : res(data2)));
11316
- var lstat4 = (path36) => new Promise((res, rej) => fs6.lstat(path36, (er, data2) => er ? rej(er) : res(data2)));
11317
- var unlink = (path36) => new Promise((res, rej) => fs6.unlink(path36, (er, ...d) => er ? rej(er) : res(...d)));
11318
11321
  var promises = {
11319
- chmod,
11320
- mkdir,
11321
- readdir: readdir4,
11322
- rename,
11323
- rm,
11324
- rmdir,
11325
- stat: stat4,
11326
- lstat: lstat4,
11327
- unlink
11322
+ chmod: fsPromises.chmod,
11323
+ mkdir: fsPromises.mkdir,
11324
+ readdir: (path36) => fsPromises.readdir(path36, { withFileTypes: true }),
11325
+ rename: fsPromises.rename,
11326
+ rm: fsPromises.rm,
11327
+ rmdir: fsPromises.rmdir,
11328
+ stat: fsPromises.stat,
11329
+ lstat: fsPromises.lstat,
11330
+ unlink: fsPromises.unlink
11328
11331
  };
11329
11332
 
11330
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-posix.js
11333
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-posix.js
11331
11334
  import { parse as parse3, resolve as resolve4 } from "path";
11332
11335
 
11333
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/readdir-or-error.js
11336
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/readdir-or-error.js
11334
11337
  init_esm_shims();
11335
- var { readdir: readdir5 } = promises;
11336
- var readdirOrError = (path36) => readdir5(path36).catch((er) => er);
11338
+ var { readdir: readdir4 } = promises;
11339
+ var readdirOrError = (path36) => readdir4(path36).catch((er) => er);
11337
11340
  var readdirOrErrorSync = (path36) => {
11338
11341
  try {
11339
11342
  return readdirSync2(path36);
@@ -11342,70 +11345,63 @@ var readdirOrErrorSync = (path36) => {
11342
11345
  }
11343
11346
  };
11344
11347
 
11345
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/ignore-enoent.js
11348
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/ignore-enoent.js
11346
11349
  init_esm_shims();
11347
- var ignoreENOENT = async (p) => p.catch((er) => {
11348
- if (er.code !== "ENOENT") {
11349
- throw er;
11350
+
11351
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/error.js
11352
+ init_esm_shims();
11353
+ var isRecord = (o) => !!o && typeof o === "object";
11354
+ var hasString = (o, key) => key in o && typeof o[key] === "string";
11355
+ var isFsError = (o) => isRecord(o) && hasString(o, "code") && hasString(o, "path");
11356
+ var errorCode = (er) => isRecord(er) && hasString(er, "code") ? er.code : null;
11357
+
11358
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/ignore-enoent.js
11359
+ var ignoreENOENT = async (p, rethrow) => p.catch((er) => {
11360
+ if (errorCode(er) === "ENOENT") {
11361
+ return;
11350
11362
  }
11363
+ throw rethrow ?? er;
11351
11364
  });
11352
- var ignoreENOENTSync = (fn) => {
11365
+ var ignoreENOENTSync = (fn, rethrow) => {
11353
11366
  try {
11354
11367
  return fn();
11355
11368
  } catch (er) {
11356
- if (er?.code !== "ENOENT") {
11357
- throw er;
11369
+ if (errorCode(er) === "ENOENT") {
11370
+ return;
11358
11371
  }
11372
+ throw rethrow ?? er;
11359
11373
  }
11360
11374
  };
11361
11375
 
11362
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-posix.js
11363
- var { lstat: lstat5, rmdir: rmdir2, unlink: unlink2 } = promises;
11376
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-posix.js
11377
+ var { lstat: lstat4, rmdir, unlink } = promises;
11364
11378
  var rimrafPosix = async (path36, opt) => {
11365
- if (opt?.signal?.aborted) {
11366
- throw opt.signal.reason;
11367
- }
11368
- try {
11369
- return await rimrafPosixDir(path36, opt, await lstat5(path36));
11370
- } catch (er) {
11371
- if (er?.code === "ENOENT")
11372
- return true;
11373
- throw er;
11374
- }
11379
+ opt?.signal?.throwIfAborted();
11380
+ return await ignoreENOENT(lstat4(path36).then((stat5) => rimrafPosixDir(path36, opt, stat5))) ?? true;
11375
11381
  };
11376
11382
  var rimrafPosixSync = (path36, opt) => {
11377
- if (opt?.signal?.aborted) {
11378
- throw opt.signal.reason;
11379
- }
11380
- try {
11381
- return rimrafPosixDirSync(path36, opt, lstatSync2(path36));
11382
- } catch (er) {
11383
- if (er?.code === "ENOENT")
11384
- return true;
11385
- throw er;
11386
- }
11383
+ opt?.signal?.throwIfAborted();
11384
+ return ignoreENOENTSync(() => rimrafPosixDirSync(path36, opt, lstatSync2(path36))) ?? true;
11387
11385
  };
11388
11386
  var rimrafPosixDir = async (path36, opt, ent) => {
11389
- if (opt?.signal?.aborted) {
11390
- throw opt.signal.reason;
11391
- }
11387
+ opt?.signal?.throwIfAborted();
11392
11388
  const entries = ent.isDirectory() ? await readdirOrError(path36) : null;
11393
11389
  if (!Array.isArray(entries)) {
11394
11390
  if (entries) {
11395
- if (entries.code === "ENOENT") {
11391
+ if (errorCode(entries) === "ENOENT") {
11396
11392
  return true;
11397
11393
  }
11398
- if (entries.code !== "ENOTDIR") {
11394
+ if (errorCode(entries) !== "ENOTDIR") {
11399
11395
  throw entries;
11400
11396
  }
11401
11397
  }
11402
11398
  if (opt.filter && !await opt.filter(path36, ent)) {
11403
11399
  return false;
11404
11400
  }
11405
- await ignoreENOENT(unlink2(path36));
11401
+ await ignoreENOENT(unlink(path36));
11406
11402
  return true;
11407
11403
  }
11408
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir(resolve4(path36, ent2.name), opt, ent2)))).reduce((a, b) => a && b, true);
11404
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir(resolve4(path36, ent2.name), opt, ent2)))).every((v) => v === true);
11409
11405
  if (!removedAll) {
11410
11406
  return false;
11411
11407
  }
@@ -11415,20 +11411,18 @@ var rimrafPosixDir = async (path36, opt, ent) => {
11415
11411
  if (opt.filter && !await opt.filter(path36, ent)) {
11416
11412
  return false;
11417
11413
  }
11418
- await ignoreENOENT(rmdir2(path36));
11414
+ await ignoreENOENT(rmdir(path36));
11419
11415
  return true;
11420
11416
  };
11421
11417
  var rimrafPosixDirSync = (path36, opt, ent) => {
11422
- if (opt?.signal?.aborted) {
11423
- throw opt.signal.reason;
11424
- }
11418
+ opt?.signal?.throwIfAborted();
11425
11419
  const entries = ent.isDirectory() ? readdirOrErrorSync(path36) : null;
11426
11420
  if (!Array.isArray(entries)) {
11427
11421
  if (entries) {
11428
- if (entries.code === "ENOENT") {
11422
+ if (errorCode(entries) === "ENOENT") {
11429
11423
  return true;
11430
11424
  }
11431
- if (entries.code !== "ENOTDIR") {
11425
+ if (errorCode(entries) !== "ENOTDIR") {
11432
11426
  throw entries;
11433
11427
  }
11434
11428
  }
@@ -11456,62 +11450,43 @@ var rimrafPosixDirSync = (path36, opt, ent) => {
11456
11450
  return true;
11457
11451
  };
11458
11452
 
11459
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-windows.js
11453
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-windows.js
11460
11454
  init_esm_shims();
11461
11455
  import { parse as parse6, resolve as resolve7 } from "path";
11462
11456
 
11463
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/fix-eperm.js
11457
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/fix-eperm.js
11464
11458
  init_esm_shims();
11465
- var { chmod: chmod2 } = promises;
11459
+ var { chmod } = promises;
11466
11460
  var fixEPERM = (fn) => async (path36) => {
11467
11461
  try {
11468
- return await fn(path36);
11462
+ return void await ignoreENOENT(fn(path36));
11469
11463
  } catch (er) {
11470
- const fer = er;
11471
- if (fer?.code === "ENOENT") {
11472
- return;
11473
- }
11474
- if (fer?.code === "EPERM") {
11475
- try {
11476
- await chmod2(path36, 438);
11477
- } catch (er2) {
11478
- const fer2 = er2;
11479
- if (fer2?.code === "ENOENT") {
11480
- return;
11481
- }
11482
- throw er;
11464
+ if (errorCode(er) === "EPERM") {
11465
+ if (!await ignoreENOENT(chmod(path36, 438).then(() => true), er)) {
11466
+ return;
11483
11467
  }
11484
- return await fn(path36);
11468
+ return void await fn(path36);
11485
11469
  }
11486
11470
  throw er;
11487
11471
  }
11488
11472
  };
11489
11473
  var fixEPERMSync = (fn) => (path36) => {
11490
11474
  try {
11491
- return fn(path36);
11475
+ return void ignoreENOENTSync(() => fn(path36));
11492
11476
  } catch (er) {
11493
- const fer = er;
11494
- if (fer?.code === "ENOENT") {
11495
- return;
11496
- }
11497
- if (fer?.code === "EPERM") {
11498
- try {
11499
- chmodSync(path36, 438);
11500
- } catch (er2) {
11501
- const fer2 = er2;
11502
- if (fer2?.code === "ENOENT") {
11503
- return;
11504
- }
11505
- throw er;
11477
+ if (errorCode(er) === "EPERM") {
11478
+ if (!ignoreENOENTSync(() => (chmodSync(path36, 438), true), er)) {
11479
+ return;
11506
11480
  }
11507
- return fn(path36);
11481
+ return void fn(path36);
11508
11482
  }
11509
11483
  throw er;
11510
11484
  }
11511
11485
  };
11512
11486
 
11513
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/retry-busy.js
11487
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/retry-busy.js
11514
11488
  init_esm_shims();
11489
+ import { setTimeout as setTimeout2 } from "timers/promises";
11515
11490
  var MAXBACKOFF = 200;
11516
11491
  var RATE = 1.2;
11517
11492
  var MAXRETRIES = 10;
@@ -11526,16 +11501,12 @@ var retryBusy = (fn) => {
11526
11501
  try {
11527
11502
  return await fn(path36);
11528
11503
  } catch (er) {
11529
- const fer = er;
11530
- if (fer?.path === path36 && fer?.code && codes.has(fer.code)) {
11504
+ if (isFsError(er) && er.path === path36 && codes.has(er.code)) {
11531
11505
  backoff = Math.ceil(backoff * rate);
11532
11506
  total = backoff + total;
11533
11507
  if (total < mbo) {
11534
- return new Promise((res, rej) => {
11535
- setTimeout(() => {
11536
- method(path36, opt, backoff, total).then(res, rej);
11537
- }, backoff);
11538
- });
11508
+ await setTimeout2(backoff);
11509
+ return method(path36, opt, backoff, total);
11539
11510
  }
11540
11511
  if (retries < max) {
11541
11512
  retries++;
@@ -11556,8 +11527,7 @@ var retryBusySync = (fn) => {
11556
11527
  try {
11557
11528
  return fn(path36);
11558
11529
  } catch (er) {
11559
- const fer = er;
11560
- if (fer?.path === path36 && fer?.code && codes.has(fer.code) && retries < max) {
11530
+ if (isFsError(er) && er.path === path36 && codes.has(er.code) && retries < max) {
11561
11531
  retries++;
11562
11532
  continue;
11563
11533
  }
@@ -11568,23 +11538,23 @@ var retryBusySync = (fn) => {
11568
11538
  return method;
11569
11539
  };
11570
11540
 
11571
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-move-remove.js
11541
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-move-remove.js
11572
11542
  init_esm_shims();
11573
11543
  import { basename as basename3, parse as parse5, resolve as resolve6 } from "path";
11574
11544
 
11575
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/default-tmp.js
11545
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/default-tmp.js
11576
11546
  init_esm_shims();
11577
11547
  import { tmpdir } from "os";
11578
11548
  import { parse as parse4, resolve as resolve5 } from "path";
11579
- var { stat: stat5 } = promises;
11549
+ var { stat: stat4 } = promises;
11580
11550
  var isDirSync = (path36) => {
11581
11551
  try {
11582
11552
  return statSync(path36).isDirectory();
11583
- } catch (er) {
11553
+ } catch {
11584
11554
  return false;
11585
11555
  }
11586
11556
  };
11587
- var isDir = (path36) => stat5(path36).then((st) => st.isDirectory(), () => false);
11557
+ var isDir = (path36) => stat4(path36).then((st) => st.isDirectory(), () => false);
11588
11558
  var win32DefaultTmp = async (path36) => {
11589
11559
  const { root } = parse4(path36);
11590
11560
  const tmp = tmpdir();
@@ -11613,60 +11583,20 @@ var win32DefaultTmpSync = (path36) => {
11613
11583
  };
11614
11584
  var posixDefaultTmp = async () => tmpdir();
11615
11585
  var posixDefaultTmpSync = () => tmpdir();
11616
- var defaultTmp = platform_default === "win32" ? win32DefaultTmp : posixDefaultTmp;
11617
- var defaultTmpSync = platform_default === "win32" ? win32DefaultTmpSync : posixDefaultTmpSync;
11586
+ var defaultTmp = process.platform === "win32" ? win32DefaultTmp : posixDefaultTmp;
11587
+ var defaultTmpSync = process.platform === "win32" ? win32DefaultTmpSync : posixDefaultTmpSync;
11618
11588
 
11619
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-move-remove.js
11620
- var { lstat: lstat6, rename: rename2, unlink: unlink3, rmdir: rmdir3, chmod: chmod3 } = promises;
11589
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-move-remove.js
11590
+ var { lstat: lstat5, rename, unlink: unlink2, rmdir: rmdir2 } = promises;
11621
11591
  var uniqueFilename = (path36) => `.${basename3(path36)}.${Math.random()}`;
11622
- var unlinkFixEPERM = async (path36) => unlink3(path36).catch((er) => {
11623
- if (er.code === "EPERM") {
11624
- return chmod3(path36, 438).then(() => unlink3(path36), (er2) => {
11625
- if (er2.code === "ENOENT") {
11626
- return;
11627
- }
11628
- throw er;
11629
- });
11630
- } else if (er.code === "ENOENT") {
11631
- return;
11632
- }
11633
- throw er;
11634
- });
11635
- var unlinkFixEPERMSync = (path36) => {
11636
- try {
11637
- unlinkSync(path36);
11638
- } catch (er) {
11639
- if (er?.code === "EPERM") {
11640
- try {
11641
- return chmodSync(path36, 438);
11642
- } catch (er2) {
11643
- if (er2?.code === "ENOENT") {
11644
- return;
11645
- }
11646
- throw er;
11647
- }
11648
- } else if (er?.code === "ENOENT") {
11649
- return;
11650
- }
11651
- throw er;
11652
- }
11653
- };
11592
+ var unlinkFixEPERM = fixEPERM(unlink2);
11593
+ var unlinkFixEPERMSync = fixEPERMSync(unlinkSync);
11654
11594
  var rimrafMoveRemove = async (path36, opt) => {
11655
- if (opt?.signal?.aborted) {
11656
- throw opt.signal.reason;
11657
- }
11658
- try {
11659
- return await rimrafMoveRemoveDir(path36, opt, await lstat6(path36));
11660
- } catch (er) {
11661
- if (er?.code === "ENOENT")
11662
- return true;
11663
- throw er;
11664
- }
11595
+ opt?.signal?.throwIfAborted();
11596
+ return await ignoreENOENT(lstat5(path36).then((stat5) => rimrafMoveRemoveDir(path36, opt, stat5))) ?? true;
11665
11597
  };
11666
11598
  var rimrafMoveRemoveDir = async (path36, opt, ent) => {
11667
- if (opt?.signal?.aborted) {
11668
- throw opt.signal.reason;
11669
- }
11599
+ opt?.signal?.throwIfAborted();
11670
11600
  if (!opt.tmp) {
11671
11601
  return rimrafMoveRemoveDir(path36, { ...opt, tmp: await defaultTmp(path36) }, ent);
11672
11602
  }
@@ -11676,10 +11606,10 @@ var rimrafMoveRemoveDir = async (path36, opt, ent) => {
11676
11606
  const entries = ent.isDirectory() ? await readdirOrError(path36) : null;
11677
11607
  if (!Array.isArray(entries)) {
11678
11608
  if (entries) {
11679
- if (entries.code === "ENOENT") {
11609
+ if (errorCode(entries) === "ENOENT") {
11680
11610
  return true;
11681
11611
  }
11682
- if (entries.code !== "ENOTDIR") {
11612
+ if (errorCode(entries) !== "ENOTDIR") {
11683
11613
  throw entries;
11684
11614
  }
11685
11615
  }
@@ -11689,7 +11619,7 @@ var rimrafMoveRemoveDir = async (path36, opt, ent) => {
11689
11619
  await ignoreENOENT(tmpUnlink(path36, opt.tmp, unlinkFixEPERM));
11690
11620
  return true;
11691
11621
  }
11692
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(resolve6(path36, ent2.name), opt, ent2)))).reduce((a, b) => a && b, true);
11622
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(resolve6(path36, ent2.name), opt, ent2)))).every((v) => v === true);
11693
11623
  if (!removedAll) {
11694
11624
  return false;
11695
11625
  }
@@ -11699,30 +11629,20 @@ var rimrafMoveRemoveDir = async (path36, opt, ent) => {
11699
11629
  if (opt.filter && !await opt.filter(path36, ent)) {
11700
11630
  return false;
11701
11631
  }
11702
- await ignoreENOENT(tmpUnlink(path36, opt.tmp, rmdir3));
11632
+ await ignoreENOENT(tmpUnlink(path36, opt.tmp, rmdir2));
11703
11633
  return true;
11704
11634
  };
11705
- var tmpUnlink = async (path36, tmp, rm3) => {
11635
+ var tmpUnlink = async (path36, tmp, rm2) => {
11706
11636
  const tmpFile = resolve6(tmp, uniqueFilename(path36));
11707
- await rename2(path36, tmpFile);
11708
- return await rm3(tmpFile);
11637
+ await rename(path36, tmpFile);
11638
+ return await rm2(tmpFile);
11709
11639
  };
11710
11640
  var rimrafMoveRemoveSync = (path36, opt) => {
11711
- if (opt?.signal?.aborted) {
11712
- throw opt.signal.reason;
11713
- }
11714
- try {
11715
- return rimrafMoveRemoveDirSync(path36, opt, lstatSync2(path36));
11716
- } catch (er) {
11717
- if (er?.code === "ENOENT")
11718
- return true;
11719
- throw er;
11720
- }
11641
+ opt?.signal?.throwIfAborted();
11642
+ return ignoreENOENTSync(() => rimrafMoveRemoveDirSync(path36, opt, lstatSync2(path36))) ?? true;
11721
11643
  };
11722
11644
  var rimrafMoveRemoveDirSync = (path36, opt, ent) => {
11723
- if (opt?.signal?.aborted) {
11724
- throw opt.signal.reason;
11725
- }
11645
+ opt?.signal?.throwIfAborted();
11726
11646
  if (!opt.tmp) {
11727
11647
  return rimrafMoveRemoveDirSync(path36, { ...opt, tmp: defaultTmpSync(path36) }, ent);
11728
11648
  }
@@ -11733,10 +11653,10 @@ var rimrafMoveRemoveDirSync = (path36, opt, ent) => {
11733
11653
  const entries = ent.isDirectory() ? readdirOrErrorSync(path36) : null;
11734
11654
  if (!Array.isArray(entries)) {
11735
11655
  if (entries) {
11736
- if (entries.code === "ENOENT") {
11656
+ if (errorCode(entries) === "ENOENT") {
11737
11657
  return true;
11738
11658
  }
11739
- if (entries.code !== "ENOTDIR") {
11659
+ if (errorCode(entries) !== "ENOTDIR") {
11740
11660
  throw entries;
11741
11661
  }
11742
11662
  }
@@ -11769,37 +11689,32 @@ var tmpUnlinkSync = (path36, tmp, rmSync2) => {
11769
11689
  return rmSync2(tmpFile);
11770
11690
  };
11771
11691
 
11772
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-windows.js
11773
- var { unlink: unlink4, rmdir: rmdir4, lstat: lstat7 } = promises;
11774
- var rimrafWindowsFile = retryBusy(fixEPERM(unlink4));
11692
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-windows.js
11693
+ var { unlink: unlink3, rmdir: rmdir3, lstat: lstat6 } = promises;
11694
+ var rimrafWindowsFile = retryBusy(fixEPERM(unlink3));
11775
11695
  var rimrafWindowsFileSync = retryBusySync(fixEPERMSync(unlinkSync));
11776
- var rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir4));
11696
+ var rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir3));
11777
11697
  var rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(rmdirSync));
11778
- var rimrafWindowsDirMoveRemoveFallback = async (path36, opt) => {
11779
- if (opt?.signal?.aborted) {
11780
- throw opt.signal.reason;
11781
- }
11782
- const { filter: filter3, ...options } = opt;
11698
+ var rimrafWindowsDirMoveRemoveFallback = async (path36, { filter: filter3, ...opt }) => {
11699
+ opt?.signal?.throwIfAborted();
11783
11700
  try {
11784
- return await rimrafWindowsDirRetry(path36, options);
11701
+ await rimrafWindowsDirRetry(path36, opt);
11702
+ return true;
11785
11703
  } catch (er) {
11786
- if (er?.code === "ENOTEMPTY") {
11787
- return await rimrafMoveRemove(path36, options);
11704
+ if (errorCode(er) === "ENOTEMPTY") {
11705
+ return rimrafMoveRemove(path36, opt);
11788
11706
  }
11789
11707
  throw er;
11790
11708
  }
11791
11709
  };
11792
- var rimrafWindowsDirMoveRemoveFallbackSync = (path36, opt) => {
11793
- if (opt?.signal?.aborted) {
11794
- throw opt.signal.reason;
11795
- }
11796
- const { filter: filter3, ...options } = opt;
11710
+ var rimrafWindowsDirMoveRemoveFallbackSync = (path36, { filter: filter3, ...opt }) => {
11711
+ opt?.signal?.throwIfAborted();
11797
11712
  try {
11798
- return rimrafWindowsDirRetrySync(path36, options);
11713
+ rimrafWindowsDirRetrySync(path36, opt);
11714
+ return true;
11799
11715
  } catch (er) {
11800
- const fer = er;
11801
- if (fer?.code === "ENOTEMPTY") {
11802
- return rimrafMoveRemoveSync(path36, options);
11716
+ if (errorCode(er) === "ENOTEMPTY") {
11717
+ return rimrafMoveRemoveSync(path36, opt);
11803
11718
  }
11804
11719
  throw er;
11805
11720
  }
@@ -11808,40 +11723,22 @@ var START = Symbol("start");
11808
11723
  var CHILD = Symbol("child");
11809
11724
  var FINISH = Symbol("finish");
11810
11725
  var rimrafWindows = async (path36, opt) => {
11811
- if (opt?.signal?.aborted) {
11812
- throw opt.signal.reason;
11813
- }
11814
- try {
11815
- return await rimrafWindowsDir(path36, opt, await lstat7(path36), START);
11816
- } catch (er) {
11817
- if (er?.code === "ENOENT")
11818
- return true;
11819
- throw er;
11820
- }
11726
+ opt?.signal?.throwIfAborted();
11727
+ return await ignoreENOENT(lstat6(path36).then((stat5) => rimrafWindowsDir(path36, opt, stat5, START))) ?? true;
11821
11728
  };
11822
11729
  var rimrafWindowsSync = (path36, opt) => {
11823
- if (opt?.signal?.aborted) {
11824
- throw opt.signal.reason;
11825
- }
11826
- try {
11827
- return rimrafWindowsDirSync(path36, opt, lstatSync2(path36), START);
11828
- } catch (er) {
11829
- if (er?.code === "ENOENT")
11830
- return true;
11831
- throw er;
11832
- }
11730
+ opt?.signal?.throwIfAborted();
11731
+ return ignoreENOENTSync(() => rimrafWindowsDirSync(path36, opt, lstatSync2(path36), START)) ?? true;
11833
11732
  };
11834
11733
  var rimrafWindowsDir = async (path36, opt, ent, state = START) => {
11835
- if (opt?.signal?.aborted) {
11836
- throw opt.signal.reason;
11837
- }
11734
+ opt?.signal?.throwIfAborted();
11838
11735
  const entries = ent.isDirectory() ? await readdirOrError(path36) : null;
11839
11736
  if (!Array.isArray(entries)) {
11840
11737
  if (entries) {
11841
- if (entries.code === "ENOENT") {
11738
+ if (errorCode(entries) === "ENOENT") {
11842
11739
  return true;
11843
11740
  }
11844
- if (entries.code !== "ENOTDIR") {
11741
+ if (errorCode(entries) !== "ENOTDIR") {
11845
11742
  throw entries;
11846
11743
  }
11847
11744
  }
@@ -11852,7 +11749,7 @@ var rimrafWindowsDir = async (path36, opt, ent, state = START) => {
11852
11749
  return true;
11853
11750
  }
11854
11751
  const s = state === START ? CHILD : state;
11855
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(resolve7(path36, ent2.name), opt, ent2, s)))).reduce((a, b) => a && b, true);
11752
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(resolve7(path36, ent2.name), opt, ent2, s)))).every((v) => v === true);
11856
11753
  if (state === START) {
11857
11754
  return rimrafWindowsDir(path36, opt, ent, FINISH);
11858
11755
  } else if (state === FINISH) {
@@ -11873,10 +11770,10 @@ var rimrafWindowsDirSync = (path36, opt, ent, state = START) => {
11873
11770
  const entries = ent.isDirectory() ? readdirOrErrorSync(path36) : null;
11874
11771
  if (!Array.isArray(entries)) {
11875
11772
  if (entries) {
11876
- if (entries.code === "ENOENT") {
11773
+ if (errorCode(entries) === "ENOENT") {
11877
11774
  return true;
11878
11775
  }
11879
- if (entries.code !== "ENOTDIR") {
11776
+ if (errorCode(entries) !== "ENOTDIR") {
11880
11777
  throw entries;
11881
11778
  }
11882
11779
  }
@@ -11904,22 +11801,20 @@ var rimrafWindowsDirSync = (path36, opt, ent, state = START) => {
11904
11801
  if (opt.filter && !opt.filter(path36, ent)) {
11905
11802
  return false;
11906
11803
  }
11907
- ignoreENOENTSync(() => {
11908
- rimrafWindowsDirMoveRemoveFallbackSync(path36, opt);
11909
- });
11804
+ ignoreENOENTSync(() => rimrafWindowsDirMoveRemoveFallbackSync(path36, opt));
11910
11805
  }
11911
11806
  return true;
11912
11807
  };
11913
11808
 
11914
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-manual.js
11915
- var rimrafManual = platform_default === "win32" ? rimrafWindows : rimrafPosix;
11916
- var rimrafManualSync = platform_default === "win32" ? rimrafWindowsSync : rimrafPosixSync;
11809
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-manual.js
11810
+ var rimrafManual = process.platform === "win32" ? rimrafWindows : rimrafPosix;
11811
+ var rimrafManualSync = process.platform === "win32" ? rimrafWindowsSync : rimrafPosixSync;
11917
11812
 
11918
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-native.js
11813
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/rimraf-native.js
11919
11814
  init_esm_shims();
11920
- var { rm: rm2 } = promises;
11815
+ var { rm } = promises;
11921
11816
  var rimrafNative = async (path36, opt) => {
11922
- await rm2(path36, {
11817
+ await rm(path36, {
11923
11818
  ...opt,
11924
11819
  force: true,
11925
11820
  recursive: true
@@ -11935,16 +11830,14 @@ var rimrafNativeSync = (path36, opt) => {
11935
11830
  return true;
11936
11831
  };
11937
11832
 
11938
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/use-native.js
11833
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/use-native.js
11939
11834
  init_esm_shims();
11940
- var version = process.env.__TESTING_RIMRAF_NODE_VERSION__ || process.version;
11941
- var versArr = version.replace(/^v/, "").split(".");
11942
- var [major = 0, minor = 0] = versArr.map((v) => parseInt(v, 10));
11835
+ var [major = 0, minor = 0] = process.version.replace(/^v/, "").split(".").map((v) => parseInt(v, 10));
11943
11836
  var hasNative = major > 14 || major === 14 && minor >= 14;
11944
- var useNative = !hasNative || platform_default === "win32" ? () => false : (opt) => !opt?.signal && !opt?.filter;
11945
- var useNativeSync = !hasNative || platform_default === "win32" ? () => false : (opt) => !opt?.signal && !opt?.filter;
11837
+ var useNative = !hasNative || process.platform === "win32" ? () => false : (opt) => !opt?.signal && !opt?.filter;
11838
+ var useNativeSync = !hasNative || process.platform === "win32" ? () => false : (opt) => !opt?.signal && !opt?.filter;
11946
11839
 
11947
- // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/index.js
11840
+ // ../../node_modules/.pnpm/rimraf@6.1.0/node_modules/rimraf/dist/esm/index.js
11948
11841
  var wrap = (fn) => async (path36, opt) => {
11949
11842
  const options = optArg(opt);
11950
11843
  if (options.glob) {
@@ -12537,11 +12430,45 @@ function createBuildService(ctx) {
12537
12430
  ignoreInitial: true
12538
12431
  }
12539
12432
  );
12433
+ const logWorkerEvent = (type, target, level = "info") => {
12434
+ if (!target) {
12435
+ return;
12436
+ }
12437
+ const relative3 = configService.relativeCwd(target);
12438
+ const message = `[workers:${type}] ${relative3}`;
12439
+ if (level === "success") {
12440
+ logger_default.success(message);
12441
+ } else {
12442
+ logger_default.info(message);
12443
+ }
12444
+ };
12540
12445
  watcher2.on("all", (event, id) => {
12446
+ if (!id) {
12447
+ return;
12448
+ }
12541
12449
  if (event === "add") {
12542
- logger_default.success(`[workers:${event}] ${configService.relativeCwd(id)}`);
12450
+ logWorkerEvent(event, id, "success");
12543
12451
  void devWorkers(workersDir);
12452
+ return;
12544
12453
  }
12454
+ logWorkerEvent(event, id);
12455
+ });
12456
+ watcher2.on("raw", (eventName, rawPath, details) => {
12457
+ if (eventName !== "rename") {
12458
+ return;
12459
+ }
12460
+ const candidate = typeof rawPath === "string" ? rawPath : rawPath && typeof rawPath.toString === "function" ? rawPath.toString() : "";
12461
+ if (!candidate) {
12462
+ return;
12463
+ }
12464
+ const baseDir = typeof details === "object" && details && "watchedPath" in details ? details.watchedPath ?? absWorkerRoot : absWorkerRoot;
12465
+ const resolved = path11.isAbsolute(candidate) ? candidate : path11.resolve(baseDir, candidate);
12466
+ const exists = fs6.existsSync(resolved);
12467
+ if (exists) {
12468
+ logWorkerEvent("rename->add", resolved);
12469
+ return;
12470
+ }
12471
+ logWorkerEvent("rename->unlink", resolved);
12545
12472
  });
12546
12473
  watcherService.sidecarWatcherMap.set(absWorkerRoot, {
12547
12474
  close: () => watcher2.close()
@@ -12664,7 +12591,7 @@ import fs8 from "fs";
12664
12591
  import { createRequire as createRequire2 } from "module";
12665
12592
  import path13, { dirname as dirname4, join as join3, win32 as win322 } from "path";
12666
12593
  import process4 from "process";
12667
- import fsPromises from "fs/promises";
12594
+ import fsPromises2 from "fs/promises";
12668
12595
  import { fileURLToPath as fileURLToPath4 } from "url";
12669
12596
 
12670
12597
  // ../../node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs
@@ -18257,10 +18184,10 @@ pp.readWord = function() {
18257
18184
  }
18258
18185
  return this.finishToken(type, word);
18259
18186
  };
18260
- var version2 = "8.15.0";
18187
+ var version = "8.15.0";
18261
18188
  Parser.acorn = {
18262
18189
  Parser,
18263
- version: version2,
18190
+ version,
18264
18191
  defaultOptions: defaultOptions2,
18265
18192
  Position,
18266
18193
  SourceLocation,
@@ -19480,8 +19407,8 @@ function packageResolve(specifier, base, conditions) {
19480
19407
  let packageJsonPath = fileURLToPath$1(packageJsonUrl);
19481
19408
  let lastPath;
19482
19409
  do {
19483
- const stat6 = tryStatSync(packageJsonPath.slice(0, -13));
19484
- if (!stat6 || !stat6.isDirectory()) {
19410
+ const stat5 = tryStatSync(packageJsonPath.slice(0, -13));
19411
+ if (!stat5 || !stat5.isDirectory()) {
19485
19412
  lastPath = packageJsonPath;
19486
19413
  packageJsonUrl = new URL$1(
19487
19414
  (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json",
@@ -19611,8 +19538,8 @@ function _resolve(id, options = {}) {
19611
19538
  }
19612
19539
  if (isAbsolute2(id)) {
19613
19540
  try {
19614
- const stat6 = statSync2(id);
19615
- if (stat6.isFile()) {
19541
+ const stat5 = statSync2(id);
19542
+ if (stat5.isFile()) {
19616
19543
  return pathToFileURL(id);
19617
19544
  }
19618
19545
  } catch (error) {
@@ -19797,7 +19724,7 @@ async function findUp$1(name, {
19797
19724
  while (directory) {
19798
19725
  const filePath = isAbsoluteName ? name : path13.join(directory, name);
19799
19726
  try {
19800
- const stats = await fsPromises.stat(filePath);
19727
+ const stats = await fsPromises2.stat(filePath);
19801
19728
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
19802
19729
  return filePath;
19803
19730
  }
@@ -19975,8 +19902,8 @@ var INSTALL_METADATA = {
19975
19902
  // ../../node_modules/.pnpm/package-manager-detector@1.5.0/node_modules/package-manager-detector/dist/detect.mjs
19976
19903
  async function pathExists(path210, type) {
19977
19904
  try {
19978
- const stat6 = await fs9.stat(path210);
19979
- return type === "file" ? stat6.isFile() : stat6.isDirectory();
19905
+ const stat5 = await fs9.stat(path210);
19906
+ return type === "file" ? stat5.isFile() : stat5.isDirectory();
19980
19907
  } catch {
19981
19908
  return false;
19982
19909
  }
@@ -20047,7 +19974,7 @@ async function detect(options = {}) {
20047
19974
  return null;
20048
19975
  }
20049
19976
  function getNameAndVer(pkg) {
20050
- const handelVer = (version3) => version3?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version3;
19977
+ const handelVer = (version2) => version2?.match(/\d+(\.\d+){0,2}/)?.[0] ?? version2;
20051
19978
  if (typeof pkg.packageManager === "string") {
20052
19979
  const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
20053
19980
  return { name, ver: handelVer(ver) };
@@ -20068,17 +19995,17 @@ async function handlePackageManager(filepath, onUnknown) {
20068
19995
  if (nameAndVer) {
20069
19996
  const name = nameAndVer.name;
20070
19997
  const ver = nameAndVer.ver;
20071
- let version3 = ver;
19998
+ let version2 = ver;
20072
19999
  if (name === "yarn" && ver && Number.parseInt(ver) > 1) {
20073
20000
  agent = "yarn@berry";
20074
- version3 = "berry";
20075
- return { name, agent, version: version3 };
20001
+ version2 = "berry";
20002
+ return { name, agent, version: version2 };
20076
20003
  } else if (name === "pnpm" && ver && Number.parseInt(ver) < 7) {
20077
20004
  agent = "pnpm@6";
20078
- return { name, agent, version: version3 };
20005
+ return { name, agent, version: version2 };
20079
20006
  } else if (AGENTS.includes(name)) {
20080
20007
  agent = name;
20081
- return { name, agent, version: version3 };
20008
+ return { name, agent, version: version2 };
20082
20009
  } else {
20083
20010
  return onUnknown?.(pkg.packageManager) ?? null;
20084
20011
  }
@@ -20207,7 +20134,7 @@ function createOxcRuntimeSupport() {
20207
20134
  if (helperName) {
20208
20135
  const helperPath = id.startsWith(NULL_BYTE) ? path15.resolve(oxcRuntimeHelpersRoot, `${helperName}.js`) : id;
20209
20136
  if (await fs10.pathExists(helperPath)) {
20210
- console.warn("[weapp-vite] resolving oxc helper via Rolldown plugin:", helperName);
20137
+ logger_default.warn(`[weapp-vite] resolving oxc helper via Rolldown plugin: ${helperName}`);
20211
20138
  return fs10.readFile(helperPath, "utf8");
20212
20139
  }
20213
20140
  const fallback = fallbackHelpers[helperName];
@@ -20226,7 +20153,7 @@ function createOxcRuntimeSupport() {
20226
20153
  return null;
20227
20154
  }
20228
20155
  if (source.includes("@oxc-project/runtime/helpers")) {
20229
- console.warn("[weapp-vite] resolveId intercepted:", source);
20156
+ logger_default.warn(`[weapp-vite] resolveId intercepted: ${source}`);
20230
20157
  }
20231
20158
  const helperName = getOxcHelperName(source);
20232
20159
  if (helperName) {
@@ -20243,7 +20170,7 @@ function createOxcRuntimeSupport() {
20243
20170
  return null;
20244
20171
  }
20245
20172
  const helperPath = path15.resolve(oxcRuntimeHelpersRoot, `${helperName}.js`);
20246
- console.warn("[weapp-vite] resolving oxc helper via Vite plugin:", helperName);
20173
+ logger_default.warn(`[weapp-vite] resolving oxc helper via Vite plugin: ${helperName}`);
20247
20174
  return fs10.readFile(helperPath, "utf8");
20248
20175
  }
20249
20176
  };
@@ -20836,40 +20763,8 @@ init_esm_shims();
20836
20763
  import { fdir as Fdir2 } from "fdir";
20837
20764
  import fs12 from "fs-extra";
20838
20765
  import path19 from "pathe";
20839
- function asset(ctx) {
20840
- const state = { ctx };
20841
- return [createAssetCollector(state)];
20842
- }
20843
- function createAssetCollector(state) {
20844
- const { ctx } = state;
20845
- const { configService } = ctx;
20846
- return {
20847
- name: "weapp-vite:asset",
20848
- enforce: "pre",
20849
- configResolved(config) {
20850
- state.resolvedConfig = config;
20851
- },
20852
- buildStart() {
20853
- if (!state.resolvedConfig) {
20854
- state.pendingAssets = Promise.resolve([]);
20855
- return;
20856
- }
20857
- state.pendingAssets = scanAssetFiles(configService, state.resolvedConfig);
20858
- },
20859
- async buildEnd() {
20860
- const assets = await state.pendingAssets;
20861
- if (!assets?.length) {
20862
- return;
20863
- }
20864
- for (const candidate of assets) {
20865
- this.emitFile({
20866
- type: "asset",
20867
- fileName: configService.relativeAbsoluteSrcRoot(candidate.file),
20868
- source: candidate.buffer
20869
- });
20870
- }
20871
- }
20872
- };
20766
+ function normalizeCopyGlobs(globs) {
20767
+ return Array.isArray(globs) ? globs : [];
20873
20768
  }
20874
20769
  function scanAssetFiles(configService, config) {
20875
20770
  const weappViteConfig = configService.weappViteConfig;
@@ -20915,8 +20810,40 @@ function scanAssetFiles(configService, config) {
20915
20810
  );
20916
20811
  });
20917
20812
  }
20918
- function normalizeCopyGlobs(globs) {
20919
- return Array.isArray(globs) ? globs : [];
20813
+ function createAssetCollector(state) {
20814
+ const { ctx } = state;
20815
+ const { configService } = ctx;
20816
+ return {
20817
+ name: "weapp-vite:asset",
20818
+ enforce: "pre",
20819
+ configResolved(config) {
20820
+ state.resolvedConfig = config;
20821
+ },
20822
+ buildStart() {
20823
+ if (!state.resolvedConfig) {
20824
+ state.pendingAssets = Promise.resolve([]);
20825
+ return;
20826
+ }
20827
+ state.pendingAssets = scanAssetFiles(configService, state.resolvedConfig);
20828
+ },
20829
+ async buildEnd() {
20830
+ const assets = await state.pendingAssets;
20831
+ if (!assets?.length) {
20832
+ return;
20833
+ }
20834
+ for (const candidate of assets) {
20835
+ this.emitFile({
20836
+ type: "asset",
20837
+ fileName: configService.relativeAbsoluteSrcRoot(candidate.file),
20838
+ source: candidate.buffer
20839
+ });
20840
+ }
20841
+ }
20842
+ };
20843
+ }
20844
+ function asset(ctx) {
20845
+ const state = { ctx };
20846
+ return [createAssetCollector(state)];
20920
20847
  }
20921
20848
 
20922
20849
  // src/plugins/autoImport.ts
@@ -22842,22 +22769,6 @@ function createEntryLoader(options) {
22842
22769
  init_esm_shims();
22843
22770
  import { isObject as isObject5 } from "@weapp-core/shared";
22844
22771
  import path24 from "pathe";
22845
- function createEntryNormalizer(configService) {
22846
- return function normalizeEntry(entry, jsonPath) {
22847
- if (/plugin:\/\//.test(entry)) {
22848
- return entry;
22849
- }
22850
- const tokens = entry.split("/");
22851
- if (tokens[0] && isObject5(configService.packageJson.dependencies) && hasDependencyPrefix(configService.packageJson.dependencies, tokens)) {
22852
- return `npm:${entry}`;
22853
- }
22854
- if (tokens[0] === "") {
22855
- return entry.substring(1);
22856
- }
22857
- const normalized = resolveImportee2(entry, jsonPath, configService);
22858
- return configService.relativeAbsoluteSrcRoot(normalized);
22859
- };
22860
- }
22861
22772
  function resolveImportee2(importee, jsonPath, configService) {
22862
22773
  let updated = importee;
22863
22774
  if (jsonPath && Array.isArray(configService.aliasEntries)) {
@@ -22880,6 +22791,22 @@ function hasDependencyPrefix(dependencies, tokens) {
22880
22791
  return true;
22881
22792
  });
22882
22793
  }
22794
+ function createEntryNormalizer(configService) {
22795
+ return function normalizeEntry(entry, jsonPath) {
22796
+ if (/plugin:\/\//.test(entry)) {
22797
+ return entry;
22798
+ }
22799
+ const tokens = entry.split("/");
22800
+ if (tokens[0] && isObject5(configService.packageJson.dependencies) && hasDependencyPrefix(configService.packageJson.dependencies, tokens)) {
22801
+ return `npm:${entry}`;
22802
+ }
22803
+ if (tokens[0] === "") {
22804
+ return entry.substring(1);
22805
+ }
22806
+ const normalized = resolveImportee2(entry, jsonPath, configService);
22807
+ return configService.relativeAbsoluteSrcRoot(normalized);
22808
+ };
22809
+ }
22883
22810
 
22884
22811
  // src/plugins/hooks/useLoadEntry/template.ts
22885
22812
  init_esm_shims();
@@ -22960,11 +22887,15 @@ import fs15 from "fs";
22960
22887
  import process6 from "process";
22961
22888
  import path25 from "pathe";
22962
22889
  var watchedCssExts = new Set(supportedCssLangs.map((ext2) => `.${ext2}`));
22890
+ var watchedTemplateExts = new Set(templateExtensions.map((ext2) => `.${ext2}`));
22963
22891
  var configSuffixes = configExtensions.map((ext2) => `.${ext2}`);
22964
- var sidecarSuffixes = [...configSuffixes, ...watchedCssExts];
22892
+ var sidecarSuffixes = [...configSuffixes, ...watchedCssExts, ...watchedTemplateExts];
22965
22893
  var watchLimitErrorCodes = /* @__PURE__ */ new Set(["EMFILE", "ENOSPC"]);
22966
22894
  var importProtocols = /^(?:https?:|data:|blob:|\/)/i;
22967
- var cssImportRE = /@(import|wv-keep-import)\s+(?:url\()?['"]?([^'")\s]+)['"]?\)?/gi;
22895
+ var cssImportRE = /@(?:import|wv-keep-import)\s+(?:url\()?['"]?([^'")\s]+)['"]?\)?/gi;
22896
+ function isSidecarFile(filePath) {
22897
+ return sidecarSuffixes.some((suffix) => filePath.endsWith(suffix));
22898
+ }
22968
22899
  function isWatchLimitError(error) {
22969
22900
  if (!error || typeof error !== "object") {
22970
22901
  return false;
@@ -23062,7 +22993,7 @@ async function extractCssImportDependencies(ctx, importer) {
23062
22993
  if (!match2) {
23063
22994
  break;
23064
22995
  }
23065
- const rawSpecifier = match2[2]?.trim();
22996
+ const rawSpecifier = match2[1]?.trim();
23066
22997
  if (!rawSpecifier) {
23067
22998
  continue;
23068
22999
  }
@@ -23172,6 +23103,8 @@ async function invalidateEntryForSidecar(ctx, filePath, event = "update") {
23172
23103
  scriptBasePath = filePath.slice(0, -configSuffix.length);
23173
23104
  } else if (ext2 && watchedCssExts.has(ext2)) {
23174
23105
  scriptBasePath = filePath.slice(0, -ext2.length);
23106
+ } else if (ext2 && watchedTemplateExts.has(ext2)) {
23107
+ scriptBasePath = filePath.slice(0, -ext2.length);
23175
23108
  }
23176
23109
  if (!scriptBasePath) {
23177
23110
  return;
@@ -23192,6 +23125,7 @@ async function invalidateEntryForSidecar(ctx, filePath, event = "update") {
23192
23125
  }
23193
23126
  }
23194
23127
  const isCssSidecar = Boolean(ext2 && watchedCssExts.has(ext2));
23128
+ const isTemplateSidecar = Boolean(ext2 && watchedTemplateExts.has(ext2));
23195
23129
  const configService = ctx.configService;
23196
23130
  const relativeSource = configService.relativeCwd(normalizedPath);
23197
23131
  for (const target of touchedTargets) {
@@ -23207,7 +23141,7 @@ async function invalidateEntryForSidecar(ctx, filePath, event = "update") {
23207
23141
  }
23208
23142
  }
23209
23143
  if (!touchedTargets.size && !touchedScripts.size) {
23210
- if (event === "create" && isCssSidecar) {
23144
+ if (event === "create" && (isCssSidecar || isTemplateSidecar)) {
23211
23145
  logger_default.info(`[sidecar:${event}] ${relativeSource} \u65B0\u589E\uFF0C\u4F46\u672A\u627E\u5230\u5F15\u7528\u65B9\uFF0C\u7B49\u5F85\u540E\u7EED\u5173\u8054`);
23212
23146
  }
23213
23147
  return;
@@ -23244,23 +23178,25 @@ function ensureSidecarWatcher(ctx, rootDir) {
23244
23178
  if (isCssFile && (event === "create" || event === "update")) {
23245
23179
  void extractCssImportDependencies(ctx, filePath);
23246
23180
  }
23247
- const shouldInvalidate = event === "create" && ready || event === "delete";
23181
+ const isDeleteEvent = event === "delete";
23182
+ const shouldInvalidate = event === "create" && ready || isDeleteEvent;
23248
23183
  if (shouldInvalidate) {
23249
23184
  void (async () => {
23250
23185
  await invalidateEntryForSidecar(ctx, filePath, event);
23251
- if (isCssFile && event === "delete") {
23186
+ if (isCssFile && isDeleteEvent) {
23252
23187
  cleanupImporterGraph(ctx, filePath);
23253
23188
  }
23254
23189
  })();
23255
23190
  return;
23256
23191
  }
23257
- if (isCssFile && event === "delete") {
23192
+ if (isCssFile && isDeleteEvent) {
23258
23193
  cleanupImporterGraph(ctx, filePath);
23259
23194
  }
23260
23195
  };
23261
23196
  const patterns = [
23262
23197
  ...configExtensions.map((ext2) => path25.join(absRoot, `**/*.${ext2}`)),
23263
- ...supportedCssLangs.map((ext2) => path25.join(absRoot, `**/*.${ext2}`))
23198
+ ...supportedCssLangs.map((ext2) => path25.join(absRoot, `**/*.${ext2}`)),
23199
+ ...templateExtensions.map((ext2) => path25.join(absRoot, `**/*.${ext2}`))
23264
23200
  ];
23265
23201
  const watcher = esm_default.watch(patterns, {
23266
23202
  ignoreInitial: false,
@@ -23270,11 +23206,15 @@ function ensureSidecarWatcher(ctx, rootDir) {
23270
23206
  pollInterval: 20
23271
23207
  }
23272
23208
  });
23273
- const forwardChange = (event, input) => {
23209
+ const forwardChange = (event, input, options) => {
23274
23210
  if (!input) {
23275
23211
  return;
23276
23212
  }
23277
- handleSidecarChange(event, path25.normalize(input), isReady);
23213
+ const normalizedPath = path25.normalize(input);
23214
+ if (!options?.silent) {
23215
+ logger_default.info(`[watch:${event}] ${ctx.configService.relativeCwd(normalizedPath)}`);
23216
+ }
23217
+ handleSidecarChange(event, normalizedPath, isReady);
23278
23218
  };
23279
23219
  watcher.on("add", (path36) => forwardChange("create", path36));
23280
23220
  watcher.on("change", (path36) => forwardChange("update", path36));
@@ -23289,7 +23229,11 @@ function ensureSidecarWatcher(ctx, rootDir) {
23289
23229
  }
23290
23230
  const baseDir = typeof details === "object" && details && "watchedPath" in details ? details.watchedPath ?? absRoot : absRoot;
23291
23231
  const resolved = path25.isAbsolute(candidate) ? candidate : path25.resolve(baseDir, candidate);
23292
- forwardChange("create", resolved);
23232
+ const exists = fs15.existsSync(resolved);
23233
+ const derivedEvent = exists ? "create" : "delete";
23234
+ const relativeResolved = ctx.configService.relativeCwd(resolved);
23235
+ logger_default.info(`[watch:rename->${derivedEvent}] ${relativeResolved}`);
23236
+ forwardChange(derivedEvent, resolved, { silent: true });
23293
23237
  });
23294
23238
  watcher.on("ready", () => {
23295
23239
  isReady = true;
@@ -23306,9 +23250,6 @@ function ensureSidecarWatcher(ctx, rootDir) {
23306
23250
  close: () => void watcher.close()
23307
23251
  });
23308
23252
  }
23309
- function isSidecarFile(filePath) {
23310
- return sidecarSuffixes.some((suffix) => filePath.endsWith(suffix));
23311
- }
23312
23253
 
23313
23254
  // src/plugins/utils/parse.ts
23314
23255
  init_esm_shims();
@@ -24338,9 +24279,6 @@ init_esm_shims();
24338
24279
  import { isObject as isObject7 } from "@weapp-core/shared";
24339
24280
  var debug3 = createDebugger("weapp-vite:preflight");
24340
24281
  var removePlugins = ["vite:build-import-analysis"];
24341
- function preflight(ctx) {
24342
- return [createPluginPruner(), createEnvSynchronizer(ctx)];
24343
- }
24344
24282
  function createPluginPruner() {
24345
24283
  return {
24346
24284
  name: "weapp-vite:preflight",
@@ -24373,6 +24311,9 @@ function createEnvSynchronizer({ configService }) {
24373
24311
  }
24374
24312
  };
24375
24313
  }
24314
+ function preflight(ctx) {
24315
+ return [createPluginPruner(), createEnvSynchronizer(ctx)];
24316
+ }
24376
24317
 
24377
24318
  // src/plugins/workers.ts
24378
24319
  init_esm_shims();
@@ -24380,11 +24321,25 @@ import { createHash as createHash2 } from "crypto";
24380
24321
  import { removeExtension as removeExtension2 } from "@weapp-core/shared";
24381
24322
  import fs18 from "fs-extra";
24382
24323
  import path29 from "pathe";
24383
- function workers(ctx) {
24384
- if (!ctx.scanService.workersDir) {
24385
- return [];
24324
+ async function resolveWorkerEntry(ctx, entry) {
24325
+ const { configService, scanService } = ctx;
24326
+ const relativeEntryPath = path29.join(scanService.workersDir, entry);
24327
+ const key = removeExtension2(relativeEntryPath);
24328
+ const absoluteEntry = path29.resolve(configService.absoluteSrcRoot, relativeEntryPath);
24329
+ if (isJsOrTs(entry)) {
24330
+ const exists = await fs18.exists(absoluteEntry);
24331
+ if (!exists) {
24332
+ logger_default.warn(`\u5F15\u7528 worker: \`${configService.relativeCwd(relativeEntryPath)}\` \u4E0D\u5B58\u5728!`);
24333
+ return { key };
24334
+ }
24335
+ return { key, value: absoluteEntry };
24386
24336
  }
24387
- return [createWorkerBuildPlugin(ctx)];
24337
+ const { path: discovered } = await findJsEntry(absoluteEntry);
24338
+ if (!discovered) {
24339
+ logger_default.warn(`\u5F15\u7528 worker: \`${configService.relativeCwd(relativeEntryPath)}\` \u4E0D\u5B58\u5728!`);
24340
+ return { key };
24341
+ }
24342
+ return { key, value: discovered };
24388
24343
  }
24389
24344
  function createWorkerBuildPlugin(ctx) {
24390
24345
  const { configService, scanService } = ctx;
@@ -24417,25 +24372,11 @@ function createWorkerBuildPlugin(ctx) {
24417
24372
  }
24418
24373
  };
24419
24374
  }
24420
- async function resolveWorkerEntry(ctx, entry) {
24421
- const { configService, scanService } = ctx;
24422
- const relativeEntryPath = path29.join(scanService.workersDir, entry);
24423
- const key = removeExtension2(relativeEntryPath);
24424
- const absoluteEntry = path29.resolve(configService.absoluteSrcRoot, relativeEntryPath);
24425
- if (isJsOrTs(entry)) {
24426
- const exists = await fs18.exists(absoluteEntry);
24427
- if (!exists) {
24428
- logger_default.warn(`\u5F15\u7528 worker: \`${configService.relativeCwd(relativeEntryPath)}\` \u4E0D\u5B58\u5728!`);
24429
- return { key };
24430
- }
24431
- return { key, value: absoluteEntry };
24432
- }
24433
- const { path: discovered } = await findJsEntry(absoluteEntry);
24434
- if (!discovered) {
24435
- logger_default.warn(`\u5F15\u7528 worker: \`${configService.relativeCwd(relativeEntryPath)}\` \u4E0D\u5B58\u5728!`);
24436
- return { key };
24375
+ function workers(ctx) {
24376
+ if (!ctx.scanService.workersDir) {
24377
+ return [];
24437
24378
  }
24438
- return { key, value: discovered };
24379
+ return [createWorkerBuildPlugin(ctx)];
24439
24380
  }
24440
24381
 
24441
24382
  // src/plugins/wxs.ts
@@ -24446,52 +24387,6 @@ import path30 from "pathe";
24446
24387
  var wxsCodeCache = new LRUCache({
24447
24388
  max: 512
24448
24389
  });
24449
- function wxs(ctx) {
24450
- const state = {
24451
- ctx,
24452
- wxsMap: /* @__PURE__ */ new Map()
24453
- };
24454
- return [createWxsPlugin(state)];
24455
- }
24456
- function createWxsPlugin(state) {
24457
- const { ctx } = state;
24458
- const { wxmlService } = ctx;
24459
- return {
24460
- name: "weapp-vite:wxs",
24461
- enforce: "pre",
24462
- buildStart() {
24463
- state.wxsMap.clear();
24464
- },
24465
- async buildEnd() {
24466
- await Promise.all(
24467
- Array.from(wxmlService.tokenMap.entries()).map(([id, token]) => {
24468
- return handleWxsDeps.call(
24469
- // @ts-ignore rolldown context
24470
- this,
24471
- state,
24472
- token.deps,
24473
- id
24474
- );
24475
- })
24476
- );
24477
- for (const { emittedFile } of state.wxsMap.values()) {
24478
- this.emitFile(emittedFile);
24479
- }
24480
- }
24481
- };
24482
- }
24483
- async function handleWxsDeps(state, deps, absPath) {
24484
- await Promise.all(
24485
- deps.filter((dep) => dep.tagName === "wxs").map(async (dep) => {
24486
- const arr = dep.value.match(/\.wxs(\.[jt]s)?$/);
24487
- if (!jsExtensions.includes(dep.attrs.lang) && !arr) {
24488
- return;
24489
- }
24490
- const wxsPath = path30.resolve(path30.dirname(absPath), dep.value);
24491
- await transformWxsFile.call(this, state, wxsPath);
24492
- })
24493
- );
24494
- }
24495
24390
  async function transformWxsFile(state, wxsPath) {
24496
24391
  const { ctx } = state;
24497
24392
  const { configService } = ctx;
@@ -24538,6 +24433,52 @@ async function transformWxsFile(state, wxsPath) {
24538
24433
  });
24539
24434
  wxsCodeCache.set(rawCode, code);
24540
24435
  }
24436
+ async function handleWxsDeps(state, deps, absPath) {
24437
+ await Promise.all(
24438
+ deps.filter((dep) => dep.tagName === "wxs").map(async (dep) => {
24439
+ const arr = dep.value.match(/\.wxs(\.[jt]s)?$/);
24440
+ if (!jsExtensions.includes(dep.attrs.lang) && !arr) {
24441
+ return;
24442
+ }
24443
+ const wxsPath = path30.resolve(path30.dirname(absPath), dep.value);
24444
+ await transformWxsFile.call(this, state, wxsPath);
24445
+ })
24446
+ );
24447
+ }
24448
+ function createWxsPlugin(state) {
24449
+ const { ctx } = state;
24450
+ const { wxmlService } = ctx;
24451
+ return {
24452
+ name: "weapp-vite:wxs",
24453
+ enforce: "pre",
24454
+ buildStart() {
24455
+ state.wxsMap.clear();
24456
+ },
24457
+ async buildEnd() {
24458
+ await Promise.all(
24459
+ Array.from(wxmlService.tokenMap.entries()).map(([id, token]) => {
24460
+ return handleWxsDeps.call(
24461
+ // @ts-ignore rolldown context
24462
+ this,
24463
+ state,
24464
+ token.deps,
24465
+ id
24466
+ );
24467
+ })
24468
+ );
24469
+ for (const { emittedFile } of state.wxsMap.values()) {
24470
+ this.emitFile(emittedFile);
24471
+ }
24472
+ }
24473
+ };
24474
+ }
24475
+ function wxs(ctx) {
24476
+ const state = {
24477
+ ctx,
24478
+ wxsMap: /* @__PURE__ */ new Map()
24479
+ };
24480
+ return [createWxsPlugin(state)];
24481
+ }
24541
24482
 
24542
24483
  // src/plugins/index.ts
24543
24484
  var RUNTIME_PLUGINS_SYMBOL = Symbol.for("weapp-runtime:plugins");
@@ -26162,8 +26103,8 @@ var FileCache = class {
26162
26103
  async isInvalidate(id, options) {
26163
26104
  let mtimeMs;
26164
26105
  try {
26165
- const stat6 = await fs22.stat(id);
26166
- mtimeMs = stat6.mtimeMs;
26106
+ const stat5 = await fs22.stat(id);
26107
+ mtimeMs = stat5.mtimeMs;
26167
26108
  } catch (error) {
26168
26109
  if (error && error.code === "ENOENT") {
26169
26110
  this.cache.delete(id);