wrangler 4.86.0 → 4.88.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "4.86.0",
3
+ "version": "4.88.0",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "assembly",
@@ -54,16 +54,16 @@
54
54
  "esbuild": "0.27.3",
55
55
  "path-to-regexp": "6.3.0",
56
56
  "unenv": "2.0.0-rc.24",
57
- "workerd": "1.20260426.1",
58
- "@cloudflare/kv-asset-handler": "0.4.2",
59
- "@cloudflare/unenv-preset": "2.16.1",
60
- "miniflare": "4.20260426.0"
57
+ "workerd": "1.20260504.1",
58
+ "@cloudflare/kv-asset-handler": "0.5.0",
59
+ "miniflare": "4.20260504.0",
60
+ "@cloudflare/unenv-preset": "2.16.1"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@aws-sdk/client-s3": "^3.721.0",
64
64
  "@bomb.sh/tab": "^0.0.12",
65
65
  "@cloudflare/types": "6.18.4",
66
- "@cloudflare/workers-types": "^4.20260426.1",
66
+ "@cloudflare/workers-types": "^4.20260504.1",
67
67
  "@cspotcode/source-map-support": "0.8.1",
68
68
  "@netlify/build-info": "^10.5.1",
69
69
  "@sentry/node": "^7.86.0",
@@ -144,17 +144,17 @@
144
144
  "xxhash-wasm": "^1.0.1",
145
145
  "yaml": "^2.8.1",
146
146
  "yargs": "^17.7.2",
147
- "@cloudflare/cli-shared-helpers": "0.1.0",
147
+ "@cloudflare/cli-shared-helpers": "0.1.1",
148
148
  "@cloudflare/codemod": "1.1.0",
149
149
  "@cloudflare/containers-shared": "0.14.1",
150
- "@cloudflare/pages-shared": "^0.13.129",
151
- "@cloudflare/workers-shared": "0.19.3",
152
- "@cloudflare/workers-utils": "0.18.0",
153
- "@cloudflare/workflows-shared": "0.9.1",
154
- "@cloudflare/workers-tsconfig": "0.0.0"
150
+ "@cloudflare/workers-shared": "0.19.5",
151
+ "@cloudflare/workflows-shared": "0.10.0",
152
+ "@cloudflare/workers-tsconfig": "0.0.0",
153
+ "@cloudflare/pages-shared": "^0.13.131",
154
+ "@cloudflare/workers-utils": "0.19.0"
155
155
  },
156
156
  "peerDependencies": {
157
- "@cloudflare/workers-types": "^4.20260426.1"
157
+ "@cloudflare/workers-types": "^4.20260504.1"
158
158
  },
159
159
  "peerDependenciesMeta": {
160
160
  "@cloudflare/workers-types": {
@@ -165,7 +165,7 @@
165
165
  "fsevents": "~2.3.2"
166
166
  },
167
167
  "engines": {
168
- "node": ">=20.3.0"
168
+ "node": ">=22.0.0"
169
169
  },
170
170
  "volta": {
171
171
  "extends": "../../package.json"
@@ -237,23 +237,6 @@ declare const unstable_pages: {
237
237
  deploy: typeof deploy;
238
238
  };
239
239
 
240
- type AssetsOptions = {
241
- directory: string;
242
- binding?: string;
243
- routerConfig: RouterConfig;
244
- assetConfig: AssetConfig;
245
- _redirects?: string;
246
- _headers?: string;
247
- run_worker_first?: boolean | string[];
248
- };
249
-
250
- type ApiCredentials = {
251
- apiToken: string;
252
- } | {
253
- authKey: string;
254
- authEmail: string;
255
- };
256
-
257
240
  /**
258
241
  * An entry point for the Worker.
259
242
  *
@@ -278,6 +261,90 @@ type Entry = {
278
261
  exports: string[];
279
262
  };
280
263
 
264
+ interface GenerateTypesOptions {
265
+ /**
266
+ * Path to the Wrangler config file to use. Can be an array for multi-config type resolution.
267
+ */
268
+ config?: string | string[];
269
+ /**
270
+ * Name of the Wrangler environment to generate types for.
271
+ */
272
+ env?: string;
273
+ /**
274
+ * Paths to `.env` files to load when inferring local variables and secrets.
275
+ */
276
+ envFile?: string[];
277
+ /**
278
+ * Name of the generated environment interface.
279
+ */
280
+ envInterface?: string;
281
+ /**
282
+ * Whether to include environment/bindings types in the output.
283
+ */
284
+ includeEnv?: boolean;
285
+ /**
286
+ * Whether to include runtime types in the output.
287
+ */
288
+ includeRuntime?: boolean;
289
+ /**
290
+ * Path to the declaration file for generated types.
291
+ */
292
+ path?: string;
293
+ /**
294
+ * Whether to generate strict literal/union variable types.
295
+ */
296
+ strictVars?: boolean;
297
+ }
298
+
299
+ type Experimental_GenerateTypesOptions = GenerateTypesOptions;
300
+ interface GenerateTypesResult {
301
+ /**
302
+ * Combined formatted output containing all generated sections.
303
+ */
304
+ content: string;
305
+ /**
306
+ * Generated environment/bindings types, or `null` when env types are excluded.
307
+ */
308
+ env: string | null;
309
+ /**
310
+ * Target declaration file path associated with this generation run.
311
+ */
312
+ path: string;
313
+ /**
314
+ * Generated runtime types, or `null` when runtime types are excluded.
315
+ */
316
+ runtime: string | null;
317
+ }
318
+ type Experimental_GenerateTypesResult = GenerateTypesResult;
319
+ /**
320
+ * Generate types from your Worker configuration
321
+ *
322
+ * @description Programmatically generate TypeScript type definitions for your
323
+ * Worker, using the same logic that powers the `wrangler types` CLI command.
324
+ *
325
+ * @param options - Type generation configuration options that mirror the `wrangler types` CLI flags
326
+ *
327
+ * @returns Structured output containing combined content & split env/runtime sections.
328
+ */
329
+ declare function generateTypes(options: Experimental_GenerateTypesOptions): Promise<Experimental_GenerateTypesResult>;
330
+
331
+ type AssetsOptions = {
332
+ directory: string;
333
+ binding?: string;
334
+ routerConfig: RouterConfig;
335
+ assetConfig: AssetConfig;
336
+ _redirects?: string;
337
+ _headers?: string;
338
+ run_worker_first?: boolean | string[];
339
+ };
340
+
341
+ type ApiCredentials = {
342
+ apiToken: string;
343
+ } | {
344
+ authKey: string;
345
+ authEmail: string;
346
+ };
347
+
281
348
  /**
282
349
  * Information about Wrangler's bundling process that needs passed through
283
350
  * for DevTools sourcemap transformation
@@ -1490,11 +1557,13 @@ interface EnvironmentNonInheritable {
1490
1557
  */
1491
1558
  vars: Record<string, string | Json>;
1492
1559
  /**
1493
- * Secrets configuration (experimental).
1560
+ * Secrets configuration.
1494
1561
  *
1495
1562
  * NOTE: This field is not automatically inherited from the top level environment,
1496
1563
  * and so must be specified in every named environment.
1497
1564
  *
1565
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#secrets-configuration-property
1566
+ *
1498
1567
  * @nonInheritable
1499
1568
  */
1500
1569
  secrets?: {
@@ -3343,4 +3412,4 @@ interface Unstable_ASSETSBindingsOptions {
3343
3412
  }
3344
3413
  declare const unstable_generateASSETSBinding: (opts: Unstable_ASSETSBindingsOptions) => (request: Request) => Promise<Response$1>;
3345
3414
 
3346
- export { type GetPlatformProxyOptions, type PlatformProxy, type RemoteProxySession, type SourcelessWorkerOptions, type StartRemoteProxySessionOptions, 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, Framework as experimental_AutoConfigFramework, getDetailsForAutoConfig as experimental_getDetailsForAutoConfig, experimental_getWranglerCommands, runAutoConfig as experimental_runAutoConfig, getPlatformProxy, maybeStartOrUpdateRemoteProxySession, startRemoteProxySession, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, unstable_generateASSETSBinding, unstable_getDevCompatibilityDate, getDurableObjectClassNameToUseSQLiteMap as unstable_getDurableObjectClassNameToUseSQLiteMap, unstable_getMiniflareWorkerOptions, getVarsForDev as unstable_getVarsForDev, getWorkerNameFromProject as unstable_getWorkerNameFromProject, unstable_pages, printBindings as unstable_printBindings, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };
3415
+ export { type Experimental_GenerateTypesOptions, type Experimental_GenerateTypesResult, type GetPlatformProxyOptions, type PlatformProxy, type RemoteProxySession, type SourcelessWorkerOptions, type StartRemoteProxySessionOptions, 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, Framework as experimental_AutoConfigFramework, generateTypes as experimental_generateTypes, getDetailsForAutoConfig as experimental_getDetailsForAutoConfig, experimental_getWranglerCommands, runAutoConfig as experimental_runAutoConfig, getPlatformProxy, maybeStartOrUpdateRemoteProxySession, startRemoteProxySession, DevEnv as unstable_DevEnv, convertConfigBindingsToStartWorkerBindings as unstable_convertConfigBindingsToStartWorkerBindings, unstable_dev, unstable_generateASSETSBinding, unstable_getDevCompatibilityDate, getDurableObjectClassNameToUseSQLiteMap as unstable_getDurableObjectClassNameToUseSQLiteMap, unstable_getMiniflareWorkerOptions, getVarsForDev as unstable_getVarsForDev, getWorkerNameFromProject as unstable_getWorkerNameFromProject, unstable_pages, printBindings as unstable_printBindings, readConfig as unstable_readConfig, splitSqlQuery as unstable_splitSqlQuery, startWorker as unstable_startWorker };