wrangler 4.19.1 → 4.20.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 +81 -2
- package/package.json +10 -9
- package/wrangler-dist/cli.d.ts +56 -8
- package/wrangler-dist/cli.js +2367 -1767
- package/wrangler-dist/metafile-cjs.json +1 -1
package/config-schema.json
CHANGED
@@ -807,6 +807,10 @@
|
|
807
807
|
"certificate_id": {
|
808
808
|
"type": "string",
|
809
809
|
"description": "The uuid of the uploaded mTLS certificate"
|
810
|
+
},
|
811
|
+
"remote": {
|
812
|
+
"type": "boolean",
|
813
|
+
"description": "Whether the mtls fetcher should be remote or not (only available under `--x-mixed-mode`)"
|
810
814
|
}
|
811
815
|
},
|
812
816
|
"required": [
|
@@ -908,6 +912,28 @@
|
|
908
912
|
"description": "Specifies Secret Store bindings 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.",
|
909
913
|
"default": []
|
910
914
|
},
|
915
|
+
"unsafe_hello_world": {
|
916
|
+
"type": "array",
|
917
|
+
"items": {
|
918
|
+
"type": "object",
|
919
|
+
"properties": {
|
920
|
+
"binding": {
|
921
|
+
"type": "string",
|
922
|
+
"description": "The binding name used to refer to the bound service."
|
923
|
+
},
|
924
|
+
"enable_timer": {
|
925
|
+
"type": "boolean",
|
926
|
+
"description": "Whether the timer is enabled"
|
927
|
+
}
|
928
|
+
},
|
929
|
+
"required": [
|
930
|
+
"binding"
|
931
|
+
],
|
932
|
+
"additionalProperties": false
|
933
|
+
},
|
934
|
+
"description": "**DO NOT USE**. Hello World Binding Config to serve as an explanatory example.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
935
|
+
"default": []
|
936
|
+
},
|
911
937
|
"pages_build_output_dir": {
|
912
938
|
"type": "string",
|
913
939
|
"description": "The directory of static assets to serve.\n\nThe presence of this field in a Wrangler configuration file indicates a Pages project, and will prompt the handling of the configuration file according to the Pages-specific validation rules."
|
@@ -1787,6 +1813,10 @@
|
|
1787
1813
|
"certificate_id": {
|
1788
1814
|
"type": "string",
|
1789
1815
|
"description": "The uuid of the uploaded mTLS certificate"
|
1816
|
+
},
|
1817
|
+
"remote": {
|
1818
|
+
"type": "boolean",
|
1819
|
+
"description": "Whether the mtls fetcher should be remote or not (only available under `--x-mixed-mode`)"
|
1790
1820
|
}
|
1791
1821
|
},
|
1792
1822
|
"required": [
|
@@ -1887,6 +1917,28 @@
|
|
1887
1917
|
},
|
1888
1918
|
"description": "Specifies Secret Store bindings 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.",
|
1889
1919
|
"default": []
|
1920
|
+
},
|
1921
|
+
"unsafe_hello_world": {
|
1922
|
+
"type": "array",
|
1923
|
+
"items": {
|
1924
|
+
"type": "object",
|
1925
|
+
"properties": {
|
1926
|
+
"binding": {
|
1927
|
+
"type": "string",
|
1928
|
+
"description": "The binding name used to refer to the bound service."
|
1929
|
+
},
|
1930
|
+
"enable_timer": {
|
1931
|
+
"type": "boolean",
|
1932
|
+
"description": "Whether the timer is enabled"
|
1933
|
+
}
|
1934
|
+
},
|
1935
|
+
"required": [
|
1936
|
+
"binding"
|
1937
|
+
],
|
1938
|
+
"additionalProperties": false
|
1939
|
+
},
|
1940
|
+
"description": "**DO NOT USE**. Hello World Binding Config to serve as an explanatory example.\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
1941
|
+
"default": []
|
1890
1942
|
}
|
1891
1943
|
},
|
1892
1944
|
"additionalProperties": false,
|
@@ -2097,8 +2149,18 @@
|
|
2097
2149
|
"description": "How to handle requests that do not match an asset."
|
2098
2150
|
},
|
2099
2151
|
"run_worker_first": {
|
2100
|
-
"
|
2101
|
-
|
2152
|
+
"anyOf": [
|
2153
|
+
{
|
2154
|
+
"type": "array",
|
2155
|
+
"items": {
|
2156
|
+
"type": "string"
|
2157
|
+
}
|
2158
|
+
},
|
2159
|
+
{
|
2160
|
+
"type": "boolean"
|
2161
|
+
}
|
2162
|
+
],
|
2163
|
+
"description": "Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.\n\nCan also be `true`, indicating that every request should be routed to the User Worker."
|
2102
2164
|
}
|
2103
2165
|
},
|
2104
2166
|
"additionalProperties": false
|
@@ -2335,6 +2397,18 @@
|
|
2335
2397
|
],
|
2336
2398
|
"additionalProperties": false
|
2337
2399
|
}
|
2400
|
+
},
|
2401
|
+
"disk": {
|
2402
|
+
"type": "object",
|
2403
|
+
"properties": {
|
2404
|
+
"size": {
|
2405
|
+
"type": "string"
|
2406
|
+
}
|
2407
|
+
},
|
2408
|
+
"required": [
|
2409
|
+
"size"
|
2410
|
+
],
|
2411
|
+
"additionalProperties": false
|
2338
2412
|
}
|
2339
2413
|
},
|
2340
2414
|
"required": [
|
@@ -2485,6 +2559,11 @@
|
|
2485
2559
|
"host": {
|
2486
2560
|
"type": "string",
|
2487
2561
|
"description": "Host to forward requests to, defaults to the host of the first route of project"
|
2562
|
+
},
|
2563
|
+
"enable_containers": {
|
2564
|
+
"type": "boolean",
|
2565
|
+
"description": "When developing, whether to build and connect to containers. This requires a Docker daemon to be running. Defaults to `true`.",
|
2566
|
+
"default": true
|
2488
2567
|
}
|
2489
2568
|
},
|
2490
2569
|
"additionalProperties": false
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.20.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -55,14 +55,14 @@
|
|
55
55
|
"esbuild": "0.25.4",
|
56
56
|
"path-to-regexp": "6.3.0",
|
57
57
|
"unenv": "2.0.0-rc.17",
|
58
|
-
"workerd": "1.
|
58
|
+
"workerd": "1.20250604.0",
|
59
59
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"miniflare": "4.
|
60
|
+
"miniflare": "4.20250604.1"
|
61
61
|
},
|
62
62
|
"devDependencies": {
|
63
63
|
"@aws-sdk/client-s3": "^3.721.0",
|
64
64
|
"@cloudflare/types": "6.18.4",
|
65
|
-
"@cloudflare/workers-types": "^4.
|
65
|
+
"@cloudflare/workers-types": "^4.20250604.0",
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
67
67
|
"@iarna/toml": "^3.0.0",
|
68
68
|
"@sentry/node": "^7.86.0",
|
@@ -83,7 +83,7 @@
|
|
83
83
|
"@types/supports-color": "^8.1.1",
|
84
84
|
"@types/ws": "^8.5.7",
|
85
85
|
"@types/yargs": "^17.0.22",
|
86
|
-
"@vitest/ui": "~3.
|
86
|
+
"@vitest/ui": "~3.2.0",
|
87
87
|
"@webcontainer/env": "^1.1.0",
|
88
88
|
"chalk": "^5.2.0",
|
89
89
|
"chokidar": "^4.0.1",
|
@@ -129,20 +129,21 @@
|
|
129
129
|
"typescript": "^5.7.2",
|
130
130
|
"undici": "^5.28.5",
|
131
131
|
"update-check": "^1.5.4",
|
132
|
-
"vitest": "~3.
|
132
|
+
"vitest": "~3.2.0",
|
133
133
|
"vitest-websocket-mock": "^0.4.0",
|
134
134
|
"ws": "8.18.0",
|
135
135
|
"xdg-app-paths": "^8.3.0",
|
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.1.0",
|
139
140
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
140
|
-
"@cloudflare/pages-shared": "^0.13.
|
141
|
-
"@cloudflare/workers-shared": "0.17.
|
141
|
+
"@cloudflare/pages-shared": "^0.13.45",
|
142
|
+
"@cloudflare/workers-shared": "0.17.6",
|
142
143
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
143
144
|
},
|
144
145
|
"peerDependencies": {
|
145
|
-
"@cloudflare/workers-types": "^4.
|
146
|
+
"@cloudflare/workers-types": "^4.20250604.0"
|
146
147
|
},
|
147
148
|
"peerDependenciesMeta": {
|
148
149
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -78,6 +78,9 @@ type ContainerApp = {
|
|
78
78
|
type: "env";
|
79
79
|
secret: string;
|
80
80
|
}[];
|
81
|
+
disk?: {
|
82
|
+
size: string;
|
83
|
+
};
|
81
84
|
};
|
82
85
|
/** Scheduling constraints */
|
83
86
|
constraints?: {
|
@@ -835,6 +838,8 @@ interface EnvironmentNonInheritable {
|
|
835
838
|
binding: string;
|
836
839
|
/** The uuid of the uploaded mTLS certificate */
|
837
840
|
certificate_id: string;
|
841
|
+
/** Whether the mtls fetcher should be remote or not (only available under `--x-mixed-mode`) */
|
842
|
+
remote?: boolean;
|
838
843
|
}[];
|
839
844
|
/**
|
840
845
|
* Specifies a list of Tail Workers that are bound to this Worker environment
|
@@ -899,6 +904,21 @@ interface EnvironmentNonInheritable {
|
|
899
904
|
/** Name of the secret */
|
900
905
|
secret_name: string;
|
901
906
|
}[];
|
907
|
+
/**
|
908
|
+
* **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
|
909
|
+
*
|
910
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
911
|
+
* and so must be specified in every named environment.
|
912
|
+
*
|
913
|
+
* @default []
|
914
|
+
* @nonInheritable
|
915
|
+
*/
|
916
|
+
unsafe_hello_world: {
|
917
|
+
/** The binding name used to refer to the bound service. */
|
918
|
+
binding: string;
|
919
|
+
/** Whether the timer is enabled */
|
920
|
+
enable_timer?: boolean;
|
921
|
+
}[];
|
902
922
|
}
|
903
923
|
/**
|
904
924
|
* The raw environment configuration that we read from the config file.
|
@@ -947,10 +967,11 @@ type Assets = {
|
|
947
967
|
/** How to handle requests that do not match an asset. */
|
948
968
|
not_found_handling?: "single-page-application" | "404-page" | "none";
|
949
969
|
/**
|
950
|
-
*
|
951
|
-
*
|
952
|
-
*
|
953
|
-
|
970
|
+
* Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
|
971
|
+
*
|
972
|
+
* Can also be `true`, indicating that every request should be routed to the User Worker.
|
973
|
+
*/
|
974
|
+
run_worker_first?: string[] | boolean;
|
954
975
|
};
|
955
976
|
interface Observability {
|
956
977
|
/** If observability is enabled for this Worker */
|
@@ -1162,6 +1183,14 @@ interface DevConfig {
|
|
1162
1183
|
* Host to forward requests to, defaults to the host of the first route of project
|
1163
1184
|
*/
|
1164
1185
|
host: string | undefined;
|
1186
|
+
/**
|
1187
|
+
* When developing, whether to build and connect to containers. This requires a Docker daemon to be running.
|
1188
|
+
* Defaults to `true`.
|
1189
|
+
*
|
1190
|
+
* @inheritable
|
1191
|
+
* @default true
|
1192
|
+
*/
|
1193
|
+
enable_containers: boolean;
|
1165
1194
|
}
|
1166
1195
|
type RawDevConfig = Partial<DevConfig>;
|
1167
1196
|
interface EnvironmentMap {
|
@@ -1195,6 +1224,7 @@ type NormalizeAndValidateConfigArgs = {
|
|
1195
1224
|
localProtocol?: string;
|
1196
1225
|
upstreamProtocol?: string;
|
1197
1226
|
script?: string;
|
1227
|
+
enableContainers?: boolean;
|
1198
1228
|
};
|
1199
1229
|
|
1200
1230
|
type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
|
@@ -1347,6 +1377,10 @@ interface CfSecretsStoreSecrets {
|
|
1347
1377
|
store_id: string;
|
1348
1378
|
secret_name: string;
|
1349
1379
|
}
|
1380
|
+
interface CfHelloWorld {
|
1381
|
+
binding: string;
|
1382
|
+
enable_timer?: boolean;
|
1383
|
+
}
|
1350
1384
|
interface CfHyperdrive {
|
1351
1385
|
binding: string;
|
1352
1386
|
id: string;
|
@@ -1377,6 +1411,7 @@ interface CfDispatchNamespace {
|
|
1377
1411
|
interface CfMTlsCertificate {
|
1378
1412
|
binding: string;
|
1379
1413
|
certificate_id: string;
|
1414
|
+
remote?: boolean;
|
1380
1415
|
}
|
1381
1416
|
interface CfLogfwdrBinding {
|
1382
1417
|
name: string;
|
@@ -1514,6 +1549,8 @@ interface Unstable_DevOptions {
|
|
1514
1549
|
vectorizeBindToProd?: boolean;
|
1515
1550
|
imagesLocalMode?: boolean;
|
1516
1551
|
enableIpc?: boolean;
|
1552
|
+
enableContainers?: boolean;
|
1553
|
+
dockerPath?: string;
|
1517
1554
|
};
|
1518
1555
|
}
|
1519
1556
|
interface Unstable_DevWorker {
|
@@ -1692,6 +1729,7 @@ type AssetsOptions = {
|
|
1692
1729
|
assetConfig: AssetConfig;
|
1693
1730
|
_redirects?: string;
|
1694
1731
|
_headers?: string;
|
1732
|
+
run_worker_first?: boolean | string[];
|
1695
1733
|
};
|
1696
1734
|
|
1697
1735
|
type ApiCredentials = {
|
@@ -1898,6 +1936,12 @@ interface StartDevWorkerInput {
|
|
1898
1936
|
imagesLocalMode?: boolean;
|
1899
1937
|
/** Treat this as the primary worker in a multiworker setup (i.e. the first Worker in Miniflare's options) */
|
1900
1938
|
multiworkerPrimary?: boolean;
|
1939
|
+
/** Whether the experimental mixed mode feature should be enabled */
|
1940
|
+
experimentalMixedMode?: boolean;
|
1941
|
+
/** Whether to build and connect to containers during local dev. Requires Docker daemon to be running. Defaults to true. */
|
1942
|
+
enableContainers?: boolean;
|
1943
|
+
/** Path to the docker executable. Defaults to 'docker' */
|
1944
|
+
dockerPath?: string;
|
1901
1945
|
};
|
1902
1946
|
legacy?: {
|
1903
1947
|
site?: Hook<Config["site"], [Config]>;
|
@@ -2021,7 +2065,9 @@ type Binding = {
|
|
2021
2065
|
type: "secrets_store_secret";
|
2022
2066
|
} & BindingOmit<CfSecretsStoreSecrets>) | ({
|
2023
2067
|
type: "logfwdr";
|
2024
|
-
} & NameOmit<CfLogfwdrBinding>) | {
|
2068
|
+
} & NameOmit<CfLogfwdrBinding>) | ({
|
2069
|
+
type: "unsafe_hello_world";
|
2070
|
+
} & BindingOmit<CfHelloWorld>) | {
|
2025
2071
|
type: `unsafe_${string}`;
|
2026
2072
|
} | {
|
2027
2073
|
type: "assets";
|
@@ -2375,11 +2421,13 @@ type MixedModeSession = Pick<Worker, "ready" | "dispose"> & {
|
|
2375
2421
|
updateBindings: (bindings: StartDevWorkerInput["bindings"]) => Promise<void>;
|
2376
2422
|
mixedModeConnectionString: MixedModeConnectionString;
|
2377
2423
|
};
|
2378
|
-
|
2424
|
+
type StartMixedModeSessionOptions = {
|
2425
|
+
workerName?: string;
|
2379
2426
|
auth?: NonNullable<StartDevWorkerInput["dev"]>["auth"];
|
2380
2427
|
/** If running in a non-public compliance region, set this here. */
|
2381
2428
|
complianceRegion?: Config["compliance_region"];
|
2382
|
-
}
|
2429
|
+
};
|
2430
|
+
declare function startMixedModeSession(bindings: StartDevWorkerInput["bindings"], options?: StartMixedModeSessionOptions): Promise<MixedModeSession>;
|
2383
2431
|
declare function pickRemoteBindings(bindings: Record<string, Binding>): Record<string, Binding>;
|
2384
2432
|
|
2385
2433
|
declare const LOGGER_LEVELS: {
|
@@ -2437,4 +2485,4 @@ interface Unstable_ASSETSBindingsOptions {
|
|
2437
2485
|
}
|
2438
2486
|
declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
|
2439
2487
|
|
2440
|
-
export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type MixedModeSession as Experimental_MixedModeSession, type GetPlatformProxyOptions, type PlatformProxy, type SourcelessWorkerOptions, type Unstable_ASSETSBindingsOptions, type Config as Unstable_Config, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, type RawConfig as Unstable_RawConfig, type RawEnvironment as Unstable_RawEnvironment, experimental_patchConfig, pickRemoteBindings as experimental_pickRemoteBindings, experimental_readRawConfig, startMixedModeSession as experimental_startMixedModeSession, getPlatformProxy, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
|
2488
|
+
export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type MixedModeSession as Experimental_MixedModeSession, type GetPlatformProxyOptions, type PlatformProxy, type SourcelessWorkerOptions, type Unstable_ASSETSBindingsOptions, type Config as Unstable_Config, type Unstable_DevOptions, type Unstable_DevWorker, type Unstable_MiniflareWorkerOptions, type RawConfig as Unstable_RawConfig, type RawEnvironment as Unstable_RawEnvironment, type StartMixedModeSessionOptions as experimental_StartMixedModeSessionOptions, experimental_patchConfig, pickRemoteBindings as experimental_pickRemoteBindings, experimental_readRawConfig, startMixedModeSession as experimental_startMixedModeSession, getPlatformProxy, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
|