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.
Files changed (72) hide show
  1. package/dist/_build/rolldown.mjs +11 -11
  2. package/dist/_build/rollup.mjs +19 -11
  3. package/dist/_build/shared.mjs +3 -2
  4. package/dist/_build/shared2.mjs +1 -1
  5. package/dist/_build/shared3.mjs +2 -2
  6. package/dist/_build/vite.build.mjs +8 -9
  7. package/dist/_dev.mjs +4 -3
  8. package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +6 -1561
  9. package/dist/_libs/@jridgewell/gen-mapping.mjs +2 -304
  10. package/dist/_libs/@jridgewell/remapping.mjs +2 -1
  11. package/dist/_libs/@jridgewell/resolve-uri.mjs +166 -0
  12. package/dist/_libs/@jridgewell/sourcemap-codec.mjs +167 -0
  13. package/dist/_libs/@jridgewell/trace-mapping.mjs +141 -0
  14. package/dist/_libs/@rolldown/pluginutils.mjs +31 -0
  15. package/dist/_libs/@rollup/plugin-commonjs.mjs +33 -2636
  16. package/dist/_libs/@rollup/plugin-inject.mjs +3 -2
  17. package/dist/_libs/@rollup/plugin-json.mjs +1 -1
  18. package/dist/_libs/@rollup/plugin-node-resolve.mjs +8 -1112
  19. package/dist/_libs/@rollup/plugin-replace.mjs +2 -2
  20. package/dist/_libs/@rollup/pluginutils.mjs +241 -0
  21. package/dist/_libs/c12.mjs +63 -2513
  22. package/dist/_libs/chokidar.mjs +2 -235
  23. package/dist/_libs/commondir.mjs +22 -0
  24. package/dist/_libs/confbox.mjs +1511 -911
  25. package/dist/_libs/deepmerge.mjs +86 -0
  26. package/dist/_libs/dotenv.mjs +345 -0
  27. package/dist/_libs/estree-walker.mjs +144 -1
  28. package/dist/_libs/exsolve.mjs +1007 -0
  29. package/dist/_libs/fdir.mjs +514 -0
  30. package/dist/_libs/function-bind.mjs +63 -0
  31. package/dist/_libs/giget.mjs +1380 -2238
  32. package/dist/_libs/hasown.mjs +14 -0
  33. package/dist/_libs/is-core-module.mjs +220 -0
  34. package/dist/_libs/is-module.mjs +13 -0
  35. package/dist/_libs/is-reference.mjs +33 -0
  36. package/dist/_libs/js-tokens.mjs +382 -0
  37. package/dist/_libs/local-pkg.mjs +7 -1561
  38. package/dist/_libs/magic-string.mjs +939 -0
  39. package/dist/_libs/mlly.mjs +1415 -0
  40. package/dist/_libs/node-fetch-native.mjs +7 -0
  41. package/dist/_libs/nypm.mjs +239 -0
  42. package/dist/_libs/path-parse.mjs +47 -0
  43. package/dist/_libs/pathe.mjs +163 -2
  44. package/dist/_libs/perfect-debounce.mjs +89 -0
  45. package/dist/_libs/picomatch.mjs +1673 -0
  46. package/dist/_libs/pkg-types.mjs +197 -0
  47. package/dist/_libs/quansync.mjs +90 -0
  48. package/dist/_libs/rc9.mjs +136 -0
  49. package/dist/_libs/readdirp.mjs +237 -0
  50. package/dist/_libs/resolve.mjs +689 -0
  51. package/dist/_libs/strip-literal.mjs +51 -0
  52. package/dist/_libs/tinyexec.mjs +627 -0
  53. package/dist/_libs/tinyglobby.mjs +2 -1
  54. package/dist/_libs/tsconfck.mjs +1 -1
  55. package/dist/_libs/unimport.mjs +93 -1617
  56. package/dist/_libs/unplugin-utils.mjs +61 -0
  57. package/dist/_libs/unplugin.mjs +1225 -0
  58. package/dist/_libs/unwasm.mjs +3 -2
  59. package/dist/_libs/webpack-virtual-modules.mjs +272 -0
  60. package/dist/_nitro.mjs +9 -7
  61. package/dist/_nitro2.mjs +6 -7
  62. package/dist/_presets.mjs +9 -7
  63. package/dist/builder.mjs +5 -5
  64. package/dist/cli/_chunks/build.mjs +1 -1
  65. package/dist/cli/_chunks/dev.mjs +1 -1
  66. package/dist/cli/_chunks/list.mjs +1 -1
  67. package/dist/cli/_chunks/prepare.mjs +1 -1
  68. package/dist/cli/_chunks/run.mjs +1 -1
  69. package/dist/vite.mjs +1825 -22
  70. package/package.json +2 -2
  71. package/dist/_build/shared4.mjs +0 -1112
  72. package/dist/_build/vite.plugin.mjs +0 -712
@@ -1,244 +1,11 @@
1
1
  import { n as __exportAll } from "../_rolldown.mjs";
2
- import * as sp from "node:path";
3
- import { join, relative, resolve, sep } from "node:path";
2
+ import { t as readdirp } from "./readdirp.mjs";
4
3
  import { stat, unwatchFile, watch, watchFile } from "node:fs";
5
4
  import { lstat, open, readdir, realpath, stat as stat$1 } from "node:fs/promises";
6
5
  import { type } from "node:os";
6
+ import * as sp from "node:path";
7
7
  import { EventEmitter } from "node:events";
8
- import { Readable } from "node:stream";
9
-
10
- //#region node_modules/.pnpm/readdirp@5.0.0/node_modules/readdirp/index.js
11
- const EntryTypes = {
12
- FILE_TYPE: "files",
13
- DIR_TYPE: "directories",
14
- FILE_DIR_TYPE: "files_directories",
15
- EVERYTHING_TYPE: "all"
16
- };
17
- const defaultOptions = {
18
- root: ".",
19
- fileFilter: (_entryInfo) => true,
20
- directoryFilter: (_entryInfo) => true,
21
- type: EntryTypes.FILE_TYPE,
22
- lstat: false,
23
- depth: 2147483648,
24
- alwaysStat: false,
25
- highWaterMark: 4096
26
- };
27
- Object.freeze(defaultOptions);
28
- const RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
29
- const NORMAL_FLOW_ERRORS = new Set([
30
- "ENOENT",
31
- "EPERM",
32
- "EACCES",
33
- "ELOOP",
34
- RECURSIVE_ERROR_CODE
35
- ]);
36
- const ALL_TYPES = [
37
- EntryTypes.DIR_TYPE,
38
- EntryTypes.EVERYTHING_TYPE,
39
- EntryTypes.FILE_DIR_TYPE,
40
- EntryTypes.FILE_TYPE
41
- ];
42
- const DIR_TYPES = new Set([
43
- EntryTypes.DIR_TYPE,
44
- EntryTypes.EVERYTHING_TYPE,
45
- EntryTypes.FILE_DIR_TYPE
46
- ]);
47
- const FILE_TYPES = new Set([
48
- EntryTypes.EVERYTHING_TYPE,
49
- EntryTypes.FILE_DIR_TYPE,
50
- EntryTypes.FILE_TYPE
51
- ]);
52
- const isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
53
- const wantBigintFsStats = process.platform === "win32";
54
- const emptyFn = (_entryInfo) => true;
55
- const normalizeFilter = (filter) => {
56
- if (filter === void 0) return emptyFn;
57
- if (typeof filter === "function") return filter;
58
- if (typeof filter === "string") {
59
- const fl = filter.trim();
60
- return (entry) => entry.basename === fl;
61
- }
62
- if (Array.isArray(filter)) {
63
- const trItems = filter.map((item) => item.trim());
64
- return (entry) => trItems.some((f) => entry.basename === f);
65
- }
66
- return emptyFn;
67
- };
68
- /** Readable readdir stream, emitting new files as they're being listed. */
69
- var ReaddirpStream = class extends Readable {
70
- parents;
71
- reading;
72
- parent;
73
- _stat;
74
- _maxDepth;
75
- _wantsDir;
76
- _wantsFile;
77
- _wantsEverything;
78
- _root;
79
- _isDirent;
80
- _statsProp;
81
- _rdOptions;
82
- _fileFilter;
83
- _directoryFilter;
84
- constructor(options = {}) {
85
- super({
86
- objectMode: true,
87
- autoDestroy: true,
88
- highWaterMark: options.highWaterMark
89
- });
90
- const opts = {
91
- ...defaultOptions,
92
- ...options
93
- };
94
- const { root, type: type$1 } = opts;
95
- this._fileFilter = normalizeFilter(opts.fileFilter);
96
- this._directoryFilter = normalizeFilter(opts.directoryFilter);
97
- const statMethod = opts.lstat ? lstat : stat$1;
98
- if (wantBigintFsStats) this._stat = (path$1) => statMethod(path$1, { bigint: true });
99
- else this._stat = statMethod;
100
- this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
101
- this._wantsDir = type$1 ? DIR_TYPES.has(type$1) : false;
102
- this._wantsFile = type$1 ? FILE_TYPES.has(type$1) : false;
103
- this._wantsEverything = type$1 === EntryTypes.EVERYTHING_TYPE;
104
- this._root = resolve(root);
105
- this._isDirent = !opts.alwaysStat;
106
- this._statsProp = this._isDirent ? "dirent" : "stats";
107
- this._rdOptions = {
108
- encoding: "utf8",
109
- withFileTypes: this._isDirent
110
- };
111
- this.parents = [this._exploreDir(root, 1)];
112
- this.reading = false;
113
- this.parent = void 0;
114
- }
115
- async _read(batch) {
116
- if (this.reading) return;
117
- this.reading = true;
118
- try {
119
- while (!this.destroyed && batch > 0) {
120
- const par = this.parent;
121
- const fil = par && par.files;
122
- if (fil && fil.length > 0) {
123
- const { path: path$1, depth } = par;
124
- const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path$1));
125
- const awaited = await Promise.all(slice);
126
- for (const entry of awaited) {
127
- if (!entry) continue;
128
- if (this.destroyed) return;
129
- const entryType = await this._getEntryType(entry);
130
- if (entryType === "directory" && this._directoryFilter(entry)) {
131
- if (depth <= this._maxDepth) this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
132
- if (this._wantsDir) {
133
- this.push(entry);
134
- batch--;
135
- }
136
- } else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
137
- if (this._wantsFile) {
138
- this.push(entry);
139
- batch--;
140
- }
141
- }
142
- }
143
- } else {
144
- const parent = this.parents.pop();
145
- if (!parent) {
146
- this.push(null);
147
- break;
148
- }
149
- this.parent = await parent;
150
- if (this.destroyed) return;
151
- }
152
- }
153
- } catch (error) {
154
- this.destroy(error);
155
- } finally {
156
- this.reading = false;
157
- }
158
- }
159
- async _exploreDir(path$1, depth) {
160
- let files;
161
- try {
162
- files = await readdir(path$1, this._rdOptions);
163
- } catch (error) {
164
- this._onError(error);
165
- }
166
- return {
167
- files,
168
- depth,
169
- path: path$1
170
- };
171
- }
172
- async _formatEntry(dirent, path$1) {
173
- let entry;
174
- const basename$1 = this._isDirent ? dirent.name : dirent;
175
- try {
176
- const fullPath = resolve(join(path$1, basename$1));
177
- entry = {
178
- path: relative(this._root, fullPath),
179
- fullPath,
180
- basename: basename$1
181
- };
182
- entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
183
- } catch (err) {
184
- this._onError(err);
185
- return;
186
- }
187
- return entry;
188
- }
189
- _onError(err) {
190
- if (isNormalFlowError(err) && !this.destroyed) this.emit("warn", err);
191
- else this.destroy(err);
192
- }
193
- async _getEntryType(entry) {
194
- if (!entry && this._statsProp in entry) return "";
195
- const stats = entry[this._statsProp];
196
- if (stats.isFile()) return "file";
197
- if (stats.isDirectory()) return "directory";
198
- if (stats && stats.isSymbolicLink()) {
199
- const full = entry.fullPath;
200
- try {
201
- const entryRealPath = await realpath(full);
202
- const entryRealPathStats = await lstat(entryRealPath);
203
- if (entryRealPathStats.isFile()) return "file";
204
- if (entryRealPathStats.isDirectory()) {
205
- const len = entryRealPath.length;
206
- if (full.startsWith(entryRealPath) && full.substr(len, 1) === sep) {
207
- const recursiveError = /* @__PURE__ */ new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
208
- recursiveError.code = RECURSIVE_ERROR_CODE;
209
- return this._onError(recursiveError);
210
- }
211
- return "directory";
212
- }
213
- } catch (error) {
214
- this._onError(error);
215
- return "";
216
- }
217
- }
218
- }
219
- _includeAsFile(entry) {
220
- const stats = entry && entry[this._statsProp];
221
- return stats && this._wantsEverything && !stats.isDirectory();
222
- }
223
- };
224
- /**
225
- * Streaming version: Reads all files and directories in given root recursively.
226
- * Consumes ~constant small amount of RAM.
227
- * @param root Root directory
228
- * @param options Options to specify root (start directory), filters and recursion depth
229
- */
230
- function readdirp(root, options = {}) {
231
- let type$1 = options.entryType || options.type;
232
- if (type$1 === "both") type$1 = EntryTypes.FILE_DIR_TYPE;
233
- if (type$1) options.type = type$1;
234
- if (!root) throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
235
- else if (typeof root !== "string") throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
236
- else if (type$1 && !ALL_TYPES.includes(type$1)) throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
237
- options.root = root;
238
- return new ReaddirpStream(options);
239
- }
240
8
 
241
- //#endregion
242
9
  //#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/handler.js
243
10
  const STR_DATA = "data";
244
11
  const STR_END = "end";
@@ -0,0 +1,22 @@
1
+ import { r as __require, t as __commonJSMin } from "../_rolldown.mjs";
2
+
3
+ //#region node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
4
+ var require_commondir = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
+ var path = __require("path");
6
+ module.exports = function(basedir, relfiles) {
7
+ if (relfiles) var files = relfiles.map(function(r) {
8
+ return path.resolve(basedir, r);
9
+ });
10
+ else var files = basedir;
11
+ var res = files.slice(1).reduce(function(ps, file) {
12
+ if (!file.match(/^([A-Za-z]:)?\/|\\/)) throw new Error("relative path without a basedir");
13
+ var xs = file.split(/\/+|\\+/);
14
+ for (var i = 0; ps[i] === xs[i] && i < Math.min(ps.length, xs.length); i++);
15
+ return ps.slice(0, i);
16
+ }, files[0].split(/\/+|\\+/));
17
+ return res.length > 1 ? res.join("/") : "/";
18
+ };
19
+ }));
20
+
21
+ //#endregion
22
+ export { require_commondir as t };