@voidzero-dev/vite-plus-core 0.1.17-alpha.3 → 0.1.17-alpha.5

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.
@@ -1,8 +1,8 @@
1
- import { c as globalLogger } from "./main-CSVR9Fv3.js";
2
- import { t as enableDebug } from "./debug-BmAPbhgA-x0WPncIH.js";
3
- import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-DU-BFLB1-C3nlWMI9.js";
1
+ import { c as globalLogger } from "./main-Ccx2FDJq.js";
2
+ import { t as enableDebug } from "./debug-CLlnG64L-CvIUyX2c.js";
3
+ import { a as resolveUserConfig, i as mergeConfig, n as buildWithConfigs, t as build$1 } from "./build-y6nUUkVJ-DChPSMiT.js";
4
4
  import * as Rolldown from "@voidzero-dev/vite-plus-core/rolldown";
5
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/config.mjs
5
+ //#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/config.mjs
6
6
  function defineConfig(options) {
7
7
  return options;
8
8
  }
@@ -4,8 +4,9 @@ import process$1, { cwd } from "node:process";
4
4
  import readline from "node:readline";
5
5
  import { spawn } from "node:child_process";
6
6
  import { delimiter, dirname, normalize, resolve } from "node:path";
7
+ import { pipeline } from "node:stream/promises";
7
8
  import { PassThrough } from "node:stream";
8
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/general-D3muxt2f.mjs
9
+ //#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/general-D3muxt2f.mjs
9
10
  const picomatch = createRequire(import.meta.url)("picomatch");
10
11
  function toArray(val, defaultValue) {
11
12
  if (Array.isArray(val)) return val;
@@ -169,7 +170,7 @@ const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible,
169
170
  module.exports = w, w.default = w;
170
171
  })))(), 1)).default;
171
172
  //#endregion
172
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/logger-uV8l1UFa.mjs
173
+ //#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/logger-uV8l1UFa.mjs
173
174
  const LogLevels = {
174
175
  silent: 0,
175
176
  error: 1,
@@ -293,70 +294,68 @@ function hue2rgb(p, q, t) {
293
294
  return p;
294
295
  }
295
296
  //#endregion
296
- //#region ../../node_modules/.pnpm/tsdown@0.21.7_@arethetypeswrong+core@0.18.2_@tsdown+css@0.21.7_@tsdown+exe@0.21.7_@type_40fa21a6dd0aac837d14f6503ecc360a/node_modules/tsdown/dist/package-CBgnLfjl.mjs
297
- var version = "0.21.7";
297
+ //#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/package-yVk5dXcU.mjs
298
+ var version = "0.21.8";
298
299
  //#endregion
299
- //#region ../../node_modules/.pnpm/tinyexec@1.0.4/node_modules/tinyexec/dist/main.mjs
300
- var l = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
301
- var u = /* @__PURE__ */ createRequire(import.meta.url);
302
- const d = /^path$/i;
303
- const f = {
300
+ //#region ../../node_modules/.pnpm/tinyexec@1.1.1/node_modules/tinyexec/dist/main.mjs
301
+ var d = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
302
+ var f = /* @__PURE__ */ createRequire(import.meta.url);
303
+ const p = /^path$/i;
304
+ const m = {
304
305
  key: "PATH",
305
306
  value: ""
306
307
  };
307
- function p(e) {
308
+ function h(e) {
308
309
  for (const t in e) {
309
- if (!Object.prototype.hasOwnProperty.call(e, t) || !d.test(t)) continue;
310
+ if (!Object.prototype.hasOwnProperty.call(e, t) || !p.test(t)) continue;
310
311
  const n = e[t];
311
- if (!n) return f;
312
+ if (!n) return m;
312
313
  return {
313
314
  key: t,
314
315
  value: n
315
316
  };
316
317
  }
317
- return f;
318
+ return m;
318
319
  }
319
- function m(e, t) {
320
- const i = t.value.split(delimiter);
321
- const o = [];
320
+ function g(e, t) {
321
+ const n = t.value.split(delimiter);
322
+ const a = [];
322
323
  let s = e;
323
324
  let c;
324
325
  do {
325
- o.push(resolve(s, "node_modules", ".bin"));
326
+ a.push(resolve(s, "node_modules", ".bin"));
326
327
  c = s;
327
328
  s = dirname(s);
328
329
  } while (s !== c);
329
- const l = o.concat(i).join(delimiter);
330
+ a.push(dirname(process.execPath));
331
+ const l = a.concat(n).join(delimiter);
330
332
  return {
331
333
  key: t.key,
332
334
  value: l
333
335
  };
334
336
  }
335
- function h(e, t) {
337
+ function _(e, t) {
336
338
  const n = {
337
339
  ...process.env,
338
340
  ...t
339
341
  };
340
- const r = m(e, p(n));
342
+ const r = g(e, h(n));
341
343
  n[r.key] = r.value;
342
344
  return n;
343
345
  }
344
- const g = (e) => {
346
+ const v = (e) => {
345
347
  let t = e.length;
346
348
  const n = new PassThrough();
347
349
  const r = () => {
348
- if (--t === 0) n.emit("end");
350
+ if (--t === 0) n.end();
349
351
  };
350
- for (const t of e) {
351
- t.pipe(n, { end: false });
352
- t.on("end", r);
353
- }
352
+ for (const t of e) pipeline(t, n, { end: false }).then(r).catch(r);
354
353
  return n;
355
354
  };
356
- var _ = /* @__PURE__ */ l(((e, t) => {
355
+ var y = /* @__PURE__ */ d(((e, t) => {
357
356
  t.exports = a;
358
357
  a.sync = o;
359
- var n = u("fs");
358
+ var n = f("fs");
360
359
  function r(e, t) {
361
360
  var n = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
362
361
  if (!n) return true;
@@ -381,10 +380,10 @@ var _ = /* @__PURE__ */ l(((e, t) => {
381
380
  return i(n.statSync(e), e, t);
382
381
  }
383
382
  }));
384
- var v = /* @__PURE__ */ l(((e, t) => {
383
+ var b = /* @__PURE__ */ d(((e, t) => {
385
384
  t.exports = r;
386
385
  r.sync = i;
387
- var n = u("fs");
386
+ var n = f("fs");
388
387
  function r(e, t, r) {
389
388
  n.stat(e, function(e, n) {
390
389
  r(e, e ? false : a(n, t));
@@ -409,11 +408,11 @@ var v = /* @__PURE__ */ l(((e, t) => {
409
408
  return n & l || n & c && i === o || n & s && r === a || n & u && a === 0;
410
409
  }
411
410
  }));
412
- var y = /* @__PURE__ */ l(((e, t) => {
413
- u("fs");
411
+ var x = /* @__PURE__ */ d(((e, t) => {
412
+ f("fs");
414
413
  var n;
415
- if (process.platform === "win32" || global.TESTING_WINDOWS) n = _();
416
- else n = v();
414
+ if (process.platform === "win32" || global.TESTING_WINDOWS) n = y();
415
+ else n = b();
417
416
  t.exports = r;
418
417
  r.sync = i;
419
418
  function r(e, t, i) {
@@ -449,11 +448,11 @@ var y = /* @__PURE__ */ l(((e, t) => {
449
448
  }
450
449
  }
451
450
  }));
452
- var b = /* @__PURE__ */ l(((e, t) => {
451
+ var S = /* @__PURE__ */ d(((e, t) => {
453
452
  const n = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
454
- const r = u("path");
453
+ const r = f("path");
455
454
  const i = n ? ";" : ":";
456
- const a = y();
455
+ const a = x();
457
456
  const o = (e) => Object.assign(/* @__PURE__ */ new Error(`not found: ${e}`), { code: "ENOENT" });
458
457
  const s = (e, t) => {
459
458
  const r = t.colon || i;
@@ -519,7 +518,7 @@ var b = /* @__PURE__ */ l(((e, t) => {
519
518
  t.exports = c;
520
519
  c.sync = l;
521
520
  }));
522
- var x = /* @__PURE__ */ l(((e, t) => {
521
+ var C = /* @__PURE__ */ d(((e, t) => {
523
522
  const n = (e = {}) => {
524
523
  const t = e.env || process.env;
525
524
  if ((e.platform || process.platform) !== "win32") return "PATH";
@@ -528,10 +527,10 @@ var x = /* @__PURE__ */ l(((e, t) => {
528
527
  t.exports = n;
529
528
  t.exports.default = n;
530
529
  }));
531
- var S = /* @__PURE__ */ l(((e, t) => {
532
- const n = u("path");
533
- const r = b();
534
- const i = x();
530
+ var w = /* @__PURE__ */ d(((e, t) => {
531
+ const n = f("path");
532
+ const r = S();
533
+ const i = C();
535
534
  function a(e, t) {
536
535
  const a = e.options.env || process.env;
537
536
  const o = process.cwd();
@@ -557,7 +556,7 @@ var S = /* @__PURE__ */ l(((e, t) => {
557
556
  }
558
557
  t.exports = o;
559
558
  }));
560
- var C = /* @__PURE__ */ l(((e, t) => {
559
+ var T = /* @__PURE__ */ d(((e, t) => {
561
560
  const n = /([()\][%!^"`<>&|;, *?])/g;
562
561
  function r(e) {
563
562
  e = e.replace(n, "^$1");
@@ -575,11 +574,11 @@ var C = /* @__PURE__ */ l(((e, t) => {
575
574
  t.exports.command = r;
576
575
  t.exports.argument = i;
577
576
  }));
578
- var w = /* @__PURE__ */ l(((e, t) => {
577
+ var E = /* @__PURE__ */ d(((e, t) => {
579
578
  t.exports = /^#!(.*)/;
580
579
  }));
581
- var T = /* @__PURE__ */ l(((e, t) => {
582
- const n = w();
580
+ var D = /* @__PURE__ */ d(((e, t) => {
581
+ const n = E();
583
582
  t.exports = (e = "") => {
584
583
  const t = e.match(n);
585
584
  if (!t) return null;
@@ -589,9 +588,9 @@ var T = /* @__PURE__ */ l(((e, t) => {
589
588
  return i ? `${a} ${i}` : a;
590
589
  };
591
590
  }));
592
- var E = /* @__PURE__ */ l(((e, t) => {
593
- const n = u("fs");
594
- const r = T();
591
+ var O = /* @__PURE__ */ d(((e, t) => {
592
+ const n = f("fs");
593
+ const r = D();
595
594
  function i(e) {
596
595
  const t = 150;
597
596
  const i = Buffer.alloc(t);
@@ -605,11 +604,11 @@ var E = /* @__PURE__ */ l(((e, t) => {
605
604
  }
606
605
  t.exports = i;
607
606
  }));
608
- var D = /* @__PURE__ */ l(((e, t) => {
609
- const n = u("path");
610
- const r = S();
611
- const i = C();
612
- const a = E();
607
+ var k = /* @__PURE__ */ d(((e, t) => {
608
+ const n = f("path");
609
+ const r = w();
610
+ const i = T();
611
+ const a = O();
613
612
  const o = process.platform === "win32";
614
613
  const s = /\.(?:com|exe)$/i;
615
614
  const c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
@@ -623,7 +622,7 @@ var D = /* @__PURE__ */ l(((e, t) => {
623
622
  }
624
623
  return e.file;
625
624
  }
626
- function d(e) {
625
+ function u(e) {
627
626
  if (!o) return e;
628
627
  const t = l(e);
629
628
  const r = !s.test(t);
@@ -643,7 +642,7 @@ var D = /* @__PURE__ */ l(((e, t) => {
643
642
  }
644
643
  return e;
645
644
  }
646
- function f(e, t, n) {
645
+ function d(e, t, n) {
647
646
  if (t && !Array.isArray(t)) {
648
647
  n = t;
649
648
  t = null;
@@ -660,11 +659,11 @@ var D = /* @__PURE__ */ l(((e, t) => {
660
659
  args: t
661
660
  }
662
661
  };
663
- return n.shell ? r : d(r);
662
+ return n.shell ? r : u(r);
664
663
  }
665
- t.exports = f;
664
+ t.exports = d;
666
665
  }));
667
- var O = /* @__PURE__ */ l(((e, t) => {
666
+ var A = /* @__PURE__ */ d(((e, t) => {
668
667
  const n = process.platform === "win32";
669
668
  function r(e, t) {
670
669
  return Object.assign(/* @__PURE__ */ new Error(`${t} ${e.command} ENOENT`), {
@@ -701,10 +700,10 @@ var O = /* @__PURE__ */ l(((e, t) => {
701
700
  notFoundError: r
702
701
  };
703
702
  }));
704
- var A = (/* @__PURE__ */ l(((e, t) => {
705
- const n = u("child_process");
706
- const r = D();
707
- const i = O();
703
+ var M = (/* @__PURE__ */ d(((e, t) => {
704
+ const n = f("child_process");
705
+ const r = k();
706
+ const i = A();
708
707
  function a(e, t, a) {
709
708
  const o = r(e, t, a);
710
709
  const s = n.spawn(o.command, o.args, o.options);
@@ -723,9 +722,7 @@ var A = (/* @__PURE__ */ l(((e, t) => {
723
722
  t.exports._parse = r;
724
723
  t.exports._enoent = i;
725
724
  })))();
726
- var j = class extends Error {
727
- result;
728
- output;
725
+ var N = class extends Error {
729
726
  get exitCode() {
730
727
  if (this.result.exitCode !== null) return this.result.exitCode;
731
728
  }
@@ -735,18 +732,18 @@ var j = class extends Error {
735
732
  this.output = t;
736
733
  }
737
734
  };
738
- const M = {
735
+ const F = {
739
736
  timeout: void 0,
740
737
  persist: false
741
738
  };
742
- const N = { windowsHide: true };
743
- function P(e, t) {
739
+ const L = { windowsHide: true };
740
+ function R(e, t) {
744
741
  return {
745
742
  command: normalize(e),
746
743
  args: t ?? []
747
744
  };
748
745
  }
749
- function F(e) {
746
+ function z(e) {
750
747
  const t = new AbortController();
751
748
  for (const n of e) {
752
749
  if (n.aborted) {
@@ -760,12 +757,14 @@ function F(e) {
760
757
  }
761
758
  return t.signal;
762
759
  }
763
- async function I(e) {
760
+ async function B(e) {
764
761
  let t = "";
765
- for await (const n of e) t += n.toString();
762
+ try {
763
+ for await (const n of e) t += n.toString();
764
+ } catch {}
766
765
  return t;
767
766
  }
768
- var L = class {
767
+ var V = class {
769
768
  _process;
770
769
  _aborted = false;
771
770
  _options;
@@ -785,7 +784,7 @@ var L = class {
785
784
  }
786
785
  constructor(e, t, n) {
787
786
  this._options = {
788
- ...M,
787
+ ...F,
789
788
  ...n
790
789
  };
791
790
  this._command = e;
@@ -804,7 +803,7 @@ var L = class {
804
803
  return this._process?.killed === true;
805
804
  }
806
805
  pipe(e, t, n) {
807
- return z(e, t, {
806
+ return W(e, t, {
808
807
  ...n,
809
808
  stdin: this
810
809
  });
@@ -815,29 +814,30 @@ var L = class {
815
814
  const t = [];
816
815
  if (this._streamErr) t.push(this._streamErr);
817
816
  if (this._streamOut) t.push(this._streamOut);
818
- const n = g(t);
817
+ const n = v(t);
819
818
  const r = readline.createInterface({ input: n });
820
819
  for await (const e of r) yield e.toString();
821
820
  await this._processClosed;
822
821
  e.removeAllListeners();
823
822
  if (this._thrownError) throw this._thrownError;
824
- if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new j(this);
823
+ if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new N(this);
825
824
  }
826
825
  async _waitForOutput() {
827
826
  const e = this._process;
828
827
  if (!e) throw new Error("No process was started");
829
- const [t, n] = await Promise.all([this._streamOut ? I(this._streamOut) : "", this._streamErr ? I(this._streamErr) : ""]);
828
+ const [t, n] = await Promise.all([this._streamOut ? B(this._streamOut) : "", this._streamErr ? B(this._streamErr) : ""]);
830
829
  await this._processClosed;
831
- if (this._options?.stdin) await this._options.stdin;
830
+ const { stdin: r } = this._options;
831
+ if (r && typeof r !== "string") await r;
832
832
  e.removeAllListeners();
833
833
  if (this._thrownError) throw this._thrownError;
834
- const r = {
834
+ const i = {
835
835
  stderr: n,
836
836
  stdout: t,
837
837
  exitCode: this.exitCode
838
838
  };
839
- if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new j(this, r);
840
- return r;
839
+ if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new N(this, i);
840
+ return i;
841
841
  }
842
842
  then(e, t) {
843
843
  return this._waitForOutput().then(e, t);
@@ -848,7 +848,7 @@ var L = class {
848
848
  const e = cwd();
849
849
  const n = this._options;
850
850
  const r = {
851
- ...N,
851
+ ...L,
852
852
  ...n.nodeOptions
853
853
  };
854
854
  const i = [];
@@ -856,19 +856,20 @@ var L = class {
856
856
  if (n.timeout !== void 0) i.push(AbortSignal.timeout(n.timeout));
857
857
  if (n.signal !== void 0) i.push(n.signal);
858
858
  if (n.persist === true) r.detached = true;
859
- if (i.length > 0) r.signal = F(i);
860
- r.env = h(e, r.env);
861
- const { command: a, args: s } = P(this._command, this._args);
862
- const c = (0, A._parse)(a, s, r);
859
+ if (i.length > 0) r.signal = z(i);
860
+ r.env = _(e, r.env);
861
+ const { command: a, args: o } = R(this._command, this._args);
862
+ const c = (0, M._parse)(a, o, r);
863
863
  const l = spawn(c.command, c.args, c.options);
864
864
  if (l.stderr) this._streamErr = l.stderr;
865
865
  if (l.stdout) this._streamOut = l.stdout;
866
866
  this._process = l;
867
867
  l.once("error", this._onError);
868
868
  l.once("close", this._onClose);
869
- if (n.stdin !== void 0 && l.stdin && n.stdin.process) {
870
- const { stdout: e } = n.stdin.process;
871
- if (e) e.pipe(l.stdin);
869
+ if (l.stdin) {
870
+ const { stdin: e } = n;
871
+ if (typeof e === "string") l.stdin.end(e);
872
+ else e?.process?.stdout?.pipe(l.stdin);
872
873
  }
873
874
  }
874
875
  _resetState() {
@@ -889,11 +890,11 @@ var L = class {
889
890
  if (this._resolveClose) this._resolveClose();
890
891
  };
891
892
  };
892
- const R = (e, t, n) => {
893
- const r = new L(e, t, n);
893
+ const U = (e, t, n) => {
894
+ const r = new V(e, t, n);
894
895
  r.spawn();
895
896
  return r;
896
897
  };
897
- const z = R;
898
+ const W = U;
898
899
  //#endregion
899
- export { promiseWithResolvers as C, toArray as D, slash as E, pkgExists as S, resolveRegex as T, yellow as _, createLogger as a, matchPattern as b, globalLogger as c, bold as d, dim as f, underline as g, red as h, LogLevels as i, prettyFormat as l, hex as m, z as n, generateColor as o, green as p, version as r, getNameLabel as s, R as t, blue as u, debounce as v, resolveComma as w, noop as x, importWithError as y };
900
+ export { promiseWithResolvers as C, toArray as D, slash as E, pkgExists as S, resolveRegex as T, yellow as _, createLogger as a, matchPattern as b, globalLogger as c, bold as d, dim as f, underline as g, red as h, LogLevels as i, prettyFormat as l, hex as m, W as n, generateColor as o, green as p, version as r, getNameLabel as s, U as t, blue as u, debounce as v, resolveComma as w, noop as x, importWithError as y };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { _ as yellow, c as globalLogger, m as hex, r as version, t as R, u as blue } from "./main-CSVR9Fv3.js";
3
- import { t as enableDebug } from "./debug-BmAPbhgA-x0WPncIH.js";
2
+ import { _ as yellow, c as globalLogger, m as hex, r as version, t as U, u as blue } from "./main-Ccx2FDJq.js";
3
+ import { t as enableDebug } from "./debug-CLlnG64L-CvIUyX2c.js";
4
4
  import module, { createRequire } from "node:module";
5
5
  import process$1 from "node:process";
6
6
  import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
@@ -630,13 +630,13 @@ cli.command("[...files]", "Bundle files", {
630
630
  }).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate export-related metadata for package.json (experimental)").action(async (input, flags) => {
631
631
  globalLogger.level = flags.logLevel || "info";
632
632
  globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
633
- const { build } = await import("./build-DU-BFLB1-B93ygiSG.js").then((n) => n.r);
633
+ const { build } = await import("./build-y6nUUkVJ-CXW65uEP.js").then((n) => n.r);
634
634
  if (input.length > 0) flags.entry = input;
635
635
  await build(flags);
636
636
  });
637
637
  cli.command("create", "[deprecated] Create a tsdown project. Use \"npx create-tsdown\" instead.", { allowUnknownOptions: true }).action(async () => {
638
638
  globalLogger.warn(`"tsdown create" is deprecated. Please use "npx create-tsdown" instead.`);
639
- const { exitCode } = await R("npx", [
639
+ const { exitCode } = await U("npx", [
640
640
  "-y",
641
641
  "create-tsdown@latest",
642
642
  ...process$1.argv.slice(3)
@@ -645,7 +645,7 @@ cli.command("create", "[deprecated] Create a tsdown project. Use \"npx create-ts
645
645
  });
646
646
  cli.command("migrate", "[deprecated] Migrate from tsup to tsdown. Use \"npx tsdown-migrate\" instead.", { allowUnknownOptions: true }).action(async () => {
647
647
  globalLogger.warn(`"tsdown migrate" is deprecated. Please use "npx tsdown-migrate" instead.`);
648
- const { exitCode } = await R("npx", [
648
+ const { exitCode } = await U("npx", [
649
649
  "-y",
650
650
  "tsdown-migrate@latest",
651
651
  ...process$1.argv.slice(3)