wrangler 4.131.2 → 4.132.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.
@@ -928,28 +928,6 @@
928
928
  "markdownDescription": "Specifies Agent Memory namespace bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
929
929
  "default": []
930
930
  },
931
- "websearch": {
932
- "type": "object",
933
- "properties": {
934
- "binding": {
935
- "type": "string",
936
- "description": "The binding name used to refer to Web Search in the Worker.",
937
- "markdownDescription": "The binding name used to refer to Web Search in the Worker."
938
- },
939
- "remote": {
940
- "type": "boolean",
941
- "description": "Whether the Web Search binding should be remote or not in local development",
942
- "markdownDescription": "Whether the Web Search binding should be remote or not in local development"
943
- }
944
- },
945
- "required": [
946
- "binding"
947
- ],
948
- "additionalProperties": false,
949
- "description": "Cloudflare Web Search binding. There is exactly one shared web corpus, so the binding is zero-config -- only the variable name is required, declared as a single object (not an array).\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
950
- "markdownDescription": "Cloudflare Web Search binding. There is exactly one shared web corpus, so the\nbinding is zero-config -- only the variable name is required, declared as a\nsingle object (not an array).\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
951
- "default": {}
952
- },
953
931
  "hyperdrive": {
954
932
  "type": "array",
955
933
  "items": {
@@ -2726,28 +2704,6 @@
2726
2704
  "markdownDescription": "Specifies Agent Memory namespace bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
2727
2705
  "default": []
2728
2706
  },
2729
- "websearch": {
2730
- "type": "object",
2731
- "properties": {
2732
- "binding": {
2733
- "type": "string",
2734
- "description": "The binding name used to refer to Web Search in the Worker.",
2735
- "markdownDescription": "The binding name used to refer to Web Search in the Worker."
2736
- },
2737
- "remote": {
2738
- "type": "boolean",
2739
- "description": "Whether the Web Search binding should be remote or not in local development",
2740
- "markdownDescription": "Whether the Web Search binding should be remote or not in local development"
2741
- }
2742
- },
2743
- "required": [
2744
- "binding"
2745
- ],
2746
- "additionalProperties": false,
2747
- "description": "Cloudflare Web Search binding. There is exactly one shared web corpus, so the binding is zero-config -- only the variable name is required, declared as a single object (not an array).\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
2748
- "markdownDescription": "Cloudflare Web Search binding. There is exactly one shared web corpus, so the\nbinding is zero-config -- only the variable name is required, declared as a\nsingle object (not an array).\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
2749
- "default": {}
2750
- },
2751
2707
  "hyperdrive": {
2752
2708
  "type": "array",
2753
2709
  "items": {
@@ -4131,16 +4087,16 @@
4131
4087
  "additionalProperties": false,
4132
4088
  "properties": {
4133
4089
  "logpush": {
4134
- "$ref": "#/definitions/interface-769040647-13628-23990-769040647-0-585492004818536"
4090
+ "$ref": "#/definitions/interface-769040647-14205-24567-769040647-0-584942004818536"
4135
4091
  },
4136
4092
  "observability": {
4137
- "$ref": "#/definitions/interface-769040647-13628-23990-769040647-0-585492004818536"
4093
+ "$ref": "#/definitions/interface-769040647-14205-24567-769040647-0-584942004818536"
4138
4094
  },
4139
4095
  "limits": {
4140
- "$ref": "#/definitions/interface-769040647-13628-23990-769040647-0-585492004818536"
4096
+ "$ref": "#/definitions/interface-769040647-14205-24567-769040647-0-584942004818536"
4141
4097
  },
4142
4098
  "cache": {
4143
- "$ref": "#/definitions/interface-769040647-13628-23990-769040647-0-585492004818536"
4099
+ "$ref": "#/definitions/interface-769040647-14205-24567-769040647-0-584942004818536"
4144
4100
  },
4145
4101
  "define": {
4146
4102
  "type": "object",
@@ -4683,28 +4639,6 @@
4683
4639
  "markdownDescription": "Specifies Agent Memory namespace bindings that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
4684
4640
  "default": []
4685
4641
  },
4686
- "websearch": {
4687
- "type": "object",
4688
- "properties": {
4689
- "binding": {
4690
- "type": "string",
4691
- "description": "The binding name used to refer to Web Search in the Worker.",
4692
- "markdownDescription": "The binding name used to refer to Web Search in the Worker."
4693
- },
4694
- "remote": {
4695
- "type": "boolean",
4696
- "description": "Whether the Web Search binding should be remote or not in local development",
4697
- "markdownDescription": "Whether the Web Search binding should be remote or not in local development"
4698
- }
4699
- },
4700
- "required": [
4701
- "binding"
4702
- ],
4703
- "additionalProperties": false,
4704
- "description": "Cloudflare Web Search binding. There is exactly one shared web corpus, so the binding is zero-config -- only the variable name is required, declared as a single object (not an array).\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
4705
- "markdownDescription": "Cloudflare Web Search binding. There is exactly one shared web corpus, so the\nbinding is zero-config -- only the variable name is required, declared as a\nsingle object (not an array).\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.",
4706
- "default": {}
4707
- },
4708
4642
  "hyperdrive": {
4709
4643
  "type": "array",
4710
4644
  "items": {
@@ -5444,7 +5378,7 @@
5444
5378
  "description": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments. Previews are branches of your Worker's main instance used to test features during feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`",
5445
5379
  "markdownDescription": "Configuration for Worker Previews.\n\nThis defines the settings used when creating Preview deployments.\nPreviews are branches of your Worker's main instance used to test features\nduring feature development outside of production.\n\nThe `previews` block contains any intentionally divergent configuration intended solely for Previews, including:\n- All non-inheritable properties (environment variables and bindings like KV, D1, R2, etc.)\n- Select inheritable properties: `logpush`, `observability`, `limits`, `cache`"
5446
5380
  },
5447
- "interface-769040647-13628-23990-769040647-0-585492004818536": {
5381
+ "interface-769040647-14205-24567-769040647-0-584942004818536": {
5448
5382
  "type": "object",
5449
5383
  "properties": {
5450
5384
  "name": {
@@ -6073,8 +6007,8 @@
6073
6007
  },
6074
6008
  "observability": {
6075
6009
  "$ref": "#/definitions/ContainerObservability",
6076
- "description": "Specify the observability behavior of this container application.\n\nWhen set, this overrides the root `observability` config for this container.",
6077
- "markdownDescription": "Specify the observability behavior of this container application.\n\nWhen set, this overrides the root `observability` config for this container."
6010
+ "description": "Specify the observability behavior of this container application.\n\nWhen set, this overrides the root `observability` config for this container. Durable Object-managed Containers only support enabling or disabling logs. Their settings are application-wide, and omitted settings preserve the existing application rather than inheriting root Worker observability.",
6011
+ "markdownDescription": "Specify the observability behavior of this container application.\n\nWhen set, this overrides the root `observability` config for this container.\nDurable Object-managed Containers only support enabling or disabling logs.\nTheir settings are application-wide, and omitted settings preserve the\nexisting application rather than inheriting root Worker observability."
6078
6012
  },
6079
6013
  "scheduling_policy": {
6080
6014
  "type": "string",
@@ -6276,6 +6210,19 @@
6276
6210
  "type": "string",
6277
6211
  "description": "Path to the Dockerfile Wrangler builds and pushes.",
6278
6212
  "markdownDescription": "Path to the Dockerfile Wrangler builds and pushes."
6213
+ },
6214
+ "build_context": {
6215
+ "type": "string",
6216
+ "description": "Build context, relative to the Wrangler configuration file. Defaults to the Dockerfile's directory.",
6217
+ "markdownDescription": "Build context, relative to the Wrangler configuration file.\nDefaults to the Dockerfile's directory."
6218
+ },
6219
+ "build_vars": {
6220
+ "type": "object",
6221
+ "additionalProperties": {
6222
+ "type": "string"
6223
+ },
6224
+ "description": "Variables available to the image only while it is being built.",
6225
+ "markdownDescription": "Variables available to the image only while it is being built."
6279
6226
  }
6280
6227
  },
6281
6228
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.131.2",
3
+ "version": "4.132.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "assembly",
@@ -45,6 +45,11 @@
45
45
  "miniflare-dist",
46
46
  "wrangler-dist",
47
47
  "templates",
48
+ "!templates/__tests__",
49
+ "!templates/**/*.d.ts",
50
+ "!templates/new-worker*",
51
+ "!templates/startDevWorker",
52
+ "!templates/tsconfig*",
48
53
  "kv-asset-handler.js",
49
54
  "config-schema.json"
50
55
  ],
@@ -66,17 +71,17 @@
66
71
  "esbuild": "0.28.1",
67
72
  "path-to-regexp": "6.3.0",
68
73
  "unenv": "2.0.0-rc.24",
69
- "workerd": "1.20260911.1",
74
+ "workerd": "1.20260915.1",
70
75
  "@cloudflare/kv-asset-handler": "0.5.0",
71
76
  "@cloudflare/unenv-preset": "2.16.1",
72
- "miniflare": "5.20260911.1-alpha"
77
+ "miniflare": "5.20260915.0-alpha"
73
78
  },
74
79
  "devDependencies": {
75
80
  "@aws-sdk/client-s3": "^3.721.0",
76
81
  "@aws-sdk/s3-request-presigner": "^3.721.0",
77
82
  "@bomb.sh/tab": "^0.0.12",
78
83
  "@cloudflare/types": "6.18.4",
79
- "@cloudflare/workers-types": "^5.20260911.1",
84
+ "@cloudflare/workers-types": "^5.20260915.1",
80
85
  "@cspotcode/source-map-support": "0.8.1",
81
86
  "@netlify/build-info": "10.5.1",
82
87
  "@sentry/node": "^7.86.0",
@@ -114,7 +119,6 @@
114
119
  "dotenv-expand": "^12.0.2",
115
120
  "empathic": "^2.0.0",
116
121
  "esprima": "4.0.1",
117
- "execa": "^6.1.0",
118
122
  "get-port": "^7.0.0",
119
123
  "glob-to-regexp": "^0.4.1",
120
124
  "https-proxy-agent": "7.0.2",
@@ -142,6 +146,7 @@
142
146
  "smol-toml": "1.5.2",
143
147
  "supports-color": "^9.2.2",
144
148
  "timeago.js": "4.0.2",
149
+ "tinyexec": "^1.2.4",
145
150
  "tree-kill": "1.2.2",
146
151
  "ts-dedent": "^2.2.0",
147
152
  "ts-json-schema-generator": "^1.5.0",
@@ -156,25 +161,25 @@
156
161
  "yaml": "^2.8.1",
157
162
  "yargs": "^17.7.2",
158
163
  "zod": "4.4.3",
159
- "@cloudflare/autoconfig": "0.4.5",
160
- "@cloudflare/build-output-utils": "0.5.0",
161
- "@cloudflare/cli-shared-helpers": "0.1.30",
162
- "@cloudflare/config": "0.12.0",
163
- "@cloudflare/containers-shared": "0.16.2",
164
- "@cloudflare/deploy-helpers": "0.11.2",
164
+ "@cloudflare/autoconfig": "0.4.6",
165
+ "@cloudflare/build-output-utils": "0.5.1",
166
+ "@cloudflare/cli-shared-helpers": "0.1.31",
167
+ "@cloudflare/config": "0.13.0",
165
168
  "@cloudflare/pages-functions": "0.1.0",
166
- "@cloudflare/remote-bindings": "0.0.24",
167
- "@cloudflare/runtime-types": "0.0.26",
168
- "@cloudflare/pages-shared": "^0.13.181",
169
+ "@cloudflare/pages-shared": "^0.13.182",
170
+ "@cloudflare/containers-shared": "0.16.3",
169
171
  "@cloudflare/shared-ast-primitives": "1.1.0",
170
- "@cloudflare/workers-auth": "0.6.12",
172
+ "@cloudflare/runtime-types": "0.0.27",
173
+ "@cloudflare/workers-shared": "0.19.9",
174
+ "@cloudflare/workers-auth": "0.7.0",
171
175
  "@cloudflare/workers-tsconfig": "0.0.0",
176
+ "@cloudflare/workers-utils": "0.39.0",
177
+ "@cloudflare/remote-bindings": "0.0.25",
172
178
  "@cloudflare/workflows-shared": "0.14.0",
173
- "@cloudflare/workers-utils": "0.38.1",
174
- "@cloudflare/workers-shared": "0.19.9"
179
+ "@cloudflare/deploy-helpers": "0.12.0"
175
180
  },
176
181
  "peerDependencies": {
177
- "@cloudflare/workers-types": "^5.20260911.1"
182
+ "@cloudflare/workers-types": "^5.20260915.1"
178
183
  },
179
184
  "peerDependenciesMeta": {
180
185
  "@cloudflare/workers-types": {
@@ -10,18 +10,48 @@ import {
10
10
 
11
11
  export { __facade_register__, __facade_registerInternal__ };
12
12
 
13
- // Miniflare 2's `EventTarget` follows the spec and doesn't allow exceptions to
14
- // be caught by `dispatchEvent`. Instead it has a custom `ThrowingEventTarget`
15
- // class that rethrows errors from event listeners in `dispatchEvent`.
16
- // We'd like errors to be propagated to the top-level `addEventListener`, so
17
- // we'd like to use `ThrowingEventTarget`. Unfortunately, `ThrowingEventTarget`
18
- // isn't exposed on the global scope, but `WorkerGlobalScope` (which extends
19
- // `ThrowingEventTarget`) is. Therefore, we get at it in this nasty way.
20
- let __FACADE_EVENT_TARGET__: EventTarget;
21
- if ((globalThis as any).MINIFLARE) {
22
- __FACADE_EVENT_TARGET__ = new (Object.getPrototypeOf(WorkerGlobalScope))();
23
- } else {
24
- __FACADE_EVENT_TARGET__ = new EventTarget();
13
+ const __FACADE_EVENT_TARGET__ = new EventTarget();
14
+ const __facade_eventListenerErrors__ = new WeakMap<Event, unknown>();
15
+ const __facade_eventListenerWrappers__ = new WeakMap<
16
+ EventListenerOrEventListenerObject,
17
+ EventListener
18
+ >();
19
+
20
+ // Facade events model runtime event delivery, so listener exceptions must
21
+ // propagate even when EventTarget uses spec-compliant report-and-continue semantics.
22
+ function __facade_getEventListenerWrapper__(
23
+ listener: EventListenerOrEventListenerObject
24
+ ): EventListener {
25
+ const existingWrapper = __facade_eventListenerWrappers__.get(listener);
26
+ if (existingWrapper !== undefined) {
27
+ return existingWrapper;
28
+ }
29
+
30
+ const wrapper: EventListener = function (this: EventTarget, event) {
31
+ try {
32
+ if (typeof listener === "function") {
33
+ listener.call(this, event);
34
+ } else {
35
+ listener.handleEvent(event);
36
+ }
37
+ } catch (error) {
38
+ __facade_eventListenerErrors__.set(event, error);
39
+ event.stopImmediatePropagation();
40
+ }
41
+ };
42
+ __facade_eventListenerWrappers__.set(listener, wrapper);
43
+ return wrapper;
44
+ }
45
+
46
+ function __facade_dispatchEvent__(event: Event): boolean {
47
+ const result = __FACADE_EVENT_TARGET__.dispatchEvent(event);
48
+ if (!__facade_eventListenerErrors__.has(event)) {
49
+ return result;
50
+ }
51
+
52
+ const error = __facade_eventListenerErrors__.get(event);
53
+ __facade_eventListenerErrors__.delete(event);
54
+ throw error;
25
55
  }
26
56
 
27
57
  function __facade_isSpecialEvent__(
@@ -37,7 +67,9 @@ globalThis.addEventListener = function (type, listener, options) {
37
67
  if (__facade_isSpecialEvent__(type)) {
38
68
  __FACADE_EVENT_TARGET__.addEventListener(
39
69
  type,
40
- listener as EventListenerOrEventListenerObject,
70
+ __facade_getEventListenerWrapper__(
71
+ listener as EventListenerOrEventListenerObject
72
+ ),
41
73
  options
42
74
  );
43
75
  } else {
@@ -48,7 +80,9 @@ globalThis.removeEventListener = function (type, listener, options) {
48
80
  if (__facade_isSpecialEvent__(type)) {
49
81
  __FACADE_EVENT_TARGET__.removeEventListener(
50
82
  type,
51
- listener as EventListenerOrEventListenerObject,
83
+ __facade_getEventListenerWrapper__(
84
+ listener as EventListenerOrEventListenerObject
85
+ ),
52
86
  options
53
87
  );
54
88
  } else {
@@ -57,7 +91,7 @@ globalThis.removeEventListener = function (type, listener, options) {
57
91
  };
58
92
  globalThis.dispatchEvent = function (event) {
59
93
  if (__facade_isSpecialEvent__(event.type)) {
60
- return __FACADE_EVENT_TARGET__.dispatchEvent(event);
94
+ return __facade_dispatchEvent__(event);
61
95
  } else {
62
96
  return __facade__originalDispatchEvent__(event);
63
97
  }
@@ -184,7 +218,7 @@ __facade__originalAddEventListener__("fetch", (event) => {
184
218
  noRetry() {},
185
219
  });
186
220
 
187
- __FACADE_EVENT_TARGET__.dispatchEvent(facadeEvent);
221
+ __facade_dispatchEvent__(facadeEvent);
188
222
  event.waitUntil(Promise.all(facadeEvent[__facade_waitUntil__]));
189
223
  }
190
224
  };
@@ -195,7 +229,7 @@ __facade__originalAddEventListener__("fetch", (event) => {
195
229
  passThroughOnException: ctx.passThroughOnException,
196
230
  });
197
231
 
198
- __FACADE_EVENT_TARGET__.dispatchEvent(facadeEvent);
232
+ __facade_dispatchEvent__(facadeEvent);
199
233
  facadeEvent[__facade_dispatched__] = true;
200
234
  event.waitUntil(Promise.all(facadeEvent[__facade_waitUntil__]));
201
235
 
@@ -224,6 +258,6 @@ __facade__originalAddEventListener__("scheduled", (event) => {
224
258
  noRetry: event.noRetry.bind(event),
225
259
  });
226
260
 
227
- __FACADE_EVENT_TARGET__.dispatchEvent(facadeEvent);
261
+ __facade_dispatchEvent__(facadeEvent);
228
262
  event.waitUntil(Promise.all(facadeEvent[__facade_waitUntil__]));
229
263
  });
@@ -1271,6 +1271,13 @@ type DurableObjectContainerImage = {
1271
1271
  * Path to the Dockerfile Wrangler builds and pushes.
1272
1272
  */
1273
1273
  dockerfile: string;
1274
+ /**
1275
+ * Build context, relative to the Wrangler configuration file.
1276
+ * Defaults to the Dockerfile's directory.
1277
+ */
1278
+ build_context?: string;
1279
+ /** Variables available to the image only while it is being built. */
1280
+ build_vars?: Record<string, string>;
1274
1281
  image?: never;
1275
1282
  } | {
1276
1283
  /**
@@ -1278,6 +1285,8 @@ type DurableObjectContainerImage = {
1278
1285
  */
1279
1286
  image: string;
1280
1287
  dockerfile?: never;
1288
+ build_context?: never;
1289
+ build_vars?: never;
1281
1290
  };
1282
1291
  /**
1283
1292
  * Configuration for a container application.
@@ -1357,14 +1366,17 @@ type ContainerApp = {
1357
1366
  * Specify the observability behavior of this container application.
1358
1367
  *
1359
1368
  * When set, this overrides the root `observability` config for this container.
1369
+ * Durable Object-managed Containers only support enabling or disabling logs.
1370
+ * Their settings are application-wide, and omitted settings preserve the
1371
+ * existing application rather than inheriting root Worker observability.
1360
1372
  */
1361
1373
  observability?: ContainerObservability;
1362
1374
  /**
1363
1375
  * The scheduling policy of the application
1364
1376
  * @optional
1365
1377
  * `"durable_object"` makes each Durable Object instance own its Container.
1366
- * In that mode, only `name`, `class_name`, `scheduling_policy`, and `images` are
1367
- * supported on this entry.
1378
+ * In that mode, `name`, `class_name`, `scheduling_policy`, `images`, and
1379
+ * application-wide log `observability` are supported on this entry.
1368
1380
  *
1369
1381
  * @default "default"
1370
1382
  */
@@ -2395,23 +2407,6 @@ interface EnvironmentNonInheritable {
2395
2407
  /** Whether the Agent Memory binding should be remote in local development */
2396
2408
  remote?: boolean;
2397
2409
  }[];
2398
- /**
2399
- * Cloudflare Web Search binding. There is exactly one shared web corpus, so the
2400
- * binding is zero-config -- only the variable name is required, declared as a
2401
- * single object (not an array).
2402
- *
2403
- * NOTE: This field is not automatically inherited from the top level environment,
2404
- * and so must be specified in every named environment.
2405
- *
2406
- * @default {}
2407
- * @nonInheritable
2408
- */
2409
- websearch: {
2410
- /** The binding name used to refer to Web Search in the Worker. */
2411
- binding: string;
2412
- /** Whether the Web Search binding should be remote or not in local development */
2413
- remote?: boolean;
2414
- } | undefined;
2415
2410
  /**
2416
2411
  * Specifies Hyperdrive configs that are bound to this Worker environment.
2417
2412
  *
@@ -3586,7 +3581,6 @@ type Teams =
3586
3581
  | "Product: AI"
3587
3582
  | "Product: AI Search"
3588
3583
  | "Product: Agent Memory"
3589
- | "Product: Web Search"
3590
3584
  | "Product: Hyperdrive"
3591
3585
  | "Product: Pipelines"
3592
3586
  | "Product: Vectorize"