wrangler 4.139.0 → 4.141.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.
@@ -17,6 +17,9 @@
17
17
  "markdownDescription": "The `env` section defines overrides for the configuration for different environments.\n\nAll environment fields can be specified at the top level of the config indicating the default environment settings.\n\n- Some fields are inherited and overridable in each environment.\n- But some are not inherited and must be explicitly specified in every environment, if they are specified at the top level.\n\nFor more information, see the documentation at https://developers.cloudflare.com/workers/cli-wrangler/configuration#environments",
18
18
  "default": {}
19
19
  },
20
+ "durable_objects": {
21
+ "$ref": "#/definitions/RawDurableObjectsConfig"
22
+ },
20
23
  "name": {
21
24
  "type": "string",
22
25
  "description": "The name of your Worker. Alphanumeric + dashes only.",
@@ -428,23 +431,6 @@
428
431
  "description": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property",
429
432
  "markdownDescription": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property"
430
433
  },
431
- "durable_objects": {
432
- "type": "object",
433
- "properties": {
434
- "bindings": {
435
- "$ref": "#/definitions/DurableObjectBindings"
436
- }
437
- },
438
- "required": [
439
- "bindings"
440
- ],
441
- "additionalProperties": false,
442
- "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects",
443
- "markdownDescription": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at\nhttps://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects",
444
- "default": {
445
- "bindings": []
446
- }
447
- },
448
434
  "workflows": {
449
435
  "type": "array",
450
436
  "items": {
@@ -1828,7 +1814,11 @@
1828
1814
  },
1829
1815
  "RawEnvironment": {
1830
1816
  "type": "object",
1817
+ "additionalProperties": false,
1831
1818
  "properties": {
1819
+ "durable_objects": {
1820
+ "$ref": "#/definitions/RawDurableObjectsConfig"
1821
+ },
1832
1822
  "name": {
1833
1823
  "type": "string",
1834
1824
  "description": "The name of your Worker. Alphanumeric + dashes only.",
@@ -2240,23 +2230,6 @@
2240
2230
  "description": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property",
2241
2231
  "markdownDescription": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property"
2242
2232
  },
2243
- "durable_objects": {
2244
- "type": "object",
2245
- "properties": {
2246
- "bindings": {
2247
- "$ref": "#/definitions/DurableObjectBindings"
2248
- }
2249
- },
2250
- "required": [
2251
- "bindings"
2252
- ],
2253
- "additionalProperties": false,
2254
- "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects",
2255
- "markdownDescription": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at\nhttps://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects",
2256
- "default": {
2257
- "bindings": []
2258
- }
2259
- },
2260
2233
  "workflows": {
2261
2234
  "type": "array",
2262
2235
  "items": {
@@ -3512,10 +3485,81 @@
3512
3485
  "default": []
3513
3486
  }
3514
3487
  },
3515
- "additionalProperties": false,
3516
3488
  "description": "The raw environment configuration that we read from the config file.\n\nAll the properties are optional, and will be replaced with defaults in the configuration that is used in the rest of the codebase.",
3517
3489
  "markdownDescription": "The raw environment configuration that we read from the config file.\n\nAll the properties are optional, and will be replaced with defaults in the configuration that\nis used in the rest of the codebase."
3518
3490
  },
3491
+ "RawDurableObjectsConfig": {
3492
+ "type": "object",
3493
+ "additionalProperties": false,
3494
+ "properties": {
3495
+ "bindings": {
3496
+ "$ref": "#/definitions/DurableObjectBindings"
3497
+ },
3498
+ "code_update_strategy": {
3499
+ "$ref": "#/definitions/DurableObjectCodeUpdateStrategy"
3500
+ }
3501
+ }
3502
+ },
3503
+ "DurableObjectBindings": {
3504
+ "type": "array",
3505
+ "items": {
3506
+ "type": "object",
3507
+ "properties": {
3508
+ "name": {
3509
+ "type": "string",
3510
+ "description": "The name of the binding used to refer to the Durable Object",
3511
+ "markdownDescription": "The name of the binding used to refer to the Durable Object"
3512
+ },
3513
+ "class_name": {
3514
+ "type": "string",
3515
+ "description": "The exported class name of the Durable Object",
3516
+ "markdownDescription": "The exported class name of the Durable Object"
3517
+ },
3518
+ "script_name": {
3519
+ "type": "string",
3520
+ "description": "The script where the Durable Object is defined (if it's external to this Worker)",
3521
+ "markdownDescription": "The script where the Durable Object is defined (if it's external to this Worker)"
3522
+ },
3523
+ "environment": {
3524
+ "type": "string",
3525
+ "description": "The service environment of the script_name to bind to",
3526
+ "markdownDescription": "The service environment of the script_name to bind to"
3527
+ }
3528
+ },
3529
+ "required": [
3530
+ "name",
3531
+ "class_name"
3532
+ ],
3533
+ "additionalProperties": false
3534
+ }
3535
+ },
3536
+ "DurableObjectCodeUpdateStrategy": {
3537
+ "type": "object",
3538
+ "properties": {
3539
+ "mode": {
3540
+ "type": "string",
3541
+ "enum": [
3542
+ "immediate",
3543
+ "deferred"
3544
+ ],
3545
+ "description": "How Durable Object code updates should be applied.",
3546
+ "markdownDescription": "How Durable Object code updates should be applied."
3547
+ },
3548
+ "max_delay": {
3549
+ "type": "number",
3550
+ "description": "Maximum time, in seconds, to wait for Durable Objects to hibernate. Defaults to 300 (5 minutes) and cannot exceed 86400 (24 hours).",
3551
+ "markdownDescription": "Maximum time, in seconds, to wait for Durable Objects to hibernate.\nDefaults to 300 (5 minutes) and cannot exceed 86400 (24 hours).",
3552
+ "minimum": 0,
3553
+ "maximum": 86400,
3554
+ "multipleOf": 0.001,
3555
+ "default": 300
3556
+ }
3557
+ },
3558
+ "required": [
3559
+ "mode"
3560
+ ],
3561
+ "additionalProperties": false
3562
+ },
3519
3563
  "Route": {
3520
3564
  "anyOf": [
3521
3565
  {
@@ -4256,22 +4300,21 @@
4256
4300
  },
4257
4301
  "PreviewsConfig": {
4258
4302
  "type": "object",
4259
- "additionalProperties": false,
4260
4303
  "properties": {
4261
4304
  "logpush": {
4262
- "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-597452004818536"
4305
+ "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-605262004818536"
4263
4306
  },
4264
4307
  "observability": {
4265
- "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-597452004818536"
4308
+ "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-605262004818536"
4266
4309
  },
4267
4310
  "limits": {
4268
- "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-597452004818536"
4311
+ "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-605262004818536"
4269
4312
  },
4270
4313
  "placement": {
4271
- "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-597452004818536"
4314
+ "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-605262004818536"
4272
4315
  },
4273
4316
  "cache": {
4274
- "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-597452004818536"
4317
+ "$ref": "#/definitions/interface-769040647-14860-25222-769040647-0-605262004818536"
4275
4318
  },
4276
4319
  "define": {
4277
4320
  "type": "object",
@@ -4314,23 +4357,6 @@
4314
4357
  "description": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property",
4315
4358
  "markdownDescription": "Secrets configuration.\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property"
4316
4359
  },
4317
- "durable_objects": {
4318
- "type": "object",
4319
- "properties": {
4320
- "bindings": {
4321
- "$ref": "#/definitions/DurableObjectBindings"
4322
- }
4323
- },
4324
- "required": [
4325
- "bindings"
4326
- ],
4327
- "additionalProperties": false,
4328
- "description": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at https://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects",
4329
- "markdownDescription": "A list of durable objects that your Worker should be bound to.\n\nFor more information about Durable Objects, see the documentation at\nhttps://developers.cloudflare.com/workers/learning/using-durable-objects\n\nNOTE: This field is not automatically inherited from the top level environment,\nand so must be specified in every named environment.\n\nFor reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects",
4330
- "default": {
4331
- "bindings": []
4332
- }
4333
- },
4334
4360
  "workflows": {
4335
4361
  "type": "array",
4336
4362
  "items": {
@@ -5584,12 +5610,25 @@
5584
5610
  "description": "Specifies VPC networks that are bound to this Worker environment.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
5585
5611
  "markdownDescription": "Specifies VPC networks 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.",
5586
5612
  "default": []
5613
+ },
5614
+ "durable_objects": {
5615
+ "type": "object",
5616
+ "properties": {
5617
+ "bindings": {
5618
+ "$ref": "#/definitions/DurableObjectBindings"
5619
+ }
5620
+ },
5621
+ "required": [
5622
+ "bindings"
5623
+ ],
5624
+ "additionalProperties": false
5587
5625
  }
5588
5626
  },
5627
+ "additionalProperties": false,
5589
5628
  "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`, `placement`, `cache`",
5590
5629
  "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`, `placement`, `cache`"
5591
5630
  },
5592
- "interface-769040647-14860-25222-769040647-0-597452004818536": {
5631
+ "interface-769040647-14860-25222-769040647-0-605262004818536": {
5593
5632
  "type": "object",
5594
5633
  "properties": {
5595
5634
  "name": {
@@ -6007,39 +6046,6 @@
6007
6046
  }
6008
6047
  ]
6009
6048
  },
6010
- "DurableObjectBindings": {
6011
- "type": "array",
6012
- "items": {
6013
- "type": "object",
6014
- "properties": {
6015
- "name": {
6016
- "type": "string",
6017
- "description": "The name of the binding used to refer to the Durable Object",
6018
- "markdownDescription": "The name of the binding used to refer to the Durable Object"
6019
- },
6020
- "class_name": {
6021
- "type": "string",
6022
- "description": "The exported class name of the Durable Object",
6023
- "markdownDescription": "The exported class name of the Durable Object"
6024
- },
6025
- "script_name": {
6026
- "type": "string",
6027
- "description": "The script where the Durable Object is defined (if it's external to this Worker)",
6028
- "markdownDescription": "The script where the Durable Object is defined (if it's external to this Worker)"
6029
- },
6030
- "environment": {
6031
- "type": "string",
6032
- "description": "The service environment of the script_name to bind to",
6033
- "markdownDescription": "The service environment of the script_name to bind to"
6034
- }
6035
- },
6036
- "required": [
6037
- "name",
6038
- "class_name"
6039
- ],
6040
- "additionalProperties": false
6041
- }
6042
- },
6043
6049
  "WorkflowBinding": {
6044
6050
  "type": "object",
6045
6051
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.139.0",
3
+ "version": "4.141.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "assembly",
@@ -71,17 +71,17 @@
71
71
  "esbuild": "0.28.1",
72
72
  "path-to-regexp": "6.3.0",
73
73
  "unenv": "2.0.0-rc.24",
74
- "workerd": "1.20260923.1",
74
+ "workerd": "1.20260925.1",
75
75
  "@cloudflare/unenv-preset": "2.16.2",
76
76
  "@cloudflare/kv-asset-handler": "0.5.0",
77
- "miniflare": "5.20260923.0-alpha"
77
+ "miniflare": "5.20260925.0-alpha"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@aws-sdk/client-s3": "^3.721.0",
81
81
  "@aws-sdk/s3-request-presigner": "^3.721.0",
82
82
  "@bomb.sh/tab": "^0.0.12",
83
83
  "@cloudflare/types": "6.18.4",
84
- "@cloudflare/workers-types": "^5.20260923.1",
84
+ "@cloudflare/workers-types": "^5.20260925.1",
85
85
  "@cspotcode/source-map-support": "0.8.1",
86
86
  "@netlify/build-info": "10.5.1",
87
87
  "@sentry/node": "^7.86.0",
@@ -161,25 +161,25 @@
161
161
  "yaml": "^2.8.1",
162
162
  "yargs": "^17.7.2",
163
163
  "zod": "4.4.3",
164
- "@cloudflare/autoconfig": "0.6.4",
165
- "@cloudflare/build-output-utils": "0.8.0",
166
- "@cloudflare/cli-shared-helpers": "0.1.38",
167
- "@cloudflare/config": "0.18.0",
168
- "@cloudflare/containers-shared": "0.20.0",
164
+ "@cloudflare/autoconfig": "0.6.6",
165
+ "@cloudflare/build-output-utils": "0.8.1",
166
+ "@cloudflare/cli-shared-helpers": "0.2.0",
167
+ "@cloudflare/config": "0.19.0",
168
+ "@cloudflare/containers-shared": "0.20.2",
169
+ "@cloudflare/deploy-helpers": "0.18.0",
170
+ "@cloudflare/pages-shared": "^0.13.189",
171
+ "@cloudflare/remote-bindings": "0.0.36",
169
172
  "@cloudflare/pages-functions": "0.1.0",
170
- "@cloudflare/deploy-helpers": "0.16.0",
171
- "@cloudflare/pages-shared": "^0.13.188",
172
- "@cloudflare/remote-bindings": "0.0.34",
173
- "@cloudflare/runtime-types": "0.1.2",
174
- "@cloudflare/shared-ast-primitives": "1.1.0",
173
+ "@cloudflare/runtime-types": "0.1.3",
174
+ "@cloudflare/workers-auth": "0.9.4",
175
175
  "@cloudflare/workers-shared": "0.20.0",
176
- "@cloudflare/workers-auth": "0.9.2",
177
- "@cloudflare/workers-utils": "0.42.0",
176
+ "@cloudflare/shared-ast-primitives": "1.1.0",
177
+ "@cloudflare/workers-utils": "0.44.0",
178
178
  "@cloudflare/workers-tsconfig": "0.0.0",
179
179
  "@cloudflare/workflows-shared": "0.14.0"
180
180
  },
181
181
  "peerDependencies": {
182
- "@cloudflare/workers-types": "^5.20260923.1"
182
+ "@cloudflare/workers-types": "^5.20260925.1"
183
183
  },
184
184
  "peerDependenciesMeta": {
185
185
  "@cloudflare/workers-types": {
@@ -2018,6 +2018,26 @@ type DurableObjectBindings = {
2018
2018
  /** The service environment of the script_name to bind to */
2019
2019
  environment?: string;
2020
2020
  }[];
2021
+ type DurableObjectCodeUpdateStrategy = {
2022
+ /** How Durable Object code updates should be applied. */
2023
+ mode: "immediate" | "deferred";
2024
+ /**
2025
+ * Maximum time, in seconds, to wait for Durable Objects to hibernate.
2026
+ * Defaults to 300 (5 minutes) and cannot exceed 86400 (24 hours).
2027
+ * @minimum 0
2028
+ * @maximum 86400
2029
+ * @multipleOf 0.001
2030
+ * @default 300
2031
+ */
2032
+ max_delay?: number;
2033
+ };
2034
+ type DurableObjectsConfig = {
2035
+ bindings: DurableObjectBindings;
2036
+ code_update_strategy?: DurableObjectCodeUpdateStrategy;
2037
+ };
2038
+ type RawDurableObjectsConfig = Omit<DurableObjectsConfig, "bindings"> & {
2039
+ bindings?: DurableObjectBindings;
2040
+ };
2021
2041
  declare const ARTIFACTS_EVENT_TYPES: readonly ["cf.artifacts.repo.created", "cf.artifacts.repo.deleted", "cf.artifacts.repo.forked", "cf.artifacts.repo.imported", "cf.artifacts.repo.pushed", "cf.artifacts.repo.cloned", "cf.artifacts.repo.fetched", "cf.artifacts.repo.token.created", "cf.artifacts.repo.token.revoked"];
2022
2042
  type ArtifactsEventType = (typeof ARTIFACTS_EVENT_TYPES)[number];
2023
2043
  type ArtifactsEventTrigger = {
@@ -2131,7 +2151,7 @@ interface EnvironmentNonInheritable {
2131
2151
  required?: string[];
2132
2152
  };
2133
2153
  /**
2134
- * A list of durable objects that your Worker should be bound to.
2154
+ * Durable Object bindings and code update strategy for your Worker.
2135
2155
  *
2136
2156
  * For more information about Durable Objects, see the documentation at
2137
2157
  * https://developers.cloudflare.com/workers/learning/using-durable-objects
@@ -2144,9 +2164,7 @@ interface EnvironmentNonInheritable {
2144
2164
  * @default {bindings:[]}
2145
2165
  * @nonInheritable
2146
2166
  */
2147
- durable_objects: {
2148
- bindings: DurableObjectBindings;
2149
- };
2167
+ durable_objects: DurableObjectsConfig;
2150
2168
  /**
2151
2169
  * A list of workflows that your Worker should be bound to.
2152
2170
  *
@@ -2853,7 +2871,9 @@ interface EnvironmentNonInheritable {
2853
2871
  * All the properties are optional, and will be replaced with defaults in the configuration that
2854
2872
  * is used in the rest of the codebase.
2855
2873
  */
2856
- type RawEnvironment = Partial<Environment>;
2874
+ type RawEnvironment = Partial<Omit<Environment, "durable_objects">> & {
2875
+ durable_objects?: RawDurableObjectsConfig;
2876
+ };
2857
2877
  /**
2858
2878
  * A bundling resolver rule, defining the modules type for paths that match the specified globs.
2859
2879
  */
@@ -2996,7 +3016,10 @@ type ContainerEngine = {
2996
3016
  *
2997
3017
  * @inheritable
2998
3018
  */
2999
- interface PreviewsConfig extends Partial<EnvironmentNonInheritable>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits" | "placement" | "cache">> {
3019
+ interface PreviewsConfig extends Partial<Omit<EnvironmentNonInheritable, "durable_objects">>, Partial<Pick<EnvironmentInheritable, "logpush" | "observability" | "limits" | "placement" | "cache">> {
3020
+ durable_objects?: {
3021
+ bindings: DurableObjectBindings;
3022
+ };
3000
3023
  }
3001
3024
 
3002
3025
  /**