wrangler 3.103.2 → 3.104.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.
@@ -557,14 +557,14 @@ var require_util = __commonJS({
557
557
  }
558
558
  const port = url4.port != null ? url4.port : url4.protocol === "https:" ? 443 : 80;
559
559
  let origin = url4.origin != null ? url4.origin : `${url4.protocol}//${url4.hostname}:${port}`;
560
- let path69 = url4.path != null ? url4.path : `${url4.pathname || ""}${url4.search || ""}`;
560
+ let path70 = url4.path != null ? url4.path : `${url4.pathname || ""}${url4.search || ""}`;
561
561
  if (origin.endsWith("/")) {
562
562
  origin = origin.substring(0, origin.length - 1);
563
563
  }
564
- if (path69 && !path69.startsWith("/")) {
565
- path69 = `/${path69}`;
564
+ if (path70 && !path70.startsWith("/")) {
565
+ path70 = `/${path70}`;
566
566
  }
567
- url4 = new URL(origin + path69);
567
+ url4 = new URL(origin + path70);
568
568
  }
569
569
  return url4;
570
570
  }
@@ -2228,19 +2228,19 @@ var require_basename = __commonJS({
2228
2228
  "../../node_modules/.pnpm/@fastify+busboy@2.1.1/node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module3) {
2229
2229
  "use strict";
2230
2230
  init_import_meta_url();
2231
- module3.exports = /* @__PURE__ */ __name(function basename7(path69) {
2232
- if (typeof path69 !== "string") {
2231
+ module3.exports = /* @__PURE__ */ __name(function basename7(path70) {
2232
+ if (typeof path70 !== "string") {
2233
2233
  return "";
2234
2234
  }
2235
- for (var i5 = path69.length - 1; i5 >= 0; --i5) {
2236
- switch (path69.charCodeAt(i5)) {
2235
+ for (var i5 = path70.length - 1; i5 >= 0; --i5) {
2236
+ switch (path70.charCodeAt(i5)) {
2237
2237
  case 47:
2238
2238
  case 92:
2239
- path69 = path69.slice(i5 + 1);
2240
- return path69 === ".." || path69 === "." ? "" : path69;
2239
+ path70 = path70.slice(i5 + 1);
2240
+ return path70 === ".." || path70 === "." ? "" : path70;
2241
2241
  }
2242
2242
  }
2243
- return path69 === ".." || path69 === "." ? "" : path69;
2243
+ return path70 === ".." || path70 === "." ? "" : path70;
2244
2244
  }, "basename");
2245
2245
  }
2246
2246
  });
@@ -5362,7 +5362,7 @@ var require_request = __commonJS({
5362
5362
  }
5363
5363
  var Request4 = class {
5364
5364
  constructor(origin, {
5365
- path: path69,
5365
+ path: path70,
5366
5366
  method,
5367
5367
  body,
5368
5368
  headers,
@@ -5376,11 +5376,11 @@ var require_request = __commonJS({
5376
5376
  throwOnError,
5377
5377
  expectContinue
5378
5378
  }, handler30) {
5379
- if (typeof path69 !== "string") {
5379
+ if (typeof path70 !== "string") {
5380
5380
  throw new InvalidArgumentError("path must be a string");
5381
- } else if (path69[0] !== "/" && !(path69.startsWith("http://") || path69.startsWith("https://")) && method !== "CONNECT") {
5381
+ } else if (path70[0] !== "/" && !(path70.startsWith("http://") || path70.startsWith("https://")) && method !== "CONNECT") {
5382
5382
  throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
5383
- } else if (invalidPathRegex.exec(path69) !== null) {
5383
+ } else if (invalidPathRegex.exec(path70) !== null) {
5384
5384
  throw new InvalidArgumentError("invalid request path");
5385
5385
  }
5386
5386
  if (typeof method !== "string") {
@@ -5443,7 +5443,7 @@ var require_request = __commonJS({
5443
5443
  this.completed = false;
5444
5444
  this.aborted = false;
5445
5445
  this.upgrade = upgrade || null;
5446
- this.path = query ? util5.buildURL(path69, query) : path69;
5446
+ this.path = query ? util5.buildURL(path70, query) : path70;
5447
5447
  this.origin = origin;
5448
5448
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
5449
5449
  this.blocking = blocking == null ? false : blocking;
@@ -6476,9 +6476,9 @@ var require_RedirectHandler = __commonJS({
6476
6476
  return this.handler.onHeaders(statusCode, headers, resume, statusText);
6477
6477
  }
6478
6478
  const { origin, pathname, search } = util5.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
6479
- const path69 = search ? `${pathname}${search}` : pathname;
6479
+ const path70 = search ? `${pathname}${search}` : pathname;
6480
6480
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
6481
- this.opts.path = path69;
6481
+ this.opts.path = path70;
6482
6482
  this.opts.origin = origin;
6483
6483
  this.opts.maxRedirections = 0;
6484
6484
  this.opts.query = null;
@@ -7745,7 +7745,7 @@ var require_client = __commonJS({
7745
7745
  writeH2(client, client[kHTTP2Session], request4);
7746
7746
  return;
7747
7747
  }
7748
- const { body, method, path: path69, host, upgrade, headers, blocking, reset } = request4;
7748
+ const { body, method, path: path70, host, upgrade, headers, blocking, reset } = request4;
7749
7749
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
7750
7750
  if (body && typeof body.read === "function") {
7751
7751
  body.read(0);
@@ -7795,7 +7795,7 @@ var require_client = __commonJS({
7795
7795
  if (blocking) {
7796
7796
  socket[kBlocking] = true;
7797
7797
  }
7798
- let header = `${method} ${path69} HTTP/1.1\r
7798
+ let header = `${method} ${path70} HTTP/1.1\r
7799
7799
  `;
7800
7800
  if (typeof host === "string") {
7801
7801
  header += `host: ${host}\r
@@ -7859,7 +7859,7 @@ upgrade: ${upgrade}\r
7859
7859
  }
7860
7860
  __name(write, "write");
7861
7861
  function writeH2(client, session, request4) {
7862
- const { body, method, path: path69, host, upgrade, expectContinue, signal, headers: reqHeaders } = request4;
7862
+ const { body, method, path: path70, host, upgrade, expectContinue, signal, headers: reqHeaders } = request4;
7863
7863
  let headers;
7864
7864
  if (typeof reqHeaders === "string")
7865
7865
  headers = Request4[kHTTP2CopyHeaders](reqHeaders.trim());
@@ -7905,7 +7905,7 @@ upgrade: ${upgrade}\r
7905
7905
  });
7906
7906
  return true;
7907
7907
  }
7908
- headers[HTTP2_HEADER_PATH] = path69;
7908
+ headers[HTTP2_HEADER_PATH] = path70;
7909
7909
  headers[HTTP2_HEADER_SCHEME] = "https";
7910
7910
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
7911
7911
  if (body && typeof body.read === "function") {
@@ -10207,21 +10207,21 @@ var require_mock_utils = __commonJS({
10207
10207
  return true;
10208
10208
  }
10209
10209
  __name(matchHeaders, "matchHeaders");
10210
- function safeUrl(path69) {
10211
- if (typeof path69 !== "string") {
10212
- return path69;
10210
+ function safeUrl(path70) {
10211
+ if (typeof path70 !== "string") {
10212
+ return path70;
10213
10213
  }
10214
- const pathSegments = path69.split("?");
10214
+ const pathSegments = path70.split("?");
10215
10215
  if (pathSegments.length !== 2) {
10216
- return path69;
10216
+ return path70;
10217
10217
  }
10218
10218
  const qp = new URLSearchParams(pathSegments.pop());
10219
10219
  qp.sort();
10220
10220
  return [...pathSegments, qp.toString()].join("?");
10221
10221
  }
10222
10222
  __name(safeUrl, "safeUrl");
10223
- function matchKey(mockDispatch2, { path: path69, method, body, headers }) {
10224
- const pathMatch = matchValue(mockDispatch2.path, path69);
10223
+ function matchKey(mockDispatch2, { path: path70, method, body, headers }) {
10224
+ const pathMatch = matchValue(mockDispatch2.path, path70);
10225
10225
  const methodMatch = matchValue(mockDispatch2.method, method);
10226
10226
  const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
10227
10227
  const headersMatch = matchHeaders(mockDispatch2, headers);
@@ -10241,7 +10241,7 @@ var require_mock_utils = __commonJS({
10241
10241
  function getMockDispatch(mockDispatches, key) {
10242
10242
  const basePath = key.query ? buildURL(key.path, key.query) : key.path;
10243
10243
  const resolvedPath2 = typeof basePath === "string" ? safeUrl(basePath) : basePath;
10244
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path69 }) => matchValue(safeUrl(path69), resolvedPath2));
10244
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path70 }) => matchValue(safeUrl(path70), resolvedPath2));
10245
10245
  if (matchedMockDispatches.length === 0) {
10246
10246
  throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath2}'`);
10247
10247
  }
@@ -10281,9 +10281,9 @@ var require_mock_utils = __commonJS({
10281
10281
  }
10282
10282
  __name(deleteMockDispatch, "deleteMockDispatch");
10283
10283
  function buildKey(opts) {
10284
- const { path: path69, method, body, headers, query } = opts;
10284
+ const { path: path70, method, body, headers, query } = opts;
10285
10285
  return {
10286
- path: path69,
10286
+ path: path70,
10287
10287
  method,
10288
10288
  body,
10289
10289
  headers,
@@ -10751,10 +10751,10 @@ var require_pending_interceptors_formatter = __commonJS({
10751
10751
  }
10752
10752
  format(pendingInterceptors) {
10753
10753
  const withPrettyHeaders = pendingInterceptors.map(
10754
- ({ method, path: path69, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
10754
+ ({ method, path: path70, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
10755
10755
  Method: method,
10756
10756
  Origin: origin,
10757
- Path: path69,
10757
+ Path: path70,
10758
10758
  "Status code": statusCode,
10759
10759
  Persistent: persist ? "\u2705" : "\u274C",
10760
10760
  Invocations: timesInvoked,
@@ -15459,8 +15459,8 @@ var require_util6 = __commonJS({
15459
15459
  }
15460
15460
  }
15461
15461
  __name(validateCookieValue, "validateCookieValue");
15462
- function validateCookiePath(path69) {
15463
- for (const char of path69) {
15462
+ function validateCookiePath(path70) {
15463
+ for (const char of path70) {
15464
15464
  const code = char.charCodeAt(0);
15465
15465
  if (code < 33 || char === ";") {
15466
15466
  throw new Error("Invalid cookie path");
@@ -17193,11 +17193,11 @@ var require_undici = __commonJS({
17193
17193
  if (typeof opts.path !== "string") {
17194
17194
  throw new InvalidArgumentError("invalid opts.path");
17195
17195
  }
17196
- let path69 = opts.path;
17196
+ let path70 = opts.path;
17197
17197
  if (!opts.path.startsWith("/")) {
17198
- path69 = `/${path69}`;
17198
+ path70 = `/${path70}`;
17199
17199
  }
17200
- url4 = new URL(util5.parseOrigin(url4).origin + path69);
17200
+ url4 = new URL(util5.parseOrigin(url4).origin + path70);
17201
17201
  } else {
17202
17202
  if (!opts) {
17203
17203
  opts = typeof url4 === "object" ? url4 : {};
@@ -17441,7 +17441,7 @@ var require_XDGAppPaths = __commonJS({
17441
17441
  }
17442
17442
  __name(typeOf, "typeOf");
17443
17443
  function Adapt(adapter_) {
17444
- var meta = adapter_.meta, path69 = adapter_.path, xdg = adapter_.xdg;
17444
+ var meta = adapter_.meta, path70 = adapter_.path, xdg = adapter_.xdg;
17445
17445
  var XDGAppPaths_ = function() {
17446
17446
  function XDGAppPaths_2(options_) {
17447
17447
  if (options_ === void 0) {
@@ -17464,7 +17464,7 @@ var require_XDGAppPaths = __commonJS({
17464
17464
  meta.mainFilename()
17465
17465
  ];
17466
17466
  var nameFallback = "$eval";
17467
- var name2 = path69.parse(((_c2 = namePriorityList.find(function(e7) {
17467
+ var name2 = path70.parse(((_c2 = namePriorityList.find(function(e7) {
17468
17468
  return isString4(e7);
17469
17469
  })) !== null && _c2 !== void 0 ? _c2 : nameFallback) + suffix).name;
17470
17470
  XDGAppPaths.$name = /* @__PURE__ */ __name(function $name() {
@@ -17485,28 +17485,28 @@ var require_XDGAppPaths = __commonJS({
17485
17485
  }
17486
17486
  __name(finalPathSegment, "finalPathSegment");
17487
17487
  XDGAppPaths.cache = /* @__PURE__ */ __name(function cache6(dirOptions) {
17488
- return path69.join(xdg.cache(), finalPathSegment(dirOptions));
17488
+ return path70.join(xdg.cache(), finalPathSegment(dirOptions));
17489
17489
  }, "cache");
17490
17490
  XDGAppPaths.config = /* @__PURE__ */ __name(function config(dirOptions) {
17491
- return path69.join(xdg.config(), finalPathSegment(dirOptions));
17491
+ return path70.join(xdg.config(), finalPathSegment(dirOptions));
17492
17492
  }, "config");
17493
17493
  XDGAppPaths.data = /* @__PURE__ */ __name(function data(dirOptions) {
17494
- return path69.join(xdg.data(), finalPathSegment(dirOptions));
17494
+ return path70.join(xdg.data(), finalPathSegment(dirOptions));
17495
17495
  }, "data");
17496
17496
  XDGAppPaths.runtime = /* @__PURE__ */ __name(function runtime(dirOptions) {
17497
- return xdg.runtime() ? path69.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
17497
+ return xdg.runtime() ? path70.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
17498
17498
  }, "runtime");
17499
17499
  XDGAppPaths.state = /* @__PURE__ */ __name(function state2(dirOptions) {
17500
- return path69.join(xdg.state(), finalPathSegment(dirOptions));
17500
+ return path70.join(xdg.state(), finalPathSegment(dirOptions));
17501
17501
  }, "state");
17502
17502
  XDGAppPaths.configDirs = /* @__PURE__ */ __name(function configDirs(dirOptions) {
17503
17503
  return xdg.configDirs().map(function(s5) {
17504
- return path69.join(s5, finalPathSegment(dirOptions));
17504
+ return path70.join(s5, finalPathSegment(dirOptions));
17505
17505
  });
17506
17506
  }, "configDirs");
17507
17507
  XDGAppPaths.dataDirs = /* @__PURE__ */ __name(function dataDirs(dirOptions) {
17508
17508
  return xdg.dataDirs().map(function(s5) {
17509
- return path69.join(s5, finalPathSegment(dirOptions));
17509
+ return path70.join(s5, finalPathSegment(dirOptions));
17510
17510
  });
17511
17511
  }, "dataDirs");
17512
17512
  return XDGAppPaths;
@@ -17534,7 +17534,7 @@ var require_XDG = __commonJS({
17534
17534
  exports2.__esModule = true;
17535
17535
  exports2.Adapt = void 0;
17536
17536
  function Adapt(adapter_) {
17537
- var env7 = adapter_.env, osPaths = adapter_.osPaths, path69 = adapter_.path;
17537
+ var env7 = adapter_.env, osPaths = adapter_.osPaths, path70 = adapter_.path;
17538
17538
  var isMacOS = /^darwin$/i.test(adapter_.process.platform);
17539
17539
  var isWinOS = /^win/i.test(adapter_.process.platform);
17540
17540
  function baseDir() {
@@ -17542,7 +17542,7 @@ var require_XDG = __commonJS({
17542
17542
  }
17543
17543
  __name(baseDir, "baseDir");
17544
17544
  function valOrPath(val2, pathSegments) {
17545
- return val2 || path69.join.apply(path69, pathSegments);
17545
+ return val2 || path70.join.apply(path70, pathSegments);
17546
17546
  }
17547
17547
  __name(valOrPath, "valOrPath");
17548
17548
  var linux = /* @__PURE__ */ __name(function() {
@@ -17621,11 +17621,11 @@ var require_XDG = __commonJS({
17621
17621
  XDG.state = extension.state;
17622
17622
  XDG.configDirs = /* @__PURE__ */ __name(function configDirs() {
17623
17623
  var pathList = env7.get("XDG_CONFIG_DIRS");
17624
- return __spreadArray([extension.config()], pathList ? pathList.split(path69.delimiter) : []);
17624
+ return __spreadArray([extension.config()], pathList ? pathList.split(path70.delimiter) : []);
17625
17625
  }, "configDirs");
17626
17626
  XDG.dataDirs = /* @__PURE__ */ __name(function dataDirs() {
17627
17627
  var pathList = env7.get("XDG_DATA_DIRS");
17628
- return __spreadArray([extension.data()], pathList ? pathList.split(path69.delimiter) : []);
17628
+ return __spreadArray([extension.data()], pathList ? pathList.split(path70.delimiter) : []);
17629
17629
  }, "dataDirs");
17630
17630
  return XDG;
17631
17631
  }
@@ -17656,7 +17656,7 @@ var require_OSPaths = __commonJS({
17656
17656
  }
17657
17657
  __name(isEmpty, "isEmpty");
17658
17658
  function Adapt(adapter_) {
17659
- var env7 = adapter_.env, os13 = adapter_.os, path69 = adapter_.path;
17659
+ var env7 = adapter_.env, os13 = adapter_.os, path70 = adapter_.path;
17660
17660
  var isWinOS = /^win/i.test(adapter_.process.platform);
17661
17661
  function normalizePath2(path_) {
17662
17662
  return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
@@ -17671,7 +17671,7 @@ var require_OSPaths = __commonJS({
17671
17671
  typeof os13.homedir === "function" ? os13.homedir() : void 0,
17672
17672
  env7.get("USERPROFILE"),
17673
17673
  env7.get("HOME"),
17674
- env7.get("HOMEDRIVE") || env7.get("HOMEPATH") ? path69.join(env7.get("HOMEDRIVE") || "", env7.get("HOMEPATH") || "") : void 0
17674
+ env7.get("HOMEDRIVE") || env7.get("HOMEPATH") ? path70.join(env7.get("HOMEDRIVE") || "", env7.get("HOMEPATH") || "") : void 0
17675
17675
  ];
17676
17676
  return normalizePath2(priorityList.find(function(v7) {
17677
17677
  return !isEmpty(v7);
@@ -17682,7 +17682,7 @@ var require_OSPaths = __commonJS({
17682
17682
  __name(home, "home");
17683
17683
  function temp() {
17684
17684
  function joinPathToBase(base, segments) {
17685
- return base ? path69.join.apply(path69, __spreadArray([base], segments)) : void 0;
17685
+ return base ? path70.join.apply(path70, __spreadArray([base], segments)) : void 0;
17686
17686
  }
17687
17687
  __name(joinPathToBase, "joinPathToBase");
17688
17688
  function posix2() {
@@ -17794,7 +17794,7 @@ var require_node = __commonJS({
17794
17794
  exports2.__esModule = true;
17795
17795
  exports2.adapter = void 0;
17796
17796
  var os13 = __importStar(require("os"));
17797
- var path69 = __importStar(require("path"));
17797
+ var path70 = __importStar(require("path"));
17798
17798
  exports2.adapter = {
17799
17799
  atImportPermissions: { env: true },
17800
17800
  env: {
@@ -17803,7 +17803,7 @@ var require_node = __commonJS({
17803
17803
  }
17804
17804
  },
17805
17805
  os: os13,
17806
- path: path69,
17806
+ path: path70,
17807
17807
  process
17808
17808
  };
17809
17809
  }
@@ -17858,7 +17858,7 @@ var require_node2 = __commonJS({
17858
17858
  };
17859
17859
  exports2.__esModule = true;
17860
17860
  exports2.adapter = void 0;
17861
- var path69 = __importStar(require("path"));
17861
+ var path70 = __importStar(require("path"));
17862
17862
  var os_paths_1 = __importDefault(require_mod_cjs());
17863
17863
  exports2.adapter = {
17864
17864
  atImportPermissions: { env: true },
@@ -17868,7 +17868,7 @@ var require_node2 = __commonJS({
17868
17868
  }
17869
17869
  },
17870
17870
  osPaths: os_paths_1["default"],
17871
- path: path69,
17871
+ path: path70,
17872
17872
  process
17873
17873
  };
17874
17874
  }
@@ -17923,7 +17923,7 @@ var require_node3 = __commonJS({
17923
17923
  };
17924
17924
  exports2.__esModule = true;
17925
17925
  exports2.adapter = void 0;
17926
- var path69 = __importStar(require("path"));
17926
+ var path70 = __importStar(require("path"));
17927
17927
  var xdg_portable_1 = __importDefault(require_mod_cjs2());
17928
17928
  exports2.adapter = {
17929
17929
  atImportPermissions: { env: true, read: true },
@@ -17938,7 +17938,7 @@ var require_node3 = __commonJS({
17938
17938
  return process.pkg ? process.execPath : void 0;
17939
17939
  }
17940
17940
  },
17941
- path: path69,
17941
+ path: path70,
17942
17942
  process,
17943
17943
  xdg: xdg_portable_1["default"]
17944
17944
  };
@@ -20262,17 +20262,17 @@ var require_ignore = __commonJS({
20262
20262
  var throwError = /* @__PURE__ */ __name((message, Ctor) => {
20263
20263
  throw new Ctor(message);
20264
20264
  }, "throwError");
20265
- var checkPath = /* @__PURE__ */ __name((path69, originalPath, doThrow) => {
20266
- if (!isString4(path69)) {
20265
+ var checkPath = /* @__PURE__ */ __name((path70, originalPath, doThrow) => {
20266
+ if (!isString4(path70)) {
20267
20267
  return doThrow(
20268
20268
  `path must be a string, but got \`${originalPath}\``,
20269
20269
  TypeError
20270
20270
  );
20271
20271
  }
20272
- if (!path69) {
20272
+ if (!path70) {
20273
20273
  return doThrow(`path must not be empty`, TypeError);
20274
20274
  }
20275
- if (checkPath.isNotRelative(path69)) {
20275
+ if (checkPath.isNotRelative(path70)) {
20276
20276
  const r7 = "`path.relative()`d";
20277
20277
  return doThrow(
20278
20278
  `path should be a ${r7} string, but got "${originalPath}"`,
@@ -20281,7 +20281,7 @@ var require_ignore = __commonJS({
20281
20281
  }
20282
20282
  return true;
20283
20283
  }, "checkPath");
20284
- var isNotRelative = /* @__PURE__ */ __name((path69) => REGEX_TEST_INVALID_PATH.test(path69), "isNotRelative");
20284
+ var isNotRelative = /* @__PURE__ */ __name((path70) => REGEX_TEST_INVALID_PATH.test(path70), "isNotRelative");
20285
20285
  checkPath.isNotRelative = isNotRelative;
20286
20286
  checkPath.convert = (p6) => p6;
20287
20287
  var Ignore = class {
@@ -20340,7 +20340,7 @@ var require_ignore = __commonJS({
20340
20340
  // setting `checkUnignored` to `false` could reduce additional
20341
20341
  // path matching.
20342
20342
  // @returns {TestResult} true if a file is ignored
20343
- _testOne(path69, checkUnignored) {
20343
+ _testOne(path70, checkUnignored) {
20344
20344
  let ignored = false;
20345
20345
  let unignored = false;
20346
20346
  this._rules.forEach((rule) => {
@@ -20348,7 +20348,7 @@ var require_ignore = __commonJS({
20348
20348
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
20349
20349
  return;
20350
20350
  }
20351
- const matched = rule.regex.test(path69);
20351
+ const matched = rule.regex.test(path70);
20352
20352
  if (matched) {
20353
20353
  ignored = !negative;
20354
20354
  unignored = negative;
@@ -20361,24 +20361,24 @@ var require_ignore = __commonJS({
20361
20361
  }
20362
20362
  // @returns {TestResult}
20363
20363
  _test(originalPath, cache6, checkUnignored, slices) {
20364
- const path69 = originalPath && checkPath.convert(originalPath);
20364
+ const path70 = originalPath && checkPath.convert(originalPath);
20365
20365
  checkPath(
20366
- path69,
20366
+ path70,
20367
20367
  originalPath,
20368
20368
  this._allowRelativePaths ? RETURN_FALSE : throwError
20369
20369
  );
20370
- return this._t(path69, cache6, checkUnignored, slices);
20370
+ return this._t(path70, cache6, checkUnignored, slices);
20371
20371
  }
20372
- _t(path69, cache6, checkUnignored, slices) {
20373
- if (path69 in cache6) {
20374
- return cache6[path69];
20372
+ _t(path70, cache6, checkUnignored, slices) {
20373
+ if (path70 in cache6) {
20374
+ return cache6[path70];
20375
20375
  }
20376
20376
  if (!slices) {
20377
- slices = path69.split(SLASH2);
20377
+ slices = path70.split(SLASH2);
20378
20378
  }
20379
20379
  slices.pop();
20380
20380
  if (!slices.length) {
20381
- return cache6[path69] = this._testOne(path69, checkUnignored);
20381
+ return cache6[path70] = this._testOne(path70, checkUnignored);
20382
20382
  }
20383
20383
  const parent = this._t(
20384
20384
  slices.join(SLASH2) + SLASH2,
@@ -20386,25 +20386,25 @@ var require_ignore = __commonJS({
20386
20386
  checkUnignored,
20387
20387
  slices
20388
20388
  );
20389
- return cache6[path69] = parent.ignored ? parent : this._testOne(path69, checkUnignored);
20389
+ return cache6[path70] = parent.ignored ? parent : this._testOne(path70, checkUnignored);
20390
20390
  }
20391
- ignores(path69) {
20392
- return this._test(path69, this._ignoreCache, false).ignored;
20391
+ ignores(path70) {
20392
+ return this._test(path70, this._ignoreCache, false).ignored;
20393
20393
  }
20394
20394
  createFilter() {
20395
- return (path69) => !this.ignores(path69);
20395
+ return (path70) => !this.ignores(path70);
20396
20396
  }
20397
20397
  filter(paths) {
20398
20398
  return makeArray(paths).filter(this.createFilter());
20399
20399
  }
20400
20400
  // @returns {TestResult}
20401
- test(path69) {
20402
- return this._test(path69, this._testCache, true);
20401
+ test(path70) {
20402
+ return this._test(path70, this._testCache, true);
20403
20403
  }
20404
20404
  };
20405
20405
  __name(Ignore, "Ignore");
20406
20406
  var factory = /* @__PURE__ */ __name((options30) => new Ignore(options30), "factory");
20407
- var isPathValid = /* @__PURE__ */ __name((path69) => checkPath(path69 && checkPath.convert(path69), path69, RETURN_FALSE), "isPathValid");
20407
+ var isPathValid = /* @__PURE__ */ __name((path70) => checkPath(path70 && checkPath.convert(path70), path70, RETURN_FALSE), "isPathValid");
20408
20408
  factory.isPathValid = isPathValid;
20409
20409
  factory.default = factory;
20410
20410
  module3.exports = factory;
@@ -20415,7 +20415,7 @@ var require_ignore = __commonJS({
20415
20415
  const makePosix = /* @__PURE__ */ __name((str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/"), "makePosix");
20416
20416
  checkPath.convert = makePosix;
20417
20417
  const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
20418
- checkPath.isNotRelative = (path69) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path69) || isNotRelative(path69);
20418
+ checkPath.isNotRelative = (path70) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path70) || isNotRelative(path70);
20419
20419
  }
20420
20420
  }
20421
20421
  });
@@ -22630,7 +22630,7 @@ var require_main2 = __commonJS({
22630
22630
  "../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js"(exports2, module3) {
22631
22631
  init_import_meta_url();
22632
22632
  var fs29 = require("fs");
22633
- var path69 = require("path");
22633
+ var path70 = require("path");
22634
22634
  var os13 = require("os");
22635
22635
  var crypto7 = require("crypto");
22636
22636
  var packageJson = require_package();
@@ -22729,7 +22729,7 @@ var require_main2 = __commonJS({
22729
22729
  }
22730
22730
  __name(_instructions, "_instructions");
22731
22731
  function _vaultPath(options30) {
22732
- let dotenvPath = path69.resolve(process.cwd(), ".env");
22732
+ let dotenvPath = path70.resolve(process.cwd(), ".env");
22733
22733
  if (options30 && options30.path && options30.path.length > 0) {
22734
22734
  dotenvPath = options30.path;
22735
22735
  }
@@ -22737,7 +22737,7 @@ var require_main2 = __commonJS({
22737
22737
  }
22738
22738
  __name(_vaultPath, "_vaultPath");
22739
22739
  function _resolveHome(envPath) {
22740
- return envPath[0] === "~" ? path69.join(os13.homedir(), envPath.slice(1)) : envPath;
22740
+ return envPath[0] === "~" ? path70.join(os13.homedir(), envPath.slice(1)) : envPath;
22741
22741
  }
22742
22742
  __name(_resolveHome, "_resolveHome");
22743
22743
  function _configVault(options30) {
@@ -22752,7 +22752,7 @@ var require_main2 = __commonJS({
22752
22752
  }
22753
22753
  __name(_configVault, "_configVault");
22754
22754
  function configDotenv(options30) {
22755
- let dotenvPath = path69.resolve(process.cwd(), ".env");
22755
+ let dotenvPath = path70.resolve(process.cwd(), ".env");
22756
22756
  let encoding = "utf8";
22757
22757
  const debug = Boolean(options30 && options30.debug);
22758
22758
  if (options30) {
@@ -28804,13 +28804,13 @@ var require_define_lazy_prop = __commonJS({
28804
28804
  var require_open = __commonJS({
28805
28805
  "../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js"(exports2, module3) {
28806
28806
  init_import_meta_url();
28807
- var path69 = require("path");
28807
+ var path70 = require("path");
28808
28808
  var childProcess2 = require("child_process");
28809
28809
  var { promises: fs29, constants: fsConstants } = require("fs");
28810
28810
  var isWsl = require_is_wsl();
28811
28811
  var isDocker = require_is_docker();
28812
28812
  var defineLazyProperty = require_define_lazy_prop();
28813
- var localXdgOpenPath = path69.join(__dirname, "xdg-open");
28813
+ var localXdgOpenPath = path70.join(__dirname, "xdg-open");
28814
28814
  var { platform: platform3, arch: arch2 } = process;
28815
28815
  var getWslDrivesMountPoint = (() => {
28816
28816
  const defaultMountPoint = "/mnt/";
@@ -29241,8 +29241,8 @@ var require_path_parse = __commonJS({
29241
29241
  var require_node_modules_paths = __commonJS({
29242
29242
  "../../node_modules/.pnpm/resolve@1.22.8/node_modules/resolve/lib/node-modules-paths.js"(exports2, module3) {
29243
29243
  init_import_meta_url();
29244
- var path69 = require("path");
29245
- var parse8 = path69.parse || require_path_parse();
29244
+ var path70 = require("path");
29245
+ var parse8 = path70.parse || require_path_parse();
29246
29246
  var getNodeModulesDirs = /* @__PURE__ */ __name(function getNodeModulesDirs2(absoluteStart, modules) {
29247
29247
  var prefix = "/";
29248
29248
  if (/^([A-Za-z]:)/.test(absoluteStart)) {
@@ -29258,7 +29258,7 @@ var require_node_modules_paths = __commonJS({
29258
29258
  }
29259
29259
  return paths.reduce(function(dirs, aPath) {
29260
29260
  return dirs.concat(modules.map(function(moduleDir) {
29261
- return path69.resolve(prefix, aPath, moduleDir);
29261
+ return path70.resolve(prefix, aPath, moduleDir);
29262
29262
  }));
29263
29263
  }, []);
29264
29264
  }, "getNodeModulesDirs");
@@ -29624,7 +29624,7 @@ var require_async = __commonJS({
29624
29624
  init_import_meta_url();
29625
29625
  var fs29 = require("fs");
29626
29626
  var getHomedir = require_homedir();
29627
- var path69 = require("path");
29627
+ var path70 = require("path");
29628
29628
  var caller = require_caller();
29629
29629
  var nodeModulesPaths = require_node_modules_paths();
29630
29630
  var normalizeOptions = require_normalize_options();
@@ -29633,8 +29633,8 @@ var require_async = __commonJS({
29633
29633
  var homedir3 = getHomedir();
29634
29634
  var defaultPaths = /* @__PURE__ */ __name(function() {
29635
29635
  return [
29636
- path69.join(homedir3, ".node_modules"),
29637
- path69.join(homedir3, ".node_libraries")
29636
+ path70.join(homedir3, ".node_modules"),
29637
+ path70.join(homedir3, ".node_libraries")
29638
29638
  ];
29639
29639
  }, "defaultPaths");
29640
29640
  var defaultIsFile = /* @__PURE__ */ __name(function isFile(file, cb2) {
@@ -29689,7 +29689,7 @@ var require_async = __commonJS({
29689
29689
  var getPackageCandidates = /* @__PURE__ */ __name(function getPackageCandidates2(x6, start, opts) {
29690
29690
  var dirs = nodeModulesPaths(start, opts, x6);
29691
29691
  for (var i5 = 0; i5 < dirs.length; i5++) {
29692
- dirs[i5] = path69.join(dirs[i5], x6);
29692
+ dirs[i5] = path70.join(dirs[i5], x6);
29693
29693
  }
29694
29694
  return dirs;
29695
29695
  }, "getPackageCandidates");
@@ -29721,10 +29721,10 @@ var require_async = __commonJS({
29721
29721
  var packageIterator = opts.packageIterator;
29722
29722
  var extensions = opts.extensions || [".js"];
29723
29723
  var includeCoreModules = opts.includeCoreModules !== false;
29724
- var basedir = opts.basedir || path69.dirname(caller());
29724
+ var basedir = opts.basedir || path70.dirname(caller());
29725
29725
  var parent = opts.filename || basedir;
29726
29726
  opts.paths = opts.paths || defaultPaths();
29727
- var absoluteStart = path69.resolve(basedir);
29727
+ var absoluteStart = path70.resolve(basedir);
29728
29728
  maybeRealpath(
29729
29729
  realpath2,
29730
29730
  absoluteStart,
@@ -29739,7 +29739,7 @@ var require_async = __commonJS({
29739
29739
  var res;
29740
29740
  function init2(basedir2) {
29741
29741
  if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x6)) {
29742
- res = path69.resolve(basedir2, x6);
29742
+ res = path70.resolve(basedir2, x6);
29743
29743
  if (x6 === "." || x6 === ".." || x6.slice(-1) === "/")
29744
29744
  res += "/";
29745
29745
  if (/\/$/.test(x6) && res === basedir2) {
@@ -29810,19 +29810,19 @@ var require_async = __commonJS({
29810
29810
  if (pkg)
29811
29811
  onpkg(null, pkg);
29812
29812
  else
29813
- loadpkg(path69.dirname(file), onpkg);
29813
+ loadpkg(path70.dirname(file), onpkg);
29814
29814
  function onpkg(err2, pkg_, dir) {
29815
29815
  pkg = pkg_;
29816
29816
  if (err2)
29817
29817
  return cb3(err2);
29818
29818
  if (dir && pkg && opts.pathFilter) {
29819
- var rfile = path69.relative(dir, file);
29819
+ var rfile = path70.relative(dir, file);
29820
29820
  var rel = rfile.slice(0, rfile.length - exts2[0].length);
29821
29821
  var r7 = opts.pathFilter(pkg, x8, rel);
29822
29822
  if (r7)
29823
29823
  return load(
29824
29824
  [""].concat(extensions.slice()),
29825
- path69.resolve(dir, r7),
29825
+ path70.resolve(dir, r7),
29826
29826
  pkg
29827
29827
  );
29828
29828
  }
@@ -29851,11 +29851,11 @@ var require_async = __commonJS({
29851
29851
  return cb3(null);
29852
29852
  maybeRealpath(realpath2, dir, opts, function(unwrapErr, pkgdir) {
29853
29853
  if (unwrapErr)
29854
- return loadpkg(path69.dirname(dir), cb3);
29855
- var pkgfile = path69.join(pkgdir, "package.json");
29854
+ return loadpkg(path70.dirname(dir), cb3);
29855
+ var pkgfile = path70.join(pkgdir, "package.json");
29856
29856
  isFile(pkgfile, function(err2, ex) {
29857
29857
  if (!ex)
29858
- return loadpkg(path69.dirname(dir), cb3);
29858
+ return loadpkg(path70.dirname(dir), cb3);
29859
29859
  readPackage(readFile17, pkgfile, function(err3, pkgParam) {
29860
29860
  if (err3)
29861
29861
  cb3(err3);
@@ -29879,12 +29879,12 @@ var require_async = __commonJS({
29879
29879
  maybeRealpath(realpath2, x7, opts, function(unwrapErr, pkgdir) {
29880
29880
  if (unwrapErr)
29881
29881
  return cb3(unwrapErr);
29882
- var pkgfile = path69.join(pkgdir, "package.json");
29882
+ var pkgfile = path70.join(pkgdir, "package.json");
29883
29883
  isFile(pkgfile, function(err2, ex) {
29884
29884
  if (err2)
29885
29885
  return cb3(err2);
29886
29886
  if (!ex)
29887
- return loadAsFile(path69.join(x7, "index"), fpkg, cb3);
29887
+ return loadAsFile(path70.join(x7, "index"), fpkg, cb3);
29888
29888
  readPackage(readFile17, pkgfile, function(err3, pkgParam) {
29889
29889
  if (err3)
29890
29890
  return cb3(err3);
@@ -29901,25 +29901,25 @@ var require_async = __commonJS({
29901
29901
  if (pkg.main === "." || pkg.main === "./") {
29902
29902
  pkg.main = "index";
29903
29903
  }
29904
- loadAsFile(path69.resolve(x7, pkg.main), pkg, function(err4, m6, pkg2) {
29904
+ loadAsFile(path70.resolve(x7, pkg.main), pkg, function(err4, m6, pkg2) {
29905
29905
  if (err4)
29906
29906
  return cb3(err4);
29907
29907
  if (m6)
29908
29908
  return cb3(null, m6, pkg2);
29909
29909
  if (!pkg2)
29910
- return loadAsFile(path69.join(x7, "index"), pkg2, cb3);
29911
- var dir = path69.resolve(x7, pkg2.main);
29910
+ return loadAsFile(path70.join(x7, "index"), pkg2, cb3);
29911
+ var dir = path70.resolve(x7, pkg2.main);
29912
29912
  loadAsDirectory(dir, pkg2, function(err5, n6, pkg3) {
29913
29913
  if (err5)
29914
29914
  return cb3(err5);
29915
29915
  if (n6)
29916
29916
  return cb3(null, n6, pkg3);
29917
- loadAsFile(path69.join(x7, "index"), pkg3, cb3);
29917
+ loadAsFile(path70.join(x7, "index"), pkg3, cb3);
29918
29918
  });
29919
29919
  });
29920
29920
  return;
29921
29921
  }
29922
- loadAsFile(path69.join(x7, "/index"), pkg, cb3);
29922
+ loadAsFile(path70.join(x7, "/index"), pkg, cb3);
29923
29923
  });
29924
29924
  });
29925
29925
  });
@@ -29929,7 +29929,7 @@ var require_async = __commonJS({
29929
29929
  if (dirs.length === 0)
29930
29930
  return cb3(null, void 0);
29931
29931
  var dir = dirs[0];
29932
- isDirectory2(path69.dirname(dir), isdir);
29932
+ isDirectory2(path70.dirname(dir), isdir);
29933
29933
  function isdir(err2, isdir2) {
29934
29934
  if (err2)
29935
29935
  return cb3(err2);
@@ -30169,7 +30169,7 @@ var require_sync = __commonJS({
30169
30169
  init_import_meta_url();
30170
30170
  var isCore = require_is_core_module();
30171
30171
  var fs29 = require("fs");
30172
- var path69 = require("path");
30172
+ var path70 = require("path");
30173
30173
  var getHomedir = require_homedir();
30174
30174
  var caller = require_caller();
30175
30175
  var nodeModulesPaths = require_node_modules_paths();
@@ -30178,8 +30178,8 @@ var require_sync = __commonJS({
30178
30178
  var homedir3 = getHomedir();
30179
30179
  var defaultPaths = /* @__PURE__ */ __name(function() {
30180
30180
  return [
30181
- path69.join(homedir3, ".node_modules"),
30182
- path69.join(homedir3, ".node_libraries")
30181
+ path70.join(homedir3, ".node_modules"),
30182
+ path70.join(homedir3, ".node_libraries")
30183
30183
  ];
30184
30184
  }, "defaultPaths");
30185
30185
  var defaultIsFile = /* @__PURE__ */ __name(function isFile(file) {
@@ -30229,7 +30229,7 @@ var require_sync = __commonJS({
30229
30229
  var getPackageCandidates = /* @__PURE__ */ __name(function getPackageCandidates2(x6, start, opts) {
30230
30230
  var dirs = nodeModulesPaths(start, opts, x6);
30231
30231
  for (var i5 = 0; i5 < dirs.length; i5++) {
30232
- dirs[i5] = path69.join(dirs[i5], x6);
30232
+ dirs[i5] = path70.join(dirs[i5], x6);
30233
30233
  }
30234
30234
  return dirs;
30235
30235
  }, "getPackageCandidates");
@@ -30249,12 +30249,12 @@ var require_sync = __commonJS({
30249
30249
  var packageIterator = opts.packageIterator;
30250
30250
  var extensions = opts.extensions || [".js"];
30251
30251
  var includeCoreModules = opts.includeCoreModules !== false;
30252
- var basedir = opts.basedir || path69.dirname(caller());
30252
+ var basedir = opts.basedir || path70.dirname(caller());
30253
30253
  var parent = opts.filename || basedir;
30254
30254
  opts.paths = opts.paths || defaultPaths();
30255
- var absoluteStart = maybeRealpathSync(realpathSync4, path69.resolve(basedir), opts);
30255
+ var absoluteStart = maybeRealpathSync(realpathSync4, path70.resolve(basedir), opts);
30256
30256
  if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x6)) {
30257
- var res = path69.resolve(absoluteStart, x6);
30257
+ var res = path70.resolve(absoluteStart, x6);
30258
30258
  if (x6 === "." || x6 === ".." || x6.slice(-1) === "/")
30259
30259
  res += "/";
30260
30260
  var m6 = loadAsFileSync(res) || loadAsDirectorySync(res);
@@ -30271,12 +30271,12 @@ var require_sync = __commonJS({
30271
30271
  err.code = "MODULE_NOT_FOUND";
30272
30272
  throw err;
30273
30273
  function loadAsFileSync(x7) {
30274
- var pkg = loadpkg(path69.dirname(x7));
30274
+ var pkg = loadpkg(path70.dirname(x7));
30275
30275
  if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
30276
- var rfile = path69.relative(pkg.dir, x7);
30276
+ var rfile = path70.relative(pkg.dir, x7);
30277
30277
  var r7 = opts.pathFilter(pkg.pkg, x7, rfile);
30278
30278
  if (r7) {
30279
- x7 = path69.resolve(pkg.dir, r7);
30279
+ x7 = path70.resolve(pkg.dir, r7);
30280
30280
  }
30281
30281
  }
30282
30282
  if (isFile(x7)) {
@@ -30298,9 +30298,9 @@ var require_sync = __commonJS({
30298
30298
  }
30299
30299
  if (/[/\\]node_modules[/\\]*$/.test(dir))
30300
30300
  return;
30301
- var pkgfile = path69.join(maybeRealpathSync(realpathSync4, dir, opts), "package.json");
30301
+ var pkgfile = path70.join(maybeRealpathSync(realpathSync4, dir, opts), "package.json");
30302
30302
  if (!isFile(pkgfile)) {
30303
- return loadpkg(path69.dirname(dir));
30303
+ return loadpkg(path70.dirname(dir));
30304
30304
  }
30305
30305
  var pkg = readPackageSync(readFileSync27, pkgfile);
30306
30306
  if (pkg && opts.packageFilter) {
@@ -30314,7 +30314,7 @@ var require_sync = __commonJS({
30314
30314
  }
30315
30315
  __name(loadpkg, "loadpkg");
30316
30316
  function loadAsDirectorySync(x7) {
30317
- var pkgfile = path69.join(maybeRealpathSync(realpathSync4, x7, opts), "/package.json");
30317
+ var pkgfile = path70.join(maybeRealpathSync(realpathSync4, x7, opts), "/package.json");
30318
30318
  if (isFile(pkgfile)) {
30319
30319
  try {
30320
30320
  var pkg = readPackageSync(readFileSync27, pkgfile);
@@ -30337,17 +30337,17 @@ var require_sync = __commonJS({
30337
30337
  pkg.main = "index";
30338
30338
  }
30339
30339
  try {
30340
- var m7 = loadAsFileSync(path69.resolve(x7, pkg.main));
30340
+ var m7 = loadAsFileSync(path70.resolve(x7, pkg.main));
30341
30341
  if (m7)
30342
30342
  return m7;
30343
- var n7 = loadAsDirectorySync(path69.resolve(x7, pkg.main));
30343
+ var n7 = loadAsDirectorySync(path70.resolve(x7, pkg.main));
30344
30344
  if (n7)
30345
30345
  return n7;
30346
30346
  } catch (e7) {
30347
30347
  }
30348
30348
  }
30349
30349
  }
30350
- return loadAsFileSync(path69.join(x7, "/index"));
30350
+ return loadAsFileSync(path70.join(x7, "/index"));
30351
30351
  }
30352
30352
  __name(loadAsDirectorySync, "loadAsDirectorySync");
30353
30353
  function loadNodeModulesSync(x7, start) {
@@ -30357,7 +30357,7 @@ var require_sync = __commonJS({
30357
30357
  var dirs = packageIterator ? packageIterator(x7, start, thunk, opts) : thunk();
30358
30358
  for (var i5 = 0; i5 < dirs.length; i5++) {
30359
30359
  var dir = dirs[i5];
30360
- if (isDirectory2(path69.dirname(dir))) {
30360
+ if (isDirectory2(path70.dirname(dir))) {
30361
30361
  var m7 = loadAsFileSync(dir);
30362
30362
  if (m7)
30363
30363
  return m7;
@@ -30630,7 +30630,7 @@ var require_utils3 = __commonJS({
30630
30630
  init_import_meta_url();
30631
30631
  var fs29 = require("fs");
30632
30632
  var ini = require_ini();
30633
- var path69 = require("path");
30633
+ var path70 = require("path");
30634
30634
  var stripJsonComments = require_strip_json_comments();
30635
30635
  var parse8 = exports2.parse = function(content) {
30636
30636
  if (/^\s*{/.test(content))
@@ -30644,7 +30644,7 @@ var require_utils3 = __commonJS({
30644
30644
  for (var i5 in args)
30645
30645
  if ("string" !== typeof args[i5])
30646
30646
  return;
30647
- var file2 = path69.join.apply(null, args);
30647
+ var file2 = path70.join.apply(null, args);
30648
30648
  var content;
30649
30649
  try {
30650
30650
  return fs29.readFileSync(file2, "utf-8");
@@ -30682,15 +30682,15 @@ var require_utils3 = __commonJS({
30682
30682
  return obj;
30683
30683
  };
30684
30684
  var find = exports2.find = function() {
30685
- var rel = path69.join.apply(null, [].slice.call(arguments));
30685
+ var rel = path70.join.apply(null, [].slice.call(arguments));
30686
30686
  function find2(start, rel2) {
30687
- var file2 = path69.join(start, rel2);
30687
+ var file2 = path70.join(start, rel2);
30688
30688
  try {
30689
30689
  fs29.statSync(file2);
30690
30690
  return file2;
30691
30691
  } catch (err) {
30692
- if (path69.dirname(start) !== start)
30693
- return find2(path69.dirname(start), rel2);
30692
+ if (path70.dirname(start) !== start)
30693
+ return find2(path70.dirname(start), rel2);
30694
30694
  }
30695
30695
  }
30696
30696
  __name(find2, "find");
@@ -31203,8 +31203,8 @@ var require_registry_auth_token = __commonJS({
31203
31203
  return void 0;
31204
31204
  }
31205
31205
  __name(getLegacyAuthInfo, "getLegacyAuthInfo");
31206
- function normalizePath2(path69) {
31207
- return path69[path69.length - 1] === "/" ? path69 : path69 + "/";
31206
+ function normalizePath2(path70) {
31207
+ return path70[path70.length - 1] === "/" ? path70 : path70 + "/";
31208
31208
  }
31209
31209
  __name(normalizePath2, "normalizePath");
31210
31210
  function getAuthInfoForUrl(regUrl, npmrc) {
@@ -53552,11 +53552,11 @@ var require_Mime = __commonJS({
53552
53552
  }
53553
53553
  }
53554
53554
  };
53555
- Mime.prototype.getType = function(path69) {
53556
- path69 = String(path69);
53557
- let last = path69.replace(/^.*[/\\]/, "").toLowerCase();
53555
+ Mime.prototype.getType = function(path70) {
53556
+ path70 = String(path70);
53557
+ let last = path70.replace(/^.*[/\\]/, "").toLowerCase();
53558
53558
  let ext = last.replace(/^.*\./, "").toLowerCase();
53559
- let hasPath = last.length < path69.length;
53559
+ let hasPath = last.length < path70.length;
53560
53560
  let hasDot = ext.length < last.length - 1;
53561
53561
  return (hasDot || !hasPath) && this._types[ext] || null;
53562
53562
  };
@@ -53642,15 +53642,15 @@ var require_eventemitter3 = __commonJS({
53642
53642
  }
53643
53643
  __name(EventEmitter5, "EventEmitter");
53644
53644
  EventEmitter5.prototype.eventNames = /* @__PURE__ */ __name(function eventNames() {
53645
- var names = [], events4, name2;
53645
+ var names = [], events5, name2;
53646
53646
  if (this._eventsCount === 0)
53647
53647
  return names;
53648
- for (name2 in events4 = this._events) {
53649
- if (has.call(events4, name2))
53648
+ for (name2 in events5 = this._events) {
53649
+ if (has.call(events5, name2))
53650
53650
  names.push(prefix ? name2.slice(1) : name2);
53651
53651
  }
53652
53652
  if (Object.getOwnPropertySymbols) {
53653
- return names.concat(Object.getOwnPropertySymbols(events4));
53653
+ return names.concat(Object.getOwnPropertySymbols(events5));
53654
53654
  }
53655
53655
  return names;
53656
53656
  }, "eventNames");
@@ -53748,13 +53748,13 @@ var require_eventemitter3 = __commonJS({
53748
53748
  clearEvent(this, evt);
53749
53749
  }
53750
53750
  } else {
53751
- for (var i5 = 0, events4 = [], length = listeners.length; i5 < length; i5++) {
53751
+ for (var i5 = 0, events5 = [], length = listeners.length; i5 < length; i5++) {
53752
53752
  if (listeners[i5].fn !== fn2 || once && !listeners[i5].once || context2 && listeners[i5].context !== context2) {
53753
- events4.push(listeners[i5]);
53753
+ events5.push(listeners[i5]);
53754
53754
  }
53755
53755
  }
53756
- if (events4.length)
53757
- this._events[evt] = events4.length === 1 ? events4[0] : events4;
53756
+ if (events5.length)
53757
+ this._events[evt] = events5.length === 1 ? events5[0] : events5;
53758
53758
  else
53759
53759
  clearEvent(this, evt);
53760
53760
  }
@@ -53923,7 +53923,7 @@ var require_command_exists = __commonJS({
53923
53923
  var exec3 = require("child_process").exec;
53924
53924
  var execSync4 = require("child_process").execSync;
53925
53925
  var fs29 = require("fs");
53926
- var path69 = require("path");
53926
+ var path70 = require("path");
53927
53927
  var access3 = fs29.access;
53928
53928
  var accessSync = fs29.accessSync;
53929
53929
  var constants3 = fs29.constants || fs29;
@@ -54027,8 +54027,8 @@ var require_command_exists = __commonJS({
54027
54027
  cleanInput = /* @__PURE__ */ __name(function(s5) {
54028
54028
  var isPathName = /[\\]/.test(s5);
54029
54029
  if (isPathName) {
54030
- var dirname17 = '"' + path69.dirname(s5) + '"';
54031
- var basename7 = '"' + path69.basename(s5) + '"';
54030
+ var dirname17 = '"' + path70.dirname(s5) + '"';
54031
+ var basename7 = '"' + path70.basename(s5) + '"';
54032
54032
  return dirname17 + ":" + basename7;
54033
54033
  }
54034
54034
  return '"' + s5 + '"';
@@ -54079,7 +54079,7 @@ var require_windows = __commonJS({
54079
54079
  module3.exports = isexe;
54080
54080
  isexe.sync = sync;
54081
54081
  var fs29 = require("fs");
54082
- function checkPathExt(path69, options30) {
54082
+ function checkPathExt(path70, options30) {
54083
54083
  var pathext = options30.pathExt !== void 0 ? options30.pathExt : process.env.PATHEXT;
54084
54084
  if (!pathext) {
54085
54085
  return true;
@@ -54090,28 +54090,28 @@ var require_windows = __commonJS({
54090
54090
  }
54091
54091
  for (var i5 = 0; i5 < pathext.length; i5++) {
54092
54092
  var p6 = pathext[i5].toLowerCase();
54093
- if (p6 && path69.substr(-p6.length).toLowerCase() === p6) {
54093
+ if (p6 && path70.substr(-p6.length).toLowerCase() === p6) {
54094
54094
  return true;
54095
54095
  }
54096
54096
  }
54097
54097
  return false;
54098
54098
  }
54099
54099
  __name(checkPathExt, "checkPathExt");
54100
- function checkStat(stat8, path69, options30) {
54100
+ function checkStat(stat8, path70, options30) {
54101
54101
  if (!stat8.isSymbolicLink() && !stat8.isFile()) {
54102
54102
  return false;
54103
54103
  }
54104
- return checkPathExt(path69, options30);
54104
+ return checkPathExt(path70, options30);
54105
54105
  }
54106
54106
  __name(checkStat, "checkStat");
54107
- function isexe(path69, options30, cb2) {
54108
- fs29.stat(path69, function(er, stat8) {
54109
- cb2(er, er ? false : checkStat(stat8, path69, options30));
54107
+ function isexe(path70, options30, cb2) {
54108
+ fs29.stat(path70, function(er, stat8) {
54109
+ cb2(er, er ? false : checkStat(stat8, path70, options30));
54110
54110
  });
54111
54111
  }
54112
54112
  __name(isexe, "isexe");
54113
- function sync(path69, options30) {
54114
- return checkStat(fs29.statSync(path69), path69, options30);
54113
+ function sync(path70, options30) {
54114
+ return checkStat(fs29.statSync(path70), path70, options30);
54115
54115
  }
54116
54116
  __name(sync, "sync");
54117
54117
  }
@@ -54124,14 +54124,14 @@ var require_mode = __commonJS({
54124
54124
  module3.exports = isexe;
54125
54125
  isexe.sync = sync;
54126
54126
  var fs29 = require("fs");
54127
- function isexe(path69, options30, cb2) {
54128
- fs29.stat(path69, function(er, stat8) {
54127
+ function isexe(path70, options30, cb2) {
54128
+ fs29.stat(path70, function(er, stat8) {
54129
54129
  cb2(er, er ? false : checkStat(stat8, options30));
54130
54130
  });
54131
54131
  }
54132
54132
  __name(isexe, "isexe");
54133
- function sync(path69, options30) {
54134
- return checkStat(fs29.statSync(path69), options30);
54133
+ function sync(path70, options30) {
54134
+ return checkStat(fs29.statSync(path70), options30);
54135
54135
  }
54136
54136
  __name(sync, "sync");
54137
54137
  function checkStat(stat8, options30) {
@@ -54168,7 +54168,7 @@ var require_isexe = __commonJS({
54168
54168
  }
54169
54169
  module3.exports = isexe;
54170
54170
  isexe.sync = sync;
54171
- function isexe(path69, options30, cb2) {
54171
+ function isexe(path70, options30, cb2) {
54172
54172
  if (typeof options30 === "function") {
54173
54173
  cb2 = options30;
54174
54174
  options30 = {};
@@ -54178,7 +54178,7 @@ var require_isexe = __commonJS({
54178
54178
  throw new TypeError("callback not provided");
54179
54179
  }
54180
54180
  return new Promise(function(resolve24, reject) {
54181
- isexe(path69, options30 || {}, function(er, is2) {
54181
+ isexe(path70, options30 || {}, function(er, is2) {
54182
54182
  if (er) {
54183
54183
  reject(er);
54184
54184
  } else {
@@ -54187,7 +54187,7 @@ var require_isexe = __commonJS({
54187
54187
  });
54188
54188
  });
54189
54189
  }
54190
- core(path69, options30 || {}, function(er, is2) {
54190
+ core(path70, options30 || {}, function(er, is2) {
54191
54191
  if (er) {
54192
54192
  if (er.code === "EACCES" || options30 && options30.ignoreErrors) {
54193
54193
  er = null;
@@ -54198,9 +54198,9 @@ var require_isexe = __commonJS({
54198
54198
  });
54199
54199
  }
54200
54200
  __name(isexe, "isexe");
54201
- function sync(path69, options30) {
54201
+ function sync(path70, options30) {
54202
54202
  try {
54203
- return core.sync(path69, options30 || {});
54203
+ return core.sync(path70, options30 || {});
54204
54204
  } catch (er) {
54205
54205
  if (options30 && options30.ignoreErrors || er.code === "EACCES") {
54206
54206
  return false;
@@ -54218,7 +54218,7 @@ var require_which = __commonJS({
54218
54218
  "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module3) {
54219
54219
  init_import_meta_url();
54220
54220
  var isWindows4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
54221
- var path69 = require("path");
54221
+ var path70 = require("path");
54222
54222
  var COLON = isWindows4 ? ";" : ":";
54223
54223
  var isexe = require_isexe();
54224
54224
  var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
@@ -54256,7 +54256,7 @@ var require_which = __commonJS({
54256
54256
  return opt.all && found.length ? resolve24(found) : reject(getNotFoundError(cmd));
54257
54257
  const ppRaw = pathEnv[i5];
54258
54258
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
54259
- const pCmd = path69.join(pathPart, cmd);
54259
+ const pCmd = path70.join(pathPart, cmd);
54260
54260
  const p6 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
54261
54261
  resolve24(subStep(p6, i5, 0));
54262
54262
  }), "step");
@@ -54283,7 +54283,7 @@ var require_which = __commonJS({
54283
54283
  for (let i5 = 0; i5 < pathEnv.length; i5++) {
54284
54284
  const ppRaw = pathEnv[i5];
54285
54285
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
54286
- const pCmd = path69.join(pathPart, cmd);
54286
+ const pCmd = path70.join(pathPart, cmd);
54287
54287
  const p6 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
54288
54288
  for (let j6 = 0; j6 < pathExt.length; j6++) {
54289
54289
  const cur = p6 + pathExt[j6];
@@ -54333,7 +54333,7 @@ var require_resolveCommand = __commonJS({
54333
54333
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module3) {
54334
54334
  "use strict";
54335
54335
  init_import_meta_url();
54336
- var path69 = require("path");
54336
+ var path70 = require("path");
54337
54337
  var which = require_which();
54338
54338
  var getPathKey = require_path_key();
54339
54339
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -54351,7 +54351,7 @@ var require_resolveCommand = __commonJS({
54351
54351
  try {
54352
54352
  resolved = which.sync(parsed.command, {
54353
54353
  path: env7[getPathKey({ env: env7 })],
54354
- pathExt: withoutPathExt ? path69.delimiter : void 0
54354
+ pathExt: withoutPathExt ? path70.delimiter : void 0
54355
54355
  });
54356
54356
  } catch (e7) {
54357
54357
  } finally {
@@ -54360,7 +54360,7 @@ var require_resolveCommand = __commonJS({
54360
54360
  }
54361
54361
  }
54362
54362
  if (resolved) {
54363
- resolved = path69.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
54363
+ resolved = path70.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
54364
54364
  }
54365
54365
  return resolved;
54366
54366
  }
@@ -54421,8 +54421,8 @@ var require_shebang_command = __commonJS({
54421
54421
  if (!match2) {
54422
54422
  return null;
54423
54423
  }
54424
- const [path69, argument] = match2[0].replace(/#! ?/, "").split(" ");
54425
- const binary = path69.split("/").pop();
54424
+ const [path70, argument] = match2[0].replace(/#! ?/, "").split(" ");
54425
+ const binary = path70.split("/").pop();
54426
54426
  if (binary === "env") {
54427
54427
  return argument;
54428
54428
  }
@@ -54460,7 +54460,7 @@ var require_parse3 = __commonJS({
54460
54460
  "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module3) {
54461
54461
  "use strict";
54462
54462
  init_import_meta_url();
54463
- var path69 = require("path");
54463
+ var path70 = require("path");
54464
54464
  var resolveCommand = require_resolveCommand();
54465
54465
  var escape2 = require_escape();
54466
54466
  var readShebang = require_readShebang();
@@ -54486,7 +54486,7 @@ var require_parse3 = __commonJS({
54486
54486
  const needsShell = !isExecutableRegExp.test(commandFile);
54487
54487
  if (parsed.options.forceShell || needsShell) {
54488
54488
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
54489
- parsed.command = path69.normalize(parsed.command);
54489
+ parsed.command = path70.normalize(parsed.command);
54490
54490
  parsed.command = escape2.command(parsed.command);
54491
54491
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
54492
54492
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -54664,9 +54664,9 @@ function npmRunPath(options30 = {}) {
54664
54664
  }
54665
54665
  function npmRunPathEnv({ env: env7 = import_node_process8.default.env, ...options30 } = {}) {
54666
54666
  env7 = { ...env7 };
54667
- const path69 = pathKey({ env: env7 });
54668
- options30.path = env7[path69];
54669
- env7[path69] = npmRunPath(options30);
54667
+ const path70 = pathKey({ env: env7 });
54668
+ options30.path = env7[path70];
54669
+ env7[path70] = npmRunPath(options30);
54670
54670
  return env7;
54671
54671
  }
54672
54672
  var import_node_process8, import_node_path25, import_node_url10;
@@ -56120,8 +56120,8 @@ var require_minimatch = __commonJS({
56120
56120
  return new Minimatch2(pattern, options30).match(p6);
56121
56121
  };
56122
56122
  module3.exports = minimatch;
56123
- var path69 = require_path();
56124
- minimatch.sep = path69.sep;
56123
+ var path70 = require_path();
56124
+ minimatch.sep = path70.sep;
56125
56125
  var GLOBSTAR = Symbol("globstar **");
56126
56126
  minimatch.GLOBSTAR = GLOBSTAR;
56127
56127
  var expand = require_brace_expansion();
@@ -56642,8 +56642,8 @@ var require_minimatch = __commonJS({
56642
56642
  if (f5 === "/" && partial)
56643
56643
  return true;
56644
56644
  const options30 = this.options;
56645
- if (path69.sep !== "/") {
56646
- f5 = f5.split(path69.sep).join("/");
56645
+ if (path70.sep !== "/") {
56646
+ f5 = f5.split(path70.sep).join("/");
56647
56647
  }
56648
56648
  f5 = f5.split(slashSplit);
56649
56649
  this.debug(this.pattern, "split", f5);
@@ -56743,7 +56743,7 @@ var init_esm = __esm({
56743
56743
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
56744
56744
  const statMethod = opts.lstat ? import_fs8.lstatSync : import_fs8.statSync;
56745
56745
  if (wantBigintFsStats) {
56746
- this._stat = (path69) => statMethod(path69, { bigint: true });
56746
+ this._stat = (path70) => statMethod(path70, { bigint: true });
56747
56747
  } else {
56748
56748
  this._stat = statMethod;
56749
56749
  }
@@ -56768,8 +56768,8 @@ var init_esm = __esm({
56768
56768
  const par = this.parent;
56769
56769
  const fil = par && par.files;
56770
56770
  if (fil && fil.length > 0) {
56771
- const { path: path69, depth } = par;
56772
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path69));
56771
+ const { path: path70, depth } = par;
56772
+ const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path70));
56773
56773
  for (const entry of slice) {
56774
56774
  if (!entry) {
56775
56775
  batch--;
@@ -56810,20 +56810,20 @@ var init_esm = __esm({
56810
56810
  this.reading = false;
56811
56811
  }
56812
56812
  }
56813
- async _exploreDir(path69, depth) {
56813
+ async _exploreDir(path70, depth) {
56814
56814
  let files;
56815
56815
  try {
56816
- files = await (0, import_promises12.readdir)(path69, this._rdOptions);
56816
+ files = await (0, import_promises12.readdir)(path70, this._rdOptions);
56817
56817
  } catch (error2) {
56818
56818
  this._onError(error2);
56819
56819
  }
56820
- return { files, depth, path: path69 };
56820
+ return { files, depth, path: path70 };
56821
56821
  }
56822
- _formatEntry(dirent, path69) {
56822
+ _formatEntry(dirent, path70) {
56823
56823
  let entry;
56824
56824
  const basename7 = this._isDirent ? dirent.name : dirent;
56825
56825
  try {
56826
- const fullPath = (0, import_path8.resolve)((0, import_path8.join)(path69, basename7));
56826
+ const fullPath = (0, import_path8.resolve)((0, import_path8.join)(path70, basename7));
56827
56827
  entry = { path: (0, import_path8.relative)(this._root, fullPath), fullPath, basename: basename7 };
56828
56828
  entry[this._statsProp] = this._isDirent ? dirent : this._stat(fullPath);
56829
56829
  } catch (err) {
@@ -56897,16 +56897,16 @@ var init_esm = __esm({
56897
56897
  });
56898
56898
 
56899
56899
  // ../../node_modules/.pnpm/chokidar@4.0.1/node_modules/chokidar/esm/handler.js
56900
- function createFsWatchInstance(path69, options30, listener, errHandler, emitRaw) {
56900
+ function createFsWatchInstance(path70, options30, listener, errHandler, emitRaw) {
56901
56901
  const handleEvent = /* @__PURE__ */ __name((rawEvent, evPath) => {
56902
- listener(path69);
56903
- emitRaw(rawEvent, evPath, { watchedPath: path69 });
56904
- if (evPath && path69 !== evPath) {
56905
- fsWatchBroadcast(sysPath.resolve(path69, evPath), KEY_LISTENERS, sysPath.join(path69, evPath));
56902
+ listener(path70);
56903
+ emitRaw(rawEvent, evPath, { watchedPath: path70 });
56904
+ if (evPath && path70 !== evPath) {
56905
+ fsWatchBroadcast(sysPath.resolve(path70, evPath), KEY_LISTENERS, sysPath.join(path70, evPath));
56906
56906
  }
56907
56907
  }, "handleEvent");
56908
56908
  try {
56909
- return (0, import_fs9.watch)(path69, {
56909
+ return (0, import_fs9.watch)(path70, {
56910
56910
  persistent: options30.persistent
56911
56911
  }, handleEvent);
56912
56912
  } catch (error2) {
@@ -57255,12 +57255,12 @@ var init_handler = __esm({
57255
57255
  listener(val1, val2, val3);
57256
57256
  });
57257
57257
  }, "fsWatchBroadcast");
57258
- setFsWatchListener = /* @__PURE__ */ __name((path69, fullPath, options30, handlers2) => {
57258
+ setFsWatchListener = /* @__PURE__ */ __name((path70, fullPath, options30, handlers2) => {
57259
57259
  const { listener, errHandler, rawEmitter } = handlers2;
57260
57260
  let cont = FsWatchInstances.get(fullPath);
57261
57261
  let watcher;
57262
57262
  if (!options30.persistent) {
57263
- watcher = createFsWatchInstance(path69, options30, listener, errHandler, rawEmitter);
57263
+ watcher = createFsWatchInstance(path70, options30, listener, errHandler, rawEmitter);
57264
57264
  if (!watcher)
57265
57265
  return;
57266
57266
  return watcher.close.bind(watcher);
@@ -57271,7 +57271,7 @@ var init_handler = __esm({
57271
57271
  addAndConvert(cont, KEY_RAW, rawEmitter);
57272
57272
  } else {
57273
57273
  watcher = createFsWatchInstance(
57274
- path69,
57274
+ path70,
57275
57275
  options30,
57276
57276
  fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
57277
57277
  errHandler,
@@ -57286,7 +57286,7 @@ var init_handler = __esm({
57286
57286
  cont.watcherUnusable = true;
57287
57287
  if (isWindows2 && error2.code === "EPERM") {
57288
57288
  try {
57289
- const fd = await (0, import_promises13.open)(path69, "r");
57289
+ const fd = await (0, import_promises13.open)(path70, "r");
57290
57290
  await fd.close();
57291
57291
  broadcastErr(error2);
57292
57292
  } catch (err) {
@@ -57317,7 +57317,7 @@ var init_handler = __esm({
57317
57317
  };
57318
57318
  }, "setFsWatchListener");
57319
57319
  FsWatchFileInstances = /* @__PURE__ */ new Map();
57320
- setFsWatchFileListener = /* @__PURE__ */ __name((path69, fullPath, options30, handlers2) => {
57320
+ setFsWatchFileListener = /* @__PURE__ */ __name((path70, fullPath, options30, handlers2) => {
57321
57321
  const { listener, rawEmitter } = handlers2;
57322
57322
  let cont = FsWatchFileInstances.get(fullPath);
57323
57323
  const copts = cont && cont.options;
@@ -57339,7 +57339,7 @@ var init_handler = __esm({
57339
57339
  });
57340
57340
  const currmtime = curr.mtimeMs;
57341
57341
  if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
57342
- foreach(cont.listeners, (listener2) => listener2(path69, curr));
57342
+ foreach(cont.listeners, (listener2) => listener2(path70, curr));
57343
57343
  }
57344
57344
  })
57345
57345
  };
@@ -57367,13 +57367,13 @@ var init_handler = __esm({
57367
57367
  * @param listener on fs change
57368
57368
  * @returns closer for the watcher instance
57369
57369
  */
57370
- _watchWithNodeFs(path69, listener) {
57370
+ _watchWithNodeFs(path70, listener) {
57371
57371
  const opts = this.fsw.options;
57372
- const directory = sysPath.dirname(path69);
57373
- const basename7 = sysPath.basename(path69);
57372
+ const directory = sysPath.dirname(path70);
57373
+ const basename7 = sysPath.basename(path70);
57374
57374
  const parent = this.fsw._getWatchedDir(directory);
57375
57375
  parent.add(basename7);
57376
- const absolutePath = sysPath.resolve(path69);
57376
+ const absolutePath = sysPath.resolve(path70);
57377
57377
  const options30 = {
57378
57378
  persistent: opts.persistent
57379
57379
  };
@@ -57383,12 +57383,12 @@ var init_handler = __esm({
57383
57383
  if (opts.usePolling) {
57384
57384
  const enableBin = opts.interval !== opts.binaryInterval;
57385
57385
  options30.interval = enableBin && isBinaryPath(basename7) ? opts.binaryInterval : opts.interval;
57386
- closer = setFsWatchFileListener(path69, absolutePath, options30, {
57386
+ closer = setFsWatchFileListener(path70, absolutePath, options30, {
57387
57387
  listener,
57388
57388
  rawEmitter: this.fsw._emitRaw
57389
57389
  });
57390
57390
  } else {
57391
- closer = setFsWatchListener(path69, absolutePath, options30, {
57391
+ closer = setFsWatchListener(path70, absolutePath, options30, {
57392
57392
  listener,
57393
57393
  errHandler: this._boundHandleError,
57394
57394
  rawEmitter: this.fsw._emitRaw
@@ -57410,7 +57410,7 @@ var init_handler = __esm({
57410
57410
  let prevStats = stats;
57411
57411
  if (parent.has(basename7))
57412
57412
  return;
57413
- const listener = /* @__PURE__ */ __name(async (path69, newStats) => {
57413
+ const listener = /* @__PURE__ */ __name(async (path70, newStats) => {
57414
57414
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
57415
57415
  return;
57416
57416
  if (!newStats || newStats.mtimeMs === 0) {
@@ -57424,11 +57424,11 @@ var init_handler = __esm({
57424
57424
  this.fsw._emit(EV.CHANGE, file, newStats2);
57425
57425
  }
57426
57426
  if ((isMacos || isLinux) && prevStats.ino !== newStats2.ino) {
57427
- this.fsw._closeFile(path69);
57427
+ this.fsw._closeFile(path70);
57428
57428
  prevStats = newStats2;
57429
57429
  const closer2 = this._watchWithNodeFs(file, listener);
57430
57430
  if (closer2)
57431
- this.fsw._addPathCloser(path69, closer2);
57431
+ this.fsw._addPathCloser(path70, closer2);
57432
57432
  } else {
57433
57433
  prevStats = newStats2;
57434
57434
  }
@@ -57460,7 +57460,7 @@ var init_handler = __esm({
57460
57460
  * @param item basename of this item
57461
57461
  * @returns true if no more processing is needed for this entry.
57462
57462
  */
57463
- async _handleSymlink(entry, directory, path69, item) {
57463
+ async _handleSymlink(entry, directory, path70, item) {
57464
57464
  if (this.fsw.closed) {
57465
57465
  return;
57466
57466
  }
@@ -57470,7 +57470,7 @@ var init_handler = __esm({
57470
57470
  this.fsw._incrReadyCount();
57471
57471
  let linkPath;
57472
57472
  try {
57473
- linkPath = await (0, import_promises13.realpath)(path69);
57473
+ linkPath = await (0, import_promises13.realpath)(path70);
57474
57474
  } catch (e7) {
57475
57475
  this.fsw._emitReady();
57476
57476
  return true;
@@ -57480,12 +57480,12 @@ var init_handler = __esm({
57480
57480
  if (dir.has(item)) {
57481
57481
  if (this.fsw._symlinkPaths.get(full) !== linkPath) {
57482
57482
  this.fsw._symlinkPaths.set(full, linkPath);
57483
- this.fsw._emit(EV.CHANGE, path69, entry.stats);
57483
+ this.fsw._emit(EV.CHANGE, path70, entry.stats);
57484
57484
  }
57485
57485
  } else {
57486
57486
  dir.add(item);
57487
57487
  this.fsw._symlinkPaths.set(full, linkPath);
57488
- this.fsw._emit(EV.ADD, path69, entry.stats);
57488
+ this.fsw._emit(EV.ADD, path70, entry.stats);
57489
57489
  }
57490
57490
  this.fsw._emitReady();
57491
57491
  return true;
@@ -57514,9 +57514,9 @@ var init_handler = __esm({
57514
57514
  return;
57515
57515
  }
57516
57516
  const item = entry.path;
57517
- let path69 = sysPath.join(directory, item);
57517
+ let path70 = sysPath.join(directory, item);
57518
57518
  current.add(item);
57519
- if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path69, item)) {
57519
+ if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path70, item)) {
57520
57520
  return;
57521
57521
  }
57522
57522
  if (this.fsw.closed) {
@@ -57525,8 +57525,8 @@ var init_handler = __esm({
57525
57525
  }
57526
57526
  if (item === target || !target && !previous.has(item)) {
57527
57527
  this.fsw._incrReadyCount();
57528
- path69 = sysPath.join(dir, sysPath.relative(dir, path69));
57529
- this._addToNodeFs(path69, initialAdd, wh, depth + 1);
57528
+ path70 = sysPath.join(dir, sysPath.relative(dir, path70));
57529
+ this._addToNodeFs(path70, initialAdd, wh, depth + 1);
57530
57530
  }
57531
57531
  }).on(EV.ERROR, this._boundHandleError);
57532
57532
  return new Promise((resolve24, reject) => {
@@ -57595,13 +57595,13 @@ var init_handler = __esm({
57595
57595
  * @param depth Child path actually targeted for watch
57596
57596
  * @param target Child path actually targeted for watch
57597
57597
  */
57598
- async _addToNodeFs(path69, initialAdd, priorWh, depth, target) {
57598
+ async _addToNodeFs(path70, initialAdd, priorWh, depth, target) {
57599
57599
  const ready = this.fsw._emitReady;
57600
- if (this.fsw._isIgnored(path69) || this.fsw.closed) {
57600
+ if (this.fsw._isIgnored(path70) || this.fsw.closed) {
57601
57601
  ready();
57602
57602
  return false;
57603
57603
  }
57604
- const wh = this.fsw._getWatchHelpers(path69);
57604
+ const wh = this.fsw._getWatchHelpers(path70);
57605
57605
  if (priorWh) {
57606
57606
  wh.filterPath = (entry) => priorWh.filterPath(entry);
57607
57607
  wh.filterDir = (entry) => priorWh.filterDir(entry);
@@ -57617,8 +57617,8 @@ var init_handler = __esm({
57617
57617
  const follow = this.fsw.options.followSymlinks;
57618
57618
  let closer;
57619
57619
  if (stats.isDirectory()) {
57620
- const absPath = sysPath.resolve(path69);
57621
- const targetPath = follow ? await (0, import_promises13.realpath)(path69) : path69;
57620
+ const absPath = sysPath.resolve(path70);
57621
+ const targetPath = follow ? await (0, import_promises13.realpath)(path70) : path70;
57622
57622
  if (this.fsw.closed)
57623
57623
  return;
57624
57624
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -57628,29 +57628,29 @@ var init_handler = __esm({
57628
57628
  this.fsw._symlinkPaths.set(absPath, targetPath);
57629
57629
  }
57630
57630
  } else if (stats.isSymbolicLink()) {
57631
- const targetPath = follow ? await (0, import_promises13.realpath)(path69) : path69;
57631
+ const targetPath = follow ? await (0, import_promises13.realpath)(path70) : path70;
57632
57632
  if (this.fsw.closed)
57633
57633
  return;
57634
57634
  const parent = sysPath.dirname(wh.watchPath);
57635
57635
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
57636
57636
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
57637
- closer = await this._handleDir(parent, stats, initialAdd, depth, path69, wh, targetPath);
57637
+ closer = await this._handleDir(parent, stats, initialAdd, depth, path70, wh, targetPath);
57638
57638
  if (this.fsw.closed)
57639
57639
  return;
57640
57640
  if (targetPath !== void 0) {
57641
- this.fsw._symlinkPaths.set(sysPath.resolve(path69), targetPath);
57641
+ this.fsw._symlinkPaths.set(sysPath.resolve(path70), targetPath);
57642
57642
  }
57643
57643
  } else {
57644
57644
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
57645
57645
  }
57646
57646
  ready();
57647
57647
  if (closer)
57648
- this.fsw._addPathCloser(path69, closer);
57648
+ this.fsw._addPathCloser(path70, closer);
57649
57649
  return false;
57650
57650
  } catch (error2) {
57651
57651
  if (this.fsw._handleError(error2)) {
57652
57652
  ready();
57653
- return path69;
57653
+ return path70;
57654
57654
  }
57655
57655
  }
57656
57656
  }
@@ -57686,26 +57686,26 @@ function createPattern(matcher) {
57686
57686
  }
57687
57687
  return () => false;
57688
57688
  }
57689
- function normalizePath(path69) {
57690
- if (typeof path69 !== "string")
57689
+ function normalizePath(path70) {
57690
+ if (typeof path70 !== "string")
57691
57691
  throw new Error("string expected");
57692
- path69 = sysPath2.normalize(path69);
57693
- path69 = path69.replace(/\\/g, "/");
57692
+ path70 = sysPath2.normalize(path70);
57693
+ path70 = path70.replace(/\\/g, "/");
57694
57694
  let prepend = false;
57695
- if (path69.startsWith("//"))
57695
+ if (path70.startsWith("//"))
57696
57696
  prepend = true;
57697
57697
  const DOUBLE_SLASH_RE2 = /\/\//;
57698
- while (path69.match(DOUBLE_SLASH_RE2))
57699
- path69 = path69.replace(DOUBLE_SLASH_RE2, "/");
57698
+ while (path70.match(DOUBLE_SLASH_RE2))
57699
+ path70 = path70.replace(DOUBLE_SLASH_RE2, "/");
57700
57700
  if (prepend)
57701
- path69 = "/" + path69;
57702
- return path69;
57701
+ path70 = "/" + path70;
57702
+ return path70;
57703
57703
  }
57704
57704
  function matchPatterns(patterns, testString, stats) {
57705
- const path69 = normalizePath(testString);
57705
+ const path70 = normalizePath(testString);
57706
57706
  for (let index = 0; index < patterns.length; index++) {
57707
57707
  const pattern = patterns[index];
57708
- if (pattern(path69, stats)) {
57708
+ if (pattern(path70, stats)) {
57709
57709
  return true;
57710
57710
  }
57711
57711
  }
@@ -57775,19 +57775,19 @@ var init_esm2 = __esm({
57775
57775
  }
57776
57776
  return str;
57777
57777
  }, "toUnix");
57778
- normalizePathToUnix = /* @__PURE__ */ __name((path69) => toUnix(sysPath2.normalize(toUnix(path69))), "normalizePathToUnix");
57779
- normalizeIgnored = /* @__PURE__ */ __name((cwd2 = "") => (path69) => {
57780
- if (typeof path69 === "string") {
57781
- return normalizePathToUnix(sysPath2.isAbsolute(path69) ? path69 : sysPath2.join(cwd2, path69));
57778
+ normalizePathToUnix = /* @__PURE__ */ __name((path70) => toUnix(sysPath2.normalize(toUnix(path70))), "normalizePathToUnix");
57779
+ normalizeIgnored = /* @__PURE__ */ __name((cwd2 = "") => (path70) => {
57780
+ if (typeof path70 === "string") {
57781
+ return normalizePathToUnix(sysPath2.isAbsolute(path70) ? path70 : sysPath2.join(cwd2, path70));
57782
57782
  } else {
57783
- return path69;
57783
+ return path70;
57784
57784
  }
57785
57785
  }, "normalizeIgnored");
57786
- getAbsolutePath = /* @__PURE__ */ __name((path69, cwd2) => {
57787
- if (sysPath2.isAbsolute(path69)) {
57788
- return path69;
57786
+ getAbsolutePath = /* @__PURE__ */ __name((path70, cwd2) => {
57787
+ if (sysPath2.isAbsolute(path70)) {
57788
+ return path70;
57789
57789
  }
57790
- return sysPath2.join(cwd2, path69);
57790
+ return sysPath2.join(cwd2, path70);
57791
57791
  }, "getAbsolutePath");
57792
57792
  EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
57793
57793
  DirEntry = class {
@@ -57843,10 +57843,10 @@ var init_esm2 = __esm({
57843
57843
  STAT_METHOD_F = "stat";
57844
57844
  STAT_METHOD_L = "lstat";
57845
57845
  WatchHelper = class {
57846
- constructor(path69, follow, fsw) {
57846
+ constructor(path70, follow, fsw) {
57847
57847
  this.fsw = fsw;
57848
- const watchPath = path69;
57849
- this.path = path69 = path69.replace(REPLACER_RE, "");
57848
+ const watchPath = path70;
57849
+ this.path = path70 = path70.replace(REPLACER_RE, "");
57850
57850
  this.watchPath = watchPath;
57851
57851
  this.fullWatchPath = sysPath2.resolve(watchPath);
57852
57852
  this.dirParts = [];
@@ -57969,20 +57969,20 @@ var init_esm2 = __esm({
57969
57969
  this._closePromise = void 0;
57970
57970
  let paths = unifyPaths(paths_);
57971
57971
  if (cwd2) {
57972
- paths = paths.map((path69) => {
57973
- const absPath = getAbsolutePath(path69, cwd2);
57972
+ paths = paths.map((path70) => {
57973
+ const absPath = getAbsolutePath(path70, cwd2);
57974
57974
  return absPath;
57975
57975
  });
57976
57976
  }
57977
- paths.forEach((path69) => {
57978
- this._removeIgnoredPath(path69);
57977
+ paths.forEach((path70) => {
57978
+ this._removeIgnoredPath(path70);
57979
57979
  });
57980
57980
  this._userIgnored = void 0;
57981
57981
  if (!this._readyCount)
57982
57982
  this._readyCount = 0;
57983
57983
  this._readyCount += paths.length;
57984
- Promise.all(paths.map(async (path69) => {
57985
- const res = await this._nodeFsHandler._addToNodeFs(path69, !_internal, void 0, 0, _origAdd);
57984
+ Promise.all(paths.map(async (path70) => {
57985
+ const res = await this._nodeFsHandler._addToNodeFs(path70, !_internal, void 0, 0, _origAdd);
57986
57986
  if (res)
57987
57987
  this._emitReady();
57988
57988
  return res;
@@ -58004,17 +58004,17 @@ var init_esm2 = __esm({
58004
58004
  return this;
58005
58005
  const paths = unifyPaths(paths_);
58006
58006
  const { cwd: cwd2 } = this.options;
58007
- paths.forEach((path69) => {
58008
- if (!sysPath2.isAbsolute(path69) && !this._closers.has(path69)) {
58007
+ paths.forEach((path70) => {
58008
+ if (!sysPath2.isAbsolute(path70) && !this._closers.has(path70)) {
58009
58009
  if (cwd2)
58010
- path69 = sysPath2.join(cwd2, path69);
58011
- path69 = sysPath2.resolve(path69);
58010
+ path70 = sysPath2.join(cwd2, path70);
58011
+ path70 = sysPath2.resolve(path70);
58012
58012
  }
58013
- this._closePath(path69);
58014
- this._addIgnoredPath(path69);
58015
- if (this._watched.has(path69)) {
58013
+ this._closePath(path70);
58014
+ this._addIgnoredPath(path70);
58015
+ if (this._watched.has(path70)) {
58016
58016
  this._addIgnoredPath({
58017
- path: path69,
58017
+ path: path70,
58018
58018
  recursive: true
58019
58019
  });
58020
58020
  }
@@ -58078,38 +58078,38 @@ var init_esm2 = __esm({
58078
58078
  * @param stats arguments to be passed with event
58079
58079
  * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
58080
58080
  */
58081
- async _emit(event, path69, stats) {
58081
+ async _emit(event, path70, stats) {
58082
58082
  if (this.closed)
58083
58083
  return;
58084
58084
  const opts = this.options;
58085
58085
  if (isWindows2)
58086
- path69 = sysPath2.normalize(path69);
58086
+ path70 = sysPath2.normalize(path70);
58087
58087
  if (opts.cwd)
58088
- path69 = sysPath2.relative(opts.cwd, path69);
58089
- const args = [event, path69];
58088
+ path70 = sysPath2.relative(opts.cwd, path70);
58089
+ const args = [event, path70];
58090
58090
  if (stats != null)
58091
58091
  args.push(stats);
58092
58092
  const awf = opts.awaitWriteFinish;
58093
58093
  let pw;
58094
- if (awf && (pw = this._pendingWrites.get(path69))) {
58094
+ if (awf && (pw = this._pendingWrites.get(path70))) {
58095
58095
  pw.lastChange = /* @__PURE__ */ new Date();
58096
58096
  return this;
58097
58097
  }
58098
58098
  if (opts.atomic) {
58099
58099
  if (event === EVENTS.UNLINK) {
58100
- this._pendingUnlinks.set(path69, args);
58100
+ this._pendingUnlinks.set(path70, args);
58101
58101
  setTimeout(() => {
58102
- this._pendingUnlinks.forEach((entry, path70) => {
58102
+ this._pendingUnlinks.forEach((entry, path71) => {
58103
58103
  this.emit(...entry);
58104
58104
  this.emit(EVENTS.ALL, ...entry);
58105
- this._pendingUnlinks.delete(path70);
58105
+ this._pendingUnlinks.delete(path71);
58106
58106
  });
58107
58107
  }, typeof opts.atomic === "number" ? opts.atomic : 100);
58108
58108
  return this;
58109
58109
  }
58110
- if (event === EVENTS.ADD && this._pendingUnlinks.has(path69)) {
58110
+ if (event === EVENTS.ADD && this._pendingUnlinks.has(path70)) {
58111
58111
  event = args[0] = EVENTS.CHANGE;
58112
- this._pendingUnlinks.delete(path69);
58112
+ this._pendingUnlinks.delete(path70);
58113
58113
  }
58114
58114
  }
58115
58115
  if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
@@ -58127,16 +58127,16 @@ var init_esm2 = __esm({
58127
58127
  this.emitWithAll(event, args);
58128
58128
  }
58129
58129
  }, "awfEmit");
58130
- this._awaitWriteFinish(path69, awf.stabilityThreshold, event, awfEmit);
58130
+ this._awaitWriteFinish(path70, awf.stabilityThreshold, event, awfEmit);
58131
58131
  return this;
58132
58132
  }
58133
58133
  if (event === EVENTS.CHANGE) {
58134
- const isThrottled = !this._throttle(EVENTS.CHANGE, path69, 50);
58134
+ const isThrottled = !this._throttle(EVENTS.CHANGE, path70, 50);
58135
58135
  if (isThrottled)
58136
58136
  return this;
58137
58137
  }
58138
58138
  if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
58139
- const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path69) : path69;
58139
+ const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path70) : path70;
58140
58140
  let stats2;
58141
58141
  try {
58142
58142
  stats2 = await (0, import_promises14.stat)(fullPath);
@@ -58167,23 +58167,23 @@ var init_esm2 = __esm({
58167
58167
  * @param timeout duration of time to suppress duplicate actions
58168
58168
  * @returns tracking object or false if action should be suppressed
58169
58169
  */
58170
- _throttle(actionType, path69, timeout2) {
58170
+ _throttle(actionType, path70, timeout2) {
58171
58171
  if (!this._throttled.has(actionType)) {
58172
58172
  this._throttled.set(actionType, /* @__PURE__ */ new Map());
58173
58173
  }
58174
58174
  const action = this._throttled.get(actionType);
58175
58175
  if (!action)
58176
58176
  throw new Error("invalid throttle");
58177
- const actionPath = action.get(path69);
58177
+ const actionPath = action.get(path70);
58178
58178
  if (actionPath) {
58179
58179
  actionPath.count++;
58180
58180
  return false;
58181
58181
  }
58182
58182
  let timeoutObject;
58183
58183
  const clear = /* @__PURE__ */ __name(() => {
58184
- const item = action.get(path69);
58184
+ const item = action.get(path70);
58185
58185
  const count = item ? item.count : 0;
58186
- action.delete(path69);
58186
+ action.delete(path70);
58187
58187
  clearTimeout(timeoutObject);
58188
58188
  if (item)
58189
58189
  clearTimeout(item.timeoutObject);
@@ -58191,7 +58191,7 @@ var init_esm2 = __esm({
58191
58191
  }, "clear");
58192
58192
  timeoutObject = setTimeout(clear, timeout2);
58193
58193
  const thr = { timeoutObject, clear, count: 0 };
58194
- action.set(path69, thr);
58194
+ action.set(path70, thr);
58195
58195
  return thr;
58196
58196
  }
58197
58197
  _incrReadyCount() {
@@ -58205,33 +58205,33 @@ var init_esm2 = __esm({
58205
58205
  * @param event
58206
58206
  * @param awfEmit Callback to be called when ready for event to be emitted.
58207
58207
  */
58208
- _awaitWriteFinish(path69, threshold, event, awfEmit) {
58208
+ _awaitWriteFinish(path70, threshold, event, awfEmit) {
58209
58209
  const awf = this.options.awaitWriteFinish;
58210
58210
  if (typeof awf !== "object")
58211
58211
  return;
58212
58212
  const pollInterval = awf.pollInterval;
58213
58213
  let timeoutHandler;
58214
- let fullPath = path69;
58215
- if (this.options.cwd && !sysPath2.isAbsolute(path69)) {
58216
- fullPath = sysPath2.join(this.options.cwd, path69);
58214
+ let fullPath = path70;
58215
+ if (this.options.cwd && !sysPath2.isAbsolute(path70)) {
58216
+ fullPath = sysPath2.join(this.options.cwd, path70);
58217
58217
  }
58218
58218
  const now = /* @__PURE__ */ new Date();
58219
58219
  const writes = this._pendingWrites;
58220
58220
  function awaitWriteFinishFn(prevStat) {
58221
58221
  (0, import_fs10.stat)(fullPath, (err, curStat) => {
58222
- if (err || !writes.has(path69)) {
58222
+ if (err || !writes.has(path70)) {
58223
58223
  if (err && err.code !== "ENOENT")
58224
58224
  awfEmit(err);
58225
58225
  return;
58226
58226
  }
58227
58227
  const now2 = Number(/* @__PURE__ */ new Date());
58228
58228
  if (prevStat && curStat.size !== prevStat.size) {
58229
- writes.get(path69).lastChange = now2;
58229
+ writes.get(path70).lastChange = now2;
58230
58230
  }
58231
- const pw = writes.get(path69);
58231
+ const pw = writes.get(path70);
58232
58232
  const df = now2 - pw.lastChange;
58233
58233
  if (df >= threshold) {
58234
- writes.delete(path69);
58234
+ writes.delete(path70);
58235
58235
  awfEmit(void 0, curStat);
58236
58236
  } else {
58237
58237
  timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
@@ -58239,11 +58239,11 @@ var init_esm2 = __esm({
58239
58239
  });
58240
58240
  }
58241
58241
  __name(awaitWriteFinishFn, "awaitWriteFinishFn");
58242
- if (!writes.has(path69)) {
58243
- writes.set(path69, {
58242
+ if (!writes.has(path70)) {
58243
+ writes.set(path70, {
58244
58244
  lastChange: now,
58245
58245
  cancelWait: () => {
58246
- writes.delete(path69);
58246
+ writes.delete(path70);
58247
58247
  clearTimeout(timeoutHandler);
58248
58248
  return event;
58249
58249
  }
@@ -58254,8 +58254,8 @@ var init_esm2 = __esm({
58254
58254
  /**
58255
58255
  * Determines whether user has asked to ignore this path.
58256
58256
  */
58257
- _isIgnored(path69, stats) {
58258
- if (this.options.atomic && DOT_RE.test(path69))
58257
+ _isIgnored(path70, stats) {
58258
+ if (this.options.atomic && DOT_RE.test(path70))
58259
58259
  return true;
58260
58260
  if (!this._userIgnored) {
58261
58261
  const { cwd: cwd2 } = this.options;
@@ -58265,17 +58265,17 @@ var init_esm2 = __esm({
58265
58265
  const list = [...ignoredPaths.map(normalizeIgnored(cwd2)), ...ignored];
58266
58266
  this._userIgnored = anymatch(list, void 0);
58267
58267
  }
58268
- return this._userIgnored(path69, stats);
58268
+ return this._userIgnored(path70, stats);
58269
58269
  }
58270
- _isntIgnored(path69, stat8) {
58271
- return !this._isIgnored(path69, stat8);
58270
+ _isntIgnored(path70, stat8) {
58271
+ return !this._isIgnored(path70, stat8);
58272
58272
  }
58273
58273
  /**
58274
58274
  * Provides a set of common helpers and properties relating to symlink handling.
58275
58275
  * @param path file or directory pattern being watched
58276
58276
  */
58277
- _getWatchHelpers(path69) {
58278
- return new WatchHelper(path69, this.options.followSymlinks, this);
58277
+ _getWatchHelpers(path70) {
58278
+ return new WatchHelper(path70, this.options.followSymlinks, this);
58279
58279
  }
58280
58280
  // Directory helpers
58281
58281
  // -----------------
@@ -58307,63 +58307,63 @@ var init_esm2 = __esm({
58307
58307
  * @param item base path of item/directory
58308
58308
  */
58309
58309
  _remove(directory, item, isDirectory2) {
58310
- const path69 = sysPath2.join(directory, item);
58311
- const fullPath = sysPath2.resolve(path69);
58312
- isDirectory2 = isDirectory2 != null ? isDirectory2 : this._watched.has(path69) || this._watched.has(fullPath);
58313
- if (!this._throttle("remove", path69, 100))
58310
+ const path70 = sysPath2.join(directory, item);
58311
+ const fullPath = sysPath2.resolve(path70);
58312
+ isDirectory2 = isDirectory2 != null ? isDirectory2 : this._watched.has(path70) || this._watched.has(fullPath);
58313
+ if (!this._throttle("remove", path70, 100))
58314
58314
  return;
58315
58315
  if (!isDirectory2 && this._watched.size === 1) {
58316
58316
  this.add(directory, item, true);
58317
58317
  }
58318
- const wp = this._getWatchedDir(path69);
58318
+ const wp = this._getWatchedDir(path70);
58319
58319
  const nestedDirectoryChildren = wp.getChildren();
58320
- nestedDirectoryChildren.forEach((nested) => this._remove(path69, nested));
58320
+ nestedDirectoryChildren.forEach((nested) => this._remove(path70, nested));
58321
58321
  const parent = this._getWatchedDir(directory);
58322
58322
  const wasTracked = parent.has(item);
58323
58323
  parent.remove(item);
58324
58324
  if (this._symlinkPaths.has(fullPath)) {
58325
58325
  this._symlinkPaths.delete(fullPath);
58326
58326
  }
58327
- let relPath = path69;
58327
+ let relPath = path70;
58328
58328
  if (this.options.cwd)
58329
- relPath = sysPath2.relative(this.options.cwd, path69);
58329
+ relPath = sysPath2.relative(this.options.cwd, path70);
58330
58330
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
58331
58331
  const event = this._pendingWrites.get(relPath).cancelWait();
58332
58332
  if (event === EVENTS.ADD)
58333
58333
  return;
58334
58334
  }
58335
- this._watched.delete(path69);
58335
+ this._watched.delete(path70);
58336
58336
  this._watched.delete(fullPath);
58337
58337
  const eventName = isDirectory2 ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
58338
- if (wasTracked && !this._isIgnored(path69))
58339
- this._emit(eventName, path69);
58340
- this._closePath(path69);
58338
+ if (wasTracked && !this._isIgnored(path70))
58339
+ this._emit(eventName, path70);
58340
+ this._closePath(path70);
58341
58341
  }
58342
58342
  /**
58343
58343
  * Closes all watchers for a path
58344
58344
  */
58345
- _closePath(path69) {
58346
- this._closeFile(path69);
58347
- const dir = sysPath2.dirname(path69);
58348
- this._getWatchedDir(dir).remove(sysPath2.basename(path69));
58345
+ _closePath(path70) {
58346
+ this._closeFile(path70);
58347
+ const dir = sysPath2.dirname(path70);
58348
+ this._getWatchedDir(dir).remove(sysPath2.basename(path70));
58349
58349
  }
58350
58350
  /**
58351
58351
  * Closes only file-specific watchers
58352
58352
  */
58353
- _closeFile(path69) {
58354
- const closers = this._closers.get(path69);
58353
+ _closeFile(path70) {
58354
+ const closers = this._closers.get(path70);
58355
58355
  if (!closers)
58356
58356
  return;
58357
58357
  closers.forEach((closer) => closer());
58358
- this._closers.delete(path69);
58358
+ this._closers.delete(path70);
58359
58359
  }
58360
- _addPathCloser(path69, closer) {
58360
+ _addPathCloser(path70, closer) {
58361
58361
  if (!closer)
58362
58362
  return;
58363
- let list = this._closers.get(path69);
58363
+ let list = this._closers.get(path70);
58364
58364
  if (!list) {
58365
58365
  list = [];
58366
- this._closers.set(path69, list);
58366
+ this._closers.set(path70, list);
58367
58367
  }
58368
58368
  list.push(closer);
58369
58369
  }
@@ -58588,11 +58588,11 @@ var extractPathname, URL_REGEX, HOST_WITH_PORT_REGEX, PATH_REGEX, validateUrl;
58588
58588
  var init_validateURL = __esm({
58589
58589
  "../pages-shared/metadata-generator/validateURL.ts"() {
58590
58590
  init_import_meta_url();
58591
- extractPathname = /* @__PURE__ */ __name((path69 = "/", includeSearch, includeHash) => {
58592
- if (!path69.startsWith("/")) {
58593
- path69 = `/${path69}`;
58591
+ extractPathname = /* @__PURE__ */ __name((path70 = "/", includeSearch, includeHash) => {
58592
+ if (!path70.startsWith("/")) {
58593
+ path70 = `/${path70}`;
58594
58594
  }
58595
- const url4 = new URL(`//${path69}`, "relative://");
58595
+ const url4 = new URL(`//${path70}`, "relative://");
58596
58596
  return `${url4.pathname}${includeSearch ? url4.search : ""}${includeHash ? url4.hash : ""}`;
58597
58597
  }, "extractPathname");
58598
58598
  URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
@@ -58625,8 +58625,8 @@ var init_validateURL = __esm({
58625
58625
  if (!token.startsWith("/") && onlyRelative) {
58626
58626
  token = `/${token}`;
58627
58627
  }
58628
- const path69 = PATH_REGEX.exec(token);
58629
- if (path69) {
58628
+ const path70 = PATH_REGEX.exec(token);
58629
+ if (path70) {
58630
58630
  try {
58631
58631
  return [extractPathname(token, includeSearch, includeHash), void 0];
58632
58632
  } catch {
@@ -58682,7 +58682,7 @@ function parseHeaders(input) {
58682
58682
  });
58683
58683
  }
58684
58684
  }
58685
- const [path69, pathError] = validateUrl(line, false, true);
58685
+ const [path70, pathError] = validateUrl(line, false, true);
58686
58686
  if (pathError) {
58687
58687
  invalid.push({
58688
58688
  line,
@@ -58693,7 +58693,7 @@ function parseHeaders(input) {
58693
58693
  continue;
58694
58694
  }
58695
58695
  rule = {
58696
- path: path69,
58696
+ path: path70,
58697
58697
  line,
58698
58698
  headers: {},
58699
58699
  unsetHeaders: []
@@ -58932,7 +58932,7 @@ var require_constants7 = __commonJS({
58932
58932
  "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js"(exports2, module3) {
58933
58933
  "use strict";
58934
58934
  init_import_meta_url();
58935
- var path69 = require("path");
58935
+ var path70 = require("path");
58936
58936
  var WIN_SLASH = "\\\\/";
58937
58937
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
58938
58938
  var DOT_LITERAL = "\\.";
@@ -59102,7 +59102,7 @@ var require_constants7 = __commonJS({
59102
59102
  /* | */
59103
59103
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
59104
59104
  /* \uFEFF */
59105
- SEP: path69.sep,
59105
+ SEP: path70.sep,
59106
59106
  /**
59107
59107
  * Create EXTGLOB_CHARS
59108
59108
  */
@@ -59130,7 +59130,7 @@ var require_utils4 = __commonJS({
59130
59130
  "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js"(exports2) {
59131
59131
  "use strict";
59132
59132
  init_import_meta_url();
59133
- var path69 = require("path");
59133
+ var path70 = require("path");
59134
59134
  var win32 = process.platform === "win32";
59135
59135
  var {
59136
59136
  REGEX_BACKSLASH,
@@ -59159,7 +59159,7 @@ var require_utils4 = __commonJS({
59159
59159
  if (options30 && typeof options30.windows === "boolean") {
59160
59160
  return options30.windows;
59161
59161
  }
59162
- return win32 === true || path69.sep === "\\";
59162
+ return win32 === true || path70.sep === "\\";
59163
59163
  };
59164
59164
  exports2.escapeLast = (input, char, lastIdx) => {
59165
59165
  const idx = input.lastIndexOf(char, lastIdx);
@@ -60310,7 +60310,7 @@ var require_picomatch = __commonJS({
60310
60310
  "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js"(exports2, module3) {
60311
60311
  "use strict";
60312
60312
  init_import_meta_url();
60313
- var path69 = require("path");
60313
+ var path70 = require("path");
60314
60314
  var scan = require_scan();
60315
60315
  var parse8 = require_parse4();
60316
60316
  var utils = require_utils4();
@@ -60396,7 +60396,7 @@ var require_picomatch = __commonJS({
60396
60396
  };
60397
60397
  picomatch.matchBase = (input, glob, options30, posix2 = utils.isWindows(options30)) => {
60398
60398
  const regex2 = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options30);
60399
- return regex2.test(path69.basename(input));
60399
+ return regex2.test(path70.basename(input));
60400
60400
  };
60401
60401
  picomatch.isMatch = (str, patterns, options30) => picomatch(patterns, options30)(str);
60402
60402
  picomatch.parse = (pattern, options30) => {
@@ -62659,8 +62659,8 @@ You should install ${missingPackages.map((p6) => p6.name).join(", ")} locally:
62659
62659
  return Array.isArray(pkg) ? results : results[0];
62660
62660
  }
62661
62661
  function npxResolve(pkg) {
62662
- const { name: name2, path: path69 } = parse4(pkg);
62663
- const packageWithPath = [name2, path69].join("");
62662
+ const { name: name2, path: path70 } = parse4(pkg);
62663
+ const packageWithPath = [name2, path70].join("");
62664
62664
  const cachedDir = INSTALL_CACHE[name2];
62665
62665
  if (!cachedDir) {
62666
62666
  throw new Error(`You must call npxImport for a package before calling npxResolve. Got: ${pkg}`);
@@ -62673,17 +62673,17 @@ function npxResolve(pkg) {
62673
62673
  async function checkPackagesAvailableLocally(pkg) {
62674
62674
  const packages = {};
62675
62675
  for (const p6 of Array.isArray(pkg) ? pkg : [pkg]) {
62676
- const { name: name2, version: version4, path: path69, exact } = parseAndValidate(p6);
62676
+ const { name: name2, version: version4, path: path70, exact } = parseAndValidate(p6);
62677
62677
  if (packages[name2])
62678
62678
  throw new Error(`npx-import cannot import the same package twice! Got: '${p6}' but already saw '${name2}' earlier!`);
62679
- const packageWithPath = [name2, path69].join("");
62679
+ const packageWithPath = [name2, path70].join("");
62680
62680
  const imported = await tryImport(packageWithPath);
62681
62681
  packages[name2] = {
62682
62682
  name: name2,
62683
62683
  packageWithPath,
62684
62684
  version: version4,
62685
62685
  exact,
62686
- path: path69,
62686
+ path: path70,
62687
62687
  imported,
62688
62688
  local: imported !== NOT_IMPORTABLE
62689
62689
  };
@@ -62694,7 +62694,7 @@ function parseAndValidate(p6) {
62694
62694
  if (p6.match(/^[.\/]/)) {
62695
62695
  throw new Error(`npx-import can only import packages, not relative paths: got ${p6}`);
62696
62696
  }
62697
- const { name: name2, version: version4, path: path69 } = parse4(p6);
62697
+ const { name: name2, version: version4, path: path70 } = parse4(p6);
62698
62698
  const validation2 = (0, import_validate_npm_package_name.default)(name2);
62699
62699
  if (!validation2.validForNewPackages) {
62700
62700
  if (validation2.warnings?.some((w6) => w6.match(/is a core module name/)))
@@ -62702,7 +62702,7 @@ function parseAndValidate(p6) {
62702
62702
  else
62703
62703
  throw new Error(`npx-import can't import invalid package name: parsed name '${name2}' from '${p6}'`);
62704
62704
  }
62705
- return { name: name2, version: version4, path: path69, exact: import_semver.default.parse(version4) !== null };
62705
+ return { name: name2, version: version4, path: path70, exact: import_semver.default.parse(version4) !== null };
62706
62706
  }
62707
62707
  async function tryImport(packageWithPath) {
62708
62708
  try {
@@ -63659,7 +63659,7 @@ var require_main3 = __commonJS({
63659
63659
  "../../node_modules/.pnpm/dotenv@10.0.0/node_modules/dotenv/lib/main.js"(exports2, module3) {
63660
63660
  init_import_meta_url();
63661
63661
  var fs29 = require("fs");
63662
- var path69 = require("path");
63662
+ var path70 = require("path");
63663
63663
  var os13 = require("os");
63664
63664
  function log2(message) {
63665
63665
  console.log(`[dotenv][DEBUG] ${message}`);
@@ -63697,11 +63697,11 @@ var require_main3 = __commonJS({
63697
63697
  }
63698
63698
  __name(parse8, "parse");
63699
63699
  function resolveHome(envPath) {
63700
- return envPath[0] === "~" ? path69.join(os13.homedir(), envPath.slice(1)) : envPath;
63700
+ return envPath[0] === "~" ? path70.join(os13.homedir(), envPath.slice(1)) : envPath;
63701
63701
  }
63702
63702
  __name(resolveHome, "resolveHome");
63703
63703
  function config(options30) {
63704
- let dotenvPath = path69.resolve(process.cwd(), ".env");
63704
+ let dotenvPath = path70.resolve(process.cwd(), ".env");
63705
63705
  let encoding = "utf8";
63706
63706
  let debug = false;
63707
63707
  if (options30) {
@@ -64290,18 +64290,18 @@ var require_utils5 = __commonJS({
64290
64290
  return decode(data, hint);
64291
64291
  }
64292
64292
  __name(convertToUTF8, "convertToUTF8");
64293
- function basename7(path69) {
64294
- if (typeof path69 !== "string")
64293
+ function basename7(path70) {
64294
+ if (typeof path70 !== "string")
64295
64295
  return "";
64296
- for (let i5 = path69.length - 1; i5 >= 0; --i5) {
64297
- switch (path69.charCodeAt(i5)) {
64296
+ for (let i5 = path70.length - 1; i5 >= 0; --i5) {
64297
+ switch (path70.charCodeAt(i5)) {
64298
64298
  case 47:
64299
64299
  case 92:
64300
- path69 = path69.slice(i5 + 1);
64301
- return path69 === ".." || path69 === "." ? "" : path69;
64300
+ path70 = path70.slice(i5 + 1);
64301
+ return path70 === ".." || path70 === "." ? "" : path70;
64302
64302
  }
64303
64303
  }
64304
- return path69 === ".." || path69 === "." ? "" : path69;
64304
+ return path70 === ".." || path70 === "." ? "" : path70;
64305
64305
  }
64306
64306
  __name(basename7, "basename");
64307
64307
  var TOKEN = [
@@ -67808,7 +67808,7 @@ var require_dist3 = __commonJS({
67808
67808
  const result = [];
67809
67809
  let key = 0;
67810
67810
  let i5 = 0;
67811
- let path69 = "";
67811
+ let path70 = "";
67812
67812
  let nameSet = /* @__PURE__ */ new Set();
67813
67813
  const tryConsume = /* @__PURE__ */ __name((type) => {
67814
67814
  if (i5 < tokens.length && tokens[i5].type === type)
@@ -67850,12 +67850,12 @@ var require_dist3 = __commonJS({
67850
67850
  if (name2 || pattern) {
67851
67851
  let prefix = char || "";
67852
67852
  if (prefixes.indexOf(prefix) === -1) {
67853
- path69 += prefix;
67853
+ path70 += prefix;
67854
67854
  prefix = "";
67855
67855
  }
67856
- if (path69) {
67857
- result.push(encodePart(path69));
67858
- path69 = "";
67856
+ if (path70) {
67857
+ result.push(encodePart(path70));
67858
+ path70 = "";
67859
67859
  }
67860
67860
  const finalName = name2 || key++;
67861
67861
  if (nameSet.has(finalName)) {
@@ -67873,7 +67873,7 @@ var require_dist3 = __commonJS({
67873
67873
  }
67874
67874
  const value = char || tryConsume("ESCAPED_CHAR");
67875
67875
  if (value) {
67876
- path69 += value;
67876
+ path70 += value;
67877
67877
  continue;
67878
67878
  }
67879
67879
  const open4 = tryConsume("OPEN");
@@ -67888,15 +67888,15 @@ var require_dist3 = __commonJS({
67888
67888
  mustConsume("CLOSE");
67889
67889
  const modifier = tryConsumeModifier() || "";
67890
67890
  if (!name22 && !pattern2 && !modifier) {
67891
- path69 += prefix;
67891
+ path70 += prefix;
67892
67892
  continue;
67893
67893
  }
67894
67894
  if (!name22 && !pattern2 && !prefix) {
67895
67895
  continue;
67896
67896
  }
67897
- if (path69) {
67898
- result.push(encodePart(path69));
67899
- path69 = "";
67897
+ if (path70) {
67898
+ result.push(encodePart(path70));
67899
+ path70 = "";
67900
67900
  }
67901
67901
  result.push({
67902
67902
  name: name22 || (pattern2 ? key++ : ""),
@@ -67907,9 +67907,9 @@ var require_dist3 = __commonJS({
67907
67907
  });
67908
67908
  continue;
67909
67909
  }
67910
- if (path69) {
67911
- result.push(encodePart(path69));
67912
- path69 = "";
67910
+ if (path70) {
67911
+ result.push(encodePart(path70));
67912
+ path70 = "";
67913
67913
  }
67914
67914
  mustConsume("END");
67915
67915
  }
@@ -67924,12 +67924,12 @@ var require_dist3 = __commonJS({
67924
67924
  return options30 && options30.sensitive ? "u" : "ui";
67925
67925
  }
67926
67926
  __name(flags2, "flags");
67927
- function regexpToRegexp(path69, keys) {
67927
+ function regexpToRegexp(path70, keys) {
67928
67928
  if (!keys)
67929
- return path69;
67929
+ return path70;
67930
67930
  const groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
67931
67931
  let index = 0;
67932
- let execResult = groupsRegex.exec(path69.source);
67932
+ let execResult = groupsRegex.exec(path70.source);
67933
67933
  while (execResult) {
67934
67934
  keys.push({
67935
67935
  name: execResult[1] || index++,
@@ -67938,18 +67938,18 @@ var require_dist3 = __commonJS({
67938
67938
  modifier: "",
67939
67939
  pattern: ""
67940
67940
  });
67941
- execResult = groupsRegex.exec(path69.source);
67941
+ execResult = groupsRegex.exec(path70.source);
67942
67942
  }
67943
- return path69;
67943
+ return path70;
67944
67944
  }
67945
67945
  __name(regexpToRegexp, "regexpToRegexp");
67946
67946
  function arrayToRegexp(paths, keys, options30) {
67947
- const parts = paths.map((path69) => pathToRegexp(path69, keys, options30).source);
67947
+ const parts = paths.map((path70) => pathToRegexp(path70, keys, options30).source);
67948
67948
  return new RegExp(`(?:${parts.join("|")})`, flags2(options30));
67949
67949
  }
67950
67950
  __name(arrayToRegexp, "arrayToRegexp");
67951
- function stringToRegexp(path69, keys, options30) {
67952
- return tokensToRegexp(parse8(path69, options30), keys, options30);
67951
+ function stringToRegexp(path70, keys, options30) {
67952
+ return tokensToRegexp(parse8(path70, options30), keys, options30);
67953
67953
  }
67954
67954
  __name(stringToRegexp, "stringToRegexp");
67955
67955
  function tokensToRegexp(tokens, keys, options30 = {}) {
@@ -68007,12 +68007,12 @@ var require_dist3 = __commonJS({
68007
68007
  return new RegExp(route2, flags2(options30));
68008
68008
  }
68009
68009
  __name(tokensToRegexp, "tokensToRegexp");
68010
- function pathToRegexp(path69, keys, options30) {
68011
- if (path69 instanceof RegExp)
68012
- return regexpToRegexp(path69, keys);
68013
- if (Array.isArray(path69))
68014
- return arrayToRegexp(path69, keys, options30);
68015
- return stringToRegexp(path69, keys, options30);
68010
+ function pathToRegexp(path70, keys, options30) {
68011
+ if (path70 instanceof RegExp)
68012
+ return regexpToRegexp(path70, keys);
68013
+ if (Array.isArray(path70))
68014
+ return arrayToRegexp(path70, keys, options30);
68015
+ return stringToRegexp(path70, keys, options30);
68016
68016
  }
68017
68017
  __name(pathToRegexp, "pathToRegexp");
68018
68018
  var regexIdentifierStart;
@@ -73645,18 +73645,18 @@ Make sure "${service}" is mounted so Miniflare knows where to find it.`);
73645
73645
  once: () => once,
73646
73646
  setMaxListeners: () => setMaxListeners
73647
73647
  });
73648
- var import_node_events6 = __toModule(require("node:events"));
73649
- var events_default = import_node_events6.default;
73650
- var EventEmitter5 = import_node_events6.default.EventEmitter;
73651
- var EventEmitterAsyncResource = import_node_events6.default.EventEmitterAsyncResource;
73652
- var captureRejectionSymbol = import_node_events6.default.captureRejectionSymbol;
73653
- var defaultMaxListeners = import_node_events6.default.defaultMaxListeners;
73654
- var errorMonitor = import_node_events6.default.errorMonitor;
73655
- var getEventListeners = import_node_events6.default.getEventListeners;
73656
- var listenerCount = import_node_events6.default.listenerCount;
73657
- var on = import_node_events6.default.on;
73658
- var once = import_node_events6.default.once;
73659
- var setMaxListeners = import_node_events6.default.setMaxListeners;
73648
+ var import_node_events7 = __toModule(require("node:events"));
73649
+ var events_default = import_node_events7.default;
73650
+ var EventEmitter5 = import_node_events7.default.EventEmitter;
73651
+ var EventEmitterAsyncResource = import_node_events7.default.EventEmitterAsyncResource;
73652
+ var captureRejectionSymbol = import_node_events7.default.captureRejectionSymbol;
73653
+ var defaultMaxListeners = import_node_events7.default.defaultMaxListeners;
73654
+ var errorMonitor = import_node_events7.default.errorMonitor;
73655
+ var getEventListeners = import_node_events7.default.getEventListeners;
73656
+ var listenerCount = import_node_events7.default.listenerCount;
73657
+ var on = import_node_events7.default.on;
73658
+ var once = import_node_events7.default.once;
73659
+ var setMaxListeners = import_node_events7.default.setMaxListeners;
73660
73660
  var util_exports = {};
73661
73661
  __export2(util_exports, {
73662
73662
  _extend: () => import_node_util4._extend,
@@ -75890,8 +75890,8 @@ ${val2.stack}`;
75890
75890
  var ret = wasm.memory;
75891
75891
  return addHeapObject(ret);
75892
75892
  };
75893
- var path69 = require("path").join(__dirname, "html_rewriter_bg.wasm");
75894
- var bytes = require("fs").readFileSync(path69);
75893
+ var path70 = require("path").join(__dirname, "html_rewriter_bg.wasm");
75894
+ var bytes = require("fs").readFileSync(path70);
75895
75895
  var wasmModule = new WebAssembly.Module(bytes);
75896
75896
  var wasmInstance = new WebAssembly.Instance(wasmModule, imports);
75897
75897
  wasm = wasmInstance.exports;
@@ -76891,8 +76891,8 @@ async function generateAssetsFetch(directory, log2) {
76891
76891
  });
76892
76892
  watch([headersFile, redirectsFile], { persistent: true }).on(
76893
76893
  "change",
76894
- (path69) => {
76895
- switch (path69) {
76894
+ (path70) => {
76895
+ switch (path70) {
76896
76896
  case headersFile: {
76897
76897
  log2.log("_headers modified. Re-evaluating...");
76898
76898
  const contents = (0, import_node_fs20.readFileSync)(headersFile).toString();
@@ -76922,8 +76922,8 @@ async function generateAssetsFetch(directory, log2) {
76922
76922
  metadata,
76923
76923
  xServerEnvHeader: "dev",
76924
76924
  logError: console.error,
76925
- findAssetEntryForPath: async (path69) => {
76926
- const filepath = (0, import_node_path37.resolve)((0, import_node_path37.join)(directory, path69));
76925
+ findAssetEntryForPath: async (path70) => {
76926
+ const filepath = (0, import_node_path37.resolve)((0, import_node_path37.join)(directory, path70));
76927
76927
  if (!filepath.startsWith(directory)) {
76928
76928
  return null;
76929
76929
  }
@@ -77039,8 +77039,8 @@ var require_md5_file = __commonJS({
77039
77039
  var crypto7 = require("crypto");
77040
77040
  var fs29 = require("fs");
77041
77041
  var BUFFER_SIZE = 8192;
77042
- function md5FileSync(path69) {
77043
- const fd = fs29.openSync(path69, "r");
77042
+ function md5FileSync(path70) {
77043
+ const fd = fs29.openSync(path70, "r");
77044
77044
  const hash = crypto7.createHash("md5");
77045
77045
  const buffer = Buffer.alloc(BUFFER_SIZE);
77046
77046
  try {
@@ -77055,10 +77055,10 @@ var require_md5_file = __commonJS({
77055
77055
  return hash.digest("hex");
77056
77056
  }
77057
77057
  __name(md5FileSync, "md5FileSync");
77058
- function md5File2(path69) {
77058
+ function md5File2(path70) {
77059
77059
  return new Promise((resolve24, reject) => {
77060
77060
  const output = crypto7.createHash("md5");
77061
- const input = fs29.createReadStream(path69);
77061
+ const input = fs29.createReadStream(path70);
77062
77062
  input.on("error", (err) => {
77063
77063
  reject(err);
77064
77064
  });
@@ -79731,9 +79731,9 @@ var init_createPaginator = __esm({
79731
79731
  return await client.send(new CommandCtor(input), ...args);
79732
79732
  }, "makePagedClientRequest");
79733
79733
  __name(createPaginator, "createPaginator");
79734
- get = /* @__PURE__ */ __name((fromObject, path69) => {
79734
+ get = /* @__PURE__ */ __name((fromObject, path70) => {
79735
79735
  let cursor = fromObject;
79736
- const pathComponents = path69.split(".");
79736
+ const pathComponents = path70.split(".");
79737
79737
  for (const step of pathComponents) {
79738
79738
  if (!cursor || typeof cursor !== "object") {
79739
79739
  return void 0;
@@ -80351,12 +80351,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
80351
80351
  const password = request4.password ?? "";
80352
80352
  auth = `${username}:${password}`;
80353
80353
  }
80354
- let path69 = request4.path;
80354
+ let path70 = request4.path;
80355
80355
  if (queryString) {
80356
- path69 += `?${queryString}`;
80356
+ path70 += `?${queryString}`;
80357
80357
  }
80358
80358
  if (request4.fragment) {
80359
- path69 += `#${request4.fragment}`;
80359
+ path70 += `#${request4.fragment}`;
80360
80360
  }
80361
80361
  let hostname2 = request4.hostname ?? "";
80362
80362
  if (hostname2[0] === "[" && hostname2.endsWith("]")) {
@@ -80368,7 +80368,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
80368
80368
  headers: request4.headers,
80369
80369
  host: hostname2,
80370
80370
  method: request4.method,
80371
- path: path69,
80371
+ path: path70,
80372
80372
  port: request4.port,
80373
80373
  agent,
80374
80374
  auth
@@ -81130,8 +81130,8 @@ var init_requestBuilder = __esm({
81130
81130
  return this;
81131
81131
  }
81132
81132
  p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
81133
- this.resolvePathStack.push((path69) => {
81134
- this.path = resolvedPath(path69, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
81133
+ this.resolvePathStack.push((path70) => {
81134
+ this.path = resolvedPath(path70, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
81135
81135
  });
81136
81136
  return this;
81137
81137
  }
@@ -82061,10 +82061,10 @@ ${longDate}
82061
82061
  ${credentialScope}
82062
82062
  ${toHex(hashedRequest)}`;
82063
82063
  }
82064
- getCanonicalPath({ path: path69 }) {
82064
+ getCanonicalPath({ path: path70 }) {
82065
82065
  if (this.uriEscapePath) {
82066
82066
  const normalizedPathSegments = [];
82067
- for (const pathSegment of path69.split("/")) {
82067
+ for (const pathSegment of path70.split("/")) {
82068
82068
  if (pathSegment?.length === 0)
82069
82069
  continue;
82070
82070
  if (pathSegment === ".")
@@ -82075,11 +82075,11 @@ ${toHex(hashedRequest)}`;
82075
82075
  normalizedPathSegments.push(pathSegment);
82076
82076
  }
82077
82077
  }
82078
- const normalizedPath = `${path69?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path69?.endsWith("/") ? "/" : ""}`;
82078
+ const normalizedPath = `${path70?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path70?.endsWith("/") ? "/" : ""}`;
82079
82079
  const doubleEncoded = escapeUri(normalizedPath);
82080
82080
  return doubleEncoded.replace(/%2F/g, "/");
82081
82081
  }
82082
- return path69;
82082
+ return path70;
82083
82083
  }
82084
82084
  async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
82085
82085
  const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest);
@@ -85857,18 +85857,18 @@ var init_getAttrPathList = __esm({
85857
85857
  "../../node_modules/.pnpm/@smithy+util-endpoints@2.1.7/node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js"() {
85858
85858
  init_import_meta_url();
85859
85859
  init_types3();
85860
- getAttrPathList = /* @__PURE__ */ __name((path69) => {
85861
- const parts = path69.split(".");
85860
+ getAttrPathList = /* @__PURE__ */ __name((path70) => {
85861
+ const parts = path70.split(".");
85862
85862
  const pathList = [];
85863
85863
  for (const part of parts) {
85864
85864
  const squareBracketIndex = part.indexOf("[");
85865
85865
  if (squareBracketIndex !== -1) {
85866
85866
  if (part.indexOf("]") !== part.length - 1) {
85867
- throw new EndpointError(`Path: '${path69}' does not end with ']'`);
85867
+ throw new EndpointError(`Path: '${path70}' does not end with ']'`);
85868
85868
  }
85869
85869
  const arrayIndex = part.slice(squareBracketIndex + 1, -1);
85870
85870
  if (Number.isNaN(parseInt(arrayIndex))) {
85871
- throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path69}'`);
85871
+ throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path70}'`);
85872
85872
  }
85873
85873
  if (squareBracketIndex !== 0) {
85874
85874
  pathList.push(part.slice(0, squareBracketIndex));
@@ -85890,9 +85890,9 @@ var init_getAttr = __esm({
85890
85890
  init_import_meta_url();
85891
85891
  init_types3();
85892
85892
  init_getAttrPathList();
85893
- getAttr = /* @__PURE__ */ __name((value, path69) => getAttrPathList(path69).reduce((acc, index) => {
85893
+ getAttr = /* @__PURE__ */ __name((value, path70) => getAttrPathList(path70).reduce((acc, index) => {
85894
85894
  if (typeof acc !== "object") {
85895
- throw new EndpointError(`Index '${index}' in '${path69}' not found in '${JSON.stringify(value)}'`);
85895
+ throw new EndpointError(`Index '${index}' in '${path70}' not found in '${JSON.stringify(value)}'`);
85896
85896
  } else if (Array.isArray(acc)) {
85897
85897
  return acc[parseInt(index)];
85898
85898
  }
@@ -85937,8 +85937,8 @@ var init_parseURL = __esm({
85937
85937
  return value;
85938
85938
  }
85939
85939
  if (typeof value === "object" && "hostname" in value) {
85940
- const { hostname: hostname3, port, protocol: protocol2 = "", path: path69 = "", query = {} } = value;
85941
- const url4 = new URL(`${protocol2}//${hostname3}${port ? `:${port}` : ""}${path69}`);
85940
+ const { hostname: hostname3, port, protocol: protocol2 = "", path: path70 = "", query = {} } = value;
85941
+ const url4 = new URL(`${protocol2}//${hostname3}${port ? `:${port}` : ""}${path70}`);
85942
85942
  url4.search = Object.entries(query).map(([k6, v7]) => `${k6}=${v7}`).join("&");
85943
85943
  return url4;
85944
85944
  }
@@ -87408,8 +87408,8 @@ var init_createConfigValueProvider = __esm({
87408
87408
  return endpoint.url.href;
87409
87409
  }
87410
87410
  if ("hostname" in endpoint) {
87411
- const { protocol, hostname: hostname2, port, path: path69 } = endpoint;
87412
- return `${protocol}//${hostname2}${port ? ":" + port : ""}${path69}`;
87411
+ const { protocol, hostname: hostname2, port, path: path70 } = endpoint;
87412
+ return `${protocol}//${hostname2}${port ? ":" + port : ""}${path70}`;
87413
87413
  }
87414
87414
  }
87415
87415
  return endpoint;
@@ -87646,11 +87646,11 @@ var init_slurpFile = __esm({
87646
87646
  import_fs16 = require("fs");
87647
87647
  ({ readFile: readFile13 } = import_fs16.promises);
87648
87648
  filePromisesHash = {};
87649
- slurpFile = /* @__PURE__ */ __name((path69, options30) => {
87650
- if (!filePromisesHash[path69] || options30?.ignoreCache) {
87651
- filePromisesHash[path69] = readFile13(path69, "utf8");
87649
+ slurpFile = /* @__PURE__ */ __name((path70, options30) => {
87650
+ if (!filePromisesHash[path70] || options30?.ignoreCache) {
87651
+ filePromisesHash[path70] = readFile13(path70, "utf8");
87652
87652
  }
87653
- return filePromisesHash[path69];
87653
+ return filePromisesHash[path70];
87654
87654
  }, "slurpFile");
87655
87655
  }
87656
87656
  });
@@ -94322,14 +94322,14 @@ var init_Aws_query = __esm({
94322
94322
  cfId: output.headers["x-amz-cf-id"]
94323
94323
  }), "deserializeMetadata");
94324
94324
  throwDefaultError5 = withBaseException(STSServiceException);
94325
- buildHttpRpcRequest = /* @__PURE__ */ __name(async (context2, headers, path69, resolvedHostname, body) => {
94325
+ buildHttpRpcRequest = /* @__PURE__ */ __name(async (context2, headers, path70, resolvedHostname, body) => {
94326
94326
  const { hostname: hostname2, protocol = "https", port, path: basePath } = await context2.endpoint();
94327
94327
  const contents = {
94328
94328
  protocol,
94329
94329
  hostname: hostname2,
94330
94330
  port,
94331
94331
  method: "POST",
94332
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path69 : basePath + path69,
94332
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path70 : basePath + path70,
94333
94333
  headers
94334
94334
  };
94335
94335
  if (resolvedHostname !== void 0) {
@@ -96943,11 +96943,11 @@ var parser = new YargsParser({
96943
96943
  resolve: import_path.resolve,
96944
96944
  // TODO: figure out a way to combine ESM and CJS coverage, such that
96945
96945
  // we can exercise all the lines below:
96946
- require: (path69) => {
96946
+ require: (path70) => {
96947
96947
  if (typeof require !== "undefined") {
96948
- return require(path69);
96949
- } else if (path69.match(/\.json$/)) {
96950
- return JSON.parse((0, import_fs.readFileSync)(path69, "utf8"));
96948
+ return require(path70);
96949
+ } else if (path70.match(/\.json$/)) {
96950
+ return JSON.parse((0, import_fs.readFileSync)(path70, "utf8"));
96951
96951
  } else {
96952
96952
  throw Error("only .json config files are supported in ESM");
96953
96953
  }
@@ -98098,7 +98098,7 @@ var import_undici3 = __toESM(require_undici());
98098
98098
 
98099
98099
  // package.json
98100
98100
  var name = "wrangler";
98101
- var version = "3.103.2";
98101
+ var version = "3.104.0";
98102
98102
 
98103
98103
  // src/environment-variables/misc-variables.ts
98104
98104
  init_import_meta_url();
@@ -99311,12 +99311,12 @@ function parseTree(text, errors = [], options30 = ParseOptions.DEFAULT) {
99311
99311
  return result;
99312
99312
  }
99313
99313
  __name(parseTree, "parseTree");
99314
- function findNodeAtLocation(root, path69) {
99314
+ function findNodeAtLocation(root, path70) {
99315
99315
  if (!root) {
99316
99316
  return void 0;
99317
99317
  }
99318
99318
  let node2 = root;
99319
- for (let segment of path69) {
99319
+ for (let segment of path70) {
99320
99320
  if (typeof segment === "string") {
99321
99321
  if (node2.type !== "object" || !Array.isArray(node2.children)) {
99322
99322
  return void 0;
@@ -99665,14 +99665,14 @@ __name(getNodeType, "getNodeType");
99665
99665
 
99666
99666
  // ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/edit.js
99667
99667
  function setProperty(text, originalPath, value, options30) {
99668
- const path69 = originalPath.slice();
99668
+ const path70 = originalPath.slice();
99669
99669
  const errors = [];
99670
99670
  const root = parseTree(text, errors);
99671
99671
  let parent = void 0;
99672
99672
  let lastSegment = void 0;
99673
- while (path69.length > 0) {
99674
- lastSegment = path69.pop();
99675
- parent = findNodeAtLocation(root, path69);
99673
+ while (path70.length > 0) {
99674
+ lastSegment = path70.pop();
99675
+ parent = findNodeAtLocation(root, path70);
99676
99676
  if (parent === void 0 && value !== void 0) {
99677
99677
  if (typeof lastSegment === "string") {
99678
99678
  value = { [lastSegment]: value };
@@ -99903,8 +99903,8 @@ function format5(documentText, range, options30) {
99903
99903
  return format4(documentText, range, options30);
99904
99904
  }
99905
99905
  __name(format5, "format");
99906
- function modify(text, path69, value, options30) {
99907
- return setProperty(text, path69, value, options30);
99906
+ function modify(text, path70, value, options30) {
99907
+ return setProperty(text, path70, value, options30);
99908
99908
  }
99909
99909
  __name(modify, "modify");
99910
99910
  function applyEdits(text, edits) {
@@ -99974,6 +99974,9 @@ var APIError = class extends ParseError {
99974
99974
  }
99975
99975
  return false;
99976
99976
  }
99977
+ isRetryable() {
99978
+ return String(this.#status).startsWith("5");
99979
+ }
99977
99980
  // Allow `APIError`s to be marked as handled.
99978
99981
  #reportable = true;
99979
99982
  get reportable() {
@@ -100799,11 +100802,11 @@ function findRedirectedWranglerConfig(cwd2, userConfigPath) {
100799
100802
  `);
100800
100803
  }
100801
100804
  }
100802
- logger.warn(esm_default2`
100805
+ logger.info(esm_default2`
100803
100806
  Using redirected Wrangler configuration.
100804
- Configuration being used: "${import_node_path7.default.relative(".", redirectedConfigPath)}"
100805
- Original user's configuration: "${userConfigPath ? import_node_path7.default.relative(".", userConfigPath) : "<no user config found>"}"
100806
- Deploy configuration file: "${import_node_path7.default.relative(".", deployConfigPath)}"
100807
+ - Configuration being used: "${import_node_path7.default.relative(".", redirectedConfigPath)}"
100808
+ - Original user's configuration: "${userConfigPath ? import_node_path7.default.relative(".", userConfigPath) : "<no user config found>"}"
100809
+ - Deploy configuration file: "${import_node_path7.default.relative(".", deployConfigPath)}"
100807
100810
  `);
100808
100811
  return redirectedConfigPath;
100809
100812
  }
@@ -101382,9 +101385,9 @@ Please add "${field}" to "env.${envName}".`
101382
101385
  return rawEnv[field] ?? defaultValue;
101383
101386
  }
101384
101387
  __name(notInheritable, "notInheritable");
101385
- function unwindPropertyPath(root, path69) {
101388
+ function unwindPropertyPath(root, path70) {
101386
101389
  let container = root;
101387
- const parts = path69.split(".");
101390
+ const parts = path70.split(".");
101388
101391
  for (let i5 = 0; i5 < parts.length - 1; i5++) {
101389
101392
  if (!hasProperty(container, parts[i5])) {
101390
101393
  return;
@@ -104279,6 +104282,7 @@ var validateMigrations = /* @__PURE__ */ __name((diagnostics, field, value) => {
104279
104282
  new_sqlite_classes,
104280
104283
  renamed_classes,
104281
104284
  deleted_classes,
104285
+ transferred_classes,
104282
104286
  ...rest
104283
104287
  } = rawMigrations[i5];
104284
104288
  valid = validateAdditionalProperties(
@@ -104325,6 +104329,25 @@ var validateMigrations = /* @__PURE__ */ __name((diagnostics, field, value) => {
104325
104329
  valid = false;
104326
104330
  }
104327
104331
  }
104332
+ if (transferred_classes !== void 0) {
104333
+ if (!Array.isArray(transferred_classes)) {
104334
+ diagnostics.errors.push(
104335
+ `Expected "migrations[${i5}].transferred_classes" to be an array of "{from: string, from_script: string, to: string}" objects but got ${JSON.stringify(
104336
+ transferred_classes
104337
+ )}.`
104338
+ );
104339
+ valid = false;
104340
+ } else if (transferred_classes.some(
104341
+ (c6) => typeof c6 !== "object" || !isRequiredProperty(c6, "from", "string") || !isRequiredProperty(c6, "from_script", "string") || !isRequiredProperty(c6, "to", "string")
104342
+ )) {
104343
+ diagnostics.errors.push(
104344
+ `Expected "migrations[${i5}].transferred_classes" to be an array of "{from: string, from_script: string, to: string}" objects but got ${JSON.stringify(
104345
+ transferred_classes
104346
+ )}.`
104347
+ );
104348
+ valid = false;
104349
+ }
104350
+ }
104328
104351
  valid = validateOptionalTypedArray(
104329
104352
  diagnostics,
104330
104353
  `migrations[${i5}].deleted_classes`,
@@ -107938,7 +107961,7 @@ async function getAccountId() {
107938
107961
  if (e7 instanceof NoDefaultValueProvided) {
107939
107962
  throw new UserError(
107940
107963
  `More than one account available but unable to select one in non-interactive mode.
107941
- Please set the appropriate \`account_id\` in your ${configFileName(void 0)} file.
107964
+ Please set the appropriate \`account_id\` in your ${configFileName(void 0)} file or assign it to the \`CLOUDFLARE_ACCOUNT_ID\` environment variable.
107942
107965
  Available accounts are (\`<name>\`: \`<account_id>\`):
107943
107966
  ${accounts.map((account) => ` \`${account.name}\`: \`${account.id}\``).join("\n")}`
107944
107967
  );
@@ -108945,8 +108968,8 @@ function getSourceMappingPrepareStackTrace(retrieveSourceMap) {
108945
108968
  // Make sure we're using fresh copies of files each time we source map
108946
108969
  emptyCacheBetweenOperations: true,
108947
108970
  // Allow retriever to be overridden at prepare stack trace time
108948
- retrieveSourceMap(path69) {
108949
- return retrieveSourceMapOverride?.(path69) ?? null;
108971
+ retrieveSourceMap(path70) {
108972
+ return retrieveSourceMapOverride?.(path70) ?? null;
108950
108973
  }
108951
108974
  });
108952
108975
  sourceMappingPrepareStackTrace = Error.prepareStackTrace;
@@ -111244,11 +111267,18 @@ var ProxyController = class extends Controller {
111244
111267
  if (willInstantiateMiniflareInstance) {
111245
111268
  void Promise.all([
111246
111269
  proxyWorker.ready,
111247
- proxyWorker.unsafeGetDirectURL("InspectorProxyWorker"),
111248
- this.reconnectInspectorProxyWorker()
111270
+ proxyWorker.unsafeGetDirectURL("InspectorProxyWorker")
111249
111271
  ]).then(([url4, inspectorUrl]) => {
111272
+ return this.reconnectInspectorProxyWorker().then(() => [
111273
+ url4,
111274
+ inspectorUrl
111275
+ ]);
111276
+ }).then(([url4, inspectorUrl]) => {
111250
111277
  this.emitReadyEvent(proxyWorker, url4, inspectorUrl);
111251
111278
  }).catch((error2) => {
111279
+ if (this._torndown) {
111280
+ return;
111281
+ }
111252
111282
  this.emitErrorEvent(
111253
111283
  "Failed to start ProxyWorker or InspectorProxyWorker",
111254
111284
  error2
@@ -111931,8 +111961,8 @@ function getErrorMap() {
111931
111961
  }
111932
111962
  __name(getErrorMap, "getErrorMap");
111933
111963
  var makeIssue = /* @__PURE__ */ __name((params) => {
111934
- const { data, path: path69, errorMaps, issueData } = params;
111935
- const fullPath = [...path69, ...issueData.path || []];
111964
+ const { data, path: path70, errorMaps, issueData } = params;
111965
+ const fullPath = [...path70, ...issueData.path || []];
111936
111966
  const fullIssue = {
111937
111967
  ...issueData,
111938
111968
  path: fullPath
@@ -112033,11 +112063,11 @@ var errorUtil;
112033
112063
  errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === void 0 ? void 0 : message.message;
112034
112064
  })(errorUtil || (errorUtil = {}));
112035
112065
  var ParseInputLazyPath = class {
112036
- constructor(parent, value, path69, key) {
112066
+ constructor(parent, value, path70, key) {
112037
112067
  this._cachedPath = [];
112038
112068
  this.parent = parent;
112039
112069
  this.data = value;
112040
- this._path = path69;
112070
+ this._path = path70;
112041
112071
  this._key = key;
112042
112072
  }
112043
112073
  get path() {
@@ -118144,10 +118174,10 @@ function handleRequireCallsToNodeJSBuiltins(build5) {
118144
118174
  });
118145
118175
  build5.onLoad(
118146
118176
  { filter: /.*/, namespace: REQUIRED_NODE_BUILT_IN_NAMESPACE },
118147
- ({ path: path69 }) => {
118177
+ ({ path: path70 }) => {
118148
118178
  return {
118149
118179
  contents: esm_default2`
118150
- import libDefault from '${path69}';
118180
+ import libDefault from '${path70}';
118151
118181
  module.exports = libDefault;`,
118152
118182
  loader: "js"
118153
118183
  };
@@ -118196,10 +118226,10 @@ function handleUnenvAliasedPackages(build5, alias, external) {
118196
118226
  `;
118197
118227
  build5.onLoad(
118198
118228
  { filter: /.*/, namespace: REQUIRED_UNENV_ALIAS_NAMESPACE },
118199
- ({ path: path69 }) => {
118229
+ ({ path: path70 }) => {
118200
118230
  return {
118201
118231
  contents: esm_default2`
118202
- import * as esm from '${path69}';
118232
+ import * as esm from '${path70}';
118203
118233
  module.exports = __cf_cjs(esm);
118204
118234
  `,
118205
118235
  loader: "js"
@@ -118221,9 +118251,9 @@ function handleNodeJSGlobals(build5, inject) {
118221
118251
  (globalName) => `${prefix}${encodeToLowerCase(globalName)}.js`
118222
118252
  )
118223
118253
  ];
118224
- build5.onResolve({ filter: UNENV_GLOBALS_RE }, ({ path: path69 }) => ({ path: path69 }));
118225
- build5.onLoad({ filter: UNENV_GLOBALS_RE }, ({ path: path69 }) => {
118226
- const globalName = decodeFromLowerCase(path69.match(UNENV_GLOBALS_RE)[1]);
118254
+ build5.onResolve({ filter: UNENV_GLOBALS_RE }, ({ path: path70 }) => ({ path: path70 }));
118255
+ build5.onLoad({ filter: UNENV_GLOBALS_RE }, ({ path: path70 }) => {
118256
+ const globalName = decodeFromLowerCase(path70.match(UNENV_GLOBALS_RE)[1]);
118227
118257
  const { importStatement, exportName } = getGlobalInject(inject[globalName]);
118228
118258
  return {
118229
118259
  contents: esm_default2`
@@ -118271,21 +118301,21 @@ var nodejsCompatPlugin = /* @__PURE__ */ __name((mode) => ({
118271
118301
  });
118272
118302
  pluginBuild.onResolve(
118273
118303
  { filter: /node:.*/ },
118274
- async ({ path: path69, kind, resolveDir, importer }) => {
118275
- const specifier = `${path69}:${kind}:${resolveDir}:${importer}`;
118304
+ async ({ path: path70, kind, resolveDir, importer }) => {
118305
+ const specifier = `${path70}:${kind}:${resolveDir}:${importer}`;
118276
118306
  if (seen.has(specifier)) {
118277
118307
  return;
118278
118308
  }
118279
118309
  seen.add(specifier);
118280
- const result = await pluginBuild.resolve(path69, {
118310
+ const result = await pluginBuild.resolve(path70, {
118281
118311
  kind,
118282
118312
  resolveDir,
118283
118313
  importer
118284
118314
  });
118285
118315
  if (result.errors.length > 0) {
118286
- const pathWarnedPackages = warnedPackages.get(path69) ?? [];
118316
+ const pathWarnedPackages = warnedPackages.get(path70) ?? [];
118287
118317
  pathWarnedPackages.push(importer);
118288
- warnedPackages.set(path69, pathWarnedPackages);
118318
+ warnedPackages.set(path70, pathWarnedPackages);
118289
118319
  return { external: true };
118290
118320
  }
118291
118321
  return result;
@@ -118313,10 +118343,10 @@ var nodejsCompatPlugin = /* @__PURE__ */ __name((mode) => ({
118313
118343
  });
118314
118344
  pluginBuild.onEnd(() => {
118315
118345
  if (mode !== "v1") {
118316
- warnedPackages.forEach((importers, path69) => {
118346
+ warnedPackages.forEach((importers, path70) => {
118317
118347
  logger.warn(
118318
118348
  dedent2`
118319
- The package "${path69}" wasn't found on the file system but is built into node.
118349
+ The package "${path70}" wasn't found on the file system but is built into node.
118320
118350
  Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag. Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported from:
118321
118351
  ${toList(importers, pluginBuild.initialOptions.absWorkingDir)}`
118322
118352
  );
@@ -120810,18 +120840,28 @@ __name(triggersDeploy, "triggersDeploy");
120810
120840
  // src/utils/retry.ts
120811
120841
  init_import_meta_url();
120812
120842
  var import_promises8 = require("node:timers/promises");
120813
- async function retryOnError(action, backoff = 2e3, attempts = 3) {
120843
+ var MAX_ATTEMPTS = 3;
120844
+ async function retryOnAPIFailure(action, backoff = 0, attempts = MAX_ATTEMPTS) {
120814
120845
  try {
120815
120846
  return await action();
120816
120847
  } catch (err) {
120848
+ if (err instanceof APIError && !err.isRetryable() || !(err instanceof TypeError)) {
120849
+ throw err;
120850
+ }
120851
+ logger.info(source_default.dim(`Retrying API call after error...`));
120852
+ logger.debug(err);
120817
120853
  if (attempts <= 1) {
120818
120854
  throw err;
120819
120855
  }
120820
120856
  await (0, import_promises8.setTimeout)(backoff);
120821
- return retryOnError(action, backoff, attempts - 1);
120857
+ return retryOnAPIFailure(
120858
+ action,
120859
+ backoff + (MAX_ATTEMPTS - attempts) * 1e3,
120860
+ attempts - 1
120861
+ );
120822
120862
  }
120823
120863
  }
120824
- __name(retryOnError, "retryOnError");
120864
+ __name(retryOnAPIFailure, "retryOnAPIFailure");
120825
120865
 
120826
120866
  // src/versions/api.ts
120827
120867
  init_import_meta_url();
@@ -122014,7 +122054,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
122014
122054
  try {
122015
122055
  let result;
122016
122056
  if (canUseNewVersionsDeploymentsApi) {
122017
- const versionResult = await retryOnError(
122057
+ const versionResult = await retryOnAPIFailure(
122018
122058
  async () => fetchResult(
122019
122059
  `/accounts/${accountId}/workers/scripts/${scriptName}/versions`,
122020
122060
  {
@@ -122048,7 +122088,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
122048
122088
  startup_time_ms: versionResult.startup_time_ms
122049
122089
  };
122050
122090
  } else {
122051
- result = await retryOnError(
122091
+ result = await retryOnAPIFailure(
122052
122092
  async () => fetchResult(
122053
122093
  workerUrl,
122054
122094
  {
@@ -125020,8 +125060,8 @@ function buildPluginFromFunctions({
125020
125060
  ]
125021
125061
  };
125022
125062
  }
125023
- const path69 = `assets:./${(0, import_node_path41.relative)(outdir, directory)}`;
125024
- return { path: path69, external: true, namespace: "assets" };
125063
+ const path70 = `assets:./${(0, import_node_path41.relative)(outdir, directory)}`;
125064
+ return { path: path70, external: true, namespace: "assets" };
125025
125065
  });
125026
125066
  }
125027
125067
  },
@@ -127101,6 +127141,12 @@ async function resolveTriggers(config, input) {
127101
127141
  }
127102
127142
  __name(resolveTriggers, "resolveTriggers");
127103
127143
  async function resolveConfig(config, input) {
127144
+ if (config.pages_build_output_dir && input.dev?.multiworkerPrimary === false) {
127145
+ throw new UserError(
127146
+ `You cannot use a Pages project as a service binding target.
127147
+ If you are trying to develop Pages and Workers together, please use \`wrangler pages dev\`. Note the first config file specified must be for the Pages project`
127148
+ );
127149
+ }
127104
127150
  const legacySite = unwrapHook(input.legacy?.site, config);
127105
127151
  const legacyAssets = unwrapHook(input.legacy?.legacyAssets, config);
127106
127152
  const entry = await getEntry(
@@ -128235,6 +128281,11 @@ async function getMiniflareOptionsFromConfig(rawConfig, env7, options30) {
128235
128281
  serviceBindings: {},
128236
128282
  migrations: rawConfig.migrations
128237
128283
  });
128284
+ const processedAssetOptions = getAssetsOptions(
128285
+ { assets: void 0 },
128286
+ rawConfig
128287
+ );
128288
+ const assetOptions = processedAssetOptions ? buildAssetOptions({ assets: processedAssetOptions }) : {};
128238
128289
  const persistOptions = getMiniflarePersistOptions(options30.persist);
128239
128290
  const serviceBindings = await getServiceBindings(bindings.services);
128240
128291
  const miniflareOptions = {
@@ -128246,7 +128297,8 @@ async function getMiniflareOptionsFromConfig(rawConfig, env7, options30) {
128246
128297
  serviceBindings: {
128247
128298
  ...serviceBindings,
128248
128299
  ...bindingOptions.serviceBindings
128249
- }
128300
+ },
128301
+ ...assetOptions
128250
128302
  },
128251
128303
  ...externalWorkers
128252
128304
  ],
@@ -132331,13 +132383,13 @@ var getQueryString = /* @__PURE__ */ __name((params) => {
132331
132383
  }, "getQueryString");
132332
132384
  var getUrl = /* @__PURE__ */ __name((config, options30) => {
132333
132385
  const encoder = config.ENCODE_PATH || encodeURI;
132334
- const path69 = options30.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring2, group) => {
132386
+ const path70 = options30.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring2, group) => {
132335
132387
  if (options30.path?.hasOwnProperty(group)) {
132336
132388
  return encoder(String(options30.path[group]));
132337
132389
  }
132338
132390
  return substring2;
132339
132391
  });
132340
- const url4 = `${config.BASE}${path69}`;
132392
+ const url4 = `${config.BASE}${path70}`;
132341
132393
  if (options30.query) {
132342
132394
  return `${url4}${getQueryString(options30.query)}`;
132343
132395
  }
@@ -133816,11 +133868,11 @@ var Diff = class {
133816
133868
  while (!execEditLength()) {
133817
133869
  }
133818
133870
  }
133819
- addToPath(path69, added, removed, oldPosInc) {
133820
- const last = path69.lastComponent;
133871
+ addToPath(path70, added, removed, oldPosInc) {
133872
+ const last = path70.lastComponent;
133821
133873
  if (last && last.added === added && last.removed === removed) {
133822
133874
  return {
133823
- oldPos: path69.oldPos + oldPosInc,
133875
+ oldPos: path70.oldPos + oldPosInc,
133824
133876
  lastComponent: {
133825
133877
  count: last.count + 1,
133826
133878
  added,
@@ -133830,7 +133882,7 @@ var Diff = class {
133830
133882
  };
133831
133883
  }
133832
133884
  return {
133833
- oldPos: path69.oldPos + oldPosInc,
133885
+ oldPos: path70.oldPos + oldPosInc,
133834
133886
  lastComponent: {
133835
133887
  count: 1,
133836
133888
  added,
@@ -134935,15 +134987,15 @@ var sshCommand = /* @__PURE__ */ __name((yargs) => {
134935
134987
  }, "sshCommand");
134936
134988
  async function tryToRetrieveAllDefaultSSHKeyPaths() {
134937
134989
  const HOME = (0, import_os4.homedir)();
134938
- const path69 = `${HOME}/.ssh`;
134990
+ const path70 = `${HOME}/.ssh`;
134939
134991
  const paths = [];
134940
134992
  try {
134941
- const dirList = await (0, import_promises22.readdir)(path69);
134993
+ const dirList = await (0, import_promises22.readdir)(path70);
134942
134994
  for (const file of dirList) {
134943
134995
  if (file.endsWith(".pub")) {
134944
- const s5 = await (0, import_promises22.stat)(`${path69}/${file}`);
134996
+ const s5 = await (0, import_promises22.stat)(`${path70}/${file}`);
134945
134997
  if (s5.isFile()) {
134946
- paths.push(`${path69}/${file}`);
134998
+ paths.push(`${path70}/${file}`);
134947
134999
  }
134948
135000
  }
134949
135001
  }
@@ -134955,8 +135007,8 @@ async function tryToRetrieveAllDefaultSSHKeyPaths() {
134955
135007
  __name(tryToRetrieveAllDefaultSSHKeyPaths, "tryToRetrieveAllDefaultSSHKeyPaths");
134956
135008
  async function tryToRetrieveADefaultPath() {
134957
135009
  const paths = await tryToRetrieveAllDefaultSSHKeyPaths();
134958
- const path69 = paths.pop();
134959
- return path69 ?? "";
135010
+ const path70 = paths.pop();
135011
+ return path70 ?? "";
134960
135012
  }
134961
135013
  __name(tryToRetrieveADefaultPath, "tryToRetrieveADefaultPath");
134962
135014
  function clipPublicSSHKey(value) {
@@ -146802,8 +146854,9 @@ __name(ListHandler4, "ListHandler");
146802
146854
  // src/pages/dev.ts
146803
146855
  init_import_meta_url();
146804
146856
  var import_node_child_process5 = require("node:child_process");
146857
+ var import_node_events6 = __toESM(require("node:events"));
146805
146858
  var import_node_fs33 = require("node:fs");
146806
- var import_node_path62 = require("node:path");
146859
+ var import_node_path62 = __toESM(require("node:path"));
146807
146860
  init_esm2();
146808
146861
  var esbuild3 = __toESM(require("esbuild"));
146809
146862
 
@@ -146983,11 +147036,6 @@ function Options14(yargs) {
146983
147036
  deprecated: true,
146984
147037
  hidden: true
146985
147038
  },
146986
- config: {
146987
- describe: "Pages does not support custom paths for the Wrangler configuration file",
146988
- type: "string",
146989
- hidden: true
146990
- },
146991
147039
  "log-level": {
146992
147040
  choices: ["debug", "info", "log", "warn", "error", "none"],
146993
147041
  describe: "Specify logging level"
@@ -147014,7 +147062,7 @@ var Handler14 = /* @__PURE__ */ __name(async (args) => {
147014
147062
  "--experimental-local is no longer required and will be removed in a future version.\n`wrangler pages dev` now uses the local Cloudflare Workers runtime by default."
147015
147063
  );
147016
147064
  }
147017
- if (args.config) {
147065
+ if (args.config && !Array.isArray(args.config)) {
147018
147066
  throw new FatalError(
147019
147067
  "Pages does not support custom paths for the Wrangler configuration file",
147020
147068
  1
@@ -147033,9 +147081,14 @@ The Worker script should be named \`_worker.js\` and located in the build output
147033
147081
  );
147034
147082
  }
147035
147083
  const config = readConfig(
147036
- { ...args, env: void 0 },
147084
+ { ...args, env: void 0, config: void 0 },
147037
147085
  { useRedirectIfAvailable: true }
147038
147086
  );
147087
+ if (args.config && Array.isArray(args.config) && config.configPath && import_node_path62.default.resolve(process.cwd(), args.config[0]) !== config.configPath) {
147088
+ throw new FatalError(
147089
+ "The first `--config` argument must point to your Pages configuration file: " + import_node_path62.default.relative(process.cwd(), config.configPath)
147090
+ );
147091
+ }
147039
147092
  const resolvedDirectory = args.directory ?? config.pages_build_output_dir;
147040
147093
  const [_pages, _dev, ...remaining] = args._;
147041
147094
  const command2 = remaining;
@@ -147188,8 +147241,8 @@ The Worker script should be named \`_worker.js\` and located in the build output
147188
147241
  }, 50);
147189
147242
  try {
147190
147243
  await runBuild2();
147191
- watcher.on("all", async (eventName, path69) => {
147192
- logger.debug(`\u{1F300} "${eventName}" event detected at ${path69}.`);
147244
+ watcher.on("all", async (eventName, p6) => {
147245
+ logger.debug(`\u{1F300} "${eventName}" event detected at ${p6}.`);
147193
147246
  if (eventName === "unlink") {
147194
147247
  return;
147195
147248
  }
@@ -147260,8 +147313,8 @@ The Worker script should be named \`_worker.js\` and located in the build output
147260
147313
  }, 50);
147261
147314
  try {
147262
147315
  await buildFn();
147263
- watcher.on("all", async (eventName, path69) => {
147264
- logger.debug(`\u{1F300} "${eventName}" event detected at ${path69}.`);
147316
+ watcher.on("all", async (eventName, p6) => {
147317
+ logger.debug(`\u{1F300} "${eventName}" event detected at ${p6}.`);
147265
147318
  debouncedBuildFn();
147266
147319
  });
147267
147320
  } catch (e7) {
@@ -147364,56 +147417,94 @@ ${JSON.stringify(defaultRoutesJSONSpec, null, 2)}`
147364
147417
  });
147365
147418
  }
147366
147419
  }
147367
- const { stop, waitUntilExit } = await unstable_dev(scriptEntrypoint, {
147368
- env: void 0,
147369
- ip,
147370
- port,
147371
- inspectorPort,
147372
- localProtocol,
147373
- httpsKeyPath: args.httpsKeyPath,
147374
- httpsCertPath: args.httpsCertPath,
147375
- compatibilityDate,
147376
- compatibilityFlags,
147377
- nodeCompat: nodejsCompatMode === "legacy",
147378
- vars,
147379
- kv: kv_namespaces,
147380
- durableObjects: do_bindings,
147381
- r2: r2_buckets,
147382
- services,
147383
- ai: ai3,
147384
- rules: usingWorkerDirectory ? [
147385
- {
147386
- type: "ESModule",
147387
- globs: ["**/*.js", "**/*.mjs"]
147388
- }
147389
- ] : void 0,
147390
- bundle: enableBundling,
147391
- persistTo: args.persistTo,
147392
- inspect: void 0,
147393
- logLevel: args.logLevel,
147394
- experimental: {
147395
- processEntrypoint: true,
147396
- additionalModules: modules,
147420
+ const devServer = await run(
147421
+ {
147422
+ MULTIWORKER: Array.isArray(args.config),
147423
+ RESOURCES_PROVISION: false
147424
+ },
147425
+ () => startDev({
147426
+ script: scriptEntrypoint,
147427
+ _: [],
147428
+ $0: "",
147429
+ remote: false,
147430
+ local: true,
147431
+ experimentalLocal: void 0,
147397
147432
  d1Databases: d1_databases,
147398
- disableExperimentalWarning: true,
147433
+ testScheduled: false,
147399
147434
  enablePagesAssetsServiceBinding: {
147400
147435
  proxyPort,
147401
147436
  directory
147402
147437
  },
147403
- liveReload: args.liveReload,
147404
147438
  forceLocal: true,
147439
+ liveReload: args.liveReload,
147405
147440
  showInteractiveDevSession: args.showInteractiveDevSession,
147406
- testMode: false,
147407
- watch: true,
147408
- enableIpc: true
147409
- }
147410
- });
147441
+ processEntrypoint: true,
147442
+ additionalModules: modules,
147443
+ v: void 0,
147444
+ assets: void 0,
147445
+ name: void 0,
147446
+ noBundle: false,
147447
+ format: void 0,
147448
+ latest: false,
147449
+ routes: void 0,
147450
+ host: void 0,
147451
+ localUpstream: void 0,
147452
+ experimentalPublic: void 0,
147453
+ upstreamProtocol: void 0,
147454
+ var: void 0,
147455
+ define: void 0,
147456
+ alias: void 0,
147457
+ jsxFactory: void 0,
147458
+ jsxFragment: void 0,
147459
+ tsconfig: void 0,
147460
+ minify: void 0,
147461
+ experimentalEnableLocalPersistence: void 0,
147462
+ legacyEnv: void 0,
147463
+ public: void 0,
147464
+ env: void 0,
147465
+ ip,
147466
+ port,
147467
+ inspectorPort,
147468
+ localProtocol,
147469
+ httpsKeyPath: args.httpsKeyPath,
147470
+ httpsCertPath: args.httpsCertPath,
147471
+ compatibilityDate,
147472
+ compatibilityFlags,
147473
+ nodeCompat: nodejsCompatMode === "legacy",
147474
+ vars,
147475
+ kv: kv_namespaces,
147476
+ durableObjects: do_bindings,
147477
+ r2: r2_buckets,
147478
+ services,
147479
+ ai: ai3,
147480
+ rules: usingWorkerDirectory ? [
147481
+ {
147482
+ type: "ESModule",
147483
+ globs: ["**/*.js", "**/*.mjs"]
147484
+ }
147485
+ ] : void 0,
147486
+ bundle: enableBundling,
147487
+ persistTo: args.persistTo,
147488
+ logLevel: args.logLevel ?? "log",
147489
+ experimentalProvision: void 0,
147490
+ experimentalVectorizeBindToProd: false,
147491
+ enableIpc: true,
147492
+ config: Array.isArray(args.config) ? args.config : void 0,
147493
+ legacyAssets: void 0,
147494
+ site: void 0,
147495
+ siteInclude: void 0,
147496
+ siteExclude: void 0,
147497
+ inspect: void 0
147498
+ })
147499
+ );
147411
147500
  sendMetricsEvent("run pages dev");
147412
- CLEANUP_CALLBACKS.push(stop);
147413
147501
  process.on("exit", CLEANUP);
147414
147502
  process.on("SIGINT", CLEANUP);
147415
147503
  process.on("SIGTERM", CLEANUP);
147416
- await waitUntilExit();
147504
+ await import_node_events6.default.once(devServer.devEnv, "teardown");
147505
+ const teardownRegistry = await devServer.teardownRegistryPromise;
147506
+ await teardownRegistry?.(devServer.devEnv.config.latestConfig?.name);
147507
+ devServer.unregisterHotKeys?.();
147417
147508
  CLEANUP();
147418
147509
  process.exit(0);
147419
147510
  }, "Handler");
@@ -152589,7 +152680,7 @@ async function authorizeR2Bucket(pipelineName, accountId, bucketName) {
152589
152680
  },
152590
152681
  endpoint: getAccountR2Endpoint(accountId)
152591
152682
  });
152592
- !__testSkipDelaysFlag && await retryOnError(
152683
+ !__testSkipDelaysFlag && await retryOnAPIFailure(
152593
152684
  async () => {
152594
152685
  await r22.send(
152595
152686
  new HeadBucketCommand({
@@ -155287,7 +155378,7 @@ var r2BucketNotificationDeleteCommand = createCommand({
155287
155378
  init_import_meta_url();
155288
155379
  var import_node_buffer5 = require("node:buffer");
155289
155380
  var fs27 = __toESM(require("node:fs"));
155290
- var path67 = __toESM(require("node:path"));
155381
+ var path68 = __toESM(require("node:path"));
155291
155382
  var stream = __toESM(require("node:stream"));
155292
155383
  var r2ObjectNamespace = createNamespace({
155293
155384
  metadata: {
@@ -155353,7 +155444,7 @@ var r2ObjectGetCommand = createCommand({
155353
155444
  }
155354
155445
  let output;
155355
155446
  if (file) {
155356
- fs27.mkdirSync(path67.dirname(file), { recursive: true });
155447
+ fs27.mkdirSync(path68.dirname(file), { recursive: true });
155357
155448
  output = fs27.createWriteStream(file);
155358
155449
  } else {
155359
155450
  output = process.stdout;
@@ -156477,8 +156568,8 @@ function isValidProtocol(protocol) {
156477
156568
  }
156478
156569
  __name(isValidProtocol, "isValidProtocol");
156479
156570
  function dsnToString(dsn, withPassword = false) {
156480
- const { host, path: path69, pass: pass2, port, projectId, protocol, publicKey } = dsn;
156481
- return `${protocol}://${publicKey}${withPassword && pass2 ? `:${pass2}` : ""}@${host}${port ? `:${port}` : ""}/${path69 ? `${path69}/` : path69}${projectId}`;
156571
+ const { host, path: path70, pass: pass2, port, projectId, protocol, publicKey } = dsn;
156572
+ return `${protocol}://${publicKey}${withPassword && pass2 ? `:${pass2}` : ""}@${host}${port ? `:${port}` : ""}/${path70 ? `${path70}/` : path70}${projectId}`;
156482
156573
  }
156483
156574
  __name(dsnToString, "dsnToString");
156484
156575
  function dsnFromString(str) {
@@ -156490,11 +156581,11 @@ function dsnFromString(str) {
156490
156581
  return void 0;
156491
156582
  }
156492
156583
  const [protocol, publicKey, pass2 = "", host, port = "", lastPath] = match2.slice(1);
156493
- let path69 = "";
156584
+ let path70 = "";
156494
156585
  let projectId = lastPath;
156495
156586
  const split = projectId.split("/");
156496
156587
  if (split.length > 1) {
156497
- path69 = split.slice(0, -1).join("/");
156588
+ path70 = split.slice(0, -1).join("/");
156498
156589
  projectId = split.pop();
156499
156590
  }
156500
156591
  if (projectId) {
@@ -156503,7 +156594,7 @@ function dsnFromString(str) {
156503
156594
  projectId = projectMatch[0];
156504
156595
  }
156505
156596
  }
156506
- return dsnFromComponents({ host, pass: pass2, path: path69, projectId, port, protocol, publicKey });
156597
+ return dsnFromComponents({ host, pass: pass2, path: path70, projectId, port, protocol, publicKey });
156507
156598
  }
156508
156599
  __name(dsnFromString, "dsnFromString");
156509
156600
  function dsnFromComponents(components) {
@@ -157591,9 +157682,9 @@ function getNumberOfUrlSegments(url4) {
157591
157682
  }
157592
157683
  __name(getNumberOfUrlSegments, "getNumberOfUrlSegments");
157593
157684
  function getSanitizedUrlString(url4) {
157594
- const { protocol, host, path: path69 } = url4;
157685
+ const { protocol, host, path: path70 } = url4;
157595
157686
  const filteredHost = host && host.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || "";
157596
- return `${protocol ? `${protocol}://` : ""}${filteredHost}${path69}`;
157687
+ return `${protocol ? `${protocol}://` : ""}${filteredHost}${path70}`;
157597
157688
  }
157598
157689
  __name(getSanitizedUrlString, "getSanitizedUrlString");
157599
157690
 
@@ -157608,13 +157699,13 @@ var DEFAULT_REQUEST_INCLUDES = ["cookies", "data", "headers", "method", "query_s
157608
157699
  var DEFAULT_USER_INCLUDES = ["id", "username", "email"];
157609
157700
  function extractPathForTransaction(req, options30 = {}) {
157610
157701
  const method = req.method && req.method.toUpperCase();
157611
- let path69 = "";
157702
+ let path70 = "";
157612
157703
  let source = "url";
157613
157704
  if (options30.customRoute || req.route) {
157614
- path69 = options30.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`;
157705
+ path70 = options30.customRoute || `${req.baseUrl || ""}${req.route && req.route.path}`;
157615
157706
  source = "route";
157616
157707
  } else if (req.originalUrl || req.url) {
157617
- path69 = stripUrlQueryAndFragment(req.originalUrl || req.url || "");
157708
+ path70 = stripUrlQueryAndFragment(req.originalUrl || req.url || "");
157618
157709
  }
157619
157710
  let name2 = "";
157620
157711
  if (options30.method && method) {
@@ -157623,8 +157714,8 @@ function extractPathForTransaction(req, options30 = {}) {
157623
157714
  if (options30.method && options30.path) {
157624
157715
  name2 += " ";
157625
157716
  }
157626
- if (options30.path && path69) {
157627
- name2 += path69;
157717
+ if (options30.path && path70) {
157718
+ name2 += path70;
157628
157719
  }
157629
157720
  return [name2, source];
157630
157721
  }
@@ -162114,13 +162205,13 @@ function instrumentRouter(appOrRouter) {
162114
162205
  }, "process_params");
162115
162206
  }
162116
162207
  __name(instrumentRouter, "instrumentRouter");
162117
- var extractOriginalRoute = /* @__PURE__ */ __name((path69, regexp, keys) => {
162118
- if (!path69 || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, "access", (_10) => _10[0], "optionalAccess", (_11) => _11.offset])) {
162208
+ var extractOriginalRoute = /* @__PURE__ */ __name((path70, regexp, keys) => {
162209
+ if (!path70 || !regexp || !keys || Object.keys(keys).length === 0 || !_optionalChain([keys, "access", (_10) => _10[0], "optionalAccess", (_11) => _11.offset])) {
162119
162210
  return void 0;
162120
162211
  }
162121
162212
  const orderedKeys = keys.sort((a5, b6) => a5.offset - b6.offset);
162122
162213
  const pathRegex = new RegExp(regexp, `${regexp.flags}d`);
162123
- const execResult = pathRegex.exec(path69);
162214
+ const execResult = pathRegex.exec(path70);
162124
162215
  if (!execResult || !execResult.indices) {
162125
162216
  return void 0;
162126
162217
  }
@@ -162128,7 +162219,7 @@ var extractOriginalRoute = /* @__PURE__ */ __name((path69, regexp, keys) => {
162128
162219
  if (paramIndices.length !== orderedKeys.length) {
162129
162220
  return void 0;
162130
162221
  }
162131
- let resultPath = path69;
162222
+ let resultPath = path70;
162132
162223
  let indexShift = 0;
162133
162224
  paramIndices.forEach((item, index) => {
162134
162225
  if (item) {
@@ -163030,8 +163121,8 @@ init_import_meta_url();
163030
163121
  init_import_meta_url();
163031
163122
  var import_path21 = require("path");
163032
163123
  var isWindowsPlatform = import_path21.sep === "\\";
163033
- function normalizeWindowsPath(path69) {
163034
- return path69.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
163124
+ function normalizeWindowsPath(path70) {
163125
+ return path70.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
163035
163126
  }
163036
163127
  __name(normalizeWindowsPath, "normalizeWindowsPath");
163037
163128
  function getModuleFromFilename(filename, normalizeWindowsPathSeparator = isWindowsPlatform) {
@@ -163220,15 +163311,15 @@ init_import_meta_url();
163220
163311
  var import_url7 = require("url");
163221
163312
  function extractRawUrl(requestOptions) {
163222
163313
  const { protocol, hostname: hostname2, port } = parseRequestOptions(requestOptions);
163223
- const path69 = requestOptions.path ? requestOptions.path : "/";
163224
- return `${protocol}//${hostname2}${port}${path69}`;
163314
+ const path70 = requestOptions.path ? requestOptions.path : "/";
163315
+ return `${protocol}//${hostname2}${port}${path70}`;
163225
163316
  }
163226
163317
  __name(extractRawUrl, "extractRawUrl");
163227
163318
  function extractUrl(requestOptions) {
163228
163319
  const { protocol, hostname: hostname2, port } = parseRequestOptions(requestOptions);
163229
- const path69 = requestOptions.pathname || "/";
163320
+ const path70 = requestOptions.pathname || "/";
163230
163321
  const authority = requestOptions.auth ? redactAuthority(requestOptions.auth) : "";
163231
- return `${protocol}//${authority}${hostname2}${port}${path69}`;
163322
+ return `${protocol}//${authority}${hostname2}${port}${path70}`;
163232
163323
  }
163233
163324
  __name(extractUrl, "extractUrl");
163234
163325
  function redactAuthority(auth) {
@@ -163769,8 +163860,8 @@ function collectModules() {
163769
163860
  const paths = getPaths();
163770
163861
  const infos = {};
163771
163862
  const seen = {};
163772
- paths.forEach((path69) => {
163773
- let dir = path69;
163863
+ paths.forEach((path70) => {
163864
+ let dir = path70;
163774
163865
  const updir = /* @__PURE__ */ __name(() => {
163775
163866
  const orig = dir;
163776
163867
  dir = (0, import_path22.dirname)(orig);
@@ -163845,9 +163936,9 @@ init_import_meta_url();
163845
163936
  var import_fs21 = require("fs");
163846
163937
  var FILE_CONTENT_CACHE = new LRUMap(100);
163847
163938
  var DEFAULT_LINES_OF_CONTEXT = 7;
163848
- function readTextFileAsync(path69) {
163939
+ function readTextFileAsync(path70) {
163849
163940
  return new Promise((resolve24, reject) => {
163850
- (0, import_fs21.readFile)(path69, "utf8", (err, data) => {
163941
+ (0, import_fs21.readFile)(path70, "utf8", (err, data) => {
163851
163942
  if (err)
163852
163943
  reject(err);
163853
163944
  else
@@ -165193,172 +165284,192 @@ __name(closeSentry, "closeSentry");
165193
165284
  init_import_meta_url();
165194
165285
  var import_promises31 = require("node:timers/promises");
165195
165286
  var import_signal_exit6 = __toESM(require_signal_exit());
165196
- function tailOptions(yargs) {
165197
- return yargs.positional("worker", {
165198
- describe: "Name or route of the worker to tail",
165199
- type: "string"
165200
- }).option("format", {
165201
- default: process.stdout.isTTY ? "pretty" : "json",
165202
- choices: ["json", "pretty"],
165203
- describe: "The format of log entries"
165204
- }).option("status", {
165205
- choices: ["ok", "error", "canceled"],
165206
- describe: "Filter by invocation status",
165207
- array: true
165208
- }).option("header", {
165209
- type: "string",
165210
- requiresArg: true,
165211
- describe: "Filter by HTTP header"
165212
- }).option("method", {
165213
- type: "string",
165214
- requiresArg: true,
165215
- describe: "Filter by HTTP method",
165216
- array: true
165217
- }).option("sampling-rate", {
165218
- type: "number",
165219
- describe: "Adds a percentage of requests to log sampling rate"
165220
- }).option("search", {
165221
- type: "string",
165222
- requiresArg: true,
165223
- describe: "Filter by a text match in console.log messages"
165224
- }).option("ip", {
165225
- type: "string",
165226
- requiresArg: true,
165227
- describe: 'Filter by the IP address the request originates from. Use "self" to filter for your own IP',
165228
- array: true
165229
- }).option("version-id", {
165230
- type: "string",
165231
- requiresArg: true,
165232
- describe: "Filter by Worker version"
165233
- }).option("debug", {
165234
- type: "boolean",
165235
- hidden: true,
165236
- default: false,
165237
- describe: "If a log would have been filtered out, send it through anyway alongside the filter which would have blocked it."
165238
- }).option("legacy-env", {
165239
- type: "boolean",
165240
- describe: "Use legacy environments",
165241
- hidden: true
165242
- });
165243
- }
165244
- __name(tailOptions, "tailOptions");
165245
- async function tailHandler(args) {
165246
- if (args.format === "pretty") {
165247
- await printWranglerBanner();
165248
- }
165249
- const config = readConfig(args);
165250
- if (config.pages_build_output_dir) {
165251
- throw new UserError(
165252
- "It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages deployment tail` instead."
165253
- );
165254
- }
165255
- sendMetricsEvent("begin log stream", {
165256
- sendMetrics: config.send_metrics
165257
- });
165258
- let scriptName;
165259
- const accountId = await requireAuth(config);
165260
- if (args.worker?.includes(".")) {
165261
- scriptName = await getWorkerForZone(
165262
- {
165263
- worker: args.worker,
165264
- accountId
165265
- },
165266
- config.configPath
165267
- );
165287
+ var tailCommand = createCommand({
165288
+ metadata: {
165289
+ description: "\u{1F99A} Start a log tailing session for a Worker",
165290
+ status: "stable",
165291
+ owner: "Workers: Workers Observability"
165292
+ },
165293
+ positionalArgs: ["worker"],
165294
+ args: {
165295
+ worker: {
165296
+ describe: "Name or route of the worker to tail",
165297
+ type: "string"
165298
+ },
165299
+ format: {
165300
+ choices: ["json", "pretty"],
165301
+ describe: "The format of log entries"
165302
+ },
165303
+ status: {
165304
+ choices: ["ok", "error", "canceled"],
165305
+ describe: "Filter by invocation status",
165306
+ array: true
165307
+ },
165308
+ header: {
165309
+ type: "string",
165310
+ requiresArg: true,
165311
+ describe: "Filter by HTTP header"
165312
+ },
165313
+ method: {
165314
+ type: "string",
165315
+ requiresArg: true,
165316
+ describe: "Filter by HTTP method",
165317
+ array: true
165318
+ },
165319
+ "sampling-rate": {
165320
+ type: "number",
165321
+ describe: "Adds a percentage of requests to log sampling rate"
165322
+ },
165323
+ search: {
165324
+ type: "string",
165325
+ requiresArg: true,
165326
+ describe: "Filter by a text match in console.log messages"
165327
+ },
165328
+ ip: {
165329
+ type: "string",
165330
+ requiresArg: true,
165331
+ describe: 'Filter by the IP address the request originates from. Use "self" to filter for your own IP',
165332
+ array: true
165333
+ },
165334
+ "version-id": {
165335
+ type: "string",
165336
+ requiresArg: true,
165337
+ describe: "Filter by Worker version"
165338
+ },
165339
+ debug: {
165340
+ type: "boolean",
165341
+ hidden: true,
165342
+ default: false,
165343
+ describe: "If a log would have been filtered out, send it through anyway alongside the filter which would have blocked it."
165344
+ },
165345
+ "legacy-env": {
165346
+ type: "boolean",
165347
+ describe: "Use legacy environments",
165348
+ hidden: true
165349
+ }
165350
+ },
165351
+ behaviour: {
165352
+ printBanner: false
165353
+ },
165354
+ async handler(args, { config }) {
165355
+ args.format ??= process.stdout.isTTY ? "pretty" : "json";
165268
165356
  if (args.format === "pretty") {
165269
- logger.log(`Connecting to worker ${scriptName} at route ${args.worker}`);
165357
+ await printWranglerBanner();
165270
165358
  }
165271
- } else {
165272
- scriptName = getLegacyScriptName({ name: args.worker, ...args }, config);
165273
- }
165274
- if (!scriptName) {
165275
- throw new UserError(
165276
- `Required Worker name missing. Please specify the Worker name in your ${configFileName(config.configPath)} file, or pass it as an argument with \`wrangler tail <worker-name>\``
165277
- );
165278
- }
165279
- const cliFilters = {
165280
- status: args.status,
165281
- header: args.header,
165282
- method: args.method,
165283
- samplingRate: args.samplingRate,
165284
- search: args.search,
165285
- clientIp: args.ip,
165286
- versionId: args.versionId
165287
- };
165288
- const filters = translateCLICommandToFilterMessage(cliFilters);
165289
- const { tail, expiration, deleteTail } = await createTail(
165290
- accountId,
165291
- scriptName,
165292
- filters,
165293
- args.debug,
165294
- !isLegacyEnv(config) ? args.env : void 0
165295
- );
165296
- const scriptDisplayName = `${scriptName}${args.env && !isLegacyEnv(config) ? ` (${args.env})` : ""}`;
165297
- if (args.format === "pretty") {
165298
- logger.log(
165299
- `Successfully created tail, expires at ${expiration.toLocaleString()}`
165300
- );
165301
- }
165302
- const printLog = args.format === "pretty" ? prettyPrintLogs : jsonPrintLogs;
165303
- tail.on("message", printLog);
165304
- while (tail.readyState !== tail.OPEN) {
165305
- switch (tail.readyState) {
165306
- case tail.CONNECTING:
165307
- await (0, import_promises31.setTimeout)(100);
165308
- break;
165309
- case tail.CLOSING:
165310
- await (0, import_promises31.setTimeout)(100);
165311
- break;
165312
- case tail.CLOSED:
165313
- sendMetricsEvent("end log stream", {
165314
- sendMetrics: config.send_metrics
165315
- });
165316
- throw new Error(
165317
- `Connection to ${scriptDisplayName} closed unexpectedly.`
165318
- );
165359
+ if (config.pages_build_output_dir) {
165360
+ throw new UserError(
165361
+ "It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages deployment tail` instead."
165362
+ );
165319
165363
  }
165320
- }
165321
- if (args.format === "pretty") {
165322
- logger.log(`Connected to ${scriptDisplayName}, waiting for logs...`);
165323
- }
165324
- const cancelPing = startWebSocketPing();
165325
- tail.on("close", exit6);
165326
- (0, import_signal_exit6.default)(exit6);
165327
- async function exit6() {
165328
- cancelPing();
165329
- tail.terminate();
165330
- await deleteTail();
165331
- sendMetricsEvent("end log stream", {
165364
+ sendMetricsEvent("begin log stream", {
165332
165365
  sendMetrics: config.send_metrics
165333
165366
  });
165334
- }
165335
- __name(exit6, "exit");
165336
- function startWebSocketPing() {
165337
- const PING_MESSAGE = Buffer.from("wrangler tail ping");
165338
- const PING_INTERVAL = 1e4;
165339
- let waitingForPong = false;
165340
- const pingInterval = setInterval(() => {
165341
- if (waitingForPong) {
165342
- console.log(args.format);
165343
- throw createFatalError(
165344
- "Tail disconnected, exiting.",
165345
- args.format === "json",
165346
- 1
165367
+ let scriptName;
165368
+ const accountId = await requireAuth(config);
165369
+ if (args.worker?.includes(".")) {
165370
+ scriptName = await getWorkerForZone(
165371
+ {
165372
+ worker: args.worker,
165373
+ accountId
165374
+ },
165375
+ config.configPath
165376
+ );
165377
+ if (args.format === "pretty") {
165378
+ logger.log(
165379
+ `Connecting to worker ${scriptName} at route ${args.worker}`
165347
165380
  );
165348
165381
  }
165349
- waitingForPong = true;
165350
- tail.ping(PING_MESSAGE);
165351
- }, PING_INTERVAL);
165352
- tail.on("pong", (data) => {
165353
- if (data.equals(PING_MESSAGE)) {
165354
- waitingForPong = false;
165382
+ } else {
165383
+ scriptName = getLegacyScriptName({ name: args.worker, ...args }, config);
165384
+ }
165385
+ if (!scriptName) {
165386
+ throw new UserError(
165387
+ `Required Worker name missing. Please specify the Worker name in your ${configFileName(config.configPath)} file, or pass it as an argument with \`wrangler tail <worker-name>\``
165388
+ );
165389
+ }
165390
+ const cliFilters = {
165391
+ status: args.status,
165392
+ header: args.header,
165393
+ method: args.method,
165394
+ samplingRate: args.samplingRate,
165395
+ search: args.search,
165396
+ clientIp: args.ip,
165397
+ versionId: args.versionId
165398
+ };
165399
+ const filters = translateCLICommandToFilterMessage(cliFilters);
165400
+ const { tail, expiration, deleteTail } = await createTail(
165401
+ accountId,
165402
+ scriptName,
165403
+ filters,
165404
+ args.debug,
165405
+ !isLegacyEnv(config) ? args.env : void 0
165406
+ );
165407
+ const scriptDisplayName = `${scriptName}${args.env && !isLegacyEnv(config) ? ` (${args.env})` : ""}`;
165408
+ if (args.format === "pretty") {
165409
+ logger.log(
165410
+ `Successfully created tail, expires at ${expiration.toLocaleString()}`
165411
+ );
165412
+ }
165413
+ const printLog = args.format === "pretty" ? prettyPrintLogs : jsonPrintLogs;
165414
+ tail.on("message", printLog);
165415
+ while (tail.readyState !== tail.OPEN) {
165416
+ switch (tail.readyState) {
165417
+ case tail.CONNECTING:
165418
+ await (0, import_promises31.setTimeout)(100);
165419
+ break;
165420
+ case tail.CLOSING:
165421
+ await (0, import_promises31.setTimeout)(100);
165422
+ break;
165423
+ case tail.CLOSED:
165424
+ sendMetricsEvent("end log stream", {
165425
+ sendMetrics: config.send_metrics
165426
+ });
165427
+ throw new Error(
165428
+ `Connection to ${scriptDisplayName} closed unexpectedly.`
165429
+ );
165355
165430
  }
165356
- });
165357
- return () => clearInterval(pingInterval);
165431
+ }
165432
+ if (args.format === "pretty") {
165433
+ logger.log(`Connected to ${scriptDisplayName}, waiting for logs...`);
165434
+ }
165435
+ const cancelPing = startWebSocketPing();
165436
+ tail.on("close", exit6);
165437
+ (0, import_signal_exit6.default)(exit6);
165438
+ async function exit6() {
165439
+ cancelPing();
165440
+ tail.terminate();
165441
+ await deleteTail();
165442
+ sendMetricsEvent("end log stream", {
165443
+ sendMetrics: config.send_metrics
165444
+ });
165445
+ }
165446
+ __name(exit6, "exit");
165447
+ function startWebSocketPing() {
165448
+ const PING_MESSAGE = Buffer.from("wrangler tail ping");
165449
+ const PING_INTERVAL = 1e4;
165450
+ let waitingForPong = false;
165451
+ const pingInterval = setInterval(() => {
165452
+ if (waitingForPong) {
165453
+ console.log(args.format);
165454
+ throw createFatalError(
165455
+ "Tail disconnected, exiting.",
165456
+ args.format === "json",
165457
+ 1
165458
+ );
165459
+ }
165460
+ waitingForPong = true;
165461
+ tail.ping(PING_MESSAGE);
165462
+ }, PING_INTERVAL);
165463
+ tail.on("pong", (data) => {
165464
+ if (data.equals(PING_MESSAGE)) {
165465
+ waitingForPong = false;
165466
+ }
165467
+ });
165468
+ return () => clearInterval(pingInterval);
165469
+ }
165470
+ __name(startWebSocketPing, "startWebSocketPing");
165358
165471
  }
165359
- __name(startWebSocketPing, "startWebSocketPing");
165360
- }
165361
- __name(tailHandler, "tailHandler");
165472
+ });
165362
165473
 
165363
165474
  // src/triggers/index.ts
165364
165475
  init_import_meta_url();
@@ -165483,9 +165594,9 @@ async function generate({
165483
165594
  script: worker
165484
165595
  });
165485
165596
  const flagsString = compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : "";
165486
- const path69 = `http://dummy.com/${compatibilityDate}${flagsString}`;
165597
+ const path70 = `http://dummy.com/${compatibilityDate}${flagsString}`;
165487
165598
  try {
165488
- const res = await mf.dispatchFetch(path69);
165599
+ const res = await mf.dispatchFetch(path70);
165489
165600
  const text = await res.text();
165490
165601
  if (!res.ok) {
165491
165602
  throw new Error(text);
@@ -165556,117 +165667,127 @@ function buildUpdatedTypesString(types, newTypesPath) {
165556
165667
  __name(buildUpdatedTypesString, "buildUpdatedTypesString");
165557
165668
 
165558
165669
  // src/type-generation/index.ts
165559
- function typesOptions(yargs) {
165560
- return yargs.positional("path", {
165561
- describe: "The path to the declaration file to generate",
165562
- type: "string",
165563
- default: "worker-configuration.d.ts",
165564
- demandOption: false
165565
- }).option("env-interface", {
165566
- type: "string",
165567
- default: "Env",
165568
- describe: "The name of the generated environment interface",
165569
- requiresArg: true
165570
- }).option("experimental-include-runtime", {
165571
- alias: "x-include-runtime",
165572
- type: "string",
165573
- describe: "The path of the generated runtime types file",
165574
- demandOption: false
165575
- }).option("strict-vars", {
165576
- type: "boolean",
165577
- default: true,
165578
- describe: "Generate literal and union types for variables"
165579
- });
165580
- }
165581
- __name(typesOptions, "typesOptions");
165582
- async function typesHandler(args) {
165583
- const { envInterface, path: outputPath } = args;
165584
- const validInterfaceRegex = /^[a-zA-Z][a-zA-Z0-9_]*$/;
165585
- if (!validInterfaceRegex.test(envInterface)) {
165586
- throw new CommandLineArgsError(
165587
- `The provided env-interface value ("${envInterface}") does not satisfy the validation regex: ${validInterfaceRegex}`
165588
- );
165589
- }
165590
- if (!outputPath.endsWith(".d.ts")) {
165591
- throw new CommandLineArgsError(
165592
- `The provided path value ("${outputPath}") does not point to a declaration file (please use the 'd.ts' extension)`
165593
- );
165594
- }
165595
- await printWranglerBanner();
165596
- const config = readConfig(args);
165597
- if (!config.configPath || !fs28.existsSync(config.configPath) || fs28.statSync(config.configPath).isDirectory()) {
165598
- logger.warn(
165599
- `No config file detected${args.config ? ` (at ${args.config})` : ""}, aborting`
165670
+ var typesCommand = createCommand({
165671
+ metadata: {
165672
+ description: "\u{1F4DD} Generate types from bindings and module rules in configuration\n",
165673
+ status: "stable",
165674
+ owner: "Workers: Authoring and Testing"
165675
+ },
165676
+ positionalArgs: ["path"],
165677
+ args: {
165678
+ path: {
165679
+ describe: "The path to the declaration file to generate",
165680
+ type: "string",
165681
+ default: "worker-configuration.d.ts",
165682
+ demandOption: false
165683
+ },
165684
+ "env-interface": {
165685
+ type: "string",
165686
+ default: "Env",
165687
+ describe: "The name of the generated environment interface",
165688
+ requiresArg: true
165689
+ },
165690
+ "experimental-include-runtime": {
165691
+ alias: "x-include-runtime",
165692
+ type: "string",
165693
+ describe: "The path of the generated runtime types file",
165694
+ demandOption: false
165695
+ },
165696
+ "strict-vars": {
165697
+ type: "boolean",
165698
+ default: true,
165699
+ describe: "Generate literal and union types for variables"
165700
+ }
165701
+ },
165702
+ validateArgs(args) {
165703
+ const { envInterface, path: outputPath } = args;
165704
+ const validInterfaceRegex = /^[a-zA-Z][a-zA-Z0-9_]*$/;
165705
+ if (!validInterfaceRegex.test(envInterface)) {
165706
+ throw new CommandLineArgsError(
165707
+ `The provided env-interface value ("${envInterface}") does not satisfy the validation regex: ${validInterfaceRegex}`
165708
+ );
165709
+ }
165710
+ if (!outputPath.endsWith(".d.ts")) {
165711
+ throw new CommandLineArgsError(
165712
+ `The provided path value ("${outputPath}") does not point to a declaration file (please use the 'd.ts' extension)`
165713
+ );
165714
+ }
165715
+ },
165716
+ async handler(args, { config }) {
165717
+ const { envInterface, path: outputPath } = args;
165718
+ if (!config.configPath || !fs28.existsSync(config.configPath) || fs28.statSync(config.configPath).isDirectory()) {
165719
+ logger.warn(
165720
+ `No config file detected${args.config ? ` (at ${args.config})` : ""}, aborting`
165721
+ );
165722
+ return;
165723
+ }
165724
+ if (typeof args.experimentalIncludeRuntime === "string") {
165725
+ logger.log(`Generating runtime types...`);
165726
+ const { outFile } = await generateRuntimeTypes({
165727
+ config,
165728
+ outFile: args.experimentalIncludeRuntime || void 0
165729
+ });
165730
+ const tsconfigPath = config.tsconfig ?? (0, import_node_path66.join)((0, import_node_path66.dirname)(config.configPath), "tsconfig.json");
165731
+ const tsconfigTypes = readTsconfigTypes(tsconfigPath);
165732
+ const { mode } = (0, import_miniflare26.getNodeCompat)(
165733
+ config.compatibility_date,
165734
+ config.compatibility_flags,
165735
+ {
165736
+ nodeCompat: config.node_compat
165737
+ }
165738
+ );
165739
+ logRuntimeTypesMessage(
165740
+ outFile,
165741
+ tsconfigTypes,
165742
+ mode !== null,
165743
+ config.configPath
165744
+ );
165745
+ }
165746
+ const secrets = getVarsForDev(
165747
+ // We do not want `getVarsForDev()` to merge in the standard vars into the dev vars
165748
+ // because we want to be able to work with secrets differently to vars.
165749
+ // So we pass in a fake vars object here.
165750
+ { ...config, vars: {} },
165751
+ args.env,
165752
+ true
165600
165753
  );
165601
- return;
165602
- }
165603
- if (typeof args.experimentalIncludeRuntime === "string") {
165604
- logger.log(`Generating runtime types...`);
165605
- const { outFile } = await generateRuntimeTypes({
165754
+ const configBindingsWithSecrets = {
165755
+ kv_namespaces: config.kv_namespaces ?? [],
165756
+ vars: collectAllVars(args),
165757
+ wasm_modules: config.wasm_modules,
165758
+ text_blobs: {
165759
+ ...config.text_blobs
165760
+ },
165761
+ data_blobs: config.data_blobs,
165762
+ durable_objects: config.durable_objects,
165763
+ r2_buckets: config.r2_buckets,
165764
+ d1_databases: config.d1_databases,
165765
+ services: config.services,
165766
+ analytics_engine_datasets: config.analytics_engine_datasets,
165767
+ dispatch_namespaces: config.dispatch_namespaces,
165768
+ logfwdr: config.logfwdr,
165769
+ unsafe: config.unsafe,
165770
+ rules: config.rules,
165771
+ queues: config.queues,
165772
+ send_email: config.send_email,
165773
+ vectorize: config.vectorize,
165774
+ hyperdrive: config.hyperdrive,
165775
+ mtls_certificates: config.mtls_certificates,
165776
+ browser: config.browser,
165777
+ ai: config.ai,
165778
+ version_metadata: config.version_metadata,
165779
+ secrets,
165780
+ assets: config.assets,
165781
+ workflows: config.workflows
165782
+ };
165783
+ await generateTypes(
165784
+ configBindingsWithSecrets,
165606
165785
  config,
165607
- outFile: args.experimentalIncludeRuntime || void 0
165608
- });
165609
- const tsconfigPath = config.tsconfig ?? (0, import_node_path66.join)((0, import_node_path66.dirname)(config.configPath), "tsconfig.json");
165610
- const tsconfigTypes = readTsconfigTypes(tsconfigPath);
165611
- const { mode } = (0, import_miniflare26.getNodeCompat)(
165612
- config.compatibility_date,
165613
- config.compatibility_flags,
165614
- {
165615
- nodeCompat: config.node_compat
165616
- }
165617
- );
165618
- logRuntimeTypesMessage(
165619
- outFile,
165620
- tsconfigTypes,
165621
- mode !== null,
165622
- config.configPath
165786
+ envInterface,
165787
+ outputPath
165623
165788
  );
165624
165789
  }
165625
- const secrets = getVarsForDev(
165626
- // We do not want `getVarsForDev()` to merge in the standard vars into the dev vars
165627
- // because we want to be able to work with secrets differently to vars.
165628
- // So we pass in a fake vars object here.
165629
- { ...config, vars: {} },
165630
- args.env,
165631
- true
165632
- );
165633
- const configBindingsWithSecrets = {
165634
- kv_namespaces: config.kv_namespaces ?? [],
165635
- vars: collectAllVars(args),
165636
- wasm_modules: config.wasm_modules,
165637
- text_blobs: {
165638
- ...config.text_blobs
165639
- },
165640
- data_blobs: config.data_blobs,
165641
- durable_objects: config.durable_objects,
165642
- r2_buckets: config.r2_buckets,
165643
- d1_databases: config.d1_databases,
165644
- services: config.services,
165645
- analytics_engine_datasets: config.analytics_engine_datasets,
165646
- dispatch_namespaces: config.dispatch_namespaces,
165647
- logfwdr: config.logfwdr,
165648
- unsafe: config.unsafe,
165649
- rules: config.rules,
165650
- queues: config.queues,
165651
- send_email: config.send_email,
165652
- vectorize: config.vectorize,
165653
- hyperdrive: config.hyperdrive,
165654
- mtls_certificates: config.mtls_certificates,
165655
- browser: config.browser,
165656
- ai: config.ai,
165657
- version_metadata: config.version_metadata,
165658
- secrets,
165659
- assets: config.assets,
165660
- workflows: config.workflows
165661
- };
165662
- await generateTypes(
165663
- configBindingsWithSecrets,
165664
- config,
165665
- envInterface,
165666
- outputPath
165667
- );
165668
- }
165669
- __name(typesHandler, "typesHandler");
165790
+ });
165670
165791
  function isValidIdentifier2(key) {
165671
165792
  return /^[a-zA-Z_$][\w$]*$/.test(key);
165672
165793
  }
@@ -165906,13 +166027,13 @@ function writeDTSFile({
165906
166027
  modulesTypeStructure,
165907
166028
  formatType,
165908
166029
  envInterface,
165909
- path: path69
166030
+ path: path70
165910
166031
  }) {
165911
- const wranglerOverrideDTSPath = findUpSync(path69);
166032
+ const wranglerOverrideDTSPath = findUpSync(path70);
165912
166033
  try {
165913
166034
  if (wranglerOverrideDTSPath !== void 0 && !fs28.readFileSync(wranglerOverrideDTSPath, "utf8").includes("Generated by Wrangler")) {
165914
166035
  throw new UserError(
165915
- `A non-wrangler ${(0, import_node_path66.basename)(path69)} already exists, please rename and try again.`
166036
+ `A non-wrangler ${(0, import_node_path66.basename)(path70)} already exists, please rename and try again.`
165916
166037
  );
165917
166038
  }
165918
166039
  } catch (error2) {
@@ -165930,7 +166051,7 @@ function writeDTSFile({
165930
166051
  modulesTypeStructure
165931
166052
  );
165932
166053
  fs28.writeFileSync(
165933
- path69,
166054
+ path70,
165934
166055
  [
165935
166056
  `// Generated by Wrangler by running \`${wranglerCommandUsed}\``,
165936
166057
  "",
@@ -168842,7 +168963,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
168842
168963
  let bindingsPrinted = false;
168843
168964
  try {
168844
168965
  const body = createWorkerUploadForm(worker);
168845
- const result = await retryOnError(
168966
+ const result = await retryOnAPIFailure(
168846
168967
  async () => fetchResult(`${workerUrl}/versions`, {
168847
168968
  method: "POST",
168848
168969
  body,
@@ -170583,7 +170704,10 @@ function createCLIParser(argv) {
170583
170704
  type: "string",
170584
170705
  requiresArg: true
170585
170706
  }).check(
170586
- demandSingleValue("config", (configArgv) => configArgv["_"][0] === "dev")
170707
+ demandSingleValue(
170708
+ "config",
170709
+ (configArgv) => configArgv["_"][0] === "dev" || configArgv["_"][0] === "pages" && configArgv["_"][1] === "dev"
170710
+ )
170587
170711
  ).option("env", {
170588
170712
  alias: "e",
170589
170713
  describe: "Environment to use for operations and .env files",
@@ -170772,12 +170896,8 @@ function createCLIParser(argv) {
170772
170896
  deleteOptions,
170773
170897
  deleteHandler
170774
170898
  );
170775
- wrangler.command(
170776
- "tail [worker]",
170777
- "\u{1F99A} Start a log tailing session for a Worker",
170778
- tailOptions,
170779
- tailHandler
170780
- );
170899
+ registry.define([{ command: "wrangler tail", definition: tailCommand }]);
170900
+ registry.registerNamespace("tail");
170781
170901
  wrangler.command(
170782
170902
  "secret",
170783
170903
  "\u{1F92B} Generate a secret that can be referenced in a Worker",
@@ -170785,12 +170905,8 @@ function createCLIParser(argv) {
170785
170905
  return secret(secretYargs.command(subHelp));
170786
170906
  }
170787
170907
  );
170788
- wrangler.command(
170789
- "types [path]",
170790
- "\u{1F4DD} Generate types from bindings and module rules in configuration\n",
170791
- typesOptions,
170792
- typesHandler
170793
- );
170908
+ registry.define([{ command: "wrangler types", definition: typesCommand }]);
170909
+ registry.registerNamespace("types");
170794
170910
  registry.define([
170795
170911
  { command: "wrangler kv:key", definition: kvKeyAlias },
170796
170912
  { command: "wrangler kv:namespace", definition: kvNamespaceAlias },
@@ -171551,3 +171667,4 @@ yargs-parser/build/lib/index.js:
171551
171667
  * SPDX-License-Identifier: ISC
171552
171668
  *)
171553
171669
  */
171670
+ //# sourceMappingURL=cli.js.map