wrangler 4.113.0 → 4.114.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.113.0",
3
+ "version": "4.114.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "assembly",
@@ -66,16 +66,16 @@
66
66
  "esbuild": "0.28.1",
67
67
  "path-to-regexp": "6.3.0",
68
68
  "unenv": "2.0.0-rc.24",
69
- "workerd": "1.20260721.1",
70
- "@cloudflare/unenv-preset": "2.16.1",
69
+ "workerd": "1.20260722.1",
71
70
  "@cloudflare/kv-asset-handler": "0.5.0",
72
- "miniflare": "4.20260721.0"
71
+ "@cloudflare/unenv-preset": "2.16.1",
72
+ "miniflare": "4.20260722.0"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@aws-sdk/client-s3": "^3.721.0",
76
76
  "@bomb.sh/tab": "^0.0.12",
77
77
  "@cloudflare/types": "6.18.4",
78
- "@cloudflare/workers-types": "^5.20260721.1",
78
+ "@cloudflare/workers-types": "^5.20260722.1",
79
79
  "@cspotcode/source-map-support": "0.8.1",
80
80
  "@netlify/build-info": "^10.5.1",
81
81
  "@sentry/node": "^7.86.0",
@@ -156,22 +156,22 @@
156
156
  "yargs": "^17.7.2",
157
157
  "zod": "4.4.3",
158
158
  "@cloudflare/autoconfig": "0.2.0",
159
- "@cloudflare/cli-shared-helpers": "0.1.16",
160
159
  "@cloudflare/codemod": "1.1.0",
160
+ "@cloudflare/cli-shared-helpers": "0.1.16",
161
161
  "@cloudflare/config": "0.3.0",
162
+ "@cloudflare/deploy-helpers": "0.6.1",
162
163
  "@cloudflare/containers-shared": "0.16.0",
163
- "@cloudflare/deploy-helpers": "0.6.0",
164
- "@cloudflare/runtime-types": "0.0.4",
165
- "@cloudflare/pages-shared": "^0.13.159",
166
- "@cloudflare/remote-bindings": "0.0.1",
167
- "@cloudflare/workers-auth": "0.5.1",
164
+ "@cloudflare/pages-shared": "^0.13.160",
165
+ "@cloudflare/runtime-types": "0.0.5",
166
+ "@cloudflare/remote-bindings": "0.0.2",
167
+ "@cloudflare/workers-auth": "0.5.2",
168
168
  "@cloudflare/workers-shared": "0.19.9",
169
169
  "@cloudflare/workers-utils": "0.28.0",
170
170
  "@cloudflare/workers-tsconfig": "0.0.0",
171
171
  "@cloudflare/workflows-shared": "0.12.1"
172
172
  },
173
173
  "peerDependencies": {
174
- "@cloudflare/workers-types": "^5.20260721.1"
174
+ "@cloudflare/workers-types": "^5.20260722.1"
175
175
  },
176
176
  "peerDependenciesMeta": {
177
177
  "@cloudflare/workers-types": {
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  createDeferred,
3
3
  type DeferredPromise,
4
+ isSameUserWorkerOrigin,
4
5
  rewriteUrlInHeaderValue,
5
6
  urlFromParts,
6
7
  } from "../../src/api/startDevWorker/utils";
@@ -182,12 +183,13 @@ export class ProxyWorker implements DurableObject {
182
183
  // we have crossed an async boundary, so proxyData may have changed
183
184
  // if proxyData.userWorkerUrl has changed, it means there is a new downstream UserWorker
184
185
  // and that this error is stale since it was for a request to the old UserWorker
185
- // so here we construct a newUserWorkerUrl so we can compare it to the (old) userWorkerUrl
186
- const newUserWorkerUrl =
187
- this.proxyData && urlFromParts(this.proxyData.userWorkerUrl);
188
-
189
- // only report errors if the downstream proxy has NOT changed
190
- if (userWorkerUrl.href === newUserWorkerUrl?.href) {
186
+ // only report the error if the request still targets the current
187
+ // UserWorker. isSameUserWorkerOrigin compares origin (not href) so a
188
+ // genuine error on a non-root path isn't misread as a reload — see
189
+ // its docs.
190
+ if (
191
+ isSameUserWorkerOrigin(userWorkerUrl, this.proxyData?.userWorkerUrl)
192
+ ) {
191
193
  void sendMessageToProxyController(this.env, {
192
194
  type: "error",
193
195
  error: {
@@ -38,6 +38,10 @@ function rewriteUrlInHeaderValue(value, from, to) {
38
38
  }
39
39
  );
40
40
  }
41
+ function isSameUserWorkerOrigin(requestUrl, parts) {
42
+ const currentUserWorkerUrl = parts && urlFromParts(parts);
43
+ return requestUrl.origin === currentUserWorkerUrl?.origin;
44
+ }
41
45
 
42
46
  // templates/startDevWorker/ProxyWorker.ts
43
47
  var LIVE_RELOAD_PROTOCOL = "WRANGLER_PROXYWORKER_LIVE_RELOAD_PROTOCOL";
@@ -145,8 +149,7 @@ var ProxyWorker = class {
145
149
  }
146
150
  deferredResponse.resolve(res);
147
151
  }).catch((error) => {
148
- const newUserWorkerUrl = this.proxyData && urlFromParts(this.proxyData.userWorkerUrl);
149
- if (userWorkerUrl.href === newUserWorkerUrl?.href) {
152
+ if (isSameUserWorkerOrigin(userWorkerUrl, this.proxyData?.userWorkerUrl)) {
150
153
  void sendMessageToProxyController(this.env, {
151
154
  type: "error",
152
155
  error: {
@@ -34280,14 +34280,21 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
34280
34280
  const diagnostics = new Diagnostics(
34281
34281
  `Processing ${configPath ? path2__default__namespace.default.relative(process.cwd(), configPath) : "wrangler"} configuration:`
34282
34282
  );
34283
+ const isRedirectedConfig22 = isRedirectedRawConfig(
34284
+ rawConfig,
34285
+ configPath,
34286
+ userConfigPath
34287
+ );
34283
34288
  if ("legacy_env" in rawConfig) {
34284
- diagnostics.errors.push(
34285
- dedent`
34286
- The "legacy_env" field is no longer supported, so please remove it from your configuration file.
34287
- Service environments have been removed, and each environment is now deployed as its own Worker named "<name>-<environment>". This matches the behaviour of "legacy_env = true", which was the default, so removing the field will not change how your Worker is deployed.
34288
- Refer to https://developers.cloudflare.com/workers/wrangler/environments/ for more information.
34289
- `
34290
- );
34289
+ if (!isRedirectedConfig22) {
34290
+ diagnostics.errors.push(
34291
+ dedent`
34292
+ The "legacy_env" field is no longer supported, so please remove it from your configuration file.
34293
+ Service environments have been removed, and each environment is now deployed as its own Worker named "<name>-<environment>". This matches the behaviour of "legacy_env = true", which was the default, so removing the field will not change how your Worker is deployed.
34294
+ Refer to https://developers.cloudflare.com/workers/wrangler/environments/ for more information.
34295
+ `
34296
+ );
34297
+ }
34291
34298
  delete rawConfig.legacy_env;
34292
34299
  }
34293
34300
  validateOptionalProperty(
@@ -34363,11 +34370,6 @@ function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args,
34363
34370
  isDispatchNamespace,
34364
34371
  preserveOriginalMain
34365
34372
  );
34366
- const isRedirectedConfig22 = isRedirectedRawConfig(
34367
- rawConfig,
34368
- configPath,
34369
- userConfigPath
34370
- );
34371
34373
  const definedEnvironments = Object.keys(rawConfig.env ?? {});
34372
34374
  if (isRedirectedConfig22 && definedEnvironments.length > 0) {
34373
34375
  diagnostics.errors.push(
@@ -38126,7 +38128,7 @@ function getWorkerNameFromProject(projectPath) {
38126
38128
  }
38127
38129
  return getWorkerName(packageJsonName, projectPath);
38128
38130
  }
38129
- var import_undici, require_vendors, require_ci_info, require_command_exists, require_command_exists2, require_ini, require_strip_json_comments, require_utils2, require_deep_extend, require_minimist, require_rc, require_registry_url, require_safe_buffer, require_base64, require_registry_auth_token, require_update_check; exports.unstable_defaultWranglerConfig = void 0; exports.experimental_patchConfig = void 0; var getJSONPath, PatchConfigError, external_exports, core_exports2, _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig, util_exports, EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class, initializer, $ZodError, $ZodRealError, _parse, parse4, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, encode, _decode, decode, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync, regexes_exports, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url, $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite, Doc, version, $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom, locales_exports, error, error2, error3, error4, error5, error6, error7, error8, error9, error10, error11, error12, error13, error14, error15, error16, error17, error18, error19, error20, error21, error22, error23, error24, error25, error26, error27, capitalizeFirstCharacter, error28, error29, error30, error31, error32, error33, error34, error35, error36, error37, error38, error39, error40, error41, error42, error43, error44, error45, error46, error47, error48, error49, error50, _a2, $output, $input, $ZodRegistry, globalRegistry, TimePrecision, createToJSONSchemaMethod, createStandardJSONSchemaMethod, formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, JSONSchemaGenerator, json_schema_exports, schemas_exports2, checks_exports2, iso_exports, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, initializer2, ZodError, ZodRealError, parse22, parseAsync2, safeParse2, safeParseAsync2, encode2, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool, ZodIssueCode, ZodFirstPartyTypeKind, z, RECOGNIZED_KEYS, coerce_exports, SENSITIVE_STEP_OUTPUT, MAX_WORKFLOW_NAME_LENGTH, ALLOWED_STRING_ID_PATTERN, ALLOWED_WORKFLOW_INSTANCE_ID_REGEX, ALLOWED_WORKFLOW_NAME_REGEX, getC3CommandFromEnv, getWranglerSendMetricsFromEnv, getWranglerSendErrorReportsFromEnv, getCloudflareApiEnvironmentFromEnv, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareComplianceRegionFromEnv, getCloudflareComplianceRegion, getCloudflareApiBaseUrlFromEnv, getCloudflareApiBaseUrl, getSanitizeLogs, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCIGeneratePreviewAlias, getWorkersCIBranchName, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getRegistryPath, getD1ExtraLocationChoices, getDockerPath, getSubdomainMixedStateCheckDisabled, getCloudflareLoadDevVarsFromDotEnv, getCloudflareIncludeProcessEnvFromEnv, getTraceHeader, getDisableConfigWatching, getWranglerHideBanner, getCloudflareEnv, getOpenNextDeployFromEnv, getLocalExplorerEnabledFromEnv, getBrowserRenderingHeadfulFromEnv, getWranglerCacheDirFromEnv, getCloudflaredPathFromEnv, Diagnostics, appendEnvName, isString, isValidName, isValidDateTimeStringFormat, isStringArray, isOneOf, all, isMutuallyExclusiveWith, isBoolean, validateRequiredProperty, validateAtLeastOnePropertyRequired, validateOptionalProperty, validateTypedArray, validateOptionalTypedArray, isRequiredProperty, isOptionalProperty, hasProperty, validateAdditionalProperties, getBindingNames, isBindingList, isNamespaceList, isRecord, validateUniqueNameProperty, bucketFormatMessage, friendlyBindingNames, bindingTypeFriendlyNames, ENGLISH, ALLOWED_INSTANCE_TYPES, isRoute, isRouteArray, validateTailConsumers, validateStreamingTailConsumers, validateAndNormalizeRules, validateTriggers, validateRules, validateRule, validateDefines, validateVars, validateSecrets, validateBindingsProperty, validateUnsafeSettings, validateDurableObjectBinding, workflowNameFormatMessage, validateWorkflowBinding, validateCflogfwdrObject, validateCflogfwdrBinding, validateAssetsConfig, validateNamedSimpleBinding, validateAIBinding, validateVersionMetadataBinding, validateUnsafeBinding, validateBindingArray, validateCloudchamberConfig, validateKVBinding, validateSendEmailBinding, validateQueueBinding, validateR2Binding, validateD1Binding, validateVectorizeBinding, validateAISearchNamespaceBinding, validateAISearchBinding, validateAgentMemoryBinding, validateHyperdriveBinding, validateVpcServiceBinding, validateVpcNetworkBinding, validateBindingsHaveUniqueNames, validateServiceBinding, validateAnalyticsEngineBinding, validateWorkerNamespaceBinding, validateMTlsCertificateBinding, validateConsumer, validateCompatibilityDate, validatePipelineBinding, validateSecretsStoreSecretBinding, validateArtifactsBinding, validateHelloWorldBinding, validateFlagshipBinding, validateWorkerLoaderBinding, validateRateLimitBinding, validatePreviewsConfig, validateMigrations, VALID_EXPORT_STORAGES, JS_IDENTIFIER_RE, validateExports, validateObservability, validateCache, validatePythonModules, BINDING_LOCAL_SUPPORT, supportedPagesConfigFields, import_ci_info, arrayFormatter, signals, processOk, kExitEmitter, global2, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process3, onExit, load, unload, STALE_WRANGLER_TMP_DIR_MS, sweptTmpRoots, import_command_exists, UPDATE_SERVICE_URL, CLOUDFLARED_VERSION_PATTERN, GITHUB_RELEASE_BASE, TUNNEL_STARTUP_TIMEOUT_MS, TUNNEL_FORCE_KILL_TIMEOUT_MS, DEFAULT_TUNNEL_EXPIRY_MS, DEFAULT_TUNNEL_EXTENSION_MS, DEFAULT_TUNNEL_MAX_REMAINING_MS, DEFAULT_TUNNEL_REMINDER_INTERVAL_MS, QUICK_TUNNEL_URL_REGEX, import_update_check, UPDATE_CHECK_TIMEOUT_MS, TIMED_OUT, LOGGER_LEVELS, MAX_ATTEMPTS, NpmPackageManager, PnpmPackageManager, YarnPackageManager, BunPackageManager, NubPackageManager, invalidWorkerNameCharsRegex, invalidWorkerNameStartEndRegex, workerNameLengthLimit, friendlyBindingNames2;
38131
+ var import_undici, require_vendors, require_ci_info, require_command_exists, require_command_exists2, require_ini, require_strip_json_comments, require_utils2, require_deep_extend, require_minimist, require_rc, require_registry_url, require_safe_buffer, require_base64, require_registry_auth_token, require_update_check; exports.unstable_defaultWranglerConfig = void 0; exports.experimental_patchConfig = void 0; var getJSONPath, PatchConfigError, external_exports, core_exports2, _a, NEVER, $brand, $ZodAsyncError, $ZodEncodeError, globalConfig, util_exports, EVALUATING, captureStackTrace, allowsEval, getParsedType, propertyKeyTypes, primitiveTypes, NUMBER_FORMAT_RANGES, BIGINT_FORMAT_RANGES, Class, initializer, $ZodError, $ZodRealError, _parse, parse4, _parseAsync, parseAsync, _safeParse, safeParse, _safeParseAsync, safeParseAsync, _encode, encode, _decode, decode, _encodeAsync, encodeAsync, _decodeAsync, decodeAsync, _safeEncode, safeEncode, _safeDecode, safeDecode, _safeEncodeAsync, safeEncodeAsync, _safeDecodeAsync, safeDecodeAsync, regexes_exports, cuid, cuid2, ulid, xid, ksuid, nanoid, duration, extendedDuration, guid, uuid, uuid4, uuid6, uuid7, email, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji, ipv4, ipv6, mac, cidrv4, cidrv6, base64, base64url, hostname, domain, httpProtocol, e164, dateSource, date, string, bigint, integer, number, boolean, _null, _undefined, lowercase, uppercase, hex, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url, $ZodCheck, numericOriginMap, $ZodCheckLessThan, $ZodCheckGreaterThan, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckBigIntFormat, $ZodCheckMaxSize, $ZodCheckMinSize, $ZodCheckSizeEquals, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckLengthEquals, $ZodCheckStringFormat, $ZodCheckRegex, $ZodCheckLowerCase, $ZodCheckUpperCase, $ZodCheckIncludes, $ZodCheckStartsWith, $ZodCheckEndsWith, $ZodCheckProperty, $ZodCheckMimeType, $ZodCheckOverwrite, Doc, version, $ZodType, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, $ZodIPv6, $ZodMAC, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodCustomStringFormat, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodBigIntFormat, $ZodSymbol, $ZodUndefined, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodVoid, $ZodDate, $ZodArray, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodXor, $ZodDiscriminatedUnion, $ZodIntersection, $ZodTuple, $ZodRecord, $ZodMap, $ZodSet, $ZodEnum, $ZodLiteral, $ZodFile, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodSuccess, $ZodCatch, $ZodNaN, $ZodPipe, $ZodCodec, $ZodPreprocess, $ZodReadonly, $ZodTemplateLiteral, $ZodFunction, $ZodPromise, $ZodLazy, $ZodCustom, locales_exports, error, error2, error3, error4, error5, error6, error7, error8, error9, error10, error11, error12, error13, error14, error15, error16, error17, error18, error19, error20, error21, error22, error23, error24, error25, error26, error27, capitalizeFirstCharacter, error28, error29, error30, error31, error32, error33, error34, error35, error36, error37, error38, error39, error40, error41, error42, error43, error44, error45, error46, error47, error48, error49, error50, _a2, $output, $input, $ZodRegistry, globalRegistry, TimePrecision, createToJSONSchemaMethod, createStandardJSONSchemaMethod, formatMap, stringProcessor, numberProcessor, booleanProcessor, bigintProcessor, symbolProcessor, nullProcessor, undefinedProcessor, voidProcessor, neverProcessor, anyProcessor, unknownProcessor, dateProcessor, enumProcessor, literalProcessor, nanProcessor, templateLiteralProcessor, fileProcessor, successProcessor, customProcessor, functionProcessor, transformProcessor, mapProcessor, setProcessor, arrayProcessor, objectProcessor, unionProcessor, intersectionProcessor, tupleProcessor, recordProcessor, nullableProcessor, nonoptionalProcessor, defaultProcessor, prefaultProcessor, catchProcessor, pipeProcessor, readonlyProcessor, promiseProcessor, optionalProcessor, lazyProcessor, allProcessors, JSONSchemaGenerator, json_schema_exports, schemas_exports2, checks_exports2, iso_exports, ZodISODateTime, ZodISODate, ZodISOTime, ZodISODuration, initializer2, ZodError, ZodRealError, parse22, parseAsync2, safeParse2, safeParseAsync2, encode2, decode2, encodeAsync2, decodeAsync2, safeEncode2, safeDecode2, safeEncodeAsync2, safeDecodeAsync2, _installedGroups, ZodType, _ZodString, ZodString, ZodStringFormat, ZodEmail, ZodGUID, ZodUUID, ZodURL, ZodEmoji, ZodNanoID, ZodCUID, ZodCUID2, ZodULID, ZodXID, ZodKSUID, ZodIPv4, ZodMAC, ZodIPv6, ZodCIDRv4, ZodCIDRv6, ZodBase64, ZodBase64URL, ZodE164, ZodJWT, ZodCustomStringFormat, ZodNumber, ZodNumberFormat, ZodBoolean, ZodBigInt, ZodBigIntFormat, ZodSymbol, ZodUndefined, ZodNull, ZodAny, ZodUnknown, ZodNever, ZodVoid, ZodDate, ZodArray, ZodObject, ZodUnion, ZodXor, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodEnum, ZodLiteral, ZodFile, ZodTransform, ZodOptional, ZodExactOptional, ZodNullable, ZodDefault, ZodPrefault, ZodNonOptional, ZodSuccess, ZodCatch, ZodNaN, ZodPipe, ZodCodec, ZodPreprocess, ZodReadonly, ZodTemplateLiteral, ZodLazy, ZodPromise, ZodFunction, ZodCustom, describe2, meta2, stringbool, ZodIssueCode, ZodFirstPartyTypeKind, z, RECOGNIZED_KEYS, coerce_exports, SENSITIVE_STEP_OUTPUT, MAX_WORKFLOW_NAME_LENGTH, ALLOWED_STRING_ID_PATTERN, ALLOWED_WORKFLOW_INSTANCE_ID_REGEX, ALLOWED_WORKFLOW_NAME_REGEX, getC3CommandFromEnv, getWranglerSendMetricsFromEnv, getWranglerSendErrorReportsFromEnv, getCloudflareApiEnvironmentFromEnv, COMPLIANCE_REGION_CONFIG_PUBLIC, COMPLIANCE_REGION_CONFIG_UNKNOWN, getCloudflareComplianceRegionFromEnv, getCloudflareComplianceRegion, getCloudflareApiBaseUrlFromEnv, getCloudflareApiBaseUrl, getSanitizeLogs, getOutputFileDirectoryFromEnv, getOutputFilePathFromEnv, getCIMatchTag, getCIOverrideName, getCIOverrideNetworkModeHost, getCIGeneratePreviewAlias, getWorkersCIBranchName, getBuildConditionsFromEnv, getBuildPlatformFromEnv, getRegistryPath, getD1ExtraLocationChoices, getDockerPath, getSubdomainMixedStateCheckDisabled, getCloudflareLoadDevVarsFromDotEnv, getCloudflareIncludeProcessEnvFromEnv, getTraceHeader, getDisableConfigWatching, getWranglerHideBanner, getCloudflareEnv, getOpenNextDeployFromEnv, getLocalExplorerEnabledFromEnv, getLocalObservabilityEnabledFromEnv, getBrowserRenderingHeadfulFromEnv, getWranglerCacheDirFromEnv, getCloudflaredPathFromEnv, Diagnostics, appendEnvName, isString, isValidName, isValidDateTimeStringFormat, isStringArray, isOneOf, all, isMutuallyExclusiveWith, isBoolean, validateRequiredProperty, validateAtLeastOnePropertyRequired, validateOptionalProperty, validateTypedArray, validateOptionalTypedArray, isRequiredProperty, isOptionalProperty, hasProperty, validateAdditionalProperties, getBindingNames, isBindingList, isNamespaceList, isRecord, validateUniqueNameProperty, bucketFormatMessage, friendlyBindingNames, bindingTypeFriendlyNames, ENGLISH, ALLOWED_INSTANCE_TYPES, isRoute, isRouteArray, validateTailConsumers, validateStreamingTailConsumers, validateAndNormalizeRules, validateTriggers, validateRules, validateRule, validateDefines, validateVars, validateSecrets, validateBindingsProperty, validateUnsafeSettings, validateDurableObjectBinding, workflowNameFormatMessage, validateWorkflowBinding, validateCflogfwdrObject, validateCflogfwdrBinding, validateAssetsConfig, validateNamedSimpleBinding, validateAIBinding, validateVersionMetadataBinding, validateUnsafeBinding, validateBindingArray, validateCloudchamberConfig, validateKVBinding, validateSendEmailBinding, validateQueueBinding, validateR2Binding, validateD1Binding, validateVectorizeBinding, validateAISearchNamespaceBinding, validateAISearchBinding, validateAgentMemoryBinding, validateHyperdriveBinding, validateVpcServiceBinding, validateVpcNetworkBinding, validateBindingsHaveUniqueNames, validateServiceBinding, validateAnalyticsEngineBinding, validateWorkerNamespaceBinding, validateMTlsCertificateBinding, validateConsumer, validateCompatibilityDate, validatePipelineBinding, validateSecretsStoreSecretBinding, validateArtifactsBinding, validateHelloWorldBinding, validateFlagshipBinding, validateWorkerLoaderBinding, validateRateLimitBinding, validatePreviewsConfig, validateMigrations, VALID_EXPORT_STORAGES, JS_IDENTIFIER_RE, validateExports, validateObservability, validateCache, validatePythonModules, BINDING_LOCAL_SUPPORT, supportedPagesConfigFields, import_ci_info, arrayFormatter, signals, processOk, kExitEmitter, global2, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process3, onExit, load, unload, STALE_WRANGLER_TMP_DIR_MS, sweptTmpRoots, import_command_exists, UPDATE_SERVICE_URL, CLOUDFLARED_VERSION_PATTERN, GITHUB_RELEASE_BASE, TUNNEL_STARTUP_TIMEOUT_MS, TUNNEL_FORCE_KILL_TIMEOUT_MS, DEFAULT_TUNNEL_EXPIRY_MS, DEFAULT_TUNNEL_EXTENSION_MS, DEFAULT_TUNNEL_MAX_REMAINING_MS, DEFAULT_TUNNEL_REMINDER_INTERVAL_MS, QUICK_TUNNEL_URL_REGEX, import_update_check, UPDATE_CHECK_TIMEOUT_MS, TIMED_OUT, LOGGER_LEVELS, MAX_ATTEMPTS, NpmPackageManager, PnpmPackageManager, YarnPackageManager, BunPackageManager, NubPackageManager, invalidWorkerNameCharsRegex, invalidWorkerNameStartEndRegex, workerNameLengthLimit, friendlyBindingNames2;
38130
38132
  var init_dist = __esm({
38131
38133
  "../workers-utils/dist/index.mjs"() {
38132
38134
  init_import_meta_url();
@@ -51508,6 +51510,10 @@ var init_dist = __esm({
51508
51510
  variableName: "X_LOCAL_EXPLORER",
51509
51511
  defaultValue: true
51510
51512
  });
51513
+ getLocalObservabilityEnabledFromEnv = getBooleanEnvironmentVariableFactory({
51514
+ variableName: "X_LOCAL_OBSERVABILITY",
51515
+ defaultValue: false
51516
+ });
51511
51517
  getBrowserRenderingHeadfulFromEnv = getBooleanEnvironmentVariableFactory({
51512
51518
  variableName: "X_BROWSER_HEADFUL",
51513
51519
  defaultValue: false
@@ -57111,7 +57117,7 @@ var name, version2;
57111
57117
  var init_package = __esm({
57112
57118
  "package.json"() {
57113
57119
  name = "wrangler";
57114
- version2 = "4.113.0";
57120
+ version2 = "4.114.0";
57115
57121
  }
57116
57122
  });
57117
57123
 
@@ -120956,7 +120962,7 @@ function createProfileStore(args) {
120956
120962
  throw new UserError(
120957
120963
  `No profile is directly bound to "${formatDirectoryForUserError(normalizedDir)}". The active profile "${parentBinding.profile}" is bound at "${formatDirectoryForUserError(
120958
120964
  parentBinding.dir
120959
- )}". Run \`wrangler auth deactivate\` from that directory instead.`,
120965
+ )}". Run the deactivate command from that directory instead.`,
120960
120966
  { telemetryMessage: "auth deactivate wrong directory" }
120961
120967
  );
120962
120968
  }
@@ -121034,7 +121040,7 @@ function createProfileStore(args) {
121034
121040
  function validateProfileName(name2) {
121035
121041
  if (RESERVED_PROFILE_NAMES.includes(name2.toLowerCase())) {
121036
121042
  throw new UserError(
121037
- `"${name2}" is a reserved profile name. Use \`wrangler login\` and \`wrangler logout\` to manage the default profile, which applies as a global fallback.`,
121043
+ `"${name2}" is a reserved profile name. Use the login and logout commands to manage the default profile, which applies as a global fallback.`,
121038
121044
  { telemetryMessage: "auth profile reserved name" }
121039
121045
  );
121040
121046
  }
@@ -122293,8 +122299,8 @@ function scrubEncryptedCredentials(options) {
122293
122299
  return { backendAvailable: false, encryptedFileExisted };
122294
122300
  }
122295
122301
  var import_undici2, hasWarnedAboutDeprecatedV1ApiToken, getCloudflareAPITokenFromEnv, getCloudflareGlobalAuthKeyFromEnv, getCloudflareGlobalAuthEmailFromEnv, getAuthDomainFromEnv, getAuthUrlFromEnv, getTokenUrlFromEnv, getRevokeUrlFromEnv, getCloudflareAccountIdFromEnv, getAccessClientIdFromEnv, getAccessClientSecretFromEnv, getCfAuthorizationTokenFromEnv, getCloudflareAuthUseKeyringFromEnv, headersCache, usesAccessCache, RECOMMENDED_CODE_VERIFIER_LENGTH, RECOMMENDED_STATE_LENGTH, PKCE_CHARSET, generateAuthUrl, POW_MAX_ITERATIONS, TEMPORARY_TERMS_URLS, TEMPORARY_TERMS_PROMPT, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_ERROR, esm_default3, ErrorOAuth2, ErrorUnknown, ErrorNoAuthCode, ErrorInvalidReturnedStateParam, ErrorInvalidJson, ErrorInvalidScope, ErrorInvalidRequest, ErrorInvalidToken, ErrorAuthenticationGrant, ErrorUnauthorizedClient, ErrorAccessDenied, ErrorUnsupportedResponseType, ErrorServerError, ErrorTemporarilyUnavailable, ErrorAccessTokenResponse, ErrorInvalidClient, ErrorInvalidGrant, ErrorUnsupportedGrantType, RESERVED_PROFILE_NAMES, TomlError2, DATE_TIME_RE2, TomlDate2, INT_REGEX2, FLOAT_REGEX2, LEADING_ZERO2, ESCAPE_REGEX2, ESC_MAP2, KEY_PART_RE2, BARE_KEY2, dist_default2, FILE_FORMATS, USER_AUTH_CONFIG_PATH, FileCredentialStore, KEY_LENGTH_BYTES, IV_LENGTH_BYTES, TAG_LENGTH_BYTES, ALGORITHM_LABEL, CIPHER_NAME, EncryptedFileCredentialStore, PINNED_KEYRING_VERSION, npmRunner, cachedBindingPathByDir, entryFactoryOverride, runner, cachedProbeResult, LinuxSecretToolKeyProvider, SECURITY_EXIT_ITEM_NOT_FOUND, runner2, MacSecurityKeyProvider, NapiKeyringKeyProvider, testProviderFactory, sessionFlags;
122296
- var init_chunk_N7JTI7BC = __esm({
122297
- "../workers-auth/dist/chunk-N7JTI7BC.mjs"() {
122302
+ var init_chunk_5WRJ2ZUV = __esm({
122303
+ "../workers-auth/dist/chunk-5WRJ2ZUV.mjs"() {
122298
122304
  init_import_meta_url();
122299
122305
  init_chunk_O6YSETKJ();
122300
122306
  init_dist();
@@ -123329,7 +123335,7 @@ ${codeblock}`, options);
123329
123335
  var init_dist2 = __esm({
123330
123336
  "../workers-auth/dist/index.mjs"() {
123331
123337
  init_import_meta_url();
123332
- init_chunk_N7JTI7BC();
123338
+ init_chunk_5WRJ2ZUV();
123333
123339
  }
123334
123340
  });
123335
123341
  function createPreferences(getConfigPath2) {
@@ -124226,10 +124232,10 @@ function createAuthConfigFileHelpers(deps) {
124226
124232
  };
124227
124233
  }
124228
124234
  var millisecondsInMinute, minutesInYear, minutesInMonth, minutesInDay, constructFromSymbol, defaultOptions2, formatDistanceLocale, formatDistance, dateFormats, timeFormats, dateTimeFormats, formatLong, formatRelativeLocale, formatRelative, eraValues, quarterValues, monthValues, dayValues, dayPeriodValues, formattingDayPeriodValues, ordinalNumber, localize, matchOrdinalNumberPattern, parseOrdinalNumberPattern, matchEraPatterns, parseEraPatterns, matchQuarterPatterns, parseQuarterPatterns, matchMonthPatterns, parseMonthPatterns, matchDayPatterns, parseDayPatterns, matchDayPeriodPatterns, parseDayPeriodPatterns, match, enUS, MEMBERSHIPS_INACCESSIBLE_CODES, DIRECTORY_BINDINGS_FILE, ENCRYPTED_PROFILE_CONFIG_EXTENSION;
124229
- var init_chunk_FVDIXAPS = __esm({
124230
- "../workers-auth/dist/chunk-FVDIXAPS.mjs"() {
124235
+ var init_chunk_7PS36DJW = __esm({
124236
+ "../workers-auth/dist/chunk-7PS36DJW.mjs"() {
124231
124237
  init_import_meta_url();
124232
- init_chunk_N7JTI7BC();
124238
+ init_chunk_5WRJ2ZUV();
124233
124239
  init_chunk_O6YSETKJ();
124234
124240
  init_dist();
124235
124241
  __name(createPreferences, "createPreferences");
@@ -124743,7 +124749,7 @@ var DefaultScopes, DefaultScopeKeys, WRANGLER_KEYRING_SERVICE_NAME, WRANGLER_CLI
124743
124749
  var init_wrangler = __esm({
124744
124750
  "../workers-auth/dist/wrangler/index.mjs"() {
124745
124751
  init_import_meta_url();
124746
- init_chunk_FVDIXAPS();
124752
+ init_chunk_7PS36DJW();
124747
124753
  init_chunk_O6YSETKJ();
124748
124754
  init_dist();
124749
124755
  DefaultScopes = {
@@ -142870,7 +142876,19 @@ async function createD1Database(complianceConfig, accountId, name2) {
142870
142876
  }
142871
142877
  if (errorCode === 7406) {
142872
142878
  throw new UserError(
142873
- "You have reached the maximum number of D1 databases for your account. Please consider deleting unused databases, or visit the D1 documentation to learn more: https://developers.cloudflare.com/d1/",
142879
+ esm_default5`
142880
+ You have reached the maximum number of D1 databases for your account.
142881
+
142882
+ On the Workers Free plan? Upgrade to create more:
142883
+ https://dash.cloudflare.com/${accountId}/workers/plans
142884
+
142885
+ Already on a paid plan? You can request a higher limit — learn more in the D1 docs:
142886
+ https://developers.cloudflare.com/d1/
142887
+
142888
+ Or free up space:
142889
+ To list your existing databases, run: wrangler d1 list
142890
+ To delete a database, run: wrangler d1 delete <database-name>
142891
+ `,
142874
142892
  { telemetryMessage: "d1 create database limit reached" }
142875
142893
  );
142876
142894
  }
@@ -166414,6 +166432,9 @@ async function buildMiniflareOptions(log2, config3, proxyToUserWorkerAuthenticat
166414
166432
  unsafeProxySharedSecret: proxyToUserWorkerAuthenticationSecret,
166415
166433
  unsafeTriggerHandlers: true,
166416
166434
  unsafeLocalExplorer: getLocalExplorerEnabledFromEnv(),
166435
+ // The one switch for local observability: this env var tells Miniflare core
166436
+ // to attach the trace collector to each user worker.
166437
+ unsafeObservability: getLocalObservabilityEnabledFromEnv(),
166417
166438
  unsafeInspectDurableObjects: true,
166418
166439
  telemetry: getMetricsConfig({ sendMetrics: config3.sendMetrics }),
166419
166440
  // The way we run Miniflare instances with wrangler dev is that there are two:
@@ -166903,7 +166924,7 @@ var CF_KEYRING_SERVICE_NAME, CF_CLI_NAME, CF_OAUTH_CALLBACK_URL, CF_CONSENT_PAGE
166903
166924
  var init_cf = __esm({
166904
166925
  "../workers-auth/dist/cf/index.mjs"() {
166905
166926
  init_import_meta_url();
166906
- init_chunk_FVDIXAPS();
166927
+ init_chunk_7PS36DJW();
166907
166928
  init_chunk_O6YSETKJ();
166908
166929
  init_dist();
166909
166930
  CF_KEYRING_SERVICE_NAME = "cloudflare";
@@ -167038,7 +167059,8 @@ var init_cf = __esm({
167038
167059
  cliName: CF_CLI_NAME,
167039
167060
  commands: {
167040
167061
  login: "cf auth login",
167041
- whoami: "cf auth whoami"
167062
+ whoami: "cf auth whoami",
167063
+ createProfile: "cf auth create"
167042
167064
  },
167043
167065
  keyringServiceName: CF_KEYRING_SERVICE_NAME,
167044
167066
  clientId: getClientIdFromEnv2,
@@ -171132,6 +171154,7 @@ function findRemoteSessionAuthError(error54) {
171132
171154
  if (error54 instanceof Error) return findRemoteSessionAuthError(error54.cause);
171133
171155
  }
171134
171156
  async function startRemoteProxySession(bindings2, options) {
171157
+ for (const [name2, binding] of Object.entries(bindings2 ?? {})) if (binding.type === "flagship" && binding.app_id === void 0) throw new UserError(`Flagship binding "${name2}" has no \`app_id\` and has not been created, but needs to run remotely. Run \`wrangler flagship apps create\` to create an app.`, { telemetryMessage: "flagship remote binding missing app_id" });
171135
171158
  options.logger.log(source_default.dim("\u2394 Establishing remote connection..."));
171136
171159
  initLogger(getInternalLogger(options.logger));
171137
171160
  const rawBindings = toRawBindings(bindings2);
@@ -171280,7 +171303,7 @@ var init_dist12 = __esm({
171280
171303
  init_wrapper();
171281
171304
  init_create_worker_upload_form();
171282
171305
  import_undici8 = __toESM(require_undici(), 1);
171283
- version3 = "0.0.1";
171306
+ version3 = "0.0.2";
171284
171307
  NoDefaultValueProvided2 = class extends UserError {
171285
171308
  static {
171286
171309
  __name(this, "NoDefaultValueProvided");
@@ -204025,7 +204048,7 @@ async function ensureImageFitsLimits(options) {
204025
204048
  );
204026
204049
  if (options.availableSizeInBytes < requiredSizeInBytes) {
204027
204050
  throw new UserError(
204028
- `Image too large: needs ${Math.ceil(requiredSizeInBytes / MB)}MB, but your app is limited to images with size ${options.availableSizeInBytes / MB}MB. Your need more disk for this image.`,
204051
+ `Image too large: needs ${Math.ceil(requiredSizeInBytes / MB)}MB, but your app is limited to images with size ${options.availableSizeInBytes / MB}MB. You need more disk for this image.`,
204029
204052
  { telemetryMessage: "cloudchamber limits image too large" }
204030
204053
  );
204031
204054
  }
@@ -238286,8 +238309,14 @@ async function createD1Database2(complianceConfig, accountId, name2, location, j
238286
238309
  throw new UserError(
238287
238310
  esm_default4`
238288
238311
  You have reached the maximum number of D1 databases for your account.
238289
- Please consider deleting unused databases, or visit the D1 documentation to learn more: ${D1_DOCS_URL}
238290
238312
 
238313
+ On the Workers Free plan? Upgrade to create more:
238314
+ https://dash.cloudflare.com/${accountId}/workers/plans
238315
+
238316
+ Already on a paid plan? You can request a higher limit — learn more in the D1 docs:
238317
+ ${D1_DOCS_URL}
238318
+
238319
+ Or free up space:
238291
238320
  To list your existing databases, run: wrangler d1 list
238292
238321
  To delete a database, run: wrangler d1 delete <database-name>
238293
238322
  `,