wrangler 4.31.0 → 4.32.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/config-schema.json +17 -22
- package/package.json +7 -7
- package/wrangler-dist/cli.d.ts +36 -31
- package/wrangler-dist/cli.js +1217 -1669
- package/wrangler-dist/metafile-cjs.json +1 -1
package/config-schema.json
CHANGED
@@ -605,11 +605,7 @@
|
|
605
605
|
},
|
606
606
|
"service": {
|
607
607
|
"type": "string",
|
608
|
-
"description": "The name of the service."
|
609
|
-
},
|
610
|
-
"environment": {
|
611
|
-
"type": "string",
|
612
|
-
"description": "The environment of the service (e.g. production, staging, etc)."
|
608
|
+
"description": "The name of the service. To bind to a worker in a specific environment, you should use the format `<worker_name>-<environment_name>`."
|
613
609
|
},
|
614
610
|
"entrypoint": {
|
615
611
|
"type": "string",
|
@@ -1611,11 +1607,7 @@
|
|
1611
1607
|
},
|
1612
1608
|
"service": {
|
1613
1609
|
"type": "string",
|
1614
|
-
"description": "The name of the service."
|
1615
|
-
},
|
1616
|
-
"environment": {
|
1617
|
-
"type": "string",
|
1618
|
-
"description": "The environment of the service (e.g. production, staging, etc)."
|
1610
|
+
"description": "The name of the service. To bind to a worker in a specific environment, you should use the format `<worker_name>-<environment_name>`."
|
1619
1611
|
},
|
1620
1612
|
"entrypoint": {
|
1621
1613
|
"type": "string",
|
@@ -2390,19 +2382,22 @@
|
|
2390
2382
|
"default": "dev"
|
2391
2383
|
},
|
2392
2384
|
"rollout_step_percentage": {
|
2393
|
-
"
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2385
|
+
"anyOf": [
|
2386
|
+
{
|
2387
|
+
"type": "number"
|
2388
|
+
},
|
2389
|
+
{
|
2390
|
+
"type": "array",
|
2391
|
+
"items": {
|
2392
|
+
"type": "number"
|
2393
|
+
}
|
2394
|
+
}
|
2403
2395
|
],
|
2404
|
-
"description": "
|
2405
|
-
"default":
|
2396
|
+
"description": "Configures what percentage of instances should be updated at each step of a rollout. You can specify this as a single number, or an array of numbers.\n\nIf this is a single number, each step will progress by that percentage. The options are 5, 10, 20, 25, 50 or 100.\n\nIf this is an array, each step specifies the cumulative rollout progress. The final step must be 100.\n\nThis can be overridden adhoc by deploying with the `--containers-rollout=immediate` flag, which will roll out to 100% of instances in one step.",
|
2397
|
+
"default": [
|
2398
|
+
10,
|
2399
|
+
100
|
2400
|
+
]
|
2406
2401
|
},
|
2407
2402
|
"rollout_active_grace_period": {
|
2408
2403
|
"type": "number",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.32.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -55,9 +55,9 @@
|
|
55
55
|
"path-to-regexp": "6.3.0",
|
56
56
|
"unenv": "2.0.0-rc.19",
|
57
57
|
"workerd": "1.20250816.0",
|
58
|
-
"
|
58
|
+
"@cloudflare/kv-asset-handler": "0.4.0",
|
59
59
|
"@cloudflare/unenv-preset": "2.6.2",
|
60
|
-
"
|
60
|
+
"miniflare": "4.20250816.1"
|
61
61
|
},
|
62
62
|
"devDependencies": {
|
63
63
|
"@aws-sdk/client-s3": "^3.721.0",
|
@@ -137,12 +137,12 @@
|
|
137
137
|
"xdg-app-paths": "^8.3.0",
|
138
138
|
"xxhash-wasm": "^1.0.1",
|
139
139
|
"yargs": "^17.7.2",
|
140
|
-
"@cloudflare/containers-shared": "0.2.10",
|
141
|
-
"@cloudflare/eslint-config-worker": "1.1.0",
|
142
140
|
"@cloudflare/cli": "1.1.1",
|
143
|
-
"@cloudflare/pages-shared": "^0.13.64",
|
144
141
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
145
|
-
"@cloudflare/
|
142
|
+
"@cloudflare/eslint-config-worker": "1.1.0",
|
143
|
+
"@cloudflare/pages-shared": "^0.13.65",
|
144
|
+
"@cloudflare/workers-shared": "0.18.6",
|
145
|
+
"@cloudflare/containers-shared": "0.2.10"
|
146
146
|
},
|
147
147
|
"peerDependencies": {
|
148
148
|
"@cloudflare/workers-types": "^4.20250816.0"
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { Json, Request, Response as Response$1, DispatchFetch, NodeJSCompatMode, Miniflare, MiniflareOptions, Mutex, WorkerOptions, ModuleRule, RemoteProxyConnectionString } from 'miniflare';
|
1
|
+
import { Json, Request, Response as Response$1, DispatchFetch, NodeJSCompatMode, Miniflare, WorkerRegistry, MiniflareOptions, Mutex, WorkerOptions, ModuleRule, RemoteProxyConnectionString } from 'miniflare';
|
2
2
|
import * as undici from 'undici';
|
3
3
|
import { RequestInfo, RequestInit, Response, FormData } from 'undici';
|
4
4
|
import { CamelCaseKey, ArgumentsCamelCase, InferredOptionTypes, Alias, PositionalOptions, Options } from 'yargs';
|
5
5
|
import { RouterConfig, AssetConfig } from '@cloudflare/workers-shared';
|
6
|
+
import { Metafile } from 'esbuild';
|
6
7
|
import { EventEmitter } from 'node:events';
|
7
8
|
import Protocol from 'devtools-protocol/types/protocol-mapping';
|
8
|
-
import { Metafile } from 'esbuild';
|
9
9
|
import { ContainerNormalizedConfig } from '@cloudflare/containers-shared';
|
10
10
|
import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
|
11
11
|
import { URLSearchParams } from 'node:url';
|
@@ -150,11 +150,22 @@ type ContainerApp = {
|
|
150
150
|
namespace_id: string;
|
151
151
|
};
|
152
152
|
/**
|
153
|
-
*
|
153
|
+
* Configures what percentage of instances should be updated at each step of a rollout.
|
154
|
+
* You can specify this as a single number, or an array of numbers.
|
155
|
+
*
|
156
|
+
* If this is a single number, each step will progress by that percentage.
|
157
|
+
* The options are 5, 10, 20, 25, 50 or 100.
|
158
|
+
*
|
159
|
+
* If this is an array, each step specifies the cumulative rollout progress.
|
160
|
+
* The final step must be 100.
|
161
|
+
*
|
162
|
+
* This can be overridden adhoc by deploying with the `--containers-rollout=immediate` flag,
|
163
|
+
* which will roll out to 100% of instances in one step.
|
164
|
+
*
|
154
165
|
* @optional
|
155
|
-
* @default
|
166
|
+
* @default [10,100]
|
156
167
|
* */
|
157
|
-
rollout_step_percentage?: number;
|
168
|
+
rollout_step_percentage?: number | number[];
|
158
169
|
/**
|
159
170
|
* How a rollout should be created. It supports the following modes:
|
160
171
|
* - full_auto: The container application will be rolled out fully automatically.
|
@@ -162,6 +173,7 @@ type ContainerApp = {
|
|
162
173
|
* - manual: The container application will be rollout fully by manually actioning progress steps.
|
163
174
|
* @optional
|
164
175
|
* @default "full_auto"
|
176
|
+
* @hidden
|
165
177
|
*/
|
166
178
|
rollout_kind?: "full_auto" | "none" | "full_manual";
|
167
179
|
/**
|
@@ -770,9 +782,18 @@ interface EnvironmentNonInheritable {
|
|
770
782
|
services: {
|
771
783
|
/** The binding name used to refer to the bound service. */
|
772
784
|
binding: string;
|
773
|
-
/**
|
785
|
+
/**
|
786
|
+
* The name of the service.
|
787
|
+
* To bind to a worker in a specific environment,
|
788
|
+
* you should use the format `<worker_name>-<environment_name>`.
|
789
|
+
*/
|
774
790
|
service: string;
|
775
|
-
/**
|
791
|
+
/**
|
792
|
+
* @hidden
|
793
|
+
* @deprecated you should use `service: <worker_name>-<environment_name>` instead.
|
794
|
+
* This refers to the deprecated concept of 'service environments'.
|
795
|
+
* The environment of the service (e.g. production, staging, etc).
|
796
|
+
*/
|
776
797
|
environment?: string;
|
777
798
|
/** Optionally, the entrypoint (named export) of the service to bind to. */
|
778
799
|
entrypoint?: string;
|
@@ -1811,26 +1832,6 @@ declare const unstable_pages: {
|
|
1811
1832
|
*/
|
1812
1833
|
type ComplianceConfig = Partial<Pick<Config, "compliance_region">>;
|
1813
1834
|
|
1814
|
-
type WorkerRegistry = Record<string, WorkerDefinition>;
|
1815
|
-
type WorkerEntrypointsDefinition = Record<"default" | string, {
|
1816
|
-
host: string;
|
1817
|
-
port: number;
|
1818
|
-
} | undefined>;
|
1819
|
-
type WorkerDefinition = {
|
1820
|
-
port: number | undefined;
|
1821
|
-
protocol: "http" | "https" | undefined;
|
1822
|
-
host: string | undefined;
|
1823
|
-
mode: "local" | "remote";
|
1824
|
-
headers?: Record<string, string>;
|
1825
|
-
entrypointAddresses?: WorkerEntrypointsDefinition;
|
1826
|
-
durableObjects: {
|
1827
|
-
name: string;
|
1828
|
-
className: string;
|
1829
|
-
}[];
|
1830
|
-
durableObjectsHost?: string;
|
1831
|
-
durableObjectsPort?: number;
|
1832
|
-
};
|
1833
|
-
|
1834
1835
|
type _Params<ParamsArray extends [unknown?]> = ParamsArray extends [infer P] ? P : undefined;
|
1835
1836
|
type _EventMethods = keyof Protocol.Events;
|
1836
1837
|
type DevToolsEvent<Method extends _EventMethods> = Method extends unknown ? {
|
@@ -1948,6 +1949,7 @@ declare class ConfigController extends Controller<ConfigControllerEventMap> {
|
|
1948
1949
|
latestConfig?: StartDevWorkerOptions;
|
1949
1950
|
set(input: StartDevWorkerInput, throwErrors?: boolean): Promise<StartDevWorkerOptions | undefined>;
|
1950
1951
|
patch(input: Partial<StartDevWorkerInput>): Promise<StartDevWorkerOptions | undefined>;
|
1952
|
+
onDevRegistryUpdate(event: DevRegistryUpdateEvent): void;
|
1951
1953
|
teardown(): Promise<void>;
|
1952
1954
|
emitConfigUpdateEvent(config: StartDevWorkerOptions): void;
|
1953
1955
|
}
|
@@ -2073,8 +2075,6 @@ interface StartDevWorkerInput {
|
|
2073
2075
|
outboundService?: ServiceFetch;
|
2074
2076
|
/** An undici MockAgent to declaratively mock fetch calls to particular resources. */
|
2075
2077
|
mockFetch?: undici.MockAgent;
|
2076
|
-
/** Describes the registry of other Workers running locally */
|
2077
|
-
registry?: WorkerRegistry | null;
|
2078
2078
|
testScheduled?: boolean;
|
2079
2079
|
/** Whether to use Vectorize as a remote binding -- the worker is run locally but accesses to Vectorize are made remotely */
|
2080
2080
|
bindVectorizeToProd?: boolean;
|
@@ -2087,6 +2087,8 @@ interface StartDevWorkerInput {
|
|
2087
2087
|
containerBuildId?: string;
|
2088
2088
|
/** Whether to build and connect to containers during local dev. Requires Docker daemon to be running. Defaults to true. */
|
2089
2089
|
enableContainers?: boolean;
|
2090
|
+
/** Path to the dev registry directory */
|
2091
|
+
registry?: string;
|
2090
2092
|
/** Path to the docker executable. Defaults to 'docker' */
|
2091
2093
|
dockerPath?: string;
|
2092
2094
|
/** Options for the container engine */
|
@@ -2262,6 +2264,10 @@ type ReloadCompleteEvent = {
|
|
2262
2264
|
bundle: Bundle;
|
2263
2265
|
proxyData: ProxyData;
|
2264
2266
|
};
|
2267
|
+
type DevRegistryUpdateEvent = {
|
2268
|
+
type: "devRegistryUpdate";
|
2269
|
+
registry: WorkerRegistry;
|
2270
|
+
};
|
2265
2271
|
type PreviewTokenExpiredEvent = {
|
2266
2272
|
type: "previewTokenExpired";
|
2267
2273
|
proxyData: ProxyData;
|
@@ -2324,8 +2330,6 @@ type ProxyData = {
|
|
2324
2330
|
headers: Record<string, string>;
|
2325
2331
|
liveReload?: boolean;
|
2326
2332
|
proxyLogsToController?: boolean;
|
2327
|
-
internalDurableObjects?: CfDurableObject[];
|
2328
|
-
entrypointAddresses: WorkerEntrypointsDefinition | undefined;
|
2329
2333
|
};
|
2330
2334
|
|
2331
2335
|
interface TypedEventEmitter<EventMap extends Record<string | symbol, unknown[]>> extends EventEmitter {
|
@@ -2354,6 +2358,7 @@ declare abstract class Controller<EventMap extends ControllerEventMap = Controll
|
|
2354
2358
|
type RuntimeControllerEventMap = ControllerEventMap & {
|
2355
2359
|
reloadStart: [ReloadStartEvent];
|
2356
2360
|
reloadComplete: [ReloadCompleteEvent];
|
2361
|
+
devRegistryUpdate: [DevRegistryUpdateEvent];
|
2357
2362
|
};
|
2358
2363
|
declare abstract class RuntimeController extends Controller<RuntimeControllerEventMap> {
|
2359
2364
|
abstract onBundleStart(_: BundleStartEvent): void;
|