@cloudflare/vite-plugin 1.34.0 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { builtinModules, createRequire } from "node:module";
2
2
  import assert from "node:assert";
3
- import { CoreHeaders, CorePaths, Log, LogLevel, Miniflare, Request as Request$1, Response as Response$1, buildPublicUrl, coupleWebSocket, getDefaultDevRegistryPath, getNodeCompat, getWorkerRegistry, kUnsafeEphemeralUniqueKey } from "miniflare";
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 path3, { dirname, isAbsolute, join, relative, resolve } from "node:path";
6
+ import path, { 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";
@@ -24,7 +24,7 @@ import v8 from "node:v8";
24
24
  import { defineEnv } from "unenv";
25
25
  import * as nativeFs$1 from "fs";
26
26
  import nativeFs from "fs";
27
- import path, { basename, dirname as dirname$1, normalize, posix, relative as relative$1, resolve as resolve$1, sep } from "path";
27
+ import path$1, { basename, dirname as dirname$1, normalize, posix, relative as relative$1, resolve as resolve$1, sep } from "path";
28
28
  import { fileURLToPath as fileURLToPath$1 } from "url";
29
29
  import { createRequire as createRequire$1 } from "module";
30
30
  import { WebSocketServer } from "ws";
@@ -1503,7 +1503,7 @@ async function assertWranglerVersion() {
1503
1503
  * The default compatibility date to use when the user omits one.
1504
1504
  * This value is injected at build time and remains fixed for each release.
1505
1505
  */
1506
- const DEFAULT_COMPAT_DATE = "2026-04-28";
1506
+ const DEFAULT_COMPAT_DATE = "2026-04-30";
1507
1507
 
1508
1508
  //#endregion
1509
1509
  //#region ../../node_modules/.pnpm/@remix-run+node-fetch-server@0.8.0/node_modules/@remix-run/node-fetch-server/dist/node-fetch-server.js
@@ -1997,7 +1997,7 @@ var MetricsRegistry = class {
1997
1997
  };
1998
1998
 
1999
1999
  //#endregion
2000
- //#region ../workers-utils/dist/chunk-A4F3D336.mjs
2000
+ //#region ../workers-utils/dist/chunk-XXCQEG76.mjs
2001
2001
  var UserError = class extends Error {
2002
2002
  static {
2003
2003
  __name(this, "UserError");
@@ -2006,7 +2006,7 @@ var UserError = class extends Error {
2006
2006
  constructor(message, options) {
2007
2007
  super(message, options);
2008
2008
  Object.setPrototypeOf(this, new.target.prototype);
2009
- this.telemetryMessage = options?.telemetryMessage === true ? message : options?.telemetryMessage;
2009
+ this.telemetryMessage = typeof options?.telemetryMessage === "string" ? options.telemetryMessage : options?.telemetryMessage ? message : void 0;
2010
2010
  }
2011
2011
  };
2012
2012
  var DeprecationError = class extends UserError {
@@ -2019,13 +2019,14 @@ ${message}`, options);
2019
2019
  }
2020
2020
  };
2021
2021
  var FatalError = class extends UserError {
2022
- constructor(message, code, options) {
2023
- super(message, options);
2024
- this.code = code;
2025
- }
2026
2022
  static {
2027
2023
  __name(this, "FatalError");
2028
2024
  }
2025
+ code;
2026
+ constructor(message, options) {
2027
+ super(message, options);
2028
+ this.code = options.code;
2029
+ }
2029
2030
  };
2030
2031
  var CommandLineArgsError = class extends UserError {
2031
2032
  static {
@@ -2033,10 +2034,6 @@ var CommandLineArgsError = class extends UserError {
2033
2034
  }
2034
2035
  };
2035
2036
  var JsonFriendlyFatalError = class extends FatalError {
2036
- constructor(message, code, options) {
2037
- super(message, code, options);
2038
- this.code = code;
2039
- }
2040
2037
  static {
2041
2038
  __name(this, "JsonFriendlyFatalError");
2042
2039
  }
@@ -2051,9 +2048,9 @@ var MissingConfigError = class extends Error {
2051
2048
  this.telemetryMessage = `Missing config value for ${key}`;
2052
2049
  }
2053
2050
  };
2054
- function createFatalError(message, isJson, code, telemetryMessage) {
2055
- if (isJson) return new JsonFriendlyFatalError(JSON.stringify(message), code, telemetryMessage);
2056
- else return new FatalError(`${message}`, code, telemetryMessage);
2051
+ function createFatalError(message, isJson, options) {
2052
+ if (isJson) return new JsonFriendlyFatalError(JSON.stringify(message), options);
2053
+ return new FatalError(`${message}`, options);
2057
2054
  }
2058
2055
  __name(createFatalError, "createFatalError");
2059
2056
  function createScanner(text, ignoreTrivia = false) {
@@ -4073,7 +4070,8 @@ function readFileSyncToBuffer(file2) {
4073
4070
  const { message } = err;
4074
4071
  throw new ParseError({
4075
4072
  text: `Could not read file: ${file2}`,
4076
- notes: [{ text: message.replace(file2, resolve(file2)) }]
4073
+ notes: [{ text: message.replace(file2, resolve(file2)) }],
4074
+ telemetryMessage: false
4077
4075
  });
4078
4076
  }
4079
4077
  }
@@ -4332,7 +4330,7 @@ function resolveWranglerConfigPath({ config, script }, options) {
4332
4330
  deployConfigPath: void 0,
4333
4331
  redirected: false
4334
4332
  };
4335
- return findWranglerConfig$1(script !== void 0 ? path3.dirname(script) : process.cwd(), options);
4333
+ return findWranglerConfig$1(script !== void 0 ? path.dirname(script) : process.cwd(), options);
4336
4334
  }
4337
4335
  __name(resolveWranglerConfigPath, "resolveWranglerConfigPath");
4338
4336
  function findWranglerConfig$1(referencePath = process.cwd(), { useRedirectIfAvailable = false } = {}) {
@@ -4363,28 +4361,31 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
4363
4361
  const deployConfigFile = readFileSync$1(deployConfigPath);
4364
4362
  try {
4365
4363
  const deployConfig = parseJSONC(deployConfigFile, deployConfigPath);
4366
- redirectedConfigPath = deployConfig.configPath && path3.resolve(path3.dirname(deployConfigPath), deployConfig.configPath);
4364
+ redirectedConfigPath = deployConfig.configPath && path.resolve(path.dirname(deployConfigPath), deployConfig.configPath);
4367
4365
  } catch (e) {
4368
- throw new UserError(`Failed to parse the deploy configuration file at ${path3.relative(".", deployConfigPath)}`, { cause: e });
4366
+ throw new UserError(`Failed to parse the deploy configuration file at ${path.relative(".", deployConfigPath)}`, {
4367
+ cause: e,
4368
+ telemetryMessage: false
4369
+ });
4369
4370
  }
4370
4371
  if (!redirectedConfigPath) throw new UserError(esm_default`
4371
- A deploy configuration file was found at "${path3.relative(".", deployConfigPath)}".
4372
+ A deploy configuration file was found at "${path.relative(".", deployConfigPath)}".
4372
4373
  But this is not valid - the required "configPath" property was not found.
4373
4374
  Instead this file contains:
4374
4375
  \`\`\`
4375
4376
  ${deployConfigFile}
4376
4377
  \`\`\`
4377
- `);
4378
+ `, { telemetryMessage: false });
4378
4379
  if (!existsSync(redirectedConfigPath)) throw new UserError(esm_default`
4379
- There is a deploy configuration at "${path3.relative(".", deployConfigPath)}".
4380
- But the redirected configuration path it points to, "${path3.relative(".", redirectedConfigPath)}", does not exist.
4381
- `);
4380
+ There is a deploy configuration at "${path.relative(".", deployConfigPath)}".
4381
+ But the redirected configuration path it points to, "${path.relative(".", redirectedConfigPath)}", does not exist.
4382
+ `, { telemetryMessage: false });
4382
4383
  if (userConfigPath) {
4383
- if (path3.join(path3.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError(esm_default`
4384
- Found both a user configuration file at "${path3.relative(".", userConfigPath)}"
4385
- and a deploy configuration file at "${path3.relative(".", deployConfigPath)}".
4384
+ if (path.join(path.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) throw new UserError(esm_default`
4385
+ Found both a user configuration file at "${path.relative(".", userConfigPath)}"
4386
+ and a deploy configuration file at "${path.relative(".", deployConfigPath)}".
4386
4387
  But these do not share the same base path so it is not clear which should be used.
4387
- `);
4388
+ `, { telemetryMessage: false });
4388
4389
  }
4389
4390
  return {
4390
4391
  configPath: redirectedConfigPath,
@@ -5591,10 +5592,10 @@ var require_util$5 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/un
5591
5592
  if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$36("Invalid URL protocol: the URL must start with `http:` or `https:`.");
5592
5593
  const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80;
5593
5594
  let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`;
5594
- let path$1 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
5595
+ let path$2 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`;
5595
5596
  if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1);
5596
- if (path$1 && path$1[0] !== "/") path$1 = `/${path$1}`;
5597
- return new URL(`${origin}${path$1}`);
5597
+ if (path$2 && path$2[0] !== "/") path$2 = `/${path$2}`;
5598
+ return new URL(`${origin}${path$2}`);
5598
5599
  }
5599
5600
  if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError$36("Invalid URL protocol: the URL must start with `http:` or `https:`.");
5600
5601
  return url;
@@ -6469,8 +6470,8 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
6469
6470
  debugLog("connection to %s%s using %s%s errored - %s", host, port ? `:${port}` : "", protocol, version$2, error.message);
6470
6471
  });
6471
6472
  diagnosticsChannel$1.subscribe("undici:client:sendHeaders", (evt) => {
6472
- const { request: { method, path: path$1, origin } } = evt;
6473
- debugLog("sending request to %s %s%s", method, origin, path$1);
6473
+ const { request: { method, path: path$2, origin } } = evt;
6474
+ debugLog("sending request to %s %s%s", method, origin, path$2);
6474
6475
  });
6475
6476
  }
6476
6477
  let isTrackingRequestEvents = false;
@@ -6482,16 +6483,16 @@ var require_diagnostics = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
6482
6483
  }
6483
6484
  isTrackingRequestEvents = true;
6484
6485
  diagnosticsChannel$1.subscribe("undici:request:headers", (evt) => {
6485
- const { request: { method, path: path$1, origin }, response: { statusCode } } = evt;
6486
- debugLog("received response to %s %s%s - HTTP %d", method, origin, path$1, statusCode);
6486
+ const { request: { method, path: path$2, origin }, response: { statusCode } } = evt;
6487
+ debugLog("received response to %s %s%s - HTTP %d", method, origin, path$2, statusCode);
6487
6488
  });
6488
6489
  diagnosticsChannel$1.subscribe("undici:request:trailers", (evt) => {
6489
- const { request: { method, path: path$1, origin } } = evt;
6490
- debugLog("trailers received from %s %s%s", method, origin, path$1);
6490
+ const { request: { method, path: path$2, origin } } = evt;
6491
+ debugLog("trailers received from %s %s%s", method, origin, path$2);
6491
6492
  });
6492
6493
  diagnosticsChannel$1.subscribe("undici:request:error", (evt) => {
6493
- const { request: { method, path: path$1, origin }, error } = evt;
6494
- debugLog("request to %s %s%s errored - %s", method, origin, path$1, error.message);
6494
+ const { request: { method, path: path$2, origin }, error } = evt;
6495
+ debugLog("request to %s %s%s errored - %s", method, origin, path$2, error.message);
6495
6496
  });
6496
6497
  }
6497
6498
  let isTrackingWebSocketEvents = false;
@@ -6544,10 +6545,10 @@ var require_request$1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
6544
6545
  const invalidPathRegex = /[^\u0021-\u00ff]/;
6545
6546
  const kHandler = Symbol("handler");
6546
6547
  var Request$6 = class {
6547
- constructor(origin, { path: path$1, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
6548
- if (typeof path$1 !== "string") throw new InvalidArgumentError$35("path must be a string");
6549
- 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");
6550
- else if (invalidPathRegex.test(path$1)) throw new InvalidArgumentError$35("invalid request path");
6548
+ constructor(origin, { path: path$2, method, body, headers, query, idempotent, blocking, upgrade: upgrade$1, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections, typeOfService }, handler) {
6549
+ if (typeof path$2 !== "string") throw new InvalidArgumentError$35("path must be a string");
6550
+ else if (path$2[0] !== "/" && !(path$2.startsWith("http://") || path$2.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError$35("path must be an absolute URL or start with a slash");
6551
+ else if (invalidPathRegex.test(path$2)) throw new InvalidArgumentError$35("invalid request path");
6551
6552
  if (typeof method !== "string") throw new InvalidArgumentError$35("method must be a string");
6552
6553
  else if (normalizedMethodRecords$1[method] === void 0 && !isValidHTTPToken$2(method)) throw new InvalidArgumentError$35("invalid request method");
6553
6554
  if (upgrade$1 && typeof upgrade$1 !== "string") throw new InvalidArgumentError$35("upgrade must be a string");
@@ -6588,7 +6589,7 @@ var require_request$1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
6588
6589
  this.completed = false;
6589
6590
  this.aborted = false;
6590
6591
  this.upgrade = upgrade$1 || null;
6591
- this.path = query ? serializePathWithQuery$3(path$1, query) : path$1;
6592
+ this.path = query ? serializePathWithQuery$3(path$2, query) : path$2;
6592
6593
  this.origin = origin;
6593
6594
  this.protocol = getProtocolFromUrlString(origin);
6594
6595
  this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
@@ -11071,7 +11072,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11071
11072
  * @returns
11072
11073
  */
11073
11074
  function writeH1(client, request$2) {
11074
- const { method, path: path$1, host, upgrade: upgrade$1, blocking, reset } = request$2;
11075
+ const { method, path: path$2, host, upgrade: upgrade$1, blocking, reset } = request$2;
11075
11076
  let { body, headers, contentLength } = request$2;
11076
11077
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
11077
11078
  if (util$23.isFormDataLike(body)) {
@@ -11116,7 +11117,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11116
11117
  if (client[kMaxRequests$1] && socket[kCounter$1]++ >= client[kMaxRequests$1]) socket[kReset$1] = true;
11117
11118
  if (blocking) socket[kBlocking] = true;
11118
11119
  if (socket.setTypeOfService) socket.setTypeOfService(request$2.typeOfService);
11119
- let header = `${method} ${path$1} HTTP/1.1\r\n`;
11120
+ let header = `${method} ${path$2} HTTP/1.1\r\n`;
11120
11121
  if (typeof host === "string") header += `host: ${host}\r\n`;
11121
11122
  else header += client[kHostHeader$1];
11122
11123
  if (upgrade$1) header += `connection: upgrade\r\nupgrade: ${upgrade$1}\r\n`;
@@ -11652,7 +11653,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11652
11653
  function writeH2(client, request$2) {
11653
11654
  const requestTimeout = request$2.bodyTimeout ?? client[kBodyTimeout$1];
11654
11655
  const session = client[kHTTP2Session];
11655
- const { method, path: path$1, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
11656
+ const { method, path: path$2, host, upgrade: upgrade$1, expectContinue, signal, protocol, headers: reqHeaders } = request$2;
11656
11657
  let { body } = request$2;
11657
11658
  if (upgrade$1 != null && upgrade$1 !== "websocket") {
11658
11659
  util$22.errorRequest(client, request$2, new InvalidArgumentError$30(`Custom upgrade "${upgrade$1}" not supported over HTTP/2`));
@@ -11705,7 +11706,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11705
11706
  }
11706
11707
  headers[HTTP2_HEADER_METHOD] = "CONNECT";
11707
11708
  headers[HTTP2_HEADER_PROTOCOL] = "websocket";
11708
- headers[HTTP2_HEADER_PATH] = path$1;
11709
+ headers[HTTP2_HEADER_PATH] = path$2;
11709
11710
  if (protocol === "ws:" || protocol === "wss:") headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
11710
11711
  else headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
11711
11712
  stream$2 = session.request(headers, {
@@ -11747,7 +11748,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm
11747
11748
  stream$2.setTimeout(requestTimeout);
11748
11749
  return true;
11749
11750
  }
11750
- headers[HTTP2_HEADER_PATH] = path$1;
11751
+ headers[HTTP2_HEADER_PATH] = path$2;
11751
11752
  headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
11752
11753
  const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
11753
11754
  if (body && typeof body.read === "function") body.read(0);
@@ -13573,8 +13574,8 @@ var require_proxy_agent = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pn
13573
13574
  }
13574
13575
  if (onHeaders) onHeaders.call(this, statusCode, data$1, resume$1);
13575
13576
  };
13576
- const { origin, path: path$1 = "/", headers = {} } = opts;
13577
- opts.path = origin + path$1;
13577
+ const { origin, path: path$2 = "/", headers = {} } = opts;
13578
+ opts.path = origin + path$2;
13578
13579
  if (!("host" in headers) && !("Host" in headers)) {
13579
13580
  const { host } = new URL(origin);
13580
13581
  headers.host = host;
@@ -15358,16 +15359,16 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
15358
15359
  }
15359
15360
  return normalizedQp;
15360
15361
  }
15361
- function safeUrl(path$1) {
15362
- if (typeof path$1 !== "string") return path$1;
15363
- const pathSegments = path$1.split("?", 3);
15364
- if (pathSegments.length !== 2) return path$1;
15362
+ function safeUrl(path$2) {
15363
+ if (typeof path$2 !== "string") return path$2;
15364
+ const pathSegments = path$2.split("?", 3);
15365
+ if (pathSegments.length !== 2) return path$2;
15365
15366
  const qp = new URLSearchParams(pathSegments.pop());
15366
15367
  qp.sort();
15367
15368
  return [...pathSegments, qp.toString()].join("?");
15368
15369
  }
15369
- function matchKey(mockDispatch$1, { path: path$1, method, body, headers }) {
15370
- const pathMatch = matchValue$1(mockDispatch$1.path, path$1);
15370
+ function matchKey(mockDispatch$1, { path: path$2, method, body, headers }) {
15371
+ const pathMatch = matchValue$1(mockDispatch$1.path, path$2);
15371
15372
  const methodMatch = matchValue$1(mockDispatch$1.method, method);
15372
15373
  const bodyMatch = typeof mockDispatch$1.body !== "undefined" ? matchValue$1(mockDispatch$1.body, body) : true;
15373
15374
  const headersMatch = matchHeaders(mockDispatch$1, headers);
@@ -15385,8 +15386,8 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
15385
15386
  const basePath = key.query ? serializePathWithQuery$2(key.path, key.query) : key.path;
15386
15387
  const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
15387
15388
  const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath);
15388
- let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$1, ignoreTrailingSlash }) => {
15389
- return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$1)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$1), resolvedPath);
15389
+ let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path$2, ignoreTrailingSlash }) => {
15390
+ return ignoreTrailingSlash ? matchValue$1(removeTrailingSlash(safeUrl(path$2)), resolvedPathWithoutTrailingSlash) : matchValue$1(safeUrl(path$2), resolvedPath);
15390
15391
  });
15391
15392
  if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
15392
15393
  matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue$1(method, key.method));
@@ -15429,15 +15430,15 @@ var require_mock_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
15429
15430
  /**
15430
15431
  * @param {string} path Path to remove trailing slash from
15431
15432
  */
15432
- function removeTrailingSlash(path$1) {
15433
- while (path$1.endsWith("/")) path$1 = path$1.slice(0, -1);
15434
- if (path$1.length === 0) path$1 = "/";
15435
- return path$1;
15433
+ function removeTrailingSlash(path$2) {
15434
+ while (path$2.endsWith("/")) path$2 = path$2.slice(0, -1);
15435
+ if (path$2.length === 0) path$2 = "/";
15436
+ return path$2;
15436
15437
  }
15437
15438
  function buildKey$1(opts) {
15438
- const { path: path$1, method, body, headers, query } = opts;
15439
+ const { path: path$2, method, body, headers, query } = opts;
15439
15440
  return {
15440
- path: path$1,
15441
+ path: path$2,
15441
15442
  method,
15442
15443
  body,
15443
15444
  headers,
@@ -16004,10 +16005,10 @@ var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJS$1({ "../
16004
16005
  });
16005
16006
  }
16006
16007
  format(pendingInterceptors) {
16007
- const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$1, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
16008
+ const withPrettyHeaders = pendingInterceptors.map(({ method, path: path$2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
16008
16009
  Method: method,
16009
16010
  Origin: origin,
16010
- Path: path$1,
16011
+ Path: path$2,
16011
16012
  "Status code": statusCode,
16012
16013
  Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
16013
16014
  Invocations: timesInvoked,
@@ -16065,8 +16066,8 @@ var require_mock_agent = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnp
16065
16066
  const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
16066
16067
  const dispatchOpts = { ...opts };
16067
16068
  if (acceptNonStandardSearchParameters && dispatchOpts.path) {
16068
- const [path$1, searchParams] = dispatchOpts.path.split("?");
16069
- dispatchOpts.path = `${path$1}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
16069
+ const [path$2, searchParams] = dispatchOpts.path.split("?");
16070
+ dispatchOpts.path = `${path$2}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`;
16070
16071
  }
16071
16072
  return this[kAgent].dispatch(dispatchOpts, handler);
16072
16073
  }
@@ -16543,10 +16544,10 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$1({ "../../node_modul
16543
16544
  * @return {Promise<void>} - Resolves when snapshots are loaded
16544
16545
  */
16545
16546
  async loadSnapshots(filePath) {
16546
- const path$1 = filePath || this.#snapshotPath;
16547
- if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
16547
+ const path$2 = filePath || this.#snapshotPath;
16548
+ if (!path$2) throw new InvalidArgumentError$6("Snapshot path is required");
16548
16549
  try {
16549
- const data$1 = await readFile(resolve$3(path$1), "utf8");
16550
+ const data$1 = await readFile(resolve$3(path$2), "utf8");
16550
16551
  const parsed = JSON.parse(data$1);
16551
16552
  if (Array.isArray(parsed)) {
16552
16553
  this.#snapshots.clear();
@@ -16554,7 +16555,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$1({ "../../node_modul
16554
16555
  } else this.#snapshots = new Map(Object.entries(parsed));
16555
16556
  } catch (error) {
16556
16557
  if (error.code === "ENOENT") this.#snapshots.clear();
16557
- else throw new UndiciError$1(`Failed to load snapshots from ${path$1}`, { cause: error });
16558
+ else throw new UndiciError$1(`Failed to load snapshots from ${path$2}`, { cause: error });
16558
16559
  }
16559
16560
  }
16560
16561
  /**
@@ -16564,9 +16565,9 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJS$1({ "../../node_modul
16564
16565
  * @returns {Promise<void>} - Resolves when snapshots are saved
16565
16566
  */
16566
16567
  async saveSnapshots(filePath) {
16567
- const path$1 = filePath || this.#snapshotPath;
16568
- if (!path$1) throw new InvalidArgumentError$6("Snapshot path is required");
16569
- const resolvedPath = resolve$3(path$1);
16568
+ const path$2 = filePath || this.#snapshotPath;
16569
+ if (!path$2) throw new InvalidArgumentError$6("Snapshot path is required");
16570
+ const resolvedPath = resolve$3(path$2);
16570
16571
  await mkdir(dirname$2(resolvedPath), { recursive: true });
16571
16572
  const data$1 = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
16572
16573
  hash,
@@ -17133,11 +17134,11 @@ var require_redirect_handler = /* @__PURE__ */ __commonJS$1({ "../../node_module
17133
17134
  return;
17134
17135
  }
17135
17136
  const { origin, pathname, search } = util$10.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
17136
- const path$1 = search ? `${pathname}${search}` : pathname;
17137
- const redirectUrlString = `${origin}${path$1}`;
17137
+ const path$2 = search ? `${pathname}${search}` : pathname;
17138
+ const redirectUrlString = `${origin}${path$2}`;
17138
17139
  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.`);
17139
17140
  this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
17140
- this.opts.path = path$1;
17141
+ this.opts.path = path$2;
17141
17142
  this.opts.origin = origin;
17142
17143
  this.opts.query = null;
17143
17144
  }
@@ -22095,10 +22096,10 @@ var require_fetch = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/und
22095
22096
  const url = requestCurrentURL(request$2);
22096
22097
  /** @type {import('../../..').Agent} */
22097
22098
  const agent = fetchParams.controller.dispatcher;
22098
- const path$1 = url.pathname + url.search;
22099
+ const path$2 = url.pathname + url.search;
22099
22100
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
22100
22101
  return new Promise((resolve$4, reject) => agent.dispatch({
22101
- path: hasTrailingQuestionMark ? `${path$1}?` : path$1,
22102
+ path: hasTrailingQuestionMark ? `${path$2}?` : path$2,
22102
22103
  origin: url.origin,
22103
22104
  method: request$2.method,
22104
22105
  body: agent.isMockActive ? request$2.body && (request$2.body.source || request$2.body.stream) : body,
@@ -22880,9 +22881,9 @@ var require_util$2 = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/un
22880
22881
  * path-value = <any CHAR except CTLs or ";">
22881
22882
  * @param {string} path
22882
22883
  */
22883
- function validateCookiePath(path$1) {
22884
- for (let i$1 = 0; i$1 < path$1.length; ++i$1) {
22885
- const code = path$1.charCodeAt(i$1);
22884
+ function validateCookiePath(path$2) {
22885
+ for (let i$1 = 0; i$1 < path$2.length; ++i$1) {
22886
+ const code = path$2.charCodeAt(i$1);
22886
22887
  if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path");
22887
22888
  }
22888
22889
  }
@@ -25990,9 +25991,9 @@ var require_undici = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/un
25990
25991
  if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts");
25991
25992
  if (opts && opts.path != null) {
25992
25993
  if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path");
25993
- let path$1 = opts.path;
25994
- if (!opts.path.startsWith("/")) path$1 = `/${path$1}`;
25995
- url = new URL(util$3.parseOrigin(url).origin + path$1);
25994
+ let path$2 = opts.path;
25995
+ if (!opts.path.startsWith("/")) path$2 = `/${path$2}`;
25996
+ url = new URL(util$3.parseOrigin(url).origin + path$2);
25996
25997
  } else {
25997
25998
  if (!opts) opts = typeof url === "object" ? url : {};
25998
25999
  url = util$3.parseURL(url);
@@ -30368,7 +30369,7 @@ __reExport(mod_esm_exports, __toESM(require_mod_cjs3(), 1));
30368
30369
  var mod_esm_default = import_mod_cjs.default;
30369
30370
  function getGlobalWranglerConfigPath() {
30370
30371
  const configDir = mod_esm_default(".wrangler").config();
30371
- const legacyConfigDir = path3.join(os.homedir(), ".wrangler");
30372
+ const legacyConfigDir = path.join(os.homedir(), ".wrangler");
30372
30373
  if (isDirectory(legacyConfigDir)) return legacyConfigDir;
30373
30374
  else return configDir;
30374
30375
  }
@@ -30379,7 +30380,7 @@ function getBooleanEnvironmentVariableFactory(options) {
30379
30380
  switch (process.env[options.variableName]?.toLowerCase()) {
30380
30381
  case "true": return true;
30381
30382
  case "false": return false;
30382
- default: throw new UserError(`Expected ${options.variableName} to be "true" or "false", but got ${JSON.stringify(process.env[options.variableName])}`);
30383
+ default: throw new UserError(`Expected ${options.variableName} to be "true" or "false", but got ${JSON.stringify(process.env[options.variableName])}`, { telemetryMessage: false });
30383
30384
  }
30384
30385
  };
30385
30386
  }
@@ -30405,7 +30406,7 @@ function getProcessEnv(variableName, choices) {
30405
30406
  }
30406
30407
  __name(getProcessEnv, "getProcessEnv");
30407
30408
  function assertOneOf(choices, value) {
30408
- if (Array.isArray(choices) && !choices.includes(value)) throw new UserError(`Expected ${JSON.stringify(value)} to be one of ${JSON.stringify(choices)}`);
30409
+ if (Array.isArray(choices) && !choices.includes(value)) throw new UserError(`Expected ${JSON.stringify(value)} to be one of ${JSON.stringify(choices)}`, { telemetryMessage: false });
30409
30410
  }
30410
30411
  __name(assertOneOf, "assertOneOf");
30411
30412
  var getC3CommandFromEnv = getEnvironmentVariableFactory({
@@ -30429,7 +30430,7 @@ var getCloudflareComplianceRegion = /* @__PURE__ */ __name((complianceConfig) =>
30429
30430
  The compliance region has been set to different values in two places:
30430
30431
  - \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable: \`${complianceRegionFromEnv}\`
30431
30432
  - \`compliance_region\` configuration property: \`${complianceConfig.compliance_region}\`
30432
- `);
30433
+ `, { telemetryMessage: false });
30433
30434
  return complianceRegionFromEnv || complianceConfig?.compliance_region || "public";
30434
30435
  }, "getCloudflareComplianceRegion");
30435
30436
  var getCloudflareApiBaseUrlFromEnv = getEnvironmentVariableFactory({
@@ -30464,7 +30465,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({ variableName: "WRA
30464
30465
  var getRegistryPath = getEnvironmentVariableFactory({
30465
30466
  variableName: "WRANGLER_REGISTRY_PATH",
30466
30467
  defaultValue() {
30467
- return path3.join(getGlobalWranglerConfigPath(), "registry");
30468
+ return path.join(getGlobalWranglerConfigPath(), "registry");
30468
30469
  }
30469
30470
  });
30470
30471
  var getD1ExtraLocationChoices = getEnvironmentVariableFactory({ variableName: "WRANGLER_D1_EXTRA_LOCATION_CHOICES" });
@@ -30876,7 +30877,7 @@ function isPagesConfig(rawConfig) {
30876
30877
  }
30877
30878
  __name(isPagesConfig, "isPagesConfig");
30878
30879
  function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
30879
- const diagnostics = new Diagnostics(`Processing ${configPath ? path3.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
30880
+ const diagnostics = new Diagnostics(`Processing ${configPath ? path.relative(process.cwd(), configPath) : "wrangler"} configuration:`);
30880
30881
  validateOptionalProperty(diagnostics, "", "legacy_env", rawConfig.legacy_env, "boolean");
30881
30882
  validateOptionalProperty(diagnostics, "", "send_metrics", rawConfig.send_metrics, "boolean");
30882
30883
  validateOptionalProperty(diagnostics, "", "keep_vars", rawConfig.keep_vars, "boolean");
@@ -30967,7 +30968,7 @@ function applyPythonConfig(config, args) {
30967
30968
  type: "PythonModule",
30968
30969
  globs: ["**/*.py"]
30969
30970
  });
30970
- if (!config.compatibility_flags.includes("python_workers")) throw new UserError("The `python_workers` compatibility flag is required to use Python.");
30971
+ if (!config.compatibility_flags.includes("python_workers")) throw new UserError("The `python_workers` compatibility flag is required to use Python.", { telemetryMessage: false });
30971
30972
  }
30972
30973
  }
30973
30974
  __name(applyPythonConfig, "applyPythonConfig");
@@ -30980,34 +30981,34 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
30980
30981
  else validateOptionalProperty(diagnostics, "build", "watch_dir", watch_dir, "string");
30981
30982
  return {
30982
30983
  command,
30983
- 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,
30984
+ 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,
30984
30985
  cwd
30985
30986
  };
30986
30987
  }
30987
30988
  __name(normalizeAndValidateBuild, "normalizeAndValidateBuild");
30988
30989
  function normalizeAndValidateMainField(configPath, rawMain) {
30989
- const configDir = path3.dirname(configPath ?? "wrangler.toml");
30990
+ const configDir = path.dirname(configPath ?? "wrangler.toml");
30990
30991
  if (rawMain !== void 0) if (typeof rawMain === "string") {
30991
- const directory = path3.resolve(configDir);
30992
- return path3.resolve(directory, rawMain);
30992
+ const directory = path.resolve(configDir);
30993
+ return path.resolve(directory, rawMain);
30993
30994
  } else return rawMain;
30994
30995
  else return;
30995
30996
  }
30996
30997
  __name(normalizeAndValidateMainField, "normalizeAndValidateMainField");
30997
30998
  function normalizeAndValidateBaseDirField(configPath, rawDir) {
30998
- const configDir = path3.dirname(configPath ?? "wrangler.toml");
30999
+ const configDir = path.dirname(configPath ?? "wrangler.toml");
30999
31000
  if (rawDir !== void 0) if (typeof rawDir === "string") {
31000
- const directory = path3.resolve(configDir);
31001
- return path3.resolve(directory, rawDir);
31001
+ const directory = path.resolve(configDir);
31002
+ return path.resolve(directory, rawDir);
31002
31003
  } else return rawDir;
31003
31004
  else return;
31004
31005
  }
31005
31006
  __name(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
31006
31007
  function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
31007
- const configDir = path3.dirname(configPath ?? "wrangler.toml");
31008
+ const configDir = path.dirname(configPath ?? "wrangler.toml");
31008
31009
  if (rawPagesDir !== void 0) if (typeof rawPagesDir === "string") {
31009
- const directory = path3.resolve(configDir);
31010
- return path3.resolve(directory, rawPagesDir);
31010
+ const directory = path.resolve(configDir);
31011
+ return path.resolve(directory, rawPagesDir);
31011
31012
  } else return rawPagesDir;
31012
31013
  else return;
31013
31014
  }
@@ -31060,7 +31061,7 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
31060
31061
  validateOptionalProperty(diagnostics, "site", "entry-point", rawConfig.site["entry-point"], "string");
31061
31062
  deprecated(diagnostics, rawConfig, `site.entry-point`, `Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
31062
31063
  \`\`\`
31063
- main = "${path3.join(String(rawConfig.site["entry-point"]) || "workers-site", path3.extname(String(rawConfig.site["entry-point"]) || "workers-site") ? "" : "index.js")}"
31064
+ main = "${path.join(String(rawConfig.site["entry-point"]) || "workers-site", path.extname(String(rawConfig.site["entry-point"]) || "workers-site") ? "" : "index.js")}"
31064
31065
  \`\`\``, false, void 0, "warning");
31065
31066
  let siteEntryPoint = rawConfig.site["entry-point"];
31066
31067
  if (!mainEntryPoint && !siteEntryPoint) {
@@ -31073,7 +31074,7 @@ main = "workers-site/index.js"
31073
31074
  } else if (mainEntryPoint && siteEntryPoint) diagnostics.errors.push(`Don't define both the \`main\` and \`site.entry-point\` fields in your configuration.
31074
31075
  They serve the same purpose: to point to the entry-point of your worker.
31075
31076
  Delete the deprecated \`site.entry-point\` field from your config.`);
31076
- if (configPath && siteEntryPoint) siteEntryPoint = path3.relative(process.cwd(), path3.join(path3.dirname(configPath), siteEntryPoint));
31077
+ if (configPath && siteEntryPoint) siteEntryPoint = path.relative(process.cwd(), path.join(path.dirname(configPath), siteEntryPoint));
31077
31078
  return {
31078
31079
  bucket,
31079
31080
  "entry-point": siteEntryPoint,
@@ -31105,7 +31106,7 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
31105
31106
  if (rawMapping === void 0) return;
31106
31107
  const mapping = {};
31107
31108
  for (const [name, filePath] of Object.entries(rawMapping)) if (isString$2(diagnostics, `${field}['${name}']`, filePath, void 0)) {
31108
- if (configPath) mapping[name] = configPath ? path3.relative(process.cwd(), path3.join(path3.dirname(configPath), filePath)) : filePath;
31109
+ if (configPath) mapping[name] = configPath ? path.relative(process.cwd(), path.join(path.dirname(configPath), filePath)) : filePath;
31109
31110
  }
31110
31111
  return mapping;
31111
31112
  }
@@ -31354,7 +31355,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
31354
31355
  __name(normalizeAndValidateEnvironment, "normalizeAndValidateEnvironment");
31355
31356
  function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPath) {
31356
31357
  const tsconfig = inheritable(diagnostics, topLevelEnv, rawEnv, "tsconfig", isString$2, void 0);
31357
- return configPath && tsconfig ? path3.relative(process.cwd(), path3.join(path3.dirname(configPath), tsconfig)) : tsconfig;
31358
+ return configPath && tsconfig ? path.relative(process.cwd(), path.join(path.dirname(configPath), tsconfig)) : tsconfig;
31358
31359
  }
31359
31360
  __name(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
31360
31361
  var validateAndNormalizeRules = /* @__PURE__ */ __name((diagnostics, topLevelEnv, rawEnv, envName) => {
@@ -31827,9 +31828,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
31827
31828
  let resolvedBuildContextPath = void 0;
31828
31829
  try {
31829
31830
  if (isDockerfile(resolvedImage, configPath)) {
31830
- const baseDir = configPath ? path3.dirname(configPath) : process.cwd();
31831
- resolvedImage = path3.resolve(baseDir, resolvedImage);
31832
- resolvedBuildContextPath = containerAppOptional.image_build_context ? path3.resolve(baseDir, containerAppOptional.image_build_context) : path3.dirname(resolvedImage);
31831
+ const baseDir = configPath ? path.dirname(configPath) : process.cwd();
31832
+ resolvedImage = path.resolve(baseDir, resolvedImage);
31833
+ resolvedBuildContextPath = containerAppOptional.image_build_context ? path.resolve(baseDir, containerAppOptional.image_build_context) : path.dirname(resolvedImage);
31833
31834
  }
31834
31835
  } catch (err) {
31835
31836
  if (err instanceof Error && err.message) diagnostics.errors.push(err.message);
@@ -32963,10 +32964,10 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
32963
32964
  }
32964
32965
  __name(isRemoteValid, "isRemoteValid");
32965
32966
  function isDockerfile(imagePath, configPath) {
32966
- const baseDir = configPath ? path3.dirname(configPath) : process.cwd();
32967
- const maybeDockerfile = path3.resolve(baseDir, imagePath);
32967
+ const baseDir = configPath ? path.dirname(configPath) : process.cwd();
32968
+ const maybeDockerfile = path.resolve(baseDir, imagePath);
32968
32969
  if (fs.existsSync(maybeDockerfile)) {
32969
- if (isDirectory(maybeDockerfile)) throw new UserError(`${imagePath} is a directory, you should specify a path to the Dockerfile`);
32970
+ if (isDirectory(maybeDockerfile)) throw new UserError(`${imagePath} is a directory, you should specify a path to the Dockerfile`, { telemetryMessage: false });
32970
32971
  return true;
32971
32972
  }
32972
32973
  const errorPrefix = `The image "${imagePath}" does not appear to be a valid path to a Dockerfile, or a valid image registry path:
@@ -32974,12 +32975,12 @@ function isDockerfile(imagePath, configPath) {
32974
32975
  try {
32975
32976
  new URL(`https://${imagePath}`);
32976
32977
  } catch (e2) {
32977
- if (e2 instanceof Error) throw new UserError(errorPrefix + e2.message);
32978
+ if (e2 instanceof Error) throw new UserError(errorPrefix + e2.message, { telemetryMessage: false });
32978
32979
  throw e2;
32979
32980
  }
32980
32981
  const imageParts = imagePath.split("/");
32981
- if (!imageParts[imageParts.length - 1]?.includes(":")) throw new UserError(errorPrefix + `If this is an image registry path, it needs to include at least a tag ':' (e.g: docker.io/httpd:1)`);
32982
- if (imagePath.includes("://")) throw new UserError(errorPrefix + `Image reference should not include the protocol part (e.g: docker.io/httpd:1, not https://docker.io/httpd:1)`);
32982
+ if (!imageParts[imageParts.length - 1]?.includes(":")) throw new UserError(errorPrefix + `If this is an image registry path, it needs to include at least a tag ':' (e.g: docker.io/httpd:1)`, { telemetryMessage: false });
32983
+ if (imagePath.includes("://")) throw new UserError(errorPrefix + `Image reference should not include the protocol part (e.g: docker.io/httpd:1, not https://docker.io/httpd:1)`, { telemetryMessage: false });
32983
32984
  return false;
32984
32985
  }
32985
32986
  __name(isDockerfile, "isDockerfile");
@@ -33016,7 +33017,7 @@ var supportedPagesConfigFields = [
33016
33017
  ];
33017
33018
  function validatePagesConfig(config, envNames, projectName) {
33018
33019
  if (!config.pages_build_output_dir) throw new FatalError(`Attempting to validate Pages configuration file, but "pages_build_output_dir" field was not found.
33019
- "pages_build_output_dir" is required for Pages projects.`);
33020
+ "pages_build_output_dir" is required for Pages projects.`, { telemetryMessage: false });
33020
33021
  const diagnostics = new Diagnostics(`Running configuration file validation for Pages:`);
33021
33022
  validateMainField(config, diagnostics);
33022
33023
  validateProjectName(projectName, diagnostics);
@@ -33082,7 +33083,7 @@ function getGoArch() {
33082
33083
  cloudflared supports: x64 (amd64), arm64, arm
33083
33084
 
33084
33085
  You can manually install cloudflared and set the CLOUDFLARED_PATH environment variable.
33085
- Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`);
33086
+ Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`, { telemetryMessage: "tunnel cloudflared unsupported architecture" });
33086
33087
  }
33087
33088
  }
33088
33089
  __name(getGoArch, "getGoArch");
@@ -33096,7 +33097,7 @@ function getGoOS() {
33096
33097
  cloudflared supports: darwin (macOS), linux, win32 (Windows)
33097
33098
 
33098
33099
  You can manually install cloudflared and set the CLOUDFLARED_PATH environment variable.
33099
- Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`);
33100
+ Download instructions: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`, { telemetryMessage: "tunnel cloudflared unsupported platform" });
33100
33101
  }
33101
33102
  }
33102
33103
  __name(getGoOS, "getGoOS");
@@ -33150,7 +33151,7 @@ The update service did not return results for ${goOS}/${goArch},
33150
33151
  and the fallback query also failed.
33151
33152
 
33152
33153
  You can manually install cloudflared from:
33153
- https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`);
33154
+ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`, { telemetryMessage: "tunnel cloudflared version lookup failed" });
33154
33155
  const version$2 = fallback.version;
33155
33156
  const filename = getAssetFilename(goOS, goArch);
33156
33157
  return {
@@ -33225,7 +33226,7 @@ You can try:
33225
33226
  errorMessage += ` 3. Manually installing cloudflared: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/
33226
33227
  `;
33227
33228
  errorMessage += ` 4. Setting CLOUDFLARED_PATH to point to your cloudflared binary`;
33228
- throw new UserError(errorMessage);
33229
+ throw new UserError(errorMessage, { telemetryMessage: "tunnel cloudflared validation failed" });
33229
33230
  }
33230
33231
  }
33231
33232
  __name(validateBinary, "validateBinary");
@@ -33319,14 +33320,14 @@ async function downloadCloudflared(versionInfo, binPath, options) {
33319
33320
  Network error: ${e2 instanceof Error ? e2.message : String(e2)}
33320
33321
 
33321
33322
  Please check your internet connection and try again.
33322
- If you're behind a proxy, make sure it's configured correctly.`);
33323
+ If you're behind a proxy, make sure it's configured correctly.`, { telemetryMessage: "tunnel cloudflared download network failed" });
33323
33324
  }
33324
33325
  if (!response.ok) throw new UserError(`[cloudflared] Failed to download cloudflared from ${url}
33325
33326
 
33326
33327
  HTTP ${response.status}: ${response.statusText}
33327
33328
 
33328
33329
  You can manually download cloudflared from:
33329
- https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`);
33330
+ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/`, { telemetryMessage: "tunnel cloudflared download response failed" });
33330
33331
  try {
33331
33332
  if (compressed) await downloadAndExtractTarball(response, checksum, binPath, cacheDir);
33332
33333
  else await downloadBinary(response, checksum, binPath);
@@ -33339,7 +33340,7 @@ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-
33339
33340
 
33340
33341
  Error: ${e2 instanceof Error ? e2.message : String(e2)}
33341
33342
 
33342
- Please ensure you have write permissions to: ${cacheDir}`);
33343
+ Please ensure you have write permissions to: ${cacheDir}`, { telemetryMessage: "tunnel cloudflared save failed" });
33343
33344
  }
33344
33345
  if (process.platform !== "win32") chmodSync(binPath, 493);
33345
33346
  logger?.log(`cloudflared ${version$2} installed`);
@@ -33354,7 +33355,7 @@ async function downloadAndExtractTarball(response, expectedChecksum, binPath, ca
33354
33355
  if (actualSha256 !== expectedChecksum) throw new UserError(`[cloudflared] SHA256 mismatch for downloaded cloudflared tarball.
33355
33356
 
33356
33357
  Expected: ${expectedChecksum}
33357
- Actual: ${actualSha256}`);
33358
+ Actual: ${actualSha256}`, { telemetryMessage: "tunnel cloudflared tarball checksum mismatch" });
33358
33359
  }
33359
33360
  writeFileSync(tempTarPath, buffer$1);
33360
33361
  try {
@@ -33380,7 +33381,7 @@ async function downloadBinary(response, expectedChecksum, binPath) {
33380
33381
  if (actualSha256 !== expectedChecksum) throw new UserError(`[cloudflared] SHA256 mismatch for downloaded cloudflared binary.
33381
33382
 
33382
33383
  Expected: ${expectedChecksum}
33383
- Actual: ${actualSha256}`);
33384
+ Actual: ${actualSha256}`, { telemetryMessage: "tunnel cloudflared binary checksum mismatch" });
33384
33385
  }
33385
33386
  writeFileAtomic(binPath, buffer$1);
33386
33387
  }
@@ -33391,7 +33392,7 @@ async function getCloudflaredPath(options) {
33391
33392
  if (envPath) {
33392
33393
  if (!existsSync(envPath)) throw new UserError(`CLOUDFLARED_PATH is set to "${envPath}" but the file does not exist.
33393
33394
 
33394
- Please ensure the path points to a valid cloudflared binary.`);
33395
+ Please ensure the path points to a valid cloudflared binary.`, { telemetryMessage: "tunnel cloudflared env path missing" });
33395
33396
  logger?.debug(`Using cloudflared from CLOUDFLARED_PATH: ${envPath}`);
33396
33397
  return envPath;
33397
33398
  }
@@ -33417,7 +33418,7 @@ Please ensure the path points to a valid cloudflared binary.`);
33417
33418
  You can install it manually from:
33418
33419
  https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/downloads/
33419
33420
 
33420
- Then either add it to your PATH or set CLOUDFLARED_PATH.`);
33421
+ Then either add it to your PATH or set CLOUDFLARED_PATH.`, { telemetryMessage: "tunnel cloudflared download declined" });
33421
33422
  if (existsSync(binPath)) {
33422
33423
  const cacheDir = removeCloudflaredCache(versionInfo.version);
33423
33424
  if (cacheDir) logger?.log(`Removed cloudflared cache: ${cacheDir}`);
@@ -33623,7 +33624,7 @@ ${stderrOutput || "(no output)"}
33623
33624
 
33624
33625
  The local dev server started at ${origin.href}.
33625
33626
  ` + (isQuickTunnelRateLimited ? "Cloudflare Quick Tunnel creation was rate limited. Try again in a few minutes, or use a named tunnel if you need more reliable access." : `Check the cloudflared output above for more details, and verify that ${origin.href} is reachable from this machine if this keeps happening.`);
33626
- if (isQuickTunnelRateLimited) return new UserError(errorMessage);
33627
+ if (isQuickTunnelRateLimited) return new UserError(errorMessage, { telemetryMessage: false });
33627
33628
  return new Error(errorMessage);
33628
33629
  }
33629
33630
  __name(createTunnelStartupError, "createTunnelStartupError");
@@ -34089,8 +34090,8 @@ const postfixRE = /[?#].*$/;
34089
34090
  function cleanUrl(url) {
34090
34091
  return url.replace(postfixRE, "");
34091
34092
  }
34092
- function withTrailingSlash(path$1) {
34093
- return path$1.endsWith("/") ? path$1 : `${path$1}/`;
34093
+ function withTrailingSlash(path$2) {
34094
+ return path$2.endsWith("/") ? path$2 : `${path$2}/`;
34094
34095
  }
34095
34096
  function createRequestHandler(handler) {
34096
34097
  return async (req, res, next) => {
@@ -39487,15 +39488,15 @@ function hasTrailingSlash(input = "", respectQueryAndFragment) {
39487
39488
  function withTrailingSlash$1(input = "", respectQueryAndFragment) {
39488
39489
  if (!respectQueryAndFragment) return input.endsWith("/") ? input : input + "/";
39489
39490
  if (hasTrailingSlash(input, true)) return input || "/";
39490
- let path$1 = input;
39491
+ let path$2 = input;
39491
39492
  let fragment = "";
39492
39493
  const fragmentIndex = input.indexOf("#");
39493
39494
  if (fragmentIndex >= 0) {
39494
- path$1 = input.slice(0, fragmentIndex);
39495
+ path$2 = input.slice(0, fragmentIndex);
39495
39496
  fragment = input.slice(fragmentIndex);
39496
- if (!path$1) return fragment;
39497
+ if (!path$2) return fragment;
39497
39498
  }
39498
- const [s0, ...s] = path$1.split("?");
39499
+ const [s0, ...s] = path$2.split("?");
39499
39500
  return s0 + "/" + (s.length > 0 ? `?${s.join("?")}` : "") + fragment;
39500
39501
  }
39501
39502
  function isNonEmptyURL(url) {
@@ -39521,8 +39522,8 @@ const isAbsolute$1 = function(p$1) {
39521
39522
  //#endregion
39522
39523
  //#region ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
39523
39524
  const BUILTIN_MODULES = new Set(builtinModules);
39524
- function normalizeSlash(path$1) {
39525
- return path$1.replace(/\\/g, "/");
39525
+ function normalizeSlash(path$2) {
39526
+ return path$2.replace(/\\/g, "/");
39526
39527
  }
39527
39528
  /**
39528
39529
  * @typedef ErrnoExceptionFields
@@ -39642,8 +39643,8 @@ codes.ERR_INVALID_PACKAGE_CONFIG = createError(
39642
39643
  * @param {string} [base]
39643
39644
  * @param {string} [message]
39644
39645
  */
39645
- (path$1, base, message) => {
39646
- return `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
39646
+ (path$2, base, message) => {
39647
+ return `Invalid package config ${path$2}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
39647
39648
  },
39648
39649
  Error
39649
39650
  );
@@ -39673,8 +39674,8 @@ codes.ERR_MODULE_NOT_FOUND = createError(
39673
39674
  * @param {string} base
39674
39675
  * @param {boolean} [exactUrl]
39675
39676
  */
39676
- (path$1, base, exactUrl = false) => {
39677
- return `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`;
39677
+ (path$2, base, exactUrl = false) => {
39678
+ return `Cannot find ${exactUrl ? "module" : "package"} '${path$2}' imported from ${base}`;
39678
39679
  },
39679
39680
  Error
39680
39681
  );
@@ -39712,8 +39713,8 @@ codes.ERR_UNKNOWN_FILE_EXTENSION = createError(
39712
39713
  * @param {string} extension
39713
39714
  * @param {string} path
39714
39715
  */
39715
- (extension, path$1) => {
39716
- return `Unknown file extension "${extension}" for ${path$1}`;
39716
+ (extension, path$2) => {
39717
+ return `Unknown file extension "${extension}" for ${path$2}`;
39717
39718
  },
39718
39719
  TypeError
39719
39720
  );
@@ -39870,7 +39871,7 @@ function read(jsonPath, { base, specifier }) {
39870
39871
  /** @type {string | undefined} */
39871
39872
  let string;
39872
39873
  try {
39873
- string = fs.readFileSync(path3.toNamespacedPath(jsonPath), "utf8");
39874
+ string = fs.readFileSync(path.toNamespacedPath(jsonPath), "utf8");
39874
39875
  } catch (error) {
39875
39876
  const exception = error;
39876
39877
  if (exception.code !== "ENOENT") throw exception;
@@ -40076,15 +40077,15 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
40076
40077
  const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
40077
40078
  const basePath = fileURLToPath(base);
40078
40079
  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");
40079
- 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");
40080
+ 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");
40080
40081
  }
40081
40082
  /**
40082
40083
  * @param {string} path
40083
40084
  * @returns {Stats | undefined}
40084
40085
  */
40085
- function tryStatSync(path$1) {
40086
+ function tryStatSync(path$2) {
40086
40087
  try {
40087
- return statSync(path$1);
40088
+ return statSync(path$2);
40088
40089
  } catch {}
40089
40090
  }
40090
40091
  /**
@@ -40183,7 +40184,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
40183
40184
  {
40184
40185
  const real = realpathSync(filePath);
40185
40186
  const { search, hash } = resolved;
40186
- resolved = pathToFileURL(real + (filePath.endsWith(path3.sep) ? "/" : ""));
40187
+ resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? "/" : ""));
40187
40188
  resolved.search = search;
40188
40189
  resolved.hash = hash;
40189
40190
  }
@@ -42560,9 +42561,9 @@ function constructHeaders({ headers, headersFile, logger }) {
42560
42561
 
42561
42562
  //#endregion
42562
42563
  //#region ../workers-shared/utils/configuration/validateURL.ts
42563
- const extractPathname = (path$1 = "/", includeSearch, includeHash) => {
42564
- if (!path$1.startsWith("/")) path$1 = `/${path$1}`;
42565
- const url = new URL(`//${path$1}`, "relative://");
42564
+ const extractPathname = (path$2 = "/", includeSearch, includeHash) => {
42565
+ if (!path$2.startsWith("/")) path$2 = `/${path$2}`;
42566
+ const url = new URL(`//${path$2}`, "relative://");
42566
42567
  return `${url.pathname}${includeSearch ? url.search : ""}${includeHash ? url.hash : ""}`;
42567
42568
  };
42568
42569
  const URL_REGEX = /^https:\/\/+(?<host>[^/]+)\/?(?<path>.*)/;
@@ -42619,7 +42620,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
42619
42620
  lineNumber: i$1 + 1,
42620
42621
  message: "No headers specified"
42621
42622
  });
42622
- const [path$1, pathError] = validateUrl(line, false, true);
42623
+ const [path$2, pathError] = validateUrl(line, false, true);
42623
42624
  if (pathError) {
42624
42625
  invalid.push({
42625
42626
  line,
@@ -42630,7 +42631,7 @@ function parseHeaders(input, { maxRules = MAX_HEADER_RULES, maxLineLength = MAX_
42630
42631
  continue;
42631
42632
  }
42632
42633
  rule = {
42633
- path: path$1,
42634
+ path: path$2,
42634
42635
  line,
42635
42636
  headers: {},
42636
42637
  unsetHeaders: []
@@ -42921,13 +42922,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
42921
42922
  const throwError = (message, Ctor) => {
42922
42923
  throw new Ctor(message);
42923
42924
  };
42924
- const checkPath = (path$1, originalPath, doThrow) => {
42925
- if (!isString$1(path$1)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
42926
- if (!path$1) return doThrow(`path must not be empty`, TypeError);
42927
- if (checkPath.isNotRelative(path$1)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
42925
+ const checkPath = (path$2, originalPath, doThrow) => {
42926
+ if (!isString$1(path$2)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
42927
+ if (!path$2) return doThrow(`path must not be empty`, TypeError);
42928
+ if (checkPath.isNotRelative(path$2)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
42928
42929
  return true;
42929
42930
  };
42930
- const isNotRelative = (path$1) => REGEX_TEST_INVALID_PATH.test(path$1);
42931
+ const isNotRelative = (path$2) => REGEX_TEST_INVALID_PATH.test(path$2);
42931
42932
  checkPath.isNotRelative = isNotRelative;
42932
42933
  checkPath.convert = (p$1) => p$1;
42933
42934
  var Ignore = class {
@@ -42963,13 +42964,13 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
42963
42964
  addPattern(pattern) {
42964
42965
  return this.add(pattern);
42965
42966
  }
42966
- _testOne(path$1, checkUnignored) {
42967
+ _testOne(path$2, checkUnignored) {
42967
42968
  let ignored = false;
42968
42969
  let unignored = false;
42969
42970
  this._rules.forEach((rule) => {
42970
42971
  const { negative } = rule;
42971
42972
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
42972
- if (rule.regex.test(path$1)) {
42973
+ if (rule.regex.test(path$2)) {
42973
42974
  ignored = !negative;
42974
42975
  unignored = negative;
42975
42976
  }
@@ -42980,33 +42981,33 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
42980
42981
  };
42981
42982
  }
42982
42983
  _test(originalPath, cache$2, checkUnignored, slices) {
42983
- const path$1 = originalPath && checkPath.convert(originalPath);
42984
- checkPath(path$1, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
42985
- return this._t(path$1, cache$2, checkUnignored, slices);
42984
+ const path$2 = originalPath && checkPath.convert(originalPath);
42985
+ checkPath(path$2, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError);
42986
+ return this._t(path$2, cache$2, checkUnignored, slices);
42986
42987
  }
42987
- _t(path$1, cache$2, checkUnignored, slices) {
42988
- if (path$1 in cache$2) return cache$2[path$1];
42989
- if (!slices) slices = path$1.split(SLASH);
42988
+ _t(path$2, cache$2, checkUnignored, slices) {
42989
+ if (path$2 in cache$2) return cache$2[path$2];
42990
+ if (!slices) slices = path$2.split(SLASH);
42990
42991
  slices.pop();
42991
- if (!slices.length) return cache$2[path$1] = this._testOne(path$1, checkUnignored);
42992
+ if (!slices.length) return cache$2[path$2] = this._testOne(path$2, checkUnignored);
42992
42993
  const parent = this._t(slices.join(SLASH) + SLASH, cache$2, checkUnignored, slices);
42993
- return cache$2[path$1] = parent.ignored ? parent : this._testOne(path$1, checkUnignored);
42994
+ return cache$2[path$2] = parent.ignored ? parent : this._testOne(path$2, checkUnignored);
42994
42995
  }
42995
- ignores(path$1) {
42996
- return this._test(path$1, this._ignoreCache, false).ignored;
42996
+ ignores(path$2) {
42997
+ return this._test(path$2, this._ignoreCache, false).ignored;
42997
42998
  }
42998
42999
  createFilter() {
42999
- return (path$1) => !this.ignores(path$1);
43000
+ return (path$2) => !this.ignores(path$2);
43000
43001
  }
43001
43002
  filter(paths) {
43002
43003
  return makeArray(paths).filter(this.createFilter());
43003
43004
  }
43004
- test(path$1) {
43005
- return this._test(path$1, this._testCache, true);
43005
+ test(path$2) {
43006
+ return this._test(path$2, this._testCache, true);
43006
43007
  }
43007
43008
  };
43008
43009
  const factory = (options) => new Ignore(options);
43009
- const isPathValid = (path$1) => checkPath(path$1 && checkPath.convert(path$1), path$1, RETURN_FALSE);
43010
+ const isPathValid = (path$2) => checkPath(path$2 && checkPath.convert(path$2), path$2, RETURN_FALSE);
43010
43011
  factory.isPathValid = isPathValid;
43011
43012
  factory.default = factory;
43012
43013
  module.exports = factory;
@@ -43015,7 +43016,7 @@ var require_ignore = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/ig
43015
43016
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
43016
43017
  checkPath.convert = makePosix;
43017
43018
  const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
43018
- checkPath.isNotRelative = (path$1) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path$1) || isNotRelative(path$1);
43019
+ checkPath.isNotRelative = (path$2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path$2) || isNotRelative(path$2);
43019
43020
  }
43020
43021
  }) });
43021
43022
 
@@ -44370,11 +44371,11 @@ var Mime = class {
44370
44371
  }
44371
44372
  return this;
44372
44373
  }
44373
- getType(path$1) {
44374
- if (typeof path$1 !== "string") return null;
44375
- const last = path$1.replace(/^.*[/\\]/s, "").toLowerCase();
44374
+ getType(path$2) {
44375
+ if (typeof path$2 !== "string") return null;
44376
+ const last = path$2.replace(/^.*[/\\]/s, "").toLowerCase();
44376
44377
  const ext = last.replace(/^.*\./s, "").toLowerCase();
44377
- const hasPath = last.length < path$1.length;
44378
+ const hasPath = last.length < path$2.length;
44378
44379
  if (!(ext.length < last.length - 1) && hasPath) return null;
44379
44380
  return __classPrivateFieldGet(this, _Mime_extensionToType, "f").get(ext) ?? null;
44380
44381
  }
@@ -44708,8 +44709,8 @@ function getErrorMap() {
44708
44709
  //#endregion
44709
44710
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
44710
44711
  const makeIssue = (params) => {
44711
- const { data: data$1, path: path$1, errorMaps, issueData } = params;
44712
- const fullPath = [...path$1, ...issueData.path || []];
44712
+ const { data: data$1, path: path$2, errorMaps, issueData } = params;
44713
+ const fullPath = [...path$2, ...issueData.path || []];
44713
44714
  const fullIssue = {
44714
44715
  ...issueData,
44715
44716
  path: fullPath
@@ -44821,11 +44822,11 @@ var errorUtil;
44821
44822
  //#endregion
44822
44823
  //#region ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js
44823
44824
  var ParseInputLazyPath = class {
44824
- constructor(parent, value, path$1, key) {
44825
+ constructor(parent, value, path$2, key) {
44825
44826
  this._cachedPath = [];
44826
44827
  this.parent = parent;
44827
44828
  this.data = value;
44828
- this._path = path$1;
44829
+ this._path = path$2;
44829
44830
  this._key = key;
44830
44831
  }
44831
44832
  get path() {
@@ -48841,11 +48842,11 @@ const getQueryString = (params) => {
48841
48842
  };
48842
48843
  const getUrl = (config, options) => {
48843
48844
  const encoder$1 = config.ENCODE_PATH || encodeURI;
48844
- const path$1 = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
48845
+ const path$2 = options.url.replace("{api-version}", config.VERSION).replace(/{(.*?)}/g, (substring, group) => {
48845
48846
  if (options.path?.hasOwnProperty(group)) return encoder$1(String(options.path[group]));
48846
48847
  return substring;
48847
48848
  });
48848
- const url = `${config.BASE}${path$1}`;
48849
+ const url = `${config.BASE}${path$2}`;
48849
48850
  if (options.query) return `${url}${getQueryString(options.query)}`;
48850
48851
  return url;
48851
48852
  };
@@ -49435,7 +49436,7 @@ function dockerBuild(dockerPath, options) {
49435
49436
  if (code === 0) resolve$4();
49436
49437
  else if (!errorHandled) {
49437
49438
  errorHandled = true;
49438
- reject(new UserError(`Docker build exited with code: ${code}`));
49439
+ reject(new UserError(`Docker build exited with code: ${code}`, { telemetryMessage: false }));
49439
49440
  }
49440
49441
  });
49441
49442
  child.on("error", (err) => {
@@ -49505,7 +49506,7 @@ async function dockerLoginImageRegistry(pathToDocker, domain) {
49505
49506
  await new Promise((resolve$4, reject) => {
49506
49507
  child.on("close", (code) => {
49507
49508
  if (code === 0) resolve$4();
49508
- else reject(new UserError(`Login failed with code: ${code}`));
49509
+ else reject(new UserError(`Login failed with code: ${code}`, { telemetryMessage: false }));
49509
49510
  });
49510
49511
  });
49511
49512
  }
@@ -49544,7 +49545,7 @@ async function dockerImageInspect(dockerPath, options) {
49544
49545
  proc.stdout.on("data", (chunk) => stdout += chunk);
49545
49546
  proc.stderr.on("data", (chunk) => stderr += chunk);
49546
49547
  proc.on("close", (code) => {
49547
- if (code !== 0) return reject(new UserError(`failed inspecting image locally: ${stderr.trim()}`));
49548
+ if (code !== 0) return reject(new UserError(`failed inspecting image locally: ${stderr.trim()}`, { telemetryMessage: false }));
49548
49549
  resolve$4(stdout.trim());
49549
49550
  });
49550
49551
  proc.on("error", (err) => reject(err));
@@ -49572,13 +49573,13 @@ const runDockerCmd = (dockerPath, args, stdio) => {
49572
49573
  if (code === 0 || aborted) resolve$4({ aborted });
49573
49574
  else if (!errorHandled) {
49574
49575
  errorHandled = true;
49575
- reject(new UserError(`Docker command exited with code: ${code}`));
49576
+ reject(new UserError(`Docker command exited with code: ${code}`, { telemetryMessage: false }));
49576
49577
  }
49577
49578
  });
49578
49579
  child.on("error", (err) => {
49579
49580
  if (!errorHandled) {
49580
49581
  errorHandled = true;
49581
- reject(new UserError(`Docker command failed: ${err.message}`));
49582
+ reject(new UserError(`Docker command failed: ${err.message}`, { telemetryMessage: false }));
49582
49583
  }
49583
49584
  });
49584
49585
  return {
@@ -49596,7 +49597,7 @@ const runDockerCmdWithOutput = (dockerPath, args) => {
49596
49597
  try {
49597
49598
  return execFileSync(dockerPath, args, { encoding: "utf8" }).trim();
49598
49599
  } catch (error) {
49599
- throw new UserError(`Failed running docker command: ${error.message}. Command: ${dockerPath} ${args.join(" ")}`);
49600
+ throw new UserError(`Failed running docker command: ${error.message}. Command: ${dockerPath} ${args.join(" ")}`, { telemetryMessage: false });
49600
49601
  }
49601
49602
  };
49602
49603
  /** Checks whether docker is running on the system */
@@ -49615,7 +49616,7 @@ const isDockerRunning = async (dockerPath) => {
49615
49616
  /** throws when docker is not installed */
49616
49617
  const verifyDockerInstalled = async (dockerPath, isDev = true) => {
49617
49618
  if (!await isDockerRunning(dockerPath)) throw new UserError(`The Docker CLI could not be launched. Please ensure that the Docker CLI is installed and the daemon is running.
49618
- Other container tooling that is compatible with the Docker CLI and engine may work, but is not yet guaranteed to do so. You can specify an executable with the environment variable WRANGLER_DOCKER_BIN and a socket with DOCKER_HOST.${isDev ? "\nTo suppress this error if you do not intend on triggering any container instances, set dev.enable_containers to false in your Wrangler config or passing in --enable-containers=false." : ""}`);
49619
+ Other container tooling that is compatible with the Docker CLI and engine may work, but is not yet guaranteed to do so. You can specify an executable with the environment variable WRANGLER_DOCKER_BIN and a socket with DOCKER_HOST.${isDev ? "\nTo suppress this error if you do not intend on triggering any container instances, set dev.enable_containers to false in your Wrangler config or passing in --enable-containers=false." : ""}`, { telemetryMessage: false });
49619
49620
  };
49620
49621
  /**
49621
49622
  * Kills and removes any containers which come from the given image tag
@@ -49669,7 +49670,7 @@ async function checkExposedPorts(dockerPath, options) {
49669
49670
  imageTag: options.image_tag,
49670
49671
  formatString: "{{ len .Config.ExposedPorts }}"
49671
49672
  }) === "0") throw new UserError(`The container "${options.class_name}" does not expose any ports. In your Dockerfile, please expose any ports you intend to connect to.\nFor additional information please see: https://developers.cloudflare.com/containers/local-dev/#exposing-ports.
49672
- `);
49673
+ `, { telemetryMessage: false });
49673
49674
  }
49674
49675
  /**
49675
49676
  * Generates a random container build id
@@ -49786,7 +49787,7 @@ async function pullImage(dockerPath, options, logger) {
49786
49787
  async function prepareContainerImagesForDev(args) {
49787
49788
  const { dockerPath, containerOptions, onContainerImagePreparationStart, onContainerImagePreparationEnd } = args;
49788
49789
  let aborted = false;
49789
- if (process.platform === "win32") throw new UserError("Local development with containers is currently not supported on Windows. You should use WSL instead. You can also set `enable_containers` to false if you do not need to develop the container part of your application.");
49790
+ if (process.platform === "win32") throw new UserError("Local development with containers is currently not supported on Windows. You should use WSL instead. You can also set `enable_containers` to false if you do not need to develop the container part of your application.", { telemetryMessage: false });
49790
49791
  await verifyDockerInstalled(dockerPath);
49791
49792
  for (const options of containerOptions) {
49792
49793
  if ("dockerfile" in options) {
@@ -49860,7 +49861,7 @@ function getContainerOptions(options) {
49860
49861
  return containersConfig.map((container) => {
49861
49862
  if (isDockerfile(container.image, configPath)) return {
49862
49863
  dockerfile: container.image,
49863
- image_build_context: container.image_build_context ?? path3.dirname(container.image),
49864
+ image_build_context: container.image_build_context ?? path.dirname(container.image),
49864
49865
  image_vars: container.image_vars,
49865
49866
  class_name: container.class_name,
49866
49867
  image_tag: getDevContainerImageName(container.class_name, containerBuildId)
@@ -49876,26 +49877,26 @@ function getContainerOptions(options) {
49876
49877
  //#endregion
49877
49878
  //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.3/node_modules/fdir/dist/index.mjs
49878
49879
  var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
49879
- function cleanPath(path$1) {
49880
- let normalized = normalize(path$1);
49880
+ function cleanPath(path$2) {
49881
+ let normalized = normalize(path$2);
49881
49882
  if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
49882
49883
  return normalized;
49883
49884
  }
49884
49885
  const SLASHES_REGEX = /[\\/]/g;
49885
- function convertSlashes(path$1, separator) {
49886
- return path$1.replace(SLASHES_REGEX, separator);
49886
+ function convertSlashes(path$2, separator) {
49887
+ return path$2.replace(SLASHES_REGEX, separator);
49887
49888
  }
49888
49889
  const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
49889
- function isRootDirectory(path$1) {
49890
- return path$1 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$1);
49890
+ function isRootDirectory(path$2) {
49891
+ return path$2 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path$2);
49891
49892
  }
49892
- function normalizePath$1(path$1, options) {
49893
+ function normalizePath$1(path$2, options) {
49893
49894
  const { resolvePaths, normalizePath: normalizePath$1$1, pathSeparator } = options;
49894
- const pathNeedsCleaning = process.platform === "win32" && path$1.includes("/") || path$1.startsWith(".");
49895
- if (resolvePaths) path$1 = resolve$1(path$1);
49896
- if (normalizePath$1$1 || pathNeedsCleaning) path$1 = cleanPath(path$1);
49897
- if (path$1 === ".") return "";
49898
- return convertSlashes(path$1[path$1.length - 1] !== pathSeparator ? path$1 + pathSeparator : path$1, pathSeparator);
49895
+ const pathNeedsCleaning = process.platform === "win32" && path$2.includes("/") || path$2.startsWith(".");
49896
+ if (resolvePaths) path$2 = resolve$1(path$2);
49897
+ if (normalizePath$1$1 || pathNeedsCleaning) path$2 = cleanPath(path$2);
49898
+ if (path$2 === ".") return "";
49899
+ return convertSlashes(path$2[path$2.length - 1] !== pathSeparator ? path$2 + pathSeparator : path$2, pathSeparator);
49899
49900
  }
49900
49901
  function joinPathWithBasePath(filename, directoryPath) {
49901
49902
  return directoryPath + filename;
@@ -49931,8 +49932,8 @@ const pushDirectory = (directoryPath, paths) => {
49931
49932
  paths.push(directoryPath || ".");
49932
49933
  };
49933
49934
  const pushDirectoryFilter = (directoryPath, paths, filters) => {
49934
- const path$1 = directoryPath || ".";
49935
- if (filters.every((filter) => filter(path$1, true))) paths.push(path$1);
49935
+ const path$2 = directoryPath || ".";
49936
+ if (filters.every((filter) => filter(path$2, true))) paths.push(path$2);
49936
49937
  };
49937
49938
  const empty$2 = () => {};
49938
49939
  function build$6(root, options) {
@@ -49981,26 +49982,26 @@ const empty = () => {};
49981
49982
  function build$3(options) {
49982
49983
  return options.group ? groupFiles : empty;
49983
49984
  }
49984
- const resolveSymlinksAsync = function(path$1, state, callback$1) {
49985
+ const resolveSymlinksAsync = function(path$2, state, callback$1) {
49985
49986
  const { queue, fs: fs$3, options: { suppressErrors } } = state;
49986
49987
  queue.enqueue();
49987
- fs$3.realpath(path$1, (error, resolvedPath) => {
49988
+ fs$3.realpath(path$2, (error, resolvedPath) => {
49988
49989
  if (error) return queue.dequeue(suppressErrors ? null : error, state);
49989
49990
  fs$3.stat(resolvedPath, (error$1, stat) => {
49990
49991
  if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
49991
- if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return queue.dequeue(null, state);
49992
+ if (stat.isDirectory() && isRecursive(path$2, resolvedPath, state)) return queue.dequeue(null, state);
49992
49993
  callback$1(stat, resolvedPath);
49993
49994
  queue.dequeue(null, state);
49994
49995
  });
49995
49996
  });
49996
49997
  };
49997
- const resolveSymlinks = function(path$1, state, callback$1) {
49998
+ const resolveSymlinks = function(path$2, state, callback$1) {
49998
49999
  const { queue, fs: fs$3, options: { suppressErrors } } = state;
49999
50000
  queue.enqueue();
50000
50001
  try {
50001
- const resolvedPath = fs$3.realpathSync(path$1);
50002
+ const resolvedPath = fs$3.realpathSync(path$2);
50002
50003
  const stat = fs$3.statSync(resolvedPath);
50003
- if (stat.isDirectory() && isRecursive(path$1, resolvedPath, state)) return;
50004
+ if (stat.isDirectory() && isRecursive(path$2, resolvedPath, state)) return;
50004
50005
  callback$1(stat, resolvedPath);
50005
50006
  } catch (e) {
50006
50007
  if (!suppressErrors) throw e;
@@ -50010,16 +50011,16 @@ function build$2(options, isSynchronous) {
50010
50011
  if (!options.resolveSymlinks || options.excludeSymlinks) return null;
50011
50012
  return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
50012
50013
  }
50013
- function isRecursive(path$1, resolved, state) {
50014
+ function isRecursive(path$2, resolved, state) {
50014
50015
  if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
50015
- let parent = dirname$1(path$1);
50016
+ let parent = dirname$1(path$2);
50016
50017
  let depth$1 = 1;
50017
50018
  while (parent !== state.root && depth$1 < 2) {
50018
50019
  const resolvedPath = state.symlinks.get(parent);
50019
50020
  if (!!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath))) depth$1++;
50020
50021
  else parent = dirname$1(parent);
50021
50022
  }
50022
- state.symlinks.set(path$1, resolved);
50023
+ state.symlinks.set(path$2, resolved);
50023
50024
  return depth$1 > 1;
50024
50025
  }
50025
50026
  function isRecursiveUsingRealPaths(resolved, state) {
@@ -50200,19 +50201,19 @@ var Walker = class {
50200
50201
  const filename = this.joinPath(entry.name, directoryPath);
50201
50202
  this.pushFile(filename, files, this.state.counts, filters);
50202
50203
  } else if (entry.isDirectory()) {
50203
- let path$1 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
50204
- if (exclude && exclude(entry.name, path$1)) continue;
50205
- this.pushDirectory(path$1, paths, filters);
50206
- this.walkDirectory(this.state, path$1, path$1, depth$1 - 1, this.walk);
50204
+ let path$2 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
50205
+ if (exclude && exclude(entry.name, path$2)) continue;
50206
+ this.pushDirectory(path$2, paths, filters);
50207
+ this.walkDirectory(this.state, path$2, path$2, depth$1 - 1, this.walk);
50207
50208
  } else if (this.resolveSymlink && entry.isSymbolicLink()) {
50208
- let path$1 = joinPathWithBasePath(entry.name, directoryPath);
50209
- this.resolveSymlink(path$1, this.state, (stat, resolvedPath) => {
50209
+ let path$2 = joinPathWithBasePath(entry.name, directoryPath);
50210
+ this.resolveSymlink(path$2, this.state, (stat, resolvedPath) => {
50210
50211
  if (stat.isDirectory()) {
50211
50212
  resolvedPath = normalizePath$1(resolvedPath, this.state.options);
50212
- if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$1 + pathSeparator)) return;
50213
- this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$1 + pathSeparator, depth$1 - 1, this.walk);
50213
+ if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path$2 + pathSeparator)) return;
50214
+ this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path$2 + pathSeparator, depth$1 - 1, this.walk);
50214
50215
  } else {
50215
- resolvedPath = useRealPaths ? resolvedPath : path$1;
50216
+ resolvedPath = useRealPaths ? resolvedPath : path$2;
50216
50217
  const filename = basename(resolvedPath);
50217
50218
  const directoryPath$1 = normalizePath$1(dirname$1(resolvedPath), this.state.options);
50218
50219
  resolvedPath = this.joinPath(filename, directoryPath$1);
@@ -50377,7 +50378,7 @@ var Builder = class {
50377
50378
  isMatch = globFn(patterns, ...options);
50378
50379
  this.globCache[patterns.join("\0")] = isMatch;
50379
50380
  }
50380
- this.options.filters.push((path$1) => isMatch(path$1));
50381
+ this.options.filters.push((path$2) => isMatch(path$2));
50381
50382
  return this;
50382
50383
  }
50383
50384
  };
@@ -50588,8 +50589,8 @@ var require_utils = /* @__PURE__ */ __commonJS$1({ "../../node_modules/.pnpm/pic
50588
50589
  if (state.negated === true) output = `(?:^(?!${output}).*$)`;
50589
50590
  return output;
50590
50591
  };
50591
- exports.basename = (path$1, { windows } = {}) => {
50592
- const segs = path$1.split(windows ? /[\\/]/ : "/");
50592
+ exports.basename = (path$2, { windows } = {}) => {
50593
+ const segs = path$2.split(windows ? /[\\/]/ : "/");
50593
50594
  const last = segs[segs.length - 1];
50594
50595
  if (last === "") return segs[segs.length - 2];
50595
50596
  return last;
@@ -52124,15 +52125,15 @@ function buildRelative(cwd, root) {
52124
52125
  };
52125
52126
  }
52126
52127
  const splitPatternOptions = { parts: true };
52127
- function splitPattern(path$1) {
52128
+ function splitPattern(path$1$1) {
52128
52129
  var _result$parts;
52129
- const result = import_picomatch.default.scan(path$1, splitPatternOptions);
52130
- return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1];
52130
+ const result = import_picomatch.default.scan(path$1$1, splitPatternOptions);
52131
+ return ((_result$parts = result.parts) === null || _result$parts === void 0 ? void 0 : _result$parts.length) ? result.parts : [path$1$1];
52131
52132
  }
52132
52133
  const POSIX_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g;
52133
52134
  const WIN32_UNESCAPED_GLOB_SYMBOLS = /(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g;
52134
- const escapePosixPath = (path$1) => path$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
52135
- const escapeWin32Path = (path$1) => path$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
52135
+ const escapePosixPath = (path$1$1) => path$1$1.replace(POSIX_UNESCAPED_GLOB_SYMBOLS, "\\$&");
52136
+ const escapeWin32Path = (path$1$1) => path$1$1.replace(WIN32_UNESCAPED_GLOB_SYMBOLS, "\\$&");
52136
52137
  /**
52137
52138
  * Escapes a path's special characters depending on the platform.
52138
52139
  * @see {@link https://superchupu.dev/tinyglobby/documentation#escapePath}
@@ -52167,7 +52168,7 @@ function normalizePattern(pattern, expandDirectories, cwd, props, isIgnore) {
52167
52168
  if (pattern.endsWith("/")) result = pattern.slice(0, -1);
52168
52169
  if (!result.endsWith("*") && expandDirectories) result += "/**";
52169
52170
  const escapedCwd = escapePath(cwd);
52170
- if (path.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
52171
+ if (path$1.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
52171
52172
  else result = posix.normalize(result);
52172
52173
  const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
52173
52174
  const parts = splitPattern(result);
@@ -52226,15 +52227,15 @@ function processPatterns({ patterns = ["**/*"], ignore: ignore$1 = [], expandDir
52226
52227
  }
52227
52228
  function formatPaths(paths, relative$2) {
52228
52229
  for (let i$1 = paths.length - 1; i$1 >= 0; i$1--) {
52229
- const path$1 = paths[i$1];
52230
- paths[i$1] = relative$2(path$1);
52230
+ const path$1$1 = paths[i$1];
52231
+ paths[i$1] = relative$2(path$1$1);
52231
52232
  }
52232
52233
  return paths;
52233
52234
  }
52234
52235
  function normalizeCwd(cwd) {
52235
52236
  if (!cwd) return process.cwd().replace(BACKSLASHES, "/");
52236
52237
  if (cwd instanceof URL) return fileURLToPath$1(cwd).replace(BACKSLASHES, "/");
52237
- return path.resolve(cwd).replace(BACKSLASHES, "/");
52238
+ return path$1.resolve(cwd).replace(BACKSLASHES, "/");
52238
52239
  }
52239
52240
  function getCrawler(patterns, inputOptions = {}) {
52240
52241
  const options = process.env.TINYGLOBBY_DEBUG ? {
@@ -52279,9 +52280,9 @@ function getCrawler(patterns, inputOptions = {}) {
52279
52280
  const formatExclude = options.absolute ? format$2 : buildFormat(cwd, props.root, true);
52280
52281
  const fdirOptions = {
52281
52282
  filters: [options.debug ? (p$1, isDirectory$1) => {
52282
- const path$1 = format$2(p$1, isDirectory$1);
52283
- const matches = matcher(path$1);
52284
- if (matches) log(`matched ${path$1}`);
52283
+ const path$1$1 = format$2(p$1, isDirectory$1);
52284
+ const matches = matcher(path$1$1);
52285
+ if (matches) log(`matched ${path$1$1}`);
52285
52286
  return matches;
52286
52287
  } : (p$1, isDirectory$1) => matcher(format$2(p$1, isDirectory$1))],
52287
52288
  exclude: options.debug ? (_, p$1) => {
@@ -52362,6 +52363,7 @@ async function getDevMiniflareOptions(ctx, viteDevServer) {
52362
52363
  {
52363
52364
  name: ROUTER_WORKER_NAME,
52364
52365
  compatibilityDate: INTERNAL_WORKERS_COMPATIBILITY_DATE,
52366
+ compatibilityFlags: ["enable_ctx_exports"],
52365
52367
  modulesRoot: miniflareModulesRoot,
52366
52368
  modules: [{
52367
52369
  type: "ESModule",
@@ -52550,7 +52552,9 @@ async function getDevMiniflareOptions(ctx, viteDevServer) {
52550
52552
  ...userWorkers
52551
52553
  ],
52552
52554
  async unsafeModuleFallbackService(request$2) {
52553
- const rawSpecifier = new URL(request$2.url).searchParams.get("rawSpecifier");
52555
+ const parsed = await parseModuleFallbackRequest(request$2);
52556
+ if (!parsed) return new Response$1("Invalid module fallback request", { status: 400 });
52557
+ const rawSpecifier = parsed.rawSpecifier;
52554
52558
  assert(rawSpecifier, `Unexpected error: no specifier in request to module fallback service.`);
52555
52559
  const match = additionalModuleRE.exec(rawSpecifier);
52556
52560
  assert(match, `Unexpected error: no match for module: ${rawSpecifier}.`);
@@ -52833,7 +52837,7 @@ const devPlugin = createPlugin("dev", (ctx) => {
52833
52837
  if ([...containerTagToOptionsMap.values()].some((opts) => "image_uri" in opts && new URL(`http://${opts.image_uri}`).hostname === getCloudflareContainerRegistry())) {
52834
52838
  const apiToken = process.env.CLOUDFLARE_API_TOKEN;
52835
52839
  const accountId = ctx.entryWorkerConfig?.account_id ?? process.env.CLOUDFLARE_ACCOUNT_ID;
52836
- if (!apiToken || !accountId) throw new UserError("To use images from the Cloudflare-managed registry with the Vite plugin, set the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables.\nThe API token requires Containers:Edit and Workers Scripts:Edit permissions.\nAlternatively, use a Dockerfile that references the image via FROM.");
52840
+ if (!apiToken || !accountId) throw new UserError("To use images from the Cloudflare-managed registry with the Vite plugin, set the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables.\nThe API token requires Containers:Edit and Workers Scripts:Edit permissions.\nAlternatively, use a Dockerfile that references the image via FROM.", { telemetryMessage: false });
52837
52841
  configureOpenAPIForContainerPull(accountId, apiToken);
52838
52842
  }
52839
52843
  await prepareContainerImagesForDev({
@@ -53101,7 +53105,7 @@ const previewPlugin = createPlugin("preview", (ctx) => {
53101
53105
  if ([...containerTagToOptionsMap.values()].some((opts) => "image_uri" in opts && new URL(`http://${opts.image_uri}`).hostname === getCloudflareContainerRegistry())) {
53102
53106
  const apiToken = process.env.CLOUDFLARE_API_TOKEN;
53103
53107
  const accountId = ctx.allWorkerConfigs[0]?.account_id ?? process.env.CLOUDFLARE_ACCOUNT_ID;
53104
- if (!apiToken || !accountId) throw new UserError("To use images from the Cloudflare-managed registry with the Vite plugin, set the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables.\nThe API token requires Containers:Edit and Workers Scripts:Edit permissions.\nAlternatively, use a Dockerfile that references the image via FROM.");
53108
+ if (!apiToken || !accountId) throw new UserError("To use images from the Cloudflare-managed registry with the Vite plugin, set the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables.\nThe API token requires Containers:Edit and Workers Scripts:Edit permissions.\nAlternatively, use a Dockerfile that references the image via FROM.", { telemetryMessage: false });
53105
53109
  configureOpenAPIForContainerPull(accountId, apiToken);
53106
53110
  }
53107
53111
  await prepareContainerImagesForDev({
@@ -53270,13 +53274,13 @@ const wslDefaultBrowser = async () => {
53270
53274
  const { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
53271
53275
  return stdout.trim();
53272
53276
  };
53273
- const convertWslPathToWindows = async (path$1) => {
53274
- if (/^[a-z]+:\/\//i.test(path$1)) return path$1;
53277
+ const convertWslPathToWindows = async (path$2) => {
53278
+ if (/^[a-z]+:\/\//i.test(path$2)) return path$2;
53275
53279
  try {
53276
- const { stdout } = await execFile$1("wslpath", ["-aw", path$1], { encoding: "utf8" });
53280
+ const { stdout } = await execFile$1("wslpath", ["-aw", path$2], { encoding: "utf8" });
53277
53281
  return stdout.trim();
53278
53282
  } catch {
53279
- return path$1;
53283
+ return path$2;
53280
53284
  }
53281
53285
  };
53282
53286
 
@@ -53462,8 +53466,8 @@ var is_in_ssh_default = isInSsh;
53462
53466
  //#endregion
53463
53467
  //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
53464
53468
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
53465
- const __dirname = import.meta.url ? path3.dirname(fileURLToPath(import.meta.url)) : "";
53466
- const localXdgOpenPath = path3.join(__dirname, "xdg-open");
53469
+ const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
53470
+ const localXdgOpenPath = path.join(__dirname, "xdg-open");
53467
53471
  const { platform, arch: arch$1 } = process$1;
53468
53472
  const tryEachApp = async (apps$1, opener) => {
53469
53473
  if (apps$1.length === 0) return;