wrangler 4.25.0 → 4.26.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
CHANGED
@@ -2349,9 +2349,9 @@
|
|
2349
2349
|
"scheduling_policy": {
|
2350
2350
|
"type": "string",
|
2351
2351
|
"enum": [
|
2352
|
-
"
|
2352
|
+
"default",
|
2353
2353
|
"moon",
|
2354
|
-
"
|
2354
|
+
"regional"
|
2355
2355
|
],
|
2356
2356
|
"description": "The scheduling policy of the application",
|
2357
2357
|
"default": "default"
|
@@ -2363,7 +2363,8 @@
|
|
2363
2363
|
"basic",
|
2364
2364
|
"standard"
|
2365
2365
|
],
|
2366
|
-
"description": "The instance type to be used for the container.
|
2366
|
+
"description": "The instance type to be used for the container. dev = 1/16 vCPU, 256 MiB memory, and 2 GB disk basic = 1/4 vCPU, 1 GiB memory, and 4 GB disk standard = 1/2 vCPU, 4 GiB memory, and 4 GB disk",
|
2367
|
+
"default": "dev"
|
2367
2368
|
},
|
2368
2369
|
"rollout_step_percentage": {
|
2369
2370
|
"type": "number",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.26.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -50,14 +50,14 @@
|
|
50
50
|
"config-schema.json"
|
51
51
|
],
|
52
52
|
"dependencies": {
|
53
|
-
"@cloudflare/unenv-preset": "2.3.3",
|
54
53
|
"blake3-wasm": "2.1.5",
|
55
54
|
"esbuild": "0.25.4",
|
56
55
|
"path-to-regexp": "6.3.0",
|
57
56
|
"unenv": "2.0.0-rc.17",
|
58
57
|
"workerd": "1.20250712.0",
|
59
58
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"
|
59
|
+
"@cloudflare/unenv-preset": "2.4.1",
|
60
|
+
"miniflare": "4.20250712.2"
|
61
61
|
},
|
62
62
|
"devDependencies": {
|
63
63
|
"@aws-sdk/client-s3": "^3.721.0",
|
@@ -135,11 +135,11 @@
|
|
135
135
|
"xdg-app-paths": "^8.3.0",
|
136
136
|
"xxhash-wasm": "^1.0.1",
|
137
137
|
"yargs": "^17.7.2",
|
138
|
-
"@cloudflare/containers-shared": "0.2.6",
|
139
|
-
"@cloudflare/eslint-config-worker": "1.1.0",
|
140
|
-
"@cloudflare/pages-shared": "^0.13.55",
|
141
138
|
"@cloudflare/cli": "1.1.1",
|
142
|
-
"@cloudflare/
|
139
|
+
"@cloudflare/containers-shared": "0.2.7",
|
140
|
+
"@cloudflare/eslint-config-worker": "1.1.0",
|
141
|
+
"@cloudflare/pages-shared": "^0.13.57",
|
142
|
+
"@cloudflare/workers-shared": "0.18.5",
|
143
143
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
144
144
|
},
|
145
145
|
"peerDependencies": {
|
@@ -129,7 +129,6 @@ export class ProxyWorker implements DurableObject {
|
|
129
129
|
request.url
|
130
130
|
);
|
131
131
|
headers.set("MF-Original-URL", innerUrl.href);
|
132
|
-
headers.set("MF-Disable-Pretty-Error", "true"); // disables the UserWorker miniflare instance from rendering the pretty error -- instead the ProxyWorker miniflare instance will intercept the json error response and render the pretty error page
|
133
132
|
|
134
133
|
// Preserve client `Accept-Encoding`, rather than using Worker's default
|
135
134
|
// of `Accept-Encoding: br, gzip`
|
@@ -98,7 +98,6 @@ var ProxyWorker = class {
|
|
98
98
|
request.url
|
99
99
|
);
|
100
100
|
headers.set("MF-Original-URL", innerUrl.href);
|
101
|
-
headers.set("MF-Disable-Pretty-Error", "true");
|
102
101
|
const encoding = request.cf?.clientAcceptEncoding;
|
103
102
|
if (encoding !== void 0) headers.set("Accept-Encoding", encoding);
|
104
103
|
rewriteUrlRelatedHeaders(headers, outerUrl, innerUrl);
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -5,6 +5,7 @@ import { RouterConfig, AssetConfig } from '@cloudflare/workers-shared';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
6
6
|
import Protocol from 'devtools-protocol/types/protocol-mapping';
|
7
7
|
import { Metafile } from 'esbuild';
|
8
|
+
import { ContainerNormalizedConfig } from '@cloudflare/containers-shared';
|
8
9
|
import { IncomingRequestCfProperties } from '@cloudflare/workers-types/experimental';
|
9
10
|
|
10
11
|
/**
|
@@ -85,16 +86,20 @@ type ContainerApp = {
|
|
85
86
|
* @optional
|
86
87
|
* @default "default"
|
87
88
|
*/
|
88
|
-
scheduling_policy?: "
|
89
|
+
scheduling_policy?: "default" | "moon" | "regional";
|
89
90
|
/**
|
90
|
-
* The instance type to be used for the container.
|
91
|
+
* The instance type to be used for the container.
|
92
|
+
* dev = 1/16 vCPU, 256 MiB memory, and 2 GB disk
|
93
|
+
* basic = 1/4 vCPU, 1 GiB memory, and 4 GB disk
|
94
|
+
* standard = 1/2 vCPU, 4 GiB memory, and 4 GB disk
|
91
95
|
* @optional
|
96
|
+
* @default "dev"
|
92
97
|
*/
|
93
98
|
instance_type?: "dev" | "basic" | "standard";
|
94
99
|
/**
|
95
100
|
* @deprecated Use top level `containers` fields instead.
|
96
101
|
* `configuration.image` should be `image`
|
97
|
-
*
|
102
|
+
* limits should be set via `instance_type`
|
98
103
|
* @hidden
|
99
104
|
*/
|
100
105
|
configuration?: {
|
@@ -109,8 +114,10 @@ type ContainerApp = {
|
|
109
114
|
secret: string;
|
110
115
|
}[];
|
111
116
|
disk?: {
|
112
|
-
|
117
|
+
size_mb: number;
|
113
118
|
};
|
119
|
+
vcpu?: number;
|
120
|
+
memory_mib?: number;
|
114
121
|
};
|
115
122
|
/**
|
116
123
|
* Scheduling constraints
|
@@ -1238,7 +1245,6 @@ interface DevConfig {
|
|
1238
1245
|
* When developing, whether to build and connect to containers. This requires a Docker daemon to be running.
|
1239
1246
|
* Defaults to `true`.
|
1240
1247
|
*
|
1241
|
-
* @inheritable
|
1242
1248
|
* @default true
|
1243
1249
|
*/
|
1244
1250
|
enable_containers: boolean;
|
@@ -1705,13 +1711,13 @@ declare function deploy({ directory, accountId, projectName, branch, skipCaching
|
|
1705
1711
|
type: string;
|
1706
1712
|
};
|
1707
1713
|
latest_stage: {
|
1708
|
-
name: "
|
1714
|
+
name: "build" | "queued" | "deploy" | "initialize" | "clone_repo";
|
1709
1715
|
status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
|
1710
1716
|
started_on: string | null;
|
1711
1717
|
ended_on: string | null;
|
1712
1718
|
};
|
1713
1719
|
stages: {
|
1714
|
-
name: "
|
1720
|
+
name: "build" | "queued" | "deploy" | "initialize" | "clone_repo";
|
1715
1721
|
status: "canceled" | "active" | "idle" | "success" | "failure" | "skipped";
|
1716
1722
|
started_on: string | null;
|
1717
1723
|
ended_on: string | null;
|
@@ -2007,7 +2013,7 @@ interface StartDevWorkerInput {
|
|
2007
2013
|
unsafe?: Omit<CfUnsafe, "bindings">;
|
2008
2014
|
assets?: string;
|
2009
2015
|
}
|
2010
|
-
type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
|
2016
|
+
type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets" | "containers"> & {
|
2011
2017
|
/** A worker's directory. Usually where the Wrangler configuration file is located */
|
2012
2018
|
projectRoot: string;
|
2013
2019
|
build: StartDevWorkerInput["build"] & {
|
@@ -2029,6 +2035,7 @@ type StartDevWorkerOptions = Omit<StartDevWorkerInput, "assets"> & {
|
|
2029
2035
|
};
|
2030
2036
|
entrypoint: string;
|
2031
2037
|
assets?: AssetsOptions;
|
2038
|
+
containers?: ContainerNormalizedConfig[];
|
2032
2039
|
name: string;
|
2033
2040
|
complianceRegion: Config["compliance_region"];
|
2034
2041
|
};
|
@@ -2297,6 +2304,7 @@ type ProxyControllerEventMap = ControllerEventMap & {
|
|
2297
2304
|
};
|
2298
2305
|
declare class ProxyController extends Controller<ProxyControllerEventMap> {
|
2299
2306
|
ready: DeferredPromise<ReadyEvent>;
|
2307
|
+
localServerReady: DeferredPromise<void>;
|
2300
2308
|
proxyWorker?: Miniflare;
|
2301
2309
|
proxyWorkerOptions?: MiniflareOptions;
|
2302
2310
|
private inspectorProxyWorkerWebSocket?;
|
@@ -2471,6 +2479,7 @@ declare function unstable_getMiniflareWorkerOptions(configPath: string, env?: st
|
|
2471
2479
|
overrides?: {
|
2472
2480
|
assets?: Partial<AssetsOptions>;
|
2473
2481
|
};
|
2482
|
+
containerBuildId?: string;
|
2474
2483
|
}): Unstable_MiniflareWorkerOptions;
|
2475
2484
|
declare function unstable_getMiniflareWorkerOptions(config: Config, env?: string, options?: {
|
2476
2485
|
imagesLocalMode?: boolean;
|
@@ -2479,6 +2488,7 @@ declare function unstable_getMiniflareWorkerOptions(config: Config, env?: string
|
|
2479
2488
|
overrides?: {
|
2480
2489
|
assets?: Partial<AssetsOptions>;
|
2481
2490
|
};
|
2491
|
+
containerBuildId?: string;
|
2482
2492
|
}): Unstable_MiniflareWorkerOptions;
|
2483
2493
|
|
2484
2494
|
type RemoteProxySession = Pick<Worker, "ready" | "dispose"> & {
|
@@ -2534,8 +2544,8 @@ declare class Logger {
|
|
2534
2544
|
constructor();
|
2535
2545
|
private overrideLoggerLevel?;
|
2536
2546
|
private onceHistory;
|
2537
|
-
get loggerLevel(): "
|
2538
|
-
set loggerLevel(val: "
|
2547
|
+
get loggerLevel(): "none" | "debug" | "error" | "info" | "log" | "warn";
|
2548
|
+
set loggerLevel(val: "none" | "debug" | "error" | "info" | "log" | "warn");
|
2539
2549
|
resetLoggerLevel(): void;
|
2540
2550
|
columns: number;
|
2541
2551
|
json: (data: unknown) => void;
|