weapp-vite 4.0.5-alpha.2 → 4.1.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.
@@ -5502,7 +5502,7 @@ var ReaddirpStream = class extends _stream.Readable {
5502
5502
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
5503
5503
  const statMethod = opts.lstat ? _promises.lstat : _promises.stat;
5504
5504
  if (wantBigintFsStats) {
5505
- this._stat = (path21) => statMethod(path21, {
5505
+ this._stat = (path23) => statMethod(path23, {
5506
5506
  bigint: true
5507
5507
  });
5508
5508
  } else {
@@ -5533,8 +5533,8 @@ var ReaddirpStream = class extends _stream.Readable {
5533
5533
  const par = this.parent;
5534
5534
  const fil = par && par.files;
5535
5535
  if (fil && fil.length > 0) {
5536
- const { path: path21, depth } = par;
5537
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path21));
5536
+ const { path: path23, depth } = par;
5537
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path23));
5538
5538
  const awaited = await Promise.all(slice);
5539
5539
  for (const entry of awaited) {
5540
5540
  if (!entry) continue;
@@ -5571,24 +5571,24 @@ var ReaddirpStream = class extends _stream.Readable {
5571
5571
  this.reading = false;
5572
5572
  }
5573
5573
  }
5574
- async _exploreDir(path21, depth) {
5574
+ async _exploreDir(path23, depth) {
5575
5575
  let files;
5576
5576
  try {
5577
- files = await _promises.readdir.call(void 0, path21, this._rdOptions);
5577
+ files = await _promises.readdir.call(void 0, path23, this._rdOptions);
5578
5578
  } catch (error) {
5579
5579
  this._onError(error);
5580
5580
  }
5581
5581
  return {
5582
5582
  files,
5583
5583
  depth,
5584
- path: path21
5584
+ path: path23
5585
5585
  };
5586
5586
  }
5587
- async _formatEntry(dirent, path21) {
5587
+ async _formatEntry(dirent, path23) {
5588
5588
  let entry;
5589
5589
  const basename4 = this._isDirent ? dirent.name : dirent;
5590
5590
  try {
5591
- const fullPath = _path.resolve.call(void 0, _path.join.call(void 0, path21, basename4));
5591
+ const fullPath = _path.resolve.call(void 0, _path.join.call(void 0, path23, basename4));
5592
5592
  entry = {
5593
5593
  path: _path.relative.call(void 0, this._root, fullPath),
5594
5594
  fullPath,
@@ -5999,18 +5999,18 @@ var delFromSet = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (main, pr
5999
5999
  }, "delFromSet");
6000
6000
  var isEmptySet = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (val) => val instanceof Set ? val.size === 0 : !val, "isEmptySet");
6001
6001
  var FsWatchInstances = /* @__PURE__ */ new Map();
6002
- function createFsWatchInstance(path21, options, listener, errHandler, emitRaw) {
6002
+ function createFsWatchInstance(path23, options, listener, errHandler, emitRaw) {
6003
6003
  const handleEvent = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (rawEvent, evPath) => {
6004
- listener(path21);
6004
+ listener(path23);
6005
6005
  emitRaw(rawEvent, evPath, {
6006
- watchedPath: path21
6006
+ watchedPath: path23
6007
6007
  });
6008
- if (evPath && path21 !== evPath) {
6009
- fsWatchBroadcast(sysPath.resolve(path21, evPath), KEY_LISTENERS, sysPath.join(path21, evPath));
6008
+ if (evPath && path23 !== evPath) {
6009
+ fsWatchBroadcast(sysPath.resolve(path23, evPath), KEY_LISTENERS, sysPath.join(path23, evPath));
6010
6010
  }
6011
6011
  }, "handleEvent");
6012
6012
  try {
6013
- return _fs.watch.call(void 0, path21, {
6013
+ return _fs.watch.call(void 0, path23, {
6014
6014
  persistent: options.persistent
6015
6015
  }, handleEvent);
6016
6016
  } catch (error) {
@@ -6026,12 +6026,12 @@ var fsWatchBroadcast = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fu
6026
6026
  listener(val1, val2, val3);
6027
6027
  });
6028
6028
  }, "fsWatchBroadcast");
6029
- var setFsWatchListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, fullPath, options, handlers) => {
6029
+ var setFsWatchListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, fullPath, options, handlers) => {
6030
6030
  const { listener, errHandler, rawEmitter } = handlers;
6031
6031
  let cont = FsWatchInstances.get(fullPath);
6032
6032
  let watcher;
6033
6033
  if (!options.persistent) {
6034
- watcher = createFsWatchInstance(path21, options, listener, errHandler, rawEmitter);
6034
+ watcher = createFsWatchInstance(path23, options, listener, errHandler, rawEmitter);
6035
6035
  if (!watcher) return;
6036
6036
  return watcher.close.bind(watcher);
6037
6037
  }
@@ -6040,14 +6040,14 @@ var setFsWatchListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (
6040
6040
  addAndConvert(cont, KEY_ERR, errHandler);
6041
6041
  addAndConvert(cont, KEY_RAW, rawEmitter);
6042
6042
  } else {
6043
- watcher = createFsWatchInstance(path21, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
6043
+ watcher = createFsWatchInstance(path23, options, fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS), errHandler, fsWatchBroadcast.bind(null, fullPath, KEY_RAW));
6044
6044
  if (!watcher) return;
6045
6045
  watcher.on(EV.ERROR, async (error) => {
6046
6046
  const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
6047
6047
  if (cont) cont.watcherUnusable = true;
6048
6048
  if (isWindows && error.code === "EPERM") {
6049
6049
  try {
6050
- const fd = await _promises.open.call(void 0, path21, "r");
6050
+ const fd = await _promises.open.call(void 0, path23, "r");
6051
6051
  await fd.close();
6052
6052
  broadcastErr(error);
6053
6053
  } catch (err) {
@@ -6078,7 +6078,7 @@ var setFsWatchListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (
6078
6078
  };
6079
6079
  }, "setFsWatchListener");
6080
6080
  var FsWatchFileInstances = /* @__PURE__ */ new Map();
6081
- var setFsWatchFileListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, fullPath, options, handlers) => {
6081
+ var setFsWatchFileListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, fullPath, options, handlers) => {
6082
6082
  const { listener, rawEmitter } = handlers;
6083
6083
  let cont = FsWatchFileInstances.get(fullPath);
6084
6084
  const copts = cont && cont.options;
@@ -6103,7 +6103,7 @@ var setFsWatchFileListener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void
6103
6103
  });
6104
6104
  const currmtime = curr.mtimeMs;
6105
6105
  if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
6106
- foreach(cont.listeners, (listener2) => listener2(path21, curr));
6106
+ foreach(cont.listeners, (listener2) => listener2(path23, curr));
6107
6107
  }
6108
6108
  })
6109
6109
  };
@@ -6134,13 +6134,13 @@ var NodeFsHandler = class {
6134
6134
  * @param listener on fs change
6135
6135
  * @returns closer for the watcher instance
6136
6136
  */
6137
- _watchWithNodeFs(path21, listener) {
6137
+ _watchWithNodeFs(path23, listener) {
6138
6138
  const opts = this.fsw.options;
6139
- const directory = sysPath.dirname(path21);
6140
- const basename4 = sysPath.basename(path21);
6139
+ const directory = sysPath.dirname(path23);
6140
+ const basename4 = sysPath.basename(path23);
6141
6141
  const parent = this.fsw._getWatchedDir(directory);
6142
6142
  parent.add(basename4);
6143
- const absolutePath = sysPath.resolve(path21);
6143
+ const absolutePath = sysPath.resolve(path23);
6144
6144
  const options = {
6145
6145
  persistent: opts.persistent
6146
6146
  };
@@ -6149,12 +6149,12 @@ var NodeFsHandler = class {
6149
6149
  if (opts.usePolling) {
6150
6150
  const enableBin = opts.interval !== opts.binaryInterval;
6151
6151
  options.interval = enableBin && isBinaryPath(basename4) ? opts.binaryInterval : opts.interval;
6152
- closer = setFsWatchFileListener(path21, absolutePath, options, {
6152
+ closer = setFsWatchFileListener(path23, absolutePath, options, {
6153
6153
  listener,
6154
6154
  rawEmitter: this.fsw._emitRaw
6155
6155
  });
6156
6156
  } else {
6157
- closer = setFsWatchListener(path21, absolutePath, options, {
6157
+ closer = setFsWatchListener(path23, absolutePath, options, {
6158
6158
  listener,
6159
6159
  errHandler: this._boundHandleError,
6160
6160
  rawEmitter: this.fsw._emitRaw
@@ -6175,7 +6175,7 @@ var NodeFsHandler = class {
6175
6175
  const parent = this.fsw._getWatchedDir(dirname5);
6176
6176
  let prevStats = stats;
6177
6177
  if (parent.has(basename4)) return;
6178
- const listener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, newStats) => {
6178
+ const listener = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, newStats) => {
6179
6179
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
6180
6180
  if (!newStats || newStats.mtimeMs === 0) {
6181
6181
  try {
@@ -6187,10 +6187,10 @@ var NodeFsHandler = class {
6187
6187
  this.fsw._emit(EV.CHANGE, file, newStats2);
6188
6188
  }
6189
6189
  if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
6190
- this.fsw._closeFile(path21);
6190
+ this.fsw._closeFile(path23);
6191
6191
  prevStats = newStats2;
6192
6192
  const closer2 = this._watchWithNodeFs(file, listener);
6193
- if (closer2) this.fsw._addPathCloser(path21, closer2);
6193
+ if (closer2) this.fsw._addPathCloser(path23, closer2);
6194
6194
  } else {
6195
6195
  prevStats = newStats2;
6196
6196
  }
@@ -6221,7 +6221,7 @@ var NodeFsHandler = class {
6221
6221
  * @param item basename of this item
6222
6222
  * @returns true if no more processing is needed for this entry.
6223
6223
  */
6224
- async _handleSymlink(entry, directory, path21, item) {
6224
+ async _handleSymlink(entry, directory, path23, item) {
6225
6225
  if (this.fsw.closed) {
6226
6226
  return;
6227
6227
  }
@@ -6231,7 +6231,7 @@ var NodeFsHandler = class {
6231
6231
  this.fsw._incrReadyCount();
6232
6232
  let linkPath;
6233
6233
  try {
6234
- linkPath = await _promises.realpath.call(void 0, path21);
6234
+ linkPath = await _promises.realpath.call(void 0, path23);
6235
6235
  } catch (e2) {
6236
6236
  this.fsw._emitReady();
6237
6237
  return true;
@@ -6240,12 +6240,12 @@ var NodeFsHandler = class {
6240
6240
  if (dir.has(item)) {
6241
6241
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
6242
6242
  this.fsw._symlinkPaths.set(full, linkPath);
6243
- this.fsw._emit(EV.CHANGE, path21, entry.stats);
6243
+ this.fsw._emit(EV.CHANGE, path23, entry.stats);
6244
6244
  }
6245
6245
  } else {
6246
6246
  dir.add(item);
6247
6247
  this.fsw._symlinkPaths.set(full, linkPath);
6248
- this.fsw._emit(EV.ADD, path21, entry.stats);
6248
+ this.fsw._emit(EV.ADD, path23, entry.stats);
6249
6249
  }
6250
6250
  this.fsw._emitReady();
6251
6251
  return true;
@@ -6272,9 +6272,9 @@ var NodeFsHandler = class {
6272
6272
  return;
6273
6273
  }
6274
6274
  const item = entry.path;
6275
- let path21 = sysPath.join(directory, item);
6275
+ let path23 = sysPath.join(directory, item);
6276
6276
  current2.add(item);
6277
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path21, item)) {
6277
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path23, item)) {
6278
6278
  return;
6279
6279
  }
6280
6280
  if (this.fsw.closed) {
@@ -6283,8 +6283,8 @@ var NodeFsHandler = class {
6283
6283
  }
6284
6284
  if (item === target || !target && !previous.has(item)) {
6285
6285
  this.fsw._incrReadyCount();
6286
- path21 = sysPath.join(dir, sysPath.relative(dir, path21));
6287
- this._addToNodeFs(path21, initialAdd, wh, depth + 1);
6286
+ path23 = sysPath.join(dir, sysPath.relative(dir, path23));
6287
+ this._addToNodeFs(path23, initialAdd, wh, depth + 1);
6288
6288
  }
6289
6289
  }).on(EV.ERROR, this._boundHandleError);
6290
6290
  return new Promise((resolve8, reject) => {
@@ -6349,13 +6349,13 @@ var NodeFsHandler = class {
6349
6349
  * @param depth Child path actually targeted for watch
6350
6350
  * @param target Child path actually targeted for watch
6351
6351
  */
6352
- async _addToNodeFs(path21, initialAdd, priorWh, depth, target) {
6352
+ async _addToNodeFs(path23, initialAdd, priorWh, depth, target) {
6353
6353
  const ready = this.fsw._emitReady;
6354
- if (this.fsw._isIgnored(path21) || this.fsw.closed) {
6354
+ if (this.fsw._isIgnored(path23) || this.fsw.closed) {
6355
6355
  ready();
6356
6356
  return false;
6357
6357
  }
6358
- const wh = this.fsw._getWatchHelpers(path21);
6358
+ const wh = this.fsw._getWatchHelpers(path23);
6359
6359
  if (priorWh) {
6360
6360
  wh.filterPath = (entry) => priorWh.filterPath(entry);
6361
6361
  wh.filterDir = (entry) => priorWh.filterDir(entry);
@@ -6370,8 +6370,8 @@ var NodeFsHandler = class {
6370
6370
  const follow = this.fsw.options.followSymlinks;
6371
6371
  let closer;
6372
6372
  if (stats.isDirectory()) {
6373
- const absPath = sysPath.resolve(path21);
6374
- const targetPath = follow ? await _promises.realpath.call(void 0, path21) : path21;
6373
+ const absPath = sysPath.resolve(path23);
6374
+ const targetPath = follow ? await _promises.realpath.call(void 0, path23) : path23;
6375
6375
  if (this.fsw.closed) return;
6376
6376
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
6377
6377
  if (this.fsw.closed) return;
@@ -6379,26 +6379,26 @@ var NodeFsHandler = class {
6379
6379
  this.fsw._symlinkPaths.set(absPath, targetPath);
6380
6380
  }
6381
6381
  } else if (stats.isSymbolicLink()) {
6382
- const targetPath = follow ? await _promises.realpath.call(void 0, path21) : path21;
6382
+ const targetPath = follow ? await _promises.realpath.call(void 0, path23) : path23;
6383
6383
  if (this.fsw.closed) return;
6384
6384
  const parent = sysPath.dirname(wh.watchPath);
6385
6385
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
6386
6386
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
6387
- closer = await this._handleDir(parent, stats, initialAdd, depth, path21, wh, targetPath);
6387
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path23, wh, targetPath);
6388
6388
  if (this.fsw.closed) return;
6389
6389
  if (targetPath !== void 0) {
6390
- this.fsw._symlinkPaths.set(sysPath.resolve(path21), targetPath);
6390
+ this.fsw._symlinkPaths.set(sysPath.resolve(path23), targetPath);
6391
6391
  }
6392
6392
  } else {
6393
6393
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
6394
6394
  }
6395
6395
  ready();
6396
- if (closer) this.fsw._addPathCloser(path21, closer);
6396
+ if (closer) this.fsw._addPathCloser(path23, closer);
6397
6397
  return false;
6398
6398
  } catch (error) {
6399
6399
  if (this.fsw._handleError(error)) {
6400
6400
  ready();
6401
- return path21;
6401
+ return path23;
6402
6402
  }
6403
6403
  }
6404
6404
  }
@@ -6441,23 +6441,23 @@ function createPattern(matcher) {
6441
6441
  return () => false;
6442
6442
  }
6443
6443
  _chunkJ74QFHKGcjs.__name.call(void 0, createPattern, "createPattern");
6444
- function normalizePath(path21) {
6445
- if (typeof path21 !== "string") throw new Error("string expected");
6446
- path21 = sysPath2.normalize(path21);
6447
- path21 = path21.replace(/\\/g, "/");
6444
+ function normalizePath(path23) {
6445
+ if (typeof path23 !== "string") throw new Error("string expected");
6446
+ path23 = sysPath2.normalize(path23);
6447
+ path23 = path23.replace(/\\/g, "/");
6448
6448
  let prepend = false;
6449
- if (path21.startsWith("//")) prepend = true;
6449
+ if (path23.startsWith("//")) prepend = true;
6450
6450
  const DOUBLE_SLASH_RE2 = /\/\//;
6451
- while (path21.match(DOUBLE_SLASH_RE2)) path21 = path21.replace(DOUBLE_SLASH_RE2, "/");
6452
- if (prepend) path21 = "/" + path21;
6453
- return path21;
6451
+ while (path23.match(DOUBLE_SLASH_RE2)) path23 = path23.replace(DOUBLE_SLASH_RE2, "/");
6452
+ if (prepend) path23 = "/" + path23;
6453
+ return path23;
6454
6454
  }
6455
6455
  _chunkJ74QFHKGcjs.__name.call(void 0, normalizePath, "normalizePath");
6456
6456
  function matchPatterns(patterns, testString, stats) {
6457
- const path21 = normalizePath(testString);
6457
+ const path23 = normalizePath(testString);
6458
6458
  for (let index = 0; index < patterns.length; index++) {
6459
6459
  const pattern = patterns[index];
6460
- if (pattern(path21, stats)) {
6460
+ if (pattern(path23, stats)) {
6461
6461
  return true;
6462
6462
  }
6463
6463
  }
@@ -6499,19 +6499,19 @@ var toUnix = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (string) => {
6499
6499
  }
6500
6500
  return str;
6501
6501
  }, "toUnix");
6502
- var normalizePathToUnix = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => toUnix(sysPath2.normalize(toUnix(path21))), "normalizePathToUnix");
6503
- var normalizeIgnored = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (cwd = "") => (path21) => {
6504
- if (typeof path21 === "string") {
6505
- return normalizePathToUnix(sysPath2.isAbsolute(path21) ? path21 : sysPath2.join(cwd, path21));
6502
+ var normalizePathToUnix = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => toUnix(sysPath2.normalize(toUnix(path23))), "normalizePathToUnix");
6503
+ var normalizeIgnored = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (cwd = "") => (path23) => {
6504
+ if (typeof path23 === "string") {
6505
+ return normalizePathToUnix(sysPath2.isAbsolute(path23) ? path23 : sysPath2.join(cwd, path23));
6506
6506
  } else {
6507
- return path21;
6507
+ return path23;
6508
6508
  }
6509
6509
  }, "normalizeIgnored");
6510
- var getAbsolutePath = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, cwd) => {
6511
- if (sysPath2.isAbsolute(path21)) {
6512
- return path21;
6510
+ var getAbsolutePath = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, cwd) => {
6511
+ if (sysPath2.isAbsolute(path23)) {
6512
+ return path23;
6513
6513
  }
6514
- return sysPath2.join(cwd, path21);
6514
+ return sysPath2.join(cwd, path23);
6515
6515
  }, "getAbsolutePath");
6516
6516
  var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
6517
6517
  var DirEntry = class DirEntry2 {
@@ -6568,10 +6568,10 @@ var WatchHelper = class {
6568
6568
  static {
6569
6569
  _chunkJ74QFHKGcjs.__name.call(void 0, this, "WatchHelper");
6570
6570
  }
6571
- constructor(path21, follow, fsw) {
6571
+ constructor(path23, follow, fsw) {
6572
6572
  this.fsw = fsw;
6573
- const watchPath = path21;
6574
- this.path = path21 = path21.replace(REPLACER_RE, "");
6573
+ const watchPath = path23;
6574
+ this.path = path23 = path23.replace(REPLACER_RE, "");
6575
6575
  this.watchPath = watchPath;
6576
6576
  this.fullWatchPath = sysPath2.resolve(watchPath);
6577
6577
  this.dirParts = [];
@@ -6693,19 +6693,19 @@ var FSWatcher = class extends _events2.EventEmitter {
6693
6693
  this._closePromise = void 0;
6694
6694
  let paths = unifyPaths(paths_);
6695
6695
  if (cwd) {
6696
- paths = paths.map((path21) => {
6697
- const absPath = getAbsolutePath(path21, cwd);
6696
+ paths = paths.map((path23) => {
6697
+ const absPath = getAbsolutePath(path23, cwd);
6698
6698
  return absPath;
6699
6699
  });
6700
6700
  }
6701
- paths.forEach((path21) => {
6702
- this._removeIgnoredPath(path21);
6701
+ paths.forEach((path23) => {
6702
+ this._removeIgnoredPath(path23);
6703
6703
  });
6704
6704
  this._userIgnored = void 0;
6705
6705
  if (!this._readyCount) this._readyCount = 0;
6706
6706
  this._readyCount += paths.length;
6707
- Promise.all(paths.map(async (path21) => {
6708
- const res = await this._nodeFsHandler._addToNodeFs(path21, !_internal, void 0, 0, _origAdd);
6707
+ Promise.all(paths.map(async (path23) => {
6708
+ const res = await this._nodeFsHandler._addToNodeFs(path23, !_internal, void 0, 0, _origAdd);
6709
6709
  if (res) this._emitReady();
6710
6710
  return res;
6711
6711
  })).then((results) => {
@@ -6723,16 +6723,16 @@ var FSWatcher = class extends _events2.EventEmitter {
6723
6723
  if (this.closed) return this;
6724
6724
  const paths = unifyPaths(paths_);
6725
6725
  const { cwd } = this.options;
6726
- paths.forEach((path21) => {
6727
- if (!sysPath2.isAbsolute(path21) && !this._closers.has(path21)) {
6728
- if (cwd) path21 = sysPath2.join(cwd, path21);
6729
- path21 = sysPath2.resolve(path21);
6730
- }
6731
- this._closePath(path21);
6732
- this._addIgnoredPath(path21);
6733
- if (this._watched.has(path21)) {
6726
+ paths.forEach((path23) => {
6727
+ if (!sysPath2.isAbsolute(path23) && !this._closers.has(path23)) {
6728
+ if (cwd) path23 = sysPath2.join(cwd, path23);
6729
+ path23 = sysPath2.resolve(path23);
6730
+ }
6731
+ this._closePath(path23);
6732
+ this._addIgnoredPath(path23);
6733
+ if (this._watched.has(path23)) {
6734
6734
  this._addIgnoredPath({
6735
- path: path21,
6735
+ path: path23,
6736
6736
  recursive: true
6737
6737
  });
6738
6738
  }
@@ -6794,39 +6794,39 @@ var FSWatcher = class extends _events2.EventEmitter {
6794
6794
  * @param stats arguments to be passed with event
6795
6795
  * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
6796
6796
  */
6797
- async _emit(event, path21, stats) {
6797
+ async _emit(event, path23, stats) {
6798
6798
  if (this.closed) return;
6799
6799
  const opts = this.options;
6800
- if (isWindows) path21 = sysPath2.normalize(path21);
6801
- if (opts.cwd) path21 = sysPath2.relative(opts.cwd, path21);
6800
+ if (isWindows) path23 = sysPath2.normalize(path23);
6801
+ if (opts.cwd) path23 = sysPath2.relative(opts.cwd, path23);
6802
6802
  const args = [
6803
- path21
6803
+ path23
6804
6804
  ];
6805
6805
  if (stats != null) args.push(stats);
6806
6806
  const awf = opts.awaitWriteFinish;
6807
6807
  let pw;
6808
- if (awf && (pw = this._pendingWrites.get(path21))) {
6808
+ if (awf && (pw = this._pendingWrites.get(path23))) {
6809
6809
  pw.lastChange = /* @__PURE__ */ new Date();
6810
6810
  return this;
6811
6811
  }
6812
6812
  if (opts.atomic) {
6813
6813
  if (event === EVENTS.UNLINK) {
6814
- this._pendingUnlinks.set(path21, [
6814
+ this._pendingUnlinks.set(path23, [
6815
6815
  event,
6816
6816
  ...args
6817
6817
  ]);
6818
6818
  setTimeout(() => {
6819
- this._pendingUnlinks.forEach((entry, path23) => {
6819
+ this._pendingUnlinks.forEach((entry, path24) => {
6820
6820
  this.emit(...entry);
6821
6821
  this.emit(EVENTS.ALL, ...entry);
6822
- this._pendingUnlinks.delete(path23);
6822
+ this._pendingUnlinks.delete(path24);
6823
6823
  });
6824
6824
  }, typeof opts.atomic === "number" ? opts.atomic : 100);
6825
6825
  return this;
6826
6826
  }
6827
- if (event === EVENTS.ADD && this._pendingUnlinks.has(path21)) {
6827
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path23)) {
6828
6828
  event = EVENTS.CHANGE;
6829
- this._pendingUnlinks.delete(path21);
6829
+ this._pendingUnlinks.delete(path23);
6830
6830
  }
6831
6831
  }
6832
6832
  if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
@@ -6844,15 +6844,15 @@ var FSWatcher = class extends _events2.EventEmitter {
6844
6844
  this.emitWithAll(event, args);
6845
6845
  }
6846
6846
  }, "awfEmit");
6847
- this._awaitWriteFinish(path21, awf.stabilityThreshold, event, awfEmit);
6847
+ this._awaitWriteFinish(path23, awf.stabilityThreshold, event, awfEmit);
6848
6848
  return this;
6849
6849
  }
6850
6850
  if (event === EVENTS.CHANGE) {
6851
- const isThrottled = !this._throttle(EVENTS.CHANGE, path21, 50);
6851
+ const isThrottled = !this._throttle(EVENTS.CHANGE, path23, 50);
6852
6852
  if (isThrottled) return this;
6853
6853
  }
6854
6854
  if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
6855
- const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path21) : path21;
6855
+ const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path23) : path23;
6856
6856
  let stats2;
6857
6857
  try {
6858
6858
  stats2 = await _promises.stat.call(void 0, fullPath);
@@ -6882,22 +6882,22 @@ var FSWatcher = class extends _events2.EventEmitter {
6882
6882
  * @param timeout duration of time to suppress duplicate actions
6883
6883
  * @returns tracking object or false if action should be suppressed
6884
6884
  */
6885
- _throttle(actionType, path21, timeout) {
6885
+ _throttle(actionType, path23, timeout) {
6886
6886
  if (!this._throttled.has(actionType)) {
6887
6887
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
6888
6888
  }
6889
6889
  const action = this._throttled.get(actionType);
6890
6890
  if (!action) throw new Error("invalid throttle");
6891
- const actionPath = action.get(path21);
6891
+ const actionPath = action.get(path23);
6892
6892
  if (actionPath) {
6893
6893
  actionPath.count++;
6894
6894
  return false;
6895
6895
  }
6896
6896
  let timeoutObject;
6897
6897
  const clear = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, () => {
6898
- const item = action.get(path21);
6898
+ const item = action.get(path23);
6899
6899
  const count = item ? item.count : 0;
6900
- action.delete(path21);
6900
+ action.delete(path23);
6901
6901
  clearTimeout(timeoutObject);
6902
6902
  if (item) clearTimeout(item.timeoutObject);
6903
6903
  return count;
@@ -6908,7 +6908,7 @@ var FSWatcher = class extends _events2.EventEmitter {
6908
6908
  clear,
6909
6909
  count: 0
6910
6910
  };
6911
- action.set(path21, thr);
6911
+ action.set(path23, thr);
6912
6912
  return thr;
6913
6913
  }
6914
6914
  _incrReadyCount() {
@@ -6922,31 +6922,31 @@ var FSWatcher = class extends _events2.EventEmitter {
6922
6922
  * @param event
6923
6923
  * @param awfEmit Callback to be called when ready for event to be emitted.
6924
6924
  */
6925
- _awaitWriteFinish(path21, threshold, event, awfEmit) {
6925
+ _awaitWriteFinish(path23, threshold, event, awfEmit) {
6926
6926
  const awf = this.options.awaitWriteFinish;
6927
6927
  if (typeof awf !== "object") return;
6928
6928
  const pollInterval = awf.pollInterval;
6929
6929
  let timeoutHandler;
6930
- let fullPath = path21;
6931
- if (this.options.cwd && !sysPath2.isAbsolute(path21)) {
6932
- fullPath = sysPath2.join(this.options.cwd, path21);
6930
+ let fullPath = path23;
6931
+ if (this.options.cwd && !sysPath2.isAbsolute(path23)) {
6932
+ fullPath = sysPath2.join(this.options.cwd, path23);
6933
6933
  }
6934
6934
  const now = /* @__PURE__ */ new Date();
6935
6935
  const writes = this._pendingWrites;
6936
6936
  function awaitWriteFinishFn(prevStat) {
6937
6937
  _fs.stat.call(void 0, fullPath, (err, curStat) => {
6938
- if (err || !writes.has(path21)) {
6938
+ if (err || !writes.has(path23)) {
6939
6939
  if (err && err.code !== "ENOENT") awfEmit(err);
6940
6940
  return;
6941
6941
  }
6942
6942
  const now2 = Number(/* @__PURE__ */ new Date());
6943
6943
  if (prevStat && curStat.size !== prevStat.size) {
6944
- writes.get(path21).lastChange = now2;
6944
+ writes.get(path23).lastChange = now2;
6945
6945
  }
6946
- const pw = writes.get(path21);
6946
+ const pw = writes.get(path23);
6947
6947
  const df = now2 - pw.lastChange;
6948
6948
  if (df >= threshold) {
6949
- writes.delete(path21);
6949
+ writes.delete(path23);
6950
6950
  awfEmit(void 0, curStat);
6951
6951
  } else {
6952
6952
  timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
@@ -6954,11 +6954,11 @@ var FSWatcher = class extends _events2.EventEmitter {
6954
6954
  });
6955
6955
  }
6956
6956
  _chunkJ74QFHKGcjs.__name.call(void 0, awaitWriteFinishFn, "awaitWriteFinishFn");
6957
- if (!writes.has(path21)) {
6958
- writes.set(path21, {
6957
+ if (!writes.has(path23)) {
6958
+ writes.set(path23, {
6959
6959
  lastChange: now,
6960
6960
  cancelWait: /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, () => {
6961
- writes.delete(path21);
6961
+ writes.delete(path23);
6962
6962
  clearTimeout(timeoutHandler);
6963
6963
  return event;
6964
6964
  }, "cancelWait")
@@ -6969,8 +6969,8 @@ var FSWatcher = class extends _events2.EventEmitter {
6969
6969
  /**
6970
6970
  * Determines whether user has asked to ignore this path.
6971
6971
  */
6972
- _isIgnored(path21, stats) {
6973
- if (this.options.atomic && DOT_RE.test(path21)) return true;
6972
+ _isIgnored(path23, stats) {
6973
+ if (this.options.atomic && DOT_RE.test(path23)) return true;
6974
6974
  if (!this._userIgnored) {
6975
6975
  const { cwd } = this.options;
6976
6976
  const ign = this.options.ignored;
@@ -6984,17 +6984,17 @@ var FSWatcher = class extends _events2.EventEmitter {
6984
6984
  ];
6985
6985
  this._userIgnored = anymatch(list, void 0);
6986
6986
  }
6987
- return this._userIgnored(path21, stats);
6987
+ return this._userIgnored(path23, stats);
6988
6988
  }
6989
- _isntIgnored(path21, stat6) {
6990
- return !this._isIgnored(path21, stat6);
6989
+ _isntIgnored(path23, stat6) {
6990
+ return !this._isIgnored(path23, stat6);
6991
6991
  }
6992
6992
  /**
6993
6993
  * Provides a set of common helpers and properties relating to symlink handling.
6994
6994
  * @param path file or directory pattern being watched
6995
6995
  */
6996
- _getWatchHelpers(path21) {
6997
- return new WatchHelper(path21, this.options.followSymlinks, this);
6996
+ _getWatchHelpers(path23) {
6997
+ return new WatchHelper(path23, this.options.followSymlinks, this);
6998
6998
  }
6999
6999
  // Directory helpers
7000
7000
  // -----------------
@@ -7024,57 +7024,57 @@ var FSWatcher = class extends _events2.EventEmitter {
7024
7024
  * @param item base path of item/directory
7025
7025
  */
7026
7026
  _remove(directory, item, isDirectory) {
7027
- const path21 = sysPath2.join(directory, item);
7028
- const fullPath = sysPath2.resolve(path21);
7029
- isDirectory = isDirectory != null ? isDirectory : this._watched.has(path21) || this._watched.has(fullPath);
7030
- if (!this._throttle("remove", path21, 100)) return;
7027
+ const path23 = sysPath2.join(directory, item);
7028
+ const fullPath = sysPath2.resolve(path23);
7029
+ isDirectory = isDirectory != null ? isDirectory : this._watched.has(path23) || this._watched.has(fullPath);
7030
+ if (!this._throttle("remove", path23, 100)) return;
7031
7031
  if (!isDirectory && this._watched.size === 1) {
7032
7032
  this.add(directory, item, true);
7033
7033
  }
7034
- const wp = this._getWatchedDir(path21);
7034
+ const wp = this._getWatchedDir(path23);
7035
7035
  const nestedDirectoryChildren = wp.getChildren();
7036
- nestedDirectoryChildren.forEach((nested) => this._remove(path21, nested));
7036
+ nestedDirectoryChildren.forEach((nested) => this._remove(path23, nested));
7037
7037
  const parent = this._getWatchedDir(directory);
7038
7038
  const wasTracked = parent.has(item);
7039
7039
  parent.remove(item);
7040
7040
  if (this._symlinkPaths.has(fullPath)) {
7041
7041
  this._symlinkPaths.delete(fullPath);
7042
7042
  }
7043
- let relPath = path21;
7044
- if (this.options.cwd) relPath = sysPath2.relative(this.options.cwd, path21);
7043
+ let relPath = path23;
7044
+ if (this.options.cwd) relPath = sysPath2.relative(this.options.cwd, path23);
7045
7045
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
7046
7046
  const event = this._pendingWrites.get(relPath).cancelWait();
7047
7047
  if (event === EVENTS.ADD) return;
7048
7048
  }
7049
- this._watched.delete(path21);
7049
+ this._watched.delete(path23);
7050
7050
  this._watched.delete(fullPath);
7051
7051
  const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
7052
- if (wasTracked && !this._isIgnored(path21)) this._emit(eventName, path21);
7053
- this._closePath(path21);
7052
+ if (wasTracked && !this._isIgnored(path23)) this._emit(eventName, path23);
7053
+ this._closePath(path23);
7054
7054
  }
7055
7055
  /**
7056
7056
  * Closes all watchers for a path
7057
7057
  */
7058
- _closePath(path21) {
7059
- this._closeFile(path21);
7060
- const dir = sysPath2.dirname(path21);
7061
- this._getWatchedDir(dir).remove(sysPath2.basename(path21));
7058
+ _closePath(path23) {
7059
+ this._closeFile(path23);
7060
+ const dir = sysPath2.dirname(path23);
7061
+ this._getWatchedDir(dir).remove(sysPath2.basename(path23));
7062
7062
  }
7063
7063
  /**
7064
7064
  * Closes only file-specific watchers
7065
7065
  */
7066
- _closeFile(path21) {
7067
- const closers = this._closers.get(path21);
7066
+ _closeFile(path23) {
7067
+ const closers = this._closers.get(path23);
7068
7068
  if (!closers) return;
7069
7069
  closers.forEach((closer) => closer());
7070
- this._closers.delete(path21);
7070
+ this._closers.delete(path23);
7071
7071
  }
7072
- _addPathCloser(path21, closer) {
7072
+ _addPathCloser(path23, closer) {
7073
7073
  if (!closer) return;
7074
- let list = this._closers.get(path21);
7074
+ let list = this._closers.get(path23);
7075
7075
  if (!list) {
7076
7076
  list = [];
7077
- this._closers.set(path21, list);
7077
+ this._closers.set(path23, list);
7078
7078
  }
7079
7079
  list.push(closer);
7080
7080
  }
@@ -10233,12 +10233,12 @@ var PathBase = (_class7 = class {
10233
10233
  /**
10234
10234
  * Get the Path object referenced by the string path, resolved from this Path
10235
10235
  */
10236
- resolve(path21) {
10237
- if (!path21) {
10236
+ resolve(path23) {
10237
+ if (!path23) {
10238
10238
  return this;
10239
10239
  }
10240
- const rootPath = this.getRootString(path21);
10241
- const dir = path21.substring(rootPath.length);
10240
+ const rootPath = this.getRootString(path23);
10241
+ const dir = path23.substring(rootPath.length);
10242
10242
  const dirParts = dir.split(this.splitSep);
10243
10243
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
10244
10244
  return result;
@@ -10973,8 +10973,8 @@ var PathWin32 = (_class8 = class _PathWin32 extends PathBase {
10973
10973
  /**
10974
10974
  * @internal
10975
10975
  */
10976
- getRootString(path21) {
10977
- return _path.win32.parse(path21).root;
10976
+ getRootString(path23) {
10977
+ return _path.win32.parse(path23).root;
10978
10978
  }
10979
10979
  /**
10980
10980
  * @internal
@@ -11023,8 +11023,8 @@ var PathPosix = (_class9 = class _PathPosix extends PathBase {
11023
11023
  /**
11024
11024
  * @internal
11025
11025
  */
11026
- getRootString(path21) {
11027
- return path21.startsWith("/") ? "/" : "";
11026
+ getRootString(path23) {
11027
+ return path23.startsWith("/") ? "/" : "";
11028
11028
  }
11029
11029
  /**
11030
11030
  * @internal
@@ -11076,8 +11076,8 @@ var PathScurryBase = class {
11076
11076
  *
11077
11077
  * @internal
11078
11078
  */
11079
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs16 = defaultFS } = {}) {
11080
- this.#fs = fsFromOption(fs16);
11079
+ constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs18 = defaultFS } = {}) {
11080
+ this.#fs = fsFromOption(fs18);
11081
11081
  if (cwd instanceof URL || cwd.startsWith("file://")) {
11082
11082
  cwd = _url.fileURLToPath.call(void 0, cwd);
11083
11083
  }
@@ -11116,11 +11116,11 @@ var PathScurryBase = class {
11116
11116
  /**
11117
11117
  * Get the depth of a provided path, string, or the cwd
11118
11118
  */
11119
- depth(path21 = this.cwd) {
11120
- if (typeof path21 === "string") {
11121
- path21 = this.cwd.resolve(path21);
11119
+ depth(path23 = this.cwd) {
11120
+ if (typeof path23 === "string") {
11121
+ path23 = this.cwd.resolve(path23);
11122
11122
  }
11123
- return path21.depth();
11123
+ return path23.depth();
11124
11124
  }
11125
11125
  /**
11126
11126
  * Return the cache of child entries. Exposed so subclasses can create
@@ -11605,9 +11605,9 @@ var PathScurryBase = class {
11605
11605
  process1();
11606
11606
  return results;
11607
11607
  }
11608
- chdir(path21 = this.cwd) {
11608
+ chdir(path23 = this.cwd) {
11609
11609
  const oldCwd = this.cwd;
11610
- this.cwd = typeof path21 === "string" ? this.cwd.resolve(path21) : path21;
11610
+ this.cwd = typeof path23 === "string" ? this.cwd.resolve(path23) : path23;
11611
11611
  this.cwd[setAsCwd](oldCwd);
11612
11612
  }
11613
11613
  };
@@ -11639,9 +11639,9 @@ var PathScurryWin32 = (_class10 = class extends PathScurryBase {
11639
11639
  /**
11640
11640
  * @internal
11641
11641
  */
11642
- newRoot(fs16) {
11642
+ newRoot(fs18) {
11643
11643
  return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), {
11644
- fs: fs16
11644
+ fs: fs18
11645
11645
  });
11646
11646
  }
11647
11647
  /**
@@ -11676,9 +11676,9 @@ var PathScurryPosix = (_class11 = class extends PathScurryBase {
11676
11676
  /**
11677
11677
  * @internal
11678
11678
  */
11679
- newRoot(fs16) {
11679
+ newRoot(fs18) {
11680
11680
  return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), {
11681
- fs: fs16
11681
+ fs: fs18
11682
11682
  });
11683
11683
  }
11684
11684
  /**
@@ -12017,8 +12017,8 @@ var MatchRecord = (_class12 = class {constructor() { _class12.prototype.__init28
12017
12017
  entries() {
12018
12018
  return [
12019
12019
  ...this.store.entries()
12020
- ].map(([path21, n4]) => [
12021
- path21,
12020
+ ].map(([path23, n4]) => [
12021
+ path23,
12022
12022
  !!(n4 & 2),
12023
12023
  !!(n4 & 1)
12024
12024
  ]);
@@ -12238,9 +12238,9 @@ var GlobUtil = (_class15 = class {
12238
12238
 
12239
12239
 
12240
12240
 
12241
- constructor(patterns, path21, opts) {;_class15.prototype.__init32.call(this);_class15.prototype.__init33.call(this);_class15.prototype.__init34.call(this);
12241
+ constructor(patterns, path23, opts) {;_class15.prototype.__init32.call(this);_class15.prototype.__init33.call(this);_class15.prototype.__init34.call(this);
12242
12242
  this.patterns = patterns;
12243
- this.path = path21;
12243
+ this.path = path23;
12244
12244
  this.opts = opts;
12245
12245
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
12246
12246
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -12259,11 +12259,11 @@ var GlobUtil = (_class15 = class {
12259
12259
  });
12260
12260
  }
12261
12261
  }
12262
- #ignored(path21) {
12263
- return this.seen.has(path21) || !!_optionalChain([this, 'access', _188 => _188.#ignore, 'optionalAccess', _189 => _189.ignored, 'optionalCall', _190 => _190(path21)]);
12262
+ #ignored(path23) {
12263
+ return this.seen.has(path23) || !!_optionalChain([this, 'access', _188 => _188.#ignore, 'optionalAccess', _189 => _189.ignored, 'optionalCall', _190 => _190(path23)]);
12264
12264
  }
12265
- #childrenIgnored(path21) {
12266
- return !!_optionalChain([this, 'access', _191 => _191.#ignore, 'optionalAccess', _192 => _192.childrenIgnored, 'optionalCall', _193 => _193(path21)]);
12265
+ #childrenIgnored(path23) {
12266
+ return !!_optionalChain([this, 'access', _191 => _191.#ignore, 'optionalAccess', _192 => _192.childrenIgnored, 'optionalCall', _193 => _193(path23)]);
12267
12267
  }
12268
12268
  // backpressure mechanism
12269
12269
  pause() {
@@ -12457,8 +12457,8 @@ var GlobWalker = (_class16 = class extends GlobUtil {
12457
12457
  _chunkJ74QFHKGcjs.__name.call(void 0, this, "GlobWalker");
12458
12458
  }
12459
12459
  __init35() {this.matches = /* @__PURE__ */ new Set()}
12460
- constructor(patterns, path21, opts) {
12461
- super(patterns, path21, opts);_class16.prototype.__init35.call(this);;
12460
+ constructor(patterns, path23, opts) {
12461
+ super(patterns, path23, opts);_class16.prototype.__init35.call(this);;
12462
12462
  }
12463
12463
  matchEmit(e2) {
12464
12464
  this.matches.add(e2);
@@ -12495,8 +12495,8 @@ var GlobStream = class extends GlobUtil {
12495
12495
  _chunkJ74QFHKGcjs.__name.call(void 0, this, "GlobStream");
12496
12496
  }
12497
12497
 
12498
- constructor(patterns, path21, opts) {
12499
- super(patterns, path21, opts);
12498
+ constructor(patterns, path23, opts) {
12499
+ super(patterns, path23, opts);
12500
12500
  this.results = new Minipass({
12501
12501
  signal: this.signal,
12502
12502
  objectMode: true
@@ -12852,44 +12852,44 @@ _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
12852
12852
  var platform_default = process.env.__TESTING_RIMRAF_PLATFORM__ || process.platform;
12853
12853
 
12854
12854
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/path-arg.js
12855
- var pathArg = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt = {}) => {
12856
- const type = typeof path21;
12855
+ var pathArg = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt = {}) => {
12856
+ const type = typeof path23;
12857
12857
  if (type !== "string") {
12858
- const ctor = path21 && type === "object" && path21.constructor;
12859
- const received = ctor && ctor.name ? `an instance of ${ctor.name}` : type === "object" ? _util.inspect.call(void 0, path21) : `type ${type} ${path21}`;
12858
+ const ctor = path23 && type === "object" && path23.constructor;
12859
+ const received = ctor && ctor.name ? `an instance of ${ctor.name}` : type === "object" ? _util.inspect.call(void 0, path23) : `type ${type} ${path23}`;
12860
12860
  const msg = `The "path" argument must be of type string. Received ${received}`;
12861
12861
  throw Object.assign(new TypeError(msg), {
12862
- path: path21,
12862
+ path: path23,
12863
12863
  code: "ERR_INVALID_ARG_TYPE"
12864
12864
  });
12865
12865
  }
12866
- if (/\0/.test(path21)) {
12866
+ if (/\0/.test(path23)) {
12867
12867
  const msg = "path must be a string without null bytes";
12868
12868
  throw Object.assign(new TypeError(msg), {
12869
- path: path21,
12869
+ path: path23,
12870
12870
  code: "ERR_INVALID_ARG_VALUE"
12871
12871
  });
12872
12872
  }
12873
- path21 = _path.resolve.call(void 0, path21);
12874
- const { root } = _path.parse.call(void 0, path21);
12875
- if (path21 === root && opt.preserveRoot !== false) {
12873
+ path23 = _path.resolve.call(void 0, path23);
12874
+ const { root } = _path.parse.call(void 0, path23);
12875
+ if (path23 === root && opt.preserveRoot !== false) {
12876
12876
  const msg = "refusing to remove root directory without preserveRoot:false";
12877
12877
  throw Object.assign(new Error(msg), {
12878
- path: path21,
12878
+ path: path23,
12879
12879
  code: "ERR_PRESERVE_ROOT"
12880
12880
  });
12881
12881
  }
12882
12882
  if (platform_default === "win32") {
12883
12883
  const badWinChars = /[*|"<>?:]/;
12884
- const { root: root2 } = _path.parse.call(void 0, path21);
12885
- if (badWinChars.test(path21.substring(root2.length))) {
12884
+ const { root: root2 } = _path.parse.call(void 0, path23);
12885
+ if (badWinChars.test(path23.substring(root2.length))) {
12886
12886
  throw Object.assign(new Error("Illegal characters in path."), {
12887
- path: path21,
12887
+ path: path23,
12888
12888
  code: "EINVAL"
12889
12889
  });
12890
12890
  }
12891
12891
  }
12892
- return path21;
12892
+ return path23;
12893
12893
  }, "pathArg");
12894
12894
  var path_arg_default = pathArg;
12895
12895
 
@@ -12904,20 +12904,20 @@ _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
12904
12904
 
12905
12905
 
12906
12906
 
12907
- var readdirSync2 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => _fs.readdirSync.call(void 0, path21, {
12907
+ var readdirSync2 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => _fs.readdirSync.call(void 0, path23, {
12908
12908
  withFileTypes: true
12909
12909
  }), "readdirSync");
12910
- var chmod = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, mode) => new Promise((res, rej) => actualFS.default.chmod(path21, mode, (er, ...d2) => er ? rej(er) : res(...d2))), "chmod");
12911
- var mkdir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, options) => new Promise((res, rej) => actualFS.default.mkdir(path21, options, (er, made) => er ? rej(er) : res(made))), "mkdir");
12912
- var readdir4 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => new Promise((res, rej) => actualFS.default.readdir(path21, {
12910
+ var chmod = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, mode) => new Promise((res, rej) => actualFS.default.chmod(path23, mode, (er, ...d2) => er ? rej(er) : res(...d2))), "chmod");
12911
+ var mkdir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, options) => new Promise((res, rej) => actualFS.default.mkdir(path23, options, (er, made) => er ? rej(er) : res(made))), "mkdir");
12912
+ var readdir4 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => new Promise((res, rej) => actualFS.default.readdir(path23, {
12913
12913
  withFileTypes: true
12914
12914
  }, (er, data2) => er ? rej(er) : res(data2))), "readdir");
12915
12915
  var rename = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (oldPath, newPath) => new Promise((res, rej) => actualFS.default.rename(oldPath, newPath, (er, ...d2) => er ? rej(er) : res(...d2))), "rename");
12916
- var rm = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, options) => new Promise((res, rej) => actualFS.default.rm(path21, options, (er, ...d2) => er ? rej(er) : res(...d2))), "rm");
12917
- var rmdir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => new Promise((res, rej) => actualFS.default.rmdir(path21, (er, ...d2) => er ? rej(er) : res(...d2))), "rmdir");
12918
- var stat4 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => new Promise((res, rej) => actualFS.default.stat(path21, (er, data2) => er ? rej(er) : res(data2))), "stat");
12919
- var lstat4 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => new Promise((res, rej) => actualFS.default.lstat(path21, (er, data2) => er ? rej(er) : res(data2))), "lstat");
12920
- var unlink = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => new Promise((res, rej) => actualFS.default.unlink(path21, (er, ...d2) => er ? rej(er) : res(...d2))), "unlink");
12916
+ var rm = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, options) => new Promise((res, rej) => actualFS.default.rm(path23, options, (er, ...d2) => er ? rej(er) : res(...d2))), "rm");
12917
+ var rmdir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => new Promise((res, rej) => actualFS.default.rmdir(path23, (er, ...d2) => er ? rej(er) : res(...d2))), "rmdir");
12918
+ var stat4 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => new Promise((res, rej) => actualFS.default.stat(path23, (er, data2) => er ? rej(er) : res(data2))), "stat");
12919
+ var lstat4 = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => new Promise((res, rej) => actualFS.default.lstat(path23, (er, data2) => er ? rej(er) : res(data2))), "lstat");
12920
+ var unlink = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => new Promise((res, rej) => actualFS.default.unlink(path23, (er, ...d2) => er ? rej(er) : res(...d2))), "unlink");
12921
12921
  var promises = {
12922
12922
  chmod,
12923
12923
  mkdir,
@@ -12936,10 +12936,10 @@ var promises = {
12936
12936
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/readdir-or-error.js
12937
12937
  _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
12938
12938
  var { readdir: readdir5 } = promises;
12939
- var readdirOrError = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => readdir5(path21).catch((er) => er), "readdirOrError");
12940
- var readdirOrErrorSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => {
12939
+ var readdirOrError = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => readdir5(path23).catch((er) => er), "readdirOrError");
12940
+ var readdirOrErrorSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => {
12941
12941
  try {
12942
- return readdirSync2(path21);
12942
+ return readdirSync2(path23);
12943
12943
  } catch (er) {
12944
12944
  return er;
12945
12945
  }
@@ -12964,33 +12964,33 @@ var ignoreENOENTSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn
12964
12964
 
12965
12965
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-posix.js
12966
12966
  var { lstat: lstat5, rmdir: rmdir2, unlink: unlink2 } = promises;
12967
- var rimrafPosix = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt) => {
12967
+ var rimrafPosix = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt) => {
12968
12968
  if (_optionalChain([opt, 'optionalAccess', _227 => _227.signal, 'optionalAccess', _228 => _228.aborted])) {
12969
12969
  throw opt.signal.reason;
12970
12970
  }
12971
12971
  try {
12972
- return await rimrafPosixDir(path21, opt, await lstat5(path21));
12972
+ return await rimrafPosixDir(path23, opt, await lstat5(path23));
12973
12973
  } catch (er) {
12974
12974
  if (_optionalChain([er, 'optionalAccess', _229 => _229.code]) === "ENOENT") return true;
12975
12975
  throw er;
12976
12976
  }
12977
12977
  }, "rimrafPosix");
12978
- var rimrafPosixSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt) => {
12978
+ var rimrafPosixSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt) => {
12979
12979
  if (_optionalChain([opt, 'optionalAccess', _230 => _230.signal, 'optionalAccess', _231 => _231.aborted])) {
12980
12980
  throw opt.signal.reason;
12981
12981
  }
12982
12982
  try {
12983
- return rimrafPosixDirSync(path21, opt, _fs.lstatSync.call(void 0, path21));
12983
+ return rimrafPosixDirSync(path23, opt, _fs.lstatSync.call(void 0, path23));
12984
12984
  } catch (er) {
12985
12985
  if (_optionalChain([er, 'optionalAccess', _232 => _232.code]) === "ENOENT") return true;
12986
12986
  throw er;
12987
12987
  }
12988
12988
  }, "rimrafPosixSync");
12989
- var rimrafPosixDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt, ent) => {
12989
+ var rimrafPosixDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt, ent) => {
12990
12990
  if (_optionalChain([opt, 'optionalAccess', _233 => _233.signal, 'optionalAccess', _234 => _234.aborted])) {
12991
12991
  throw opt.signal.reason;
12992
12992
  }
12993
- const entries = ent.isDirectory() ? await readdirOrError(path21) : null;
12993
+ const entries = ent.isDirectory() ? await readdirOrError(path23) : null;
12994
12994
  if (!Array.isArray(entries)) {
12995
12995
  if (entries) {
12996
12996
  if (entries.code === "ENOENT") {
@@ -13000,30 +13000,30 @@ var rimrafPosixDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async
13000
13000
  throw entries;
13001
13001
  }
13002
13002
  }
13003
- if (opt.filter && !await opt.filter(path21, ent)) {
13003
+ if (opt.filter && !await opt.filter(path23, ent)) {
13004
13004
  return false;
13005
13005
  }
13006
- await ignoreENOENT(unlink2(path21));
13006
+ await ignoreENOENT(unlink2(path23));
13007
13007
  return true;
13008
13008
  }
13009
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir(_path.resolve.call(void 0, path21, ent2.name), opt, ent2)))).reduce((a2, b2) => a2 && b2, true);
13009
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir(_path.resolve.call(void 0, path23, ent2.name), opt, ent2)))).reduce((a2, b2) => a2 && b2, true);
13010
13010
  if (!removedAll) {
13011
13011
  return false;
13012
13012
  }
13013
- if (opt.preserveRoot === false && path21 === _path.parse.call(void 0, path21).root) {
13013
+ if (opt.preserveRoot === false && path23 === _path.parse.call(void 0, path23).root) {
13014
13014
  return false;
13015
13015
  }
13016
- if (opt.filter && !await opt.filter(path21, ent)) {
13016
+ if (opt.filter && !await opt.filter(path23, ent)) {
13017
13017
  return false;
13018
13018
  }
13019
- await ignoreENOENT(rmdir2(path21));
13019
+ await ignoreENOENT(rmdir2(path23));
13020
13020
  return true;
13021
13021
  }, "rimrafPosixDir");
13022
- var rimrafPosixDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt, ent) => {
13022
+ var rimrafPosixDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt, ent) => {
13023
13023
  if (_optionalChain([opt, 'optionalAccess', _235 => _235.signal, 'optionalAccess', _236 => _236.aborted])) {
13024
13024
  throw opt.signal.reason;
13025
13025
  }
13026
- const entries = ent.isDirectory() ? readdirOrErrorSync(path21) : null;
13026
+ const entries = ent.isDirectory() ? readdirOrErrorSync(path23) : null;
13027
13027
  if (!Array.isArray(entries)) {
13028
13028
  if (entries) {
13029
13029
  if (entries.code === "ENOENT") {
@@ -13033,27 +13033,27 @@ var rimrafPosixDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (
13033
13033
  throw entries;
13034
13034
  }
13035
13035
  }
13036
- if (opt.filter && !opt.filter(path21, ent)) {
13036
+ if (opt.filter && !opt.filter(path23, ent)) {
13037
13037
  return false;
13038
13038
  }
13039
- ignoreENOENTSync(() => _fs.unlinkSync.call(void 0, path21));
13039
+ ignoreENOENTSync(() => _fs.unlinkSync.call(void 0, path23));
13040
13040
  return true;
13041
13041
  }
13042
13042
  let removedAll = true;
13043
13043
  for (const ent2 of entries) {
13044
- const p3 = _path.resolve.call(void 0, path21, ent2.name);
13044
+ const p3 = _path.resolve.call(void 0, path23, ent2.name);
13045
13045
  removedAll = rimrafPosixDirSync(p3, opt, ent2) && removedAll;
13046
13046
  }
13047
- if (opt.preserveRoot === false && path21 === _path.parse.call(void 0, path21).root) {
13047
+ if (opt.preserveRoot === false && path23 === _path.parse.call(void 0, path23).root) {
13048
13048
  return false;
13049
13049
  }
13050
13050
  if (!removedAll) {
13051
13051
  return false;
13052
13052
  }
13053
- if (opt.filter && !opt.filter(path21, ent)) {
13053
+ if (opt.filter && !opt.filter(path23, ent)) {
13054
13054
  return false;
13055
13055
  }
13056
- ignoreENOENTSync(() => _fs.rmdirSync.call(void 0, path21));
13056
+ ignoreENOENTSync(() => _fs.rmdirSync.call(void 0, path23));
13057
13057
  return true;
13058
13058
  }, "rimrafPosixDirSync");
13059
13059
 
@@ -13064,9 +13064,9 @@ _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
13064
13064
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/fix-eperm.js
13065
13065
  _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
13066
13066
  var { chmod: chmod2 } = promises;
13067
- var fixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => async (path21) => {
13067
+ var fixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => async (path23) => {
13068
13068
  try {
13069
- return await fn(path21);
13069
+ return await fn(path23);
13070
13070
  } catch (er) {
13071
13071
  const fer = er;
13072
13072
  if (_optionalChain([fer, 'optionalAccess', _237 => _237.code]) === "ENOENT") {
@@ -13074,7 +13074,7 @@ var fixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => asy
13074
13074
  }
13075
13075
  if (_optionalChain([fer, 'optionalAccess', _238 => _238.code]) === "EPERM") {
13076
13076
  try {
13077
- await chmod2(path21, 438);
13077
+ await chmod2(path23, 438);
13078
13078
  } catch (er2) {
13079
13079
  const fer2 = er2;
13080
13080
  if (_optionalChain([fer2, 'optionalAccess', _239 => _239.code]) === "ENOENT") {
@@ -13082,14 +13082,14 @@ var fixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => asy
13082
13082
  }
13083
13083
  throw er;
13084
13084
  }
13085
- return await fn(path21);
13085
+ return await fn(path23);
13086
13086
  }
13087
13087
  throw er;
13088
13088
  }
13089
13089
  }, "fixEPERM");
13090
- var fixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => (path21) => {
13090
+ var fixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => (path23) => {
13091
13091
  try {
13092
- return fn(path21);
13092
+ return fn(path23);
13093
13093
  } catch (er) {
13094
13094
  const fer = er;
13095
13095
  if (_optionalChain([fer, 'optionalAccess', _240 => _240.code]) === "ENOENT") {
@@ -13097,7 +13097,7 @@ var fixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) =>
13097
13097
  }
13098
13098
  if (_optionalChain([fer, 'optionalAccess', _241 => _241.code]) === "EPERM") {
13099
13099
  try {
13100
- _fs.chmodSync.call(void 0, path21, 438);
13100
+ _fs.chmodSync.call(void 0, path23, 438);
13101
13101
  } catch (er2) {
13102
13102
  const fer2 = er2;
13103
13103
  if (_optionalChain([fer2, 'optionalAccess', _242 => _242.code]) === "ENOENT") {
@@ -13105,7 +13105,7 @@ var fixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) =>
13105
13105
  }
13106
13106
  throw er;
13107
13107
  }
13108
- return fn(path21);
13108
+ return fn(path23);
13109
13109
  }
13110
13110
  throw er;
13111
13111
  }
@@ -13122,23 +13122,23 @@ var codes = /* @__PURE__ */ new Set([
13122
13122
  "EBUSY"
13123
13123
  ]);
13124
13124
  var retryBusy = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => {
13125
- const method = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt, backoff = 1, total = 0) => {
13125
+ const method = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt, backoff = 1, total = 0) => {
13126
13126
  const mbo = opt.maxBackoff || MAXBACKOFF;
13127
13127
  const rate = opt.backoff || RATE;
13128
13128
  const max = opt.maxRetries || MAXRETRIES;
13129
13129
  let retries = 0;
13130
13130
  while (true) {
13131
13131
  try {
13132
- return await fn(path21);
13132
+ return await fn(path23);
13133
13133
  } catch (er) {
13134
13134
  const fer = er;
13135
- if (_optionalChain([fer, 'optionalAccess', _243 => _243.path]) === path21 && _optionalChain([fer, 'optionalAccess', _244 => _244.code]) && codes.has(fer.code)) {
13135
+ if (_optionalChain([fer, 'optionalAccess', _243 => _243.path]) === path23 && _optionalChain([fer, 'optionalAccess', _244 => _244.code]) && codes.has(fer.code)) {
13136
13136
  backoff = Math.ceil(backoff * rate);
13137
13137
  total = backoff + total;
13138
13138
  if (total < mbo) {
13139
13139
  return new Promise((res, rej) => {
13140
13140
  setTimeout(() => {
13141
- method(path21, opt, backoff, total).then(res, rej);
13141
+ method(path23, opt, backoff, total).then(res, rej);
13142
13142
  }, backoff);
13143
13143
  });
13144
13144
  }
@@ -13154,15 +13154,15 @@ var retryBusy = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => {
13154
13154
  return method;
13155
13155
  }, "retryBusy");
13156
13156
  var retryBusySync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => {
13157
- const method = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt) => {
13157
+ const method = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt) => {
13158
13158
  const max = opt.maxRetries || MAXRETRIES;
13159
13159
  let retries = 0;
13160
13160
  while (true) {
13161
13161
  try {
13162
- return fn(path21);
13162
+ return fn(path23);
13163
13163
  } catch (er) {
13164
13164
  const fer = er;
13165
- if (_optionalChain([fer, 'optionalAccess', _245 => _245.path]) === path21 && _optionalChain([fer, 'optionalAccess', _246 => _246.code]) && codes.has(fer.code) && retries < max) {
13165
+ if (_optionalChain([fer, 'optionalAccess', _245 => _245.path]) === path23 && _optionalChain([fer, 'optionalAccess', _246 => _246.code]) && codes.has(fer.code) && retries < max) {
13166
13166
  retries++;
13167
13167
  continue;
13168
13168
  }
@@ -13182,16 +13182,16 @@ _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
13182
13182
 
13183
13183
 
13184
13184
  var { stat: stat5 } = promises;
13185
- var isDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => {
13185
+ var isDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => {
13186
13186
  try {
13187
- return _fs.statSync.call(void 0, path21).isDirectory();
13187
+ return _fs.statSync.call(void 0, path23).isDirectory();
13188
13188
  } catch (er) {
13189
13189
  return false;
13190
13190
  }
13191
13191
  }, "isDirSync");
13192
- var isDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => stat5(path21).then((st2) => st2.isDirectory(), () => false), "isDir");
13193
- var win32DefaultTmp = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21) => {
13194
- const { root } = _path.parse.call(void 0, path21);
13192
+ var isDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => stat5(path23).then((st2) => st2.isDirectory(), () => false), "isDir");
13193
+ var win32DefaultTmp = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23) => {
13194
+ const { root } = _path.parse.call(void 0, path23);
13195
13195
  const tmp = _os.tmpdir.call(void 0, );
13196
13196
  const { root: tmpRoot } = _path.parse.call(void 0, tmp);
13197
13197
  if (root.toLowerCase() === tmpRoot.toLowerCase()) {
@@ -13203,8 +13203,8 @@ var win32DefaultTmp = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, asyn
13203
13203
  }
13204
13204
  return root;
13205
13205
  }, "win32DefaultTmp");
13206
- var win32DefaultTmpSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => {
13207
- const { root } = _path.parse.call(void 0, path21);
13206
+ var win32DefaultTmpSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => {
13207
+ const { root } = _path.parse.call(void 0, path23);
13208
13208
  const tmp = _os.tmpdir.call(void 0, );
13209
13209
  const { root: tmpRoot } = _path.parse.call(void 0, tmp);
13210
13210
  if (root.toLowerCase() === tmpRoot.toLowerCase()) {
@@ -13223,10 +13223,10 @@ var defaultTmpSync = platform_default === "win32" ? win32DefaultTmpSync : posixD
13223
13223
 
13224
13224
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-move-remove.js
13225
13225
  var { lstat: lstat6, rename: rename2, unlink: unlink3, rmdir: rmdir3, chmod: chmod3 } = promises;
13226
- var uniqueFilename = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => `.${_path.basename.call(void 0, path21)}.${Math.random()}`, "uniqueFilename");
13227
- var unlinkFixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21) => unlink3(path21).catch((er) => {
13226
+ var uniqueFilename = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => `.${_path.basename.call(void 0, path23)}.${Math.random()}`, "uniqueFilename");
13227
+ var unlinkFixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23) => unlink3(path23).catch((er) => {
13228
13228
  if (er.code === "EPERM") {
13229
- return chmod3(path21, 438).then(() => unlink3(path21), (er2) => {
13229
+ return chmod3(path23, 438).then(() => unlink3(path23), (er2) => {
13230
13230
  if (er2.code === "ENOENT") {
13231
13231
  return;
13232
13232
  }
@@ -13237,13 +13237,13 @@ var unlinkFixEPERM = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async
13237
13237
  }
13238
13238
  throw er;
13239
13239
  }), "unlinkFixEPERM");
13240
- var unlinkFixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21) => {
13240
+ var unlinkFixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23) => {
13241
13241
  try {
13242
- _fs.unlinkSync.call(void 0, path21);
13242
+ _fs.unlinkSync.call(void 0, path23);
13243
13243
  } catch (er) {
13244
13244
  if (_optionalChain([er, 'optionalAccess', _247 => _247.code]) === "EPERM") {
13245
13245
  try {
13246
- return _fs.chmodSync.call(void 0, path21, 438);
13246
+ return _fs.chmodSync.call(void 0, path23, 438);
13247
13247
  } catch (er2) {
13248
13248
  if (_optionalChain([er2, 'optionalAccess', _248 => _248.code]) === "ENOENT") {
13249
13249
  return;
@@ -13256,31 +13256,31 @@ var unlinkFixEPERMSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (
13256
13256
  throw er;
13257
13257
  }
13258
13258
  }, "unlinkFixEPERMSync");
13259
- var rimrafMoveRemove = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt) => {
13259
+ var rimrafMoveRemove = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt) => {
13260
13260
  if (_optionalChain([opt, 'optionalAccess', _250 => _250.signal, 'optionalAccess', _251 => _251.aborted])) {
13261
13261
  throw opt.signal.reason;
13262
13262
  }
13263
13263
  try {
13264
- return await rimrafMoveRemoveDir(path21, opt, await lstat6(path21));
13264
+ return await rimrafMoveRemoveDir(path23, opt, await lstat6(path23));
13265
13265
  } catch (er) {
13266
13266
  if (_optionalChain([er, 'optionalAccess', _252 => _252.code]) === "ENOENT") return true;
13267
13267
  throw er;
13268
13268
  }
13269
13269
  }, "rimrafMoveRemove");
13270
- var rimrafMoveRemoveDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt, ent) => {
13270
+ var rimrafMoveRemoveDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt, ent) => {
13271
13271
  if (_optionalChain([opt, 'optionalAccess', _253 => _253.signal, 'optionalAccess', _254 => _254.aborted])) {
13272
13272
  throw opt.signal.reason;
13273
13273
  }
13274
13274
  if (!opt.tmp) {
13275
- return rimrafMoveRemoveDir(path21, {
13275
+ return rimrafMoveRemoveDir(path23, {
13276
13276
  ...opt,
13277
- tmp: await defaultTmp(path21)
13277
+ tmp: await defaultTmp(path23)
13278
13278
  }, ent);
13279
13279
  }
13280
- if (path21 === opt.tmp && _path.parse.call(void 0, path21).root !== path21) {
13280
+ if (path23 === opt.tmp && _path.parse.call(void 0, path23).root !== path23) {
13281
13281
  throw new Error("cannot delete temp directory used for deletion");
13282
13282
  }
13283
- const entries = ent.isDirectory() ? await readdirOrError(path21) : null;
13283
+ const entries = ent.isDirectory() ? await readdirOrError(path23) : null;
13284
13284
  if (!Array.isArray(entries)) {
13285
13285
  if (entries) {
13286
13286
  if (entries.code === "ENOENT") {
@@ -13290,56 +13290,56 @@ var rimrafMoveRemoveDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0,
13290
13290
  throw entries;
13291
13291
  }
13292
13292
  }
13293
- if (opt.filter && !await opt.filter(path21, ent)) {
13293
+ if (opt.filter && !await opt.filter(path23, ent)) {
13294
13294
  return false;
13295
13295
  }
13296
- await ignoreENOENT(tmpUnlink(path21, opt.tmp, unlinkFixEPERM));
13296
+ await ignoreENOENT(tmpUnlink(path23, opt.tmp, unlinkFixEPERM));
13297
13297
  return true;
13298
13298
  }
13299
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(_path.resolve.call(void 0, path21, ent2.name), opt, ent2)))).reduce((a2, b2) => a2 && b2, true);
13299
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir(_path.resolve.call(void 0, path23, ent2.name), opt, ent2)))).reduce((a2, b2) => a2 && b2, true);
13300
13300
  if (!removedAll) {
13301
13301
  return false;
13302
13302
  }
13303
- if (opt.preserveRoot === false && path21 === _path.parse.call(void 0, path21).root) {
13303
+ if (opt.preserveRoot === false && path23 === _path.parse.call(void 0, path23).root) {
13304
13304
  return false;
13305
13305
  }
13306
- if (opt.filter && !await opt.filter(path21, ent)) {
13306
+ if (opt.filter && !await opt.filter(path23, ent)) {
13307
13307
  return false;
13308
13308
  }
13309
- await ignoreENOENT(tmpUnlink(path21, opt.tmp, rmdir3));
13309
+ await ignoreENOENT(tmpUnlink(path23, opt.tmp, rmdir3));
13310
13310
  return true;
13311
13311
  }, "rimrafMoveRemoveDir");
13312
- var tmpUnlink = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, tmp, rm3) => {
13313
- const tmpFile = _path.resolve.call(void 0, tmp, uniqueFilename(path21));
13314
- await rename2(path21, tmpFile);
13312
+ var tmpUnlink = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, tmp, rm3) => {
13313
+ const tmpFile = _path.resolve.call(void 0, tmp, uniqueFilename(path23));
13314
+ await rename2(path23, tmpFile);
13315
13315
  return await rm3(tmpFile);
13316
13316
  }, "tmpUnlink");
13317
- var rimrafMoveRemoveSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt) => {
13317
+ var rimrafMoveRemoveSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt) => {
13318
13318
  if (_optionalChain([opt, 'optionalAccess', _255 => _255.signal, 'optionalAccess', _256 => _256.aborted])) {
13319
13319
  throw opt.signal.reason;
13320
13320
  }
13321
13321
  try {
13322
- return rimrafMoveRemoveDirSync(path21, opt, _fs.lstatSync.call(void 0, path21));
13322
+ return rimrafMoveRemoveDirSync(path23, opt, _fs.lstatSync.call(void 0, path23));
13323
13323
  } catch (er) {
13324
13324
  if (_optionalChain([er, 'optionalAccess', _257 => _257.code]) === "ENOENT") return true;
13325
13325
  throw er;
13326
13326
  }
13327
13327
  }, "rimrafMoveRemoveSync");
13328
- var rimrafMoveRemoveDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt, ent) => {
13328
+ var rimrafMoveRemoveDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt, ent) => {
13329
13329
  if (_optionalChain([opt, 'optionalAccess', _258 => _258.signal, 'optionalAccess', _259 => _259.aborted])) {
13330
13330
  throw opt.signal.reason;
13331
13331
  }
13332
13332
  if (!opt.tmp) {
13333
- return rimrafMoveRemoveDirSync(path21, {
13333
+ return rimrafMoveRemoveDirSync(path23, {
13334
13334
  ...opt,
13335
- tmp: defaultTmpSync(path21)
13335
+ tmp: defaultTmpSync(path23)
13336
13336
  }, ent);
13337
13337
  }
13338
13338
  const tmp = opt.tmp;
13339
- if (path21 === opt.tmp && _path.parse.call(void 0, path21).root !== path21) {
13339
+ if (path23 === opt.tmp && _path.parse.call(void 0, path23).root !== path23) {
13340
13340
  throw new Error("cannot delete temp directory used for deletion");
13341
13341
  }
13342
- const entries = ent.isDirectory() ? readdirOrErrorSync(path21) : null;
13342
+ const entries = ent.isDirectory() ? readdirOrErrorSync(path23) : null;
13343
13343
  if (!Array.isArray(entries)) {
13344
13344
  if (entries) {
13345
13345
  if (entries.code === "ENOENT") {
@@ -13349,32 +13349,32 @@ var rimrafMoveRemoveDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void
13349
13349
  throw entries;
13350
13350
  }
13351
13351
  }
13352
- if (opt.filter && !opt.filter(path21, ent)) {
13352
+ if (opt.filter && !opt.filter(path23, ent)) {
13353
13353
  return false;
13354
13354
  }
13355
- ignoreENOENTSync(() => tmpUnlinkSync(path21, tmp, unlinkFixEPERMSync));
13355
+ ignoreENOENTSync(() => tmpUnlinkSync(path23, tmp, unlinkFixEPERMSync));
13356
13356
  return true;
13357
13357
  }
13358
13358
  let removedAll = true;
13359
13359
  for (const ent2 of entries) {
13360
- const p3 = _path.resolve.call(void 0, path21, ent2.name);
13360
+ const p3 = _path.resolve.call(void 0, path23, ent2.name);
13361
13361
  removedAll = rimrafMoveRemoveDirSync(p3, opt, ent2) && removedAll;
13362
13362
  }
13363
13363
  if (!removedAll) {
13364
13364
  return false;
13365
13365
  }
13366
- if (opt.preserveRoot === false && path21 === _path.parse.call(void 0, path21).root) {
13366
+ if (opt.preserveRoot === false && path23 === _path.parse.call(void 0, path23).root) {
13367
13367
  return false;
13368
13368
  }
13369
- if (opt.filter && !opt.filter(path21, ent)) {
13369
+ if (opt.filter && !opt.filter(path23, ent)) {
13370
13370
  return false;
13371
13371
  }
13372
- ignoreENOENTSync(() => tmpUnlinkSync(path21, tmp, _fs.rmdirSync));
13372
+ ignoreENOENTSync(() => tmpUnlinkSync(path23, tmp, _fs.rmdirSync));
13373
13373
  return true;
13374
13374
  }, "rimrafMoveRemoveDirSync");
13375
- var tmpUnlinkSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, tmp, rmSync2) => {
13376
- const tmpFile = _path.resolve.call(void 0, tmp, uniqueFilename(path21));
13377
- _fs.renameSync.call(void 0, path21, tmpFile);
13375
+ var tmpUnlinkSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, tmp, rmSync2) => {
13376
+ const tmpFile = _path.resolve.call(void 0, tmp, uniqueFilename(path23));
13377
+ _fs.renameSync.call(void 0, path23, tmpFile);
13378
13378
  return rmSync2(tmpFile);
13379
13379
  }, "tmpUnlinkSync");
13380
13380
 
@@ -13384,31 +13384,31 @@ var rimrafWindowsFile = retryBusy(fixEPERM(unlink4));
13384
13384
  var rimrafWindowsFileSync = retryBusySync(fixEPERMSync(_fs.unlinkSync));
13385
13385
  var rimrafWindowsDirRetry = retryBusy(fixEPERM(rmdir4));
13386
13386
  var rimrafWindowsDirRetrySync = retryBusySync(fixEPERMSync(_fs.rmdirSync));
13387
- var rimrafWindowsDirMoveRemoveFallback = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt) => {
13387
+ var rimrafWindowsDirMoveRemoveFallback = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt) => {
13388
13388
  if (_optionalChain([opt, 'optionalAccess', _260 => _260.signal, 'optionalAccess', _261 => _261.aborted])) {
13389
13389
  throw opt.signal.reason;
13390
13390
  }
13391
13391
  const { filter: filter3, ...options } = opt;
13392
13392
  try {
13393
- return await rimrafWindowsDirRetry(path21, options);
13393
+ return await rimrafWindowsDirRetry(path23, options);
13394
13394
  } catch (er) {
13395
13395
  if (_optionalChain([er, 'optionalAccess', _262 => _262.code]) === "ENOTEMPTY") {
13396
- return await rimrafMoveRemove(path21, options);
13396
+ return await rimrafMoveRemove(path23, options);
13397
13397
  }
13398
13398
  throw er;
13399
13399
  }
13400
13400
  }, "rimrafWindowsDirMoveRemoveFallback");
13401
- var rimrafWindowsDirMoveRemoveFallbackSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt) => {
13401
+ var rimrafWindowsDirMoveRemoveFallbackSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt) => {
13402
13402
  if (_optionalChain([opt, 'optionalAccess', _263 => _263.signal, 'optionalAccess', _264 => _264.aborted])) {
13403
13403
  throw opt.signal.reason;
13404
13404
  }
13405
13405
  const { filter: filter3, ...options } = opt;
13406
13406
  try {
13407
- return rimrafWindowsDirRetrySync(path21, options);
13407
+ return rimrafWindowsDirRetrySync(path23, options);
13408
13408
  } catch (er) {
13409
13409
  const fer = er;
13410
13410
  if (_optionalChain([fer, 'optionalAccess', _265 => _265.code]) === "ENOTEMPTY") {
13411
- return rimrafMoveRemoveSync(path21, options);
13411
+ return rimrafMoveRemoveSync(path23, options);
13412
13412
  }
13413
13413
  throw er;
13414
13414
  }
@@ -13416,33 +13416,33 @@ var rimrafWindowsDirMoveRemoveFallbackSync = /* @__PURE__ */ _chunkJ74QFHKGcjs._
13416
13416
  var START = Symbol("start");
13417
13417
  var CHILD = Symbol("child");
13418
13418
  var FINISH = Symbol("finish");
13419
- var rimrafWindows = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt) => {
13419
+ var rimrafWindows = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt) => {
13420
13420
  if (_optionalChain([opt, 'optionalAccess', _266 => _266.signal, 'optionalAccess', _267 => _267.aborted])) {
13421
13421
  throw opt.signal.reason;
13422
13422
  }
13423
13423
  try {
13424
- return await rimrafWindowsDir(path21, opt, await lstat7(path21), START);
13424
+ return await rimrafWindowsDir(path23, opt, await lstat7(path23), START);
13425
13425
  } catch (er) {
13426
13426
  if (_optionalChain([er, 'optionalAccess', _268 => _268.code]) === "ENOENT") return true;
13427
13427
  throw er;
13428
13428
  }
13429
13429
  }, "rimrafWindows");
13430
- var rimrafWindowsSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt) => {
13430
+ var rimrafWindowsSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt) => {
13431
13431
  if (_optionalChain([opt, 'optionalAccess', _269 => _269.signal, 'optionalAccess', _270 => _270.aborted])) {
13432
13432
  throw opt.signal.reason;
13433
13433
  }
13434
13434
  try {
13435
- return rimrafWindowsDirSync(path21, opt, _fs.lstatSync.call(void 0, path21), START);
13435
+ return rimrafWindowsDirSync(path23, opt, _fs.lstatSync.call(void 0, path23), START);
13436
13436
  } catch (er) {
13437
13437
  if (_optionalChain([er, 'optionalAccess', _271 => _271.code]) === "ENOENT") return true;
13438
13438
  throw er;
13439
13439
  }
13440
13440
  }, "rimrafWindowsSync");
13441
- var rimrafWindowsDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt, ent, state = START) => {
13441
+ var rimrafWindowsDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt, ent, state = START) => {
13442
13442
  if (_optionalChain([opt, 'optionalAccess', _272 => _272.signal, 'optionalAccess', _273 => _273.aborted])) {
13443
13443
  throw opt.signal.reason;
13444
13444
  }
13445
- const entries = ent.isDirectory() ? await readdirOrError(path21) : null;
13445
+ const entries = ent.isDirectory() ? await readdirOrError(path23) : null;
13446
13446
  if (!Array.isArray(entries)) {
13447
13447
  if (entries) {
13448
13448
  if (entries.code === "ENOENT") {
@@ -13452,32 +13452,32 @@ var rimrafWindowsDir = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, asy
13452
13452
  throw entries;
13453
13453
  }
13454
13454
  }
13455
- if (opt.filter && !await opt.filter(path21, ent)) {
13455
+ if (opt.filter && !await opt.filter(path23, ent)) {
13456
13456
  return false;
13457
13457
  }
13458
- await ignoreENOENT(rimrafWindowsFile(path21, opt));
13458
+ await ignoreENOENT(rimrafWindowsFile(path23, opt));
13459
13459
  return true;
13460
13460
  }
13461
13461
  const s2 = state === START ? CHILD : state;
13462
- const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(_path.resolve.call(void 0, path21, ent2.name), opt, ent2, s2)))).reduce((a2, b2) => a2 && b2, true);
13462
+ const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir(_path.resolve.call(void 0, path23, ent2.name), opt, ent2, s2)))).reduce((a2, b2) => a2 && b2, true);
13463
13463
  if (state === START) {
13464
- return rimrafWindowsDir(path21, opt, ent, FINISH);
13464
+ return rimrafWindowsDir(path23, opt, ent, FINISH);
13465
13465
  } else if (state === FINISH) {
13466
- if (opt.preserveRoot === false && path21 === _path.parse.call(void 0, path21).root) {
13466
+ if (opt.preserveRoot === false && path23 === _path.parse.call(void 0, path23).root) {
13467
13467
  return false;
13468
13468
  }
13469
13469
  if (!removedAll) {
13470
13470
  return false;
13471
13471
  }
13472
- if (opt.filter && !await opt.filter(path21, ent)) {
13472
+ if (opt.filter && !await opt.filter(path23, ent)) {
13473
13473
  return false;
13474
13474
  }
13475
- await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path21, opt));
13475
+ await ignoreENOENT(rimrafWindowsDirMoveRemoveFallback(path23, opt));
13476
13476
  }
13477
13477
  return true;
13478
13478
  }, "rimrafWindowsDir");
13479
- var rimrafWindowsDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt, ent, state = START) => {
13480
- const entries = ent.isDirectory() ? readdirOrErrorSync(path21) : null;
13479
+ var rimrafWindowsDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt, ent, state = START) => {
13480
+ const entries = ent.isDirectory() ? readdirOrErrorSync(path23) : null;
13481
13481
  if (!Array.isArray(entries)) {
13482
13482
  if (entries) {
13483
13483
  if (entries.code === "ENOENT") {
@@ -13487,32 +13487,32 @@ var rimrafWindowsDirSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0,
13487
13487
  throw entries;
13488
13488
  }
13489
13489
  }
13490
- if (opt.filter && !opt.filter(path21, ent)) {
13490
+ if (opt.filter && !opt.filter(path23, ent)) {
13491
13491
  return false;
13492
13492
  }
13493
- ignoreENOENTSync(() => rimrafWindowsFileSync(path21, opt));
13493
+ ignoreENOENTSync(() => rimrafWindowsFileSync(path23, opt));
13494
13494
  return true;
13495
13495
  }
13496
13496
  let removedAll = true;
13497
13497
  for (const ent2 of entries) {
13498
13498
  const s2 = state === START ? CHILD : state;
13499
- const p3 = _path.resolve.call(void 0, path21, ent2.name);
13499
+ const p3 = _path.resolve.call(void 0, path23, ent2.name);
13500
13500
  removedAll = rimrafWindowsDirSync(p3, opt, ent2, s2) && removedAll;
13501
13501
  }
13502
13502
  if (state === START) {
13503
- return rimrafWindowsDirSync(path21, opt, ent, FINISH);
13503
+ return rimrafWindowsDirSync(path23, opt, ent, FINISH);
13504
13504
  } else if (state === FINISH) {
13505
- if (opt.preserveRoot === false && path21 === _path.parse.call(void 0, path21).root) {
13505
+ if (opt.preserveRoot === false && path23 === _path.parse.call(void 0, path23).root) {
13506
13506
  return false;
13507
13507
  }
13508
13508
  if (!removedAll) {
13509
13509
  return false;
13510
13510
  }
13511
- if (opt.filter && !opt.filter(path21, ent)) {
13511
+ if (opt.filter && !opt.filter(path23, ent)) {
13512
13512
  return false;
13513
13513
  }
13514
13514
  ignoreENOENTSync(() => {
13515
- rimrafWindowsDirMoveRemoveFallbackSync(path21, opt);
13515
+ rimrafWindowsDirMoveRemoveFallbackSync(path23, opt);
13516
13516
  });
13517
13517
  }
13518
13518
  return true;
@@ -13525,16 +13525,16 @@ var rimrafManualSync = platform_default === "win32" ? rimrafWindowsSync : rimraf
13525
13525
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/rimraf-native.js
13526
13526
  _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
13527
13527
  var { rm: rm2 } = promises;
13528
- var rimrafNative = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path21, opt) => {
13529
- await rm2(path21, {
13528
+ var rimrafNative = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, async (path23, opt) => {
13529
+ await rm2(path23, {
13530
13530
  ...opt,
13531
13531
  force: true,
13532
13532
  recursive: true
13533
13533
  });
13534
13534
  return true;
13535
13535
  }, "rimrafNative");
13536
- var rimrafNativeSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path21, opt) => {
13537
- _fs.rmSync.call(void 0, path21, {
13536
+ var rimrafNativeSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (path23, opt) => {
13537
+ _fs.rmSync.call(void 0, path23, {
13538
13538
  ...opt,
13539
13539
  force: true,
13540
13540
  recursive: true
@@ -13552,26 +13552,26 @@ var useNative = !hasNative || platform_default === "win32" ? () => false : (opt)
13552
13552
  var useNativeSync = !hasNative || platform_default === "win32" ? () => false : (opt) => !_optionalChain([opt, 'optionalAccess', _276 => _276.signal]) && !_optionalChain([opt, 'optionalAccess', _277 => _277.filter]);
13553
13553
 
13554
13554
  // ../../node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/index.js
13555
- var wrap = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => async (path21, opt) => {
13555
+ var wrap = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => async (path23, opt) => {
13556
13556
  const options = optArg(opt);
13557
13557
  if (options.glob) {
13558
- path21 = await glob(path21, options.glob);
13558
+ path23 = await glob(path23, options.glob);
13559
13559
  }
13560
- if (Array.isArray(path21)) {
13561
- return !!(await Promise.all(path21.map((p3) => fn(path_arg_default(p3, options), options)))).reduce((a2, b2) => a2 && b2, true);
13560
+ if (Array.isArray(path23)) {
13561
+ return !!(await Promise.all(path23.map((p3) => fn(path_arg_default(p3, options), options)))).reduce((a2, b2) => a2 && b2, true);
13562
13562
  } else {
13563
- return !!await fn(path_arg_default(path21, options), options);
13563
+ return !!await fn(path_arg_default(path23, options), options);
13564
13564
  }
13565
13565
  }, "wrap");
13566
- var wrapSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => (path21, opt) => {
13566
+ var wrapSync = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (fn) => (path23, opt) => {
13567
13567
  const options = optArgSync(opt);
13568
13568
  if (options.glob) {
13569
- path21 = globSync(path21, options.glob);
13569
+ path23 = globSync(path23, options.glob);
13570
13570
  }
13571
- if (Array.isArray(path21)) {
13572
- return !!path21.map((p3) => fn(path_arg_default(p3, options), options)).reduce((a2, b2) => a2 && b2, true);
13571
+ if (Array.isArray(path23)) {
13572
+ return !!path23.map((p3) => fn(path_arg_default(p3, options), options)).reduce((a2, b2) => a2 && b2, true);
13573
13573
  } else {
13574
- return !!fn(path_arg_default(path21, options), options);
13574
+ return !!fn(path_arg_default(path23, options), options);
13575
13575
  }
13576
13576
  }, "wrapSync");
13577
13577
  var nativeSync = wrapSync(rimrafNativeSync);
@@ -13594,8 +13594,8 @@ var moveRemoveSync = wrapSync(rimrafMoveRemoveSync);
13594
13594
  var moveRemove = Object.assign(wrap(rimrafMoveRemove), {
13595
13595
  sync: moveRemoveSync
13596
13596
  });
13597
- var rimrafSync = wrapSync((path21, opt) => useNativeSync(opt) ? rimrafNativeSync(path21, opt) : rimrafManualSync(path21, opt));
13598
- var rimraf_ = wrap((path21, opt) => useNative(opt) ? rimrafNative(path21, opt) : rimrafManual(path21, opt));
13597
+ var rimrafSync = wrapSync((path23, opt) => useNativeSync(opt) ? rimrafNativeSync(path23, opt) : rimrafManualSync(path23, opt));
13598
+ var rimraf_ = wrap((path23, opt) => useNative(opt) ? rimrafNative(path23, opt) : rimrafManual(path23, opt));
13599
13599
  var rimraf = Object.assign(rimraf_, {
13600
13600
  rimraf: rimraf_,
13601
13601
  sync: rimrafSync,
@@ -13650,17 +13650,29 @@ var BuildService2 = class {
13650
13650
  autoStart: false
13651
13651
  });
13652
13652
  }
13653
+ checkWorkersOptions() {
13654
+ const isSetWorkersDir = Boolean(this.scanService.workersDir);
13655
+ if (isSetWorkersDir && _optionalChain([this, 'access', _278 => _278.configService, 'access', _279 => _279.weappViteConfig, 'optionalAccess', _280 => _280.worker, 'optionalAccess', _281 => _281.entry]) === void 0) {
13656
+ logger_default.error("\u68C0\u6D4B\u5230\u5DF2\u7ECF\u5F00\u542F\u4E86 `worker`\uFF0C\u8BF7\u5728 `vite.config.ts` \u4E2D\u8BBE\u7F6E `weapp.worker.entry` \u8DEF\u5F84");
13657
+ logger_default.error("\u6BD4\u5982\u5F15\u5165\u7684 `worker` \u8DEF\u5F84\u4E3A `workers/index`, \u6B64\u65F6 `weapp.worker.entry` \u8BBE\u7F6E\u4E3A `[index]` ");
13658
+ throw new Error("\u8BF7\u5728 `vite.config.ts` \u4E2D\u8BBE\u7F6E `weapp.worker.entry` \u8DEF\u5F84");
13659
+ }
13660
+ return isSetWorkersDir;
13661
+ }
13653
13662
  async devWorkers() {
13654
13663
  const workersWatcher = await _vite.build.call(void 0, this.configService.mergeWorkers());
13655
13664
  this.watcherService.setRollupWatcher(workersWatcher, this.scanService.workersDir);
13656
13665
  }
13666
+ async buildWorkers() {
13667
+ await _vite.build.call(void 0, this.configService.mergeWorkers());
13668
+ }
13657
13669
  async runDev() {
13658
13670
  if (_process2.default.env.NODE_ENV === void 0) {
13659
13671
  _process2.default.env.NODE_ENV = "development";
13660
13672
  }
13661
- _optionalChain([debug, 'optionalCall', _278 => _278("dev build watcher start")]);
13673
+ _optionalChain([debug, 'optionalCall', _282 => _282("dev build watcher start")]);
13662
13674
  const watcher = await _vite.build.call(void 0, this.configService.merge());
13663
- if (this.scanService.workersDir) {
13675
+ if (this.checkWorkersOptions()) {
13664
13676
  this.devWorkers();
13665
13677
  esm_default.watch(_pathe2.default.resolve(this.configService.absoluteSrcRoot, this.scanService.workersDir), {
13666
13678
  persistent: true,
@@ -13672,12 +13684,12 @@ var BuildService2 = class {
13672
13684
  }
13673
13685
  });
13674
13686
  }
13675
- _optionalChain([debug, 'optionalCall', _279 => _279("dev build watcher end")]);
13676
- _optionalChain([debug, 'optionalCall', _280 => _280("dev watcher listen start")]);
13687
+ _optionalChain([debug, 'optionalCall', _283 => _283("dev build watcher end")]);
13688
+ _optionalChain([debug, 'optionalCall', _284 => _284("dev watcher listen start")]);
13677
13689
  await new Promise((resolve8, reject) => {
13678
13690
  watcher.on("event", async (e2) => {
13679
13691
  if (e2.code === "END") {
13680
- _optionalChain([debug, 'optionalCall', _281 => _281("dev watcher listen end")]);
13692
+ _optionalChain([debug, 'optionalCall', _285 => _285("dev watcher listen end")]);
13681
13693
  resolve8(e2);
13682
13694
  } else if (e2.code === "ERROR") {
13683
13695
  reject(e2);
@@ -13688,12 +13700,12 @@ var BuildService2 = class {
13688
13700
  return watcher;
13689
13701
  }
13690
13702
  async runProd() {
13691
- _optionalChain([debug, 'optionalCall', _282 => _282("prod build start")]);
13703
+ _optionalChain([debug, 'optionalCall', _286 => _286("prod build start")]);
13692
13704
  const output = await _vite.build.call(void 0, this.configService.merge());
13693
- if (this.scanService.workersDir) {
13694
- await _vite.build.call(void 0, this.configService.mergeWorkers());
13705
+ if (this.checkWorkersOptions()) {
13706
+ await this.buildWorkers();
13695
13707
  }
13696
- _optionalChain([debug, 'optionalCall', _283 => _283("prod build end")]);
13708
+ _optionalChain([debug, 'optionalCall', _287 => _287("prod build end")]);
13697
13709
  return output;
13698
13710
  }
13699
13711
  async build(options) {
@@ -13709,12 +13721,12 @@ var BuildService2 = class {
13709
13721
  return true;
13710
13722
  }, "filter")
13711
13723
  });
13712
- _optionalChain([debug, 'optionalCall', _284 => _284("deletedFilePaths", deletedFilePaths)]);
13724
+ _optionalChain([debug, 'optionalCall', _288 => _288("deletedFilePaths", deletedFilePaths)]);
13713
13725
  logger_default.success(`\u5DF2\u6E05\u7A7A ${this.configService.mpDistRoot} \u76EE\u5F55`);
13714
13726
  }
13715
- _optionalChain([debug, 'optionalCall', _285 => _285("build start")]);
13727
+ _optionalChain([debug, 'optionalCall', _289 => _289("build start")]);
13716
13728
  let npmBuildTask = Promise.resolve();
13717
- if (!_optionalChain([options, 'optionalAccess', _286 => _286.skipNpm])) {
13729
+ if (!_optionalChain([options, 'optionalAccess', _290 => _290.skipNpm])) {
13718
13730
  npmBuildTask = this.queue.add(() => {
13719
13731
  return Promise.all([
13720
13732
  this.npmService.build(),
@@ -13731,7 +13743,7 @@ var BuildService2 = class {
13731
13743
  result = await this.runProd();
13732
13744
  }
13733
13745
  await npmBuildTask;
13734
- _optionalChain([debug, 'optionalCall', _287 => _287("build end")]);
13746
+ _optionalChain([debug, 'optionalCall', _291 => _291("build end")]);
13735
13747
  return result;
13736
13748
  }
13737
13749
  };
@@ -13861,9 +13873,9 @@ function asset({ configService }) {
13861
13873
  // https://developers.weixin.qq.com/miniprogram/dev/framework/structure.html
13862
13874
  buildStart() {
13863
13875
  const weappViteConfig = configService.weappViteConfig;
13864
- const include = resolveGlobs(_optionalChain([weappViteConfig, 'optionalAccess', _288 => _288.copy, 'optionalAccess', _289 => _289.include]));
13865
- const exclude = resolveGlobs(_optionalChain([weappViteConfig, 'optionalAccess', _290 => _290.copy, 'optionalAccess', _291 => _291.exclude]));
13866
- const filter3 = _nullishCoalesce(_optionalChain([weappViteConfig, 'optionalAccess', _292 => _292.copy, 'optionalAccess', _293 => _293.filter]), () => ( (() => true)));
13876
+ const include = resolveGlobs(_optionalChain([weappViteConfig, 'optionalAccess', _292 => _292.copy, 'optionalAccess', _293 => _293.include]));
13877
+ const exclude = resolveGlobs(_optionalChain([weappViteConfig, 'optionalAccess', _294 => _294.copy, 'optionalAccess', _295 => _295.exclude]));
13878
+ const filter3 = _nullishCoalesce(_optionalChain([weappViteConfig, 'optionalAccess', _296 => _296.copy, 'optionalAccess', _297 => _297.filter]), () => ( (() => true)));
13867
13879
  const ignore = [
13868
13880
  ...defaultExcluded,
13869
13881
  _pathe2.default.resolve(configService.cwd, `${resolvedConfig.build.outDir}/**/*`),
@@ -13918,7 +13930,7 @@ function autoImport({ configService, autoImportService }) {
13918
13930
  },
13919
13931
  async buildStart() {
13920
13932
  autoImportService.potentialComponentMap.clear();
13921
- const globs = _optionalChain([configService, 'access', _294 => _294.weappViteConfig, 'optionalAccess', _295 => _295.enhance, 'optionalAccess', _296 => _296.autoImportComponents, 'optionalAccess', _297 => _297.globs]);
13933
+ const globs = _optionalChain([configService, 'access', _298 => _298.weappViteConfig, 'optionalAccess', _299 => _299.enhance, 'optionalAccess', _300 => _300.autoImportComponents, 'optionalAccess', _301 => _301.globs]);
13922
13934
  if (globs) {
13923
13935
  const ignore = [
13924
13936
  ...defaultExcluded,
@@ -13927,8 +13939,8 @@ function autoImport({ configService, autoImportService }) {
13927
13939
  const fdir = new (0, _fdir.fdir)({
13928
13940
  includeDirs: false,
13929
13941
  filters: [
13930
- (path21) => {
13931
- return isTemplateRequest(path21);
13942
+ (path23) => {
13943
+ return isTemplateRequest(path23);
13932
13944
  }
13933
13945
  ]
13934
13946
  });
@@ -15206,7 +15218,7 @@ function handleWxml(data2, options) {
15206
15218
  }
15207
15219
  for (const { end, start, value } of inlineWxsTokens) {
15208
15220
  const { result } = transformWxsCode(value);
15209
- if (_optionalChain([result, 'optionalAccess', _298 => _298.code])) {
15221
+ if (_optionalChain([result, 'optionalAccess', _302 => _302.code])) {
15210
15222
  ms.update(start, end, `
15211
15223
  ${result.code}`);
15212
15224
  }
@@ -15245,6 +15257,12 @@ _chunkJ74QFHKGcjs.__name.call(void 0, handleWxml, "handleWxml");
15245
15257
 
15246
15258
 
15247
15259
 
15260
+ // src/plugins/hooks/useLoadEntry.ts
15261
+ _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
15262
+
15263
+
15264
+
15265
+
15248
15266
  // src/plugins/utils/analyze.ts
15249
15267
  _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
15250
15268
 
@@ -15280,6 +15298,230 @@ function analyzeCommonJson(json) {
15280
15298
  }
15281
15299
  _chunkJ74QFHKGcjs.__name.call(void 0, analyzeCommonJson, "analyzeCommonJson");
15282
15300
 
15301
+ // src/plugins/hooks/useLoadEntry.ts
15302
+ function useLoadEntry({ jsonService, wxmlService, configService, autoImportService }) {
15303
+ const entriesMap = /* @__PURE__ */ new Map();
15304
+ const loadedEntrySet = /* @__PURE__ */ new Set();
15305
+ const jsonEmitFilesMap = /* @__PURE__ */ new Map();
15306
+ function resolveImportee2(importee, jsonPath, aliasEntries) {
15307
+ let updatedId = importee;
15308
+ if (Array.isArray(aliasEntries)) {
15309
+ if (!jsonPath) {
15310
+ return importee;
15311
+ }
15312
+ const matchedEntry = aliasEntries.find((x3) => matches(x3.find, importee));
15313
+ if (matchedEntry) {
15314
+ updatedId = importee.replace(matchedEntry.find, matchedEntry.replacement);
15315
+ }
15316
+ }
15317
+ return configService.relativeAbsoluteSrcRoot(_pathe2.default.resolve(_pathe2.default.dirname(jsonPath), updatedId));
15318
+ }
15319
+ _chunkJ74QFHKGcjs.__name.call(void 0, resolveImportee2, "resolveImportee");
15320
+ function setJsonEmitFilesMap(entry) {
15321
+ if (entry.jsonPath) {
15322
+ const fileName = configService.relativeAbsoluteSrcRoot(jsonFileRemoveJsExtension(entry.jsonPath));
15323
+ jsonEmitFilesMap.set(fileName, {
15324
+ type: "asset",
15325
+ fileName,
15326
+ entry
15327
+ });
15328
+ }
15329
+ }
15330
+ _chunkJ74QFHKGcjs.__name.call(void 0, setJsonEmitFilesMap, "setJsonEmitFilesMap");
15331
+ async function scanTemplateEntry(templateEntry) {
15332
+ const wxmlToken = await wxmlService.scan(templateEntry);
15333
+ if (wxmlToken) {
15334
+ const { components: components2 } = wxmlToken;
15335
+ wxmlService.setWxmlComponentsMap(templateEntry, components2);
15336
+ }
15337
+ }
15338
+ _chunkJ74QFHKGcjs.__name.call(void 0, scanTemplateEntry, "scanTemplateEntry");
15339
+ function normalizeEntry(entry, from) {
15340
+ if (/plugin:\/\//.test(entry)) {
15341
+ return entry;
15342
+ }
15343
+ const tokens = entry.split("/");
15344
+ if (tokens[0] && _shared.isObject.call(void 0, configService.packageJson.dependencies) && Object.keys(configService.packageJson.dependencies).find((dep) => {
15345
+ const depTokens = dep.split("/");
15346
+ for (let i = 0; i < Math.min(tokens.length, depTokens.length); i++) {
15347
+ if (tokens[i] === depTokens[i]) {
15348
+ continue;
15349
+ }
15350
+ return false;
15351
+ }
15352
+ return true;
15353
+ })) {
15354
+ return `npm:${entry}`;
15355
+ } else if (tokens[0] === "") {
15356
+ return entry.substring(1);
15357
+ } else {
15358
+ const importee = resolveImportee2(entry, from, configService.aliasEntries);
15359
+ return importee;
15360
+ }
15361
+ }
15362
+ _chunkJ74QFHKGcjs.__name.call(void 0, normalizeEntry, "normalizeEntry");
15363
+ function emitEntriesChunks(resolvedIds) {
15364
+ return resolvedIds.map(async (resolvedId) => {
15365
+ if (resolvedId) {
15366
+ loadedEntrySet.add(resolvedId.id);
15367
+ await this.load(resolvedId);
15368
+ const fileName = configService.relativeAbsoluteSrcRoot(changeFileExtension(resolvedId.id, ".js"));
15369
+ this.emitFile({
15370
+ type: "chunk",
15371
+ id: resolvedId.id,
15372
+ fileName
15373
+ });
15374
+ }
15375
+ });
15376
+ }
15377
+ _chunkJ74QFHKGcjs.__name.call(void 0, emitEntriesChunks, "emitEntriesChunks");
15378
+ async function loadEntry(id, type) {
15379
+ this.addWatchFile(id);
15380
+ const baseName = _shared.removeExtensionDeep.call(void 0, id);
15381
+ let { path: jsonPath, predictions } = await findJsonEntry(id);
15382
+ for (const prediction of predictions) {
15383
+ this.addWatchFile(prediction);
15384
+ }
15385
+ let json = {};
15386
+ if (jsonPath) {
15387
+ json = await jsonService.read(jsonPath);
15388
+ } else {
15389
+ jsonPath = changeFileExtension(id, ".json");
15390
+ }
15391
+ const entries = [];
15392
+ let templatePath = "";
15393
+ if (type === "app") {
15394
+ entries.push(...analyzeAppJson(json));
15395
+ const { sitemapLocation = "sitemap.json", themeLocation = "theme.json" } = json;
15396
+ if (sitemapLocation) {
15397
+ const { path: sitemapJsonPath, predictions: predictions2 } = await findJsonEntry(_pathe2.default.resolve(_pathe2.default.dirname(id), sitemapLocation));
15398
+ for (const prediction of predictions2) {
15399
+ this.addWatchFile(prediction);
15400
+ }
15401
+ if (sitemapJsonPath) {
15402
+ const sitemapJson = await jsonService.read(sitemapJsonPath);
15403
+ setJsonEmitFilesMap({
15404
+ json: sitemapJson,
15405
+ jsonPath: sitemapJsonPath,
15406
+ type: "app"
15407
+ });
15408
+ }
15409
+ }
15410
+ if (themeLocation) {
15411
+ const { path: themeJsonPath, predictions: predictions2 } = await findJsonEntry(_pathe2.default.resolve(_pathe2.default.dirname(id), themeLocation));
15412
+ for (const prediction of predictions2) {
15413
+ this.addWatchFile(prediction);
15414
+ }
15415
+ if (themeJsonPath) {
15416
+ const themeJson = await jsonService.read(themeJsonPath);
15417
+ setJsonEmitFilesMap({
15418
+ json: themeJson,
15419
+ jsonPath: themeJsonPath,
15420
+ type: "app"
15421
+ });
15422
+ }
15423
+ }
15424
+ } else {
15425
+ const { path: templateEntry, predictions: predictions2 } = await findTemplateEntry(id);
15426
+ for (const prediction of predictions2) {
15427
+ this.addWatchFile(prediction);
15428
+ }
15429
+ if (templateEntry) {
15430
+ templatePath = templateEntry;
15431
+ await scanTemplateEntry(templateEntry);
15432
+ }
15433
+ const hit = wxmlService.wxmlComponentsMap.get(baseName);
15434
+ if (hit) {
15435
+ const depComponentNames = Object.keys(hit);
15436
+ for (const depComponentName of depComponentNames) {
15437
+ const res = autoImportService.potentialComponentMap.get(depComponentName);
15438
+ if (res) {
15439
+ const { entry: componentEntry, value } = res;
15440
+ if (_optionalChain([componentEntry, 'optionalAccess', _303 => _303.jsonPath])) {
15441
+ const usingComponents = _shared.get.call(void 0, json, "usingComponents");
15442
+ if (_shared.isObject.call(void 0, usingComponents) && Reflect.has(usingComponents, value.name)) {
15443
+ continue;
15444
+ }
15445
+ _shared.set.call(void 0, json, `usingComponents.${value.name}`, value.from);
15446
+ }
15447
+ } else if (Array.isArray(_optionalChain([configService, 'access', _304 => _304.weappViteConfig, 'optionalAccess', _305 => _305.enhance, 'optionalAccess', _306 => _306.autoImportComponents, 'optionalAccess', _307 => _307.resolvers]))) {
15448
+ for (const resolver of configService.weappViteConfig.enhance.autoImportComponents.resolvers) {
15449
+ const value = resolver(depComponentName, baseName);
15450
+ if (value) {
15451
+ const usingComponents = _shared.get.call(void 0, json, "usingComponents");
15452
+ if (!(_shared.isObject.call(void 0, usingComponents) && Reflect.has(usingComponents, value.name))) {
15453
+ _shared.set.call(void 0, json, `usingComponents.${value.name}`, value.from);
15454
+ }
15455
+ }
15456
+ }
15457
+ }
15458
+ }
15459
+ }
15460
+ entries.push(...analyzeCommonJson(json));
15461
+ }
15462
+ const normalizedEntries = entries.map((entry) => normalizeEntry(entry, jsonPath));
15463
+ for (const normalizedEntry of normalizedEntries) {
15464
+ entriesMap.set(normalizedEntry, {
15465
+ type: json.component ? "component" : "page",
15466
+ templatePath,
15467
+ jsonPath,
15468
+ json,
15469
+ path: id
15470
+ });
15471
+ }
15472
+ const resolvedIds = await Promise.all(normalizedEntries.filter(
15473
+ // 排除 plugin: 和 npm:
15474
+ (entry) => !entry.includes(":")
15475
+ ).map(async (entry) => {
15476
+ const absPath = _pathe2.default.resolve(configService.absoluteSrcRoot, entry);
15477
+ return {
15478
+ entry,
15479
+ resolvedId: await this.resolve(absPath)
15480
+ };
15481
+ }));
15482
+ await Promise.all([
15483
+ ...emitEntriesChunks.call(this, resolvedIds.filter(({ entry, resolvedId }) => {
15484
+ if (resolvedId) {
15485
+ if (!loadedEntrySet.has(resolvedId.id)) {
15486
+ return true;
15487
+ } else {
15488
+ return false;
15489
+ }
15490
+ } else {
15491
+ logger_default.warn(`\u6CA1\u6709\u627E\u5230 \`${entry}\` \u7684\u5165\u53E3\u6587\u4EF6\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u6B63\u786E!`);
15492
+ return false;
15493
+ }
15494
+ }).map((x3) => x3.resolvedId))
15495
+ ]);
15496
+ setJsonEmitFilesMap({
15497
+ jsonPath,
15498
+ json,
15499
+ type
15500
+ });
15501
+ const code = await _fsextra2.default.readFile(id, "utf8");
15502
+ const ms = new MagicString(code);
15503
+ for (const ext2 of supportedCssLangs) {
15504
+ const mayBeCssPath = changeFileExtension(id, ext2);
15505
+ this.addWatchFile(mayBeCssPath);
15506
+ if (await _fsextra2.default.exists(mayBeCssPath)) {
15507
+ ms.prepend(`import '${mayBeCssPath}';
15508
+ `);
15509
+ }
15510
+ }
15511
+ return {
15512
+ code: ms.toString()
15513
+ };
15514
+ }
15515
+ _chunkJ74QFHKGcjs.__name.call(void 0, loadEntry, "loadEntry");
15516
+ return {
15517
+ loadEntry,
15518
+ entriesMap,
15519
+ loadedEntrySet,
15520
+ jsonEmitFilesMap
15521
+ };
15522
+ }
15523
+ _chunkJ74QFHKGcjs.__name.call(void 0, useLoadEntry, "useLoadEntry");
15524
+
15283
15525
  // src/plugins/utils/ast.ts
15284
15526
  _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
15285
15527
 
@@ -15482,220 +15724,8 @@ _chunkJ74QFHKGcjs.__name.call(void 0, collectRequireTokens, "collectRequireToken
15482
15724
 
15483
15725
  // src/plugins/core.ts
15484
15726
  function weappVite(ctx, subPackageMeta) {
15485
- const { scanService, configService, jsonService, wxmlService, autoImportService, buildService, watcherService } = ctx;
15486
- const entriesMap = /* @__PURE__ */ new Map();
15487
- const loadedEntrySet = /* @__PURE__ */ new Set();
15488
- const jsonEmitFilesMap = /* @__PURE__ */ new Map();
15489
- function resolveImportee2(importee, jsonPath, aliasEntries) {
15490
- let updatedId = importee;
15491
- if (Array.isArray(aliasEntries)) {
15492
- if (!jsonPath) {
15493
- return importee;
15494
- }
15495
- const matchedEntry = aliasEntries.find((x3) => matches(x3.find, importee));
15496
- if (matchedEntry) {
15497
- updatedId = importee.replace(matchedEntry.find, matchedEntry.replacement);
15498
- }
15499
- }
15500
- return configService.relativeAbsoluteSrcRoot(_pathe2.default.resolve(_pathe2.default.dirname(jsonPath), updatedId));
15501
- }
15502
- _chunkJ74QFHKGcjs.__name.call(void 0, resolveImportee2, "resolveImportee");
15503
- function normalizeEntry(entry, from) {
15504
- if (/plugin:\/\//.test(entry)) {
15505
- return entry;
15506
- }
15507
- const tokens = entry.split("/");
15508
- if (tokens[0] && _shared.isObject.call(void 0, configService.packageJson.dependencies) && Object.keys(configService.packageJson.dependencies).find((dep) => {
15509
- const depTokens = dep.split("/");
15510
- for (let i = 0; i < Math.min(tokens.length, depTokens.length); i++) {
15511
- if (tokens[i] === depTokens[i]) {
15512
- continue;
15513
- }
15514
- return false;
15515
- }
15516
- return true;
15517
- })) {
15518
- return `npm:${entry}`;
15519
- } else if (tokens[0] === "") {
15520
- return entry.substring(1);
15521
- } else {
15522
- const importee = resolveImportee2(entry, from, configService.aliasEntries);
15523
- return importee;
15524
- }
15525
- }
15526
- _chunkJ74QFHKGcjs.__name.call(void 0, normalizeEntry, "normalizeEntry");
15527
- function setJsonEmitFilesMap(entry) {
15528
- if (entry.jsonPath) {
15529
- const fileName = configService.relativeAbsoluteSrcRoot(jsonFileRemoveJsExtension(entry.jsonPath));
15530
- jsonEmitFilesMap.set(fileName, {
15531
- type: "asset",
15532
- fileName,
15533
- entry
15534
- });
15535
- }
15536
- }
15537
- _chunkJ74QFHKGcjs.__name.call(void 0, setJsonEmitFilesMap, "setJsonEmitFilesMap");
15538
- function emitEntriesChunks(resolvedIds) {
15539
- return resolvedIds.map(async (resolvedId) => {
15540
- if (resolvedId) {
15541
- loadedEntrySet.add(resolvedId.id);
15542
- await this.load(resolvedId);
15543
- const fileName = configService.relativeAbsoluteSrcRoot(changeFileExtension(resolvedId.id, ".js"));
15544
- this.emitFile({
15545
- type: "chunk",
15546
- id: resolvedId.id,
15547
- fileName
15548
- });
15549
- }
15550
- });
15551
- }
15552
- _chunkJ74QFHKGcjs.__name.call(void 0, emitEntriesChunks, "emitEntriesChunks");
15553
- async function scanTemplateEntry(templateEntry) {
15554
- const wxmlToken = await wxmlService.scan(templateEntry);
15555
- if (wxmlToken) {
15556
- const { components: components2 } = wxmlToken;
15557
- wxmlService.setWxmlComponentsMap(templateEntry, components2);
15558
- }
15559
- }
15560
- _chunkJ74QFHKGcjs.__name.call(void 0, scanTemplateEntry, "scanTemplateEntry");
15561
- async function loadEntry(id, type) {
15562
- this.addWatchFile(id);
15563
- const baseName = _shared.removeExtensionDeep.call(void 0, id);
15564
- let { path: jsonPath, predictions } = await findJsonEntry(id);
15565
- for (const prediction of predictions) {
15566
- this.addWatchFile(prediction);
15567
- }
15568
- let json = {};
15569
- if (jsonPath) {
15570
- json = await jsonService.read(jsonPath);
15571
- } else {
15572
- jsonPath = changeFileExtension(id, ".json");
15573
- }
15574
- const entries = [];
15575
- let templatePath = "";
15576
- if (type === "app") {
15577
- entries.push(...analyzeAppJson(json));
15578
- const { sitemapLocation = "sitemap.json", themeLocation = "theme.json" } = json;
15579
- if (sitemapLocation) {
15580
- const { path: sitemapJsonPath, predictions: predictions2 } = await findJsonEntry(_pathe2.default.resolve(_pathe2.default.dirname(id), sitemapLocation));
15581
- for (const prediction of predictions2) {
15582
- this.addWatchFile(prediction);
15583
- }
15584
- if (sitemapJsonPath) {
15585
- const sitemapJson = await jsonService.read(sitemapJsonPath);
15586
- setJsonEmitFilesMap({
15587
- json: sitemapJson,
15588
- jsonPath: sitemapJsonPath,
15589
- type: "app"
15590
- });
15591
- }
15592
- }
15593
- if (themeLocation) {
15594
- const { path: themeJsonPath, predictions: predictions2 } = await findJsonEntry(_pathe2.default.resolve(_pathe2.default.dirname(id), themeLocation));
15595
- for (const prediction of predictions2) {
15596
- this.addWatchFile(prediction);
15597
- }
15598
- if (themeJsonPath) {
15599
- const themeJson = await jsonService.read(themeJsonPath);
15600
- setJsonEmitFilesMap({
15601
- json: themeJson,
15602
- jsonPath: themeJsonPath,
15603
- type: "app"
15604
- });
15605
- }
15606
- }
15607
- } else {
15608
- const { path: templateEntry, predictions: predictions2 } = await findTemplateEntry(id);
15609
- for (const prediction of predictions2) {
15610
- this.addWatchFile(prediction);
15611
- }
15612
- if (templateEntry) {
15613
- templatePath = templateEntry;
15614
- await scanTemplateEntry(templateEntry);
15615
- }
15616
- const hit = wxmlService.wxmlComponentsMap.get(baseName);
15617
- if (hit) {
15618
- const depComponentNames = Object.keys(hit);
15619
- for (const depComponentName of depComponentNames) {
15620
- const res = autoImportService.potentialComponentMap.get(depComponentName);
15621
- if (res) {
15622
- const { entry: componentEntry, value } = res;
15623
- if (_optionalChain([componentEntry, 'optionalAccess', _299 => _299.jsonPath])) {
15624
- const usingComponents = _shared.get.call(void 0, json, "usingComponents");
15625
- if (_shared.isObject.call(void 0, usingComponents) && Reflect.has(usingComponents, value.name)) {
15626
- continue;
15627
- }
15628
- _shared.set.call(void 0, json, `usingComponents.${value.name}`, value.from);
15629
- }
15630
- } else if (Array.isArray(_optionalChain([configService, 'access', _300 => _300.weappViteConfig, 'optionalAccess', _301 => _301.enhance, 'optionalAccess', _302 => _302.autoImportComponents, 'optionalAccess', _303 => _303.resolvers]))) {
15631
- for (const resolver of configService.weappViteConfig.enhance.autoImportComponents.resolvers) {
15632
- const value = resolver(depComponentName, baseName);
15633
- if (value) {
15634
- const usingComponents = _shared.get.call(void 0, json, "usingComponents");
15635
- if (!(_shared.isObject.call(void 0, usingComponents) && Reflect.has(usingComponents, value.name))) {
15636
- _shared.set.call(void 0, json, `usingComponents.${value.name}`, value.from);
15637
- }
15638
- }
15639
- }
15640
- }
15641
- }
15642
- }
15643
- entries.push(...analyzeCommonJson(json));
15644
- }
15645
- const normalizedEntries = entries.map((entry) => normalizeEntry(entry, jsonPath));
15646
- for (const normalizedEntry of normalizedEntries) {
15647
- entriesMap.set(normalizedEntry, {
15648
- type: json.component ? "component" : "page",
15649
- templatePath,
15650
- jsonPath,
15651
- json,
15652
- path: id
15653
- });
15654
- }
15655
- const resolvedIds = await Promise.all(normalizedEntries.filter(
15656
- // 排除 plugin: 和 npm:
15657
- (entry) => !entry.includes(":")
15658
- ).map(async (entry) => {
15659
- const absPath = _pathe2.default.resolve(configService.absoluteSrcRoot, entry);
15660
- return {
15661
- entry,
15662
- resolvedId: await this.resolve(absPath)
15663
- };
15664
- }));
15665
- await Promise.all([
15666
- ...emitEntriesChunks.call(this, resolvedIds.filter(({ entry, resolvedId }) => {
15667
- if (resolvedId) {
15668
- if (!loadedEntrySet.has(resolvedId.id)) {
15669
- return true;
15670
- } else {
15671
- return false;
15672
- }
15673
- } else {
15674
- logger_default.warn(`\u6CA1\u6709\u627E\u5230 \`${entry}\` \u7684\u5165\u53E3\u6587\u4EF6\uFF0C\u8BF7\u68C0\u67E5\u8DEF\u5F84\u662F\u5426\u6B63\u786E!`);
15675
- return false;
15676
- }
15677
- }).map((x3) => x3.resolvedId))
15678
- ]);
15679
- setJsonEmitFilesMap({
15680
- jsonPath,
15681
- json,
15682
- type
15683
- });
15684
- const code = await _fsextra2.default.readFile(id, "utf8");
15685
- const ms = new MagicString(code);
15686
- for (const ext2 of supportedCssLangs) {
15687
- const mayBeCssPath = changeFileExtension(id, ext2);
15688
- this.addWatchFile(mayBeCssPath);
15689
- if (await _fsextra2.default.exists(mayBeCssPath)) {
15690
- ms.prepend(`import '${mayBeCssPath}';
15691
- `);
15692
- }
15693
- }
15694
- return {
15695
- code: ms.toString()
15696
- };
15697
- }
15698
- _chunkJ74QFHKGcjs.__name.call(void 0, loadEntry, "loadEntry");
15727
+ const { scanService, configService, jsonService, wxmlService, buildService, watcherService } = ctx;
15728
+ const { loadEntry, jsonEmitFilesMap, loadedEntrySet } = useLoadEntry(ctx);
15699
15729
  let pq = [];
15700
15730
  return [
15701
15731
  {
@@ -15746,7 +15776,7 @@ function weappVite(ctx, subPackageMeta) {
15746
15776
  options.input = scanedInput;
15747
15777
  },
15748
15778
  resolveId(id) {
15749
- _optionalChain([configService, 'access', _304 => _304.weappViteConfig, 'optionalAccess', _305 => _305.debug, 'optionalAccess', _306 => _306.resolveId, 'optionalCall', _307 => _307(id, subPackageMeta)]);
15779
+ _optionalChain([configService, 'access', _308 => _308.weappViteConfig, 'optionalAccess', _309 => _309.debug, 'optionalAccess', _310 => _310.resolveId, 'optionalCall', _311 => _311(id, subPackageMeta)]);
15750
15780
  if (id.endsWith(".wxss")) {
15751
15781
  return id.replace(/\.wxss$/, ".css?wxss");
15752
15782
  }
@@ -15756,7 +15786,7 @@ function weappVite(ctx, subPackageMeta) {
15756
15786
  // 假如返回的是 null, 这时候才会往下添加到 this.graph.watchFiles
15757
15787
  // https://github.com/rollup/rollup/blob/328fa2d18285185a20bf9b6fde646c3c28f284ae/src/utils/PluginDriver.ts#L153
15758
15788
  async load(id) {
15759
- _optionalChain([configService, 'access', _308 => _308.weappViteConfig, 'optionalAccess', _309 => _309.debug, 'optionalAccess', _310 => _310.load, 'optionalCall', _311 => _311(id, subPackageMeta)]);
15789
+ _optionalChain([configService, 'access', _312 => _312.weappViteConfig, 'optionalAccess', _313 => _313.debug, 'optionalAccess', _314 => _314.load, 'optionalCall', _315 => _315(id, subPackageMeta)]);
15760
15790
  const relativeBasename = _shared.removeExtensionDeep.call(void 0, configService.relativeAbsoluteSrcRoot(id));
15761
15791
  if (isCSSRequest(id)) {
15762
15792
  const parsed = parseRequest(id);
@@ -15768,7 +15798,7 @@ function weappVite(ctx, subPackageMeta) {
15768
15798
  code: css2
15769
15799
  };
15770
15800
  }
15771
- } else if (loadedEntrySet.has(id) || _optionalChain([subPackageMeta, 'optionalAccess', _312 => _312.entries, 'access', _313 => _313.includes, 'call', _314 => _314(relativeBasename)])) {
15801
+ } else if (loadedEntrySet.has(id) || _optionalChain([subPackageMeta, 'optionalAccess', _316 => _316.entries, 'access', _317 => _317.includes, 'call', _318 => _318(relativeBasename)])) {
15772
15802
  return await loadEntry.call(this, id, "component");
15773
15803
  } else if ([
15774
15804
  "app"
@@ -15830,7 +15860,7 @@ function weappVite(ctx, subPackageMeta) {
15830
15860
  }
15831
15861
  }
15832
15862
  }
15833
- if (_optionalChain([configService, 'access', _315 => _315.weappViteConfig, 'optionalAccess', _316 => _316.debug, 'optionalAccess', _317 => _317.watchFiles])) {
15863
+ if (_optionalChain([configService, 'access', _319 => _319.weappViteConfig, 'optionalAccess', _320 => _320.debug, 'optionalAccess', _321 => _321.watchFiles])) {
15834
15864
  const watchFiles = this.getWatchFiles();
15835
15865
  configService.weappViteConfig.debug.watchFiles(watchFiles, subPackageMeta);
15836
15866
  }
@@ -16028,7 +16058,7 @@ function preflight({ configService }) {
16028
16058
  enforce: "pre",
16029
16059
  configResolved(config) {
16030
16060
  for (const removePlugin of removePlugins) {
16031
- const idx = _optionalChain([config, 'access', _318 => _318.plugins, 'optionalAccess', _319 => _319.findIndex, 'call', _320 => _320((x3) => x3.name === removePlugin)]);
16061
+ const idx = _optionalChain([config, 'access', _322 => _322.plugins, 'optionalAccess', _323 => _323.findIndex, 'call', _324 => _324((x3) => x3.name === removePlugin)]);
16032
16062
  if (idx > -1) {
16033
16063
  config.plugins.splice(idx, 1);
16034
16064
  }
@@ -16054,47 +16084,58 @@ _chunkJ74QFHKGcjs.__name.call(void 0, preflight, "preflight");
16054
16084
  _chunkJ74QFHKGcjs.init_cjs_shims.call(void 0, );
16055
16085
 
16056
16086
 
16057
- var internalWorkerInput = "__weapp-vite-workers.js";
16087
+
16058
16088
  function workers({ configService, scanService }) {
16059
- const virtualModuleId = "virtual:weapp-vite-workers";
16060
- const resolvedVirtualModuleId = `\0${virtualModuleId}`;
16061
16089
  const plugins = [];
16062
16090
  if (scanService.workersDir) {
16063
16091
  plugins.push({
16064
16092
  name: "weapp-vite:workers",
16065
16093
  enforce: "pre",
16066
- options(options) {
16067
- options.input = _pathe2.default.resolve(configService.packageInfo.rootPath, `modules/${internalWorkerInput}`);
16068
- },
16069
- resolveId(id) {
16070
- if (id === virtualModuleId) {
16071
- return resolvedVirtualModuleId;
16072
- }
16073
- },
16074
- async load(id) {
16075
- if (id === resolvedVirtualModuleId) {
16076
- const files = await new (0, _fdir.fdir)().withFullPaths().glob("**/*.{js,ts}").crawl(_pathe2.default.resolve(configService.absoluteSrcRoot, scanService.workersDir)).withPromise();
16077
- return files.map((x3) => {
16078
- return `import('${_pathe2.default.posix.normalize(x3)}')`;
16079
- }).join("\n");
16080
- }
16094
+ async options(options) {
16095
+ const workerOptions = _optionalChain([configService, 'access', _325 => _325.weappViteConfig, 'optionalAccess', _326 => _326.worker]);
16096
+ const entries = (Array.isArray(_optionalChain([workerOptions, 'optionalAccess', _327 => _327.entry])) ? _optionalChain([workerOptions, 'optionalAccess', _328 => _328.entry]) : [
16097
+ _optionalChain([workerOptions, 'optionalAccess', _329 => _329.entry])
16098
+ ]).filter((x3) => x3);
16099
+ const pq = await Promise.all(entries.map(async (entry) => {
16100
+ const relativeEnrtyPath = _pathe2.default.join(scanService.workersDir, entry);
16101
+ const key = _shared.removeExtension.call(void 0, relativeEnrtyPath);
16102
+ const findPath = _pathe2.default.resolve(configService.absoluteSrcRoot, relativeEnrtyPath);
16103
+ let result;
16104
+ let isExisted = false;
16105
+ if (isJsOrTs(entry)) {
16106
+ isExisted = await _fsextra2.default.exists(findPath);
16107
+ result = {
16108
+ key,
16109
+ value: findPath
16110
+ };
16111
+ } else {
16112
+ const { path: filepath } = await findJsEntry(findPath);
16113
+ isExisted = Boolean(filepath);
16114
+ result = {
16115
+ key,
16116
+ value: filepath
16117
+ };
16118
+ }
16119
+ if (!isExisted) {
16120
+ logger_default.warn(`\u5F15\u7528 worker: \`${configService.relativeCwd(relativeEnrtyPath)}\` \u4E0D\u5B58\u5728!`);
16121
+ }
16122
+ return result;
16123
+ }));
16124
+ const input = pq.reduce((acc, cur) => {
16125
+ if (cur.value) {
16126
+ acc[cur.key] = cur.value;
16127
+ }
16128
+ return acc;
16129
+ }, {});
16130
+ options.input = input;
16081
16131
  },
16082
16132
  watchChange(id, change) {
16083
16133
  logger_default.success(`[workers:${change.event}] ${configService.relativeCwd(id)}`);
16084
16134
  },
16085
- // generateBundle(_x, bundle) {
16086
- // const keys = Object.keys(bundle)
16087
- // console.log(keys)
16088
- // },
16089
16135
  outputOptions(options) {
16090
16136
  options.chunkFileNames = (chunkInfo) => {
16091
16137
  return _pathe2.default.join(_nullishCoalesce(scanService.workersDir, () => ( "")), chunkInfo.isDynamicEntry ? "[name].js" : "[name]-[hash].js");
16092
16138
  };
16093
- },
16094
- generateBundle(_x, bundle) {
16095
- if (internalWorkerInput in bundle) {
16096
- delete bundle[internalWorkerInput];
16097
- }
16098
16139
  }
16099
16140
  });
16100
16141
  }
@@ -16127,7 +16168,7 @@ function wxs({ configService, wxmlService }) {
16127
16168
  const { result, importees } = transformWxsCode(rawCode, {
16128
16169
  filename: wxsPath
16129
16170
  });
16130
- if (typeof _optionalChain([result, 'optionalAccess', _321 => _321.code]) === "string") {
16171
+ if (typeof _optionalChain([result, 'optionalAccess', _330 => _330.code]) === "string") {
16131
16172
  code = result.code;
16132
16173
  }
16133
16174
  await Promise.all(importees.map(({ source }) => {
@@ -16193,7 +16234,7 @@ function vitePluginWeapp(ctx, subPackageMeta) {
16193
16234
  if (subPackageMeta) {
16194
16235
  return plugins;
16195
16236
  }
16196
- const inspectOptions = _optionalChain([ctx, 'access', _322 => _322.configService, 'access', _323 => _323.weappViteConfig, 'optionalAccess', _324 => _324.debug, 'optionalAccess', _325 => _325.inspect]);
16237
+ const inspectOptions = _optionalChain([ctx, 'access', _331 => _331.configService, 'access', _332 => _332.weappViteConfig, 'optionalAccess', _333 => _333.debug, 'optionalAccess', _334 => _334.inspect]);
16197
16238
  return inspectOptions ? _vitepluginperformance.wrapPlugin.call(void 0, plugins, inspectOptions) : plugins;
16198
16239
  }
16199
16240
  _chunkJ74QFHKGcjs.__name.call(void 0, vitePluginWeapp, "vitePluginWeapp");
@@ -16202,7 +16243,7 @@ function vitePluginWeappWorkers(ctx) {
16202
16243
  ...preflight(ctx)
16203
16244
  ];
16204
16245
  plugins.push(...workers(ctx));
16205
- const inspectOptions = _optionalChain([ctx, 'access', _326 => _326.configService, 'access', _327 => _327.weappViteConfig, 'optionalAccess', _328 => _328.debug, 'optionalAccess', _329 => _329.inspect]);
16246
+ const inspectOptions = _optionalChain([ctx, 'access', _335 => _335.configService, 'access', _336 => _336.weappViteConfig, 'optionalAccess', _337 => _337.debug, 'optionalAccess', _338 => _338.inspect]);
16206
16247
  return inspectOptions ? _vitepluginperformance.wrapPlugin.call(void 0, plugins, inspectOptions) : plugins;
16207
16248
  }
16208
16249
  _chunkJ74QFHKGcjs.__name.call(void 0, vitePluginWeappWorkers, "vitePluginWeappWorkers");
@@ -21824,17 +21865,17 @@ function withTrailingSlash(input = "", respectQueryAndFragment) {
21824
21865
  if (hasTrailingSlash(input, true)) {
21825
21866
  return input || "/";
21826
21867
  }
21827
- let path21 = input;
21868
+ let path23 = input;
21828
21869
  let fragment = "";
21829
21870
  const fragmentIndex = input.indexOf("#");
21830
21871
  if (fragmentIndex >= 0) {
21831
- path21 = input.slice(0, fragmentIndex);
21872
+ path23 = input.slice(0, fragmentIndex);
21832
21873
  fragment = input.slice(fragmentIndex);
21833
- if (!path21) {
21874
+ if (!path23) {
21834
21875
  return fragment;
21835
21876
  }
21836
21877
  }
21837
- const [s0, ...s2] = path21.split("?");
21878
+ const [s0, ...s2] = path23.split("?");
21838
21879
  return s0 + "/" + (s2.length > 0 ? `?${s2.join("?")}` : "") + fragment;
21839
21880
  }
21840
21881
  _chunkJ74QFHKGcjs.__name.call(void 0, withTrailingSlash, "withTrailingSlash");
@@ -21866,8 +21907,8 @@ var _assert = require('assert'); var _assert2 = _interopRequireDefault(_assert);
21866
21907
  var _v8 = require('v8'); var _v82 = _interopRequireDefault(_v8);
21867
21908
 
21868
21909
  var BUILTIN_MODULES = new Set(_module.builtinModules);
21869
- function normalizeSlash(path21) {
21870
- return path21.replace(/\\/g, "/");
21910
+ function normalizeSlash(path23) {
21911
+ return path23.replace(/\\/g, "/");
21871
21912
  }
21872
21913
  _chunkJ74QFHKGcjs.__name.call(void 0, normalizeSlash, "normalizeSlash");
21873
21914
  var own$1 = {}.hasOwnProperty;
@@ -21982,8 +22023,8 @@ codes2.ERR_INVALID_PACKAGE_CONFIG = createError(
21982
22023
  * @param {string} [base]
21983
22024
  * @param {string} [message]
21984
22025
  */
21985
- (path21, base, message) => {
21986
- return `Invalid package config ${path21}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
22026
+ (path23, base, message) => {
22027
+ return `Invalid package config ${path23}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
21987
22028
  },
21988
22029
  Error
21989
22030
  );
@@ -22015,8 +22056,8 @@ codes2.ERR_MODULE_NOT_FOUND = createError(
22015
22056
  * @param {string} base
22016
22057
  * @param {boolean} [exactUrl]
22017
22058
  */
22018
- (path21, base, exactUrl = false) => {
22019
- return `Cannot find ${exactUrl ? "module" : "package"} '${path21}' imported from ${base}`;
22059
+ (path23, base, exactUrl = false) => {
22060
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path23}' imported from ${base}`;
22020
22061
  },
22021
22062
  Error
22022
22063
  );
@@ -22067,8 +22108,8 @@ codes2.ERR_UNKNOWN_FILE_EXTENSION = createError(
22067
22108
  * @param {string} extension
22068
22109
  * @param {string} path
22069
22110
  */
22070
- (extension, path21) => {
22071
- return `Unknown file extension "${extension}" for ${path21}`;
22111
+ (extension, path23) => {
22112
+ return `Unknown file extension "${extension}" for ${path23}`;
22072
22113
  },
22073
22114
  TypeError
22074
22115
  );
@@ -22458,9 +22499,9 @@ Default "index" lookups for the main are deprecated for ES modules.`,
22458
22499
  }
22459
22500
  }
22460
22501
  _chunkJ74QFHKGcjs.__name.call(void 0, emitLegacyIndexDeprecation, "emitLegacyIndexDeprecation");
22461
- function tryStatSync(path21) {
22502
+ function tryStatSync(path23) {
22462
22503
  try {
22463
- return _fs.statSync.call(void 0, path21);
22504
+ return _fs.statSync.call(void 0, path23);
22464
22505
  } catch (e9) {
22465
22506
  }
22466
22507
  }
@@ -23157,7 +23198,7 @@ function _tryModuleResolve(id, url, conditions) {
23157
23198
  try {
23158
23199
  return moduleResolve(id, url, conditions);
23159
23200
  } catch (error) {
23160
- if (!NOT_FOUND_ERRORS.has(_optionalChain([error, 'optionalAccess', _330 => _330.code]))) {
23201
+ if (!NOT_FOUND_ERRORS.has(_optionalChain([error, 'optionalAccess', _339 => _339.code]))) {
23161
23202
  throw error;
23162
23203
  }
23163
23204
  }
@@ -23187,7 +23228,7 @@ function _resolve(id, options = {}) {
23187
23228
  return pathToFileURL(id);
23188
23229
  }
23189
23230
  } catch (error) {
23190
- if (_optionalChain([error, 'optionalAccess', _331 => _331.code]) !== "ENOENT") {
23231
+ if (_optionalChain([error, 'optionalAccess', _340 => _340.code]) !== "ENOENT") {
23191
23232
  throw error;
23192
23233
  }
23193
23234
  }
@@ -23405,7 +23446,7 @@ function findUpSync(name, {
23405
23446
  const filePath = isAbsoluteName ? name : sysPath2.default.join(directory, name);
23406
23447
  try {
23407
23448
  const stats = actualFS.default.statSync(filePath, { throwIfNoEntry: false });
23408
- if (type === "file" && _optionalChain([stats, 'optionalAccess', _332 => _332.isFile, 'call', _333 => _333()]) || type === "directory" && _optionalChain([stats, 'optionalAccess', _334 => _334.isDirectory, 'call', _335 => _335()])) {
23449
+ if (type === "file" && _optionalChain([stats, 'optionalAccess', _341 => _341.isFile, 'call', _342 => _342()]) || type === "directory" && _optionalChain([stats, 'optionalAccess', _343 => _343.isDirectory, 'call', _344 => _344()])) {
23409
23450
  return filePath;
23410
23451
  }
23411
23452
  } catch (e12) {
@@ -23417,7 +23458,7 @@ function findUpSync(name, {
23417
23458
  }
23418
23459
  }
23419
23460
  _chunkJ74QFHKGcjs.__name.call(void 0, findUpSync, "findUpSync");
23420
- function _resolve2(path21, options = {}) {
23461
+ function _resolve2(path23, options = {}) {
23421
23462
  if (options.platform === "auto" || !options.platform)
23422
23463
  options.platform = _process2.default.platform === "win32" ? "win32" : "posix";
23423
23464
  if (_process2.default.versions.pnp) {
@@ -23426,11 +23467,11 @@ function _resolve2(path21, options = {}) {
23426
23467
  paths.push(_process2.default.cwd());
23427
23468
  const targetRequire = _module.createRequire.call(void 0, _chunkJ74QFHKGcjs.importMetaUrl);
23428
23469
  try {
23429
- return targetRequire.resolve(path21, { paths });
23470
+ return targetRequire.resolve(path23, { paths });
23430
23471
  } catch (e13) {
23431
23472
  }
23432
23473
  }
23433
- const modulePath = resolvePathSync(path21, {
23474
+ const modulePath = resolvePathSync(path23, {
23434
23475
  url: options.paths
23435
23476
  });
23436
23477
  if (options.platform === "win32")
@@ -23506,10 +23547,10 @@ var findUp = quansync2({
23506
23547
  async: findUp$1
23507
23548
  });
23508
23549
  var loadPackageJSON = quansync2(function* (cwd = _process2.default.cwd()) {
23509
- const path21 = yield findUp("package.json", { cwd });
23510
- if (!path21 || !actualFS.default.existsSync(path21))
23550
+ const path23 = yield findUp("package.json", { cwd });
23551
+ if (!path23 || !actualFS.default.existsSync(path23))
23511
23552
  return null;
23512
- return JSON.parse(yield readFile(path21));
23553
+ return JSON.parse(yield readFile(path23));
23513
23554
  });
23514
23555
  var loadPackageJSONSync = loadPackageJSON.sync;
23515
23556
  var isPackageListed = quansync2(function* (name, cwd) {
@@ -23633,19 +23674,19 @@ async function detect(options = {}) {
23633
23674
  }
23634
23675
  }
23635
23676
  }
23636
- if (_optionalChain([stopDir, 'optionalCall', _336 => _336(directory)]))
23677
+ if (_optionalChain([stopDir, 'optionalCall', _345 => _345(directory)]))
23637
23678
  break;
23638
23679
  }
23639
23680
  return null;
23640
23681
  }
23641
23682
  _chunkJ74QFHKGcjs.__name.call(void 0, detect, "detect");
23642
23683
  function getNameAndVer(pkg) {
23643
- const handelVer = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (version3) => _nullishCoalesce(_optionalChain([version3, 'optionalAccess', _337 => _337.match, 'call', _338 => _338(/\d+(\.\d+){0,2}/), 'optionalAccess', _339 => _339[0]]), () => ( version3)), "handelVer");
23684
+ const handelVer = /* @__PURE__ */ _chunkJ74QFHKGcjs.__name.call(void 0, (version3) => _nullishCoalesce(_optionalChain([version3, 'optionalAccess', _346 => _346.match, 'call', _347 => _347(/\d+(\.\d+){0,2}/), 'optionalAccess', _348 => _348[0]]), () => ( version3)), "handelVer");
23644
23685
  if (typeof pkg.packageManager === "string") {
23645
23686
  const [name, ver] = pkg.packageManager.replace(/^\^/, "").split("@");
23646
23687
  return { name, ver: handelVer(ver) };
23647
23688
  }
23648
- if (typeof _optionalChain([pkg, 'access', _340 => _340.devEngines, 'optionalAccess', _341 => _341.packageManager, 'optionalAccess', _342 => _342.name]) === "string") {
23689
+ if (typeof _optionalChain([pkg, 'access', _349 => _349.devEngines, 'optionalAccess', _350 => _350.packageManager, 'optionalAccess', _351 => _351.name]) === "string") {
23649
23690
  return {
23650
23691
  name: pkg.devEngines.packageManager.name,
23651
23692
  ver: handelVer(pkg.devEngines.packageManager.version)
@@ -23674,7 +23715,7 @@ async function handlePackageManager(filepath, onUnknown) {
23674
23715
  agent = name;
23675
23716
  return { name, agent, version: version3 };
23676
23717
  } else {
23677
- return _nullishCoalesce(_optionalChain([onUnknown, 'optionalCall', _343 => _343(pkg.packageManager)]), () => ( null));
23718
+ return _nullishCoalesce(_optionalChain([onUnknown, 'optionalCall', _352 => _352(pkg.packageManager)]), () => ( null));
23678
23719
  }
23679
23720
  }
23680
23721
  } catch (e17) {
@@ -23758,8 +23799,8 @@ var ConfigService2 = class {
23758
23799
  command: isDev ? "serve" : "build",
23759
23800
  mode
23760
23801
  }, void 0, cwd);
23761
- const loadedConfig = _optionalChain([loaded, 'optionalAccess', _344 => _344.config]);
23762
- const srcRoot = _nullishCoalesce(_optionalChain([loadedConfig, 'optionalAccess', _345 => _345.weapp, 'optionalAccess', _346 => _346.srcRoot]), () => ( ""));
23802
+ const loadedConfig = _optionalChain([loaded, 'optionalAccess', _353 => _353.config]);
23803
+ const srcRoot = _nullishCoalesce(_optionalChain([loadedConfig, 'optionalAccess', _354 => _354.weapp, 'optionalAccess', _355 => _355.srcRoot]), () => ( ""));
23763
23804
  function relativeSrcRoot(p3) {
23764
23805
  if (srcRoot) {
23765
23806
  return _pathe2.default.relative(srcRoot, p3);
@@ -23788,12 +23829,12 @@ var ConfigService2 = class {
23788
23829
  logLevel: "warn",
23789
23830
  weapp: getWeappViteConfig()
23790
23831
  });
23791
- const platform = _nullishCoalesce(_optionalChain([config, 'access', _347 => _347.weapp, 'optionalAccess', _348 => _348.platform]), () => ( "weapp"));
23832
+ const platform = _nullishCoalesce(_optionalChain([config, 'access', _356 => _356.weapp, 'optionalAccess', _357 => _357.platform]), () => ( "weapp"));
23792
23833
  const outputExtensions = getOutputExtensions(platform);
23793
23834
  config.plugins ??= [];
23794
- _optionalChain([config, 'access', _349 => _349.plugins, 'optionalAccess', _350 => _350.push, 'call', _351 => _351(_viteplugincommonjs2.default.call(void 0, _optionalChain([config, 'access', _352 => _352.weapp, 'optionalAccess', _353 => _353.commonjs])))]);
23795
- _optionalChain([config, 'access', _354 => _354.plugins, 'optionalAccess', _355 => _355.push, 'call', _356 => _356(_vitetsconfigpaths2.default.call(void 0, _optionalChain([config, 'access', _357 => _357.weapp, 'optionalAccess', _358 => _358.tsconfigPaths])))]);
23796
- const aliasEntries = getAliasEntries(_optionalChain([config, 'access', _359 => _359.weapp, 'optionalAccess', _360 => _360.jsonAlias]));
23835
+ _optionalChain([config, 'access', _358 => _358.plugins, 'optionalAccess', _359 => _359.push, 'call', _360 => _360(_viteplugincommonjs2.default.call(void 0, _optionalChain([config, 'access', _361 => _361.weapp, 'optionalAccess', _362 => _362.commonjs])))]);
23836
+ _optionalChain([config, 'access', _363 => _363.plugins, 'optionalAccess', _364 => _364.push, 'call', _365 => _365(_vitetsconfigpaths2.default.call(void 0, _optionalChain([config, 'access', _366 => _366.weapp, 'optionalAccess', _367 => _367.tsconfigPaths])))]);
23837
+ const aliasEntries = getAliasEntries(_optionalChain([config, 'access', _368 => _368.weapp, 'optionalAccess', _369 => _369.jsonAlias]));
23797
23838
  return {
23798
23839
  config,
23799
23840
  aliasEntries,
@@ -24458,7 +24499,7 @@ var JsonService2 = class {
24458
24499
  return resultJson;
24459
24500
  } catch (error) {
24460
24501
  logger_default.error(`\u6B8B\u7834\u7684JSON\u6587\u4EF6: ${filepath}`);
24461
- _optionalChain([debug, 'optionalCall', _361 => _361(error)]);
24502
+ _optionalChain([debug, 'optionalCall', _370 => _370(error)]);
24462
24503
  }
24463
24504
  }
24464
24505
  resolve(entry) {
@@ -24521,14 +24562,14 @@ var NpmService2 = class {
24521
24562
  return !isOutdated && await _fsextra2.default.exists(outDir);
24522
24563
  }
24523
24564
  writeDependenciesCache(subPackage) {
24524
- if (_optionalChain([this, 'access', _362 => _362.configService, 'access', _363 => _363.inlineConfig, 'access', _364 => _364.weapp, 'optionalAccess', _365 => _365.npm, 'optionalAccess', _366 => _366.cache])) {
24525
- return _fsextra2.default.outputJSON(this.getDependenciesCacheFilePath(_optionalChain([subPackage, 'optionalAccess', _367 => _367.root])), {
24565
+ if (_optionalChain([this, 'access', _371 => _371.configService, 'access', _372 => _372.inlineConfig, 'access', _373 => _373.weapp, 'optionalAccess', _374 => _374.npm, 'optionalAccess', _375 => _375.cache])) {
24566
+ return _fsextra2.default.outputJSON(this.getDependenciesCacheFilePath(_optionalChain([subPackage, 'optionalAccess', _376 => _376.root])), {
24526
24567
  hash: this.dependenciesCacheHash
24527
24568
  });
24528
24569
  }
24529
24570
  }
24530
24571
  async readDependenciesCache(subPackage) {
24531
- const cachePath = this.getDependenciesCacheFilePath(_optionalChain([subPackage, 'optionalAccess', _368 => _368.root]));
24572
+ const cachePath = this.getDependenciesCacheFilePath(_optionalChain([subPackage, 'optionalAccess', _377 => _377.root]));
24532
24573
  if (await _fsextra2.default.exists(cachePath)) {
24533
24574
  return await _fsextra2.default.readJson(cachePath, {
24534
24575
  throws: false
@@ -24536,7 +24577,7 @@ var NpmService2 = class {
24536
24577
  }
24537
24578
  }
24538
24579
  async checkDependenciesCacheOutdate(subPackage) {
24539
- if (_optionalChain([this, 'access', _369 => _369.configService, 'access', _370 => _370.inlineConfig, 'access', _371 => _371.weapp, 'optionalAccess', _372 => _372.npm, 'optionalAccess', _373 => _373.cache])) {
24580
+ if (_optionalChain([this, 'access', _378 => _378.configService, 'access', _379 => _379.inlineConfig, 'access', _380 => _380.weapp, 'optionalAccess', _381 => _381.npm, 'optionalAccess', _382 => _382.cache])) {
24540
24581
  const json = await this.readDependenciesCache(subPackage);
24541
24582
  if (_shared.isObject.call(void 0, json)) {
24542
24583
  return this.dependenciesCacheHash !== json.hash;
@@ -24546,7 +24587,7 @@ var NpmService2 = class {
24546
24587
  return true;
24547
24588
  }
24548
24589
  async bundleBuild({ index, name, options, outDir, subPackage }) {
24549
- const builtSet = _nullishCoalesce(this.builtDepSetMap.get(_nullishCoalesce(_optionalChain([subPackage, 'optionalAccess', _374 => _374.root]), () => ( Symbols.NpmMainPackageBuiltDepToken))), () => ( /* @__PURE__ */ new Set()));
24590
+ const builtSet = _nullishCoalesce(this.builtDepSetMap.get(_nullishCoalesce(_optionalChain([subPackage, 'optionalAccess', _383 => _383.root]), () => ( Symbols.NpmMainPackageBuiltDepToken))), () => ( /* @__PURE__ */ new Set()));
24550
24591
  if (builtSet.has(name)) {
24551
24592
  return;
24552
24593
  }
@@ -24591,7 +24632,7 @@ var NpmService2 = class {
24591
24632
  target: "es6",
24592
24633
  external: []
24593
24634
  });
24594
- const resolvedOptions = _optionalChain([this, 'access', _375 => _375.configService, 'access', _376 => _376.weappViteConfig, 'optionalAccess', _377 => _377.npm, 'optionalAccess', _378 => _378.tsup, 'optionalCall', _379 => _379(mergedOptions, {
24635
+ const resolvedOptions = _optionalChain([this, 'access', _384 => _384.configService, 'access', _385 => _385.weappViteConfig, 'optionalAccess', _386 => _386.npm, 'optionalAccess', _387 => _387.tsup, 'optionalCall', _388 => _388(mergedOptions, {
24595
24636
  entry: index,
24596
24637
  name
24597
24638
  })]);
@@ -24607,7 +24648,7 @@ var NpmService2 = class {
24607
24648
  }
24608
24649
  }
24609
24650
  async copyBuild({ from, to, name, subPackage }) {
24610
- const builtSet = _nullishCoalesce(this.builtDepSetMap.get(_nullishCoalesce(_optionalChain([subPackage, 'optionalAccess', _380 => _380.root]), () => ( Symbols.NpmMainPackageBuiltDepToken))), () => ( /* @__PURE__ */ new Set()));
24651
+ const builtSet = _nullishCoalesce(this.builtDepSetMap.get(_nullishCoalesce(_optionalChain([subPackage, 'optionalAccess', _389 => _389.root]), () => ( Symbols.NpmMainPackageBuiltDepToken))), () => ( /* @__PURE__ */ new Set()));
24611
24652
  if (builtSet.has(name)) {
24612
24653
  return;
24613
24654
  }
@@ -24686,7 +24727,7 @@ var NpmService2 = class {
24686
24727
  }
24687
24728
  getPackNpmRelationList() {
24688
24729
  let packNpmRelationList = [];
24689
- if (_optionalChain([this, 'access', _381 => _381.configService, 'access', _382 => _382.projectConfig, 'access', _383 => _383.setting, 'optionalAccess', _384 => _384.packNpmManually]) && Array.isArray(this.configService.projectConfig.setting.packNpmRelationList)) {
24730
+ if (_optionalChain([this, 'access', _390 => _390.configService, 'access', _391 => _391.projectConfig, 'access', _392 => _392.setting, 'optionalAccess', _393 => _393.packNpmManually]) && Array.isArray(this.configService.projectConfig.setting.packNpmRelationList)) {
24690
24731
  packNpmRelationList = this.configService.projectConfig.setting.packNpmRelationList;
24691
24732
  } else {
24692
24733
  packNpmRelationList = [
@@ -24699,13 +24740,13 @@ var NpmService2 = class {
24699
24740
  return packNpmRelationList;
24700
24741
  }
24701
24742
  async build(subPackage, options) {
24702
- if (!_optionalChain([this, 'access', _385 => _385.configService, 'access', _386 => _386.inlineConfig, 'access', _387 => _387.weapp, 'optionalAccess', _388 => _388.npm, 'optionalAccess', _389 => _389.enable])) {
24743
+ if (!_optionalChain([this, 'access', _394 => _394.configService, 'access', _395 => _395.inlineConfig, 'access', _396 => _396.weapp, 'optionalAccess', _397 => _397.npm, 'optionalAccess', _398 => _398.enable])) {
24703
24744
  return;
24704
24745
  }
24705
- _optionalChain([debug, 'optionalCall', _390 => _390("buildNpm start")]);
24746
+ _optionalChain([debug, 'optionalCall', _399 => _399("buildNpm start")]);
24706
24747
  const isDependenciesCacheOutdate = await this.checkDependenciesCacheOutdate(subPackage);
24707
24748
  const packNpmRelationList = this.getPackNpmRelationList();
24708
- const heading = _optionalChain([subPackage, 'optionalAccess', _391 => _391.root]) ? `\u5206\u5305[${subPackage.root}]` : "";
24749
+ const heading = _optionalChain([subPackage, 'optionalAccess', _400 => _400.root]) ? `\u5206\u5305[${subPackage.root}]` : "";
24709
24750
  if (subPackage && subPackage.root) {
24710
24751
  this.builtDepSetMap.set(subPackage.root, /* @__PURE__ */ new Set());
24711
24752
  } else {
@@ -24715,12 +24756,12 @@ var NpmService2 = class {
24715
24756
  const packageJsonPath = _pathe2.default.resolve(this.configService.cwd, relation.packageJsonPath);
24716
24757
  if (await _fsextra2.default.exists(packageJsonPath)) {
24717
24758
  const pkgJson = await _fsextra2.default.readJson(packageJsonPath);
24718
- const outDir = _pathe2.default.resolve(this.configService.cwd, relation.miniprogramNpmDistDir, _nullishCoalesce(_optionalChain([subPackage, 'optionalAccess', _392 => _392.root]), () => ( "")), "miniprogram_npm");
24759
+ const outDir = _pathe2.default.resolve(this.configService.cwd, relation.miniprogramNpmDistDir, _nullishCoalesce(_optionalChain([subPackage, 'optionalAccess', _401 => _401.root]), () => ( "")), "miniprogram_npm");
24719
24760
  if (pkgJson.dependencies) {
24720
24761
  const dependencies = Object.keys(pkgJson.dependencies);
24721
24762
  if (dependencies.length > 0) {
24722
24763
  for (const dep of dependencies) {
24723
- if (Array.isArray(_optionalChain([subPackage, 'optionalAccess', _393 => _393.dependencies]))) {
24764
+ if (Array.isArray(_optionalChain([subPackage, 'optionalAccess', _402 => _402.dependencies]))) {
24724
24765
  if (!regExpTest(subPackage.dependencies, dep)) {
24725
24766
  continue;
24726
24767
  }
@@ -24739,7 +24780,7 @@ var NpmService2 = class {
24739
24780
  }
24740
24781
  }
24741
24782
  await this.writeDependenciesCache(subPackage);
24742
- _optionalChain([debug, 'optionalCall', _394 => _394("buildNpm end")]);
24783
+ _optionalChain([debug, 'optionalCall', _403 => _403("buildNpm end")]);
24743
24784
  }
24744
24785
  };
24745
24786
  NpmService2 = _ts_decorate6([
@@ -24792,17 +24833,17 @@ var ScanService2 = class {
24792
24833
  // https://github.com/vitejs/vite/blob/192d555f88bba7576e8a40cc027e8a11e006079c/packages/vite/src/node/plugins/define.ts#L41
24793
24834
  initPagesSet() {
24794
24835
  const set3 = /* @__PURE__ */ new Set();
24795
- const pages = _optionalChain([this, 'access', _395 => _395.appEntry, 'optionalAccess', _396 => _396.json, 'optionalAccess', _397 => _397.pages]);
24796
- _optionalChain([pages, 'optionalAccess', _398 => _398.forEach, 'call', _399 => _399((x3) => {
24836
+ const pages = _optionalChain([this, 'access', _404 => _404.appEntry, 'optionalAccess', _405 => _405.json, 'optionalAccess', _406 => _406.pages]);
24837
+ _optionalChain([pages, 'optionalAccess', _407 => _407.forEach, 'call', _408 => _408((x3) => {
24797
24838
  set3.add(x3);
24798
24839
  })]);
24799
- _optionalChain([this, 'access', _400 => _400.appEntry, 'optionalAccess', _401 => _401.json, 'optionalAccess', _402 => _402.subPackages, 'optionalAccess', _403 => _403.forEach, 'call', _404 => _404((subPkg) => {
24800
- _optionalChain([subPkg, 'access', _405 => _405.pages, 'optionalAccess', _406 => _406.forEach, 'call', _407 => _407((page) => {
24840
+ _optionalChain([this, 'access', _409 => _409.appEntry, 'optionalAccess', _410 => _410.json, 'optionalAccess', _411 => _411.subPackages, 'optionalAccess', _412 => _412.forEach, 'call', _413 => _413((subPkg) => {
24841
+ _optionalChain([subPkg, 'access', _414 => _414.pages, 'optionalAccess', _415 => _415.forEach, 'call', _416 => _416((page) => {
24801
24842
  set3.add(`${subPkg.root}/${page}`);
24802
24843
  })]);
24803
24844
  })]);
24804
- _optionalChain([this, 'access', _408 => _408.appEntry, 'optionalAccess', _409 => _409.json, 'optionalAccess', _410 => _410.subpackages, 'optionalAccess', _411 => _411.forEach, 'call', _412 => _412((subPkg) => {
24805
- _optionalChain([subPkg, 'access', _413 => _413.pages, 'optionalAccess', _414 => _414.forEach, 'call', _415 => _415((page) => {
24845
+ _optionalChain([this, 'access', _417 => _417.appEntry, 'optionalAccess', _418 => _418.json, 'optionalAccess', _419 => _419.subpackages, 'optionalAccess', _420 => _420.forEach, 'call', _421 => _421((subPkg) => {
24846
+ _optionalChain([subPkg, 'access', _422 => _422.pages, 'optionalAccess', _423 => _423.forEach, 'call', _424 => _424((page) => {
24806
24847
  set3.add(`${subPkg.root}/${page}`);
24807
24848
  })]);
24808
24849
  })]);
@@ -24852,7 +24893,7 @@ var ScanService2 = class {
24852
24893
  }
24853
24894
  loadIndependentSubPackage() {
24854
24895
  const metas = [];
24855
- const json = _optionalChain([this, 'access', _416 => _416.appEntry, 'optionalAccess', _417 => _417.json]);
24896
+ const json = _optionalChain([this, 'access', _425 => _425.appEntry, 'optionalAccess', _426 => _426.json]);
24856
24897
  if (json) {
24857
24898
  for (const subPackage of [
24858
24899
  ..._nullishCoalesce(json.subPackages, () => ( [])),
@@ -24889,7 +24930,7 @@ var ScanService2 = class {
24889
24930
  }
24890
24931
  // https://developers.weixin.qq.com/miniprogram/dev/framework/workers.html
24891
24932
  get workersOptions() {
24892
- return _optionalChain([this, 'access', _418 => _418.appEntry, 'optionalAccess', _419 => _419.json, 'optionalAccess', _420 => _420.workers]);
24933
+ return _optionalChain([this, 'access', _427 => _427.appEntry, 'optionalAccess', _428 => _428.json, 'optionalAccess', _429 => _429.workers]);
24893
24934
  }
24894
24935
  get workersDir() {
24895
24936
  return typeof this.workersOptions === "object" ? this.workersOptions.path : this.workersOptions;
@@ -24936,7 +24977,7 @@ var WatcherService2 = class {
24936
24977
  }
24937
24978
  setRollupWatcher(watcher, root = "/") {
24938
24979
  const oldWatcher = this.getRollupWatcher(root);
24939
- _optionalChain([oldWatcher, 'optionalAccess', _421 => _421.close, 'call', _422 => _422()]);
24980
+ _optionalChain([oldWatcher, 'optionalAccess', _430 => _430.close, 'call', _431 => _431()]);
24940
24981
  this.rollupWatcherMap.set(root, watcher);
24941
24982
  }
24942
24983
  closeAll() {
@@ -34109,7 +34150,7 @@ var WxmlService2 = class {
34109
34150
  analyze(wxml) {
34110
34151
  return scanWxml(wxml, {
34111
34152
  platform: this.configService.platform,
34112
- ..._optionalChain([this, 'access', _423 => _423.configService, 'access', _424 => _424.weappViteConfig, 'optionalAccess', _425 => _425.enhance, 'optionalAccess', _426 => _426.wxml]) === true ? {} : _optionalChain([this, 'access', _427 => _427.configService, 'access', _428 => _428.weappViteConfig, 'optionalAccess', _429 => _429.enhance, 'optionalAccess', _430 => _430.wxml])
34153
+ ..._optionalChain([this, 'access', _432 => _432.configService, 'access', _433 => _433.weappViteConfig, 'optionalAccess', _434 => _434.enhance, 'optionalAccess', _435 => _435.wxml]) === true ? {} : _optionalChain([this, 'access', _436 => _436.configService, 'access', _437 => _437.weappViteConfig, 'optionalAccess', _438 => _438.enhance, 'optionalAccess', _439 => _439.wxml])
34113
34154
  });
34114
34155
  }
34115
34156
  async scan(filepath) {