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,79 @@
1
+ import http, { IncomingMessage, OutgoingMessage } from "node:http";
2
+ import { EventEmitter } from "node:events";
3
+ import * as stream from "node:stream";
4
+
5
+ //#region node_modules/.pnpm/httpxy@0.1.7/node_modules/httpxy/dist/index.d.ts
6
+ interface ProxyTargetDetailed {
7
+ host: string;
8
+ port: number;
9
+ protocol?: string;
10
+ hostname?: string;
11
+ socketPath?: string;
12
+ key?: string;
13
+ passphrase?: string;
14
+ pfx?: Buffer | string;
15
+ cert?: string;
16
+ ca?: string;
17
+ ciphers?: string;
18
+ secureProtocol?: string;
19
+ }
20
+ type ProxyTarget = ProxyTargetUrl | ProxyTargetDetailed;
21
+ type ProxyTargetUrl = string | Partial<URL>;
22
+ interface ProxyServerOptions {
23
+ /** URL string to be parsed with the url module. */
24
+ target?: ProxyTarget;
25
+ /** URL string to be parsed with the url module. */
26
+ forward?: ProxyTargetUrl;
27
+ /** Object to be passed to http(s).request. */
28
+ agent?: any;
29
+ /** Object to be passed to https.createServer(). */
30
+ ssl?: any;
31
+ /** If you want to proxy websockets. */
32
+ ws?: boolean;
33
+ /** Adds x- forward headers. */
34
+ xfwd?: boolean;
35
+ /** Verify SSL certificate. */
36
+ secure?: boolean;
37
+ /** Explicitly specify if we are proxying to another proxy. */
38
+ toProxy?: boolean;
39
+ /** Specify whether you want to prepend the target's path to the proxy path. */
40
+ prependPath?: boolean;
41
+ /** Specify whether you want to ignore the proxy path of the incoming request. */
42
+ ignorePath?: boolean;
43
+ /** Local interface string to bind for outgoing connections. */
44
+ localAddress?: string;
45
+ /** Changes the origin of the host header to the target URL. */
46
+ changeOrigin?: boolean;
47
+ /** specify whether you want to keep letter case of response header key */
48
+ preserveHeaderKeyCase?: boolean;
49
+ /** Basic authentication i.e. 'user:password' to compute an Authorization header. */
50
+ auth?: string;
51
+ /** Rewrites the location hostname on (301 / 302 / 307 / 308) redirects, Default: null. */
52
+ hostRewrite?: string;
53
+ /** Rewrites the location host/ port on (301 / 302 / 307 / 308) redirects based on requested host/ port.Default: false. */
54
+ autoRewrite?: boolean;
55
+ /** Rewrites the location protocol on (301 / 302 / 307 / 308) redirects to 'http' or 'https'.Default: null. */
56
+ protocolRewrite?: string;
57
+ /** Rewrites domain of set-cookie headers. */
58
+ cookieDomainRewrite?: false | string | {
59
+ [oldDomain: string]: string;
60
+ };
61
+ /** Rewrites path of set-cookie headers. Default: false */
62
+ cookiePathRewrite?: false | string | {
63
+ [oldPath: string]: string;
64
+ };
65
+ /** Object with extra headers to be added to target requests. */
66
+ headers?: {
67
+ [header: string]: string;
68
+ };
69
+ /** Timeout (in milliseconds) when proxy receives no response from target. Default: 120000 (2 minutes) */
70
+ proxyTimeout?: number;
71
+ /** Timeout (in milliseconds) for incoming requests */
72
+ timeout?: number;
73
+ /** 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 */
74
+ selfHandleResponse?: boolean;
75
+ /** Buffer */
76
+ buffer?: stream.Stream;
77
+ }
78
+ //#endregion
79
+ export { ProxyServerOptions as t };
@@ -412,4 +412,4 @@ function _createProxyFn(type, server) {
412
412
  }
413
413
 
414
414
  //#endregion
415
- export { createProxyServer as n, dist_exports as r, ProxyServer as t };
415
+ export { dist_exports as n, createProxyServer as t };
@@ -0,0 +1,220 @@
1
+ //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.d.mts
2
+ interface SourceMapOptions {
3
+ /**
4
+ * Whether the mapping should be high-resolution.
5
+ * Hi-res mappings map every single character, meaning (for example) your devtools will always
6
+ * be able to pinpoint the exact location of function calls and so on.
7
+ * With lo-res mappings, devtools may only be able to identify the correct
8
+ * line - but they're quicker to generate and less bulky.
9
+ * You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary
10
+ * instead of per character, suitable for string semantics that are separated by words.
11
+ * If sourcemap locations have been specified with s.addSourceMapLocation(), they will be used here.
12
+ */
13
+ hires?: boolean | 'boundary';
14
+ /**
15
+ * The filename where you plan to write the sourcemap.
16
+ */
17
+ file?: string;
18
+ /**
19
+ * The filename of the file containing the original source.
20
+ */
21
+ source?: string;
22
+ /**
23
+ * Whether to include the original content in the map's sourcesContent array.
24
+ */
25
+ includeContent?: boolean;
26
+ }
27
+ type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
28
+ interface DecodedSourceMap {
29
+ file: string;
30
+ sources: string[];
31
+ sourcesContent?: string[];
32
+ names: string[];
33
+ mappings: SourceMapSegment[][];
34
+ x_google_ignoreList?: number[];
35
+ }
36
+ declare class SourceMap {
37
+ constructor(properties: DecodedSourceMap);
38
+ version: number;
39
+ file: string;
40
+ sources: string[];
41
+ sourcesContent?: string[];
42
+ names: string[];
43
+ mappings: string;
44
+ x_google_ignoreList?: number[];
45
+ debugId?: string;
46
+ /**
47
+ * Returns the equivalent of `JSON.stringify(map)`
48
+ */
49
+ toString(): string;
50
+ /**
51
+ * Returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
52
+ * `generateMap(options?: SourceMapOptions): SourceMap;`
53
+ */
54
+ toUrl(): string;
55
+ }
56
+ type ExclusionRange = [number, number];
57
+ interface MagicStringOptions {
58
+ filename?: string;
59
+ indentExclusionRanges?: ExclusionRange | Array<ExclusionRange>;
60
+ offset?: number;
61
+ }
62
+ interface IndentOptions {
63
+ exclude?: ExclusionRange | Array<ExclusionRange>;
64
+ indentStart?: boolean;
65
+ }
66
+ interface OverwriteOptions {
67
+ storeName?: boolean;
68
+ contentOnly?: boolean;
69
+ }
70
+ interface UpdateOptions {
71
+ storeName?: boolean;
72
+ overwrite?: boolean;
73
+ }
74
+ declare class MagicString {
75
+ constructor(str: string, options?: MagicStringOptions);
76
+ /**
77
+ * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
78
+ */
79
+ addSourcemapLocation(char: number): void;
80
+ /**
81
+ * Appends the specified content to the end of the string.
82
+ */
83
+ append(content: string): this;
84
+ /**
85
+ * Appends the specified content at the index in the original string.
86
+ * If a range *ending* with index is subsequently moved, the insert will be moved with it.
87
+ * See also `s.prependLeft(...)`.
88
+ */
89
+ appendLeft(index: number, content: string): this;
90
+ /**
91
+ * Appends the specified content at the index in the original string.
92
+ * If a range *starting* with index is subsequently moved, the insert will be moved with it.
93
+ * See also `s.prependRight(...)`.
94
+ */
95
+ appendRight(index: number, content: string): this;
96
+ /**
97
+ * Does what you'd expect.
98
+ */
99
+ clone(): this;
100
+ /**
101
+ * Generates a version 3 sourcemap.
102
+ */
103
+ generateMap(options?: SourceMapOptions): SourceMap;
104
+ /**
105
+ * Generates a sourcemap object with raw mappings in array form, rather than encoded as a string.
106
+ * Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
107
+ */
108
+ generateDecodedMap(options?: SourceMapOptions): DecodedSourceMap;
109
+ getIndentString(): string;
110
+ /**
111
+ * Prefixes each line of the string with prefix.
112
+ * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
113
+ */
114
+ indent(options?: IndentOptions): this;
115
+ /**
116
+ * Prefixes each line of the string with prefix.
117
+ * If prefix is not supplied, the indentation will be guessed from the original content, falling back to a single tab character.
118
+ *
119
+ * The options argument can have an exclude property, which is an array of [start, end] character ranges.
120
+ * These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
121
+ */
122
+ indent(indentStr?: string, options?: IndentOptions): this;
123
+ indentExclusionRanges: ExclusionRange | Array<ExclusionRange>;
124
+ /**
125
+ * Moves the characters from `start` and `end` to `index`.
126
+ */
127
+ move(start: number, end: number, index: number): this;
128
+ /**
129
+ * Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in
130
+ * that range. The same restrictions as `s.remove()` apply.
131
+ *
132
+ * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
133
+ * for later inclusion in a sourcemap's names array — and a contentOnly property which determines whether only
134
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
135
+ *
136
+ * It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
137
+ */
138
+ overwrite(start: number, end: number, content: string, options?: boolean | OverwriteOptions): this;
139
+ /**
140
+ * Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply.
141
+ *
142
+ * The fourth argument is optional. It can have a storeName property — if true, the original name will be stored
143
+ * for later inclusion in a sourcemap's names array — and an overwrite property which determines whether only
144
+ * the content is overwritten, or anything that was appended/prepended to the range as well.
145
+ */
146
+ update(start: number, end: number, content: string, options?: boolean | UpdateOptions): this;
147
+ /**
148
+ * Prepends the string with the specified content.
149
+ */
150
+ prepend(content: string): this;
151
+ /**
152
+ * Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at index
153
+ */
154
+ prependLeft(index: number, content: string): this;
155
+ /**
156
+ * Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
157
+ */
158
+ prependRight(index: number, content: string): this;
159
+ /**
160
+ * Removes the characters from `start` to `end` (of the original string, **not** the generated string).
161
+ * Removing the same content twice, or making removals that partially overlap, will cause an error.
162
+ */
163
+ remove(start: number, end: number): this;
164
+ /**
165
+ * Reset the modified characters from `start` to `end` (of the original string, **not** the generated string).
166
+ */
167
+ reset(start: number, end: number): this;
168
+ /**
169
+ * Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string.
170
+ * Throws error if the indices are for characters that were already removed.
171
+ */
172
+ slice(start: number, end: number): string;
173
+ /**
174
+ * Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
175
+ */
176
+ snip(start: number, end: number): this;
177
+ /**
178
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end.
179
+ */
180
+ trim(charType?: string): this;
181
+ /**
182
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
183
+ */
184
+ trimStart(charType?: string): this;
185
+ /**
186
+ * Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
187
+ */
188
+ trimEnd(charType?: string): this;
189
+ /**
190
+ * Removes empty lines from the start and end.
191
+ */
192
+ trimLines(): this;
193
+ /**
194
+ * String replacement with RegExp or string.
195
+ */
196
+ replace(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this;
197
+ /**
198
+ * Same as `s.replace`, but replace all matched strings instead of just one.
199
+ */
200
+ replaceAll(regex: RegExp | string, replacement: string | ((substring: string, ...args: any[]) => string)): this;
201
+ lastChar(): string;
202
+ lastLine(): string;
203
+ /**
204
+ * Returns true if the resulting source is empty (disregarding white space).
205
+ */
206
+ isEmpty(): boolean;
207
+ length(): number;
208
+ /**
209
+ * Indicates if the string has been changed.
210
+ */
211
+ hasChanged(): boolean;
212
+ original: string;
213
+ /**
214
+ * Returns the generated string.
215
+ */
216
+ toString(): string;
217
+ offset: number;
218
+ }
219
+ //#endregion
220
+ export { MagicString as t };
@@ -0,0 +1,57 @@
1
+ //#region node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.d.ts
2
+ /**
3
+ * Represents a general structure for ECMAScript module exports.
4
+ */
5
+ interface ESMExport {
6
+ /**
7
+ * Optional explicit type for complex scenarios, often used internally.
8
+ * @optional
9
+ */
10
+ _type?: "declaration" | "named" | "default" | "star";
11
+ /**
12
+ * The type of export (declaration, named, default or star).
13
+ */
14
+ type: "declaration" | "named" | "default" | "star";
15
+ /**
16
+ * The specific type of declaration being exported, if applicable.
17
+ * @optional
18
+ */
19
+ declarationType?: "let" | "var" | "const" | "enum" | "const enum" | "class" | "function" | "async function";
20
+ /**
21
+ * The full code snippet of the export statement.
22
+ */
23
+ code: string;
24
+ /**
25
+ * The starting position (index) of the export declaration in the source code.
26
+ */
27
+ start: number;
28
+ /**
29
+ * The end position (index) of the export declaration in the source code.
30
+ */
31
+ end: number;
32
+ /**
33
+ * The name of the variable, function or class being exported, if given explicitly.
34
+ * @optional
35
+ */
36
+ name?: string;
37
+ /**
38
+ * The name used for default exports when a specific identifier isn't given.
39
+ * @optional
40
+ */
41
+ defaultName?: string;
42
+ /**
43
+ * An array of names to export, applicable to named and destructured exports.
44
+ */
45
+ names: string[];
46
+ /**
47
+ * The module specifier, if any, from which exports are being re-exported.
48
+ * @optional
49
+ */
50
+ specifier?: string;
51
+ }
52
+ /**
53
+ * Represents a declaration export within an ECMAScript module.
54
+ * Extends {@link ESMExport}.
55
+ */
56
+ //#endregion
57
+ export { ESMExport as t };
@@ -0,0 +1,23 @@
1
+ import { CompilerOptions, TypeAcquisition } from "typescript";
2
+
3
+ //#region node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.d.mts
4
+ 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 };
5
+ interface TSConfig {
6
+ compilerOptions?: StripEnums<CompilerOptions>;
7
+ exclude?: string[];
8
+ compileOnSave?: boolean;
9
+ extends?: string | string[];
10
+ files?: string[];
11
+ include?: string[];
12
+ typeAcquisition?: TypeAcquisition;
13
+ references?: {
14
+ path: string;
15
+ }[];
16
+ }
17
+ /**
18
+ * Defines a TSConfig structure.
19
+ * @param tsconfig - The contents of `tsconfig.json` as an object. See {@link TSConfig}.
20
+ * @returns the same `tsconfig.json` object.
21
+ */
22
+ //#endregion
23
+ export { TSConfig as t };
@@ -0,0 +1,43 @@
1
+ //#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/index.d.mts
2
+ interface RouterContext<T = unknown> {
3
+ root: Node<T>;
4
+ static: Record<string, Node<T> | undefined>;
5
+ }
6
+ type ParamsIndexMap = Array<[Index: number, name: string | RegExp, optional: boolean]>;
7
+ type MethodData<T = unknown> = {
8
+ data: T;
9
+ paramsMap?: ParamsIndexMap;
10
+ paramsRegexp: RegExp[];
11
+ };
12
+ interface Node<T = unknown> {
13
+ key: string;
14
+ static?: Record<string, Node<T>>;
15
+ param?: Node<T>;
16
+ wildcard?: Node<T>;
17
+ hasRegexParam?: boolean;
18
+ methods?: Record<string, MethodData<T>[] | undefined>;
19
+ }
20
+ //#endregion
21
+ //#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/compiler.d.mts
22
+ interface RouterCompilerOptions<T = any> {
23
+ matchAll?: boolean;
24
+ serialize?: (data: T) => string;
25
+ }
26
+ /**
27
+ * Compiles the router instance into a faster route-matching function.
28
+ *
29
+ * **IMPORTANT:** `compileRouter` requires eval support with `new Function()` in the runtime for JIT compilation.
30
+ *
31
+ * @example
32
+ * import { createRouter, addRoute } from "rou3";
33
+ * import { compileRouter } from "rou3/compiler";
34
+ * const router = createRouter();
35
+ * // [add some routes]
36
+ * const findRoute = compileRouter(router);
37
+ * const matchAll = compileRouter(router, { matchAll: true });
38
+ * findRoute("GET", "/path/foo/bar");
39
+ *
40
+ * @param router - The router context to compile.
41
+ */
42
+ //#endregion
43
+ export { RouterContext as n, RouterCompilerOptions as t };
@@ -0,0 +1,4 @@
1
+ //#region node_modules/.pnpm/std-env@3.10.0/node_modules/std-env/dist/index.d.ts
2
+ 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";
3
+ //#endregion
4
+ export { ProviderName as t };