@voidzero-dev/vite-plus-core 0.1.13 → 0.1.14-alpha.1
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/rolldown/cli.mjs +6 -10
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -8
- package/dist/rolldown/experimental-index.d.mts +4 -4
- package/dist/rolldown/experimental-index.mjs +8 -8
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +2 -2
- package/dist/rolldown/index.mjs +4 -8
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -5
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -2
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -3
- package/dist/rolldown/shared/{binding-Dsq9Azhm.d.mts → binding-CYVfiOV3.d.mts} +15 -0
- package/dist/rolldown/shared/{bindingify-input-options-nddSVL89.mjs → bindingify-input-options-DHK3MwUV.mjs} +26 -4
- package/dist/rolldown/shared/{constructors-DqC7XSXy.mjs → constructors-BfnFojy3.mjs} +1 -1
- package/dist/rolldown/shared/{constructors-DfpIbfMG.d.mts → constructors-DRe7RuMC.d.mts} +2 -2
- package/dist/rolldown/shared/{define-config-CV9D_Qea.d.mts → define-config-BkRKRADp.d.mts} +17 -3
- package/dist/rolldown/shared/{error-BO4SlZV_.mjs → error-D8cGyrC7.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-CDqvxxnl.mjs → load-config-DT77Jzbv.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-D7wlw16t.mjs → normalize-string-or-regex-BFB1QNW3.mjs} +20 -12
- package/dist/rolldown/shared/{parse-WOgXxW4-.mjs → parse-CCDXnkPL.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-C3OzszY-.mjs → resolve-tsconfig-gxOviCVx.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-DUOYLKyH.mjs → rolldown-DFpH3t7W.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-C7TjtSci.mjs → rolldown-build-ZUNnA-sr.mjs} +8 -6
- package/dist/rolldown/shared/{transform-B5D1aA1B.d.mts → transform-C_gBfjMR.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-BV1BB_LU.mjs → watch-C4x8DFD_.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -7
- package/dist/tsdown/{build-CoLhkNXE-CdsPtxD4.js → build-CoLhkNXE-CmOD7RnO.js} +50 -50
- package/dist/tsdown/build-dhDyu66J-C6Nd9qmR.js +2 -0
- package/dist/tsdown/{debug-C4FmgzkJ-BxvFHEjv.js → debug-C4FmgzkJ-GjwR9kY5.js} +2 -2
- package/dist/tsdown/{detect-DN3DXXYt-CgZGWZG7.js → detect-DN3DXXYt-CCqla4Th.js} +1 -1
- package/dist/tsdown/{dist-DUfkEqWP.js → dist-BWGgEAtQ.js} +12 -12
- package/dist/tsdown/{dist-CtF_Stv5.js → dist-dJp148cE.js} +3 -3
- package/dist/tsdown/index-types.d.ts +5 -5
- package/dist/tsdown/index.js +4 -6
- package/dist/tsdown/{main-CU_sednE.js → main-Dru8oclH.js} +2 -2
- package/dist/tsdown/npm_entry_semver_functions_lt.cjs +0 -1
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +0 -2
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +0 -1
- package/dist/tsdown/run.js +3 -4
- package/dist/vite/client/client.mjs +4 -4
- package/dist/vite/node/chunks/build.js +0 -1
- package/dist/vite/node/chunks/config.js +0 -1
- package/dist/vite/node/chunks/logger.js +1 -1
- package/dist/vite/node/chunks/node.js +42 -30
- package/dist/vite/node/chunks/optimizer.js +0 -1
- package/dist/vite/node/chunks/preview.js +0 -1
- package/dist/vite/node/chunks/server.js +0 -1
- package/dist/vite/node/index.d.ts +9 -2
- package/package.json +9 -9
- package/dist/tsdown/build-dhDyu66J-C_jUIuMF.js +0 -5
- /package/dist/rolldown/shared/{binding-BV_UWDF3.mjs → binding-ER32uZ22.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
|
|
2
|
-
import { C as resolveComma, E as toArray, S as promiseWithResolvers, T as slash, _ as debounce, a as createLogger, b as noop, c as globalLogger, d as bold, f as dim, g as yellow, h as underline, i as LogLevels, l as prettyFormat, m as red, n as z, o as generateColor, p as green, r as version, s as getNameLabel, t as R, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-
|
|
2
|
+
import { C as resolveComma, E as toArray, S as promiseWithResolvers, T as slash, _ as debounce, a as createLogger, b as noop, c as globalLogger, d as bold, f as dim, g as yellow, h as underline, i as LogLevels, l as prettyFormat, m as red, n as z, o as generateColor, p as green, r as version, s as getNameLabel, t as R, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-Dru8oclH.js";
|
|
3
3
|
import { t as createDebug } from "./node-B3Gdtau1.js";
|
|
4
4
|
import { i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-UU7z2A9Z.js";
|
|
5
5
|
import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
|
|
@@ -17,11 +17,11 @@ import path$1, { basename, dirname as dirname$1, normalize as normalize$1, posix
|
|
|
17
17
|
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
18
18
|
import { createRequire as createRequire$1 } from "module";
|
|
19
19
|
import { tmpdir } from "node:os";
|
|
20
|
-
import
|
|
20
|
+
import fs$1, { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
21
21
|
import { Buffer } from "node:buffer";
|
|
22
22
|
import { brotliCompress, gzip } from "node:zlib";
|
|
23
23
|
import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
24
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
24
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
|
|
25
25
|
function fsExists(path) {
|
|
26
26
|
return access(path).then(() => true, () => false);
|
|
27
27
|
}
|
|
@@ -64,7 +64,7 @@ function stripExtname(filePath) {
|
|
|
64
64
|
return filePath.slice(0, -ext.length);
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
67
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/format-DPVBd8E4.mjs
|
|
68
68
|
const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
|
|
69
69
|
function getShimsInject(format, platform) {
|
|
70
70
|
if (format === "es" && platform === "node") return {
|
|
@@ -2917,87 +2917,87 @@ quansync$1({
|
|
|
2917
2917
|
*/
|
|
2918
2918
|
const quansync = quansync$1;
|
|
2919
2919
|
quansync$1({
|
|
2920
|
-
sync:
|
|
2921
|
-
async:
|
|
2920
|
+
sync: fs$1.readFileSync,
|
|
2921
|
+
async: fs$1.promises.readFile
|
|
2922
2922
|
});
|
|
2923
2923
|
quansync$1({
|
|
2924
|
-
sync:
|
|
2925
|
-
async:
|
|
2924
|
+
sync: fs$1.writeFileSync,
|
|
2925
|
+
async: fs$1.promises.writeFile
|
|
2926
2926
|
});
|
|
2927
2927
|
quansync$1({
|
|
2928
|
-
sync:
|
|
2929
|
-
async:
|
|
2928
|
+
sync: fs$1.unlinkSync,
|
|
2929
|
+
async: fs$1.promises.unlink
|
|
2930
2930
|
});
|
|
2931
2931
|
quansync$1({
|
|
2932
|
-
sync:
|
|
2933
|
-
async:
|
|
2932
|
+
sync: fs$1.accessSync,
|
|
2933
|
+
async: fs$1.promises.access
|
|
2934
2934
|
});
|
|
2935
2935
|
/**
|
|
2936
2936
|
* @link https://nodejs.org/api/fs.html#fspromisesstatpath-options
|
|
2937
2937
|
*/
|
|
2938
2938
|
const stat$1 = quansync$1({
|
|
2939
|
-
sync:
|
|
2940
|
-
async:
|
|
2939
|
+
sync: fs$1.statSync,
|
|
2940
|
+
async: fs$1.promises.stat
|
|
2941
2941
|
});
|
|
2942
2942
|
const lstat = quansync$1({
|
|
2943
|
-
sync:
|
|
2944
|
-
async:
|
|
2943
|
+
sync: fs$1.lstatSync,
|
|
2944
|
+
async: fs$1.promises.lstat
|
|
2945
2945
|
});
|
|
2946
2946
|
quansync$1({
|
|
2947
|
-
sync:
|
|
2948
|
-
async:
|
|
2947
|
+
sync: fs$1.copyFileSync,
|
|
2948
|
+
async: fs$1.promises.copyFile
|
|
2949
2949
|
});
|
|
2950
2950
|
quansync$1({
|
|
2951
|
-
sync:
|
|
2952
|
-
async:
|
|
2951
|
+
sync: fs$1.rmSync,
|
|
2952
|
+
async: fs$1.promises.rm
|
|
2953
2953
|
});
|
|
2954
2954
|
quansync$1({
|
|
2955
|
-
sync:
|
|
2956
|
-
async:
|
|
2955
|
+
sync: fs$1.mkdirSync,
|
|
2956
|
+
async: fs$1.promises.mkdir
|
|
2957
2957
|
});
|
|
2958
2958
|
quansync$1({
|
|
2959
|
-
sync:
|
|
2960
|
-
async:
|
|
2959
|
+
sync: fs$1.renameSync,
|
|
2960
|
+
async: fs$1.promises.rename
|
|
2961
2961
|
});
|
|
2962
2962
|
quansync$1({
|
|
2963
|
-
sync:
|
|
2964
|
-
async:
|
|
2963
|
+
sync: fs$1.readdirSync,
|
|
2964
|
+
async: fs$1.promises.readdir
|
|
2965
2965
|
});
|
|
2966
2966
|
quansync$1({
|
|
2967
|
-
sync:
|
|
2968
|
-
async:
|
|
2967
|
+
sync: fs$1.realpathSync,
|
|
2968
|
+
async: fs$1.promises.realpath
|
|
2969
2969
|
});
|
|
2970
2970
|
quansync$1({
|
|
2971
|
-
sync:
|
|
2972
|
-
async:
|
|
2971
|
+
sync: fs$1.readlinkSync,
|
|
2972
|
+
async: fs$1.promises.readlink
|
|
2973
2973
|
});
|
|
2974
2974
|
quansync$1({
|
|
2975
|
-
sync:
|
|
2976
|
-
async:
|
|
2975
|
+
sync: fs$1.symlinkSync,
|
|
2976
|
+
async: fs$1.promises.symlink
|
|
2977
2977
|
});
|
|
2978
2978
|
quansync$1({
|
|
2979
|
-
sync:
|
|
2980
|
-
async:
|
|
2979
|
+
sync: fs$1.chownSync,
|
|
2980
|
+
async: fs$1.promises.chown
|
|
2981
2981
|
});
|
|
2982
2982
|
quansync$1({
|
|
2983
|
-
sync:
|
|
2984
|
-
async:
|
|
2983
|
+
sync: fs$1.lchownSync,
|
|
2984
|
+
async: fs$1.promises.lchown
|
|
2985
2985
|
});
|
|
2986
2986
|
quansync$1({
|
|
2987
|
-
sync:
|
|
2988
|
-
async:
|
|
2987
|
+
sync: fs$1.chmodSync,
|
|
2988
|
+
async: fs$1.promises.chmod
|
|
2989
2989
|
});
|
|
2990
2990
|
quansync$1({
|
|
2991
|
-
sync:
|
|
2992
|
-
async:
|
|
2991
|
+
sync: fs$1.utimesSync,
|
|
2992
|
+
async: fs$1.promises.utimes
|
|
2993
2993
|
});
|
|
2994
2994
|
quansync$1({
|
|
2995
|
-
sync:
|
|
2996
|
-
async:
|
|
2995
|
+
sync: fs$1.lutimesSync,
|
|
2996
|
+
async: fs$1.promises.lutimes
|
|
2997
2997
|
});
|
|
2998
2998
|
quansync$1({
|
|
2999
|
-
sync:
|
|
3000
|
-
async:
|
|
2999
|
+
sync: fs$1.mkdtempSync,
|
|
3000
|
+
async: fs$1.promises.mkdtemp
|
|
3001
3001
|
});
|
|
3002
3002
|
//#endregion
|
|
3003
3003
|
//#region ../../node_modules/.pnpm/unconfig-core@7.5.0/node_modules/unconfig-core/dist/index.mjs
|
|
@@ -3076,7 +3076,7 @@ function createConfigCoreLoader(options) {
|
|
|
3076
3076
|
};
|
|
3077
3077
|
}
|
|
3078
3078
|
//#endregion
|
|
3079
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
3079
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/options-DoRzOC0d.mjs
|
|
3080
3080
|
const __cjs_require$1 = createRequire(import.meta.url);
|
|
3081
3081
|
const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
|
|
3082
3082
|
const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
|
|
@@ -3640,7 +3640,7 @@ async function nativeImport(id) {
|
|
|
3640
3640
|
return mod.default || mod;
|
|
3641
3641
|
}
|
|
3642
3642
|
async function unrunImport(id) {
|
|
3643
|
-
const { unrun } = await import("./dist-
|
|
3643
|
+
const { unrun } = await import("./dist-BWGgEAtQ.js");
|
|
3644
3644
|
const { module } = await unrun({ path: pathToFileURL(id).href });
|
|
3645
3645
|
return module;
|
|
3646
3646
|
}
|
|
@@ -3833,7 +3833,7 @@ function filterConfig(filter, configCwd, name) {
|
|
|
3833
3833
|
return toArray(filter).some((value) => name && name === value || cwd === value);
|
|
3834
3834
|
}
|
|
3835
3835
|
//#endregion
|
|
3836
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
3836
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/watch-CS1xCZMR.mjs
|
|
3837
3837
|
async function copy(options) {
|
|
3838
3838
|
if (!options.copy) return;
|
|
3839
3839
|
const resolved = await resolveCopyEntries(options);
|
|
@@ -4213,7 +4213,7 @@ var Hookable = class {
|
|
|
4213
4213
|
}
|
|
4214
4214
|
};
|
|
4215
4215
|
//#endregion
|
|
4216
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
4216
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/build-CoLhkNXE.mjs
|
|
4217
4217
|
const __cjs_require = createRequire(import.meta.url);
|
|
4218
4218
|
const satisfies = __cjs_require("./npm_entry_semver_functions_satisfies.cjs");
|
|
4219
4219
|
const coerce = __cjs_require("./npm_entry_semver_functions_coerce.cjs");
|
|
@@ -4506,7 +4506,7 @@ async function bundleDone(bundleByPkg, bundle) {
|
|
|
4506
4506
|
async function packTarball(packageJsonPath) {
|
|
4507
4507
|
const pkgDir = path.dirname(packageJsonPath);
|
|
4508
4508
|
const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
|
|
4509
|
-
const { detect } = await import("./detect-DN3DXXYt-
|
|
4509
|
+
const { detect } = await import("./detect-DN3DXXYt-CCqla4Th.js");
|
|
4510
4510
|
try {
|
|
4511
4511
|
const detected = await detect({ cwd: pkgDir });
|
|
4512
4512
|
if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
|
|
@@ -4642,7 +4642,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
|
|
|
4642
4642
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
4643
4643
|
if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepPlugin(config, bundle));
|
|
4644
4644
|
if (dts) {
|
|
4645
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
4645
|
+
const { dts: dtsPlugin } = await import("./dist-dJp148cE.js");
|
|
4646
4646
|
const options = {
|
|
4647
4647
|
tsconfig,
|
|
4648
4648
|
...dts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as resolveComma, E as toArray } from "./main-
|
|
1
|
+
import { C as resolveComma, E as toArray } from "./main-Dru8oclH.js";
|
|
2
2
|
import { n as enable, r as namespaces, t as createDebug } from "./node-B3Gdtau1.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
3
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/debug-C4FmgzkJ.mjs
|
|
4
4
|
const debugLog = createDebug("tsdown:debug");
|
|
5
5
|
function enableDebug(debug) {
|
|
6
6
|
if (!debug) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process from "node:process";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
4
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/detect-DN3DXXYt.mjs
|
|
5
5
|
const AGENTS = [
|
|
6
6
|
"npm",
|
|
7
7
|
"yarn",
|
|
@@ -5,7 +5,7 @@ import "node:child_process";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { rolldown } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
|
-
import
|
|
8
|
+
import fs, { existsSync } from "node:fs";
|
|
9
9
|
import { Buffer } from "node:buffer";
|
|
10
10
|
import crypto from "node:crypto";
|
|
11
11
|
//#region ../../node_modules/.pnpm/unrun@0.2.32/node_modules/unrun/dist/src-GU5PtktT.mjs
|
|
@@ -54,7 +54,7 @@ function resolveOptions(options = {}) {
|
|
|
54
54
|
inputOptions: options.inputOptions,
|
|
55
55
|
outputOptions: options.outputOptions
|
|
56
56
|
};
|
|
57
|
-
if (!
|
|
57
|
+
if (!fs.existsSync(resolvedOptions.path)) throw new Error(`[unrun] File not found: ${resolvedOptions.path}`);
|
|
58
58
|
if (!new Set([
|
|
59
59
|
"none",
|
|
60
60
|
"jiti",
|
|
@@ -268,7 +268,7 @@ function createJsonLoader() {
|
|
|
268
268
|
let isRequire = false;
|
|
269
269
|
try {
|
|
270
270
|
if (importer) {
|
|
271
|
-
const src =
|
|
271
|
+
const src = fs.readFileSync(importer, "utf8");
|
|
272
272
|
const escaped = source.replaceAll(/[.*+?^${}()|[\]\\]/g, (m) => `\\${m}`);
|
|
273
273
|
const pattern = String.raw`\brequire\s*\(\s*['"]${escaped}['"]\s*\)`;
|
|
274
274
|
isRequire = new RegExp(pattern).test(src);
|
|
@@ -281,7 +281,7 @@ function createJsonLoader() {
|
|
|
281
281
|
handler(id) {
|
|
282
282
|
try {
|
|
283
283
|
const realId = id.replace(/\?unrun-json\.(?:mjs|cjs)$/, "");
|
|
284
|
-
const src =
|
|
284
|
+
const src = fs.readFileSync(realId, "utf8");
|
|
285
285
|
const data = JSON.parse(src);
|
|
286
286
|
const jsonLiteral = JSON.stringify(data);
|
|
287
287
|
if (id.endsWith("?unrun-json.cjs")) return { code: `const __data = ${jsonLiteral}\ntry { Object.defineProperty(__data, 'default', { value: __data, enumerable: false, configurable: true }) } catch {}\nmodule.exports = __data\n` };
|
|
@@ -375,7 +375,7 @@ function createRequireResolveFix(options) {
|
|
|
375
375
|
".cjs"
|
|
376
376
|
]) {
|
|
377
377
|
const testPath = path.resolve(baseDir, id + ext);
|
|
378
|
-
if (
|
|
378
|
+
if (fs.existsSync(testPath)) return JSON.stringify(testPath);
|
|
379
379
|
}
|
|
380
380
|
const resolvedPath = path.resolve(baseDir, id);
|
|
381
381
|
return JSON.stringify(resolvedPath);
|
|
@@ -416,7 +416,7 @@ function createSourceContextShimsPlugin() {
|
|
|
416
416
|
const normalizedPhysicalId = path.normalize(physicalId);
|
|
417
417
|
let code;
|
|
418
418
|
try {
|
|
419
|
-
code =
|
|
419
|
+
code = fs.readFileSync(normalizedPhysicalId, "utf8");
|
|
420
420
|
} catch {
|
|
421
421
|
return null;
|
|
422
422
|
}
|
|
@@ -658,7 +658,7 @@ function cleanModule(moduleUrl, options) {
|
|
|
658
658
|
try {
|
|
659
659
|
if (moduleUrl.startsWith("file://")) {
|
|
660
660
|
const filePath = new URL(moduleUrl);
|
|
661
|
-
|
|
661
|
+
fs.unlinkSync(filePath);
|
|
662
662
|
}
|
|
663
663
|
} catch (error) {
|
|
664
664
|
if (error.code !== "ENOENT") throw error;
|
|
@@ -682,14 +682,14 @@ function writeModule(code, options) {
|
|
|
682
682
|
const projectNodeModules = path.join(process.cwd(), "node_modules");
|
|
683
683
|
const outDir = path.join(projectNodeModules, ".unrun");
|
|
684
684
|
const outFile = path.join(outDir, fname);
|
|
685
|
-
if (!
|
|
686
|
-
|
|
687
|
-
|
|
685
|
+
if (!fs.existsSync(outFile)) try {
|
|
686
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
687
|
+
fs.writeFileSync(outFile, code, "utf8");
|
|
688
688
|
} catch {
|
|
689
689
|
const fallbackDir = path.join(tmpdir(), "unrun-cache");
|
|
690
690
|
const fallbackFile = path.join(fallbackDir, fname);
|
|
691
|
-
|
|
692
|
-
|
|
691
|
+
fs.mkdirSync(fallbackDir, { recursive: true });
|
|
692
|
+
fs.writeFileSync(fallbackFile, code, "utf8");
|
|
693
693
|
moduleUrl = pathToFileURL(fallbackFile).href;
|
|
694
694
|
}
|
|
695
695
|
moduleUrl = moduleUrl || pathToFileURL(outFile).href;
|
|
@@ -11,7 +11,7 @@ import { importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filte
|
|
|
11
11
|
import nativeFs from "fs";
|
|
12
12
|
import path$1 from "path";
|
|
13
13
|
import { tmpdir } from "node:os";
|
|
14
|
-
import
|
|
14
|
+
import fs$1, { existsSync } from "node:fs";
|
|
15
15
|
import { ResolverFactory, isolatedDeclarationSync } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
16
16
|
import Be from "os";
|
|
17
17
|
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
@@ -30356,11 +30356,11 @@ function h(e) {
|
|
|
30356
30356
|
}
|
|
30357
30357
|
i(h, "slash");
|
|
30358
30358
|
const Z = i((e) => {
|
|
30359
|
-
const t =
|
|
30359
|
+
const t = fs$1[e];
|
|
30360
30360
|
return (s, ...n) => {
|
|
30361
30361
|
const o = `${e}:${n.join(":")}`;
|
|
30362
30362
|
let l = s == null ? void 0 : s.get(o);
|
|
30363
|
-
return l === void 0 && (l = Reflect.apply(t,
|
|
30363
|
+
return l === void 0 && (l = Reflect.apply(t, fs$1, n), s?.set(o, l)), l;
|
|
30364
30364
|
};
|
|
30365
30365
|
}, "cacheFs"), E = Z("existsSync"), $e = Z("readFileSync"), G = Z("statSync"), fe = i((e, t, s) => {
|
|
30366
30366
|
for (;;) {
|
|
@@ -2,7 +2,7 @@ import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
|
2
2
|
import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
3
3
|
import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
4
4
|
|
|
5
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
5
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/logger-DtCm1ySP.d.mts
|
|
6
6
|
//#region src/utils/types.d.ts
|
|
7
7
|
type Overwrite<T, U> = Omit<T, keyof U> & U;
|
|
8
8
|
type Awaitable<T> = T | Promise<T>;
|
|
@@ -9557,7 +9557,7 @@ interface TsgoOptions {
|
|
|
9557
9557
|
path?: string;
|
|
9558
9558
|
}
|
|
9559
9559
|
//#endregion
|
|
9560
|
-
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.
|
|
9560
|
+
//#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.8_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
|
|
9561
9561
|
//#region src/node/cli-commands.d.ts
|
|
9562
9562
|
interface StartOptions {
|
|
9563
9563
|
root?: string;
|
|
@@ -9708,7 +9708,7 @@ interface Options$1 {
|
|
|
9708
9708
|
depKinds?: Array<DepKind>;
|
|
9709
9709
|
}
|
|
9710
9710
|
//#endregion
|
|
9711
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
9711
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/types-D2Jnze_i.d.mts
|
|
9712
9712
|
//#region src/features/copy.d.ts
|
|
9713
9713
|
interface CopyEntry {
|
|
9714
9714
|
/**
|
|
@@ -10832,7 +10832,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
|
|
|
10832
10832
|
exe: false | ExeOptions;
|
|
10833
10833
|
}>; //#endregion
|
|
10834
10834
|
//#endregion
|
|
10835
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
10835
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/config-D9p_BCF3.d.mts
|
|
10836
10836
|
//#region src/config/options.d.ts
|
|
10837
10837
|
/**
|
|
10838
10838
|
* Resolve user config into resolved configs
|
|
@@ -10852,7 +10852,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
|
|
|
10852
10852
|
declare function defineConfig(options: UserConfigFn): UserConfigFn;
|
|
10853
10853
|
declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
|
|
10854
10854
|
//#endregion
|
|
10855
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
10855
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/index.d.mts
|
|
10856
10856
|
//#region src/build.d.ts
|
|
10857
10857
|
/**
|
|
10858
10858
|
* Build with tsdown.
|
package/dist/tsdown/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { c as globalLogger } from "./main-
|
|
2
|
-
import "./
|
|
3
|
-
import { t as
|
|
4
|
-
import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-CoLhkNXE-CdsPtxD4.js";
|
|
5
|
-
import "./filename-UU7z2A9Z.js";
|
|
1
|
+
import { c as globalLogger } from "./main-Dru8oclH.js";
|
|
2
|
+
import { t as enableDebug } from "./debug-C4FmgzkJ-GjwR9kY5.js";
|
|
3
|
+
import { i as resolveUserConfig, n as buildWithConfigs, r as mergeConfig, t as build$1 } from "./build-CoLhkNXE-CmOD7RnO.js";
|
|
6
4
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
7
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
5
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/config.mjs
|
|
8
6
|
function defineConfig(options) {
|
|
9
7
|
return options;
|
|
10
8
|
}
|
|
@@ -172,7 +172,7 @@ const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible,
|
|
|
172
172
|
module.exports = w, w.default = w;
|
|
173
173
|
})))(), 1)).default;
|
|
174
174
|
//#endregion
|
|
175
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
175
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/logger-BU0v7CAk.mjs
|
|
176
176
|
const LogLevels = {
|
|
177
177
|
silent: 0,
|
|
178
178
|
error: 1,
|
|
@@ -296,7 +296,7 @@ function hue2rgb(p, q, t) {
|
|
|
296
296
|
return p;
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
|
-
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@
|
|
299
|
+
//#region ../../node_modules/.pnpm/tsdown@0.21.4_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.4_@tsdown+exe@0.21.4_@type_f89d4c09e9f883d0adc3183e466a60b8/node_modules/tsdown/dist/package-BV2VRL7Z.mjs
|
|
300
300
|
var version = "0.21.4";
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region ../../node_modules/.pnpm/tinyexec@1.0.4/node_modules/tinyexec/dist/main.mjs
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
const require_chunk = require("./npm_cjs_chunk_chunk.cjs");
|
|
2
|
-
require("./npm_cjs_chunk_semver.cjs");
|
|
3
|
-
require("./npm_cjs_chunk_lt.cjs");
|
|
4
2
|
const require_range$1 = require("./npm_cjs_chunk_range.cjs");
|
|
5
3
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/satisfies.js
|
|
6
4
|
var require_satisfies = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./npm_cjs_chunk_chunk.cjs");
|
|
2
2
|
const require_semver$1 = require("./npm_cjs_chunk_semver.cjs");
|
|
3
|
-
require("./npm_cjs_chunk_lt.cjs");
|
|
4
3
|
const require_range$1 = require("./npm_cjs_chunk_range.cjs");
|
|
5
4
|
//#region ../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/ranges/min-version.js
|
|
6
5
|
var require_min_version = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
package/dist/tsdown/run.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as globalLogger, f as dim, g as yellow, r as version, t as R } from "./main-
|
|
3
|
-
import "./
|
|
4
|
-
import { t as enableDebug } from "./debug-C4FmgzkJ-BxvFHEjv.js";
|
|
2
|
+
import { c as globalLogger, f as dim, g as yellow, r as version, t as R } from "./main-Dru8oclH.js";
|
|
3
|
+
import { t as enableDebug } from "./debug-C4FmgzkJ-GjwR9kY5.js";
|
|
5
4
|
import module, { createRequire } from "node:module";
|
|
6
5
|
import process$1 from "node:process";
|
|
7
6
|
import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
@@ -631,7 +630,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
631
630
|
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
|
|
632
631
|
globalLogger.level = flags.logLevel || "info";
|
|
633
632
|
globalLogger.info(`tsdown ${dim`v${version}`} powered by rolldown ${dim`v${VERSION}`}`);
|
|
634
|
-
const { build } = await import("./build-dhDyu66J-
|
|
633
|
+
const { build } = await import("./build-dhDyu66J-C6Nd9qmR.js");
|
|
635
634
|
if (input.length > 0) flags.entry = input;
|
|
636
635
|
await build(flags);
|
|
637
636
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@vite/env";
|
|
2
|
-
//#region \0@oxc-project+runtime@0.
|
|
2
|
+
//#region \0@oxc-project+runtime@0.121.0/helpers/typeof.js
|
|
3
3
|
function _typeof(o) {
|
|
4
4
|
"@babel/helpers - typeof";
|
|
5
5
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -9,7 +9,7 @@ function _typeof(o) {
|
|
|
9
9
|
}, _typeof(o);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
//#region \0@oxc-project+runtime@0.
|
|
12
|
+
//#region \0@oxc-project+runtime@0.121.0/helpers/toPrimitive.js
|
|
13
13
|
function toPrimitive(t, r) {
|
|
14
14
|
if ("object" != _typeof(t) || !t) return t;
|
|
15
15
|
var e = t[Symbol.toPrimitive];
|
|
@@ -21,13 +21,13 @@ function toPrimitive(t, r) {
|
|
|
21
21
|
return ("string" === r ? String : Number)(t);
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
|
-
//#region \0@oxc-project+runtime@0.
|
|
24
|
+
//#region \0@oxc-project+runtime@0.121.0/helpers/toPropertyKey.js
|
|
25
25
|
function toPropertyKey(t) {
|
|
26
26
|
var i = toPrimitive(t, "string");
|
|
27
27
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
|
-
//#region \0@oxc-project+runtime@0.
|
|
30
|
+
//#region \0@oxc-project+runtime@0.121.0/helpers/defineProperty.js
|
|
31
31
|
function _defineProperty(e, r, t) {
|
|
32
32
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
33
33
|
value: t,
|
|
@@ -72,7 +72,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
72
72
|
}));
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region ../../vite/packages/vite/package.json
|
|
75
|
-
var version = "8.0.
|
|
75
|
+
var version = "8.0.2";
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region ../../vite/packages/vite/src/node/constants.ts
|
|
78
78
|
const ROLLUP_HOOKS = [
|