nitro-nightly 3.0.1-20260106-202835-5325b208 → 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 (86) hide show
  1. package/dist/_build/common.mjs +24899 -0
  2. package/dist/_build/rolldown.mjs +6 -9
  3. package/dist/_build/rollup.mjs +6 -8
  4. package/dist/_build/vite.build.mjs +1 -1
  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/{build2.mjs → 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/cli/index.mjs +1 -1
  31. package/dist/vite.mjs +14 -1128
  32. package/package.json +1 -1
  33. package/dist/_build/rollup2.mjs +0 -56
  34. package/dist/_build/shared.mjs +0 -60
  35. package/dist/_build/shared2.mjs +0 -40
  36. package/dist/_build/shared3.mjs +0 -68
  37. package/dist/_libs/@jridgewell/resolve-uri.mjs +0 -166
  38. package/dist/_libs/@jridgewell/sourcemap-codec.mjs +0 -167
  39. package/dist/_libs/@jridgewell/trace-mapping.mjs +0 -141
  40. package/dist/_libs/@rolldown/pluginutils.mjs +0 -31
  41. package/dist/_libs/@rollup/plugin-replace.mjs +0 -104
  42. package/dist/_libs/@rollup/pluginutils.mjs +0 -241
  43. package/dist/_libs/acorn.mjs +0 -5034
  44. package/dist/_libs/commondir.mjs +0 -22
  45. package/dist/_libs/deepmerge.mjs +0 -86
  46. package/dist/_libs/dot-prop.mjs +0 -138
  47. package/dist/_libs/dotenv.mjs +0 -345
  48. package/dist/_libs/duplexer.mjs +0 -71
  49. package/dist/_libs/etag.mjs +0 -80
  50. package/dist/_libs/exsolve.mjs +0 -1007
  51. package/dist/_libs/fdir.mjs +0 -514
  52. package/dist/_libs/function-bind.mjs +0 -63
  53. package/dist/_libs/gzip-size.mjs +0 -21
  54. package/dist/_libs/hasown.mjs +0 -14
  55. package/dist/_libs/is-core-module.mjs +0 -220
  56. package/dist/_libs/is-module.mjs +0 -13
  57. package/dist/_libs/is-reference.mjs +0 -33
  58. package/dist/_libs/js-tokens.mjs +0 -382
  59. package/dist/_libs/knitwork.mjs +0 -124
  60. package/dist/_libs/local-pkg.mjs +0 -125
  61. package/dist/_libs/magic-string.mjs +0 -939
  62. package/dist/_libs/mime.mjs +0 -1391
  63. package/dist/_libs/mlly.mjs +0 -1415
  64. package/dist/_libs/node-fetch-native.mjs +0 -7
  65. package/dist/_libs/nypm.mjs +0 -239
  66. package/dist/_libs/path-parse.mjs +0 -47
  67. package/dist/_libs/pathe.mjs +0 -202
  68. package/dist/_libs/perfect-debounce.mjs +0 -89
  69. package/dist/_libs/picomatch.mjs +0 -1673
  70. package/dist/_libs/pkg-types.mjs +0 -197
  71. package/dist/_libs/pretty-bytes.mjs +0 -116
  72. package/dist/_libs/quansync.mjs +0 -90
  73. package/dist/_libs/rc9.mjs +0 -136
  74. package/dist/_libs/readdirp.mjs +0 -237
  75. package/dist/_libs/resolve.mjs +0 -689
  76. package/dist/_libs/std-env.mjs +0 -158
  77. package/dist/_libs/strip-literal.mjs +0 -51
  78. package/dist/_libs/tinyexec.mjs +0 -627
  79. package/dist/_libs/tinyglobby.mjs +0 -292
  80. package/dist/_libs/unplugin-utils.mjs +0 -61
  81. package/dist/_libs/unplugin.mjs +0 -1225
  82. package/dist/_libs/untyped.mjs +0 -271
  83. package/dist/_libs/unwasm.mjs +0 -5895
  84. package/dist/_libs/webpack-virtual-modules.mjs +0 -272
  85. package/dist/_nitro2.mjs +0 -303
  86. /package/dist/{_rolldown.mjs → _common.mjs} +0 -0
@@ -1,124 +0,0 @@
1
- //#region node_modules/.pnpm/knitwork@1.3.0/node_modules/knitwork/dist/index.mjs
2
- function genString(input, options = {}) {
3
- const str = JSON.stringify(input);
4
- if (!options.singleQuotes) return str;
5
- return `'${escapeString(str).slice(1, -1)}'`;
6
- }
7
- const NEEDS_ESCAPE_RE = /[\n\r'\\\u2028\u2029]/;
8
- const QUOTE_NEWLINE_RE = /([\n\r'\u2028\u2029])/g;
9
- const BACKSLASH_RE = /\\/g;
10
- function escapeString(id) {
11
- if (!NEEDS_ESCAPE_RE.test(id)) return id;
12
- return id.replace(BACKSLASH_RE, "\\\\").replace(QUOTE_NEWLINE_RE, "\\$1");
13
- }
14
- function genSafeVariableName(name) {
15
- if (reservedNames.has(name)) return `_${name}`;
16
- return name.replace(/^\d/, (r) => `_${r}`).replace(/\W/g, (r) => "_" + r.charCodeAt(0));
17
- }
18
- const reservedNames = /* @__PURE__ */ new Set([
19
- "Infinity",
20
- "NaN",
21
- "arguments",
22
- "await",
23
- "break",
24
- "case",
25
- "catch",
26
- "class",
27
- "const",
28
- "continue",
29
- "debugger",
30
- "default",
31
- "delete",
32
- "do",
33
- "else",
34
- "enum",
35
- "eval",
36
- "export",
37
- "extends",
38
- "false",
39
- "finally",
40
- "for",
41
- "function",
42
- "if",
43
- "implements",
44
- "import",
45
- "in",
46
- "instanceof",
47
- "interface",
48
- "let",
49
- "new",
50
- "null",
51
- "package",
52
- "private",
53
- "protected",
54
- "public",
55
- "return",
56
- "static",
57
- "super",
58
- "switch",
59
- "this",
60
- "throw",
61
- "true",
62
- "try",
63
- "typeof",
64
- "undefined",
65
- "var",
66
- "void",
67
- "while",
68
- "with",
69
- "yield"
70
- ]);
71
- const VALID_IDENTIFIER_RE = /^[$_]?([A-Z_a-z]\w*|\d)$/;
72
- function _genStatement(type, specifier, names, options = {}) {
73
- const specifierString = genString(specifier, options);
74
- if (!names) return `${type} ${specifierString};`;
75
- const nameArray = Array.isArray(names);
76
- const namesString = (nameArray ? names : [names]).map((index) => {
77
- if (typeof index === "string") return { name: index };
78
- if (index.name === index.as) index = { name: index.name };
79
- return index;
80
- }).map((index) => index.as ? `${index.name} as ${index.as}` : index.name).join(", ");
81
- if (nameArray) return `${type} { ${namesString} } from ${genString(specifier, options)}${_genImportAttributes(type, options)};`;
82
- return `${type} ${namesString} from ${genString(specifier, options)}${_genImportAttributes(type, options)};`;
83
- }
84
- function _genImportAttributes(type, options) {
85
- if (type === "import type" || type === "export type") return "";
86
- if (typeof options.attributes?.type === "string") return ` with { type: ${genString(options.attributes.type)} }`;
87
- if (typeof options.assert?.type === "string") return ` assert { type: ${genString(options.assert.type)} }`;
88
- return "";
89
- }
90
- function genImport(specifier, imports, options = {}) {
91
- return _genStatement("import", specifier, imports, options);
92
- }
93
- function wrapInDelimiters(lines, indent = "", delimiters = "{}", withComma = true) {
94
- if (lines.length === 0) return delimiters;
95
- const [start, end] = delimiters;
96
- return `${start}
97
- ` + lines.join(withComma ? ",\n" : "\n") + `
98
- ${indent}${end}`;
99
- }
100
- function genObjectKey(key) {
101
- return VALID_IDENTIFIER_RE.test(key) ? key : genString(key);
102
- }
103
- function genObjectFromRaw(object, indent = "", options = {}) {
104
- return genObjectFromRawEntries(Object.entries(object), indent, options);
105
- }
106
- function genArrayFromRaw(array, indent = "", options = {}) {
107
- const newIdent = indent + " ";
108
- return wrapInDelimiters(array.map((index) => `${newIdent}${genRawValue(index, newIdent, options)}`), indent, "[]");
109
- }
110
- function genObjectFromRawEntries(array, indent = "", options = {}) {
111
- const newIdent = indent + " ";
112
- return wrapInDelimiters(array.map(([key, value]) => `${newIdent}${genObjectKey(key)}: ${genRawValue(value, newIdent, options)}`), indent, "{}");
113
- }
114
- function genRawValue(value, indent = "", options = {}) {
115
- if (value === void 0) return "undefined";
116
- if (value === null) return "null";
117
- if (Array.isArray(value)) return genArrayFromRaw(value, indent, options);
118
- if (value && typeof value === "object") return genObjectFromRaw(value, indent, options);
119
- if (options.preserveTypes && typeof value !== "function") return JSON.stringify(value);
120
- return value.toString();
121
- }
122
-
123
- //#endregion
124
- export { genString as a, genSafeVariableName as i, genObjectFromRaw as n, genObjectKey as r, genImport as t };
@@ -1,125 +0,0 @@
1
- import { d as resolvePathSync } from "./mlly.mjs";
2
- import { t as quansync } from "./quansync.mjs";
3
- import { createRequire } from "node:module";
4
- import fs from "node:fs";
5
- import fsp from "node:fs/promises";
6
- import { fileURLToPath } from "node:url";
7
- import path, { dirname, join, win32 } from "node:path";
8
- import process$1 from "node:process";
9
-
10
- //#region node_modules/.pnpm/local-pkg@1.1.2/node_modules/local-pkg/dist/index.mjs
11
- const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
12
- async function findUp$1(name, { cwd: cwd$1 = process$1.cwd(), type = "file", stopAt } = {}) {
13
- let directory = path.resolve(toPath(cwd$1) ?? "");
14
- const { root } = path.parse(directory);
15
- stopAt = path.resolve(directory, toPath(stopAt ?? root));
16
- const isAbsoluteName = path.isAbsolute(name);
17
- while (directory) {
18
- const filePath = isAbsoluteName ? name : path.join(directory, name);
19
- try {
20
- const stats = await fsp.stat(filePath);
21
- if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) return filePath;
22
- } catch {}
23
- if (directory === stopAt || directory === root) break;
24
- directory = path.dirname(directory);
25
- }
26
- }
27
- function findUpSync(name, { cwd: cwd$1 = process$1.cwd(), type = "file", stopAt } = {}) {
28
- let directory = path.resolve(toPath(cwd$1) ?? "");
29
- const { root } = path.parse(directory);
30
- stopAt = path.resolve(directory, toPath(stopAt) ?? root);
31
- const isAbsoluteName = path.isAbsolute(name);
32
- while (directory) {
33
- const filePath = isAbsoluteName ? name : path.join(directory, name);
34
- try {
35
- const stats = fs.statSync(filePath, { throwIfNoEntry: false });
36
- if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) return filePath;
37
- } catch {}
38
- if (directory === stopAt || directory === root) break;
39
- directory = path.dirname(directory);
40
- }
41
- }
42
- function _resolve(path$1, options = {}) {
43
- if (options.platform === "auto" || !options.platform) options.platform = process$1.platform === "win32" ? "win32" : "posix";
44
- if (process$1.versions.pnp) {
45
- const paths = options.paths || [];
46
- if (paths.length === 0) paths.push(process$1.cwd());
47
- const targetRequire = createRequire(import.meta.url);
48
- try {
49
- return targetRequire.resolve(path$1, { paths });
50
- } catch {}
51
- }
52
- const modulePath = resolvePathSync(path$1, { url: options.paths });
53
- if (options.platform === "win32") return win32.normalize(modulePath);
54
- return modulePath;
55
- }
56
- function resolveModule(name, options = {}) {
57
- try {
58
- return _resolve(name, options);
59
- } catch {
60
- return;
61
- }
62
- }
63
- function getPackageJsonPath(name, options = {}) {
64
- const entry = resolvePackage(name, options);
65
- if (!entry) return;
66
- return searchPackageJSON(entry);
67
- }
68
- const readFile$1 = quansync({
69
- async: (id) => fs.promises.readFile(id, "utf8"),
70
- sync: (id) => fs.readFileSync(id, "utf8")
71
- });
72
- const getPackageInfo = quansync(function* (name, options = {}) {
73
- const packageJsonPath = getPackageJsonPath(name, options);
74
- if (!packageJsonPath) return;
75
- const packageJson = JSON.parse(yield readFile$1(packageJsonPath));
76
- return {
77
- name,
78
- version: packageJson.version,
79
- rootPath: dirname(packageJsonPath),
80
- packageJsonPath,
81
- packageJson
82
- };
83
- });
84
- const getPackageInfoSync = getPackageInfo.sync;
85
- function resolvePackage(name, options = {}) {
86
- try {
87
- return _resolve(`${name}/package.json`, options);
88
- } catch {}
89
- try {
90
- return _resolve(name, options);
91
- } catch (e) {
92
- if (e.code !== "MODULE_NOT_FOUND" && e.code !== "ERR_MODULE_NOT_FOUND") console.error(e);
93
- return false;
94
- }
95
- }
96
- function searchPackageJSON(dir) {
97
- let packageJsonPath;
98
- while (true) {
99
- if (!dir) return;
100
- const newDir = dirname(dir);
101
- if (newDir === dir) return;
102
- dir = newDir;
103
- packageJsonPath = join(dir, "package.json");
104
- if (fs.existsSync(packageJsonPath)) break;
105
- }
106
- return packageJsonPath;
107
- }
108
- const findUp = quansync({
109
- sync: findUpSync,
110
- async: findUp$1
111
- });
112
- const loadPackageJSON = quansync(function* (cwd$1 = process$1.cwd()) {
113
- const path$1 = yield findUp("package.json", { cwd: cwd$1 });
114
- if (!path$1 || !fs.existsSync(path$1)) return null;
115
- return JSON.parse(yield readFile$1(path$1));
116
- });
117
- const loadPackageJSONSync = loadPackageJSON.sync;
118
- const isPackageListed = quansync(function* (name, cwd$1) {
119
- const pkg = (yield loadPackageJSON(cwd$1)) || {};
120
- return name in (pkg.dependencies || {}) || name in (pkg.devDependencies || {});
121
- });
122
- const isPackageListedSync = isPackageListed.sync;
123
-
124
- //#endregion
125
- export { resolveModule as t };