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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/_build/common.mjs +542 -542
  2. package/dist/_build/rolldown.mjs +5 -5
  3. package/dist/_build/rollup.mjs +3 -3
  4. package/dist/_build/vite.build.mjs +1 -1
  5. package/dist/_chunks/dev.mjs +4 -4
  6. package/dist/_chunks/nitro.mjs +3 -3
  7. package/dist/_chunks/nitro2.mjs +1 -1
  8. package/dist/_chunks/utils.mjs +1 -1
  9. package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +2 -2
  10. package/dist/_libs/@jridgewell/gen-mapping.mjs +1 -1
  11. package/dist/_libs/@rollup/plugin-commonjs.d.mts +241 -0
  12. package/dist/_libs/@rollup/plugin-commonjs.mjs +19 -19
  13. package/dist/_libs/@rollup/plugin-inject.mjs +1 -1
  14. package/dist/_libs/c12.d.mts +214 -0
  15. package/dist/_libs/c12.mjs +6 -6
  16. package/dist/_libs/chokidar.mjs +2 -2
  17. package/dist/_libs/compatx.d.mts +47 -0
  18. package/dist/_libs/confbox.mjs +2 -2
  19. package/dist/_libs/esbuild.d.mts +20 -0
  20. package/dist/_libs/giget.mjs +1305 -1305
  21. package/dist/_libs/httpxy.d.mts +79 -0
  22. package/dist/_libs/httpxy.mjs +1 -1
  23. package/dist/_libs/magic-string.d.mts +220 -0
  24. package/dist/_libs/mlly.d.mts +57 -0
  25. package/dist/_libs/pkg-types.d.mts +23 -0
  26. package/dist/_libs/rou3.d.mts +43 -0
  27. package/dist/_libs/std-env.d.mts +4 -0
  28. package/dist/_libs/unimport.d.mts +426 -0
  29. package/dist/_libs/unimport.mjs +11 -11
  30. package/dist/_libs/unwasm.d.mts +29 -0
  31. package/dist/_presets.mjs +1 -1
  32. package/dist/builder.mjs +1 -1
  33. package/dist/cli/_chunks/build.mjs +1 -1
  34. package/dist/cli/_chunks/dev.mjs +1 -1
  35. package/dist/cli/_chunks/list.mjs +1 -1
  36. package/dist/cli/_chunks/prepare.mjs +1 -1
  37. package/dist/cli/_chunks/run.mjs +1 -1
  38. package/dist/presets/aws-lambda/runtime/_utils.d.mts +0 -5
  39. package/dist/presets/netlify/runtime/netlify-edge.d.mts +0 -1
  40. package/dist/presets/winterjs/runtime/winterjs.d.mts +0 -1
  41. package/dist/runtime/internal/error/dev.d.mts +0 -1
  42. package/dist/runtime/internal/route-rules.d.mts +0 -4
  43. package/dist/runtime/internal/routes/openapi.d.mts +0 -1
  44. package/dist/runtime/internal/routes/scalar.d.mts +0 -1
  45. package/dist/runtime/internal/routes/swagger.d.mts +0 -1
  46. package/dist/runtime/internal/runtime-config.d.mts +0 -1
  47. package/dist/runtime/nitro.d.mts +0 -3
  48. package/dist/runtime/virtual/renderer-template.d.mts +0 -1
  49. package/dist/types/index.d.mts +962 -1095
  50. package/dist/vite.d.mts +13 -13
  51. package/dist/vite.mjs +10 -9
  52. package/package.json +9 -9
@@ -0,0 +1,214 @@
1
+ import { Stats } from "node:fs";
2
+ import { Jiti, JitiOptions } from "jiti";
3
+ import { EventEmitter } from "node:events";
4
+ import { Readable } from "node:stream";
5
+ import { diff } from "ohash/utils";
6
+
7
+ //#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.d.ts
8
+ type AWF = {
9
+ stabilityThreshold: number;
10
+ pollInterval: number;
11
+ };
12
+ type BasicOpts = {
13
+ persistent: boolean;
14
+ ignoreInitial: boolean;
15
+ followSymlinks: boolean;
16
+ cwd?: string;
17
+ usePolling: boolean;
18
+ interval: number;
19
+ binaryInterval: number;
20
+ alwaysStat?: boolean;
21
+ depth?: number;
22
+ ignorePermissionErrors: boolean;
23
+ atomic: boolean | number;
24
+ };
25
+ type ChokidarOptions = Partial<BasicOpts & {
26
+ ignored: Matcher | Matcher[];
27
+ awaitWriteFinish: boolean | Partial<AWF>;
28
+ }>;
29
+ type MatchFunction = (val: string, stats?: Stats) => boolean;
30
+ interface MatcherObject {
31
+ path: string;
32
+ recursive?: boolean;
33
+ }
34
+ type Matcher = string | RegExp | MatchFunction | MatcherObject;
35
+ //#endregion
36
+ //#region node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.d.mts
37
+ interface TemplateInfo {
38
+ name: string;
39
+ tar: string;
40
+ version?: string;
41
+ subdir?: string;
42
+ url?: string;
43
+ defaultDir?: string;
44
+ headers?: Record<string, string | undefined>;
45
+ source?: never;
46
+ dir?: never;
47
+ [key: string]: any;
48
+ }
49
+ type TemplateProvider = (input: string, options: {
50
+ auth?: string;
51
+ }) => TemplateInfo | Promise<TemplateInfo> | null;
52
+ interface DownloadTemplateOptions {
53
+ provider?: string;
54
+ force?: boolean;
55
+ forceClean?: boolean;
56
+ offline?: boolean;
57
+ preferOffline?: boolean;
58
+ providers?: Record<string, TemplateProvider>;
59
+ dir?: string;
60
+ registry?: false | string;
61
+ cwd?: string;
62
+ auth?: string;
63
+ install?: boolean;
64
+ silent?: boolean;
65
+ }
66
+ //#endregion
67
+ //#region node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.d.mts
68
+ //#region src/dotenv.d.ts
69
+ interface DotenvOptions {
70
+ /**
71
+ * The project root directory (either absolute or relative to the current working directory).
72
+ *
73
+ * Defaults to `options.cwd` in `loadConfig` context, or `process.cwd()` when used as standalone.
74
+ */
75
+ cwd?: string;
76
+ /**
77
+ * What file or files to look in for environment variables (either absolute or relative
78
+ * to the current working directory). For example, `.env`.
79
+ * With the array type, the order enforce the env loading priority (last one overrides).
80
+ */
81
+ fileName?: string | string[];
82
+ /**
83
+ * Whether to interpolate variables within .env.
84
+ *
85
+ * @example
86
+ * ```env
87
+ * BASE_DIR="/test"
88
+ * # resolves to "/test/further"
89
+ * ANOTHER_DIR="${BASE_DIR}/further"
90
+ * ```
91
+ */
92
+ interpolate?: boolean;
93
+ /**
94
+ * An object describing environment variables (key, value pairs).
95
+ */
96
+ env?: NodeJS.ProcessEnv;
97
+ }
98
+ declare global {
99
+ var __c12_dotenv_vars__: Map<Record<string, any>, Set<string>>;
100
+ } //#endregion
101
+ //#region src/types.d.ts
102
+ interface ConfigLayerMeta {
103
+ name?: string;
104
+ [key: string]: any;
105
+ }
106
+ type UserInputConfig = Record<string, any>;
107
+ interface C12InputConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
108
+ $test?: T;
109
+ $development?: T;
110
+ $production?: T;
111
+ $env?: Record<string, T>;
112
+ $meta?: MT;
113
+ }
114
+ interface SourceOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
115
+ /** Custom meta for layer */
116
+ meta?: MT;
117
+ /** Layer config overrides */
118
+ overrides?: T;
119
+ [key: string]: any;
120
+ /**
121
+ * Options for cloning remote sources
122
+ *
123
+ * @see https://giget.unjs.io
124
+ */
125
+ giget?: DownloadTemplateOptions;
126
+ /**
127
+ * Install dependencies after cloning
128
+ *
129
+ * @see https://nypm.unjs.io
130
+ */
131
+ install?: boolean;
132
+ /**
133
+ * Token for cloning private sources
134
+ *
135
+ * @see https://giget.unjs.io#providing-token-for-private-repositories
136
+ */
137
+ auth?: string;
138
+ }
139
+ interface ConfigLayer<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
140
+ config: T | null;
141
+ source?: string;
142
+ sourceOptions?: SourceOptions<T, MT>;
143
+ meta?: MT;
144
+ cwd?: string;
145
+ configFile?: string;
146
+ }
147
+ interface ResolvedConfig<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends ConfigLayer<T, MT> {
148
+ config: T;
149
+ layers?: ConfigLayer<T, MT>[];
150
+ cwd?: string;
151
+ _configFile?: string;
152
+ }
153
+ type ConfigSource = "overrides" | "main" | "rc" | "packageJson" | "defaultConfig";
154
+ interface ConfigFunctionContext {
155
+ [key: string]: any;
156
+ }
157
+ interface ResolvableConfigContext<T extends UserInputConfig = UserInputConfig> {
158
+ configs: Record<ConfigSource, T | null | undefined>;
159
+ rawConfigs: Record<ConfigSource, ResolvableConfig<T> | null | undefined>;
160
+ }
161
+ type MaybePromise<T> = T | Promise<T>;
162
+ type ResolvableConfig<T extends UserInputConfig = UserInputConfig> = MaybePromise<T | null | undefined> | ((ctx: ResolvableConfigContext<T>) => MaybePromise<T | null | undefined>);
163
+ interface LoadConfigOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> {
164
+ name?: string;
165
+ cwd?: string;
166
+ configFile?: string;
167
+ rcFile?: false | string;
168
+ globalRc?: boolean;
169
+ dotenv?: boolean | DotenvOptions;
170
+ envName?: string | false;
171
+ packageJson?: boolean | string | string[];
172
+ defaults?: T;
173
+ defaultConfig?: ResolvableConfig<T>;
174
+ overrides?: ResolvableConfig<T>;
175
+ omit$Keys?: boolean;
176
+ /** Context passed to config functions */
177
+ context?: ConfigFunctionContext;
178
+ resolve?: (id: string, options: LoadConfigOptions<T, MT>) => null | undefined | ResolvedConfig<T, MT> | Promise<ResolvedConfig<T, MT> | undefined | null>;
179
+ jiti?: Jiti;
180
+ jitiOptions?: JitiOptions;
181
+ giget?: false | DownloadTemplateOptions;
182
+ merger?: (...sources: Array<T | null | undefined>) => T;
183
+ extend?: false | {
184
+ extendKey?: string | string[];
185
+ };
186
+ configFileRequired?: boolean;
187
+ }
188
+ //#endregion
189
+ //#region src/watch.d.ts
190
+ type DiffEntries = ReturnType<typeof diff>;
191
+ type ConfigWatcher<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> = ResolvedConfig<T, MT> & {
192
+ watchingFiles: string[];
193
+ unwatch: () => Promise<void>;
194
+ };
195
+ interface WatchConfigOptions<T extends UserInputConfig = UserInputConfig, MT extends ConfigLayerMeta = ConfigLayerMeta> extends LoadConfigOptions<T, MT> {
196
+ chokidarOptions?: ChokidarOptions;
197
+ debounce?: false | number;
198
+ onWatch?: (event: {
199
+ type: "created" | "updated" | "removed";
200
+ path: string;
201
+ }) => void | Promise<void>;
202
+ acceptHMR?: (context: {
203
+ getDiff: () => DiffEntries;
204
+ newConfig: ResolvedConfig<T, MT>;
205
+ oldConfig: ResolvedConfig<T, MT>;
206
+ }) => void | boolean | Promise<void | boolean>;
207
+ onUpdate?: (context: {
208
+ getDiff: () => ReturnType<typeof diff>;
209
+ newConfig: ResolvedConfig<T, MT>;
210
+ oldConfig: ResolvedConfig<T, MT>;
211
+ }) => void | Promise<void>;
212
+ }
213
+ //#endregion
214
+ export { WatchConfigOptions as a, ResolvedConfig as i, ConfigWatcher as n, ChokidarOptions as o, DotenvOptions as r, C12InputConfig as t };
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "../_common.mjs";
2
- import { At as dirname$1, Dt as resolveModulePath, It as resolve$1, Nt as join$1, Pt as normalize$1, jt as extname$1, kt as basename$1, vt as findWorkspaceDir, xt as readPackageJSON } from "../_build/common.mjs";
2
+ import { $ as resolveModulePath, Y as readPackageJSON, at as join$1, ct as resolve$1, nt as dirname$1, ot as normalize$1, q as findWorkspaceDir, rt as extname$1, tt as basename$1 } from "../_build/common.mjs";
3
3
  import { existsSync, promises, readFileSync, statSync } from "node:fs";
4
4
  import { readFile, rm } from "node:fs/promises";
5
5
  import { pathToFileURL } from "node:url";
@@ -653,10 +653,10 @@ function getDotEnvVars(targetEnvironment) {
653
653
  }
654
654
  const _normalize = (p) => p?.replace(/\\/g, "/");
655
655
  const ASYNC_LOADERS = {
656
- ".yaml": () => import("./confbox.mjs").then((n) => n.o).then((r) => r.parseYAML),
657
- ".yml": () => import("./confbox.mjs").then((n) => n.o).then((r) => r.parseYAML),
656
+ ".yaml": () => import("./confbox.mjs").then((n) => n.a).then((r) => r.parseYAML),
657
+ ".yml": () => import("./confbox.mjs").then((n) => n.a).then((r) => r.parseYAML),
658
658
  ".jsonc": () => import("./confbox.mjs").then((n) => n.t).then((r) => r.parseJSONC),
659
- ".json5": () => import("./confbox.mjs").then((n) => n.c).then((r) => r.parseJSON5),
659
+ ".json5": () => import("./confbox.mjs").then((n) => n.o).then((r) => r.parseJSON5),
660
660
  ".toml": () => import("./confbox.mjs").then((n) => n.r).then((r) => r.parseTOML)
661
661
  };
662
662
  const SUPPORTED_EXTENSIONS = Object.freeze([
@@ -924,7 +924,7 @@ async function watchConfig(options) {
924
924
  options.rcFile && resolve$1(l.cwd, typeof options.rcFile === "string" ? options.rcFile : `.${configName}rc`),
925
925
  options.packageJson && resolve$1(l.cwd, "package.json")
926
926
  ]).filter(Boolean))];
927
- const watch$1 = await import("./chokidar.mjs").then((n) => n.i).then((r) => r.watch || r.default || r);
927
+ const watch$1 = await import("./chokidar.mjs").then((n) => n.t).then((r) => r.watch || r.default || r);
928
928
  const { diff } = await import("ohash/utils");
929
929
  const _fswatcher = watch$1(watchingFiles, {
930
930
  ignoreInitial: true,
@@ -969,4 +969,4 @@ async function watchConfig(options) {
969
969
  }
970
970
 
971
971
  //#endregion
972
- export { setupDotenv as a, loadDotenv as i, dist_exports as n, watchConfig as o, loadConfig as r, debounce as s, SUPPORTED_EXTENSIONS as t };
972
+ export { debounce as i, loadConfig as n, watchConfig as r, dist_exports as t };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "../_common.mjs";
2
- import { stat, unwatchFile, watch, watchFile } from "node:fs";
2
+ import { Stats, stat, unwatchFile, watch, watchFile } from "node:fs";
3
3
  import { lstat, open, readdir, realpath, stat as stat$1 } from "node:fs/promises";
4
4
  import { type } from "node:os";
5
5
  import * as sp from "node:path";
@@ -1608,4 +1608,4 @@ var chokidar_default = {
1608
1608
  };
1609
1609
 
1610
1610
  //#endregion
1611
- export { watch$1 as a, chokidar_exports as i, WatchHelper as n, chokidar_default as r, FSWatcher as t };
1611
+ export { watch$1 as n, chokidar_exports as t };
@@ -0,0 +1,47 @@
1
+ //#region node_modules/.pnpm/compatx@0.2.0/node_modules/compatx/dist/index.d.mts
2
+ /**
3
+ * Known platform names
4
+ */
5
+ declare const platforms: readonly ["aws", "azure", "cloudflare", "deno", "firebase", "netlify", "vercel"];
6
+ /**
7
+ * Known platform name
8
+ */
9
+ type PlatformName = typeof platforms[number] | string & {};
10
+ /**
11
+ * Normalize the compatibility dates from input config and defaults.
12
+ */
13
+ type Year = `${number}${number}${number}${number}`;
14
+ type Month = `${"0" | "1"}${number}`;
15
+ type Day = `${"0" | "1" | "2" | "3"}${number}`;
16
+ /**
17
+ * Typed date string in `YYYY-MM-DD` format
18
+ *
19
+ * Empty string is used to represent an "unspecified" date.
20
+ *
21
+ * "latest" is used to represent the latest date available (date of today).
22
+ */
23
+ type DateString = "" | "latest" | `${Year}-${Month}-${Day}`;
24
+ /**
25
+ * Last known compatibility dates for platforms
26
+ *
27
+ * @example
28
+ * {
29
+ * "default": "2024-01-01",
30
+ * "cloudflare": "2024-03-01",
31
+ * }
32
+ */
33
+ type CompatibilityDates = {
34
+ /**
35
+ * Default compatibility date for all unspecified platforms (required)
36
+ */
37
+ default: DateString;
38
+ } & Partial<Record<PlatformName, DateString>>;
39
+ /**
40
+ * Last known compatibility date for the used platform
41
+ */
42
+ type CompatibilityDateSpec = DateString | Partial<CompatibilityDates>;
43
+ /**
44
+ * Get compatibility updates applicable for the user given platform and date range.
45
+ */
46
+ //#endregion
47
+ export { CompatibilityDates as n, DateString as r, CompatibilityDateSpec as t };
@@ -1,5 +1,5 @@
1
1
  import { n as __exportAll } from "../_common.mjs";
2
- import { Et as N$1, Tt as C$2, wt as h$1 } from "../_build/common.mjs";
2
+ import { Q as N$1, X as h$1, Z as C$2 } from "../_build/common.mjs";
3
3
 
4
4
  //#region node_modules/.pnpm/confbox@0.2.2/node_modules/confbox/dist/json5.mjs
5
5
  var json5_exports = /* @__PURE__ */ __exportAll({ parseJSON5: () => Cu });
@@ -2506,4 +2506,4 @@ function Q(e) {
2506
2506
  var jsonc_exports = /* @__PURE__ */ __exportAll({ parseJSONC: () => h$1 });
2507
2507
 
2508
2508
  //#endregion
2509
- export { mr as a, json5_exports as c, gr as i, Q as n, yaml_exports as o, toml_exports as r, Cu as s, jsonc_exports as t };
2509
+ export { yaml_exports as a, gr as i, Q as n, json5_exports as o, toml_exports as r, jsonc_exports as t };
@@ -0,0 +1,20 @@
1
+ //#region node_modules/.pnpm/esbuild@0.27.2/node_modules/esbuild/lib/main.d.ts
2
+ // Note: These declarations exist to avoid type errors when you omit "dom" from
3
+ // "lib" in your "tsconfig.json" file. TypeScript confusingly declares the
4
+ // global "WebAssembly" type in "lib.dom.d.ts" even though it has nothing to do
5
+ // with the browser DOM and is present in many non-browser JavaScript runtimes
6
+ // (e.g. node and deno). Declaring it here allows esbuild's API to be used in
7
+ // these scenarios.
8
+ //
9
+ // There's an open issue about getting this problem corrected (although these
10
+ // declarations will need to remain even if this is fixed for backward
11
+ // compatibility with older TypeScript versions):
12
+ //
13
+ // https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/826
14
+ //
15
+ declare global {
16
+ namespace WebAssembly {
17
+ interface Module {}
18
+ }
19
+ interface URL {}
20
+ }