wrangler 4.20.0 → 4.20.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.
- package/config-schema.json +4 -11
- package/package.json +7 -7
- package/wrangler-dist/cli.d.ts +34 -14
- package/wrangler-dist/cli.js +788 -664
- 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",
|
@@ -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",
|
@@ -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": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.20.
|
3
|
+
"version": "4.20.1",
|
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.20250612.0",
|
59
59
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"miniflare": "4.
|
60
|
+
"miniflare": "4.20250612.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.20250612.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.46",
|
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.20250612.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.
|
328
|
+
*
|
329
|
+
* See https://esbuild.github.io/api/#keep-names
|
332
330
|
*
|
333
|
-
* @default
|
331
|
+
* @default true
|
334
332
|
* @inheritable
|
335
333
|
*/
|
336
334
|
keep_names: boolean | undefined;
|
@@ -1817,7 +1815,7 @@ type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
|
|
1817
1815
|
interface Worker {
|
1818
1816
|
ready: Promise<void>;
|
1819
1817
|
url: Promise<URL>;
|
1820
|
-
inspectorUrl: Promise<URL>;
|
1818
|
+
inspectorUrl: Promise<URL | undefined>;
|
1821
1819
|
config: StartDevWorkerOptions;
|
1822
1820
|
setConfig: ConfigController["set"];
|
1823
1821
|
patchConfig: ConfigController["patch"];
|
@@ -1892,12 +1890,12 @@ interface StartDevWorkerInput {
|
|
1892
1890
|
};
|
1893
1891
|
/** Options applying to the worker's development preview environment. */
|
1894
1892
|
dev?: {
|
1895
|
-
/** Options applying to the worker's inspector server. */
|
1893
|
+
/** Options applying to the worker's inspector server. False disables the inspector server. */
|
1896
1894
|
inspector?: {
|
1897
1895
|
hostname?: string;
|
1898
1896
|
port?: number;
|
1899
1897
|
secure?: boolean;
|
1900
|
-
};
|
1898
|
+
} | false;
|
1901
1899
|
/** Whether the worker runs on the edge or locally. Can also be set to "minimal" for minimal mode. */
|
1902
1900
|
remote?: boolean | "minimal";
|
1903
1901
|
/** Cloudflare Account credentials. Can be provided upfront or as a function which will be called only when required. */
|
@@ -2120,7 +2118,7 @@ type ReadyEvent = {
|
|
2120
2118
|
type: "ready";
|
2121
2119
|
proxyWorker: Miniflare;
|
2122
2120
|
url: URL;
|
2123
|
-
inspectorUrl: URL;
|
2121
|
+
inspectorUrl: URL | undefined;
|
2124
2122
|
};
|
2125
2123
|
type ProxyWorkerIncomingRequestBody = {
|
2126
2124
|
type: "play";
|
@@ -2169,7 +2167,7 @@ type UrlOriginParts = Pick<URL, "protocol" | "hostname" | "port">;
|
|
2169
2167
|
type UrlOriginAndPathnameParts = Pick<URL, "protocol" | "hostname" | "port" | "pathname">;
|
2170
2168
|
type ProxyData = {
|
2171
2169
|
userWorkerUrl: UrlOriginParts;
|
2172
|
-
userWorkerInspectorUrl
|
2170
|
+
userWorkerInspectorUrl?: UrlOriginAndPathnameParts;
|
2173
2171
|
userWorkerInnerUrlOverrides?: Partial<UrlOriginParts>;
|
2174
2172
|
headers: Record<string, string>;
|
2175
2173
|
liveReload?: boolean;
|
@@ -2260,7 +2258,7 @@ declare class ProxyController extends Controller<ProxyControllerEventMap> {
|
|
2260
2258
|
onInspectorProxyWorkerRequest(message: InspectorProxyWorkerOutgoingRequestBody): Promise<Response$1>;
|
2261
2259
|
_torndown: boolean;
|
2262
2260
|
teardown(): Promise<void>;
|
2263
|
-
emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL): void;
|
2261
|
+
emitReadyEvent(proxyWorker: Miniflare, url: URL, inspectorUrl: URL | undefined): void;
|
2264
2262
|
emitPreviewTokenExpiredEvent(proxyData: ProxyData): void;
|
2265
2263
|
emitErrorEvent(data: ErrorEvent): void;
|
2266
2264
|
emitErrorEvent(reason: string, cause?: Error | SerializedError): void;
|
@@ -2429,6 +2427,28 @@ type StartMixedModeSessionOptions = {
|
|
2429
2427
|
};
|
2430
2428
|
declare function startMixedModeSession(bindings: StartDevWorkerInput["bindings"], options?: StartMixedModeSessionOptions): Promise<MixedModeSession>;
|
2431
2429
|
declare function pickRemoteBindings(bindings: Record<string, Binding>): Record<string, Binding>;
|
2430
|
+
/**
|
2431
|
+
* Utility for potentially starting or updating a mixed mode session.
|
2432
|
+
*
|
2433
|
+
* It uses an internal map for storing existing mixed mode session indexed by worker names. If no worker name is provided
|
2434
|
+
* the mixed mode session won't be retrieved nor saved to/from the internal map.
|
2435
|
+
*
|
2436
|
+
* @param configPathOrWorkerConfig either a file path to a wrangler configuration file or an object containing the name of
|
2437
|
+
* the target worker alongside its bindings.
|
2438
|
+
* @param preExistingMixedModeSessionData the data of a pre-existing mixed mode session if there was one null otherwise
|
2439
|
+
* @returns null if no existing mixed mode session was provided and one should not be created (because the worker is not
|
2440
|
+
* defining any remote bindings), the data associated to the created/updated mixed mode session otherwise.
|
2441
|
+
*/
|
2442
|
+
declare function maybeStartOrUpdateMixedModeSession(configPathOrWorkerConfig: string | {
|
2443
|
+
name?: string;
|
2444
|
+
bindings: NonNullable<StartDevWorkerInput["bindings"]>;
|
2445
|
+
}, preExistingMixedModeSessionData: {
|
2446
|
+
session: MixedModeSession;
|
2447
|
+
remoteBindings: Record<string, Binding>;
|
2448
|
+
} | null): Promise<{
|
2449
|
+
session: MixedModeSession;
|
2450
|
+
remoteBindings: Record<string, Binding>;
|
2451
|
+
} | null>;
|
2432
2452
|
|
2433
2453
|
declare const LOGGER_LEVELS: {
|
2434
2454
|
readonly none: -1;
|
@@ -2485,4 +2505,4 @@ interface Unstable_ASSETSBindingsOptions {
|
|
2485
2505
|
}
|
2486
2506
|
declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
|
2487
2507
|
|
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 };
|
2508
|
+
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 };
|