@cloudflare/vite-plugin 1.51.2 → 1.51.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import assert from "node:assert";
5
5
  import { CoreHeaders, CorePaths, DeferredPromise, Log, LogLevel, Miniflare, MiniflareCoreError, Mutex, Request as Request$1, Response as Response$1, buildPublicUrl, convertV4MiniflareOptions, coupleWebSocket, getDefaultDevRegistryPath, getNodeCompat, getWorkerRegistry, kUnsafeEphemeralUniqueKey, parseModuleFallbackRequest } from "miniflare";
6
6
  import * as wrangler from "wrangler";
7
7
  import * as path2 from "node:path";
8
- import path2__default, { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
8
+ import path, { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
9
9
  import * as util$1 from "node:util";
10
10
  import util, { TextEncoder as TextEncoder$1, format, inspect, promisify, styleText } from "node:util";
11
11
  import * as vite from "vite";
@@ -1489,7 +1489,7 @@ async function assertWranglerVersion() {
1489
1489
  * The default compatibility date to use when the user omits one.
1490
1490
  * This value is injected at build time and remains fixed for each release.
1491
1491
  */
1492
- const DEFAULT_COMPAT_DATE = "2026-08-10";
1492
+ const DEFAULT_COMPAT_DATE = "2026-08-11";
1493
1493
 
1494
1494
  //#endregion
1495
1495
  //#region src/build-output-env.ts
@@ -1884,8 +1884,8 @@ __name$4(constructWranglerConfig, "constructWranglerConfig");
1884
1884
 
1885
1885
  //#endregion
1886
1886
  //#region ../workers-utils/dist/chunk-53IMCORZ.mjs
1887
- function isDirectory$1(path$1) {
1888
- return fs2.statSync(path$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
1887
+ function isDirectory$1(path$2) {
1888
+ return fs2.statSync(path$2, { throwIfNoEntry: false })?.isDirectory() ?? false;
1889
1889
  }
1890
1890
  __name$4(isDirectory$1, "isDirectory");
1891
1891
  function removeDir$1(dirPath, { fireAndForget = false } = {}) {
@@ -1928,7 +1928,7 @@ function getEnv(name) {
1928
1928
  }
1929
1929
  __name$4(getEnv, "getEnv");
1930
1930
  function normalizePath$2(p$2) {
1931
- return p$2 ? path2__default.normalize(path2__default.join(p$2, ".")) : void 0;
1931
+ return p$2 ? path.normalize(path.join(p$2, ".")) : void 0;
1932
1932
  }
1933
1933
  __name$4(normalizePath$2, "normalizePath");
1934
1934
  function homeDir() {
@@ -1936,13 +1936,13 @@ function homeDir() {
1936
1936
  os.homedir(),
1937
1937
  getEnv("USERPROFILE"),
1938
1938
  getEnv("HOME"),
1939
- getEnv("HOMEDRIVE") || getEnv("HOMEPATH") ? path2__default.join(getEnv("HOMEDRIVE") ?? "", getEnv("HOMEPATH") ?? "") : void 0
1939
+ getEnv("HOMEDRIVE") || getEnv("HOMEPATH") ? path.join(getEnv("HOMEDRIVE") ?? "", getEnv("HOMEPATH") ?? "") : void 0
1940
1940
  ].find(isNonEmpty));
1941
1941
  return normalizePath$2(os.homedir() || getEnv("HOME"));
1942
1942
  }
1943
1943
  __name$4(homeDir, "homeDir");
1944
1944
  function joinToBase(base, segments) {
1945
- return base ? path2__default.join(base, ...segments) : void 0;
1945
+ return base ? path.join(base, ...segments) : void 0;
1946
1946
  }
1947
1947
  __name$4(joinToBase, "joinToBase");
1948
1948
  function tempDir() {
@@ -1978,7 +1978,7 @@ function baseDir() {
1978
1978
  }
1979
1979
  __name$4(baseDir, "baseDir");
1980
1980
  function valOrPath(value, segments) {
1981
- return value || path2__default.join(...segments);
1981
+ return value || path.join(...segments);
1982
1982
  }
1983
1983
  __name$4(valOrPath, "valOrPath");
1984
1984
  function windowsAppData() {
@@ -2018,10 +2018,10 @@ function xdgCache() {
2018
2018
  }
2019
2019
  __name$4(xdgCache, "xdgCache");
2020
2020
  function xdgAppPaths(name) {
2021
- const segment = path2__default.parse(name).name;
2021
+ const segment = path.parse(name).name;
2022
2022
  return {
2023
- config: /* @__PURE__ */ __name$4(() => path2__default.join(xdgConfig(), segment), "config"),
2024
- cache: /* @__PURE__ */ __name$4(() => path2__default.join(xdgCache(), segment), "cache")
2023
+ config: /* @__PURE__ */ __name$4(() => path.join(xdgConfig(), segment), "config"),
2024
+ cache: /* @__PURE__ */ __name$4(() => path.join(xdgCache(), segment), "cache")
2025
2025
  };
2026
2026
  }
2027
2027
  __name$4(xdgAppPaths, "xdgAppPaths");
@@ -2029,7 +2029,7 @@ function getGlobalConfigPath({ appName = "wrangler", leadingDot = true, useLegac
2029
2029
  const dirName = `${leadingDot ? "." : ""}${appName}`;
2030
2030
  const configDir = xdgAppPaths(dirName).config();
2031
2031
  if (useLegacyHomeDir) {
2032
- const legacyConfigDir = path2__default.join(os.homedir(), dirName);
2032
+ const legacyConfigDir = path.join(os.homedir(), dirName);
2033
2033
  if (isDirectory$1(legacyConfigDir)) return legacyConfigDir;
2034
2034
  }
2035
2035
  return configDir;
@@ -4406,7 +4406,7 @@ function resolveWranglerConfigPath$1({ config: config$2, script }, options) {
4406
4406
  deployConfigPath: void 0,
4407
4407
  redirected: false
4408
4408
  };
4409
- return findWranglerConfig$2(script !== void 0 ? path2__default.dirname(script) : process.cwd(), options);
4409
+ return findWranglerConfig$2(script !== void 0 ? path.dirname(script) : process.cwd(), options);
4410
4410
  }
4411
4411
  __name$4(resolveWranglerConfigPath$1, "resolveWranglerConfigPath");
4412
4412
  function findWranglerConfig$2(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
@@ -4437,15 +4437,15 @@ function findRedirectedWranglerConfig$1(cwd, userConfigPath) {
4437
4437
  const deployConfigFile = readFileSync$1(deployConfigPath);
4438
4438
  try {
4439
4439
  const deployConfig = parseJSONC$1(deployConfigFile, deployConfigPath);
4440
- redirectedConfigPath = deployConfig.configPath && path2__default.resolve(path2__default.dirname(deployConfigPath), deployConfig.configPath);
4440
+ redirectedConfigPath = deployConfig.configPath && path.resolve(path.dirname(deployConfigPath), deployConfig.configPath);
4441
4441
  } catch (e) {
4442
- throw new UserError(`Failed to parse the deploy configuration file at ${path2__default.relative(".", deployConfigPath)}`, {
4442
+ throw new UserError(`Failed to parse the deploy configuration file at ${path.relative(".", deployConfigPath)}`, {
4443
4443
  cause: e,
4444
4444
  telemetryMessage: false
4445
4445
  });
4446
4446
  }
4447
4447
  if (!redirectedConfigPath) throw new UserError(esm_default$2`
4448
- A deploy configuration file was found at "${path2__default.relative(".", deployConfigPath)}".
4448
+ A deploy configuration file was found at "${path.relative(".", deployConfigPath)}".
4449
4449
  But this is not valid - the required "configPath" property was not found.
4450
4450
  Instead this file contains:
4451
4451
  \`\`\`
@@ -4453,13 +4453,13 @@ function findRedirectedWranglerConfig$1(cwd, userConfigPath) {
4453
4453
  \`\`\`
4454
4454
  `, { telemetryMessage: false });
4455
4455
  if (!existsSync(redirectedConfigPath)) throw new UserError(esm_default$2`
4456
- There is a deploy configuration at "${path2__default.relative(".", deployConfigPath)}".
4457
- But the redirected configuration path it points to, "${path2__default.relative(".", redirectedConfigPath)}", does not exist.
4456
+ There is a deploy configuration at "${path.relative(".", deployConfigPath)}".
4457
+ But the redirected configuration path it points to, "${path.relative(".", redirectedConfigPath)}", does not exist.
4458
4458
  `, { telemetryMessage: false });
4459
4459
  if (userConfigPath) {
4460
- if (path2__default.join(path2__default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG$1) !== deployConfigPath) throw new UserError(esm_default$2`
4461
- Found both a user configuration file at "${path2__default.relative(".", userConfigPath)}"
4462
- and a deploy configuration file at "${path2__default.relative(".", deployConfigPath)}".
4460
+ if (path.join(path.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG$1) !== deployConfigPath) throw new UserError(esm_default$2`
4461
+ Found both a user configuration file at "${path.relative(".", userConfigPath)}"
4462
+ and a deploy configuration file at "${path.relative(".", deployConfigPath)}".
4463
4463
  But these do not share the same base path so it is not clear which should be used.
4464
4464
  `, { telemetryMessage: false });
4465
4465
  }
@@ -5651,10 +5651,10 @@ var require_util$5 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
5651
5651
  if (!isHttpOrHttpsPrefixed(url$2.origin || url$2.protocol)) throw new InvalidArgumentError$37("Invalid URL protocol: the URL must start with `http:` or `https:`.");
5652
5652
  const port = url$2.port != null ? url$2.port : url$2.protocol === "https:" ? 443 : 80;
5653
5653
  let origin = url$2.origin != null ? url$2.origin : `${url$2.protocol || ""}//${url$2.hostname || ""}:${port}`;
5654
- let path$1 = url$2.path != null ? url$2.path : `${url$2.pathname || ""}${url$2.search || ""}`;
5654
+ let path$2 = url$2.path != null ? url$2.path : `${url$2.pathname || ""}${url$2.search || ""}`;
5655
5655
  if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1);
5656
- if (path$1 && path$1[0] !== "/") path$1 = `/${path$1}`;
5657
- return new URL(`${origin}${path$1}`);
5656
+ if (path$2 && path$2[0] !== "/") path$2 = `/${path$2}`;
5657
+ return new URL(`${origin}${path$2}`);
5658
5658
  }
5659
5659
  if (!isHttpOrHttpsPrefixed(url$2.origin || url$2.protocol)) throw new InvalidArgumentError$37("Invalid URL protocol: the URL must start with `http:` or `https:`.");
5660
5660
  return url$2;
@@ -6529,8 +6529,8 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
6529
6529
  debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version$6, error$2.message);
6530
6530
  });
6531
6531
  diagnosticsChannel$1.subscribe("undici:client:sendHeaders", (evt) => {
6532
- const { request: { method, path: path$1, origin } } = evt;
6533
- debugLog("sending request to %s %s%s", method, origin, path$1);
6532
+ const { request: { method, path: path$2, origin } } = evt;
6533
+ debugLog("sending request to %s %s%s", method, origin, path$2);
6534
6534
  });
6535
6535
  }
6536
6536
  let isTrackingRequestEvents = false;
@@ -6542,16 +6542,16 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
6542
6542
  }
6543
6543
  isTrackingRequestEvents = true;
6544
6544
  diagnosticsChannel$1.subscribe("undici:request:headers", (evt) => {
6545
- const { request: { method, path: path$1, origin }, response: { statusCode } } = evt;
6546
- debugLog("received response to %s %s%s - HTTP %d", method, origin, path$1, statusCode);
6545
+ const { request: { method, path: path$2, origin }, response: { statusCode } } = evt;
6546
+ debugLog("received response to %s %s%s - HTTP %d", method, origin, path$2, statusCode);
6547
6547
  });
6548
6548
  diagnosticsChannel$1.subscribe("undici:request:trailers", (evt) => {
6549
- const { request: { method, path: path$1, origin } } = evt;
6550
- debugLog("trailers received from %s %s%s", method, origin, path$1);
6549
+ const { request: { method, path: path$2, origin } } = evt;
6550
+ debugLog("trailers received from %s %s%s", method, origin, path$2);
6551
6551
  });
6552
6552
  diagnosticsChannel$1.subscribe("undici:request:error", (evt) => {
6553
- const { request: { method, path: path$1, origin }, error: error$2 } = evt;
6554
- debugLog("request to %s %s%s errored - %s", method, origin, path$1, error$2.message);
6553
+ const { request: { method, path: path$2, origin }, error: error$2 } = evt;
6554
+ debugLog("request to %s %s%s errored - %s", method, origin, path$2, error$2.message);
6555
6555
  });
6556
6556
  }
6557
6557
  let isTrackingWebSocketEvents = false;
@@ -6612,10 +6612,10 @@ var require_request$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
6612
6612
  }
6613
6613
  const kHandler = Symbol("handler");
6614
6614
  var Request$6 = class {
6615
- constructor(origin, { path: path$1, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
6616
- if (typeof path$1 !== "string") throw new InvalidArgumentError$36("path must be a string");
6617
- else if (path$1[0] !== "/" && !(path$1.startsWith("http://") || path$1.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$36("path must be an absolute URL or start with a slash");
6618
- else if (invalidPathRegex.test(path$1)) throw new InvalidArgumentError$36("invalid request path");
6615
+ constructor(origin, { path: path$2, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
6616
+ if (typeof path$2 !== "string") throw new InvalidArgumentError$36("path must be a string");
6617
+ else if (path$2[0] !== "/" && !(path$2.startsWith("http://") || path$2.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$36("path must be an absolute URL or start with a slash");
6618
+ else if (invalidPathRegex.test(path$2)) throw new InvalidArgumentError$36("invalid request path");
6619
6619
  if (typeof method !== "string") throw new InvalidArgumentError$36("method must be a string");
6620
6620
  else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$3(method)) throw new InvalidArgumentError$36("invalid request method");
6621
6621
  if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$36("upgrade must be a string");
@@ -6656,7 +6656,7 @@ var require_request$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
6656
6656
  this.completed = false;
6657
6657
  this.aborted = false;
6658
6658
  this.upgrade = upgrade$1 || null;
6659
- this.path = query ? serializePathWithQuery$3(path$1, query) : path$1;
6659
+ this.path = query ? serializePathWithQuery$3(path$2, query) : path$2;
6660
6660
  this.origin = origin;
6661
6661
  this.protocol = getProtocolFromUrlString(origin);
6662
6662
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -11262,7 +11262,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
11262
11262
  * @returns
11263
11263
  */
11264
11264
  function writeH1(client, request$2) {
11265
- const { method, path: path$1, host, upgrade: upgrade$1, blocking, reset } = request$2;
11265
+ const { method, path: path$2, host, upgrade: upgrade$1, blocking, reset } = request$2;
11266
11266
  let { body, headers, contentLength } = request$2;
11267
11267
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
11268
11268
  if (util$22.isFormDataLike(body)) {
@@ -11318,7 +11318,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
11318
11318
  if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true;
11319
11319
  if (blocking) socket[kBlocking] = true;
11320
11320
  if (socket.setTypeOfService) socket.setTypeOfService(request$2.typeOfService);
11321
- let header = `${method} ${path$1} HTTP/1.1\r\n`;
11321
+ let header = `${method} ${path$2} HTTP/1.1\r\n`;
11322
11322
  if (typeof host === "string") header += `host: ${host}\r\n`;
11323
11323
  else header += client[kHostHeader$1];
11324
11324
  if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`;
@@ -11854,7 +11854,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
11854
11854
  function writeH2(client, request$2) {
11855
11855
  const requestTimeout = request$2.bodyTimeout ?? client[kBodyTimeout$1];
11856
11856
  const session = client[kHTTP2Session];
11857
- const { method, path: path$1, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
11857
+ const { method, path: path$2, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
11858
11858
  let { body } = request$2;
11859
11859
  if (upgrade$1 != null && upgrade$1 !== "websocket") {
11860
11860
  util$21.errorRequest(client, request$2, new InvalidArgumentError$30(`Custom upgrade "${upgrade$1}" not supported over HTTP/2`));
@@ -11907,7 +11907,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
11907
11907
  }
11908
11908
  headers[HTTP2_HEADER_METHOD] = "CONNECT";
11909
11909
  headers[HTTP2_HEADER_PROTOCOL] = "websocket";
11910
- headers[HTTP2_HEADER_PATH] = path$1;
11910
+ headers[HTTP2_HEADER_PATH] = path$2;
11911
11911
  if (protocol === "ws:" || protocol === "wss:") headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
11912
11912
  else headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
11913
11913
  stream$2 = session.request(headers, {
@@ -11949,7 +11949,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm
11949
11949
  stream$2.setTimeout(requestTimeout);
11950
11950
  return true;
11951
11951
  }
11952
- headers[HTTP2_HEADER_PATH] = path$1;
11952
+ headers[HTTP2_HEADER_PATH] = path$2;
11953
11953
  headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
11954
11954
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
11955
11955
  if (body && typeof body.read === "function") body.read(0);
@@ -13814,8 +13814,8 @@ var require_proxy_agent = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
13814
13814
  }
13815
13815
  if (onHeaders) onHeaders.call(this, statusCode, data$1, resume$1);
13816
13816
  };
13817
- const { origin, path: path$1 = "/", headers = {} } = opts;
13818
- opts.path = origin + path$1;
13817
+ const { origin, path: path$2 = "/", headers = {} } = opts;
13818
+ opts.path = origin + path$2;
13819
13819
  if (!("host" in headers) && !("Host" in headers)) {
13820
13820
  const { host } = new URL(origin);
13821
13821
  headers.host = host;
@@ -15613,16 +15613,16 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
15613
15613
  }
15614
15614
  return normalizedQp;
15615
15615
  }
15616
- function safeUrl(path$1) {
15617
- if (typeof path$1 !== "string") return path$1;
15618
- const pathSegments = path$1.split("?", 3);
15619
- if (pathSegments.length !== 2) return path$1;
15616
+ function safeUrl(path$2) {
15617
+ if (typeof path$2 !== "string") return path$2;
15618
+ const pathSegments = path$2.split("?", 3);
15619
+ if (pathSegments.length !== 2) return path$2;
15620
15620
  const qp = new URLSearchParams(pathSegments.pop());
15621
15621
  qp.sort();
15622
15622
  return [...pathSegments, qp.toString()].join("?");
15623
15623
  }
15624
- function matchKey(mockDispatch$1, { path: path$1, method, body, headers }) {
15625
- const pathMatch = matchValue$1(mockDispatch$1.path, path$1);
15624
+ function matchKey(mockDispatch$1, { path: path$2, method, body, headers }) {
15625
+ const pathMatch = matchValue$1(mockDispatch$1.path, path$2);
15626
15626
  const methodMatch = matchValue$1(mockDispatch$1.method, method);
15627
15627
  const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true;
15628
15628
  const headersMatch = matchHeaders(mockDispatch$1, headers);
@@ -15640,8 +15640,8 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
15640
15640
  const basePath = key.query ? serializePathWithQuery$2(key.path, key.query) : key.path;
15641
15641
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
15642
15642
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
15643
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$1, ignoreTrailingSlash }) => {
15644
- return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$1)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$1), resolvedPath);
15643
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$2, ignoreTrailingSlash }) => {
15644
+ return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$2)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$2), resolvedPath);
15645
15645
  });
15646
15646
  if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
15647
15647
  matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method));
@@ -15684,15 +15684,15 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
15684
15684
  /**
15685
15685
  * @param {string} path Path to remove trailing slash from
15686
15686
  */
15687
- function removeTrailingSlash(path$1) {
15688
- while (path$1.endsWith("/")) path$1 = path$1.slice(0, -1);
15689
- if (path$1.length === 0) path$1 = "/";
15690
- return path$1;
15687
+ function removeTrailingSlash(path$2) {
15688
+ while (path$2.endsWith("/")) path$2 = path$2.slice(0, -1);
15689
+ if (path$2.length === 0) path$2 = "/";
15690
+ return path$2;
15691
15691
  }
15692
15692
  function buildKey$1(opts) {
15693
- const { path: path$1, method, body, headers, query } = opts;
15693
+ const { path: path$2, method, body, headers, query } = opts;
15694
15694
  return {
15695
- path: path$1,
15695
+ path: path$2,
15696
15696
  method,
15697
15697
  body,
15698
15698
  headers,
@@ -16259,10 +16259,10 @@ var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJS$2({ "../
16259
16259
  });
16260
16260
  }
16261
16261
  format(pendingInterceptors) {
16262
- const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$1, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
16262
+ const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
16263
16263
  Method: method,
16264
16264
  Origin: origin,
16265
- Path: path$1,
16265
+ Path: path$2,
16266
16266
  "Status code": statusCode,
16267
16267
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
16268
16268
  Invocations: timesInvoked,
@@ -16320,8 +16320,8 @@ var require_mock_agent = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnp
16320
16320
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
16321
16321
  const dispatchOpts = { ...opts };
16322
16322
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
16323
- const [path$1, searchParams] = dispatchOpts.path.split("?");
16324
- dispatchOpts.path = `${path$1}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
16323
+ const [path$2, searchParams] = dispatchOpts.path.split("?");
16324
+ dispatchOpts.path = `${path$2}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
16325
16325
  }
16326
16326
  return this[kAgent].dispatch(dispatchOpts, handler);
16327
16327
  }
@@ -16798,10 +16798,10 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
16798
16798
  * @return {Promise<void>} - Resolves when snapshots are loaded
16799
16799
  */
16800
16800
  async loadSnapshots(filePath) {
16801
- const path$1 = filePath || this.#snapshotPath;
16802
- if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
16801
+ const path$2 = filePath || this.#snapshotPath;
16802
+ if (!path$2) throw new InvalidArgumentError$6("Snapshot path is required");
16803
16803
  try {
16804
- const data$1 = await readFile(resolve$3(path$1), "utf8");
16804
+ const data$1 = await readFile(resolve$3(path$2), "utf8");
16805
16805
  const parsed = JSON.parse(data$1);
16806
16806
  if (Array.isArray(parsed)) {
16807
16807
  this.#snapshots.clear();
@@ -16809,7 +16809,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
16809
16809
  } else this.#snapshots = new Map(Object.entries(parsed));
16810
16810
  } catch (error$2) {
16811
16811
  if (error$2.code === "ENOENT") this.#snapshots.clear();
16812
- else throw new UndiciError$1(`Failed to load snapshots from ${path$1}`, { cause: error$2 });
16812
+ else throw new UndiciError$1(`Failed to load snapshots from ${path$2}`, { cause: error$2 });
16813
16813
  }
16814
16814
  }
16815
16815
  /**
@@ -16819,9 +16819,9 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$2({ "../../node_modul
16819
16819
  * @returns {Promise<void>} - Resolves when snapshots are saved
16820
16820
  */
16821
16821
  async saveSnapshots(filePath) {
16822
- const path$1 = filePath || this.#snapshotPath;
16823
- if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
16824
- const resolvedPath = resolve$3(path$1);
16822
+ const path$2 = filePath || this.#snapshotPath;
16823
+ if (!path$2) throw new InvalidArgumentError$6("Snapshot path is required");
16824
+ const resolvedPath = resolve$3(path$2);
16825
16825
  await mkdir(dirname$2(resolvedPath), { recursive: true });
16826
16826
  const data$1 = Array.from(this.#snapshots.entries()).map(([hash$1, snapshot]) => ({
16827
16827
  hash: hash$1,
@@ -17395,11 +17395,11 @@ var require_redirect_handler = /* @__PURE__ */ __commonJS$2({ "../../node_module
17395
17395
  return;
17396
17396
  }
17397
17397
  const { origin, pathname, search } = util$9.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
17398
- const path$1 = search ? `${pathname}${search}` : pathname;
17399
- const redirectUrlString = `${origin}${path$1}`;
17398
+ const path$2 = search ? `${pathname}${search}` : pathname;
17399
+ const redirectUrlString = `${origin}${path$2}`;
17400
17400
  for (const historyUrl of this.history) if (historyUrl.toString() === redirectUrlString) throw new InvalidArgumentError$3(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
17401
17401
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
17402
- this.opts.path = path$1;
17402
+ this.opts.path = path$2;
17403
17403
  this.opts.origin = origin;
17404
17404
  this.opts.query = null;
17405
17405
  }
@@ -18739,17 +18739,17 @@ var require_cache_handler = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.
18739
18739
  if (locationUrl.origin !== originUrl.origin) return;
18740
18740
  return locationUrl.pathname + locationUrl.search;
18741
18741
  }
18742
- function deleteCachedUri(store, cacheKey, path$1) {
18742
+ function deleteCachedUri(store, cacheKey, path$2) {
18743
18743
  deleteCachedValue$1(store, {
18744
18744
  ...cacheKey,
18745
- path: path$1
18745
+ path: path$2
18746
18746
  });
18747
18747
  for (let i$1 = 0; i$1 < util$8.safeHTTPMethods.length; i$1++) {
18748
18748
  const method = util$8.safeHTTPMethods[i$1];
18749
18749
  if (method !== cacheKey.method) deleteCachedValue$1(store, {
18750
18750
  ...cacheKey,
18751
18751
  method,
18752
- path: path$1
18752
+ path: path$2
18753
18753
  });
18754
18754
  }
18755
18755
  }
@@ -18757,8 +18757,8 @@ var require_cache_handler = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.
18757
18757
  if (headerValue === void 0) return;
18758
18758
  const values = Array.isArray(headerValue) ? headerValue : [headerValue];
18759
18759
  for (let i$1 = 0; i$1 < values.length; i$1++) {
18760
- const path$1 = getSameOriginPath(cacheKey, values[i$1]);
18761
- if (path$1 !== void 0) deleteCachedUri(store, cacheKey, path$1);
18760
+ const path$2 = getSameOriginPath(cacheKey, values[i$1]);
18761
+ if (path$2 !== void 0) deleteCachedUri(store, cacheKey, path$2);
18762
18762
  }
18763
18763
  }
18764
18764
  function invalidateUnsafeRequest(store, cacheKey, resHeaders) {
@@ -22763,10 +22763,10 @@ var require_fetch = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/und
22763
22763
  const url$2 = requestCurrentURL(request$2);
22764
22764
  /** @type {import('../../..').Agent} */
22765
22765
  const agent = fetchParams.controller.dispatcher;
22766
- const path$1 = url$2.pathname + url$2.search;
22766
+ const path$2 = url$2.pathname + url$2.search;
22767
22767
  const hasTrailingQuestionMark = url$2.search.length === 0 && url$2.href[url$2.href.length - url$2.hash.length - 1] === "?";
22768
22768
  return new Promise((resolve$4, reject) => agent.dispatch({
22769
- path: hasTrailingQuestionMark ? `${path$1}?` : path$1,
22769
+ path: hasTrailingQuestionMark ? `${path$2}?` : path$2,
22770
22770
  origin: url$2.origin,
22771
22771
  method: request$2.method,
22772
22772
  body: agent.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body,
@@ -23548,9 +23548,9 @@ var require_util$2 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
23548
23548
  * path-value = <any CHAR except CTLs or ";">
23549
23549
  * @param {string} path
23550
23550
  */
23551
- function validateCookiePath(path$1) {
23552
- for (let i$1 = 0; i$1 < path$1.length; ++i$1) {
23553
- const code = path$1.charCodeAt(i$1);
23551
+ function validateCookiePath(path$2) {
23552
+ for (let i$1 = 0; i$1 < path$2.length; ++i$1) {
23553
+ const code = path$2.charCodeAt(i$1);
23554
23554
  if (code < 32 || code > 126 || code === 59) throw new Error("Invalid cookie path");
23555
23555
  }
23556
23556
  }
@@ -26720,9 +26720,9 @@ var require_undici = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
26720
26720
  if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts");
26721
26721
  if (opts && opts.path != null) {
26722
26722
  if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path");
26723
- let path$1 = opts.path;
26724
- if (!opts.path.startsWith("/")) path$1 = `/${path$1}`;
26725
- url$2 = new URL(util$2.parseOrigin(url$2).origin + path$1);
26723
+ let path$2 = opts.path;
26724
+ if (!opts.path.startsWith("/")) path$2 = `/${path$2}`;
26725
+ url$2 = new URL(util$2.parseOrigin(url$2).origin + path$2);
26726
26726
  } else {
26727
26727
  if (!opts) opts = typeof url$2 === "object" ? url$2 : {};
26728
26728
  url$2 = util$2.parseURL(url$2);
@@ -42004,7 +42004,18 @@ var getC3CommandFromEnv = getEnvironmentVariableFactory({
42004
42004
  variableName: "WRANGLER_C3_COMMAND",
42005
42005
  defaultValue: /* @__PURE__ */ __name$4(() => "create cloudflare", "defaultValue")
42006
42006
  });
42007
- var getWranglerSendMetricsFromEnv = getBooleanEnvironmentVariableFactory({ variableName: "WRANGLER_SEND_METRICS" });
42007
+ var getDoNotTrackFromEnv = getEnvironmentVariableFactory({ variableName: "DO_NOT_TRACK" });
42008
+ function isDoNotTrackEnabled() {
42009
+ const value = getDoNotTrackFromEnv()?.toLowerCase();
42010
+ return value === "1" || value === "true";
42011
+ }
42012
+ __name$4(isDoNotTrackEnabled, "isDoNotTrackEnabled");
42013
+ var getWranglerSendMetricsVariableFromEnv = getBooleanEnvironmentVariableFactory({ variableName: "WRANGLER_SEND_METRICS" });
42014
+ function getWranglerSendMetricsFromEnv() {
42015
+ if (isDoNotTrackEnabled()) return false;
42016
+ return getWranglerSendMetricsVariableFromEnv();
42017
+ }
42018
+ __name$4(getWranglerSendMetricsFromEnv, "getWranglerSendMetricsFromEnv");
42008
42019
  var getWranglerSendErrorReportsFromEnv = getBooleanEnvironmentVariableFactory({
42009
42020
  variableName: "WRANGLER_SEND_ERROR_REPORTS",
42010
42021
  defaultValue: false
@@ -42061,7 +42072,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({ variableName: "WRA
42061
42072
  var getRegistryPath = getEnvironmentVariableFactory({
42062
42073
  variableName: "WRANGLER_REGISTRY_PATH",
42063
42074
  defaultValue() {
42064
- return path2__default.join(getGlobalConfigPath(), "registry");
42075
+ return path.join(getGlobalConfigPath(), "registry");
42065
42076
  }
42066
42077
  });
42067
42078
  var getD1ExtraLocationChoices = getEnvironmentVariableFactory({ variableName: "WRANGLER_D1_EXTRA_LOCATION_CHOICES" });
@@ -42471,7 +42482,7 @@ function isPagesConfig(rawConfig) {
42471
42482
  }
42472
42483
  __name$4(isPagesConfig, "isPagesConfig");
42473
42484
  function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
42474
- const diagnostics = new Diagnostics(`Processing ${configPath ? path2__default.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
42485
+ const diagnostics = new Diagnostics(`Processing ${configPath ? path.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
42475
42486
  const isRedirectedConfig2 = isRedirectedRawConfig$1(rawConfig, configPath, userConfigPath);
42476
42487
  if ("legacy_env" in rawConfig) {
42477
42488
  if (!isRedirectedConfig2) diagnostics.errors.push(dedent$2`
@@ -42589,34 +42600,34 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
42589
42600
  else validateOptionalProperty(diagnostics, "build", "watch_dir", watch_dir, "string");
42590
42601
  return {
42591
42602
  command,
42592
- watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir2) => path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), `${dir2}`))) : path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), `${watch_dir}`)) : watch_dir,
42603
+ watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir2) => path.relative(process.cwd(), path.join(path.dirname(configPath), `${dir2}`))) : path.relative(process.cwd(), path.join(path.dirname(configPath), `${watch_dir}`)) : watch_dir,
42593
42604
  cwd
42594
42605
  };
42595
42606
  }
42596
42607
  __name$4(normalizeAndValidateBuild, "normalizeAndValidateBuild");
42597
42608
  function normalizeAndValidateMainField(configPath, rawMain) {
42598
- const configDir = path2__default.dirname(configPath ?? "wrangler.toml");
42609
+ const configDir = path.dirname(configPath ?? "wrangler.toml");
42599
42610
  if (rawMain !== void 0) if (typeof rawMain === "string") {
42600
- const directory = path2__default.resolve(configDir);
42601
- return path2__default.resolve(directory, rawMain);
42611
+ const directory = path.resolve(configDir);
42612
+ return path.resolve(directory, rawMain);
42602
42613
  } else return rawMain;
42603
42614
  else return;
42604
42615
  }
42605
42616
  __name$4(normalizeAndValidateMainField, "normalizeAndValidateMainField");
42606
42617
  function normalizeAndValidateBaseDirField(configPath, rawDir) {
42607
- const configDir = path2__default.dirname(configPath ?? "wrangler.toml");
42618
+ const configDir = path.dirname(configPath ?? "wrangler.toml");
42608
42619
  if (rawDir !== void 0) if (typeof rawDir === "string") {
42609
- const directory = path2__default.resolve(configDir);
42610
- return path2__default.resolve(directory, rawDir);
42620
+ const directory = path.resolve(configDir);
42621
+ return path.resolve(directory, rawDir);
42611
42622
  } else return rawDir;
42612
42623
  else return;
42613
42624
  }
42614
42625
  __name$4(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
42615
42626
  function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
42616
- const configDir = path2__default.dirname(configPath ?? "wrangler.toml");
42627
+ const configDir = path.dirname(configPath ?? "wrangler.toml");
42617
42628
  if (rawPagesDir !== void 0) if (typeof rawPagesDir === "string") {
42618
- const directory = path2__default.resolve(configDir);
42619
- return path2__default.resolve(directory, rawPagesDir);
42629
+ const directory = path.resolve(configDir);
42630
+ return path.resolve(directory, rawPagesDir);
42620
42631
  } else return rawPagesDir;
42621
42632
  else return;
42622
42633
  }
@@ -42670,7 +42681,7 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
42670
42681
  validateOptionalProperty(diagnostics, "site", "entry-point", legacySiteEntryPoint, "string");
42671
42682
  deprecated(diagnostics, rawConfig, `site.entry-point`, `Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
42672
42683
  \`\`\`
42673
- main = "${path2__default.join(String(legacySiteEntryPoint) || "workers-site", path2__default.extname(String(legacySiteEntryPoint) || "workers-site") ? "" : "index.js")}"
42684
+ main = "${path.join(String(legacySiteEntryPoint) || "workers-site", path.extname(String(legacySiteEntryPoint) || "workers-site") ? "" : "index.js")}"
42674
42685
  \`\`\``, false, void 0, "warning");
42675
42686
  let siteEntryPoint = legacySiteEntryPoint;
42676
42687
  if (!mainEntryPoint && !siteEntryPoint) {
@@ -42683,7 +42694,7 @@ main = "workers-site/index.js"
42683
42694
  } else if (mainEntryPoint && siteEntryPoint) diagnostics.errors.push(`Don't define both the \`main\` and \`site.entry-point\` fields in your configuration.
42684
42695
  They serve the same purpose: to point to the entry-point of your worker.
42685
42696
  Delete the deprecated \`site.entry-point\` field from your config.`);
42686
- if (configPath && siteEntryPoint) siteEntryPoint = path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), siteEntryPoint));
42697
+ if (configPath && siteEntryPoint) siteEntryPoint = path.relative(process.cwd(), path.join(path.dirname(configPath), siteEntryPoint));
42687
42698
  return {
42688
42699
  bucket,
42689
42700
  "entry-point": siteEntryPoint,
@@ -42715,7 +42726,7 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
42715
42726
  if (rawMapping === void 0) return;
42716
42727
  const mapping = {};
42717
42728
  for (const [name, filePath] of Object.entries(rawMapping)) if (isString$2(diagnostics, `${field}['${name}']`, filePath, void 0)) {
42718
- if (configPath) mapping[name] = configPath ? path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), filePath)) : filePath;
42729
+ if (configPath) mapping[name] = configPath ? path.relative(process.cwd(), path.join(path.dirname(configPath), filePath)) : filePath;
42719
42730
  }
42720
42731
  return mapping;
42721
42732
  }
@@ -42975,7 +42986,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
42975
42986
  __name$4(normalizeAndValidateEnvironment, "normalizeAndValidateEnvironment");
42976
42987
  function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPath) {
42977
42988
  const tsconfig = inheritable(diagnostics, topLevelEnv, rawEnv, "tsconfig", isString$2, void 0);
42978
- return configPath && tsconfig ? path2__default.relative(process.cwd(), path2__default.join(path2__default.dirname(configPath), tsconfig)) : tsconfig;
42989
+ return configPath && tsconfig ? path.relative(process.cwd(), path.join(path.dirname(configPath), tsconfig)) : tsconfig;
42979
42990
  }
42980
42991
  __name$4(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
42981
42992
  var validateAndNormalizeRules = /* @__PURE__ */ __name$4((diagnostics, topLevelEnv, rawEnv, envName) => {
@@ -43518,9 +43529,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
43518
43529
  let resolvedBuildContextPath = void 0;
43519
43530
  try {
43520
43531
  if (isDockerfile(resolvedImage, configPath)) {
43521
- const baseDir$1 = configPath ? path2__default.dirname(configPath) : process.cwd();
43522
- resolvedImage = path2__default.resolve(baseDir$1, resolvedImage);
43523
- resolvedBuildContextPath = containerAppOptional.image_build_context ? path2__default.resolve(baseDir$1, containerAppOptional.image_build_context) : path2__default.dirname(resolvedImage);
43532
+ const baseDir$1 = configPath ? path.dirname(configPath) : process.cwd();
43533
+ resolvedImage = path.resolve(baseDir$1, resolvedImage);
43534
+ resolvedBuildContextPath = containerAppOptional.image_build_context ? path.resolve(baseDir$1, containerAppOptional.image_build_context) : path.dirname(resolvedImage);
43524
43535
  }
43525
43536
  } catch (err) {
43526
43537
  if (err instanceof Error && err.message) diagnostics.errors.push(err.message);
@@ -44897,8 +44908,8 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
44897
44908
  }
44898
44909
  __name$4(isRemoteValid, "isRemoteValid");
44899
44910
  function isDockerfile(imagePath, configPath) {
44900
- const baseDir$1 = configPath ? path2__default.dirname(configPath) : process.cwd();
44901
- const maybeDockerfile = path2__default.resolve(baseDir$1, imagePath);
44911
+ const baseDir$1 = configPath ? path.dirname(configPath) : process.cwd();
44912
+ const maybeDockerfile = path.resolve(baseDir$1, imagePath);
44902
44913
  if (fs2.existsSync(maybeDockerfile)) {
44903
44914
  if (isDirectory$1(maybeDockerfile)) throw new UserError(`${imagePath} is a directory, you should specify a path to the Dockerfile`, { telemetryMessage: false });
44904
44915
  return true;
@@ -45049,10 +45060,10 @@ Pages requires Durable Object bindings to specify the name of the Worker where t
45049
45060
  __name$4(validateDurableObjectBinding2, "validateDurableObjectBinding");
45050
45061
  function getPackagePath(packageName, projectPath) {
45051
45062
  try {
45052
- return path2__default.dirname(__require$1.resolve(`${packageName}/package.json`, { paths: [projectPath] }));
45063
+ return path.dirname(__require$1.resolve(`${packageName}/package.json`, { paths: [projectPath] }));
45053
45064
  } catch {}
45054
45065
  try {
45055
- return path2__default.dirname(__require$1.resolve(packageName, { paths: [projectPath] }));
45066
+ return path.dirname(__require$1.resolve(packageName, { paths: [projectPath] }));
45056
45067
  } catch {}
45057
45068
  }
45058
45069
  __name$4(getPackagePath, "getPackagePath");
@@ -45077,14 +45088,14 @@ function getInstalledPackageVersion(packageName, projectPath, opts = {}) {
45077
45088
  __name$4(getInstalledPackageVersion, "getInstalledPackageVersion");
45078
45089
  function findFileUp(name, startDir, lastDir) {
45079
45090
  let dir2 = startDir;
45080
- const root = path2__default.parse(dir2).root;
45091
+ const root = path.parse(dir2).root;
45081
45092
  while (true) {
45082
- const candidate = path2__default.join(dir2, name);
45093
+ const candidate = path.join(dir2, name);
45083
45094
  try {
45084
45095
  if (statSync(candidate).isFile()) return candidate;
45085
45096
  } catch {}
45086
45097
  if (lastDir !== void 0 && dir2 === lastDir) break;
45087
- const parent = path2__default.dirname(dir2);
45098
+ const parent = path.dirname(dir2);
45088
45099
  if (parent === dir2 || dir2 === root) break;
45089
45100
  dir2 = parent;
45090
45101
  }
@@ -45350,7 +45361,7 @@ var process3 = globalThis.process;
45350
45361
  var { onExit, load: load$1, unload: unload$1 } = signalExitWrap(processOk$1(process3) ? new SignalExit(process3) : new SignalExitFallback());
45351
45362
  function getWranglerHiddenDirPath(projectRoot) {
45352
45363
  projectRoot ??= process.cwd();
45353
- return path2__default.join(projectRoot, ".wrangler");
45364
+ return path.join(projectRoot, ".wrangler");
45354
45365
  }
45355
45366
  __name$4(getWranglerHiddenDirPath, "getWranglerHiddenDirPath");
45356
45367
  var STALE_WRANGLER_TMP_DIR_MS = 1440 * 60 * 1e3;
@@ -45367,7 +45378,7 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
45367
45378
  const cutoff = Date.now() - STALE_WRANGLER_TMP_DIR_MS;
45368
45379
  for (const entry of entries) {
45369
45380
  if (!entry.isDirectory()) continue;
45370
- const entryPath = path2__default.join(tmpRoot, entry.name);
45381
+ const entryPath = path.join(tmpRoot, entry.name);
45371
45382
  try {
45372
45383
  if (fs2.statSync(entryPath).mtimeMs < cutoff) removeDirSync$1(entryPath);
45373
45384
  } catch {}
@@ -45375,10 +45386,10 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
45375
45386
  }
45376
45387
  __name$4(sweepStaleWranglerTmpDirs, "sweepStaleWranglerTmpDirs");
45377
45388
  function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
45378
- const tmpRoot = path2__default.join(getWranglerHiddenDirPath(projectRoot), "tmp");
45389
+ const tmpRoot = path.join(getWranglerHiddenDirPath(projectRoot), "tmp");
45379
45390
  fs2.mkdirSync(tmpRoot, { recursive: true });
45380
45391
  sweepStaleWranglerTmpDirs(tmpRoot);
45381
- const tmpPrefix = path2__default.join(tmpRoot, `${prefix}-`);
45392
+ const tmpPrefix = path.join(tmpRoot, `${prefix}-`);
45382
45393
  const tmpDir = fs2.realpathSync(fs2.mkdtempSync(tmpPrefix));
45383
45394
  const cleanupDir = /* @__PURE__ */ __name$4(() => {
45384
45395
  if (cleanup) try {
@@ -46254,7 +46265,7 @@ async function fetchLatestNpmVersion(name, version2) {
46254
46265
  __name$4(fetchLatestNpmVersion, "fetchLatestNpmVersion");
46255
46266
  async function openInBrowser(url2, logger$1) {
46256
46267
  try {
46257
- const { default: open$1 } = await import("./open-PBXRGS4R-7GUxLVbA.mjs");
46268
+ const { default: open$1 } = await import("./open-PBXRGS4R-MlJKk7qC.mjs");
46258
46269
  (await open$1(url2)).on("error", (err) => {
46259
46270
  handleBrowserOpenError(url2, err, logger$1);
46260
46271
  });
@@ -48810,8 +48821,8 @@ const postfixRE = /[?#].*$/;
48810
48821
  function cleanUrl(url$2) {
48811
48822
  return url$2.replace(postfixRE, "");
48812
48823
  }
48813
- function withTrailingSlash(path$1) {
48814
- return path$1.endsWith("/") ? path$1 : `${path$1}/`;
48824
+ function withTrailingSlash(path$2) {
48825
+ return path$2.endsWith("/") ? path$2 : `${path$2}/`;
48815
48826
  }
48816
48827
  function createRequestHandler(handler) {
48817
48828
  return async (req, res, next) => {
@@ -49450,11 +49461,11 @@ function explicitlyAborted(x, startIndex = 0) {
49450
49461
  for (let i$1 = startIndex; i$1 < x.issues.length; i$1++) if (x.issues[i$1]?.continue === false) return true;
49451
49462
  return false;
49452
49463
  }
49453
- function prefixIssues(path$1, issues) {
49464
+ function prefixIssues(path$2, issues) {
49454
49465
  return issues.map((iss) => {
49455
49466
  var _a$3;
49456
49467
  (_a$3 = iss).path ?? (_a$3.path = []);
49457
- iss.path.unshift(path$1);
49468
+ iss.path.unshift(path$2);
49458
49469
  return iss;
49459
49470
  });
49460
49471
  }
@@ -49519,12 +49530,12 @@ function flattenError(error$2, mapper = (issue$2) => issue$2.message) {
49519
49530
  }
49520
49531
  function formatError(error$2, mapper = (issue$2) => issue$2.message) {
49521
49532
  const fieldErrors = { _errors: [] };
49522
- const processError = (error$3, path$1 = []) => {
49523
- for (const issue$2 of error$3.issues) if (issue$2.code === "invalid_union" && issue$2.errors.length) issue$2.errors.map((issues) => processError({ issues }, [...path$1, ...issue$2.path]));
49524
- else if (issue$2.code === "invalid_key") processError({ issues: issue$2.issues }, [...path$1, ...issue$2.path]);
49525
- else if (issue$2.code === "invalid_element") processError({ issues: issue$2.issues }, [...path$1, ...issue$2.path]);
49533
+ const processError = (error$3, path$2 = []) => {
49534
+ for (const issue$2 of error$3.issues) if (issue$2.code === "invalid_union" && issue$2.errors.length) issue$2.errors.map((issues) => processError({ issues }, [...path$2, ...issue$2.path]));
49535
+ else if (issue$2.code === "invalid_key") processError({ issues: issue$2.issues }, [...path$2, ...issue$2.path]);
49536
+ else if (issue$2.code === "invalid_element") processError({ issues: issue$2.issues }, [...path$2, ...issue$2.path]);
49526
49537
  else {
49527
- const fullpath = [...path$1, ...issue$2.path];
49538
+ const fullpath = [...path$2, ...issue$2.path];
49528
49539
  if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue$2));
49529
49540
  else {
49530
49541
  let curr = fieldErrors;
@@ -56497,7 +56508,7 @@ function resolveWranglerConfigPath({ config: config$2, script }, options) {
56497
56508
  deployConfigPath: void 0,
56498
56509
  redirected: false
56499
56510
  };
56500
- return findWranglerConfig$1(script !== void 0 ? path2__default.dirname(script) : process.cwd(), options);
56511
+ return findWranglerConfig$1(script !== void 0 ? path.dirname(script) : process.cwd(), options);
56501
56512
  }
56502
56513
  __name$3(resolveWranglerConfigPath, "resolveWranglerConfigPath");
56503
56514
  function findWranglerConfig$1(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
@@ -56528,15 +56539,15 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
56528
56539
  const deployConfigFile = readFileSync$1$1(deployConfigPath);
56529
56540
  try {
56530
56541
  const deployConfig = parseJSONC(deployConfigFile, deployConfigPath);
56531
- redirectedConfigPath = deployConfig.configPath && path2__default.resolve(path2__default.dirname(deployConfigPath), deployConfig.configPath);
56542
+ redirectedConfigPath = deployConfig.configPath && path.resolve(path.dirname(deployConfigPath), deployConfig.configPath);
56532
56543
  } catch (e) {
56533
- throw new UserError$1(`Failed to parse the deploy configuration file at ${path2__default.relative(".", deployConfigPath)}`, {
56544
+ throw new UserError$1(`Failed to parse the deploy configuration file at ${path.relative(".", deployConfigPath)}`, {
56534
56545
  cause: e,
56535
56546
  telemetryMessage: false
56536
56547
  });
56537
56548
  }
56538
56549
  if (!redirectedConfigPath) throw new UserError$1(esm_default$1`
56539
- A deploy configuration file was found at "${path2__default.relative(".", deployConfigPath)}".
56550
+ A deploy configuration file was found at "${path.relative(".", deployConfigPath)}".
56540
56551
  But this is not valid - the required "configPath" property was not found.
56541
56552
  Instead this file contains:
56542
56553
  \`\`\`
@@ -56544,13 +56555,13 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
56544
56555
  \`\`\`
56545
56556
  `, { telemetryMessage: false });
56546
56557
  if (!existsSync(redirectedConfigPath)) throw new UserError$1(esm_default$1`
56547
- There is a deploy configuration at "${path2__default.relative(".", deployConfigPath)}".
56548
- But the redirected configuration path it points to, "${path2__default.relative(".", redirectedConfigPath)}", does not exist.
56558
+ There is a deploy configuration at "${path.relative(".", deployConfigPath)}".
56559
+ But the redirected configuration path it points to, "${path.relative(".", redirectedConfigPath)}", does not exist.
56549
56560
  `, { telemetryMessage: false });
56550
56561
  if (userConfigPath) {
56551
- if (path2__default.join(path2__default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError$1(esm_default$1`
56552
- Found both a user configuration file at "${path2__default.relative(".", userConfigPath)}"
56553
- and a deploy configuration file at "${path2__default.relative(".", deployConfigPath)}".
56562
+ if (path.join(path.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError$1(esm_default$1`
56563
+ Found both a user configuration file at "${path.relative(".", userConfigPath)}"
56564
+ and a deploy configuration file at "${path.relative(".", deployConfigPath)}".
56554
56565
  But these do not share the same base path so it is not clear which should be used.
56555
56566
  `, { telemetryMessage: false });
56556
56567
  }
@@ -57347,9 +57358,9 @@ async function generate({ compatibilityDate, compatibilityFlags = [] }) {
57347
57358
  modules: true,
57348
57359
  script: (await fsp.readFile(require$1.resolve("workerd/worker.mjs"))).toString()
57349
57360
  }));
57350
- const path$1 = `http://dummy.com/${compatibilityDate}${compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : ""}`;
57361
+ const path$2 = `http://dummy.com/${compatibilityDate}${compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : ""}`;
57351
57362
  try {
57352
- const res = await mf.dispatchFetch(path$1);
57363
+ const res = await mf.dispatchFetch(path$2);
57353
57364
  const text = await res.text();
57354
57365
  if (!res.ok) throw new Error(text);
57355
57366
  return text;
@@ -57544,8 +57555,8 @@ var __name$2 = (target$1, value) => __defProp$2(target$1, "name", {
57544
57555
  value,
57545
57556
  configurable: true
57546
57557
  });
57547
- function isDirectory(path$1) {
57548
- return fs2.statSync(path$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
57558
+ function isDirectory(path$1$1) {
57559
+ return fs2.statSync(path$1$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
57549
57560
  }
57550
57561
  __name$2(isDirectory, "isDirectory");
57551
57562
  function removeDir(dirPath, { fireAndForget = false } = {}) {
@@ -62855,15 +62866,15 @@ function hasTrailingSlash(input = "", respectQueryAndFragment) {
62855
62866
  function withTrailingSlash$1(input = "", respectQueryAndFragment) {
62856
62867
  if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
62857
62868
  if (hasTrailingSlash(input, true)) return input || "/";
62858
- let path$1 = input;
62869
+ let path$2 = input;
62859
62870
  let fragment = "";
62860
62871
  const fragmentIndex = input.indexOf("#");
62861
62872
  if (fragmentIndex >= 0) {
62862
- path$1 = input.slice(0, fragmentIndex);
62873
+ path$2 = input.slice(0, fragmentIndex);
62863
62874
  fragment = input.slice(fragmentIndex);
62864
- if (!path$1) return fragment;
62875
+ if (!path$2) return fragment;
62865
62876
  }
62866
- const [s0, ...s] = path$1.split("?");
62877
+ const [s0, ...s] = path$2.split("?");
62867
62878
  return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
62868
62879
  }
62869
62880
  function isNonEmptyURL(url$2) {
@@ -62889,8 +62900,8 @@ const isAbsolute$2 = function(p$2) {
62889
62900
  //#endregion
62890
62901
  //#region ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
62891
62902
  const BUILTIN_MODULES = new Set(builtinModules);
62892
- function normalizeSlash(path$1) {
62893
- return path$1.replace(/\\/g, "/");
62903
+ function normalizeSlash(path$2) {
62904
+ return path$2.replace(/\\/g, "/");
62894
62905
  }
62895
62906
  /**
62896
62907
  * @typedef ErrnoExceptionFields
@@ -63010,8 +63021,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
63010
63021
  * @param {string} [base]
63011
63022
  * @param {string} [message]
63012
63023
  */
63013
- (path$1, base, message) => {
63014
- return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
63024
+ (path$2, base, message) => {
63025
+ return `Invalid package config ${path$2}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
63015
63026
  },
63016
63027
  Error
63017
63028
  );
@@ -63041,8 +63052,8 @@ codes.ERR_MODULE_NOT_FOUND = createError(
63041
63052
  * @param {string} base
63042
63053
  * @param {boolean} [exactUrl]
63043
63054
  */
63044
- (path$1, base, exactUrl = false) => {
63045
- return `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`;
63055
+ (path$2, base, exactUrl = false) => {
63056
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path$2}' imported from ${base}`;
63046
63057
  },
63047
63058
  Error
63048
63059
  );
@@ -63080,8 +63091,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
63080
63091
  * @param {string} extension
63081
63092
  * @param {string} path
63082
63093
  */
63083
- (extension, path$1) => {
63084
- return `Unknown file extension "${extension}" for ${path$1}`;
63094
+ (extension, path$2) => {
63095
+ return `Unknown file extension "${extension}" for ${path$2}`;
63085
63096
  },
63086
63097
  TypeError
63087
63098
  );
@@ -63238,7 +63249,7 @@ function read(jsonPath, { base, specifier }) {
63238
63249
  /** @type {string | undefined} */
63239
63250
  let string$3;
63240
63251
  try {
63241
- string$3 = fs2.readFileSync(path2__default.toNamespacedPath(jsonPath), "utf8");
63252
+ string$3 = fs2.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
63242
63253
  } catch (error$2) {
63243
63254
  const exception = error$2;
63244
63255
  if (exception.code !== "ENOENT") throw exception;
@@ -63444,15 +63455,15 @@ function emitLegacyIndexDeprecation(url$2, packageJsonUrl, base, main) {
63444
63455
  const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
63445
63456
  const basePath = fileURLToPath(base);
63446
63457
  if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
63447
- else if (path2__default.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
63458
+ else if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
63448
63459
  }
63449
63460
  /**
63450
63461
  * @param {string} path
63451
63462
  * @returns {Stats | undefined}
63452
63463
  */
63453
- function tryStatSync(path$1) {
63464
+ function tryStatSync(path$2) {
63454
63465
  try {
63455
- return statSync(path$1);
63466
+ return statSync(path$2);
63456
63467
  } catch {}
63457
63468
  }
63458
63469
  /**
@@ -63551,7 +63562,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
63551
63562
  {
63552
63563
  const real = realpathSync(filePath);
63553
63564
  const { search, hash: hash$1 } = resolved;
63554
- resolved = pathToFileURL(real + (filePath.endsWith(path2__default.sep) ? "/" : ""));
63565
+ resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? "/" : ""));
63555
63566
  resolved.search = search;
63556
63567
  resolved.hash = hash$1;
63557
63568
  }
@@ -66857,9 +66868,9 @@ function constructHeaders({ headers, headersFile, logger: logger$1 }) {
66857
66868
 
66858
66869
  //#endregion
66859
66870
  //#region ../workers-shared/utils/configuration/validateURL.ts
66860
- const extractPathname = (path$1 = "/", includeSearch, includeHash) => {
66861
- if (!path$1.startsWith("/")) path$1 = `/${path$1}`;
66862
- const url$2 = new URL(`//${path$1}`, "relative://");
66871
+ const extractPathname = (path$2 = "/", includeSearch, includeHash) => {
66872
+ if (!path$2.startsWith("/")) path$2 = `/${path$2}`;
66873
+ const url$2 = new URL(`//${path$2}`, "relative://");
66863
66874
  return `${url$2.pathname}${includeSearch ? url$2.search : ""}${includeHash ? url$2.hash : ""}`;
66864
66875
  };
66865
66876
  const URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
@@ -66918,7 +66929,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
66918
66929
  lineNumber: i$1 + 1,
66919
66930
  message: "No headers specified"
66920
66931
  });
66921
- const [path$1, pathError] = validateUrl(line, false, true);
66932
+ const [path$2, pathError] = validateUrl(line, false, true);
66922
66933
  if (pathError) {
66923
66934
  invalid.push({
66924
66935
  line,
@@ -66929,7 +66940,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
66929
66940
  skipUntilNextPath = true;
66930
66941
  continue;
66931
66942
  }
66932
- const wildcardError = validateNoMultipleWildcards(path$1);
66943
+ const wildcardError = validateNoMultipleWildcards(path$2);
66933
66944
  if (wildcardError) {
66934
66945
  invalid.push({
66935
66946
  line,
@@ -66941,7 +66952,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
66941
66952
  continue;
66942
66953
  }
66943
66954
  rule = {
66944
- path: path$1,
66955
+ path: path$2,
66945
66956
  line,
66946
66957
  headers: {},
66947
66958
  unsetHeaders: []
@@ -67024,11 +67035,11 @@ function isValidRule(rule) {
67024
67035
  * `:splat` placeholder, would result in duplicate `:splat` parameters which is
67025
67036
  * unsupported.
67026
67037
  */
67027
- function validateNoMultipleWildcards(path$1) {
67028
- const wildcardCount = (path$1.match(SPLAT_REGEX) ?? []).length;
67029
- const hasSplatPlaceholder = /:splat(?!\w)/.test(path$1);
67030
- if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path$1}.`;
67031
- if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path$1}.`;
67038
+ function validateNoMultipleWildcards(path$2) {
67039
+ const wildcardCount = (path$2.match(SPLAT_REGEX) ?? []).length;
67040
+ const hasSplatPlaceholder = /:splat(?!\w)/.test(path$2);
67041
+ if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path$2}.`;
67042
+ if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path$2}.`;
67032
67043
  }
67033
67044
 
67034
67045
  //#endregion
@@ -67245,13 +67256,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
67245
67256
  const throwError = (message, Ctor) => {
67246
67257
  throw new Ctor(message);
67247
67258
  };
67248
- const checkPath = (path$1, originalPath, doThrow) => {
67249
- if (!isString$1(path$1)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
67250
- if (!path$1) return doThrow(`path must not be empty`, TypeError);
67251
- if (checkPath.isNotRelative(path$1)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
67259
+ const checkPath = (path$2, originalPath, doThrow) => {
67260
+ if (!isString$1(path$2)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
67261
+ if (!path$2) return doThrow(`path must not be empty`, TypeError);
67262
+ if (checkPath.isNotRelative(path$2)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
67252
67263
  return true;
67253
67264
  };
67254
- const isNotRelative = (path$1) => REGEX_TEST_INVALID_PATH.test(path$1);
67265
+ const isNotRelative = (path$2) => REGEX_TEST_INVALID_PATH.test(path$2);
67255
67266
  checkPath.isNotRelative = isNotRelative;
67256
67267
  checkPath.convert = (p$2) => p$2;
67257
67268
  var Ignore = class {
@@ -67287,13 +67298,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
67287
67298
  addPattern(pattern) {
67288
67299
  return this.add(pattern);
67289
67300
  }
67290
- _testOne(path$1, checkUnignored) {
67301
+ _testOne(path$2, checkUnignored) {
67291
67302
  let ignored = false;
67292
67303
  let unignored = false;
67293
67304
  this._rules.forEach((rule) => {
67294
67305
  const { negative } = rule;
67295
67306
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
67296
- if (rule.regex.test(path$1)) {
67307
+ if (rule.regex.test(path$2)) {
67297
67308
  ignored = !negative;
67298
67309
  unignored = negative;
67299
67310
  }
@@ -67304,33 +67315,33 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
67304
67315
  };
67305
67316
  }
67306
67317
  _test(originalPath, cache$2, checkUnignored, slices) {
67307
- const path$1 = originalPath && checkPath.convert(originalPath);
67308
- checkPath(path$1, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
67309
- return this._t(path$1, cache$2, checkUnignored, slices);
67318
+ const path$2 = originalPath && checkPath.convert(originalPath);
67319
+ checkPath(path$2, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
67320
+ return this._t(path$2, cache$2, checkUnignored, slices);
67310
67321
  }
67311
- _t(path$1, cache$2, checkUnignored, slices) {
67312
- if (path$1 in cache$2) return cache$2[path$1];
67313
- if (!slices) slices = path$1.split(SLASH);
67322
+ _t(path$2, cache$2, checkUnignored, slices) {
67323
+ if (path$2 in cache$2) return cache$2[path$2];
67324
+ if (!slices) slices = path$2.split(SLASH);
67314
67325
  slices.pop();
67315
- if (!slices.length) return cache$2[path$1] = this._testOne(path$1, checkUnignored);
67326
+ if (!slices.length) return cache$2[path$2] = this._testOne(path$2, checkUnignored);
67316
67327
  const parent = this._t(slices.join(SLASH) + SLASH, cache$2, checkUnignored, slices);
67317
- return cache$2[path$1] = parent.ignored ? parent : this._testOne(path$1, checkUnignored);
67328
+ return cache$2[path$2] = parent.ignored ? parent : this._testOne(path$2, checkUnignored);
67318
67329
  }
67319
- ignores(path$1) {
67320
- return this._test(path$1, this._ignoreCache, false).ignored;
67330
+ ignores(path$2) {
67331
+ return this._test(path$2, this._ignoreCache, false).ignored;
67321
67332
  }
67322
67333
  createFilter() {
67323
- return (path$1) => !this.ignores(path$1);
67334
+ return (path$2) => !this.ignores(path$2);
67324
67335
  }
67325
67336
  filter(paths) {
67326
67337
  return makeArray(paths).filter(this.createFilter());
67327
67338
  }
67328
- test(path$1) {
67329
- return this._test(path$1, this._testCache, true);
67339
+ test(path$2) {
67340
+ return this._test(path$2, this._testCache, true);
67330
67341
  }
67331
67342
  };
67332
67343
  const factory = (options) => new Ignore(options);
67333
- const isPathValid = (path$1) => checkPath(path$1 && checkPath.convert(path$1), path$1, RETURN_FALSE);
67344
+ const isPathValid = (path$2) => checkPath(path$2 && checkPath.convert(path$2), path$2, RETURN_FALSE);
67334
67345
  factory.isPathValid = isPathValid;
67335
67346
  factory.default = factory;
67336
67347
  module.exports = factory;
@@ -67339,7 +67350,7 @@ var require_ignore = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/ig
67339
67350
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
67340
67351
  checkPath.convert = makePosix;
67341
67352
  const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
67342
- checkPath.isNotRelative = (path$1) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path$1) || isNotRelative(path$1);
67353
+ checkPath.isNotRelative = (path$2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path$2) || isNotRelative(path$2);
67343
67354
  }
67344
67355
  }) });
67345
67356
 
@@ -68694,11 +68705,11 @@ var Mime = class {
68694
68705
  }
68695
68706
  return this;
68696
68707
  }
68697
- getType(path$1) {
68698
- if (typeof path$1 !== "string") return null;
68699
- const last = path$1.replace(/^.*[/\\]/s, "").toLowerCase();
68708
+ getType(path$2) {
68709
+ if (typeof path$2 !== "string") return null;
68710
+ const last = path$2.replace(/^.*[/\\]/s, "").toLowerCase();
68700
68711
  const ext = last.replace(/^.*\./s, "").toLowerCase();
68701
- const hasPath = last.length < path$1.length;
68712
+ const hasPath = last.length < path$2.length;
68702
68713
  if (!(ext.length < last.length - 1) && hasPath) return null;
68703
68714
  return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
68704
68715
  }
@@ -69471,11 +69482,11 @@ const getQueryString = (params) => {
69471
69482
  };
69472
69483
  const getUrl = (config$2, options) => {
69473
69484
  const encoder$1 = config$2.ENCODE_PATH || encodeURI;
69474
- const path$1 = options.url.replace("{api-version}", config$2.VERSION).replace(/{(.*?)}/g, (substring, group) => {
69485
+ const path$2 = options.url.replace("{api-version}", config$2.VERSION).replace(/{(.*?)}/g, (substring, group) => {
69475
69486
  if (options.path?.hasOwnProperty(group)) return encoder$1(String(options.path[group]));
69476
69487
  return substring;
69477
69488
  });
69478
- const url$2 = `${config$2.BASE}${path$1}`;
69489
+ const url$2 = `${config$2.BASE}${path$2}`;
69479
69490
  if (options.query) return `${url$2}${getQueryString(options.query)}`;
69480
69491
  return url$2;
69481
69492
  };
@@ -70573,7 +70584,7 @@ function getContainerOptions(options) {
70573
70584
  return containersConfig.map((container) => {
70574
70585
  if (isDockerfile(container.image, configPath)) return {
70575
70586
  dockerfile: container.image,
70576
- image_build_context: container.image_build_context ?? path2__default.dirname(container.image),
70587
+ image_build_context: container.image_build_context ?? path.dirname(container.image),
70577
70588
  image_vars: container.image_vars,
70578
70589
  class_name: container.class_name,
70579
70590
  image_tag: getDevContainerImageName(container.class_name, containerBuildId)
@@ -74804,13 +74815,13 @@ function createProfileStore(args) {
74804
74815
  args.bindings.write(currentBindings);
74805
74816
  },
74806
74817
  activate(profile, dir$2) {
74807
- const normalizedDir = path2__default.resolve(dir$2);
74818
+ const normalizedDir = path.resolve(dir$2);
74808
74819
  const currentBindings = args.bindings.read();
74809
74820
  currentBindings[normalizedDir] = profile;
74810
74821
  args.bindings.write(currentBindings);
74811
74822
  },
74812
74823
  deactivate(dir$2) {
74813
- const normalizedDir = path2__default.resolve(dir$2);
74824
+ const normalizedDir = path.resolve(dir$2);
74814
74825
  const currentBindings = args.bindings.read();
74815
74826
  const boundProfile = currentBindings[normalizedDir];
74816
74827
  if (boundProfile === void 0) {
@@ -74882,18 +74893,18 @@ function validateProfileName(name) {
74882
74893
  }
74883
74894
  __name$1(validateProfileName, "validateProfileName");
74884
74895
  function formatDirectoryForUserError(dir$2) {
74885
- return path2__default.relative(process.cwd(), dir$2) || ".";
74896
+ return path.relative(process.cwd(), dir$2) || ".";
74886
74897
  }
74887
74898
  __name$1(formatDirectoryForUserError, "formatDirectoryForUserError");
74888
74899
  function getProfileForDirectoryFromBindings(startDir, bindings$1) {
74889
- const normalizedDir = path2__default.resolve(startDir);
74900
+ const normalizedDir = path.resolve(startDir);
74890
74901
  const sortedEntries = Object.entries(bindings$1).sort(([a], [b]) => b.length - a.length);
74891
74902
  for (const [boundDir, profile] of sortedEntries) {
74892
74903
  if (normalizedDir === boundDir) return {
74893
74904
  profile,
74894
74905
  dir: boundDir
74895
74906
  };
74896
- if (normalizedDir.startsWith(boundDir) && normalizedDir[boundDir.length] === path2__default.sep) return {
74907
+ if (normalizedDir.startsWith(boundDir) && normalizedDir[boundDir.length] === path.sep) return {
74897
74908
  profile,
74898
74909
  dir: boundDir
74899
74910
  };
@@ -75648,7 +75659,7 @@ function resolveAuthProfileBaseName(profile) {
75648
75659
  }
75649
75660
  __name$1(resolveAuthProfileBaseName, "resolveAuthProfileBaseName");
75650
75661
  function getAuthConfigFilePath$2(configPath, profile, extension = "toml") {
75651
- return path2__default.join(configPath, USER_AUTH_CONFIG_PATH, `${resolveAuthProfileBaseName(profile)}.${extension}`);
75662
+ return path.join(configPath, USER_AUTH_CONFIG_PATH, `${resolveAuthProfileBaseName(profile)}.${extension}`);
75652
75663
  }
75653
75664
  __name$1(getAuthConfigFilePath$2, "getAuthConfigFilePath");
75654
75665
  var FileCredentialStore = class {
@@ -75679,7 +75690,7 @@ var FileCredentialStore = class {
75679
75690
  }
75680
75691
  write(config$2) {
75681
75692
  const filePath = this.filePath();
75682
- mkdirSync(path2__default.dirname(filePath), { recursive: true });
75693
+ mkdirSync(path.dirname(filePath), { recursive: true });
75683
75694
  writeFileSync(filePath, stringifyFile(this.format, config$2), {
75684
75695
  encoding: "utf-8",
75685
75696
  mode: 384
@@ -75744,7 +75755,7 @@ function parseEncryptedEnvelope(raw) {
75744
75755
  }
75745
75756
  __name$1(parseEncryptedEnvelope, "parseEncryptedEnvelope");
75746
75757
  function getEncryptedAuthConfigFilePath$2(configPath, profile) {
75747
- return path2__default.join(configPath, "config", `${resolveAuthProfileBaseName(profile)}.enc`);
75758
+ return path.join(configPath, "config", `${resolveAuthProfileBaseName(profile)}.enc`);
75748
75759
  }
75749
75760
  __name$1(getEncryptedAuthConfigFilePath$2, "getEncryptedAuthConfigFilePath");
75750
75761
  var EncryptedFileCredentialStore = class {
@@ -75783,7 +75794,7 @@ var EncryptedFileCredentialStore = class {
75783
75794
  const key = this.ensureKey();
75784
75795
  const envelope = encryptString(stringifyFile(this.format, config$2), key);
75785
75796
  const encryptedPath = getEncryptedAuthConfigFilePath$2(this.configPath, this.profile);
75786
- mkdirSync(path2__default.dirname(encryptedPath), { recursive: true });
75797
+ mkdirSync(path.dirname(encryptedPath), { recursive: true });
75787
75798
  writeFileSync(encryptedPath, JSON.stringify(envelope, null, " "), {
75788
75799
  encoding: "utf-8",
75789
75800
  mode: 384
@@ -75888,26 +75899,26 @@ function setNpmRunner(fn) {
75888
75899
  }
75889
75900
  __name$1(setNpmRunner, "setNpmRunner");
75890
75901
  function getKeyringInstallDir(configPath) {
75891
- return path2__default.join(configPath, "native", "keyring");
75902
+ return path.join(configPath, "native", "keyring");
75892
75903
  }
75893
75904
  __name$1(getKeyringInstallDir, "getKeyringInstallDir");
75894
75905
  function getInstalledBindingPath(installDir) {
75895
- return path2__default.join(installDir, "node_modules", "@napi-rs", "keyring");
75906
+ return path.join(installDir, "node_modules", "@napi-rs", "keyring");
75896
75907
  }
75897
75908
  __name$1(getInstalledBindingPath, "getInstalledBindingPath");
75898
75909
  function findKeyringBinding(installDir) {
75899
75910
  const cached$2 = cachedBindingPathByDir.get(installDir);
75900
75911
  if (cached$2 !== void 0) return cached$2;
75901
75912
  const lazy$2 = getInstalledBindingPath(installDir);
75902
- if (existsSync(path2__default.join(lazy$2, "index.js"))) {
75913
+ if (existsSync(path.join(lazy$2, "index.js"))) {
75903
75914
  cachedBindingPathByDir.set(installDir, lazy$2);
75904
75915
  return lazy$2;
75905
75916
  }
75906
75917
  try {
75907
75918
  const r$1 = npmRunner(["root", "-g"]);
75908
75919
  if (r$1.status === 0) {
75909
- const global$2 = path2__default.join(r$1.stdout.trim(), "@napi-rs", "keyring");
75910
- if (existsSync(path2__default.join(global$2, "index.js"))) {
75920
+ const global$2 = path.join(r$1.stdout.trim(), "@napi-rs", "keyring");
75921
+ if (existsSync(path.join(global$2, "index.js"))) {
75911
75922
  cachedBindingPathByDir.set(installDir, global$2);
75912
75923
  return global$2;
75913
75924
  }
@@ -75920,7 +75931,7 @@ __name$1(findKeyringBinding, "findKeyringBinding");
75920
75931
  function installKeyringBindingSync(installDir) {
75921
75932
  const dir$2 = installDir;
75922
75933
  mkdirSync(dir$2, { recursive: true });
75923
- const hostPkgJson = path2__default.join(dir$2, "package.json");
75934
+ const hostPkgJson = path.join(dir$2, "package.json");
75924
75935
  if (!existsSync(hostPkgJson)) writeFileSync(hostPkgJson, JSON.stringify({
75925
75936
  private: true,
75926
75937
  name: "cloudflare-auth-keyring-host"
@@ -76352,7 +76363,7 @@ __name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
76352
76363
  //#region ../workers-auth/dist/chunk-AEOSGWMT.mjs
76353
76364
  function createPreferences(getConfigPath) {
76354
76365
  function getUserPreferencesPath() {
76355
- return path2__default.resolve(getConfigPath(), "preferences.json");
76366
+ return path.resolve(getConfigPath(), "preferences.json");
76356
76367
  }
76357
76368
  __name$1(getUserPreferencesPath, "getUserPreferencesPath");
76358
76369
  function readUserPreferences$2() {
@@ -76372,7 +76383,7 @@ function createPreferences(getConfigPath) {
76372
76383
  ...update
76373
76384
  };
76374
76385
  const filePath = getUserPreferencesPath();
76375
- mkdirSync(path2__default.dirname(filePath), { recursive: true });
76386
+ mkdirSync(path.dirname(filePath), { recursive: true });
76376
76387
  writeFileSync(filePath, JSON.stringify(next, null, " "), { encoding: "utf-8" });
76377
76388
  }
76378
76389
  __name$1(updateUserPreferences$2, "updateUserPreferences");
@@ -77007,7 +77018,7 @@ function createFileStorage(format$4, getPath) {
77007
77018
  }, "read"),
77008
77019
  write(config$2) {
77009
77020
  const configPath = getPath();
77010
- mkdirSync(path2__default.dirname(configPath), { recursive: true });
77021
+ mkdirSync(path.dirname(configPath), { recursive: true });
77011
77022
  writeFileSync(configPath, stringifyFile(format$4, config$2), {
77012
77023
  encoding: "utf-8",
77013
77024
  mode: 384
@@ -77321,7 +77332,7 @@ function createCloudflareProfileStore(ctx) {
77321
77332
  }
77322
77333
  __name$1(encryptedPath, "encryptedPath");
77323
77334
  function getProfileConfigDirectory() {
77324
- return path2__default.dirname(plaintextPath("default"));
77335
+ return path.dirname(plaintextPath("default"));
77325
77336
  }
77326
77337
  __name$1(getProfileConfigDirectory, "getProfileConfigDirectory");
77327
77338
  const configs = {
@@ -77348,7 +77359,7 @@ function createCloudflareProfileStore(ctx) {
77348
77359
  }
77349
77360
  };
77350
77361
  function getDirectoryBindingsPath() {
77351
- return path2__default.join(getConfigPath(), DIRECTORY_BINDINGS_FILE);
77362
+ return path.join(getConfigPath(), DIRECTORY_BINDINGS_FILE);
77352
77363
  }
77353
77364
  __name$1(getDirectoryBindingsPath, "getDirectoryBindingsPath");
77354
77365
  return createProfileStore({
@@ -77364,7 +77375,7 @@ function createCloudflareProfileStore(ctx) {
77364
77375
  },
77365
77376
  write(dirBindings) {
77366
77377
  const bindingsPath = getDirectoryBindingsPath();
77367
- mkdirSync(path2__default.dirname(bindingsPath), { recursive: true });
77378
+ mkdirSync(path.dirname(bindingsPath), { recursive: true });
77368
77379
  writeFileSync(bindingsPath, JSON.stringify(dirBindings, null, " "), "utf-8");
77369
77380
  }
77370
77381
  }
@@ -77605,7 +77616,7 @@ function getTemporaryAccountConfigFile$1() {
77605
77616
  }
77606
77617
  __name$1(getTemporaryAccountConfigFile$1, "getTemporaryAccountConfigFile");
77607
77618
  function getCfTemporaryAccountConfigPath() {
77608
- return path2__default.join(getCfConfigPath(), getTemporaryAccountConfigFile$1());
77619
+ return path.join(getCfConfigPath(), getTemporaryAccountConfigFile$1());
77609
77620
  }
77610
77621
  __name$1(getCfTemporaryAccountConfigPath, "getCfTemporaryAccountConfigPath");
77611
77622
  function createJsonFileStorage(getPath) {
@@ -77728,7 +77739,7 @@ function getTemporaryAccountConfigFile() {
77728
77739
  }
77729
77740
  __name$1(getTemporaryAccountConfigFile, "getTemporaryAccountConfigFile");
77730
77741
  function getTemporaryPreviewAccountConfigPath() {
77731
- return path2__default.join(getGlobalConfigPath(), getTemporaryAccountConfigFile());
77742
+ return path.join(getGlobalConfigPath(), getTemporaryAccountConfigFile());
77732
77743
  }
77733
77744
  __name$1(getTemporaryPreviewAccountConfigPath, "getTemporaryPreviewAccountConfigPath");
77734
77745
  function createTomlFileStorage(getPath) {
@@ -77802,7 +77813,7 @@ var require_command_exists$1 = /* @__PURE__ */ __commonJS$2({ "../../node_module
77802
77813
  var exec = __require$2("child_process").exec;
77803
77814
  var execSync$1 = __require$2("child_process").execSync;
77804
77815
  var fs$2 = __require$2("fs");
77805
- var path = __require$2("path");
77816
+ var path$1 = __require$2("path");
77806
77817
  var access = fs$2.access;
77807
77818
  var accessSync$1 = fs$2.accessSync;
77808
77819
  var constants$4 = fs$2.constants || fs$2;
@@ -77879,8 +77890,8 @@ var require_command_exists$1 = /* @__PURE__ */ __commonJS$2({ "../../node_module
77879
77890
  };
77880
77891
  if (isUsingWindows) cleanInput = function(s) {
77881
77892
  if (/[\\]/.test(s)) {
77882
- var dirname$3 = "\"" + path.dirname(s) + "\"";
77883
- var basename$2 = "\"" + path.basename(s) + "\"";
77893
+ var dirname$3 = "\"" + path$1.dirname(s) + "\"";
77894
+ var basename$2 = "\"" + path$1.basename(s) + "\"";
77884
77895
  return dirname$3 + ":" + basename$2;
77885
77896
  }
77886
77897
  return "\"" + s + "\"";
@@ -78694,11 +78705,11 @@ function createWorkerUploadForm(worker, bindings$1, options) {
78694
78705
  const manifestModuleName = "__STATIC_CONTENT_MANIFEST";
78695
78706
  if (modules?.some(({ name }) => name === manifestModuleName) && main.type === "esm") {
78696
78707
  assert(modules !== void 0);
78697
- const subDirs = new Set(modules.map((module$1) => path2__default.posix.dirname(module$1.name)));
78708
+ const subDirs = new Set(modules.map((module$1) => path.posix.dirname(module$1.name)));
78698
78709
  for (const subDir of subDirs) {
78699
78710
  if (subDir === ".") continue;
78700
- const relativePath = path2__default.posix.relative(subDir, manifestModuleName);
78701
- const filePath = path2__default.posix.join(subDir, manifestModuleName);
78711
+ const relativePath = path.posix.relative(subDir, manifestModuleName);
78712
+ const filePath = path.posix.join(subDir, manifestModuleName);
78702
78713
  modules.push({
78703
78714
  name: filePath,
78704
78715
  filePath,
@@ -78778,7 +78789,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
78778
78789
  //#endregion
78779
78790
  //#region ../remote-bindings/dist/index.mjs
78780
78791
  var import_undici = require_undici();
78781
- var version$2 = "0.0.9";
78792
+ var version$2 = "0.0.10";
78782
78793
  var NoDefaultValueProvided = class extends UserError {
78783
78794
  constructor() {
78784
78795
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
@@ -79223,7 +79234,7 @@ function createRemoteWorkerInit(props) {
79223
79234
  return {
79224
79235
  name: props.name,
79225
79236
  main: {
79226
- name: path2__default.basename(props.bundle.path),
79237
+ name: path.basename(props.bundle.path),
79227
79238
  filePath: props.bundle.path,
79228
79239
  type: props.bundle.type,
79229
79240
  content: props.bundle.entrypointSource
@@ -79692,26 +79703,26 @@ function deepStrictEqual(source, target$1) {
79692
79703
  //#endregion
79693
79704
  //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs
79694
79705
  var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
79695
- function cleanPath(path$1) {
79696
- let normalized = normalize(path$1);
79706
+ function cleanPath(path$2) {
79707
+ let normalized = normalize(path$2);
79697
79708
  if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
79698
79709
  return normalized;
79699
79710
  }
79700
79711
  const SLASHES_REGEX = /[\\/]/g;
79701
- function convertSlashes(path$1, separator) {
79702
- return path$1.replace(SLASHES_REGEX, separator);
79712
+ function convertSlashes(path$2, separator) {
79713
+ return path$2.replace(SLASHES_REGEX, separator);
79703
79714
  }
79704
79715
  const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
79705
- function isRootDirectory(path$1) {
79706
- return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
79716
+ function isRootDirectory(path$2) {
79717
+ return path$2 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$2);
79707
79718
  }
79708
- function normalizePath$1(path$1, options) {
79719
+ function normalizePath$1(path$2, options) {
79709
79720
  const { resolvePaths, normalizePath: normalizePath$1$1, pathSeparator } = options;
79710
- const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
79711
- if (resolvePaths) path$1 = resolve$1(path$1);
79712
- if (normalizePath$1$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
79713
- if (path$1 === ".") return "";
79714
- return convertSlashes(path$1[path$1.length - 1] !== pathSeparator ? path$1 + pathSeparator : path$1, pathSeparator);
79721
+ const pathNeedsCleaning = process.platform === "win32" && path$2.includes("/") || path$2.startsWith(".");
79722
+ if (resolvePaths) path$2 = resolve$1(path$2);
79723
+ if (normalizePath$1$1 || pathNeedsCleaning) path$2 = cleanPath(path$2);
79724
+ if (path$2 === ".") return "";
79725
+ return convertSlashes(path$2[path$2.length - 1] !== pathSeparator ? path$2 + pathSeparator : path$2, pathSeparator);
79715
79726
  }
79716
79727
  function joinPathWithBasePath(filename, directoryPath) {
79717
79728
  return directoryPath + filename;
@@ -79747,8 +79758,8 @@ const pushDirectory = (directoryPath, paths) => {
79747
79758
  paths.push(directoryPath || ".");
79748
79759
  };
79749
79760
  const pushDirectoryFilter = (directoryPath, paths, filters) => {
79750
- const path$1 = directoryPath || ".";
79751
- if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
79761
+ const path$2 = directoryPath || ".";
79762
+ if (filters.every((filter) => filter(path$2, true))) paths.push(path$2);
79752
79763
  };
79753
79764
  const empty$2 = () => {};
79754
79765
  function build$6(root, options) {
@@ -79797,26 +79808,26 @@ const empty = () => {};
79797
79808
  function build$3(options) {
79798
79809
  return options.group ? groupFiles : empty;
79799
79810
  }
79800
- const resolveSymlinksAsync = function(path$1, state, callback$1) {
79811
+ const resolveSymlinksAsync = function(path$2, state, callback$1) {
79801
79812
  const { queue, fs: fs$3, options: { suppressErrors } } = state;
79802
79813
  queue.enqueue();
79803
- fs$3.realpath(path$1, (error$2, resolvedPath) => {
79814
+ fs$3.realpath(path$2, (error$2, resolvedPath) => {
79804
79815
  if (error$2) return queue.dequeue(suppressErrors ? null : error$2, state);
79805
79816
  fs$3.stat(resolvedPath, (error$1$1, stat$1) => {
79806
79817
  if (error$1$1) return queue.dequeue(suppressErrors ? null : error$1$1, state);
79807
- if (stat$1.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
79818
+ if (stat$1.isDirectory() && isRecursive(path$2, resolvedPath, state)) return queue.dequeue(null, state);
79808
79819
  callback$1(stat$1, resolvedPath);
79809
79820
  queue.dequeue(null, state);
79810
79821
  });
79811
79822
  });
79812
79823
  };
79813
- const resolveSymlinks = function(path$1, state, callback$1) {
79824
+ const resolveSymlinks = function(path$2, state, callback$1) {
79814
79825
  const { queue, fs: fs$3, options: { suppressErrors } } = state;
79815
79826
  queue.enqueue();
79816
79827
  try {
79817
- const resolvedPath = fs$3.realpathSync(path$1);
79828
+ const resolvedPath = fs$3.realpathSync(path$2);
79818
79829
  const stat$1 = fs$3.statSync(resolvedPath);
79819
- if (stat$1.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
79830
+ if (stat$1.isDirectory() && isRecursive(path$2, resolvedPath, state)) return;
79820
79831
  callback$1(stat$1, resolvedPath);
79821
79832
  } catch (e) {
79822
79833
  if (!suppressErrors) throw e;
@@ -79826,16 +79837,16 @@ function build$2(options, isSynchronous) {
79826
79837
  if (!options.resolveSymlinks || options.excludeSymlinks) return null;
79827
79838
  return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
79828
79839
  }
79829
- function isRecursive(path$1, resolved, state) {
79840
+ function isRecursive(path$2, resolved, state) {
79830
79841
  if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
79831
- let parent = dirname$1(path$1);
79842
+ let parent = dirname$1(path$2);
79832
79843
  let depth$1 = 1;
79833
79844
  while (parent !== state.root && depth$1 < 2) {
79834
79845
  const resolvedPath = state.symlinks.get(parent);
79835
79846
  if (!!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath))) depth$1++;
79836
79847
  else parent = dirname$1(parent);
79837
79848
  }
79838
- state.symlinks.set(path$1, resolved);
79849
+ state.symlinks.set(path$2, resolved);
79839
79850
  return depth$1 > 1;
79840
79851
  }
79841
79852
  function isRecursiveUsingRealPaths(resolved, state) {
@@ -80016,19 +80027,19 @@ var Walker = class {
80016
80027
  const filename = this.joinPath(entry.name, directoryPath);
80017
80028
  this.pushFile(filename, files, this.state.counts, filters);
80018
80029
  } else if (entry.isDirectory()) {
80019
- let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
80020
- if (exclude && exclude(entry.name, path$1)) continue;
80021
- this.pushDirectory(path$1, paths, filters);
80022
- this.walkDirectory(this.state, path$1, path$1, depth$1 - 1, this.walk);
80030
+ let path$2 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
80031
+ if (exclude && exclude(entry.name, path$2)) continue;
80032
+ this.pushDirectory(path$2, paths, filters);
80033
+ this.walkDirectory(this.state, path$2, path$2, depth$1 - 1, this.walk);
80023
80034
  } else if (this.resolveSymlink && entry.isSymbolicLink()) {
80024
- let path$1 = joinPathWithBasePath(entry.name, directoryPath);
80025
- this.resolveSymlink(path$1, this.state, (stat$1, resolvedPath) => {
80035
+ let path$2 = joinPathWithBasePath(entry.name, directoryPath);
80036
+ this.resolveSymlink(path$2, this.state, (stat$1, resolvedPath) => {
80026
80037
  if (stat$1.isDirectory()) {
80027
80038
  resolvedPath = normalizePath$1(resolvedPath, this.state.options);
80028
- if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
80029
- this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth$1 - 1, this.walk);
80039
+ if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$2 + pathSeparator)) return;
80040
+ this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$2 + pathSeparator, depth$1 - 1, this.walk);
80030
80041
  } else {
80031
- resolvedPath = useRealPaths ? resolvedPath : path$1;
80042
+ resolvedPath = useRealPaths ? resolvedPath : path$2;
80032
80043
  const filename = basename$1(resolvedPath);
80033
80044
  const directoryPath$1 = normalizePath$1(dirname$1(resolvedPath), this.state.options);
80034
80045
  resolvedPath = this.joinPath(filename, directoryPath$1);
@@ -80193,7 +80204,7 @@ var Builder = class {
80193
80204
  isMatch = globFn(patterns, ...options);
80194
80205
  this.globCache[patterns.join("\0")] = isMatch;
80195
80206
  }
80196
- this.options.filters.push((path$1) => isMatch(path$1));
80207
+ this.options.filters.push((path$2) => isMatch(path$2));
80197
80208
  return this;
80198
80209
  }
80199
80210
  };
@@ -80407,8 +80418,8 @@ var require_utils = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/pic
80407
80418
  if (state.negated === true) output = `(?:^(?!${output}).*$)`;
80408
80419
  return output;
80409
80420
  };
80410
- exports.basename = (path$1, { windows } = {}) => {
80411
- const segs = path$1.split(windows ? /[\\/]/ : "/");
80421
+ exports.basename = (path$2, { windows } = {}) => {
80422
+ const segs = path$2.split(windows ? /[\\/]/ : "/");
80412
80423
  const last = segs[segs.length - 1];
80413
80424
  if (last === "") return segs[segs.length - 2];
80414
80425
  return last;
@@ -82148,15 +82159,15 @@ function buildRelative(cwd, root) {
82148
82159
  };
82149
82160
  }
82150
82161
  const splitPatternOptions = { parts: true };
82151
- function splitPattern(path$1) {
82162
+ function splitPattern(path$2) {
82152
82163
  var _result$parts;
82153
- const result = import_picomatch.default.scan(path$1, splitPatternOptions);
82154
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
82164
+ const result = import_picomatch.default.scan(path$2, splitPatternOptions);
82165
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$2];
82155
82166
  }
82156
82167
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
82157
82168
  const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
82158
- const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
82159
- const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
82169
+ const escapePosixPath = (path$2) => path$2.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
82170
+ const escapeWin32Path = (path$2) => path$2.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
82160
82171
  /**
82161
82172
  * Escapes a path's special characters depending on the platform.
82162
82173
  * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
@@ -82280,13 +82291,13 @@ function buildCrawler(options, patterns) {
82280
82291
  if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
82281
82292
  const crawler = new Builder({
82282
82293
  filters: [debug$7 ? (p$2, isDirectory$2) => {
82283
- const path$1 = format$4(p$2, isDirectory$2);
82284
- const matches = matcher(path$1) && !ignore$1(path$1);
82285
- if (matches) log(`matched ${path$1}`);
82294
+ const path$2 = format$4(p$2, isDirectory$2);
82295
+ const matches = matcher(path$2) && !ignore$1(path$2);
82296
+ if (matches) log(`matched ${path$2}`);
82286
82297
  return matches;
82287
82298
  } : (p$2, isDirectory$2) => {
82288
- const path$1 = format$4(p$2, isDirectory$2);
82289
- return matcher(path$1) && !ignore$1(path$1);
82299
+ const path$2 = format$4(p$2, isDirectory$2);
82300
+ return matcher(path$2) && !ignore$1(path$2);
82290
82301
  }],
82291
82302
  exclude: debug$7 ? (_, p$2) => {
82292
82303
  const skipped = excludePredicate(_, p$2);
@@ -83542,13 +83553,13 @@ const wslDefaultBrowser = async () => {
83542
83553
  const { stdout: stdout$2 } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
83543
83554
  return stdout$2.trim();
83544
83555
  };
83545
- const convertWslPathToWindows = async (path$1) => {
83546
- if (/^[a-z]+:\/\//i.test(path$1)) return path$1;
83556
+ const convertWslPathToWindows = async (path$2) => {
83557
+ if (/^[a-z]+:\/\//i.test(path$2)) return path$2;
83547
83558
  try {
83548
- const { stdout: stdout$2 } = await execFile$1("wslpath", ["-aw", path$1], { encoding: "utf8" });
83559
+ const { stdout: stdout$2 } = await execFile$1("wslpath", ["-aw", path$2], { encoding: "utf8" });
83549
83560
  return stdout$2.trim();
83550
83561
  } catch {
83551
- return path$1;
83562
+ return path$2;
83552
83563
  }
83553
83564
  };
83554
83565
 
@@ -83734,8 +83745,8 @@ var is_in_ssh_default = isInSsh;
83734
83745
  //#endregion
83735
83746
  //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
83736
83747
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
83737
- const __dirname = import.meta.url ? path2__default.dirname(fileURLToPath(import.meta.url)) : "";
83738
- const localXdgOpenPath = path2__default.join(__dirname, "xdg-open");
83748
+ const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
83749
+ const localXdgOpenPath = path.join(__dirname, "xdg-open");
83739
83750
  const { platform, arch: arch$1 } = process$1;
83740
83751
  const tryEachApp = async (apps$1, opener) => {
83741
83752
  if (apps$1.length === 0) return;