@rspack-debug/browser 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14616,9 +14616,9 @@ __webpack_require__.add({
14616
14616
  }
14617
14617
  utils.intFromLE = intFromLE;
14618
14618
  },
14619
- "../../node_modules/.pnpm/enhanced-resolve@5.20.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
14619
+ "../../node_modules/.pnpm/enhanced-resolve@5.21.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
14620
14620
  var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
14621
- const { nextTick } = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.20.1/node_modules/enhanced-resolve/lib/util/process-browser.js");
14621
+ const { nextTick } = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.0/node_modules/enhanced-resolve/lib/util/process-browser.js");
14622
14622
  const dirname = (path)=>{
14623
14623
  let idx = path.length - 1;
14624
14624
  while(idx >= 0){
@@ -14685,7 +14685,7 @@ __webpack_require__.add({
14685
14685
  this._data = new Map();
14686
14686
  this._levels = [];
14687
14687
  for(let i = 0; i < 10; i++)this._levels.push(new Set());
14688
- for(let i = 5000; i < duration; i += 500)this._levels.push(new Set());
14688
+ if (duration !== 1 / 0) for(let i = 5000; i < duration; i += 500)this._levels.push(new Set());
14689
14689
  this._currentLevel = 0;
14690
14690
  this._tickInterval = Math.floor(duration / this._levels.length);
14691
14691
  this._mode = STORAGE_MODE_IDLE;
@@ -14823,6 +14823,7 @@ __webpack_require__.add({
14823
14823
  break;
14824
14824
  }
14825
14825
  this._mode = STORAGE_MODE_ASYNC;
14826
+ if (this._duration === 1 / 0) return;
14826
14827
  const ref = setTimeout(()=>{
14827
14828
  this._mode = STORAGE_MODE_SYNC;
14828
14829
  this._runDecays();
@@ -14912,7 +14913,7 @@ __webpack_require__.add({
14912
14913
  }
14913
14914
  };
14914
14915
  },
14915
- "../../node_modules/.pnpm/enhanced-resolve@5.20.1/node_modules/enhanced-resolve/lib/util/process-browser.js" (module) {
14916
+ "../../node_modules/.pnpm/enhanced-resolve@5.21.0/node_modules/enhanced-resolve/lib/util/process-browser.js" (module) {
14916
14917
  module.exports = {
14917
14918
  versions: {},
14918
14919
  nextTick (fn) {
@@ -32021,18 +32022,18 @@ __webpack_require__.add({
32021
32022
  return copy;
32022
32023
  };
32023
32024
  },
32024
- "../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/DirectoryWatcher.js" (module, __unused_rspack_exports, __webpack_require__) {
32025
+ "../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/DirectoryWatcher.js" (module, __unused_rspack_exports, __webpack_require__) {
32025
32026
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
32026
- const EventEmitter = __webpack_require__("../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js").EventEmitter;
32027
- const fs = __webpack_require__("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js");
32027
+ const { EventEmitter } = __webpack_require__("../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js");
32028
32028
  const path = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
32029
- const watchEventSource = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/watchEventSource.js");
32029
+ const fs = __webpack_require__("../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js");
32030
+ const watchEventSource = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/watchEventSource.js");
32030
32031
  const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({});
32031
32032
  let FS_ACCURACY = 2000;
32032
32033
  const IS_OSX = "darwin" === __webpack_require__("../../node_modules/.pnpm/os-browserify@0.3.0/node_modules/os-browserify/browser.js").iD();
32033
32034
  const IS_WIN = "win32" === __webpack_require__("../../node_modules/.pnpm/os-browserify@0.3.0/node_modules/os-browserify/browser.js").iD();
32034
- const WATCHPACK_POLLING = process.env.WATCHPACK_POLLING;
32035
- const FORCE_POLLING = `${+WATCHPACK_POLLING}` === WATCHPACK_POLLING ? +WATCHPACK_POLLING : !!WATCHPACK_POLLING && "false" !== WATCHPACK_POLLING;
32035
+ const { WATCHPACK_POLLING } = process.env;
32036
+ const FORCE_POLLING = `${+WATCHPACK_POLLING}` === WATCHPACK_POLLING ? +WATCHPACK_POLLING : Boolean(WATCHPACK_POLLING) && "false" !== WATCHPACK_POLLING;
32036
32037
  function withoutCase(str) {
32037
32038
  return str.toLowerCase();
32038
32039
  }
@@ -32041,15 +32042,28 @@ __webpack_require__.add({
32041
32042
  if (0 === --times) return callback();
32042
32043
  };
32043
32044
  }
32045
+ function fixupEntryAccuracy(entry) {
32046
+ if (entry.accuracy > FS_ACCURACY) {
32047
+ entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY;
32048
+ entry.accuracy = FS_ACCURACY;
32049
+ }
32050
+ }
32051
+ function ensureFsAccuracy(mtime) {
32052
+ if (!mtime) return;
32053
+ if (FS_ACCURACY > 1 && mtime % 1 !== 0) FS_ACCURACY = 1;
32054
+ else if (FS_ACCURACY > 10 && mtime % 10 !== 0) FS_ACCURACY = 10;
32055
+ else if (FS_ACCURACY > 100 && mtime % 100 !== 0) FS_ACCURACY = 100;
32056
+ else if (FS_ACCURACY > 1000 && mtime % 1000 !== 0) FS_ACCURACY = 1000;
32057
+ }
32044
32058
  class Watcher extends EventEmitter {
32045
- constructor(directoryWatcher, filePath, startTime){
32059
+ constructor(directoryWatcher, target, startTime){
32046
32060
  super();
32047
32061
  this.directoryWatcher = directoryWatcher;
32048
- this.path = filePath;
32062
+ this.path = target;
32049
32063
  this.startTime = startTime && +startTime;
32050
32064
  }
32051
32065
  checkStartTime(mtime, initial) {
32052
- const startTime = this.startTime;
32066
+ const { startTime } = this;
32053
32067
  if ("number" != typeof startTime) return !initial;
32054
32068
  return startTime <= mtime;
32055
32069
  }
@@ -32058,7 +32072,7 @@ __webpack_require__.add({
32058
32072
  }
32059
32073
  }
32060
32074
  class DirectoryWatcher extends EventEmitter {
32061
- constructor(watcherManager, directoryPath, options){
32075
+ constructor(watcherManager, directoryPath, options = {}){
32062
32076
  super();
32063
32077
  if (FORCE_POLLING) options.poll = FORCE_POLLING;
32064
32078
  this.watcherManager = watcherManager;
@@ -32131,11 +32145,12 @@ __webpack_require__.add({
32131
32145
  if (!initial) this.forEachWatcher(this.path, (w)=>w.emit("change", itemPath, null, type, initial));
32132
32146
  }
32133
32147
  }
32134
- setFileTime(filePath, mtime, initial, ignoreWhenEqual, type) {
32148
+ setFileTime(target, mtime, initial, ignoreWhenEqual, type) {
32135
32149
  const now = Date.now();
32136
- if (this.ignored(filePath)) return;
32137
- const old = this.files.get(filePath);
32138
- let safeTime, accuracy;
32150
+ if (this.ignored(target)) return;
32151
+ const old = this.files.get(target);
32152
+ let safeTime;
32153
+ let accuracy;
32139
32154
  if (initial) {
32140
32155
  safeTime = Math.min(now, mtime) + FS_ACCURACY;
32141
32156
  accuracy = FS_ACCURACY;
@@ -32145,24 +32160,24 @@ __webpack_require__.add({
32145
32160
  if (old && old.timestamp === mtime && mtime + FS_ACCURACY < now) return;
32146
32161
  }
32147
32162
  if (ignoreWhenEqual && old && old.timestamp === mtime) return;
32148
- this.files.set(filePath, {
32163
+ this.files.set(target, {
32149
32164
  safeTime,
32150
32165
  accuracy,
32151
32166
  timestamp: mtime
32152
32167
  });
32153
32168
  if (old) {
32154
- if (!initial) this.forEachWatcher(filePath, (w)=>w.emit("change", mtime, type));
32169
+ if (!initial) this.forEachWatcher(target, (w)=>w.emit("change", mtime, type));
32155
32170
  } else {
32156
- const key = withoutCase(filePath);
32171
+ const key = withoutCase(target);
32157
32172
  const count = this.filesWithoutCase.get(key);
32158
32173
  this.filesWithoutCase.set(key, (count || 0) + 1);
32159
32174
  if (void 0 !== count) this.doScan(false);
32160
- this.forEachWatcher(filePath, (w)=>{
32175
+ this.forEachWatcher(target, (w)=>{
32161
32176
  if (!initial || w.checkStartTime(safeTime, initial)) w.emit("change", mtime, type);
32162
32177
  });
32163
32178
  }
32164
32179
  this.forEachWatcher(this.path, (w)=>{
32165
- if (!initial || w.checkStartTime(safeTime, initial)) w.emit("change", filePath, safeTime, type, initial);
32180
+ if (!initial || w.checkStartTime(safeTime, initial)) w.emit("change", target, safeTime, type, initial);
32166
32181
  });
32167
32182
  }
32168
32183
  setDirectory(directoryPath, birthtime, initial, type) {
@@ -32175,8 +32190,7 @@ __webpack_require__.add({
32175
32190
  const now = Date.now();
32176
32191
  if (this.nestedWatching) this.createNestedWatcher(directoryPath);
32177
32192
  else this.directories.set(directoryPath, true);
32178
- let safeTime;
32179
- safeTime = initial ? Math.min(now, birthtime) + FS_ACCURACY : now;
32193
+ const safeTime = initial ? Math.min(now, birthtime) + FS_ACCURACY : now;
32180
32194
  this.forEachWatcher(directoryPath, (w)=>{
32181
32195
  if (!initial || w.checkStartTime(safeTime, false)) w.emit("change", birthtime, type);
32182
32196
  });
@@ -32188,16 +32202,16 @@ __webpack_require__.add({
32188
32202
  }
32189
32203
  createNestedWatcher(directoryPath) {
32190
32204
  const watcher = this.watcherManager.watchDirectory(directoryPath, 1);
32191
- watcher.on("change", (filePath, mtime, type, initial)=>{
32205
+ watcher.on("change", (target, mtime, type, initial)=>{
32192
32206
  this.forEachWatcher(this.path, (w)=>{
32193
- if (!initial || w.checkStartTime(mtime, initial)) w.emit("change", filePath, mtime, type, initial);
32207
+ if (!initial || w.checkStartTime(mtime, initial)) w.emit("change", target, mtime, type, initial);
32194
32208
  });
32195
32209
  });
32196
32210
  this.directories.set(directoryPath, watcher);
32197
32211
  }
32198
32212
  setNestedWatching(flag) {
32199
- if (!!flag !== this.nestedWatching) {
32200
- this.nestedWatching = !!flag;
32213
+ if (this.nestedWatching !== Boolean(flag)) {
32214
+ this.nestedWatching = Boolean(flag);
32201
32215
  if (this.nestedWatching) for (const directory of this.directories.keys())this.createNestedWatcher(directory);
32202
32216
  else for (const [directory, watcher] of this.directories){
32203
32217
  watcher.close();
@@ -32205,26 +32219,26 @@ __webpack_require__.add({
32205
32219
  }
32206
32220
  }
32207
32221
  }
32208
- watch(filePath, startTime) {
32209
- const key = withoutCase(filePath);
32222
+ watch(target, startTime) {
32223
+ const key = withoutCase(target);
32210
32224
  let watchers = this.watchers.get(key);
32211
32225
  if (void 0 === watchers) {
32212
32226
  watchers = new Set();
32213
32227
  this.watchers.set(key, watchers);
32214
32228
  }
32215
32229
  this.refs++;
32216
- const watcher = new Watcher(this, filePath, startTime);
32230
+ const watcher = new Watcher(this, target, startTime);
32217
32231
  watcher.on("closed", ()=>{
32218
32232
  if (--this.refs <= 0) return void this.close();
32219
32233
  watchers.delete(watcher);
32220
32234
  if (0 === watchers.size) {
32221
32235
  this.watchers.delete(key);
32222
- if (this.path === filePath) this.setNestedWatching(false);
32236
+ if (this.path === target) this.setNestedWatching(false);
32223
32237
  }
32224
32238
  });
32225
32239
  watchers.add(watcher);
32226
32240
  let safeTime;
32227
- if (filePath === this.path) {
32241
+ if (target === this.path) {
32228
32242
  this.setNestedWatching(true);
32229
32243
  safeTime = this.lastWatchEvent;
32230
32244
  for (const entry of this.files.values()){
@@ -32232,24 +32246,24 @@ __webpack_require__.add({
32232
32246
  safeTime = Math.max(safeTime, entry.safeTime);
32233
32247
  }
32234
32248
  } else {
32235
- const entry = this.files.get(filePath);
32249
+ const entry = this.files.get(target);
32236
32250
  if (entry) {
32237
32251
  fixupEntryAccuracy(entry);
32238
32252
  safeTime = entry.safeTime;
32239
32253
  } else safeTime = 0;
32240
32254
  }
32241
32255
  if (safeTime) {
32242
- if (safeTime >= startTime) process.nextTick(()=>{
32256
+ if (startTime && safeTime >= startTime) process.nextTick(()=>{
32243
32257
  if (this.closed) return;
32244
- if (filePath === this.path) watcher.emit("change", filePath, safeTime, "watch (outdated on attach)", true);
32258
+ if (target === this.path) watcher.emit("change", target, safeTime, "watch (outdated on attach)", true);
32245
32259
  else watcher.emit("change", safeTime, "watch (outdated on attach)", true);
32246
32260
  });
32247
32261
  } else if (this.initialScan) {
32248
- if (this.initialScanRemoved.has(filePath)) process.nextTick(()=>{
32262
+ if (this.initialScanRemoved.has(target)) process.nextTick(()=>{
32249
32263
  if (this.closed) return;
32250
32264
  watcher.emit("remove");
32251
32265
  });
32252
- } else if (filePath !== this.path && !this.directories.has(filePath) && watcher.checkStartTime(this.initialScanFinished, false)) process.nextTick(()=>{
32266
+ } else if (target !== this.path && !this.directories.has(target) && watcher.checkStartTime(this.initialScanFinished, false)) process.nextTick(()=>{
32253
32267
  if (this.closed) return;
32254
32268
  watcher.emit("initial-missing", "watch (missing on attach)");
32255
32269
  });
@@ -32258,31 +32272,29 @@ __webpack_require__.add({
32258
32272
  onWatchEvent(eventType, filename) {
32259
32273
  if (this.closed) return;
32260
32274
  if (!filename) return void this.doScan(false);
32261
- const filePath = path.join(this.path, filename);
32262
- if (this.ignored(filePath)) return;
32275
+ const target = path.join(this.path, filename);
32276
+ if (this.ignored(target)) return;
32263
32277
  if (void 0 === this._activeEvents.get(filename)) {
32264
32278
  this._activeEvents.set(filename, false);
32265
32279
  const checkStats = ()=>{
32266
32280
  if (this.closed) return;
32267
32281
  this._activeEvents.set(filename, false);
32268
- fs.lstat(filePath, (err, stats)=>{
32282
+ fs.lstat(target, (err, stats)=>{
32269
32283
  if (this.closed) return;
32270
32284
  if (true === this._activeEvents.get(filename)) return void process.nextTick(checkStats);
32271
32285
  this._activeEvents.delete(filename);
32272
32286
  if (err) {
32273
32287
  if ("ENOENT" !== err.code && "EPERM" !== err.code && "EBUSY" !== err.code) this.onStatsError(err);
32274
- else if (filename === path.basename(this.path)) {
32275
- if (!fs.existsSync(this.path)) this.onDirectoryRemoved("stat failed");
32276
- }
32288
+ else if (filename === path.basename(this.path) && !fs.existsSync(this.path)) this.onDirectoryRemoved("stat failed");
32277
32289
  }
32278
32290
  this.lastWatchEvent = Date.now();
32279
32291
  if (stats) {
32280
- if (stats.isDirectory()) this.setDirectory(filePath, +stats.birthtime || 1, false, eventType);
32292
+ if (stats.isDirectory()) this.setDirectory(target, +stats.birthtime || 1, false, eventType);
32281
32293
  else if (stats.isFile() || stats.isSymbolicLink()) {
32282
- if (stats.mtime) ensureFsAccuracy(stats.mtime);
32283
- this.setFileTime(filePath, +stats.mtime || +stats.ctime || 1, false, false, eventType);
32294
+ if (stats.mtime) ensureFsAccuracy(+stats.mtime);
32295
+ this.setFileTime(target, +stats.mtime || +stats.ctime || 1, false, false, eventType);
32284
32296
  }
32285
- } else this.setMissing(filePath, false, eventType);
32297
+ } else this.setMissing(target, false, eventType);
32286
32298
  });
32287
32299
  };
32288
32300
  process.nextTick(checkStats);
@@ -32291,15 +32303,15 @@ __webpack_require__.add({
32291
32303
  onWatcherError(err) {
32292
32304
  if (this.closed) return;
32293
32305
  if (err) {
32294
- if ("EPERM" !== err.code && "ENOENT" !== err.code) console.error("Watchpack Error (watcher): " + err);
32306
+ if ("EPERM" !== err.code && "ENOENT" !== err.code) console.error(`Watchpack Error (watcher): ${err}`);
32295
32307
  this.onDirectoryRemoved("watch error");
32296
32308
  }
32297
32309
  }
32298
32310
  onStatsError(err) {
32299
- if (err) console.error("Watchpack Error (stats): " + err);
32311
+ if (err) console.error(`Watchpack Error (stats): ${err}`);
32300
32312
  }
32301
32313
  onScanError(err) {
32302
- if (err) console.error("Watchpack Error (initial scan): " + err);
32314
+ if (err) console.error(`Watchpack Error (initial scan): ${err}`);
32303
32315
  this.onScanFinished();
32304
32316
  }
32305
32317
  onScanFinished() {
@@ -32315,8 +32327,8 @@ __webpack_require__.add({
32315
32327
  }
32316
32328
  this.watchInParentDirectory();
32317
32329
  const type = `directory-removed (${reason})`;
32318
- for (const directory of this.directories.keys())this.setMissing(directory, null, type);
32319
- for (const file of this.files.keys())this.setMissing(file, null, type);
32330
+ for (const directory of this.directories.keys())this.setMissing(directory, false, type);
32331
+ for (const file of this.files.keys())this.setMissing(file, false, type);
32320
32332
  }
32321
32333
  watchInParentDirectory() {
32322
32334
  if (!this.parentWatcher) {
@@ -32403,17 +32415,15 @@ __webpack_require__.add({
32403
32415
  for (const itemPath of itemPaths)fs.lstat(itemPath, (err2, stats)=>{
32404
32416
  if (this.closed) return;
32405
32417
  if (err2) {
32406
- if ("ENOENT" === err2.code || "EPERM" === err2.code || "EACCES" === err2.code || "EBUSY" === err2.code || "EINVAL" === err2.code && IS_WIN) this.setMissing(itemPath, initial, "scan (" + err2.code + ")");
32418
+ if ("ENOENT" === err2.code || "EPERM" === err2.code || "EACCES" === err2.code || "EBUSY" === err2.code || "EINVAL" === err2.code && IS_WIN) this.setMissing(itemPath, initial, `scan (${err2.code})`);
32407
32419
  else this.onScanError(err2);
32408
32420
  itemFinished();
32409
32421
  return;
32410
32422
  }
32411
32423
  if (stats.isFile() || stats.isSymbolicLink()) {
32412
- if (stats.mtime) ensureFsAccuracy(stats.mtime);
32424
+ if (stats.mtime) ensureFsAccuracy(+stats.mtime);
32413
32425
  this.setFileTime(itemPath, +stats.mtime || +stats.ctime || 1, initial, true, "scan (file)");
32414
- } else if (stats.isDirectory()) {
32415
- if (!initial || !this.directories.has(itemPath)) this.setDirectory(itemPath, +stats.birthtime || 1, initial, "scan (dir)");
32416
- }
32426
+ } else if (stats.isDirectory() && (!initial || !this.directories.has(itemPath))) this.setDirectory(itemPath, +stats.birthtime || 1, initial, "scan (dir)");
32417
32427
  itemFinished();
32418
32428
  });
32419
32429
  itemFinished();
@@ -32440,7 +32450,7 @@ __webpack_require__.add({
32440
32450
  obj[this.path] = safeTime;
32441
32451
  }
32442
32452
  if (!this.initialScan) for (const watchers of this.watchers.values())for (const watcher of watchers){
32443
- const path = watcher.path;
32453
+ const { path } = watcher;
32444
32454
  if (!Object.prototype.hasOwnProperty.call(obj, path)) obj[path] = null;
32445
32455
  }
32446
32456
  return obj;
@@ -32467,7 +32477,7 @@ __webpack_require__.add({
32467
32477
  directoryTimestamps.set(this.path, EXISTANCE_ONLY_TIME_ENTRY);
32468
32478
  }
32469
32479
  if (!this.initialScan) for (const watchers of this.watchers.values())for (const watcher of watchers){
32470
- const path = watcher.path;
32480
+ const { path } = watcher;
32471
32481
  if (!fileTimestamps.has(path)) fileTimestamps.set(path, null);
32472
32482
  }
32473
32483
  return safeTime;
@@ -32492,21 +32502,9 @@ __webpack_require__.add({
32492
32502
  }
32493
32503
  module.exports = DirectoryWatcher;
32494
32504
  module.exports.EXISTANCE_ONLY_TIME_ENTRY = EXISTANCE_ONLY_TIME_ENTRY;
32495
- function fixupEntryAccuracy(entry) {
32496
- if (entry.accuracy > FS_ACCURACY) {
32497
- entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY;
32498
- entry.accuracy = FS_ACCURACY;
32499
- }
32500
- }
32501
- function ensureFsAccuracy(mtime) {
32502
- if (!mtime) return;
32503
- if (FS_ACCURACY > 1 && mtime % 1 !== 0) FS_ACCURACY = 1;
32504
- else if (FS_ACCURACY > 10 && mtime % 10 !== 0) FS_ACCURACY = 10;
32505
- else if (FS_ACCURACY > 100 && mtime % 100 !== 0) FS_ACCURACY = 100;
32506
- else if (FS_ACCURACY > 1000 && mtime % 1000 !== 0) FS_ACCURACY = 1000;
32507
- }
32505
+ module.exports.Watcher = Watcher;
32508
32506
  },
32509
- "../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/LinkResolver.js" (module, __unused_rspack_exports, __webpack_require__) {
32507
+ "../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/LinkResolver.js" (module, __unused_rspack_exports, __webpack_require__) {
32510
32508
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
32511
32509
  const fs = __webpack_require__("./src/browser/fs.ts");
32512
32510
  const path = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
@@ -32545,14 +32543,20 @@ __webpack_require__.add({
32545
32543
  const resultSet = new Set(linkResolved);
32546
32544
  resultSet.add(realFile);
32547
32545
  for(let i = 1; i < parentResolved.length; i++)resultSet.add(parentResolved[i]);
32548
- result = Object.freeze(Array.from(resultSet));
32546
+ result = Object.freeze([
32547
+ ...resultSet
32548
+ ]);
32549
32549
  } else if (parentResolved.length > 1) {
32550
- result = parentResolved.slice();
32550
+ result = [
32551
+ ...parentResolved
32552
+ ];
32551
32553
  result[0] = linkResolved[0];
32552
32554
  result.push(realFile);
32553
32555
  Object.freeze(result);
32554
32556
  } else if (linkResolved.length > 1) {
32555
- result = linkResolved.slice();
32557
+ result = [
32558
+ ...linkResolved
32559
+ ];
32556
32560
  result.push(realFile);
32557
32561
  Object.freeze(result);
32558
32562
  } else result = Object.freeze([
@@ -32561,9 +32565,11 @@ __webpack_require__.add({
32561
32565
  ]);
32562
32566
  this.cache.set(file, result);
32563
32567
  return result;
32564
- } catch (e) {
32565
- if (!EXPECTED_ERRORS.has(e.code)) throw e;
32566
- const result = parentResolved.slice();
32568
+ } catch (err) {
32569
+ if (err.code && !EXPECTED_ERRORS.has(err.code)) throw err;
32570
+ const result = [
32571
+ ...parentResolved
32572
+ ];
32567
32573
  result[0] = realFile;
32568
32574
  Object.freeze(result);
32569
32575
  this.cache.set(file, result);
@@ -32573,11 +32579,11 @@ __webpack_require__.add({
32573
32579
  }
32574
32580
  module.exports = LinkResolver;
32575
32581
  },
32576
- "../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/getWatcherManager.js" (module, __unused_rspack_exports, __webpack_require__) {
32582
+ "../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/getWatcherManager.js" (module, __unused_rspack_exports, __webpack_require__) {
32577
32583
  const path = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
32578
- const DirectoryWatcher = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/DirectoryWatcher.js");
32584
+ const DirectoryWatcher = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/DirectoryWatcher.js");
32579
32585
  class WatcherManager {
32580
- constructor(options){
32586
+ constructor(options = {}){
32581
32587
  this.options = options;
32582
32588
  this.directoryWatchers = new Map();
32583
32589
  }
@@ -32593,10 +32599,10 @@ __webpack_require__.add({
32593
32599
  }
32594
32600
  return watcher;
32595
32601
  }
32596
- watchFile(p, startTime) {
32597
- const directory = path.dirname(p);
32598
- if (directory === p) return null;
32599
- return this.getDirectoryWatcher(directory).watch(p, startTime);
32602
+ watchFile(file, startTime) {
32603
+ const directory = path.dirname(file);
32604
+ if (directory === file) return null;
32605
+ return this.getDirectoryWatcher(directory).watch(file, startTime);
32600
32606
  }
32601
32607
  watchDirectory(directory, startTime) {
32602
32608
  return this.getDirectoryWatcher(directory).watch(directory, startTime);
@@ -32612,12 +32618,300 @@ __webpack_require__.add({
32612
32618
  };
32613
32619
  module.exports.WatcherManager = WatcherManager;
32614
32620
  },
32615
- "../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/reducePlan.js" (module, __unused_rspack_exports, __webpack_require__) {
32621
+ "../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/index.js" (module, __unused_rspack_exports, __webpack_require__) {
32622
+ const { EventEmitter } = __webpack_require__("../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js");
32623
+ const globToRegExp = __webpack_require__("../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js");
32624
+ const LinkResolver = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/LinkResolver.js");
32625
+ const getWatcherManager = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/getWatcherManager.js");
32626
+ const watchEventSource = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/watchEventSource.js");
32627
+ function addWatchersToSet(watchers, set) {
32628
+ for (const ww of watchers){
32629
+ const w = ww.watcher;
32630
+ if (!set.has(w.directoryWatcher)) set.add(w.directoryWatcher);
32631
+ }
32632
+ }
32633
+ const stringToRegexp = (ignored)=>{
32634
+ if (0 === ignored.length) return;
32635
+ const { source } = globToRegExp(ignored, {
32636
+ globstar: true,
32637
+ extended: true
32638
+ });
32639
+ return `${source.slice(0, -1)}(?:$|\\/)`;
32640
+ };
32641
+ const ignoredToFunction = (ignored)=>{
32642
+ if (Array.isArray(ignored)) {
32643
+ const stringRegexps = ignored.map((i)=>stringToRegexp(i)).filter(Boolean);
32644
+ if (0 === stringRegexps.length) return ()=>false;
32645
+ const regexp = new RegExp(stringRegexps.join("|"));
32646
+ return (item)=>regexp.test(item.replace(/\\/g, "/"));
32647
+ }
32648
+ if ("string" == typeof ignored) {
32649
+ const stringRegexp = stringToRegexp(ignored);
32650
+ if (!stringRegexp) return ()=>false;
32651
+ const regexp = new RegExp(stringRegexp);
32652
+ return (item)=>regexp.test(item.replace(/\\/g, "/"));
32653
+ }
32654
+ if (ignored instanceof RegExp) return (item)=>ignored.test(item.replace(/\\/g, "/"));
32655
+ if ("function" == typeof ignored) return ignored;
32656
+ if (!ignored) return ()=>false;
32657
+ else throw new Error(`Invalid option for 'ignored': ${ignored}`);
32658
+ };
32659
+ const normalizeOptions = (options)=>({
32660
+ followSymlinks: Boolean(options.followSymlinks),
32661
+ ignored: ignoredToFunction(options.ignored),
32662
+ poll: options.poll
32663
+ });
32664
+ const normalizeCache = new WeakMap();
32665
+ const cachedNormalizeOptions = (options)=>{
32666
+ const cacheEntry = normalizeCache.get(options);
32667
+ if (void 0 !== cacheEntry) return cacheEntry;
32668
+ const normalized = normalizeOptions(options);
32669
+ normalizeCache.set(options, normalized);
32670
+ return normalized;
32671
+ };
32672
+ class WatchpackFileWatcher {
32673
+ constructor(watchpack, watcher, files){
32674
+ this.files = Array.isArray(files) ? files : [
32675
+ files
32676
+ ];
32677
+ this.watcher = watcher;
32678
+ watcher.on("initial-missing", (type)=>{
32679
+ for (const file of this.files)if (!watchpack._missing.has(file)) watchpack._onRemove(file, file, type);
32680
+ });
32681
+ watcher.on("change", (mtime, type, _initial)=>{
32682
+ for (const file of this.files)watchpack._onChange(file, mtime, file, type);
32683
+ });
32684
+ watcher.on("remove", (type)=>{
32685
+ for (const file of this.files)watchpack._onRemove(file, file, type);
32686
+ });
32687
+ }
32688
+ update(files) {
32689
+ if (Array.isArray(files)) this.files = files;
32690
+ else if (1 !== this.files.length) this.files = [
32691
+ files
32692
+ ];
32693
+ else if (this.files[0] !== files) this.files[0] = files;
32694
+ }
32695
+ close() {
32696
+ this.watcher.close();
32697
+ }
32698
+ }
32699
+ class WatchpackDirectoryWatcher {
32700
+ constructor(watchpack, watcher, directories){
32701
+ this.directories = Array.isArray(directories) ? directories : [
32702
+ directories
32703
+ ];
32704
+ this.watcher = watcher;
32705
+ watcher.on("initial-missing", (type)=>{
32706
+ for (const item of this.directories)watchpack._onRemove(item, item, type);
32707
+ });
32708
+ watcher.on("change", (file, mtime, type, _initial)=>{
32709
+ for (const item of this.directories)watchpack._onChange(item, mtime, file, type);
32710
+ });
32711
+ watcher.on("remove", (type)=>{
32712
+ for (const item of this.directories)watchpack._onRemove(item, item, type);
32713
+ });
32714
+ }
32715
+ update(directories) {
32716
+ if (Array.isArray(directories)) this.directories = directories;
32717
+ else if (1 !== this.directories.length) this.directories = [
32718
+ directories
32719
+ ];
32720
+ else if (this.directories[0] !== directories) this.directories[0] = directories;
32721
+ }
32722
+ close() {
32723
+ this.watcher.close();
32724
+ }
32725
+ }
32726
+ class Watchpack extends EventEmitter {
32727
+ constructor(options = {}){
32728
+ super();
32729
+ if (!options) options = {};
32730
+ this.options = options;
32731
+ this.aggregateTimeout = "number" == typeof options.aggregateTimeout ? options.aggregateTimeout : 200;
32732
+ this.watcherOptions = cachedNormalizeOptions(options);
32733
+ this.watcherManager = getWatcherManager(this.watcherOptions);
32734
+ this.fileWatchers = new Map();
32735
+ this.directoryWatchers = new Map();
32736
+ this._missing = new Set();
32737
+ this.startTime = void 0;
32738
+ this.paused = false;
32739
+ this.aggregatedChanges = new Set();
32740
+ this.aggregatedRemovals = new Set();
32741
+ this.aggregateTimer = void 0;
32742
+ this._onTimeout = this._onTimeout.bind(this);
32743
+ }
32744
+ watch(arg1, arg2, arg3) {
32745
+ let files;
32746
+ let directories;
32747
+ let missing;
32748
+ let startTime;
32749
+ if (arg2) {
32750
+ files = arg1;
32751
+ directories = arg2;
32752
+ missing = [];
32753
+ startTime = arg3;
32754
+ } else ({ files = [], directories = [], missing = [], startTime } = arg1);
32755
+ this.paused = false;
32756
+ const { fileWatchers, directoryWatchers } = this;
32757
+ const { ignored } = this.watcherOptions;
32758
+ const filter = (path)=>!ignored(path);
32759
+ const addToMap = (map, key, item)=>{
32760
+ const list = map.get(key);
32761
+ if (void 0 === list) map.set(key, item);
32762
+ else if (Array.isArray(list)) list.push(item);
32763
+ else map.set(key, [
32764
+ list,
32765
+ item
32766
+ ]);
32767
+ };
32768
+ const fileWatchersNeeded = new Map();
32769
+ const directoryWatchersNeeded = new Map();
32770
+ const missingFiles = new Set();
32771
+ if (this.watcherOptions.followSymlinks) {
32772
+ const resolver = new LinkResolver();
32773
+ for (const file of files)if (filter(file)) {
32774
+ for (const innerFile of resolver.resolve(file))if (file === innerFile || filter(innerFile)) addToMap(fileWatchersNeeded, innerFile, file);
32775
+ }
32776
+ for (const file of missing)if (filter(file)) {
32777
+ for (const innerFile of resolver.resolve(file))if (file === innerFile || filter(innerFile)) {
32778
+ missingFiles.add(file);
32779
+ addToMap(fileWatchersNeeded, innerFile, file);
32780
+ }
32781
+ }
32782
+ for (const dir of directories)if (filter(dir)) {
32783
+ let first = true;
32784
+ for (const innerItem of resolver.resolve(dir)){
32785
+ if (filter(innerItem)) addToMap(first ? directoryWatchersNeeded : fileWatchersNeeded, innerItem, dir);
32786
+ first = false;
32787
+ }
32788
+ }
32789
+ } else {
32790
+ for (const file of files)if (filter(file)) addToMap(fileWatchersNeeded, file, file);
32791
+ for (const file of missing)if (filter(file)) {
32792
+ missingFiles.add(file);
32793
+ addToMap(fileWatchersNeeded, file, file);
32794
+ }
32795
+ for (const dir of directories)if (filter(dir)) addToMap(directoryWatchersNeeded, dir, dir);
32796
+ }
32797
+ for (const [key, w] of fileWatchers){
32798
+ const needed = fileWatchersNeeded.get(key);
32799
+ if (void 0 === needed) {
32800
+ w.close();
32801
+ fileWatchers.delete(key);
32802
+ } else {
32803
+ w.update(needed);
32804
+ fileWatchersNeeded.delete(key);
32805
+ }
32806
+ }
32807
+ for (const [key, w] of directoryWatchers){
32808
+ const needed = directoryWatchersNeeded.get(key);
32809
+ if (void 0 === needed) {
32810
+ w.close();
32811
+ directoryWatchers.delete(key);
32812
+ } else {
32813
+ w.update(needed);
32814
+ directoryWatchersNeeded.delete(key);
32815
+ }
32816
+ }
32817
+ watchEventSource.batch(()=>{
32818
+ for (const [key, files] of fileWatchersNeeded){
32819
+ const watcher = this.watcherManager.watchFile(key, startTime);
32820
+ if (watcher) fileWatchers.set(key, new WatchpackFileWatcher(this, watcher, files));
32821
+ }
32822
+ for (const [key, directories] of directoryWatchersNeeded){
32823
+ const watcher = this.watcherManager.watchDirectory(key, startTime);
32824
+ if (watcher) directoryWatchers.set(key, new WatchpackDirectoryWatcher(this, watcher, directories));
32825
+ }
32826
+ });
32827
+ this._missing = missingFiles;
32828
+ this.startTime = startTime;
32829
+ }
32830
+ close() {
32831
+ this.paused = true;
32832
+ if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
32833
+ for (const w of this.fileWatchers.values())w.close();
32834
+ for (const w of this.directoryWatchers.values())w.close();
32835
+ this.fileWatchers.clear();
32836
+ this.directoryWatchers.clear();
32837
+ }
32838
+ pause() {
32839
+ this.paused = true;
32840
+ if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
32841
+ }
32842
+ getTimes() {
32843
+ const directoryWatchers = new Set();
32844
+ addWatchersToSet(this.fileWatchers.values(), directoryWatchers);
32845
+ addWatchersToSet(this.directoryWatchers.values(), directoryWatchers);
32846
+ const obj = Object.create(null);
32847
+ for (const w of directoryWatchers){
32848
+ const times = w.getTimes();
32849
+ for (const file of Object.keys(times))obj[file] = times[file];
32850
+ }
32851
+ return obj;
32852
+ }
32853
+ getTimeInfoEntries() {
32854
+ const map = new Map();
32855
+ this.collectTimeInfoEntries(map, map);
32856
+ return map;
32857
+ }
32858
+ collectTimeInfoEntries(fileTimestamps, directoryTimestamps) {
32859
+ const allWatchers = new Set();
32860
+ addWatchersToSet(this.fileWatchers.values(), allWatchers);
32861
+ addWatchersToSet(this.directoryWatchers.values(), allWatchers);
32862
+ for (const w of allWatchers)w.collectTimeInfoEntries(fileTimestamps, directoryTimestamps);
32863
+ }
32864
+ getAggregated() {
32865
+ if (this.aggregateTimer) {
32866
+ clearTimeout(this.aggregateTimer);
32867
+ this.aggregateTimer = void 0;
32868
+ }
32869
+ const changes = this.aggregatedChanges;
32870
+ const removals = this.aggregatedRemovals;
32871
+ this.aggregatedChanges = new Set();
32872
+ this.aggregatedRemovals = new Set();
32873
+ return {
32874
+ changes,
32875
+ removals
32876
+ };
32877
+ }
32878
+ _onChange(item, mtime, file, type) {
32879
+ file = file || item;
32880
+ if (!this.paused) {
32881
+ this.emit("change", file, mtime, type);
32882
+ if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
32883
+ this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout);
32884
+ }
32885
+ this.aggregatedRemovals.delete(item);
32886
+ this.aggregatedChanges.add(item);
32887
+ }
32888
+ _onRemove(item, file, type) {
32889
+ file = file || item;
32890
+ if (!this.paused) {
32891
+ this.emit("remove", file, type);
32892
+ if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
32893
+ this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout);
32894
+ }
32895
+ this.aggregatedChanges.delete(item);
32896
+ this.aggregatedRemovals.add(item);
32897
+ }
32898
+ _onTimeout() {
32899
+ this.aggregateTimer = void 0;
32900
+ const changes = this.aggregatedChanges;
32901
+ const removals = this.aggregatedRemovals;
32902
+ this.aggregatedChanges = new Set();
32903
+ this.aggregatedRemovals = new Set();
32904
+ this.emit("aggregated", changes, removals);
32905
+ }
32906
+ }
32907
+ module.exports = Watchpack;
32908
+ },
32909
+ "../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/reducePlan.js" (module, __unused_rspack_exports, __webpack_require__) {
32616
32910
  const path = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
32617
32911
  module.exports = (plan, limit)=>{
32618
32912
  const treeMap = new Map();
32619
- for (const [filePath, value] of plan)treeMap.set(filePath, {
32620
- filePath,
32913
+ for (const [target, value] of plan)treeMap.set(target, {
32914
+ target,
32621
32915
  parent: void 0,
32622
32916
  children: void 0,
32623
32917
  entries: 1,
@@ -32626,12 +32920,12 @@ __webpack_require__.add({
32626
32920
  });
32627
32921
  let currentCount = treeMap.size;
32628
32922
  for (const node of treeMap.values()){
32629
- const parentPath = path.dirname(node.filePath);
32630
- if (parentPath !== node.filePath) {
32923
+ const parentPath = path.dirname(node.target);
32924
+ if (parentPath !== node.target) {
32631
32925
  let parent = treeMap.get(parentPath);
32632
32926
  if (void 0 === parent) {
32633
32927
  parent = {
32634
- filePath: parentPath,
32928
+ target: parentPath,
32635
32929
  parent: void 0,
32636
32930
  children: [
32637
32931
  node
@@ -32674,7 +32968,7 @@ __webpack_require__.add({
32674
32968
  bestNode.active = true;
32675
32969
  bestNode.entries = 1;
32676
32970
  currentCount -= reduction;
32677
- let parent = bestNode.parent;
32971
+ let { parent } = bestNode;
32678
32972
  while(parent){
32679
32973
  parent.entries -= reduction;
32680
32974
  parent = parent.parent;
@@ -32694,26 +32988,26 @@ __webpack_require__.add({
32694
32988
  rootNode
32695
32989
  ]);
32696
32990
  for (const node of queue)if (!node.active || node === rootNode) {
32697
- if (node.value) if (Array.isArray(node.value)) for (const item of node.value)map.set(item, node.filePath);
32698
- else map.set(node.value, node.filePath);
32991
+ if (node.value) if (Array.isArray(node.value)) for (const item of node.value)map.set(item, node.target);
32992
+ else map.set(node.value, node.target);
32699
32993
  if (node.children) for (const child of node.children)queue.add(child);
32700
32994
  }
32701
- newPlan.set(rootNode.filePath, map);
32995
+ newPlan.set(rootNode.target, map);
32702
32996
  }
32703
32997
  return newPlan;
32704
32998
  };
32705
32999
  },
32706
- "../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/watchEventSource.js" (__unused_rspack_module, exports, __webpack_require__) {
33000
+ "../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/watchEventSource.js" (module, __unused_rspack_exports, __webpack_require__) {
32707
33001
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
33002
+ const { EventEmitter } = __webpack_require__("../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js");
32708
33003
  const fs = __webpack_require__("./src/browser/fs.ts");
32709
33004
  const path = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
32710
- const { EventEmitter } = __webpack_require__("../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js");
32711
- const reducePlan = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/reducePlan.js");
33005
+ const reducePlan = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/reducePlan.js");
32712
33006
  const IS_OSX = "darwin" === __webpack_require__("../../node_modules/.pnpm/os-browserify@0.3.0/node_modules/os-browserify/browser.js").iD();
32713
33007
  const IS_WIN = "win32" === __webpack_require__("../../node_modules/.pnpm/os-browserify@0.3.0/node_modules/os-browserify/browser.js").iD();
32714
33008
  const SUPPORTS_RECURSIVE_WATCHING = IS_OSX || IS_WIN;
32715
33009
  const watcherLimit = +process.env.WATCHPACK_WATCHER_LIMIT || (IS_OSX ? 20 : 10000);
32716
- const recursiveWatcherLogging = !!process.env.WATCHPACK_RECURSIVE_WATCHER_LOGGING;
33010
+ const recursiveWatcherLogging = Boolean(process.env.WATCHPACK_RECURSIVE_WATCHER_LOGGING);
32717
33011
  let isBatch = false;
32718
33012
  let watcherCount = 0;
32719
33013
  const pendingWatchers = new Map();
@@ -32836,6 +33130,9 @@ __webpack_require__.add({
32836
33130
  }
32837
33131
  }
32838
33132
  class Watcher extends EventEmitter {
33133
+ constructor(){
33134
+ super();
33135
+ }
32839
33136
  close() {
32840
33137
  if (pendingWatchers.has(this)) return void pendingWatchers.delete(this);
32841
33138
  const watcher = underlyingWatcher.get(this);
@@ -32912,7 +33209,16 @@ __webpack_require__.add({
32912
33209
  }
32913
33210
  }
32914
33211
  };
32915
- exports.watch = (filePath)=>{
33212
+ module.exports.batch = (fn)=>{
33213
+ isBatch = true;
33214
+ try {
33215
+ fn();
33216
+ } finally{
33217
+ isBatch = false;
33218
+ execute();
33219
+ }
33220
+ };
33221
+ module.exports.watch = (filePath)=>{
32916
33222
  const watcher = new Watcher();
32917
33223
  const directWatcher = directWatchers.get(filePath);
32918
33224
  if (void 0 !== directWatcher) {
@@ -32934,306 +33240,6 @@ __webpack_require__.add({
32934
33240
  if (!isBatch) execute();
32935
33241
  return watcher;
32936
33242
  };
32937
- exports.batch = (fn)=>{
32938
- isBatch = true;
32939
- try {
32940
- fn();
32941
- } finally{
32942
- isBatch = false;
32943
- execute();
32944
- }
32945
- };
32946
- },
32947
- "../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/watchpack.js" (module, __unused_rspack_exports, __webpack_require__) {
32948
- const getWatcherManager = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/getWatcherManager.js");
32949
- const LinkResolver = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/LinkResolver.js");
32950
- const EventEmitter = __webpack_require__("../../node_modules/.pnpm/events@3.3.0/node_modules/events/events.js").EventEmitter;
32951
- const globToRegExp = __webpack_require__("../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js");
32952
- const watchEventSource = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/watchEventSource.js");
32953
- const EMPTY_ARRAY = [];
32954
- const EMPTY_OPTIONS = {};
32955
- function addWatchersToSet(watchers, set) {
32956
- for (const ww of watchers){
32957
- const w = ww.watcher;
32958
- if (!set.has(w.directoryWatcher)) set.add(w.directoryWatcher);
32959
- }
32960
- }
32961
- const stringToRegexp = (ignored)=>{
32962
- if (0 === ignored.length) return;
32963
- const source = globToRegExp(ignored, {
32964
- globstar: true,
32965
- extended: true
32966
- }).source;
32967
- return source.slice(0, source.length - 1) + "(?:$|\\/)";
32968
- };
32969
- const ignoredToFunction = (ignored)=>{
32970
- if (Array.isArray(ignored)) {
32971
- const stringRegexps = ignored.map((i)=>stringToRegexp(i)).filter(Boolean);
32972
- if (0 === stringRegexps.length) return ()=>false;
32973
- const regexp = new RegExp(stringRegexps.join("|"));
32974
- return (x)=>regexp.test(x.replace(/\\/g, "/"));
32975
- }
32976
- if ("string" == typeof ignored) {
32977
- const stringRegexp = stringToRegexp(ignored);
32978
- if (!stringRegexp) return ()=>false;
32979
- const regexp = new RegExp(stringRegexp);
32980
- return (x)=>regexp.test(x.replace(/\\/g, "/"));
32981
- }
32982
- if (ignored instanceof RegExp) return (x)=>ignored.test(x.replace(/\\/g, "/"));
32983
- if (ignored instanceof Function) return ignored;
32984
- if (!ignored) return ()=>false;
32985
- else throw new Error(`Invalid option for 'ignored': ${ignored}`);
32986
- };
32987
- const normalizeOptions = (options)=>({
32988
- followSymlinks: !!options.followSymlinks,
32989
- ignored: ignoredToFunction(options.ignored),
32990
- poll: options.poll
32991
- });
32992
- const normalizeCache = new WeakMap();
32993
- const cachedNormalizeOptions = (options)=>{
32994
- const cacheEntry = normalizeCache.get(options);
32995
- if (void 0 !== cacheEntry) return cacheEntry;
32996
- const normalized = normalizeOptions(options);
32997
- normalizeCache.set(options, normalized);
32998
- return normalized;
32999
- };
33000
- class WatchpackFileWatcher {
33001
- constructor(watchpack, watcher, files){
33002
- this.files = Array.isArray(files) ? files : [
33003
- files
33004
- ];
33005
- this.watcher = watcher;
33006
- watcher.on("initial-missing", (type)=>{
33007
- for (const file of this.files)if (!watchpack._missing.has(file)) watchpack._onRemove(file, file, type);
33008
- });
33009
- watcher.on("change", (mtime, type)=>{
33010
- for (const file of this.files)watchpack._onChange(file, mtime, file, type);
33011
- });
33012
- watcher.on("remove", (type)=>{
33013
- for (const file of this.files)watchpack._onRemove(file, file, type);
33014
- });
33015
- }
33016
- update(files) {
33017
- if (Array.isArray(files)) this.files = files;
33018
- else if (1 !== this.files.length) this.files = [
33019
- files
33020
- ];
33021
- else if (this.files[0] !== files) this.files[0] = files;
33022
- }
33023
- close() {
33024
- this.watcher.close();
33025
- }
33026
- }
33027
- class WatchpackDirectoryWatcher {
33028
- constructor(watchpack, watcher, directories){
33029
- this.directories = Array.isArray(directories) ? directories : [
33030
- directories
33031
- ];
33032
- this.watcher = watcher;
33033
- watcher.on("initial-missing", (type)=>{
33034
- for (const item of this.directories)watchpack._onRemove(item, item, type);
33035
- });
33036
- watcher.on("change", (file, mtime, type)=>{
33037
- for (const item of this.directories)watchpack._onChange(item, mtime, file, type);
33038
- });
33039
- watcher.on("remove", (type)=>{
33040
- for (const item of this.directories)watchpack._onRemove(item, item, type);
33041
- });
33042
- }
33043
- update(directories) {
33044
- if (Array.isArray(directories)) this.directories = directories;
33045
- else if (1 !== this.directories.length) this.directories = [
33046
- directories
33047
- ];
33048
- else if (this.directories[0] !== directories) this.directories[0] = directories;
33049
- }
33050
- close() {
33051
- this.watcher.close();
33052
- }
33053
- }
33054
- class Watchpack extends EventEmitter {
33055
- constructor(options){
33056
- super();
33057
- if (!options) options = EMPTY_OPTIONS;
33058
- this.options = options;
33059
- this.aggregateTimeout = "number" == typeof options.aggregateTimeout ? options.aggregateTimeout : 200;
33060
- this.watcherOptions = cachedNormalizeOptions(options);
33061
- this.watcherManager = getWatcherManager(this.watcherOptions);
33062
- this.fileWatchers = new Map();
33063
- this.directoryWatchers = new Map();
33064
- this._missing = new Set();
33065
- this.startTime = void 0;
33066
- this.paused = false;
33067
- this.aggregatedChanges = new Set();
33068
- this.aggregatedRemovals = new Set();
33069
- this.aggregateTimer = void 0;
33070
- this._onTimeout = this._onTimeout.bind(this);
33071
- }
33072
- watch(arg1, arg2, arg3) {
33073
- let files, directories, missing, startTime;
33074
- if (arg2) {
33075
- files = arg1;
33076
- directories = arg2;
33077
- missing = EMPTY_ARRAY;
33078
- startTime = arg3;
33079
- } else ({ files = EMPTY_ARRAY, directories = EMPTY_ARRAY, missing = EMPTY_ARRAY, startTime } = arg1);
33080
- this.paused = false;
33081
- const fileWatchers = this.fileWatchers;
33082
- const directoryWatchers = this.directoryWatchers;
33083
- const ignored = this.watcherOptions.ignored;
33084
- const filter = (path)=>!ignored(path);
33085
- const addToMap = (map, key, item)=>{
33086
- const list = map.get(key);
33087
- if (void 0 === list) map.set(key, item);
33088
- else if (Array.isArray(list)) list.push(item);
33089
- else map.set(key, [
33090
- list,
33091
- item
33092
- ]);
33093
- };
33094
- const fileWatchersNeeded = new Map();
33095
- const directoryWatchersNeeded = new Map();
33096
- const missingFiles = new Set();
33097
- if (this.watcherOptions.followSymlinks) {
33098
- const resolver = new LinkResolver();
33099
- for (const file of files)if (filter(file)) {
33100
- for (const innerFile of resolver.resolve(file))if (file === innerFile || filter(innerFile)) addToMap(fileWatchersNeeded, innerFile, file);
33101
- }
33102
- for (const file of missing)if (filter(file)) {
33103
- for (const innerFile of resolver.resolve(file))if (file === innerFile || filter(innerFile)) {
33104
- missingFiles.add(file);
33105
- addToMap(fileWatchersNeeded, innerFile, file);
33106
- }
33107
- }
33108
- for (const dir of directories)if (filter(dir)) {
33109
- let first = true;
33110
- for (const innerItem of resolver.resolve(dir)){
33111
- if (filter(innerItem)) addToMap(first ? directoryWatchersNeeded : fileWatchersNeeded, innerItem, dir);
33112
- first = false;
33113
- }
33114
- }
33115
- } else {
33116
- for (const file of files)if (filter(file)) addToMap(fileWatchersNeeded, file, file);
33117
- for (const file of missing)if (filter(file)) {
33118
- missingFiles.add(file);
33119
- addToMap(fileWatchersNeeded, file, file);
33120
- }
33121
- for (const dir of directories)if (filter(dir)) addToMap(directoryWatchersNeeded, dir, dir);
33122
- }
33123
- for (const [key, w] of fileWatchers){
33124
- const needed = fileWatchersNeeded.get(key);
33125
- if (void 0 === needed) {
33126
- w.close();
33127
- fileWatchers.delete(key);
33128
- } else {
33129
- w.update(needed);
33130
- fileWatchersNeeded.delete(key);
33131
- }
33132
- }
33133
- for (const [key, w] of directoryWatchers){
33134
- const needed = directoryWatchersNeeded.get(key);
33135
- if (void 0 === needed) {
33136
- w.close();
33137
- directoryWatchers.delete(key);
33138
- } else {
33139
- w.update(needed);
33140
- directoryWatchersNeeded.delete(key);
33141
- }
33142
- }
33143
- watchEventSource.batch(()=>{
33144
- for (const [key, files] of fileWatchersNeeded){
33145
- const watcher = this.watcherManager.watchFile(key, startTime);
33146
- if (watcher) fileWatchers.set(key, new WatchpackFileWatcher(this, watcher, files));
33147
- }
33148
- for (const [key, directories] of directoryWatchersNeeded){
33149
- const watcher = this.watcherManager.watchDirectory(key, startTime);
33150
- if (watcher) directoryWatchers.set(key, new WatchpackDirectoryWatcher(this, watcher, directories));
33151
- }
33152
- });
33153
- this._missing = missingFiles;
33154
- this.startTime = startTime;
33155
- }
33156
- close() {
33157
- this.paused = true;
33158
- if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
33159
- for (const w of this.fileWatchers.values())w.close();
33160
- for (const w of this.directoryWatchers.values())w.close();
33161
- this.fileWatchers.clear();
33162
- this.directoryWatchers.clear();
33163
- }
33164
- pause() {
33165
- this.paused = true;
33166
- if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
33167
- }
33168
- getTimes() {
33169
- const directoryWatchers = new Set();
33170
- addWatchersToSet(this.fileWatchers.values(), directoryWatchers);
33171
- addWatchersToSet(this.directoryWatchers.values(), directoryWatchers);
33172
- const obj = Object.create(null);
33173
- for (const w of directoryWatchers){
33174
- const times = w.getTimes();
33175
- for (const file of Object.keys(times))obj[file] = times[file];
33176
- }
33177
- return obj;
33178
- }
33179
- getTimeInfoEntries() {
33180
- const map = new Map();
33181
- this.collectTimeInfoEntries(map, map);
33182
- return map;
33183
- }
33184
- collectTimeInfoEntries(fileTimestamps, directoryTimestamps) {
33185
- const allWatchers = new Set();
33186
- addWatchersToSet(this.fileWatchers.values(), allWatchers);
33187
- addWatchersToSet(this.directoryWatchers.values(), allWatchers);
33188
- const safeTime = {
33189
- value: 0
33190
- };
33191
- for (const w of allWatchers)w.collectTimeInfoEntries(fileTimestamps, directoryTimestamps, safeTime);
33192
- }
33193
- getAggregated() {
33194
- if (this.aggregateTimer) {
33195
- clearTimeout(this.aggregateTimer);
33196
- this.aggregateTimer = void 0;
33197
- }
33198
- const changes = this.aggregatedChanges;
33199
- const removals = this.aggregatedRemovals;
33200
- this.aggregatedChanges = new Set();
33201
- this.aggregatedRemovals = new Set();
33202
- return {
33203
- changes,
33204
- removals
33205
- };
33206
- }
33207
- _onChange(item, mtime, file, type) {
33208
- file = file || item;
33209
- if (!this.paused) {
33210
- this.emit("change", file, mtime, type);
33211
- if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
33212
- this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout);
33213
- }
33214
- this.aggregatedRemovals.delete(item);
33215
- this.aggregatedChanges.add(item);
33216
- }
33217
- _onRemove(item, file, type) {
33218
- file = file || item;
33219
- if (!this.paused) {
33220
- this.emit("remove", file, type);
33221
- if (this.aggregateTimer) clearTimeout(this.aggregateTimer);
33222
- this.aggregateTimer = setTimeout(this._onTimeout, this.aggregateTimeout);
33223
- }
33224
- this.aggregatedChanges.delete(item);
33225
- this.aggregatedRemovals.add(item);
33226
- }
33227
- _onTimeout() {
33228
- this.aggregateTimer = void 0;
33229
- const changes = this.aggregatedChanges;
33230
- const removals = this.aggregatedRemovals;
33231
- this.aggregatedChanges = new Set();
33232
- this.aggregatedRemovals = new Set();
33233
- this.emit("aggregated", changes, removals);
33234
- }
33235
- }
33236
- module.exports = Watchpack;
33237
33243
  },
33238
33244
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/CachedSource.js" (module, __unused_rspack_exports, __webpack_require__) {
33239
33245
  var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
@@ -35333,14 +35339,14 @@ __webpack_require__.add({
35333
35339
  watch: ()=>watch
35334
35340
  });
35335
35341
  var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.4_@emnapi+core@1.10.0_@emnapi+runtime@1.10.0/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
35336
- var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?5bb0");
35342
+ var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?2041");
35337
35343
  const fs = _rspack_binding__rspack_import_1.__fs;
35338
35344
  const volume = _rspack_binding__rspack_import_1.__volume;
35339
35345
  const memfs = _napi_rs_wasm_runtime_fs__rspack_import_0.tO;
35340
35346
  const { readFileSync, readdirSync, lstat, existsSync, readdir, watch } = fs;
35341
35347
  const __rspack_default_export = fs;
35342
35348
  },
35343
- "@rspack/binding?5bb0" (module) {
35349
+ "@rspack/binding?2041" (module) {
35344
35350
  module.exports = __rspack_external__rspack_wasi_browser_js_bd433424;
35345
35351
  },
35346
35352
  "?7763" () {},
@@ -55159,7 +55165,7 @@ Object.defineProperty(Chunk.prototype, 'getChunkMaps', {
55159
55165
  const chunkNameMap = {};
55160
55166
  for (const chunk of this.getAllAsyncChunks()){
55161
55167
  const id = chunk.id;
55162
- if (!id) continue;
55168
+ if (void 0 === id) continue;
55163
55169
  const chunkHash = realHash ? chunk.hash : chunk.renderedHash;
55164
55170
  if (chunkHash) chunkHashMap[id] = chunkHash;
55165
55171
  for (const key of Object.keys(chunk.contentHash)){
@@ -55337,7 +55343,6 @@ function createDiagnosticArray(adm) {
55337
55343
  return adm.get(index);
55338
55344
  },
55339
55345
  concat (...items) {
55340
- [].includes;
55341
55346
  return adm.values().concat(...items);
55342
55347
  },
55343
55348
  flat () {
@@ -55409,6 +55414,22 @@ function _type_of(obj) {
55409
55414
  return obj && "u" > typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj;
55410
55415
  }
55411
55416
  let _computedKey, _computedKey1, _computedKey2;
55417
+ function normalizePathData(data = {}) {
55418
+ const pathData = {
55419
+ filename: data.filename,
55420
+ hash: data.hash,
55421
+ contentHash: data.contentHash,
55422
+ runtime: data.runtime,
55423
+ url: data.url
55424
+ };
55425
+ if (void 0 !== data.id) pathData.id = String(data.id);
55426
+ if (data.chunk) pathData.chunk = {
55427
+ id: void 0 !== data.chunk.id ? String(data.chunk.id) : void 0,
55428
+ name: data.chunk.name,
55429
+ hash: data.chunk.hash
55430
+ };
55431
+ return pathData;
55432
+ }
55412
55433
  const checkCompilation = (compilation)=>{
55413
55434
  if (!(compilation instanceof Compilation)) throw new TypeError('The \'compilation\' argument must be an instance of Compilation. This usually occurs when multiple versions of "@rspack/core" are used, or when the code in "@rspack/core" is executed multiple times.');
55414
55435
  };
@@ -55777,30 +55798,22 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
55777
55798
  this.#warnings.splice(0, this.#warnings.length, ...warnings);
55778
55799
  }
55779
55800
  getPath(filename, data = {}) {
55780
- const pathData = {
55781
- ...data
55782
- };
55801
+ const pathData = normalizePathData(data);
55783
55802
  if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
55784
55803
  return this.#inner.getPath(filename, pathData);
55785
55804
  }
55786
55805
  getPathWithInfo(filename, data = {}) {
55787
- const pathData = {
55788
- ...data
55789
- };
55806
+ const pathData = normalizePathData(data);
55790
55807
  if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
55791
55808
  return this.#inner.getPathWithInfo(filename, pathData);
55792
55809
  }
55793
55810
  getAssetPath(filename, data = {}) {
55794
- const pathData = {
55795
- ...data
55796
- };
55811
+ const pathData = normalizePathData(data);
55797
55812
  if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
55798
55813
  return this.#inner.getAssetPath(filename, pathData);
55799
55814
  }
55800
55815
  getAssetPathWithInfo(filename, data = {}) {
55801
- const pathData = {
55802
- ...data
55803
- };
55816
+ const pathData = normalizePathData(data);
55804
55817
  if (data.contentHashType && data.chunk?.contentHash) pathData.contentHash = data.chunk.contentHash[data.contentHashType];
55805
55818
  return this.#inner.getAssetPathWithInfo(filename, pathData);
55806
55819
  }
@@ -61839,7 +61852,7 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
61839
61852
  });
61840
61853
  D(output, 'bundlerInfo', {});
61841
61854
  if ('object' == typeof output.bundlerInfo) {
61842
- D(output.bundlerInfo, 'version', "2.0.0");
61855
+ D(output.bundlerInfo, 'version', "2.0.2");
61843
61856
  D(output.bundlerInfo, 'bundler', 'rspack');
61844
61857
  D(output.bundlerInfo, 'force', false);
61845
61858
  }
@@ -63497,7 +63510,7 @@ class MultiStats {
63497
63510
  return obj;
63498
63511
  });
63499
63512
  if (childOptions.version) {
63500
- obj.rspackVersion = "2.0.0";
63513
+ obj.rspackVersion = "2.0.2";
63501
63514
  obj.version = "5.75.0";
63502
63515
  }
63503
63516
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
@@ -64162,7 +64175,7 @@ class NodeWatchFileSystem {
64162
64175
  if ('object' != typeof options) throw new Error("Invalid arguments: 'options'");
64163
64176
  if ('function' != typeof callbackUndelayed && callbackUndelayed) throw new Error("Invalid arguments: 'callbackUndelayed'");
64164
64177
  const oldWatcher = this.watcher;
64165
- const Watchpack = __webpack_require__("../../node_modules/.pnpm/watchpack@2.4.4/node_modules/watchpack/lib/watchpack.js");
64178
+ const Watchpack = __webpack_require__("../../node_modules/.pnpm/watchpack@2.5.1/node_modules/watchpack/lib/index.js");
64166
64179
  this.watcher = new Watchpack(options);
64167
64180
  if (callbackUndelayed) this.watcher?.once('change', callbackUndelayed);
64168
64181
  const fetchTimeInfo = ()=>{
@@ -64374,7 +64387,7 @@ function nodeConsole({ colors, appendOnly, stream }) {
64374
64387
  }
64375
64388
  };
64376
64389
  }
64377
- const CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.20.1/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
64390
+ const CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.0/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
64378
64391
  var CachedInputFileSystem_default = /*#__PURE__*/ __webpack_require__.n(CachedInputFileSystem);
64379
64392
  class NodeEnvironmentPlugin {
64380
64393
  options;
@@ -65012,7 +65025,7 @@ const MODULES_SORTER = {
65012
65025
  const SORTERS = {
65013
65026
  'compilation.chunks': {
65014
65027
  _: (comparators)=>{
65015
- comparators.push(compareSelect((c)=>c.id, DefaultStatsFactoryPlugin_compareIds));
65028
+ comparators.push(compareSelect((c)=>void 0 === c.id ? void 0 : String(c.id), DefaultStatsFactoryPlugin_compareIds));
65016
65029
  }
65017
65030
  },
65018
65031
  'compilation.modules': MODULES_SORTER,
@@ -65133,7 +65146,10 @@ const SIMPLE_EXTRACTORS = {
65133
65146
  LogType.error
65134
65147
  ]) : getLogTypesBitFlag([]);
65135
65148
  object.logging = {};
65136
- const compilationLogging = compilation.logging;
65149
+ const compilationLogging = new Map();
65150
+ for (const [origin, logEntries] of compilation.logging)compilationLogging.set(origin, [
65151
+ ...logEntries
65152
+ ]);
65137
65153
  for (const { name, ...rest } of context.getInner(compilation).getLogging(acceptedTypes)){
65138
65154
  const value = compilationLogging.get(name);
65139
65155
  const entry = {
@@ -65200,7 +65216,7 @@ const SIMPLE_EXTRACTORS = {
65200
65216
  },
65201
65217
  version: (object)=>{
65202
65218
  object.version = "5.75.0";
65203
- object.rspackVersion = "2.0.0";
65219
+ object.rspackVersion = "2.0.2";
65204
65220
  },
65205
65221
  env: (object, _compilation, _context, { _env })=>{
65206
65222
  object.env = _env;
@@ -68439,7 +68455,7 @@ class Compiler {
68439
68455
  const rawOptions = getRawOptions(options, this);
68440
68456
  rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
68441
68457
  rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
68442
- const instanceBinding = __webpack_require__("@rspack/binding?5bb0");
68458
+ const instanceBinding = __webpack_require__("@rspack/binding?2041");
68443
68459
  this.#registers = this.#createHooksRegisters();
68444
68460
  const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
68445
68461
  try {
@@ -69643,7 +69659,7 @@ class IndependentSharedPlugin {
69643
69659
  reject(err || new Error(`${target} Compile failed`));
69644
69660
  return;
69645
69661
  }
69646
- currentShare && console.log(`${currentShare.shareName} Compile success`);
69662
+ if (currentShare) console.log(`${currentShare.shareName} Compile success`);
69647
69663
  resolve(extraPlugin.getData());
69648
69664
  });
69649
69665
  });
@@ -70029,7 +70045,7 @@ function transformSync(source, options) {
70029
70045
  const _options = JSON.stringify(options || {});
70030
70046
  return rspack_wasi_browser.transformSync(source, _options);
70031
70047
  }
70032
- const exports_rspackVersion = "2.0.0";
70048
+ const exports_rspackVersion = "2.0.2";
70033
70049
  const exports_version = "5.75.0";
70034
70050
  const exports_WebpackError = Error;
70035
70051
  const exports_config = {