wrangler 4.111.0 → 4.112.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.
@@ -1741,6 +1741,14 @@
1741
1741
  "description": "By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.\n\nIf you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.\n\nIf you want to keep your dashboard vars when wrangler deploys, set this field to true.",
1742
1742
  "markdownDescription": "By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.\n\nIf you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.\n\nIf you want to keep your dashboard vars when wrangler deploys, set this field to true.",
1743
1743
  "default": false
1744
+ },
1745
+ "addresses": {
1746
+ "type": "array",
1747
+ "items": {
1748
+ "type": "string"
1749
+ },
1750
+ "description": "The inbound email addresses handled by the Worker being deployed.\n\nEach entry is a literal recipient address (e.g. `\"support@example.com\"`) or a `*@domain` catch-all (e.g. `\"*@example.com\"`). Every entry creates an Email Routing rule whose action routes mail to this Worker.\n\nThis field is top-level only and applies to every environment of the Worker; it cannot be set under `env.*`.",
1751
+ "markdownDescription": "The inbound email addresses handled by the Worker being deployed.\n\nEach entry is a literal recipient address (e.g. `\"support@example.com\"`)\nor a `*@domain` catch-all (e.g. `\"*@example.com\"`). Every entry creates an\nEmail Routing rule whose action routes mail to this Worker.\n\nThis field is top-level only and applies to every environment of the\nWorker; it cannot be set under `env.*`."
1744
1752
  }
1745
1753
  }
1746
1754
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.111.0",
3
+ "version": "4.112.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.20260710.1",
70
- "@cloudflare/kv-asset-handler": "0.5.0",
69
+ "workerd": "1.20260714.1",
71
70
  "@cloudflare/unenv-preset": "2.16.1",
72
- "miniflare": "4.20260710.0"
71
+ "miniflare": "4.20260714.0",
72
+ "@cloudflare/kv-asset-handler": "0.5.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.20260710.1",
78
+ "@cloudflare/workers-types": "^5.20260714.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",
@@ -154,23 +154,23 @@
154
154
  "xxhash-wasm": "^1.0.1",
155
155
  "yaml": "^2.8.1",
156
156
  "yargs": "^17.7.2",
157
- "zod": "^4.4.3",
158
- "@cloudflare/autoconfig": "0.1.5",
157
+ "zod": "4.4.3",
158
+ "@cloudflare/autoconfig": "0.1.6",
159
159
  "@cloudflare/codemod": "1.1.0",
160
- "@cloudflare/cli-shared-helpers": "0.1.14",
161
- "@cloudflare/config": "0.2.0",
162
- "@cloudflare/deploy-helpers": "0.5.0",
163
- "@cloudflare/pages-shared": "^0.13.157",
160
+ "@cloudflare/config": "0.2.1",
164
161
  "@cloudflare/containers-shared": "0.16.0",
165
- "@cloudflare/runtime-types": "0.0.2",
162
+ "@cloudflare/deploy-helpers": "0.5.1",
163
+ "@cloudflare/cli-shared-helpers": "0.1.15",
164
+ "@cloudflare/pages-shared": "^0.13.158",
165
+ "@cloudflare/runtime-types": "0.0.3",
166
166
  "@cloudflare/workers-auth": "0.5.0",
167
- "@cloudflare/workers-shared": "0.19.8",
167
+ "@cloudflare/workers-shared": "0.19.9",
168
168
  "@cloudflare/workers-tsconfig": "0.0.0",
169
169
  "@cloudflare/workers-utils": "0.27.0",
170
- "@cloudflare/workflows-shared": "0.12.0"
170
+ "@cloudflare/workflows-shared": "0.12.1"
171
171
  },
172
172
  "peerDependencies": {
173
- "@cloudflare/workers-types": "^5.20260710.1"
173
+ "@cloudflare/workers-types": "^5.20260714.1"
174
174
  },
175
175
  "peerDependenciesMeta": {
176
176
  "@cloudflare/workers-types": {
@@ -1,10 +1,11 @@
1
- import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, StartDevWorkerInput, Config as Config$1, NodeJSCompatMode, CfScriptFormat, AsyncHook, CfAccount as CfAccount$1, AssetsOptions as AssetsOptions$1, Binding, ConfigBindingFieldName, RawConfig as RawConfig$1, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, ApiCredentials, ParseError, LoggerLevel, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
1
+ import { Rule as Rule$1, CfModule, Environment as Environment$1, Entry, CfModuleType, Config as Config$1, StartDevWorkerInput, NodeJSCompatMode, CfScriptFormat, AsyncHook, CfAccount as CfAccount$1, AssetsOptions as AssetsOptions$1, Binding, ConfigBindingFieldName, RawConfig as RawConfig$1, NormalizeAndValidateConfigArgs, ResolveConfigPathOptions, ApiCredentials, ParseError, LoggerLevel, ComplianceConfig, UserError, FatalError } from '@cloudflare/workers-utils';
2
2
  export { Binding, experimental_patchConfig, experimental_readRawConfig, defaultWranglerConfig as unstable_defaultWranglerConfig } from '@cloudflare/workers-utils';
3
- import { Json as Json$1, WorkerdStructuredLog, DispatchFetch, Miniflare, WorkerRegistry, MiniflareOptions, Mutex, Response as Response$1, RemoteProxyConnectionString, WorkerOptions, ModuleRule, Request } from 'miniflare';
3
+ import { Json as Json$1, WorkerdStructuredLog, DispatchFetch, Miniflare, WorkerRegistry, MiniflareOptions, Mutex, Response as Response$1, DurableObjectStorageOptions, DurableObjectStorageHandle, RemoteProxyConnectionString, WorkerOptions, ModuleRule, Request } from 'miniflare';
4
4
  import * as undici from 'undici';
5
5
  import { RequestInfo, RequestInit, Response, FormData } from 'undici';
6
6
  import { Metafile } from 'esbuild';
7
7
  import Protocol from 'devtools-protocol/types/protocol-mapping';
8
+ import Protocol$1 from 'devtools-protocol';
8
9
  import { EventEmitter } from 'node:events';
9
10
  import { ContainerNormalizedConfig } from '@cloudflare/containers-shared';
10
11
  import { Rpc, ExportedHandler, DurableObjectNamespace, D1Database, Workflow, Service } from '@cloudflare/workers-types';
@@ -335,17 +336,29 @@ type EsbuildBundle = {
335
336
 
336
337
  declare class ConfigController extends Controller {
337
338
  #private;
338
- latestInput?: StartDevWorkerInput;
339
+ latestInput?: WranglerStartDevWorkerInput;
339
340
  latestWranglerConfig?: Config$1;
340
341
  latestConfig?: StartDevWorkerOptions;
341
- set(input: StartDevWorkerInput, throwErrors?: boolean): Promise<StartDevWorkerOptions | undefined>;
342
- patch(input: Partial<StartDevWorkerInput>): Promise<StartDevWorkerOptions | undefined>;
342
+ set(input: WranglerStartDevWorkerInput, throwErrors?: boolean): Promise<StartDevWorkerOptions | undefined>;
343
+ patch(input: Partial<WranglerStartDevWorkerInput>): Promise<StartDevWorkerOptions | undefined>;
343
344
  onDevRegistryUpdate(event: DevRegistryUpdateEvent): void;
344
345
  teardown(): Promise<void>;
345
346
  emitConfigUpdateEvent(config: StartDevWorkerOptions): void;
346
347
  }
347
348
 
348
349
  type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
350
+ /**
351
+ * Extended StartDevWorkerInput with wrangler-specific fields that depend on miniflare types.
352
+ * The base StartDevWorkerInput in workers-utils is kept dependency-free.
353
+ */
354
+ type WranglerStartDevWorkerInput = Omit<StartDevWorkerInput, "dev"> & {
355
+ dev?: StartDevWorkerInput["dev"] & {
356
+ /** Handles structured runtime logs. */
357
+ structuredLogsHandler?: (log: WorkerdStructuredLog) => void;
358
+ /** An undici MockAgent to declaratively mock fetch calls to particular resources. */
359
+ mockFetch?: undici.MockAgent;
360
+ };
361
+ };
349
362
  interface Worker {
350
363
  ready: Promise<void>;
351
364
  url: Promise<URL>;
@@ -435,6 +448,17 @@ type DevRegistryUpdateEvent = {
435
448
  type: "devRegistryUpdate";
436
449
  registry: WorkerRegistry;
437
450
  };
451
+ type RuntimeErrorEvent = {
452
+ type: "runtimeError";
453
+ source: "LocalRuntimeController" | "ProxyController";
454
+ /** The exception summary line. */
455
+ text: string;
456
+ /** The source-mapped stack. */
457
+ stack: string;
458
+ /** The raw Chrome DevTools Protocol exception details, when the event
459
+ * came over the inspector. */
460
+ exceptionDetails?: Protocol$1.Runtime.ExceptionDetails;
461
+ };
438
462
  type PreviewTokenExpiredEvent = {
439
463
  type: "previewTokenExpired";
440
464
  proxyData: ProxyData;
@@ -501,7 +525,7 @@ type ProxyData = {
501
525
  proxyLogsToController?: boolean;
502
526
  };
503
527
 
504
- type ControllerEvent = ErrorEvent | ConfigUpdateEvent | BundleStartEvent | BundleCompleteEvent | ReloadStartEvent | ReloadCompleteEvent | DevRegistryUpdateEvent | PreviewTokenExpiredEvent;
528
+ type ControllerEvent = ErrorEvent | ConfigUpdateEvent | BundleStartEvent | BundleCompleteEvent | ReloadStartEvent | ReloadCompleteEvent | DevRegistryUpdateEvent | RuntimeErrorEvent | PreviewTokenExpiredEvent;
505
529
  interface ControllerBus {
506
530
  dispatch(event: ControllerEvent): void;
507
531
  }
@@ -573,7 +597,7 @@ declare class DevEnv extends EventEmitter implements ControllerBus {
573
597
  bundler: BundlerController;
574
598
  runtimes: RuntimeController[];
575
599
  proxy: ProxyController;
576
- startWorker(options: StartDevWorkerInput): Promise<Worker>;
600
+ startWorker(options: WranglerStartDevWorkerInput): Promise<Worker>;
577
601
  constructor({ configFactory, bundlerFactory, runtimeFactories, proxyFactory, }?: {
578
602
  configFactory?: ControllerFactory<ConfigController>;
579
603
  bundlerFactory?: ControllerFactory<BundlerController>;
@@ -603,7 +627,7 @@ declare class DevEnv extends EventEmitter implements ControllerBus {
603
627
  teardown(): Promise<void>;
604
628
  }
605
629
 
606
- declare function startWorker(options: StartDevWorkerInput): Promise<Worker>;
630
+ declare function startWorker(options: WranglerStartDevWorkerInput): Promise<Worker>;
607
631
 
608
632
  declare const dev: {
609
633
  args: {
@@ -869,6 +893,25 @@ type WorkerHandle<Env = AnyEnv, Module extends WorkerModule = {
869
893
  * ```
870
894
  */
871
895
  applyD1Migrations(bindingName: BindingName<Env, D1Database>): Promise<void>;
896
+ /**
897
+ * Returns remote storage access for a Durable Object instance.
898
+ * Pass an exported Durable Object class name, or a Durable Object binding name.
899
+ * Class names are resolved before binding names.
900
+ *
901
+ * Use this to seed state before sending requests to the object, or to inspect
902
+ * state after awaited requests. Calling `exec()` runs SQL inside the target
903
+ * Durable Object and returns all rows. It may start the object if it is not
904
+ * already active.
905
+ *
906
+ * @example
907
+ * ```ts
908
+ * const sql = await worker.getDurableObjectStorage("COUNTER", {
909
+ * name: "user-123"
910
+ * });
911
+ * const rows = await sql.exec("SELECT count FROM counters WHERE id = ?", "user-123");
912
+ * ```
913
+ */
914
+ getDurableObjectStorage(classNameOrBindingName: ExportName<Module, Rpc.DurableObjectBranded> | BindingName<Env, DurableObjectNamespace>, options: DurableObjectStorageOptions): Promise<DurableObjectStorageHandle>;
872
915
  /**
873
916
  * Creates an introspector for a specific Workflow instance.
874
917
  */
@@ -2887,6 +2930,19 @@ interface ConfigFields<Dev extends RawDevConfig> {
2887
2930
  * @nonInheritable
2888
2931
  */
2889
2932
  keep_vars?: boolean;
2933
+ /**
2934
+ * The inbound email addresses handled by the Worker being deployed.
2935
+ *
2936
+ * Each entry is a literal recipient address (e.g. `"support@example.com"`)
2937
+ * or a `*@domain` catch-all (e.g. `"*@example.com"`). Every entry creates an
2938
+ * Email Routing rule whose action routes mail to this Worker.
2939
+ *
2940
+ * This field is top-level only and applies to every environment of the
2941
+ * Worker; it cannot be set under `env.*`.
2942
+ *
2943
+ * @nonInheritable
2944
+ */
2945
+ addresses?: string[];
2890
2946
  }
2891
2947
  interface PagesConfigFields {
2892
2948
  /**