nitro-nightly 3.0.1-20260119-145349-d0c4950f → 3.0.1-20260120-020848-6786d069

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 (70) hide show
  1. package/dist/_build/rolldown.mjs +13 -8
  2. package/dist/_build/vite.build.mjs +1 -1
  3. package/dist/_chunks/dev.mjs +5 -3
  4. package/dist/_chunks/nitro.mjs +24 -1183
  5. package/dist/_chunks/nitro2.mjs +248 -91
  6. package/dist/_chunks/nitro3.mjs +2696 -0
  7. package/dist/_chunks/nitro4.mjs +176 -0
  8. package/dist/_chunks/nitro5.mjs +733 -0
  9. package/dist/_chunks/nitro6.mjs +1458 -0
  10. package/dist/_chunks/nitro7.mjs +7561 -0
  11. package/dist/_chunks/nitro8.mjs +3524 -0
  12. package/dist/_chunks/nitro9.mjs +1729 -0
  13. package/dist/_libs/_.mjs +3 -0
  14. package/dist/_libs/_2.mjs +3 -0
  15. package/dist/_libs/_3.mjs +4 -0
  16. package/dist/_libs/_4.mjs +6 -0
  17. package/dist/_libs/_5.mjs +3 -0
  18. package/dist/_libs/_6.mjs +3 -0
  19. package/dist/_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs +8900 -0
  20. package/dist/_libs/{c12.mjs → c12+dotenv+rc9.mjs} +12 -105
  21. package/dist/_libs/{chokidar.mjs → chokidar+readdirp.mjs} +2 -9
  22. package/dist/_libs/confbox+exsolve+pkg-types.mjs +1249 -0
  23. package/dist/_libs/confbox.mjs +70 -2488
  24. package/dist/_libs/confbox2.mjs +786 -0
  25. package/dist/_libs/confbox3.mjs +404 -0
  26. package/dist/_libs/confbox4.mjs +3 -0
  27. package/dist/_libs/estree-walker+unimport.mjs +378 -0
  28. package/dist/_libs/fdir+picomatch+tinyglobby.mjs +2471 -0
  29. package/dist/_libs/gen-mapping+remapping+resolve-uri+trace-mapping+unimport+unplugin+unplugin-utils+webpack-virtual-modules.mjs +2150 -0
  30. package/dist/_libs/giget+node-fetch-native.mjs +2692 -0
  31. package/dist/_libs/httpxy.mjs +1 -6
  32. package/dist/_libs/local-pkg+quansync+unimport.mjs +1526 -0
  33. package/dist/_libs/nypm+tinyexec.mjs +858 -0
  34. package/dist/_libs/pathe.mjs +164 -0
  35. package/dist/_libs/perfect-debounce.mjs +89 -0
  36. package/dist/_libs/{@rollup/plugin-inject.mjs → plugin-alias+plugin-inject.mjs} +65 -2
  37. package/dist/_libs/std-env.mjs +158 -0
  38. package/dist/_libs/unimport.mjs +5 -1781
  39. package/dist/_libs/vite-plugin-fullstack.mjs +26 -0
  40. package/dist/_presets.mjs +8 -3
  41. package/dist/builder.mjs +8 -6
  42. package/dist/cli/_chunks/build.mjs +1 -1
  43. package/dist/cli/_chunks/dev.mjs +3 -2
  44. package/dist/cli/_chunks/list.mjs +1 -1
  45. package/dist/cli/_chunks/prepare.mjs +1 -1
  46. package/dist/cli/_chunks/run.mjs +1 -1
  47. package/dist/cli/index.mjs +1 -1
  48. package/dist/types/index.d.mts +2410 -1174
  49. package/dist/vite.d.mts +13 -13
  50. package/dist/vite.mjs +640 -16
  51. package/package.json +9 -9
  52. package/dist/_build/common.mjs +0 -24931
  53. package/dist/_build/rollup.mjs +0 -201
  54. package/dist/_chunks/utils.mjs +0 -254
  55. package/dist/_common.mjs +0 -45
  56. package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +0 -652
  57. package/dist/_libs/@jridgewell/gen-mapping.mjs +0 -448
  58. package/dist/_libs/@jridgewell/remapping.mjs +0 -117
  59. package/dist/_libs/@rollup/plugin-alias.mjs +0 -64
  60. package/dist/_libs/@rollup/plugin-commonjs.mjs +0 -1300
  61. package/dist/_libs/@rollup/plugin-json.mjs +0 -36
  62. package/dist/_libs/@rollup/plugin-node-resolve.mjs +0 -1972
  63. package/dist/_libs/escape-string-regexp.mjs +0 -8
  64. package/dist/_libs/estree-walker.mjs +0 -187
  65. package/dist/_libs/giget.mjs +0 -3550
  66. package/dist/_libs/klona.mjs +0 -38
  67. package/dist/_libs/rou3.mjs +0 -322
  68. package/dist/_libs/tsconfck.mjs +0 -832
  69. package/dist/_libs/ultrahtml.mjs +0 -138
  70. package/dist/cli/_chunks/task.mjs +0 -16
@@ -1,9 +1,13 @@
1
1
  import { ConsolaInstance, LogLevel } from "consola";
2
2
  import { Hookable, HookableCore, NestedHooks } from "hookable";
3
+ import { Stats } from "node:fs";
4
+ import { Jiti, JitiOptions } from "jiti";
3
5
  import { version } from "nitro/meta";
4
- import { IncomingMessage, OutgoingMessage } from "node:http";
6
+ import http, { IncomingMessage, OutgoingMessage } from "node:http";
7
+ import { EventEmitter } from "node:events";
5
8
  import { H3Core, HTTPError, HTTPEvent, HTTPHandler, HTTPMethod, Middleware, ProxyOptions } from "h3";
6
- import { Duplex } from "node:stream";
9
+ import * as stream from "node:stream";
10
+ import { Duplex, Readable } from "node:stream";
7
11
  import { ServerRequest, ServerRequest as ServerRequest$1 } from "srvx";
8
12
  import "nitro";
9
13
  import "nitro/app";
@@ -18,24 +22,20 @@ import { Preset } from "unenv";
18
22
  import { ConnectorName } from "db0";
19
23
  import { BuiltinDriverName } from "unstorage";
20
24
  import { JsxOptions, TransformOptions } from "oxc-transform";
25
+ import "vite";
21
26
  import { MinifyOptions } from "oxc-minify";
22
- import { InputOptions, OutputOptions } from "rollup";
27
+ import { diff } from "ohash/utils";
28
+ import "rolldown";
29
+ import { InputOptions, OutputOptions, Plugin as Plugin$1 } from "rollup";
30
+ import { CompilerOptions, TypeAcquisition } from "typescript";
23
31
  import { Nitro as Nitro$1, RunnerMessageListener as RunnerMessageListener$1 } from "nitro/types";
24
32
  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
33
  import { ExecutionContext, ForwardableEmailMessage, MessageBatch, ScheduledController, TraceItem } from "@cloudflare/workers-types";
31
34
  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";
35
+ import "webpack";
36
+ import "@farmfe/core";
37
+ import "@rspack/core";
38
+ import "unloader";
39
39
 
40
40
  //#region src/types/fetch/fetch.d.ts
41
41
  interface InternalApi {}
@@ -134,8 +134,8 @@ interface CacheOptions<T = any, ArgsT extends unknown[] = any[]> {
134
134
  group?: string;
135
135
  integrity?: any;
136
136
  /**
137
- * Number of seconds to cache the response. Defaults to 1.
138
- */
137
+ * Number of seconds to cache the response. Defaults to 1.
138
+ */
139
139
  maxAge?: number;
140
140
  swr?: boolean;
141
141
  staleMaxAge?: number;
@@ -192,7 +192,7 @@ interface NitroRuntimeHooks {
192
192
  }
193
193
  //#endregion
194
194
  //#region src/types/runtime/task.d.ts
195
- type MaybePromise$1<T> = T | Promise<T>;
195
+ type MaybePromise$2<T> = T | Promise<T>;
196
196
  /** @experimental */
197
197
  interface TaskContext {}
198
198
  /** @experimental */
@@ -217,7 +217,7 @@ interface TaskResult<RT = unknown> {
217
217
  /** @experimental */
218
218
  interface Task<RT = unknown> {
219
219
  meta?: TaskMeta;
220
- run(event: TaskEvent): MaybePromise$1<{
220
+ run(event: TaskEvent): MaybePromise$2<{
221
221
  result?: RT;
222
222
  }>;
223
223
  }
@@ -227,39 +227,597 @@ interface TaskRunnerOptions {
227
227
  buildDir?: string;
228
228
  }
229
229
  //#endregion
230
+ //#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.55.2/node_modules/@rollup/pluginutils/types/index.d.ts
231
+ /**
232
+ * A valid `picomatch` glob pattern, or array of patterns.
233
+ */
234
+ type FilterPattern$1 = ReadonlyArray<string | RegExp> | string | RegExp | null;
235
+ //#endregion
236
+ //#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.55.2/node_modules/@rollup/plugin-commonjs/types/index.d.ts
237
+ type RequireReturnsDefaultOption = boolean | 'auto' | 'preferred' | 'namespace';
238
+ type DefaultIsModuleExportsOption = boolean | 'auto';
239
+ interface RollupCommonJSOptions$1 {
240
+ /**
241
+ * A picomatch pattern, or array of patterns, which specifies the files in
242
+ * the build the plugin should operate on. By default, all files with
243
+ * extension `".cjs"` or those in `extensions` are included, but you can
244
+ * narrow this list by only including specific files. These files will be
245
+ * analyzed and transpiled if either the analysis does not find ES module
246
+ * specific statements or `transformMixedEsModules` is `true`.
247
+ * @default undefined
248
+ */
249
+ include?: FilterPattern$1;
250
+ /**
251
+ * A picomatch pattern, or array of patterns, which specifies the files in
252
+ * the build the plugin should _ignore_. By default, all files with
253
+ * extensions other than those in `extensions` or `".cjs"` are ignored, but you
254
+ * can exclude additional files. See also the `include` option.
255
+ * @default undefined
256
+ */
257
+ exclude?: FilterPattern$1;
258
+ /**
259
+ * For extensionless imports, search for extensions other than .js in the
260
+ * order specified. Note that you need to make sure that non-JavaScript files
261
+ * are transpiled by another plugin first.
262
+ * @default [ '.js' ]
263
+ */
264
+ extensions?: ReadonlyArray<string>;
265
+ /**
266
+ * If true then uses of `global` won't be dealt with by this plugin
267
+ * @default false
268
+ */
269
+ ignoreGlobal?: boolean;
270
+ /**
271
+ * If false, skips source map generation for CommonJS modules. This will
272
+ * improve performance.
273
+ * @default true
274
+ */
275
+ sourceMap?: boolean;
276
+ /**
277
+ * Some `require` calls cannot be resolved statically to be translated to
278
+ * imports.
279
+ * When this option is set to `false`, the generated code will either
280
+ * directly throw an error when such a call is encountered or, when
281
+ * `dynamicRequireTargets` is used, when such a call cannot be resolved with a
282
+ * configured dynamic require target.
283
+ * Setting this option to `true` will instead leave the `require` call in the
284
+ * code or use it as a fallback for `dynamicRequireTargets`.
285
+ * @default false
286
+ */
287
+ ignoreDynamicRequires?: boolean;
288
+ /**
289
+ * Instructs the plugin whether to enable mixed module transformations. This
290
+ * is useful in scenarios with modules that contain a mix of ES `import`
291
+ * statements and CommonJS `require` expressions. Set to `true` if `require`
292
+ * calls should be transformed to imports in mixed modules, or `false` if the
293
+ * `require` expressions should survive the transformation. The latter can be
294
+ * important if the code contains environment detection, or you are coding
295
+ * for an environment with special treatment for `require` calls such as
296
+ * ElectronJS. See also the `ignore` option.
297
+ * @default false
298
+ */
299
+ transformMixedEsModules?: boolean;
300
+ /**
301
+ * By default, this plugin will try to hoist `require` statements as imports
302
+ * to the top of each file. While this works well for many code bases and
303
+ * allows for very efficient ESM output, it does not perfectly capture
304
+ * CommonJS semantics as the order of side effects like log statements may
305
+ * change. But it is especially problematic when there are circular `require`
306
+ * calls between CommonJS modules as those often rely on the lazy execution of
307
+ * nested `require` calls.
308
+ *
309
+ * Setting this option to `true` will wrap all CommonJS files in functions
310
+ * which are executed when they are required for the first time, preserving
311
+ * NodeJS semantics. Note that this can have an impact on the size and
312
+ * performance of the generated code.
313
+ *
314
+ * The default value of `"auto"` will only wrap CommonJS files when they are
315
+ * part of a CommonJS dependency cycle, e.g. an index file that is required by
316
+ * many of its dependencies. All other CommonJS files are hoisted. This is the
317
+ * recommended setting for most code bases.
318
+ *
319
+ * `false` will entirely prevent wrapping and hoist all files. This may still
320
+ * work depending on the nature of cyclic dependencies but will often cause
321
+ * problems.
322
+ *
323
+ * You can also provide a picomatch pattern, or array of patterns, to only
324
+ * specify a subset of files which should be wrapped in functions for proper
325
+ * `require` semantics.
326
+ *
327
+ * `"debug"` works like `"auto"` but after bundling, it will display a warning
328
+ * containing a list of ids that have been wrapped which can be used as
329
+ * picomatch pattern for fine-tuning.
330
+ * @default "auto"
331
+ */
332
+ strictRequires?: boolean | FilterPattern$1;
333
+ /**
334
+ * Sometimes you have to leave require statements unconverted. Pass an array
335
+ * containing the IDs or a `id => boolean` function.
336
+ * @default []
337
+ */
338
+ ignore?: ReadonlyArray<string> | ((id: string) => boolean);
339
+ /**
340
+ * In most cases, where `require` calls are inside a `try-catch` clause,
341
+ * they should be left unconverted as it requires an optional dependency
342
+ * that may or may not be installed beside the rolled up package.
343
+ * Due to the conversion of `require` to a static `import` - the call is
344
+ * hoisted to the top of the file, outside the `try-catch` clause.
345
+ *
346
+ * - `true`: Default. All `require` calls inside a `try` will be left unconverted.
347
+ * - `false`: All `require` calls inside a `try` will be converted as if the
348
+ * `try-catch` clause is not there.
349
+ * - `remove`: Remove all `require` calls from inside any `try` block.
350
+ * - `string[]`: Pass an array containing the IDs to left unconverted.
351
+ * - `((id: string) => boolean|'remove')`: Pass a function that controls
352
+ * individual IDs.
353
+ *
354
+ * @default true
355
+ */
356
+ ignoreTryCatch?: boolean | 'remove' | ReadonlyArray<string> | ((id: string) => boolean | 'remove');
357
+ /**
358
+ * Controls how to render imports from external dependencies. By default,
359
+ * this plugin assumes that all external dependencies are CommonJS. This
360
+ * means they are rendered as default imports to be compatible with e.g.
361
+ * NodeJS where ES modules can only import a default export from a CommonJS
362
+ * dependency.
363
+ *
364
+ * If you set `esmExternals` to `true`, this plugin assumes that all
365
+ * external dependencies are ES modules and respect the
366
+ * `requireReturnsDefault` option. If that option is not set, they will be
367
+ * rendered as namespace imports.
368
+ *
369
+ * You can also supply an array of ids to be treated as ES modules, or a
370
+ * function that will be passed each external id to determine whether it is
371
+ * an ES module.
372
+ * @default false
373
+ */
374
+ esmExternals?: boolean | ReadonlyArray<string> | ((id: string) => boolean);
375
+ /**
376
+ * Controls what is returned when requiring an ES module from a CommonJS file.
377
+ * When using the `esmExternals` option, this will also apply to external
378
+ * modules. By default, this plugin will render those imports as namespace
379
+ * imports i.e.
380
+ *
381
+ * ```js
382
+ * // input
383
+ * const foo = require('foo');
384
+ *
385
+ * // output
386
+ * import * as foo from 'foo';
387
+ * ```
388
+ *
389
+ * However, there are some situations where this may not be desired.
390
+ * For these situations, you can change Rollup's behaviour either globally or
391
+ * per module. To change it globally, set the `requireReturnsDefault` option
392
+ * to one of the following values:
393
+ *
394
+ * - `false`: This is the default, requiring an ES module returns its
395
+ * namespace. This is the only option that will also add a marker
396
+ * `__esModule: true` to the namespace to support interop patterns in
397
+ * CommonJS modules that are transpiled ES modules.
398
+ * - `"namespace"`: Like `false`, requiring an ES module returns its
399
+ * namespace, but the plugin does not add the `__esModule` marker and thus
400
+ * creates more efficient code. For external dependencies when using
401
+ * `esmExternals: true`, no additional interop code is generated.
402
+ * - `"auto"`: This is complementary to how `output.exports: "auto"` works in
403
+ * Rollup: If a module has a default export and no named exports, requiring
404
+ * that module returns the default export. In all other cases, the namespace
405
+ * is returned. For external dependencies when using `esmExternals: true`, a
406
+ * corresponding interop helper is added.
407
+ * - `"preferred"`: If a module has a default export, requiring that module
408
+ * always returns the default export, no matter whether additional named
409
+ * exports exist. This is similar to how previous versions of this plugin
410
+ * worked. Again for external dependencies when using `esmExternals: true`,
411
+ * an interop helper is added.
412
+ * - `true`: This will always try to return the default export on require
413
+ * without checking if it actually exists. This can throw at build time if
414
+ * there is no default export. This is how external dependencies are handled
415
+ * when `esmExternals` is not used. The advantage over the other options is
416
+ * that, like `false`, this does not add an interop helper for external
417
+ * dependencies, keeping the code lean.
418
+ *
419
+ * To change this for individual modules, you can supply a function for
420
+ * `requireReturnsDefault` instead. This function will then be called once for
421
+ * each required ES module or external dependency with the corresponding id
422
+ * and allows you to return different values for different modules.
423
+ * @default false
424
+ */
425
+ requireReturnsDefault?: RequireReturnsDefaultOption | ((id: string) => RequireReturnsDefaultOption);
426
+ /**
427
+ * @default "auto"
428
+ */
429
+ defaultIsModuleExports?: DefaultIsModuleExportsOption | ((id: string) => DefaultIsModuleExportsOption);
430
+ /**
431
+ * Some modules contain dynamic `require` calls, or require modules that
432
+ * contain circular dependencies, which are not handled well by static
433
+ * imports. Including those modules as `dynamicRequireTargets` will simulate a
434
+ * CommonJS (NodeJS-like) environment for them with support for dynamic
435
+ * dependencies. It also enables `strictRequires` for those modules.
436
+ *
437
+ * Note: In extreme cases, this feature may result in some paths being
438
+ * rendered as absolute in the final bundle. The plugin tries to avoid
439
+ * exposing paths from the local machine, but if you are `dynamicRequirePaths`
440
+ * with paths that are far away from your project's folder, that may require
441
+ * replacing strings like `"/Users/John/Desktop/foo-project/"` -> `"/"`.
442
+ */
443
+ dynamicRequireTargets?: string | ReadonlyArray<string>;
444
+ /**
445
+ * To avoid long paths when using the `dynamicRequireTargets` option, you can use this option to specify a directory
446
+ * that is a common parent for all files that use dynamic require statements. Using a directory higher up such as `/`
447
+ * may lead to unnecessarily long paths in the generated code and may expose directory names on your machine like your
448
+ * home directory name. By default, it uses the current working directory.
449
+ */
450
+ dynamicRequireRoot?: string;
451
+ /**
452
+ * When enabled, external Node built-ins (e.g., `node:fs`) required from wrapped CommonJS modules
453
+ * will use `createRequire(import.meta.url)` instead of being hoisted as ESM imports. This prevents
454
+ * eager loading of Node built-ins at module initialization time.
455
+ *
456
+ * Note: This option adds a dependency on `node:module` in the output, which may not be available
457
+ * in some environments like edge runtimes (Cloudflare Workers, Vercel Edge Runtime).
458
+ *
459
+ * @default false
460
+ */
461
+ requireNodeBuiltins?: boolean;
462
+ }
463
+ /**
464
+ * Convert CommonJS modules to ES6, so they can be included in a Rollup bundle
465
+ */
466
+ declare function commonjs(options?: RollupCommonJSOptions$1): Plugin$1;
467
+ //#endregion
468
+ //#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.ts
469
+ type AWF = {
470
+ stabilityThreshold: number;
471
+ pollInterval: number;
472
+ };
473
+ type BasicOpts = {
474
+ persistent: boolean;
475
+ ignoreInitial: boolean;
476
+ followSymlinks: boolean;
477
+ cwd?: string;
478
+ usePolling: boolean;
479
+ interval: number;
480
+ binaryInterval: number;
481
+ alwaysStat?: boolean;
482
+ depth?: number;
483
+ ignorePermissionErrors: boolean;
484
+ atomic: boolean | number;
485
+ };
486
+ type ChokidarOptions = Partial<BasicOpts & {
487
+ ignored: Matcher | Matcher[];
488
+ awaitWriteFinish: boolean | Partial<AWF>;
489
+ }>;
490
+ type MatchFunction = (val: string, stats?: Stats) => boolean;
491
+ interface MatcherObject {
492
+ path: string;
493
+ recursive?: boolean;
494
+ }
495
+ type Matcher = string | RegExp | MatchFunction | MatcherObject;
496
+ //#endregion
497
+ //#region node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.d.mts
498
+ interface TemplateInfo {
499
+ name: string;
500
+ tar: string;
501
+ version?: string;
502
+ subdir?: string;
503
+ url?: string;
504
+ defaultDir?: string;
505
+ headers?: Record<string, string | undefined>;
506
+ source?: never;
507
+ dir?: never;
508
+ [key: string]: any;
509
+ }
510
+ type TemplateProvider = (input: string, options: {
511
+ auth?: string;
512
+ }) => TemplateInfo | Promise<TemplateInfo> | null;
513
+ interface DownloadTemplateOptions {
514
+ provider?: string;
515
+ force?: boolean;
516
+ forceClean?: boolean;
517
+ offline?: boolean;
518
+ preferOffline?: boolean;
519
+ providers?: Record<string, TemplateProvider>;
520
+ dir?: string;
521
+ registry?: false | string;
522
+ cwd?: string;
523
+ auth?: string;
524
+ install?: boolean;
525
+ silent?: boolean;
526
+ }
527
+ //#endregion
528
+ //#region node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.d.mts
529
+ //#region src/dotenv.d.ts
530
+ interface DotenvOptions {
531
+ /**
532
+ * The project root directory (either absolute or relative to the current working directory).
533
+ *
534
+ * Defaults to `options.cwd` in `loadConfig` context, or `process.cwd()` when used as standalone.
535
+ */
536
+ cwd?: string;
537
+ /**
538
+ * What file or files to look in for environment variables (either absolute or relative
539
+ * to the current working directory). For example, `.env`.
540
+ * With the array type, the order enforce the env loading priority (last one overrides).
541
+ */
542
+ fileName?: string | string[];
543
+ /**
544
+ * Whether to interpolate variables within .env.
545
+ *
546
+ * @example
547
+ * ```env
548
+ * BASE_DIR="/test"
549
+ * # resolves to "/test/further"
550
+ * ANOTHER_DIR="${BASE_DIR}/further"
551
+ * ```
552
+ */
553
+ interpolate?: boolean;
554
+ /**
555
+ * An object describing environment variables (key, value pairs).
556
+ */
557
+ env?: NodeJS.ProcessEnv;
558
+ }
559
+ declare global {
560
+ var __c12_dotenv_vars__: Map<Record<string, any>, Set<string>>;
561
+ } //#endregion
562
+ //#region src/types.d.ts
563
+ interface ConfigLayerMeta {
564
+ name?: string;
565
+ [key: string]: any;
566
+ }
567
+ type UserInputConfig = Record<string, any>;
568
+ interface C12InputConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
569
+ $test?: T;
570
+ $development?: T;
571
+ $production?: T;
572
+ $env?: Record<string, T>;
573
+ $meta?: MT;
574
+ }
575
+ interface SourceOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
576
+ /** Custom meta for layer */
577
+ meta?: MT;
578
+ /** Layer config overrides */
579
+ overrides?: T;
580
+ [key: string]: any;
581
+ /**
582
+ * Options for cloning remote sources
583
+ *
584
+ * @see https://giget.unjs.io
585
+ */
586
+ giget?: DownloadTemplateOptions;
587
+ /**
588
+ * Install dependencies after cloning
589
+ *
590
+ * @see https://nypm.unjs.io
591
+ */
592
+ install?: boolean;
593
+ /**
594
+ * Token for cloning private sources
595
+ *
596
+ * @see https://giget.unjs.io#providing-token-for-private-repositories
597
+ */
598
+ auth?: string;
599
+ }
600
+ interface ConfigLayer<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
601
+ config: T | null;
602
+ source?: string;
603
+ sourceOptions?: SourceOptions<T, MT>;
604
+ meta?: MT;
605
+ cwd?: string;
606
+ configFile?: string;
607
+ }
608
+ interface ResolvedConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends ConfigLayer<T, MT> {
609
+ config: T;
610
+ layers?: ConfigLayer<T, MT>[];
611
+ cwd?: string;
612
+ _configFile?: string;
613
+ }
614
+ type ConfigSource = "overrides" | "main" | "rc" | "packageJson" | "defaultConfig";
615
+ interface ConfigFunctionContext {
616
+ [key: string]: any;
617
+ }
618
+ interface ResolvableConfigContext<T extends UserInputConfig = UserInputConfig> {
619
+ configs: Record<ConfigSource, T | null | undefined>;
620
+ rawConfigs: Record<ConfigSource, ResolvableConfig<T> | null | undefined>;
621
+ }
622
+ type MaybePromise$1<T> = T | Promise<T>;
623
+ type ResolvableConfig<T extends UserInputConfig = UserInputConfig> = MaybePromise$1<T | null | undefined> | ((ctx: ResolvableConfigContext<T>) => MaybePromise$1<T | null | undefined>);
624
+ interface LoadConfigOptions$2<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
625
+ name?: string;
626
+ cwd?: string;
627
+ configFile?: string;
628
+ rcFile?: false | string;
629
+ globalRc?: boolean;
630
+ dotenv?: boolean | DotenvOptions;
631
+ envName?: string | false;
632
+ packageJson?: boolean | string | string[];
633
+ defaults?: T;
634
+ defaultConfig?: ResolvableConfig<T>;
635
+ overrides?: ResolvableConfig<T>;
636
+ omit$Keys?: boolean;
637
+ /** Context passed to config functions */
638
+ context?: ConfigFunctionContext;
639
+ resolve?: (id: string, options: LoadConfigOptions$2<T, MT>) => null | undefined | ResolvedConfig<T, MT> | Promise<ResolvedConfig<T, MT> | undefined | null>;
640
+ jiti?: Jiti;
641
+ jitiOptions?: JitiOptions;
642
+ giget?: false | DownloadTemplateOptions;
643
+ merger?: (...sources: Array<T | null | undefined>) => T;
644
+ extend?: false | {
645
+ extendKey?: string | string[];
646
+ };
647
+ configFileRequired?: boolean;
648
+ }
649
+ //#endregion
650
+ //#region src/watch.d.ts
651
+ type DiffEntries = ReturnType<typeof diff>;
652
+ type ConfigWatcher<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> = ResolvedConfig<T, MT> & {
653
+ watchingFiles: string[];
654
+ unwatch: () => Promise<void>;
655
+ };
656
+ interface WatchConfigOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends LoadConfigOptions$2<T, MT> {
657
+ chokidarOptions?: ChokidarOptions;
658
+ debounce?: false | number;
659
+ onWatch?: (event: {
660
+ type: "created" | "updated" | "removed";
661
+ path: string;
662
+ }) => void | Promise<void>;
663
+ acceptHMR?: (context: {
664
+ getDiff: () => DiffEntries;
665
+ newConfig: ResolvedConfig<T, MT>;
666
+ oldConfig: ResolvedConfig<T, MT>;
667
+ }) => void | boolean | Promise<void | boolean>;
668
+ onUpdate?: (context: {
669
+ getDiff: () => ReturnType<typeof diff>;
670
+ newConfig: ResolvedConfig<T, MT>;
671
+ oldConfig: ResolvedConfig<T, MT>;
672
+ }) => void | Promise<void>;
673
+ }
674
+ //#endregion
675
+ //#region node_modules/.pnpm/compatx@0.2.0/node_modules/compatx/dist/index.d.mts
676
+ /**
677
+ * Known platform names
678
+ */
679
+ declare const platforms: readonly ["aws", "azure", "cloudflare", "deno", "firebase", "netlify", "vercel"];
680
+ /**
681
+ * Known platform name
682
+ */
683
+ type PlatformName = (typeof platforms)[number] | (string & {});
684
+ /**
685
+ * Normalize the compatibility dates from input config and defaults.
686
+ */
687
+ type Year = `${number}${number}${number}${number}`;
688
+ type Month = `${"0" | "1"}${number}`;
689
+ type Day = `${"0" | "1" | "2" | "3"}${number}`;
690
+ /**
691
+ * Typed date string in `YYYY-MM-DD` format
692
+ *
693
+ * Empty string is used to represent an "unspecified" date.
694
+ *
695
+ * "latest" is used to represent the latest date available (date of today).
696
+ */
697
+ type DateString = "" | "latest" | `${Year}-${Month}-${Day}`;
698
+ /**
699
+ * Last known compatibility dates for platforms
700
+ *
701
+ * @example
702
+ * {
703
+ * "default": "2024-01-01",
704
+ * "cloudflare": "2024-03-01",
705
+ * }
706
+ */
707
+ type CompatibilityDates = {
708
+ /**
709
+ * Default compatibility date for all unspecified platforms (required)
710
+ */
711
+ default: DateString;
712
+ } & Partial<Record<PlatformName, DateString>>;
713
+ /**
714
+ * Last known compatibility date for the used platform
715
+ */
716
+ type CompatibilityDateSpec = DateString | Partial<CompatibilityDates>;
717
+ /**
718
+ * Get compatibility updates applicable for the user given platform and date range.
719
+ */
720
+ //#endregion
721
+ //#region node_modules/.pnpm/httpxy@0.1.7/node_modules/httpxy/dist/index.d.ts
722
+ interface ProxyTargetDetailed {
723
+ host: string;
724
+ port: number;
725
+ protocol?: string;
726
+ hostname?: string;
727
+ socketPath?: string;
728
+ key?: string;
729
+ passphrase?: string;
730
+ pfx?: Buffer | string;
731
+ cert?: string;
732
+ ca?: string;
733
+ ciphers?: string;
734
+ secureProtocol?: string;
735
+ }
736
+ type ProxyTarget = ProxyTargetUrl | ProxyTargetDetailed;
737
+ type ProxyTargetUrl = string | Partial<URL>;
738
+ interface ProxyServerOptions {
739
+ /** URL string to be parsed with the url module. */
740
+ target?: ProxyTarget;
741
+ /** URL string to be parsed with the url module. */
742
+ forward?: ProxyTargetUrl;
743
+ /** Object to be passed to http(s).request. */
744
+ agent?: any;
745
+ /** Object to be passed to https.createServer(). */
746
+ ssl?: any;
747
+ /** If you want to proxy websockets. */
748
+ ws?: boolean;
749
+ /** Adds x- forward headers. */
750
+ xfwd?: boolean;
751
+ /** Verify SSL certificate. */
752
+ secure?: boolean;
753
+ /** Explicitly specify if we are proxying to another proxy. */
754
+ toProxy?: boolean;
755
+ /** Specify whether you want to prepend the target's path to the proxy path. */
756
+ prependPath?: boolean;
757
+ /** Specify whether you want to ignore the proxy path of the incoming request. */
758
+ ignorePath?: boolean;
759
+ /** Local interface string to bind for outgoing connections. */
760
+ localAddress?: string;
761
+ /** Changes the origin of the host header to the target URL. */
762
+ changeOrigin?: boolean;
763
+ /** specify whether you want to keep letter case of response header key */
764
+ preserveHeaderKeyCase?: boolean;
765
+ /** Basic authentication i.e. 'user:password' to compute an Authorization header. */
766
+ auth?: string;
767
+ /** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
768
+ hostRewrite?: string;
769
+ /** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
770
+ autoRewrite?: boolean;
771
+ /** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
772
+ protocolRewrite?: string;
773
+ /** Rewrites domain of set-cookie headers. */
774
+ cookieDomainRewrite?: false | string | {
775
+ [oldDomain: string]: string;
776
+ };
777
+ /** Rewrites path of set-cookie headers. Default: false */
778
+ cookiePathRewrite?: false | string | {
779
+ [oldPath: string]: string;
780
+ };
781
+ /** Object with extra headers to be added to target requests. */
782
+ headers?: {
783
+ [header: string]: string;
784
+ };
785
+ /** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
786
+ proxyTimeout?: number;
787
+ /** Timeout (in milliseconds) for incoming requests */
788
+ timeout?: number;
789
+ /** If set to true, none of the webOutgoing passes are called and it's your responsibility to appropriately return the response by listening and acting on the proxyRes event */
790
+ selfHandleResponse?: boolean;
791
+ /** Buffer */
792
+ buffer?: stream.Stream;
793
+ }
794
+ //#endregion
230
795
  //#region src/presets/aws-amplify/types.d.ts
231
796
  type AmplifyImageSettings = {
232
- /** Array of supported image widths */
233
- sizes: number[];
797
+ /** Array of supported image widths */sizes: number[];
234
798
  /**
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
- */
799
+ * Array of allowed external domains that can use Image Optimization.
800
+ * Leave empty for only allowing the deployment domain to use Image Optimization.
801
+ */
238
802
  domains: string[];
239
803
  /**
240
- * Array of allowed external patterns that can use Image Optimization.
241
- * Similar to `domains` but provides more control with RegExp.
242
- */
804
+ * Array of allowed external patterns that can use Image Optimization.
805
+ * Similar to `domains` but provides more control with RegExp.
806
+ */
243
807
  remotePatterns: {
244
- /** The protocol of the allowed remote pattern. Can be `http` or `https`. */
245
- protocol?: "http" | "https";
808
+ /** The protocol of the allowed remote pattern. Can be `http` or `https`. */protocol?: "http" | "https";
246
809
  /**
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. */
810
+ * The hostname of the allowed remote pattern.
811
+ * Can be literal or wildcard. Single `*` matches a single subdomain.
812
+ * Double `**` matches any number of subdomains.
813
+ * We will disallow blanket wildcards of `**` with nothing else.
814
+ */
815
+ hostname: string; /** The port of the allowed remote pattern. */
816
+ port?: string; /** The pathname of the allowed remote pattern. */
256
817
  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. */
818
+ }[]; /** Array of allowed output image formats. */
819
+ formats: ("image/avif" | "image/webp" | "image/gif" | "image/png" | "image/jpeg")[]; /** Cache duration (in seconds) for the optimized images. */
820
+ minimumCacheTTL: number; /** Allow SVG input image URLs. This is disabled by default for security purposes. */
263
821
  dangerouslyAllowSVG: boolean;
264
822
  };
265
823
  interface AWSAmplifyOptions {
@@ -339,56 +897,56 @@ type CloudchamberConfig = {
339
897
  */
340
898
  type ContainerApp = {
341
899
  /**
342
- * Name of the application
343
- * @optional Defaults to `worker_name-class_name` if not specified.
344
- */
900
+ * Name of the application
901
+ * @optional Defaults to `worker_name-class_name` if not specified.
902
+ */
345
903
  name?: string;
346
904
  /**
347
- * Number of application instances
348
- * @deprecated
349
- * @hidden
350
- */
905
+ * Number of application instances
906
+ * @deprecated
907
+ * @hidden
908
+ */
351
909
  instances?: number;
352
910
  /**
353
- * Number of maximum application instances.
354
- * @optional
355
- */
911
+ * Number of maximum application instances.
912
+ * @optional
913
+ */
356
914
  max_instances?: number;
357
915
  /**
358
- * The path to a Dockerfile, or an image URI for the Cloudflare registry.
359
- */
916
+ * The path to a Dockerfile, or an image URI for the Cloudflare registry.
917
+ */
360
918
  image: string;
361
919
  /**
362
- * Build context of the application.
363
- * @optional - defaults to the directory of `image`.
364
- */
920
+ * Build context of the application.
921
+ * @optional - defaults to the directory of `image`.
922
+ */
365
923
  image_build_context?: string;
366
924
  /**
367
- * Image variables to be passed along the image at build time.
368
- * @optional
369
- */
925
+ * Image variables to be passed along the image at build time.
926
+ * @optional
927
+ */
370
928
  image_vars?: Record<string, string>;
371
929
  /**
372
- * The class name of the Durable Object the container is connected to.
373
- */
930
+ * The class name of the Durable Object the container is connected to.
931
+ */
374
932
  class_name: string;
375
933
  /**
376
- * The scheduling policy of the application
377
- * @optional
378
- * @default "default"
379
- */
934
+ * The scheduling policy of the application
935
+ * @optional
936
+ * @default "default"
937
+ */
380
938
  scheduling_policy?: "regional" | "moon" | "default";
381
939
  /**
382
- * The instance type to be used for the container. This sets preconfigured options for vcpu and memory
383
- * @optional
384
- */
940
+ * The instance type to be used for the container. This sets preconfigured options for vcpu and memory
941
+ * @optional
942
+ */
385
943
  instance_type?: "dev" | "basic" | "standard";
386
944
  /**
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
- */
945
+ * @deprecated Use top level `containers` fields instead.
946
+ * `configuration.image` should be `image`
947
+ * `configuration.disk` should be set via `instance_type`
948
+ * @hidden
949
+ */
392
950
  configuration?: {
393
951
  image?: string;
394
952
  labels?: {
@@ -405,53 +963,48 @@ type ContainerApp = {
405
963
  };
406
964
  };
407
965
  /**
408
- * Scheduling constraints
409
- * @hidden
410
- */
966
+ * Scheduling constraints
967
+ * @hidden
968
+ */
411
969
  constraints?: {
412
970
  regions?: string[];
413
971
  cities?: string[];
414
972
  tier?: number;
415
973
  };
416
974
  /**
417
- * @deprecated use the `class_name` field instead.
418
- * @hidden
419
- */
975
+ * @deprecated use the `class_name` field instead.
976
+ * @hidden
977
+ */
420
978
  durable_objects?: {
421
979
  namespace_id: string;
422
980
  };
423
981
  /**
424
- * How a rollout should be done, defining the size of it
425
- * @optional
426
- * @default 25
427
- * */
982
+ * How a rollout should be done, defining the size of it
983
+ * @optional
984
+ * @default 25
985
+ * */
428
986
  rollout_step_percentage?: number;
429
987
  /**
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
- */
988
+ * How a rollout should be created. It supports the following modes:
989
+ * - full_auto: The container application will be rolled out fully automatically.
990
+ * - none: The container application won't have a roll out or update.
991
+ * - manual: The container application will be rollout fully by manually actioning progress steps.
992
+ * @optional
993
+ * @default "full_auto"
994
+ */
437
995
  rollout_kind?: "full_auto" | "none" | "full_manual";
438
996
  };
439
997
  /**
440
998
  * Configuration in wrangler for Durable Object Migrations
441
999
  */
442
1000
  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. */
1001
+ /** A unique identifier for this migration. */tag: string; /** The new Durable Objects being defined. */
1002
+ new_classes?: string[]; /** The new SQLite Durable Objects being defined. */
1003
+ new_sqlite_classes?: string[]; /** The Durable Objects being renamed. */
450
1004
  renamed_classes?: {
451
1005
  from: string;
452
1006
  to: string;
453
- }[];
454
- /** The Durable Objects being removed. */
1007
+ }[]; /** The Durable Objects being removed. */
455
1008
  deleted_classes?: string[];
456
1009
  };
457
1010
  /**
@@ -460,309 +1013,295 @@ type DurableObjectMigration = {
460
1013
  */
461
1014
  interface EnvironmentInheritable {
462
1015
  /**
463
- * The name of your Worker. Alphanumeric + dashes only.
464
- *
465
- * @inheritable
466
- */
1016
+ * The name of your Worker. Alphanumeric + dashes only.
1017
+ *
1018
+ * @inheritable
1019
+ */
467
1020
  name: string | undefined;
468
1021
  /**
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
- */
1022
+ * This is the ID of the account associated with your zone.
1023
+ * You might have more than one account, so make sure to use
1024
+ * the ID of the account associated with the zone/route you
1025
+ * provide, if you provide one. It can also be specified through
1026
+ * the CLOUDFLARE_ACCOUNT_ID environment variable.
1027
+ *
1028
+ * @inheritable
1029
+ */
477
1030
  account_id: string | undefined;
478
1031
  /**
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
- */
1032
+ * A date in the form yyyy-mm-dd, which will be used to determine
1033
+ * which version of the Workers runtime is used.
1034
+ *
1035
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-dates
1036
+ *
1037
+ * @inheritable
1038
+ */
486
1039
  compatibility_date: string | undefined;
487
1040
  /**
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
- */
1041
+ * A list of flags that enable features from upcoming features of
1042
+ * the Workers runtime, usually used together with compatibility_date.
1043
+ *
1044
+ * More details at https://developers.cloudflare.com/workers/configuration/compatibility-flags/
1045
+ *
1046
+ * @default []
1047
+ * @inheritable
1048
+ */
496
1049
  compatibility_flags: string[];
497
1050
  /**
498
- * The entrypoint/path to the JavaScript file that will be executed.
499
- *
500
- * @inheritable
501
- */
1051
+ * The entrypoint/path to the JavaScript file that will be executed.
1052
+ *
1053
+ * @inheritable
1054
+ */
502
1055
  main: string | undefined;
503
1056
  /**
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
- */
1057
+ * If true then Wrangler will traverse the file tree below `base_dir`;
1058
+ * Any files that match `rules` will be included in the deployed Worker.
1059
+ * Defaults to true if `no_bundle` is true, otherwise false.
1060
+ *
1061
+ * @inheritable
1062
+ */
510
1063
  find_additional_modules: boolean | undefined;
511
1064
  /**
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
- */
1065
+ * Determines whether Wrangler will preserve bundled file names.
1066
+ * Defaults to false.
1067
+ * If left unset, files will be named using the pattern ${fileHash}-${basename},
1068
+ * for example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`.
1069
+ *
1070
+ * @inheritable
1071
+ */
519
1072
  preserve_file_names: boolean | undefined;
520
1073
  /**
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
- */
1074
+ * The directory in which module rules should be evaluated when including additional files into a Worker deployment.
1075
+ * This defaults to the directory containing the `main` entry point of the Worker if not specified.
1076
+ *
1077
+ * @inheritable
1078
+ */
526
1079
  base_dir: string | undefined;
527
1080
  /**
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
- */
1081
+ * Whether we use <name>.<subdomain>.workers.dev to
1082
+ * test and deploy your Worker.
1083
+ *
1084
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workersdev
1085
+ *
1086
+ * @default true
1087
+ * @breaking
1088
+ * @inheritable
1089
+ */
537
1090
  workers_dev: boolean | undefined;
538
1091
  /**
539
- * Whether we use <version>-<name>.<subdomain>.workers.dev to
540
- * serve Preview URLs for your Worker.
541
- *
542
- * @default true
543
- * @inheritable
544
- */
1092
+ * Whether we use <version>-<name>.<subdomain>.workers.dev to
1093
+ * serve Preview URLs for your Worker.
1094
+ *
1095
+ * @default true
1096
+ * @inheritable
1097
+ */
545
1098
  preview_urls: boolean | undefined;
546
1099
  /**
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
- */
1100
+ * A list of routes that your Worker should be published to.
1101
+ * Only one of `routes` or `route` is required.
1102
+ *
1103
+ * Only required when workers_dev is false, and there's no scheduled Worker (see `triggers`)
1104
+ *
1105
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#types-of-routes
1106
+ *
1107
+ * @inheritable
1108
+ */
556
1109
  routes: Route$1[] | undefined;
557
1110
  /**
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
- */
1111
+ * A route that your Worker should be published to. Literally
1112
+ * the same as routes, but only one.
1113
+ * Only one of `routes` or `route` is required.
1114
+ *
1115
+ * Only required when workers_dev is false, and there's no scheduled Worker
1116
+ *
1117
+ * @inheritable
1118
+ */
566
1119
  route: Route$1 | undefined;
567
1120
  /**
568
- * Path to a custom tsconfig
569
- *
570
- * @inheritable
571
- */
1121
+ * Path to a custom tsconfig
1122
+ *
1123
+ * @inheritable
1124
+ */
572
1125
  tsconfig: string | undefined;
573
1126
  /**
574
- * The function to use to replace jsx syntax.
575
- *
576
- * @default "React.createElement"
577
- * @inheritable
578
- */
1127
+ * The function to use to replace jsx syntax.
1128
+ *
1129
+ * @default "React.createElement"
1130
+ * @inheritable
1131
+ */
579
1132
  jsx_factory: string;
580
1133
  /**
581
- * The function to use to replace jsx fragment syntax.
582
- *
583
- * @default "React.Fragment"
584
- * @inheritable
585
- */
1134
+ * The function to use to replace jsx fragment syntax.
1135
+ *
1136
+ * @default "React.Fragment"
1137
+ * @inheritable
1138
+ */
586
1139
  jsx_fragment: string;
587
1140
  /**
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
- */
1141
+ * A list of migrations that should be uploaded with your Worker.
1142
+ *
1143
+ * These define changes in your Durable Object declarations.
1144
+ *
1145
+ * More details at https://developers.cloudflare.com/workers/learning/using-durable-objects#configuring-durable-object-classes-with-migrations
1146
+ *
1147
+ * @default []
1148
+ * @inheritable
1149
+ */
597
1150
  migrations: DurableObjectMigration[];
598
1151
  /**
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
- */
1152
+ * "Cron" definitions to trigger a Worker's "scheduled" function.
1153
+ *
1154
+ * Lets you call Workers periodically, much like a cron job.
1155
+ *
1156
+ * More details here https://developers.cloudflare.com/workers/platform/cron-triggers
1157
+ *
1158
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#triggers
1159
+ *
1160
+ * @default {crons: undefined}
1161
+ * @inheritable
1162
+ */
610
1163
  triggers: {
611
1164
  crons: string[] | undefined;
612
1165
  };
613
1166
  /**
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
- */
1167
+ * Specify limits for runtime behavior.
1168
+ * Only supported for the "standard" Usage Model
1169
+ *
1170
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#limits
1171
+ *
1172
+ * @inheritable
1173
+ */
621
1174
  limits: UserLimits | undefined;
622
1175
  /**
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
- */
1176
+ * An ordered list of rules that define which modules to import,
1177
+ * and what type to import them as. You will need to specify rules
1178
+ * to use Text, Data, and CompiledWasm modules, or when you wish to
1179
+ * have a .js file be treated as an ESModule instead of CommonJS.
1180
+ *
1181
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#bundling
1182
+ *
1183
+ * @inheritable
1184
+ */
632
1185
  rules: Rule[];
633
1186
  /**
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
- */
1187
+ * Configures a custom build step to be run by Wrangler when building your Worker.
1188
+ *
1189
+ * Refer to the [custom builds documentation](https://developers.cloudflare.com/workers/cli-wrangler/configuration#build)
1190
+ * for more details.
1191
+ *
1192
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#custom-builds
1193
+ *
1194
+ * @default {watch_dir:"./src"}
1195
+ */
643
1196
  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 */
1197
+ /** 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. */
1198
+ cwd?: string; /** The directory to watch for changes while using wrangler dev, defaults to the current working directory */
649
1199
  watch_dir?: string | string[];
650
1200
  };
651
1201
  /**
652
- * Skip internal build steps and directly deploy script
653
- * @inheritable
654
- */
1202
+ * Skip internal build steps and directly deploy script
1203
+ * @inheritable
1204
+ */
655
1205
  no_bundle: boolean | undefined;
656
1206
  /**
657
- * Minify the script before uploading.
658
- * @inheritable
659
- */
1207
+ * Minify the script before uploading.
1208
+ * @inheritable
1209
+ */
660
1210
  minify: boolean | undefined;
661
1211
  /**
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
- */
1212
+ * Set the `name` property to the original name for functions and classes renamed during minification.
1213
+ *
1214
+ * See https://esbuild.github.io/api/#keep-names
1215
+ *
1216
+ * @default true
1217
+ * @inheritable
1218
+ */
669
1219
  keep_names: boolean | undefined;
670
1220
  /**
671
- * Designates this Worker as an internal-only "first-party" Worker.
672
- *
673
- * @inheritable
674
- */
1221
+ * Designates this Worker as an internal-only "first-party" Worker.
1222
+ *
1223
+ * @inheritable
1224
+ */
675
1225
  first_party_worker: boolean | undefined;
676
1226
  /**
677
- * List of bindings that you will send to logfwdr
678
- *
679
- * @default {bindings:[]}
680
- * @inheritable
681
- */
1227
+ * List of bindings that you will send to logfwdr
1228
+ *
1229
+ * @default {bindings:[]}
1230
+ * @inheritable
1231
+ */
682
1232
  logfwdr: {
683
1233
  bindings: {
684
- /** The binding name used to refer to logfwdr */
685
- name: string;
686
- /** The destination for this logged message */
1234
+ /** The binding name used to refer to logfwdr */name: string; /** The destination for this logged message */
687
1235
  destination: string;
688
1236
  }[];
689
1237
  };
690
1238
  /**
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
- */
1239
+ * Send Trace Events from this Worker to Workers Logpush.
1240
+ *
1241
+ * This will not configure a corresponding Logpush job automatically.
1242
+ *
1243
+ * For more information about Workers Logpush, see:
1244
+ * https://blog.cloudflare.com/logpush-for-workers/
1245
+ *
1246
+ * @inheritable
1247
+ */
700
1248
  logpush: boolean | undefined;
701
1249
  /**
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
- */
1250
+ * Include source maps when uploading this worker.
1251
+ *
1252
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#source-maps
1253
+ *
1254
+ * @inheritable
1255
+ */
708
1256
  upload_source_maps: boolean | undefined;
709
1257
  /**
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
- */
1258
+ * Specify how the Worker should be located to minimize round-trip time.
1259
+ *
1260
+ * More details: https://developers.cloudflare.com/workers/platform/smart-placement/
1261
+ *
1262
+ * @inheritable
1263
+ */
716
1264
  placement: {
717
1265
  mode: "off" | "smart";
718
1266
  hint?: string;
719
1267
  } | undefined;
720
1268
  /**
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
- */
1269
+ * Specify the directory of static assets to deploy/serve
1270
+ *
1271
+ * More details at https://developers.cloudflare.com/workers/frameworks/
1272
+ *
1273
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#assets
1274
+ *
1275
+ * @inheritable
1276
+ */
729
1277
  assets: Assets | undefined;
730
1278
  /**
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
- */
1279
+ * Specify the observability behavior of the Worker.
1280
+ *
1281
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#observability
1282
+ *
1283
+ * @inheritable
1284
+ */
737
1285
  observability: Observability | undefined;
738
1286
  /**
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
- */
1287
+ * Specify the compliance region mode of the Worker.
1288
+ *
1289
+ * Although if the user does not specify a compliance region, the default is `public`,
1290
+ * it can be set to `undefined` in configuration to delegate to the CLOUDFLARE_COMPLIANCE_REGION environment variable.
1291
+ */
744
1292
  compliance_region: "public" | "fedramp_high" | undefined;
745
1293
  }
746
1294
  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 */
1295
+ /** The name of the binding used to refer to the Durable Object */name: string; /** The exported class name of the Durable Object */
1296
+ class_name: string; /** The script where the Durable Object is defined (if it's external to this Worker) */
1297
+ script_name?: string; /** The service environment of the script_name to bind to */
754
1298
  environment?: string;
755
1299
  }[];
756
1300
  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`) */
1301
+ /** The name of the binding used to refer to the Workflow */binding: string; /** The name of the Workflow */
1302
+ name: string; /** The exported class name of the Workflow */
1303
+ class_name: string; /** The script where the Workflow is defined (if it's external to this Worker) */
1304
+ script_name?: string; /** Whether the Workflow should be remote or not (only available under `--x-remote-bindings`) */
766
1305
  experimental_remote?: boolean;
767
1306
  };
768
1307
  /**
@@ -774,380 +1313,328 @@ type WorkflowBinding = {
774
1313
  */
775
1314
  interface EnvironmentNonInheritable {
776
1315
  /**
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
- */
1316
+ * A map of values to substitute when deploying your Worker.
1317
+ *
1318
+ * NOTE: This field is not automatically inherited from the top level environment,
1319
+ * and so must be specified in every named environment.
1320
+ *
1321
+ * @default {}
1322
+ * @nonInheritable
1323
+ */
785
1324
  define: Record<string, string>;
786
1325
  /**
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
- */
1326
+ * A map of environment variables to set when deploying your Worker.
1327
+ *
1328
+ * NOTE: This field is not automatically inherited from the top level environment,
1329
+ * and so must be specified in every named environment.
1330
+ *
1331
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
1332
+ *
1333
+ * @default {}
1334
+ * @nonInheritable
1335
+ */
797
1336
  vars: Record<string, unknown>;
798
1337
  /**
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
- */
1338
+ * A list of durable objects that your Worker should be bound to.
1339
+ *
1340
+ * For more information about Durable Objects, see the documentation at
1341
+ * https://developers.cloudflare.com/workers/learning/using-durable-objects
1342
+ *
1343
+ * NOTE: This field is not automatically inherited from the top level environment,
1344
+ * and so must be specified in every named environment.
1345
+ *
1346
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
1347
+ *
1348
+ * @default {bindings:[]}
1349
+ * @nonInheritable
1350
+ */
812
1351
  durable_objects: {
813
1352
  bindings: DurableObjectBindings;
814
1353
  };
815
1354
  /**
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
- */
1355
+ * A list of workflows that your Worker should be bound to.
1356
+ *
1357
+ * NOTE: This field is not automatically inherited from the top level environment,
1358
+ * and so must be specified in every named environment.
1359
+ *
1360
+ * @default []
1361
+ * @nonInheritable
1362
+ */
824
1363
  workflows: WorkflowBinding[];
825
1364
  /**
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
- */
1365
+ * Cloudchamber configuration
1366
+ *
1367
+ * NOTE: This field is not automatically inherited from the top level environment,
1368
+ * and so must be specified in every named environment.
1369
+ *
1370
+ * @default {}
1371
+ * @nonInheritable
1372
+ */
834
1373
  cloudchamber: CloudchamberConfig;
835
1374
  /**
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
- */
1375
+ * Container related configuration
1376
+ *
1377
+ * NOTE: This field is not automatically inherited from the top level environment,
1378
+ * and so must be specified in every named environment.
1379
+ *
1380
+ * @default []
1381
+ * @nonInheritable
1382
+ */
844
1383
  containers?: ContainerApp[];
845
1384
  /**
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
- */
1385
+ * These specify any Workers KV Namespaces you want to
1386
+ * access from inside your Worker.
1387
+ *
1388
+ * To learn more about KV Namespaces,
1389
+ * see the documentation at https://developers.cloudflare.com/workers/learning/how-kv-works
1390
+ *
1391
+ * NOTE: This field is not automatically inherited from the top level environment,
1392
+ * and so must be specified in every named environment.
1393
+ *
1394
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
1395
+ *
1396
+ * @default []
1397
+ * @nonInheritable
1398
+ */
860
1399
  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`) */
1400
+ /** The binding name used to refer to the KV Namespace */binding: string; /** The ID of the KV namespace */
1401
+ id?: string; /** The ID of the KV namespace used during `wrangler dev` */
1402
+ preview_id?: string; /** Whether the KV namespace should be remote or not (only available under `--x-remote-bindings`) */
868
1403
  experimental_remote?: boolean;
869
1404
  }[];
870
1405
  /**
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
- */
1406
+ * These specify bindings to send email from inside your Worker.
1407
+ *
1408
+ * NOTE: This field is not automatically inherited from the top level environment,
1409
+ * and so must be specified in every named environment.
1410
+ *
1411
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#email-bindings
1412
+ *
1413
+ * @default []
1414
+ * @nonInheritable
1415
+ */
881
1416
  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 */
1417
+ /** The binding name used to refer to the this binding */name: string; /** If this binding should be restricted to a specific verified address */
1418
+ destination_address?: string; /** If this binding should be restricted to a set of verified addresses */
887
1419
  allowed_destination_addresses?: string[];
888
1420
  }[];
889
1421
  /**
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
- */
1422
+ * Specifies Queues that are bound to this Worker environment.
1423
+ *
1424
+ * NOTE: This field is not automatically inherited from the top level environment,
1425
+ * and so must be specified in every named environment.
1426
+ *
1427
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#queues
1428
+ *
1429
+ * @default {consumers:[],producers:[]}
1430
+ * @nonInheritable
1431
+ */
900
1432
  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`) */
1433
+ /** Producer bindings */producers?: {
1434
+ /** The binding name used to refer to the Queue in the Worker. */binding: string; /** The name of this Queue. */
1435
+ queue: string; /** The number of seconds to wait before delivering a message */
1436
+ delivery_delay?: number; /** Whether the Queue producer should be remote or not (only available under `--x-remote-bindings`) */
910
1437
  experimental_remote?: boolean;
911
- }[];
912
- /** Consumer configuration */
1438
+ }[]; /** Consumer configuration */
913
1439
  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 */
1440
+ /** 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. */
1441
+ type?: string; /** The maximum number of messages per batch */
1442
+ max_batch_size?: number; /** The maximum number of seconds to wait to fill a batch with messages. */
1443
+ max_batch_timeout?: number; /** The maximum number of retries for each message. */
1444
+ max_retries?: number; /** The queue to send messages that failed to be consumed. */
1445
+ 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. */
1446
+ max_concurrency?: number | null; /** The number of milliseconds to wait for pulled messages to become visible again */
1447
+ visibility_timeout_ms?: number; /** The number of seconds to wait before retrying a message */
931
1448
  retry_delay?: number;
932
1449
  }[];
933
1450
  };
934
1451
  /**
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
- */
1452
+ * Specifies R2 buckets that are bound to this Worker environment.
1453
+ *
1454
+ * NOTE: This field is not automatically inherited from the top level environment,
1455
+ * and so must be specified in every named environment.
1456
+ *
1457
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
1458
+ *
1459
+ * @default []
1460
+ * @nonInheritable
1461
+ */
945
1462
  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`) */
1463
+ /** The binding name used to refer to the R2 bucket in the Worker. */binding: string; /** The name of this R2 bucket at the edge. */
1464
+ bucket_name?: string; /** The preview name of this R2 bucket at the edge. */
1465
+ preview_bucket_name?: string; /** The jurisdiction that the bucket exists in. Default if not present. */
1466
+ jurisdiction?: string; /** Whether the R2 bucket should be remote or not (only available under `--x-remote-bindings`) */
955
1467
  experimental_remote?: boolean;
956
1468
  }[];
957
1469
  /**
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
- */
1470
+ * Specifies D1 databases that are bound to this Worker environment.
1471
+ *
1472
+ * NOTE: This field is not automatically inherited from the top level environment,
1473
+ * and so must be specified in every named environment.
1474
+ *
1475
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
1476
+ *
1477
+ * @default []
1478
+ * @nonInheritable
1479
+ */
968
1480
  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`) */
1481
+ /** The binding name used to refer to the D1 database in the Worker. */binding: string; /** The name of this D1 database. */
1482
+ database_name?: string; /** The UUID of this D1 database (not required). */
1483
+ database_id?: string; /** The UUID of this D1 database for Wrangler Dev (if specified). */
1484
+ preview_database_id?: string; /** The name of the migrations table for this D1 database (defaults to 'd1_migrations'). */
1485
+ migrations_table?: string; /** The path to the directory of migrations for this D1 database (defaults to './migrations'). */
1486
+ migrations_dir?: string; /** Internal use only. */
1487
+ database_internal_env?: string; /** Whether the D1 database should be remote or not (only available under `--x-remote-bindings`) */
984
1488
  experimental_remote?: boolean;
985
1489
  }[];
986
1490
  /**
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
- */
1491
+ * Specifies Vectorize indexes that are bound to this Worker environment.
1492
+ *
1493
+ * NOTE: This field is not automatically inherited from the top level environment,
1494
+ * and so must be specified in every named environment.
1495
+ *
1496
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
1497
+ *
1498
+ * @default []
1499
+ * @nonInheritable
1500
+ */
997
1501
  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`) */
1502
+ /** The binding name used to refer to the Vectorize index in the Worker. */binding: string; /** The name of the index. */
1503
+ index_name: string; /** Whether the Vectorize index should be remote or not (only available under `--x-remote-bindings`) */
1003
1504
  experimental_remote?: boolean;
1004
1505
  }[];
1005
1506
  /**
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
- */
1507
+ * Specifies Hyperdrive configs that are bound to this Worker environment.
1508
+ *
1509
+ * NOTE: This field is not automatically inherited from the top level environment,
1510
+ * and so must be specified in every named environment.
1511
+ *
1512
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
1513
+ *
1514
+ * @default []
1515
+ * @nonInheritable
1516
+ */
1016
1517
  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` */
1518
+ /** The binding name used to refer to the project in the Worker. */binding: string; /** The id of the database. */
1519
+ id: string; /** The local database connection string for `wrangler dev` */
1022
1520
  localConnectionString?: string;
1023
1521
  }[];
1024
1522
  /**
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
- */
1523
+ * Specifies service bindings (Worker-to-Worker) that are bound to this Worker environment.
1524
+ *
1525
+ * NOTE: This field is not automatically inherited from the top level environment,
1526
+ * and so must be specified in every named environment.
1527
+ *
1528
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
1529
+ *
1530
+ * @default []
1531
+ * @nonInheritable
1532
+ */
1035
1533
  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`) */
1534
+ /** The binding name used to refer to the bound service. */binding: string; /** The name of the service. */
1535
+ service: string; /** The environment of the service (e.g. production, staging, etc). */
1536
+ environment?: string; /** Optionally, the entrypoint (named export) of the service to bind to. */
1537
+ entrypoint?: string; /** Optional properties that will be made available to the service via ctx.props. */
1538
+ props?: Record<string, unknown>; /** Whether the service binding should be remote or not (only available under `--x-remote-bindings`) */
1047
1539
  experimental_remote?: boolean;
1048
1540
  }[] | undefined;
1049
1541
  /**
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
- */
1542
+ * Specifies analytics engine datasets that are bound to this Worker environment.
1543
+ *
1544
+ * NOTE: This field is not automatically inherited from the top level environment,
1545
+ * and so must be specified in every named environment.
1546
+ *
1547
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
1548
+ *
1549
+ * @default []
1550
+ * @nonInheritable
1551
+ */
1060
1552
  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. */
1553
+ /** The binding name used to refer to the dataset in the Worker. */binding: string; /** The name of this dataset to write to. */
1064
1554
  dataset?: string;
1065
1555
  }[];
1066
1556
  /**
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
- */
1557
+ * A browser that will be usable from the Worker.
1558
+ *
1559
+ * NOTE: This field is not automatically inherited from the top level environment,
1560
+ * and so must be specified in every named environment.
1561
+ *
1562
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
1563
+ *
1564
+ * @default {}
1565
+ * @nonInheritable
1566
+ */
1077
1567
  browser: {
1078
- binding: string;
1079
- /** Whether the Browser binding should be remote or not (only available under `--x-remote-bindings`) */
1568
+ binding: string; /** Whether the Browser binding should be remote or not (only available under `--x-remote-bindings`) */
1080
1569
  experimental_remote?: boolean;
1081
1570
  } | undefined;
1082
1571
  /**
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
- */
1572
+ * Binding to the AI project.
1573
+ *
1574
+ * NOTE: This field is not automatically inherited from the top level environment,
1575
+ * and so must be specified in every named environment.
1576
+ *
1577
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
1578
+ *
1579
+ * @default {}
1580
+ * @nonInheritable
1581
+ */
1093
1582
  ai: {
1094
1583
  binding: string;
1095
- staging?: boolean;
1096
- /** Whether the AI binding should be remote or not (only available under `--x-remote-bindings`) */
1584
+ staging?: boolean; /** Whether the AI binding should be remote or not (only available under `--x-remote-bindings`) */
1097
1585
  experimental_remote?: boolean;
1098
1586
  } | undefined;
1099
1587
  /**
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
- */
1588
+ * Binding to Cloudflare Images
1589
+ *
1590
+ * NOTE: This field is not automatically inherited from the top level environment,
1591
+ * and so must be specified in every named environment.
1592
+ *
1593
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#images
1594
+ *
1595
+ * @default {}
1596
+ * @nonInheritable
1597
+ */
1110
1598
  images: {
1111
- binding: string;
1112
- /** Whether the Images binding should be remote or not (only available under `--x-remote-bindings`) */
1599
+ binding: string; /** Whether the Images binding should be remote or not (only available under `--x-remote-bindings`) */
1113
1600
  experimental_remote?: boolean;
1114
1601
  } | undefined;
1115
1602
  /**
1116
- * Binding to the Worker Version's metadata
1117
- */
1603
+ * Binding to the Worker Version's metadata
1604
+ */
1118
1605
  version_metadata: {
1119
1606
  binding: string;
1120
1607
  } | undefined;
1121
1608
  /**
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
- */
1609
+ * "Unsafe" tables for features that aren't directly supported by wrangler.
1610
+ *
1611
+ * NOTE: This field is not automatically inherited from the top level environment,
1612
+ * and so must be specified in every named environment.
1613
+ *
1614
+ * @default {}
1615
+ * @nonInheritable
1616
+ */
1130
1617
  unsafe: {
1131
1618
  /**
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
- */
1619
+ * A set of bindings that should be put into a Worker's upload metadata without changes. These
1620
+ * can be used to implement bindings for features that haven't released and aren't supported
1621
+ * directly by wrangler or miniflare.
1622
+ */
1136
1623
  bindings?: {
1137
1624
  name: string;
1138
1625
  type: string;
1139
1626
  [key: string]: unknown;
1140
1627
  }[];
1141
1628
  /**
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
- */
1629
+ * Arbitrary key/value pairs that will be included in the uploaded metadata. Values specified
1630
+ * here will always be applied to metadata last, so can add new or override existing fields.
1631
+ */
1145
1632
  metadata?: {
1146
1633
  [key: string]: unknown;
1147
1634
  };
1148
1635
  /**
1149
- * Used for internal capnp uploads for the Workers runtime
1150
- */
1636
+ * Used for internal capnp uploads for the Workers runtime
1637
+ */
1151
1638
  capnp?: {
1152
1639
  base_path: string;
1153
1640
  source_schemas: string[];
@@ -1159,100 +1646,86 @@ interface EnvironmentNonInheritable {
1159
1646
  };
1160
1647
  };
1161
1648
  /**
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
- */
1649
+ * Specifies a list of mTLS certificates that are bound to this Worker environment.
1650
+ *
1651
+ * NOTE: This field is not automatically inherited from the top level environment,
1652
+ * and so must be specified in every named environment.
1653
+ *
1654
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
1655
+ *
1656
+ * @default []
1657
+ * @nonInheritable
1658
+ */
1172
1659
  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`) */
1660
+ /** The binding name used to refer to the certificate in the Worker */binding: string; /** The uuid of the uploaded mTLS certificate */
1661
+ certificate_id: string; /** Whether the mtls fetcher should be remote or not (only available under `--x-remote-bindings`) */
1178
1662
  experimental_remote?: boolean;
1179
1663
  }[];
1180
1664
  /**
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
- */
1665
+ * Specifies a list of Tail Workers that are bound to this Worker environment
1666
+ *
1667
+ * NOTE: This field is not automatically inherited from the top level environment,
1668
+ * and so must be specified in every named environment.
1669
+ *
1670
+ * @default []
1671
+ * @nonInheritable
1672
+ */
1189
1673
  tail_consumers?: TailConsumer[];
1190
1674
  /**
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
- */
1675
+ * Specifies namespace bindings that are bound to this Worker environment.
1676
+ *
1677
+ * NOTE: This field is not automatically inherited from the top level environment,
1678
+ * and so must be specified in every named environment.
1679
+ *
1680
+ * For reference, see https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
1681
+ *
1682
+ * @default []
1683
+ * @nonInheritable
1684
+ */
1201
1685
  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`) */
1686
+ /** The binding name used to refer to the bound service. */binding: string; /** The namespace to bind to. */
1687
+ namespace: string; /** Details about the outbound Worker which will handle outbound requests from your namespace */
1688
+ outbound?: DispatchNamespaceOutbound; /** Whether the Dispatch Namespace should be remote or not (only available under `--x-remote-bindings`) */
1209
1689
  experimental_remote?: boolean;
1210
1690
  }[];
1211
1691
  /**
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
- */
1692
+ * Specifies list of Pipelines bound to this Worker environment
1693
+ *
1694
+ * NOTE: This field is not automatically inherited from the top level environment,
1695
+ * and so must be specified in every named environment.
1696
+ *
1697
+ * @default []
1698
+ * @nonInheritable
1699
+ */
1220
1700
  pipelines: {
1221
- /** The binding name used to refer to the bound service. */
1222
- binding: string;
1223
- /** Name of the Pipeline to bind */
1701
+ /** The binding name used to refer to the bound service. */binding: string; /** Name of the Pipeline to bind */
1224
1702
  pipeline: string;
1225
1703
  }[];
1226
1704
  /**
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
- */
1705
+ * Specifies Secret Store bindings that are bound to this Worker environment.
1706
+ *
1707
+ * NOTE: This field is not automatically inherited from the top level environment,
1708
+ * and so must be specified in every named environment.
1709
+ *
1710
+ * @default []
1711
+ * @nonInheritable
1712
+ */
1235
1713
  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 */
1714
+ /** The binding name used to refer to the bound service. */binding: string; /** Id of the secret store */
1715
+ store_id: string; /** Name of the secret */
1241
1716
  secret_name: string;
1242
1717
  }[];
1243
1718
  /**
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
- */
1719
+ * **DO NOT USE**. Hello World Binding Config to serve as an explanatory example.
1720
+ *
1721
+ * NOTE: This field is not automatically inherited from the top level environment,
1722
+ * and so must be specified in every named environment.
1723
+ *
1724
+ * @default []
1725
+ * @nonInheritable
1726
+ */
1252
1727
  unsafe_hello_world: {
1253
- /** The binding name used to refer to the bound service. */
1254
- binding: string;
1255
- /** Whether the timer is enabled */
1728
+ /** The binding name used to refer to the bound service. */binding: string; /** Whether the timer is enabled */
1256
1729
  enable_timer?: boolean;
1257
1730
  }[];
1258
1731
  }
@@ -1269,9 +1742,7 @@ type Rule = {
1269
1742
  */
1270
1743
  type ConfigModuleRuleType = "ESModule" | "CommonJS" | "CompiledWasm" | "Text" | "Data" | "PythonModule" | "PythonRequirement";
1271
1744
  type TailConsumer = {
1272
- /** The name of the service tail events will be forwarded to. */
1273
- service: string;
1274
- /** (Optional) The environment of the service. */
1745
+ /** The name of the service tail events will be forwarded to. */service: string; /** (Optional) The environment of the service. */
1275
1746
  environment?: string;
1276
1747
  };
1277
1748
  interface DispatchNamespaceOutbound {
@@ -1287,19 +1758,15 @@ interface UserLimits {
1287
1758
  cpu_ms: number;
1288
1759
  }
1289
1760
  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. */
1761
+ /** Absolute path to assets directory */directory?: string; /** Name of `env` binding property in the User Worker. */
1762
+ binding?: string; /** How to handle HTML requests. */
1763
+ html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none"; /** How to handle requests that do not match an asset. */
1297
1764
  not_found_handling?: "single-page-application" | "404-page" | "none";
1298
1765
  /**
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
- */
1766
+ * Matches will be routed to the User Worker, and matches to negative rules will go to the Asset Worker.
1767
+ *
1768
+ * Can also be `true`, indicating that every request should be routed to the User Worker.
1769
+ */
1303
1770
  run_worker_first?: string[] | boolean;
1304
1771
  };
1305
1772
  interface Observability {
@@ -1308,10 +1775,8 @@ interface Observability {
1308
1775
  /** The sampling rate */
1309
1776
  head_sampling_rate?: number;
1310
1777
  logs?: {
1311
- enabled?: boolean;
1312
- /** The sampling rate */
1313
- head_sampling_rate?: number;
1314
- /** Set to false to disable invocation logs */
1778
+ enabled?: boolean; /** The sampling rate */
1779
+ head_sampling_rate?: number; /** Set to false to disable invocation logs */
1315
1780
  invocation_logs?: boolean;
1316
1781
  };
1317
1782
  }
@@ -1345,81 +1810,81 @@ interface ComputedFields {
1345
1810
  /** 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
1811
  userConfigPath: string | undefined;
1347
1812
  /**
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
- */
1813
+ * The original top level name for the Worker in the raw configuration.
1814
+ *
1815
+ * When a raw configuration has been flattened to a single environment the worker name may have been replaced or transformed.
1816
+ * It can be useful to know what the top-level name was before the flattening.
1817
+ */
1353
1818
  topLevelName: string | undefined;
1354
1819
  }
1355
1820
  interface ConfigFields<Dev extends RawDevConfig> {
1356
1821
  /**
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
- */
1822
+ * A boolean to enable "legacy" style wrangler environments (from Wrangler v1).
1823
+ * These have been superseded by Services, but there may be projects that won't
1824
+ * (or can't) use them. If you're using a legacy environment, you can set this
1825
+ * to `true` to enable it.
1826
+ */
1362
1827
  legacy_env: boolean;
1363
1828
  /**
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
- */
1829
+ * Whether Wrangler should send usage metrics to Cloudflare for this project.
1830
+ *
1831
+ * When defined this will override any user settings.
1832
+ * Otherwise, Wrangler will use the user's preference.
1833
+ */
1369
1834
  send_metrics: boolean | undefined;
1370
1835
  /**
1371
- * Options to configure the development server that your worker will use.
1372
- */
1836
+ * Options to configure the development server that your worker will use.
1837
+ */
1373
1838
  dev: Dev;
1374
1839
  /**
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
- */
1840
+ * The definition of a Worker Site, a feature that lets you upload
1841
+ * static assets with your Worker.
1842
+ *
1843
+ * More details at https://developers.cloudflare.com/workers/platform/sites
1844
+ */
1380
1845
  site: {
1381
1846
  /**
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
- */
1847
+ * The directory containing your static assets.
1848
+ *
1849
+ * It must be a path relative to your Wrangler configuration file.
1850
+ * Example: bucket = "./public"
1851
+ *
1852
+ * If there is a `site` field then it must contain this `bucket` field.
1853
+ */
1389
1854
  bucket: string;
1390
1855
  /**
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
- */
1856
+ * The location of your Worker script.
1857
+ *
1858
+ * @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.
1859
+ * @breaking
1860
+ */
1396
1861
  "entry-point"?: string;
1397
1862
  /**
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
- */
1863
+ * An exclusive list of .gitignore-style patterns that match file
1864
+ * or directory names from your bucket location. Only matched
1865
+ * items will be uploaded. Example: include = ["upload_dir"]
1866
+ *
1867
+ * @optional
1868
+ * @default []
1869
+ */
1405
1870
  include?: string[];
1406
1871
  /**
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
- */
1872
+ * A list of .gitignore-style patterns that match files or
1873
+ * directories in your bucket that should be excluded from
1874
+ * uploads. Example: exclude = ["ignore_dir"]
1875
+ *
1876
+ * @optional
1877
+ * @default []
1878
+ */
1414
1879
  exclude?: string[];
1415
1880
  } | undefined;
1416
1881
  /**
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
- */
1882
+ * Old behaviour of serving a folder of static assets with your Worker,
1883
+ * without any additional code.
1884
+ * This can either be a string, or an object with additional config
1885
+ * fields.
1886
+ * Will be deprecated in the near future in favor of `assets`.
1887
+ */
1423
1888
  legacy_assets: {
1424
1889
  bucket: string;
1425
1890
  include: string[];
@@ -1428,95 +1893,95 @@ interface ConfigFields<Dev extends RawDevConfig> {
1428
1893
  serve_single_page_app: boolean;
1429
1894
  } | string | undefined;
1430
1895
  /**
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
- */
1896
+ * A list of wasm modules that your worker should be bound to. This is
1897
+ * the "legacy" way of binding to a wasm module. ES module workers should
1898
+ * do proper module imports.
1899
+ */
1435
1900
  wasm_modules: {
1436
1901
  [key: string]: string;
1437
1902
  } | undefined;
1438
1903
  /**
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
- */
1904
+ * A list of text files that your worker should be bound to. This is
1905
+ * the "legacy" way of binding to a text file. ES module workers should
1906
+ * do proper module imports.
1907
+ */
1443
1908
  text_blobs: {
1444
1909
  [key: string]: string;
1445
1910
  } | undefined;
1446
1911
  /**
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
- */
1912
+ * A list of data files that your worker should be bound to. This is
1913
+ * the "legacy" way of binding to a data file. ES module workers should
1914
+ * do proper module imports.
1915
+ */
1451
1916
  data_blobs: {
1452
1917
  [key: string]: string;
1453
1918
  } | undefined;
1454
1919
  /**
1455
- * A map of module aliases. Lets you swap out a module for any others.
1456
- * Corresponds with esbuild's `alias` config
1457
- */
1920
+ * A map of module aliases. Lets you swap out a module for any others.
1921
+ * Corresponds with esbuild's `alias` config
1922
+ */
1458
1923
  alias: {
1459
1924
  [key: string]: string;
1460
1925
  } | undefined;
1461
1926
  /**
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
- */
1927
+ * By default, the Wrangler configuration file is the source of truth for your environment configuration, like a terraform file.
1928
+ *
1929
+ * If you change your vars in the dashboard, wrangler *will* override/delete them on its next deploy.
1930
+ *
1931
+ * If you want to keep your dashboard vars when wrangler deploys, set this field to true.
1932
+ *
1933
+ * @default false
1934
+ * @nonInheritable
1935
+ */
1471
1936
  keep_vars?: boolean;
1472
1937
  }
1473
1938
  interface PagesConfigFields {
1474
1939
  /**
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
- */
1940
+ * The directory of static assets to serve.
1941
+ *
1942
+ * The presence of this field in a Wrangler configuration file indicates a Pages project,
1943
+ * and will prompt the handling of the configuration file according to the
1944
+ * Pages-specific validation rules.
1945
+ */
1481
1946
  pages_build_output_dir?: string;
1482
1947
  }
1483
1948
  interface DevConfig {
1484
1949
  /**
1485
- * IP address for the local dev server to listen on,
1486
- *
1487
- * @default localhost
1488
- */
1950
+ * IP address for the local dev server to listen on,
1951
+ *
1952
+ * @default localhost
1953
+ */
1489
1954
  ip: string;
1490
1955
  /**
1491
- * Port for the local dev server to listen on
1492
- *
1493
- * @default 8787
1494
- */
1956
+ * Port for the local dev server to listen on
1957
+ *
1958
+ * @default 8787
1959
+ */
1495
1960
  port: number | undefined;
1496
1961
  /**
1497
- * Port for the local dev server's inspector to listen on
1498
- *
1499
- * @default 9229
1500
- */
1962
+ * Port for the local dev server's inspector to listen on
1963
+ *
1964
+ * @default 9229
1965
+ */
1501
1966
  inspector_port: number | undefined;
1502
1967
  /**
1503
- * Protocol that local wrangler dev server listens to requests on.
1504
- *
1505
- * @default http
1506
- */
1968
+ * Protocol that local wrangler dev server listens to requests on.
1969
+ *
1970
+ * @default http
1971
+ */
1507
1972
  local_protocol: "http" | "https";
1508
1973
  /**
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
- */
1974
+ * Protocol that wrangler dev forwards requests on
1975
+ *
1976
+ * Setting this to `http` is not currently implemented for remote mode.
1977
+ * See https://github.com/cloudflare/workers-sdk/issues/583
1978
+ *
1979
+ * @default https
1980
+ */
1516
1981
  upstream_protocol: "https" | "http";
1517
1982
  /**
1518
- * Host to forward requests to, defaults to the host of the first route of project
1519
- */
1983
+ * Host to forward requests to, defaults to the host of the first route of project
1984
+ */
1520
1985
  host: string | undefined;
1521
1986
  }
1522
1987
  type RawDevConfig = Partial<DevConfig>;
@@ -1536,30 +2001,30 @@ interface CloudflarePagesRoutes {
1536
2001
  }
1537
2002
  interface CloudflareOptions {
1538
2003
  /**
1539
- * Configuration for the Cloudflare Deployments.
1540
- *
1541
- * **NOTE:** This option is only effective if `deployConfig` is enabled.
1542
- */
2004
+ * Configuration for the Cloudflare Deployments.
2005
+ *
2006
+ * **NOTE:** This option is only effective if `deployConfig` is enabled.
2007
+ */
1543
2008
  wrangler?: WranglerConfig;
1544
2009
  /**
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
- */
2010
+ * Enable automatic generation of `.wrangler/deploy/config.json`.
2011
+ *
2012
+ * **IMPORTANT:** Enabling this option will cause settings from cloudflare dashboard (including environment variables) to be disabled and discarded.
2013
+ *
2014
+ * More info: https://developers.cloudflare.com/workers/wrangler/configuration#generated-wrangler-configuration
2015
+ */
1551
2016
  deployConfig?: boolean;
1552
2017
  /**
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
- */
2018
+ * Enable native Node.js compatibility support.
2019
+ *
2020
+ * If this option disabled, pure unenv polyfills will be used instead.
2021
+ *
2022
+ * If not set, will be auto enabled if `nodejs_compat` or `nodejs_compat_v2` is detected in `wrangler.toml` or `wrangler.json`.
2023
+ */
1559
2024
  nodeCompat?: boolean;
1560
2025
  /**
1561
- * Options for dev emulation.
1562
- */
2026
+ * Options for dev emulation.
2027
+ */
1563
2028
  dev?: {
1564
2029
  configPath?: string;
1565
2030
  environment?: string;
@@ -1567,36 +2032,36 @@ interface CloudflareOptions {
1567
2032
  };
1568
2033
  pages?: {
1569
2034
  /**
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
- */
2035
+ * Nitro will automatically generate a `_routes.json` that controls which files get served statically and
2036
+ * which get served by the Worker. Using this config will override the automatic `_routes.json`. Or, if the
2037
+ * `merge` options is set, it will merge the user-set routes with the auto-generated ones, giving priority
2038
+ * to the user routes.
2039
+ *
2040
+ * @see https://developers.cloudflare.com/pages/platform/functions/routing/#functions-invocation-routes
2041
+ *
2042
+ * There are a maximum of 100 rules, and you must have at least one include rule. Wildcards are accepted.
2043
+ *
2044
+ * If any fields are unset, they default to:
2045
+ *
2046
+ * ```json
2047
+ * {
2048
+ * "version": 1,
2049
+ * "include": ["/*"],
2050
+ * "exclude": []
2051
+ * }
2052
+ * ```
2053
+ */
1589
2054
  routes?: CloudflarePagesRoutes;
1590
2055
  /**
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
- */
2056
+ * If set to `false`, nitro will disable the automatically generated `_routes.json` and instead use the user-set only ones.
2057
+ *
2058
+ * @default true
2059
+ */
1595
2060
  defaultRoutes?: boolean;
1596
2061
  };
1597
2062
  /**
1598
- * Custom Cloudflare exports additional classes such as WorkflowEntrypoint.
1599
- */
2063
+ * Custom Cloudflare exports additional classes such as WorkflowEntrypoint.
2064
+ */
1600
2065
  exports?: string;
1601
2066
  }
1602
2067
  type DurableObjectState = ConstructorParameters<typeof DurableObject>[0];
@@ -1608,15 +2073,13 @@ declare module "nitro/types" {
1608
2073
  context: ExecutionContext;
1609
2074
  }) => void;
1610
2075
  "cloudflare:email": (_: {
1611
- message: ForwardableEmailMessage;
1612
- /** @deprecated please use `message` */
2076
+ message: ForwardableEmailMessage; /** @deprecated please use `message` */
1613
2077
  event: ForwardableEmailMessage;
1614
2078
  env: unknown;
1615
2079
  context: ExecutionContext;
1616
2080
  }) => void;
1617
2081
  "cloudflare:queue": (_: {
1618
- batch: MessageBatch;
1619
- /** @deprecated please use `batch` */
2082
+ batch: MessageBatch; /** @deprecated please use `batch` */
1620
2083
  event: MessageBatch;
1621
2084
  env: unknown;
1622
2085
  context: ExecutionContext;
@@ -1646,26 +2109,16 @@ interface FirebaseOptions {
1646
2109
  interface AppHostingOutputBundleConfig {
1647
2110
  version: "v1";
1648
2111
  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. */
2112
+ /** 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
2113
  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. */
2114
+ /** Name of the variable. */variable: string; /** Value associated with the variable. */
2115
+ value: string; /** Where the variable will be available, for now only RUNTIME is supported. */
1658
2116
  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. */
2117
+ }>; /** The maximum number of concurrent requests that each server instance can receive. */
2118
+ concurrency?: number; /** The number of CPUs used in a single server instance. */
2119
+ cpu?: number; /** The amount of memory available for a server instance. */
2120
+ memoryMiB?: number; /** The limit on the minimum number of function instances that may coexist at a given time. */
2121
+ minInstances?: number; /** The limit on the maximum number of function instances that may coexist at a given time. */
1669
2122
  maxInstances?: number;
1670
2123
  };
1671
2124
  metadata: {
@@ -1675,8 +2128,7 @@ interface AppHostingOutputBundleConfig {
1675
2128
  frameworkVersion?: string;
1676
2129
  };
1677
2130
  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: {
2131
+ /** 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
2132
  include: string[];
1681
2133
  };
1682
2134
  };
@@ -1713,156 +2165,913 @@ interface NetlifyFunctionInlineConfig {
1713
2165
  included_files?: string[];
1714
2166
  [key: string]: unknown;
1715
2167
  }
1716
- interface NetlifyHeaderRule {
1717
- for: string;
1718
- values: Record<string, string>;
1719
- [key: string]: unknown;
2168
+ interface NetlifyHeaderRule {
2169
+ for: string;
2170
+ values: Record<string, string>;
2171
+ [key: string]: unknown;
2172
+ }
2173
+ interface NetlifyImagesConfig {
2174
+ remote_images?: string[];
2175
+ [key: string]: unknown;
2176
+ }
2177
+ interface NetlifyRedirectRule {
2178
+ from: string;
2179
+ to: string;
2180
+ status?: number;
2181
+ force?: boolean;
2182
+ conditions?: Record<string, string[]>;
2183
+ query?: Record<string, string>;
2184
+ [key: string]: unknown;
2185
+ }
2186
+ //#endregion
2187
+ //#region src/presets/vercel/types.d.ts
2188
+ /**
2189
+ * Vercel Build Output Configuration
2190
+ * @see https://vercel.com/docs/build-output-api/v3
2191
+ */
2192
+ interface VercelBuildConfigV3 {
2193
+ version: 3;
2194
+ routes?: ({
2195
+ src: string;
2196
+ headers: {
2197
+ "cache-control": string;
2198
+ };
2199
+ continue: boolean;
2200
+ } | {
2201
+ handle: string;
2202
+ } | {
2203
+ src: string;
2204
+ dest: string;
2205
+ })[];
2206
+ images?: {
2207
+ sizes: number[];
2208
+ domains: string[];
2209
+ remotePatterns?: {
2210
+ protocol?: "http" | "https";
2211
+ hostname: string;
2212
+ port?: string;
2213
+ pathname?: string;
2214
+ }[];
2215
+ minimumCacheTTL?: number;
2216
+ formats?: ("image/avif" | "image/webp")[];
2217
+ dangerouslyAllowSVG?: boolean;
2218
+ contentSecurityPolicy?: string;
2219
+ };
2220
+ wildcard?: Array<{
2221
+ domain: string;
2222
+ value: string;
2223
+ }>;
2224
+ overrides?: Record<string, {
2225
+ path?: string;
2226
+ contentType?: string;
2227
+ }>;
2228
+ cache?: string[];
2229
+ bypassToken?: string;
2230
+ crons?: {
2231
+ path: string;
2232
+ schedule: string;
2233
+ }[];
2234
+ }
2235
+ /**
2236
+ * https://vercel.com/docs/build-output-api/primitives#serverless-function-configuration
2237
+ * https://vercel.com/docs/build-output-api/primitives#node.js-config
2238
+ */
2239
+ interface VercelServerlessFunctionConfig {
2240
+ /**
2241
+ * Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
2242
+ */
2243
+ memory?: number;
2244
+ /**
2245
+ * Specifies the instruction set "architecture" the Vercel Function supports.
2246
+ *
2247
+ * Either `x86_64` or `arm64`. The default value is `x86_64`
2248
+ */
2249
+ architecture?: "x86_64" | "arm64";
2250
+ /**
2251
+ * Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
2252
+ */
2253
+ maxDuration?: number;
2254
+ /**
2255
+ * Map of additional environment variables that will be available to the Vercel Function,
2256
+ * in addition to the env vars specified in the Project Settings.
2257
+ */
2258
+ environment?: Record<string, string>;
2259
+ /**
2260
+ * List of Vercel Regions where the Vercel Function will be deployed to.
2261
+ */
2262
+ regions?: string[];
2263
+ /**
2264
+ * True if a custom runtime has support for Lambda runtime wrappers.
2265
+ */
2266
+ supportsWrapper?: boolean;
2267
+ /**
2268
+ * When true, the Serverless Function will stream the response to the client.
2269
+ */
2270
+ supportsResponseStreaming?: boolean;
2271
+ /**
2272
+ * Enables source map generation.
2273
+ */
2274
+ shouldAddSourcemapSupport?: boolean;
2275
+ /**
2276
+ * The runtime to use. Defaults to the auto-detected Node.js version.
2277
+ */
2278
+ runtime?: "nodejs20.x" | "nodejs22.x" | "bun1.x" | (string & {});
2279
+ [key: string]: unknown;
2280
+ }
2281
+ interface VercelOptions {
2282
+ config?: VercelBuildConfigV3;
2283
+ /**
2284
+ * If you have enabled skew protection in the Vercel dashboard, it will
2285
+ * be enabled by default.
2286
+ *
2287
+ * You can disable the Nitro integration by setting this option to `false`.
2288
+ */
2289
+ skewProtection?: boolean;
2290
+ /**
2291
+ * If you are using `vercel-edge`, you can specify the region(s) for your edge function.
2292
+ * @see https://vercel.com/docs/concepts/functions/edge-functions#edge-function-regions
2293
+ */
2294
+ regions?: string[];
2295
+ functions?: VercelServerlessFunctionConfig;
2296
+ /**
2297
+ * Handler format to use for Vercel Serverless Functions.
2298
+ *
2299
+ * Using `node` format enables compatibility with Node.js specific APIs in your Nitro application (e.g., `req.runtime.node`).
2300
+ *
2301
+ * Possible values are: `web` (default) and `node`.
2302
+ */
2303
+ entryFormat?: "web" | "node";
2304
+ }
2305
+ //#endregion
2306
+ //#region src/presets/_types.gen.d.ts
2307
+ interface PresetOptions {
2308
+ awsAmplify?: AWSAmplifyOptions;
2309
+ awsLambda?: AwsLambdaOptions;
2310
+ azure?: AzureOptions;
2311
+ cloudflare?: CloudflareOptions;
2312
+ firebase?: FirebaseOptions;
2313
+ netlify?: NetlifyOptions;
2314
+ vercel?: VercelOptions;
2315
+ }
2316
+ 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";
2317
+ 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 & {});
2318
+ //#endregion
2319
+ //#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
2320
+ type StripEnums<T extends Record<string, any>> = { [K in keyof T]: T[K] extends boolean ? T[K] : T[K] extends string ? T[K] : T[K] extends object ? T[K] : T[K] extends Array<any> ? T[K] : T[K] extends undefined ? undefined : any };
2321
+ interface TSConfig {
2322
+ compilerOptions?: StripEnums<CompilerOptions>;
2323
+ exclude?: string[];
2324
+ compileOnSave?: boolean;
2325
+ extends?: string | string[];
2326
+ files?: string[];
2327
+ include?: string[];
2328
+ typeAcquisition?: TypeAcquisition;
2329
+ references?: {
2330
+ path: string;
2331
+ }[];
2332
+ }
2333
+ /**
2334
+ * Defines a TSConfig structure.
2335
+ * @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
2336
+ * @returns the same `tsconfig.json` object.
2337
+ */
2338
+ //#endregion
2339
+ //#region node_modules/.pnpm/esbuild@0.27.2/node_modules/esbuild/lib/main.d.ts
2340
+ // Note: These declarations exist to avoid type errors when you omit "dom" from
2341
+ // "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
2342
+ // global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
2343
+ // with the browser DOM and is present in many non-browser JavaScript runtimes
2344
+ // (e.g. node and deno). Declaring it here allows esbuild's API to be used in
2345
+ // these scenarios.
2346
+ //
2347
+ // There's an open issue about getting this problem corrected (although these
2348
+ // declarations will need to remain even if this is fixed for backward
2349
+ // compatibility with older TypeScript versions):
2350
+ //
2351
+ // https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
2352
+ //
2353
+ declare global {
2354
+ namespace WebAssembly {
2355
+ interface Module {}
2356
+ }
2357
+ interface URL {}
2358
+ }
2359
+ //#endregion
2360
+ //#region node_modules/.pnpm/unplugin-utils@0.3.1/node_modules/unplugin-utils/dist/index.d.ts
2361
+ //#region src/filter.d.ts
2362
+ /**
2363
+ * A valid `picomatch` glob pattern, or array of patterns.
2364
+ */
2365
+ type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
2366
+ /**
2367
+ * Constructs a filter function which can be used to determine whether or not
2368
+ * certain modules should be operated upon.
2369
+ * @param include If `include` is omitted or has zero length, filter will return `true` by default.
2370
+ * @param exclude ID must not match any of the `exclude` patterns.
2371
+ * @param options Additional options.
2372
+ * @param options.resolve Optionally resolves the patterns against a directory other than `process.cwd()`.
2373
+ * If a `string` is specified, then the value will be used as the base directory.
2374
+ * Relative paths will be resolved against `process.cwd()` first.
2375
+ * If `false`, then the patterns will not be resolved against any directory.
2376
+ * This can be useful if you want to create a filter for virtual module names.
2377
+ */
2378
+ //#endregion
2379
+ //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.d.mts
2380
+ interface SourceMapOptions {
2381
+ /**
2382
+ * Whether the mapping should be high-resolution.
2383
+ * Hi-res mappings map every single character, meaning (for example) your devtools will always
2384
+ * be able to pinpoint the exact location of function calls and so on.
2385
+ * With lo-res mappings, devtools may only be able to identify the correct
2386
+ * line - but they're quicker to generate and less bulky.
2387
+ * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
2388
+ * instead of per character, suitable for string semantics that are separated by words.
2389
+ * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
2390
+ */
2391
+ hires?: boolean | 'boundary';
2392
+ /**
2393
+ * The filename where you plan to write the sourcemap.
2394
+ */
2395
+ file?: string;
2396
+ /**
2397
+ * The filename of the file containing the original source.
2398
+ */
2399
+ source?: string;
2400
+ /**
2401
+ * Whether to include the original content in the map's sourcesContent array.
2402
+ */
2403
+ includeContent?: boolean;
2404
+ }
2405
+ type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
2406
+ interface DecodedSourceMap {
2407
+ file: string;
2408
+ sources: string[];
2409
+ sourcesContent?: string[];
2410
+ names: string[];
2411
+ mappings: SourceMapSegment[][];
2412
+ x_google_ignoreList?: number[];
2413
+ }
2414
+ declare class SourceMap {
2415
+ constructor(properties: DecodedSourceMap);
2416
+ version: number;
2417
+ file: string;
2418
+ sources: string[];
2419
+ sourcesContent?: string[];
2420
+ names: string[];
2421
+ mappings: string;
2422
+ x_google_ignoreList?: number[];
2423
+ debugId?: string;
2424
+ /**
2425
+ * Returns the equivalent of `JSON.stringify(map)`
2426
+ */
2427
+ toString(): string;
2428
+ /**
2429
+ * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
2430
+ * `generateMap(options?: SourceMapOptions): SourceMap;`
2431
+ */
2432
+ toUrl(): string;
2433
+ }
2434
+ type ExclusionRange = [number, number];
2435
+ interface MagicStringOptions {
2436
+ filename?: string;
2437
+ indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
2438
+ offset?: number;
2439
+ }
2440
+ interface IndentOptions {
2441
+ exclude?: ExclusionRange | Array<ExclusionRange>;
2442
+ indentStart?: boolean;
2443
+ }
2444
+ interface OverwriteOptions {
2445
+ storeName?: boolean;
2446
+ contentOnly?: boolean;
2447
+ }
2448
+ interface UpdateOptions {
2449
+ storeName?: boolean;
2450
+ overwrite?: boolean;
2451
+ }
2452
+ declare class MagicString {
2453
+ constructor(str: string, options?: MagicStringOptions);
2454
+ /**
2455
+ * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
2456
+ */
2457
+ addSourcemapLocation(char: number): void;
2458
+ /**
2459
+ * Appends the specified content to the end of the string.
2460
+ */
2461
+ append(content: string): this;
2462
+ /**
2463
+ * Appends the specified content at the index in the original string.
2464
+ * If a range *ending* with index is subsequently moved, the insert will be moved with it.
2465
+ * See also `s.prependLeft(...)`.
2466
+ */
2467
+ appendLeft(index: number, content: string): this;
2468
+ /**
2469
+ * Appends the specified content at the index in the original string.
2470
+ * If a range *starting* with index is subsequently moved, the insert will be moved with it.
2471
+ * See also `s.prependRight(...)`.
2472
+ */
2473
+ appendRight(index: number, content: string): this;
2474
+ /**
2475
+ * Does what you'd expect.
2476
+ */
2477
+ clone(): this;
2478
+ /**
2479
+ * Generates a version 3 sourcemap.
2480
+ */
2481
+ generateMap(options?: SourceMapOptions): SourceMap;
2482
+ /**
2483
+ * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
2484
+ * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
2485
+ */
2486
+ generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
2487
+ getIndentString(): string;
2488
+ /**
2489
+ * Prefixes each line of the string with prefix.
2490
+ * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
2491
+ */
2492
+ indent(options?: IndentOptions): this;
2493
+ /**
2494
+ * Prefixes each line of the string with prefix.
2495
+ * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
2496
+ *
2497
+ * The options argument can have an exclude property, which is an array of [start, end] character ranges.
2498
+ * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
2499
+ */
2500
+ indent(indentStr?: string, options?: IndentOptions): this;
2501
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
2502
+ /**
2503
+ * Moves the characters from `start` and `end` to `index`.
2504
+ */
2505
+ move(start: number, end: number, index: number): this;
2506
+ /**
2507
+ * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
2508
+ * that range. The same restrictions as `s.remove()` apply.
2509
+ *
2510
+ * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
2511
+ * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
2512
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
2513
+ *
2514
+ * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
2515
+ */
2516
+ overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): this;
2517
+ /**
2518
+ * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
2519
+ *
2520
+ * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
2521
+ * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
2522
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
2523
+ */
2524
+ update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this;
2525
+ /**
2526
+ * Prepends the string with the specified content.
2527
+ */
2528
+ prepend(content: string): this;
2529
+ /**
2530
+ * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
2531
+ */
2532
+ prependLeft(index: number, content: string): this;
2533
+ /**
2534
+ * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
2535
+ */
2536
+ prependRight(index: number, content: string): this;
2537
+ /**
2538
+ * Removes the characters from `start` to `end` (of the original string, **not** the generated string).
2539
+ * Removing the same content twice, or making removals that partially overlap, will cause an error.
2540
+ */
2541
+ remove(start: number, end: number): this;
2542
+ /**
2543
+ * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
2544
+ */
2545
+ reset(start: number, end: number): this;
2546
+ /**
2547
+ * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
2548
+ * Throws error if the indices are for characters that were already removed.
2549
+ */
2550
+ slice(start: number, end: number): string;
2551
+ /**
2552
+ * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
2553
+ */
2554
+ snip(start: number, end: number): this;
2555
+ /**
2556
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
2557
+ */
2558
+ trim(charType?: string): this;
2559
+ /**
2560
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
2561
+ */
2562
+ trimStart(charType?: string): this;
2563
+ /**
2564
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
2565
+ */
2566
+ trimEnd(charType?: string): this;
2567
+ /**
2568
+ * Removes empty lines from the start and end.
2569
+ */
2570
+ trimLines(): this;
2571
+ /**
2572
+ * String replacement with RegExp or string.
2573
+ */
2574
+ replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this;
2575
+ /**
2576
+ * Same as `s.replace`, but replace all matched strings instead of just one.
2577
+ */
2578
+ replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this;
2579
+ lastChar(): string;
2580
+ lastLine(): string;
2581
+ /**
2582
+ * Returns true if the resulting source is empty (disregarding white space).
2583
+ */
2584
+ isEmpty(): boolean;
2585
+ length(): number;
2586
+ /**
2587
+ * Indicates if the string has been changed.
2588
+ */
2589
+ hasChanged(): boolean;
2590
+ original: string;
2591
+ /**
2592
+ * Returns the generated string.
2593
+ */
2594
+ toString(): string;
2595
+ offset: number;
2596
+ }
2597
+ //#endregion
2598
+ //#region node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.d.ts
2599
+ /**
2600
+ * Represents a general structure for ECMAScript module exports.
2601
+ */
2602
+ interface ESMExport {
2603
+ /**
2604
+ * Optional explicit type for complex scenarios, often used internally.
2605
+ * @optional
2606
+ */
2607
+ _type?: "declaration" | "named" | "default" | "star";
2608
+ /**
2609
+ * The type of export (declaration, named, default or star).
2610
+ */
2611
+ type: "declaration" | "named" | "default" | "star";
2612
+ /**
2613
+ * The specific type of declaration being exported, if applicable.
2614
+ * @optional
2615
+ */
2616
+ declarationType?: "let" | "var" | "const" | "enum" | "const enum" | "class" | "function" | "async function";
2617
+ /**
2618
+ * The full code snippet of the export statement.
2619
+ */
2620
+ code: string;
2621
+ /**
2622
+ * The starting position (index) of the export declaration in the source code.
2623
+ */
2624
+ start: number;
2625
+ /**
2626
+ * The end position (index) of the export declaration in the source code.
2627
+ */
2628
+ end: number;
2629
+ /**
2630
+ * The name of the variable, function or class being exported, if given explicitly.
2631
+ * @optional
2632
+ */
2633
+ name?: string;
2634
+ /**
2635
+ * The name used for default exports when a specific identifier isn't given.
2636
+ * @optional
2637
+ */
2638
+ defaultName?: string;
2639
+ /**
2640
+ * An array of names to export, applicable to named and destructured exports.
2641
+ */
2642
+ names: string[];
2643
+ /**
2644
+ * The module specifier, if any, from which exports are being re-exported.
2645
+ * @optional
2646
+ */
2647
+ specifier?: string;
2648
+ }
2649
+ /**
2650
+ * Represents a declaration export within an ECMAScript module.
2651
+ * Extends {@link ESMExport}.
2652
+ */
2653
+ //#endregion
2654
+ //#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/shared/unimport.C0UbTDPO.d.mts
2655
+ declare const builtinPresets: {
2656
+ '@vue/composition-api': InlinePreset;
2657
+ '@vueuse/core': () => Preset$1;
2658
+ '@vueuse/head': InlinePreset;
2659
+ pinia: InlinePreset;
2660
+ preact: InlinePreset;
2661
+ quasar: InlinePreset;
2662
+ react: InlinePreset;
2663
+ 'react-router': InlinePreset;
2664
+ 'react-router-dom': InlinePreset;
2665
+ svelte: InlinePreset;
2666
+ 'svelte/animate': InlinePreset;
2667
+ 'svelte/easing': InlinePreset;
2668
+ 'svelte/motion': InlinePreset;
2669
+ 'svelte/store': InlinePreset;
2670
+ 'svelte/transition': InlinePreset;
2671
+ 'vee-validate': InlinePreset;
2672
+ vitepress: InlinePreset;
2673
+ 'vue-demi': InlinePreset;
2674
+ 'vue-i18n': InlinePreset;
2675
+ 'vue-router': InlinePreset;
2676
+ 'vue-router-composables': InlinePreset;
2677
+ vue: InlinePreset;
2678
+ 'vue/macros': InlinePreset;
2679
+ vuex: InlinePreset;
2680
+ vitest: InlinePreset;
2681
+ 'uni-app': InlinePreset;
2682
+ 'solid-js': InlinePreset;
2683
+ 'solid-app-router': InlinePreset;
2684
+ rxjs: InlinePreset;
2685
+ 'date-fns': InlinePreset;
2686
+ };
2687
+ type BuiltinPresetName = keyof typeof builtinPresets;
2688
+ type ModuleId = string;
2689
+ type ImportName = string;
2690
+ interface ImportCommon {
2691
+ /** Module specifier to import from */
2692
+ from: ModuleId;
2693
+ /**
2694
+ * Priority of the import, if multiple imports have the same name, the one with the highest priority will be used
2695
+ * @default 1
2696
+ */
2697
+ priority?: number;
2698
+ /** If this import is disabled */
2699
+ disabled?: boolean;
2700
+ /** Won't output import in declaration file if true */
2701
+ dtsDisabled?: boolean;
2702
+ /** Import declaration type like const / var / enum */
2703
+ declarationType?: ESMExport['declarationType'];
2704
+ /**
2705
+ * Metadata of the import
2706
+ */
2707
+ meta?: {
2708
+ /** Short description of the import */description?: string; /** URL to the documentation */
2709
+ docsUrl?: string; /** Additional metadata */
2710
+ [key: string]: any;
2711
+ };
2712
+ /**
2713
+ * If this import is a pure type import
2714
+ */
2715
+ type?: boolean;
2716
+ /**
2717
+ * Using this as the from when generating type declarations
2718
+ */
2719
+ typeFrom?: ModuleId;
2720
+ }
2721
+ interface Import extends ImportCommon {
2722
+ /** Import name to be detected */
2723
+ name: ImportName;
2724
+ /** Import as this name */
2725
+ as?: ImportName;
2726
+ /**
2727
+ * With properties
2728
+ *
2729
+ * Ignored for CJS imports.
2730
+ */
2731
+ with?: Record<string, string>;
2732
+ }
2733
+ type PresetImport = Omit<Import, 'from'> | ImportName | [name: ImportName, as?: ImportName, from?: ModuleId];
2734
+ interface InlinePreset extends ImportCommon {
2735
+ imports: (PresetImport | InlinePreset)[];
2736
+ }
2737
+ /**
2738
+ * Auto extract exports from a package for auto import
2739
+ */
2740
+ interface PackagePreset {
2741
+ /**
2742
+ * Name of the package
2743
+ */
2744
+ package: string;
2745
+ /**
2746
+ * Path of the importer
2747
+ * @default process.cwd()
2748
+ */
2749
+ url?: string;
2750
+ /**
2751
+ * RegExp, string, or custom function to exclude names of the extracted imports
2752
+ */
2753
+ ignore?: (string | RegExp | ((name: string) => boolean))[];
2754
+ /**
2755
+ * Use local cache if exits
2756
+ * @default true
2757
+ */
2758
+ cache?: boolean;
2759
+ }
2760
+ type Preset$1 = InlinePreset | PackagePreset;
2761
+ interface UnimportContext {
2762
+ readonly version: string;
2763
+ options: Partial<UnimportOptions>;
2764
+ staticImports: Import[];
2765
+ dynamicImports: Import[];
2766
+ addons: Addon[];
2767
+ getImports: () => Promise<Import[]>;
2768
+ getImportMap: () => Promise<Map<string, Import>>;
2769
+ getMetadata: () => UnimportMeta | undefined;
2770
+ modifyDynamicImports: (fn: (imports: Import[]) => Thenable<void | Import[]>) => Promise<void>;
2771
+ clearDynamicImports: () => void;
2772
+ replaceImports: (imports: UnimportOptions['imports']) => Promise<Import[]>;
2773
+ invalidate: () => void;
2774
+ resolveId: (id: string, parentId?: string) => Thenable<string | null | undefined | void>;
2775
+ }
2776
+ interface DetectImportResult {
2777
+ s: MagicString;
2778
+ strippedCode: string;
2779
+ isCJSContext: boolean;
2780
+ matchedImports: Import[];
2781
+ firstOccurrence: number;
2782
+ }
2783
+ interface Unimport {
2784
+ readonly version: string;
2785
+ init: () => Promise<void>;
2786
+ clearDynamicImports: UnimportContext['clearDynamicImports'];
2787
+ getImportMap: UnimportContext['getImportMap'];
2788
+ getImports: UnimportContext['getImports'];
2789
+ getInternalContext: () => UnimportContext;
2790
+ getMetadata: UnimportContext['getMetadata'];
2791
+ modifyDynamicImports: UnimportContext['modifyDynamicImports'];
2792
+ generateTypeDeclarations: (options?: TypeDeclarationOptions) => Promise<string>;
2793
+ /**
2794
+ * Get un-imported usages from code
2795
+ */
2796
+ detectImports: (code: string | MagicString) => Promise<DetectImportResult>;
2797
+ /**
2798
+ * Insert missing imports statements to code
2799
+ */
2800
+ injectImports: (code: string | MagicString, id?: string, options?: InjectImportsOptions) => Promise<ImportInjectionResult>;
2801
+ scanImportsFromDir: (dir?: (string | ScanDir)[], options?: ScanDirExportsOptions) => Promise<Import[]>;
2802
+ scanImportsFromFile: (file: string, includeTypes?: boolean) => Promise<Import[]>;
2803
+ /**
2804
+ * @deprecated
2805
+ */
2806
+ toExports: (filepath?: string, includeTypes?: boolean) => Promise<string>;
2807
+ }
2808
+ interface InjectionUsageRecord {
2809
+ import: Import;
2810
+ count: number;
2811
+ moduleIds: string[];
1720
2812
  }
1721
- interface NetlifyImagesConfig {
1722
- remote_images?: string[];
1723
- [key: string]: unknown;
2813
+ interface UnimportMeta {
2814
+ injectionUsage: Record<string, InjectionUsageRecord>;
1724
2815
  }
1725
- interface NetlifyRedirectRule {
1726
- from: string;
1727
- to: string;
1728
- status?: number;
1729
- force?: boolean;
1730
- conditions?: Record<string, string[]>;
1731
- query?: Record<string, string>;
1732
- [key: string]: unknown;
2816
+ interface AddonsOptions {
2817
+ addons?: Addon[];
2818
+ /**
2819
+ * Enable auto import inside for Vue's <template>
2820
+ *
2821
+ * @default false
2822
+ */
2823
+ vueTemplate?: boolean;
2824
+ /**
2825
+ * Enable auto import directives for Vue's SFC.
2826
+ *
2827
+ * Library authors should include `meta.vueDirective: true` in the import metadata.
2828
+ *
2829
+ * When using a local directives folder, provide the `isDirective`
2830
+ * callback to check if the import is a Vue directive.
2831
+ */
2832
+ vueDirectives?: true | AddonVueDirectivesOptions;
1733
2833
  }
1734
- //#endregion
1735
- //#region src/presets/vercel/types.d.ts
1736
- /**
1737
- * Vercel Build Output Configuration
1738
- * @see https://vercel.com/docs/build-output-api/v3
1739
- */
1740
- interface VercelBuildConfigV3 {
1741
- version: 3;
1742
- routes?: ({
1743
- src: string;
1744
- headers: {
1745
- "cache-control": string;
1746
- };
1747
- continue: boolean;
1748
- } | {
1749
- handle: string;
1750
- } | {
1751
- src: string;
1752
- dest: string;
1753
- })[];
1754
- images?: {
1755
- sizes: number[];
1756
- domains: string[];
1757
- remotePatterns?: {
1758
- protocol?: "http" | "https";
1759
- hostname: string;
1760
- port?: string;
1761
- pathname?: string;
1762
- }[];
1763
- minimumCacheTTL?: number;
1764
- formats?: ("image/avif" | "image/webp")[];
1765
- dangerouslyAllowSVG?: boolean;
1766
- contentSecurityPolicy?: string;
1767
- };
1768
- wildcard?: Array<{
1769
- domain: string;
1770
- value: string;
1771
- }>;
1772
- overrides?: Record<string, {
1773
- path?: string;
1774
- contentType?: string;
1775
- }>;
1776
- cache?: string[];
1777
- bypassToken?: string;
1778
- crons?: {
1779
- path: string;
1780
- schedule: string;
1781
- }[];
2834
+ interface AddonVueDirectivesOptions {
2835
+ /**
2836
+ * Checks if the import is a Vue directive.
2837
+ *
2838
+ * **NOTES**:
2839
+ * - imports from a library should include `meta.vueDirective: true`.
2840
+ * - this callback is only invoked for local directives (only when meta.vueDirective is not set).
2841
+ *
2842
+ * @param from The path of the import normalized.
2843
+ * @param importEntry The import entry.
2844
+ */
2845
+ isDirective?: (from: string, importEntry: Import) => boolean;
1782
2846
  }
1783
- /**
1784
- * https://vercel.com/docs/build-output-api/primitives#serverless-function-configuration
1785
- * https://vercel.com/docs/build-output-api/primitives#node.js-config
1786
- */
1787
- interface VercelServerlessFunctionConfig {
2847
+ interface UnimportOptions extends Pick<InjectImportsOptions, 'injectAtEnd' | 'mergeExisting' | 'parser'> {
1788
2848
  /**
1789
- * Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
1790
- */
1791
- memory?: number;
2849
+ * Auto import items
2850
+ */
2851
+ imports: Import[];
1792
2852
  /**
1793
- * Specifies the instruction set "architecture" the Vercel Function supports.
1794
- *
1795
- * Either `x86_64` or `arm64`. The default value is `x86_64`
1796
- */
1797
- architecture?: "x86_64" | "arm64";
2853
+ * Auto import preset
2854
+ */
2855
+ presets: (Preset$1 | BuiltinPresetName)[];
1798
2856
  /**
1799
- * Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
1800
- */
1801
- maxDuration?: number;
2857
+ * Custom warning function
2858
+ * @default console.warn
2859
+ */
2860
+ warn: (msg: string) => void;
1802
2861
  /**
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
- */
1806
- environment?: Record<string, string>;
2862
+ * Custom debug log function
2863
+ * @default console.log
2864
+ */
2865
+ debugLog: (msg: string) => void;
2866
+ /**
2867
+ * Unimport Addons.
2868
+ * To use built-in addons, use:
2869
+ * ```js
2870
+ * addons: {
2871
+ * addons: [<custom-addons-here>] // if you want to use also custom addons
2872
+ * vueTemplate: true,
2873
+ * vueDirectives: [<the-directives-here>]
2874
+ * }
2875
+ * ```
2876
+ *
2877
+ * Built-in addons:
2878
+ * - vueDirectives: enable auto import directives for Vue's SFC
2879
+ * - vueTemplate: enable auto import inside for Vue's <template>
2880
+ *
2881
+ * @default {}
2882
+ */
2883
+ addons: AddonsOptions | Addon[];
1807
2884
  /**
1808
- * List of Vercel Regions where the Vercel Function will be deployed to.
1809
- */
1810
- regions?: string[];
2885
+ * Name of virtual modules that exposed all the registed auto-imports
2886
+ * @default []
2887
+ */
2888
+ virtualImports: string[];
1811
2889
  /**
1812
- * True if a custom runtime has support for Lambda runtime wrappers.
1813
- */
1814
- supportsWrapper?: boolean;
2890
+ * Directories to scan for auto import
2891
+ * @default []
2892
+ */
2893
+ dirs?: (string | ScanDir)[];
1815
2894
  /**
1816
- * When true, the Serverless Function will stream the response to the client.
1817
- */
1818
- supportsResponseStreaming?: boolean;
2895
+ * Options for scanning directories for auto import
2896
+ */
2897
+ dirsScanOptions?: ScanDirExportsOptions;
1819
2898
  /**
1820
- * Enables source map generation.
1821
- */
1822
- shouldAddSourcemapSupport?: boolean;
2899
+ * Custom resolver to auto import id
2900
+ */
2901
+ resolveId?: (id: string, importee?: string) => Thenable<string | void>;
1823
2902
  /**
1824
- * The runtime to use. Defaults to the auto-detected Node.js version.
1825
- */
1826
- runtime?: "nodejs20.x" | "nodejs22.x" | "bun1.x" | (string & {});
1827
- [key: string]: unknown;
2903
+ * Custom magic comments to be opt-out for auto import, per file/module
2904
+ *
2905
+ * @default ['@unimport-disable', '@imports-disable']
2906
+ */
2907
+ commentsDisable?: string[];
2908
+ /**
2909
+ * Custom magic comments to debug auto import, printed to console
2910
+ *
2911
+ * @default ['@unimport-debug', '@imports-debug']
2912
+ */
2913
+ commentsDebug?: string[];
2914
+ /**
2915
+ * Collect meta data for each auto import. Accessible via `ctx.meta`
2916
+ */
2917
+ collectMeta?: boolean;
1828
2918
  }
1829
- interface VercelOptions {
1830
- config?: VercelBuildConfigV3;
2919
+ type PathFromResolver = (_import: Import) => string | undefined;
2920
+ interface ScanDirExportsOptions {
1831
2921
  /**
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
- */
1837
- skewProtection?: boolean;
2922
+ * Glob patterns for matching files
2923
+ *
2924
+ * @default ['*.{ts,js,mjs,cjs,mts,cts,tsx,jsx}']
2925
+ */
2926
+ filePatterns?: string[];
1838
2927
  /**
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
- */
1842
- regions?: string[];
1843
- functions?: VercelServerlessFunctionConfig;
2928
+ * Custom function to filter scanned files
2929
+ */
2930
+ fileFilter?: (file: string) => boolean;
1844
2931
  /**
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
- */
1851
- entryFormat?: "web" | "node";
2932
+ * Register type exports
2933
+ *
2934
+ * @default true
2935
+ */
2936
+ types?: boolean;
2937
+ /**
2938
+ * Current working directory
2939
+ *
2940
+ * @default process.cwd()
2941
+ */
2942
+ cwd?: string;
2943
+ }
2944
+ interface ScanDir {
2945
+ /**
2946
+ * Path pattern of the directory
2947
+ */
2948
+ glob: string;
2949
+ /**
2950
+ * Register type exports
2951
+ *
2952
+ * @default true
2953
+ */
2954
+ types?: boolean;
2955
+ }
2956
+ interface TypeDeclarationOptions {
2957
+ /**
2958
+ * Custom resolver for path of the import
2959
+ */
2960
+ resolvePath?: PathFromResolver;
2961
+ /**
2962
+ * Append `export {}` to the end of the file
2963
+ *
2964
+ * @default true
2965
+ */
2966
+ exportHelper?: boolean;
2967
+ /**
2968
+ * Auto-import for type exports
2969
+ *
2970
+ * @default true
2971
+ */
2972
+ typeReExports?: boolean;
2973
+ }
2974
+ interface InjectImportsOptions {
2975
+ /**
2976
+ * Merge the existing imports
2977
+ *
2978
+ * @default false
2979
+ */
2980
+ mergeExisting?: boolean;
2981
+ /**
2982
+ * If the module should be auto imported
2983
+ *
2984
+ * @default true
2985
+ */
2986
+ autoImport?: boolean;
2987
+ /**
2988
+ * If the module should be transformed for virtual modules.
2989
+ * Only available when `virtualImports` is set.
2990
+ *
2991
+ * @default true
2992
+ */
2993
+ transformVirtualImports?: boolean;
2994
+ /**
2995
+ * Parser to use for parsing the code
2996
+ *
2997
+ * Note that `acorn` only takes valid JS Code, should usually only be used after transformationa and transpilation
2998
+ *
2999
+ * @default 'regex'
3000
+ */
3001
+ parser?: 'acorn' | 'regex';
3002
+ /**
3003
+ * Inject the imports at the end of other imports
3004
+ *
3005
+ * @default false
3006
+ */
3007
+ injectAtEnd?: boolean;
3008
+ }
3009
+ type Thenable<T> = Promise<T> | T;
3010
+ interface Addon {
3011
+ name?: string;
3012
+ transform?: (this: UnimportContext, code: MagicString, id: string | undefined) => Thenable<MagicString>;
3013
+ declaration?: (this: UnimportContext, dts: string, options: TypeDeclarationOptions) => Thenable<string>;
3014
+ matchImports?: (this: UnimportContext, identifiers: Set<string>, matched: Import[]) => Thenable<Import[] | void>;
3015
+ /**
3016
+ * Extend or modify the imports list before injecting
3017
+ */
3018
+ extendImports?: (this: UnimportContext, imports: Import[]) => Import[] | void;
3019
+ /**
3020
+ * Resolve imports before injecting
3021
+ */
3022
+ injectImportsResolved?: (this: UnimportContext, imports: Import[], code: MagicString, id?: string) => Import[] | void;
3023
+ /**
3024
+ * Modify the injection code before injecting
3025
+ */
3026
+ injectImportsStringified?: (this: UnimportContext, injection: string, imports: Import[], code: MagicString, id?: string) => string | void;
3027
+ }
3028
+ interface MagicStringResult {
3029
+ s: MagicString;
3030
+ code: string;
3031
+ }
3032
+ interface ImportInjectionResult extends MagicStringResult {
3033
+ imports: Import[];
1852
3034
  }
1853
3035
  //#endregion
1854
- //#region src/presets/_types.gen.d.ts
1855
- interface PresetOptions {
1856
- awsAmplify?: AWSAmplifyOptions;
1857
- awsLambda?: AwsLambdaOptions;
1858
- azure?: AzureOptions;
1859
- cloudflare?: CloudflareOptions;
1860
- firebase?: FirebaseOptions;
1861
- netlify?: NetlifyOptions;
1862
- vercel?: VercelOptions;
3036
+ //#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/unplugin.d.mts
3037
+ interface UnimportPluginOptions extends UnimportOptions {
3038
+ include: FilterPattern;
3039
+ exclude: FilterPattern;
3040
+ dts: boolean | string;
3041
+ /**
3042
+ * Enable implicit auto import.
3043
+ * Generate global TypeScript definitions.
3044
+ *
3045
+ * @default true
3046
+ */
3047
+ autoImport?: boolean;
1863
3048
  }
1864
- 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 & {});
3049
+ //#endregion
3050
+ //#region node_modules/.pnpm/unwasm@0.5.3/node_modules/unwasm/dist/plugin/index.d.mts
3051
+ //#region src/plugin/shared.d.ts
3052
+ interface UnwasmPluginOptions {
3053
+ /**
3054
+ * Directly import the `.wasm` files instead of bundling as base64 string.
3055
+ *
3056
+ * @default false
3057
+ */
3058
+ esmImport?: boolean;
3059
+ /**
3060
+ * Avoid using top level await and always use a proxy.
3061
+ *
3062
+ * Useful for compatibility with environments that don't support top level await.
3063
+ *
3064
+ * @default false
3065
+ */
3066
+ lazy?: boolean;
3067
+ /**
3068
+ * Suppress all warnings from the plugin.
3069
+ *
3070
+ * @default false
3071
+ */
3072
+ silent?: boolean;
3073
+ } //#endregion
3074
+ //#region src/plugin/index.d.ts
1866
3075
  //#endregion
1867
3076
  //#region src/types/openapi-ts.d.ts
1868
3077
  /**
@@ -2100,12 +3309,12 @@ interface ExternalDocumentationObject extends Extensable {
2100
3309
  */
2101
3310
  interface ParameterObject extends Extensable {
2102
3311
  /**
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
- */
3312
+ * REQUIRED. The name of the parameter. Parameter names are case sensitive.
3313
+ *
3314
+ * - 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.
3315
+ * - If `in` is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
3316
+ * - For all other cases, the `name` corresponds to the parameter name used by the `in` property.
3317
+ */
2109
3318
  name: string;
2110
3319
  /** REQUIRED. The location of the parameter. Possible values are "query", "header", "path" or "cookie".*/
2111
3320
  in: "query" | "header" | "path" | "cookie";
@@ -2192,8 +3401,7 @@ interface EncodingObject extends Extensable {
2192
3401
  type ResponsesObject = {
2193
3402
  [responseCode: string]: ResponseObject | ReferenceObject;
2194
3403
  } & {
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;
3404
+ /** 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
3405
  };
2198
3406
  /**
2199
3407
  * [4.8.17] Response Object
@@ -2291,13 +3499,9 @@ interface ReferenceObject extends Extensable {
2291
3499
  * 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
3500
  */
2293
3501
  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 */
3502
+ /** 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. */
3503
+ xml?: XMLObject; /** Additional external documentation for this schema. */
3504
+ externalDocs?: ExternalDocumentationObject; /** @deprecated */
2301
3505
  example?: any;
2302
3506
  title?: string;
2303
3507
  description?: string;
@@ -2305,12 +3509,10 @@ type SchemaObject = {
2305
3509
  deprecated?: boolean;
2306
3510
  readOnly?: boolean;
2307
3511
  writeOnly?: boolean;
2308
- enum?: unknown[];
2309
- /** Use of this keyword is functionally equivalent to an "enum" (Section 6.1.2) with a single value. */
3512
+ enum?: unknown[]; /** Use of this keyword is functionally equivalent to an "enum" (Section 6.1.2) with a single value. */
2310
3513
  const?: unknown;
2311
3514
  default?: unknown;
2312
- format?: string;
2313
- /** @deprecated in 3.1 (still valid for 3.0) */
3515
+ format?: string; /** @deprecated in 3.1 (still valid for 3.0) */
2314
3516
  nullable?: boolean;
2315
3517
  oneOf?: (SchemaObject | ReferenceObject)[];
2316
3518
  allOf?: (SchemaObject | ReferenceObject)[];
@@ -2396,35 +3598,23 @@ interface XMLObject extends Extensable {
2396
3598
  * Defines a security scheme that can be used by the operations.
2397
3599
  */
2398
3600
  type SecuritySchemeObject = {
2399
- /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */
2400
- description?: string;
3601
+ /** A description for security scheme. CommonMark syntax MAY be used for rich text representation. */description?: string;
2401
3602
  [key: `x-${string}`]: any;
2402
3603
  } & ({
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. */
3604
+ /** REQUIRED. The type of the security scheme. */type: "apiKey"; /** REQUIRED. The name of the header, query or cookie parameter to be used. */
3605
+ name: string; /** REQUIRED. The location of the API key. */
2408
3606
  in: "query" | "header" | "cookie";
2409
3607
  } | {
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. */
3608
+ /** 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. */
3609
+ 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
3610
  bearer?: string;
2416
3611
  } | {
2417
- /** REQUIRED. The type of the security scheme. */
2418
- type: "mutualTLS";
3612
+ /** REQUIRED. The type of the security scheme. */type: "mutualTLS";
2419
3613
  } | {
2420
- /** REQUIRED. Tye type of the security scheme. */
2421
- type: "oauth2";
2422
- /** REQUIRED. An object containing configuration information for the flow types supported. */
3614
+ /** REQUIRED. Tye type of the security scheme. */type: "oauth2"; /** REQUIRED. An object containing configuration information for the flow types supported. */
2423
3615
  flows: OAuthFlowsObject;
2424
3616
  } | {
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. */
3617
+ /** 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
3618
  openIdConnectUrl: string;
2429
3619
  });
2430
3620
  /**
@@ -2474,46 +3664,46 @@ interface NitroRouteMeta {
2474
3664
  }
2475
3665
  interface NitroHandlerCommon {
2476
3666
  /**
2477
- * HTTP pathname pattern to match
2478
- *
2479
- * Examples: `/test`, `/api/:id`, `/blog/**`
2480
- */
3667
+ * HTTP pathname pattern to match
3668
+ *
3669
+ * Examples: `/test`, `/api/:id`, `/blog/**`
3670
+ */
2481
3671
  route: string;
2482
3672
  /**
2483
- * HTTP method to match
2484
- */
3673
+ * HTTP method to match
3674
+ */
2485
3675
  method?: HTTPMethod;
2486
3676
  /**
2487
- * Run handler as a middleware before other route handlings
2488
- */
3677
+ * Run handler as a middleware before other route handlings
3678
+ */
2489
3679
  middleware?: boolean;
2490
3680
  /**
2491
- * Extra Meta
2492
- */
3681
+ * Extra Meta
3682
+ */
2493
3683
  meta?: NitroRouteMeta;
2494
3684
  }
2495
3685
  type EventHandlerFormat = "web" | "node";
2496
3686
  interface NitroEventHandler extends NitroHandlerCommon {
2497
3687
  /**
2498
- * Use lazy loading to import handler
2499
- */
3688
+ * Use lazy loading to import handler
3689
+ */
2500
3690
  lazy?: boolean;
2501
3691
  /**
2502
- * Path to event handler
2503
- */
3692
+ * Path to event handler
3693
+ */
2504
3694
  handler: string;
2505
3695
  /**
2506
- * Event handler type.
2507
- *
2508
- * Default is `"web"`. If set to `"node"`, the handler will be converted into a web compatible handler.
2509
- */
3696
+ * Event handler type.
3697
+ *
3698
+ * Default is `"web"`. If set to `"node"`, the handler will be converted into a web compatible handler.
3699
+ */
2510
3700
  format?: EventHandlerFormat;
2511
3701
  env?: MaybeArray$1<"dev" | "prod" | "prerender" | PresetName | (string & {})>;
2512
3702
  }
2513
3703
  interface NitroDevEventHandler extends NitroHandlerCommon {
2514
3704
  /**
2515
- * Event handler function
2516
- */
3705
+ * Event handler function
3706
+ */
2517
3707
  handler: HTTPHandler;
2518
3708
  }
2519
3709
  type MaybePromise<T> = T | Promise<T>;
@@ -2552,6 +3742,48 @@ interface PrerenderRoute {
2552
3742
  /** @deprecated Internal type will be removed in future versions */
2553
3743
  type PrerenderGenerateRoute = PrerenderRoute;
2554
3744
  //#endregion
3745
+ //#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/index.d.mts
3746
+ interface RouterContext<T = unknown> {
3747
+ root: Node<T>;
3748
+ static: Record<string, Node<T> | undefined>;
3749
+ }
3750
+ type ParamsIndexMap = Array<[Index: number, name: string | RegExp, optional: boolean]>;
3751
+ type MethodData<T = unknown> = {
3752
+ data: T;
3753
+ paramsMap?: ParamsIndexMap;
3754
+ paramsRegexp: RegExp[];
3755
+ };
3756
+ interface Node<T = unknown> {
3757
+ key: string;
3758
+ static?: Record<string, Node<T>>;
3759
+ param?: Node<T>;
3760
+ wildcard?: Node<T>;
3761
+ hasRegexParam?: boolean;
3762
+ methods?: Record<string, MethodData<T>[] | undefined>;
3763
+ }
3764
+ //#endregion
3765
+ //#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/compiler.d.mts
3766
+ interface RouterCompilerOptions<T = any> {
3767
+ matchAll?: boolean;
3768
+ serialize?: (data: T) => string;
3769
+ }
3770
+ /**
3771
+ * Compiles the router instance into a faster route-matching function.
3772
+ *
3773
+ * **IMPORTANT:** `compileRouter` requires eval support with `new Function()` in the runtime for JIT compilation.
3774
+ *
3775
+ * @example
3776
+ * import { createRouter, addRoute } from "rou3";
3777
+ * import { compileRouter } from "rou3/compiler";
3778
+ * const router = createRouter();
3779
+ * // [add some routes]
3780
+ * const findRoute = compileRouter(router);
3781
+ * const matchAll = compileRouter(router, { matchAll: true });
3782
+ * findRoute("GET", "/path/foo/bar");
3783
+ *
3784
+ * @param router - The router context to compile.
3785
+ */
3786
+ //#endregion
2555
3787
  //#region src/routing.d.ts
2556
3788
  interface Route<T = unknown> {
2557
3789
  route: string;
@@ -2617,29 +3849,29 @@ type MatchedRouteRule<K$1 extends keyof NitroRouteRules = "custom"> = {
2617
3849
  type MatchedRouteRules = { [K in keyof NitroRouteRules]: MatchedRouteRule<K> };
2618
3850
  interface VercelISRConfig {
2619
3851
  /**
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
- */
3852
+ * (vercel)
3853
+ * Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function.
3854
+ * Setting the value to `false` (or `isr: true` route rule) means it will never expire.
3855
+ */
2624
3856
  expiration?: number | false;
2625
3857
  /**
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
- */
3858
+ * (vercel)
3859
+ * Group number of the asset.
3860
+ * Prerender assets with the same group number will all be re-validated at the same time.
3861
+ */
2630
3862
  group?: number;
2631
3863
  /**
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
- */
3864
+ * (vercel)
3865
+ * List of query string parameter names that will be cached independently.
3866
+ * - If an empty array, query values are not considered for caching.
3867
+ * - If undefined each unique query value is cached independently
3868
+ * - For wildcard `/**` route rules, `url` is always added.
3869
+ */
2638
3870
  allowQuery?: string[];
2639
3871
  /**
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
- */
3872
+ * (vercel)
3873
+ * When `true`, the query string will be present on the `request` argument passed to the invoked function. The `allowQuery` filter still applies.
3874
+ */
2643
3875
  passQuery?: boolean;
2644
3876
  }
2645
3877
  //#endregion
@@ -2776,52 +4008,55 @@ interface NitroModule {
2776
4008
  */
2777
4009
  interface NitroOpenAPIConfig {
2778
4010
  /**
2779
- * OpenAPI meta information
2780
- */
4011
+ * OpenAPI meta information
4012
+ */
2781
4013
  meta?: {
2782
4014
  title?: string;
2783
4015
  description?: string;
2784
4016
  version?: string;
2785
4017
  };
2786
4018
  /**
2787
- * OpenAPI json route
2788
- *
2789
- * Default is `/_openapi.json`
2790
- */
4019
+ * OpenAPI json route
4020
+ *
4021
+ * Default is `/_openapi.json`
4022
+ */
2791
4023
  route?: string;
2792
4024
  /**
2793
- * Enable OpenAPI generation for production builds
2794
- */
4025
+ * Enable OpenAPI generation for production builds
4026
+ */
2795
4027
  production?: false | "runtime" | "prerender";
2796
4028
  /**
2797
- * UI configurations
2798
- */
4029
+ * UI configurations
4030
+ */
2799
4031
  ui?: {
2800
4032
  /**
2801
- * Scalar UI configuration
2802
- */
4033
+ * Scalar UI configuration
4034
+ */
2803
4035
  scalar?: false | (Partial<unknown> & {
2804
4036
  /**
2805
- * Scalar UI route
2806
- *
2807
- * Default is `/_scalar`
2808
- */
4037
+ * Scalar UI route
4038
+ *
4039
+ * Default is `/_scalar`
4040
+ */
2809
4041
  route?: string;
2810
4042
  });
2811
4043
  /**
2812
- * Swagger UI configuration
2813
- */
4044
+ * Swagger UI configuration
4045
+ */
2814
4046
  swagger?: false | {
2815
4047
  /**
2816
- * Swagger UI route
2817
- *
2818
- * Default is `/_swagger`
2819
- */
4048
+ * Swagger UI route
4049
+ *
4050
+ * Default is `/_swagger`
4051
+ */
2820
4052
  route?: string;
2821
4053
  };
2822
4054
  };
2823
4055
  }
2824
4056
  //#endregion
4057
+ //#region node_modules/.pnpm/std-env@3.10.0/node_modules/std-env/dist/index.d.ts
4058
+ type ProviderName = "" | "appveyor" | "aws_amplify" | "azure_pipelines" | "azure_static" | "appcircle" | "bamboo" | "bitbucket" | "bitrise" | "buddy" | "buildkite" | "circle" | "cirrus" | "cloudflare_pages" | "cloudflare_workers" | "codebuild" | "codefresh" | "drone" | "drone" | "dsari" | "github_actions" | "gitlab" | "gocd" | "layerci" | "hudson" | "jenkins" | "magnum" | "netlify" | "nevercode" | "render" | "sail" | "semaphore" | "screwdriver" | "shippable" | "solano" | "strider" | "teamcity" | "travis" | "vercel" | "appcenter" | "codesandbox" | "stackblitz" | "stormkit" | "cleavr" | "zeabur" | "codesphere" | "railway" | "deno-deploy" | "firebase_app_hosting";
4059
+ //#endregion
2825
4060
  //#region src/types/preset.d.ts
2826
4061
  type NitroPreset = NitroConfig | (() => NitroConfig);
2827
4062
  interface NitroPresetMeta {
@@ -2834,6 +4069,7 @@ interface NitroPresetMeta {
2834
4069
  }
2835
4070
  //#endregion
2836
4071
  //#region src/types/config.d.ts
4072
+ type RollupCommonJSOptions = NonNullable<Parameters<typeof commonjs.default>[0]>;
2837
4073
  /**
2838
4074
  * Nitro normalized options (nitro.options)
2839
4075
  */
@@ -2880,67 +4116,67 @@ interface NitroOptions extends PresetOptions {
2880
4116
  };
2881
4117
  features: {
2882
4118
  /**
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
- */
4119
+ * Enable runtime hooks for request and response.
4120
+ *
4121
+ * By default this feature will be enabled if there is at least one nitro plugin.
4122
+ */
2887
4123
  runtimeHooks?: boolean;
2888
4124
  /**
2889
- * Enable WebSocket support
2890
- */
4125
+ * Enable WebSocket support
4126
+ */
2891
4127
  websocket?: boolean;
2892
4128
  };
2893
4129
  /**
2894
- *
2895
- * @see https://github.com/unjs/unwasm
2896
- */
4130
+ *
4131
+ * @see https://github.com/unjs/unwasm
4132
+ */
2897
4133
  wasm?: false | UnwasmPluginOptions;
2898
4134
  openAPI?: NitroOpenAPIConfig;
2899
4135
  experimental: {
2900
4136
  openAPI?: boolean;
2901
4137
  /**
2902
- * See https://github.com/microsoft/TypeScript/pull/51669
2903
- */
4138
+ * See https://github.com/microsoft/TypeScript/pull/51669
4139
+ */
2904
4140
  typescriptBundlerResolution?: boolean;
2905
4141
  /**
2906
- * Enable native async context support for useRequest()
2907
- */
4142
+ * Enable native async context support for useRequest()
4143
+ */
2908
4144
  asyncContext?: boolean;
2909
4145
  /**
2910
- * Disable Experimental Sourcemap Minification
2911
- */
4146
+ * Disable Experimental Sourcemap Minification
4147
+ */
2912
4148
  sourcemapMinify?: false;
2913
4149
  /**
2914
- * Allow env expansion in runtime config
2915
- *
2916
- * @see https://github.com/nitrojs/nitro/pull/2043
2917
- */
4150
+ * Allow env expansion in runtime config
4151
+ *
4152
+ * @see https://github.com/nitrojs/nitro/pull/2043
4153
+ */
2918
4154
  envExpansion?: boolean;
2919
4155
  /**
2920
- * Enable WebSocket support
2921
- *
2922
- * @see https://nitro.build/guide/websocket
2923
- *
2924
- * @deprecated use `features.websocket` instead.
2925
- */
4156
+ * Enable WebSocket support
4157
+ *
4158
+ * @see https://nitro.build/guide/websocket
4159
+ *
4160
+ * @deprecated use `features.websocket` instead.
4161
+ */
2926
4162
  websocket?: boolean;
2927
4163
  /**
2928
- * Enable experimental Database support
2929
- *
2930
- * @see https://nitro.build/guide/database
2931
- */
4164
+ * Enable experimental Database support
4165
+ *
4166
+ * @see https://nitro.build/guide/database
4167
+ */
2932
4168
  database?: boolean;
2933
4169
  /**
2934
- * Enable experimental Tasks support
2935
- *
2936
- * @see https://nitro.build/guide/tasks
2937
- */
4170
+ * Enable experimental Tasks support
4171
+ *
4172
+ * @see https://nitro.build/guide/tasks
4173
+ */
2938
4174
  tasks?: boolean;
2939
4175
  /**
2940
- * Infer path aliases from tsconfig.json
2941
- *
2942
- * @default true
2943
- */
4176
+ * Infer path aliases from tsconfig.json
4177
+ *
4178
+ * @default true
4179
+ */
2944
4180
  tsconfigPaths?: boolean;
2945
4181
  };
2946
4182
  future: {
@@ -2991,8 +4227,8 @@ interface NitroOptions extends PresetOptions {
2991
4227
  devErrorHandler: NitroErrorHandler;
2992
4228
  prerender: {
2993
4229
  /**
2994
- * Prerender HTML routes within subfolders (`/test` would produce `/test/index.html`)
2995
- */
4230
+ * Prerender HTML routes within subfolders (`/test` would produce `/test/index.html`)
4231
+ */
2996
4232
  autoSubfolderIndex?: boolean;
2997
4233
  concurrency?: number;
2998
4234
  interval?: number;
@@ -3002,14 +4238,14 @@ interface NitroOptions extends PresetOptions {
3002
4238
  ignoreUnprefixedPublicAssets?: boolean;
3003
4239
  routes?: string[];
3004
4240
  /**
3005
- * Amount of retries. Pass Infinity to retry indefinitely.
3006
- * @default 3
3007
- */
4241
+ * Amount of retries. Pass Infinity to retry indefinitely.
4242
+ * @default 3
4243
+ */
3008
4244
  retry?: number;
3009
4245
  /**
3010
- * Delay between each retry in ms.
3011
- * @default 500
3012
- */
4246
+ * Delay between each retry in ms.
4247
+ * @default 500
4248
+ */
3013
4249
  retryDelay?: number;
3014
4250
  };
3015
4251
  builder?: "rollup" | "rolldown" | "vite";
@@ -3034,16 +4270,16 @@ interface NitroOptions extends PresetOptions {
3034
4270
  generateTsConfig?: boolean;
3035
4271
  tsConfig?: Partial<TSConfig>;
3036
4272
  /**
3037
- * Path of the generated types directory.
3038
- *
3039
- * Default is `node_modules/.nitro/types`
3040
- */
4273
+ * Path of the generated types directory.
4274
+ *
4275
+ * Default is `node_modules/.nitro/types`
4276
+ */
3041
4277
  generatedTypesDir?: string;
3042
4278
  /**
3043
- * Path of the generated `tsconfig.json` relative to `typescript.generatedTypesDir`
3044
- *
3045
- * Default is `tsconfig.json` (`node_modules/.nitro/types/tsconfig.json`)
3046
- */
4279
+ * Path of the generated `tsconfig.json` relative to `typescript.generatedTypesDir`
4280
+ *
4281
+ * Default is `tsconfig.json` (`node_modules/.nitro/types/tsconfig.json`)
4282
+ */
3047
4283
  tsconfigPath?: string;
3048
4284
  };
3049
4285
  hooks: NestedHooks<NitroHooks>;
@@ -3086,10 +4322,10 @@ interface PublicAssetDir {
3086
4322
  maxAge: number;
3087
4323
  dir: string;
3088
4324
  /**
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
- */
4325
+ * Pass false to disable ignore patterns when scanning the directory, or
4326
+ * pass an array of glob patterns to ignore (which will override global
4327
+ * nitro.ignore patterns).
4328
+ */
3093
4329
  ignore?: false | string[];
3094
4330
  }
3095
4331
  interface CompressOptions {