@voidzero-dev/vite-plus-core 0.1.18 → 0.1.19-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.
Files changed (66) hide show
  1. package/dist/rolldown/cli.mjs +6 -6
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.d.mts +4 -4
  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 +2 -2
  8. package/dist/rolldown/index.mjs +4 -4
  9. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  10. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  11. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.mjs +1 -1
  13. package/dist/rolldown/plugins-index.d.mts +3 -3
  14. package/dist/rolldown/plugins-index.mjs +2 -2
  15. package/dist/rolldown/shared/{binding-s-V_wTpj.mjs → binding-DI_PGVIh.mjs} +1 -1
  16. package/dist/rolldown/shared/{binding-DUEnSb0A.d.mts → binding-zH1vcmbM.d.mts} +27 -0
  17. package/dist/rolldown/shared/{bindingify-input-options-BZsZ-nl1.mjs → bindingify-input-options-CQLSwbb0.mjs} +24 -48
  18. package/dist/rolldown/shared/{constructors-DYemMpPL.d.mts → constructors-C29s6i8O.d.mts} +2 -2
  19. package/dist/rolldown/shared/{constructors-BaEBnHl3.mjs → constructors-Dzji6NUq.mjs} +1 -1
  20. package/dist/rolldown/shared/{define-config-DhJZwTRw.d.mts → define-config-DmrIgjVV.d.mts} +22 -1
  21. package/dist/rolldown/shared/{error-w0u7biK-.mjs → error-DAA7ncC5.mjs} +1 -1
  22. package/dist/rolldown/shared/{load-config-CmWRh-jo.mjs → load-config-DKK5aKL7.mjs} +1 -1
  23. package/dist/rolldown/shared/{normalize-string-or-regex-CVvpepxa.mjs → normalize-string-or-regex-E9GT23QI.mjs} +1 -1
  24. package/dist/rolldown/shared/{parse-Bd1l_BRJ.mjs → parse-BC6EwEdS.mjs} +2 -2
  25. package/dist/rolldown/shared/{prompt-DZIXsnf9.mjs → prompt-Bm9aMQjm.mjs} +4 -2
  26. package/dist/rolldown/shared/{resolve-tsconfig-CNjJwuKB.mjs → resolve-tsconfig-BVTabsge.mjs} +2 -2
  27. package/dist/rolldown/shared/{rolldown-CWkl-K9Q.mjs → rolldown-DN-NFVZl.mjs} +1 -1
  28. package/dist/rolldown/shared/{rolldown-build-BIk0DnUJ.mjs → rolldown-build-B-H35squ.mjs} +10 -6
  29. package/dist/rolldown/shared/{transform-Kz3D2LbX.d.mts → transform-DgZ3paSD.d.mts} +1 -1
  30. package/dist/rolldown/shared/{watch-CTRlKkoe.mjs → watch-DKEzXLor.mjs} +4 -4
  31. package/dist/rolldown/utils-index.d.mts +3 -3
  32. package/dist/rolldown/utils-index.mjs +5 -5
  33. package/dist/tsdown/{build-y6nUUkVJ-BUtpLkpw.js → build-OX8uszs6-4hNTeOrB.js} +143 -92
  34. package/dist/tsdown/{chunk-CSNpwdVU.js → chunk-N93fKeF6.js} +1 -1
  35. package/dist/tsdown/{debug-CLlnG64L-CvIUyX2c.js → debug-CLlnG64L-CuCVzZmG.js} +2 -2
  36. package/dist/tsdown/{detect-DN3DXXYt-DDr6LAmT.js → detect-DN3DXXYt-DtgPLlRO.js} +1 -1
  37. package/dist/tsdown/{dist-Cqme3mtE.js → dist-CrrE8ZBn.js} +1 -1
  38. package/dist/tsdown/{dist-PpqQ55q2.js → dist-DSi2MWPQ.js} +7 -6
  39. package/dist/tsdown/index-types.d.ts +64 -16
  40. package/dist/tsdown/index.js +4 -4
  41. package/dist/tsdown/{main-Ccx2FDJq.js → main-BsfiKQP8.js} +5 -5
  42. package/dist/tsdown/npm_cjs_chunk_chunk.cjs +1 -1
  43. package/dist/tsdown/run.js +4 -4
  44. package/dist/tsdown/{tsc-o1MoGgGA.js → tsc-Cm8giMT9.js} +1 -1
  45. package/dist/vite/client/client.mjs +4 -4
  46. package/dist/vite/node/chunks/build.js +5381 -2
  47. package/dist/vite/node/chunks/chunk.js +11 -2
  48. package/dist/vite/node/chunks/dist.js +21 -11
  49. package/dist/vite/node/chunks/dist2.js +4 -3
  50. package/dist/vite/node/chunks/logger.js +1 -1
  51. package/dist/vite/node/chunks/node.js +115 -59
  52. package/dist/vite/node/chunks/postcss-import.js +1 -1
  53. package/dist/vite/node/cli.js +6 -6
  54. package/dist/vite/node/index.d.ts +2 -2
  55. package/dist/vite/node/index.js +1 -1
  56. package/dist/vite/node/module-runner.js +2 -2
  57. package/package.json +12 -12
  58. package/dist/tsdown/build-y6nUUkVJ-B9JhNMeu.js +0 -2
  59. package/dist/vite/node/chunks/build2.js +0 -5378
  60. package/dist/vite/node/chunks/config.js +0 -2
  61. package/dist/vite/node/chunks/optimizer.js +0 -2
  62. package/dist/vite/node/chunks/preview.js +0 -2
  63. package/dist/vite/node/chunks/server.js +0 -2
  64. /package/dist/tsdown/{dist-D8aGMhnG.js → dist-JaOach5K.js} +0 -0
  65. /package/dist/tsdown/{resolver-DkvdaW3s-CCXGyGZ3.js → resolver-DkvdaW3s-BeVUoOo-.js} +0 -0
  66. /package/dist/tsdown/{tsc-context-C2cC1Bhi.js → tsc-context-B1O6kHlu.js} +0 -0
@@ -1,12 +1,12 @@
1
- import { r as __toESM, t as __commonJSMin } from "./chunk-CSNpwdVU.js";
2
- import { C as promiseWithResolvers, D as toArray, E as slash, S as pkgExists, T as resolveRegex, _ as yellow, a as createLogger, b as matchPattern, c as globalLogger, d as bold, f as dim, g as underline, h as red, i as LogLevels, l as prettyFormat, n as W, o as generateColor, p as green, r as version, s as getNameLabel, t as U, u as blue, v as debounce, w as resolveComma, x as noop, y as importWithError } from "./main-Ccx2FDJq.js";
1
+ import { n as __exportAll$1, r as __toESM, t as __commonJSMin } from "./chunk-N93fKeF6.js";
2
+ import { C as promiseWithResolvers, D as toArray, E as slash, S as pkgExists, T as resolveRegex, _ as yellow, a as createLogger, b as matchPattern, c as globalLogger, d as bold, f as dim, g as underline, h as red, i as LogLevels, l as prettyFormat, n as W, o as generateColor, p as green, r as version, s as getNameLabel, t as U, u as blue, v as debounce, w as resolveComma, x as noop, y as importWithError } from "./main-BsfiKQP8.js";
3
3
  import { t as createDebug } from "./node-B3Gdtau1.js";
4
4
  import { d as filename_js_to_dts, i as RE_JS, n as RE_DTS, o as RE_NODE_MODULES$1, t as RE_CSS } from "./filename-DQnUJlio-DHPB7cQg.js";
5
5
  import "./dist-D_AJtdxQ.js";
6
6
  import module$1, { builtinModules, createRequire, isBuiltin } from "node:module";
7
7
  import process$1, { env } from "node:process";
8
8
  import readline from "node:readline";
9
- import { formatWithOptions, inspect, promisify } from "node:util";
9
+ import { formatWithOptions, inspect, isDeepStrictEqual, promisify } from "node:util";
10
10
  import path, { dirname, isAbsolute, join, parse, resolve } from "node:path";
11
11
  import { VERSION, build, watch } from "@voidzero-dev/vite-plus-core/rolldown";
12
12
  import { access, chmod, cp, mkdir, mkdtemp, readFile, readdir, rm, stat, writeFile } from "node:fs/promises";
@@ -18,11 +18,12 @@ import { basename, dirname as dirname$1, isAbsolute as isAbsolute$1, normalize a
18
18
  import { fileURLToPath } from "url";
19
19
  import { createRequire as createRequire$1 } from "module";
20
20
  import { tmpdir } from "node:os";
21
- import { pathToFileURL } from "node:url";
21
+ import { fileURLToPath as fileURLToPath$1, pathToFileURL } from "node:url";
22
+ import { AsyncLocalStorage } from "node:async_hooks";
22
23
  import { Buffer } from "node:buffer";
23
24
  import { brotliCompress, gzip } from "node:zlib";
24
25
  import { importGlobPlugin } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
25
- //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
26
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/fs-Dd6Htx2P.mjs
26
27
  function fsExists(path) {
27
28
  return access(path).then(() => true, () => false);
28
29
  }
@@ -65,7 +66,7 @@ function stripExtname(filePath) {
65
66
  return filePath.slice(0, -ext.length);
66
67
  }
67
68
  //#endregion
68
- //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/format-a5Q6w07o.mjs
69
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/format-CajNSstg.mjs
69
70
  const shimFile = path.resolve(import.meta.dirname, "..", "esm-shims.js");
70
71
  function getShimsInject(format, platform) {
71
72
  if (format === "es" && platform === "node") return {
@@ -267,16 +268,6 @@ function formatBytes(bytes) {
267
268
  if (bytes > 1e6) return `${(bytes / 1e6).toFixed(2)} MB`;
268
269
  return `${(bytes / 1e3).toFixed(2)} kB`;
269
270
  }
270
- function detectIndentation(jsonText) {
271
- const lines = jsonText.split(/\r?\n/);
272
- for (const line of lines) {
273
- const match = line.match(/^(\s+)\S/);
274
- if (!match) continue;
275
- if (match[1].includes(" ")) return " ";
276
- return match[1].length;
277
- }
278
- return 2;
279
- }
280
271
  const minVersion = createRequire(import.meta.url)("./npm_entry_semver_ranges_min-version.cjs");
281
272
  const BASELINE_WIDELY_AVAILABLE_TARGET = [
282
273
  "chrome111",
@@ -3056,12 +3047,13 @@ function up(options) {
3056
3047
  return up$1("package.json", options);
3057
3048
  }
3058
3049
  //#endregion
3059
- //#region ../../node_modules/.pnpm/import-without-cache@0.2.5/node_modules/import-without-cache/dist/index.mjs
3050
+ //#region ../../node_modules/.pnpm/import-without-cache@0.3.3/node_modules/import-without-cache/dist/index.mjs
3060
3051
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
3061
3052
  const namespace = "no-cache://";
3062
3053
  const namespaceLength = 11;
3063
3054
  const isSupported = !!module$1.registerHooks;
3064
3055
  const RE_NODE_MODULES = /[/\\]node_modules[/\\]/;
3056
+ const depsStore = new AsyncLocalStorage();
3065
3057
  let deregister;
3066
3058
  function init({ skipNodeModules } = {}) {
3067
3059
  if (process$1.versions.bun) throw new Error("init is unnecessary in Bun, use clearRequireCache() instead.");
@@ -3079,6 +3071,8 @@ function init({ skipNodeModules } = {}) {
3079
3071
  if (!resolved.url.startsWith("file://")) return resolved;
3080
3072
  const parentUUID = getParentUUID(context.parentURL);
3081
3073
  if (!noCache && !parentUUID) return resolved;
3074
+ const deps = depsStore.getStore();
3075
+ if (deps) deps.add(fileURLToPath$1(resolved.url));
3082
3076
  resolved.url = appendUUID(resolved.url, parentUUID || crypto.randomUUID());
3083
3077
  return resolved;
3084
3078
  },
@@ -3367,7 +3361,7 @@ function createConfigCoreLoader(options) {
3367
3361
  };
3368
3362
  }
3369
3363
  //#endregion
3370
- //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/options-CAjSicbD.mjs
3364
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/options-8hmVMssn.mjs
3371
3365
  const __cjs_require$1 = createRequire(import.meta.url);
3372
3366
  const picomatch = __cjs_require$1("./npm_entry_picomatch.cjs");
3373
3367
  const satisfies$1 = __cjs_require$1("./npm_entry_semver_functions_satisfies.cjs");
@@ -3571,24 +3565,51 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
3571
3565
  }
3572
3566
  config.logger.success(config.nameLabel, `Built executable: ${red(path.relative(config.cwd, outputPath))}`, dim`(${Math.round(performance.now() - t)}ms)`);
3573
3567
  }
3568
+ function writeJsonFile(filePath, content) {
3569
+ let originalText;
3570
+ let originalJson = void 0;
3571
+ let originalIndent = 2;
3572
+ let originalEOL = "\n";
3573
+ let originalHasTrailingNewline = false;
3574
+ try {
3575
+ originalText = readFileSync(filePath, "utf8");
3576
+ originalJson = JSON.parse(originalText);
3577
+ originalIndent = detectIndentation(originalText);
3578
+ if (originalText.includes("\r\n")) originalEOL = "\r\n";
3579
+ if (originalText.endsWith("\n")) originalHasTrailingNewline = true;
3580
+ } catch {}
3581
+ if (originalJson && (isDeepStrictEqual(originalJson, content) || JSON.stringify(originalJson) === JSON.stringify(content))) return;
3582
+ let jsonString = JSON.stringify(content, null, originalIndent);
3583
+ if (originalEOL !== "\n") jsonString = jsonString.replaceAll("\n", originalEOL);
3584
+ if (originalHasTrailingNewline) jsonString += originalEOL;
3585
+ if (originalText === jsonString) return;
3586
+ writeFileSync(filePath, jsonString, "utf8");
3587
+ }
3588
+ function detectIndentation(jsonText) {
3589
+ const lines = jsonText.split(/\r?\n/);
3590
+ for (const line of lines) {
3591
+ const match = line.match(/^(\s+)\S/);
3592
+ if (!match) continue;
3593
+ if (match[1].includes(" ")) return " ";
3594
+ return match[1].length;
3595
+ }
3596
+ return 2;
3597
+ }
3574
3598
  async function writeExports(options, chunks, inlinedDeps) {
3575
3599
  const { pkg } = options;
3576
- const { publishExports, bin, ...generated } = await generateExports(pkg, chunks, options, inlinedDeps);
3600
+ const { publishExports, publishBin, bin, ...generated } = await generateExports(pkg, chunks, options, inlinedDeps);
3577
3601
  const updatedPkg = {
3578
3602
  ...pkg,
3579
3603
  ...generated,
3580
3604
  ...bin === void 0 ? {} : { bin },
3581
3605
  packageJsonPath: void 0
3582
3606
  };
3583
- if (publishExports) {
3607
+ if (publishExports || publishBin) {
3584
3608
  updatedPkg.publishConfig ||= {};
3585
- updatedPkg.publishConfig.exports = publishExports;
3609
+ if (publishExports) updatedPkg.publishConfig.exports = publishExports;
3610
+ if (publishBin) updatedPkg.publishConfig.bin = publishBin;
3586
3611
  }
3587
- const original = readFileSync(pkg.packageJsonPath, "utf8");
3588
- let contents = JSON.stringify(updatedPkg, null, detectIndentation(original));
3589
- if (original.includes("\r\n")) contents = contents.replaceAll("\n", "\r\n");
3590
- if (original.endsWith("\n")) contents += "\n";
3591
- if (contents !== original) writeFileSync(pkg.packageJsonPath, contents, "utf8");
3612
+ writeJsonFile(pkg.packageJsonPath, updatedPkg);
3592
3613
  }
3593
3614
  function shouldExclude(fileName, exclude) {
3594
3615
  if (!exclude?.length) return false;
@@ -3670,12 +3691,15 @@ async function generateExports(pkg, chunks, options, inlinedDeps) {
3670
3691
  isPublish: true
3671
3692
  });
3672
3693
  }
3694
+ const binResult = generateBin(bin, !!devExports, pkg, chunks, pkgRoot, logger, cwd);
3695
+ const publishBin = devExports && binResult ? generateBin(bin, false, pkg, chunks, pkgRoot, logger, cwd) : void 0;
3673
3696
  return {
3674
3697
  main: legacy ? main || module || pkg.main : void 0,
3675
3698
  module: legacy ? module || pkg.module : void 0,
3676
3699
  types: legacy ? cjsTypes || esmTypes || pkg.types : pkg.types,
3677
3700
  exports,
3678
- bin: generateBin(bin, pkg, chunks, pkgRoot, logger, cwd),
3701
+ bin: binResult,
3702
+ publishBin,
3679
3703
  inlinedDependencies: emitInlinedDeps ? inlinedDeps : void 0,
3680
3704
  publishExports
3681
3705
  };
@@ -3718,7 +3742,7 @@ function hasExportsTypes(pkg) {
3718
3742
  return false;
3719
3743
  }
3720
3744
  const RE_SHEBANG$1 = /^#!.*/;
3721
- function generateBin(bin, pkg, chunks, pkgRoot, logger, cwd) {
3745
+ function generateBin(bin, devExports, pkg, chunks, pkgRoot, logger, cwd) {
3722
3746
  if (!bin) return;
3723
3747
  if (bin === true || typeof bin === "string") {
3724
3748
  if (!pkg.name) throw new Error("Package name is required when using string form for `bin`");
@@ -3735,7 +3759,7 @@ function generateBin(bin, pkg, chunks, pkgRoot, logger, cwd) {
3735
3759
  if (seen.has(chunk.facadeModuleId)) continue;
3736
3760
  seen.add(chunk.facadeModuleId);
3737
3761
  if (detected) throw new Error("Multiple entry chunks with shebangs found. Use `exports.bin: { name: \"./src/file.ts\" }` to specify which one to use.");
3738
- detected = join$1(pkgRoot, chunk.outDir, slash(chunk.fileName));
3762
+ detected = devExports ? `./${slash(path.relative(pkgRoot, chunk.facadeModuleId))}` : join$1(pkgRoot, chunk.outDir, slash(chunk.fileName));
3739
3763
  }
3740
3764
  }
3741
3765
  if (detected == null) {
@@ -3747,16 +3771,20 @@ function generateBin(bin, pkg, chunks, pkgRoot, logger, cwd) {
3747
3771
  if (typeof bin === "string") {
3748
3772
  const match = findChunkBySource(bin);
3749
3773
  if (!match) throw new Error(`Could not find output chunk for bin entry "${bin}"`);
3750
- return { [binName]: match };
3774
+ return { [binName]: devExports ? normalizeSource(bin) : match };
3751
3775
  }
3752
3776
  }
3753
3777
  const result = {};
3754
3778
  for (const [cmdName, sourcePath] of Object.entries(bin)) {
3755
3779
  const match = findChunkBySource(sourcePath);
3756
3780
  if (!match) throw new Error(`Could not find output chunk for bin entry "${cmdName}": "${sourcePath}"`);
3757
- result[cmdName] = match;
3781
+ result[cmdName] = devExports ? normalizeSource(sourcePath) : match;
3758
3782
  }
3759
3783
  return result;
3784
+ function normalizeSource(sourcePath) {
3785
+ const resolved = path.resolve(cwd, sourcePath);
3786
+ return `./${slash(path.relative(pkgRoot, resolved))}`;
3787
+ }
3760
3788
  function findChunkBySource(sourcePath) {
3761
3789
  const resolved = path.resolve(cwd, sourcePath);
3762
3790
  for (const format of ["es", "cjs"]) {
@@ -3786,6 +3814,12 @@ function join$1(pkgRoot, outDir, fileName) {
3786
3814
  const outDirRelative = slash(path.relative(pkgRoot, outDir));
3787
3815
  return `${outDirRelative ? `./${outDirRelative}` : "."}/${fileName}`;
3788
3816
  }
3817
+ async function flattenPlugins(plugins) {
3818
+ const awaited = await plugins;
3819
+ if (!awaited) return [];
3820
+ if (Array.isArray(awaited)) return (await Promise.all(awaited.map(flattenPlugins))).flat();
3821
+ return [awaited];
3822
+ }
3789
3823
  function findTsconfig(cwd, name = "tsconfig.json") {
3790
3824
  return up$1(name, { cwd }) || false;
3791
3825
  }
@@ -3859,14 +3893,17 @@ async function loadViteConfig(prefix, cwd, configLoader) {
3859
3893
  cwd
3860
3894
  }).load(true);
3861
3895
  if (!result) return;
3862
- const { config, source } = result;
3896
+ let { config: [exported, deps], source } = result;
3863
3897
  globalLogger.info(`Using Vite config: ${underline(source)}`);
3864
- const resolved = await config;
3865
- if (typeof resolved === "function") return resolved({
3898
+ exported = await exported;
3899
+ if (typeof exported === "function") exported = await exported({
3866
3900
  command: "build",
3867
3901
  mode: "production"
3868
3902
  });
3869
- return resolved;
3903
+ return {
3904
+ config: exported,
3905
+ deps
3906
+ };
3870
3907
  }
3871
3908
  const configPrefix = "tsdown.config";
3872
3909
  async function loadConfigFile(inlineConfig, workspace, rootConfig) {
@@ -3914,8 +3951,9 @@ async function loadConfigFile(inlineConfig, workspace, rootConfig) {
3914
3951
  }).load(true);
3915
3952
  let exported = [];
3916
3953
  let file;
3954
+ let deps;
3917
3955
  if (result) {
3918
- ({config: exported, source: file} = result);
3956
+ ({config: [exported, deps], source: file} = result);
3919
3957
  globalLogger.info(`config file: ${underline(file)}`, loader === "native" ? "" : `(${loader})`);
3920
3958
  exported = await exported;
3921
3959
  if (typeof exported === "function") exported = await exported(inlineConfig, {
@@ -3931,7 +3969,7 @@ async function loadConfigFile(inlineConfig, workspace, rootConfig) {
3931
3969
  ...config,
3932
3970
  cwd: config.cwd ? path.resolve(cwd, config.cwd) : cwd
3933
3971
  })),
3934
- file
3972
+ deps
3935
3973
  };
3936
3974
  }
3937
3975
  const isBun = !!process$1.versions.bun;
@@ -3948,31 +3986,30 @@ function createParser(loader) {
3948
3986
  if (basename === configPrefix || isPkgJson || basename.endsWith(".json")) {
3949
3987
  const contents = await readFile(filepath, "utf8");
3950
3988
  const parsed = JSON.parse(contents);
3951
- if (isPkgJson) return parsed?.tsdown;
3952
- return parsed;
3989
+ return [isPkgJson ? parsed?.tsdown : parsed, new Set([filepath])];
3953
3990
  }
3954
- if (loader === "native") return nativeImport(filepath);
3955
- return unrunImport(filepath);
3991
+ return (loader === "native" ? nativeImport : unrunImport)(filepath);
3956
3992
  };
3957
3993
  }
3958
3994
  async function nativeImport(id) {
3995
+ const deps = new Set([id]);
3959
3996
  const url = pathToFileURL(id);
3960
3997
  const importAttributes = Object.create(null);
3961
3998
  if (isSupported) {
3962
3999
  importAttributes.cache = "no";
3963
4000
  init({ skipNodeModules: true });
3964
4001
  } else if (!isBun) url.searchParams.set("no-cache", crypto.randomUUID());
3965
- const mod = await import(url.href, { with: importAttributes }).catch((error) => {
4002
+ const mod = await depsStore.run(deps, () => import(url.href, { with: importAttributes }).catch((error) => {
3966
4003
  if (error?.message?.includes?.("Cannot find module")) throw new Error(`Failed to load the config file. Try setting the --config-loader CLI flag to \`unrun\`.\n\n${error.message}`, { cause: error });
3967
4004
  if (typeof error?.stack === "string" && error.stack.includes("node:internal/modules/esm/translators")) throw new Error(`Failed to load the config file due to a known Node.js bug. Try setting the --config-loader CLI flag to \`unrun\` or upgrading Node.js to v24.11.1 or later.\n\n${error.message}`, { cause: error });
3968
4005
  throw error;
3969
- });
3970
- return mod.default || mod;
4006
+ }));
4007
+ return [mod.default || mod, deps];
3971
4008
  }
3972
4009
  async function unrunImport(id) {
3973
- const { unrun } = await import("./dist-Cqme3mtE.js");
3974
- const { module } = await unrun({ path: pathToFileURL(id).href });
3975
- return module;
4010
+ const { unrun } = await import("./dist-CrrE8ZBn.js");
4011
+ const { module, dependencies } = await unrun({ path: pathToFileURL(id).href });
4012
+ return [module, new Set(dependencies)];
3976
4013
  }
3977
4014
  const debug$7 = createDebug("tsdown:config:options");
3978
4015
  const parseEnv = process$1.getBuiltinModule("node:util").parseEnv;
@@ -3982,7 +4019,14 @@ const parseEnv = process$1.getBuiltinModule("node:util").parseEnv;
3982
4019
  * **Internal API, not for public use**
3983
4020
  * @private
3984
4021
  */
3985
- async function resolveUserConfig(userConfig, inlineConfig) {
4022
+ async function resolveUserConfig(userConfig, inlineConfig, configDeps) {
4023
+ {
4024
+ const flat = await flattenPlugins(userConfig.plugins);
4025
+ for (const plugin of flat) {
4026
+ const result = await plugin.tsdownConfig?.(userConfig, inlineConfig);
4027
+ if (result) userConfig = mergeConfig(userConfig, result);
4028
+ }
4029
+ }
3986
4030
  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;
3987
4031
  const pkg = await readPackageJson(cwd);
3988
4032
  if (workspace) name ||= pkg?.name;
@@ -4047,16 +4091,19 @@ async function resolveUserConfig(userConfig, inlineConfig) {
4047
4091
  ...env
4048
4092
  };
4049
4093
  debug$7(`Environment variables: %O`, env);
4094
+ configDeps = new Set(configDeps);
4050
4095
  if (fromVite) {
4051
4096
  const viteUserConfig = await loadViteConfig(fromVite === true ? "vite" : fromVite, cwd, inlineConfig.configLoader);
4052
4097
  if (viteUserConfig) {
4053
- const viteAlias = viteUserConfig.resolve?.alias;
4098
+ const { config, deps } = viteUserConfig;
4099
+ deps?.forEach((dep) => configDeps.add(dep));
4100
+ const viteAlias = config.resolve?.alias;
4054
4101
  if (Array.isArray(viteAlias)) throw new TypeError("Unsupported resolve.alias in Vite config. Use object instead of array");
4055
4102
  if (viteAlias) alias = {
4056
4103
  ...alias,
4057
4104
  ...viteAlias
4058
4105
  };
4059
- if (viteUserConfig.plugins) plugins = [viteUserConfig.plugins, plugins];
4106
+ if (config.plugins) plugins = [config.plugins, plugins];
4060
4107
  }
4061
4108
  }
4062
4109
  ignoreWatch = toArray(ignoreWatch).map((ignore) => {
@@ -4076,6 +4123,7 @@ async function resolveUserConfig(userConfig, inlineConfig) {
4076
4123
  attw,
4077
4124
  cjsDefault,
4078
4125
  clean,
4126
+ configDeps,
4079
4127
  copy: publicDir || copy,
4080
4128
  css,
4081
4129
  cwd,
@@ -4114,7 +4162,7 @@ async function resolveUserConfig(userConfig, inlineConfig) {
4114
4162
  };
4115
4163
  if (exe) validateSea(config);
4116
4164
  const objectFormat = typeof format === "object" && !Array.isArray(format);
4117
- return (objectFormat ? Object.keys(format) : resolveComma(toArray(format, "esm"))).map((fmt, idx) => {
4165
+ const resolvedConfigs = (objectFormat ? Object.keys(format) : resolveComma(toArray(format, "esm"))).map((fmt, idx) => {
4118
4166
  const once = idx === 0;
4119
4167
  const overrides = objectFormat ? format[fmt] : void 0;
4120
4168
  return {
@@ -4125,6 +4173,11 @@ async function resolveUserConfig(userConfig, inlineConfig) {
4125
4173
  ...overrides
4126
4174
  };
4127
4175
  });
4176
+ for (const resolved of resolvedConfigs) {
4177
+ const finalPlugins = await flattenPlugins(resolved.plugins);
4178
+ for (const plugin of finalPlugins) await plugin.tsdownConfigResolved?.(resolved);
4179
+ }
4180
+ return resolvedConfigs;
4128
4181
  }
4129
4182
  /** filter env variables by prefixes */
4130
4183
  function filterEnv(envDict, envPrefixes) {
@@ -4163,7 +4216,7 @@ function filterConfig(filter, configCwd, name) {
4163
4216
  return toArray(filter).some((value) => name && name === value || cwd === value);
4164
4217
  }
4165
4218
  //#endregion
4166
- //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/watch-C9ZHIctp.mjs
4219
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/watch-D6EGzM6P.mjs
4167
4220
  async function copy(options) {
4168
4221
  if (!options.copy) return;
4169
4222
  const resolved = await resolveCopyEntries(options);
@@ -4345,7 +4398,7 @@ function addOutDirToChunks(chunks, outDir) {
4345
4398
  });
4346
4399
  }
4347
4400
  const endsWithConfig = /[\\/](?:tsdown\.config.*|package\.json|tsconfig\.json)$/;
4348
- function WatchPlugin(configFiles, { config, chunks }) {
4401
+ function WatchPlugin(configDeps, { config, chunks }) {
4349
4402
  return {
4350
4403
  name: "tsdown:watch",
4351
4404
  options: config.ignoreWatch.length ? (inputOptions) => {
@@ -4355,7 +4408,7 @@ function WatchPlugin(configFiles, { config, chunks }) {
4355
4408
  } : void 0,
4356
4409
  async buildStart() {
4357
4410
  config.tsconfig && this.addWatchFile(config.tsconfig);
4358
- for (const file of configFiles) this.addWatchFile(file);
4411
+ for (const file of configDeps) this.addWatchFile(file);
4359
4412
  if (typeof config.watch !== "boolean") for (const file of resolveComma(toArray(config.watch))) this.addWatchFile(file);
4360
4413
  if (config.pkg) this.addWatchFile(config.pkg.packageJsonPath);
4361
4414
  if (config.copy) {
@@ -4372,7 +4425,7 @@ function WatchPlugin(configFiles, { config, chunks }) {
4372
4425
  };
4373
4426
  }
4374
4427
  //#endregion
4375
- //#region ../../node_modules/.pnpm/hookable@6.1.0/node_modules/hookable/dist/index.mjs
4428
+ //#region ../../node_modules/.pnpm/hookable@6.1.1/node_modules/hookable/dist/index.mjs
4376
4429
  function flatHooks(configHooks, hooks = {}, parentName) {
4377
4430
  for (const key in configHooks) {
4378
4431
  const subHook = configHooks[key];
@@ -4390,7 +4443,7 @@ const createTask = /* @__PURE__ */ (() => {
4390
4443
  function callHooks(hooks, args, startIndex, task) {
4391
4444
  for (let i = startIndex; i < hooks.length; i += 1) try {
4392
4445
  const result = task ? task.run(() => hooks[i](...args)) : hooks[i](...args);
4393
- if (result instanceof Promise) return result.then(() => callHooks(hooks, args, i + 1, task));
4446
+ if (result && typeof result.then === "function") return Promise.resolve(result).then(() => callHooks(hooks, args, i + 1, task));
4394
4447
  } catch (error) {
4395
4448
  return Promise.reject(error);
4396
4449
  }
@@ -4543,7 +4596,12 @@ var Hookable = class {
4543
4596
  }
4544
4597
  };
4545
4598
  //#endregion
4546
- //#region ../../node_modules/.pnpm/tsdown@0.21.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/build-y6nUUkVJ.mjs
4599
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/build-OX8uszs6.mjs
4600
+ var build_OX8uszs6_exports = /* @__PURE__ */ __exportAll$1({
4601
+ n: () => buildWithConfigs,
4602
+ r: () => build_exports,
4603
+ t: () => build$1
4604
+ });
4547
4605
  const __cjs_require = createRequire(import.meta.url);
4548
4606
  const satisfies = __cjs_require("./npm_entry_semver_functions_satisfies.cjs");
4549
4607
  const coerce = __cjs_require("./npm_entry_semver_functions_coerce.cjs");
@@ -4565,13 +4623,14 @@ const DEFAULT_EXCLUDE_WORKSPACE = [
4565
4623
  "**/test?(s)/**",
4566
4624
  "**/t?(e)mp/**"
4567
4625
  ];
4568
- async function resolveWorkspace(config, inlineConfig) {
4626
+ async function resolveWorkspace(config, inlineConfig, rootDeps) {
4569
4627
  const normalized = mergeConfig(config, inlineConfig);
4570
4628
  const rootCwd = normalized.cwd || process$1.cwd();
4629
+ const deps = new Set(rootDeps);
4571
4630
  let { workspace } = normalized;
4572
4631
  if (!workspace) return {
4573
4632
  configs: [normalized],
4574
- files: []
4633
+ deps
4575
4634
  };
4576
4635
  if (workspace === true) workspace = {};
4577
4636
  else if (typeof workspace === "string" || Array.isArray(workspace)) workspace = { include: workspace };
@@ -4589,46 +4648,38 @@ async function resolveWorkspace(config, inlineConfig) {
4589
4648
  expandDirectories: false
4590
4649
  })).map((file) => slash(path.resolve(file)));
4591
4650
  if (packages.length === 0) throw new Error("No workspace packages found, please check your config");
4592
- const files = [];
4593
4651
  return {
4594
4652
  configs: (await Promise.all(packages.map(async (cwd) => {
4595
4653
  debug$4("loading workspace config %s", cwd);
4596
- const { configs, file } = await loadConfigFile({
4654
+ const { configs, deps: workspaceDeps } = await loadConfigFile({
4597
4655
  ...inlineConfig,
4598
4656
  config: workspaceConfig,
4599
4657
  cwd
4600
4658
  }, cwd, normalized);
4601
- if (file) {
4602
- debug$4("loaded workspace config file %s", file);
4603
- files.push(file);
4604
- } else debug$4("no workspace config file found in %s", cwd);
4659
+ workspaceDeps?.forEach((dep) => deps.add(dep));
4605
4660
  return configs.map((config) => mergeConfig(normalized, config));
4606
4661
  }))).flat(),
4607
- files
4662
+ deps
4608
4663
  };
4609
4664
  }
4610
4665
  const debug$3 = createDebug("tsdown:config");
4611
4666
  async function resolveConfig(inlineConfig) {
4612
4667
  debug$3("inline config %O", inlineConfig);
4613
4668
  if (inlineConfig.cwd) inlineConfig.cwd = path.resolve(inlineConfig.cwd);
4614
- const { configs: rootConfigs, file } = await loadConfigFile(inlineConfig);
4615
- const files = [];
4616
- if (file) {
4617
- files.push(file);
4618
- debug$3("loaded root user config file %s", file);
4619
- debug$3("root user configs %O", rootConfigs);
4620
- } else debug$3("no root user config file found");
4669
+ const { configs: rootConfigs, deps: rootDeps } = await loadConfigFile(inlineConfig);
4670
+ const globalDeps = new Set(rootDeps);
4621
4671
  const configs = (await Promise.all(rootConfigs.map(async (rootConfig) => {
4622
- const { configs: workspaceConfigs, files: workspaceFiles } = await resolveWorkspace(rootConfig, inlineConfig);
4672
+ const { configs: workspaceConfigs, deps: workspaceDeps } = await resolveWorkspace(rootConfig, inlineConfig, rootDeps);
4623
4673
  debug$3("workspace configs %O", workspaceConfigs);
4624
- if (workspaceFiles) files.push(...workspaceFiles);
4625
- return (await Promise.all(workspaceConfigs.filter((config) => !config.workspace || config.entry).map((config) => resolveUserConfig(config, inlineConfig)))).flat().filter((config) => !!config);
4674
+ const configs = (await Promise.all(workspaceConfigs.filter((config) => !config.workspace || config.entry).map((config) => resolveUserConfig(config, inlineConfig, workspaceDeps)))).flat().filter((config) => !!config);
4675
+ workspaceDeps.forEach((dep) => globalDeps.add(dep));
4676
+ return configs;
4626
4677
  }))).flat();
4627
4678
  debug$3("resolved configs %O", configs);
4628
4679
  if (configs.length === 0) throw new Error("No valid configuration found.");
4629
4680
  return {
4630
4681
  configs,
4631
- files
4682
+ deps: globalDeps
4632
4683
  };
4633
4684
  }
4634
4685
  function warnLegacyCJS(config) {
@@ -4857,7 +4908,7 @@ async function bundleDone(bundleByPkg, bundle) {
4857
4908
  async function packTarball(packageJsonPath) {
4858
4909
  const pkgDir = path.dirname(packageJsonPath);
4859
4910
  const destination = await mkdtemp(path.join(tmpdir(), "tsdown-pack-"));
4860
- const { detect } = await import("./detect-DN3DXXYt-DDr6LAmT.js");
4911
+ const { detect } = await import("./detect-DN3DXXYt-DtgPLlRO.js");
4861
4912
  try {
4862
4913
  const detected = await detect({ cwd: pkgDir });
4863
4914
  if (detected?.name === "deno") throw new Error(`Cannot pack tarball for Deno projects at ${pkgDir}`);
@@ -4976,8 +5027,8 @@ function resolveChunkAddon(chunkAddon, format) {
4976
5027
  };
4977
5028
  }
4978
5029
  const debug = createDebug("tsdown:rolldown");
4979
- async function getBuildOptions(config, format, configFiles, bundle, cjsDts = false, isDualFormat) {
4980
- const inputOptions = await resolveInputOptions(config, format, configFiles, bundle, cjsDts, isDualFormat);
5030
+ async function getBuildOptions(config, format, configDeps, bundle, cjsDts = false, isDualFormat) {
5031
+ const inputOptions = await resolveInputOptions(config, format, configDeps, bundle, cjsDts, isDualFormat);
4981
5032
  const outputOptions = await resolveOutputOptions(inputOptions, config, format, cjsDts);
4982
5033
  const rolldownConfig = {
4983
5034
  ...inputOptions,
@@ -4987,13 +5038,13 @@ async function getBuildOptions(config, format, configFiles, bundle, cjsDts = fal
4987
5038
  debug("rolldown config with format \"%s\" %O", cjsDts ? "cjs dts" : format, rolldownConfig);
4988
5039
  return rolldownConfig;
4989
5040
  }
4990
- async function resolveInputOptions(config, format, configFiles, bundle, cjsDts, isDualFormat) {
5041
+ async function resolveInputOptions(config, format, configDeps, bundle, cjsDts, isDualFormat) {
4991
5042
  const { alias, checks: { legacyCjs, ...checks } = {}, cjsDefault, cwd, deps: { neverBundle }, devtools, dts, entry, env, globImport, loader, logger, nameLabel, nodeProtocol, platform, plugins: userPlugins, report, shims, target, treeshake, tsconfig, unused, watch } = config;
4992
5043
  const plugins = [];
4993
5044
  if (nodeProtocol) plugins.push(NodeProtocolPlugin(nodeProtocol));
4994
5045
  if (config.pkg || config.deps.skipNodeModulesBundle) plugins.push(DepsPlugin(config, bundle));
4995
5046
  if (dts) {
4996
- const { dts: dtsPlugin } = await import("./dist-PpqQ55q2.js");
5047
+ const { dts: dtsPlugin } = await import("./dist-DSi2MWPQ.js");
4997
5048
  const { cjsReexport: _, ...dtsPluginOptions } = dts;
4998
5049
  const options = {
4999
5050
  tsconfig,
@@ -5026,7 +5077,7 @@ async function resolveInputOptions(config, format, configFiles, bundle, cjsDts,
5026
5077
  if (globImport) plugins.push(importGlobPlugin({ root: cwd }));
5027
5078
  }
5028
5079
  if (report && LogLevels[logger.level] >= 3) plugins.push(ReportPlugin(config, cjsDts, isDualFormat));
5029
- if (watch) plugins.push(WatchPlugin(configFiles, bundle));
5080
+ if (watch) plugins.push(WatchPlugin(configDeps, bundle));
5030
5081
  if (!cjsDts) plugins.push(userPlugins);
5031
5082
  if (cssPostPlugins) plugins.push(...cssPostPlugins);
5032
5083
  const define = {
@@ -5189,8 +5240,8 @@ const asyncDispose = Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose");
5189
5240
  */
5190
5241
  async function build$1(inlineConfig = {}) {
5191
5242
  globalLogger.level = inlineConfig.logLevel || "info";
5192
- const { configs, files: configFiles } = await resolveConfig(inlineConfig);
5193
- return buildWithConfigs(configs, configFiles, () => build$1(inlineConfig));
5243
+ const { configs, deps: configDeps } = await resolveConfig(inlineConfig);
5244
+ return buildWithConfigs(configs, configDeps, () => build$1(inlineConfig));
5194
5245
  }
5195
5246
  /**
5196
5247
  * Build with `ResolvedConfigs`.
@@ -5198,7 +5249,7 @@ async function build$1(inlineConfig = {}) {
5198
5249
  * **Internal API, not for public use**
5199
5250
  * @private
5200
5251
  */
5201
- async function buildWithConfigs(configs, configFiles, _restart) {
5252
+ async function buildWithConfigs(configs, configDeps, _restart) {
5202
5253
  let cleanPromise;
5203
5254
  const clean = () => {
5204
5255
  if (cleanPromise) return cleanPromise;
@@ -5219,7 +5270,7 @@ async function buildWithConfigs(configs, configFiles, _restart) {
5219
5270
  }
5220
5271
  globalLogger.info("Build start");
5221
5272
  const bundles = await Promise.all(configs.map((options) => {
5222
- return buildSingle(options, configFiles, options.pkg ? configChunksByPkg[options.pkg.packageJsonPath].formats.size > 1 : true, clean, restart, done);
5273
+ return buildSingle(options, configDeps, options.pkg ? configChunksByPkg[options.pkg.packageJsonPath].formats.size > 1 : true, clean, restart, done);
5223
5274
  }));
5224
5275
  const firstDevtoolsConfig = configs.find((config) => config.devtools && config.devtools.ui);
5225
5276
  if (configs.some((config) => config.watch)) {
@@ -5232,7 +5283,7 @@ async function buildWithConfigs(configs, configFiles, _restart) {
5232
5283
  * Build a single configuration, without watch and shortcuts features.
5233
5284
  * @param config Resolved options
5234
5285
  */
5235
- async function buildSingle(config, configFiles, isDualFormat, clean, restart, done) {
5286
+ async function buildSingle(config, configDeps, isDualFormat, clean, restart, done) {
5236
5287
  const { format, dts, watch: watch$1, logger, outDir } = config;
5237
5288
  const { hooks, context } = await createHooks(config);
5238
5289
  warnLegacyCJS(config);
@@ -5279,7 +5330,7 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
5279
5330
  debouncedPostBuild.cancel();
5280
5331
  ab?.abort();
5281
5332
  }
5282
- if (configFiles.includes(id) || endsWithConfig.test(id)) {
5333
+ if (configDeps.has(id) || endsWithConfig.test(id)) {
5283
5334
  globalLogger.info(`Reload config: ${id}, restarting...`);
5284
5335
  restart();
5285
5336
  }
@@ -5322,14 +5373,14 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
5322
5373
  });
5323
5374
  }
5324
5375
  async function initBuildOptions() {
5325
- const buildOptions = await getBuildOptions(config, format, configFiles, bundle, false, isDualFormat);
5376
+ const buildOptions = await getBuildOptions(config, format, configDeps, bundle, false, isDualFormat);
5326
5377
  await hooks.callHook("build:before", {
5327
5378
  ...context,
5328
5379
  buildOptions
5329
5380
  });
5330
5381
  if (debugRolldownConfigDir) await debugBuildOptions(debugRolldownConfigDir, config.name, format, buildOptions);
5331
5382
  const configs = [buildOptions];
5332
- if (format === "cjs" && dts && (!isDualFormat || !dts.cjsReexport)) configs.push(await getBuildOptions(config, format, configFiles, bundle, true, isDualFormat));
5383
+ if (format === "cjs" && dts && (!isDualFormat || !dts.cjsReexport)) configs.push(await getBuildOptions(config, format, configDeps, bundle, true, isDualFormat));
5333
5384
  return configs;
5334
5385
  }
5335
5386
  async function postBuild() {
@@ -5346,4 +5397,4 @@ async function buildSingle(config, configFiles, isDualFormat, clean, restart, do
5346
5397
  }
5347
5398
  }
5348
5399
  //#endregion
5349
- export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, build_exports as r, build$1 as t };
5400
+ export { resolveUserConfig as a, mergeConfig as i, buildWithConfigs as n, build_OX8uszs6_exports as r, build$1 as t };
@@ -6,7 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __exportAll = (all, no_symbols) => {
11
11
  let target = {};
12
12
  for (var name in all) __defProp(target, name, {
@@ -1,6 +1,6 @@
1
- import { D as toArray, w as resolveComma } from "./main-Ccx2FDJq.js";
1
+ import { D as toArray, w as resolveComma } from "./main-BsfiKQP8.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.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/debug-CLlnG64L.mjs
3
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/debug-CLlnG64L.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.8_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.8_@tsdown+exe@0.21.8_@type_bf863151738d83584e36df49913526fa/node_modules/tsdown/dist/detect-DN3DXXYt.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.21.9_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.9_@tsdown+exe@0.21.9_@type_52058320c0a42ed3e52f8161aa9d656f/node_modules/tsdown/dist/detect-DN3DXXYt.mjs
5
5
  const AGENTS = [
6
6
  "npm",
7
7
  "yarn",
@@ -8,7 +8,7 @@ import { tmpdir } from "node:os";
8
8
  import { fileURLToPath, pathToFileURL } from "node:url";
9
9
  import { Buffer } from "node:buffer";
10
10
  import crypto from "node:crypto";
11
- //#region ../../node_modules/.pnpm/unrun@0.2.34/node_modules/unrun/dist/src-GU5PtktT.mjs
11
+ //#region ../../node_modules/.pnpm/unrun@0.2.36/node_modules/unrun/dist/src-GU5PtktT.mjs
12
12
  /**
13
13
  * Applies preset-specific handling to the loaded module.
14
14
  */