rolldown 1.0.0-beta.1-commit.67a0051 → 1.0.0-beta.1-commit.1d4a330

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-ed8l008o.cjs');
4
- const require_consola_36c0034f = require('../shared/consola_36c0034f-BBnpcLZ5.cjs');
3
+ const require_src = require('../shared/src-B7GNdu2r.cjs');
4
+ const require_consola_36c0034f = require('../shared/consola_36c0034f-CnRr1OYk.cjs');
5
5
  const node_fs = require_chunk.__toESM(require("node:fs"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const node_process = require_chunk.__toESM(require("node:process"));
@@ -65,7 +65,7 @@ var Emitter = class {
65
65
  const i = list.indexOf(fn);
66
66
  if (i === -1) return;
67
67
  if (i === 0 && list.length === 1) list.length = 0;
68
- else list.splice(i, 1);
68
+ else list.splice(i, 1);
69
69
  }
70
70
  emit(ev, code, signal) {
71
71
  if (this.emitted[ev]) return false;
@@ -282,7 +282,7 @@ async function loadConfig(configPath) {
282
282
  const ext = node_path.default.extname(configPath = configPath || await findConfigFileNameInCwd());
283
283
  try {
284
284
  if (SUPPORTED_JS_CONFIG_FORMATS.includes(ext) || process.env.NODE_OPTIONS?.includes("--import=tsx") && SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) return (await import((0, node_url.pathToFileURL)(configPath).href)).default;
285
- else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) {
285
+ else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) {
286
286
  const rawConfigPath = node_path.default.resolve(configPath);
287
287
  return await loadTsConfig(rawConfigPath);
288
288
  } else throw new Error(`Unsupported config format. Expected: \`${SUPPORTED_CONFIG_FORMATS.join(",")}\` but got \`${ext}\``);
@@ -300,7 +300,7 @@ async function bundleWithConfig(configPath, cliOptions) {
300
300
  process.exit(1);
301
301
  }
302
302
  if (cliOptions.watch) await watchInner(config, cliOptions);
303
- else await bundleInner(config, cliOptions);
303
+ else await bundleInner(config, cliOptions);
304
304
  }
305
305
  async function bundleWithCliOptions(cliOptions) {
306
306
  if (cliOptions.output.dir || cliOptions.output.file) {
@@ -520,8 +520,8 @@ function flattenSchema(schema, base = {}, parent = "") {
520
520
  for (const [k, value] of Object.entries(schema)) {
521
521
  const key = parent ? `${parent}.${k}` : k;
522
522
  if (getSchemaType(value) === "object") if ("properties" in value) flattenSchema(value.properties, base, key);
523
- else base[key] = value;
524
- else base[key] = value;
523
+ else base[key] = value;
524
+ else base[key] = value;
525
525
  }
526
526
  return base;
527
527
  }
@@ -578,8 +578,8 @@ function normalizeCliOptions(cliOptions, positionals) {
578
578
  const keys = key.split(".");
579
579
  const [primary] = keys;
580
580
  if (keysOfInput.includes(primary)) setNestedProperty(result.input, key, value);
581
- else if (keysOfOutput.includes(primary)) setNestedProperty(result.output, key, value);
582
- else if (!reservedKeys.includes(key)) {
581
+ else if (keysOfOutput.includes(primary)) setNestedProperty(result.output, key, value);
582
+ else if (!reservedKeys.includes(key)) {
583
583
  logger.error(`Unknown option: ${key}`);
584
584
  process.exit(1);
585
585
  }
@@ -602,7 +602,7 @@ const options = Object.fromEntries(Object.entries(flattenedSchema).map(([key, sc
602
602
  };
603
603
  if (config && config?.abbreviation) result.short = config?.abbreviation;
604
604
  if (config && config.reverse) if (result.description.startsWith("enable")) result.description = result.description.replace("enable", "disable");
605
- else result.description = `disable ${result.description}`;
605
+ else result.description = `disable ${result.description}`;
606
606
  key = camelCaseToKebabCase(key);
607
607
  return [config?.reverse ? `no-${key}` : key, result];
608
608
  }));
@@ -668,7 +668,7 @@ function parseCliArguments() {
668
668
  configurable: true,
669
669
  writable: true
670
670
  });
671
- else Object.defineProperty(values, option.name, {
671
+ else Object.defineProperty(values, option.name, {
672
672
  value: option.value ?? "",
673
673
  enumerable: true,
674
674
  configurable: true,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-ed8l008o.cjs');
3
+ const require_src = require('../shared/src-B7GNdu2r.cjs');
4
4
  const node_url = require_chunk.__toESM(require("node:url"));
5
5
 
6
6
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
- const require_src = require('../shared/src-ed8l008o.cjs');
1
+ const require_src = require('../shared/src-B7GNdu2r.cjs');
2
2
 
3
3
  exports.VERSION = require_src.VERSION
4
4
  exports.build = require_src.build
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-ed8l008o.cjs');
3
+ const require_src = require('../shared/src-B7GNdu2r.cjs');
4
4
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
5
5
 
6
6
  //#region src/parallel-plugin-worker.ts
package/dist/esm/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { arraify, colors, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-BvPrj1a4.mjs";
2
- import { createConsola } from "../shared/consola_36c0034f-BwyQ494_.mjs";
1
+ import { arraify, colors, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-BKtzXvhI.mjs";
2
+ import { createConsola } from "../shared/consola_36c0034f-rAZL9aWp.mjs";
3
3
  import fs from "node:fs";
4
4
  import path from "node:path";
5
5
  import process$1, { cwd } from "node:process";
@@ -62,7 +62,7 @@ var Emitter = class {
62
62
  const i = list.indexOf(fn);
63
63
  if (i === -1) return;
64
64
  if (i === 0 && list.length === 1) list.length = 0;
65
- else list.splice(i, 1);
65
+ else list.splice(i, 1);
66
66
  }
67
67
  emit(ev, code, signal) {
68
68
  if (this.emitted[ev]) return false;
@@ -279,7 +279,7 @@ async function loadConfig(configPath) {
279
279
  const ext = path.extname(configPath = configPath || await findConfigFileNameInCwd());
280
280
  try {
281
281
  if (SUPPORTED_JS_CONFIG_FORMATS.includes(ext) || process.env.NODE_OPTIONS?.includes("--import=tsx") && SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) return (await import(pathToFileURL(configPath).href)).default;
282
- else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) {
282
+ else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) {
283
283
  const rawConfigPath = path.resolve(configPath);
284
284
  return await loadTsConfig(rawConfigPath);
285
285
  } else throw new Error(`Unsupported config format. Expected: \`${SUPPORTED_CONFIG_FORMATS.join(",")}\` but got \`${ext}\``);
@@ -297,7 +297,7 @@ async function bundleWithConfig(configPath, cliOptions) {
297
297
  process.exit(1);
298
298
  }
299
299
  if (cliOptions.watch) await watchInner(config, cliOptions);
300
- else await bundleInner(config, cliOptions);
300
+ else await bundleInner(config, cliOptions);
301
301
  }
302
302
  async function bundleWithCliOptions(cliOptions) {
303
303
  if (cliOptions.output.dir || cliOptions.output.file) {
@@ -517,8 +517,8 @@ function flattenSchema(schema, base = {}, parent = "") {
517
517
  for (const [k, value] of Object.entries(schema)) {
518
518
  const key = parent ? `${parent}.${k}` : k;
519
519
  if (getSchemaType(value) === "object") if ("properties" in value) flattenSchema(value.properties, base, key);
520
- else base[key] = value;
521
- else base[key] = value;
520
+ else base[key] = value;
521
+ else base[key] = value;
522
522
  }
523
523
  return base;
524
524
  }
@@ -575,8 +575,8 @@ function normalizeCliOptions(cliOptions, positionals) {
575
575
  const keys = key.split(".");
576
576
  const [primary] = keys;
577
577
  if (keysOfInput.includes(primary)) setNestedProperty(result.input, key, value);
578
- else if (keysOfOutput.includes(primary)) setNestedProperty(result.output, key, value);
579
- else if (!reservedKeys.includes(key)) {
578
+ else if (keysOfOutput.includes(primary)) setNestedProperty(result.output, key, value);
579
+ else if (!reservedKeys.includes(key)) {
580
580
  logger.error(`Unknown option: ${key}`);
581
581
  process.exit(1);
582
582
  }
@@ -599,7 +599,7 @@ const options = Object.fromEntries(Object.entries(flattenedSchema).map(([key, sc
599
599
  };
600
600
  if (config && config?.abbreviation) result.short = config?.abbreviation;
601
601
  if (config && config.reverse) if (result.description.startsWith("enable")) result.description = result.description.replace("enable", "disable");
602
- else result.description = `disable ${result.description}`;
602
+ else result.description = `disable ${result.description}`;
603
603
  key = camelCaseToKebabCase(key);
604
604
  return [config?.reverse ? `no-${key}` : key, result];
605
605
  }));
@@ -665,7 +665,7 @@ function parseCliArguments() {
665
665
  configurable: true,
666
666
  writable: true
667
667
  });
668
- else Object.defineProperty(values, option.name, {
668
+ else Object.defineProperty(values, option.name, {
669
669
  value: option.value ?? "",
670
670
  enumerable: true,
671
671
  configurable: true,
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-BvPrj1a4.mjs";
1
+ import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-BKtzXvhI.mjs";
2
2
  import { pathToFileURL } from "node:url";
3
3
 
4
4
  //#region src/plugin/parallel-plugin.ts
@@ -1,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-BvPrj1a4.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-BKtzXvhI.mjs";
2
2
 
3
3
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,4 +1,4 @@
1
- import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-BvPrj1a4.mjs";
1
+ import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-BKtzXvhI.mjs";
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
 
4
4
  //#region src/parallel-plugin-worker.ts
@@ -50,8 +50,8 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
50
50
  if (value === null || value === void 0) continue;
51
51
  if (merger && merger(object, key, value, namespace)) continue;
52
52
  if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
53
- else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
54
- else object[key] = value;
53
+ else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
54
+ else object[key] = value;
55
55
  }
56
56
  return object;
57
57
  }
@@ -227,7 +227,7 @@ var Consola = class Consola {
227
227
  level: _normalizeLogLevel(defaults.level, this.options.types)
228
228
  };
229
229
  if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
230
- else logObj.args = [...args];
230
+ else logObj.args = [...args];
231
231
  if (logObj.message) {
232
232
  logObj.args.unshift(logObj.message);
233
233
  delete logObj.message;
@@ -525,7 +525,7 @@ function box(text, _opts = {}) {
525
525
  } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
526
526
  const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
527
527
  for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
528
- else {
528
+ else {
529
529
  const line = textLines[i - valignOffset];
530
530
  const left = " ".repeat(paddingOffset);
531
531
  const right = " ".repeat(width - stripAnsi$1(line).length);
@@ -662,7 +662,7 @@ var eastasianwidth = { exports: {} };
662
662
  eaw.characterLength = function(character) {
663
663
  var code = this.eastAsianWidth(character);
664
664
  if (code == "F" || code == "W" || code == "A") return 2;
665
- else return 1;
665
+ else return 1;
666
666
  };
667
667
  function stringToArray(string) {
668
668
  return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
@@ -686,7 +686,7 @@ else return 1;
686
686
  var char = chars[i];
687
687
  var charLen = eaw.length(char);
688
688
  if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
689
- else break;
689
+ else break;
690
690
  eawLen += charLen;
691
691
  }
692
692
  return result;
@@ -818,7 +818,7 @@ function createConsola(options = {}) {
818
818
  stdout: process.stdout,
819
819
  stderr: process.stderr,
820
820
  prompt: (...args) => Promise.resolve().then(function() {
821
- return require("./prompt-BKuli-WV.cjs");
821
+ return require("./prompt-CvISMk2k.cjs");
822
822
  }).then((m) => m.prompt(...args)),
823
823
  reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
824
824
  ...options
@@ -48,8 +48,8 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
48
48
  if (value === null || value === void 0) continue;
49
49
  if (merger && merger(object, key, value, namespace)) continue;
50
50
  if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
51
- else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
52
- else object[key] = value;
51
+ else if (isObject(value) && isObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
52
+ else object[key] = value;
53
53
  }
54
54
  return object;
55
55
  }
@@ -225,7 +225,7 @@ var Consola = class Consola {
225
225
  level: _normalizeLogLevel(defaults.level, this.options.types)
226
226
  };
227
227
  if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
228
- else logObj.args = [...args];
228
+ else logObj.args = [...args];
229
229
  if (logObj.message) {
230
230
  logObj.args.unshift(logObj.message);
231
231
  delete logObj.message;
@@ -523,7 +523,7 @@ function box(text, _opts = {}) {
523
523
  } else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
524
524
  const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
525
525
  for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
526
- else {
526
+ else {
527
527
  const line = textLines[i - valignOffset];
528
528
  const left = " ".repeat(paddingOffset);
529
529
  const right = " ".repeat(width - stripAnsi$1(line).length);
@@ -660,7 +660,7 @@ var eastasianwidth = { exports: {} };
660
660
  eaw.characterLength = function(character) {
661
661
  var code = this.eastAsianWidth(character);
662
662
  if (code == "F" || code == "W" || code == "A") return 2;
663
- else return 1;
663
+ else return 1;
664
664
  };
665
665
  function stringToArray(string) {
666
666
  return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
@@ -684,7 +684,7 @@ else return 1;
684
684
  var char = chars[i];
685
685
  var charLen = eaw.length(char);
686
686
  if (eawLen >= start - (charLen == 2 ? 1 : 0)) if (eawLen + charLen <= end) result += char;
687
- else break;
687
+ else break;
688
688
  eawLen += charLen;
689
689
  }
690
690
  return result;
@@ -815,7 +815,7 @@ function createConsola(options = {}) {
815
815
  defaults: { level },
816
816
  stdout: process.stdout,
817
817
  stderr: process.stderr,
818
- prompt: (...args) => import("./prompt-CqEsx-3v.mjs").then((m) => m.prompt(...args)),
818
+ prompt: (...args) => import("./prompt-BN0wKILJ.mjs").then((m) => m.prompt(...args)),
819
819
  reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
820
820
  ...options
821
821
  });
@@ -1,4 +1,4 @@
1
- import { colors$1 as colors, getDefaultExportFromCjs, isUnicodeSupported } from "./consola_36c0034f-BwyQ494_.mjs";
1
+ import { colors$1 as colors, getDefaultExportFromCjs, isUnicodeSupported } from "./consola_36c0034f-rAZL9aWp.mjs";
2
2
  import { stdin, stdout } from "node:process";
3
3
  import require$$0 from "tty";
4
4
  import { WriteStream } from "node:tty";
@@ -16,9 +16,9 @@ const cursor = {
16
16
  move(x, y) {
17
17
  let ret = "";
18
18
  if (x < 0) ret += `${CSI}${-x}D`;
19
- else if (x > 0) ret += `${CSI}${x}C`;
19
+ else if (x > 0) ret += `${CSI}${x}C`;
20
20
  if (y < 0) ret += `${CSI}${-y}A`;
21
- else if (y > 0) ret += `${CSI}${y}B`;
21
+ else if (y > 0) ret += `${CSI}${y}B`;
22
22
  return ret;
23
23
  },
24
24
  up: (count = 1) => `${CSI}${count}A`,
@@ -139,7 +139,7 @@ var m = {}, G = {
139
139
  for (var D = "", i = 0, o = F(e), E = 0; E < o.length; E++) {
140
140
  var a = o[E], n = u.length(a);
141
141
  if (i >= s$1 - (n == 2 ? 1 : 0)) if (i + n <= C) D += a;
142
- else break;
142
+ else break;
143
143
  i += n;
144
144
  }
145
145
  return D;
@@ -278,7 +278,7 @@ function U() {
278
278
  if (u < 16) return 90 + (u - 8);
279
279
  let F, e, s$1;
280
280
  if (u >= 232) F = ((u - 232) * 10 + 8) / 255, e = F, s$1 = F;
281
- else {
281
+ else {
282
282
  u -= 16;
283
283
  const i = u % 36;
284
284
  F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s$1 = i % 6 / 5;
@@ -456,7 +456,7 @@ var h = class {
456
456
  const u = P(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
457
457
  if (u !== this._prevFrame) {
458
458
  if (this.state === "initial") this.output.write(src.cursor.hide);
459
- else {
459
+ else {
460
460
  const F = FD(this._prevFrame, u);
461
461
  if (this.restoreCursor(), F && F?.length === 1) {
462
462
  const e = F[0];
@@ -558,7 +558,7 @@ var oD = class extends h {
558
558
  this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
559
559
  }), this.on("value", () => {
560
560
  if (this.cursor >= this.value.length) this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
561
- else {
561
+ else {
562
562
  const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
563
563
  this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
564
564
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-qZFfknuJ.cjs');
3
- const require_consola_36c0034f = require('./consola_36c0034f-BBnpcLZ5.cjs');
3
+ const require_consola_36c0034f = require('./consola_36c0034f-CnRr1OYk.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
6
6
  const tty = require_chunk.__toESM(require("tty"));
@@ -20,9 +20,9 @@ const cursor = {
20
20
  move(x, y) {
21
21
  let ret = "";
22
22
  if (x < 0) ret += `${CSI}${-x}D`;
23
- else if (x > 0) ret += `${CSI}${x}C`;
23
+ else if (x > 0) ret += `${CSI}${x}C`;
24
24
  if (y < 0) ret += `${CSI}${-y}A`;
25
- else if (y > 0) ret += `${CSI}${y}B`;
25
+ else if (y > 0) ret += `${CSI}${y}B`;
26
26
  return ret;
27
27
  },
28
28
  up: (count = 1) => `${CSI}${count}A`,
@@ -143,7 +143,7 @@ var m = {}, G = {
143
143
  for (var D = "", i = 0, o = F(e), E = 0; E < o.length; E++) {
144
144
  var a = o[E], n = u.length(a);
145
145
  if (i >= s$1 - (n == 2 ? 1 : 0)) if (i + n <= C) D += a;
146
- else break;
146
+ else break;
147
147
  i += n;
148
148
  }
149
149
  return D;
@@ -282,7 +282,7 @@ function U() {
282
282
  if (u < 16) return 90 + (u - 8);
283
283
  let F, e, s$1;
284
284
  if (u >= 232) F = ((u - 232) * 10 + 8) / 255, e = F, s$1 = F;
285
- else {
285
+ else {
286
286
  u -= 16;
287
287
  const i = u % 36;
288
288
  F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s$1 = i % 6 / 5;
@@ -460,7 +460,7 @@ var h = class {
460
460
  const u = P(this._render(this) ?? "", process.stdout.columns, { hard: !0 });
461
461
  if (u !== this._prevFrame) {
462
462
  if (this.state === "initial") this.output.write(src.cursor.hide);
463
- else {
463
+ else {
464
464
  const F = FD(this._prevFrame, u);
465
465
  if (this.restoreCursor(), F && F?.length === 1) {
466
466
  const e = F[0];
@@ -562,7 +562,7 @@ var oD = class extends h {
562
562
  this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
563
563
  }), this.on("value", () => {
564
564
  if (this.cursor >= this.value.length) this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
565
- else {
565
+ else {
566
566
  const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
567
567
  this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
568
568
  }
@@ -253,7 +253,7 @@ function collectChangedBundle(changed, bundle) {
253
253
  source: bindingAssetSource(item.source),
254
254
  names: item.names
255
255
  });
256
- else chunks.push({
256
+ else chunks.push({
257
257
  code: item.code,
258
258
  filename: item.fileName,
259
259
  name: item.name,
@@ -342,7 +342,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
342
342
  loadErrors.push(e);
343
343
  }
344
344
  } else loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
345
- else if (process.platform === "win32") if (process.arch === "x64") {
345
+ else if (process.platform === "win32") if (process.arch === "x64") {
346
346
  try {
347
347
  return require("./rolldown-binding.win32-x64-msvc.node");
348
348
  } catch (e) {
@@ -376,7 +376,7 @@ else if (process.platform === "win32") if (process.arch === "x64") {
376
376
  loadErrors.push(e);
377
377
  }
378
378
  } else loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
379
- else if (process.platform === "darwin") {
379
+ else if (process.platform === "darwin") {
380
380
  try {
381
381
  return require("./rolldown-binding.darwin-universal.node");
382
382
  } catch (e) {
@@ -433,7 +433,7 @@ else if (process.platform === "darwin") {
433
433
  loadErrors.push(e);
434
434
  }
435
435
  } else loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
436
- else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
436
+ else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
437
437
  try {
438
438
  return require("./rolldown-binding.linux-x64-musl.node");
439
439
  } catch (e) {
@@ -456,7 +456,7 @@ else if (process.platform === "linux") if (process.arch === "x64") if (isMusl())
456
456
  loadErrors.push(e);
457
457
  }
458
458
  }
459
- else if (process.arch === "arm64") if (isMusl()) {
459
+ else if (process.arch === "arm64") if (isMusl()) {
460
460
  try {
461
461
  return require("./rolldown-binding.linux-arm64-musl.node");
462
462
  } catch (e) {
@@ -479,7 +479,7 @@ else if (process.arch === "arm64") if (isMusl()) {
479
479
  loadErrors.push(e);
480
480
  }
481
481
  }
482
- else if (process.arch === "arm") if (isMusl()) {
482
+ else if (process.arch === "arm") if (isMusl()) {
483
483
  try {
484
484
  return require("./rolldown-binding.linux-arm-musleabihf.node");
485
485
  } catch (e) {
@@ -502,7 +502,7 @@ else if (process.arch === "arm") if (isMusl()) {
502
502
  loadErrors.push(e);
503
503
  }
504
504
  }
505
- else if (process.arch === "riscv64") if (isMusl()) {
505
+ else if (process.arch === "riscv64") if (isMusl()) {
506
506
  try {
507
507
  return require("./rolldown-binding.linux-riscv64-musl.node");
508
508
  } catch (e) {
@@ -525,7 +525,7 @@ else if (process.arch === "riscv64") if (isMusl()) {
525
525
  loadErrors.push(e);
526
526
  }
527
527
  }
528
- else if (process.arch === "ppc64") {
528
+ else if (process.arch === "ppc64") {
529
529
  try {
530
530
  return require("./rolldown-binding.linux-ppc64-gnu.node");
531
531
  } catch (e) {
@@ -548,7 +548,7 @@ else if (process.arch === "ppc64") {
548
548
  loadErrors.push(e);
549
549
  }
550
550
  } else loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
551
- else loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
551
+ else loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
552
552
  }
553
553
  nativeBinding = requireNative();
554
554
  if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
@@ -880,7 +880,7 @@ const getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
880
880
  };
881
881
  const getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
882
882
  if (level === LOG_LEVEL_WARN) onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
883
- else printLog(level, log);
883
+ else printLog(level, log);
884
884
  } : printLog;
885
885
  const addLogToString = (log) => {
886
886
  Object.defineProperty(log, "toString", {
@@ -974,7 +974,7 @@ function viteResolvePlugin(config) {
974
974
  //#endregion
975
975
  //#region src/utils/async-flatten.ts
976
976
  async function asyncFlatten(array) {
977
- do
977
+ do
978
978
  array = (await Promise.all(array)).flat(Infinity);
979
979
  while (array.some((v) => v?.then));
980
980
  return array;
@@ -1363,7 +1363,7 @@ function bindingifyTransformFilter(filterOption) {
1363
1363
  const { id, code, moduleType } = filterOption;
1364
1364
  let moduleTypeRet;
1365
1365
  if (moduleType) if (Array.isArray(moduleType)) moduleTypeRet = moduleType;
1366
- else moduleTypeRet = moduleType.include;
1366
+ else moduleTypeRet = moduleType.include;
1367
1367
  return {
1368
1368
  id: id ? bindingifyStringFilter(id) : undefined,
1369
1369
  code: code ? bindingifyStringFilter(code) : undefined,
@@ -2141,14 +2141,14 @@ function bindingifyTreeshakeOptions(config) {
2141
2141
  };
2142
2142
  let normalizedConfig = { moduleSideEffects: true };
2143
2143
  if (config.moduleSideEffects === undefined) normalizedConfig.moduleSideEffects = true;
2144
- else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
2144
+ else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
2145
2145
  external: true,
2146
2146
  sideEffects: false
2147
2147
  }, {
2148
2148
  external: false,
2149
2149
  sideEffects: true
2150
2150
  }];
2151
- else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
2151
+ else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
2152
2152
  normalizedConfig.annotations = config.annotations ?? true;
2153
2153
  return normalizedConfig;
2154
2154
  }
@@ -2434,7 +2434,7 @@ function createComposedPlugin(plugins) {
2434
2434
  const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code, id, moduleType);
2435
2435
  if (!isNullish(result)) {
2436
2436
  if (typeof result === "string") updateOutput(result);
2437
- else if (result.code) updateOutput(result.code, result.moduleSideEffects);
2437
+ else if (result.code) updateOutput(result.code, result.moduleSideEffects);
2438
2438
  }
2439
2439
  }
2440
2440
  return {
@@ -2547,10 +2547,10 @@ function composeJsPlugins(plugins) {
2547
2547
  const toBeComposed = [];
2548
2548
  plugins.forEach((plugin) => {
2549
2549
  if (isComposablePlugin(plugin)) toBeComposed.push(plugin);
2550
- else {
2550
+ else {
2551
2551
  if (toBeComposed.length > 0) {
2552
2552
  if (toBeComposed.length > 1) newPlugins.push(createComposedPlugin(toBeComposed));
2553
- else newPlugins.push(toBeComposed[0]);
2553
+ else newPlugins.push(toBeComposed[0]);
2554
2554
  toBeComposed.length = 0;
2555
2555
  }
2556
2556
  newPlugins.push(plugin);
@@ -2558,7 +2558,7 @@ else newPlugins.push(toBeComposed[0]);
2558
2558
  });
2559
2559
  if (toBeComposed.length > 0) {
2560
2560
  if (toBeComposed.length > 1) newPlugins.push(createComposedPlugin(toBeComposed));
2561
- else newPlugins.push(toBeComposed[0]);
2561
+ else newPlugins.push(toBeComposed[0]);
2562
2562
  toBeComposed.length = 0;
2563
2563
  }
2564
2564
  return newPlugins;
@@ -2607,7 +2607,7 @@ async function initializeWorker(registryId, pluginInfos, threadNumber) {
2607
2607
  await new Promise((resolve, reject) => {
2608
2608
  worker.once("message", async (message) => {
2609
2609
  if (message.type === "error") reject(message.error);
2610
- else resolve();
2610
+ else resolve();
2611
2611
  });
2612
2612
  });
2613
2613
  return worker;
@@ -3057,7 +3057,7 @@ var WatcherEmitter = class {
3057
3057
  on(event, listener) {
3058
3058
  const listeners = this.listeners.get(event);
3059
3059
  if (listeners) listeners.push(listener);
3060
- else this.listeners.set(event, [listener]);
3060
+ else this.listeners.set(event, [listener]);
3061
3061
  return this;
3062
3062
  }
3063
3063
  async onEvent(event) {
@@ -3164,19 +3164,19 @@ const watch = (input) => {
3164
3164
 
3165
3165
  //#endregion
3166
3166
  //#region package.json
3167
- var version = "1.0.0-beta.1-commit.67a0051";
3167
+ var version = "1.0.0-beta.1-commit.1d4a330";
3168
3168
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
3169
3169
 
3170
3170
  //#endregion
3171
3171
  //#region src/api/build.ts
3172
3172
  async function build(options) {
3173
3173
  if (Array.isArray(options)) return Promise.all(options.map((opts) => build(opts)));
3174
- else {
3174
+ else {
3175
3175
  const { output, write = true,...inputOptions } = options;
3176
3176
  const build$1 = await rolldown(inputOptions);
3177
3177
  try {
3178
3178
  if (write) return await build$1.write(output);
3179
- else return await build$1.generate(output);
3179
+ else return await build$1.generate(output);
3180
3180
  } finally {
3181
3181
  await build$1.close();
3182
3182
  }