@voidzero-dev/vite-plus-core 0.1.7 → 0.1.9

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.
Files changed (45) hide show
  1. package/dist/rolldown/cli.mjs +27 -11
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +8 -8
  4. package/dist/rolldown/experimental-index.d.mts +2 -2
  5. package/dist/rolldown/experimental-index.mjs +8 -8
  6. package/dist/rolldown/filter-index.d.mts +1 -1
  7. package/dist/rolldown/index.d.mts +3 -3
  8. package/dist/rolldown/index.mjs +9 -10
  9. package/dist/rolldown/parallel-plugin-worker.mjs +5 -5
  10. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  11. package/dist/rolldown/parse-ast-index.mjs +2 -2
  12. package/dist/rolldown/plugins-index.d.mts +2 -2
  13. package/dist/rolldown/plugins-index.mjs +3 -3
  14. package/dist/rolldown/shared/{bindingify-input-options-DkwIzK4F.mjs → bindingify-input-options-D6u7COm1.mjs} +18 -10
  15. package/dist/rolldown/shared/{constructors-D91FHkmz.mjs → constructors-Ctal_Rbv.mjs} +1 -1
  16. package/dist/rolldown/shared/{constructors-Bnr_ApVf.d.mts → constructors-DNuo4d0H.d.mts} +1 -1
  17. package/dist/rolldown/shared/{define-config-B1jccsL9.d.mts → define-config-cG45vHwf.d.mts} +15 -5
  18. package/dist/rolldown/shared/{error-tpgdcGrK.mjs → error-CP8smW_P.mjs} +1 -1
  19. package/dist/rolldown/shared/{load-config-Dapgaecf.mjs → load-config-CjCoDD5h.mjs} +1 -1
  20. package/dist/rolldown/shared/{normalize-string-or-regex-BCllTl21.mjs → normalize-string-or-regex-C5RWbu3O.mjs} +1 -1
  21. package/dist/rolldown/shared/{parse-DFYpKkKl.mjs → parse-8FR1cSLd.mjs} +1 -1
  22. package/dist/rolldown/shared/{rolldown-DK6iIJl8.mjs → rolldown-B7hI_r7G.mjs} +1 -1
  23. package/dist/rolldown/shared/{rolldown-build-rw0HCMhn.mjs → rolldown-build-CYoDea9V.mjs} +7 -7
  24. package/dist/rolldown/shared/{transform-BSCulZAO.mjs → transform-BfdLLNnY.mjs} +2 -2
  25. package/dist/rolldown/shared/{watch-D8uEZyLj.mjs → watch-CAj7leYN.mjs} +4 -4
  26. package/dist/rolldown/utils-index.mjs +4 -4
  27. package/dist/tsdown/build-B1oBkI4C-zptCT7Nv.js +5 -0
  28. package/dist/tsdown/{build-BG-XbM6V-hoyhQqI3.js → build-CpOl_krN-DF8oTAEE.js} +56 -39
  29. package/dist/tsdown/{debug-C4FmgzkJ-B6m_gRpz.js → debug-C4FmgzkJ-Fxa4sdkP.js} +2 -2
  30. package/dist/tsdown/{detect-J1_Vd1yf-BWDiPZkP.js → detect-J1_Vd1yf-uzwu6GvK.js} +1 -1
  31. package/dist/tsdown/{dist-Dx-jtFHM.js → dist-BTs7u0nu.js} +1 -1
  32. package/dist/tsdown/{dist-C9Oecl0H.js → dist-dJp148cE.js} +21 -24
  33. package/dist/tsdown/{filename-tIvGuRvQ.js → filename-UU7z2A9Z.js} +1 -1
  34. package/dist/tsdown/{index-node-Bpsmc0eX-jMz9gD3P.js → index-node-Bpsmc0eX-BiLag9_o.js} +1 -1
  35. package/dist/tsdown/index-types.d.ts +30 -11
  36. package/dist/tsdown/index.js +5 -5
  37. package/dist/tsdown/{main-DN-_H9u2.js → main-BUXYXu1I.js} +3 -3
  38. package/dist/tsdown/{resolver-CdD-yT15-3eaymYLw.js → resolver-BUWpVKW_-BR1glCep.js} +3 -4
  39. package/dist/tsdown/run.js +4 -4
  40. package/dist/tsdown/{tsc-context-DiIjfXAG.js → tsc-context-BQtoHArj.js} +2 -2
  41. package/dist/tsdown/{tsc-OwK9UHsV.js → tsc-ncSpKhL9.js} +6 -8
  42. package/dist/vite/node/index.d.ts +2 -2
  43. package/package.json +34 -34
  44. package/dist/tsdown/build-DHPfiKA--CvTonTfC.js +0 -5
  45. /package/dist/rolldown/shared/{binding-BSVL02lq.mjs → binding-C5G6_6ql.mjs} +0 -0
@@ -1,7 +1,7 @@
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 q, o as generateColor, p as green, r as version, s as getNameLabel, t as K, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-DN-_H9u2.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 q, o as generateColor, p as green, r as version, s as getNameLabel, t as K, u as blue, v as importWithError, w as resolveRegex, x as pkgExists, y as matchPattern } from "./main-BUXYXu1I.js";
3
3
  import { t as createDebug } from "./node-B3Gdtau1.js";
4
- import { i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-tIvGuRvQ.js";
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";
6
6
  import { pathToFileURL } from "node:url";
7
7
  import process$1, { env } from "node:process";
@@ -10,7 +10,7 @@ import { formatWithOptions, inspect, promisify } from "node:util";
10
10
  import { createRequire as createRequire$1 } from "module";
11
11
  import path, { dirname, isAbsolute, join, parse, resolve } from "node:path";
12
12
  import { VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
13
- import { access, chmod, cp, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
13
+ import { access, chmod, cp, mkdir, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
14
14
  import { and, id, importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
15
15
  import * as nativeFs$1 from "fs";
16
16
  import nativeFs from "fs";
@@ -21,7 +21,7 @@ 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.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
24
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/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.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/format-CEIo9KZy.mjs
67
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/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 {
@@ -74,7 +74,7 @@ function getShimsInject(format, platform) {
74
74
  }
75
75
  const debug$6 = createDebug("tsdown:dep");
76
76
  function resolveDepsConfig(config, logger) {
77
- let { neverBundle, alwaysBundle, onlyAllowBundle, skipNodeModulesBundle = false } = config.deps || {};
77
+ let { neverBundle, alwaysBundle, onlyBundle, skipNodeModulesBundle = false } = config.deps || {};
78
78
  if (config.external != null) {
79
79
  if (neverBundle != null) throw new TypeError("`external` is deprecated. Cannot be used with `deps.neverBundle`.");
80
80
  logger?.warn("`external` is deprecated. Use `deps.neverBundle` instead.");
@@ -85,10 +85,15 @@ function resolveDepsConfig(config, logger) {
85
85
  logger?.warn("`noExternal` is deprecated. Use `deps.alwaysBundle` instead.");
86
86
  alwaysBundle = config.noExternal;
87
87
  }
88
+ if (config.deps?.onlyAllowBundle != null) {
89
+ if (onlyBundle != null) throw new TypeError("`deps.onlyAllowBundle` is deprecated. Cannot be used with `deps.onlyBundle`.");
90
+ logger?.warn("`deps.onlyAllowBundle` is deprecated. Use `deps.onlyBundle` instead.");
91
+ onlyBundle = config.deps.onlyAllowBundle;
92
+ }
88
93
  if (config.inlineOnly != null) {
89
- if (onlyAllowBundle != null) throw new TypeError("`inlineOnly` is deprecated. Cannot be used with `deps.onlyAllowBundle`.");
90
- logger?.warn("`inlineOnly` is deprecated. Use `deps.onlyAllowBundle` instead.");
91
- onlyAllowBundle = config.inlineOnly;
94
+ if (onlyBundle != null) throw new TypeError("`inlineOnly` is deprecated. Cannot be used with `deps.onlyBundle`.");
95
+ logger?.warn("`inlineOnly` is deprecated. Use `deps.onlyBundle` instead.");
96
+ onlyBundle = config.inlineOnly;
92
97
  }
93
98
  if (config.skipNodeModulesBundle != null) {
94
99
  if (config.deps?.skipNodeModulesBundle != null) throw new TypeError("`skipNodeModulesBundle` is deprecated. Cannot be used with `deps.skipNodeModulesBundle`.");
@@ -102,11 +107,11 @@ function resolveDepsConfig(config, logger) {
102
107
  alwaysBundle = (id) => matchPattern(id, alwaysBundlePatterns);
103
108
  }
104
109
  if (skipNodeModulesBundle && alwaysBundle != null) throw new TypeError("`deps.skipNodeModulesBundle` and `deps.alwaysBundle` are mutually exclusive options and cannot be used together.");
105
- if (onlyAllowBundle != null && onlyAllowBundle !== false) onlyAllowBundle = toArray(onlyAllowBundle);
110
+ if (onlyBundle != null && onlyBundle !== false) onlyBundle = toArray(onlyBundle);
106
111
  return {
107
112
  neverBundle,
108
113
  alwaysBundle,
109
- onlyAllowBundle,
114
+ onlyBundle,
110
115
  skipNodeModulesBundle
111
116
  };
112
117
  }
@@ -128,7 +133,7 @@ async function parseBundledDep(moduleId) {
128
133
  };
129
134
  } catch {}
130
135
  }
131
- function DepPlugin({ pkg, deps: { alwaysBundle, onlyAllowBundle, skipNodeModulesBundle }, logger, nameLabel }, tsdownBundle) {
136
+ function DepPlugin({ pkg, deps: { alwaysBundle, onlyBundle, skipNodeModulesBundle }, logger, nameLabel }, tsdownBundle) {
132
137
  const deps = pkg && Array.from(getProductionDeps(pkg));
133
138
  return {
134
139
  name: "tsdown:external",
@@ -164,12 +169,12 @@ function DepPlugin({ pkg, deps: { alwaysBundle, onlyAllowBundle, skipNodeModules
164
169
  }
165
170
  }
166
171
  debug$6("found deps in bundle: %o", deps);
167
- if (onlyAllowBundle) {
168
- const errors = Array.from(deps).filter((dep) => !matchPattern(dep, onlyAllowBundle)).map((dep) => `${yellow(dep)} is located in ${blue`node_modules`} but is not included in ${blue`deps.onlyAllowBundle`} option.\nTo fix this, either add it to ${blue`deps.onlyAllowBundle`}, declare it as a production or peer dependency in your package.json, or externalize it manually.\nImported by\n${[...importers.get(dep) || []].map((s) => `- ${underline(s)}`).join("\n")}`);
172
+ if (onlyBundle) {
173
+ const errors = Array.from(deps).filter((dep) => !matchPattern(dep, onlyBundle)).map((dep) => `${yellow(dep)} is located in ${blue`node_modules`} but is not included in ${blue`deps.onlyBundle`} option.\nTo fix this, either add it to ${blue`deps.onlyBundle`}, declare it as a production or peer dependency in your package.json, or externalize it manually.\nImported by\n${[...importers.get(dep) || []].map((s) => `- ${underline(s)}`).join("\n")}`);
169
174
  if (errors.length) this.error(errors.join("\n\n"));
170
- const unusedPatterns = onlyAllowBundle.filter((pattern) => !Array.from(deps).some((dep) => matchPattern(dep, [pattern])));
171
- if (unusedPatterns.length) logger.info(nameLabel, `The following entries in ${blue`deps.onlyAllowBundle`} are not used in the bundle:\n${unusedPatterns.map((pattern) => `- ${yellow(pattern)}`).join("\n")}\nConsider removing them to keep your configuration clean.`);
172
- } else if (onlyAllowBundle == null && deps.size) logger.info(nameLabel, `Hint: consider adding ${blue`deps.onlyAllowBundle`} option to avoid unintended bundling of dependencies, or set ${blue`deps.onlyAllowBundle: false`} to disable this hint.\nSee more at ${underline`https://tsdown.dev/options/dependencies#deps-onlyallowbundle`}\nDetected dependencies in bundle:\n${Array.from(deps).map((dep) => `- ${blue(dep)}`).join("\n")}`);
175
+ const unusedPatterns = onlyBundle.filter((pattern) => !Array.from(deps).some((dep) => matchPattern(dep, [pattern])));
176
+ if (unusedPatterns.length) logger.info(nameLabel, `The following entries in ${blue`deps.onlyBundle`} are not used in the bundle:\n${unusedPatterns.map((pattern) => `- ${yellow(pattern)}`).join("\n")}\nConsider removing them to keep your configuration clean.`);
177
+ } else if (onlyBundle == null && deps.size) logger.info(nameLabel, `Hint: consider adding ${blue`deps.onlyBundle`} option to avoid unintended bundling of dependencies, or set ${blue`deps.onlyBundle: false`} to disable this hint.\nSee more at ${underline`https://tsdown.dev/options/dependencies#deps-onlybundle`}\nDetected dependencies in bundle:\n${Array.from(deps).map((dep) => `- ${blue(dep)}`).join("\n")}`);
173
178
  }
174
179
  }
175
180
  };
@@ -3071,7 +3076,7 @@ function createConfigCoreLoader(options) {
3071
3076
  };
3072
3077
  }
3073
3078
  //#endregion
3074
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/options-CQzuh3xe.mjs
3079
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/options--36H_-x3.mjs
3075
3080
  const __cjs_require$1 = createRequire(import.meta.url);
3076
3081
  const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
3077
3082
  const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
@@ -3084,6 +3089,10 @@ async function cleanOutDir(configs) {
3084
3089
  const removes = /* @__PURE__ */ new Set();
3085
3090
  for (const config of configs) {
3086
3091
  if (config.devtools && (config.devtools.clean ?? true)) config.clean.push("node_modules/.rolldown");
3092
+ if (config.exe) {
3093
+ const exeOutDir = path.resolve(config.cwd, config.exe.outDir || "build");
3094
+ config.clean.push(exeOutDir);
3095
+ }
3087
3096
  if (!config.clean.length) continue;
3088
3097
  const files = await glob(config.clean, {
3089
3098
  cwd: config.cwd,
@@ -3115,22 +3124,22 @@ async function cleanChunks(outDir, chunks) {
3115
3124
  await fsRemove(filePath);
3116
3125
  }));
3117
3126
  }
3118
- async function resolveEntry(logger, entry, cwd, color, nameLabel) {
3127
+ async function resolveEntry(logger, entry, cwd, color, nameLabel, root) {
3119
3128
  if (!entry || Object.keys(entry).length === 0) {
3120
3129
  const defaultEntry = path.resolve(cwd, "src/index.ts");
3121
3130
  if (await fsExists(defaultEntry)) entry = { index: defaultEntry };
3122
3131
  else throw new Error(`${nameLabel ? `${nameLabel} ` : ""}No input files, try "vp pack <your-file>" or create src/index.ts`);
3123
3132
  }
3124
- const entryMap = await toObjectEntry(entry, cwd);
3133
+ const [entryMap, computedRoot] = await toObjectEntry(entry, cwd, root);
3125
3134
  const entries = Object.values(entryMap);
3126
3135
  if (entries.length === 0) throw new Error(`${nameLabel ? `${nameLabel} ` : ""}Cannot find entry: ${JSON.stringify(entry)}`);
3127
3136
  logger.info(nameLabel, `entry: ${color(entries.map((entry) => path.relative(cwd, entry)).join(", "))}`);
3128
- return entryMap;
3137
+ return [entryMap, computedRoot];
3129
3138
  }
3130
- function toObjectEntry(entry, cwd) {
3139
+ function toObjectEntry(entry, cwd, root) {
3131
3140
  if (typeof entry === "string") entry = [entry];
3132
3141
  if (!Array.isArray(entry)) return resolveObjectEntry(entry, cwd);
3133
- return resolveArrayEntry(entry, cwd);
3142
+ return resolveArrayEntry(entry, cwd, root);
3134
3143
  }
3135
3144
  function isGlobEntry(entry) {
3136
3145
  if (!entry) return false;
@@ -3139,7 +3148,7 @@ function isGlobEntry(entry) {
3139
3148
  return Object.keys(entry).some((key) => key.includes("*"));
3140
3149
  }
3141
3150
  async function resolveObjectEntry(entries, cwd) {
3142
- return Object.fromEntries((await Promise.all(Object.entries(entries).map(async ([key, value]) => {
3151
+ return [Object.fromEntries((await Promise.all(Object.entries(entries).map(async ([key, value]) => {
3143
3152
  if (!key.includes("*")) {
3144
3153
  if (Array.isArray(value)) throw new TypeError(`Object entry "${key}" cannot have an array value when the key is not a glob pattern.`);
3145
3154
  return [[key, value]];
@@ -3159,9 +3168,9 @@ async function resolveObjectEntry(entries, cwd) {
3159
3168
  }
3160
3169
  if (valueGlobBase === void 0) throw new Error(`Cannot determine base directory for value glob patterns of key "${key}".`);
3161
3170
  return files.map((file) => [slash(key.replaceAll("*", stripExtname(path.relative(valueGlobBase, file)))), path.resolve(cwd, file)]);
3162
- }))).flat());
3171
+ }))).flat()), cwd];
3163
3172
  }
3164
- async function resolveArrayEntry(entries, cwd) {
3173
+ async function resolveArrayEntry(entries, cwd, root) {
3165
3174
  const stringEntries = [];
3166
3175
  const objectEntries = [];
3167
3176
  for (const e of entries) if (typeof e === "string") stringEntries.push(e);
@@ -3174,11 +3183,16 @@ async function resolveArrayEntry(entries, cwd) {
3174
3183
  absolute: true
3175
3184
  })).map((file) => path.resolve(file));
3176
3185
  else resolvedEntries = stringEntries;
3177
- const base = lowestCommonAncestor(...resolvedEntries);
3186
+ const computedRoot = root || lowestCommonAncestor(...resolvedEntries);
3187
+ const base = root && !isGlob ? path.relative(cwd, root) || "." : computedRoot;
3178
3188
  const arrayEntryMap = Object.fromEntries(resolvedEntries.map((file) => {
3179
3189
  return [slash(stripExtname(path.relative(base, file))), file];
3180
3190
  }));
3181
- return Object.assign({}, arrayEntryMap, ...await Promise.all(objectEntries.map((entry) => resolveObjectEntry(entry, cwd))));
3191
+ const resolvedObjectEntries = await Promise.all(objectEntries.map(async (entry) => {
3192
+ const [entryMap] = await resolveObjectEntry(entry, cwd);
3193
+ return entryMap;
3194
+ }));
3195
+ return [Object.assign({}, arrayEntryMap, ...resolvedObjectEntries), computedRoot];
3182
3196
  }
3183
3197
  const debug$3$2 = createDebug("tsdown:exe");
3184
3198
  function validateSea({ dts, entry, logger, nameLabel }) {
@@ -3216,7 +3230,9 @@ function resolveOutputFileName(exe, chunk, bundledFile, target, suffix) {
3216
3230
  }
3217
3231
  async function buildSingleExe(config, bundledFile, outputFile, executable, target) {
3218
3232
  const exe = config.exe;
3219
- const outputPath = path.join(config.outDir, outputFile);
3233
+ const exeOutDir = path.resolve(config.cwd, exe.outDir || "build");
3234
+ await mkdir(exeOutDir, { recursive: true });
3235
+ const outputPath = path.join(exeOutDir, outputFile);
3220
3236
  debug$3$2("Building SEA executable: %s -> %s", bundledFile, outputPath);
3221
3237
  const t = performance.now();
3222
3238
  const tempDir = await mkdtemp(path.join(tmpdir(), "tsdown-sea-"));
@@ -3622,7 +3638,7 @@ async function nativeImport(id) {
3622
3638
  return mod.default || mod;
3623
3639
  }
3624
3640
  async function unrunImport(id) {
3625
- const { unrun } = await import("./dist-Dx-jtFHM.js");
3641
+ const { unrun } = await import("./dist-BTs7u0nu.js");
3626
3642
  const { module } = await unrun({ path: pathToFileURL(id).href });
3627
3643
  return module;
3628
3644
  }
@@ -3635,7 +3651,7 @@ const parseEnv = process$1.getBuiltinModule("node:util").parseEnv;
3635
3651
  * @private
3636
3652
  */
3637
3653
  async function resolveUserConfig(userConfig, inlineConfig) {
3638
- let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process$1.cwd(), name, workspace, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
3654
+ let { entry, format, plugins = [], clean = true, logLevel = "info", failOnWarn = false, customLogger, treeshake = true, platform = "node", outDir = "dist", sourcemap = false, dts, unused = false, watch = false, ignoreWatch, shims = false, publint = false, attw = false, fromVite, alias, tsconfig, report = true, target, env = {}, envFile, envPrefix = "TSDOWN_", copy, publicDir, hash = true, cwd = process$1.cwd(), name, workspace, exports = false, bundle, unbundle = typeof bundle === "boolean" ? !bundle : false, root, removeNodeProtocol, nodeProtocol, cjsDefault = true, globImport = true, css, injectStyle, fixedExtension = platform === "node", devtools = false, write = true, exe = false } = userConfig;
3639
3655
  const pkg = await readPackageJson(cwd);
3640
3656
  if (workspace) name ||= pkg?.name;
3641
3657
  const color = generateColor(name);
@@ -3657,7 +3673,7 @@ async function resolveUserConfig(userConfig, inlineConfig) {
3657
3673
  outDir = path.resolve(cwd, outDir);
3658
3674
  clean = resolveClean(clean, outDir, cwd);
3659
3675
  const rawEntry = entry;
3660
- const resolvedEntry = await resolveEntry(logger, entry, cwd, color, nameLabel);
3676
+ const [resolvedEntry, resolvedRoot] = await resolveEntry(logger, entry, cwd, color, nameLabel, root ? path.resolve(cwd, root) : void 0);
3661
3677
  target = resolveTarget(logger, target, color, pkg, nameLabel);
3662
3678
  tsconfig = await resolveTsconfig(logger, tsconfig, cwd, color, nameLabel);
3663
3679
  publint = resolveFeatureOption(publint, {});
@@ -3753,6 +3769,7 @@ async function resolveUserConfig(userConfig, inlineConfig) {
3753
3769
  publint,
3754
3770
  rawEntry,
3755
3771
  report,
3772
+ root: resolvedRoot,
3756
3773
  shims,
3757
3774
  sourcemap,
3758
3775
  target,
@@ -3814,7 +3831,7 @@ function filterConfig(filter, configCwd, name) {
3814
3831
  return toArray(filter).some((value) => name && name === value || cwd === value);
3815
3832
  }
3816
3833
  //#endregion
3817
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/watch-yZCV-ZeB.mjs
3834
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/watch-seL2bosb.mjs
3818
3835
  /**
3819
3836
  * The `node:` protocol was added in Node.js v14.18.0.
3820
3837
  * @see https://nodejs.org/api/esm.html#node-imports
@@ -4143,7 +4160,7 @@ var Hookable = class {
4143
4160
  }
4144
4161
  };
4145
4162
  //#endregion
4146
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/build-BG-XbM6V.mjs
4163
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/build-CpOl_krN.mjs
4147
4164
  const __cjs_require = createRequire(import.meta.url);
4148
4165
  const satisfies = __cjs_require("./npm_entry_semver_functions_satisfies.cjs");
4149
4166
  const coerce = __cjs_require("./npm_entry_semver_functions_coerce.cjs");
@@ -4479,7 +4496,7 @@ async function bundleDone(bundleByPkg, bundle) {
4479
4496
  async function packTarball(packageJsonPath) {
4480
4497
  const pkgDir = path.dirname(packageJsonPath);
4481
4498
  const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
4482
- const [{ detect }, { pack }] = await Promise.all([import("./detect-J1_Vd1yf-BWDiPZkP.js"), import("./index-node-Bpsmc0eX-jMz9gD3P.js")]);
4499
+ const [{ detect }, { pack }] = await Promise.all([import("./detect-J1_Vd1yf-uzwu6GvK.js"), import("./index-node-Bpsmc0eX-BiLag9_o.js")]);
4483
4500
  try {
4484
4501
  const detected = await detect({ cwd: pkgDir });
4485
4502
  if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
@@ -4580,7 +4597,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
4580
4597
  if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
4581
4598
  if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepPlugin(config, bundle));
4582
4599
  if (dts) {
4583
- const { dts: dtsPlugin } = await import("./dist-C9Oecl0H.js");
4600
+ const { dts: dtsPlugin } = await import("./dist-dJp148cE.js");
4584
4601
  const options = {
4585
4602
  tsconfig,
4586
4603
  ...dts
@@ -4649,7 +4666,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
4649
4666
  }, config.inputOptions, [format, { cjsDts }]);
4650
4667
  }
4651
4668
  async function resolveOutputOptions(inputOptions, config, format, cjsDts) {
4652
- const { banner, cjsDefault, entry, footer, minify, outDir, sourcemap, unbundle } = config;
4669
+ const { banner, cjsDefault, footer, minify, outDir, sourcemap, unbundle } = config;
4653
4670
  const [entryFileNames, chunkFileNames] = resolveChunkFilename(config, inputOptions, format);
4654
4671
  return await mergeUserOptions({
4655
4672
  format: cjsDts ? "es" : format,
@@ -4661,7 +4678,7 @@ async function resolveOutputOptions(inputOptions, config, format, cjsDts) {
4661
4678
  entryFileNames,
4662
4679
  chunkFileNames,
4663
4680
  preserveModules: unbundle,
4664
- preserveModulesRoot: unbundle ? lowestCommonAncestor(...Object.values(entry)) : void 0,
4681
+ preserveModulesRoot: unbundle ? config.root : void 0,
4665
4682
  postBanner: resolveChunkAddon(banner, format),
4666
4683
  postFooter: resolveChunkAddon(footer, format),
4667
4684
  codeSplitting: config.exe ? false : void 0
@@ -4861,7 +4878,7 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
4861
4878
  restart();
4862
4879
  }
4863
4880
  if ((event.event === "create" || event.event === "delete") && config.rawEntry && isGlobEntry(config.rawEntry)) {
4864
- const newEntry = await toObjectEntry(config.rawEntry, config.cwd);
4881
+ const [newEntry] = await toObjectEntry(config.rawEntry, config.cwd);
4865
4882
  if (Object.keys(config.entry).toSorted().join("\0") !== Object.keys(newEntry).toSorted().join("\0")) {
4866
4883
  globalLogger.info("Entry files changed, restarting...");
4867
4884
  restart();
@@ -1,6 +1,6 @@
1
- import { C as resolveComma, E as toArray } from "./main-DN-_H9u2.js";
1
+ import { C as resolveComma, E as toArray } from "./main-BUXYXu1I.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.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/debug-C4FmgzkJ.mjs
3
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/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.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/detect-J1_Vd1yf.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/detect-J1_Vd1yf.mjs
5
5
  const AGENTS = [
6
6
  "npm",
7
7
  "yarn",
@@ -8,7 +8,7 @@ import { tmpdir } from "node:os";
8
8
  import fs, { existsSync } from "node:fs";
9
9
  import { Buffer } from "node:buffer";
10
10
  import crypto from "node:crypto";
11
- //#region ../../node_modules/.pnpm/unrun@0.2.31/node_modules/unrun/dist/src-GU5PtktT.mjs
11
+ //#region ../../node_modules/.pnpm/unrun@0.2.32/node_modules/unrun/dist/src-GU5PtktT.mjs
12
12
  /**
13
13
  * Applies preset-specific handling to the loaded module.
14
14
  */
@@ -1,14 +1,17 @@
1
1
  import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
2
2
  import { t as createDebug } from "./node-B3Gdtau1.js";
3
- import { a as RE_JSON, c as RE_TS, d as filename_js_to_dts, f as filename_to_dts, i as RE_JS, l as RE_VUE, m as resolveTemplateFn, n as RE_DTS, o as RE_NODE_MODULES, p as replaceTemplateName, r as RE_DTS_MAP, s as RE_ROLLDOWN_RUNTIME, t as RE_CSS, u as filename_dts_to } from "./filename-tIvGuRvQ.js";
4
- import { n as globalContext, r as invalidateContextFile, t as createContext } from "./tsc-context-DiIjfXAG.js";
3
+ import { a as RE_JSON, c as RE_TS, d as filename_js_to_dts, f as filename_to_dts, i as RE_JS, l as RE_VUE, m as resolveTemplateFn, n as RE_DTS, o as RE_NODE_MODULES, p as replaceTemplateName, r as RE_DTS_MAP, s as RE_ROLLDOWN_RUNTIME, t as RE_CSS, u as filename_dts_to } from "./filename-UU7z2A9Z.js";
4
+ import { n as globalContext, r as invalidateContextFile, t as createContext } from "./tsc-context-BQtoHArj.js";
5
5
  import module$1, { createRequire } from "node:module";
6
6
  import process$1 from "node:process";
7
+ import { fork, spawn } from "node:child_process";
7
8
  import path, { dirname, extname } from "node:path";
9
+ import { mkdtemp, readFile, rm } from "node:fs/promises";
8
10
  import { importerId, include } from "@voidzero-dev/vite-plus-core/rolldown/filter";
9
11
  import nativeFs from "fs";
10
12
  import path$1 from "path";
11
- import fs from "node:fs";
13
+ import { tmpdir } from "node:os";
14
+ import fs$1, { existsSync } from "node:fs";
12
15
  import { ResolverFactory, isolatedDeclarationSync } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
13
16
  import Be from "os";
14
17
  //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
@@ -30353,11 +30356,11 @@ function h(e) {
30353
30356
  }
30354
30357
  i(h, "slash");
30355
30358
  const Z = i((e) => {
30356
- const t = fs[e];
30359
+ const t = fs$1[e];
30357
30360
  return (s, ...n) => {
30358
30361
  const o = `${e}:${n.join(":")}`;
30359
30362
  let l = s == null ? void 0 : s.get(o);
30360
- return l === void 0 && (l = Reflect.apply(t, fs, n), s?.set(o, l)), l;
30363
+ return l === void 0 && (l = Reflect.apply(t, fs$1, n), s?.set(o, l)), l;
30361
30364
  };
30362
30365
  }, "cacheFs"), E = Z("existsSync"), $e = Z("readFileSync"), G = Z("statSync"), fe = i((e, t, s) => {
30363
30366
  for (;;) {
@@ -31247,13 +31250,7 @@ function ensureValue(value) {
31247
31250
  return value && ALLOW_EXTENSIONS.has(extname(value)) ? value.replaceAll("\\", "/") : null;
31248
31251
  }
31249
31252
  //#endregion
31250
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.4_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_e2c498b62da30912fd0b48bf4746dbba/node_modules/rolldown-plugin-dts/dist/index.mjs
31251
- const { fork, spawn } = globalThis.process.getBuiltinModule("node:child_process");
31252
- const { existsSync: existsSync$1 } = globalThis.process.getBuiltinModule("node:fs");
31253
- const { mkdtemp, readFile, rm } = globalThis.process.getBuiltinModule("node:fs/promises");
31254
- const path$2 = globalThis.process.getBuiltinModule("node:path");
31255
- const { tmpdir } = globalThis.process.getBuiltinModule("node:os");
31256
- const process$2 = globalThis.process;
31253
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.5_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_ee01c189cef60d67143f173de4d10478/node_modules/rolldown-plugin-dts/dist/index.mjs
31257
31254
  function createDtsInputPlugin({ sideEffects }) {
31258
31255
  return {
31259
31256
  name: "rolldown-plugin-dts:dts-input",
@@ -31330,7 +31327,7 @@ function createFakeJsPlugin({ sourcemap, cjsDefault, sideEffects }) {
31330
31327
  };
31331
31328
  function transform(code, id) {
31332
31329
  const file = parse$1(code, {
31333
- plugins: [["typescript", { dts: true }]],
31330
+ plugins: [["typescript", { dts: true }], "decoratorAutoAccessors"],
31334
31331
  sourceType: "module",
31335
31332
  errorRecovery: true,
31336
31333
  createParenthesizedExpressions: true
@@ -31888,7 +31885,7 @@ async function runTsgo(rootDir, tsconfig, sourcemap, tsgoPath) {
31888
31885
  tsgo = await getTsgoPathFromNodeModules();
31889
31886
  debug$3("[tsgo] using tsgo from node_modules", tsgo);
31890
31887
  }
31891
- const tsgoDist = await mkdtemp(path$2.join(tmpdir(), "rolldown-plugin-dts-"));
31888
+ const tsgoDist = await mkdtemp(path.join(tmpdir(), "rolldown-plugin-dts-"));
31892
31889
  debug$3("[tsgo] tsgoDist", tsgoDist);
31893
31890
  const args = [
31894
31891
  "--noEmit",
@@ -31926,7 +31923,7 @@ function createGeneratePlugin({ tsconfig, tsconfigRaw, build, incremental, cwd,
31926
31923
  let tscModule;
31927
31924
  let tscContext;
31928
31925
  let tsgoDist;
31929
- const rootDir = tsconfig ? path$2.dirname(tsconfig) : cwd;
31926
+ const rootDir = tsconfig ? path.dirname(tsconfig) : cwd;
31930
31927
  return {
31931
31928
  name: "rolldown-plugin-dts:generate",
31932
31929
  async buildStart(options) {
@@ -31938,7 +31935,7 @@ function createGeneratePlugin({ tsconfig, tsconfigRaw, build, incremental, cwd,
31938
31935
  on: (fn) => childProcess.on("message", fn)
31939
31936
  });
31940
31937
  } else {
31941
- tscModule = await import("./tsc-OwK9UHsV.js");
31938
+ tscModule = await import("./tsc-ncSpKhL9.js");
31942
31939
  if (newContext) tscContext = createContext();
31943
31940
  }
31944
31941
  if (!Array.isArray(options.input)) for (const [name, id] of Object.entries(options.input)) {
@@ -32023,14 +32020,14 @@ function createGeneratePlugin({ tsconfig, tsconfigRaw, build, incremental, cwd,
32023
32020
  debug$2("generate dts %s from %s", dtsId, id);
32024
32021
  if (tsgo) {
32025
32022
  if (RE_VUE.test(id)) throw new Error("tsgo does not support Vue files.");
32026
- const dtsPath = path$2.resolve(tsgoDist, path$2.relative(path$2.resolve(rootDir), filename_to_dts(id)));
32027
- if (!existsSync$1(dtsPath)) {
32023
+ const dtsPath = path.resolve(tsgoDist, path.relative(path.resolve(rootDir), filename_to_dts(id)));
32024
+ if (!existsSync(dtsPath)) {
32028
32025
  debug$2("[tsgo]", dtsPath, "is missing");
32029
32026
  throw new Error(`tsgo did not generate dts file for ${id}, please check your tsconfig.`);
32030
32027
  }
32031
32028
  dtsCode = await readFile(dtsPath, "utf8");
32032
32029
  const mapPath = `${dtsPath}.map`;
32033
- if (existsSync$1(mapPath)) {
32030
+ if (existsSync(mapPath)) {
32034
32031
  const mapRaw = await readFile(mapPath, "utf8");
32035
32032
  map = {
32036
32033
  ...JSON.parse(mapRaw),
@@ -32144,7 +32141,7 @@ function collectJsonExports(code) {
32144
32141
  return exports;
32145
32142
  }
32146
32143
  let warnedTsgo = false;
32147
- function resolveOptions({ cwd = process$2.cwd(), dtsInput = false, emitDtsOnly = false, tsconfig, tsconfigRaw: overriddenTsconfigRaw = {}, compilerOptions = {}, sourcemap, resolver = "oxc", cjsDefault = false, sideEffects = false, build = false, incremental = false, vue = false, tsMacro = false, parallel = false, eager = false, newContext = false, emitJs, oxc, tsgo = false }) {
32144
+ function resolveOptions({ cwd = process$1.cwd(), dtsInput = false, emitDtsOnly = false, tsconfig, tsconfigRaw: overriddenTsconfigRaw = {}, compilerOptions = {}, sourcemap, resolver = "oxc", cjsDefault = false, sideEffects = false, build = false, incremental = false, vue = false, tsMacro = false, parallel = false, eager = false, newContext = false, emitJs, oxc, tsgo = false }) {
32148
32145
  if (tsgo === true) tsgo = {};
32149
32146
  else if (typeof tsgo === "object" && tsgo.enabled === false) tsgo = false;
32150
32147
  let resolvedTsconfig;
@@ -32153,7 +32150,7 @@ function resolveOptions({ cwd = process$2.cwd(), dtsInput = false, emitDtsOnly =
32153
32150
  tsconfig = path;
32154
32151
  resolvedTsconfig = config;
32155
32152
  } else if (typeof tsconfig === "string") {
32156
- tsconfig = path$2.resolve(cwd || process$2.cwd(), tsconfig);
32153
+ tsconfig = path.resolve(cwd || process$1.cwd(), tsconfig);
32157
32154
  resolvedTsconfig = pe(tsconfig);
32158
32155
  } else tsconfig = void 0;
32159
32156
  compilerOptions = {
@@ -32268,11 +32265,11 @@ function createDtsResolvePlugin({ cwd, tsconfig, tsconfigRaw, resolver, sideEffe
32268
32265
  async function resolveDtsPath(id, importer, rolldownResolution) {
32269
32266
  let dtsPath;
32270
32267
  if (resolver === "tsc") {
32271
- const { tscResolve } = await import("./resolver-CdD-yT15-3eaymYLw.js");
32268
+ const { tscResolve } = await import("./resolver-BUWpVKW_-BR1glCep.js");
32272
32269
  dtsPath = tscResolve(id, importer, cwd, tsconfig, tsconfigRaw);
32273
32270
  } else dtsPath = baseDtsResolver(id, importer);
32274
32271
  debug$1("Using %s for dts import: %O -> %O", resolver, id, dtsPath);
32275
- if (dtsPath) dtsPath = path$2.normalize(dtsPath);
32272
+ if (dtsPath) dtsPath = path.normalize(dtsPath);
32276
32273
  if (!dtsPath || !isSourceFile(dtsPath)) {
32277
32274
  if (rolldownResolution && isFilePath(rolldownResolution.id) && isSourceFile(rolldownResolution.id) && !rolldownResolution.external) return rolldownResolution.id;
32278
32275
  return null;
@@ -32281,7 +32278,7 @@ function createDtsResolvePlugin({ cwd, tsconfig, tsconfigRaw, resolver, sideEffe
32281
32278
  }
32282
32279
  }
32283
32280
  function isFilePath(id) {
32284
- return id.startsWith(".") || path$2.isAbsolute(id);
32281
+ return id.startsWith(".") || path.isAbsolute(id);
32285
32282
  }
32286
32283
  const debug = createDebug("rolldown-plugin-dts:options");
32287
32284
  function dts(options = {}) {
@@ -1,6 +1,6 @@
1
1
  import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
2
2
  import { exactRegex } from "@voidzero-dev/vite-plus-core/rolldown/filter";
3
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.4_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_e2c498b62da30912fd0b48bf4746dbba/node_modules/rolldown-plugin-dts/dist/filename.mjs
3
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.5_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_ee01c189cef60d67143f173de4d10478/node_modules/rolldown-plugin-dts/dist/filename.mjs
4
4
  const RE_JS = /\.([cm]?)jsx?$/;
5
5
  const RE_TS = /\.([cm]?)tsx?$/;
6
6
  const RE_DTS = /\.d\.([cm]?)ts$/;
@@ -4,7 +4,7 @@ import path from "node:path";
4
4
  import fs from "node:fs/promises";
5
5
  import os from "node:os";
6
6
  import zlib from "node:zlib";
7
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/index-node-Bpsmc0eX.mjs
7
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/index-node-Bpsmc0eX.mjs
8
8
  /** @type {import('../index.d.ts').pack} */
9
9
  async function pack(dir, opts) {
10
10
  const packageManager = opts?.packageManager ?? "npm";
@@ -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.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/logger-BUKd5OJy.d.mts
5
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/logger-BUKd5OJy.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>;
@@ -8473,7 +8473,7 @@ interface GlobDependency {
8473
8473
  glob: string;
8474
8474
  }
8475
8475
  //#endregion
8476
- //#region ../../node_modules/.pnpm/@tsdown+css@0.21.1_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.6__postcss@8.5.6_sass-e_2bb39c9995ebadd1a74060df3216f6ad/node_modules/@tsdown/css/dist/index.d.mts
8476
+ //#region ../../node_modules/.pnpm/@tsdown+css@0.21.2_jiti@2.6.1_postcss-import@16.1.1_postcss@8.5.6__postcss@8.5.6_sass-e_005673d760d2db8a10b0df9f1e5c8013/node_modules/@tsdown/css/dist/index.d.mts
8477
8477
  //#region src/options.d.ts
8478
8478
  type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
8479
8479
  interface CssOptions {
@@ -9330,7 +9330,7 @@ type TsConfigJson = {
9330
9330
  references?: TsConfigJson.References[];
9331
9331
  };
9332
9332
  //#endregion
9333
- //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.4_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_e2c498b62da30912fd0b48bf4746dbba/node_modules/rolldown-plugin-dts/dist/index.d.mts
9333
+ //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.5_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_ee01c189cef60d67143f173de4d10478/node_modules/rolldown-plugin-dts/dist/index.d.mts
9334
9334
  //#region src/options.d.ts
9335
9335
  interface GeneralOptions {
9336
9336
  /**
@@ -9516,7 +9516,7 @@ interface TsgoOptions {
9516
9516
  path?: string;
9517
9517
  }
9518
9518
  //#endregion
9519
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.0.0-alpha.33_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
9519
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.0.0-alpha.34_@pnpm+logger@1001.0.1_typescript@5.9.3_vite@packages+core_vue@3.5.27_typescript@5.9.3_/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
9520
9520
  //#region src/node/cli-commands.d.ts
9521
9521
  interface StartOptions {
9522
9522
  root?: string;
@@ -9526,7 +9526,7 @@ interface StartOptions {
9526
9526
  open?: boolean;
9527
9527
  }
9528
9528
  //#endregion
9529
- //#region ../../node_modules/.pnpm/@tsdown+exe@0.21.1_tsdown@0.21.1/node_modules/@tsdown/exe/dist/index.d.mts
9529
+ //#region ../../node_modules/.pnpm/@tsdown+exe@0.21.2_tsdown@0.21.2/node_modules/@tsdown/exe/dist/index.d.mts
9530
9530
  //#region src/platform.d.ts
9531
9531
  type ExePlatform = "win" | "darwin" | "linux";
9532
9532
  type ExeArch = "x64" | "arm64";
@@ -9667,7 +9667,7 @@ interface Options$1 {
9667
9667
  depKinds?: Array<DepKind>;
9668
9668
  }
9669
9669
  //#endregion
9670
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/types-CuHu3Iaq.d.mts
9670
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/types-DUxKwUmX.d.mts
9671
9671
  //#region src/features/copy.d.ts
9672
9672
  interface CopyEntry {
9673
9673
  /**
@@ -9728,6 +9728,10 @@ interface DepsConfig {
9728
9728
  *
9729
9729
  * Note: Be sure to include all required sub-dependencies as well.
9730
9730
  */
9731
+ onlyBundle?: Arrayable$1<string | RegExp> | false;
9732
+ /**
9733
+ * @deprecated Use {@link onlyBundle} instead.
9734
+ */
9731
9735
  onlyAllowBundle?: Arrayable$1<string | RegExp> | false;
9732
9736
  /**
9733
9737
  * Skip bundling all `node_modules` dependencies.
@@ -9741,7 +9745,7 @@ interface DepsConfig {
9741
9745
  interface ResolvedDepsConfig {
9742
9746
  neverBundle?: ExternalOption;
9743
9747
  alwaysBundle?: NoExternalFn;
9744
- onlyAllowBundle?: Array<string | RegExp> | false;
9748
+ onlyBundle?: Array<string | RegExp> | false;
9745
9749
  skipNodeModulesBundle: boolean;
9746
9750
  }
9747
9751
  //#endregion
@@ -9768,6 +9772,11 @@ interface ExeOptions extends ExeExtensionOptions {
9768
9772
  * For example, do not include `.exe`, platform suffixes, or architecture suffixes.
9769
9773
  */
9770
9774
  fileName?: string | ((chunk: RolldownChunk) => string);
9775
+ /**
9776
+ * Output directory for executables.
9777
+ * @default 'build'
9778
+ */
9779
+ outDir?: string;
9771
9780
  }
9772
9781
  /**
9773
9782
  * See also [Node.js SEA Documentation](https://nodejs.org/api/single-executable-applications.html#generating-single-executable-applications-with---build-sea)
@@ -10367,7 +10376,7 @@ interface UserConfig {
10367
10376
  */
10368
10377
  noExternal?: Arrayable$1<string | RegExp> | NoExternalFn;
10369
10378
  /**
10370
- * @deprecated Use `deps.onlyAllowBundle` instead.
10379
+ * @deprecated Use `deps.onlyBundle` instead.
10371
10380
  */
10372
10381
  inlineOnly?: Arrayable$1<string | RegExp> | false;
10373
10382
  /**
@@ -10557,6 +10566,15 @@ interface UserConfig {
10557
10566
  */
10558
10567
  unbundle?: boolean;
10559
10568
  /**
10569
+ * Specifies the root directory of input files, similar to TypeScript's `rootDir`.
10570
+ * This determines the output directory structure.
10571
+ *
10572
+ * By default, the root is computed as the common base directory of all entry files.
10573
+ *
10574
+ * @see https://www.typescriptlang.org/tsconfig/#rootDir
10575
+ */
10576
+ root?: string;
10577
+ /**
10560
10578
  * @deprecated Use `unbundle` instead.
10561
10579
  * @default true
10562
10580
  */
@@ -10760,7 +10778,8 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
10760
10778
  nodeProtocol: "strip" | boolean;
10761
10779
  logger: Logger;
10762
10780
  ignoreWatch: Array<string | RegExp>;
10763
- deps: ResolvedDepsConfig;
10781
+ deps: ResolvedDepsConfig; /** Resolved root directory of input files */
10782
+ root: string;
10764
10783
  dts: false | Options;
10765
10784
  report: false | ReportOptions;
10766
10785
  tsconfig: false | string;
@@ -10772,7 +10791,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
10772
10791
  exe: false | ExeOptions;
10773
10792
  }>; //#endregion
10774
10793
  //#endregion
10775
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/config-B9iARaO_.d.mts
10794
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/config-Cz86PxVM.d.mts
10776
10795
  //#region src/config/options.d.ts
10777
10796
  /**
10778
10797
  * Resolve user config into resolved configs
@@ -10792,7 +10811,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
10792
10811
  declare function defineConfig(options: UserConfigFn): UserConfigFn;
10793
10812
  declare function defineConfig(options: UserConfigExport): UserConfigExport; //#endregion
10794
10813
  //#endregion
10795
- //#region ../../node_modules/.pnpm/tsdown@0.21.1_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.1_@tsdown+exe@0.21.1_@type_441010dc1e356451b27baacd78ca9eda/node_modules/tsdown/dist/index.d.mts
10814
+ //#region ../../node_modules/.pnpm/tsdown@0.21.2_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.2_@tsdown+exe@0.21.2_@type_b93b799299757e647e700df84d204817/node_modules/tsdown/dist/index.d.mts
10796
10815
  //#region src/build.d.ts
10797
10816
  /**
10798
10817
  * Build with tsdown.