nitro-nightly 3.0.1-20260106-122901-e9c3a660 → 3.0.1-20260106-182834-5019d347
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/rolldown.mjs +11 -11
- package/dist/_build/rollup.mjs +19 -11
- package/dist/_build/shared.mjs +3 -2
- package/dist/_build/shared2.mjs +1 -1
- package/dist/_build/shared3.mjs +2 -2
- package/dist/_build/vite.build.mjs +8 -9
- package/dist/_dev.mjs +4 -3
- package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +6 -1561
- package/dist/_libs/@jridgewell/gen-mapping.mjs +2 -304
- package/dist/_libs/@jridgewell/remapping.mjs +2 -1
- package/dist/_libs/@jridgewell/resolve-uri.mjs +166 -0
- package/dist/_libs/@jridgewell/sourcemap-codec.mjs +167 -0
- package/dist/_libs/@jridgewell/trace-mapping.mjs +141 -0
- package/dist/_libs/@rolldown/pluginutils.mjs +31 -0
- package/dist/_libs/@rollup/plugin-commonjs.mjs +33 -2636
- package/dist/_libs/@rollup/plugin-inject.mjs +3 -2
- package/dist/_libs/@rollup/plugin-json.mjs +1 -1
- package/dist/_libs/@rollup/plugin-node-resolve.mjs +8 -1112
- package/dist/_libs/@rollup/plugin-replace.mjs +2 -2
- package/dist/_libs/@rollup/pluginutils.mjs +241 -0
- package/dist/_libs/c12.mjs +63 -2513
- package/dist/_libs/chokidar.mjs +2 -235
- package/dist/_libs/commondir.mjs +22 -0
- package/dist/_libs/confbox.mjs +1511 -911
- package/dist/_libs/deepmerge.mjs +86 -0
- package/dist/_libs/dotenv.mjs +345 -0
- package/dist/_libs/estree-walker.mjs +144 -1
- package/dist/_libs/exsolve.mjs +1007 -0
- package/dist/_libs/fdir.mjs +514 -0
- package/dist/_libs/function-bind.mjs +63 -0
- package/dist/_libs/giget.mjs +1380 -2238
- package/dist/_libs/hasown.mjs +14 -0
- package/dist/_libs/is-core-module.mjs +220 -0
- package/dist/_libs/is-module.mjs +13 -0
- package/dist/_libs/is-reference.mjs +33 -0
- package/dist/_libs/js-tokens.mjs +382 -0
- package/dist/_libs/local-pkg.mjs +7 -1561
- package/dist/_libs/magic-string.mjs +939 -0
- package/dist/_libs/mlly.mjs +1415 -0
- package/dist/_libs/node-fetch-native.mjs +7 -0
- package/dist/_libs/nypm.mjs +239 -0
- package/dist/_libs/path-parse.mjs +47 -0
- package/dist/_libs/pathe.mjs +163 -2
- package/dist/_libs/perfect-debounce.mjs +89 -0
- package/dist/_libs/picomatch.mjs +1673 -0
- package/dist/_libs/pkg-types.mjs +197 -0
- package/dist/_libs/quansync.mjs +90 -0
- package/dist/_libs/rc9.mjs +136 -0
- package/dist/_libs/readdirp.mjs +237 -0
- package/dist/_libs/resolve.mjs +689 -0
- package/dist/_libs/strip-literal.mjs +51 -0
- package/dist/_libs/tinyexec.mjs +627 -0
- package/dist/_libs/tinyglobby.mjs +2 -1
- package/dist/_libs/tsconfck.mjs +1 -1
- package/dist/_libs/unimport.mjs +93 -1617
- package/dist/_libs/unplugin-utils.mjs +61 -0
- package/dist/_libs/unplugin.mjs +1225 -0
- package/dist/_libs/unwasm.mjs +3 -2
- package/dist/_libs/webpack-virtual-modules.mjs +272 -0
- package/dist/_nitro.mjs +9 -7
- package/dist/_nitro2.mjs +6 -7
- package/dist/_presets.mjs +9 -7
- package/dist/builder.mjs +5 -5
- package/dist/cli/_chunks/build.mjs +1 -1
- package/dist/cli/_chunks/dev.mjs +1 -1
- package/dist/cli/_chunks/list.mjs +1 -1
- package/dist/cli/_chunks/prepare.mjs +1 -1
- package/dist/cli/_chunks/run.mjs +1 -1
- package/dist/vite.mjs +1825 -22
- package/package.json +2 -2
- package/dist/_build/shared4.mjs +0 -1112
- package/dist/_build/vite.plugin.mjs +0 -712
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as MagicString } from "../magic-string.mjs";
|
|
2
|
+
import { n as createFilter } from "./pluginutils.mjs";
|
|
3
3
|
|
|
4
4
|
//#region node_modules/.pnpm/@rollup+plugin-replace@6.0.3_rollup@4.55.1/node_modules/@rollup/plugin-replace/dist/es/index.js
|
|
5
5
|
function escape(str) {
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { i as __toESM } from "../../_rolldown.mjs";
|
|
2
|
+
import { t as require_picomatch } from "../picomatch.mjs";
|
|
3
|
+
import { n as walk } from "../estree-walker.mjs";
|
|
4
|
+
import { extname, isAbsolute, posix, resolve, win32 } from "path";
|
|
5
|
+
|
|
6
|
+
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.55.1/node_modules/@rollup/pluginutils/dist/es/index.js
|
|
7
|
+
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
8
|
+
const extractors = {
|
|
9
|
+
ArrayPattern(names, param) {
|
|
10
|
+
for (const element of param.elements) if (element) extractors[element.type](names, element);
|
|
11
|
+
},
|
|
12
|
+
AssignmentPattern(names, param) {
|
|
13
|
+
extractors[param.left.type](names, param.left);
|
|
14
|
+
},
|
|
15
|
+
Identifier(names, param) {
|
|
16
|
+
names.push(param.name);
|
|
17
|
+
},
|
|
18
|
+
MemberExpression() {},
|
|
19
|
+
ObjectPattern(names, param) {
|
|
20
|
+
for (const prop of param.properties) if (prop.type === "RestElement") extractors.RestElement(names, prop);
|
|
21
|
+
else extractors[prop.value.type](names, prop.value);
|
|
22
|
+
},
|
|
23
|
+
RestElement(names, param) {
|
|
24
|
+
extractors[param.argument.type](names, param.argument);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const extractAssignedNames = function extractAssignedNames$1(param) {
|
|
28
|
+
const names = [];
|
|
29
|
+
extractors[param.type](names, param);
|
|
30
|
+
return names;
|
|
31
|
+
};
|
|
32
|
+
const blockDeclarations = {
|
|
33
|
+
const: true,
|
|
34
|
+
let: true
|
|
35
|
+
};
|
|
36
|
+
var Scope = class {
|
|
37
|
+
constructor(options = {}) {
|
|
38
|
+
this.parent = options.parent;
|
|
39
|
+
this.isBlockScope = !!options.block;
|
|
40
|
+
this.declarations = Object.create(null);
|
|
41
|
+
if (options.params) options.params.forEach((param) => {
|
|
42
|
+
extractAssignedNames(param).forEach((name) => {
|
|
43
|
+
this.declarations[name] = true;
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
addDeclaration(node, isBlockDeclaration, isVar) {
|
|
48
|
+
if (!isBlockDeclaration && this.isBlockScope) this.parent.addDeclaration(node, isBlockDeclaration, isVar);
|
|
49
|
+
else if (node.id) extractAssignedNames(node.id).forEach((name) => {
|
|
50
|
+
this.declarations[name] = true;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
contains(name) {
|
|
54
|
+
return this.declarations[name] || (this.parent ? this.parent.contains(name) : false);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const attachScopes = function attachScopes$1(ast, propertyName = "scope") {
|
|
58
|
+
let scope = new Scope();
|
|
59
|
+
walk(ast, {
|
|
60
|
+
enter(n, parent) {
|
|
61
|
+
const node = n;
|
|
62
|
+
if (/(?:Function|Class)Declaration/.test(node.type)) scope.addDeclaration(node, false, false);
|
|
63
|
+
if (node.type === "VariableDeclaration") {
|
|
64
|
+
const { kind } = node;
|
|
65
|
+
const isBlockDeclaration = blockDeclarations[kind];
|
|
66
|
+
node.declarations.forEach((declaration) => {
|
|
67
|
+
scope.addDeclaration(declaration, isBlockDeclaration, true);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
let newScope;
|
|
71
|
+
if (node.type.includes("Function")) {
|
|
72
|
+
const func = node;
|
|
73
|
+
newScope = new Scope({
|
|
74
|
+
parent: scope,
|
|
75
|
+
block: false,
|
|
76
|
+
params: func.params
|
|
77
|
+
});
|
|
78
|
+
if (func.type === "FunctionExpression" && func.id) newScope.addDeclaration(func, false, false);
|
|
79
|
+
}
|
|
80
|
+
if (/For(?:In|Of)?Statement/.test(node.type)) newScope = new Scope({
|
|
81
|
+
parent: scope,
|
|
82
|
+
block: true
|
|
83
|
+
});
|
|
84
|
+
if (node.type === "BlockStatement" && !parent.type.includes("Function")) newScope = new Scope({
|
|
85
|
+
parent: scope,
|
|
86
|
+
block: true
|
|
87
|
+
});
|
|
88
|
+
if (node.type === "CatchClause") newScope = new Scope({
|
|
89
|
+
parent: scope,
|
|
90
|
+
params: node.param ? [node.param] : [],
|
|
91
|
+
block: true
|
|
92
|
+
});
|
|
93
|
+
if (newScope) {
|
|
94
|
+
Object.defineProperty(node, propertyName, {
|
|
95
|
+
value: newScope,
|
|
96
|
+
configurable: true
|
|
97
|
+
});
|
|
98
|
+
scope = newScope;
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
leave(n) {
|
|
102
|
+
if (n[propertyName]) scope = scope.parent;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return scope;
|
|
106
|
+
};
|
|
107
|
+
function isArray(arg) {
|
|
108
|
+
return Array.isArray(arg);
|
|
109
|
+
}
|
|
110
|
+
function ensureArray(thing) {
|
|
111
|
+
if (isArray(thing)) return thing;
|
|
112
|
+
if (thing == null) return [];
|
|
113
|
+
return [thing];
|
|
114
|
+
}
|
|
115
|
+
const normalizePathRegExp = new RegExp(`\\${win32.sep}`, "g");
|
|
116
|
+
const normalizePath = function normalizePath$1(filename) {
|
|
117
|
+
return filename.replace(normalizePathRegExp, posix.sep);
|
|
118
|
+
};
|
|
119
|
+
function getMatcherString(id, resolutionBase) {
|
|
120
|
+
if (resolutionBase === false || isAbsolute(id) || id.startsWith("**")) return normalizePath(id);
|
|
121
|
+
const basePath = normalizePath(resolve(resolutionBase || "")).replace(/[-^$*+?.()|[\]{}]/g, "\\$&");
|
|
122
|
+
return posix.join(basePath, normalizePath(id));
|
|
123
|
+
}
|
|
124
|
+
const createFilter = function createFilter$1(include, exclude, options) {
|
|
125
|
+
const resolutionBase = options && options.resolve;
|
|
126
|
+
const getMatcher = (id) => id instanceof RegExp ? id : { test: (what) => {
|
|
127
|
+
return (0, import_picomatch.default)(getMatcherString(id, resolutionBase), { dot: true })(what);
|
|
128
|
+
} };
|
|
129
|
+
const includeMatchers = ensureArray(include).map(getMatcher);
|
|
130
|
+
const excludeMatchers = ensureArray(exclude).map(getMatcher);
|
|
131
|
+
if (!includeMatchers.length && !excludeMatchers.length) return (id) => typeof id === "string" && !id.includes("\0");
|
|
132
|
+
return function result(id) {
|
|
133
|
+
if (typeof id !== "string") return false;
|
|
134
|
+
if (id.includes("\0")) return false;
|
|
135
|
+
const pathId = normalizePath(id);
|
|
136
|
+
for (let i = 0; i < excludeMatchers.length; ++i) {
|
|
137
|
+
const matcher = excludeMatchers[i];
|
|
138
|
+
if (matcher instanceof RegExp) matcher.lastIndex = 0;
|
|
139
|
+
if (matcher.test(pathId)) return false;
|
|
140
|
+
}
|
|
141
|
+
for (let i = 0; i < includeMatchers.length; ++i) {
|
|
142
|
+
const matcher = includeMatchers[i];
|
|
143
|
+
if (matcher instanceof RegExp) matcher.lastIndex = 0;
|
|
144
|
+
if (matcher.test(pathId)) return true;
|
|
145
|
+
}
|
|
146
|
+
return !includeMatchers.length;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
const forbiddenIdentifiers = new Set(`break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl`.split(" "));
|
|
150
|
+
forbiddenIdentifiers.add("");
|
|
151
|
+
const makeLegalIdentifier = function makeLegalIdentifier$1(str) {
|
|
152
|
+
let identifier = str.replace(/-(\w)/g, (_, letter) => letter.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, "_");
|
|
153
|
+
if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) identifier = `_${identifier}`;
|
|
154
|
+
return identifier || "_";
|
|
155
|
+
};
|
|
156
|
+
function stringify(obj) {
|
|
157
|
+
return (JSON.stringify(obj) || "undefined").replace(/[\u2028\u2029]/g, (char) => `\\u${`000${char.charCodeAt(0).toString(16)}`.slice(-4)}`);
|
|
158
|
+
}
|
|
159
|
+
function serializeArray(arr, indent, baseIndent) {
|
|
160
|
+
let output = "[";
|
|
161
|
+
const separator = indent ? `\n${baseIndent}${indent}` : "";
|
|
162
|
+
for (let i = 0; i < arr.length; i++) {
|
|
163
|
+
const key = arr[i];
|
|
164
|
+
output += `${i > 0 ? "," : ""}${separator}${serialize(key, indent, baseIndent + indent)}`;
|
|
165
|
+
}
|
|
166
|
+
return `${output}${indent ? `\n${baseIndent}` : ""}]`;
|
|
167
|
+
}
|
|
168
|
+
function serializeObject(obj, indent, baseIndent) {
|
|
169
|
+
let output = "{";
|
|
170
|
+
const separator = indent ? `\n${baseIndent}${indent}` : "";
|
|
171
|
+
const entries = Object.entries(obj);
|
|
172
|
+
for (let i = 0; i < entries.length; i++) {
|
|
173
|
+
const [key, value] = entries[i];
|
|
174
|
+
const stringKey = makeLegalIdentifier(key) === key ? key : stringify(key);
|
|
175
|
+
output += `${i > 0 ? "," : ""}${separator}${stringKey}:${indent ? " " : ""}${serialize(value, indent, baseIndent + indent)}`;
|
|
176
|
+
}
|
|
177
|
+
return `${output}${indent ? `\n${baseIndent}` : ""}}`;
|
|
178
|
+
}
|
|
179
|
+
function serialize(obj, indent, baseIndent) {
|
|
180
|
+
if (typeof obj === "object" && obj !== null) {
|
|
181
|
+
if (Array.isArray(obj)) return serializeArray(obj, indent, baseIndent);
|
|
182
|
+
if (obj instanceof Date) return `new Date(${obj.getTime()})`;
|
|
183
|
+
if (obj instanceof RegExp) return obj.toString();
|
|
184
|
+
return serializeObject(obj, indent, baseIndent);
|
|
185
|
+
}
|
|
186
|
+
if (typeof obj === "number") {
|
|
187
|
+
if (obj === Infinity) return "Infinity";
|
|
188
|
+
if (obj === -Infinity) return "-Infinity";
|
|
189
|
+
if (obj === 0) return 1 / obj === Infinity ? "0" : "-0";
|
|
190
|
+
if (obj !== obj) return "NaN";
|
|
191
|
+
}
|
|
192
|
+
if (typeof obj === "symbol") {
|
|
193
|
+
const key = Symbol.keyFor(obj);
|
|
194
|
+
if (key !== void 0) return `Symbol.for(${stringify(key)})`;
|
|
195
|
+
}
|
|
196
|
+
if (typeof obj === "bigint") return `${obj}n`;
|
|
197
|
+
return stringify(obj);
|
|
198
|
+
}
|
|
199
|
+
const hasStringIsWellFormed = "isWellFormed" in String.prototype;
|
|
200
|
+
function isWellFormedString(input) {
|
|
201
|
+
if (hasStringIsWellFormed) return input.isWellFormed();
|
|
202
|
+
return !/\p{Surrogate}/u.test(input);
|
|
203
|
+
}
|
|
204
|
+
const dataToEsm = function dataToEsm$1(data, options = {}) {
|
|
205
|
+
var _a, _b;
|
|
206
|
+
const t = options.compact ? "" : "indent" in options ? options.indent : " ";
|
|
207
|
+
const _ = options.compact ? "" : " ";
|
|
208
|
+
const n = options.compact ? "" : "\n";
|
|
209
|
+
const declarationType = options.preferConst ? "const" : "var";
|
|
210
|
+
if (options.namedExports === false || typeof data !== "object" || Array.isArray(data) || data instanceof Date || data instanceof RegExp || data === null) {
|
|
211
|
+
const code = serialize(data, options.compact ? null : t, "");
|
|
212
|
+
return `export default${_ || (/^[{[\-\/]/.test(code) ? "" : " ")}${code};`;
|
|
213
|
+
}
|
|
214
|
+
let maxUnderbarPrefixLength = 0;
|
|
215
|
+
for (const key of Object.keys(data)) {
|
|
216
|
+
const underbarPrefixLength = (_b = (_a = /^(_+)/.exec(key)) === null || _a === void 0 ? void 0 : _a[0].length) !== null && _b !== void 0 ? _b : 0;
|
|
217
|
+
if (underbarPrefixLength > maxUnderbarPrefixLength) maxUnderbarPrefixLength = underbarPrefixLength;
|
|
218
|
+
}
|
|
219
|
+
const arbitraryNamePrefix = `${"_".repeat(maxUnderbarPrefixLength + 1)}arbitrary`;
|
|
220
|
+
let namedExportCode = "";
|
|
221
|
+
const defaultExportRows = [];
|
|
222
|
+
const arbitraryNameExportRows = [];
|
|
223
|
+
for (const [key, value] of Object.entries(data)) if (key === makeLegalIdentifier(key)) {
|
|
224
|
+
if (options.objectShorthand) defaultExportRows.push(key);
|
|
225
|
+
else defaultExportRows.push(`${key}:${_}${key}`);
|
|
226
|
+
namedExportCode += `export ${declarationType} ${key}${_}=${_}${serialize(value, options.compact ? null : t, "")};${n}`;
|
|
227
|
+
} else {
|
|
228
|
+
defaultExportRows.push(`${stringify(key)}:${_}${serialize(value, options.compact ? null : t, "")}`);
|
|
229
|
+
if (options.includeArbitraryNames && isWellFormedString(key)) {
|
|
230
|
+
const variableName = `${arbitraryNamePrefix}${arbitraryNameExportRows.length}`;
|
|
231
|
+
namedExportCode += `${declarationType} ${variableName}${_}=${_}${serialize(value, options.compact ? null : t, "")};${n}`;
|
|
232
|
+
arbitraryNameExportRows.push(`${variableName} as ${JSON.stringify(key)}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const arbitraryExportCode = arbitraryNameExportRows.length > 0 ? `export${_}{${n}${t}${arbitraryNameExportRows.join(`,${n}${t}`)}${n}};${n}` : "";
|
|
236
|
+
const defaultExportCode = `export default${_}{${n}${t}${defaultExportRows.join(`,${n}${t}`)}${n}};${n}`;
|
|
237
|
+
return `${namedExportCode}${arbitraryExportCode}${defaultExportCode}`;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
//#endregion
|
|
241
|
+
export { makeLegalIdentifier as a, extractAssignedNames as i, createFilter as n, dataToEsm as r, attachScopes as t };
|