@cloudflare/vite-plugin 1.40.1 → 1.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import assert from "node:assert";
3
3
  import { CoreHeaders, CorePaths, Log, LogLevel, Miniflare, Request as Request$1, Response as Response$1, buildPublicUrl, coupleWebSocket, getDefaultDevRegistryPath, getNodeCompat, getWorkerRegistry, kUnsafeEphemeralUniqueKey, parseModuleFallbackRequest } from "miniflare";
4
4
  import * as wrangler from "wrangler";
5
5
  import * as nodePath from "node:path";
6
- import path, { dirname, isAbsolute, join, relative, resolve } from "node:path";
6
+ import path3, { dirname, isAbsolute, join, relative, resolve } from "node:path";
7
7
  import * as util$1 from "node:util";
8
8
  import { format, inspect, promisify } from "node:util";
9
9
  import * as vite from "vite";
@@ -1505,7 +1505,7 @@ async function assertWranglerVersion() {
1505
1505
  * The default compatibility date to use when the user omits one.
1506
1506
  * This value is injected at build time and remains fixed for each release.
1507
1507
  */
1508
- const DEFAULT_COMPAT_DATE = "2026-06-09";
1508
+ const DEFAULT_COMPAT_DATE = "2026-06-11";
1509
1509
 
1510
1510
  //#endregion
1511
1511
  //#region ../../node_modules/.pnpm/@remix-run+node-fetch-server@0.8.0/node_modules/@remix-run/node-fetch-server/dist/node-fetch-server.js
@@ -3957,7 +3957,7 @@ function resolveWranglerConfigPath({ config, script }, options) {
3957
3957
  deployConfigPath: void 0,
3958
3958
  redirected: false
3959
3959
  };
3960
- return findWranglerConfig$1(script !== void 0 ? path.dirname(script) : process.cwd(), options);
3960
+ return findWranglerConfig$1(script !== void 0 ? path3.dirname(script) : process.cwd(), options);
3961
3961
  }
3962
3962
  __name(resolveWranglerConfigPath, "resolveWranglerConfigPath");
3963
3963
  function findWranglerConfig$1(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
@@ -3988,15 +3988,15 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
3988
3988
  const deployConfigFile = readFileSync$1(deployConfigPath);
3989
3989
  try {
3990
3990
  const deployConfig = parseJSONC(deployConfigFile, deployConfigPath);
3991
- redirectedConfigPath = deployConfig.configPath && path.resolve(path.dirname(deployConfigPath), deployConfig.configPath);
3991
+ redirectedConfigPath = deployConfig.configPath && path3.resolve(path3.dirname(deployConfigPath), deployConfig.configPath);
3992
3992
  } catch (e) {
3993
- throw new UserError(`Failed to parse the deploy configuration file at ${path.relative(".", deployConfigPath)}`, {
3993
+ throw new UserError(`Failed to parse the deploy configuration file at ${path3.relative(".", deployConfigPath)}`, {
3994
3994
  cause: e,
3995
3995
  telemetryMessage: false
3996
3996
  });
3997
3997
  }
3998
3998
  if (!redirectedConfigPath) throw new UserError(esm_default`
3999
- A deploy configuration file was found at "${path.relative(".", deployConfigPath)}".
3999
+ A deploy configuration file was found at "${path3.relative(".", deployConfigPath)}".
4000
4000
  But this is not valid - the required "configPath" property was not found.
4001
4001
  Instead this file contains:
4002
4002
  \`\`\`
@@ -4004,13 +4004,13 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
4004
4004
  \`\`\`
4005
4005
  `, { telemetryMessage: false });
4006
4006
  if (!existsSync(redirectedConfigPath)) throw new UserError(esm_default`
4007
- There is a deploy configuration at "${path.relative(".", deployConfigPath)}".
4008
- But the redirected configuration path it points to, "${path.relative(".", redirectedConfigPath)}", does not exist.
4007
+ There is a deploy configuration at "${path3.relative(".", deployConfigPath)}".
4008
+ But the redirected configuration path it points to, "${path3.relative(".", redirectedConfigPath)}", does not exist.
4009
4009
  `, { telemetryMessage: false });
4010
4010
  if (userConfigPath) {
4011
- if (path.join(path.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError(esm_default`
4012
- Found both a user configuration file at "${path.relative(".", userConfigPath)}"
4013
- and a deploy configuration file at "${path.relative(".", deployConfigPath)}".
4011
+ if (path3.join(path3.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError(esm_default`
4012
+ Found both a user configuration file at "${path3.relative(".", userConfigPath)}"
4013
+ and a deploy configuration file at "${path3.relative(".", deployConfigPath)}".
4014
4014
  But these do not share the same base path so it is not clear which should be used.
4015
4015
  `, { telemetryMessage: false });
4016
4016
  }
@@ -5226,10 +5226,10 @@ var require_util$5 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/un
5226
5226
  if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$36("Invalid URL protocol: the URL must start with `http:` or `https:`.");
5227
5227
  const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
5228
5228
  let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`;
5229
- let path$1 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
5229
+ let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
5230
5230
  if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1);
5231
- if (path$1 && path$1[0] !== "/") path$1 = `/${path$1}`;
5232
- return new URL(`${origin}${path$1}`);
5231
+ if (path && path[0] !== "/") path = `/${path}`;
5232
+ return new URL(`${origin}${path}`);
5233
5233
  }
5234
5234
  if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$36("Invalid URL protocol: the URL must start with `http:` or `https:`.");
5235
5235
  return url;
@@ -6104,8 +6104,8 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
6104
6104
  debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version$2, error.message);
6105
6105
  });
6106
6106
  diagnosticsChannel$1.subscribe("undici:client:sendHeaders", (evt) => {
6107
- const { request: { method, path: path$1, origin } } = evt;
6108
- debugLog("sending request to %s %s%s", method, origin, path$1);
6107
+ const { request: { method, path, origin } } = evt;
6108
+ debugLog("sending request to %s %s%s", method, origin, path);
6109
6109
  });
6110
6110
  }
6111
6111
  let isTrackingRequestEvents = false;
@@ -6117,16 +6117,16 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
6117
6117
  }
6118
6118
  isTrackingRequestEvents = true;
6119
6119
  diagnosticsChannel$1.subscribe("undici:request:headers", (evt) => {
6120
- const { request: { method, path: path$1, origin }, response: { statusCode } } = evt;
6121
- debugLog("received response to %s %s%s - HTTP %d", method, origin, path$1, statusCode);
6120
+ const { request: { method, path, origin }, response: { statusCode } } = evt;
6121
+ debugLog("received response to %s %s%s - HTTP %d", method, origin, path, statusCode);
6122
6122
  });
6123
6123
  diagnosticsChannel$1.subscribe("undici:request:trailers", (evt) => {
6124
- const { request: { method, path: path$1, origin } } = evt;
6125
- debugLog("trailers received from %s %s%s", method, origin, path$1);
6124
+ const { request: { method, path, origin } } = evt;
6125
+ debugLog("trailers received from %s %s%s", method, origin, path);
6126
6126
  });
6127
6127
  diagnosticsChannel$1.subscribe("undici:request:error", (evt) => {
6128
- const { request: { method, path: path$1, origin }, error } = evt;
6129
- debugLog("request to %s %s%s errored - %s", method, origin, path$1, error.message);
6128
+ const { request: { method, path, origin }, error } = evt;
6129
+ debugLog("request to %s %s%s errored - %s", method, origin, path, error.message);
6130
6130
  });
6131
6131
  }
6132
6132
  let isTrackingWebSocketEvents = false;
@@ -6179,10 +6179,10 @@ var require_request$1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
6179
6179
  const invalidPathRegex = /[^\u0021-\u00ff]/;
6180
6180
  const kHandler = Symbol("handler");
6181
6181
  var Request$6 = class {
6182
- constructor(origin, { path: path$1, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
6183
- if (typeof path$1 !== "string") throw new InvalidArgumentError$35("path must be a string");
6184
- else if (path$1[0] !== "/" && !(path$1.startsWith("http://") || path$1.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$35("path must be an absolute URL or start with a slash");
6185
- else if (invalidPathRegex.test(path$1)) throw new InvalidArgumentError$35("invalid request path");
6182
+ constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
6183
+ if (typeof path !== "string") throw new InvalidArgumentError$35("path must be a string");
6184
+ else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$35("path must be an absolute URL or start with a slash");
6185
+ else if (invalidPathRegex.test(path)) throw new InvalidArgumentError$35("invalid request path");
6186
6186
  if (typeof method !== "string") throw new InvalidArgumentError$35("method must be a string");
6187
6187
  else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$2(method)) throw new InvalidArgumentError$35("invalid request method");
6188
6188
  if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$35("upgrade must be a string");
@@ -6223,7 +6223,7 @@ var require_request$1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
6223
6223
  this.completed = false;
6224
6224
  this.aborted = false;
6225
6225
  this.upgrade = upgrade$1 || null;
6226
- this.path = query ? serializePathWithQuery$3(path$1, query) : path$1;
6226
+ this.path = query ? serializePathWithQuery$3(path, query) : path;
6227
6227
  this.origin = origin;
6228
6228
  this.protocol = getProtocolFromUrlString(origin);
6229
6229
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -10706,7 +10706,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
10706
10706
  * @returns
10707
10707
  */
10708
10708
  function writeH1(client, request$2) {
10709
- const { method, path: path$1, host, upgrade: upgrade$1, blocking, reset } = request$2;
10709
+ const { method, path, host, upgrade: upgrade$1, blocking, reset } = request$2;
10710
10710
  let { body, headers, contentLength } = request$2;
10711
10711
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
10712
10712
  if (util$23.isFormDataLike(body)) {
@@ -10751,7 +10751,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
10751
10751
  if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true;
10752
10752
  if (blocking) socket[kBlocking] = true;
10753
10753
  if (socket.setTypeOfService) socket.setTypeOfService(request$2.typeOfService);
10754
- let header = `${method} ${path$1} HTTP/1.1\r\n`;
10754
+ let header = `${method} ${path} HTTP/1.1\r\n`;
10755
10755
  if (typeof host === "string") header += `host: ${host}\r\n`;
10756
10756
  else header += client[kHostHeader$1];
10757
10757
  if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`;
@@ -11287,7 +11287,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11287
11287
  function writeH2(client, request$2) {
11288
11288
  const requestTimeout = request$2.bodyTimeout ?? client[kBodyTimeout$1];
11289
11289
  const session = client[kHTTP2Session];
11290
- const { method, path: path$1, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
11290
+ const { method, path, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
11291
11291
  let { body } = request$2;
11292
11292
  if (upgrade$1 != null && upgrade$1 !== "websocket") {
11293
11293
  util$22.errorRequest(client, request$2, new InvalidArgumentError$30(`Custom upgrade "${upgrade$1}" not supported over HTTP/2`));
@@ -11340,7 +11340,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11340
11340
  }
11341
11341
  headers[HTTP2_HEADER_METHOD] = "CONNECT";
11342
11342
  headers[HTTP2_HEADER_PROTOCOL] = "websocket";
11343
- headers[HTTP2_HEADER_PATH] = path$1;
11343
+ headers[HTTP2_HEADER_PATH] = path;
11344
11344
  if (protocol === "ws:" || protocol === "wss:") headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
11345
11345
  else headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
11346
11346
  stream$2 = session.request(headers, {
@@ -11382,7 +11382,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11382
11382
  stream$2.setTimeout(requestTimeout);
11383
11383
  return true;
11384
11384
  }
11385
- headers[HTTP2_HEADER_PATH] = path$1;
11385
+ headers[HTTP2_HEADER_PATH] = path;
11386
11386
  headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
11387
11387
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
11388
11388
  if (body && typeof body.read === "function") body.read(0);
@@ -13208,8 +13208,8 @@ var require_proxy_agent = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
13208
13208
  }
13209
13209
  if (onHeaders) onHeaders.call(this, statusCode, data$1, resume$1);
13210
13210
  };
13211
- const { origin, path: path$1 = "/", headers = {} } = opts;
13212
- opts.path = origin + path$1;
13211
+ const { origin, path = "/", headers = {} } = opts;
13212
+ opts.path = origin + path;
13213
13213
  if (!("host" in headers) && !("Host" in headers)) {
13214
13214
  const { host } = new URL(origin);
13215
13215
  headers.host = host;
@@ -14993,16 +14993,16 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
14993
14993
  }
14994
14994
  return normalizedQp;
14995
14995
  }
14996
- function safeUrl(path$1) {
14997
- if (typeof path$1 !== "string") return path$1;
14998
- const pathSegments = path$1.split("?", 3);
14999
- if (pathSegments.length !== 2) return path$1;
14996
+ function safeUrl(path) {
14997
+ if (typeof path !== "string") return path;
14998
+ const pathSegments = path.split("?", 3);
14999
+ if (pathSegments.length !== 2) return path;
15000
15000
  const qp = new URLSearchParams(pathSegments.pop());
15001
15001
  qp.sort();
15002
15002
  return [...pathSegments, qp.toString()].join("?");
15003
15003
  }
15004
- function matchKey(mockDispatch$1, { path: path$1, method, body, headers }) {
15005
- const pathMatch = matchValue$1(mockDispatch$1.path, path$1);
15004
+ function matchKey(mockDispatch$1, { path, method, body, headers }) {
15005
+ const pathMatch = matchValue$1(mockDispatch$1.path, path);
15006
15006
  const methodMatch = matchValue$1(mockDispatch$1.method, method);
15007
15007
  const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true;
15008
15008
  const headersMatch = matchHeaders(mockDispatch$1, headers);
@@ -15020,8 +15020,8 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
15020
15020
  const basePath = key.query ? serializePathWithQuery$2(key.path, key.query) : key.path;
15021
15021
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
15022
15022
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
15023
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$1, ignoreTrailingSlash }) => {
15024
- return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$1)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$1), resolvedPath);
15023
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path, ignoreTrailingSlash }) => {
15024
+ return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path), resolvedPath);
15025
15025
  });
15026
15026
  if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
15027
15027
  matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method));
@@ -15064,15 +15064,15 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
15064
15064
  /**
15065
15065
  * @param {string} path Path to remove trailing slash from
15066
15066
  */
15067
- function removeTrailingSlash(path$1) {
15068
- while (path$1.endsWith("/")) path$1 = path$1.slice(0, -1);
15069
- if (path$1.length === 0) path$1 = "/";
15070
- return path$1;
15067
+ function removeTrailingSlash(path) {
15068
+ while (path.endsWith("/")) path = path.slice(0, -1);
15069
+ if (path.length === 0) path = "/";
15070
+ return path;
15071
15071
  }
15072
15072
  function buildKey$1(opts) {
15073
- const { path: path$1, method, body, headers, query } = opts;
15073
+ const { path, method, body, headers, query } = opts;
15074
15074
  return {
15075
- path: path$1,
15075
+ path,
15076
15076
  method,
15077
15077
  body,
15078
15078
  headers,
@@ -15639,10 +15639,10 @@ var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJS$1({ "../
15639
15639
  });
15640
15640
  }
15641
15641
  format(pendingInterceptors) {
15642
- const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$1, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
15642
+ const withPrettyHeaders = pendingInterceptors.map(({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
15643
15643
  Method: method,
15644
15644
  Origin: origin,
15645
- Path: path$1,
15645
+ Path: path,
15646
15646
  "Status code": statusCode,
15647
15647
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
15648
15648
  Invocations: timesInvoked,
@@ -15700,8 +15700,8 @@ var require_mock_agent = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
15700
15700
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
15701
15701
  const dispatchOpts = { ...opts };
15702
15702
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
15703
- const [path$1, searchParams] = dispatchOpts.path.split("?");
15704
- dispatchOpts.path = `${path$1}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
15703
+ const [path, searchParams] = dispatchOpts.path.split("?");
15704
+ dispatchOpts.path = `${path}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
15705
15705
  }
15706
15706
  return this[kAgent].dispatch(dispatchOpts, handler);
15707
15707
  }
@@ -16178,10 +16178,10 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$1({ "../../node_modul
16178
16178
  * @return {Promise<void>} - Resolves when snapshots are loaded
16179
16179
  */
16180
16180
  async loadSnapshots(filePath) {
16181
- const path$1 = filePath || this.#snapshotPath;
16182
- if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
16181
+ const path = filePath || this.#snapshotPath;
16182
+ if (!path) throw new InvalidArgumentError$6("Snapshot path is required");
16183
16183
  try {
16184
- const data$1 = await readFile(resolve$3(path$1), "utf8");
16184
+ const data$1 = await readFile(resolve$3(path), "utf8");
16185
16185
  const parsed = JSON.parse(data$1);
16186
16186
  if (Array.isArray(parsed)) {
16187
16187
  this.#snapshots.clear();
@@ -16189,7 +16189,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$1({ "../../node_modul
16189
16189
  } else this.#snapshots = new Map(Object.entries(parsed));
16190
16190
  } catch (error) {
16191
16191
  if (error.code === "ENOENT") this.#snapshots.clear();
16192
- else throw new UndiciError$1(`Failed to load snapshots from ${path$1}`, { cause: error });
16192
+ else throw new UndiciError$1(`Failed to load snapshots from ${path}`, { cause: error });
16193
16193
  }
16194
16194
  }
16195
16195
  /**
@@ -16199,9 +16199,9 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$1({ "../../node_modul
16199
16199
  * @returns {Promise<void>} - Resolves when snapshots are saved
16200
16200
  */
16201
16201
  async saveSnapshots(filePath) {
16202
- const path$1 = filePath || this.#snapshotPath;
16203
- if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
16204
- const resolvedPath = resolve$3(path$1);
16202
+ const path = filePath || this.#snapshotPath;
16203
+ if (!path) throw new InvalidArgumentError$6("Snapshot path is required");
16204
+ const resolvedPath = resolve$3(path);
16205
16205
  await mkdir(dirname$2(resolvedPath), { recursive: true });
16206
16206
  const data$1 = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
16207
16207
  hash,
@@ -16768,11 +16768,11 @@ var require_redirect_handler = /* @__PURE__ */ __commonJS$1({ "../../node_module
16768
16768
  return;
16769
16769
  }
16770
16770
  const { origin, pathname, search } = util$10.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
16771
- const path$1 = search ? `${pathname}${search}` : pathname;
16772
- const redirectUrlString = `${origin}${path$1}`;
16771
+ const path = search ? `${pathname}${search}` : pathname;
16772
+ const redirectUrlString = `${origin}${path}`;
16773
16773
  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.`);
16774
16774
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
16775
- this.opts.path = path$1;
16775
+ this.opts.path = path;
16776
16776
  this.opts.origin = origin;
16777
16777
  this.opts.query = null;
16778
16778
  }
@@ -21730,10 +21730,10 @@ var require_fetch = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/und
21730
21730
  const url = requestCurrentURL(request$2);
21731
21731
  /** @type {import('../../..').Agent} */
21732
21732
  const agent = fetchParams.controller.dispatcher;
21733
- const path$1 = url.pathname + url.search;
21733
+ const path = url.pathname + url.search;
21734
21734
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
21735
21735
  return new Promise((resolve$4, reject) => agent.dispatch({
21736
- path: hasTrailingQuestionMark ? `${path$1}?` : path$1,
21736
+ path: hasTrailingQuestionMark ? `${path}?` : path,
21737
21737
  origin: url.origin,
21738
21738
  method: request$2.method,
21739
21739
  body: agent.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body,
@@ -22515,9 +22515,9 @@ var require_util$2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/un
22515
22515
  * path-value = <any CHAR except CTLs or ";">
22516
22516
  * @param {string} path
22517
22517
  */
22518
- function validateCookiePath(path$1) {
22519
- for (let i$1 = 0; i$1 < path$1.length; ++i$1) {
22520
- const code = path$1.charCodeAt(i$1);
22518
+ function validateCookiePath(path) {
22519
+ for (let i$1 = 0; i$1 < path.length; ++i$1) {
22520
+ const code = path.charCodeAt(i$1);
22521
22521
  if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path");
22522
22522
  }
22523
22523
  }
@@ -25625,9 +25625,9 @@ var require_undici = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/un
25625
25625
  if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts");
25626
25626
  if (opts && opts.path != null) {
25627
25627
  if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path");
25628
- let path$1 = opts.path;
25629
- if (!opts.path.startsWith("/")) path$1 = `/${path$1}`;
25630
- url = new URL(util$3.parseOrigin(url).origin + path$1);
25628
+ let path = opts.path;
25629
+ if (!opts.path.startsWith("/")) path = `/${path}`;
25630
+ url = new URL(util$3.parseOrigin(url).origin + path);
25631
25631
  } else {
25632
25632
  if (!opts) opts = typeof url === "object" ? url : {};
25633
25633
  url = util$3.parseURL(url);
@@ -30929,11 +30929,18 @@ __export(mod_esm_exports, { default: () => mod_esm_default });
30929
30929
  var import_mod_cjs = __toESM(require_mod_cjs3(), 1);
30930
30930
  __reExport(mod_esm_exports, __toESM(require_mod_cjs3(), 1));
30931
30931
  var mod_esm_default = import_mod_cjs.default;
30932
+ function getGlobalConfigPath({ appName = "wrangler", leadingDot = true, useLegacyHomeDir = true } = {}) {
30933
+ const dirName = `${leadingDot ? "." : ""}${appName}`;
30934
+ const configDir = mod_esm_default(dirName).config();
30935
+ if (useLegacyHomeDir) {
30936
+ const legacyConfigDir = path3.join(os.homedir(), dirName);
30937
+ if (isDirectory(legacyConfigDir)) return legacyConfigDir;
30938
+ }
30939
+ return configDir;
30940
+ }
30941
+ __name(getGlobalConfigPath, "getGlobalConfigPath");
30932
30942
  function getGlobalWranglerConfigPath() {
30933
- const configDir = mod_esm_default(".wrangler").config();
30934
- const legacyConfigDir = path.join(os.homedir(), ".wrangler");
30935
- if (isDirectory(legacyConfigDir)) return legacyConfigDir;
30936
- else return configDir;
30943
+ return getGlobalConfigPath();
30937
30944
  }
30938
30945
  __name(getGlobalWranglerConfigPath, "getGlobalWranglerConfigPath");
30939
30946
  function getBooleanEnvironmentVariableFactory(options) {
@@ -31031,7 +31038,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({ variableName: "WRA
31031
31038
  var getRegistryPath = getEnvironmentVariableFactory({
31032
31039
  variableName: "WRANGLER_REGISTRY_PATH",
31033
31040
  defaultValue() {
31034
- return path.join(getGlobalWranglerConfigPath(), "registry");
31041
+ return path3.join(getGlobalWranglerConfigPath(), "registry");
31035
31042
  }
31036
31043
  });
31037
31044
  var getD1ExtraLocationChoices = getEnvironmentVariableFactory({ variableName: "WRANGLER_D1_EXTRA_LOCATION_CHOICES" });
@@ -31447,7 +31454,7 @@ function isPagesConfig(rawConfig) {
31447
31454
  }
31448
31455
  __name(isPagesConfig, "isPagesConfig");
31449
31456
  function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
31450
- const diagnostics = new Diagnostics(`Processing ${configPath ? path.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
31457
+ const diagnostics = new Diagnostics(`Processing ${configPath ? path3.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
31451
31458
  validateOptionalProperty(diagnostics, "", "legacy_env", rawConfig.legacy_env, "boolean");
31452
31459
  validateOptionalProperty(diagnostics, "", "send_metrics", rawConfig.send_metrics, "boolean");
31453
31460
  validateOptionalProperty(diagnostics, "", "keep_vars", rawConfig.keep_vars, "boolean");
@@ -31551,34 +31558,34 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
31551
31558
  else validateOptionalProperty(diagnostics, "build", "watch_dir", watch_dir, "string");
31552
31559
  return {
31553
31560
  command,
31554
- watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir) => path.relative(process.cwd(), path.join(path.dirname(configPath), `${dir}`))) : path.relative(process.cwd(), path.join(path.dirname(configPath), `${watch_dir}`)) : watch_dir,
31561
+ watch_dir: command && configPath ? Array.isArray(watch_dir) ? watch_dir.map((dir) => path3.relative(process.cwd(), path3.join(path3.dirname(configPath), `${dir}`))) : path3.relative(process.cwd(), path3.join(path3.dirname(configPath), `${watch_dir}`)) : watch_dir,
31555
31562
  cwd
31556
31563
  };
31557
31564
  }
31558
31565
  __name(normalizeAndValidateBuild, "normalizeAndValidateBuild");
31559
31566
  function normalizeAndValidateMainField(configPath, rawMain) {
31560
- const configDir = path.dirname(configPath ?? "wrangler.toml");
31567
+ const configDir = path3.dirname(configPath ?? "wrangler.toml");
31561
31568
  if (rawMain !== void 0) if (typeof rawMain === "string") {
31562
- const directory = path.resolve(configDir);
31563
- return path.resolve(directory, rawMain);
31569
+ const directory = path3.resolve(configDir);
31570
+ return path3.resolve(directory, rawMain);
31564
31571
  } else return rawMain;
31565
31572
  else return;
31566
31573
  }
31567
31574
  __name(normalizeAndValidateMainField, "normalizeAndValidateMainField");
31568
31575
  function normalizeAndValidateBaseDirField(configPath, rawDir) {
31569
- const configDir = path.dirname(configPath ?? "wrangler.toml");
31576
+ const configDir = path3.dirname(configPath ?? "wrangler.toml");
31570
31577
  if (rawDir !== void 0) if (typeof rawDir === "string") {
31571
- const directory = path.resolve(configDir);
31572
- return path.resolve(directory, rawDir);
31578
+ const directory = path3.resolve(configDir);
31579
+ return path3.resolve(directory, rawDir);
31573
31580
  } else return rawDir;
31574
31581
  else return;
31575
31582
  }
31576
31583
  __name(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
31577
31584
  function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
31578
- const configDir = path.dirname(configPath ?? "wrangler.toml");
31585
+ const configDir = path3.dirname(configPath ?? "wrangler.toml");
31579
31586
  if (rawPagesDir !== void 0) if (typeof rawPagesDir === "string") {
31580
- const directory = path.resolve(configDir);
31581
- return path.resolve(directory, rawPagesDir);
31587
+ const directory = path3.resolve(configDir);
31588
+ return path3.resolve(directory, rawPagesDir);
31582
31589
  } else return rawPagesDir;
31583
31590
  else return;
31584
31591
  }
@@ -31631,7 +31638,7 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
31631
31638
  validateOptionalProperty(diagnostics, "site", "entry-point", rawConfig.site["entry-point"], "string");
31632
31639
  deprecated(diagnostics, rawConfig, `site.entry-point`, `Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
31633
31640
  \`\`\`
31634
- main = "${path.join(String(rawConfig.site["entry-point"]) || "workers-site", path.extname(String(rawConfig.site["entry-point"]) || "workers-site") ? "" : "index.js")}"
31641
+ main = "${path3.join(String(rawConfig.site["entry-point"]) || "workers-site", path3.extname(String(rawConfig.site["entry-point"]) || "workers-site") ? "" : "index.js")}"
31635
31642
  \`\`\``, false, void 0, "warning");
31636
31643
  let siteEntryPoint = rawConfig.site["entry-point"];
31637
31644
  if (!mainEntryPoint && !siteEntryPoint) {
@@ -31644,7 +31651,7 @@ main = "workers-site/index.js"
31644
31651
  } else if (mainEntryPoint && siteEntryPoint) diagnostics.errors.push(`Don't define both the \`main\` and \`site.entry-point\` fields in your configuration.
31645
31652
  They serve the same purpose: to point to the entry-point of your worker.
31646
31653
  Delete the deprecated \`site.entry-point\` field from your config.`);
31647
- if (configPath && siteEntryPoint) siteEntryPoint = path.relative(process.cwd(), path.join(path.dirname(configPath), siteEntryPoint));
31654
+ if (configPath && siteEntryPoint) siteEntryPoint = path3.relative(process.cwd(), path3.join(path3.dirname(configPath), siteEntryPoint));
31648
31655
  return {
31649
31656
  bucket,
31650
31657
  "entry-point": siteEntryPoint,
@@ -31676,7 +31683,7 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
31676
31683
  if (rawMapping === void 0) return;
31677
31684
  const mapping = {};
31678
31685
  for (const [name, filePath] of Object.entries(rawMapping)) if (isString$2(diagnostics, `${field}['${name}']`, filePath, void 0)) {
31679
- if (configPath) mapping[name] = configPath ? path.relative(process.cwd(), path.join(path.dirname(configPath), filePath)) : filePath;
31686
+ if (configPath) mapping[name] = configPath ? path3.relative(process.cwd(), path3.join(path3.dirname(configPath), filePath)) : filePath;
31680
31687
  }
31681
31688
  return mapping;
31682
31689
  }
@@ -31934,7 +31941,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
31934
31941
  __name(normalizeAndValidateEnvironment, "normalizeAndValidateEnvironment");
31935
31942
  function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPath) {
31936
31943
  const tsconfig = inheritable(diagnostics, topLevelEnv, rawEnv, "tsconfig", isString$2, void 0);
31937
- return configPath && tsconfig ? path.relative(process.cwd(), path.join(path.dirname(configPath), tsconfig)) : tsconfig;
31944
+ return configPath && tsconfig ? path3.relative(process.cwd(), path3.join(path3.dirname(configPath), tsconfig)) : tsconfig;
31938
31945
  }
31939
31946
  __name(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
31940
31947
  var validateAndNormalizeRules = /* @__PURE__ */ __name((diagnostics, topLevelEnv, rawEnv, envName) => {
@@ -32434,9 +32441,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
32434
32441
  let resolvedBuildContextPath = void 0;
32435
32442
  try {
32436
32443
  if (isDockerfile(resolvedImage, configPath)) {
32437
- const baseDir = configPath ? path.dirname(configPath) : process.cwd();
32438
- resolvedImage = path.resolve(baseDir, resolvedImage);
32439
- resolvedBuildContextPath = containerAppOptional.image_build_context ? path.resolve(baseDir, containerAppOptional.image_build_context) : path.dirname(resolvedImage);
32444
+ const baseDir = configPath ? path3.dirname(configPath) : process.cwd();
32445
+ resolvedImage = path3.resolve(baseDir, resolvedImage);
32446
+ resolvedBuildContextPath = containerAppOptional.image_build_context ? path3.resolve(baseDir, containerAppOptional.image_build_context) : path3.dirname(resolvedImage);
32440
32447
  }
32441
32448
  } catch (err) {
32442
32449
  if (err instanceof Error && err.message) diagnostics.errors.push(err.message);
@@ -33608,8 +33615,8 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
33608
33615
  }
33609
33616
  __name(isRemoteValid, "isRemoteValid");
33610
33617
  function isDockerfile(imagePath, configPath) {
33611
- const baseDir = configPath ? path.dirname(configPath) : process.cwd();
33612
- const maybeDockerfile = path.resolve(baseDir, imagePath);
33618
+ const baseDir = configPath ? path3.dirname(configPath) : process.cwd();
33619
+ const maybeDockerfile = path3.resolve(baseDir, imagePath);
33613
33620
  if (fs2.existsSync(maybeDockerfile)) {
33614
33621
  if (isDirectory(maybeDockerfile)) throw new UserError(`${imagePath} is a directory, you should specify a path to the Dockerfile`, { telemetryMessage: false });
33615
33622
  return true;
@@ -33761,7 +33768,7 @@ __name(validateDurableObjectBinding2, "validateDurableObjectBinding");
33761
33768
  var import_signal_exit = __toESM(require_signal_exit());
33762
33769
  function getWranglerHiddenDirPath(projectRoot) {
33763
33770
  projectRoot ??= process.cwd();
33764
- return path.join(projectRoot, ".wrangler");
33771
+ return path3.join(projectRoot, ".wrangler");
33765
33772
  }
33766
33773
  __name(getWranglerHiddenDirPath, "getWranglerHiddenDirPath");
33767
33774
  var STALE_WRANGLER_TMP_DIR_MS = 1440 * 60 * 1e3;
@@ -33778,7 +33785,7 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
33778
33785
  const cutoff = Date.now() - STALE_WRANGLER_TMP_DIR_MS;
33779
33786
  for (const entry of entries) {
33780
33787
  if (!entry.isDirectory()) continue;
33781
- const entryPath = path.join(tmpRoot, entry.name);
33788
+ const entryPath = path3.join(tmpRoot, entry.name);
33782
33789
  try {
33783
33790
  if (fs2.statSync(entryPath).mtimeMs < cutoff) removeDirSync(entryPath);
33784
33791
  } catch {}
@@ -33786,10 +33793,10 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
33786
33793
  }
33787
33794
  __name(sweepStaleWranglerTmpDirs, "sweepStaleWranglerTmpDirs");
33788
33795
  function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
33789
- const tmpRoot = path.join(getWranglerHiddenDirPath(projectRoot), "tmp");
33796
+ const tmpRoot = path3.join(getWranglerHiddenDirPath(projectRoot), "tmp");
33790
33797
  fs2.mkdirSync(tmpRoot, { recursive: true });
33791
33798
  sweepStaleWranglerTmpDirs(tmpRoot);
33792
- const tmpPrefix = path.join(tmpRoot, `${prefix}-`);
33799
+ const tmpPrefix = path3.join(tmpRoot, `${prefix}-`);
33793
33800
  const tmpDir = fs2.realpathSync(fs2.mkdtempSync(tmpPrefix));
33794
33801
  const cleanupDir = /* @__PURE__ */ __name(() => {
33795
33802
  if (cleanup) try {
@@ -34396,7 +34403,7 @@ __name(maybeThrowFriendlyError, "maybeThrowFriendlyError");
34396
34403
  function logHeaders(headers, logger) {
34397
34404
  const clone = cloneHeaders(headers);
34398
34405
  clone.delete("Authorization");
34399
- logger.debugWithSanitization("HEADERS:", JSON.stringify(Object.fromEntries(clone), null, 2));
34406
+ logger.debugWithSanitization?.("HEADERS:", JSON.stringify(Object.fromEntries(clone), null, 2));
34400
34407
  }
34401
34408
  __name(logHeaders, "logHeaders");
34402
34409
  async function performApiFetchBase(complianceConfig, resource, init = {}, userAgent, logger, queryParams, abortSignal, credentials) {
@@ -34409,10 +34416,10 @@ async function performApiFetchBase(complianceConfig, resource, init = {}, userAg
34409
34416
  maybeAddTraceHeader(headers);
34410
34417
  const queryString = queryParams ? `?${queryParams.toString()}` : "";
34411
34418
  logger.debug(`-- START CF API REQUEST: ${method} ${getCloudflareApiBaseUrl(complianceConfig)}${resource}`);
34412
- logger.debugWithSanitization("QUERY STRING:", queryString);
34419
+ logger.debugWithSanitization?.("QUERY STRING:", queryString);
34413
34420
  logHeaders(headers, logger);
34414
- logger.debugWithSanitization("INIT:", JSON.stringify({ ...init }, null, 2));
34415
- if (init.body instanceof import_undici.FormData) logger.debugWithSanitization("BODY:", await new import_undici.Response(init.body).text(), null, 2);
34421
+ logger.debugWithSanitization?.("INIT:", JSON.stringify({ ...init }, null, 2));
34422
+ if (init.body instanceof import_undici.FormData) logger.debugWithSanitization?.("BODY:", await new import_undici.Response(init.body).text(), null, 2);
34416
34423
  logger.debug("-- END CF API REQUEST");
34417
34424
  return await (0, import_undici.fetch)(`${getCloudflareApiBaseUrl(complianceConfig)}${resource}${queryString}`, {
34418
34425
  method,
@@ -34428,7 +34435,7 @@ async function fetchInternalBase(complianceConfig, resource, init = {}, userAgen
34428
34435
  const jsonText = await response.text();
34429
34436
  logger.debug("-- START CF API RESPONSE:", response.statusText, response.status);
34430
34437
  logHeaders(response.headers, logger);
34431
- logger.debugWithSanitization("RESPONSE:", jsonText);
34438
+ logger.debugWithSanitization?.("RESPONSE:", jsonText);
34432
34439
  logger.debug("-- END CF API RESPONSE");
34433
34440
  if (!jsonText && (response.status === 204 || response.status === 205)) return {
34434
34441
  response: {
@@ -34592,6 +34599,22 @@ function throwWAFBlockError(headers, method, resource, status, statusText) {
34592
34599
  });
34593
34600
  }
34594
34601
  __name(throwWAFBlockError, "throwWAFBlockError");
34602
+ async function fetchKVGetValueBase(complianceConfig, accountId, namespaceId, key, userAgent, logger, credentials) {
34603
+ const headers = new import_undici.Headers();
34604
+ addAuthorizationHeader(headers, credentials);
34605
+ headers.set("User-Agent", userAgent);
34606
+ maybeAddTraceHeader(headers);
34607
+ const resource = `${getCloudflareApiBaseUrl(complianceConfig)}/accounts/${accountId}/storage/kv/namespaces/${namespaceId}/values/${key}`;
34608
+ logger.debug(`-- START CF API REQUEST: GET ${resource}`);
34609
+ logger.debug("-- END CF API REQUEST");
34610
+ const response = await (0, import_undici.fetch)(resource, {
34611
+ method: "GET",
34612
+ headers
34613
+ });
34614
+ if (response.ok) return await response.arrayBuffer();
34615
+ else throw new Error(`Failed to fetch ${resource} - ${response.status}: ${response.statusText}`);
34616
+ }
34617
+ __name(fetchKVGetValueBase, "fetchKVGetValueBase");
34595
34618
  function hasCursor(result_info) {
34596
34619
  const cursor = result_info?.cursor;
34597
34620
  return cursor !== void 0 && cursor !== null && cursor !== "";
@@ -36903,8 +36926,8 @@ const postfixRE = /[?#].*$/;
36903
36926
  function cleanUrl(url) {
36904
36927
  return url.replace(postfixRE, "");
36905
36928
  }
36906
- function withTrailingSlash(path$1) {
36907
- return path$1.endsWith("/") ? path$1 : `${path$1}/`;
36929
+ function withTrailingSlash(path) {
36930
+ return path.endsWith("/") ? path : `${path}/`;
36908
36931
  }
36909
36932
  function createRequestHandler(handler) {
36910
36933
  return async (req, res, next) => {
@@ -42406,15 +42429,15 @@ function hasTrailingSlash(input = "", respectQueryAndFragment) {
42406
42429
  function withTrailingSlash$1(input = "", respectQueryAndFragment) {
42407
42430
  if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
42408
42431
  if (hasTrailingSlash(input, true)) return input || "/";
42409
- let path$1 = input;
42432
+ let path = input;
42410
42433
  let fragment = "";
42411
42434
  const fragmentIndex = input.indexOf("#");
42412
42435
  if (fragmentIndex >= 0) {
42413
- path$1 = input.slice(0, fragmentIndex);
42436
+ path = input.slice(0, fragmentIndex);
42414
42437
  fragment = input.slice(fragmentIndex);
42415
- if (!path$1) return fragment;
42438
+ if (!path) return fragment;
42416
42439
  }
42417
- const [s0, ...s] = path$1.split("?");
42440
+ const [s0, ...s] = path.split("?");
42418
42441
  return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
42419
42442
  }
42420
42443
  function isNonEmptyURL(url) {
@@ -42440,8 +42463,8 @@ const isAbsolute$2 = function(p$1) {
42440
42463
  //#endregion
42441
42464
  //#region ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
42442
42465
  const BUILTIN_MODULES = new Set(builtinModules);
42443
- function normalizeSlash(path$1) {
42444
- return path$1.replace(/\\/g, "/");
42466
+ function normalizeSlash(path) {
42467
+ return path.replace(/\\/g, "/");
42445
42468
  }
42446
42469
  /**
42447
42470
  * @typedef ErrnoExceptionFields
@@ -42561,8 +42584,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
42561
42584
  * @param {string} [base]
42562
42585
  * @param {string} [message]
42563
42586
  */
42564
- (path$1, base, message) => {
42565
- return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
42587
+ (path, base, message) => {
42588
+ return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
42566
42589
  },
42567
42590
  Error
42568
42591
  );
@@ -42592,8 +42615,8 @@ codes.ERR_MODULE_NOT_FOUND = createError(
42592
42615
  * @param {string} base
42593
42616
  * @param {boolean} [exactUrl]
42594
42617
  */
42595
- (path$1, base, exactUrl = false) => {
42596
- return `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`;
42618
+ (path, base, exactUrl = false) => {
42619
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
42597
42620
  },
42598
42621
  Error
42599
42622
  );
@@ -42631,8 +42654,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
42631
42654
  * @param {string} extension
42632
42655
  * @param {string} path
42633
42656
  */
42634
- (extension, path$1) => {
42635
- return `Unknown file extension "${extension}" for ${path$1}`;
42657
+ (extension, path) => {
42658
+ return `Unknown file extension "${extension}" for ${path}`;
42636
42659
  },
42637
42660
  TypeError
42638
42661
  );
@@ -42789,7 +42812,7 @@ function read(jsonPath, { base, specifier }) {
42789
42812
  /** @type {string | undefined} */
42790
42813
  let string;
42791
42814
  try {
42792
- string = fs2.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
42815
+ string = fs2.readFileSync(path3.toNamespacedPath(jsonPath), "utf8");
42793
42816
  } catch (error) {
42794
42817
  const exception = error;
42795
42818
  if (exception.code !== "ENOENT") throw exception;
@@ -42995,15 +43018,15 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
42995
43018
  const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
42996
43019
  const basePath = fileURLToPath(base);
42997
43020
  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");
42998
- 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");
43021
+ else if (path3.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");
42999
43022
  }
43000
43023
  /**
43001
43024
  * @param {string} path
43002
43025
  * @returns {Stats | undefined}
43003
43026
  */
43004
- function tryStatSync(path$1) {
43027
+ function tryStatSync(path) {
43005
43028
  try {
43006
- return statSync(path$1);
43029
+ return statSync(path);
43007
43030
  } catch {}
43008
43031
  }
43009
43032
  /**
@@ -43102,7 +43125,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
43102
43125
  {
43103
43126
  const real = realpathSync(filePath);
43104
43127
  const { search, hash } = resolved;
43105
- resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? "/" : ""));
43128
+ resolved = pathToFileURL(real + (filePath.endsWith(path3.sep) ? "/" : ""));
43106
43129
  resolved.search = search;
43107
43130
  resolved.hash = hash;
43108
43131
  }
@@ -45590,9 +45613,9 @@ function constructHeaders({ headers, headersFile, logger }) {
45590
45613
 
45591
45614
  //#endregion
45592
45615
  //#region ../workers-shared/utils/configuration/validateURL.ts
45593
- const extractPathname = (path$1 = "/", includeSearch, includeHash) => {
45594
- if (!path$1.startsWith("/")) path$1 = `/${path$1}`;
45595
- const url = new URL(`//${path$1}`, "relative://");
45616
+ const extractPathname = (path = "/", includeSearch, includeHash) => {
45617
+ if (!path.startsWith("/")) path = `/${path}`;
45618
+ const url = new URL(`//${path}`, "relative://");
45596
45619
  return `${url.pathname}${includeSearch ? url.search : ""}${includeHash ? url.hash : ""}`;
45597
45620
  };
45598
45621
  const URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
@@ -45651,7 +45674,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
45651
45674
  lineNumber: i$1 + 1,
45652
45675
  message: "No headers specified"
45653
45676
  });
45654
- const [path$1, pathError] = validateUrl(line, false, true);
45677
+ const [path, pathError] = validateUrl(line, false, true);
45655
45678
  if (pathError) {
45656
45679
  invalid.push({
45657
45680
  line,
@@ -45662,7 +45685,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
45662
45685
  skipUntilNextPath = true;
45663
45686
  continue;
45664
45687
  }
45665
- const wildcardError = validateNoMultipleWildcards(path$1);
45688
+ const wildcardError = validateNoMultipleWildcards(path);
45666
45689
  if (wildcardError) {
45667
45690
  invalid.push({
45668
45691
  line,
@@ -45674,7 +45697,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
45674
45697
  continue;
45675
45698
  }
45676
45699
  rule = {
45677
- path: path$1,
45700
+ path,
45678
45701
  line,
45679
45702
  headers: {},
45680
45703
  unsetHeaders: []
@@ -45757,11 +45780,11 @@ function isValidRule(rule) {
45757
45780
  * `:splat` placeholder, would result in duplicate `:splat` parameters which is
45758
45781
  * unsupported.
45759
45782
  */
45760
- function validateNoMultipleWildcards(path$1) {
45761
- const wildcardCount = (path$1.match(SPLAT_REGEX) ?? []).length;
45762
- const hasSplatPlaceholder = /:splat(?!\w)/.test(path$1);
45763
- if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path$1}.`;
45764
- if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path$1}.`;
45783
+ function validateNoMultipleWildcards(path) {
45784
+ const wildcardCount = (path.match(SPLAT_REGEX) ?? []).length;
45785
+ const hasSplatPlaceholder = /:splat(?!\w)/.test(path);
45786
+ if (wildcardCount > 1) return `Only one wildcard is allowed per rule. Use a named placeholder (e.g. :project) instead. Skipping ${path}.`;
45787
+ if (wildcardCount > 0 && hasSplatPlaceholder) return `Cannot combine a wildcard * with a :splat placeholder because wildcards are converted to :splat at runtime. Skipping ${path}.`;
45765
45788
  }
45766
45789
 
45767
45790
  //#endregion
@@ -45978,13 +46001,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
45978
46001
  const throwError = (message, Ctor) => {
45979
46002
  throw new Ctor(message);
45980
46003
  };
45981
- const checkPath = (path$1, originalPath, doThrow) => {
45982
- if (!isString$1(path$1)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
45983
- if (!path$1) return doThrow(`path must not be empty`, TypeError);
45984
- if (checkPath.isNotRelative(path$1)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
46004
+ const checkPath = (path, originalPath, doThrow) => {
46005
+ if (!isString$1(path)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
46006
+ if (!path) return doThrow(`path must not be empty`, TypeError);
46007
+ if (checkPath.isNotRelative(path)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
45985
46008
  return true;
45986
46009
  };
45987
- const isNotRelative = (path$1) => REGEX_TEST_INVALID_PATH.test(path$1);
46010
+ const isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
45988
46011
  checkPath.isNotRelative = isNotRelative;
45989
46012
  checkPath.convert = (p$1) => p$1;
45990
46013
  var Ignore = class {
@@ -46020,13 +46043,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
46020
46043
  addPattern(pattern) {
46021
46044
  return this.add(pattern);
46022
46045
  }
46023
- _testOne(path$1, checkUnignored) {
46046
+ _testOne(path, checkUnignored) {
46024
46047
  let ignored = false;
46025
46048
  let unignored = false;
46026
46049
  this._rules.forEach((rule) => {
46027
46050
  const { negative } = rule;
46028
46051
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
46029
- if (rule.regex.test(path$1)) {
46052
+ if (rule.regex.test(path)) {
46030
46053
  ignored = !negative;
46031
46054
  unignored = negative;
46032
46055
  }
@@ -46037,33 +46060,33 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
46037
46060
  };
46038
46061
  }
46039
46062
  _test(originalPath, cache$2, checkUnignored, slices) {
46040
- const path$1 = originalPath && checkPath.convert(originalPath);
46041
- checkPath(path$1, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
46042
- return this._t(path$1, cache$2, checkUnignored, slices);
46063
+ const path = originalPath && checkPath.convert(originalPath);
46064
+ checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
46065
+ return this._t(path, cache$2, checkUnignored, slices);
46043
46066
  }
46044
- _t(path$1, cache$2, checkUnignored, slices) {
46045
- if (path$1 in cache$2) return cache$2[path$1];
46046
- if (!slices) slices = path$1.split(SLASH);
46067
+ _t(path, cache$2, checkUnignored, slices) {
46068
+ if (path in cache$2) return cache$2[path];
46069
+ if (!slices) slices = path.split(SLASH);
46047
46070
  slices.pop();
46048
- if (!slices.length) return cache$2[path$1] = this._testOne(path$1, checkUnignored);
46071
+ if (!slices.length) return cache$2[path] = this._testOne(path, checkUnignored);
46049
46072
  const parent = this._t(slices.join(SLASH) + SLASH, cache$2, checkUnignored, slices);
46050
- return cache$2[path$1] = parent.ignored ? parent : this._testOne(path$1, checkUnignored);
46073
+ return cache$2[path] = parent.ignored ? parent : this._testOne(path, checkUnignored);
46051
46074
  }
46052
- ignores(path$1) {
46053
- return this._test(path$1, this._ignoreCache, false).ignored;
46075
+ ignores(path) {
46076
+ return this._test(path, this._ignoreCache, false).ignored;
46054
46077
  }
46055
46078
  createFilter() {
46056
- return (path$1) => !this.ignores(path$1);
46079
+ return (path) => !this.ignores(path);
46057
46080
  }
46058
46081
  filter(paths) {
46059
46082
  return makeArray(paths).filter(this.createFilter());
46060
46083
  }
46061
- test(path$1) {
46062
- return this._test(path$1, this._testCache, true);
46084
+ test(path) {
46085
+ return this._test(path, this._testCache, true);
46063
46086
  }
46064
46087
  };
46065
46088
  const factory = (options) => new Ignore(options);
46066
- const isPathValid = (path$1) => checkPath(path$1 && checkPath.convert(path$1), path$1, RETURN_FALSE);
46089
+ const isPathValid = (path) => checkPath(path && checkPath.convert(path), path, RETURN_FALSE);
46067
46090
  factory.isPathValid = isPathValid;
46068
46091
  factory.default = factory;
46069
46092
  module.exports = factory;
@@ -46072,7 +46095,7 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
46072
46095
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
46073
46096
  checkPath.convert = makePosix;
46074
46097
  const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
46075
- checkPath.isNotRelative = (path$1) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path$1) || isNotRelative(path$1);
46098
+ checkPath.isNotRelative = (path) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path);
46076
46099
  }
46077
46100
  }) });
46078
46101
 
@@ -47427,11 +47450,11 @@ var Mime = class {
47427
47450
  }
47428
47451
  return this;
47429
47452
  }
47430
- getType(path$1) {
47431
- if (typeof path$1 !== "string") return null;
47432
- const last = path$1.replace(/^.*[/\\]/s, "").toLowerCase();
47453
+ getType(path) {
47454
+ if (typeof path !== "string") return null;
47455
+ const last = path.replace(/^.*[/\\]/s, "").toLowerCase();
47433
47456
  const ext = last.replace(/^.*\./s, "").toLowerCase();
47434
- const hasPath = last.length < path$1.length;
47457
+ const hasPath = last.length < path.length;
47435
47458
  if (!(ext.length < last.length - 1) && hasPath) return null;
47436
47459
  return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
47437
47460
  }
@@ -47765,8 +47788,8 @@ function getErrorMap() {
47765
47788
  //#endregion
47766
47789
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
47767
47790
  const makeIssue = (params) => {
47768
- const { data: data$1, path: path$1, errorMaps, issueData } = params;
47769
- const fullPath = [...path$1, ...issueData.path || []];
47791
+ const { data: data$1, path, errorMaps, issueData } = params;
47792
+ const fullPath = [...path, ...issueData.path || []];
47770
47793
  const fullIssue = {
47771
47794
  ...issueData,
47772
47795
  path: fullPath
@@ -47878,11 +47901,11 @@ var errorUtil;
47878
47901
  //#endregion
47879
47902
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
47880
47903
  var ParseInputLazyPath = class {
47881
- constructor(parent, value, path$1, key) {
47904
+ constructor(parent, value, path, key) {
47882
47905
  this._cachedPath = [];
47883
47906
  this.parent = parent;
47884
47907
  this.data = value;
47885
- this._path = path$1;
47908
+ this._path = path;
47886
47909
  this._key = key;
47887
47910
  }
47888
47911
  get path() {
@@ -51936,11 +51959,11 @@ const getQueryString = (params) => {
51936
51959
  };
51937
51960
  const getUrl = (config, options) => {
51938
51961
  const encoder$1 = config.ENCODE_PATH || encodeURI;
51939
- const path$1 = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
51962
+ const path = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
51940
51963
  if (options.path?.hasOwnProperty(group)) return encoder$1(String(options.path[group]));
51941
51964
  return substring;
51942
51965
  });
51943
- const url = `${config.BASE}${path$1}`;
51966
+ const url = `${config.BASE}${path}`;
51944
51967
  if (options.query) return `${url}${getQueryString(options.query)}`;
51945
51968
  return url;
51946
51969
  };
@@ -52992,7 +53015,7 @@ function getContainerOptions(options) {
52992
53015
  return containersConfig.map((container) => {
52993
53016
  if (isDockerfile(container.image, configPath)) return {
52994
53017
  dockerfile: container.image,
52995
- image_build_context: container.image_build_context ?? path.dirname(container.image),
53018
+ image_build_context: container.image_build_context ?? path3.dirname(container.image),
52996
53019
  image_vars: container.image_vars,
52997
53020
  class_name: container.class_name,
52998
53021
  image_tag: getDevContainerImageName(container.class_name, containerBuildId)
@@ -53008,26 +53031,26 @@ function getContainerOptions(options) {
53008
53031
  //#endregion
53009
53032
  //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs
53010
53033
  var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
53011
- function cleanPath(path$1) {
53012
- let normalized = normalize(path$1);
53034
+ function cleanPath(path) {
53035
+ let normalized = normalize(path);
53013
53036
  if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
53014
53037
  return normalized;
53015
53038
  }
53016
53039
  const SLASHES_REGEX = /[\\/]/g;
53017
- function convertSlashes(path$1, separator) {
53018
- return path$1.replace(SLASHES_REGEX, separator);
53040
+ function convertSlashes(path, separator) {
53041
+ return path.replace(SLASHES_REGEX, separator);
53019
53042
  }
53020
53043
  const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
53021
- function isRootDirectory(path$1) {
53022
- return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
53044
+ function isRootDirectory(path) {
53045
+ return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
53023
53046
  }
53024
- function normalizePath$1(path$1, options) {
53047
+ function normalizePath$1(path, options) {
53025
53048
  const { resolvePaths, normalizePath: normalizePath$1$1, pathSeparator } = options;
53026
- const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
53027
- if (resolvePaths) path$1 = resolve$1(path$1);
53028
- if (normalizePath$1$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
53029
- if (path$1 === ".") return "";
53030
- return convertSlashes(path$1[path$1.length - 1] !== pathSeparator ? path$1 + pathSeparator : path$1, pathSeparator);
53049
+ const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
53050
+ if (resolvePaths) path = resolve$1(path);
53051
+ if (normalizePath$1$1 || pathNeedsCleaning) path = cleanPath(path);
53052
+ if (path === ".") return "";
53053
+ return convertSlashes(path[path.length - 1] !== pathSeparator ? path + pathSeparator : path, pathSeparator);
53031
53054
  }
53032
53055
  function joinPathWithBasePath(filename, directoryPath) {
53033
53056
  return directoryPath + filename;
@@ -53063,8 +53086,8 @@ const pushDirectory = (directoryPath, paths) => {
53063
53086
  paths.push(directoryPath || ".");
53064
53087
  };
53065
53088
  const pushDirectoryFilter = (directoryPath, paths, filters) => {
53066
- const path$1 = directoryPath || ".";
53067
- if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
53089
+ const path = directoryPath || ".";
53090
+ if (filters.every((filter) => filter(path, true))) paths.push(path);
53068
53091
  };
53069
53092
  const empty$2 = () => {};
53070
53093
  function build$6(root, options) {
@@ -53113,26 +53136,26 @@ const empty = () => {};
53113
53136
  function build$3(options) {
53114
53137
  return options.group ? groupFiles : empty;
53115
53138
  }
53116
- const resolveSymlinksAsync = function(path$1, state, callback$1) {
53139
+ const resolveSymlinksAsync = function(path, state, callback$1) {
53117
53140
  const { queue, fs: fs$2, options: { suppressErrors } } = state;
53118
53141
  queue.enqueue();
53119
- fs$2.realpath(path$1, (error, resolvedPath) => {
53142
+ fs$2.realpath(path, (error, resolvedPath) => {
53120
53143
  if (error) return queue.dequeue(suppressErrors ? null : error, state);
53121
53144
  fs$2.stat(resolvedPath, (error$1, stat$1) => {
53122
53145
  if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
53123
- if (stat$1.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
53146
+ if (stat$1.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
53124
53147
  callback$1(stat$1, resolvedPath);
53125
53148
  queue.dequeue(null, state);
53126
53149
  });
53127
53150
  });
53128
53151
  };
53129
- const resolveSymlinks = function(path$1, state, callback$1) {
53152
+ const resolveSymlinks = function(path, state, callback$1) {
53130
53153
  const { queue, fs: fs$2, options: { suppressErrors } } = state;
53131
53154
  queue.enqueue();
53132
53155
  try {
53133
- const resolvedPath = fs$2.realpathSync(path$1);
53156
+ const resolvedPath = fs$2.realpathSync(path);
53134
53157
  const stat$1 = fs$2.statSync(resolvedPath);
53135
- if (stat$1.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
53158
+ if (stat$1.isDirectory() && isRecursive(path, resolvedPath, state)) return;
53136
53159
  callback$1(stat$1, resolvedPath);
53137
53160
  } catch (e) {
53138
53161
  if (!suppressErrors) throw e;
@@ -53142,16 +53165,16 @@ function build$2(options, isSynchronous) {
53142
53165
  if (!options.resolveSymlinks || options.excludeSymlinks) return null;
53143
53166
  return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
53144
53167
  }
53145
- function isRecursive(path$1, resolved, state) {
53168
+ function isRecursive(path, resolved, state) {
53146
53169
  if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
53147
- let parent = dirname$1(path$1);
53170
+ let parent = dirname$1(path);
53148
53171
  let depth$1 = 1;
53149
53172
  while (parent !== state.root && depth$1 < 2) {
53150
53173
  const resolvedPath = state.symlinks.get(parent);
53151
53174
  if (!!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath))) depth$1++;
53152
53175
  else parent = dirname$1(parent);
53153
53176
  }
53154
- state.symlinks.set(path$1, resolved);
53177
+ state.symlinks.set(path, resolved);
53155
53178
  return depth$1 > 1;
53156
53179
  }
53157
53180
  function isRecursiveUsingRealPaths(resolved, state) {
@@ -53332,19 +53355,19 @@ var Walker = class {
53332
53355
  const filename = this.joinPath(entry.name, directoryPath);
53333
53356
  this.pushFile(filename, files, this.state.counts, filters);
53334
53357
  } else if (entry.isDirectory()) {
53335
- let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
53336
- if (exclude && exclude(entry.name, path$1)) continue;
53337
- this.pushDirectory(path$1, paths, filters);
53338
- this.walkDirectory(this.state, path$1, path$1, depth$1 - 1, this.walk);
53358
+ let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
53359
+ if (exclude && exclude(entry.name, path)) continue;
53360
+ this.pushDirectory(path, paths, filters);
53361
+ this.walkDirectory(this.state, path, path, depth$1 - 1, this.walk);
53339
53362
  } else if (this.resolveSymlink && entry.isSymbolicLink()) {
53340
- let path$1 = joinPathWithBasePath(entry.name, directoryPath);
53341
- this.resolveSymlink(path$1, this.state, (stat$1, resolvedPath) => {
53363
+ let path = joinPathWithBasePath(entry.name, directoryPath);
53364
+ this.resolveSymlink(path, this.state, (stat$1, resolvedPath) => {
53342
53365
  if (stat$1.isDirectory()) {
53343
53366
  resolvedPath = normalizePath$1(resolvedPath, this.state.options);
53344
- if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
53345
- this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth$1 - 1, this.walk);
53367
+ if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
53368
+ this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth$1 - 1, this.walk);
53346
53369
  } else {
53347
- resolvedPath = useRealPaths ? resolvedPath : path$1;
53370
+ resolvedPath = useRealPaths ? resolvedPath : path;
53348
53371
  const filename = basename(resolvedPath);
53349
53372
  const directoryPath$1 = normalizePath$1(dirname$1(resolvedPath), this.state.options);
53350
53373
  resolvedPath = this.joinPath(filename, directoryPath$1);
@@ -53509,7 +53532,7 @@ var Builder = class {
53509
53532
  isMatch = globFn(patterns, ...options);
53510
53533
  this.globCache[patterns.join("\0")] = isMatch;
53511
53534
  }
53512
- this.options.filters.push((path$1) => isMatch(path$1));
53535
+ this.options.filters.push((path) => isMatch(path));
53513
53536
  return this;
53514
53537
  }
53515
53538
  };
@@ -53723,8 +53746,8 @@ var require_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pic
53723
53746
  if (state.negated === true) output = `(?:^(?!${output}).*$)`;
53724
53747
  return output;
53725
53748
  };
53726
- exports.basename = (path$1, { windows } = {}) => {
53727
- const segs = path$1.split(windows ? /[\\/]/ : "/");
53749
+ exports.basename = (path, { windows } = {}) => {
53750
+ const segs = path.split(windows ? /[\\/]/ : "/");
53728
53751
  const last = segs[segs.length - 1];
53729
53752
  if (last === "") return segs[segs.length - 2];
53730
53753
  return last;
@@ -55464,15 +55487,15 @@ function buildRelative(cwd, root) {
55464
55487
  };
55465
55488
  }
55466
55489
  const splitPatternOptions = { parts: true };
55467
- function splitPattern(path$1) {
55490
+ function splitPattern(path) {
55468
55491
  var _result$parts;
55469
- const result = import_picomatch.default.scan(path$1, splitPatternOptions);
55470
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
55492
+ const result = import_picomatch.default.scan(path, splitPatternOptions);
55493
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path];
55471
55494
  }
55472
55495
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
55473
55496
  const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
55474
- const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
55475
- const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
55497
+ const escapePosixPath = (path) => path.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
55498
+ const escapeWin32Path = (path) => path.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
55476
55499
  /**
55477
55500
  * Escapes a path's special characters depending on the platform.
55478
55501
  * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
@@ -55596,13 +55619,13 @@ function buildCrawler(options, patterns) {
55596
55619
  if (options.deep !== void 0) maxDepth = Math.round(options.deep - props.depthOffset);
55597
55620
  const crawler = new Builder({
55598
55621
  filters: [debug$7 ? (p$1, isDirectory$1) => {
55599
- const path$1 = format$2(p$1, isDirectory$1);
55600
- const matches = matcher(path$1) && !ignore$1(path$1);
55601
- if (matches) log(`matched ${path$1}`);
55622
+ const path = format$2(p$1, isDirectory$1);
55623
+ const matches = matcher(path) && !ignore$1(path);
55624
+ if (matches) log(`matched ${path}`);
55602
55625
  return matches;
55603
55626
  } : (p$1, isDirectory$1) => {
55604
- const path$1 = format$2(p$1, isDirectory$1);
55605
- return matcher(path$1) && !ignore$1(path$1);
55627
+ const path = format$2(p$1, isDirectory$1);
55628
+ return matcher(path) && !ignore$1(path);
55606
55629
  }],
55607
55630
  exclude: debug$7 ? (_, p$1) => {
55608
55631
  const skipped = excludePredicate(_, p$1);
@@ -56676,13 +56699,13 @@ const wslDefaultBrowser = async () => {
56676
56699
  const { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
56677
56700
  return stdout.trim();
56678
56701
  };
56679
- const convertWslPathToWindows = async (path$1) => {
56680
- if (/^[a-z]+:\/\//i.test(path$1)) return path$1;
56702
+ const convertWslPathToWindows = async (path) => {
56703
+ if (/^[a-z]+:\/\//i.test(path)) return path;
56681
56704
  try {
56682
- const { stdout } = await execFile$1("wslpath", ["-aw", path$1], { encoding: "utf8" });
56705
+ const { stdout } = await execFile$1("wslpath", ["-aw", path], { encoding: "utf8" });
56683
56706
  return stdout.trim();
56684
56707
  } catch {
56685
- return path$1;
56708
+ return path;
56686
56709
  }
56687
56710
  };
56688
56711
 
@@ -56868,8 +56891,8 @@ var is_in_ssh_default = isInSsh;
56868
56891
  //#endregion
56869
56892
  //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
56870
56893
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
56871
- const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
56872
- const localXdgOpenPath = path.join(__dirname, "xdg-open");
56894
+ const __dirname = import.meta.url ? path3.dirname(fileURLToPath(import.meta.url)) : "";
56895
+ const localXdgOpenPath = path3.join(__dirname, "xdg-open");
56873
56896
  const { platform, arch: arch$1 } = process$1;
56874
56897
  const tryEachApp = async (apps$1, opener) => {
56875
56898
  if (apps$1.length === 0) return;