wrangler 4.14.1 → 4.14.3
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/bin/wrangler.js +3 -3
- package/config-schema.json +40 -5
- package/package.json +10 -10
- package/templates/mixedMode/proxyServerWorker/index.ts +5 -0
- package/templates/mixedMode/proxyServerWorker/wrangler.jsonc +4 -0
- package/wrangler-dist/cli.d.ts +46 -9
- package/wrangler-dist/cli.js +12871 -12198
package/bin/wrangler.js
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
const { spawn } = require("child_process");
|
3
3
|
const path = require("path");
|
4
4
|
|
5
|
-
const
|
6
|
-
|
5
|
+
const ERR_NODE_VERSION = "18.0.0";
|
6
|
+
const MIN_NODE_VERSION = "20.0.0";
|
7
7
|
let wranglerProcess;
|
8
8
|
|
9
9
|
/**
|
10
10
|
* Executes ../wrangler-dist/cli.js
|
11
11
|
*/
|
12
12
|
function runWrangler() {
|
13
|
-
if (semiver(process.versions.node,
|
13
|
+
if (semiver(process.versions.node, ERR_NODE_VERSION) < 0) {
|
14
14
|
// Note Volta and nvm are also recommended in the official docs:
|
15
15
|
// https://developers.cloudflare.com/workers/get-started/guide#2-install-the-workers-cli
|
16
16
|
console.error(
|
package/config-schema.json
CHANGED
@@ -2160,13 +2160,31 @@
|
|
2160
2160
|
"type": "object",
|
2161
2161
|
"properties": {
|
2162
2162
|
"name": {
|
2163
|
-
"type": "string"
|
2163
|
+
"type": "string",
|
2164
|
+
"description": "Name of the application"
|
2164
2165
|
},
|
2165
2166
|
"instances": {
|
2166
|
-
"type": "number"
|
2167
|
+
"type": "number",
|
2168
|
+
"description": "Number of application instances"
|
2169
|
+
},
|
2170
|
+
"max_instances": {
|
2171
|
+
"type": "number",
|
2172
|
+
"description": "Number of maximum application instances. Only applicable to Durable Object container applications"
|
2167
2173
|
},
|
2168
2174
|
"image": {
|
2169
|
-
"type": "string"
|
2175
|
+
"type": "string",
|
2176
|
+
"description": "The path to a Dockerfile, or an image URI. Can be defined both here or by setting the `image` key in the `ContainerApp` configuration"
|
2177
|
+
},
|
2178
|
+
"image_build_context": {
|
2179
|
+
"type": "string",
|
2180
|
+
"description": "Build context of the application. By default it is the directory of `image`."
|
2181
|
+
},
|
2182
|
+
"image_vars": {
|
2183
|
+
"type": "object",
|
2184
|
+
"additionalProperties": {
|
2185
|
+
"type": "string"
|
2186
|
+
},
|
2187
|
+
"description": "Image variables to be passed along the image"
|
2170
2188
|
},
|
2171
2189
|
"class_name": {
|
2172
2190
|
"type": "string"
|
@@ -2176,7 +2194,8 @@
|
|
2176
2194
|
"enum": [
|
2177
2195
|
"regional",
|
2178
2196
|
"moon"
|
2179
|
-
]
|
2197
|
+
],
|
2198
|
+
"description": "The scheduling policy of the application, default is regional"
|
2180
2199
|
},
|
2181
2200
|
"configuration": {
|
2182
2201
|
"type": "object",
|
@@ -2252,12 +2271,28 @@
|
|
2252
2271
|
"type": "number"
|
2253
2272
|
}
|
2254
2273
|
},
|
2274
|
+
"additionalProperties": false,
|
2275
|
+
"description": "Scheduling constraints"
|
2276
|
+
},
|
2277
|
+
"durable_objects": {
|
2278
|
+
"type": "object",
|
2279
|
+
"properties": {
|
2280
|
+
"namespace_id": {
|
2281
|
+
"type": "string"
|
2282
|
+
}
|
2283
|
+
},
|
2284
|
+
"required": [
|
2285
|
+
"namespace_id"
|
2286
|
+
],
|
2255
2287
|
"additionalProperties": false
|
2288
|
+
},
|
2289
|
+
"rollout_step_percentage": {
|
2290
|
+
"type": "number",
|
2291
|
+
"description": "How a rollout should be done, defining the size of it"
|
2256
2292
|
}
|
2257
2293
|
},
|
2258
2294
|
"required": [
|
2259
2295
|
"name",
|
2260
|
-
"instances",
|
2261
2296
|
"class_name",
|
2262
2297
|
"configuration"
|
2263
2298
|
],
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.14.
|
3
|
+
"version": "4.14.3",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -52,17 +52,17 @@
|
|
52
52
|
"dependencies": {
|
53
53
|
"@cloudflare/unenv-preset": "2.3.1",
|
54
54
|
"blake3-wasm": "2.1.5",
|
55
|
-
"esbuild": "0.25.
|
55
|
+
"esbuild": "0.25.4",
|
56
56
|
"path-to-regexp": "6.3.0",
|
57
57
|
"unenv": "2.0.0-rc.15",
|
58
|
-
"workerd": "1.
|
58
|
+
"workerd": "1.20250507.0",
|
59
59
|
"@cloudflare/kv-asset-handler": "0.4.0",
|
60
|
-
"miniflare": "4.
|
60
|
+
"miniflare": "4.20250507.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.20250507.0",
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
67
67
|
"@iarna/toml": "^3.0.0",
|
68
68
|
"@microsoft/api-extractor": "^7.47.0",
|
@@ -75,7 +75,7 @@
|
|
75
75
|
"@types/javascript-time-ago": "^2.0.3",
|
76
76
|
"@types/mime": "^3.0.4",
|
77
77
|
"@types/minimatch": "^5.1.2",
|
78
|
-
"@types/node": "^
|
78
|
+
"@types/node": "^20.17.32",
|
79
79
|
"@types/node-forge": "^1.3.11",
|
80
80
|
"@types/prompts": "^2.0.14",
|
81
81
|
"@types/resolve": "^1.20.6",
|
@@ -136,13 +136,13 @@
|
|
136
136
|
"xxhash-wasm": "^1.0.1",
|
137
137
|
"yargs": "^17.7.2",
|
138
138
|
"@cloudflare/cli": "1.1.1",
|
139
|
-
"@cloudflare/
|
139
|
+
"@cloudflare/eslint-config-worker": "1.1.0",
|
140
|
+
"@cloudflare/pages-shared": "^0.13.36",
|
140
141
|
"@cloudflare/workers-shared": "0.17.5",
|
141
|
-
"@cloudflare/workers-tsconfig": "0.0.0"
|
142
|
-
"@cloudflare/eslint-config-worker": "1.1.0"
|
142
|
+
"@cloudflare/workers-tsconfig": "0.0.0"
|
143
143
|
},
|
144
144
|
"peerDependencies": {
|
145
|
-
"@cloudflare/workers-types": "^4.
|
145
|
+
"@cloudflare/workers-types": "^4.20250507.0"
|
146
146
|
},
|
147
147
|
"peerDependenciesMeta": {
|
148
148
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -30,6 +30,8 @@ import type { WorkerOptions } from 'miniflare';
|
|
30
30
|
import { Writable } from 'stream';
|
31
31
|
import { z } from 'zod';
|
32
32
|
|
33
|
+
declare const __brand: unique symbol;
|
34
|
+
|
33
35
|
declare type AbortSignal_2 = unknown;
|
34
36
|
|
35
37
|
declare interface AddEventListenerOptions extends EventListenerOptions {
|
@@ -258,7 +260,7 @@ declare type BaseErrorEvent<Source = string, Data = undefined> = {
|
|
258
260
|
data: Data;
|
259
261
|
};
|
260
262
|
|
261
|
-
declare type BinaryFile =
|
263
|
+
declare type BinaryFile = File_3<Uint8Array>;
|
262
264
|
|
263
265
|
declare type BinaryType = 'blob' | 'arraybuffer'
|
264
266
|
|
@@ -277,7 +279,7 @@ declare type Binding = {
|
|
277
279
|
source: BinaryFile;
|
278
280
|
} | {
|
279
281
|
type: "text_blob";
|
280
|
-
source:
|
282
|
+
source: File_3;
|
281
283
|
} | {
|
282
284
|
type: "browser";
|
283
285
|
} | {
|
@@ -328,6 +330,8 @@ declare type Binding = {
|
|
328
330
|
|
329
331
|
declare type BindingOmit<T> = Omit<T, "binding">;
|
330
332
|
|
333
|
+
declare type BindingsOpt = StartDevWorkerInput["bindings"];
|
334
|
+
|
331
335
|
declare interface BlobPropertyBag {
|
332
336
|
type?: string
|
333
337
|
endings?: 'native' | 'transparent'
|
@@ -1055,10 +1059,27 @@ options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin'
|
|
1055
1059
|
* Configuration for a container application
|
1056
1060
|
*/
|
1057
1061
|
declare type ContainerApp = {
|
1062
|
+
/** Name of the application*/
|
1058
1063
|
name: string;
|
1059
|
-
instances
|
1064
|
+
/** Number of application instances */
|
1065
|
+
instances?: number;
|
1066
|
+
/** Number of maximum application instances. Only applicable to Durable Object container applications */
|
1067
|
+
max_instances?: number;
|
1068
|
+
/**
|
1069
|
+
* The path to a Dockerfile, or an image URI.
|
1070
|
+
* Can be defined both here or by setting the `image` key in the `ContainerApp` configuration
|
1071
|
+
*/
|
1060
1072
|
image?: string;
|
1073
|
+
/**
|
1074
|
+
* Build context of the application. By default it is the directory of `image`.
|
1075
|
+
*/
|
1076
|
+
image_build_context?: string;
|
1077
|
+
/**
|
1078
|
+
* Image variables to be passed along the image
|
1079
|
+
*/
|
1080
|
+
image_vars?: Record<string, string>;
|
1061
1081
|
class_name: string;
|
1082
|
+
/** The scheduling policy of the application, default is regional */
|
1062
1083
|
scheduling_policy?: "regional" | "moon";
|
1063
1084
|
configuration: {
|
1064
1085
|
image: string;
|
@@ -1072,11 +1093,17 @@ declare type ContainerApp = {
|
|
1072
1093
|
secret: string;
|
1073
1094
|
}[];
|
1074
1095
|
};
|
1096
|
+
/** Scheduling constraints */
|
1075
1097
|
constraints?: {
|
1076
1098
|
regions?: string[];
|
1077
1099
|
cities?: string[];
|
1078
1100
|
tier?: number;
|
1079
1101
|
};
|
1102
|
+
durable_objects?: {
|
1103
|
+
namespace_id: string;
|
1104
|
+
};
|
1105
|
+
/** How a rollout should be done, defining the size of it */
|
1106
|
+
rollout_step_percentage?: number;
|
1080
1107
|
};
|
1081
1108
|
|
1082
1109
|
declare abstract class Controller<EventMap extends ControllerEventMap = ControllerEventMap> extends TypedEventEmitterImpl<EventMap> {
|
@@ -2530,12 +2557,14 @@ export declare const experimental_readRawConfig: (args: ReadConfigCommandArgs, o
|
|
2530
2557
|
userConfigPath: string | undefined;
|
2531
2558
|
};
|
2532
2559
|
|
2560
|
+
export declare function experimental_startMixedModeSession(bindings: BindingsOpt): Promise<MixedModeSession>;
|
2561
|
+
|
2533
2562
|
declare function fetch_2 (
|
2534
2563
|
input: RequestInfo,
|
2535
2564
|
init?: RequestInit_2
|
2536
2565
|
): Promise<Response_2>
|
2537
2566
|
|
2538
|
-
declare class
|
2567
|
+
declare class File_2 extends Blob_2 {
|
2539
2568
|
/**
|
2540
2569
|
* Creates a new File instance.
|
2541
2570
|
*
|
@@ -2558,7 +2587,7 @@ declare class File extends Blob_2 {
|
|
2558
2587
|
readonly [Symbol.toStringTag]: string
|
2559
2588
|
}
|
2560
2589
|
|
2561
|
-
declare type
|
2590
|
+
declare type File_3<Contents = string, Path = string> = {
|
2562
2591
|
path: Path;
|
2563
2592
|
} | {
|
2564
2593
|
contents: Contents;
|
@@ -2707,7 +2736,7 @@ declare class FormData_2 {
|
|
2707
2736
|
/**
|
2708
2737
|
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
|
2709
2738
|
*/
|
2710
|
-
declare type FormDataEntryValue = string |
|
2739
|
+
declare type FormDataEntryValue = string | File_2
|
2711
2740
|
|
2712
2741
|
declare function getCookies (headers: Headers_2): Record<string, string>
|
2713
2742
|
|
@@ -2903,6 +2932,15 @@ declare interface MIMEType {
|
|
2903
2932
|
|
2904
2933
|
declare type MiniflareWorker = Awaited<ReturnType<Miniflare["getWorker"]>>;
|
2905
2934
|
|
2935
|
+
declare type MixedModeConnectionString = Awaited<Worker["url"]> & {
|
2936
|
+
[__brand]: "MixedModeConnectionString";
|
2937
|
+
};
|
2938
|
+
|
2939
|
+
declare type MixedModeSession = Pick<Worker, "ready" | "dispose"> & {
|
2940
|
+
["setConfig"]: (bindings: BindingsOpt) => Promise<void>;
|
2941
|
+
["mixedModeConnectionString"]: MixedModeConnectionString;
|
2942
|
+
};
|
2943
|
+
|
2906
2944
|
/** A mocked Agent class that implements the Agent API. It allows one to intercept HTTP requests made through undici and return mocked responses instead. */
|
2907
2945
|
declare class MockAgent<TMockAgentOptions extends MockAgent.Options = MockAgent.Options> extends Dispatcher {
|
2908
2946
|
constructor(options?: MockAgent.Options)
|
@@ -26121,7 +26159,6 @@ declare interface StartDevWorkerInput {
|
|
26121
26159
|
/**
|
26122
26160
|
* The javascript or typescript entry-point of the worker.
|
26123
26161
|
* This is the `main` property of a Wrangler configuration file.
|
26124
|
-
* You can specify a file path or provide the contents directly.
|
26125
26162
|
*/
|
26126
26163
|
entrypoint?: string;
|
26127
26164
|
/** The configuration of the worker. */
|
@@ -26337,7 +26374,7 @@ declare namespace Undici {
|
|
26337
26374
|
var Response: Response_2;
|
26338
26375
|
var Request: Request_2;
|
26339
26376
|
var FormData: FormData_2;
|
26340
|
-
var File:
|
26377
|
+
var File: File_2;
|
26341
26378
|
var FileReader: FileReader;
|
26342
26379
|
var caches: caches;
|
26343
26380
|
}
|
@@ -26399,7 +26436,7 @@ declare namespace undici {
|
|
26399
26436
|
Response_2 as Response,
|
26400
26437
|
BlobPropertyBag,
|
26401
26438
|
FilePropertyBag,
|
26402
|
-
File,
|
26439
|
+
File_2 as File,
|
26403
26440
|
FileReader,
|
26404
26441
|
ProgressEventInit,
|
26405
26442
|
ProgressEvent,
|