nitro-nightly 3.0.1-20251104-223815-3402cc78 → 3.0.1-20251105-120424-589a47c2
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/common.mjs +3 -3
- package/dist/_libs/c12.mjs +12 -12
- package/dist/_libs/giget.mjs +6863 -6711
- package/dist/_libs/local-pkg.mjs +8 -8
- package/dist/_libs/unimport.mjs +12 -12
- package/dist/_libs/vite-plugin-fullstack.mjs +1 -1
- package/dist/_presets.mjs +1 -0
- package/package.json +10 -10
package/dist/_build/common.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { t as require_etag } from "../_libs/etag.mjs";
|
|
|
11
11
|
import { dirname } from "node:path";
|
|
12
12
|
import { camelCase } from "scule";
|
|
13
13
|
import { promises } from "node:fs";
|
|
14
|
-
import { withTrailingSlash } from "ufo";
|
|
14
|
+
import { joinURL, withTrailingSlash } from "ufo";
|
|
15
15
|
import { mkdir, readFile, symlink, unlink } from "node:fs/promises";
|
|
16
16
|
import { defu } from "defu";
|
|
17
17
|
import { runtimeDependencies, runtimeDir } from "nitro/runtime/meta";
|
|
@@ -375,7 +375,7 @@ function publicAssets(nitro) {
|
|
|
375
375
|
const assetData = await promises.readFile(fullPath);
|
|
376
376
|
const etag = (0, import_etag$1.default)(assetData);
|
|
377
377
|
const stat$1 = await promises.stat(fullPath);
|
|
378
|
-
const assetId =
|
|
378
|
+
const assetId = joinURL(nitro.options.baseURL, decodeURIComponent(id));
|
|
379
379
|
let encoding;
|
|
380
380
|
if (id.endsWith(".gz")) encoding = "gzip";
|
|
381
381
|
else if (id.endsWith(".br")) encoding = "br";
|
|
@@ -429,7 +429,7 @@ export function readAsset (id) {
|
|
|
429
429
|
}`;
|
|
430
430
|
},
|
|
431
431
|
"#nitro-internal-virtual/public-assets": () => {
|
|
432
|
-
const publicAssetBases = Object.fromEntries(nitro.options.publicAssets.filter((dir) => !dir.fallthrough && dir.baseURL !== "/").map((dir) => [withTrailingSlash(dir.baseURL), { maxAge: dir.maxAge }]));
|
|
432
|
+
const publicAssetBases = Object.fromEntries(nitro.options.publicAssets.filter((dir) => !dir.fallthrough && dir.baseURL !== "/").map((dir) => [withTrailingSlash(joinURL(nitro.options.baseURL, dir.baseURL || "/")), { maxAge: dir.maxAge }]));
|
|
433
433
|
return `
|
|
434
434
|
import assets from '#nitro-internal-virtual/public-assets-data'
|
|
435
435
|
export { readAsset } from "${`#nitro-internal-virtual/public-assets-${readAssetHandler[nitro.options.serveStatic] || "null"}`}"
|
package/dist/_libs/c12.mjs
CHANGED
|
@@ -56,7 +56,7 @@ const join$1 = function(...segments) {
|
|
|
56
56
|
}
|
|
57
57
|
return normalize$1(path$2);
|
|
58
58
|
};
|
|
59
|
-
function cwd() {
|
|
59
|
+
function cwd$1() {
|
|
60
60
|
if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
|
|
61
61
|
return "/";
|
|
62
62
|
}
|
|
@@ -65,7 +65,7 @@ const resolve$1 = function(...arguments_) {
|
|
|
65
65
|
let resolvedPath = "";
|
|
66
66
|
let resolvedAbsolute = false;
|
|
67
67
|
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
68
|
-
const path$2 = index >= 0 ? arguments_[index] : cwd();
|
|
68
|
+
const path$2 = index >= 0 ? arguments_[index] : cwd$1();
|
|
69
69
|
if (!path$2 || path$2.length === 0) continue;
|
|
70
70
|
resolvedPath = `${path$2}/${resolvedPath}`;
|
|
71
71
|
resolvedAbsolute = isAbsolute$1(path$2);
|
|
@@ -1852,7 +1852,7 @@ function keyIdentity(key) {
|
|
|
1852
1852
|
}
|
|
1853
1853
|
function flatten(target, opts) {
|
|
1854
1854
|
opts = opts || {};
|
|
1855
|
-
const delimiter = opts.delimiter || ".";
|
|
1855
|
+
const delimiter$1 = opts.delimiter || ".";
|
|
1856
1856
|
const maxDepth = opts.maxDepth;
|
|
1857
1857
|
const transformKey = opts.transformKey || keyIdentity;
|
|
1858
1858
|
const output = {};
|
|
@@ -1864,7 +1864,7 @@ function flatten(target, opts) {
|
|
|
1864
1864
|
const type = Object.prototype.toString.call(value);
|
|
1865
1865
|
const isbuffer = isBuffer(value);
|
|
1866
1866
|
const isobject = type === "[object Object]" || type === "[object Array]";
|
|
1867
|
-
const newKey = prev ? prev + delimiter + transformKey(key) : transformKey(key);
|
|
1867
|
+
const newKey = prev ? prev + delimiter$1 + transformKey(key) : transformKey(key);
|
|
1868
1868
|
if (!isarray && !isbuffer && isobject && Object.keys(value).length && (!opts.maxDepth || currentDepth < maxDepth)) return step(value, newKey, currentDepth + 1);
|
|
1869
1869
|
output[newKey] = value;
|
|
1870
1870
|
});
|
|
@@ -1874,7 +1874,7 @@ function flatten(target, opts) {
|
|
|
1874
1874
|
}
|
|
1875
1875
|
function unflatten(target, opts) {
|
|
1876
1876
|
opts = opts || {};
|
|
1877
|
-
const delimiter = opts.delimiter || ".";
|
|
1877
|
+
const delimiter$1 = opts.delimiter || ".";
|
|
1878
1878
|
const overwrite = opts.overwrite || false;
|
|
1879
1879
|
const transformKey = opts.transformKey || keyIdentity;
|
|
1880
1880
|
const result = {};
|
|
@@ -1885,7 +1885,7 @@ function unflatten(target, opts) {
|
|
|
1885
1885
|
}
|
|
1886
1886
|
function addKeys(keyPrefix, recipient, target$1) {
|
|
1887
1887
|
return Object.keys(target$1).reduce(function(result$1, key) {
|
|
1888
|
-
result$1[keyPrefix + delimiter + key] = target$1[key];
|
|
1888
|
+
result$1[keyPrefix + delimiter$1 + key] = target$1[key];
|
|
1889
1889
|
return result$1;
|
|
1890
1890
|
}, recipient);
|
|
1891
1891
|
}
|
|
@@ -1905,7 +1905,7 @@ function unflatten(target, opts) {
|
|
|
1905
1905
|
} else return addKeys(key, result$1, flatten(target[key], opts));
|
|
1906
1906
|
}, {});
|
|
1907
1907
|
Object.keys(target).forEach(function(key) {
|
|
1908
|
-
const split = key.split(delimiter).map(transformKey);
|
|
1908
|
+
const split = key.split(delimiter$1).map(transformKey);
|
|
1909
1909
|
let key1 = getkey(split.shift());
|
|
1910
1910
|
let key2 = getkey(split[0]);
|
|
1911
1911
|
let recipient = result;
|
|
@@ -2333,13 +2333,13 @@ async function setupDotenv(options) {
|
|
|
2333
2333
|
}
|
|
2334
2334
|
async function loadDotenv(options) {
|
|
2335
2335
|
const environment = /* @__PURE__ */ Object.create(null);
|
|
2336
|
-
const cwd$
|
|
2336
|
+
const cwd$2 = resolve$1(options.cwd || ".");
|
|
2337
2337
|
const _fileName = options.fileName || ".env";
|
|
2338
2338
|
const dotenvFiles = typeof _fileName === "string" ? [_fileName] : _fileName;
|
|
2339
2339
|
const dotenvVars = getDotEnvVars(options.env || {});
|
|
2340
2340
|
Object.assign(environment, options.env);
|
|
2341
2341
|
for (const file of dotenvFiles) {
|
|
2342
|
-
const dotenvFile = resolve$1(cwd$
|
|
2342
|
+
const dotenvFile = resolve$1(cwd$2, file);
|
|
2343
2343
|
if (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;
|
|
2344
2344
|
const parsed = import_main$1.parse(await promises.readFile(dotenvFile, "utf8"));
|
|
2345
2345
|
for (const key in parsed) {
|
|
@@ -2598,16 +2598,16 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
2598
2598
|
if (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;
|
|
2599
2599
|
const ext = extname$1(source);
|
|
2600
2600
|
const isDir = !ext || ext === basename$1(source);
|
|
2601
|
-
const cwd$
|
|
2601
|
+
const cwd$2 = resolve$1(options.cwd, isDir ? source : dirname$1(source));
|
|
2602
2602
|
if (isDir) source = options.configFile;
|
|
2603
2603
|
const res = {
|
|
2604
2604
|
config: void 0,
|
|
2605
2605
|
configFile: void 0,
|
|
2606
|
-
cwd: cwd$
|
|
2606
|
+
cwd: cwd$2,
|
|
2607
2607
|
source,
|
|
2608
2608
|
sourceOptions
|
|
2609
2609
|
};
|
|
2610
|
-
res.configFile = tryResolve(resolve$1(cwd$
|
|
2610
|
+
res.configFile = tryResolve(resolve$1(cwd$2, source), options) || tryResolve(resolve$1(cwd$2, ".config", source.replace(/\.config$/, "")), options) || tryResolve(resolve$1(cwd$2, ".config", source), options) || source;
|
|
2611
2611
|
if (!existsSync(res.configFile)) return res;
|
|
2612
2612
|
res._configFile = res.configFile;
|
|
2613
2613
|
const configFileExt = extname$1(res.configFile) || "";
|