@voidzero-dev/vite-plus-core 0.0.0-26b2cbb0.20260207-0932 → 0.0.0-3262bda4.20260210-0221
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/tsdown/{build-l5WhXg4M-BBPqZr0m.js → build-l5WhXg4M-D7xhqTAn.js} +43 -43
- package/dist/tsdown/{dist-dc0X0G6b.js → dist-B9TjyoVV.js} +12 -12
- package/dist/tsdown/{dist-BVMGwPdF.js → dist-CBQAM1Tn.js} +3 -3
- package/dist/tsdown/index.js +1 -1
- package/dist/tsdown/run.js +1 -1
- package/package.json +3 -3
|
@@ -15,7 +15,7 @@ import * as nativeFs$1 from "fs";
|
|
|
15
15
|
import nativeFs from "fs";
|
|
16
16
|
import path$1, { basename, dirname as dirname$1, normalize as normalize$1, posix, relative, resolve as resolve$1, sep } from "path";
|
|
17
17
|
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
18
|
-
import
|
|
18
|
+
import le, { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { and, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
20
20
|
import { Buffer } from "node:buffer";
|
|
21
21
|
import { brotliCompress, gzip } from "node:zlib";
|
|
@@ -2809,138 +2809,138 @@ const quansync = quansync$1;
|
|
|
2809
2809
|
* @link https://nodejs.org/api/fs.html#fspromisesreadfilepath-options
|
|
2810
2810
|
*/
|
|
2811
2811
|
const readFile$1 = quansync$1({
|
|
2812
|
-
sync:
|
|
2813
|
-
async:
|
|
2812
|
+
sync: le.readFileSync,
|
|
2813
|
+
async: le.promises.readFile
|
|
2814
2814
|
});
|
|
2815
2815
|
/**
|
|
2816
2816
|
* @link https://nodejs.org/api/fs.html#fspromiseswritefilefile-data-options
|
|
2817
2817
|
*/
|
|
2818
2818
|
const writeFile$1 = quansync$1({
|
|
2819
|
-
sync:
|
|
2820
|
-
async:
|
|
2819
|
+
sync: le.writeFileSync,
|
|
2820
|
+
async: le.promises.writeFile
|
|
2821
2821
|
});
|
|
2822
2822
|
/**
|
|
2823
2823
|
* @link https://nodejs.org/api/fs.html#fspromisesunlinkpath
|
|
2824
2824
|
*/
|
|
2825
2825
|
const unlink = quansync$1({
|
|
2826
|
-
sync:
|
|
2827
|
-
async:
|
|
2826
|
+
sync: le.unlinkSync,
|
|
2827
|
+
async: le.promises.unlink
|
|
2828
2828
|
});
|
|
2829
2829
|
/**
|
|
2830
2830
|
* @link https://nodejs.org/api/fs.html#fspromisesaccesspath-mode
|
|
2831
2831
|
*/
|
|
2832
2832
|
const access$1 = quansync$1({
|
|
2833
|
-
sync:
|
|
2834
|
-
async:
|
|
2833
|
+
sync: le.accessSync,
|
|
2834
|
+
async: le.promises.access
|
|
2835
2835
|
});
|
|
2836
2836
|
/**
|
|
2837
2837
|
* @link https://nodejs.org/api/fs.html#fspromisesstatpath-options
|
|
2838
2838
|
*/
|
|
2839
2839
|
const stat$1 = quansync$1({
|
|
2840
|
-
sync:
|
|
2841
|
-
async:
|
|
2840
|
+
sync: le.statSync,
|
|
2841
|
+
async: le.promises.stat
|
|
2842
2842
|
});
|
|
2843
2843
|
const lstat = quansync$1({
|
|
2844
|
-
sync:
|
|
2845
|
-
async:
|
|
2844
|
+
sync: le.lstatSync,
|
|
2845
|
+
async: le.promises.lstat
|
|
2846
2846
|
});
|
|
2847
2847
|
/**
|
|
2848
2848
|
* @link https://nodejs.org/api/fs.html#fspromisescpsrc-dest-options
|
|
2849
2849
|
*/
|
|
2850
2850
|
const cp$1 = quansync$1({
|
|
2851
|
-
sync:
|
|
2852
|
-
async:
|
|
2851
|
+
sync: le.copyFileSync,
|
|
2852
|
+
async: le.promises.copyFile
|
|
2853
2853
|
});
|
|
2854
2854
|
/**
|
|
2855
2855
|
* @link https://nodejs.org/api/fs.html#fspromisesrmpath-options
|
|
2856
2856
|
*/
|
|
2857
2857
|
const rm$1 = quansync$1({
|
|
2858
|
-
sync:
|
|
2859
|
-
async:
|
|
2858
|
+
sync: le.rmSync,
|
|
2859
|
+
async: le.promises.rm
|
|
2860
2860
|
});
|
|
2861
2861
|
/**
|
|
2862
2862
|
* @link https://nodejs.org/api/fs.html#fspromisesmkdirpath-options
|
|
2863
2863
|
*/
|
|
2864
2864
|
const mkdir = quansync$1({
|
|
2865
|
-
sync:
|
|
2866
|
-
async:
|
|
2865
|
+
sync: le.mkdirSync,
|
|
2866
|
+
async: le.promises.mkdir
|
|
2867
2867
|
});
|
|
2868
2868
|
/**
|
|
2869
2869
|
* @link https://nodejs.org/api/fs.html#fspromisesrenameoldpath-newpath
|
|
2870
2870
|
*/
|
|
2871
2871
|
const rename = quansync$1({
|
|
2872
|
-
sync:
|
|
2873
|
-
async:
|
|
2872
|
+
sync: le.renameSync,
|
|
2873
|
+
async: le.promises.rename
|
|
2874
2874
|
});
|
|
2875
2875
|
/**
|
|
2876
2876
|
* @link https://nodejs.org/api/fs.html#fspromisesreaddirpath-options
|
|
2877
2877
|
*/
|
|
2878
2878
|
const readdir = quansync$1({
|
|
2879
|
-
sync:
|
|
2880
|
-
async:
|
|
2879
|
+
sync: le.readdirSync,
|
|
2880
|
+
async: le.promises.readdir
|
|
2881
2881
|
});
|
|
2882
2882
|
/**
|
|
2883
2883
|
* @link https://nodejs.org/api/fs.html#fspromisesrealpathpath-options
|
|
2884
2884
|
*/
|
|
2885
2885
|
const realpath = quansync$1({
|
|
2886
|
-
sync:
|
|
2887
|
-
async:
|
|
2886
|
+
sync: le.realpathSync,
|
|
2887
|
+
async: le.promises.realpath
|
|
2888
2888
|
});
|
|
2889
2889
|
/**
|
|
2890
2890
|
* @link https://nodejs.org/api/fs.html#fspromisesreadlinkpath-options
|
|
2891
2891
|
*/
|
|
2892
2892
|
const readlink = quansync$1({
|
|
2893
|
-
sync:
|
|
2894
|
-
async:
|
|
2893
|
+
sync: le.readlinkSync,
|
|
2894
|
+
async: le.promises.readlink
|
|
2895
2895
|
});
|
|
2896
2896
|
/**
|
|
2897
2897
|
* @link https://nodejs.org/api/fs.html#fspromisessymlinktarget-path-type
|
|
2898
2898
|
*/
|
|
2899
2899
|
const symlink = quansync$1({
|
|
2900
|
-
sync:
|
|
2901
|
-
async:
|
|
2900
|
+
sync: le.symlinkSync,
|
|
2901
|
+
async: le.promises.symlink
|
|
2902
2902
|
});
|
|
2903
2903
|
/**
|
|
2904
2904
|
* @link https://nodejs.org/api/fs.html#fspromiseschownpath-uid-gid
|
|
2905
2905
|
*/
|
|
2906
2906
|
const chown = quansync$1({
|
|
2907
|
-
sync:
|
|
2908
|
-
async:
|
|
2907
|
+
sync: le.chownSync,
|
|
2908
|
+
async: le.promises.chown
|
|
2909
2909
|
});
|
|
2910
2910
|
/**
|
|
2911
2911
|
* @link https://nodejs.org/api/fs.html#fspromiseslchownpath-uid-gid
|
|
2912
2912
|
*/
|
|
2913
2913
|
const lchown = quansync$1({
|
|
2914
|
-
sync:
|
|
2915
|
-
async:
|
|
2914
|
+
sync: le.lchownSync,
|
|
2915
|
+
async: le.promises.lchown
|
|
2916
2916
|
});
|
|
2917
2917
|
/**
|
|
2918
2918
|
* @link https://nodejs.org/api/fs.html#fspromiseschmodpath-mode
|
|
2919
2919
|
*/
|
|
2920
2920
|
const chmod$1 = quansync$1({
|
|
2921
|
-
sync:
|
|
2922
|
-
async:
|
|
2921
|
+
sync: le.chmodSync,
|
|
2922
|
+
async: le.promises.chmod
|
|
2923
2923
|
});
|
|
2924
2924
|
/**
|
|
2925
2925
|
* @link https://nodejs.org/api/fs.html#fspromisesutimespath-atime-mtime
|
|
2926
2926
|
*/
|
|
2927
2927
|
const utimes = quansync$1({
|
|
2928
|
-
sync:
|
|
2929
|
-
async:
|
|
2928
|
+
sync: le.utimesSync,
|
|
2929
|
+
async: le.promises.utimes
|
|
2930
2930
|
});
|
|
2931
2931
|
/**
|
|
2932
2932
|
* @link https://nodejs.org/api/fs.html#fspromiseslutimespath-atime-mtime
|
|
2933
2933
|
*/
|
|
2934
2934
|
const lutimes = quansync$1({
|
|
2935
|
-
sync:
|
|
2936
|
-
async:
|
|
2935
|
+
sync: le.lutimesSync,
|
|
2936
|
+
async: le.promises.lutimes
|
|
2937
2937
|
});
|
|
2938
2938
|
/**
|
|
2939
2939
|
* @link https://nodejs.org/api/fs.html#fspromisesmkdtempprefix-options
|
|
2940
2940
|
*/
|
|
2941
2941
|
const mkdtemp$1 = quansync$1({
|
|
2942
|
-
sync:
|
|
2943
|
-
async:
|
|
2942
|
+
sync: le.mkdtempSync,
|
|
2943
|
+
async: le.promises.mkdtemp
|
|
2944
2944
|
});
|
|
2945
2945
|
|
|
2946
2946
|
//#endregion
|
|
@@ -3474,7 +3474,7 @@ async function nativeImport(id) {
|
|
|
3474
3474
|
return mod.default || mod;
|
|
3475
3475
|
}
|
|
3476
3476
|
async function unrunImport(id) {
|
|
3477
|
-
const { unrun } = await import("./dist-
|
|
3477
|
+
const { unrun } = await import("./dist-B9TjyoVV.js");
|
|
3478
3478
|
const { module } = await unrun({ path: pathToFileURL(id).href });
|
|
3479
3479
|
return module;
|
|
3480
3480
|
}
|
|
@@ -4618,7 +4618,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
|
|
|
4618
4618
|
if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
|
|
4619
4619
|
if (config.pkg || config.skipNodeModulesBundle) plugins.push(DepPlugin(config));
|
|
4620
4620
|
if (dts) {
|
|
4621
|
-
const { dts: dtsPlugin } = await import("./dist-
|
|
4621
|
+
const { dts: dtsPlugin } = await import("./dist-CBQAM1Tn.js");
|
|
4622
4622
|
const options = {
|
|
4623
4623
|
tsconfig,
|
|
4624
4624
|
...dts
|
|
@@ -4,7 +4,7 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
4
4
|
import { rolldown } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import le, { existsSync } from "node:fs";
|
|
8
8
|
import { Buffer } from "node:buffer";
|
|
9
9
|
import { tmpdir } from "node:os";
|
|
10
10
|
import crypto from "node:crypto";
|
|
@@ -56,7 +56,7 @@ function resolveOptions(options = {}) {
|
|
|
56
56
|
inputOptions: options.inputOptions,
|
|
57
57
|
outputOptions: options.outputOptions
|
|
58
58
|
};
|
|
59
|
-
if (!
|
|
59
|
+
if (!le.existsSync(resolvedOptions.path)) throw new Error(`[unrun] File not found: ${resolvedOptions.path}`);
|
|
60
60
|
if (!new Set([
|
|
61
61
|
"none",
|
|
62
62
|
"jiti",
|
|
@@ -270,7 +270,7 @@ function createJsonLoader() {
|
|
|
270
270
|
let isRequire = false;
|
|
271
271
|
try {
|
|
272
272
|
if (importer) {
|
|
273
|
-
const src =
|
|
273
|
+
const src = le.readFileSync(importer, "utf8");
|
|
274
274
|
const escaped = source.replaceAll(/[.*+?^${}()|[\]\\]/g, (m) => `\\${m}`);
|
|
275
275
|
const pattern = String.raw`\brequire\s*\(\s*['"]${escaped}['"]\s*\)`;
|
|
276
276
|
isRequire = new RegExp(pattern).test(src);
|
|
@@ -283,7 +283,7 @@ function createJsonLoader() {
|
|
|
283
283
|
handler(id) {
|
|
284
284
|
try {
|
|
285
285
|
const realId = id.replace(/\?unrun-json\.(?:mjs|cjs)$/, "");
|
|
286
|
-
const src =
|
|
286
|
+
const src = le.readFileSync(realId, "utf8");
|
|
287
287
|
const data = JSON.parse(src);
|
|
288
288
|
const jsonLiteral = JSON.stringify(data);
|
|
289
289
|
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` };
|
|
@@ -377,7 +377,7 @@ function createRequireResolveFix(options) {
|
|
|
377
377
|
".cjs"
|
|
378
378
|
]) {
|
|
379
379
|
const testPath = path.resolve(baseDir, id + ext);
|
|
380
|
-
if (
|
|
380
|
+
if (le.existsSync(testPath)) return JSON.stringify(testPath);
|
|
381
381
|
}
|
|
382
382
|
const resolvedPath = path.resolve(baseDir, id);
|
|
383
383
|
return JSON.stringify(resolvedPath);
|
|
@@ -418,7 +418,7 @@ function createSourceContextShimsPlugin() {
|
|
|
418
418
|
const normalizedPhysicalId = path.normalize(physicalId);
|
|
419
419
|
let code;
|
|
420
420
|
try {
|
|
421
|
-
code =
|
|
421
|
+
code = le.readFileSync(normalizedPhysicalId, "utf8");
|
|
422
422
|
} catch {
|
|
423
423
|
return null;
|
|
424
424
|
}
|
|
@@ -660,7 +660,7 @@ function cleanModule(moduleUrl, options) {
|
|
|
660
660
|
try {
|
|
661
661
|
if (moduleUrl.startsWith("file://")) {
|
|
662
662
|
const filePath = new URL(moduleUrl);
|
|
663
|
-
|
|
663
|
+
le.unlinkSync(filePath);
|
|
664
664
|
}
|
|
665
665
|
} catch (error) {
|
|
666
666
|
if (error.code !== "ENOENT") throw error;
|
|
@@ -684,14 +684,14 @@ function writeModule(code, options) {
|
|
|
684
684
|
const projectNodeModules = path.join(process.cwd(), "node_modules");
|
|
685
685
|
const outDir = path.join(projectNodeModules, ".unrun");
|
|
686
686
|
const outFile = path.join(outDir, fname);
|
|
687
|
-
if (!
|
|
688
|
-
|
|
689
|
-
|
|
687
|
+
if (!le.existsSync(outFile)) try {
|
|
688
|
+
le.mkdirSync(outDir, { recursive: true });
|
|
689
|
+
le.writeFileSync(outFile, code, "utf8");
|
|
690
690
|
} catch {
|
|
691
691
|
const fallbackDir = path.join(tmpdir(), "unrun-cache");
|
|
692
692
|
const fallbackFile = path.join(fallbackDir, fname);
|
|
693
|
-
|
|
694
|
-
|
|
693
|
+
le.mkdirSync(fallbackDir, { recursive: true });
|
|
694
|
+
le.writeFileSync(fallbackFile, code, "utf8");
|
|
695
695
|
moduleUrl = pathToFileURL(fallbackFile).href;
|
|
696
696
|
}
|
|
697
697
|
moduleUrl = moduleUrl || pathToFileURL(outFile).href;
|
|
@@ -7,7 +7,7 @@ import process$1 from "node:process";
|
|
|
7
7
|
import path, { dirname, extname } from "node:path";
|
|
8
8
|
import nativeFs from "fs";
|
|
9
9
|
import path$1 from "path";
|
|
10
|
-
import
|
|
10
|
+
import le from "node:fs";
|
|
11
11
|
import { importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
12
12
|
import { ResolverFactory, isolatedDeclarationSync } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
13
13
|
import he from "os";
|
|
@@ -30426,11 +30426,11 @@ function h(e) {
|
|
|
30426
30426
|
}
|
|
30427
30427
|
o(h, "slash");
|
|
30428
30428
|
const z = o((e) => {
|
|
30429
|
-
const t =
|
|
30429
|
+
const t = le[e];
|
|
30430
30430
|
return (s, ...n) => {
|
|
30431
30431
|
const l = `${e}:${n.join(":")}`;
|
|
30432
30432
|
let i = s == null ? void 0 : s.get(l);
|
|
30433
|
-
return i === void 0 && (i = Reflect.apply(t,
|
|
30433
|
+
return i === void 0 && (i = Reflect.apply(t, le, n), s?.set(l, i)), i;
|
|
30434
30434
|
};
|
|
30435
30435
|
}, "cacheFs"), I = z("existsSync"), Be = z("readFileSync"), R = z("statSync"), ie = o((e, t, s) => {
|
|
30436
30436
|
for (;;) {
|
package/dist/tsdown/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as globalLogger } from "./main-d9yZSQqW.js";
|
|
2
2
|
import "./node-Cb5OsnKg.js";
|
|
3
3
|
import { t as enableDebug } from "./debug-Cb_Nqpo4-BueIRvg1.js";
|
|
4
|
-
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-l5WhXg4M-
|
|
4
|
+
import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-l5WhXg4M-D7xhqTAn.js";
|
|
5
5
|
import "./filename-7rlgePeo.js";
|
|
6
6
|
import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
|
|
7
7
|
|
package/dist/tsdown/run.js
CHANGED
|
@@ -496,7 +496,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
496
496
|
}).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("--external <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("-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) => {
|
|
497
497
|
globalLogger.level = flags.logLevel || "info";
|
|
498
498
|
globalLogger.info(`tsdown ${dim`v${version}`} powered by rolldown ${dim`v${VERSION}`}`);
|
|
499
|
-
const { build } = await import("./build-l5WhXg4M-
|
|
499
|
+
const { build } = await import("./build-l5WhXg4M-D7xhqTAn.js").then((n) => n.r).then((n) => n.r);
|
|
500
500
|
if (input.length > 0) flags.entry = input;
|
|
501
501
|
await build(flags);
|
|
502
502
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voidzero-dev/vite-plus-core",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-3262bda4.20260210-0221",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"./dist/client/*": "./dist/vite/client/*",
|
|
31
31
|
"./internal": "./dist/vite/node/internal.js",
|
|
32
|
-
"./
|
|
32
|
+
"./pack": {
|
|
33
33
|
"types": "./dist/tsdown/index-types.d.ts",
|
|
34
34
|
"default": "./dist/tsdown/index.js"
|
|
35
35
|
},
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"tree-kill": "^1.2.2",
|
|
114
114
|
"tsdown": "^0.20.2",
|
|
115
115
|
"rolldown": "1.0.0-rc.3",
|
|
116
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-
|
|
116
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-3262bda4.20260210-0221"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"@arethetypeswrong/core": "^0.18.1",
|