wrangler 4.20.5 → 4.21.1

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.
@@ -2323,31 +2323,28 @@
2323
2323
  "type": "string",
2324
2324
  "description": "Name of the application"
2325
2325
  },
2326
- "instances": {
2327
- "type": "number",
2328
- "description": "Number of application instances"
2329
- },
2330
2326
  "max_instances": {
2331
2327
  "type": "number",
2332
- "description": "Number of maximum application instances. Only applicable to Durable Object container applications"
2328
+ "description": "Number of maximum application instances."
2333
2329
  },
2334
2330
  "image": {
2335
2331
  "type": "string",
2336
- "description": "The path to a Dockerfile, or an image URI. Can be defined both here or by setting the `image` key in the `ContainerApp` configuration"
2332
+ "description": "The path to a Dockerfile, or an image URI for the Cloudflare registry."
2337
2333
  },
2338
2334
  "image_build_context": {
2339
2335
  "type": "string",
2340
- "description": "Build context of the application. By default it is the directory of `image`."
2336
+ "description": "Build context of the application."
2341
2337
  },
2342
2338
  "image_vars": {
2343
2339
  "type": "object",
2344
2340
  "additionalProperties": {
2345
2341
  "type": "string"
2346
2342
  },
2347
- "description": "Image variables to be passed along the image"
2343
+ "description": "Image variables to be passed along the image at build time."
2348
2344
  },
2349
2345
  "class_name": {
2350
- "type": "string"
2346
+ "type": "string",
2347
+ "description": "The class name of the Durable Object the container is connected to."
2351
2348
  },
2352
2349
  "scheduling_policy": {
2353
2350
  "type": "string",
@@ -2356,7 +2353,8 @@
2356
2353
  "moon",
2357
2354
  "default"
2358
2355
  ],
2359
- "description": "The scheduling policy of the application, default is regional"
2356
+ "description": "The scheduling policy of the application",
2357
+ "default": "default"
2360
2358
  },
2361
2359
  "instance_type": {
2362
2360
  "type": "string",
@@ -2367,110 +2365,10 @@
2367
2365
  ],
2368
2366
  "description": "The instance type to be used for the container. This sets preconfigured options for vcpu and memory"
2369
2367
  },
2370
- "configuration": {
2371
- "type": "object",
2372
- "properties": {
2373
- "image": {
2374
- "type": "string"
2375
- },
2376
- "labels": {
2377
- "type": "array",
2378
- "items": {
2379
- "type": "object",
2380
- "properties": {
2381
- "name": {
2382
- "type": "string"
2383
- },
2384
- "value": {
2385
- "type": "string"
2386
- }
2387
- },
2388
- "required": [
2389
- "name",
2390
- "value"
2391
- ],
2392
- "additionalProperties": false
2393
- }
2394
- },
2395
- "secrets": {
2396
- "type": "array",
2397
- "items": {
2398
- "type": "object",
2399
- "properties": {
2400
- "name": {
2401
- "type": "string"
2402
- },
2403
- "type": {
2404
- "type": "string",
2405
- "const": "env"
2406
- },
2407
- "secret": {
2408
- "type": "string"
2409
- }
2410
- },
2411
- "required": [
2412
- "name",
2413
- "type",
2414
- "secret"
2415
- ],
2416
- "additionalProperties": false
2417
- }
2418
- },
2419
- "disk": {
2420
- "type": "object",
2421
- "properties": {
2422
- "size": {
2423
- "type": "string"
2424
- }
2425
- },
2426
- "required": [
2427
- "size"
2428
- ],
2429
- "additionalProperties": false
2430
- }
2431
- },
2432
- "required": [
2433
- "image"
2434
- ],
2435
- "additionalProperties": false
2436
- },
2437
- "constraints": {
2438
- "type": "object",
2439
- "properties": {
2440
- "regions": {
2441
- "type": "array",
2442
- "items": {
2443
- "type": "string"
2444
- }
2445
- },
2446
- "cities": {
2447
- "type": "array",
2448
- "items": {
2449
- "type": "string"
2450
- }
2451
- },
2452
- "tier": {
2453
- "type": "number"
2454
- }
2455
- },
2456
- "additionalProperties": false,
2457
- "description": "Scheduling constraints"
2458
- },
2459
- "durable_objects": {
2460
- "type": "object",
2461
- "properties": {
2462
- "namespace_id": {
2463
- "type": "string"
2464
- }
2465
- },
2466
- "required": [
2467
- "namespace_id"
2468
- ],
2469
- "additionalProperties": false
2470
- },
2471
2368
  "rollout_step_percentage": {
2472
2369
  "type": "number",
2473
- "description": "How a rollout should be done, defining the size of it"
2370
+ "description": "How a rollout should be done, defining the size of it",
2371
+ "default": 25
2474
2372
  },
2475
2373
  "rollout_kind": {
2476
2374
  "type": "string",
@@ -2479,13 +2377,13 @@
2479
2377
  "none",
2480
2378
  "full_manual"
2481
2379
  ],
2482
- "description": "How a rollout should be created. It supports the following modes: - full_auto: The container application will be rolled out fully automatically. - none: The container application won't have a roll out or update. - manual: The container application will be rollout fully by manually actioning progress steps."
2380
+ "description": "How a rollout should be created. It supports the following modes: - full_auto: The container application will be rolled out fully automatically. - none: The container application won't have a roll out or update. - manual: The container application will be rollout fully by manually actioning progress steps.",
2381
+ "default": "full_auto"
2483
2382
  }
2484
2383
  },
2485
2384
  "required": [
2486
- "name",
2487
- "class_name",
2488
- "configuration"
2385
+ "image",
2386
+ "class_name"
2489
2387
  ],
2490
2388
  "additionalProperties": false,
2491
2389
  "description": "Configuration for a container application"
@@ -2578,7 +2476,7 @@
2578
2476
  },
2579
2477
  "container_engine": {
2580
2478
  "$ref": "#/definitions/ContainerEngine",
2581
- "description": "Either the Docker unix socket i.e. `unix:/var/run/docker.sock` or a full configuration. Note that windows is only supported via WSL at the moment"
2479
+ "description": "Either the Docker unix socket i.e. `unix:///var/run/docker.sock` or a full configuration. Note that windows is only supported via WSL at the moment"
2582
2480
  }
2583
2481
  },
2584
2482
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.20.5",
3
+ "version": "4.21.1",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -57,7 +57,7 @@
57
57
  "unenv": "2.0.0-rc.17",
58
58
  "workerd": "1.20250617.0",
59
59
  "@cloudflare/kv-asset-handler": "0.4.0",
60
- "miniflare": "4.20250617.3"
60
+ "miniflare": "4.20250617.4"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
@@ -136,9 +136,9 @@
136
136
  "xxhash-wasm": "^1.0.1",
137
137
  "yargs": "^17.7.2",
138
138
  "@cloudflare/cli": "1.1.1",
139
- "@cloudflare/containers-shared": "0.2.1",
139
+ "@cloudflare/containers-shared": "0.2.2",
140
140
  "@cloudflare/eslint-config-worker": "1.1.0",
141
- "@cloudflare/pages-shared": "^0.13.50",
141
+ "@cloudflare/pages-shared": "^0.13.51",
142
142
  "@cloudflare/workers-shared": "0.18.0",
143
143
  "@cloudflare/workers-tsconfig": "0.0.0"
144
144
  },
@@ -46,32 +46,59 @@ type CloudchamberConfig = {
46
46
  * Configuration for a container application
47
47
  */
48
48
  type ContainerApp = {
49
- /** Name of the application*/
50
- name: string;
51
- /** Number of application instances */
49
+ /**
50
+ * Name of the application
51
+ * @optional Defaults to `worker_name-class_name` if not specified.
52
+ */
53
+ name?: string;
54
+ /**
55
+ * Number of application instances
56
+ * @deprecated
57
+ * @hidden
58
+ */
52
59
  instances?: number;
53
- /** Number of maximum application instances. Only applicable to Durable Object container applications */
60
+ /**
61
+ * Number of maximum application instances.
62
+ * @optional
63
+ */
54
64
  max_instances?: number;
55
65
  /**
56
- * The path to a Dockerfile, or an image URI.
57
- * Can be defined both here or by setting the `image` key in the `ContainerApp` configuration
66
+ * The path to a Dockerfile, or an image URI for the Cloudflare registry.
58
67
  */
59
- image?: string;
68
+ image: string;
60
69
  /**
61
- * Build context of the application. By default it is the directory of `image`.
70
+ * Build context of the application.
71
+ * @optional - defaults to the directory of `image`.
62
72
  */
63
73
  image_build_context?: string;
64
74
  /**
65
- * Image variables to be passed along the image
75
+ * Image variables to be passed along the image at build time.
76
+ * @optional
66
77
  */
67
78
  image_vars?: Record<string, string>;
79
+ /**
80
+ * The class name of the Durable Object the container is connected to.
81
+ */
68
82
  class_name: string;
69
- /** The scheduling policy of the application, default is regional */
83
+ /**
84
+ * The scheduling policy of the application
85
+ * @optional
86
+ * @default "default"
87
+ */
70
88
  scheduling_policy?: "regional" | "moon" | "default";
71
- /** The instance type to be used for the container. This sets preconfigured options for vcpu and memory */
89
+ /**
90
+ * The instance type to be used for the container. This sets preconfigured options for vcpu and memory
91
+ * @optional
92
+ */
72
93
  instance_type?: "dev" | "basic" | "standard";
73
- configuration: {
74
- image: string;
94
+ /**
95
+ * @deprecated Use top level `containers` fields instead.
96
+ * `configuration.image` should be `image`
97
+ * `configuration.disk` should be set via `instance_type`
98
+ * @hidden
99
+ */
100
+ configuration?: {
101
+ image?: string;
75
102
  labels?: {
76
103
  name: string;
77
104
  value: string;
@@ -85,22 +112,35 @@ type ContainerApp = {
85
112
  size: string;
86
113
  };
87
114
  };
88
- /** Scheduling constraints */
115
+ /**
116
+ * Scheduling constraints
117
+ * @hidden
118
+ */
89
119
  constraints?: {
90
120
  regions?: string[];
91
121
  cities?: string[];
92
122
  tier?: number;
93
123
  };
124
+ /**
125
+ * @deprecated use the `class_name` field instead.
126
+ * @hidden
127
+ */
94
128
  durable_objects?: {
95
129
  namespace_id: string;
96
130
  };
97
- /** How a rollout should be done, defining the size of it */
131
+ /**
132
+ * How a rollout should be done, defining the size of it
133
+ * @optional
134
+ * @default 25
135
+ * */
98
136
  rollout_step_percentage?: number;
99
137
  /**
100
138
  * How a rollout should be created. It supports the following modes:
101
139
  * - full_auto: The container application will be rolled out fully automatically.
102
140
  * - none: The container application won't have a roll out or update.
103
141
  * - manual: The container application will be rollout fully by manually actioning progress steps.
142
+ * @optional
143
+ * @default "full_auto"
104
144
  */
105
145
  rollout_kind?: "full_auto" | "none" | "full_manual";
106
146
  };
@@ -1203,7 +1243,7 @@ interface DevConfig {
1203
1243
  */
1204
1244
  enable_containers: boolean;
1205
1245
  /**
1206
- * Either the Docker unix socket i.e. `unix:/var/run/docker.sock` or a full configuration.
1246
+ * Either the Docker unix socket i.e. `unix:///var/run/docker.sock` or a full configuration.
1207
1247
  * Note that windows is only supported via WSL at the moment
1208
1248
  */
1209
1249
  container_engine: ContainerEngine | undefined;
@@ -1241,7 +1281,6 @@ type NormalizeAndValidateConfigArgs = {
1241
1281
  upstreamProtocol?: string;
1242
1282
  script?: string;
1243
1283
  enableContainers?: boolean;
1244
- containerEngine?: ContainerEngine;
1245
1284
  };
1246
1285
 
1247
1286
  type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {