nitro-nightly 3.0.1-20251110-084730-23f7bea2 → 3.0.1-20251110-093536-c21a33ba
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/common2.mjs +1 -0
- package/dist/_libs/c12.mjs +104 -44
- package/dist/_libs/plugin-alias.mjs +1 -1
- package/dist/_libs/plugin-commonjs.mjs +2 -2
- package/dist/_libs/plugin-inject.mjs +1 -1
- package/dist/_libs/plugin-json.mjs +1 -1
- package/dist/_libs/plugin-node-resolve.mjs +1 -1
- package/dist/_libs/plugin-replace.mjs +1 -1
- package/package.json +4 -4
package/dist/_build/common2.mjs
CHANGED
|
@@ -91,6 +91,7 @@ function baseBuildConfig(nitro) {
|
|
|
91
91
|
"nitro",
|
|
92
92
|
pkgDir,
|
|
93
93
|
nitro.options.serverDir,
|
|
94
|
+
nitro.options.buildDir,
|
|
94
95
|
dirname(nitro.options.entry),
|
|
95
96
|
...nitro.options.experimental.wasm ? [(id) => id?.endsWith(".wasm")] : [],
|
|
96
97
|
...nitro.options.handlers.map((m) => m.handler).filter((i) => typeof i === "string"),
|
package/dist/_libs/c12.mjs
CHANGED
|
@@ -776,7 +776,7 @@ function S(y, d$2) {
|
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
//#endregion
|
|
779
|
-
//#region node_modules/.pnpm/exsolve@1.0.
|
|
779
|
+
//#region node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs
|
|
780
780
|
const nodeBuiltins = [
|
|
781
781
|
"_http_agent",
|
|
782
782
|
"_http_client",
|
|
@@ -849,7 +849,7 @@ const nodeBuiltins = [
|
|
|
849
849
|
];
|
|
850
850
|
const own$1 = {}.hasOwnProperty;
|
|
851
851
|
const classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
852
|
-
const kTypes =
|
|
852
|
+
const kTypes = new Set([
|
|
853
853
|
"string",
|
|
854
854
|
"function",
|
|
855
855
|
"number",
|
|
@@ -863,9 +863,23 @@ const kTypes = /* @__PURE__ */ new Set([
|
|
|
863
863
|
const messages = /* @__PURE__ */ new Map();
|
|
864
864
|
const nodeInternalPrefix = "__node_internal_";
|
|
865
865
|
let userStackTraceLimit;
|
|
866
|
+
/**
|
|
867
|
+
* Create a list string in the form like 'A and B' or 'A, B, ..., and Z'.
|
|
868
|
+
* We cannot use Intl.ListFormat because it's not available in
|
|
869
|
+
* --without-intl builds.
|
|
870
|
+
*
|
|
871
|
+
* @param {Array<string>} array
|
|
872
|
+
* An array of strings.
|
|
873
|
+
* @param {string} [type]
|
|
874
|
+
* The list type to be inserted before the last element.
|
|
875
|
+
* @returns {string}
|
|
876
|
+
*/
|
|
866
877
|
function formatList(array, type = "and") {
|
|
867
878
|
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
|
|
868
879
|
}
|
|
880
|
+
/**
|
|
881
|
+
* Utility function for registering the error codes.
|
|
882
|
+
*/
|
|
869
883
|
function createError(sym, value, constructor) {
|
|
870
884
|
messages.set(sym, value);
|
|
871
885
|
return makeNodeErrorWithCode(constructor, sym);
|
|
@@ -906,6 +920,9 @@ function isErrorStackTraceLimitWritable() {
|
|
|
906
920
|
if (desc === void 0) return Object.isExtensible(Error);
|
|
907
921
|
return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
908
922
|
}
|
|
923
|
+
/**
|
|
924
|
+
* This function removes unnecessary frames from Node.js core errors.
|
|
925
|
+
*/
|
|
909
926
|
function hideStackFrames(wrappedFunction) {
|
|
910
927
|
const hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
911
928
|
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
@@ -923,19 +940,22 @@ const captureLargerStackTrace = hideStackFrames(function(error) {
|
|
|
923
940
|
});
|
|
924
941
|
function getMessage(key, parameters, self) {
|
|
925
942
|
const message = messages.get(key);
|
|
926
|
-
assert(message !== void 0, "expected `message` to be found");
|
|
943
|
+
assert.ok(message !== void 0, "expected `message` to be found");
|
|
927
944
|
if (typeof message === "function") {
|
|
928
|
-
assert(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
|
|
945
|
+
assert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`);
|
|
929
946
|
return Reflect.apply(message, self, parameters);
|
|
930
947
|
}
|
|
931
948
|
const regex = /%[dfijoOs]/g;
|
|
932
949
|
let expectedLength = 0;
|
|
933
950
|
while (regex.exec(message) !== null) expectedLength++;
|
|
934
|
-
assert(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
|
|
951
|
+
assert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`);
|
|
935
952
|
if (parameters.length === 0) return message;
|
|
936
953
|
parameters.unshift(message);
|
|
937
954
|
return Reflect.apply(format, null, parameters);
|
|
938
955
|
}
|
|
956
|
+
/**
|
|
957
|
+
* Determine the specific type of a value for type-mismatch errors.
|
|
958
|
+
*/
|
|
939
959
|
function determineSpecificType(value) {
|
|
940
960
|
if (value === null || value === void 0) return String(value);
|
|
941
961
|
if (typeof value === "function" && value.name) return `function ${value.name}`;
|
|
@@ -948,7 +968,7 @@ function determineSpecificType(value) {
|
|
|
948
968
|
return `type ${typeof value} (${inspected})`;
|
|
949
969
|
}
|
|
950
970
|
createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
|
|
951
|
-
assert(typeof name === "string", "'name' must be a string");
|
|
971
|
+
assert.ok(typeof name === "string", "'name' must be a string");
|
|
952
972
|
if (!Array.isArray(expected)) expected = [expected];
|
|
953
973
|
let message = "The ";
|
|
954
974
|
if (name.endsWith(" argument")) message += `${name} `;
|
|
@@ -961,10 +981,10 @@ createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
|
|
|
961
981
|
const instances = [];
|
|
962
982
|
const other = [];
|
|
963
983
|
for (const value of expected) {
|
|
964
|
-
assert(typeof value === "string", "All expected entries have to be of type string");
|
|
984
|
+
assert.ok(typeof value === "string", "All expected entries have to be of type string");
|
|
965
985
|
if (kTypes.has(value)) types.push(value.toLowerCase());
|
|
966
986
|
else if (classRegExp.exec(value) === null) {
|
|
967
|
-
assert(value !== "object", "The value \"object\" should be written as \"Object\"");
|
|
987
|
+
assert.ok(value !== "object", "The value \"object\" should be written as \"Object\"");
|
|
968
988
|
other.push(value);
|
|
969
989
|
} else instances.push(value);
|
|
970
990
|
}
|
|
@@ -1003,19 +1023,19 @@ const ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
|
1003
1023
|
},
|
|
1004
1024
|
TypeError
|
|
1005
1025
|
);
|
|
1006
|
-
const ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$
|
|
1007
|
-
return `Invalid package config ${path$
|
|
1026
|
+
const ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$1$1, base, message) => {
|
|
1027
|
+
return `Invalid package config ${path$1$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
1008
1028
|
}, Error);
|
|
1009
1029
|
const ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = false, base) => {
|
|
1010
1030
|
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
1011
1031
|
if (key === ".") {
|
|
1012
|
-
assert(isImport === false);
|
|
1032
|
+
assert.ok(isImport === false);
|
|
1013
1033
|
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
|
|
1014
1034
|
}
|
|
1015
1035
|
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? "; targets must start with \"./\"" : ""}`;
|
|
1016
1036
|
}, Error);
|
|
1017
|
-
const ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$
|
|
1018
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path$
|
|
1037
|
+
const ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$1$1, base, exactUrl = false) => {
|
|
1038
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path$1$1}' imported from ${base}`;
|
|
1019
1039
|
}, Error);
|
|
1020
1040
|
createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error);
|
|
1021
1041
|
const ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => {
|
|
@@ -1036,8 +1056,8 @@ const ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
|
1036
1056
|
);
|
|
1037
1057
|
const ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error);
|
|
1038
1058
|
const ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", "Failed to resolve module specifier \"%s\" from \"%s\": Invalid relative URL or base scheme is not hierarchical.", TypeError);
|
|
1039
|
-
const ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$
|
|
1040
|
-
return `Unknown file extension "${extension}" for ${path$
|
|
1059
|
+
const ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1$1) => {
|
|
1060
|
+
return `Unknown file extension "${extension}" for ${path$1$1}`;
|
|
1041
1061
|
}, TypeError);
|
|
1042
1062
|
createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
|
|
1043
1063
|
let inspected = inspect(value);
|
|
@@ -1130,6 +1150,14 @@ function getDataProtocolModuleFormat(parsed) {
|
|
|
1130
1150
|
];
|
|
1131
1151
|
return mimeToFormat(mime);
|
|
1132
1152
|
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Returns the file extension from a URL.
|
|
1155
|
+
*
|
|
1156
|
+
* Should give similar result to
|
|
1157
|
+
* `require('node:path').extname(require('node:url').fileURLToPath(url))`
|
|
1158
|
+
* when used with a `file:` URL.
|
|
1159
|
+
*
|
|
1160
|
+
*/
|
|
1133
1161
|
function extname$2(url) {
|
|
1134
1162
|
const pathname = url.pathname;
|
|
1135
1163
|
let index = pathname.length;
|
|
@@ -1183,16 +1211,22 @@ function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
|
|
|
1183
1211
|
const urlPath = fileURLToPath(url.href);
|
|
1184
1212
|
const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
|
|
1185
1213
|
const basePath = fileURLToPath(base);
|
|
1186
|
-
if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}
|
|
1187
|
-
|
|
1188
|
-
else if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.
|
|
1189
|
-
Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
1214
|
+
if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
1215
|
+
else if (path.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
|
|
1190
1216
|
}
|
|
1191
|
-
function tryStatSync(
|
|
1217
|
+
function tryStatSync(path$1$1) {
|
|
1192
1218
|
try {
|
|
1193
|
-
return statSync(
|
|
1219
|
+
return statSync(path$1$1);
|
|
1194
1220
|
} catch {}
|
|
1195
1221
|
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Legacy CommonJS main resolution:
|
|
1224
|
+
* 1. let M = pkg_url + (json main field)
|
|
1225
|
+
* 2. TRY(M, M.js, M.json, M.node)
|
|
1226
|
+
* 3. TRY(M/index.js, M/index.json, M/index.node)
|
|
1227
|
+
* 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node)
|
|
1228
|
+
* 5. NOT_FOUND
|
|
1229
|
+
*/
|
|
1196
1230
|
function fileExists(url) {
|
|
1197
1231
|
const stats = statSync(url, { throwIfNoEntry: false });
|
|
1198
1232
|
const isFile = stats ? stats.isFile() : void 0;
|
|
@@ -1203,7 +1237,7 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
1203
1237
|
if (packageConfig.main !== void 0) {
|
|
1204
1238
|
guess = new URL$1(packageConfig.main, packageJsonUrl);
|
|
1205
1239
|
if (fileExists(guess)) return guess;
|
|
1206
|
-
const
|
|
1240
|
+
const tries$1 = [
|
|
1207
1241
|
`./${packageConfig.main}.js`,
|
|
1208
1242
|
`./${packageConfig.main}.json`,
|
|
1209
1243
|
`./${packageConfig.main}.node`,
|
|
@@ -1211,9 +1245,9 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
1211
1245
|
`./${packageConfig.main}/index.json`,
|
|
1212
1246
|
`./${packageConfig.main}/index.node`
|
|
1213
1247
|
];
|
|
1214
|
-
let
|
|
1215
|
-
while (++
|
|
1216
|
-
guess = new URL$1(
|
|
1248
|
+
let i$1 = -1;
|
|
1249
|
+
while (++i$1 < tries$1.length) {
|
|
1250
|
+
guess = new URL$1(tries$1[i$1], packageJsonUrl);
|
|
1217
1251
|
if (fileExists(guess)) break;
|
|
1218
1252
|
guess = void 0;
|
|
1219
1253
|
}
|
|
@@ -1260,7 +1294,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
1260
1294
|
error.url = String(resolved);
|
|
1261
1295
|
throw error;
|
|
1262
1296
|
}
|
|
1263
|
-
{
|
|
1297
|
+
if (!preserveSymlinks) {
|
|
1264
1298
|
const real = realpathSync(filePath);
|
|
1265
1299
|
const { search, hash } = resolved;
|
|
1266
1300
|
resolved = pathToFileURL(real + (filePath.endsWith(path.sep) ? "/" : ""));
|
|
@@ -1381,7 +1415,7 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
|
1381
1415
|
const key = keys[keyIndex];
|
|
1382
1416
|
const currentIsConditionalSugar = key === "" || key[0] !== ".";
|
|
1383
1417
|
if (i++ === 0) isConditionalSugar = currentIsConditionalSugar;
|
|
1384
|
-
else if (isConditionalSugar !== currentIsConditionalSugar) throw new ERR_INVALID_PACKAGE_CONFIG(fileURLToPath(packageJsonUrl), fileURLToPath(base),
|
|
1418
|
+
else if (isConditionalSugar !== currentIsConditionalSugar) throw new ERR_INVALID_PACKAGE_CONFIG(fileURLToPath(packageJsonUrl), fileURLToPath(base), "\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.");
|
|
1385
1419
|
}
|
|
1386
1420
|
return isConditionalSugar;
|
|
1387
1421
|
}
|
|
@@ -1473,6 +1507,10 @@ function packageImportsResolve(name, base, conditions) {
|
|
|
1473
1507
|
}
|
|
1474
1508
|
throw importNotDefined(name, packageJsonUrl, base);
|
|
1475
1509
|
}
|
|
1510
|
+
/**
|
|
1511
|
+
* @param {string} specifier
|
|
1512
|
+
* @param {URL} base
|
|
1513
|
+
*/
|
|
1476
1514
|
function parsePackageName(specifier, base) {
|
|
1477
1515
|
let separatorIndex = specifier.indexOf("/");
|
|
1478
1516
|
let validPackageName = true;
|
|
@@ -1507,12 +1545,12 @@ function packageResolve(specifier, base, conditions) {
|
|
|
1507
1545
|
packageJsonPath = fileURLToPath(packageJsonUrl);
|
|
1508
1546
|
continue;
|
|
1509
1547
|
}
|
|
1510
|
-
const
|
|
1548
|
+
const packageConfig$1 = read$1(packageJsonPath, {
|
|
1511
1549
|
base,
|
|
1512
1550
|
specifier
|
|
1513
1551
|
});
|
|
1514
|
-
if (
|
|
1515
|
-
if (packageSubpath === ".") return legacyMainResolve(packageJsonUrl,
|
|
1552
|
+
if (packageConfig$1.exports !== void 0 && packageConfig$1.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig$1, base, conditions);
|
|
1553
|
+
if (packageSubpath === ".") return legacyMainResolve(packageJsonUrl, packageConfig$1, base);
|
|
1516
1554
|
return new URL$1(packageSubpath, packageJsonUrl);
|
|
1517
1555
|
} while (packageJsonPath.length !== lastPath.length);
|
|
1518
1556
|
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), false);
|
|
@@ -1529,6 +1567,21 @@ function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
|
|
|
1529
1567
|
if (specifier[0] === "/") return true;
|
|
1530
1568
|
return isRelativeSpecifier(specifier);
|
|
1531
1569
|
}
|
|
1570
|
+
/**
|
|
1571
|
+
* The “Resolver Algorithm Specification” as detailed in the Node docs (which is
|
|
1572
|
+
* sync and slightly lower-level than `resolve`).
|
|
1573
|
+
*
|
|
1574
|
+
* @param {string} specifier
|
|
1575
|
+
* `/example.js`, `./example.js`, `../example.js`, `some-package`, `fs`, etc.
|
|
1576
|
+
* @param {URL} base
|
|
1577
|
+
* Full URL (to a file) that `specifier` is resolved relative from.
|
|
1578
|
+
* @param {Set<string>} [conditions]
|
|
1579
|
+
* Conditions.
|
|
1580
|
+
* @param {boolean} [preserveSymlinks]
|
|
1581
|
+
* Keep symlinks instead of resolving them.
|
|
1582
|
+
* @returns {URL}
|
|
1583
|
+
* A URL object to the found thing.
|
|
1584
|
+
*/
|
|
1532
1585
|
function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
1533
1586
|
const protocol = base.protocol;
|
|
1534
1587
|
const isData = protocol === "data:";
|
|
@@ -1551,20 +1604,20 @@ function moduleResolve(specifier, base, conditions, preserveSymlinks) {
|
|
|
1551
1604
|
}
|
|
1552
1605
|
resolved = packageResolve(specifier, base, conditions);
|
|
1553
1606
|
}
|
|
1554
|
-
assert(resolved !== void 0, "expected to be defined");
|
|
1607
|
+
assert.ok(resolved !== void 0, "expected to be defined");
|
|
1555
1608
|
if (resolved.protocol !== "file:") return resolved;
|
|
1556
|
-
return finalizeResolution(resolved, base);
|
|
1609
|
+
return finalizeResolution(resolved, base, preserveSymlinks);
|
|
1557
1610
|
}
|
|
1558
1611
|
const DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]);
|
|
1559
1612
|
const isWindows = /* @__PURE__ */ (() => process.platform === "win32")();
|
|
1560
|
-
const NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([
|
|
1561
|
-
"ERR_MODULE_NOT_FOUND",
|
|
1562
|
-
"ERR_UNSUPPORTED_DIR_IMPORT",
|
|
1563
|
-
"MODULE_NOT_FOUND",
|
|
1564
|
-
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
1565
|
-
"ERR_PACKAGE_IMPORT_NOT_DEFINED"
|
|
1566
|
-
]);
|
|
1567
1613
|
const globalCache = /* @__PURE__ */ (() => globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map())();
|
|
1614
|
+
/**
|
|
1615
|
+
* Synchronously resolves a module url based on the options provided.
|
|
1616
|
+
*
|
|
1617
|
+
* @param {string} input - The identifier or path of the module to resolve.
|
|
1618
|
+
* @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
|
|
1619
|
+
* @returns {string} The resolved URL as a string.
|
|
1620
|
+
*/
|
|
1568
1621
|
function resolveModuleURL(input, options) {
|
|
1569
1622
|
const parsedInput = _parseInput(input);
|
|
1570
1623
|
if ("external" in parsedInput) return parsedInput.external;
|
|
@@ -1629,6 +1682,15 @@ function resolveModuleURL(input, options) {
|
|
|
1629
1682
|
if (cacheObj) cacheObj.set(cacheKey, resolved.href);
|
|
1630
1683
|
return resolved.href;
|
|
1631
1684
|
}
|
|
1685
|
+
/**
|
|
1686
|
+
* Synchronously resolves a module then converts it to a file path
|
|
1687
|
+
*
|
|
1688
|
+
* (throws error if reolved path is not file:// scheme)
|
|
1689
|
+
*
|
|
1690
|
+
* @param {string} id - The identifier or path of the module to resolve.
|
|
1691
|
+
* @param {ResolveOptions} [options] - Options to resolve the module. See {@link ResolveOptions}.
|
|
1692
|
+
* @returns {string} The resolved URL as a string.
|
|
1693
|
+
*/
|
|
1632
1694
|
function resolveModulePath(id, options) {
|
|
1633
1695
|
const resolved = resolveModuleURL(id, options);
|
|
1634
1696
|
if (!resolved) return;
|
|
@@ -1639,9 +1701,7 @@ function resolveModulePath(id, options) {
|
|
|
1639
1701
|
function _tryModuleResolve(specifier, base, conditions) {
|
|
1640
1702
|
try {
|
|
1641
1703
|
return moduleResolve(specifier, base, conditions);
|
|
1642
|
-
} catch
|
|
1643
|
-
if (!NOT_FOUND_ERRORS.has(error?.code)) throw error;
|
|
1644
|
-
}
|
|
1704
|
+
} catch {}
|
|
1645
1705
|
}
|
|
1646
1706
|
function _normalizeBases(inputs) {
|
|
1647
1707
|
const urls = (Array.isArray(inputs) ? inputs : [inputs]).flatMap((input) => _normalizeBase(input));
|
|
@@ -1680,8 +1740,8 @@ function _join(a, b$1) {
|
|
|
1680
1740
|
if (!a || !b$1 || b$1 === "/") return a;
|
|
1681
1741
|
return (a.endsWith("/") ? a : a + "/") + (b$1.startsWith("/") ? b$1.slice(1) : b$1);
|
|
1682
1742
|
}
|
|
1683
|
-
function _normalizeWinPath(path$
|
|
1684
|
-
return path$
|
|
1743
|
+
function _normalizeWinPath(path$1$1) {
|
|
1744
|
+
return path$1$1.replace(/\\/g, "/").replace(/^[a-z]:\//, (r$1) => r$1.toUpperCase());
|
|
1685
1745
|
}
|
|
1686
1746
|
function _isURL(input) {
|
|
1687
1747
|
return input instanceof URL || input?.constructor?.name === "URL";
|
|
@@ -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.2/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;
|
|
@@ -8,7 +8,7 @@ import { t as require_is_reference } from "./is-reference.mjs";
|
|
|
8
8
|
import { existsSync, readFileSync, statSync } from "fs";
|
|
9
9
|
import { basename, dirname, extname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "path";
|
|
10
10
|
|
|
11
|
-
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.53.
|
|
11
|
+
//#region node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.53.2/node_modules/@rollup/pluginutils/dist/es/index.js
|
|
12
12
|
var import_picomatch = /* @__PURE__ */ __toESM(require_picomatch(), 1);
|
|
13
13
|
const extractors = {
|
|
14
14
|
ArrayPattern(names, param) {
|
|
@@ -243,7 +243,7 @@ const dataToEsm = function dataToEsm$1(data, options = {}) {
|
|
|
243
243
|
};
|
|
244
244
|
|
|
245
245
|
//#endregion
|
|
246
|
-
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.53.
|
|
246
|
+
//#region node_modules/.pnpm/@rollup+plugin-commonjs@29.0.0_rollup@4.53.2/node_modules/@rollup/plugin-commonjs/dist/es/index.js
|
|
247
247
|
var import_commondir = /* @__PURE__ */ __toESM(require_commondir(), 1);
|
|
248
248
|
var import_is_reference = /* @__PURE__ */ __toESM(require_is_reference(), 1);
|
|
249
249
|
var version = "29.0.0";
|
|
@@ -3,7 +3,7 @@ import { n as walk } from "./estree-walker.mjs";
|
|
|
3
3
|
import { a as makeLegalIdentifier, n as attachScopes, r as createFilter } from "./plugin-commonjs.mjs";
|
|
4
4
|
import { sep } from "path";
|
|
5
5
|
|
|
6
|
-
//#region node_modules/.pnpm/@rollup+plugin-inject@5.0.5_rollup@4.53.
|
|
6
|
+
//#region node_modules/.pnpm/@rollup+plugin-inject@5.0.5_rollup@4.53.2/node_modules/@rollup/plugin-inject/dist/es/index.js
|
|
7
7
|
var escape = function(str) {
|
|
8
8
|
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
9
9
|
};
|
|
@@ -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.2/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);
|
|
@@ -694,7 +694,7 @@ var require_resolve = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/resolve@1
|
|
|
694
694
|
}) });
|
|
695
695
|
|
|
696
696
|
//#endregion
|
|
697
|
-
//#region node_modules/.pnpm/@rollup+plugin-node-resolve@16.0.3_rollup@4.53.
|
|
697
|
+
//#region node_modules/.pnpm/@rollup+plugin-node-resolve@16.0.3_rollup@4.53.2/node_modules/@rollup/plugin-node-resolve/dist/es/index.js
|
|
698
698
|
var import_cjs = /* @__PURE__ */ __toESM(require_cjs(), 1);
|
|
699
699
|
var import_is_module = /* @__PURE__ */ __toESM(require_is_module(), 1);
|
|
700
700
|
var import_resolve = /* @__PURE__ */ __toESM(require_resolve(), 1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as MagicString } from "./magic-string.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.2/node_modules/@rollup/plugin-replace/dist/es/index.js
|
|
5
5
|
function escape(str) {
|
|
6
6
|
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitro-nightly",
|
|
3
|
-
"version": "3.0.1-20251110-
|
|
3
|
+
"version": "3.0.1-20251110-093536-c21a33ba",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"homepage": "https://nitro.build",
|
|
6
6
|
"repository": "nitrojs/nitro",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"db0": "^0.3.4",
|
|
64
64
|
"h3": "2.0.1-rc.5",
|
|
65
65
|
"jiti": "^2.6.1",
|
|
66
|
-
"nf3": "^0.1.
|
|
66
|
+
"nf3": "^0.1.10",
|
|
67
67
|
"ofetch": "^2.0.0-alpha.3",
|
|
68
68
|
"ohash": "^2.0.11",
|
|
69
69
|
"oxc-minify": "^0.96.0",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@azure/static-web-apps-cli": "^2.0.7",
|
|
79
79
|
"@cloudflare/workers-types": "^4.20251109.0",
|
|
80
80
|
"@deno/types": "^0.0.1",
|
|
81
|
-
"rollup": "^4.53.
|
|
81
|
+
"rollup": "^4.53.2",
|
|
82
82
|
"@hiogawa/vite-plugin-fullstack": "npm:@pi0/vite-plugin-fullstack@0.0.5-pr-1297",
|
|
83
83
|
"@netlify/edge-functions": "^3.0.2",
|
|
84
84
|
"@netlify/functions": "^5.1.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"etag": "^1.8.1",
|
|
119
119
|
"execa": "^9.6.0",
|
|
120
120
|
"expect-type": "^1.2.2",
|
|
121
|
-
"exsolve": "^1.0.
|
|
121
|
+
"exsolve": "^1.0.8",
|
|
122
122
|
"fs-extra": "^11.3.2",
|
|
123
123
|
"get-port-please": "^3.2.0",
|
|
124
124
|
"gzip-size": "^7.0.0",
|