rolldown 1.0.0-beta.1-commit.2fe52d4 → 1.0.0-beta.1-commit.35fb1f8

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,11 +1,11 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Dck9jWki.cjs');
4
- require('../shared/binding-Cw1COxB5.cjs');
5
- const require_consola_36c0034f = require('../shared/consola_36c0034f-7VQAd79i.cjs');
3
+ const require_src = require('../shared/src-Busnx6mE.cjs');
4
+ const require_binding = require('../shared/binding-fhgdIkpS.cjs');
5
+ const require_consola_36c0034f = require('../shared/consola_36c0034f-CynBWXXO.cjs');
6
+ const node_process = require_chunk.__toESM(require("node:process"));
6
7
  const node_path = require_chunk.__toESM(require("node:path"));
7
8
  const node_fs = require_chunk.__toESM(require("node:fs"));
8
- const node_process = require_chunk.__toESM(require("node:process"));
9
9
  const node_perf_hooks = require_chunk.__toESM(require("node:perf_hooks"));
10
10
  const node_util = require_chunk.__toESM(require("node:util"));
11
11
  const node_tty = require_chunk.__toESM(require("node:tty"));
@@ -321,7 +321,7 @@ async function bundleWithCliOptions(cliOptions) {
321
321
  process.exit(1);
322
322
  }
323
323
  for (const file of outputs) {
324
- if (outputs.length > 1) logger.log(`\n${require_src.colors.cyan(require_src.colors.bold(`|→ ${file.fileName}:`))}\n`);
324
+ if (outputs.length > 1) logger.log(`\n${require_binding.colors.cyan(require_binding.colors.bold(`|→ ${file.fileName}:`))}\n`);
325
325
  console.log(file.type === "asset" ? file.source : file.code);
326
326
  }
327
327
  } finally {
@@ -355,11 +355,11 @@ async function watchInner(config, cliOptions) {
355
355
  watcher.on("event", (event) => {
356
356
  switch (event.code) {
357
357
  case "BUNDLE_START":
358
- if (changedFile.length > 0) logger.log(`Found ${require_src.colors.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
358
+ if (changedFile.length > 0) logger.log(`Found ${require_binding.colors.bold(changedFile.map(relativeId).join(", "))} changed, rebuilding...`);
359
359
  changedFile.length = 0;
360
360
  break;
361
361
  case "BUNDLE_END":
362
- logger.success(`Rebuilt ${require_src.colors.bold(relativeId(event.output[0]))} in ${require_src.colors.bold(ms(event.duration))}.`);
362
+ logger.success(`Rebuilt ${require_binding.colors.bold(relativeId(event.output[0]))} in ${require_binding.colors.bold(ms(event.duration))}.`);
363
363
  break;
364
364
  case "ERROR":
365
365
  logger.error(event.error);
@@ -392,7 +392,7 @@ async function bundleInner(config, cliOptions) {
392
392
  logger.log(``);
393
393
  const endTime = node_perf_hooks.performance.now();
394
394
  const duration = endTime - startTime;
395
- logger.success(`Finished in ${require_src.colors.bold(ms(duration))}`);
395
+ logger.success(`Finished in ${require_binding.colors.bold(ms(duration))}`);
396
396
  }
397
397
  function printBundleOutputPretty(output) {
398
398
  const outputEntries = collectOutputEntries(output.output);
@@ -439,10 +439,10 @@ function printOutputEntries(entries, sizeAdjustment, distPath) {
439
439
  const filtered = entries.filter((e) => e.type === group.type);
440
440
  if (!filtered.length) continue;
441
441
  for (const entry of filtered.sort((a, z) => a.size - z.size)) {
442
- let log = require_src.colors.dim(withTrailingSlash(distPath));
443
- log += require_src.colors[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
444
- log += require_src.colors.dim(entry.type);
445
- log += require_src.colors.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
442
+ let log = require_binding.colors.dim(withTrailingSlash(distPath));
443
+ log += require_binding.colors[group.color](entry.fileName.padEnd(sizeAdjustment.longest + 2));
444
+ log += require_binding.colors.dim(entry.type);
445
+ log += require_binding.colors.dim(` │ size: ${displaySize(entry.size).padStart(sizeAdjustment.sizePad)}`);
446
446
  logger.log(log);
447
447
  }
448
448
  }
@@ -679,9 +679,9 @@ function parseCliArguments() {
679
679
 
680
680
  //#endregion
681
681
  //#region src/cli/commands/help.ts
682
- const introduction = `${require_src.colors.gray(`${require_src.description} (rolldown v${require_src.version})`)}
682
+ const introduction = `${require_binding.colors.gray(`${require_src.description} (rolldown v${require_src.version})`)}
683
683
 
684
- ${require_src.colors.bold(require_src.colors.underline("USAGE"))} ${require_src.colors.cyan("rolldown -c <config>")} or ${require_src.colors.cyan("rolldown <input> <options>")}`;
684
+ ${require_binding.colors.bold(require_binding.colors.underline("USAGE"))} ${require_binding.colors.cyan("rolldown -c <config>")} or ${require_binding.colors.cyan("rolldown <input> <options>")}`;
685
685
  const examples = [
686
686
  {
687
687
  title: "Bundle with a config file `rolldown.config.mjs`",
@@ -713,7 +713,7 @@ const notes = [
713
713
  function showHelp() {
714
714
  logger.log(introduction);
715
715
  logger.log("");
716
- logger.log(`${require_src.colors.bold(require_src.colors.underline("OPTIONS"))}`);
716
+ logger.log(`${require_binding.colors.bold(require_binding.colors.underline("OPTIONS"))}`);
717
717
  logger.log("");
718
718
  logger.log(Object.entries(options).sort(([a], [b]) => {
719
719
  if (options[a].short && !options[b].short) return -1;
@@ -726,20 +726,20 @@ function showHelp() {
726
726
  if (short) optionStr += `-${short}, `;
727
727
  if (type === "string") optionStr += `<${hint ?? option}>`;
728
728
  if (description$1 && description$1.length > 0) description$1 = description$1[0].toUpperCase() + description$1.slice(1);
729
- return require_src.colors.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
729
+ return require_binding.colors.cyan(optionStr.padEnd(30)) + description$1 + (description$1 && description$1?.endsWith(".") ? "" : ".");
730
730
  }).join("\n"));
731
731
  logger.log("");
732
- logger.log(`${require_src.colors.bold(require_src.colors.underline("EXAMPLES"))}`);
732
+ logger.log(`${require_binding.colors.bold(require_binding.colors.underline("EXAMPLES"))}`);
733
733
  logger.log("");
734
734
  examples.forEach(({ title, command }, ord) => {
735
735
  logger.log(` ${ord + 1}. ${title}:`);
736
- logger.log(` ${require_src.colors.cyan(command)}`);
736
+ logger.log(` ${require_binding.colors.cyan(command)}`);
737
737
  logger.log("");
738
738
  });
739
- logger.log(`${require_src.colors.bold(require_src.colors.underline("NOTES"))}`);
739
+ logger.log(`${require_binding.colors.bold(require_binding.colors.underline("NOTES"))}`);
740
740
  logger.log("");
741
741
  notes.forEach((note) => {
742
- logger.log(` * ${require_src.colors.gray(note)}`);
742
+ logger.log(` * ${require_binding.colors.gray(note)}`);
743
743
  });
744
744
  }
745
745
 
@@ -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-Dck9jWki.cjs');
4
- const require_binding$1 = require('../shared/binding-Cw1COxB5.cjs');
3
+ const require_src = require('../shared/src-Busnx6mE.cjs');
4
+ const require_binding = require('../shared/binding-fhgdIkpS.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
7
7
  //#region src/plugin/parallel-plugin.ts
@@ -53,10 +53,6 @@ function aliasPlugin(config) {
53
53
  return new require_src.BuiltinPlugin("builtin:alias", config);
54
54
  }
55
55
 
56
- //#endregion
57
- //#region src/experimental-index.ts
58
- var import_binding = require_chunk.__toESM(require_binding$1.require_binding());
59
-
60
56
  //#endregion
61
57
  exports.aliasPlugin = aliasPlugin
62
58
  exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
@@ -67,6 +63,7 @@ exports.importGlobPlugin = require_src.importGlobPlugin
67
63
  exports.jsonPlugin = require_src.jsonPlugin
68
64
  exports.loadFallbackPlugin = require_src.loadFallbackPlugin
69
65
  exports.manifestPlugin = require_src.manifestPlugin
66
+ exports.moduleFederationPlugin = require_src.moduleFederationPlugin
70
67
  exports.modulePreloadPolyfillPlugin = require_src.modulePreloadPolyfillPlugin
71
68
  exports.replacePlugin = replacePlugin
72
69
  exports.scan = experimental_scan
@@ -1,5 +1,5 @@
1
- const require_src = require('../shared/src-Dck9jWki.cjs');
2
- require('../shared/binding-Cw1COxB5.cjs');
1
+ const require_src = require('../shared/src-Busnx6mE.cjs');
2
+ require('../shared/binding-fhgdIkpS.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
5
5
  exports.build = require_src.build
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-Dck9jWki.cjs');
4
- const require_binding$1 = require('../shared/binding-Cw1COxB5.cjs');
3
+ const require_src = require('../shared/src-Busnx6mE.cjs');
4
+ const require_binding = require('../shared/binding-fhgdIkpS.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
7
7
  //#region src/parallel-plugin-worker.ts
8
- var import_binding = require_chunk.__toESM(require_binding$1.require_binding());
9
8
  const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData;
10
9
  (async () => {
11
10
  try {
@@ -26,7 +25,7 @@ const { registryId, pluginInfos, threadNumber } = node_worker_threads.workerData
26
25
  )
27
26
  };
28
27
  }));
29
- (0, import_binding.registerPlugins)(registryId, plugins);
28
+ (0, require_binding.import_binding.registerPlugins)(registryId, plugins);
30
29
  node_worker_threads.parentPort.postMessage({ type: "success" });
31
30
  } catch (error) {
32
31
  node_worker_threads.parentPort.postMessage({
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_binding$1 = require('../shared/binding-Cw1COxB5.cjs');
2
+ const require_binding = require('../shared/binding-fhgdIkpS.cjs');
4
3
 
5
4
  //#region src/parse-ast-index.ts
6
- var import_binding = require_chunk.__toESM(require_binding$1.require_binding());
7
5
  function wrap(result, sourceText) {
8
6
  let program, module$1, comments, errors, magicString;
9
7
  return {
@@ -40,18 +38,18 @@ function normalizeParseError(sourceText, errors) {
40
38
  }
41
39
  const e = errors[i];
42
40
  message += e.message + "\n" + e.labels.map((label) => {
43
- const location = require_binding$1.locate(sourceText, label.start, { offsetLine: 1 });
41
+ const location = require_binding.locate(sourceText, label.start, { offsetLine: 1 });
44
42
  if (!location) return;
45
- return require_binding$1.getCodeFrame(sourceText, location.line, location.column);
43
+ return require_binding.getCodeFrame(sourceText, location.line, location.column);
46
44
  }).filter(Boolean).join("\n");
47
45
  }
48
- return require_binding$1.error(require_binding$1.logParseError(message));
46
+ return require_binding.error(require_binding.logParseError(message));
49
47
  }
50
48
  function parseAst(filename, sourceText, options) {
51
- return wrap((0, import_binding.parseSync)(filename, sourceText, options), sourceText);
49
+ return wrap((0, require_binding.import_binding.parseSync)(filename, sourceText, options), sourceText);
52
50
  }
53
51
  async function parseAstAsync(filename, sourceText, options) {
54
- return wrap(await (0, import_binding.parseAsync)(filename, sourceText, options), sourceText);
52
+ return wrap(await (0, require_binding.import_binding.parseAsync)(filename, sourceText, options), sourceText);
55
53
  }
56
54
 
57
55
  //#endregion
package/dist/esm/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import "../shared/binding-BMSG-hw7.mjs";
2
- import { arraify, colors, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-genj5En-.mjs";
3
- import { createConsola } from "../shared/consola_36c0034f-DJFB73x3.mjs";
1
+ import { colors } from "../shared/binding-Bl7VQy7c.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-DNOXsZr0.mjs";
3
+ import { createConsola } from "../shared/consola_36c0034f-Cx52UqEq.mjs";
4
+ import process$1, { cwd } from "node:process";
4
5
  import path from "node:path";
5
6
  import fs from "node:fs";
6
- import process$1, { cwd } from "node:process";
7
7
  import { performance } from "node:perf_hooks";
8
8
  import { parseArgs } from "node:util";
9
9
  import { readdir } from "node:fs/promises";
@@ -1,5 +1,5 @@
1
- import { __toESM, require_binding } from "../shared/binding-BMSG-hw7.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-genj5En-.mjs";
1
+ import { import_binding } from "../shared/binding-Bl7VQy7c.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-DNOXsZr0.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
 
5
5
  //#region src/plugin/parallel-plugin.ts
@@ -51,10 +51,6 @@ function aliasPlugin(config) {
51
51
  return new BuiltinPlugin("builtin:alias", config);
52
52
  }
53
53
 
54
- //#endregion
55
- //#region src/experimental-index.ts
56
- var import_binding = __toESM(require_binding());
57
-
58
54
  //#endregion
59
55
  var transform = import_binding.transform;
60
- export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
56
+ export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, replacePlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
@@ -1,4 +1,4 @@
1
- import "../shared/binding-BMSG-hw7.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-genj5En-.mjs";
1
+ import "../shared/binding-Bl7VQy7c.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-DNOXsZr0.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,9 +1,8 @@
1
- import { __toESM, require_binding } from "../shared/binding-BMSG-hw7.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-genj5En-.mjs";
1
+ import { import_binding } from "../shared/binding-Bl7VQy7c.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-DNOXsZr0.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
6
- var import_binding = __toESM(require_binding());
7
6
  const { registryId, pluginInfos, threadNumber } = workerData;
8
7
  (async () => {
9
8
  try {
@@ -1,7 +1,6 @@
1
- import { __toESM, error, getCodeFrame, locate, logParseError, require_binding } from "../shared/binding-BMSG-hw7.mjs";
1
+ import { error, getCodeFrame, import_binding, locate, logParseError } from "../shared/binding-Bl7VQy7c.mjs";
2
2
 
3
3
  //#region src/parse-ast-index.ts
4
- var import_binding = __toESM(require_binding());
5
4
  function wrap(result, sourceText) {
6
5
  let program, module, comments, errors, magicString;
7
6
  return {
@@ -1,4 +1,6 @@
1
1
  import { createRequire } from "module";
2
+ import { env } from "node:process";
3
+ import * as tty from "tty";
2
4
 
3
5
  //#region rolldown:runtime
4
6
  var __create = Object.create;
@@ -116,6 +118,83 @@ function locate(source, search, options) {
116
118
  return getLocator(source, options)(search, options && options.startIndex);
117
119
  }
118
120
 
121
+ //#endregion
122
+ //#region ../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.js
123
+ const { env: env$1 = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
124
+ const isDisabled = "NO_COLOR" in env$1 || argv.includes("--no-color");
125
+ const isForced = "FORCE_COLOR" in env$1 || argv.includes("--color");
126
+ const isWindows = platform === "win32";
127
+ const isDumbTerminal = env$1.TERM === "dumb";
128
+ const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env$1.TERM && !isDumbTerminal;
129
+ const isCI = "CI" in env$1 && ("GITHUB_ACTIONS" in env$1 || "GITLAB_CI" in env$1 || "CIRCLECI" in env$1);
130
+ const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
131
+ const replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
132
+ const clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
133
+ const filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
134
+ const init = (open, close, replace) => filterEmpty(`\x1b[${open}m`, `\x1b[${close}m`, replace);
135
+ const colors$1 = {
136
+ reset: init(0, 0),
137
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
138
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
139
+ italic: init(3, 23),
140
+ underline: init(4, 24),
141
+ inverse: init(7, 27),
142
+ hidden: init(8, 28),
143
+ strikethrough: init(9, 29),
144
+ black: init(30, 39),
145
+ red: init(31, 39),
146
+ green: init(32, 39),
147
+ yellow: init(33, 39),
148
+ blue: init(34, 39),
149
+ magenta: init(35, 39),
150
+ cyan: init(36, 39),
151
+ white: init(37, 39),
152
+ gray: init(90, 39),
153
+ bgBlack: init(40, 49),
154
+ bgRed: init(41, 49),
155
+ bgGreen: init(42, 49),
156
+ bgYellow: init(43, 49),
157
+ bgBlue: init(44, 49),
158
+ bgMagenta: init(45, 49),
159
+ bgCyan: init(46, 49),
160
+ bgWhite: init(47, 49),
161
+ blackBright: init(90, 39),
162
+ redBright: init(91, 39),
163
+ greenBright: init(92, 39),
164
+ yellowBright: init(93, 39),
165
+ blueBright: init(94, 39),
166
+ magentaBright: init(95, 39),
167
+ cyanBright: init(96, 39),
168
+ whiteBright: init(97, 39),
169
+ bgBlackBright: init(100, 49),
170
+ bgRedBright: init(101, 49),
171
+ bgGreenBright: init(102, 49),
172
+ bgYellowBright: init(103, 49),
173
+ bgBlueBright: init(104, 49),
174
+ bgMagentaBright: init(105, 49),
175
+ bgCyanBright: init(106, 49),
176
+ bgWhiteBright: init(107, 49)
177
+ };
178
+ const createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors$1 : Object.keys(colors$1).reduce((colors$2, key) => ({
179
+ ...colors$2,
180
+ [key]: String
181
+ }), {});
182
+ const { reset, bold: bold$1, dim: dim$1, italic, underline: underline$1, inverse, hidden, strikethrough, black, red: red$1, green: green$1, yellow: yellow$1, blue, magenta, cyan: cyan$1, white, gray: gray$1, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, blackBright, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlackBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = createColors();
183
+
184
+ //#endregion
185
+ //#region src/cli/colors.ts
186
+ const { bold, cyan, dim, gray, green, red, underline, yellow } = createColors({ useColor: env.FORCE_COLOR !== "0" && !env.NO_COLOR });
187
+ const colors = {
188
+ bold,
189
+ cyan,
190
+ dim,
191
+ gray,
192
+ green,
193
+ red,
194
+ underline,
195
+ yellow
196
+ };
197
+
119
198
  //#endregion
120
199
  //#region src/log/logs.ts
121
200
  const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING", PARSE_ERROR = "PARSE_ERROR";
@@ -128,7 +207,7 @@ function logParseError(message) {
128
207
  function logMinifyWarning() {
129
208
  return {
130
209
  code: MINIFY_WARNING,
131
- message: "The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use."
210
+ message: colors.yellow("The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use.")
132
211
  };
133
212
  }
134
213
  function logInvalidLogPosition(pluginName) {
@@ -525,6 +604,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
525
604
  module.exports.Severity = nativeBinding.Severity;
526
605
  module.exports.transform = nativeBinding.transform;
527
606
  } });
607
+ var import_binding = __toESM(require_binding());
528
608
 
529
609
  //#endregion
530
- export { __toESM, augmentCodeLocation, error, getCodeFrame, locate, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logParseError, logPluginError, require_binding };
610
+ export { augmentCodeLocation, colors, error, getCodeFrame, import_binding, locate, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logParseError, logPluginError };
@@ -1,4 +1,6 @@
1
1
  const require_chunk = require('./chunk-qZFfknuJ.cjs');
2
+ const node_process = require_chunk.__toESM(require("node:process"));
3
+ const tty = require_chunk.__toESM(require("tty"));
2
4
 
3
5
  //#region src/utils/code-frame.ts
4
6
  function spaces(index) {
@@ -89,6 +91,83 @@ function locate(source, search, options) {
89
91
  return getLocator(source, options)(search, options && options.startIndex);
90
92
  }
91
93
 
94
+ //#endregion
95
+ //#region ../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.js
96
+ const { env: env$1 = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
97
+ const isDisabled = "NO_COLOR" in env$1 || argv.includes("--no-color");
98
+ const isForced = "FORCE_COLOR" in env$1 || argv.includes("--color");
99
+ const isWindows = platform === "win32";
100
+ const isDumbTerminal = env$1.TERM === "dumb";
101
+ const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env$1.TERM && !isDumbTerminal;
102
+ const isCI = "CI" in env$1 && ("GITHUB_ACTIONS" in env$1 || "GITLAB_CI" in env$1 || "CIRCLECI" in env$1);
103
+ const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
104
+ const replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
105
+ const clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
106
+ const filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === undefined) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
107
+ const init = (open, close, replace) => filterEmpty(`\x1b[${open}m`, `\x1b[${close}m`, replace);
108
+ const colors$1 = {
109
+ reset: init(0, 0),
110
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
111
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
112
+ italic: init(3, 23),
113
+ underline: init(4, 24),
114
+ inverse: init(7, 27),
115
+ hidden: init(8, 28),
116
+ strikethrough: init(9, 29),
117
+ black: init(30, 39),
118
+ red: init(31, 39),
119
+ green: init(32, 39),
120
+ yellow: init(33, 39),
121
+ blue: init(34, 39),
122
+ magenta: init(35, 39),
123
+ cyan: init(36, 39),
124
+ white: init(37, 39),
125
+ gray: init(90, 39),
126
+ bgBlack: init(40, 49),
127
+ bgRed: init(41, 49),
128
+ bgGreen: init(42, 49),
129
+ bgYellow: init(43, 49),
130
+ bgBlue: init(44, 49),
131
+ bgMagenta: init(45, 49),
132
+ bgCyan: init(46, 49),
133
+ bgWhite: init(47, 49),
134
+ blackBright: init(90, 39),
135
+ redBright: init(91, 39),
136
+ greenBright: init(92, 39),
137
+ yellowBright: init(93, 39),
138
+ blueBright: init(94, 39),
139
+ magentaBright: init(95, 39),
140
+ cyanBright: init(96, 39),
141
+ whiteBright: init(97, 39),
142
+ bgBlackBright: init(100, 49),
143
+ bgRedBright: init(101, 49),
144
+ bgGreenBright: init(102, 49),
145
+ bgYellowBright: init(103, 49),
146
+ bgBlueBright: init(104, 49),
147
+ bgMagentaBright: init(105, 49),
148
+ bgCyanBright: init(106, 49),
149
+ bgWhiteBright: init(107, 49)
150
+ };
151
+ const createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors$1 : Object.keys(colors$1).reduce((colors$2, key) => ({
152
+ ...colors$2,
153
+ [key]: String
154
+ }), {});
155
+ const { reset, bold: bold$1, dim: dim$1, italic, underline: underline$1, inverse, hidden, strikethrough, black, red: red$1, green: green$1, yellow: yellow$1, blue, magenta, cyan: cyan$1, white, gray: gray$1, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, blackBright, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlackBright, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = createColors();
156
+
157
+ //#endregion
158
+ //#region src/cli/colors.ts
159
+ const { bold, cyan, dim, gray, green, red, underline, yellow } = createColors({ useColor: node_process.env.FORCE_COLOR !== "0" && !node_process.env.NO_COLOR });
160
+ const colors = {
161
+ bold,
162
+ cyan,
163
+ dim,
164
+ gray,
165
+ green,
166
+ red,
167
+ underline,
168
+ yellow
169
+ };
170
+
92
171
  //#endregion
93
172
  //#region src/log/logs.ts
94
173
  const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", MINIFY_WARNING = "MINIFY_WARNING", PARSE_ERROR = "PARSE_ERROR";
@@ -101,7 +180,7 @@ function logParseError(message) {
101
180
  function logMinifyWarning() {
102
181
  return {
103
182
  code: MINIFY_WARNING,
104
- message: "The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use."
183
+ message: colors.yellow("The built-in minifier is still under development. Setting \"minify: true\" is not recommended for production use.")
105
184
  };
106
185
  }
107
186
  function logInvalidLogPosition(pluginName) {
@@ -499,6 +578,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
499
578
  module.exports.Severity = nativeBinding.Severity;
500
579
  module.exports.transform = nativeBinding.transform;
501
580
  } });
581
+ var import_binding = require_chunk.__toESM(require_binding());
502
582
 
503
583
  //#endregion
504
584
  Object.defineProperty(exports, 'augmentCodeLocation', {
@@ -507,6 +587,12 @@ Object.defineProperty(exports, 'augmentCodeLocation', {
507
587
  return augmentCodeLocation;
508
588
  }
509
589
  });
590
+ Object.defineProperty(exports, 'colors', {
591
+ enumerable: true,
592
+ get: function () {
593
+ return colors;
594
+ }
595
+ });
510
596
  Object.defineProperty(exports, 'error', {
511
597
  enumerable: true,
512
598
  get: function () {
@@ -519,6 +605,12 @@ Object.defineProperty(exports, 'getCodeFrame', {
519
605
  return getCodeFrame;
520
606
  }
521
607
  });
608
+ Object.defineProperty(exports, 'import_binding', {
609
+ enumerable: true,
610
+ get: function () {
611
+ return import_binding;
612
+ }
613
+ });
522
614
  Object.defineProperty(exports, 'locate', {
523
615
  enumerable: true,
524
616
  get: function () {
@@ -566,10 +658,4 @@ Object.defineProperty(exports, 'logPluginError', {
566
658
  get: function () {
567
659
  return logPluginError;
568
660
  }
569
- });
570
- Object.defineProperty(exports, 'require_binding', {
571
- enumerable: true,
572
- get: function () {
573
- return require_binding;
574
- }
575
661
  });
@@ -1,5 +1,5 @@
1
- import { sep } from "node:path";
2
1
  import process$1 from "node:process";
2
+ import { sep } from "node:path";
3
3
  import { formatWithOptions } from "node:util";
4
4
  import * as tty from "node:tty";
5
5
 
@@ -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-CwUxfcCh.mjs").then((m) => m.prompt(...args)),
818
+ prompt: (...args) => import("./prompt-DjjlOckE.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,7 +1,7 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-qZFfknuJ.cjs');
3
- const node_path = require_chunk.__toESM(require("node:path"));
4
3
  const node_process = require_chunk.__toESM(require("node:process"));
4
+ const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const node_util = require_chunk.__toESM(require("node:util"));
6
6
  const node_tty = require_chunk.__toESM(require("node:tty"));
7
7
 
@@ -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-sP1wES-1.cjs");
821
+ return require("./prompt-B58MxVuU.cjs");
822
822
  }).then((m) => m.prompt(...args)),
823
823
  reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
824
824
  ...options
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./chunk-qZFfknuJ.cjs');
3
- const require_consola_36c0034f = require('./consola_36c0034f-7VQAd79i.cjs');
4
- const node_path = require_chunk.__toESM(require("node:path"));
3
+ const require_consola_36c0034f = require('./consola_36c0034f-CynBWXXO.cjs');
5
4
  const node_process = require_chunk.__toESM(require("node:process"));
6
5
  const tty = require_chunk.__toESM(require("tty"));
6
+ const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const node_util = require_chunk.__toESM(require("node:util"));
8
8
  const node_tty = require_chunk.__toESM(require("node:tty"));
9
9
  const node_readline = require_chunk.__toESM(require("node:readline"));
@@ -1,4 +1,4 @@
1
- import { colors$1 as colors, getDefaultExportFromCjs, isUnicodeSupported } from "./consola_36c0034f-DJFB73x3.mjs";
1
+ import { colors$1 as colors, getDefaultExportFromCjs, isUnicodeSupported } from "./consola_36c0034f-Cx52UqEq.mjs";
2
2
  import { stdin, stdout } from "node:process";
3
3
  import require$$0 from "tty";
4
4
  import { WriteStream } from "node:tty";