wrangler 4.26.1 → 4.28.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 +30 -7
- package/package.json +9 -8
- package/wrangler-dist/cli.d.ts +74 -7
- package/wrangler-dist/cli.js +20295 -19817
- package/wrangler-dist/metafile-cjs.json +1 -1
- package/templates/gitignore +0 -170
package/config-schema.json
CHANGED
@@ -2340,7 +2340,7 @@
|
|
2340
2340
|
"additionalProperties": {
|
2341
2341
|
"type": "string"
|
2342
2342
|
},
|
2343
|
-
"description": "Image variables to
|
2343
|
+
"description": "Image variables available to the image at build-time only. For runtime env vars, refer to https://developers.cloudflare.com/containers/examples/env-vars-and-secrets/"
|
2344
2344
|
},
|
2345
2345
|
"class_name": {
|
2346
2346
|
"type": "string",
|
@@ -2357,13 +2357,36 @@
|
|
2357
2357
|
"default": "default"
|
2358
2358
|
},
|
2359
2359
|
"instance_type": {
|
2360
|
-
"
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
|
2360
|
+
"anyOf": [
|
2361
|
+
{
|
2362
|
+
"type": "string",
|
2363
|
+
"const": "dev"
|
2364
|
+
},
|
2365
|
+
{
|
2366
|
+
"type": "string",
|
2367
|
+
"const": "basic"
|
2368
|
+
},
|
2369
|
+
{
|
2370
|
+
"type": "string",
|
2371
|
+
"const": "standard"
|
2372
|
+
},
|
2373
|
+
{
|
2374
|
+
"type": "object",
|
2375
|
+
"properties": {
|
2376
|
+
"vcpu": {
|
2377
|
+
"type": "number"
|
2378
|
+
},
|
2379
|
+
"memory_mib": {
|
2380
|
+
"type": "number"
|
2381
|
+
},
|
2382
|
+
"disk_mb": {
|
2383
|
+
"type": "number"
|
2384
|
+
}
|
2385
|
+
},
|
2386
|
+
"additionalProperties": false
|
2387
|
+
}
|
2365
2388
|
],
|
2366
|
-
"description": "The instance type to be used for the container. dev
|
2389
|
+
"description": "The instance type to be used for the container. Select from one of the following named instance types: - 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\n\nCustomers on an enterprise plan have the additional option to set custom limits.",
|
2367
2390
|
"default": "dev"
|
2368
2391
|
},
|
2369
2392
|
"rollout_step_percentage": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "wrangler",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.28.0",
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
5
5
|
"keywords": [
|
6
6
|
"wrangler",
|
@@ -54,15 +54,15 @@
|
|
54
54
|
"esbuild": "0.25.4",
|
55
55
|
"path-to-regexp": "6.3.0",
|
56
56
|
"unenv": "2.0.0-rc.19",
|
57
|
-
"workerd": "1.
|
58
|
-
"
|
59
|
-
"@cloudflare/unenv-preset": "2.
|
60
|
-
"
|
57
|
+
"workerd": "1.20250803.0",
|
58
|
+
"miniflare": "4.20250803.0",
|
59
|
+
"@cloudflare/unenv-preset": "2.6.0",
|
60
|
+
"@cloudflare/kv-asset-handler": "0.4.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.20250803.0",
|
66
66
|
"@cspotcode/source-map-support": "0.8.1",
|
67
67
|
"@iarna/toml": "^3.0.0",
|
68
68
|
"@sentry/node": "^7.86.0",
|
@@ -94,6 +94,7 @@
|
|
94
94
|
"date-fns": "^4.1.0",
|
95
95
|
"devtools-protocol": "^0.0.1182435",
|
96
96
|
"dotenv": "^16.3.1",
|
97
|
+
"dotenv-expand": "^12.0.2",
|
97
98
|
"execa": "^6.1.0",
|
98
99
|
"find-up": "^6.3.0",
|
99
100
|
"get-port": "^7.0.0",
|
@@ -138,12 +139,12 @@
|
|
138
139
|
"@cloudflare/cli": "1.1.1",
|
139
140
|
"@cloudflare/containers-shared": "0.2.8",
|
140
141
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
141
|
-
"@cloudflare/pages-shared": "^0.13.
|
142
|
+
"@cloudflare/pages-shared": "^0.13.60",
|
142
143
|
"@cloudflare/workers-shared": "0.18.5",
|
143
144
|
"@cloudflare/workers-tsconfig": "0.0.0"
|
144
145
|
},
|
145
146
|
"peerDependencies": {
|
146
|
-
"@cloudflare/workers-types": "^4.
|
147
|
+
"@cloudflare/workers-types": "^4.20250803.0"
|
147
148
|
},
|
148
149
|
"peerDependenciesMeta": {
|
149
150
|
"@cloudflare/workers-types": {
|
package/wrangler-dist/cli.d.ts
CHANGED
@@ -73,7 +73,8 @@ type ContainerApp = {
|
|
73
73
|
*/
|
74
74
|
image_build_context?: string;
|
75
75
|
/**
|
76
|
-
* Image variables to
|
76
|
+
* Image variables available to the image at build-time only.
|
77
|
+
* For runtime env vars, refer to https://developers.cloudflare.com/containers/examples/env-vars-and-secrets/
|
77
78
|
* @optional
|
78
79
|
*/
|
79
80
|
image_vars?: Record<string, string>;
|
@@ -89,13 +90,24 @@ type ContainerApp = {
|
|
89
90
|
scheduling_policy?: "default" | "moon" | "regional";
|
90
91
|
/**
|
91
92
|
* The instance type to be used for the container.
|
92
|
-
*
|
93
|
-
*
|
94
|
-
*
|
93
|
+
* Select from one of the following named instance types:
|
94
|
+
* - dev: 1/16 vCPU, 256 MiB memory, and 2 GB disk
|
95
|
+
* - basic: 1/4 vCPU, 1 GiB memory, and 4 GB disk
|
96
|
+
* - standard: 1/2 vCPU, 4 GiB memory, and 4 GB disk
|
97
|
+
*
|
98
|
+
* Customers on an enterprise plan have the additional option to set custom limits.
|
99
|
+
*
|
95
100
|
* @optional
|
96
101
|
* @default "dev"
|
97
102
|
*/
|
98
|
-
instance_type?: "dev" | "basic" | "standard"
|
103
|
+
instance_type?: "dev" | "basic" | "standard" | {
|
104
|
+
/** @defaults to 0.0625 (1/16 vCPU) */
|
105
|
+
vcpu?: number;
|
106
|
+
/** @defaults to 256 MiB */
|
107
|
+
memory_mib?: number;
|
108
|
+
/** @defaults to 2 GB */
|
109
|
+
disk_mb?: number;
|
110
|
+
};
|
99
111
|
/**
|
100
112
|
* @deprecated Use top level `containers` fields instead.
|
101
113
|
* `configuration.image` should be `image`
|
@@ -1537,6 +1549,7 @@ interface EnablePagesAssetsServiceBindingOptions {
|
|
1537
1549
|
interface Unstable_DevOptions {
|
1538
1550
|
config?: string;
|
1539
1551
|
env?: string;
|
1552
|
+
envFiles?: string[];
|
1540
1553
|
ip?: string;
|
1541
1554
|
port?: number;
|
1542
1555
|
bundle?: boolean;
|
@@ -1904,6 +1917,13 @@ interface StartDevWorkerInput {
|
|
1904
1917
|
/** Specify the compliance region mode of the Worker. */
|
1905
1918
|
complianceRegion?: Config["compliance_region"];
|
1906
1919
|
env?: string;
|
1920
|
+
/**
|
1921
|
+
* An array of paths to the .env files to load for this worker, relative to the project directory.
|
1922
|
+
*
|
1923
|
+
* If not specified, defaults to the standard `.env` files as given by `getDefaultEnvFiles()`.
|
1924
|
+
* The project directory is where the Wrangler configuration file is located or the current working directory otherwise.
|
1925
|
+
*/
|
1926
|
+
envFiles?: string[];
|
1907
1927
|
/** The bindings available to the worker. The specified bindind type will be exposed to the worker on the `env` object under the same key. */
|
1908
1928
|
bindings?: Record<string, Binding>;
|
1909
1929
|
migrations?: DurableObjectMigration[];
|
@@ -1990,7 +2010,7 @@ interface StartDevWorkerInput {
|
|
1990
2010
|
/** Describes the registry of other Workers running locally */
|
1991
2011
|
registry?: WorkerRegistry | null;
|
1992
2012
|
testScheduled?: boolean;
|
1993
|
-
/** Whether to use Vectorize
|
2013
|
+
/** Whether to use Vectorize as a remote binding -- the worker is run locally but accesses to Vectorize are made remotely */
|
1994
2014
|
bindVectorizeToProd?: boolean;
|
1995
2015
|
/** Whether to use Images local mode -- this is lower fidelity, but doesn't require network access */
|
1996
2016
|
imagesLocalMode?: boolean;
|
@@ -2396,6 +2416,36 @@ declare class ExecutionContext {
|
|
2396
2416
|
props: any;
|
2397
2417
|
}
|
2398
2418
|
|
2419
|
+
/**
|
2420
|
+
* Get the Worker `vars` bindings for a `wrangler dev` instance of a Worker.
|
2421
|
+
*
|
2422
|
+
* The `vars` bindings can be specified in the Wrangler configuration file.
|
2423
|
+
* But "secret" `vars` are usually only provided at the server -
|
2424
|
+
* either by creating them in the Dashboard UI, or using the `wrangler secret` command.
|
2425
|
+
*
|
2426
|
+
* It is useful during development, to provide these types of variable locally.
|
2427
|
+
* When running `wrangler dev` we will look for a file called `.dev.vars`, situated
|
2428
|
+
* next to the User's Wrangler configuration file (or in the current working directory if there is no
|
2429
|
+
* Wrangler configuration). If the `--env <env>` option is set, we'll first look for
|
2430
|
+
* `.dev.vars.<env>`.
|
2431
|
+
*
|
2432
|
+
* If there are no `.dev.vars*` file, (and CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV is not "false")
|
2433
|
+
* we will look for `.env*` files in the same directory.
|
2434
|
+
* If the `envFiles` option is set, we'll look for the `.env` files at those paths instead of the defaults.
|
2435
|
+
*
|
2436
|
+
* Any values in these files (all formatted like `.env` files) will add to or override `vars`
|
2437
|
+
* bindings provided in the Wrangler configuration file.
|
2438
|
+
*
|
2439
|
+
* @param configPath - The path to the Wrangler configuration file, if defined.
|
2440
|
+
* @param envFiles - An array of paths to .env files to load; if `undefined` the default .env files will be used (see `getDefaultEnvFiles()`).
|
2441
|
+
* The `envFiles` paths are resolved against the directory of the Wrangler configuration file, if there is one, otherwise against the current working directory.
|
2442
|
+
* @param vars - The existing `vars` bindings from the Wrangler configuration.
|
2443
|
+
* @param env - The specific environment name (e.g., "staging") or `undefined` if no specific environment is set.
|
2444
|
+
* @param silent - If true, will not log any messages about the loaded .dev.vars files or .env files.
|
2445
|
+
* @returns The merged `vars` bindings, including those loaded from `.dev.vars` or `.env` files.
|
2446
|
+
*/
|
2447
|
+
declare function getVarsForDev(configPath: string | undefined, envFiles: string[] | undefined, vars: Config["vars"], env: string | undefined, silent?: boolean): Config["vars"];
|
2448
|
+
|
2399
2449
|
/**
|
2400
2450
|
* Options for the `getPlatformProxy` utility
|
2401
2451
|
*/
|
@@ -2413,6 +2463,23 @@ type GetPlatformProxyOptions = {
|
|
2413
2463
|
* point to a valid file on the filesystem
|
2414
2464
|
*/
|
2415
2465
|
configPath?: string;
|
2466
|
+
/**
|
2467
|
+
* Paths to `.env` files to load environment variables from, relative to the project directory.
|
2468
|
+
*
|
2469
|
+
* The project directory is computed as the directory containing `configPath` or the current working directory if `configPath` is undefined.
|
2470
|
+
*
|
2471
|
+
* If `envFiles` is defined, only the files in the array will be considered for loading local dev variables.
|
2472
|
+
* If `undefined`, the default behavior is:
|
2473
|
+
* - compute the project directory as that containing the Wrangler configuration file,
|
2474
|
+
* or the current working directory if no Wrangler configuration file is specified.
|
2475
|
+
* - look for `.env` and `.env.local` files in the project directory.
|
2476
|
+
* - if the `environment` option is specified, also look for `.env.<environment>` and `.env.<environment>.local`
|
2477
|
+
* files in the project directory
|
2478
|
+
* - resulting in an `envFiles` array like: `[".env", ".env.local", ".env.<environment>", ".env.<environment>.local"]`.
|
2479
|
+
*
|
2480
|
+
* The values from files earlier in the `envFiles` array (e.g. `envFiles[x]`) will be overridden by values from files later in the array (e.g. `envFiles[x+1)`).
|
2481
|
+
*/
|
2482
|
+
envFiles?: string[];
|
2416
2483
|
/**
|
2417
2484
|
* Indicates if and where to persist the bindings data, if not present or `true` it defaults to the same location
|
2418
2485
|
* used by wrangler: `.wrangler/state/v3` (so that the same data can be easily used by the caller and wrangler).
|
@@ -2594,4 +2661,4 @@ interface Unstable_ASSETSBindingsOptions {
|
|
2594
2661
|
}
|
2595
2662
|
declare const generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
|
2596
2663
|
|
2597
|
-
export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type RemoteProxySession as Experimental_RemoteProxySession, 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 StartRemoteProxySessionOptions as experimental_StartRemoteProxySessionOptions, maybeStartOrUpdateRemoteProxySession as experimental_maybeStartOrUpdateRemoteProxySession, experimental_patchConfig, pickRemoteBindings as experimental_pickRemoteBindings, experimental_readRawConfig, startRemoteProxySession as experimental_startRemoteProxySession, 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 };
|
2664
|
+
export { type ConfigBindingOptions as Experimental_ConfigBindingOptions, type RemoteProxySession as Experimental_RemoteProxySession, 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 StartRemoteProxySessionOptions as experimental_StartRemoteProxySessionOptions, maybeStartOrUpdateRemoteProxySession as experimental_maybeStartOrUpdateRemoteProxySession, experimental_patchConfig, pickRemoteBindings as experimental_pickRemoteBindings, experimental_readRawConfig, startRemoteProxySession as experimental_startRemoteProxySession, getPlatformProxy, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, generateASSETSBinding as unstable_generateASSETSBinding, unstable_getMiniflareWorkerOptions, getVarsForDev as unstable_getVarsForDev, unstable_pages, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
|