wrangler 4.20.0 → 4.20.2
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 +42 -13
- package/package.json +7 -7
- package/wrangler-dist/cli.d.ts +53 -14
- package/wrangler-dist/cli.js +937 -719
- package/wrangler-dist/metafile-cjs.json +1 -1
- package/templates/strip-cf-connecting-ip-header.js +0 -13
package/config-schema.json
CHANGED
@@ -163,8 +163,8 @@
|
|
163
163
|
},
|
164
164
|
"keep_names": {
|
165
165
|
"type": "boolean",
|
166
|
-
"description": "
|
167
|
-
"default":
|
166
|
+
"description": "Set the `name` property to the original name for functions and classes renamed during minification.\n\nSee https://esbuild.github.io/api/#keep-names",
|
167
|
+
"default": true
|
168
168
|
},
|
169
169
|
"first_party_worker": {
|
170
170
|
"type": "boolean",
|
@@ -305,7 +305,7 @@
|
|
305
305
|
"items": {
|
306
306
|
"$ref": "#/definitions/ContainerApp"
|
307
307
|
},
|
308
|
-
"description": "Container related configuration",
|
308
|
+
"description": "Container related configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
309
309
|
"default": []
|
310
310
|
},
|
311
311
|
"kv_namespaces": {
|
@@ -1169,8 +1169,8 @@
|
|
1169
1169
|
},
|
1170
1170
|
"keep_names": {
|
1171
1171
|
"type": "boolean",
|
1172
|
-
"description": "
|
1173
|
-
"default":
|
1172
|
+
"description": "Set the `name` property to the original name for functions and classes renamed during minification.\n\nSee https://esbuild.github.io/api/#keep-names",
|
1173
|
+
"default": true
|
1174
1174
|
},
|
1175
1175
|
"first_party_worker": {
|
1176
1176
|
"type": "boolean",
|
@@ -1311,7 +1311,7 @@
|
|
1311
1311
|
"items": {
|
1312
1312
|
"$ref": "#/definitions/ContainerApp"
|
1313
1313
|
},
|
1314
|
-
"description": "Container related configuration",
|
1314
|
+
"description": "Container related configuration\n\nNOTE: This field is not automatically inherited from the top level environment, and so must be specified in every named environment.",
|
1315
1315
|
"default": []
|
1316
1316
|
},
|
1317
1317
|
"kv_namespaces": {
|
@@ -2462,13 +2462,6 @@
|
|
2462
2462
|
"full_manual"
|
2463
2463
|
],
|
2464
2464
|
"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."
|
2465
|
-
},
|
2466
|
-
"dev_exposed_ports": {
|
2467
|
-
"type": "array",
|
2468
|
-
"items": {
|
2469
|
-
"type": "number"
|
2470
|
-
},
|
2471
|
-
"description": "Ports to be exposed by the container application. Only applies to dev, on non-linux machines, and if the Dockerfile doesn't already declare exposed ports."
|
2472
2465
|
}
|
2473
2466
|
},
|
2474
2467
|
"required": [
|
@@ -2564,9 +2557,45 @@
|
|
2564
2557
|
"type": "boolean",
|
2565
2558
|
"description": "When developing, whether to build and connect to containers. This requires a Docker daemon to be running. Defaults to `true`.",
|
2566
2559
|
"default": true
|
2560
|
+
},
|
2561
|
+
"container_engine": {
|
2562
|
+
"$ref": "#/definitions/ContainerEngine",
|
2563
|
+
"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"
|
2567
2564
|
}
|
2568
2565
|
},
|
2569
2566
|
"additionalProperties": false
|
2567
|
+
},
|
2568
|
+
"ContainerEngine": {
|
2569
|
+
"anyOf": [
|
2570
|
+
{
|
2571
|
+
"type": "object",
|
2572
|
+
"properties": {
|
2573
|
+
"localDocker": {
|
2574
|
+
"$ref": "#/definitions/DockerConfiguration"
|
2575
|
+
}
|
2576
|
+
},
|
2577
|
+
"required": [
|
2578
|
+
"localDocker"
|
2579
|
+
],
|
2580
|
+
"additionalProperties": false
|
2581
|
+
},
|
2582
|
+
{
|
2583
|
+
"type": "string"
|
2584
|
+
}
|
2585
|
+
]
|
2586
|
+
},
|
2587
|
+
"DockerConfiguration": {
|
2588
|
+
"type": "object",
|
2589
|
+
"properties": {
|
2590
|
+
"socketPath": {
|
2591
|
+
"type": "string",
|
2592
|
+
"description": "Socket used by miniflare to communicate with Docker"
|
2593
|
+
}
|
2594
|
+
},
|
2595
|
+
"required": [
|
2596
|
+
"socketPath"
|
2597
|
+
],
|
2598
|
+
"additionalProperties": false
|
2570
2599
|
}
|
2571
2600
|
},
|
2572
2601
|
"allowTrailingCommas": true
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.20.
|
3
|
+
"version": "4.20.2",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -50,19 +50,19 @@
|
|
50
50
|
"config-schema.json"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@cloudflare/unenv-preset": "2.3.
|
53
|
+
"@cloudflare/unenv-preset": "2.3.3",
|
54
54
|
"blake3-wasm": "2.1.5",
|
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.20250617.0",
|
59
59
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"miniflare": "4.
|
60
|
+
"miniflare": "4.20250617.0"
|
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.20250617.0",
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
67
67
|
"@iarna/toml": "^3.0.0",
|
68
68
|
"@sentry/node": "^7.86.0",
|
@@ -138,12 +138,12 @@
|
|
138
138
|
"@cloudflare/cli": "1.1.1",
|
139
139
|
"@cloudflare/containers-shared": "0.1.0",
|
140
140
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
141
|
-
"@cloudflare/pages-shared": "^0.13.
|
141
|
+
"@cloudflare/pages-shared": "^0.13.47",
|
142
142
|
"@cloudflare/workers-shared": "0.17.6",
|
143
143
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
144
144
|
},
|
145
145
|
"peerDependencies": {
|
146
|
-
"@cloudflare/workers-types": "^4.
|
146
|
+
"@cloudflare/workers-types": "^4.20250617.0"
|
147
147
|
},
|
148
148
|
"peerDependenciesMeta": {
|
149
149
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Json,
|
1
|
+
import { Json, Request, Response as Response$1, DispatchFetch, WorkerOptions, NodeJSCompatMode, Miniflare, MiniflareOptions, Mutex, ModuleRule, MixedModeConnectionString } from 'miniflare';
|
2
2
|
import * as undici from 'undici';
|
3
3
|
import { RequestInfo, RequestInit, Response, FormData } from 'undici';
|
4
4
|
import { RouterConfig, AssetConfig } from '@cloudflare/workers-shared';
|
@@ -100,10 +100,6 @@ type ContainerApp = {
|
|
100
100
|
* - manual: The container application will be rollout fully by manually actioning progress steps.
|
101
101
|
*/
|
102
102
|
rollout_kind?: "full_auto" | "none" | "full_manual";
|
103
|
-
/**
|
104
|
-
* Ports to be exposed by the container application. Only applies to dev, on non-linux machines, and if the Dockerfile doesn't already declare exposed ports.
|
105
|
-
*/
|
106
|
-
dev_exposed_ports?: number[];
|
107
103
|
};
|
108
104
|
/**
|
109
105
|
* Configuration in wrangler for Durable Object Migrations
|
@@ -328,9 +324,11 @@ interface EnvironmentInheritable {
|
|
328
324
|
*/
|
329
325
|
minify: boolean | undefined;
|
330
326
|
/**
|
331
|
-
*
|
327
|
+
* Set the `name` property to the original name for functions and classes renamed during minification.
|
332
328
|
*
|
333
|
-
*
|
329
|
+
* See https://esbuild.github.io/api/#keep-names
|
330
|
+
*
|
331
|
+
* @default true
|
334
332
|
* @inheritable
|
335
333
|
*/
|
336
334
|
keep_names: boolean | undefined;
|
@@ -502,6 +500,9 @@ interface EnvironmentNonInheritable {
|
|
502
500
|
/**
|
503
501
|
* Container related configuration
|
504
502
|
*
|
503
|
+
* NOTE: This field is not automatically inherited from the top level environment,
|
504
|
+
* and so must be specified in every named environment.
|
505
|
+
*
|
505
506
|
* @default []
|
506
507
|
* @nonInheritable
|
507
508
|
*/
|
@@ -986,6 +987,13 @@ interface Observability {
|
|
986
987
|
invocation_logs?: boolean;
|
987
988
|
};
|
988
989
|
}
|
990
|
+
type DockerConfiguration = {
|
991
|
+
/** Socket used by miniflare to communicate with Docker */
|
992
|
+
socketPath: string;
|
993
|
+
};
|
994
|
+
type ContainerEngine = {
|
995
|
+
localDocker: DockerConfiguration;
|
996
|
+
} | string;
|
989
997
|
|
990
998
|
/**
|
991
999
|
* This is the static type definition for the configuration object.
|
@@ -1191,6 +1199,11 @@ interface DevConfig {
|
|
1191
1199
|
* @default true
|
1192
1200
|
*/
|
1193
1201
|
enable_containers: boolean;
|
1202
|
+
/**
|
1203
|
+
* Either the Docker unix socket i.e. `unix:/var/run/docker.sock` or a full configuration.
|
1204
|
+
* Note that windows is only supported via WSL at the moment
|
1205
|
+
*/
|
1206
|
+
container_engine: ContainerEngine | undefined;
|
1194
1207
|
}
|
1195
1208
|
type RawDevConfig = Partial<DevConfig>;
|
1196
1209
|
interface EnvironmentMap {
|
@@ -1225,6 +1238,7 @@ type NormalizeAndValidateConfigArgs = {
|
|
1225
1238
|
upstreamProtocol?: string;
|
1226
1239
|
script?: string;
|
1227
1240
|
enableContainers?: boolean;
|
1241
|
+
containerEngine?: ContainerEngine;
|
1228
1242
|
};
|
1229
1243
|
|
1230
1244
|
type ReadConfigCommandArgs = NormalizeAndValidateConfigArgs & {
|
@@ -1551,6 +1565,7 @@ interface Unstable_DevOptions {
|
|
1551
1565
|
enableIpc?: boolean;
|
1552
1566
|
enableContainers?: boolean;
|
1553
1567
|
dockerPath?: string;
|
1568
|
+
containerEngine?: string;
|
1554
1569
|
};
|
1555
1570
|
}
|
1556
1571
|
interface Unstable_DevWorker {
|
@@ -1817,7 +1832,7 @@ type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
|
|
1817
1832
|
interface Worker {
|
1818
1833
|
ready: Promise<void>;
|
1819
1834
|
url: Promise<URL>;
|
1820
|
-
inspectorUrl: Promise<URL>;
|
1835
|
+
inspectorUrl: Promise<URL | undefined>;
|
1821
1836
|
config: StartDevWorkerOptions;
|
1822
1837
|
setConfig: ConfigController["set"];
|
1823
1838
|
patchConfig: ConfigController["patch"];
|
@@ -1892,12 +1907,12 @@ interface StartDevWorkerInput {
|
|
1892
1907
|
};
|
1893
1908
|
/** Options applying to the worker's development preview environment. */
|
1894
1909
|
dev?: {
|
1895
|
-
/** Options applying to the worker's inspector server. */
|
1910
|
+
/** Options applying to the worker's inspector server. False disables the inspector server. */
|
1896
1911
|
inspector?: {
|
1897
1912
|
hostname?: string;
|
1898
1913
|
port?: number;
|
1899
1914
|
secure?: boolean;
|
1900
|
-
};
|
1915
|
+
} | false;
|
1901
1916
|
/** Whether the worker runs on the edge or locally. Can also be set to "minimal" for minimal mode. */
|
1902
1917
|
remote?: boolean | "minimal";
|
1903
1918
|
/** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
|
@@ -1942,6 +1957,8 @@ interface StartDevWorkerInput {
|
|
1942
1957
|
enableContainers?: boolean;
|
1943
1958
|
/** Path to the docker executable. Defaults to 'docker' */
|
1944
1959
|
dockerPath?: string;
|
1960
|
+
/** Options for the container engine */
|
1961
|
+
containerEngine?: ContainerEngine;
|
1945
1962
|
};
|
1946
1963
|
legacy?: {
|
1947
1964
|
site?: Hook<Config["site"], [Config]>;
|
@@ -2120,7 +2137,7 @@ type ReadyEvent = {
|
|
2120
2137
|
type: "ready";
|
2121
2138
|
proxyWorker: Miniflare;
|
2122
2139
|
url: URL;
|
2123
|
-
inspectorUrl: URL;
|
2140
|
+
inspectorUrl: URL | undefined;
|
2124
2141
|
};
|
2125
2142
|
type ProxyWorkerIncomingRequestBody = {
|
2126
2143
|
type: "play";
|
@@ -2169,7 +2186,7 @@ type UrlOriginParts = Pick<URL, "protocol" | "hostname" | "port">;
|
|
2169
2186
|
type UrlOriginAndPathnameParts = Pick<URL, "protocol" | "hostname" | "port" | "pathname">;
|
2170
2187
|
type ProxyData = {
|
2171
2188
|
userWorkerUrl: UrlOriginParts;
|
2172
|
-
userWorkerInspectorUrl
|
2189
|
+
userWorkerInspectorUrl?: UrlOriginAndPathnameParts;
|
2173
2190
|
userWorkerInnerUrlOverrides?: Partial<UrlOriginParts>;
|
2174
2191
|
headers: Record<string, string>;
|
2175
2192
|
liveReload?: boolean;
|
@@ -2260,7 +2277,7 @@ declare class ProxyController extends Controller<ProxyControllerEventMap> {
|
|
2260
2277
|
onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response$1>;
|
2261
2278
|
_torndown: boolean;
|
2262
2279
|
teardown(): Promise<void>;
|
2263
|
-
emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL): void;
|
2280
|
+
emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL | undefined): void;
|
2264
2281
|
emitPreviewTokenExpiredEvent(proxyData: ProxyData): void;
|
2265
2282
|
emitErrorEvent(data: ErrorEvent): void;
|
2266
2283
|
emitErrorEvent(reason: string, cause?: Error | SerializedError): void;
|
@@ -2429,6 +2446,28 @@ type StartMixedModeSessionOptions = {
|
|
2429
2446
|
};
|
2430
2447
|
declare function startMixedModeSession(bindings: StartDevWorkerInput["bindings"], options?: StartMixedModeSessionOptions): Promise<MixedModeSession>;
|
2431
2448
|
declare function pickRemoteBindings(bindings: Record<string, Binding>): Record<string, Binding>;
|
2449
|
+
/**
|
2450
|
+
* Utility for potentially starting or updating a mixed mode session.
|
2451
|
+
*
|
2452
|
+
* It uses an internal map for storing existing mixed mode session indexed by worker names. If no worker name is provided
|
2453
|
+
* the mixed mode session won't be retrieved nor saved to/from the internal map.
|
2454
|
+
*
|
2455
|
+
* @param configPathOrWorkerConfig either a file path to a wrangler configuration file or an object containing the name of
|
2456
|
+
* the target worker alongside its bindings.
|
2457
|
+
* @param preExistingMixedModeSessionData the data of a pre-existing mixed mode session if there was one null otherwise
|
2458
|
+
* @returns null if no existing mixed mode session was provided and one should not be created (because the worker is not
|
2459
|
+
* defining any remote bindings), the data associated to the created/updated mixed mode session otherwise.
|
2460
|
+
*/
|
2461
|
+
declare function maybeStartOrUpdateMixedModeSession(configPathOrWorkerConfig: string | {
|
2462
|
+
name?: string;
|
2463
|
+
bindings: NonNullable<StartDevWorkerInput["bindings"]>;
|
2464
|
+
}, preExistingMixedModeSessionData: {
|
2465
|
+
session: MixedModeSession;
|
2466
|
+
remoteBindings: Record<string, Binding>;
|
2467
|
+
} | null): Promise<{
|
2468
|
+
session: MixedModeSession;
|
2469
|
+
remoteBindings: Record<string, Binding>;
|
2470
|
+
} | null>;
|
2432
2471
|
|
2433
2472
|
declare const LOGGER_LEVELS: {
|
2434
2473
|
readonly none: -1;
|
@@ -2485,4 +2524,4 @@ interface Unstable_ASSETSBindingsOptions {
|
|
2485
2524
|
}
|
2486
2525
|
declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
|
2487
2526
|
|
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 };
|
2527
|
+
export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type MixedModeSession as Experimental_MixedModeSession, type GetPlatformProxyOptions, type PlatformProxy, type SourcelessWorkerOptions, type Unstable_ASSETSBindingsOptions, type Binding as Unstable_Binding, 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, maybeStartOrUpdateMixedModeSession as experimental_maybeStartOrUpdateMixedModeSession, 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 };
|