nitro-nightly 3.0.1-20251212-133814-37b3bbcb → 3.0.1-20251215-192435-f38fe7a0
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/shared3.mjs +1 -0
- package/dist/_build/vite.plugin.mjs +15 -9
- package/dist/_libs/@pi0/vite-plugin-fullstack.mjs +1 -1
- package/dist/_libs/@rollup/plugin-alias.mjs +1 -1
- package/dist/_libs/@rollup/plugin-commonjs.mjs +2 -2
- package/dist/_libs/@rollup/plugin-inject.mjs +1 -1
- package/dist/_libs/@rollup/plugin-json.mjs +1 -1
- package/dist/_libs/@rollup/plugin-node-resolve.mjs +1 -1
- package/dist/_libs/@rollup/plugin-replace.mjs +1 -1
- package/dist/_libs/rou3.mjs +7 -4
- package/dist/_libs/unimport.mjs +23 -13
- package/package.json +12 -12
package/dist/_build/shared3.mjs
CHANGED
|
@@ -641,15 +641,21 @@ function nitroService(ctx) {
|
|
|
641
641
|
enforce: "pre",
|
|
642
642
|
sharedDuringBuild: true,
|
|
643
643
|
applyToEnvironment: (env) => env.name === "nitro",
|
|
644
|
-
resolveId: {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}
|
|
644
|
+
resolveId: {
|
|
645
|
+
filter: { id: /^#nitro-vite-setup$/ },
|
|
646
|
+
async handler(id) {
|
|
647
|
+
if (id === "#nitro-vite-setup") return {
|
|
648
|
+
id,
|
|
649
|
+
moduleSideEffects: true
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
load: {
|
|
654
|
+
filter: { id: /^#nitro-vite-setup$/ },
|
|
655
|
+
async handler(id) {
|
|
656
|
+
if (id === "#nitro-vite-setup") return prodSetup(ctx);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
653
659
|
};
|
|
654
660
|
}
|
|
655
661
|
function createContext(pluginConfig) {
|
|
@@ -1371,7 +1371,7 @@ function stripLiteral(code, options) {
|
|
|
1371
1371
|
}
|
|
1372
1372
|
|
|
1373
1373
|
//#endregion
|
|
1374
|
-
//#region node_modules/.pnpm/@pi0+vite-plugin-fullstack@0.0.5-pr-1297_vite@8.0.0-beta.2_@types+node@25.0.
|
|
1374
|
+
//#region node_modules/.pnpm/@pi0+vite-plugin-fullstack@0.0.5-pr-1297_vite@8.0.0-beta.2_@types+node@25.0.2_jiti@2.6.1_tsx@4.21.0_yaml@2.8.2_/node_modules/@pi0/vite-plugin-fullstack/dist/index.js
|
|
1375
1375
|
function parseIdQuery(id) {
|
|
1376
1376
|
if (!id.includes("?")) return {
|
|
1377
1377
|
filename: id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
|
|
3
|
-
//#region node_modules/.pnpm/@rollup+plugin-alias@6.0.0_rollup@4.53.
|
|
3
|
+
//#region node_modules/.pnpm/@rollup+plugin-alias@6.0.0_rollup@4.53.4/node_modules/@rollup/plugin-alias/dist/index.js
|
|
4
4
|
function matches(pattern, importee) {
|
|
5
5
|
if (pattern instanceof RegExp) return pattern.test(importee);
|
|
6
6
|
if (importee.length < pattern.length) return false;
|
|
@@ -2327,7 +2327,7 @@ function walk(ast, { enter, leave }) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
|
|
2329
2329
|
//#endregion
|
|
2330
|
-
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.53.
|
|
2330
|
+
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.53.4/node_modules/@rollup/pluginutils/dist/es/index.js
|
|
2331
2331
|
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
2332
2332
|
const extractors = {
|
|
2333
2333
|
ArrayPattern(names, param) {
|
|
@@ -2611,7 +2611,7 @@ var require_is_reference = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2611
2611
|
}));
|
|
2612
2612
|
|
|
2613
2613
|
//#endregion
|
|
2614
|
-
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.53.
|
|
2614
|
+
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.53.4/node_modules/@rollup/plugin-commonjs/dist/es/index.js
|
|
2615
2615
|
var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1);
|
|
2616
2616
|
var import_is_reference = /* @__PURE__ */ __toESM(require_is_reference(), 1);
|
|
2617
2617
|
var version = "29.0.0";
|
|
@@ -2,7 +2,7 @@ import { r as MagicString } from "../@pi0/vite-plugin-fullstack.mjs";
|
|
|
2
2
|
import { a as makeLegalIdentifier, n as attachScopes, o as walk, r as createFilter } from "./plugin-commonjs.mjs";
|
|
3
3
|
import { sep } from "path";
|
|
4
4
|
|
|
5
|
-
//#region node_modules/.pnpm/@rollup+plugin-inject@5.0.5_rollup@4.53.
|
|
5
|
+
//#region node_modules/.pnpm/@rollup+plugin-inject@5.0.5_rollup@4.53.4/node_modules/@rollup/plugin-inject/dist/es/index.js
|
|
6
6
|
var escape = function(str) {
|
|
7
7
|
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as dataToEsm, r as createFilter } from "./plugin-commonjs.mjs";
|
|
2
2
|
|
|
3
|
-
//#region node_modules/.pnpm/@rollup+plugin-json@6.1.0_rollup@4.53.
|
|
3
|
+
//#region node_modules/.pnpm/@rollup+plugin-json@6.1.0_rollup@4.53.4/node_modules/@rollup/plugin-json/dist/es/index.js
|
|
4
4
|
function json(options) {
|
|
5
5
|
if (options === void 0) options = {};
|
|
6
6
|
var filter = createFilter(options.include, options.exclude);
|
|
@@ -1113,7 +1113,7 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1113
1113
|
}));
|
|
1114
1114
|
|
|
1115
1115
|
//#endregion
|
|
1116
|
-
//#region node_modules/.pnpm/@rollup+plugin-node-resolve@16.0.3_rollup@4.53.
|
|
1116
|
+
//#region node_modules/.pnpm/@rollup+plugin-node-resolve@16.0.3_rollup@4.53.4/node_modules/@rollup/plugin-node-resolve/dist/es/index.js
|
|
1117
1117
|
var import_cjs = /* @__PURE__ */ __toESM(require_cjs(), 1);
|
|
1118
1118
|
var import_is_module = /* @__PURE__ */ __toESM(require_is_module(), 1);
|
|
1119
1119
|
var import_resolve = /* @__PURE__ */ __toESM(require_resolve(), 1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as MagicString } from "../@pi0/vite-plugin-fullstack.mjs";
|
|
2
2
|
import { r as createFilter } from "./plugin-commonjs.mjs";
|
|
3
3
|
|
|
4
|
-
//#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.53.
|
|
4
|
+
//#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.53.4/node_modules/@rollup/plugin-replace/dist/es/index.js
|
|
5
5
|
function escape(str) {
|
|
6
6
|
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
7
7
|
}
|
package/dist/_libs/rou3.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/rou3@0.7.
|
|
1
|
+
//#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/index.mjs
|
|
2
2
|
const NullProtoObj = /* @__PURE__ */ (() => {
|
|
3
3
|
const e = function() {};
|
|
4
4
|
return e.prototype = Object.create(null), Object.freeze(e.prototype), e;
|
|
@@ -34,13 +34,14 @@ function getMatchParams(segments, paramsMap) {
|
|
|
34
34
|
function addRoute(ctx, method = "", path, data) {
|
|
35
35
|
method = method.toUpperCase();
|
|
36
36
|
if (path.charCodeAt(0) !== 47) path = `/${path}`;
|
|
37
|
+
path = path.replace(/\\:/g, "%3A");
|
|
37
38
|
const segments = splitPath(path);
|
|
38
39
|
let node = ctx.root;
|
|
39
40
|
let _unnamedParamIndex = 0;
|
|
40
41
|
const paramsMap = [];
|
|
41
42
|
const paramsRegexp = [];
|
|
42
43
|
for (let i = 0; i < segments.length; i++) {
|
|
43
|
-
|
|
44
|
+
let segment = segments[i];
|
|
44
45
|
if (segment.startsWith("**")) {
|
|
45
46
|
if (!node.wildcard) node.wildcard = { key: "**" };
|
|
46
47
|
node = node.wildcard;
|
|
@@ -75,6 +76,8 @@ function addRoute(ctx, method = "", path, data) {
|
|
|
75
76
|
]);
|
|
76
77
|
continue;
|
|
77
78
|
}
|
|
79
|
+
if (segment === "\\*") segment = segments[i] = "*";
|
|
80
|
+
else if (segment === "\\*\\*") segment = segments[i] = "**";
|
|
78
81
|
const child = node.static?.[segment];
|
|
79
82
|
if (child) node = child;
|
|
80
83
|
else {
|
|
@@ -92,7 +95,7 @@ function addRoute(ctx, method = "", path, data) {
|
|
|
92
95
|
paramsRegexp,
|
|
93
96
|
paramsMap: hasParams ? paramsMap : void 0
|
|
94
97
|
});
|
|
95
|
-
if (!hasParams) ctx.static[
|
|
98
|
+
if (!hasParams) ctx.static["/" + segments.join("/")] = node;
|
|
96
99
|
}
|
|
97
100
|
function getParamRegexp(segment) {
|
|
98
101
|
const regex = segment.replace(/:(\w+)/g, (_, id) => `(?<${id}>[^/]+)`).replace(/\./g, "\\.");
|
|
@@ -200,7 +203,7 @@ function _findAll(ctx, node, method, segments, index, matches = []) {
|
|
|
200
203
|
}
|
|
201
204
|
|
|
202
205
|
//#endregion
|
|
203
|
-
//#region node_modules/.pnpm/rou3@0.7.
|
|
206
|
+
//#region node_modules/.pnpm/rou3@0.7.12/node_modules/rou3/dist/compiler.mjs
|
|
204
207
|
/**
|
|
205
208
|
* Compile the router instance into a compact runnable code.
|
|
206
209
|
*
|
package/dist/_libs/unimport.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import os from "node:os";
|
|
|
18
18
|
import { Buffer } from "node:buffer";
|
|
19
19
|
import * as querystring from "node:querystring";
|
|
20
20
|
|
|
21
|
-
//#region node_modules/.pnpm/unimport@5.
|
|
21
|
+
//#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/shared/unimport.CWY7iHFZ.mjs
|
|
22
22
|
const excludeRE = [
|
|
23
23
|
/\b(import|export)\b([\w$*{},\s]+?)\bfrom\s*["']/g,
|
|
24
24
|
/\bfunction\s*([\w$]+)\s*\(/g,
|
|
@@ -99,7 +99,7 @@ function dedupeImports(imports, warn) {
|
|
|
99
99
|
const map = /* @__PURE__ */ new Map();
|
|
100
100
|
const indexToRemove = /* @__PURE__ */ new Set();
|
|
101
101
|
imports.filter((i) => !i.disabled).forEach((i, idx) => {
|
|
102
|
-
if (i.declarationType === "enum" || i.declarationType === "class") return;
|
|
102
|
+
if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return;
|
|
103
103
|
const name = i.as ?? i.name;
|
|
104
104
|
if (!map.has(name)) {
|
|
105
105
|
map.set(name, idx);
|
|
@@ -119,8 +119,8 @@ function dedupeImports(imports, warn) {
|
|
|
119
119
|
});
|
|
120
120
|
return imports.filter((_, idx) => !indexToRemove.has(idx));
|
|
121
121
|
}
|
|
122
|
-
function toExports(imports, fileDir, includeType = false) {
|
|
123
|
-
const map = toImportModuleMap(imports, includeType);
|
|
122
|
+
function toExports(imports, fileDir, includeType = false, options = {}) {
|
|
123
|
+
const map = toImportModuleMap(imports, includeType, options);
|
|
124
124
|
return Object.entries(map).flatMap(([name, imports2]) => {
|
|
125
125
|
if (isFilePath(name)) name = name.replace(/\.[a-z]+$/i, "");
|
|
126
126
|
if (fileDir && isAbsolute$1(name)) {
|
|
@@ -207,12 +207,13 @@ ${Array.from(importsMap).flatMap(([from, module$1]) => {
|
|
|
207
207
|
function stringifyImportAlias(item, isCJS = false) {
|
|
208
208
|
return item.as === void 0 || item.name === item.as ? item.name : isCJS ? `${item.name}: ${item.as}` : `${item.name} as ${item.as}`;
|
|
209
209
|
}
|
|
210
|
-
function toImportModuleMap(imports, includeType = false) {
|
|
210
|
+
function toImportModuleMap(imports, includeType = false, options = {}) {
|
|
211
211
|
const map = {};
|
|
212
212
|
for (const _import of imports) {
|
|
213
213
|
if (_import.type && !includeType) continue;
|
|
214
|
-
|
|
215
|
-
map[
|
|
214
|
+
const from = options.declaration && _import.typeFrom || _import.from;
|
|
215
|
+
if (!map[from]) map[from] = /* @__PURE__ */ new Set();
|
|
216
|
+
map[from].add(_import);
|
|
216
217
|
}
|
|
217
218
|
return map;
|
|
218
219
|
}
|
|
@@ -460,9 +461,9 @@ function* findDirective(imports, symbol, [begin, end, importName]) {
|
|
|
460
461
|
}
|
|
461
462
|
|
|
462
463
|
//#endregion
|
|
463
|
-
//#region node_modules/.pnpm/unimport@5.
|
|
464
|
+
//#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/shared/unimport.u_OYhQoS.mjs
|
|
464
465
|
var import_picomatch$2 = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
465
|
-
const version = "5.
|
|
466
|
+
const version = "5.6.0";
|
|
466
467
|
function configureAddons(opts) {
|
|
467
468
|
const addons = [];
|
|
468
469
|
if (Array.isArray(opts.addons)) addons.push(...opts.addons);
|
|
@@ -627,7 +628,7 @@ async function scanDirExports(dirs, options) {
|
|
|
627
628
|
function dedupeDtsExports(exports$1) {
|
|
628
629
|
return exports$1.filter((i) => {
|
|
629
630
|
if (!i.type) return true;
|
|
630
|
-
if (i.declarationType === "enum" || i.declarationType === "class") return true;
|
|
631
|
+
if (i.declarationType === "enum" || i.declarationType === "const enum" || i.declarationType === "class") return true;
|
|
631
632
|
return !exports$1.find((e) => e.as === i.as && e.name === i.name && !e.type);
|
|
632
633
|
});
|
|
633
634
|
}
|
|
@@ -665,7 +666,7 @@ async function scanExports(filepath, includeTypes, seen = /* @__PURE__ */ new Se
|
|
|
665
666
|
from: filepath,
|
|
666
667
|
...additional
|
|
667
668
|
});
|
|
668
|
-
if (exp.declarationType === "enum" || exp.declarationType === "class") imports.push({
|
|
669
|
+
if (exp.declarationType === "enum" || exp.declarationType === "const enum" || exp.declarationType === "class") imports.push({
|
|
669
670
|
name: exp.name,
|
|
670
671
|
as: exp.name,
|
|
671
672
|
from: filepath,
|
|
@@ -3303,7 +3304,7 @@ function createFilter(include, exclude, options) {
|
|
|
3303
3304
|
}
|
|
3304
3305
|
|
|
3305
3306
|
//#endregion
|
|
3306
|
-
//#region node_modules/.pnpm/unimport@5.
|
|
3307
|
+
//#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/unplugin.mjs
|
|
3307
3308
|
const defaultIncludes = [
|
|
3308
3309
|
/\.[jt]sx?$/,
|
|
3309
3310
|
/\.vue$/,
|
|
@@ -3342,7 +3343,7 @@ const unplugin = createUnplugin((options = {}) => {
|
|
|
3342
3343
|
});
|
|
3343
3344
|
|
|
3344
3345
|
//#endregion
|
|
3345
|
-
//#region node_modules/.pnpm/unimport@5.
|
|
3346
|
+
//#region node_modules/.pnpm/unimport@5.6.0/node_modules/unimport/dist/chunks/detect-acorn.mjs
|
|
3346
3347
|
async function detectImportsAcorn(code, ctx, options) {
|
|
3347
3348
|
const s = getMagicString(code);
|
|
3348
3349
|
const map = await ctx.getImportMap();
|
|
@@ -3425,6 +3426,15 @@ function traveseScopes(ast, additionalWalk) {
|
|
|
3425
3426
|
} });
|
|
3426
3427
|
return;
|
|
3427
3428
|
case "BlockStatement":
|
|
3429
|
+
switch (parent?.type) {
|
|
3430
|
+
case "FunctionDeclaration":
|
|
3431
|
+
case "ArrowFunctionExpression":
|
|
3432
|
+
case "FunctionExpression": {
|
|
3433
|
+
const parameterIdentifiers = parent.params.filter((p) => p.type === "Identifier");
|
|
3434
|
+
for (const id of parameterIdentifiers) scopeCurrent.declarations.add(id.name);
|
|
3435
|
+
break;
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3428
3438
|
pushScope(node);
|
|
3429
3439
|
return;
|
|
3430
3440
|
case "Identifier":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-nightly",
|
|
3
|
-
"version": "3.0.1-
|
|
3
|
+
"version": "3.0.1-20251215-192435-f38fe7a0",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"homepage": "https://nitro.build",
|
|
6
6
|
"repository": "nitrojs/nitro",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"jiti": "^2.6.1",
|
|
69
69
|
"ofetch": "^2.0.0-alpha.3",
|
|
70
70
|
"ohash": "^2.0.11",
|
|
71
|
-
"oxc-minify": "^0.
|
|
72
|
-
"oxc-transform": "^0.
|
|
71
|
+
"oxc-minify": "^0.103.0",
|
|
72
|
+
"oxc-transform": "^0.103.0",
|
|
73
73
|
"srvx": "^0.9.8",
|
|
74
74
|
"undici": "^7.16.0",
|
|
75
75
|
"unenv": "^2.0.0-rc.24",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@azure/functions": "^3.5.1",
|
|
80
80
|
"@azure/static-web-apps-cli": "^2.0.7",
|
|
81
|
-
"@cloudflare/workers-types": "^4.
|
|
81
|
+
"@cloudflare/workers-types": "^4.20251213.0",
|
|
82
82
|
"@deno/types": "^0.0.1",
|
|
83
83
|
"@hiogawa/vite-plugin-fullstack": "npm:@pi0/vite-plugin-fullstack@0.0.5-pr-1297",
|
|
84
84
|
"@netlify/edge-functions": "^3.0.3",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@types/etag": "^1.8.4",
|
|
96
96
|
"@types/fs-extra": "^11.0.4",
|
|
97
97
|
"@types/http-proxy": "^1.17.17",
|
|
98
|
-
"@types/node": "^25.0.
|
|
98
|
+
"@types/node": "^25.0.2",
|
|
99
99
|
"@types/node-fetch": "^2.6.13",
|
|
100
100
|
"@types/semver": "^7.7.1",
|
|
101
101
|
"@types/xml2js": "^0.4.14",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"dot-prop": "^10.1.0",
|
|
115
115
|
"edge-runtime": "^4.0.1",
|
|
116
116
|
"escape-string-regexp": "^5.0.0",
|
|
117
|
-
"eslint": "^9.39.
|
|
117
|
+
"eslint": "^9.39.2",
|
|
118
118
|
"eslint-config-unjs": "^0.5.0",
|
|
119
119
|
"etag": "^1.8.1",
|
|
120
120
|
"execa": "^9.6.1",
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"react": "^19.2.3",
|
|
143
143
|
"rendu": "^0.0.7",
|
|
144
144
|
"rolldown": "1.0.0-beta.54",
|
|
145
|
-
"rollup": "^4.53.
|
|
146
|
-
"rou3": "^0.7.
|
|
145
|
+
"rollup": "^4.53.4",
|
|
146
|
+
"rou3": "^0.7.12",
|
|
147
147
|
"scule": "^1.3.0",
|
|
148
148
|
"semver": "^7.7.3",
|
|
149
149
|
"serve-placeholder": "^2.0.2",
|
|
@@ -156,15 +156,15 @@
|
|
|
156
156
|
"ultrahtml": "^1.6.0",
|
|
157
157
|
"uncrypto": "^0.1.3",
|
|
158
158
|
"unctx": "^2.4.1",
|
|
159
|
-
"unimport": "^5.
|
|
159
|
+
"unimport": "^5.6.0",
|
|
160
160
|
"untyped": "^2.0.0",
|
|
161
161
|
"unwasm": "^0.5.2",
|
|
162
|
-
"vite": "
|
|
163
|
-
"vite7": "npm:vite@^7.
|
|
162
|
+
"vite": "8.0.0-beta.2",
|
|
163
|
+
"vite7": "npm:vite@^7.3.0",
|
|
164
164
|
"vitest": "^4.0.15",
|
|
165
165
|
"wrangler": "^4.54.0",
|
|
166
166
|
"xml2js": "^0.6.2",
|
|
167
|
-
"youch": "4.1.0-beta.13",
|
|
167
|
+
"youch": "^4.1.0-beta.13",
|
|
168
168
|
"youch-core": "^0.3.3"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|