@voidzero-dev/vite-plus-core 0.3.1 → 0.3.2

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 (62) hide show
  1. package/LICENSE +0 -29
  2. package/dist/rolldown/cli.mjs +6 -6
  3. package/dist/rolldown/config.d.mts +1 -1
  4. package/dist/rolldown/config.mjs +2 -2
  5. package/dist/rolldown/experimental-index.d.mts +7 -2
  6. package/dist/rolldown/experimental-index.mjs +10 -9
  7. package/dist/rolldown/filter-index.d.mts +1 -1
  8. package/dist/rolldown/index.d.mts +1 -1
  9. package/dist/rolldown/index.mjs +4 -4
  10. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  11. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.mjs +1 -1
  13. package/dist/rolldown/plugins-index.d.mts +2 -2
  14. package/dist/rolldown/plugins-index.mjs +2 -2
  15. package/dist/rolldown/shared/{binding-DmImI4pj.mjs → binding-DH95uVkp.mjs} +27 -27
  16. package/dist/rolldown/shared/{bindingify-input-options-BYClWKnj.mjs → bindingify-input-options-BL4xrXys.mjs} +5 -5
  17. package/dist/rolldown/shared/{constructors-BM20b11r.d.mts → constructors-BnIg8feC.d.mts} +1 -1
  18. package/dist/rolldown/shared/{constructors-mRbcbLyX.mjs → constructors-CrhQ-yy_.mjs} +1 -1
  19. package/dist/rolldown/shared/{create-bundler-option-CHTBktos.mjs → create-bundler-option-Dk9AZBn_.mjs} +33 -9
  20. package/dist/rolldown/shared/{define-config-DNX0WekP.d.mts → define-config-DjHYbH6S.d.mts} +4 -0
  21. package/dist/rolldown/shared/{error-BP8lJHle.mjs → error-CRNyaqoL.mjs} +1 -1
  22. package/dist/rolldown/shared/{load-config-Cx5fx_8Q.mjs → load-config-CKqTUKwB.mjs} +1 -1
  23. package/dist/rolldown/shared/{normalize-string-or-regex-Dm69lpQ-.mjs → normalize-string-or-regex-BgP6W4eD.mjs} +1 -1
  24. package/dist/rolldown/shared/{parse-8sr82jSR.mjs → parse-DYyNe0IU.mjs} +2 -2
  25. package/dist/rolldown/shared/{resolve-tsconfig-BlNGaH3Y.mjs → resolve-tsconfig-jh43hFM_.mjs} +2 -2
  26. package/dist/rolldown/shared/{rolldown-CaX_Wmqc.mjs → rolldown-BpXK1q5_.mjs} +4 -4
  27. package/dist/rolldown/shared/{watch-YKfJgIxz.mjs → watch-Due6uYkS.mjs} +4 -4
  28. package/dist/rolldown/utils-index.d.mts +1 -1
  29. package/dist/rolldown/utils-index.mjs +5 -5
  30. package/dist/tsdown/{build-JVmLFaZt-kqQJ2U7s.js → build-JVmLFaZt-BN9yuB6k.js} +13 -426
  31. package/dist/tsdown/{debug-CpC4hV25-tvH_Dsg5.js → debug-CpC4hV25-BeCITV83.js} +4 -90
  32. package/dist/tsdown/{detect-Bg-d8iUV-KfbO7neP.js → detect-Bg-d8iUV-Cr_BRLVW.js} +1 -1
  33. package/dist/tsdown/{dist-Cuw3Ngo4.js → dist-ByW_jJfv.js} +5 -5
  34. package/dist/tsdown/index-types.d.ts +52 -52
  35. package/dist/tsdown/index.js +4 -4
  36. package/dist/tsdown/internal-DTYQdXId.js +3 -0
  37. package/dist/tsdown/{main-CyNcZUzu.js → main-bgV9NlwM.js} +88 -3
  38. package/dist/tsdown/{resolver-DE0_sy8o-ZQqHQjRu.js → resolver-DE0_sy8o-UMsN-SXx.js} +2 -2
  39. package/dist/tsdown/run.js +4 -4
  40. package/dist/tsdown/{src-BWidcM5N.js → src-D5xv98Iu.js} +4 -4
  41. package/dist/tsdown/target-DgdLrXba-DaJJ11xX.js +586 -0
  42. package/dist/tsdown/{tsc-ChjRhsoQ.js → tsc-BFDF_Im9.js} +3 -3
  43. package/dist/tsdown/tsdown-css.js +5 -3
  44. package/dist/tsdown/tsdown-exe.js +4 -15
  45. package/dist/vite/client/bundledDevClient.mjs +75 -40
  46. package/dist/vite/client/client.mjs +288 -260
  47. package/dist/vite/node/chunks/build.js +19 -19
  48. package/dist/vite/node/chunks/node.js +32770 -32305
  49. package/dist/vite/node/chunks/postcss-import.js +10 -10
  50. package/dist/vite/node/cli.js +12 -8
  51. package/dist/vite/node/index.d.ts +1568 -1577
  52. package/dist/vite/node/index.js +1 -1
  53. package/dist/vite/node/module-runner.d.ts +1 -1
  54. package/dist/vite/node/module-runner.js +199 -200
  55. package/dist/vite/types/customEvent.d.ts +2 -0
  56. package/dist/vite/types/hmrPayload.d.ts +2 -0
  57. package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +2 -2
  58. package/dist/vite/types/internal/devtoolsOptions.d.ts +9 -0
  59. package/package.json +20 -23
  60. package/dist/tsdown/internal-D-JfB5uT.js +0 -29
  61. package/dist/tsdown/internal-lhH-5yya.js +0 -62
  62. package/dist/tsdown/version-CQ98ZBpL-Obdnv4J7.js +0 -141
@@ -1,93 +1,7 @@
1
- import { a as namespaces, i as enable, r as createDebug } from "./main-CyNcZUzu.js";
2
- import { createRequire } from "node:module";
1
+ import { a as namespaces, f as resolveComma, g as toArray, h as styleText$1, i as enable, r as createDebug, u as noop } from "./main-bgV9NlwM.js";
3
2
  import process from "node:process";
4
- import { styleText } from "node:util";
5
3
  import readline from "node:readline";
6
- const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
7
- function toArray(val, defaultValue) {
8
- if (Array.isArray(val)) return val;
9
- else if (val == null) {
10
- if (defaultValue) return [defaultValue];
11
- return [];
12
- } else return [val];
13
- }
14
- function resolveComma(arr) {
15
- return arr.flatMap((format) => format.split(","));
16
- }
17
- function resolveRegex(str) {
18
- if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
19
- return str;
20
- }
21
- function slash(string) {
22
- return string.replaceAll("\\", "/");
23
- }
24
- const noop = (v) => v;
25
- function matchPattern(id, patterns) {
26
- return patterns.some((pattern) => {
27
- if (pattern instanceof RegExp) {
28
- pattern.lastIndex = 0;
29
- return pattern.test(id);
30
- }
31
- return id === pattern || picomatch(pattern)(id);
32
- });
33
- }
34
- function pkgExists(moduleName) {
35
- try {
36
- import.meta.resolve(moduleName);
37
- return true;
38
- } catch {}
39
- return false;
40
- }
41
- async function importWithError(moduleName) {
42
- try {
43
- return await import(moduleName);
44
- } catch (error) {
45
- throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
46
- }
47
- }
48
- function createConcurrencyExecutor(concurrency) {
49
- if (concurrency == null) return (task) => task();
50
- if (!Number.isInteger(concurrency) || concurrency < 1) throw new TypeError("`--concurrency` must be a positive integer");
51
- const queue = [];
52
- let active = 0;
53
- return async (task) => {
54
- if (active >= concurrency) await new Promise((resolve) => queue.push(resolve));
55
- else active++;
56
- try {
57
- return await task();
58
- } finally {
59
- const next = queue.shift();
60
- if (next) next();
61
- else active--;
62
- }
63
- };
64
- }
65
- function debounce(fn, delay) {
66
- let timer;
67
- const debounced = (...args) => {
68
- clearTimeout(timer);
69
- timer = setTimeout(() => fn(...args), delay);
70
- };
71
- debounced.cancel = () => clearTimeout(timer);
72
- return debounced;
73
- }
74
- let supportRGB = !!process.stdout.hasColors?.(2 ** 24);
75
- if (supportRGB) try {
76
- styleText("#000", "");
77
- } catch {
78
- supportRGB = false;
79
- }
80
- const factory = (...formats) => new Proxy(styleText.bind(void 0, formats), { get: (_, format) => {
81
- if (format[0] === "#") {
82
- const [color, fallback] = format.split(",", 2);
83
- if (!supportRGB) return fallback ? factory(...formats, fallback) : factory(...formats);
84
- return factory(...formats, color);
85
- }
86
- return factory(...formats, format);
87
- } });
88
- const styleText$1 = factory();
89
- //#endregion
90
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/logger-D9XFzQl9.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/logger-D9XFzQl9.mjs
91
5
  const LogLevels = {
92
6
  silent: 0,
93
7
  error: 1,
@@ -230,7 +144,7 @@ function hue2rgb(p, q, t) {
230
144
  return p;
231
145
  }
232
146
  //#endregion
233
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/debug-CpC4hV25.mjs
147
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/debug-CpC4hV25.mjs
234
148
  var version = "0.23.0";
235
149
  const debugLog = createDebug("tsdown:debug");
236
150
  function enableDebug(debug) {
@@ -244,4 +158,4 @@ function enableDebug(debug) {
244
158
  debugLog("Debugging enabled", namespace);
245
159
  }
246
160
  //#endregion
247
- export { resolveRegex as _, createSuppressWarnings as a, toArray as b, globalLogger as c, debounce as d, importWithError as f, resolveComma as g, pkgExists as h, createLogger as i, prettyFormat as l, noop as m, version as n, generateColor as o, matchPattern as p, LogLevels as r, getNameLabel as s, enableDebug as t, createConcurrencyExecutor as u, slash as v, styleText$1 as y };
161
+ export { createSuppressWarnings as a, globalLogger as c, createLogger as i, prettyFormat as l, version as n, generateColor as o, LogLevels as r, getNameLabel as s, enableDebug as t };
@@ -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.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/detect-Bg-d8iUV.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/detect-Bg-d8iUV.mjs
5
5
  const AGENTS = [
6
6
  "npm",
7
7
  "yarn",
@@ -1,6 +1,6 @@
1
- import { r as createDebug } from "./main-CyNcZUzu.js";
2
- import { o as mt, s as te } from "./build-JVmLFaZt-kqQJ2U7s.js";
3
- import { a as RE_JSON, c as RE_TS, d as filename_to_dts, f as replaceTemplateName, i as RE_JS, l as filename_dts_to, n as RE_DTS, o as RE_NODE_MODULES, p as resolveTemplateFn, r as RE_DTS_MAP, s as RE_ROLLDOWN_RUNTIME, t as RE_CSS, u as filename_js_to_dts } from "./internal-D-JfB5uT.js";
1
+ import { r as createDebug } from "./main-bgV9NlwM.js";
2
+ import { C as filename_to_dts, S as filename_js_to_dts, T as resolveTemplateFn, _ as RE_JSON, b as RE_TS, g as RE_JS, h as RE_DTS_MAP, m as RE_DTS, p as RE_CSS, v as RE_NODE_MODULES, w as replaceTemplateName, x as filename_dts_to, y as RE_ROLLDOWN_RUNTIME } from "./target-DgdLrXba-DaJJ11xX.js";
3
+ import { o as mt, s as te } from "./build-JVmLFaZt-BN9yuB6k.js";
4
4
  import { createRequire } from "node:module";
5
5
  import process from "node:process";
6
6
  import { styleText } from "node:util";
@@ -1408,7 +1408,7 @@ var TscGenerator = class {
1408
1408
  this.worker = createTscWorker();
1409
1409
  return;
1410
1410
  }
1411
- this.tscModule = await import("./tsc-ChjRhsoQ.js");
1411
+ this.tscModule = await import("./tsc-BFDF_Im9.js");
1412
1412
  if (this.newContext) this.context = createContext();
1413
1413
  }
1414
1414
  async emit(_code, fileName) {
@@ -2952,7 +2952,7 @@ function createDtsResolvePlugin({ cwd, tsconfig, tsconfigRaw, resolver, sideEffe
2952
2952
  async function resolveDtsPath(id, importer, rolldownResolution) {
2953
2953
  let dtsPath;
2954
2954
  if (resolver === "tsc") {
2955
- const { tscResolve } = await import("./resolver-DE0_sy8o-ZQqHQjRu.js");
2955
+ const { tscResolve } = await import("./resolver-DE0_sy8o-UMsN-SXx.js");
2956
2956
  dtsPath = tscResolve(id, importer, cwd, tsconfig, tsconfigRaw);
2957
2957
  } else dtsPath = baseDtsResolver(id, importer);
2958
2958
  debug$1("Using %s for dts import: %O -> %O", resolver, id, dtsPath);
@@ -2,7 +2,55 @@ import { TransformOptions } from "lightningcss";
2
2
  import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
3
3
  import { BuildOptions, ChecksOptions, ExternalOption, InputOptions, InternalModuleFormat, MinifyOptions, ModuleFormat, ModuleTypes, OutputAsset, OutputChunk, OutputOptions, Plugin, RolldownPlugin, TreeshakingOptions } from "@voidzero-dev/vite-plus-core/rolldown";
4
4
  import { IsolatedDeclarationsOptions } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
5
- //#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.26__postcss-modules@9.0_5274324ff2ff6c48cc66985619453a8b/node_modules/@tsdown/css/dist/index.d.mts
5
+ //#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
6
+ //#region src/platform.d.ts
7
+ type ExePlatform = "win" | "darwin" | "linux";
8
+ type ExeArch = "x64" | "arm64";
9
+ interface ExeTarget {
10
+ platform: ExePlatform;
11
+ arch: ExeArch;
12
+ /**
13
+ * Node.js version to use for the executable.
14
+ *
15
+ * Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
16
+ * `"latest"` / `"latest-lts"` which resolve the version automatically from
17
+ * {@link https://nodejs.org/dist/index.json}.
18
+ *
19
+ * The minimum required version is 25.7.0, which is when ESM entry point
20
+ * support was added to Node.js SEA.
21
+ */
22
+ nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
23
+ }
24
+ interface ExeExtensionOptions$1 {
25
+ /**
26
+ * Cross-platform targets for building executables.
27
+ * Requires `@tsdown/exe` to be installed.
28
+ * When specified, builds an executable for each target platform/arch combination.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * targets: [
33
+ * { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
34
+ * { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
35
+ * { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
36
+ * ]
37
+ * ```
38
+ */
39
+ targets?: ExeTarget[];
40
+ /**
41
+ * Customize the download URL for Node.js binaries, e.g. to use a mirror.
42
+ * Defaults to downloading from {@link https://nodejs.org/dist/}.
43
+ */
44
+ getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
45
+ /**
46
+ * URL of the Node.js release index used to resolve the `latest` and
47
+ * `latest-lts` versions.
48
+ * @default 'https://nodejs.org/dist/index.json'
49
+ */
50
+ nodeDistIndexUrl?: string;
51
+ }
52
+ //#endregion
53
+ //#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.28__postcss-modules@9.0_e1d5b637aa455af0c2e0c072fcd26c64/node_modules/@tsdown/css/dist/index.d.mts
6
54
  //#region src/options.d.ts
7
55
  type LightningCSSOptions = Omit<TransformOptions<any>, "filename" | "code">;
8
56
  type CSSModulesLocalsConvention = "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly" | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
@@ -1290,55 +1338,7 @@ interface TsgoOptions {
1290
1338
  path?: string;
1291
1339
  }
1292
1340
  //#endregion
1293
- //#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.d.mts
1294
- //#region src/platform.d.ts
1295
- type ExePlatform = "win" | "darwin" | "linux";
1296
- type ExeArch = "x64" | "arm64";
1297
- interface ExeTarget {
1298
- platform: ExePlatform;
1299
- arch: ExeArch;
1300
- /**
1301
- * Node.js version to use for the executable.
1302
- *
1303
- * Accepts a valid semver string (e.g., `"25.7.0"`), or the special values
1304
- * `"latest"` / `"latest-lts"` which resolve the version automatically from
1305
- * {@link https://nodejs.org/dist/index.json}.
1306
- *
1307
- * The minimum required version is 25.7.0, which is when ESM entry point
1308
- * support was added to Node.js SEA.
1309
- */
1310
- nodeVersion: (string & {}) | "latest" | "latest-lts" | `${string}.${string}.${string}`;
1311
- }
1312
- interface ExeExtensionOptions$1 {
1313
- /**
1314
- * Cross-platform targets for building executables.
1315
- * Requires `@tsdown/exe` to be installed.
1316
- * When specified, builds an executable for each target platform/arch combination.
1317
- *
1318
- * @example
1319
- * ```ts
1320
- * targets: [
1321
- * { platform: 'linux', arch: 'x64', nodeVersion: '25.7.0' },
1322
- * { platform: 'darwin', arch: 'arm64', nodeVersion: '25.7.0' },
1323
- * { platform: 'win', arch: 'x64', nodeVersion: '25.7.0' },
1324
- * ]
1325
- * ```
1326
- */
1327
- targets?: ExeTarget[];
1328
- /**
1329
- * Customize the download URL for Node.js binaries, e.g. to use a mirror.
1330
- * Defaults to downloading from {@link https://nodejs.org/dist/}.
1331
- */
1332
- getDownloadUrl?: (target: ExeTarget) => string | Promise<string>;
1333
- /**
1334
- * URL of the Node.js release index used to resolve the `latest` and
1335
- * `latest-lts` versions.
1336
- * @default 'https://nodejs.org/dist/index.json'
1337
- */
1338
- nodeDistIndexUrl?: string;
1339
- }
1340
- //#endregion
1341
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
1341
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/types-CYHmmaKd.d.mts
1342
1342
  //#region src/utils/types.d.ts
1343
1343
  type Overwrite<T, U> = Omit<T, keyof U> & U;
1344
1344
  type Awaitable<T> = T | Promise<T>;
@@ -2780,7 +2780,7 @@ type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, "workspace" | "from
2780
2780
  exe: false | ExeOptions;
2781
2781
  }>;
2782
2782
  //#endregion
2783
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/config-DR1wR8P-.d.mts
2783
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/config-DR1wR8P-.d.mts
2784
2784
  //#region src/config/options.d.ts
2785
2785
  /**
2786
2786
  * Resolve user config into resolved configs
@@ -2801,7 +2801,7 @@ declare function defineConfig(options: UserConfig[]): UserConfig[];
2801
2801
  declare function defineConfig(options: UserConfigFn): UserConfigFn;
2802
2802
  declare function defineConfig(options: UserConfigExport): UserConfigExport;
2803
2803
  //#endregion
2804
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/index.d.mts
2804
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/index.d.mts
2805
2805
  //#region src/build.d.ts
2806
2806
  /**
2807
2807
  * Build with tsdown.
@@ -1,12 +1,12 @@
1
- import { c as globalLogger, n as version$1, t as enableDebug } from "./debug-CpC4hV25-tvH_Dsg5.js";
2
- import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-JVmLFaZt-kqQJ2U7s.js";
1
+ import { c as globalLogger, n as version$1, t as enableDebug } from "./debug-CpC4hV25-BeCITV83.js";
2
+ import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-JVmLFaZt-BN9yuB6k.js";
3
3
  import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
4
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/config.mjs
4
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/config.mjs
5
5
  function defineConfig(options) {
6
6
  return options;
7
7
  }
8
8
  //#endregion
9
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/index.mjs
9
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/index.mjs
10
10
  const version = version$1;
11
11
  //#endregion
12
12
  export { Rolldown, build$1 as build, buildWithConfigs, defineConfig, enableDebug, globalLogger, mergeConfig, resolveUserConfig, version };
@@ -0,0 +1,3 @@
1
+ import "./main-bgV9NlwM.js";
2
+ import "./target-DgdLrXba-DaJJ11xX.js";
3
+ export {};
@@ -1,5 +1,6 @@
1
- import { cwd } from "node:process";
2
- import { formatWithOptions, inspect } from "node:util";
1
+ import { createRequire } from "node:module";
2
+ import process$1, { cwd } from "node:process";
3
+ import { formatWithOptions, inspect, styleText } from "node:util";
3
4
  import readline from "node:readline";
4
5
  import { isatty } from "node:tty";
5
6
  import { spawn } from "node:child_process";
@@ -8,6 +9,90 @@ import { fileURLToPath } from "node:url";
8
9
  import { pipeline } from "node:stream/promises";
9
10
  import { PassThrough } from "node:stream";
10
11
  import { closeSync, openSync, readSync, statSync } from "node:fs";
12
+ const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
13
+ function toArray(val, defaultValue) {
14
+ if (Array.isArray(val)) return val;
15
+ else if (val == null) {
16
+ if (defaultValue) return [defaultValue];
17
+ return [];
18
+ } else return [val];
19
+ }
20
+ function resolveComma(arr) {
21
+ return arr.flatMap((format) => format.split(","));
22
+ }
23
+ function resolveRegex(str) {
24
+ if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
25
+ return str;
26
+ }
27
+ function slash(string) {
28
+ return string.replaceAll("\\", "/");
29
+ }
30
+ const noop = (v) => v;
31
+ function matchPattern(id, patterns) {
32
+ return patterns.some((pattern) => {
33
+ if (pattern instanceof RegExp) {
34
+ pattern.lastIndex = 0;
35
+ return pattern.test(id);
36
+ }
37
+ return id === pattern || picomatch(pattern)(id);
38
+ });
39
+ }
40
+ function pkgExists(moduleName) {
41
+ try {
42
+ import.meta.resolve(moduleName);
43
+ return true;
44
+ } catch {}
45
+ return false;
46
+ }
47
+ async function importWithError(moduleName) {
48
+ try {
49
+ return await import(moduleName);
50
+ } catch (error) {
51
+ throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
52
+ }
53
+ }
54
+ function createConcurrencyExecutor(concurrency) {
55
+ if (concurrency == null) return (task) => task();
56
+ if (!Number.isInteger(concurrency) || concurrency < 1) throw new TypeError("`--concurrency` must be a positive integer");
57
+ const queue = [];
58
+ let active = 0;
59
+ return async (task) => {
60
+ if (active >= concurrency) await new Promise((resolve) => queue.push(resolve));
61
+ else active++;
62
+ try {
63
+ return await task();
64
+ } finally {
65
+ const next = queue.shift();
66
+ if (next) next();
67
+ else active--;
68
+ }
69
+ };
70
+ }
71
+ function debounce(fn, delay) {
72
+ let timer;
73
+ const debounced = (...args) => {
74
+ clearTimeout(timer);
75
+ timer = setTimeout(() => fn(...args), delay);
76
+ };
77
+ debounced.cancel = () => clearTimeout(timer);
78
+ return debounced;
79
+ }
80
+ let supportRGB = !!process$1.stdout.hasColors?.(2 ** 24);
81
+ if (supportRGB) try {
82
+ styleText("#000", "");
83
+ } catch {
84
+ supportRGB = false;
85
+ }
86
+ const factory = (...formats) => new Proxy(styleText.bind(void 0, formats), { get: (_, format) => {
87
+ if (format[0] === "#") {
88
+ const [color, fallback] = format.split(",", 2);
89
+ if (!supportRGB) return fallback ? factory(...formats, fallback) : factory(...formats);
90
+ return factory(...formats, color);
91
+ }
92
+ return factory(...formats, format);
93
+ } });
94
+ const styleText$1 = factory();
95
+ //#endregion
11
96
  //#region ../../node_modules/.pnpm/obug@2.1.4/node_modules/obug/dist/core.js
12
97
  /**
13
98
  * Coerce `value`.
@@ -652,4 +737,4 @@ const x = (command, args, userOptions) => {
652
737
  };
653
738
  const exec = x;
654
739
  //#endregion
655
- export { namespaces as a, enable as i, x as n, createDebug as r, exec as t };
740
+ export { namespaces as a, importWithError as c, pkgExists as d, resolveComma as f, toArray as g, styleText$1 as h, enable as i, matchPattern as l, slash as m, x as n, createConcurrencyExecutor as o, resolveRegex as p, createDebug as r, debounce as s, exec as t, noop as u };
@@ -1,5 +1,5 @@
1
- import { r as createDebug } from "./main-CyNcZUzu.js";
2
- import { t as requireTSApi } from "./dist-Cuw3Ngo4.js";
1
+ import { r as createDebug } from "./main-bgV9NlwM.js";
2
+ import { t as requireTSApi } from "./dist-ByW_jJfv.js";
3
3
  import path from "node:path";
4
4
  //#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/resolver-DE0_sy8o.mjs
5
5
  const debug = createDebug("rolldown-plugin-dts:tsc-resolver");
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { c as globalLogger, n as version, t as enableDebug, y as styleText$1 } from "./debug-CpC4hV25-tvH_Dsg5.js";
3
- import { n as x } from "./main-CyNcZUzu.js";
2
+ import { h as styleText$1, n as x } from "./main-bgV9NlwM.js";
3
+ import { c as globalLogger, n as version, t as enableDebug } from "./debug-CpC4hV25-BeCITV83.js";
4
4
  import module from "node:module";
5
5
  import process$1 from "node:process";
6
6
  import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
@@ -622,7 +622,7 @@ var CAC = class extends EventTarget {
622
622
  */
623
623
  const cac = (name = "") => new CAC(name);
624
624
  //#endregion
625
- //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_b65333c86244131b40077d6429604210/node_modules/tsdown/dist/run.mjs
625
+ //#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/run.mjs
626
626
  const cli = cac("tsdown");
627
627
  cli.help().version(version);
628
628
  cli.command("[...files]", "Bundle files", {
@@ -631,7 +631,7 @@ cli.command("[...files]", "Bundle files", {
631
631
  }).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("--concurrency <count>", "Maximum number of Rolldown builds to run in parallel").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
632
632
  globalLogger.level = flags.logLevel || "info";
633
633
  globalLogger.info(`${styleText$1.blue(`tsdown v${version}`)} powered by ${styleText$1["#ff7e17,yellow"](`rolldown v${VERSION}`)}`);
634
- const { build } = await import("./build-JVmLFaZt-kqQJ2U7s.js").then((n) => n.r).then((n) => n.r);
634
+ const { build } = await import("./build-JVmLFaZt-BN9yuB6k.js").then((n) => n.r).then((n) => n.r);
635
635
  if (input.length > 0) flags.entry = input;
636
636
  await build(flags);
637
637
  });
@@ -345,7 +345,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
345
345
  };
346
346
  }));
347
347
  //#endregion
348
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
348
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
349
349
  var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
350
350
  const { createRequire } = __require("node:module");
351
351
  const { pathToFileURL } = __require("node:url");
@@ -387,7 +387,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
387
387
  module.exports = req;
388
388
  }));
389
389
  //#endregion
390
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
390
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
391
391
  var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
392
392
  const req = require_req();
393
393
  /**
@@ -421,7 +421,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
421
421
  module.exports = options;
422
422
  }));
423
423
  //#endregion
424
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
424
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
425
425
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
426
426
  const req = require_req();
427
427
  /**
@@ -475,7 +475,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
475
475
  module.exports = plugins;
476
476
  }));
477
477
  //#endregion
478
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
478
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.13_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
479
479
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
480
480
  const { resolve } = __require("node:path");
481
481
  const config = require_src$1();