nitro-nightly 3.0.1-20260106-182834-5019d347 → 3.0.1-20260106-205209-b085a480

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 (85) hide show
  1. package/dist/_build/common.mjs +24899 -0
  2. package/dist/_build/rolldown.mjs +5 -18
  3. package/dist/_build/rollup.mjs +5 -52
  4. package/dist/_build/vite.build.mjs +2 -21
  5. package/dist/{_dev.mjs → _chunks/dev.mjs} +4 -7
  6. package/dist/{_nitro.mjs → _chunks/nitro.mjs} +16 -195
  7. package/dist/_chunks/nitro2.mjs +101 -0
  8. package/dist/_chunks/utils.mjs +278 -0
  9. package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +32 -4
  10. package/dist/_libs/@jridgewell/gen-mapping.mjs +304 -2
  11. package/dist/_libs/@jridgewell/remapping.mjs +1 -2
  12. package/dist/_libs/@rollup/plugin-commonjs.mjs +75 -31
  13. package/dist/_libs/@rollup/plugin-inject.mjs +1 -3
  14. package/dist/_libs/@rollup/plugin-json.mjs +1 -1
  15. package/dist/_libs/@rollup/plugin-node-resolve.mjs +1111 -7
  16. package/dist/_libs/c12.mjs +597 -41
  17. package/dist/_libs/chokidar.mjs +235 -2
  18. package/dist/_libs/confbox.mjs +454 -1476
  19. package/dist/_libs/estree-walker.mjs +1 -144
  20. package/dist/_libs/giget.mjs +2235 -1377
  21. package/dist/_libs/httpxy.mjs +1 -1
  22. package/dist/_libs/unimport.mjs +1547 -1772
  23. package/dist/_presets.mjs +3 -9
  24. package/dist/builder.mjs +7 -12
  25. package/dist/cli/_chunks/build.mjs +1 -1
  26. package/dist/cli/_chunks/dev.mjs +3 -5
  27. package/dist/cli/_chunks/list.mjs +1 -1
  28. package/dist/cli/_chunks/prepare.mjs +1 -1
  29. package/dist/cli/_chunks/run.mjs +1 -1
  30. package/dist/types/index.d.mts +4 -4
  31. package/dist/vite.mjs +14 -1128
  32. package/package.json +2 -2
  33. package/dist/_build/shared.mjs +0 -60
  34. package/dist/_build/shared2.mjs +0 -40
  35. package/dist/_build/shared3.mjs +0 -68
  36. package/dist/_libs/@jridgewell/resolve-uri.mjs +0 -166
  37. package/dist/_libs/@jridgewell/sourcemap-codec.mjs +0 -167
  38. package/dist/_libs/@jridgewell/trace-mapping.mjs +0 -141
  39. package/dist/_libs/@rolldown/pluginutils.mjs +0 -31
  40. package/dist/_libs/@rollup/plugin-replace.mjs +0 -104
  41. package/dist/_libs/@rollup/pluginutils.mjs +0 -241
  42. package/dist/_libs/acorn.mjs +0 -5034
  43. package/dist/_libs/commondir.mjs +0 -22
  44. package/dist/_libs/deepmerge.mjs +0 -86
  45. package/dist/_libs/dot-prop.mjs +0 -138
  46. package/dist/_libs/dotenv.mjs +0 -345
  47. package/dist/_libs/duplexer.mjs +0 -71
  48. package/dist/_libs/etag.mjs +0 -80
  49. package/dist/_libs/exsolve.mjs +0 -1007
  50. package/dist/_libs/fdir.mjs +0 -514
  51. package/dist/_libs/function-bind.mjs +0 -63
  52. package/dist/_libs/gzip-size.mjs +0 -21
  53. package/dist/_libs/hasown.mjs +0 -14
  54. package/dist/_libs/is-core-module.mjs +0 -220
  55. package/dist/_libs/is-module.mjs +0 -13
  56. package/dist/_libs/is-reference.mjs +0 -33
  57. package/dist/_libs/js-tokens.mjs +0 -382
  58. package/dist/_libs/knitwork.mjs +0 -124
  59. package/dist/_libs/local-pkg.mjs +0 -125
  60. package/dist/_libs/magic-string.mjs +0 -939
  61. package/dist/_libs/mime.mjs +0 -1391
  62. package/dist/_libs/mlly.mjs +0 -1415
  63. package/dist/_libs/node-fetch-native.mjs +0 -7
  64. package/dist/_libs/nypm.mjs +0 -239
  65. package/dist/_libs/path-parse.mjs +0 -47
  66. package/dist/_libs/pathe.mjs +0 -202
  67. package/dist/_libs/perfect-debounce.mjs +0 -89
  68. package/dist/_libs/picomatch.mjs +0 -1673
  69. package/dist/_libs/pkg-types.mjs +0 -197
  70. package/dist/_libs/pretty-bytes.mjs +0 -116
  71. package/dist/_libs/quansync.mjs +0 -90
  72. package/dist/_libs/rc9.mjs +0 -136
  73. package/dist/_libs/readdirp.mjs +0 -237
  74. package/dist/_libs/resolve.mjs +0 -689
  75. package/dist/_libs/std-env.mjs +0 -158
  76. package/dist/_libs/strip-literal.mjs +0 -51
  77. package/dist/_libs/tinyexec.mjs +0 -627
  78. package/dist/_libs/tinyglobby.mjs +0 -292
  79. package/dist/_libs/unplugin-utils.mjs +0 -61
  80. package/dist/_libs/unplugin.mjs +0 -1225
  81. package/dist/_libs/untyped.mjs +0 -271
  82. package/dist/_libs/unwasm.mjs +0 -5895
  83. package/dist/_libs/webpack-virtual-modules.mjs +0 -272
  84. package/dist/_nitro2.mjs +0 -303
  85. /package/dist/{_rolldown.mjs → _common.mjs} +0 -0
@@ -1,104 +0,0 @@
1
- import { t as MagicString } from "../magic-string.mjs";
2
- import { n as createFilter } from "./pluginutils.mjs";
3
-
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
- function escape(str) {
6
- return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
7
- }
8
- function ensureFunction(functionOrValue) {
9
- if (typeof functionOrValue === "function") return functionOrValue;
10
- return function() {
11
- return functionOrValue;
12
- };
13
- }
14
- function longest(a, b) {
15
- return b.length - a.length;
16
- }
17
- function getReplacements(options) {
18
- if (options.values) return Object.assign({}, options.values);
19
- var values = Object.assign({}, options);
20
- delete values.delimiters;
21
- delete values.include;
22
- delete values.exclude;
23
- delete values.sourcemap;
24
- delete values.sourceMap;
25
- delete values.objectGuards;
26
- delete values.preventAssignment;
27
- return values;
28
- }
29
- function mapToFunctions(object) {
30
- return Object.keys(object).reduce(function(fns, key) {
31
- var functions = Object.assign({}, fns);
32
- functions[key] = ensureFunction(object[key]);
33
- return functions;
34
- }, {});
35
- }
36
- var objKeyRegEx = /^([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)(\.([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*))+$/;
37
- function expandTypeofReplacements(replacements) {
38
- Object.keys(replacements).forEach(function(key) {
39
- var objMatch = key.match(objKeyRegEx);
40
- if (!objMatch) return;
41
- var dotIndex = objMatch[1].length;
42
- do {
43
- replacements["typeof " + key.slice(0, dotIndex)] = "\"object\"";
44
- dotIndex = key.indexOf(".", dotIndex + 1);
45
- } while (dotIndex !== -1);
46
- });
47
- }
48
- function replace(options) {
49
- if (options === void 0) options = {};
50
- var filter = createFilter(options.include, options.exclude);
51
- var delimiters = options.delimiters;
52
- if (delimiters === void 0) delimiters = ["(?<![_$a-zA-Z0-9\\xA0-\\uFFFF])", "(?![_$a-zA-Z0-9\\xA0-\\uFFFF])(?!\\.)"];
53
- var preventAssignment = options.preventAssignment;
54
- var objectGuards = options.objectGuards;
55
- var replacements = getReplacements(options);
56
- if (objectGuards) expandTypeofReplacements(replacements);
57
- var functionValues = mapToFunctions(replacements);
58
- var keys = Object.keys(functionValues).sort(longest).map(escape);
59
- var lookbehind = preventAssignment ? "(?<!\\b(?:const|let|var)\\s*)" : "";
60
- var lookahead = preventAssignment ? "(?!\\s*=[^=])" : "";
61
- var pattern = new RegExp("" + lookbehind + delimiters[0] + "(" + keys.join("|") + ")" + delimiters[1] + lookahead, "g");
62
- return {
63
- name: "replace",
64
- buildStart: function buildStart() {
65
- if (![true, false].includes(preventAssignment)) this.warn({ message: "@rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`." });
66
- },
67
- renderChunk: function renderChunk(code, chunk) {
68
- var id = chunk.fileName;
69
- if (!keys.length) return null;
70
- if (!filter(id)) return null;
71
- return executeReplacement(code, id);
72
- },
73
- transform: function transform(code, id) {
74
- if (!keys.length) return null;
75
- if (!filter(id)) return null;
76
- return executeReplacement(code, id);
77
- }
78
- };
79
- function executeReplacement(code, id) {
80
- var magicString = new MagicString(code);
81
- if (!codeHasReplacements(code, id, magicString)) return null;
82
- var result = { code: magicString.toString() };
83
- if (isSourceMapEnabled()) result.map = magicString.generateMap({ hires: true });
84
- return result;
85
- }
86
- function codeHasReplacements(code, id, magicString) {
87
- var result = false;
88
- var match;
89
- while (match = pattern.exec(code)) {
90
- result = true;
91
- var start = match.index;
92
- var end = start + match[0].length;
93
- var replacement = String(functionValues[match[1]](id));
94
- magicString.overwrite(start, end, replacement);
95
- }
96
- return result;
97
- }
98
- function isSourceMapEnabled() {
99
- return options.sourceMap !== false && options.sourcemap !== false;
100
- }
101
- }
102
-
103
- //#endregion
104
- export { replace as t };
@@ -1,241 +0,0 @@
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 };