rolldown 1.0.0-beta.6 → 1.0.0-beta.6-commit.231bdea

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/cli.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Pitn1YVy.cjs');
4
- const require_parse_ast_index = require('../shared/parse-ast-index-D7XtMFo4.cjs');
3
+ const require_src = require('../shared/src-ChN-bJhZ.cjs');
4
+ const require_parse_ast_index = require('../shared/parse-ast-index-BytJf1vj.cjs');
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const node_fs = require_chunk.__toESM(require("node:fs"));
@@ -112,13 +112,13 @@ var SignalExit = class extends SignalExitBase {
112
112
  for (const sig of signals) this.#sigListeners[sig] = () => {
113
113
  const listeners = this.#process.listeners(sig);
114
114
  let { count } = this.#emitter;
115
- const p$2 = process$3;
116
- if (typeof p$2.__signal_exit_emitter__ === "object" && typeof p$2.__signal_exit_emitter__.count === "number") count += p$2.__signal_exit_emitter__.count;
115
+ const p = process$3;
116
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
117
117
  if (listeners.length === count) {
118
118
  this.unload();
119
119
  const ret = this.#emitter.emit("exit", null, sig);
120
- const s$2 = sig === "SIGHUP" ? this.#hupSig : sig;
121
- if (!ret) process$3.kill(process$3.pid, s$2);
120
+ const s$1 = sig === "SIGHUP" ? this.#hupSig : sig;
121
+ if (!ret) process$3.kill(process$3.pid, s$1);
122
122
  }
123
123
  };
124
124
  this.#originalProcessReallyExit = process$3.reallyExit;
@@ -183,7 +183,7 @@ const process$2 = globalThis.process;
183
183
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
184
184
 
185
185
  //#endregion
186
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/core.mjs
186
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
187
187
  const LogLevels = {
188
188
  silent: Number.NEGATIVE_INFINITY,
189
189
  fatal: 0,
@@ -239,7 +239,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
239
239
  return object;
240
240
  }
241
241
  function createDefu(merger) {
242
- return (...arguments_) => arguments_.reduce((p$2, c$1) => _defu(p$2, c$1, "", merger), {});
242
+ return (...arguments_) => arguments_.reduce((p, c$1) => _defu(p, c$1, "", merger), {});
243
243
  }
244
244
  const defu = createDefu();
245
245
  function isPlainObject(obj) {
@@ -569,10 +569,10 @@ function createConsola$1(options$1 = {}) {
569
569
  }
570
570
 
571
571
  //#endregion
572
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/shared/consola.Cs5FdtHD.mjs
573
- function parseStack(stack) {
572
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
573
+ function parseStack(stack, message) {
574
574
  const cwd$1 = process.cwd() + node_path.sep;
575
- const lines = stack.split("\n").splice(1).map((l$1) => l$1.trim().replace("file://", "").replace(cwd$1, ""));
575
+ const lines = stack.split("\n").splice(message.split("\n").length).map((l$1) => l$1.trim().replace("file://", "").replace(cwd$1, ""));
576
576
  return lines;
577
577
  }
578
578
  function writeStream(data, stream) {
@@ -581,14 +581,14 @@ function writeStream(data, stream) {
581
581
  }
582
582
  const bracket = (x) => x ? `[${x}]` : "";
583
583
  var BasicReporter = class {
584
- formatStack(stack, opts) {
584
+ formatStack(stack, message, opts) {
585
585
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
586
- return indent + parseStack(stack).join(`
586
+ return indent + parseStack(stack, message).join(`
587
587
  ${indent}`);
588
588
  }
589
589
  formatError(err, opts) {
590
590
  const message = err.message ?? (0, node_util.formatWithOptions)(opts, err);
591
- const stack = err.stack ? this.formatStack(err.stack, opts) : "";
591
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
592
592
  const level = opts?.errorLevel || 0;
593
593
  const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
594
594
  const causedError = err.cause ? "\n\n" + this.formatError(err.cause, {
@@ -633,7 +633,7 @@ ${indent}`);
633
633
  };
634
634
 
635
635
  //#endregion
636
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/shared/consola.lX6kr4n8.mjs
636
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
637
637
  const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
638
638
  const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
639
639
  const isForced = "FORCE_COLOR" in env || argv.includes("--color");
@@ -798,7 +798,7 @@ function box(text, _opts = {}) {
798
798
  if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
799
799
  const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
800
800
  const height = textLines.length + paddingOffset;
801
- const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length)) + paddingOffset;
801
+ const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
802
802
  const widthOffset = width + paddingOffset;
803
803
  const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
804
804
  if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
@@ -822,29 +822,29 @@ function box(text, _opts = {}) {
822
822
  }
823
823
 
824
824
  //#endregion
825
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/index.mjs
826
- const r = Object.create(null), i = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), s$1 = new Proxy(r, {
827
- get(e, o) {
828
- return i()[o] ?? r[o];
825
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
826
+ const r = Object.create(null), i = (e) => globalThis.process?.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
827
+ get(e, s$1) {
828
+ return i()[s$1] ?? r[s$1];
829
829
  },
830
- has(e, o) {
830
+ has(e, s$1) {
831
831
  const E = i();
832
- return o in E || o in r;
832
+ return s$1 in E || s$1 in r;
833
833
  },
834
- set(e, o, E) {
835
- const b = i(true);
836
- return b[o] = E, true;
834
+ set(e, s$1, E) {
835
+ const B = i(true);
836
+ return B[s$1] = E, true;
837
837
  },
838
- deleteProperty(e, o) {
839
- if (!o) return false;
838
+ deleteProperty(e, s$1) {
839
+ if (!s$1) return false;
840
840
  const E = i(true);
841
- return delete E[o], true;
841
+ return delete E[s$1], true;
842
842
  },
843
843
  ownKeys() {
844
844
  const e = i(true);
845
845
  return Object.keys(e);
846
846
  }
847
- }), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", B = [
847
+ }), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f = [
848
848
  ["APPVEYOR"],
849
849
  [
850
850
  "AWS_AMPLIFY",
@@ -912,6 +912,11 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || globalThis.
912
912
  "CODESANDBOX_SSE",
913
913
  { ci: false }
914
914
  ],
915
+ [
916
+ "CODESANDBOX",
917
+ "CODESANDBOX_HOST",
918
+ { ci: false }
919
+ ],
915
920
  ["STACKBLITZ"],
916
921
  ["STORMKIT"],
917
922
  ["CLEAVR"],
@@ -930,10 +935,10 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || globalThis.
930
935
  { ci: true }
931
936
  ]
932
937
  ];
933
- function p() {
934
- if (globalThis.process?.env) for (const e of B) {
935
- const o = e[1] || e[0];
936
- if (globalThis.process?.env[o]) return {
938
+ function b() {
939
+ if (globalThis.process?.env) for (const e of f) {
940
+ const s$1 = e[1] || e[0];
941
+ if (globalThis.process?.env[s$1]) return {
937
942
  name: e[0].toLowerCase(),
938
943
  ...e[2]
939
944
  };
@@ -946,38 +951,38 @@ function p() {
946
951
  ci: false
947
952
  };
948
953
  }
949
- const l = p();
954
+ const l = b();
950
955
  l.name;
951
956
  function n(e) {
952
957
  return e ? e !== "false" : false;
953
958
  }
954
- const I = globalThis.process?.platform || "", T = n(s$1.CI) || l.ci !== false, R = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), U = n(s$1.DEBUG), A = t === "test" || n(s$1.TEST);
955
- n(s$1.MINIMAL);
956
- const _ = /^win/i.test(I);
957
- !n(s$1.NO_COLOR) && (n(s$1.FORCE_COLOR) || (R || _) && s$1.TERM);
959
+ const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== false, a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), g = n(o.DEBUG), R = t === "test" || n(o.TEST);
960
+ n(o.MINIMAL);
961
+ const A = /^win/i.test(I);
962
+ !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM);
958
963
  const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
959
964
  Number(C?.split(".")[0]);
960
- const y = globalThis.process || Object.create(null), c = { versions: {} };
961
- new Proxy(y, { get(e, o) {
962
- if (o === "env") return s$1;
963
- if (o in e) return e[o];
964
- if (o in c) return c[o];
965
+ const y = globalThis.process || Object.create(null), _ = { versions: {} };
966
+ new Proxy(y, { get(e, s$1) {
967
+ if (s$1 === "env") return o;
968
+ if (s$1 in e) return e[s$1];
969
+ if (s$1 in _) return _[s$1];
965
970
  } });
966
- const L = globalThis.process?.release?.name === "node", a = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, O = !!globalThis.fastly, S = !!globalThis.Netlify, N = !!globalThis.EdgeRuntime, P = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
971
+ const c = globalThis.process?.release?.name === "node", O = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
967
972
  [S, "netlify"],
968
- [N, "edge-light"],
969
- [P, "workerd"],
970
- [O, "fastly"],
973
+ [u, "edge-light"],
974
+ [N, "workerd"],
975
+ [L, "fastly"],
971
976
  [D, "deno"],
972
- [a, "bun"],
973
- [L, "node"]
977
+ [O, "bun"],
978
+ [c, "node"]
974
979
  ];
975
980
  function G() {
976
- const e = F.find((o) => o[0]);
981
+ const e = F.find((s$1) => s$1[0]);
977
982
  if (e) return { name: e[1] };
978
983
  }
979
- const u = G();
980
- u?.name;
984
+ const P = G();
985
+ P?.name;
981
986
  function ansiRegex({ onlyFirst = false } = {}) {
982
987
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
983
988
  const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
@@ -1071,10 +1076,10 @@ function stringWidth(str) {
1071
1076
  return stringWidth$1(str);
1072
1077
  }
1073
1078
  var FancyReporter = class extends BasicReporter {
1074
- formatStack(stack, opts) {
1079
+ formatStack(stack, message, opts) {
1075
1080
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
1076
1081
  return `
1077
- ${indent}` + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m) => colors$1.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$1.cyan(m)})`)).join(`
1082
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors$1.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$1.cyan(m)})`)).join(`
1078
1083
  ${indent}`);
1079
1084
  }
1080
1085
  formatType(logObj, isBadge, opts) {
@@ -1102,7 +1107,7 @@ ${indent}`);
1102
1107
  line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
1103
1108
  if (logObj.type === "trace") {
1104
1109
  const _err = new Error("Trace: " + logObj.message);
1105
- line += this.formatStack(_err.stack || "");
1110
+ line += this.formatStack(_err.stack || "", _err.message);
1106
1111
  }
1107
1112
  return isBadge ? "\n" + line + "\n" : line;
1108
1113
  }
@@ -1125,16 +1130,16 @@ function createConsola(options$1 = {}) {
1125
1130
  stdout: process.stdout,
1126
1131
  stderr: process.stderr,
1127
1132
  prompt: (...args) => Promise.resolve().then(function() {
1128
- return require("../shared/prompt-ZZScCEWI.cjs");
1133
+ return require("../shared/prompt-_yrURmmm.cjs");
1129
1134
  }).then((m) => m.prompt(...args)),
1130
- reporters: options$1.reporters || [options$1.fancy ?? !(T || A) ? new FancyReporter() : new BasicReporter()],
1135
+ reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
1131
1136
  ...options$1
1132
1137
  });
1133
1138
  return consola2;
1134
1139
  }
1135
1140
  function _getDefaultLogLevel() {
1136
- if (U) return LogLevels.debug;
1137
- if (A) return LogLevels.warn;
1141
+ if (g) return LogLevels.debug;
1142
+ if (R) return LogLevels.warn;
1138
1143
  return LogLevels.info;
1139
1144
  }
1140
1145
  const consola = createConsola();
@@ -1698,11 +1703,11 @@ function showHelp() {
1698
1703
  logger.log("");
1699
1704
  logger.log(`${require_parse_ast_index.colors.bold(require_parse_ast_index.colors.underline("OPTIONS"))}`);
1700
1705
  logger.log("");
1701
- logger.log(Object.entries(options).sort(([a$1], [b]) => {
1702
- if (options[a$1].short && !options[b].short) return -1;
1703
- if (!options[a$1].short && options[b].short) return 1;
1704
- if (options[a$1].short && options[b].short) return options[a$1].short.localeCompare(options[b].short);
1705
- return a$1.localeCompare(b);
1706
+ logger.log(Object.entries(options).sort(([a$1], [b$1]) => {
1707
+ if (options[a$1].short && !options[b$1].short) return -1;
1708
+ if (!options[a$1].short && options[b$1].short) return 1;
1709
+ if (options[a$1].short && options[b$1].short) return options[a$1].short.localeCompare(options[b$1].short);
1710
+ return a$1.localeCompare(b$1);
1706
1711
  }).map(([option, { type, short, hint, description: description$1 }]) => {
1707
1712
  let optionStr = ` --${option} `;
1708
1713
  option = camelCaseToKebabCase(option);
@@ -1745,7 +1750,6 @@ async function main() {
1745
1750
  showHelp();
1746
1751
  }
1747
1752
  main().catch((err) => {
1748
- if (err instanceof Error && typeof err.stack === "string") err.stack = err.stack.replace(err.message, "");
1749
1753
  logger.error(err);
1750
1754
  node_process.default.exit(1);
1751
1755
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Pitn1YVy.cjs');
4
- const require_parse_ast_index = require('../shared/parse-ast-index-D7XtMFo4.cjs');
3
+ const require_src = require('../shared/src-ChN-bJhZ.cjs');
4
+ const require_parse_ast_index = require('../shared/parse-ast-index-BytJf1vj.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
7
7
  //#region src/plugin/parallel-plugin.ts
@@ -1,5 +1,5 @@
1
- const require_src = require('../shared/src-Pitn1YVy.cjs');
2
- require('../shared/parse-ast-index-D7XtMFo4.cjs');
1
+ const require_src = require('../shared/src-ChN-bJhZ.cjs');
2
+ require('../shared/parse-ast-index-BytJf1vj.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
5
5
  exports.build = require_src.build
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Pitn1YVy.cjs');
4
- const require_parse_ast_index = require('../shared/parse-ast-index-D7XtMFo4.cjs');
3
+ const require_src = require('../shared/src-ChN-bJhZ.cjs');
4
+ const require_parse_ast_index = require('../shared/parse-ast-index-BytJf1vj.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
7
7
  //#region src/parallel-plugin-worker.ts
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('../shared/parse-ast-index-D7XtMFo4.cjs');
1
+ const require_parse_ast_index = require('../shared/parse-ast-index-BytJf1vj.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync
package/dist/esm/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { colors } from "../shared/parse-ast-index-CyX8MVZE.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-CAzFGvqS.mjs";
1
+ import { colors } from "../shared/parse-ast-index-D8k04LFo.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-CwiTaRcN.mjs";
3
3
  import process$1, { cwd } from "node:process";
4
4
  import path, { sep } from "node:path";
5
5
  import fs from "node:fs";
@@ -110,13 +110,13 @@ var SignalExit = class extends SignalExitBase {
110
110
  for (const sig of signals) this.#sigListeners[sig] = () => {
111
111
  const listeners = this.#process.listeners(sig);
112
112
  let { count } = this.#emitter;
113
- const p$1 = process$3;
114
- if (typeof p$1.__signal_exit_emitter__ === "object" && typeof p$1.__signal_exit_emitter__.count === "number") count += p$1.__signal_exit_emitter__.count;
113
+ const p = process$3;
114
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") count += p.__signal_exit_emitter__.count;
115
115
  if (listeners.length === count) {
116
116
  this.unload();
117
117
  const ret = this.#emitter.emit("exit", null, sig);
118
- const s$2 = sig === "SIGHUP" ? this.#hupSig : sig;
119
- if (!ret) process$3.kill(process$3.pid, s$2);
118
+ const s$1 = sig === "SIGHUP" ? this.#hupSig : sig;
119
+ if (!ret) process$3.kill(process$3.pid, s$1);
120
120
  }
121
121
  };
122
122
  this.#originalProcessReallyExit = process$3.reallyExit;
@@ -181,7 +181,7 @@ const process$2 = globalThis.process;
181
181
  const { onExit, load, unload } = signalExitWrap(processOk(process$2) ? new SignalExit(process$2) : new SignalExitFallback());
182
182
 
183
183
  //#endregion
184
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/core.mjs
184
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
185
185
  const LogLevels = {
186
186
  silent: Number.NEGATIVE_INFINITY,
187
187
  fatal: 0,
@@ -237,7 +237,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
237
237
  return object;
238
238
  }
239
239
  function createDefu(merger) {
240
- return (...arguments_) => arguments_.reduce((p$1, c$1) => _defu(p$1, c$1, "", merger), {});
240
+ return (...arguments_) => arguments_.reduce((p, c$1) => _defu(p, c$1, "", merger), {});
241
241
  }
242
242
  const defu = createDefu();
243
243
  function isPlainObject(obj) {
@@ -567,10 +567,10 @@ function createConsola$1(options$1 = {}) {
567
567
  }
568
568
 
569
569
  //#endregion
570
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/shared/consola.Cs5FdtHD.mjs
571
- function parseStack(stack) {
570
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
571
+ function parseStack(stack, message) {
572
572
  const cwd$1 = process.cwd() + sep;
573
- const lines = stack.split("\n").splice(1).map((l$1) => l$1.trim().replace("file://", "").replace(cwd$1, ""));
573
+ const lines = stack.split("\n").splice(message.split("\n").length).map((l$1) => l$1.trim().replace("file://", "").replace(cwd$1, ""));
574
574
  return lines;
575
575
  }
576
576
  function writeStream(data, stream) {
@@ -579,14 +579,14 @@ function writeStream(data, stream) {
579
579
  }
580
580
  const bracket = (x) => x ? `[${x}]` : "";
581
581
  var BasicReporter = class {
582
- formatStack(stack, opts) {
582
+ formatStack(stack, message, opts) {
583
583
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
584
- return indent + parseStack(stack).join(`
584
+ return indent + parseStack(stack, message).join(`
585
585
  ${indent}`);
586
586
  }
587
587
  formatError(err, opts) {
588
588
  const message = err.message ?? formatWithOptions(opts, err);
589
- const stack = err.stack ? this.formatStack(err.stack, opts) : "";
589
+ const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
590
590
  const level = opts?.errorLevel || 0;
591
591
  const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
592
592
  const causedError = err.cause ? "\n\n" + this.formatError(err.cause, {
@@ -631,7 +631,7 @@ ${indent}`);
631
631
  };
632
632
 
633
633
  //#endregion
634
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/shared/consola.lX6kr4n8.mjs
634
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
635
635
  const { env: env$1 = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
636
636
  const isDisabled = "NO_COLOR" in env$1 || argv.includes("--no-color");
637
637
  const isForced = "FORCE_COLOR" in env$1 || argv.includes("--color");
@@ -796,7 +796,7 @@ function box(text, _opts = {}) {
796
796
  if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
797
797
  const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
798
798
  const height = textLines.length + paddingOffset;
799
- const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length)) + paddingOffset;
799
+ const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
800
800
  const widthOffset = width + paddingOffset;
801
801
  const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
802
802
  if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
@@ -820,29 +820,29 @@ function box(text, _opts = {}) {
820
820
  }
821
821
 
822
822
  //#endregion
823
- //#region ../../node_modules/.pnpm/consola@3.4.0/node_modules/consola/dist/index.mjs
824
- const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), s$1 = new Proxy(r, {
825
- get(e, o) {
826
- return i()[o] ?? r[o];
823
+ //#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
824
+ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
825
+ get(e, s$1) {
826
+ return i()[s$1] ?? r[s$1];
827
827
  },
828
- has(e, o) {
828
+ has(e, s$1) {
829
829
  const E = i();
830
- return o in E || o in r;
830
+ return s$1 in E || s$1 in r;
831
831
  },
832
- set(e, o, E) {
833
- const b = i(true);
834
- return b[o] = E, true;
832
+ set(e, s$1, E) {
833
+ const B = i(true);
834
+ return B[s$1] = E, true;
835
835
  },
836
- deleteProperty(e, o) {
837
- if (!o) return false;
836
+ deleteProperty(e, s$1) {
837
+ if (!s$1) return false;
838
838
  const E = i(true);
839
- return delete E[o], true;
839
+ return delete E[s$1], true;
840
840
  },
841
841
  ownKeys() {
842
842
  const e = i(true);
843
843
  return Object.keys(e);
844
844
  }
845
- }), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", B = [
845
+ }), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f = [
846
846
  ["APPVEYOR"],
847
847
  [
848
848
  "AWS_AMPLIFY",
@@ -910,6 +910,11 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta
910
910
  "CODESANDBOX_SSE",
911
911
  { ci: false }
912
912
  ],
913
+ [
914
+ "CODESANDBOX",
915
+ "CODESANDBOX_HOST",
916
+ { ci: false }
917
+ ],
913
918
  ["STACKBLITZ"],
914
919
  ["STORMKIT"],
915
920
  ["CLEAVR"],
@@ -928,10 +933,10 @@ const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta
928
933
  { ci: true }
929
934
  ]
930
935
  ];
931
- function p() {
932
- if (globalThis.process?.env) for (const e of B) {
933
- const o = e[1] || e[0];
934
- if (globalThis.process?.env[o]) return {
936
+ function b() {
937
+ if (globalThis.process?.env) for (const e of f) {
938
+ const s$1 = e[1] || e[0];
939
+ if (globalThis.process?.env[s$1]) return {
935
940
  name: e[0].toLowerCase(),
936
941
  ...e[2]
937
942
  };
@@ -944,38 +949,38 @@ function p() {
944
949
  ci: false
945
950
  };
946
951
  }
947
- const l = p();
952
+ const l = b();
948
953
  l.name;
949
954
  function n(e) {
950
955
  return e ? e !== "false" : false;
951
956
  }
952
- const I = globalThis.process?.platform || "", T = n(s$1.CI) || l.ci !== false, R = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), U = n(s$1.DEBUG), A = t === "test" || n(s$1.TEST);
953
- n(s$1.MINIMAL);
954
- const _ = /^win/i.test(I);
955
- !n(s$1.NO_COLOR) && (n(s$1.FORCE_COLOR) || (R || _) && s$1.TERM);
957
+ const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== false, a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), g = n(o.DEBUG), R = t === "test" || n(o.TEST);
958
+ n(o.MINIMAL);
959
+ const A = /^win/i.test(I);
960
+ !n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM);
956
961
  const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
957
962
  Number(C?.split(".")[0]);
958
- const y = globalThis.process || Object.create(null), c = { versions: {} };
959
- new Proxy(y, { get(e, o) {
960
- if (o === "env") return s$1;
961
- if (o in e) return e[o];
962
- if (o in c) return c[o];
963
+ const y = globalThis.process || Object.create(null), _ = { versions: {} };
964
+ new Proxy(y, { get(e, s$1) {
965
+ if (s$1 === "env") return o;
966
+ if (s$1 in e) return e[s$1];
967
+ if (s$1 in _) return _[s$1];
963
968
  } });
964
- const L = globalThis.process?.release?.name === "node", a = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, O = !!globalThis.fastly, S = !!globalThis.Netlify, N = !!globalThis.EdgeRuntime, P = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
969
+ const c = globalThis.process?.release?.name === "node", O = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
965
970
  [S, "netlify"],
966
- [N, "edge-light"],
967
- [P, "workerd"],
968
- [O, "fastly"],
971
+ [u, "edge-light"],
972
+ [N, "workerd"],
973
+ [L, "fastly"],
969
974
  [D, "deno"],
970
- [a, "bun"],
971
- [L, "node"]
975
+ [O, "bun"],
976
+ [c, "node"]
972
977
  ];
973
978
  function G() {
974
- const e = F.find((o) => o[0]);
979
+ const e = F.find((s$1) => s$1[0]);
975
980
  if (e) return { name: e[1] };
976
981
  }
977
- const u = G();
978
- u?.name;
982
+ const P = G();
983
+ P?.name;
979
984
  function ansiRegex({ onlyFirst = false } = {}) {
980
985
  const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
981
986
  const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
@@ -1069,10 +1074,10 @@ function stringWidth(str) {
1069
1074
  return stringWidth$1(str);
1070
1075
  }
1071
1076
  var FancyReporter = class extends BasicReporter {
1072
- formatStack(stack, opts) {
1077
+ formatStack(stack, message, opts) {
1073
1078
  const indent = " ".repeat((opts?.errorLevel || 0) + 1);
1074
1079
  return `
1075
- ${indent}` + parseStack(stack).map((line) => " " + line.replace(/^at +/, (m) => colors$1.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$1.cyan(m)})`)).join(`
1080
+ ${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors$1.gray(m)).replace(/\((.+)\)/, (_$1, m) => `(${colors$1.cyan(m)})`)).join(`
1076
1081
  ${indent}`);
1077
1082
  }
1078
1083
  formatType(logObj, isBadge, opts) {
@@ -1100,7 +1105,7 @@ ${indent}`);
1100
1105
  line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
1101
1106
  if (logObj.type === "trace") {
1102
1107
  const _err = new Error("Trace: " + logObj.message);
1103
- line += this.formatStack(_err.stack || "");
1108
+ line += this.formatStack(_err.stack || "", _err.message);
1104
1109
  }
1105
1110
  return isBadge ? "\n" + line + "\n" : line;
1106
1111
  }
@@ -1122,15 +1127,15 @@ function createConsola(options$1 = {}) {
1122
1127
  defaults: { level },
1123
1128
  stdout: process.stdout,
1124
1129
  stderr: process.stderr,
1125
- prompt: (...args) => import("../shared/prompt-CxK9euq3.mjs").then((m) => m.prompt(...args)),
1126
- reporters: options$1.reporters || [options$1.fancy ?? !(T || A) ? new FancyReporter() : new BasicReporter()],
1130
+ prompt: (...args) => import("../shared/prompt-C6jWWCza.mjs").then((m) => m.prompt(...args)),
1131
+ reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
1127
1132
  ...options$1
1128
1133
  });
1129
1134
  return consola2;
1130
1135
  }
1131
1136
  function _getDefaultLogLevel() {
1132
- if (U) return LogLevels.debug;
1133
- if (A) return LogLevels.warn;
1137
+ if (g) return LogLevels.debug;
1138
+ if (R) return LogLevels.warn;
1134
1139
  return LogLevels.info;
1135
1140
  }
1136
1141
  const consola = createConsola();
@@ -1694,11 +1699,11 @@ function showHelp() {
1694
1699
  logger.log("");
1695
1700
  logger.log(`${colors.bold(colors.underline("OPTIONS"))}`);
1696
1701
  logger.log("");
1697
- logger.log(Object.entries(options).sort(([a$1], [b]) => {
1698
- if (options[a$1].short && !options[b].short) return -1;
1699
- if (!options[a$1].short && options[b].short) return 1;
1700
- if (options[a$1].short && options[b].short) return options[a$1].short.localeCompare(options[b].short);
1701
- return a$1.localeCompare(b);
1702
+ logger.log(Object.entries(options).sort(([a$1], [b$1]) => {
1703
+ if (options[a$1].short && !options[b$1].short) return -1;
1704
+ if (!options[a$1].short && options[b$1].short) return 1;
1705
+ if (options[a$1].short && options[b$1].short) return options[a$1].short.localeCompare(options[b$1].short);
1706
+ return a$1.localeCompare(b$1);
1702
1707
  }).map(([option, { type, short, hint, description: description$1 }]) => {
1703
1708
  let optionStr = ` --${option} `;
1704
1709
  option = camelCaseToKebabCase(option);
@@ -1741,7 +1746,6 @@ async function main() {
1741
1746
  showHelp();
1742
1747
  }
1743
1748
  main().catch((err) => {
1744
- if (err instanceof Error && typeof err.stack === "string") err.stack = err.stack.replace(err.message, "");
1745
1749
  logger.error(err);
1746
1750
  process$1.exit(1);
1747
1751
  });
@@ -1,5 +1,5 @@
1
- import { import_binding } from "../shared/parse-ast-index-CyX8MVZE.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-CAzFGvqS.mjs";
1
+ import { import_binding } from "../shared/parse-ast-index-D8k04LFo.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-CwiTaRcN.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
 
5
5
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
- import "../shared/parse-ast-index-CyX8MVZE.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-CAzFGvqS.mjs";
1
+ import "../shared/parse-ast-index-D8k04LFo.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-CwiTaRcN.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
- import { import_binding } from "../shared/parse-ast-index-CyX8MVZE.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-CAzFGvqS.mjs";
1
+ import { import_binding } from "../shared/parse-ast-index-D8k04LFo.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-CwiTaRcN.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
@@ -1,3 +1,3 @@
1
- import { parseAst, parseAstAsync } from "../shared/parse-ast-index-CyX8MVZE.mjs";
1
+ import { parseAst, parseAstAsync } from "../shared/parse-ast-index-D8k04LFo.mjs";
2
2
 
3
3
  export { parseAst, parseAstAsync };