nitro-nightly 3.0.1-20260119-145349-d0c4950f → 3.0.1-20260120-020848-6786d069
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/rolldown.mjs +13 -8
- package/dist/_build/vite.build.mjs +1 -1
- package/dist/_chunks/dev.mjs +5 -3
- package/dist/_chunks/nitro.mjs +24 -1183
- package/dist/_chunks/nitro2.mjs +248 -91
- package/dist/_chunks/nitro3.mjs +2696 -0
- package/dist/_chunks/nitro4.mjs +176 -0
- package/dist/_chunks/nitro5.mjs +733 -0
- package/dist/_chunks/nitro6.mjs +1458 -0
- package/dist/_chunks/nitro7.mjs +7561 -0
- package/dist/_chunks/nitro8.mjs +3524 -0
- package/dist/_chunks/nitro9.mjs +1729 -0
- package/dist/_libs/_.mjs +3 -0
- package/dist/_libs/_2.mjs +3 -0
- package/dist/_libs/_3.mjs +4 -0
- package/dist/_libs/_4.mjs +6 -0
- package/dist/_libs/_5.mjs +3 -0
- package/dist/_libs/_6.mjs +3 -0
- package/dist/_libs/acorn+confbox+js-tokens+magic-string+mlly+pkg-types+sourcemap-codec+strip-literal+unimport.mjs +8900 -0
- package/dist/_libs/{c12.mjs → c12+dotenv+rc9.mjs} +12 -105
- package/dist/_libs/{chokidar.mjs → chokidar+readdirp.mjs} +2 -9
- package/dist/_libs/confbox+exsolve+pkg-types.mjs +1249 -0
- package/dist/_libs/confbox.mjs +70 -2488
- package/dist/_libs/confbox2.mjs +786 -0
- package/dist/_libs/confbox3.mjs +404 -0
- package/dist/_libs/confbox4.mjs +3 -0
- package/dist/_libs/estree-walker+unimport.mjs +378 -0
- package/dist/_libs/fdir+picomatch+tinyglobby.mjs +2471 -0
- package/dist/_libs/gen-mapping+remapping+resolve-uri+trace-mapping+unimport+unplugin+unplugin-utils+webpack-virtual-modules.mjs +2150 -0
- package/dist/_libs/giget+node-fetch-native.mjs +2692 -0
- package/dist/_libs/httpxy.mjs +1 -6
- package/dist/_libs/local-pkg+quansync+unimport.mjs +1526 -0
- package/dist/_libs/nypm+tinyexec.mjs +858 -0
- package/dist/_libs/pathe.mjs +164 -0
- package/dist/_libs/perfect-debounce.mjs +89 -0
- package/dist/_libs/{@rollup/plugin-inject.mjs → plugin-alias+plugin-inject.mjs} +65 -2
- package/dist/_libs/std-env.mjs +158 -0
- package/dist/_libs/unimport.mjs +5 -1781
- package/dist/_libs/vite-plugin-fullstack.mjs +26 -0
- package/dist/_presets.mjs +8 -3
- package/dist/builder.mjs +8 -6
- package/dist/cli/_chunks/build.mjs +1 -1
- package/dist/cli/_chunks/dev.mjs +3 -2
- package/dist/cli/_chunks/list.mjs +1 -1
- package/dist/cli/_chunks/prepare.mjs +1 -1
- package/dist/cli/_chunks/run.mjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/types/index.d.mts +2410 -1174
- package/dist/vite.d.mts +13 -13
- package/dist/vite.mjs +640 -16
- package/package.json +9 -9
- package/dist/_build/common.mjs +0 -24931
- package/dist/_build/rollup.mjs +0 -201
- package/dist/_chunks/utils.mjs +0 -254
- package/dist/_common.mjs +0 -45
- package/dist/_libs/@hiogawa/vite-plugin-fullstack.mjs +0 -652
- package/dist/_libs/@jridgewell/gen-mapping.mjs +0 -448
- package/dist/_libs/@jridgewell/remapping.mjs +0 -117
- package/dist/_libs/@rollup/plugin-alias.mjs +0 -64
- package/dist/_libs/@rollup/plugin-commonjs.mjs +0 -1300
- package/dist/_libs/@rollup/plugin-json.mjs +0 -36
- package/dist/_libs/@rollup/plugin-node-resolve.mjs +0 -1972
- package/dist/_libs/escape-string-regexp.mjs +0 -8
- package/dist/_libs/estree-walker.mjs +0 -187
- package/dist/_libs/giget.mjs +0 -3550
- package/dist/_libs/klona.mjs +0 -38
- package/dist/_libs/rou3.mjs +0 -322
- package/dist/_libs/tsconfck.mjs +0 -832
- package/dist/_libs/ultrahtml.mjs +0 -138
- package/dist/cli/_chunks/task.mjs +0 -16
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as __require, r as __toESM, t as __commonJSMin } from "../_chunks/nitro.mjs";
|
|
2
|
+
import { a as join$1, n as dirname$1, o as normalize$1, r as extname$1, t as basename$1, u as resolve$1 } from "./pathe.mjs";
|
|
3
|
+
import { l as resolveModulePath, o as readPackageJSON, r as findWorkspaceDir } from "./confbox+exsolve+pkg-types.mjs";
|
|
4
|
+
import { t as debounce } from "./perfect-debounce.mjs";
|
|
3
5
|
import { existsSync, promises, readFileSync, statSync } from "node:fs";
|
|
4
6
|
import { readFile, rm } from "node:fs/promises";
|
|
5
7
|
import { pathToFileURL } from "node:url";
|
|
@@ -479,103 +481,8 @@ function readUser(options) {
|
|
|
479
481
|
return read(options);
|
|
480
482
|
}
|
|
481
483
|
|
|
482
|
-
//#endregion
|
|
483
|
-
//#region node_modules/.pnpm/perfect-debounce@2.0.0/node_modules/perfect-debounce/dist/index.mjs
|
|
484
|
-
const DEBOUNCE_DEFAULTS = { trailing: true };
|
|
485
|
-
/**
|
|
486
|
-
Debounce functions
|
|
487
|
-
@param fn - Promise-returning/async function to debounce.
|
|
488
|
-
@param wait - Milliseconds to wait before calling `fn`. Default value is 25ms
|
|
489
|
-
@returns A function that delays calling `fn` until after `wait` milliseconds have elapsed since the last time it was called.
|
|
490
|
-
@example
|
|
491
|
-
```
|
|
492
|
-
import { debounce } from 'perfect-debounce';
|
|
493
|
-
const expensiveCall = async input => input;
|
|
494
|
-
const debouncedFn = debounce(expensiveCall, 200);
|
|
495
|
-
for (const number of [1, 2, 3]) {
|
|
496
|
-
console.log(await debouncedFn(number));
|
|
497
|
-
}
|
|
498
|
-
//=> 1
|
|
499
|
-
//=> 2
|
|
500
|
-
//=> 3
|
|
501
|
-
```
|
|
502
|
-
*/
|
|
503
|
-
function debounce(fn, wait = 25, options = {}) {
|
|
504
|
-
options = {
|
|
505
|
-
...DEBOUNCE_DEFAULTS,
|
|
506
|
-
...options
|
|
507
|
-
};
|
|
508
|
-
if (!Number.isFinite(wait)) throw new TypeError("Expected `wait` to be a finite number");
|
|
509
|
-
let leadingValue;
|
|
510
|
-
let timeout;
|
|
511
|
-
let resolveList = [];
|
|
512
|
-
let currentPromise;
|
|
513
|
-
let trailingArgs;
|
|
514
|
-
const applyFn = (_this, args) => {
|
|
515
|
-
currentPromise = _applyPromised(fn, _this, args);
|
|
516
|
-
currentPromise.finally(() => {
|
|
517
|
-
currentPromise = null;
|
|
518
|
-
if (options.trailing && trailingArgs && !timeout) {
|
|
519
|
-
const promise = applyFn(_this, trailingArgs);
|
|
520
|
-
trailingArgs = null;
|
|
521
|
-
return promise;
|
|
522
|
-
}
|
|
523
|
-
});
|
|
524
|
-
return currentPromise;
|
|
525
|
-
};
|
|
526
|
-
const debounced = function(...args) {
|
|
527
|
-
if (options.trailing) trailingArgs = args;
|
|
528
|
-
if (currentPromise) return currentPromise;
|
|
529
|
-
return new Promise((resolve$2) => {
|
|
530
|
-
const shouldCallNow = !timeout && options.leading;
|
|
531
|
-
clearTimeout(timeout);
|
|
532
|
-
timeout = setTimeout(() => {
|
|
533
|
-
timeout = null;
|
|
534
|
-
const promise = options.leading ? leadingValue : applyFn(this, args);
|
|
535
|
-
trailingArgs = null;
|
|
536
|
-
for (const _resolve of resolveList) _resolve(promise);
|
|
537
|
-
resolveList = [];
|
|
538
|
-
}, wait);
|
|
539
|
-
if (shouldCallNow) {
|
|
540
|
-
leadingValue = applyFn(this, args);
|
|
541
|
-
resolve$2(leadingValue);
|
|
542
|
-
} else resolveList.push(resolve$2);
|
|
543
|
-
});
|
|
544
|
-
};
|
|
545
|
-
const _clearTimeout = (timer) => {
|
|
546
|
-
if (timer) {
|
|
547
|
-
clearTimeout(timer);
|
|
548
|
-
timeout = null;
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
debounced.isPending = () => !!timeout;
|
|
552
|
-
debounced.cancel = () => {
|
|
553
|
-
_clearTimeout(timeout);
|
|
554
|
-
resolveList = [];
|
|
555
|
-
trailingArgs = null;
|
|
556
|
-
};
|
|
557
|
-
debounced.flush = () => {
|
|
558
|
-
_clearTimeout(timeout);
|
|
559
|
-
if (!trailingArgs || currentPromise) return;
|
|
560
|
-
const args = trailingArgs;
|
|
561
|
-
trailingArgs = null;
|
|
562
|
-
return applyFn(this, args);
|
|
563
|
-
};
|
|
564
|
-
return debounced;
|
|
565
|
-
}
|
|
566
|
-
async function _applyPromised(fn, _this, args) {
|
|
567
|
-
return await fn.apply(_this, args);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
484
|
//#endregion
|
|
571
485
|
//#region node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs
|
|
572
|
-
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
573
|
-
SUPPORTED_EXTENSIONS: () => SUPPORTED_EXTENSIONS,
|
|
574
|
-
loadConfig: () => loadConfig,
|
|
575
|
-
loadDotenv: () => loadDotenv,
|
|
576
|
-
setupDotenv: () => setupDotenv,
|
|
577
|
-
watchConfig: () => watchConfig
|
|
578
|
-
});
|
|
579
486
|
var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
|
|
580
487
|
/**
|
|
581
488
|
* Load and interpolate environment variables into `process.env`.
|
|
@@ -653,11 +560,11 @@ function getDotEnvVars(targetEnvironment) {
|
|
|
653
560
|
}
|
|
654
561
|
const _normalize = (p) => p?.replace(/\\/g, "/");
|
|
655
562
|
const ASYNC_LOADERS = {
|
|
656
|
-
".yaml": () => import("./
|
|
657
|
-
".yml": () => import("./
|
|
658
|
-
".jsonc": () => import("./
|
|
659
|
-
".json5": () => import("./
|
|
660
|
-
".toml": () => import("./
|
|
563
|
+
".yaml": () => import("./_.mjs").then((r) => r.parseYAML),
|
|
564
|
+
".yml": () => import("./_.mjs").then((r) => r.parseYAML),
|
|
565
|
+
".jsonc": () => import("./confbox4.mjs").then((r) => r.parseJSONC),
|
|
566
|
+
".json5": () => import("./confbox2.mjs").then((r) => r.parseJSON5),
|
|
567
|
+
".toml": () => import("./_2.mjs").then((r) => r.parseTOML)
|
|
661
568
|
};
|
|
662
569
|
const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
663
570
|
".js",
|
|
@@ -843,7 +750,7 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
843
750
|
const customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);
|
|
844
751
|
const gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
|
|
845
752
|
if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
|
|
846
|
-
const { downloadTemplate } = await import("./giget.mjs")
|
|
753
|
+
const { downloadTemplate } = await import("./giget+node-fetch-native.mjs");
|
|
847
754
|
const { digest } = await import("ohash");
|
|
848
755
|
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
849
756
|
let cloneDir;
|
|
@@ -924,7 +831,7 @@ async function watchConfig(options) {
|
|
|
924
831
|
options.rcFile && resolve$1(l.cwd, typeof options.rcFile === "string" ? options.rcFile : `.${configName}rc`),
|
|
925
832
|
options.packageJson && resolve$1(l.cwd, "package.json")
|
|
926
833
|
]).filter(Boolean))];
|
|
927
|
-
const watch$1 = await import("./
|
|
834
|
+
const watch$1 = await import("./_6.mjs").then((r) => r.watch || r.default || r);
|
|
928
835
|
const { diff } = await import("ohash/utils");
|
|
929
836
|
const _fswatcher = watch$1(watchingFiles, {
|
|
930
837
|
ignoreInitial: true,
|
|
@@ -969,4 +876,4 @@ async function watchConfig(options) {
|
|
|
969
876
|
}
|
|
970
877
|
|
|
971
878
|
//#endregion
|
|
972
|
-
export {
|
|
879
|
+
export { watchConfig as a, setupDotenv as i, loadConfig as n, loadDotenv as r, SUPPORTED_EXTENSIONS as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { stat, unwatchFile, watch, watchFile } from "node:fs";
|
|
1
|
+
import { Stats, stat, unwatchFile, watch, watchFile } from "node:fs";
|
|
3
2
|
import { lstat, open, readdir, realpath, stat as stat$1 } from "node:fs/promises";
|
|
4
3
|
import { type } from "node:os";
|
|
5
4
|
import * as sp from "node:path";
|
|
@@ -958,12 +957,6 @@ var NodeFsHandler = class {
|
|
|
958
957
|
//#endregion
|
|
959
958
|
//#region node_modules/.pnpm/chokidar@5.0.0/node_modules/chokidar/index.js
|
|
960
959
|
/*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) */
|
|
961
|
-
var chokidar_exports = /* @__PURE__ */ __exportAll({
|
|
962
|
-
FSWatcher: () => FSWatcher,
|
|
963
|
-
WatchHelper: () => WatchHelper,
|
|
964
|
-
default: () => chokidar_default,
|
|
965
|
-
watch: () => watch$1
|
|
966
|
-
});
|
|
967
960
|
const SLASH = "/";
|
|
968
961
|
const SLASH_SLASH = "//";
|
|
969
962
|
const ONE_DOT = ".";
|
|
@@ -1608,4 +1601,4 @@ var chokidar_default = {
|
|
|
1608
1601
|
};
|
|
1609
1602
|
|
|
1610
1603
|
//#endregion
|
|
1611
|
-
export { watch$1 as
|
|
1604
|
+
export { watch$1 as i, WatchHelper as n, chokidar_default as r, FSWatcher as t };
|