nitro-nightly 3.0.1-20260125-215009-8882bc9e → 3.0.1-20260127-164246-ef01b092
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_build/common.mjs +2084 -3212
- package/dist/_build/rolldown.mjs +12 -25
- package/dist/_build/rollup.mjs +11 -27
- package/dist/_build/vite.build.mjs +7 -11
- package/dist/_chunks/dev.mjs +20 -42
- package/dist/_chunks/nitro.mjs +13 -92
- package/dist/_chunks/nitro2.mjs +1 -5
- package/dist/_chunks/utils.mjs +10 -24
- package/dist/_common.mjs +12 -24
- package/dist/_libs/citty.mjs +1 -13
- package/dist/_libs/commondir+is-reference.mjs +12 -22
- package/dist/_libs/compatx.mjs +1 -4
- package/dist/_libs/confbox.mjs +363 -376
- package/dist/_libs/escape-string-regexp.mjs +1 -4
- package/dist/_libs/estree-walker.mjs +4 -92
- package/dist/_libs/hasown+resolve+deepmerge.mjs +144 -230
- package/dist/_libs/httpxy.mjs +5 -21
- package/dist/_libs/klona.mjs +1 -4
- package/dist/_libs/nypm+giget+tinyexec.mjs +874 -926
- package/dist/_libs/plugin-alias.mjs +1 -5
- package/dist/_libs/plugin-inject.mjs +1 -5
- package/dist/_libs/plugin-json.mjs +1 -5
- package/dist/_libs/pluginutils+plugin-commonjs.d.mts +2 -2
- package/dist/_libs/pluginutils.mjs +1 -31
- package/dist/_libs/rc9+c12+dotenv.mjs +43 -83
- package/dist/_libs/readdirp+chokidar.mjs +184 -360
- package/dist/_libs/remapping.mjs +1 -5
- package/dist/_libs/resolve-uri+gen-mapping.mjs +12 -48
- package/dist/_libs/rou3.mjs +1 -32
- package/dist/_libs/tsconfck.mjs +21 -334
- package/dist/_libs/ultrahtml.mjs +3 -16
- package/dist/_libs/unimport+unplugin.mjs +15 -75
- package/dist/_presets.mjs +260 -445
- package/dist/builder.mjs +1 -2
- package/dist/cli/_chunks/build.mjs +1 -5
- package/dist/cli/_chunks/common.mjs +1 -4
- package/dist/cli/_chunks/dev.mjs +1 -5
- package/dist/cli/_chunks/list.mjs +1 -5
- package/dist/cli/_chunks/prepare.mjs +1 -5
- package/dist/cli/_chunks/run.mjs +1 -5
- package/dist/cli/_chunks/task.mjs +1 -5
- package/dist/cli/index.mjs +1 -5
- package/dist/types/index.d.mts +5 -5
- package/dist/types/index.mjs +1 -2
- package/dist/vite.mjs +44 -63
- package/package.json +21 -21
package/dist/_libs/remapping.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { a as toDecodedMap, c as decodedMappings, i as setSourceContent, l as traceSegment, n as maybeAddSegment, o as toEncodedMap, r as setIgnore, s as TraceMap, t as GenMapping } from "./resolve-uri+gen-mapping.mjs";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs
|
|
4
2
|
var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
|
|
5
3
|
var EMPTY_SOURCES = [];
|
|
6
4
|
function SegmentObject(source, line, column, name, content, ignore) {
|
|
@@ -112,6 +110,4 @@ function remapping(input, loader, options) {
|
|
|
112
110
|
};
|
|
113
111
|
return new SourceMap(traceMappings(buildSourceMapTree(input, loader)), opts);
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
//#endregion
|
|
117
|
-
export { remapping as t };
|
|
113
|
+
export { remapping as t };
|
|
@@ -1,27 +1,6 @@
|
|
|
1
1
|
import { C as decode, w as encode } from "../_build/common.mjs";
|
|
2
|
-
|
|
3
|
-
//#region node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
|
|
4
2
|
const schemeRegex = /^[\w+.-]+:\/\//;
|
|
5
|
-
/**
|
|
6
|
-
* Matches the parts of a URL:
|
|
7
|
-
* 1. Scheme, including ":", guaranteed.
|
|
8
|
-
* 2. User/password, including "@", optional.
|
|
9
|
-
* 3. Host, guaranteed.
|
|
10
|
-
* 4. Port, including ":", optional.
|
|
11
|
-
* 5. Path, including "/", optional.
|
|
12
|
-
* 6. Query, including "?", optional.
|
|
13
|
-
* 7. Hash, including "#", optional.
|
|
14
|
-
*/
|
|
15
3
|
const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
|
|
16
|
-
/**
|
|
17
|
-
* File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
|
|
18
|
-
* with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
|
|
19
|
-
*
|
|
20
|
-
* 1. Host, optional.
|
|
21
|
-
* 2. Path, which may include "/", guaranteed.
|
|
22
|
-
* 3. Query, including "?", optional.
|
|
23
|
-
* 4. Hash, including "#", optional.
|
|
24
|
-
*/
|
|
25
4
|
const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
|
|
26
5
|
function isAbsoluteUrl(input) {
|
|
27
6
|
return schemeRegex.test(input);
|
|
@@ -61,17 +40,17 @@ function makeUrl(scheme, user, host, port, path, query, hash) {
|
|
|
61
40
|
}
|
|
62
41
|
function parseUrl(input) {
|
|
63
42
|
if (isSchemeRelativeUrl(input)) {
|
|
64
|
-
const url
|
|
65
|
-
url
|
|
66
|
-
url
|
|
67
|
-
return url
|
|
43
|
+
const url = parseAbsoluteUrl("http:" + input);
|
|
44
|
+
url.scheme = "";
|
|
45
|
+
url.type = 6;
|
|
46
|
+
return url;
|
|
68
47
|
}
|
|
69
48
|
if (isAbsolutePath(input)) {
|
|
70
|
-
const url
|
|
71
|
-
url
|
|
72
|
-
url
|
|
73
|
-
url
|
|
74
|
-
return url
|
|
49
|
+
const url = parseAbsoluteUrl("http://foo.com" + input);
|
|
50
|
+
url.scheme = "";
|
|
51
|
+
url.host = "";
|
|
52
|
+
url.type = 5;
|
|
53
|
+
return url;
|
|
75
54
|
}
|
|
76
55
|
if (isFileUrl(input)) return parseFileUrl(input);
|
|
77
56
|
if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input);
|
|
@@ -91,10 +70,6 @@ function mergePaths(url, base) {
|
|
|
91
70
|
if (url.path === "/") url.path = base.path;
|
|
92
71
|
else url.path = stripPathFilename(base.path) + url.path;
|
|
93
72
|
}
|
|
94
|
-
/**
|
|
95
|
-
* The path can have empty directories "//", unneeded parents "foo/..", or current directory
|
|
96
|
-
* "foo/.". We need to normalize to a standard representation.
|
|
97
|
-
*/
|
|
98
73
|
function normalizePath(url, type) {
|
|
99
74
|
const rel = type <= 4;
|
|
100
75
|
const pieces = url.path.split("/");
|
|
@@ -125,9 +100,6 @@ function normalizePath(url, type) {
|
|
|
125
100
|
if (!path || addTrailingSlash && !path.endsWith("/..")) path += "/";
|
|
126
101
|
url.path = path;
|
|
127
102
|
}
|
|
128
|
-
/**
|
|
129
|
-
* Attempts to resolve `input` URL/path relative to `base`.
|
|
130
|
-
*/
|
|
131
103
|
function resolve(input, base) {
|
|
132
104
|
if (!input && !base) return "";
|
|
133
105
|
const url = parseUrl(input);
|
|
@@ -163,9 +135,6 @@ function resolve(input, base) {
|
|
|
163
135
|
default: return url.scheme + "//" + url.user + url.host + url.port + url.path + queryHash;
|
|
164
136
|
}
|
|
165
137
|
}
|
|
166
|
-
|
|
167
|
-
//#endregion
|
|
168
|
-
//#region node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
|
|
169
138
|
function stripFilename(path) {
|
|
170
139
|
if (!path) return "";
|
|
171
140
|
const index = path.lastIndexOf("/");
|
|
@@ -263,8 +232,8 @@ var TraceMap = class {
|
|
|
263
232
|
this.sources = sources;
|
|
264
233
|
this.sourcesContent = sourcesContent;
|
|
265
234
|
this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
|
|
266
|
-
const resolve
|
|
267
|
-
this.resolvedSources = sources.map(resolve
|
|
235
|
+
const resolve = resolver(mapUrl, sourceRoot);
|
|
236
|
+
this.resolvedSources = sources.map(resolve);
|
|
268
237
|
const { mappings } = parsed;
|
|
269
238
|
if (typeof mappings === "string") {
|
|
270
239
|
this._encoded = mappings;
|
|
@@ -300,9 +269,6 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
300
269
|
if (index === -1 || index === segments.length) return -1;
|
|
301
270
|
return index;
|
|
302
271
|
}
|
|
303
|
-
|
|
304
|
-
//#endregion
|
|
305
|
-
//#region node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
306
272
|
var SetArray = class {
|
|
307
273
|
constructor() {
|
|
308
274
|
this._indexes = { __proto__: null };
|
|
@@ -443,6 +409,4 @@ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIn
|
|
|
443
409
|
if (prev.length === 1) return false;
|
|
444
410
|
return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
|
|
445
411
|
}
|
|
446
|
-
|
|
447
|
-
//#endregion
|
|
448
|
-
export { toDecodedMap as a, decodedMappings as c, setSourceContent as i, traceSegment as l, maybeAddSegment as n, toEncodedMap as o, setIgnore as r, TraceMap as s, GenMapping as t };
|
|
412
|
+
export { toDecodedMap as a, decodedMappings as c, setSourceContent as i, traceSegment as l, maybeAddSegment as n, toEncodedMap as o, setIgnore as r, TraceMap as s, GenMapping as t };
|
package/dist/_libs/rou3.mjs
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/index.mjs
|
|
2
1
|
const NullProtoObj = /* @__PURE__ */ (() => {
|
|
3
2
|
const e = function() {};
|
|
4
3
|
return e.prototype = Object.create(null), Object.freeze(e.prototype), e;
|
|
5
4
|
})();
|
|
6
|
-
/**
|
|
7
|
-
* Create a new router context.
|
|
8
|
-
*/
|
|
9
5
|
function createRouter() {
|
|
10
6
|
return {
|
|
11
7
|
root: { key: "" },
|
|
@@ -28,9 +24,6 @@ function getMatchParams(segments, paramsMap) {
|
|
|
28
24
|
}
|
|
29
25
|
return params;
|
|
30
26
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Add a route to the router context.
|
|
33
|
-
*/
|
|
34
27
|
function addRoute(ctx, method = "", path, data) {
|
|
35
28
|
method = method.toUpperCase();
|
|
36
29
|
if (path.charCodeAt(0) !== 47) path = `/${path}`;
|
|
@@ -101,9 +94,6 @@ function getParamRegexp(segment) {
|
|
|
101
94
|
const regex = segment.replace(/:(\w+)/g, (_, id) => `(?<${id}>[^/]+)`).replace(/\./g, "\\.");
|
|
102
95
|
return /* @__PURE__ */ new RegExp(`^${regex}$`);
|
|
103
96
|
}
|
|
104
|
-
/**
|
|
105
|
-
* Find a route by path.
|
|
106
|
-
*/
|
|
107
97
|
function findRoute(ctx, method = "", path, opts) {
|
|
108
98
|
if (path.charCodeAt(path.length - 1) === 47) path = path.slice(0, -1);
|
|
109
99
|
const staticNode = ctx.static[path];
|
|
@@ -162,9 +152,6 @@ function _lookupTree(ctx, node, method, segments, index) {
|
|
|
162
152
|
}
|
|
163
153
|
if (node.wildcard && node.wildcard.methods) return node.wildcard.methods[method] || node.wildcard.methods[""];
|
|
164
154
|
}
|
|
165
|
-
/**
|
|
166
|
-
* Find all route patterns that match the given path.
|
|
167
|
-
*/
|
|
168
155
|
function findAllRoutes(ctx, method = "", path, opts) {
|
|
169
156
|
if (path.charCodeAt(path.length - 1) === 47) path = path.slice(0, -1);
|
|
170
157
|
const segments = splitPath(path);
|
|
@@ -201,22 +188,6 @@ function _findAll(ctx, node, method, segments, index, matches = []) {
|
|
|
201
188
|
}
|
|
202
189
|
return matches;
|
|
203
190
|
}
|
|
204
|
-
|
|
205
|
-
//#endregion
|
|
206
|
-
//#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/compiler.mjs
|
|
207
|
-
/**
|
|
208
|
-
* Compile the router instance into a compact runnable code.
|
|
209
|
-
*
|
|
210
|
-
* **IMPORTANT:** Route data must be serializable to JSON (i.e., no functions or classes) or implement the `toJSON()` method to render custom code or you can pass custom `serialize` function in options.
|
|
211
|
-
*
|
|
212
|
-
* @example
|
|
213
|
-
* import { createRouter, addRoute } from "rou3";
|
|
214
|
-
* import { compileRouterToString } from "rou3/compiler";
|
|
215
|
-
* const router = createRouter();
|
|
216
|
-
* // [add some routes with serializable data]
|
|
217
|
-
* const compilerCode = compileRouterToString(router, "findRoute");
|
|
218
|
-
* // "const findRoute=(m, p) => {}"
|
|
219
|
-
*/
|
|
220
191
|
function compileRouterToString(router, functionName, opts) {
|
|
221
192
|
const ctx = {
|
|
222
193
|
opts: opts || {},
|
|
@@ -317,6 +288,4 @@ function serializeData(ctx, value) {
|
|
|
317
288
|
}
|
|
318
289
|
return `$${index}`;
|
|
319
290
|
}
|
|
320
|
-
|
|
321
|
-
//#endregion
|
|
322
|
-
export { findRoute as a, findAllRoutes as i, addRoute as n, createRouter as r, compileRouterToString as t };
|
|
291
|
+
export { findRoute as a, findAllRoutes as i, addRoute as n, createRouter as r, compileRouterToString as t };
|