@voidzero-dev/vite-plus-core 0.2.8 → 0.3.0
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/LICENSE +30 -1
- package/dist/rolldown/cli.mjs +14 -10
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +5 -5
- package/dist/rolldown/experimental-index.mjs +11 -9
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +2 -2
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- 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 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-CVtkJvyl.d.mts → binding-Bvw14S3g.d.mts} +70 -1
- package/dist/rolldown/shared/binding-C__LJDBG.mjs +675 -0
- package/dist/rolldown/shared/{bindingify-input-options-B03y7DfJ.mjs → bindingify-input-options-V9YvAjrr.mjs} +6 -10
- package/dist/rolldown/shared/{constructors-ALilxAii.d.mts → constructors-CRumnw21.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-COwFYQna.mjs → constructors-DklcHr18.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-B-tSTZRt.mjs → create-bundler-option-DbV2ud0B.mjs} +5 -4
- package/dist/rolldown/shared/{define-config-DSMNXceb.d.mts → define-config-DwTNhgWB.d.mts} +12 -10
- package/dist/rolldown/shared/{error-nLggAzpQ.mjs → error-NcRuXAVN.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-O4G7NVNA.mjs → load-config-Dd7jKGUy.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-Cj-DgIV1.mjs → normalize-string-or-regex-CFtim40S.mjs} +1 -1
- package/dist/rolldown/shared/{parse-CQfUbVuN.mjs → parse-rvxTD36n.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-CE3HNSOK.mjs → resolve-tsconfig-D2vSIIkR.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-qV_fUwyM.mjs → rolldown-Bblizyw1.mjs} +4 -4
- package/dist/rolldown/shared/{transform-WmU_cI8e.d.mts → transform--WSMLt1x.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-BNIsji74.mjs → watch-DPvOlccK.mjs} +5 -5
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +15 -13
- package/dist/tsdown/{build-D_enfyvD-X5SFXZZc.js → build-D_enfyvD-tOzhITac.js} +1076 -20
- package/dist/tsdown/{debug-CKcBYQLP-avlAPNcV.js → debug-CKcBYQLP-By_AQqN8.js} +3 -3
- package/dist/tsdown/{detect-DGhJGEqb-CGd2brAW.js → detect-DGhJGEqb-LL52mV6u.js} +1 -1
- package/dist/tsdown/{dist-BZO8q3c0.js → dist-BsS7BOcb.js} +5 -5
- package/dist/tsdown/index-types.d.ts +4 -4
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DSmmwu4u.js +3 -0
- package/dist/tsdown/{main-Jz_9T-KA.js → main-Bcv7jU2b.js} +210 -196
- package/dist/tsdown/npm_entry_picomatch.cjs +10 -6
- package/dist/tsdown/npm_entry_tree-kill.cjs +4 -2
- package/dist/tsdown/{resolver-cwLsPb2o-BqQjnCbF.js → resolver-cwLsPb2o-Bb9SDBm6.js} +2 -2
- package/dist/tsdown/run.js +6 -6
- package/dist/tsdown/{src-D5keKqGd.js → src-JVSpR8xt.js} +5 -5
- package/dist/tsdown/{target-Bab3CUeB-CERZYTwS.js → target-Bab3CUeB-8PBzMh3p.js} +5 -5
- package/dist/tsdown/{tsc-DmzrnJwy.js → tsc-B8FD48Oc.js} +3 -3
- package/dist/tsdown/tsdown-css.js +5 -5
- package/dist/tsdown/tsdown-exe.js +4 -4
- package/dist/vite/client/bundledDevClient.mjs +393 -27
- package/dist/vite/client/client.mjs +20 -14
- package/dist/vite/node/chunks/build.js +70 -64
- package/dist/vite/node/chunks/dist.js +36 -29
- package/dist/vite/node/chunks/dist2.js +193 -149
- package/dist/vite/node/chunks/node.js +1047 -875
- package/dist/vite/node/chunks/postcss-import.js +23 -25
- package/dist/vite/node/index.d.ts +63 -58
- package/dist/vite/node/module-runner.d.ts +13 -13
- package/dist/vite/node/module-runner.js +24 -19
- package/package.json +32 -26
- package/dist/rolldown/shared/binding-DwUQWZOo.mjs +0 -662
- package/dist/tsdown/dist-CMKwGGNp.js +0 -1059
- package/dist/tsdown/internal-DyaNxVWW.js +0 -3
package/dist/tsdown/run.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as blue, f as hex,
|
|
3
|
-
import { c as globalLogger, n as version, t as enableDebug } from "./debug-CKcBYQLP-
|
|
2
|
+
import { c as blue, f as hex, n as x } from "./main-Bcv7jU2b.js";
|
|
3
|
+
import { c as globalLogger, n as version, t as enableDebug } from "./debug-CKcBYQLP-By_AQqN8.js";
|
|
4
4
|
import module from "node:module";
|
|
5
5
|
import process$1 from "node:process";
|
|
6
6
|
import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
@@ -622,7 +622,7 @@ var CAC = class extends EventTarget {
|
|
|
622
622
|
*/
|
|
623
623
|
const cac = (name = "") => new CAC(name);
|
|
624
624
|
//#endregion
|
|
625
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@
|
|
625
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_4084c24f9f44f250d2b604ebc16f10f3/node_modules/tsdown/dist/run.mjs
|
|
626
626
|
const cli = cac("tsdown");
|
|
627
627
|
cli.help().version(version);
|
|
628
628
|
cli.command("[...files]", "Bundle files", {
|
|
@@ -631,13 +631,13 @@ cli.command("[...files]", "Bundle files", {
|
|
|
631
631
|
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, 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("--concurrency <count>", "Maximum number of Rolldown builds to run in parallel").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
|
|
632
632
|
globalLogger.level = flags.logLevel || "info";
|
|
633
633
|
globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
|
|
634
|
-
const { build } = await import("./build-D_enfyvD-
|
|
634
|
+
const { build } = await import("./build-D_enfyvD-tOzhITac.js").then((n) => n.r).then((n) => n.r);
|
|
635
635
|
if (input.length > 0) flags.entry = input;
|
|
636
636
|
await build(flags);
|
|
637
637
|
});
|
|
638
638
|
cli.command("create", "[deprecated] Create a tsdown project. Use \"npx create-tsdown\" instead.", { allowUnknownOptions: true }).action(async () => {
|
|
639
639
|
globalLogger.warn(`"tsdown create" is deprecated. Please use "npx create-tsdown" instead.`);
|
|
640
|
-
const { exitCode } = await
|
|
640
|
+
const { exitCode } = await x("npx", [
|
|
641
641
|
"-y",
|
|
642
642
|
"create-tsdown@latest",
|
|
643
643
|
...process$1.argv.slice(3)
|
|
@@ -646,7 +646,7 @@ cli.command("create", "[deprecated] Create a tsdown project. Use \"npx create-ts
|
|
|
646
646
|
});
|
|
647
647
|
cli.command("migrate", "[deprecated] Migrate from tsup to tsdown. Use \"npx tsdown-migrate\" instead.", { allowUnknownOptions: true }).action(async () => {
|
|
648
648
|
globalLogger.warn(`"tsdown migrate" is deprecated. Please use "npx tsdown-migrate" instead.`);
|
|
649
|
-
const { exitCode } = await
|
|
649
|
+
const { exitCode } = await x("npx", [
|
|
650
650
|
"-y",
|
|
651
651
|
"tsdown-migrate@latest",
|
|
652
652
|
...process$1.argv.slice(3)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as __commonJSMin, k as __require } from "./main-
|
|
1
|
+
import { D as __commonJSMin, k as __require } from "./main-Bcv7jU2b.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js
|
|
3
3
|
var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
4
|
const path = __require("path");
|
|
@@ -345,7 +345,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
345
345
|
};
|
|
346
346
|
}));
|
|
347
347
|
//#endregion
|
|
348
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
348
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
|
|
349
349
|
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
350
350
|
const { createRequire } = __require("node:module");
|
|
351
351
|
const { pathToFileURL } = __require("node:url");
|
|
@@ -387,7 +387,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
387
387
|
module.exports = req;
|
|
388
388
|
}));
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
390
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
|
|
391
391
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
392
392
|
const req = require_req();
|
|
393
393
|
/**
|
|
@@ -421,7 +421,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
421
421
|
module.exports = options;
|
|
422
422
|
}));
|
|
423
423
|
//#endregion
|
|
424
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
424
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
|
|
425
425
|
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
426
426
|
const req = require_req();
|
|
427
427
|
/**
|
|
@@ -475,7 +475,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
475
475
|
module.exports = plugins;
|
|
476
476
|
}));
|
|
477
477
|
//#endregion
|
|
478
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.
|
|
478
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
|
|
479
479
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
480
480
|
const { resolve } = __require("node:path");
|
|
481
481
|
const config = require_src$1();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { C as resolveComma, E as toArray, l as bold,
|
|
1
|
+
import { C as resolveComma, E as toArray, l as bold, n as x, p as red, r as createDebug, u as dim, y as importWithError } from "./main-Bcv7jU2b.js";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
5
5
|
import { access, cp, mkdir, mkdtemp, rm, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import { exactRegex } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@
|
|
8
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_4084c24f9f44f250d2b604ebc16f10f3/node_modules/tsdown/dist/format-DLxyxnif.mjs
|
|
9
9
|
function fsExists(path) {
|
|
10
10
|
return access(path).then(() => true, () => false);
|
|
11
11
|
}
|
|
@@ -453,7 +453,7 @@ function coerce(value, options = {}) {
|
|
|
453
453
|
return parsed ? formatFullVersion(parsed) : null;
|
|
454
454
|
}
|
|
455
455
|
//#endregion
|
|
456
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@
|
|
456
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.14_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.14_@tsdown+exe@0.22.14_@t_4084c24f9f44f250d2b604ebc16f10f3/node_modules/tsdown/dist/target-Bab3CUeB.mjs
|
|
457
457
|
const NODE_SEA_MIN_VERSION = "25.7.0";
|
|
458
458
|
const NODE_SEA_MIN_VERSION_PARSED = {
|
|
459
459
|
major: 25,
|
|
@@ -515,7 +515,7 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
|
|
|
515
515
|
await writeFile(seaConfigPath, JSON.stringify(seaConfig));
|
|
516
516
|
debug("Wrote sea-config.json: %O -> %s", seaConfig, seaConfigPath);
|
|
517
517
|
debug("Running: %s --build-sea %s", process.execPath, seaConfigPath);
|
|
518
|
-
await
|
|
518
|
+
await x(process.execPath, ["--build-sea", seaConfigPath], {
|
|
519
519
|
nodeOptions: { stdio: [
|
|
520
520
|
"ignore",
|
|
521
521
|
"ignore",
|
|
@@ -529,7 +529,7 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
|
|
|
529
529
|
else await fsRemove(tempDir);
|
|
530
530
|
}
|
|
531
531
|
if ((target?.platform || process.platform) === "darwin") try {
|
|
532
|
-
await
|
|
532
|
+
await x("codesign", [
|
|
533
533
|
"--sign",
|
|
534
534
|
"-",
|
|
535
535
|
outputPath
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as createDebug } from "./main-
|
|
2
|
-
import { h as RE_DTS_MAP, m as RE_DTS } from "./target-Bab3CUeB-
|
|
3
|
-
import { n as globalContext, t as requireTS } from "./dist-
|
|
1
|
+
import { r as createDebug } from "./main-Bcv7jU2b.js";
|
|
2
|
+
import { h as RE_DTS_MAP, m as RE_DTS } from "./target-Bab3CUeB-8PBzMh3p.js";
|
|
3
|
+
import { n as globalContext, t as requireTS } from "./dist-BsS7BOcb.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.27.13_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolve_19173df252fb1b72b750fe1e656588b8/node_modules/rolldown-plugin-dts/dist/tsc-KtFHcISk.mjs
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as __toESM, C as resolveComma, E as toArray, y as importWithError } from "./main-
|
|
2
|
-
import { i as expandBaselineTarget } from "./target-Bab3CUeB-
|
|
3
|
-
import "./internal-
|
|
1
|
+
import { A as __toESM, C as resolveComma, E as toArray, y as importWithError } from "./main-Bcv7jU2b.js";
|
|
2
|
+
import { i as expandBaselineTarget } from "./target-Bab3CUeB-8PBzMh3p.js";
|
|
3
|
+
import "./internal-DSmmwu4u.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
7
7
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
8
|
import { ResolverFactory } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
9
|
-
//#region ../../node_modules/.pnpm/@tsdown+css@0.22.14_jiti@2.7.0_postcss-import@16.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@tsdown+css@0.22.14_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.26__postcss@8.5.26_sas_b5ecbe85e36c638c226bc310ff1da39e/node_modules/@tsdown/css/dist/index.mjs
|
|
10
10
|
const defaultCssBundleName = "style.css";
|
|
11
11
|
function resolveCssOptions(options = {}, topLevelTarget, unbundle) {
|
|
12
12
|
let cssTarget;
|
|
@@ -604,7 +604,7 @@ async function loadFileConfig(searchPath) {
|
|
|
604
604
|
if (cached !== void 0) return cached;
|
|
605
605
|
const promise = (async () => {
|
|
606
606
|
try {
|
|
607
|
-
const postcssrc = (await import("./src-
|
|
607
|
+
const postcssrc = (await import("./src-JVSpR8xt.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).default;
|
|
608
608
|
const result = await postcssrc({}, searchPath);
|
|
609
609
|
return {
|
|
610
610
|
options: result.options,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { O as fsExists, c as isGreaterOrEqual, f as tryParse, k as fsRemove, l as normalize$1, n as NODE_SEA_MIN_VERSION_PARSED, t as NODE_SEA_MIN_VERSION } from "./target-Bab3CUeB-
|
|
3
|
-
import "./internal-
|
|
1
|
+
import { n as x, r as createDebug } from "./main-Bcv7jU2b.js";
|
|
2
|
+
import { O as fsExists, c as isGreaterOrEqual, f as tryParse, k as fsRemove, l as normalize$1, n as NODE_SEA_MIN_VERSION_PARSED, t as NODE_SEA_MIN_VERSION } from "./target-Bab3CUeB-8PBzMh3p.js";
|
|
3
|
+
import "./internal-DSmmwu4u.js";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pipeline } from "node:stream/promises";
|
|
@@ -149,7 +149,7 @@ async function extractBinary(archivePath, targetBinaryPath, target) {
|
|
|
149
149
|
debug("Extracting %s from archive to %s", binaryInArchive, outDir);
|
|
150
150
|
const { command, args } = getExtractCommand(archivePath, outDir, binaryInArchive, target);
|
|
151
151
|
try {
|
|
152
|
-
await
|
|
152
|
+
await x(command, args, {
|
|
153
153
|
nodeOptions: { stdio: "inherit" },
|
|
154
154
|
throwOnError: true,
|
|
155
155
|
nodePath: false
|