nitro-nightly 3.0.1-20260119-145349-d0c4950f → 3.0.1-20260120-133205-cbfce96c

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.
Files changed (52) hide show
  1. package/dist/_build/common.mjs +542 -542
  2. package/dist/_build/rolldown.mjs +5 -5
  3. package/dist/_build/rollup.mjs +3 -3
  4. package/dist/_build/vite.build.mjs +1 -1
  5. package/dist/_chunks/dev.mjs +4 -4
  6. package/dist/_chunks/nitro.mjs +3 -3
  7. package/dist/_chunks/nitro2.mjs +1 -1
  8. package/dist/_chunks/utils.mjs +1 -1
  9. package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +2 -2
  10. package/dist/_libs/@jridgewell/gen-mapping.mjs +1 -1
  11. package/dist/_libs/@rollup/plugin-commonjs.d.mts +241 -0
  12. package/dist/_libs/@rollup/plugin-commonjs.mjs +19 -19
  13. package/dist/_libs/@rollup/plugin-inject.mjs +1 -1
  14. package/dist/_libs/c12.d.mts +214 -0
  15. package/dist/_libs/c12.mjs +6 -6
  16. package/dist/_libs/chokidar.mjs +2 -2
  17. package/dist/_libs/compatx.d.mts +47 -0
  18. package/dist/_libs/confbox.mjs +2 -2
  19. package/dist/_libs/esbuild.d.mts +20 -0
  20. package/dist/_libs/giget.mjs +1305 -1305
  21. package/dist/_libs/httpxy.d.mts +79 -0
  22. package/dist/_libs/httpxy.mjs +1 -1
  23. package/dist/_libs/magic-string.d.mts +220 -0
  24. package/dist/_libs/mlly.d.mts +57 -0
  25. package/dist/_libs/pkg-types.d.mts +23 -0
  26. package/dist/_libs/rou3.d.mts +43 -0
  27. package/dist/_libs/std-env.d.mts +4 -0
  28. package/dist/_libs/unimport.d.mts +426 -0
  29. package/dist/_libs/unimport.mjs +11 -11
  30. package/dist/_libs/unwasm.d.mts +29 -0
  31. package/dist/_presets.mjs +1 -1
  32. package/dist/builder.mjs +1 -1
  33. package/dist/cli/_chunks/build.mjs +1 -1
  34. package/dist/cli/_chunks/dev.mjs +1 -1
  35. package/dist/cli/_chunks/list.mjs +1 -1
  36. package/dist/cli/_chunks/prepare.mjs +1 -1
  37. package/dist/cli/_chunks/run.mjs +1 -1
  38. package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
  39. package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
  40. package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
  41. package/dist/runtime/internal/error/dev.d.mts +0 -1
  42. package/dist/runtime/internal/route-rules.d.mts +0 -4
  43. package/dist/runtime/internal/routes/openapi.d.mts +0 -1
  44. package/dist/runtime/internal/routes/scalar.d.mts +0 -1
  45. package/dist/runtime/internal/routes/swagger.d.mts +0 -1
  46. package/dist/runtime/internal/runtime-config.d.mts +0 -1
  47. package/dist/runtime/nitro.d.mts +0 -3
  48. package/dist/runtime/virtual/renderer-template.d.mts +0 -1
  49. package/dist/types/index.d.mts +962 -1095
  50. package/dist/vite.d.mts +13 -13
  51. package/dist/vite.mjs +10 -9
  52. package/package.json +9 -9
@@ -1,3 +1,13 @@
1
+ import { t as commonjs } from "../_libs/@rollup/plugin-commonjs.mjs";
2
+ import { a as WatchConfigOptions, i as ResolvedConfig, n as ConfigWatcher, o as ChokidarOptions, r as DotenvOptions, t as C12InputConfig } from "../_libs/c12.mjs";
3
+ import { n as CompatibilityDates, r as DateString, t as CompatibilityDateSpec } from "../_libs/compatx.mjs";
4
+ import { t as ProxyServerOptions } from "../_libs/httpxy.mjs";
5
+ import { t as TSConfig } from "../_libs/pkg-types.mjs";
6
+ import { n as Unimport, t as UnimportPluginOptions } from "../_libs/unimport.mjs";
7
+ import "../_libs/esbuild.mjs";
8
+ import { t as UnwasmPluginOptions } from "../_libs/unwasm.mjs";
9
+ import { n as RouterContext, t as RouterCompilerOptions } from "../_libs/rou3.mjs";
10
+ import { t as ProviderName } from "../_libs/std-env.mjs";
1
11
  import { ConsolaInstance, LogLevel } from "consola";
2
12
  import { Hookable, HookableCore, NestedHooks } from "hookable";
3
13
  import { version } from "nitro/meta";
@@ -22,36 +32,24 @@ import { MinifyOptions } from "oxc-minify";
22
32
  import { InputOptions, OutputOptions } from "rollup";
23
33
  import { Nitro as Nitro$1, RunnerMessageListener as RunnerMessageListener$1 } from "nitro/types";
24
34
  import { FetchOptions, FetchRequest, FetchResponse } from "ofetch";
25
- import { RollupCommonJSOptions } from "@rollup/plugin-commonjs";
26
- import { C12InputConfig, ConfigWatcher, DotenvOptions, ResolvedConfig, WatchConfigOptions } from "c12";
27
- import { ChokidarOptions } from "chokidar";
28
- import { CompatibilityDateSpec, CompatibilityDates, DateString } from "compatx";
29
- import { ProxyServerOptions } from "httpxy";
30
35
  import { ExecutionContext, ForwardableEmailMessage, MessageBatch, ScheduledController, TraceItem } from "@cloudflare/workers-types";
31
36
  import { DurableObject } from "cloudflare:workers";
32
- import { TSConfig } from "pkg-types";
33
- import { UnimportPluginOptions } from "unimport/unplugin";
34
- import { UnwasmPluginOptions } from "unwasm/plugin";
35
- import { Unimport } from "unimport";
36
- import { RouterContext } from "rou3";
37
- import { RouterCompilerOptions } from "rou3/compiler";
38
- import { ProviderName } from "std-env";
39
37
 
40
38
  //#region src/types/fetch/fetch.d.ts
41
39
  interface InternalApi {}
42
40
  type RouterMethod = Lowercase<HTTPMethod>;
43
- type NitroFetchRequest = Exclude<keyof InternalApi, `/_${string}` | `/api/_${string}`> | Exclude<FetchRequest, string> | (string & {});
41
+ type NitroFetchRequest = Exclude<keyof InternalApi, `/_${string}` | `/api/_${string}`> | Exclude<FetchRequest, string> | string & {};
44
42
  type MiddlewareOf<Route$2 extends string, Method extends RouterMethod | "default"> = Method extends keyof InternalApi[MatchedRoutes<Route$2>] ? InternalApi[MatchedRoutes<Route$2>][Method] : never;
45
43
  type TypedInternalResponse<Route$2, Default = unknown, Method extends RouterMethod = RouterMethod> = Default extends string | boolean | number | null | void | object ? Default : Route$2 extends string ? MiddlewareOf<Route$2, Method> extends never ? MiddlewareOf<Route$2, "default"> extends never ? Default : MiddlewareOf<Route$2, "default"> : MiddlewareOf<Route$2, Method> : Default;
46
- type AvailableRouterMethod<R$1 extends NitroFetchRequest> = R$1 extends string ? keyof InternalApi[MatchedRoutes<R$1>] extends undefined ? RouterMethod : Extract<keyof InternalApi[MatchedRoutes<R$1>], "default"> extends undefined ? Extract<RouterMethod, keyof InternalApi[MatchedRoutes<R$1>]> : RouterMethod : RouterMethod;
47
- interface NitroFetchOptions<R$1 extends NitroFetchRequest, M extends AvailableRouterMethod<R$1> = AvailableRouterMethod<R$1>> extends FetchOptions {
44
+ type AvailableRouterMethod<R extends NitroFetchRequest> = R extends string ? keyof InternalApi[MatchedRoutes<R>] extends undefined ? RouterMethod : Extract<keyof InternalApi[MatchedRoutes<R>], "default"> extends undefined ? Extract<RouterMethod, keyof InternalApi[MatchedRoutes<R>]> : RouterMethod : RouterMethod;
45
+ interface NitroFetchOptions<R extends NitroFetchRequest, M extends AvailableRouterMethod<R> = AvailableRouterMethod<R>> extends FetchOptions {
48
46
  method?: Uppercase<M> | M;
49
47
  }
50
- type ExtractedRouteMethod<R$1 extends NitroFetchRequest, O extends NitroFetchOptions<R$1>> = O extends undefined ? "get" : Lowercase<Exclude<O["method"], undefined>> extends RouterMethod ? Lowercase<Exclude<O["method"], undefined>> : "get";
51
- type Base$Fetch<DefaultT = unknown, DefaultR extends NitroFetchRequest = NitroFetchRequest> = <T = DefaultT, R$1 extends NitroFetchRequest = DefaultR, O extends NitroFetchOptions<R$1> = NitroFetchOptions<R$1>>(request: R$1, opts?: O) => Promise<TypedInternalResponse<R$1, T, NitroFetchOptions<R$1> extends O ? "get" : ExtractedRouteMethod<R$1, O>>>;
48
+ type ExtractedRouteMethod<R extends NitroFetchRequest, O extends NitroFetchOptions<R>> = O extends undefined ? "get" : Lowercase<Exclude<O["method"], undefined>> extends RouterMethod ? Lowercase<Exclude<O["method"], undefined>> : "get";
49
+ type Base$Fetch<DefaultT = unknown, DefaultR extends NitroFetchRequest = NitroFetchRequest> = <T = DefaultT, R extends NitroFetchRequest = DefaultR, O extends NitroFetchOptions<R> = NitroFetchOptions<R>>(request: R, opts?: O) => Promise<TypedInternalResponse<R, T, NitroFetchOptions<R> extends O ? "get" : ExtractedRouteMethod<R, O>>>;
52
50
  interface $Fetch<DefaultT = unknown, DefaultR extends NitroFetchRequest = NitroFetchRequest> extends Base$Fetch<DefaultT, DefaultR> {
53
- raw<T = DefaultT, R$1 extends NitroFetchRequest = DefaultR, O extends NitroFetchOptions<R$1> = NitroFetchOptions<R$1>>(request: R$1, opts?: O): Promise<FetchResponse<TypedInternalResponse<R$1, T, NitroFetchOptions<R$1> extends O ? "get" : ExtractedRouteMethod<R$1, O>>>>;
54
- create<T = DefaultT, R$1 extends NitroFetchRequest = DefaultR>(defaults: FetchOptions): $Fetch<T, R$1>;
51
+ raw<T = DefaultT, R extends NitroFetchRequest = DefaultR, O extends NitroFetchOptions<R> = NitroFetchOptions<R>>(request: R, opts?: O): Promise<FetchResponse<TypedInternalResponse<R, T, NitroFetchOptions<R> extends O ? "get" : ExtractedRouteMethod<R, O>>>>;
52
+ create<T = DefaultT, R extends NitroFetchRequest = DefaultR>(defaults: FetchOptions): $Fetch<T, R>;
55
53
  }
56
54
  //#endregion
57
55
  //#region src/types/fetch/_match.d.ts
@@ -134,8 +132,8 @@ interface CacheOptions<T = any, ArgsT extends unknown[] = any[]> {
134
132
  group?: string;
135
133
  integrity?: any;
136
134
  /**
137
- * Number of seconds to cache the response. Defaults to 1.
138
- */
135
+ * Number of seconds to cache the response. Defaults to 1.
136
+ */
139
137
  maxAge?: number;
140
138
  swr?: boolean;
141
139
  staleMaxAge?: number;
@@ -229,37 +227,30 @@ interface TaskRunnerOptions {
229
227
  //#endregion
230
228
  //#region src/presets/aws-amplify/types.d.ts
231
229
  type AmplifyImageSettings = {
232
- /** Array of supported image widths */
233
- sizes: number[];
230
+ /** Array of supported image widths */sizes: number[];
234
231
  /**
235
- * Array of allowed external domains that can use Image Optimization.
236
- * Leave empty for only allowing the deployment domain to use Image Optimization.
237
- */
232
+ * Array of allowed external domains that can use Image Optimization.
233
+ * Leave empty for only allowing the deployment domain to use Image Optimization.
234
+ */
238
235
  domains: string[];
239
236
  /**
240
- * Array of allowed external patterns that can use Image Optimization.
241
- * Similar to `domains` but provides more control with RegExp.
242
- */
237
+ * Array of allowed external patterns that can use Image Optimization.
238
+ * Similar to `domains` but provides more control with RegExp.
239
+ */
243
240
  remotePatterns: {
244
- /** The protocol of the allowed remote pattern. Can be `http` or `https`. */
245
- protocol?: "http" | "https";
241
+ /** The protocol of the allowed remote pattern. Can be `http` or `https`. */protocol?: "http" | "https";
246
242
  /**
247
- * The hostname of the allowed remote pattern.
248
- * Can be literal or wildcard. Single `*` matches a single subdomain.
249
- * Double `**` matches any number of subdomains.
250
- * We will disallow blanket wildcards of `**` with nothing else.
251
- */
252
- hostname: string;
253
- /** The port of the allowed remote pattern. */
254
- port?: string;
255
- /** The pathname of the allowed remote pattern. */
243
+ * The hostname of the allowed remote pattern.
244
+ * Can be literal or wildcard. Single `*` matches a single subdomain.
245
+ * Double `**` matches any number of subdomains.
246
+ * We will disallow blanket wildcards of `**` with nothing else.
247
+ */
248
+ hostname: string; /** The port of the allowed remote pattern. */
249
+ port?: string; /** The pathname of the allowed remote pattern. */
256
250
  pathname?: string;
257
- }[];
258
- /** Array of allowed output image formats. */
259
- formats: ("image/avif" | "image/webp" | "image/gif" | "image/png" | "image/jpeg")[];
260
- /** Cache duration (in seconds) for the optimized images. */
261
- minimumCacheTTL: number;
262
- /** Allow SVG input image URLs. This is disabled by default for security purposes. */
251
+ }[]; /** Array of allowed output image formats. */
252
+ formats: ("image/avif" | "image/webp" | "image/gif" | "image/png" | "image/jpeg")[]; /** Cache duration (in seconds) for the optimized images. */
253
+ minimumCacheTTL: number; /** Allow SVG input image URLs. This is disabled by default for security purposes. */
263
254
  dangerouslyAllowSVG: boolean;
264
255
  };
265
256
  interface AWSAmplifyOptions {
@@ -339,56 +330,56 @@ type CloudchamberConfig = {
339
330
  */
340
331
  type ContainerApp = {
341
332
  /**
342
- * Name of the application
343
- * @optional Defaults to `worker_name-class_name` if not specified.
344
- */
333
+ * Name of the application
334
+ * @optional Defaults to `worker_name-class_name` if not specified.
335
+ */
345
336
  name?: string;
346
337
  /**
347
- * Number of application instances
348
- * @deprecated
349
- * @hidden
350
- */
338
+ * Number of application instances
339
+ * @deprecated
340
+ * @hidden
341
+ */
351
342
  instances?: number;
352
343
  /**
353
- * Number of maximum application instances.
354
- * @optional
355
- */
344
+ * Number of maximum application instances.
345
+ * @optional
346
+ */
356
347
  max_instances?: number;
357
348
  /**
358
- * The path to a Dockerfile, or an image URI for the Cloudflare registry.
359
- */
349
+ * The path to a Dockerfile, or an image URI for the Cloudflare registry.
350
+ */
360
351
  image: string;
361
352
  /**
362
- * Build context of the application.
363
- * @optional - defaults to the directory of `image`.
364
- */
353
+ * Build context of the application.
354
+ * @optional - defaults to the directory of `image`.
355
+ */
365
356
  image_build_context?: string;
366
357
  /**
367
- * Image variables to be passed along the image at build time.
368
- * @optional
369
- */
358
+ * Image variables to be passed along the image at build time.
359
+ * @optional
360
+ */
370
361
  image_vars?: Record<string, string>;
371
362
  /**
372
- * The class name of the Durable Object the container is connected to.
373
- */
363
+ * The class name of the Durable Object the container is connected to.
364
+ */
374
365
  class_name: string;
375
366
  /**
376
- * The scheduling policy of the application
377
- * @optional
378
- * @default "default"
379
- */
367
+ * The scheduling policy of the application
368
+ * @optional
369
+ * @default "default"
370
+ */
380
371
  scheduling_policy?: "regional" | "moon" | "default";
381
372
  /**
382
- * The instance type to be used for the container. This sets preconfigured options for vcpu and memory
383
- * @optional
384
- */
373
+ * The instance type to be used for the container. This sets preconfigured options for vcpu and memory
374
+ * @optional
375
+ */
385
376
  instance_type?: "dev" | "basic" | "standard";
386
377
  /**
387
- * @deprecated Use top level `containers` fields instead.
388
- * `configuration.image` should be `image`
389
- * `configuration.disk` should be set via `instance_type`
390
- * @hidden
391
- */
378
+ * @deprecated Use top level `containers` fields instead.
379
+ * `configuration.image` should be `image`
380
+ * `configuration.disk` should be set via `instance_type`
381
+ * @hidden
382
+ */
392
383
  configuration?: {
393
384
  image?: string;
394
385
  labels?: {
@@ -405,53 +396,48 @@ type ContainerApp = {
405
396
  };
406
397
  };
407
398
  /**
408
- * Scheduling constraints
409
- * @hidden
410
- */
399
+ * Scheduling constraints
400
+ * @hidden
401
+ */
411
402
  constraints?: {
412
403
  regions?: string[];
413
404
  cities?: string[];
414
405
  tier?: number;
415
406
  };
416
407
  /**
417
- * @deprecated use the `class_name` field instead.
418
- * @hidden
419
- */
408
+ * @deprecated use the `class_name` field instead.
409
+ * @hidden
410
+ */
420
411
  durable_objects?: {
421
412
  namespace_id: string;
422
413
  };
423
414
  /**
424
- * How a rollout should be done, defining the size of it
425
- * @optional
426
- * @default 25
427
- * */
415
+ * How a rollout should be done, defining the size of it
416
+ * @optional
417
+ * @default 25
418
+ * */
428
419
  rollout_step_percentage?: number;
429
420
  /**
430
- * How a rollout should be created. It supports the following modes:
431
- * - full_auto: The container application will be rolled out fully automatically.
432
- * - none: The container application won't have a roll out or update.
433
- * - manual: The container application will be rollout fully by manually actioning progress steps.
434
- * @optional
435
- * @default "full_auto"
436
- */
421
+ * How a rollout should be created. It supports the following modes:
422
+ * - full_auto: The container application will be rolled out fully automatically.
423
+ * - none: The container application won't have a roll out or update.
424
+ * - manual: The container application will be rollout fully by manually actioning progress steps.
425
+ * @optional
426
+ * @default "full_auto"
427
+ */
437
428
  rollout_kind?: "full_auto" | "none" | "full_manual";
438
429
  };
439
430
  /**
440
431
  * Configuration in wrangler for Durable Object Migrations
441
432
  */
442
433
  type DurableObjectMigration = {
443
- /** A unique identifier for this migration. */
444
- tag: string;
445
- /** The new Durable Objects being defined. */
446
- new_classes?: string[];
447
- /** The new SQLite Durable Objects being defined. */
448
- new_sqlite_classes?: string[];
449
- /** The Durable Objects being renamed. */
434
+ /** A unique identifier for this migration. */tag: string; /** The new Durable Objects being defined. */
435
+ new_classes?: string[]; /** The new SQLite Durable Objects being defined. */
436
+ new_sqlite_classes?: string[]; /** The Durable Objects being renamed. */
450
437
  renamed_classes?: {
451
438
  from: string;
452
439
  to: string;
453
- }[];
454
- /** The Durable Objects being removed. */
440
+ }[]; /** The Durable Objects being removed. */
455
441
  deleted_classes?: string[];
456
442
  };
457
443
  /**
@@ -460,309 +446,295 @@ type DurableObjectMigration = {
460
446
  */
461
447
  interface EnvironmentInheritable {
462
448
  /**
463
- * The name of your Worker. Alphanumeric + dashes only.
464
- *
465
- * @inheritable
466
- */
449
+ * The name of your Worker. Alphanumeric + dashes only.
450
+ *
451
+ * @inheritable
452
+ */
467
453
  name: string | undefined;
468
454
  /**
469
- * This is the ID of the account associated with your zone.
470
- * You might have more than one account, so make sure to use
471
- * the ID of the account associated with the zone/route you
472
- * provide, if you provide one. It can also be specified through
473
- * the CLOUDFLARE_ACCOUNT_ID environment variable.
474
- *
475
- * @inheritable
476
- */
455
+ * This is the ID of the account associated with your zone.
456
+ * You might have more than one account, so make sure to use
457
+ * the ID of the account associated with the zone/route you
458
+ * provide, if you provide one. It can also be specified through
459
+ * the CLOUDFLARE_ACCOUNT_ID environment variable.
460
+ *
461
+ * @inheritable
462
+ */
477
463
  account_id: string | undefined;
478
464
  /**
479
- * A date in the form yyyy-mm-dd, which will be used to determine
480
- * which version of the Workers runtime is used.
481
- *
482
- * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
483
- *
484
- * @inheritable
485
- */
465
+ * A date in the form yyyy-mm-dd, which will be used to determine
466
+ * which version of the Workers runtime is used.
467
+ *
468
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
469
+ *
470
+ * @inheritable
471
+ */
486
472
  compatibility_date: string | undefined;
487
473
  /**
488
- * A list of flags that enable features from upcoming features of
489
- * the Workers runtime, usually used together with compatibility_date.
490
- *
491
- * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
492
- *
493
- * @default []
494
- * @inheritable
495
- */
474
+ * A list of flags that enable features from upcoming features of
475
+ * the Workers runtime, usually used together with compatibility_date.
476
+ *
477
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
478
+ *
479
+ * @default []
480
+ * @inheritable
481
+ */
496
482
  compatibility_flags: string[];
497
483
  /**
498
- * The entrypoint/path to the JavaScript file that will be executed.
499
- *
500
- * @inheritable
501
- */
484
+ * The entrypoint/path to the JavaScript file that will be executed.
485
+ *
486
+ * @inheritable
487
+ */
502
488
  main: string | undefined;
503
489
  /**
504
- * If true then Wrangler will traverse the file tree below `base_dir`;
505
- * Any files that match `rules` will be included in the deployed Worker.
506
- * Defaults to true if `no_bundle` is true, otherwise false.
507
- *
508
- * @inheritable
509
- */
490
+ * If true then Wrangler will traverse the file tree below `base_dir`;
491
+ * Any files that match `rules` will be included in the deployed Worker.
492
+ * Defaults to true if `no_bundle` is true, otherwise false.
493
+ *
494
+ * @inheritable
495
+ */
510
496
  find_additional_modules: boolean | undefined;
511
497
  /**
512
- * Determines whether Wrangler will preserve bundled file names.
513
- * Defaults to false.
514
- * If left unset, files will be named using the pattern ${fileHash}-${basename},
515
- * for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
516
- *
517
- * @inheritable
518
- */
498
+ * Determines whether Wrangler will preserve bundled file names.
499
+ * Defaults to false.
500
+ * If left unset, files will be named using the pattern ${fileHash}-${basename},
501
+ * for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
502
+ *
503
+ * @inheritable
504
+ */
519
505
  preserve_file_names: boolean | undefined;
520
506
  /**
521
- * The directory in which module rules should be evaluated when including additional files into a Worker deployment.
522
- * This defaults to the directory containing the `main` entry point of the Worker if not specified.
523
- *
524
- * @inheritable
525
- */
507
+ * The directory in which module rules should be evaluated when including additional files into a Worker deployment.
508
+ * This defaults to the directory containing the `main` entry point of the Worker if not specified.
509
+ *
510
+ * @inheritable
511
+ */
526
512
  base_dir: string | undefined;
527
513
  /**
528
- * Whether we use <name>.<subdomain>.workers.dev to
529
- * test and deploy your Worker.
530
- *
531
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
532
- *
533
- * @default true
534
- * @breaking
535
- * @inheritable
536
- */
514
+ * Whether we use <name>.<subdomain>.workers.dev to
515
+ * test and deploy your Worker.
516
+ *
517
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
518
+ *
519
+ * @default true
520
+ * @breaking
521
+ * @inheritable
522
+ */
537
523
  workers_dev: boolean | undefined;
538
524
  /**
539
- * Whether we use <version>-<name>.<subdomain>.workers.dev to
540
- * serve Preview URLs for your Worker.
541
- *
542
- * @default true
543
- * @inheritable
544
- */
525
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
526
+ * serve Preview URLs for your Worker.
527
+ *
528
+ * @default true
529
+ * @inheritable
530
+ */
545
531
  preview_urls: boolean | undefined;
546
532
  /**
547
- * A list of routes that your Worker should be published to.
548
- * Only one of `routes` or `route` is required.
549
- *
550
- * Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
551
- *
552
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
553
- *
554
- * @inheritable
555
- */
533
+ * A list of routes that your Worker should be published to.
534
+ * Only one of `routes` or `route` is required.
535
+ *
536
+ * Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
537
+ *
538
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
539
+ *
540
+ * @inheritable
541
+ */
556
542
  routes: Route$1[] | undefined;
557
543
  /**
558
- * A route that your Worker should be published to. Literally
559
- * the same as routes, but only one.
560
- * Only one of `routes` or `route` is required.
561
- *
562
- * Only required when workers_dev is false, and there's no scheduled Worker
563
- *
564
- * @inheritable
565
- */
544
+ * A route that your Worker should be published to. Literally
545
+ * the same as routes, but only one.
546
+ * Only one of `routes` or `route` is required.
547
+ *
548
+ * Only required when workers_dev is false, and there's no scheduled Worker
549
+ *
550
+ * @inheritable
551
+ */
566
552
  route: Route$1 | undefined;
567
553
  /**
568
- * Path to a custom tsconfig
569
- *
570
- * @inheritable
571
- */
554
+ * Path to a custom tsconfig
555
+ *
556
+ * @inheritable
557
+ */
572
558
  tsconfig: string | undefined;
573
559
  /**
574
- * The function to use to replace jsx syntax.
575
- *
576
- * @default "React.createElement"
577
- * @inheritable
578
- */
560
+ * The function to use to replace jsx syntax.
561
+ *
562
+ * @default "React.createElement"
563
+ * @inheritable
564
+ */
579
565
  jsx_factory: string;
580
566
  /**
581
- * The function to use to replace jsx fragment syntax.
582
- *
583
- * @default "React.Fragment"
584
- * @inheritable
585
- */
567
+ * The function to use to replace jsx fragment syntax.
568
+ *
569
+ * @default "React.Fragment"
570
+ * @inheritable
571
+ */
586
572
  jsx_fragment: string;
587
573
  /**
588
- * A list of migrations that should be uploaded with your Worker.
589
- *
590
- * These define changes in your Durable Object declarations.
591
- *
592
- * More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations
593
- *
594
- * @default []
595
- * @inheritable
596
- */
574
+ * A list of migrations that should be uploaded with your Worker.
575
+ *
576
+ * These define changes in your Durable Object declarations.
577
+ *
578
+ * More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations
579
+ *
580
+ * @default []
581
+ * @inheritable
582
+ */
597
583
  migrations: DurableObjectMigration[];
598
584
  /**
599
- * "Cron" definitions to trigger a Worker's "scheduled" function.
600
- *
601
- * Lets you call Workers periodically, much like a cron job.
602
- *
603
- * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
604
- *
605
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
606
- *
607
- * @default {crons: undefined}
608
- * @inheritable
609
- */
585
+ * "Cron" definitions to trigger a Worker's "scheduled" function.
586
+ *
587
+ * Lets you call Workers periodically, much like a cron job.
588
+ *
589
+ * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
590
+ *
591
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
592
+ *
593
+ * @default {crons: undefined}
594
+ * @inheritable
595
+ */
610
596
  triggers: {
611
597
  crons: string[] | undefined;
612
598
  };
613
599
  /**
614
- * Specify limits for runtime behavior.
615
- * Only supported for the "standard" Usage Model
616
- *
617
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
618
- *
619
- * @inheritable
620
- */
600
+ * Specify limits for runtime behavior.
601
+ * Only supported for the "standard" Usage Model
602
+ *
603
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
604
+ *
605
+ * @inheritable
606
+ */
621
607
  limits: UserLimits | undefined;
622
608
  /**
623
- * An ordered list of rules that define which modules to import,
624
- * and what type to import them as. You will need to specify rules
625
- * to use Text, Data, and CompiledWasm modules, or when you wish to
626
- * have a .js file be treated as an ESModule instead of CommonJS.
627
- *
628
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
629
- *
630
- * @inheritable
631
- */
609
+ * An ordered list of rules that define which modules to import,
610
+ * and what type to import them as. You will need to specify rules
611
+ * to use Text, Data, and CompiledWasm modules, or when you wish to
612
+ * have a .js file be treated as an ESModule instead of CommonJS.
613
+ *
614
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
615
+ *
616
+ * @inheritable
617
+ */
632
618
  rules: Rule[];
633
619
  /**
634
- * Configures a custom build step to be run by Wrangler when building your Worker.
635
- *
636
- * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
637
- * for more details.
638
- *
639
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
640
- *
641
- * @default {watch_dir:"./src"}
642
- */
620
+ * Configures a custom build step to be run by Wrangler when building your Worker.
621
+ *
622
+ * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
623
+ * for more details.
624
+ *
625
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
626
+ *
627
+ * @default {watch_dir:"./src"}
628
+ */
643
629
  build: {
644
- /** The command used to build your Worker. On Linux and macOS, the command is executed in the `sh` shell and the `cmd` shell for Windows. The `&&` and `||` shell operators may be used. */
645
- command?: string;
646
- /** The directory in which the command is executed. */
647
- cwd?: string;
648
- /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
630
+ /** The command used to build your Worker. On Linux and macOS, the command is executed in the `sh` shell and the `cmd` shell for Windows. The `&&` and `||` shell operators may be used. */command?: string; /** The directory in which the command is executed. */
631
+ cwd?: string; /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
649
632
  watch_dir?: string | string[];
650
633
  };
651
634
  /**
652
- * Skip internal build steps and directly deploy script
653
- * @inheritable
654
- */
635
+ * Skip internal build steps and directly deploy script
636
+ * @inheritable
637
+ */
655
638
  no_bundle: boolean | undefined;
656
639
  /**
657
- * Minify the script before uploading.
658
- * @inheritable
659
- */
640
+ * Minify the script before uploading.
641
+ * @inheritable
642
+ */
660
643
  minify: boolean | undefined;
661
644
  /**
662
- * Set the `name` property to the original name for functions and classes renamed during minification.
663
- *
664
- * See https://esbuild.github.io/api/#keep-names
665
- *
666
- * @default true
667
- * @inheritable
668
- */
645
+ * Set the `name` property to the original name for functions and classes renamed during minification.
646
+ *
647
+ * See https://esbuild.github.io/api/#keep-names
648
+ *
649
+ * @default true
650
+ * @inheritable
651
+ */
669
652
  keep_names: boolean | undefined;
670
653
  /**
671
- * Designates this Worker as an internal-only "first-party" Worker.
672
- *
673
- * @inheritable
674
- */
654
+ * Designates this Worker as an internal-only "first-party" Worker.
655
+ *
656
+ * @inheritable
657
+ */
675
658
  first_party_worker: boolean | undefined;
676
659
  /**
677
- * List of bindings that you will send to logfwdr
678
- *
679
- * @default {bindings:[]}
680
- * @inheritable
681
- */
660
+ * List of bindings that you will send to logfwdr
661
+ *
662
+ * @default {bindings:[]}
663
+ * @inheritable
664
+ */
682
665
  logfwdr: {
683
666
  bindings: {
684
- /** The binding name used to refer to logfwdr */
685
- name: string;
686
- /** The destination for this logged message */
667
+ /** The binding name used to refer to logfwdr */name: string; /** The destination for this logged message */
687
668
  destination: string;
688
669
  }[];
689
670
  };
690
671
  /**
691
- * Send Trace Events from this Worker to Workers Logpush.
692
- *
693
- * This will not configure a corresponding Logpush job automatically.
694
- *
695
- * For more information about Workers Logpush, see:
696
- * https://blog.cloudflare.com/logpush-for-workers/
697
- *
698
- * @inheritable
699
- */
672
+ * Send Trace Events from this Worker to Workers Logpush.
673
+ *
674
+ * This will not configure a corresponding Logpush job automatically.
675
+ *
676
+ * For more information about Workers Logpush, see:
677
+ * https://blog.cloudflare.com/logpush-for-workers/
678
+ *
679
+ * @inheritable
680
+ */
700
681
  logpush: boolean | undefined;
701
682
  /**
702
- * Include source maps when uploading this worker.
703
- *
704
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
705
- *
706
- * @inheritable
707
- */
683
+ * Include source maps when uploading this worker.
684
+ *
685
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
686
+ *
687
+ * @inheritable
688
+ */
708
689
  upload_source_maps: boolean | undefined;
709
690
  /**
710
- * Specify how the Worker should be located to minimize round-trip time.
711
- *
712
- * More details: https://developers.cloudflare.com/workers/platform/smart-placement/
713
- *
714
- * @inheritable
715
- */
691
+ * Specify how the Worker should be located to minimize round-trip time.
692
+ *
693
+ * More details: https://developers.cloudflare.com/workers/platform/smart-placement/
694
+ *
695
+ * @inheritable
696
+ */
716
697
  placement: {
717
698
  mode: "off" | "smart";
718
699
  hint?: string;
719
700
  } | undefined;
720
701
  /**
721
- * Specify the directory of static assets to deploy/serve
722
- *
723
- * More details at https://developers.cloudflare.com/workers/frameworks/
724
- *
725
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
726
- *
727
- * @inheritable
728
- */
702
+ * Specify the directory of static assets to deploy/serve
703
+ *
704
+ * More details at https://developers.cloudflare.com/workers/frameworks/
705
+ *
706
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
707
+ *
708
+ * @inheritable
709
+ */
729
710
  assets: Assets | undefined;
730
711
  /**
731
- * Specify the observability behavior of the Worker.
732
- *
733
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
734
- *
735
- * @inheritable
736
- */
712
+ * Specify the observability behavior of the Worker.
713
+ *
714
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
715
+ *
716
+ * @inheritable
717
+ */
737
718
  observability: Observability | undefined;
738
719
  /**
739
- * Specify the compliance region mode of the Worker.
740
- *
741
- * Although if the user does not specify a compliance region, the default is `public`,
742
- * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.
743
- */
720
+ * Specify the compliance region mode of the Worker.
721
+ *
722
+ * Although if the user does not specify a compliance region, the default is `public`,
723
+ * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.
724
+ */
744
725
  compliance_region: "public" | "fedramp_high" | undefined;
745
726
  }
746
727
  type DurableObjectBindings = {
747
- /** The name of the binding used to refer to the Durable Object */
748
- name: string;
749
- /** The exported class name of the Durable Object */
750
- class_name: string;
751
- /** The script where the Durable Object is defined (if it's external to this Worker) */
752
- script_name?: string;
753
- /** The service environment of the script_name to bind to */
728
+ /** The name of the binding used to refer to the Durable Object */name: string; /** The exported class name of the Durable Object */
729
+ class_name: string; /** The script where the Durable Object is defined (if it's external to this Worker) */
730
+ script_name?: string; /** The service environment of the script_name to bind to */
754
731
  environment?: string;
755
732
  }[];
756
733
  type WorkflowBinding = {
757
- /** The name of the binding used to refer to the Workflow */
758
- binding: string;
759
- /** The name of the Workflow */
760
- name: string;
761
- /** The exported class name of the Workflow */
762
- class_name: string;
763
- /** The script where the Workflow is defined (if it's external to this Worker) */
764
- script_name?: string;
765
- /** Whether the Workflow should be remote or not (only available under `--x-remote-bindings`) */
734
+ /** The name of the binding used to refer to the Workflow */binding: string; /** The name of the Workflow */
735
+ name: string; /** The exported class name of the Workflow */
736
+ class_name: string; /** The script where the Workflow is defined (if it's external to this Worker) */
737
+ script_name?: string; /** Whether the Workflow should be remote or not (only available under `--x-remote-bindings`) */
766
738
  experimental_remote?: boolean;
767
739
  };
768
740
  /**
@@ -774,380 +746,328 @@ type WorkflowBinding = {
774
746
  */
775
747
  interface EnvironmentNonInheritable {
776
748
  /**
777
- * A map of values to substitute when deploying your Worker.
778
- *
779
- * NOTE: This field is not automatically inherited from the top level environment,
780
- * and so must be specified in every named environment.
781
- *
782
- * @default {}
783
- * @nonInheritable
784
- */
749
+ * A map of values to substitute when deploying your Worker.
750
+ *
751
+ * NOTE: This field is not automatically inherited from the top level environment,
752
+ * and so must be specified in every named environment.
753
+ *
754
+ * @default {}
755
+ * @nonInheritable
756
+ */
785
757
  define: Record<string, string>;
786
758
  /**
787
- * A map of environment variables to set when deploying your Worker.
788
- *
789
- * NOTE: This field is not automatically inherited from the top level environment,
790
- * and so must be specified in every named environment.
791
- *
792
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
793
- *
794
- * @default {}
795
- * @nonInheritable
796
- */
759
+ * A map of environment variables to set when deploying your Worker.
760
+ *
761
+ * NOTE: This field is not automatically inherited from the top level environment,
762
+ * and so must be specified in every named environment.
763
+ *
764
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
765
+ *
766
+ * @default {}
767
+ * @nonInheritable
768
+ */
797
769
  vars: Record<string, unknown>;
798
770
  /**
799
- * A list of durable objects that your Worker should be bound to.
800
- *
801
- * For more information about Durable Objects, see the documentation at
802
- * https://developers.cloudflare.com/workers/learning/using-durable-objects
803
- *
804
- * NOTE: This field is not automatically inherited from the top level environment,
805
- * and so must be specified in every named environment.
806
- *
807
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
808
- *
809
- * @default {bindings:[]}
810
- * @nonInheritable
811
- */
771
+ * A list of durable objects that your Worker should be bound to.
772
+ *
773
+ * For more information about Durable Objects, see the documentation at
774
+ * https://developers.cloudflare.com/workers/learning/using-durable-objects
775
+ *
776
+ * NOTE: This field is not automatically inherited from the top level environment,
777
+ * and so must be specified in every named environment.
778
+ *
779
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
780
+ *
781
+ * @default {bindings:[]}
782
+ * @nonInheritable
783
+ */
812
784
  durable_objects: {
813
785
  bindings: DurableObjectBindings;
814
786
  };
815
787
  /**
816
- * A list of workflows that your Worker should be bound to.
817
- *
818
- * NOTE: This field is not automatically inherited from the top level environment,
819
- * and so must be specified in every named environment.
820
- *
821
- * @default []
822
- * @nonInheritable
823
- */
788
+ * A list of workflows that your Worker should be bound to.
789
+ *
790
+ * NOTE: This field is not automatically inherited from the top level environment,
791
+ * and so must be specified in every named environment.
792
+ *
793
+ * @default []
794
+ * @nonInheritable
795
+ */
824
796
  workflows: WorkflowBinding[];
825
797
  /**
826
- * Cloudchamber configuration
827
- *
828
- * NOTE: This field is not automatically inherited from the top level environment,
829
- * and so must be specified in every named environment.
830
- *
831
- * @default {}
832
- * @nonInheritable
833
- */
798
+ * Cloudchamber configuration
799
+ *
800
+ * NOTE: This field is not automatically inherited from the top level environment,
801
+ * and so must be specified in every named environment.
802
+ *
803
+ * @default {}
804
+ * @nonInheritable
805
+ */
834
806
  cloudchamber: CloudchamberConfig;
835
807
  /**
836
- * Container related configuration
837
- *
838
- * NOTE: This field is not automatically inherited from the top level environment,
839
- * and so must be specified in every named environment.
840
- *
841
- * @default []
842
- * @nonInheritable
843
- */
808
+ * Container related configuration
809
+ *
810
+ * NOTE: This field is not automatically inherited from the top level environment,
811
+ * and so must be specified in every named environment.
812
+ *
813
+ * @default []
814
+ * @nonInheritable
815
+ */
844
816
  containers?: ContainerApp[];
845
817
  /**
846
- * These specify any Workers KV Namespaces you want to
847
- * access from inside your Worker.
848
- *
849
- * To learn more about KV Namespaces,
850
- * see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works
851
- *
852
- * NOTE: This field is not automatically inherited from the top level environment,
853
- * and so must be specified in every named environment.
854
- *
855
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
856
- *
857
- * @default []
858
- * @nonInheritable
859
- */
818
+ * These specify any Workers KV Namespaces you want to
819
+ * access from inside your Worker.
820
+ *
821
+ * To learn more about KV Namespaces,
822
+ * see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works
823
+ *
824
+ * NOTE: This field is not automatically inherited from the top level environment,
825
+ * and so must be specified in every named environment.
826
+ *
827
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
828
+ *
829
+ * @default []
830
+ * @nonInheritable
831
+ */
860
832
  kv_namespaces: {
861
- /** The binding name used to refer to the KV Namespace */
862
- binding: string;
863
- /** The ID of the KV namespace */
864
- id?: string;
865
- /** The ID of the KV namespace used during `wrangler dev` */
866
- preview_id?: string;
867
- /** Whether the KV namespace should be remote or not (only available under `--x-remote-bindings`) */
833
+ /** The binding name used to refer to the KV Namespace */binding: string; /** The ID of the KV namespace */
834
+ id?: string; /** The ID of the KV namespace used during `wrangler dev` */
835
+ preview_id?: string; /** Whether the KV namespace should be remote or not (only available under `--x-remote-bindings`) */
868
836
  experimental_remote?: boolean;
869
837
  }[];
870
838
  /**
871
- * These specify bindings to send email from inside your Worker.
872
- *
873
- * NOTE: This field is not automatically inherited from the top level environment,
874
- * and so must be specified in every named environment.
875
- *
876
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
877
- *
878
- * @default []
879
- * @nonInheritable
880
- */
839
+ * These specify bindings to send email from inside your Worker.
840
+ *
841
+ * NOTE: This field is not automatically inherited from the top level environment,
842
+ * and so must be specified in every named environment.
843
+ *
844
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
845
+ *
846
+ * @default []
847
+ * @nonInheritable
848
+ */
881
849
  send_email: {
882
- /** The binding name used to refer to the this binding */
883
- name: string;
884
- /** If this binding should be restricted to a specific verified address */
885
- destination_address?: string;
886
- /** If this binding should be restricted to a set of verified addresses */
850
+ /** The binding name used to refer to the this binding */name: string; /** If this binding should be restricted to a specific verified address */
851
+ destination_address?: string; /** If this binding should be restricted to a set of verified addresses */
887
852
  allowed_destination_addresses?: string[];
888
853
  }[];
889
854
  /**
890
- * Specifies Queues that are bound to this Worker environment.
891
- *
892
- * NOTE: This field is not automatically inherited from the top level environment,
893
- * and so must be specified in every named environment.
894
- *
895
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
896
- *
897
- * @default {consumers:[],producers:[]}
898
- * @nonInheritable
899
- */
855
+ * Specifies Queues that are bound to this Worker environment.
856
+ *
857
+ * NOTE: This field is not automatically inherited from the top level environment,
858
+ * and so must be specified in every named environment.
859
+ *
860
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
861
+ *
862
+ * @default {consumers:[],producers:[]}
863
+ * @nonInheritable
864
+ */
900
865
  queues: {
901
- /** Producer bindings */
902
- producers?: {
903
- /** The binding name used to refer to the Queue in the Worker. */
904
- binding: string;
905
- /** The name of this Queue. */
906
- queue: string;
907
- /** The number of seconds to wait before delivering a message */
908
- delivery_delay?: number;
909
- /** Whether the Queue producer should be remote or not (only available under `--x-remote-bindings`) */
866
+ /** Producer bindings */producers?: {
867
+ /** The binding name used to refer to the Queue in the Worker. */binding: string; /** The name of this Queue. */
868
+ queue: string; /** The number of seconds to wait before delivering a message */
869
+ delivery_delay?: number; /** Whether the Queue producer should be remote or not (only available under `--x-remote-bindings`) */
910
870
  experimental_remote?: boolean;
911
- }[];
912
- /** Consumer configuration */
871
+ }[]; /** Consumer configuration */
913
872
  consumers?: {
914
- /** The name of the queue from which this consumer should consume. */
915
- queue: string;
916
- /** The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker. */
917
- type?: string;
918
- /** The maximum number of messages per batch */
919
- max_batch_size?: number;
920
- /** The maximum number of seconds to wait to fill a batch with messages. */
921
- max_batch_timeout?: number;
922
- /** The maximum number of retries for each message. */
923
- max_retries?: number;
924
- /** The queue to send messages that failed to be consumed. */
925
- dead_letter_queue?: string;
926
- /** The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog. */
927
- max_concurrency?: number | null;
928
- /** The number of milliseconds to wait for pulled messages to become visible again */
929
- visibility_timeout_ms?: number;
930
- /** The number of seconds to wait before retrying a message */
873
+ /** The name of the queue from which this consumer should consume. */queue: string; /** The consumer type, e.g., worker, http-pull, r2-bucket, etc. Default is worker. */
874
+ type?: string; /** The maximum number of messages per batch */
875
+ max_batch_size?: number; /** The maximum number of seconds to wait to fill a batch with messages. */
876
+ max_batch_timeout?: number; /** The maximum number of retries for each message. */
877
+ max_retries?: number; /** The queue to send messages that failed to be consumed. */
878
+ dead_letter_queue?: string; /** The maximum number of concurrent consumer Worker invocations. Leaving this unset will allow your consumer to scale to the maximum concurrency needed to keep up with the message backlog. */
879
+ max_concurrency?: number | null; /** The number of milliseconds to wait for pulled messages to become visible again */
880
+ visibility_timeout_ms?: number; /** The number of seconds to wait before retrying a message */
931
881
  retry_delay?: number;
932
882
  }[];
933
883
  };
934
884
  /**
935
- * Specifies R2 buckets that are bound to this Worker environment.
936
- *
937
- * NOTE: This field is not automatically inherited from the top level environment,
938
- * and so must be specified in every named environment.
939
- *
940
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
941
- *
942
- * @default []
943
- * @nonInheritable
944
- */
885
+ * Specifies R2 buckets that are bound to this Worker environment.
886
+ *
887
+ * NOTE: This field is not automatically inherited from the top level environment,
888
+ * and so must be specified in every named environment.
889
+ *
890
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
891
+ *
892
+ * @default []
893
+ * @nonInheritable
894
+ */
945
895
  r2_buckets: {
946
- /** The binding name used to refer to the R2 bucket in the Worker. */
947
- binding: string;
948
- /** The name of this R2 bucket at the edge. */
949
- bucket_name?: string;
950
- /** The preview name of this R2 bucket at the edge. */
951
- preview_bucket_name?: string;
952
- /** The jurisdiction that the bucket exists in. Default if not present. */
953
- jurisdiction?: string;
954
- /** Whether the R2 bucket should be remote or not (only available under `--x-remote-bindings`) */
896
+ /** The binding name used to refer to the R2 bucket in the Worker. */binding: string; /** The name of this R2 bucket at the edge. */
897
+ bucket_name?: string; /** The preview name of this R2 bucket at the edge. */
898
+ preview_bucket_name?: string; /** The jurisdiction that the bucket exists in. Default if not present. */
899
+ jurisdiction?: string; /** Whether the R2 bucket should be remote or not (only available under `--x-remote-bindings`) */
955
900
  experimental_remote?: boolean;
956
901
  }[];
957
902
  /**
958
- * Specifies D1 databases that are bound to this Worker environment.
959
- *
960
- * NOTE: This field is not automatically inherited from the top level environment,
961
- * and so must be specified in every named environment.
962
- *
963
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
964
- *
965
- * @default []
966
- * @nonInheritable
967
- */
903
+ * Specifies D1 databases that are bound to this Worker environment.
904
+ *
905
+ * NOTE: This field is not automatically inherited from the top level environment,
906
+ * and so must be specified in every named environment.
907
+ *
908
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
909
+ *
910
+ * @default []
911
+ * @nonInheritable
912
+ */
968
913
  d1_databases: {
969
- /** The binding name used to refer to the D1 database in the Worker. */
970
- binding: string;
971
- /** The name of this D1 database. */
972
- database_name?: string;
973
- /** The UUID of this D1 database (not required). */
974
- database_id?: string;
975
- /** The UUID of this D1 database for Wrangler Dev (if specified). */
976
- preview_database_id?: string;
977
- /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
978
- migrations_table?: string;
979
- /** The path to the directory of migrations for this D1 database (defaults to './migrations'). */
980
- migrations_dir?: string;
981
- /** Internal use only. */
982
- database_internal_env?: string;
983
- /** Whether the D1 database should be remote or not (only available under `--x-remote-bindings`) */
914
+ /** The binding name used to refer to the D1 database in the Worker. */binding: string; /** The name of this D1 database. */
915
+ database_name?: string; /** The UUID of this D1 database (not required). */
916
+ database_id?: string; /** The UUID of this D1 database for Wrangler Dev (if specified). */
917
+ preview_database_id?: string; /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
918
+ migrations_table?: string; /** The path to the directory of migrations for this D1 database (defaults to './migrations'). */
919
+ migrations_dir?: string; /** Internal use only. */
920
+ database_internal_env?: string; /** Whether the D1 database should be remote or not (only available under `--x-remote-bindings`) */
984
921
  experimental_remote?: boolean;
985
922
  }[];
986
923
  /**
987
- * Specifies Vectorize indexes that are bound to this Worker environment.
988
- *
989
- * NOTE: This field is not automatically inherited from the top level environment,
990
- * and so must be specified in every named environment.
991
- *
992
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
993
- *
994
- * @default []
995
- * @nonInheritable
996
- */
924
+ * Specifies Vectorize indexes that are bound to this Worker environment.
925
+ *
926
+ * NOTE: This field is not automatically inherited from the top level environment,
927
+ * and so must be specified in every named environment.
928
+ *
929
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
930
+ *
931
+ * @default []
932
+ * @nonInheritable
933
+ */
997
934
  vectorize: {
998
- /** The binding name used to refer to the Vectorize index in the Worker. */
999
- binding: string;
1000
- /** The name of the index. */
1001
- index_name: string;
1002
- /** Whether the Vectorize index should be remote or not (only available under `--x-remote-bindings`) */
935
+ /** The binding name used to refer to the Vectorize index in the Worker. */binding: string; /** The name of the index. */
936
+ index_name: string; /** Whether the Vectorize index should be remote or not (only available under `--x-remote-bindings`) */
1003
937
  experimental_remote?: boolean;
1004
938
  }[];
1005
939
  /**
1006
- * Specifies Hyperdrive configs that are bound to this Worker environment.
1007
- *
1008
- * NOTE: This field is not automatically inherited from the top level environment,
1009
- * and so must be specified in every named environment.
1010
- *
1011
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
1012
- *
1013
- * @default []
1014
- * @nonInheritable
1015
- */
940
+ * Specifies Hyperdrive configs that are bound to this Worker environment.
941
+ *
942
+ * NOTE: This field is not automatically inherited from the top level environment,
943
+ * and so must be specified in every named environment.
944
+ *
945
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
946
+ *
947
+ * @default []
948
+ * @nonInheritable
949
+ */
1016
950
  hyperdrive: {
1017
- /** The binding name used to refer to the project in the Worker. */
1018
- binding: string;
1019
- /** The id of the database. */
1020
- id: string;
1021
- /** The local database connection string for `wrangler dev` */
951
+ /** The binding name used to refer to the project in the Worker. */binding: string; /** The id of the database. */
952
+ id: string; /** The local database connection string for `wrangler dev` */
1022
953
  localConnectionString?: string;
1023
954
  }[];
1024
955
  /**
1025
- * Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
1026
- *
1027
- * NOTE: This field is not automatically inherited from the top level environment,
1028
- * and so must be specified in every named environment.
1029
- *
1030
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
1031
- *
1032
- * @default []
1033
- * @nonInheritable
1034
- */
956
+ * Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
957
+ *
958
+ * NOTE: This field is not automatically inherited from the top level environment,
959
+ * and so must be specified in every named environment.
960
+ *
961
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
962
+ *
963
+ * @default []
964
+ * @nonInheritable
965
+ */
1035
966
  services: {
1036
- /** The binding name used to refer to the bound service. */
1037
- binding: string;
1038
- /** The name of the service. */
1039
- service: string;
1040
- /** The environment of the service (e.g. production, staging, etc). */
1041
- environment?: string;
1042
- /** Optionally, the entrypoint (named export) of the service to bind to. */
1043
- entrypoint?: string;
1044
- /** Optional properties that will be made available to the service via ctx.props. */
1045
- props?: Record<string, unknown>;
1046
- /** Whether the service binding should be remote or not (only available under `--x-remote-bindings`) */
967
+ /** The binding name used to refer to the bound service. */binding: string; /** The name of the service. */
968
+ service: string; /** The environment of the service (e.g. production, staging, etc). */
969
+ environment?: string; /** Optionally, the entrypoint (named export) of the service to bind to. */
970
+ entrypoint?: string; /** Optional properties that will be made available to the service via ctx.props. */
971
+ props?: Record<string, unknown>; /** Whether the service binding should be remote or not (only available under `--x-remote-bindings`) */
1047
972
  experimental_remote?: boolean;
1048
973
  }[] | undefined;
1049
974
  /**
1050
- * Specifies analytics engine datasets that are bound to this Worker environment.
1051
- *
1052
- * NOTE: This field is not automatically inherited from the top level environment,
1053
- * and so must be specified in every named environment.
1054
- *
1055
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
1056
- *
1057
- * @default []
1058
- * @nonInheritable
1059
- */
975
+ * Specifies analytics engine datasets that are bound to this Worker environment.
976
+ *
977
+ * NOTE: This field is not automatically inherited from the top level environment,
978
+ * and so must be specified in every named environment.
979
+ *
980
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
981
+ *
982
+ * @default []
983
+ * @nonInheritable
984
+ */
1060
985
  analytics_engine_datasets: {
1061
- /** The binding name used to refer to the dataset in the Worker. */
1062
- binding: string;
1063
- /** The name of this dataset to write to. */
986
+ /** The binding name used to refer to the dataset in the Worker. */binding: string; /** The name of this dataset to write to. */
1064
987
  dataset?: string;
1065
988
  }[];
1066
989
  /**
1067
- * A browser that will be usable from the Worker.
1068
- *
1069
- * NOTE: This field is not automatically inherited from the top level environment,
1070
- * and so must be specified in every named environment.
1071
- *
1072
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
1073
- *
1074
- * @default {}
1075
- * @nonInheritable
1076
- */
990
+ * A browser that will be usable from the Worker.
991
+ *
992
+ * NOTE: This field is not automatically inherited from the top level environment,
993
+ * and so must be specified in every named environment.
994
+ *
995
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
996
+ *
997
+ * @default {}
998
+ * @nonInheritable
999
+ */
1077
1000
  browser: {
1078
- binding: string;
1079
- /** Whether the Browser binding should be remote or not (only available under `--x-remote-bindings`) */
1001
+ binding: string; /** Whether the Browser binding should be remote or not (only available under `--x-remote-bindings`) */
1080
1002
  experimental_remote?: boolean;
1081
1003
  } | undefined;
1082
1004
  /**
1083
- * Binding to the AI project.
1084
- *
1085
- * NOTE: This field is not automatically inherited from the top level environment,
1086
- * and so must be specified in every named environment.
1087
- *
1088
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
1089
- *
1090
- * @default {}
1091
- * @nonInheritable
1092
- */
1005
+ * Binding to the AI project.
1006
+ *
1007
+ * NOTE: This field is not automatically inherited from the top level environment,
1008
+ * and so must be specified in every named environment.
1009
+ *
1010
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
1011
+ *
1012
+ * @default {}
1013
+ * @nonInheritable
1014
+ */
1093
1015
  ai: {
1094
1016
  binding: string;
1095
- staging?: boolean;
1096
- /** Whether the AI binding should be remote or not (only available under `--x-remote-bindings`) */
1017
+ staging?: boolean; /** Whether the AI binding should be remote or not (only available under `--x-remote-bindings`) */
1097
1018
  experimental_remote?: boolean;
1098
1019
  } | undefined;
1099
1020
  /**
1100
- * Binding to Cloudflare Images
1101
- *
1102
- * NOTE: This field is not automatically inherited from the top level environment,
1103
- * and so must be specified in every named environment.
1104
- *
1105
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
1106
- *
1107
- * @default {}
1108
- * @nonInheritable
1109
- */
1021
+ * Binding to Cloudflare Images
1022
+ *
1023
+ * NOTE: This field is not automatically inherited from the top level environment,
1024
+ * and so must be specified in every named environment.
1025
+ *
1026
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
1027
+ *
1028
+ * @default {}
1029
+ * @nonInheritable
1030
+ */
1110
1031
  images: {
1111
- binding: string;
1112
- /** Whether the Images binding should be remote or not (only available under `--x-remote-bindings`) */
1032
+ binding: string; /** Whether the Images binding should be remote or not (only available under `--x-remote-bindings`) */
1113
1033
  experimental_remote?: boolean;
1114
1034
  } | undefined;
1115
1035
  /**
1116
- * Binding to the Worker Version's metadata
1117
- */
1036
+ * Binding to the Worker Version's metadata
1037
+ */
1118
1038
  version_metadata: {
1119
1039
  binding: string;
1120
1040
  } | undefined;
1121
1041
  /**
1122
- * "Unsafe" tables for features that aren't directly supported by wrangler.
1123
- *
1124
- * NOTE: This field is not automatically inherited from the top level environment,
1125
- * and so must be specified in every named environment.
1126
- *
1127
- * @default {}
1128
- * @nonInheritable
1129
- */
1042
+ * "Unsafe" tables for features that aren't directly supported by wrangler.
1043
+ *
1044
+ * NOTE: This field is not automatically inherited from the top level environment,
1045
+ * and so must be specified in every named environment.
1046
+ *
1047
+ * @default {}
1048
+ * @nonInheritable
1049
+ */
1130
1050
  unsafe: {
1131
1051
  /**
1132
- * A set of bindings that should be put into a Worker's upload metadata without changes. These
1133
- * can be used to implement bindings for features that haven't released and aren't supported
1134
- * directly by wrangler or miniflare.
1135
- */
1052
+ * A set of bindings that should be put into a Worker's upload metadata without changes. These
1053
+ * can be used to implement bindings for features that haven't released and aren't supported
1054
+ * directly by wrangler or miniflare.
1055
+ */
1136
1056
  bindings?: {
1137
1057
  name: string;
1138
1058
  type: string;
1139
1059
  [key: string]: unknown;
1140
1060
  }[];
1141
1061
  /**
1142
- * Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified
1143
- * here will always be applied to metadata last, so can add new or override existing fields.
1144
- */
1062
+ * Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified
1063
+ * here will always be applied to metadata last, so can add new or override existing fields.
1064
+ */
1145
1065
  metadata?: {
1146
1066
  [key: string]: unknown;
1147
1067
  };
1148
1068
  /**
1149
- * Used for internal capnp uploads for the Workers runtime
1150
- */
1069
+ * Used for internal capnp uploads for the Workers runtime
1070
+ */
1151
1071
  capnp?: {
1152
1072
  base_path: string;
1153
1073
  source_schemas: string[];
@@ -1159,100 +1079,86 @@ interface EnvironmentNonInheritable {
1159
1079
  };
1160
1080
  };
1161
1081
  /**
1162
- * Specifies a list of mTLS certificates that are bound to this Worker environment.
1163
- *
1164
- * NOTE: This field is not automatically inherited from the top level environment,
1165
- * and so must be specified in every named environment.
1166
- *
1167
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
1168
- *
1169
- * @default []
1170
- * @nonInheritable
1171
- */
1082
+ * Specifies a list of mTLS certificates that are bound to this Worker environment.
1083
+ *
1084
+ * NOTE: This field is not automatically inherited from the top level environment,
1085
+ * and so must be specified in every named environment.
1086
+ *
1087
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
1088
+ *
1089
+ * @default []
1090
+ * @nonInheritable
1091
+ */
1172
1092
  mtls_certificates: {
1173
- /** The binding name used to refer to the certificate in the Worker */
1174
- binding: string;
1175
- /** The uuid of the uploaded mTLS certificate */
1176
- certificate_id: string;
1177
- /** Whether the mtls fetcher should be remote or not (only available under `--x-remote-bindings`) */
1093
+ /** The binding name used to refer to the certificate in the Worker */binding: string; /** The uuid of the uploaded mTLS certificate */
1094
+ certificate_id: string; /** Whether the mtls fetcher should be remote or not (only available under `--x-remote-bindings`) */
1178
1095
  experimental_remote?: boolean;
1179
1096
  }[];
1180
1097
  /**
1181
- * Specifies a list of Tail Workers that are bound to this Worker environment
1182
- *
1183
- * NOTE: This field is not automatically inherited from the top level environment,
1184
- * and so must be specified in every named environment.
1185
- *
1186
- * @default []
1187
- * @nonInheritable
1188
- */
1098
+ * Specifies a list of Tail Workers that are bound to this Worker environment
1099
+ *
1100
+ * NOTE: This field is not automatically inherited from the top level environment,
1101
+ * and so must be specified in every named environment.
1102
+ *
1103
+ * @default []
1104
+ * @nonInheritable
1105
+ */
1189
1106
  tail_consumers?: TailConsumer[];
1190
1107
  /**
1191
- * Specifies namespace bindings that are bound to this Worker environment.
1192
- *
1193
- * NOTE: This field is not automatically inherited from the top level environment,
1194
- * and so must be specified in every named environment.
1195
- *
1196
- * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
1197
- *
1198
- * @default []
1199
- * @nonInheritable
1200
- */
1108
+ * Specifies namespace bindings that are bound to this Worker environment.
1109
+ *
1110
+ * NOTE: This field is not automatically inherited from the top level environment,
1111
+ * and so must be specified in every named environment.
1112
+ *
1113
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
1114
+ *
1115
+ * @default []
1116
+ * @nonInheritable
1117
+ */
1201
1118
  dispatch_namespaces: {
1202
- /** The binding name used to refer to the bound service. */
1203
- binding: string;
1204
- /** The namespace to bind to. */
1205
- namespace: string;
1206
- /** Details about the outbound Worker which will handle outbound requests from your namespace */
1207
- outbound?: DispatchNamespaceOutbound;
1208
- /** Whether the Dispatch Namespace should be remote or not (only available under `--x-remote-bindings`) */
1119
+ /** The binding name used to refer to the bound service. */binding: string; /** The namespace to bind to. */
1120
+ namespace: string; /** Details about the outbound Worker which will handle outbound requests from your namespace */
1121
+ outbound?: DispatchNamespaceOutbound; /** Whether the Dispatch Namespace should be remote or not (only available under `--x-remote-bindings`) */
1209
1122
  experimental_remote?: boolean;
1210
1123
  }[];
1211
1124
  /**
1212
- * Specifies list of Pipelines bound to this Worker environment
1213
- *
1214
- * NOTE: This field is not automatically inherited from the top level environment,
1215
- * and so must be specified in every named environment.
1216
- *
1217
- * @default []
1218
- * @nonInheritable
1219
- */
1125
+ * Specifies list of Pipelines bound to this Worker environment
1126
+ *
1127
+ * NOTE: This field is not automatically inherited from the top level environment,
1128
+ * and so must be specified in every named environment.
1129
+ *
1130
+ * @default []
1131
+ * @nonInheritable
1132
+ */
1220
1133
  pipelines: {
1221
- /** The binding name used to refer to the bound service. */
1222
- binding: string;
1223
- /** Name of the Pipeline to bind */
1134
+ /** The binding name used to refer to the bound service. */binding: string; /** Name of the Pipeline to bind */
1224
1135
  pipeline: string;
1225
1136
  }[];
1226
1137
  /**
1227
- * Specifies Secret Store bindings that are bound to this Worker environment.
1228
- *
1229
- * NOTE: This field is not automatically inherited from the top level environment,
1230
- * and so must be specified in every named environment.
1231
- *
1232
- * @default []
1233
- * @nonInheritable
1234
- */
1138
+ * Specifies Secret Store bindings that are bound to this Worker environment.
1139
+ *
1140
+ * NOTE: This field is not automatically inherited from the top level environment,
1141
+ * and so must be specified in every named environment.
1142
+ *
1143
+ * @default []
1144
+ * @nonInheritable
1145
+ */
1235
1146
  secrets_store_secrets: {
1236
- /** The binding name used to refer to the bound service. */
1237
- binding: string;
1238
- /** Id of the secret store */
1239
- store_id: string;
1240
- /** Name of the secret */
1147
+ /** The binding name used to refer to the bound service. */binding: string; /** Id of the secret store */
1148
+ store_id: string; /** Name of the secret */
1241
1149
  secret_name: string;
1242
1150
  }[];
1243
1151
  /**
1244
- * **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
1245
- *
1246
- * NOTE: This field is not automatically inherited from the top level environment,
1247
- * and so must be specified in every named environment.
1248
- *
1249
- * @default []
1250
- * @nonInheritable
1251
- */
1152
+ * **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
1153
+ *
1154
+ * NOTE: This field is not automatically inherited from the top level environment,
1155
+ * and so must be specified in every named environment.
1156
+ *
1157
+ * @default []
1158
+ * @nonInheritable
1159
+ */
1252
1160
  unsafe_hello_world: {
1253
- /** The binding name used to refer to the bound service. */
1254
- binding: string;
1255
- /** Whether the timer is enabled */
1161
+ /** The binding name used to refer to the bound service. */binding: string; /** Whether the timer is enabled */
1256
1162
  enable_timer?: boolean;
1257
1163
  }[];
1258
1164
  }
@@ -1269,9 +1175,7 @@ type Rule = {
1269
1175
  */
1270
1176
  type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
1271
1177
  type TailConsumer = {
1272
- /** The name of the service tail events will be forwarded to. */
1273
- service: string;
1274
- /** (Optional) The environment of the service. */
1178
+ /** The name of the service tail events will be forwarded to. */service: string; /** (Optional) The environment of the service. */
1275
1179
  environment?: string;
1276
1180
  };
1277
1181
  interface DispatchNamespaceOutbound {
@@ -1287,19 +1191,15 @@ interface UserLimits {
1287
1191
  cpu_ms: number;
1288
1192
  }
1289
1193
  type Assets = {
1290
- /** Absolute path to assets directory */
1291
- directory?: string;
1292
- /** Name of `env` binding property in the User Worker. */
1293
- binding?: string;
1294
- /** How to handle HTML requests. */
1295
- html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none";
1296
- /** How to handle requests that do not match an asset. */
1194
+ /** Absolute path to assets directory */directory?: string; /** Name of `env` binding property in the User Worker. */
1195
+ binding?: string; /** How to handle HTML requests. */
1196
+ html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none"; /** How to handle requests that do not match an asset. */
1297
1197
  not_found_handling?: "single-page-application" | "404-page" | "none";
1298
1198
  /**
1299
- * Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
1300
- *
1301
- * Can also be `true`, indicating that every request should be routed to the User Worker.
1302
- */
1199
+ * Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
1200
+ *
1201
+ * Can also be `true`, indicating that every request should be routed to the User Worker.
1202
+ */
1303
1203
  run_worker_first?: string[] | boolean;
1304
1204
  };
1305
1205
  interface Observability {
@@ -1308,10 +1208,8 @@ interface Observability {
1308
1208
  /** The sampling rate */
1309
1209
  head_sampling_rate?: number;
1310
1210
  logs?: {
1311
- enabled?: boolean;
1312
- /** The sampling rate */
1313
- head_sampling_rate?: number;
1314
- /** Set to false to disable invocation logs */
1211
+ enabled?: boolean; /** The sampling rate */
1212
+ head_sampling_rate?: number; /** Set to false to disable invocation logs */
1315
1213
  invocation_logs?: boolean;
1316
1214
  };
1317
1215
  }
@@ -1345,81 +1243,81 @@ interface ComputedFields {
1345
1243
  /** The path to the user's Wrangler configuration file (if any), which may have been redirected to another file that used to create this configuration. */
1346
1244
  userConfigPath: string | undefined;
1347
1245
  /**
1348
- * The original top level name for the Worker in the raw configuration.
1349
- *
1350
- * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
1351
- * It can be useful to know what the top-level name was before the flattening.
1352
- */
1246
+ * The original top level name for the Worker in the raw configuration.
1247
+ *
1248
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
1249
+ * It can be useful to know what the top-level name was before the flattening.
1250
+ */
1353
1251
  topLevelName: string | undefined;
1354
1252
  }
1355
1253
  interface ConfigFields<Dev extends RawDevConfig> {
1356
1254
  /**
1357
- * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
1358
- * These have been superseded by Services, but there may be projects that won't
1359
- * (or can't) use them. If you're using a legacy environment, you can set this
1360
- * to `true` to enable it.
1361
- */
1255
+ * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
1256
+ * These have been superseded by Services, but there may be projects that won't
1257
+ * (or can't) use them. If you're using a legacy environment, you can set this
1258
+ * to `true` to enable it.
1259
+ */
1362
1260
  legacy_env: boolean;
1363
1261
  /**
1364
- * Whether Wrangler should send usage metrics to Cloudflare for this project.
1365
- *
1366
- * When defined this will override any user settings.
1367
- * Otherwise, Wrangler will use the user's preference.
1368
- */
1262
+ * Whether Wrangler should send usage metrics to Cloudflare for this project.
1263
+ *
1264
+ * When defined this will override any user settings.
1265
+ * Otherwise, Wrangler will use the user's preference.
1266
+ */
1369
1267
  send_metrics: boolean | undefined;
1370
1268
  /**
1371
- * Options to configure the development server that your worker will use.
1372
- */
1269
+ * Options to configure the development server that your worker will use.
1270
+ */
1373
1271
  dev: Dev;
1374
1272
  /**
1375
- * The definition of a Worker Site, a feature that lets you upload
1376
- * static assets with your Worker.
1377
- *
1378
- * More details at https://developers.cloudflare.com/workers/platform/sites
1379
- */
1273
+ * The definition of a Worker Site, a feature that lets you upload
1274
+ * static assets with your Worker.
1275
+ *
1276
+ * More details at https://developers.cloudflare.com/workers/platform/sites
1277
+ */
1380
1278
  site: {
1381
1279
  /**
1382
- * The directory containing your static assets.
1383
- *
1384
- * It must be a path relative to your Wrangler configuration file.
1385
- * Example: bucket = "./public"
1386
- *
1387
- * If there is a `site` field then it must contain this `bucket` field.
1388
- */
1280
+ * The directory containing your static assets.
1281
+ *
1282
+ * It must be a path relative to your Wrangler configuration file.
1283
+ * Example: bucket = "./public"
1284
+ *
1285
+ * If there is a `site` field then it must contain this `bucket` field.
1286
+ */
1389
1287
  bucket: string;
1390
1288
  /**
1391
- * The location of your Worker script.
1392
- *
1393
- * @deprecated DO NOT use this (it's a holdover from Wrangler v1.x). Either use the top level `main` field, or pass the path to your entry file as a command line argument.
1394
- * @breaking
1395
- */
1289
+ * The location of your Worker script.
1290
+ *
1291
+ * @deprecated DO NOT use this (it's a holdover from Wrangler v1.x). Either use the top level `main` field, or pass the path to your entry file as a command line argument.
1292
+ * @breaking
1293
+ */
1396
1294
  "entry-point"?: string;
1397
1295
  /**
1398
- * An exclusive list of .gitignore-style patterns that match file
1399
- * or directory names from your bucket location. Only matched
1400
- * items will be uploaded. Example: include = ["upload_dir"]
1401
- *
1402
- * @optional
1403
- * @default []
1404
- */
1296
+ * An exclusive list of .gitignore-style patterns that match file
1297
+ * or directory names from your bucket location. Only matched
1298
+ * items will be uploaded. Example: include = ["upload_dir"]
1299
+ *
1300
+ * @optional
1301
+ * @default []
1302
+ */
1405
1303
  include?: string[];
1406
1304
  /**
1407
- * A list of .gitignore-style patterns that match files or
1408
- * directories in your bucket that should be excluded from
1409
- * uploads. Example: exclude = ["ignore_dir"]
1410
- *
1411
- * @optional
1412
- * @default []
1413
- */
1305
+ * A list of .gitignore-style patterns that match files or
1306
+ * directories in your bucket that should be excluded from
1307
+ * uploads. Example: exclude = ["ignore_dir"]
1308
+ *
1309
+ * @optional
1310
+ * @default []
1311
+ */
1414
1312
  exclude?: string[];
1415
1313
  } | undefined;
1416
1314
  /**
1417
- * Old behaviour of serving a folder of static assets with your Worker,
1418
- * without any additional code.
1419
- * This can either be a string, or an object with additional config
1420
- * fields.
1421
- * Will be deprecated in the near future in favor of `assets`.
1422
- */
1315
+ * Old behaviour of serving a folder of static assets with your Worker,
1316
+ * without any additional code.
1317
+ * This can either be a string, or an object with additional config
1318
+ * fields.
1319
+ * Will be deprecated in the near future in favor of `assets`.
1320
+ */
1423
1321
  legacy_assets: {
1424
1322
  bucket: string;
1425
1323
  include: string[];
@@ -1428,95 +1326,95 @@ interface ConfigFields<Dev extends RawDevConfig> {
1428
1326
  serve_single_page_app: boolean;
1429
1327
  } | string | undefined;
1430
1328
  /**
1431
- * A list of wasm modules that your worker should be bound to. This is
1432
- * the "legacy" way of binding to a wasm module. ES module workers should
1433
- * do proper module imports.
1434
- */
1329
+ * A list of wasm modules that your worker should be bound to. This is
1330
+ * the "legacy" way of binding to a wasm module. ES module workers should
1331
+ * do proper module imports.
1332
+ */
1435
1333
  wasm_modules: {
1436
1334
  [key: string]: string;
1437
1335
  } | undefined;
1438
1336
  /**
1439
- * A list of text files that your worker should be bound to. This is
1440
- * the "legacy" way of binding to a text file. ES module workers should
1441
- * do proper module imports.
1442
- */
1337
+ * A list of text files that your worker should be bound to. This is
1338
+ * the "legacy" way of binding to a text file. ES module workers should
1339
+ * do proper module imports.
1340
+ */
1443
1341
  text_blobs: {
1444
1342
  [key: string]: string;
1445
1343
  } | undefined;
1446
1344
  /**
1447
- * A list of data files that your worker should be bound to. This is
1448
- * the "legacy" way of binding to a data file. ES module workers should
1449
- * do proper module imports.
1450
- */
1345
+ * A list of data files that your worker should be bound to. This is
1346
+ * the "legacy" way of binding to a data file. ES module workers should
1347
+ * do proper module imports.
1348
+ */
1451
1349
  data_blobs: {
1452
1350
  [key: string]: string;
1453
1351
  } | undefined;
1454
1352
  /**
1455
- * A map of module aliases. Lets you swap out a module for any others.
1456
- * Corresponds with esbuild's `alias` config
1457
- */
1353
+ * A map of module aliases. Lets you swap out a module for any others.
1354
+ * Corresponds with esbuild's `alias` config
1355
+ */
1458
1356
  alias: {
1459
1357
  [key: string]: string;
1460
1358
  } | undefined;
1461
1359
  /**
1462
- * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
1463
- *
1464
- * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
1465
- *
1466
- * If you want to keep your dashboard vars when wrangler deploys, set this field to true.
1467
- *
1468
- * @default false
1469
- * @nonInheritable
1470
- */
1360
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
1361
+ *
1362
+ * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
1363
+ *
1364
+ * If you want to keep your dashboard vars when wrangler deploys, set this field to true.
1365
+ *
1366
+ * @default false
1367
+ * @nonInheritable
1368
+ */
1471
1369
  keep_vars?: boolean;
1472
1370
  }
1473
1371
  interface PagesConfigFields {
1474
1372
  /**
1475
- * The directory of static assets to serve.
1476
- *
1477
- * The presence of this field in a Wrangler configuration file indicates a Pages project,
1478
- * and will prompt the handling of the configuration file according to the
1479
- * Pages-specific validation rules.
1480
- */
1373
+ * The directory of static assets to serve.
1374
+ *
1375
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
1376
+ * and will prompt the handling of the configuration file according to the
1377
+ * Pages-specific validation rules.
1378
+ */
1481
1379
  pages_build_output_dir?: string;
1482
1380
  }
1483
1381
  interface DevConfig {
1484
1382
  /**
1485
- * IP address for the local dev server to listen on,
1486
- *
1487
- * @default localhost
1488
- */
1383
+ * IP address for the local dev server to listen on,
1384
+ *
1385
+ * @default localhost
1386
+ */
1489
1387
  ip: string;
1490
1388
  /**
1491
- * Port for the local dev server to listen on
1492
- *
1493
- * @default 8787
1494
- */
1389
+ * Port for the local dev server to listen on
1390
+ *
1391
+ * @default 8787
1392
+ */
1495
1393
  port: number | undefined;
1496
1394
  /**
1497
- * Port for the local dev server's inspector to listen on
1498
- *
1499
- * @default 9229
1500
- */
1395
+ * Port for the local dev server's inspector to listen on
1396
+ *
1397
+ * @default 9229
1398
+ */
1501
1399
  inspector_port: number | undefined;
1502
1400
  /**
1503
- * Protocol that local wrangler dev server listens to requests on.
1504
- *
1505
- * @default http
1506
- */
1401
+ * Protocol that local wrangler dev server listens to requests on.
1402
+ *
1403
+ * @default http
1404
+ */
1507
1405
  local_protocol: "http" | "https";
1508
1406
  /**
1509
- * Protocol that wrangler dev forwards requests on
1510
- *
1511
- * Setting this to `http` is not currently implemented for remote mode.
1512
- * See https://github.com/cloudflare/workers-sdk/issues/583
1513
- *
1514
- * @default https
1515
- */
1407
+ * Protocol that wrangler dev forwards requests on
1408
+ *
1409
+ * Setting this to `http` is not currently implemented for remote mode.
1410
+ * See https://github.com/cloudflare/workers-sdk/issues/583
1411
+ *
1412
+ * @default https
1413
+ */
1516
1414
  upstream_protocol: "https" | "http";
1517
1415
  /**
1518
- * Host to forward requests to, defaults to the host of the first route of project
1519
- */
1416
+ * Host to forward requests to, defaults to the host of the first route of project
1417
+ */
1520
1418
  host: string | undefined;
1521
1419
  }
1522
1420
  type RawDevConfig = Partial<DevConfig>;
@@ -1536,30 +1434,30 @@ interface CloudflarePagesRoutes {
1536
1434
  }
1537
1435
  interface CloudflareOptions {
1538
1436
  /**
1539
- * Configuration for the Cloudflare Deployments.
1540
- *
1541
- * **NOTE:** This option is only effective if `deployConfig` is enabled.
1542
- */
1437
+ * Configuration for the Cloudflare Deployments.
1438
+ *
1439
+ * **NOTE:** This option is only effective if `deployConfig` is enabled.
1440
+ */
1543
1441
  wrangler?: WranglerConfig;
1544
1442
  /**
1545
- * Enable automatic generation of `.wrangler/deploy/config.json`.
1546
- *
1547
- * **IMPORTANT:** Enabling this option will cause settings from cloudflare dashboard (including environment variables) to be disabled and discarded.
1548
- *
1549
- * More info: https://developers.cloudflare.com/workers/wrangler/configuration#generated-wrangler-configuration
1550
- */
1443
+ * Enable automatic generation of `.wrangler/deploy/config.json`.
1444
+ *
1445
+ * **IMPORTANT:** Enabling this option will cause settings from cloudflare dashboard (including environment variables) to be disabled and discarded.
1446
+ *
1447
+ * More info: https://developers.cloudflare.com/workers/wrangler/configuration#generated-wrangler-configuration
1448
+ */
1551
1449
  deployConfig?: boolean;
1552
1450
  /**
1553
- * Enable native Node.js compatibility support.
1554
- *
1555
- * If this option disabled, pure unenv polyfills will be used instead.
1556
- *
1557
- * If not set, will be auto enabled if `nodejs_compat` or `nodejs_compat_v2` is detected in `wrangler.toml` or `wrangler.json`.
1558
- */
1451
+ * Enable native Node.js compatibility support.
1452
+ *
1453
+ * If this option disabled, pure unenv polyfills will be used instead.
1454
+ *
1455
+ * If not set, will be auto enabled if `nodejs_compat` or `nodejs_compat_v2` is detected in `wrangler.toml` or `wrangler.json`.
1456
+ */
1559
1457
  nodeCompat?: boolean;
1560
1458
  /**
1561
- * Options for dev emulation.
1562
- */
1459
+ * Options for dev emulation.
1460
+ */
1563
1461
  dev?: {
1564
1462
  configPath?: string;
1565
1463
  environment?: string;
@@ -1567,36 +1465,36 @@ interface CloudflareOptions {
1567
1465
  };
1568
1466
  pages?: {
1569
1467
  /**
1570
- * Nitro will automatically generate a `_routes.json` that controls which files get served statically and
1571
- * which get served by the Worker. Using this config will override the automatic `_routes.json`. Or, if the
1572
- * `merge` options is set, it will merge the user-set routes with the auto-generated ones, giving priority
1573
- * to the user routes.
1574
- *
1575
- * @see https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes
1576
- *
1577
- * There are a maximum of 100 rules, and you must have at least one include rule. Wildcards are accepted.
1578
- *
1579
- * If any fields are unset, they default to:
1580
- *
1581
- * ```json
1582
- * {
1583
- * "version": 1,
1584
- * "include": ["/*"],
1585
- * "exclude": []
1586
- * }
1587
- * ```
1588
- */
1468
+ * Nitro will automatically generate a `_routes.json` that controls which files get served statically and
1469
+ * which get served by the Worker. Using this config will override the automatic `_routes.json`. Or, if the
1470
+ * `merge` options is set, it will merge the user-set routes with the auto-generated ones, giving priority
1471
+ * to the user routes.
1472
+ *
1473
+ * @see https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes
1474
+ *
1475
+ * There are a maximum of 100 rules, and you must have at least one include rule. Wildcards are accepted.
1476
+ *
1477
+ * If any fields are unset, they default to:
1478
+ *
1479
+ * ```json
1480
+ * {
1481
+ * "version": 1,
1482
+ * "include": ["/*"],
1483
+ * "exclude": []
1484
+ * }
1485
+ * ```
1486
+ */
1589
1487
  routes?: CloudflarePagesRoutes;
1590
1488
  /**
1591
- * If set to `false`, nitro will disable the automatically generated `_routes.json` and instead use the user-set only ones.
1592
- *
1593
- * @default true
1594
- */
1489
+ * If set to `false`, nitro will disable the automatically generated `_routes.json` and instead use the user-set only ones.
1490
+ *
1491
+ * @default true
1492
+ */
1595
1493
  defaultRoutes?: boolean;
1596
1494
  };
1597
1495
  /**
1598
- * Custom Cloudflare exports additional classes such as WorkflowEntrypoint.
1599
- */
1496
+ * Custom Cloudflare exports additional classes such as WorkflowEntrypoint.
1497
+ */
1600
1498
  exports?: string;
1601
1499
  }
1602
1500
  type DurableObjectState = ConstructorParameters<typeof DurableObject>[0];
@@ -1608,15 +1506,13 @@ declare module "nitro/types" {
1608
1506
  context: ExecutionContext;
1609
1507
  }) => void;
1610
1508
  "cloudflare:email": (_: {
1611
- message: ForwardableEmailMessage;
1612
- /** @deprecated please use `message` */
1509
+ message: ForwardableEmailMessage; /** @deprecated please use `message` */
1613
1510
  event: ForwardableEmailMessage;
1614
1511
  env: unknown;
1615
1512
  context: ExecutionContext;
1616
1513
  }) => void;
1617
1514
  "cloudflare:queue": (_: {
1618
- batch: MessageBatch;
1619
- /** @deprecated please use `batch` */
1515
+ batch: MessageBatch; /** @deprecated please use `batch` */
1620
1516
  event: MessageBatch;
1621
1517
  env: unknown;
1622
1518
  context: ExecutionContext;
@@ -1646,26 +1542,16 @@ interface FirebaseOptions {
1646
1542
  interface AppHostingOutputBundleConfig {
1647
1543
  version: "v1";
1648
1544
  runConfig: {
1649
- /** Command to start the server (e.g. "node dist/index.js"). Assume this command is run from the root dir of the workspace. */
1650
- runCommand: string;
1651
- /** Environment variables set when the app is run. */
1545
+ /** Command to start the server (e.g. "node dist/index.js"). Assume this command is run from the root dir of the workspace. */runCommand: string; /** Environment variables set when the app is run. */
1652
1546
  environmentVariables?: Array<{
1653
- /** Name of the variable. */
1654
- variable: string;
1655
- /** Value associated with the variable. */
1656
- value: string;
1657
- /** Where the variable will be available, for now only RUNTIME is supported. */
1547
+ /** Name of the variable. */variable: string; /** Value associated with the variable. */
1548
+ value: string; /** Where the variable will be available, for now only RUNTIME is supported. */
1658
1549
  availability: "RUNTIME"[];
1659
- }>;
1660
- /** The maximum number of concurrent requests that each server instance can receive. */
1661
- concurrency?: number;
1662
- /** The number of CPUs used in a single server instance. */
1663
- cpu?: number;
1664
- /** The amount of memory available for a server instance. */
1665
- memoryMiB?: number;
1666
- /** The limit on the minimum number of function instances that may coexist at a given time. */
1667
- minInstances?: number;
1668
- /** The limit on the maximum number of function instances that may coexist at a given time. */
1550
+ }>; /** The maximum number of concurrent requests that each server instance can receive. */
1551
+ concurrency?: number; /** The number of CPUs used in a single server instance. */
1552
+ cpu?: number; /** The amount of memory available for a server instance. */
1553
+ memoryMiB?: number; /** The limit on the minimum number of function instances that may coexist at a given time. */
1554
+ minInstances?: number; /** The limit on the maximum number of function instances that may coexist at a given time. */
1669
1555
  maxInstances?: number;
1670
1556
  };
1671
1557
  metadata: {
@@ -1675,8 +1561,7 @@ interface AppHostingOutputBundleConfig {
1675
1561
  frameworkVersion?: string;
1676
1562
  };
1677
1563
  outputFiles?: {
1678
- /** serverApp holds a list of directories + files relative to the app root dir that frameworks need to deploy to the App Hosting server. */
1679
- serverApp: {
1564
+ /** serverApp holds a list of directories + files relative to the app root dir that frameworks need to deploy to the App Hosting server. */serverApp: {
1680
1565
  include: string[];
1681
1566
  };
1682
1567
  };
@@ -1786,68 +1671,68 @@ interface VercelBuildConfigV3 {
1786
1671
  */
1787
1672
  interface VercelServerlessFunctionConfig {
1788
1673
  /**
1789
- * Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
1790
- */
1674
+ * Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
1675
+ */
1791
1676
  memory?: number;
1792
1677
  /**
1793
- * Specifies the instruction set "architecture" the Vercel Function supports.
1794
- *
1795
- * Either `x86_64` or `arm64`. The default value is `x86_64`
1796
- */
1678
+ * Specifies the instruction set "architecture" the Vercel Function supports.
1679
+ *
1680
+ * Either `x86_64` or `arm64`. The default value is `x86_64`
1681
+ */
1797
1682
  architecture?: "x86_64" | "arm64";
1798
1683
  /**
1799
- * Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
1800
- */
1684
+ * Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
1685
+ */
1801
1686
  maxDuration?: number;
1802
1687
  /**
1803
- * Map of additional environment variables that will be available to the Vercel Function,
1804
- * in addition to the env vars specified in the Project Settings.
1805
- */
1688
+ * Map of additional environment variables that will be available to the Vercel Function,
1689
+ * in addition to the env vars specified in the Project Settings.
1690
+ */
1806
1691
  environment?: Record<string, string>;
1807
1692
  /**
1808
- * List of Vercel Regions where the Vercel Function will be deployed to.
1809
- */
1693
+ * List of Vercel Regions where the Vercel Function will be deployed to.
1694
+ */
1810
1695
  regions?: string[];
1811
1696
  /**
1812
- * True if a custom runtime has support for Lambda runtime wrappers.
1813
- */
1697
+ * True if a custom runtime has support for Lambda runtime wrappers.
1698
+ */
1814
1699
  supportsWrapper?: boolean;
1815
1700
  /**
1816
- * When true, the Serverless Function will stream the response to the client.
1817
- */
1701
+ * When true, the Serverless Function will stream the response to the client.
1702
+ */
1818
1703
  supportsResponseStreaming?: boolean;
1819
1704
  /**
1820
- * Enables source map generation.
1821
- */
1705
+ * Enables source map generation.
1706
+ */
1822
1707
  shouldAddSourcemapSupport?: boolean;
1823
1708
  /**
1824
- * The runtime to use. Defaults to the auto-detected Node.js version.
1825
- */
1826
- runtime?: "nodejs20.x" | "nodejs22.x" | "bun1.x" | (string & {});
1709
+ * The runtime to use. Defaults to the auto-detected Node.js version.
1710
+ */
1711
+ runtime?: "nodejs20.x" | "nodejs22.x" | "bun1.x" | string & {};
1827
1712
  [key: string]: unknown;
1828
1713
  }
1829
1714
  interface VercelOptions {
1830
1715
  config?: VercelBuildConfigV3;
1831
1716
  /**
1832
- * If you have enabled skew protection in the Vercel dashboard, it will
1833
- * be enabled by default.
1834
- *
1835
- * You can disable the Nitro integration by setting this option to `false`.
1836
- */
1717
+ * If you have enabled skew protection in the Vercel dashboard, it will
1718
+ * be enabled by default.
1719
+ *
1720
+ * You can disable the Nitro integration by setting this option to `false`.
1721
+ */
1837
1722
  skewProtection?: boolean;
1838
1723
  /**
1839
- * If you are using `vercel-edge`, you can specify the region(s) for your edge function.
1840
- * @see https://vercel.com/docs/concepts/functions/edge-functions#edge-function-regions
1841
- */
1724
+ * If you are using `vercel-edge`, you can specify the region(s) for your edge function.
1725
+ * @see https://vercel.com/docs/concepts/functions/edge-functions#edge-function-regions
1726
+ */
1842
1727
  regions?: string[];
1843
1728
  functions?: VercelServerlessFunctionConfig;
1844
1729
  /**
1845
- * Handler format to use for Vercel Serverless Functions.
1846
- *
1847
- * Using `node` format enables compatibility with Node.js specific APIs in your Nitro application (e.g., `req.runtime.node`).
1848
- *
1849
- * Possible values are: `web` (default) and `node`.
1850
- */
1730
+ * Handler format to use for Vercel Serverless Functions.
1731
+ *
1732
+ * Using `node` format enables compatibility with Node.js specific APIs in your Nitro application (e.g., `req.runtime.node`).
1733
+ *
1734
+ * Possible values are: `web` (default) and `node`.
1735
+ */
1851
1736
  entryFormat?: "web" | "node";
1852
1737
  }
1853
1738
  //#endregion
@@ -1862,7 +1747,7 @@ interface PresetOptions {
1862
1747
  vercel?: VercelOptions;
1863
1748
  }
1864
1749
  type PresetName = "alwaysdata" | "aws-amplify" | "aws-lambda" | "azure-swa" | "base-worker" | "bun" | "cleavr" | "cloudflare-dev" | "cloudflare-durable" | "cloudflare-module" | "cloudflare-pages" | "cloudflare-pages-static" | "deno" | "deno-deploy" | "deno-server" | "digital-ocean" | "firebase-app-hosting" | "flight-control" | "genezio" | "github-pages" | "gitlab-pages" | "heroku" | "iis-handler" | "iis-node" | "koyeb" | "netlify" | "netlify-edge" | "netlify-static" | "nitro-dev" | "nitro-prerender" | "node" | "node-cluster" | "node-middleware" | "node-server" | "platform-sh" | "render-com" | "standard" | "static" | "stormkit" | "vercel" | "vercel-static" | "winterjs" | "zeabur" | "zeabur-static" | "zerops" | "zerops-static";
1865
- type PresetNameInput = "alwaysdata" | "aws-amplify" | "awsAmplify" | "aws_amplify" | "aws-lambda" | "awsLambda" | "aws_lambda" | "azure-swa" | "azureSwa" | "azure_swa" | "base-worker" | "baseWorker" | "base_worker" | "bun" | "cleavr" | "cloudflare-dev" | "cloudflareDev" | "cloudflare_dev" | "cloudflare-durable" | "cloudflareDurable" | "cloudflare_durable" | "cloudflare-module" | "cloudflareModule" | "cloudflare_module" | "cloudflare-pages" | "cloudflarePages" | "cloudflare_pages" | "cloudflare-pages-static" | "cloudflarePagesStatic" | "cloudflare_pages_static" | "deno" | "deno-deploy" | "denoDeploy" | "deno_deploy" | "deno-server" | "denoServer" | "deno_server" | "digital-ocean" | "digitalOcean" | "digital_ocean" | "firebase-app-hosting" | "firebaseAppHosting" | "firebase_app_hosting" | "flight-control" | "flightControl" | "flight_control" | "genezio" | "github-pages" | "githubPages" | "github_pages" | "gitlab-pages" | "gitlabPages" | "gitlab_pages" | "heroku" | "iis-handler" | "iisHandler" | "iis_handler" | "iis-node" | "iisNode" | "iis_node" | "koyeb" | "netlify" | "netlify-edge" | "netlifyEdge" | "netlify_edge" | "netlify-static" | "netlifyStatic" | "netlify_static" | "nitro-dev" | "nitroDev" | "nitro_dev" | "nitro-prerender" | "nitroPrerender" | "nitro_prerender" | "node" | "node-cluster" | "nodeCluster" | "node_cluster" | "node-middleware" | "nodeMiddleware" | "node_middleware" | "node-server" | "nodeServer" | "node_server" | "platform-sh" | "platformSh" | "platform_sh" | "render-com" | "renderCom" | "render_com" | "standard" | "static" | "stormkit" | "vercel" | "vercel-static" | "vercelStatic" | "vercel_static" | "winterjs" | "zeabur" | "zeabur-static" | "zeaburStatic" | "zeabur_static" | "zerops" | "zerops-static" | "zeropsStatic" | "zerops_static" | (string & {});
1750
+ type PresetNameInput = "alwaysdata" | "aws-amplify" | "awsAmplify" | "aws_amplify" | "aws-lambda" | "awsLambda" | "aws_lambda" | "azure-swa" | "azureSwa" | "azure_swa" | "base-worker" | "baseWorker" | "base_worker" | "bun" | "cleavr" | "cloudflare-dev" | "cloudflareDev" | "cloudflare_dev" | "cloudflare-durable" | "cloudflareDurable" | "cloudflare_durable" | "cloudflare-module" | "cloudflareModule" | "cloudflare_module" | "cloudflare-pages" | "cloudflarePages" | "cloudflare_pages" | "cloudflare-pages-static" | "cloudflarePagesStatic" | "cloudflare_pages_static" | "deno" | "deno-deploy" | "denoDeploy" | "deno_deploy" | "deno-server" | "denoServer" | "deno_server" | "digital-ocean" | "digitalOcean" | "digital_ocean" | "firebase-app-hosting" | "firebaseAppHosting" | "firebase_app_hosting" | "flight-control" | "flightControl" | "flight_control" | "genezio" | "github-pages" | "githubPages" | "github_pages" | "gitlab-pages" | "gitlabPages" | "gitlab_pages" | "heroku" | "iis-handler" | "iisHandler" | "iis_handler" | "iis-node" | "iisNode" | "iis_node" | "koyeb" | "netlify" | "netlify-edge" | "netlifyEdge" | "netlify_edge" | "netlify-static" | "netlifyStatic" | "netlify_static" | "nitro-dev" | "nitroDev" | "nitro_dev" | "nitro-prerender" | "nitroPrerender" | "nitro_prerender" | "node" | "node-cluster" | "nodeCluster" | "node_cluster" | "node-middleware" | "nodeMiddleware" | "node_middleware" | "node-server" | "nodeServer" | "node_server" | "platform-sh" | "platformSh" | "platform_sh" | "render-com" | "renderCom" | "render_com" | "standard" | "static" | "stormkit" | "vercel" | "vercel-static" | "vercelStatic" | "vercel_static" | "winterjs" | "zeabur" | "zeabur-static" | "zeaburStatic" | "zeabur_static" | "zerops" | "zerops-static" | "zeropsStatic" | "zerops_static" | string & {};
1866
1751
  //#endregion
1867
1752
  //#region src/types/openapi-ts.d.ts
1868
1753
  /**
@@ -2100,12 +1985,12 @@ interface ExternalDocumentationObject extends Extensable {
2100
1985
  */
2101
1986
  interface ParameterObject extends Extensable {
2102
1987
  /**
2103
- * REQUIRED. The name of the parameter. Parameter names are case sensitive.
2104
- *
2105
- * - If `in` is `"path"`, the `name` field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
2106
- * - If `in` is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
2107
- * - For all other cases, the `name` corresponds to the parameter name used by the `in` property.
2108
- */
1988
+ * REQUIRED. The name of the parameter. Parameter names are case sensitive.
1989
+ *
1990
+ * - If `in` is `"path"`, the `name` field MUST correspond to a template expression occurring within the path field in the Paths Object. See Path Templating for further information.
1991
+ * - If `in` is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
1992
+ * - For all other cases, the `name` corresponds to the parameter name used by the `in` property.
1993
+ */
2109
1994
  name: string;
2110
1995
  /** REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".*/
2111
1996
  in: "query" | "header" | "path" | "cookie";
@@ -2192,8 +2077,7 @@ interface EncodingObject extends Extensable {
2192
2077
  type ResponsesObject = {
2193
2078
  [responseCode: string]: ResponseObject | ReferenceObject;
2194
2079
  } & {
2195
- /** The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. */
2196
- default?: ResponseObject | ReferenceObject;
2080
+ /** The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. */default?: ResponseObject | ReferenceObject;
2197
2081
  };
2198
2082
  /**
2199
2083
  * [4.8.17] Response Object
@@ -2291,13 +2175,9 @@ interface ReferenceObject extends Extensable {
2291
2175
  * The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12.
2292
2176
  */
2293
2177
  type SchemaObject = {
2294
- /** The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12. */
2295
- discriminator?: DiscriminatorObject;
2296
- /** MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. */
2297
- xml?: XMLObject;
2298
- /** Additional external documentation for this schema. */
2299
- externalDocs?: ExternalDocumentationObject;
2300
- /** @deprecated */
2178
+ /** The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12. */discriminator?: DiscriminatorObject; /** MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. */
2179
+ xml?: XMLObject; /** Additional external documentation for this schema. */
2180
+ externalDocs?: ExternalDocumentationObject; /** @deprecated */
2301
2181
  example?: any;
2302
2182
  title?: string;
2303
2183
  description?: string;
@@ -2305,12 +2185,10 @@ type SchemaObject = {
2305
2185
  deprecated?: boolean;
2306
2186
  readOnly?: boolean;
2307
2187
  writeOnly?: boolean;
2308
- enum?: unknown[];
2309
- /** Use of this keyword is functionally equivalent to an "enum" (Section 6.1.2) with a single value. */
2188
+ enum?: unknown[]; /** Use of this keyword is functionally equivalent to an "enum" (Section 6.1.2) with a single value. */
2310
2189
  const?: unknown;
2311
2190
  default?: unknown;
2312
- format?: string;
2313
- /** @deprecated in 3.1 (still valid for 3.0) */
2191
+ format?: string; /** @deprecated in 3.1 (still valid for 3.0) */
2314
2192
  nullable?: boolean;
2315
2193
  oneOf?: (SchemaObject | ReferenceObject)[];
2316
2194
  allOf?: (SchemaObject | ReferenceObject)[];
@@ -2396,35 +2274,23 @@ interface XMLObject extends Extensable {
2396
2274
  * Defines a security scheme that can be used by the operations.
2397
2275
  */
2398
2276
  type SecuritySchemeObject = {
2399
- /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
2400
- description?: string;
2277
+ /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */description?: string;
2401
2278
  [key: `x-${string}`]: any;
2402
2279
  } & ({
2403
- /** REQUIRED. The type of the security scheme. */
2404
- type: "apiKey";
2405
- /** REQUIRED. The name of the header, query or cookie parameter to be used. */
2406
- name: string;
2407
- /** REQUIRED. The location of the API key. */
2280
+ /** REQUIRED. The type of the security scheme. */type: "apiKey"; /** REQUIRED. The name of the header, query or cookie parameter to be used. */
2281
+ name: string; /** REQUIRED. The location of the API key. */
2408
2282
  in: "query" | "header" | "cookie";
2409
2283
  } | {
2410
- /** REQUIRED. The type of the security scheme. */
2411
- type: "http";
2412
- /** REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry. */
2413
- scheme: string;
2414
- /** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */
2284
+ /** REQUIRED. The type of the security scheme. */type: "http"; /** REQUIRED. The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry. */
2285
+ scheme: string; /** A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. */
2415
2286
  bearer?: string;
2416
2287
  } | {
2417
- /** REQUIRED. The type of the security scheme. */
2418
- type: "mutualTLS";
2288
+ /** REQUIRED. The type of the security scheme. */type: "mutualTLS";
2419
2289
  } | {
2420
- /** REQUIRED. Tye type of the security scheme. */
2421
- type: "oauth2";
2422
- /** REQUIRED. An object containing configuration information for the flow types supported. */
2290
+ /** REQUIRED. Tye type of the security scheme. */type: "oauth2"; /** REQUIRED. An object containing configuration information for the flow types supported. */
2423
2291
  flows: OAuthFlowsObject;
2424
2292
  } | {
2425
- /** REQUIRED. Tye type of the security scheme. */
2426
- type: "openIdConnect";
2427
- /** REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS. */
2293
+ /** REQUIRED. Tye type of the security scheme. */type: "openIdConnect"; /** REQUIRED. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. The OpenID Connect standard requires the use of TLS. */
2428
2294
  openIdConnectUrl: string;
2429
2295
  });
2430
2296
  /**
@@ -2474,46 +2340,46 @@ interface NitroRouteMeta {
2474
2340
  }
2475
2341
  interface NitroHandlerCommon {
2476
2342
  /**
2477
- * HTTP pathname pattern to match
2478
- *
2479
- * Examples: `/test`, `/api/:id`, `/blog/**`
2480
- */
2343
+ * HTTP pathname pattern to match
2344
+ *
2345
+ * Examples: `/test`, `/api/:id`, `/blog/**`
2346
+ */
2481
2347
  route: string;
2482
2348
  /**
2483
- * HTTP method to match
2484
- */
2349
+ * HTTP method to match
2350
+ */
2485
2351
  method?: HTTPMethod;
2486
2352
  /**
2487
- * Run handler as a middleware before other route handlings
2488
- */
2353
+ * Run handler as a middleware before other route handlings
2354
+ */
2489
2355
  middleware?: boolean;
2490
2356
  /**
2491
- * Extra Meta
2492
- */
2357
+ * Extra Meta
2358
+ */
2493
2359
  meta?: NitroRouteMeta;
2494
2360
  }
2495
2361
  type EventHandlerFormat = "web" | "node";
2496
2362
  interface NitroEventHandler extends NitroHandlerCommon {
2497
2363
  /**
2498
- * Use lazy loading to import handler
2499
- */
2364
+ * Use lazy loading to import handler
2365
+ */
2500
2366
  lazy?: boolean;
2501
2367
  /**
2502
- * Path to event handler
2503
- */
2368
+ * Path to event handler
2369
+ */
2504
2370
  handler: string;
2505
2371
  /**
2506
- * Event handler type.
2507
- *
2508
- * Default is `"web"`. If set to `"node"`, the handler will be converted into a web compatible handler.
2509
- */
2372
+ * Event handler type.
2373
+ *
2374
+ * Default is `"web"`. If set to `"node"`, the handler will be converted into a web compatible handler.
2375
+ */
2510
2376
  format?: EventHandlerFormat;
2511
- env?: MaybeArray$1<"dev" | "prod" | "prerender" | PresetName | (string & {})>;
2377
+ env?: MaybeArray$1<"dev" | "prod" | "prerender" | PresetName | string & {}>;
2512
2378
  }
2513
2379
  interface NitroDevEventHandler extends NitroHandlerCommon {
2514
2380
  /**
2515
- * Event handler function
2516
- */
2381
+ * Event handler function
2382
+ */
2517
2383
  handler: HTTPHandler;
2518
2384
  }
2519
2385
  type MaybePromise<T> = T | Promise<T>;
@@ -2576,7 +2442,7 @@ declare class Router<T> {
2576
2442
  //#endregion
2577
2443
  //#region src/types/_utils.d.ts
2578
2444
  type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
2579
- type IntRange<F$1 extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F$1>>;
2445
+ type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;
2580
2446
  type ExcludeFunctions<G extends Record<string, any>> = Pick<G, { [P in keyof G]: NonNullable<G[P]> extends Function ? never : P }[keyof G]>;
2581
2447
  //#endregion
2582
2448
  //#region src/types/route-rules.d.ts
@@ -2589,9 +2455,9 @@ interface NitroRouteConfig {
2589
2455
  status?: HTTPstatus;
2590
2456
  };
2591
2457
  prerender?: boolean;
2592
- proxy?: string | ({
2458
+ proxy?: string | {
2593
2459
  to: string;
2594
- } & ProxyOptions);
2460
+ } & ProxyOptions;
2595
2461
  isr?: number | boolean | VercelISRConfig;
2596
2462
  cors?: boolean;
2597
2463
  swr?: boolean | number;
@@ -2607,9 +2473,9 @@ interface NitroRouteRules extends Omit<NitroRouteConfig, "redirect" | "cors" | "
2607
2473
  } & ProxyOptions;
2608
2474
  [key: string]: any;
2609
2475
  }
2610
- type MatchedRouteRule<K$1 extends keyof NitroRouteRules = "custom"> = {
2611
- name: K$1;
2612
- options: Exclude<NitroRouteRules[K$1], false>;
2476
+ type MatchedRouteRule<K extends keyof NitroRouteRules = "custom"> = {
2477
+ name: K;
2478
+ options: Exclude<NitroRouteRules[K], false>;
2613
2479
  route: string;
2614
2480
  params?: Record<string, string>;
2615
2481
  handler?: (opts: unknown) => Middleware;
@@ -2617,29 +2483,29 @@ type MatchedRouteRule<K$1 extends keyof NitroRouteRules = "custom"> = {
2617
2483
  type MatchedRouteRules = { [K in keyof NitroRouteRules]: MatchedRouteRule<K> };
2618
2484
  interface VercelISRConfig {
2619
2485
  /**
2620
- * (vercel)
2621
- * Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function.
2622
- * Setting the value to `false` (or `isr: true` route rule) means it will never expire.
2623
- */
2486
+ * (vercel)
2487
+ * Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function.
2488
+ * Setting the value to `false` (or `isr: true` route rule) means it will never expire.
2489
+ */
2624
2490
  expiration?: number | false;
2625
2491
  /**
2626
- * (vercel)
2627
- * Group number of the asset.
2628
- * Prerender assets with the same group number will all be re-validated at the same time.
2629
- */
2492
+ * (vercel)
2493
+ * Group number of the asset.
2494
+ * Prerender assets with the same group number will all be re-validated at the same time.
2495
+ */
2630
2496
  group?: number;
2631
2497
  /**
2632
- * (vercel)
2633
- * List of query string parameter names that will be cached independently.
2634
- * - If an empty array, query values are not considered for caching.
2635
- * - If undefined each unique query value is cached independently
2636
- * - For wildcard `/**` route rules, `url` is always added.
2637
- */
2498
+ * (vercel)
2499
+ * List of query string parameter names that will be cached independently.
2500
+ * - If an empty array, query values are not considered for caching.
2501
+ * - If undefined each unique query value is cached independently
2502
+ * - For wildcard `/**` route rules, `url` is always added.
2503
+ */
2638
2504
  allowQuery?: string[];
2639
2505
  /**
2640
- * (vercel)
2641
- * When `true`, the query string will be present on the `request` argument passed to the invoked function. The `allowQuery` filter still applies.
2642
- */
2506
+ * (vercel)
2507
+ * When `true`, the query string will be present on the `request` argument passed to the invoked function. The `allowQuery` filter still applies.
2508
+ */
2643
2509
  passQuery?: boolean;
2644
2510
  }
2645
2511
  //#endregion
@@ -2683,7 +2549,7 @@ type NitroTypes = {
2683
2549
  tsConfig?: TSConfig;
2684
2550
  };
2685
2551
  interface NitroFrameworkInfo {
2686
- name?: "nitro" | (string & {});
2552
+ name?: "nitro" | string & {};
2687
2553
  version?: string;
2688
2554
  }
2689
2555
  /** Build info written to `.output/nitro.json` or `.nitro/dev/nitro.json` */
@@ -2776,47 +2642,47 @@ interface NitroModule {
2776
2642
  */
2777
2643
  interface NitroOpenAPIConfig {
2778
2644
  /**
2779
- * OpenAPI meta information
2780
- */
2645
+ * OpenAPI meta information
2646
+ */
2781
2647
  meta?: {
2782
2648
  title?: string;
2783
2649
  description?: string;
2784
2650
  version?: string;
2785
2651
  };
2786
2652
  /**
2787
- * OpenAPI json route
2788
- *
2789
- * Default is `/_openapi.json`
2790
- */
2653
+ * OpenAPI json route
2654
+ *
2655
+ * Default is `/_openapi.json`
2656
+ */
2791
2657
  route?: string;
2792
2658
  /**
2793
- * Enable OpenAPI generation for production builds
2794
- */
2659
+ * Enable OpenAPI generation for production builds
2660
+ */
2795
2661
  production?: false | "runtime" | "prerender";
2796
2662
  /**
2797
- * UI configurations
2798
- */
2663
+ * UI configurations
2664
+ */
2799
2665
  ui?: {
2800
2666
  /**
2801
- * Scalar UI configuration
2802
- */
2803
- scalar?: false | (Partial<unknown> & {
2667
+ * Scalar UI configuration
2668
+ */
2669
+ scalar?: false | Partial<unknown> & {
2804
2670
  /**
2805
- * Scalar UI route
2806
- *
2807
- * Default is `/_scalar`
2808
- */
2671
+ * Scalar UI route
2672
+ *
2673
+ * Default is `/_scalar`
2674
+ */
2809
2675
  route?: string;
2810
- });
2676
+ };
2811
2677
  /**
2812
- * Swagger UI configuration
2813
- */
2678
+ * Swagger UI configuration
2679
+ */
2814
2680
  swagger?: false | {
2815
2681
  /**
2816
- * Swagger UI route
2817
- *
2818
- * Default is `/_swagger`
2819
- */
2682
+ * Swagger UI route
2683
+ *
2684
+ * Default is `/_swagger`
2685
+ */
2820
2686
  route?: string;
2821
2687
  };
2822
2688
  };
@@ -2834,6 +2700,7 @@ interface NitroPresetMeta {
2834
2700
  }
2835
2701
  //#endregion
2836
2702
  //#region src/types/config.d.ts
2703
+ type RollupCommonJSOptions = NonNullable<Parameters<typeof commonjs.default>[0]>;
2837
2704
  /**
2838
2705
  * Nitro normalized options (nitro.options)
2839
2706
  */
@@ -2880,67 +2747,67 @@ interface NitroOptions extends PresetOptions {
2880
2747
  };
2881
2748
  features: {
2882
2749
  /**
2883
- * Enable runtime hooks for request and response.
2884
- *
2885
- * By default this feature will be enabled if there is at least one nitro plugin.
2886
- */
2750
+ * Enable runtime hooks for request and response.
2751
+ *
2752
+ * By default this feature will be enabled if there is at least one nitro plugin.
2753
+ */
2887
2754
  runtimeHooks?: boolean;
2888
2755
  /**
2889
- * Enable WebSocket support
2890
- */
2756
+ * Enable WebSocket support
2757
+ */
2891
2758
  websocket?: boolean;
2892
2759
  };
2893
2760
  /**
2894
- *
2895
- * @see https://github.com/unjs/unwasm
2896
- */
2761
+ *
2762
+ * @see https://github.com/unjs/unwasm
2763
+ */
2897
2764
  wasm?: false | UnwasmPluginOptions;
2898
2765
  openAPI?: NitroOpenAPIConfig;
2899
2766
  experimental: {
2900
2767
  openAPI?: boolean;
2901
2768
  /**
2902
- * See https://github.com/microsoft/TypeScript/pull/51669
2903
- */
2769
+ * See https://github.com/microsoft/TypeScript/pull/51669
2770
+ */
2904
2771
  typescriptBundlerResolution?: boolean;
2905
2772
  /**
2906
- * Enable native async context support for useRequest()
2907
- */
2773
+ * Enable native async context support for useRequest()
2774
+ */
2908
2775
  asyncContext?: boolean;
2909
2776
  /**
2910
- * Disable Experimental Sourcemap Minification
2911
- */
2777
+ * Disable Experimental Sourcemap Minification
2778
+ */
2912
2779
  sourcemapMinify?: false;
2913
2780
  /**
2914
- * Allow env expansion in runtime config
2915
- *
2916
- * @see https://github.com/nitrojs/nitro/pull/2043
2917
- */
2781
+ * Allow env expansion in runtime config
2782
+ *
2783
+ * @see https://github.com/nitrojs/nitro/pull/2043
2784
+ */
2918
2785
  envExpansion?: boolean;
2919
2786
  /**
2920
- * Enable WebSocket support
2921
- *
2922
- * @see https://nitro.build/guide/websocket
2923
- *
2924
- * @deprecated use `features.websocket` instead.
2925
- */
2787
+ * Enable WebSocket support
2788
+ *
2789
+ * @see https://nitro.build/guide/websocket
2790
+ *
2791
+ * @deprecated use `features.websocket` instead.
2792
+ */
2926
2793
  websocket?: boolean;
2927
2794
  /**
2928
- * Enable experimental Database support
2929
- *
2930
- * @see https://nitro.build/guide/database
2931
- */
2795
+ * Enable experimental Database support
2796
+ *
2797
+ * @see https://nitro.build/guide/database
2798
+ */
2932
2799
  database?: boolean;
2933
2800
  /**
2934
- * Enable experimental Tasks support
2935
- *
2936
- * @see https://nitro.build/guide/tasks
2937
- */
2801
+ * Enable experimental Tasks support
2802
+ *
2803
+ * @see https://nitro.build/guide/tasks
2804
+ */
2938
2805
  tasks?: boolean;
2939
2806
  /**
2940
- * Infer path aliases from tsconfig.json
2941
- *
2942
- * @default true
2943
- */
2807
+ * Infer path aliases from tsconfig.json
2808
+ *
2809
+ * @default true
2810
+ */
2944
2811
  tsconfigPaths?: boolean;
2945
2812
  };
2946
2813
  future: {
@@ -2991,8 +2858,8 @@ interface NitroOptions extends PresetOptions {
2991
2858
  devErrorHandler: NitroErrorHandler;
2992
2859
  prerender: {
2993
2860
  /**
2994
- * Prerender HTML routes within subfolders (`/test` would produce `/test/index.html`)
2995
- */
2861
+ * Prerender HTML routes within subfolders (`/test` would produce `/test/index.html`)
2862
+ */
2996
2863
  autoSubfolderIndex?: boolean;
2997
2864
  concurrency?: number;
2998
2865
  interval?: number;
@@ -3002,14 +2869,14 @@ interface NitroOptions extends PresetOptions {
3002
2869
  ignoreUnprefixedPublicAssets?: boolean;
3003
2870
  routes?: string[];
3004
2871
  /**
3005
- * Amount of retries. Pass Infinity to retry indefinitely.
3006
- * @default 3
3007
- */
2872
+ * Amount of retries. Pass Infinity to retry indefinitely.
2873
+ * @default 3
2874
+ */
3008
2875
  retry?: number;
3009
2876
  /**
3010
- * Delay between each retry in ms.
3011
- * @default 500
3012
- */
2877
+ * Delay between each retry in ms.
2878
+ * @default 500
2879
+ */
3013
2880
  retryDelay?: number;
3014
2881
  };
3015
2882
  builder?: "rollup" | "rolldown" | "vite";
@@ -3034,16 +2901,16 @@ interface NitroOptions extends PresetOptions {
3034
2901
  generateTsConfig?: boolean;
3035
2902
  tsConfig?: Partial<TSConfig>;
3036
2903
  /**
3037
- * Path of the generated types directory.
3038
- *
3039
- * Default is `node_modules/.nitro/types`
3040
- */
2904
+ * Path of the generated types directory.
2905
+ *
2906
+ * Default is `node_modules/.nitro/types`
2907
+ */
3041
2908
  generatedTypesDir?: string;
3042
2909
  /**
3043
- * Path of the generated `tsconfig.json` relative to `typescript.generatedTypesDir`
3044
- *
3045
- * Default is `tsconfig.json` (`node_modules/.nitro/types/tsconfig.json`)
3046
- */
2910
+ * Path of the generated `tsconfig.json` relative to `typescript.generatedTypesDir`
2911
+ *
2912
+ * Default is `tsconfig.json` (`node_modules/.nitro/types/tsconfig.json`)
2913
+ */
3047
2914
  tsconfigPath?: string;
3048
2915
  };
3049
2916
  hooks: NestedHooks<NitroHooks>;
@@ -3069,7 +2936,7 @@ interface NitroConfig extends Partial<Omit<NitroOptions, "routeRules" | "rollupC
3069
2936
  rollupConfig?: Partial<RollupConfig>;
3070
2937
  compatibilityDate?: CompatibilityDateSpec;
3071
2938
  unenv?: Preset | Preset[];
3072
- serverDir?: boolean | "./" | "./server" | (string & {});
2939
+ serverDir?: boolean | "./" | "./server" | string & {};
3073
2940
  serverEntry?: string | NitroOptions["serverEntry"];
3074
2941
  renderer?: false | NitroOptions["renderer"];
3075
2942
  output?: Partial<NitroOptions["output"]>;
@@ -3086,10 +2953,10 @@ interface PublicAssetDir {
3086
2953
  maxAge: number;
3087
2954
  dir: string;
3088
2955
  /**
3089
- * Pass false to disable ignore patterns when scanning the directory, or
3090
- * pass an array of glob patterns to ignore (which will override global
3091
- * nitro.ignore patterns).
3092
- */
2956
+ * Pass false to disable ignore patterns when scanning the directory, or
2957
+ * pass an array of glob patterns to ignore (which will override global
2958
+ * nitro.ignore patterns).
2959
+ */
3093
2960
  ignore?: false | string[];
3094
2961
  }
3095
2962
  interface CompressOptions {
@@ -3111,7 +2978,7 @@ interface StorageMounts {
3111
2978
  [option: string]: any;
3112
2979
  };
3113
2980
  }
3114
- type DatabaseConnectionName = "default" | (string & {});
2981
+ type DatabaseConnectionName = "default" | string & {};
3115
2982
  type DatabaseConnectionConfig = {
3116
2983
  connector: ConnectorName;
3117
2984
  options?: {