rolldown 1.0.0-beta.1-commit.c170008 → 1.0.0-beta.1-commit.3484a68
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 +50 -1333
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +35 -1318
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{consola_36c0034f-C_-uQ5ge.cjs → consola_36c0034f-BBnpcLZ5.cjs} +2 -2
- package/dist/shared/{consola_36c0034f-DnM2mwLf.mjs → consola_36c0034f-BwyQ494_.mjs} +2 -2
- package/dist/shared/{prompt-BNaEjAIz.cjs → prompt-BKuli-WV.cjs} +48 -48
- package/dist/shared/{prompt-DhKXGIIR.mjs → prompt-CqEsx-3v.mjs} +1 -1
- package/dist/shared/{src-CQK3Jfvf.mjs → src-CtFcwTp3.mjs} +341 -25
- package/dist/shared/{src-CKrS_jGA.cjs → src-D_KTGKvd.cjs} +369 -59
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/cli/arguments/alias.d.ts +8 -1
- package/dist/types/cli/arguments/index.d.ts +1 -1
- package/dist/types/cli/arguments/normalize.d.ts +1 -1
- package/dist/types/cli/arguments/utils.d.ts +4 -2
- package/dist/types/log/logging.d.ts +0 -6
- package/dist/types/options/input-options.d.ts +4 -4
- package/dist/types/{treeshake → types}/module-side-effects.d.ts +0 -4
- package/dist/types/types/schema.d.ts +33 -0
- package/dist/types/utils/validator.d.ts +7 -1
- package/package.json +16 -18
- package/dist/types/cli/arguments/schema.d.ts +0 -12
- package/dist/types/options/input-options-schema.d.ts +0 -4
- package/dist/types/options/output-options-schema.d.ts +0 -3
- package/dist/types/treeshake/index.d.ts +0 -1
- package/dist/types/utils/zod-ext.d.ts +0 -16
|
@@ -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-
|
|
1
|
+
import { BuiltinPlugin, __toESM, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, require_binding, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-CtFcwTp3.mjs";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-
|
|
1
|
+
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src-CtFcwTp3.mjs";
|
|
2
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
3
3
|
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -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-
|
|
821
|
+
return require("./prompt-BKuli-WV.cjs");
|
|
822
822
|
}).then((m) => m.prompt(...args)),
|
|
823
823
|
reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
|
|
824
824
|
...options
|
|
@@ -833,7 +833,7 @@ function _getDefaultLogLevel() {
|
|
|
833
833
|
const consola = createConsola();
|
|
834
834
|
|
|
835
835
|
//#endregion
|
|
836
|
-
Object.defineProperty(exports, 'colors', {
|
|
836
|
+
Object.defineProperty(exports, 'colors$1', {
|
|
837
837
|
enumerable: true,
|
|
838
838
|
get: function () {
|
|
839
839
|
return colors;
|
|
@@ -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-
|
|
818
|
+
prompt: (...args) => import("./prompt-CqEsx-3v.mjs").then((m) => m.prompt(...args)),
|
|
819
819
|
reporters: options.reporters || [options.fancy ?? !(isCI || isTest) ? new FancyReporter() : new BasicReporter()],
|
|
820
820
|
...options
|
|
821
821
|
});
|
|
@@ -829,4 +829,4 @@ function _getDefaultLogLevel() {
|
|
|
829
829
|
const consola = createConsola();
|
|
830
830
|
|
|
831
831
|
//#endregion
|
|
832
|
-
export { colors, createConsola, getDefaultExportFromCjs, isUnicodeSupported };
|
|
832
|
+
export { colors as colors$1, createConsola, getDefaultExportFromCjs, isUnicodeSupported };
|
|
@@ -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-
|
|
3
|
+
const require_consola_36c0034f = require('./consola_36c0034f-BBnpcLZ5.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"));
|
|
@@ -588,10 +588,10 @@ const S_CHECKBOX_INACTIVE = s("◻", "[ ]");
|
|
|
588
588
|
const symbol = (state) => {
|
|
589
589
|
switch (state) {
|
|
590
590
|
case "initial":
|
|
591
|
-
case "active": return require_consola_36c0034f.colors.cyan(S_STEP_ACTIVE);
|
|
592
|
-
case "cancel": return require_consola_36c0034f.colors.red(S_STEP_CANCEL);
|
|
593
|
-
case "error": return require_consola_36c0034f.colors.yellow(S_STEP_ERROR);
|
|
594
|
-
case "submit": return require_consola_36c0034f.colors.green(S_STEP_SUBMIT);
|
|
591
|
+
case "active": return require_consola_36c0034f.colors$1.cyan(S_STEP_ACTIVE);
|
|
592
|
+
case "cancel": return require_consola_36c0034f.colors$1.red(S_STEP_CANCEL);
|
|
593
|
+
case "error": return require_consola_36c0034f.colors$1.yellow(S_STEP_ERROR);
|
|
594
|
+
case "submit": return require_consola_36c0034f.colors$1.green(S_STEP_SUBMIT);
|
|
595
595
|
}
|
|
596
596
|
};
|
|
597
597
|
const text = (opts) => {
|
|
@@ -601,20 +601,20 @@ const text = (opts) => {
|
|
|
601
601
|
defaultValue: opts.defaultValue,
|
|
602
602
|
initialValue: opts.initialValue,
|
|
603
603
|
render() {
|
|
604
|
-
const title = `${require_consola_36c0034f.colors.gray(S_BAR)}
|
|
604
|
+
const title = `${require_consola_36c0034f.colors$1.gray(S_BAR)}
|
|
605
605
|
${symbol(this.state)} ${opts.message}
|
|
606
606
|
`;
|
|
607
|
-
const placeholder = opts.placeholder ? require_consola_36c0034f.colors.inverse(opts.placeholder[0]) + require_consola_36c0034f.colors.dim(opts.placeholder.slice(1)) : require_consola_36c0034f.colors.inverse(require_consola_36c0034f.colors.hidden("_"));
|
|
607
|
+
const placeholder = opts.placeholder ? require_consola_36c0034f.colors$1.inverse(opts.placeholder[0]) + require_consola_36c0034f.colors$1.dim(opts.placeholder.slice(1)) : require_consola_36c0034f.colors$1.inverse(require_consola_36c0034f.colors$1.hidden("_"));
|
|
608
608
|
const value = this.value ? this.valueWithCursor : placeholder;
|
|
609
609
|
switch (this.state) {
|
|
610
610
|
case "error": return `${title.trim()}
|
|
611
|
-
${require_consola_36c0034f.colors.yellow(S_BAR)} ${value}
|
|
612
|
-
${require_consola_36c0034f.colors.yellow(S_BAR_END)} ${require_consola_36c0034f.colors.yellow(this.error)}
|
|
611
|
+
${require_consola_36c0034f.colors$1.yellow(S_BAR)} ${value}
|
|
612
|
+
${require_consola_36c0034f.colors$1.yellow(S_BAR_END)} ${require_consola_36c0034f.colors$1.yellow(this.error)}
|
|
613
613
|
`;
|
|
614
|
-
case "submit": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${require_consola_36c0034f.colors.dim(this.value || opts.placeholder)}`;
|
|
615
|
-
case "cancel": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${require_consola_36c0034f.colors.strikethrough(require_consola_36c0034f.colors.dim(this.value ?? ""))}${this.value?.trim() ? "\n" + require_consola_36c0034f.colors.gray(S_BAR) : ""}`;
|
|
616
|
-
default: return `${title}${require_consola_36c0034f.colors.cyan(S_BAR)} ${value}
|
|
617
|
-
${require_consola_36c0034f.colors.cyan(S_BAR_END)}
|
|
614
|
+
case "submit": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${require_consola_36c0034f.colors$1.dim(this.value || opts.placeholder)}`;
|
|
615
|
+
case "cancel": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${require_consola_36c0034f.colors$1.strikethrough(require_consola_36c0034f.colors$1.dim(this.value ?? ""))}${this.value?.trim() ? "\n" + require_consola_36c0034f.colors$1.gray(S_BAR) : ""}`;
|
|
616
|
+
default: return `${title}${require_consola_36c0034f.colors$1.cyan(S_BAR)} ${value}
|
|
617
|
+
${require_consola_36c0034f.colors$1.cyan(S_BAR_END)}
|
|
618
618
|
`;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
@@ -628,16 +628,16 @@ const confirm = (opts) => {
|
|
|
628
628
|
inactive,
|
|
629
629
|
initialValue: opts.initialValue ?? true,
|
|
630
630
|
render() {
|
|
631
|
-
const title = `${require_consola_36c0034f.colors.gray(S_BAR)}
|
|
631
|
+
const title = `${require_consola_36c0034f.colors$1.gray(S_BAR)}
|
|
632
632
|
${symbol(this.state)} ${opts.message}
|
|
633
633
|
`;
|
|
634
634
|
const value = this.value ? active : inactive;
|
|
635
635
|
switch (this.state) {
|
|
636
|
-
case "submit": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${require_consola_36c0034f.colors.dim(value)}`;
|
|
637
|
-
case "cancel": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${require_consola_36c0034f.colors.strikethrough(require_consola_36c0034f.colors.dim(value))}
|
|
638
|
-
${require_consola_36c0034f.colors.gray(S_BAR)}`;
|
|
639
|
-
default: return `${title}${require_consola_36c0034f.colors.cyan(S_BAR)} ${this.value ? `${require_consola_36c0034f.colors.green(S_RADIO_ACTIVE)} ${active}` : `${require_consola_36c0034f.colors.dim(S_RADIO_INACTIVE)} ${require_consola_36c0034f.colors.dim(active)}`} ${require_consola_36c0034f.colors.dim("/")} ${this.value ? `${require_consola_36c0034f.colors.dim(S_RADIO_INACTIVE)} ${require_consola_36c0034f.colors.dim(inactive)}` : `${require_consola_36c0034f.colors.green(S_RADIO_ACTIVE)} ${inactive}`}
|
|
640
|
-
${require_consola_36c0034f.colors.cyan(S_BAR_END)}
|
|
636
|
+
case "submit": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${require_consola_36c0034f.colors$1.dim(value)}`;
|
|
637
|
+
case "cancel": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${require_consola_36c0034f.colors$1.strikethrough(require_consola_36c0034f.colors$1.dim(value))}
|
|
638
|
+
${require_consola_36c0034f.colors$1.gray(S_BAR)}`;
|
|
639
|
+
default: return `${title}${require_consola_36c0034f.colors$1.cyan(S_BAR)} ${this.value ? `${require_consola_36c0034f.colors$1.green(S_RADIO_ACTIVE)} ${active}` : `${require_consola_36c0034f.colors$1.dim(S_RADIO_INACTIVE)} ${require_consola_36c0034f.colors$1.dim(active)}`} ${require_consola_36c0034f.colors$1.dim("/")} ${this.value ? `${require_consola_36c0034f.colors$1.dim(S_RADIO_INACTIVE)} ${require_consola_36c0034f.colors$1.dim(inactive)}` : `${require_consola_36c0034f.colors$1.green(S_RADIO_ACTIVE)} ${inactive}`}
|
|
640
|
+
${require_consola_36c0034f.colors$1.cyan(S_BAR_END)}
|
|
641
641
|
`;
|
|
642
642
|
}
|
|
643
643
|
}
|
|
@@ -647,26 +647,26 @@ const select = (opts) => {
|
|
|
647
647
|
const opt = (option, state) => {
|
|
648
648
|
const label = option.label ?? String(option.value);
|
|
649
649
|
switch (state) {
|
|
650
|
-
case "active": return `${require_consola_36c0034f.colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? require_consola_36c0034f.colors.dim(`(${option.hint})`) : ""}`;
|
|
651
|
-
case "selected": return `${require_consola_36c0034f.colors.dim(label)}`;
|
|
652
|
-
case "cancelled": return `${require_consola_36c0034f.colors.strikethrough(require_consola_36c0034f.colors.dim(label))}`;
|
|
650
|
+
case "active": return `${require_consola_36c0034f.colors$1.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? require_consola_36c0034f.colors$1.dim(`(${option.hint})`) : ""}`;
|
|
651
|
+
case "selected": return `${require_consola_36c0034f.colors$1.dim(label)}`;
|
|
652
|
+
case "cancelled": return `${require_consola_36c0034f.colors$1.strikethrough(require_consola_36c0034f.colors$1.dim(label))}`;
|
|
653
653
|
}
|
|
654
|
-
return `${require_consola_36c0034f.colors.dim(S_RADIO_INACTIVE)} ${require_consola_36c0034f.colors.dim(label)}`;
|
|
654
|
+
return `${require_consola_36c0034f.colors$1.dim(S_RADIO_INACTIVE)} ${require_consola_36c0034f.colors$1.dim(label)}`;
|
|
655
655
|
};
|
|
656
656
|
return new ED({
|
|
657
657
|
options: opts.options,
|
|
658
658
|
initialValue: opts.initialValue,
|
|
659
659
|
render() {
|
|
660
|
-
const title = `${require_consola_36c0034f.colors.gray(S_BAR)}
|
|
660
|
+
const title = `${require_consola_36c0034f.colors$1.gray(S_BAR)}
|
|
661
661
|
${symbol(this.state)} ${opts.message}
|
|
662
662
|
`;
|
|
663
663
|
switch (this.state) {
|
|
664
|
-
case "submit": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${opt(this.options[this.cursor], "selected")}`;
|
|
665
|
-
case "cancel": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${opt(this.options[this.cursor], "cancelled")}
|
|
666
|
-
${require_consola_36c0034f.colors.gray(S_BAR)}`;
|
|
667
|
-
default: return `${title}${require_consola_36c0034f.colors.cyan(S_BAR)} ${this.options.map((option, i) => opt(option, i === this.cursor ? "active" : "inactive")).join(`
|
|
668
|
-
${require_consola_36c0034f.colors.cyan(S_BAR)} `)}
|
|
669
|
-
${require_consola_36c0034f.colors.cyan(S_BAR_END)}
|
|
664
|
+
case "submit": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${opt(this.options[this.cursor], "selected")}`;
|
|
665
|
+
case "cancel": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${opt(this.options[this.cursor], "cancelled")}
|
|
666
|
+
${require_consola_36c0034f.colors$1.gray(S_BAR)}`;
|
|
667
|
+
default: return `${title}${require_consola_36c0034f.colors$1.cyan(S_BAR)} ${this.options.map((option, i) => opt(option, i === this.cursor ? "active" : "inactive")).join(`
|
|
668
|
+
${require_consola_36c0034f.colors$1.cyan(S_BAR)} `)}
|
|
669
|
+
${require_consola_36c0034f.colors$1.cyan(S_BAR_END)}
|
|
670
670
|
`;
|
|
671
671
|
}
|
|
672
672
|
}
|
|
@@ -676,13 +676,13 @@ const multiselect = (opts) => {
|
|
|
676
676
|
const opt = (option, state) => {
|
|
677
677
|
const label = option.label ?? String(option.value);
|
|
678
678
|
switch (state) {
|
|
679
|
-
case "active": return `${require_consola_36c0034f.colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? require_consola_36c0034f.colors.dim(`(${option.hint})`) : ""}`;
|
|
680
|
-
case "selected": return `${require_consola_36c0034f.colors.green(S_CHECKBOX_SELECTED)} ${require_consola_36c0034f.colors.dim(label)}`;
|
|
681
|
-
case "cancelled": return `${require_consola_36c0034f.colors.strikethrough(require_consola_36c0034f.colors.dim(label))}`;
|
|
682
|
-
case "active-selected": return `${require_consola_36c0034f.colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? require_consola_36c0034f.colors.dim(`(${option.hint})`) : ""}`;
|
|
683
|
-
case "submitted": return `${require_consola_36c0034f.colors.dim(label)}`;
|
|
679
|
+
case "active": return `${require_consola_36c0034f.colors$1.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? require_consola_36c0034f.colors$1.dim(`(${option.hint})`) : ""}`;
|
|
680
|
+
case "selected": return `${require_consola_36c0034f.colors$1.green(S_CHECKBOX_SELECTED)} ${require_consola_36c0034f.colors$1.dim(label)}`;
|
|
681
|
+
case "cancelled": return `${require_consola_36c0034f.colors$1.strikethrough(require_consola_36c0034f.colors$1.dim(label))}`;
|
|
682
|
+
case "active-selected": return `${require_consola_36c0034f.colors$1.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? require_consola_36c0034f.colors$1.dim(`(${option.hint})`) : ""}`;
|
|
683
|
+
case "submitted": return `${require_consola_36c0034f.colors$1.dim(label)}`;
|
|
684
684
|
}
|
|
685
|
-
return `${require_consola_36c0034f.colors.dim(S_CHECKBOX_INACTIVE)} ${require_consola_36c0034f.colors.dim(label)}`;
|
|
685
|
+
return `${require_consola_36c0034f.colors$1.dim(S_CHECKBOX_INACTIVE)} ${require_consola_36c0034f.colors$1.dim(label)}`;
|
|
686
686
|
};
|
|
687
687
|
return new iD({
|
|
688
688
|
options: opts.options,
|
|
@@ -691,39 +691,39 @@ const multiselect = (opts) => {
|
|
|
691
691
|
cursorAt: opts.cursorAt,
|
|
692
692
|
validate(selected) {
|
|
693
693
|
if (this.required && selected.length === 0) return `Please select at least one option.
|
|
694
|
-
${require_consola_36c0034f.colors.reset(require_consola_36c0034f.colors.dim(`Press ${require_consola_36c0034f.colors.gray(require_consola_36c0034f.colors.bgWhite(require_consola_36c0034f.colors.inverse(" space ")))} to select, ${require_consola_36c0034f.colors.gray(require_consola_36c0034f.colors.bgWhite(require_consola_36c0034f.colors.inverse(" enter ")))} to submit`))}`;
|
|
694
|
+
${require_consola_36c0034f.colors$1.reset(require_consola_36c0034f.colors$1.dim(`Press ${require_consola_36c0034f.colors$1.gray(require_consola_36c0034f.colors$1.bgWhite(require_consola_36c0034f.colors$1.inverse(" space ")))} to select, ${require_consola_36c0034f.colors$1.gray(require_consola_36c0034f.colors$1.bgWhite(require_consola_36c0034f.colors$1.inverse(" enter ")))} to submit`))}`;
|
|
695
695
|
},
|
|
696
696
|
render() {
|
|
697
|
-
const title = `${require_consola_36c0034f.colors.gray(S_BAR)}
|
|
697
|
+
const title = `${require_consola_36c0034f.colors$1.gray(S_BAR)}
|
|
698
698
|
${symbol(this.state)} ${opts.message}
|
|
699
699
|
`;
|
|
700
700
|
switch (this.state) {
|
|
701
|
-
case "submit": return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(require_consola_36c0034f.colors.dim(", ")) || require_consola_36c0034f.colors.dim("none")}`;
|
|
701
|
+
case "submit": return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(require_consola_36c0034f.colors$1.dim(", ")) || require_consola_36c0034f.colors$1.dim("none")}`;
|
|
702
702
|
case "cancel": {
|
|
703
|
-
const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(require_consola_36c0034f.colors.dim(", "));
|
|
704
|
-
return `${title}${require_consola_36c0034f.colors.gray(S_BAR)} ${label.trim() ? `${label}
|
|
705
|
-
${require_consola_36c0034f.colors.gray(S_BAR)}` : ""}`;
|
|
703
|
+
const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(require_consola_36c0034f.colors$1.dim(", "));
|
|
704
|
+
return `${title}${require_consola_36c0034f.colors$1.gray(S_BAR)} ${label.trim() ? `${label}
|
|
705
|
+
${require_consola_36c0034f.colors$1.gray(S_BAR)}` : ""}`;
|
|
706
706
|
}
|
|
707
707
|
case "error": {
|
|
708
|
-
const footer = this.error.split("\n").map((ln, i) => i === 0 ? `${require_consola_36c0034f.colors.yellow(S_BAR_END)} ${require_consola_36c0034f.colors.yellow(ln)}` : ` ${ln}`).join("\n");
|
|
709
|
-
return title + require_consola_36c0034f.colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
|
|
708
|
+
const footer = this.error.split("\n").map((ln, i) => i === 0 ? `${require_consola_36c0034f.colors$1.yellow(S_BAR_END)} ${require_consola_36c0034f.colors$1.yellow(ln)}` : ` ${ln}`).join("\n");
|
|
709
|
+
return title + require_consola_36c0034f.colors$1.yellow(S_BAR) + " " + this.options.map((option, i) => {
|
|
710
710
|
const selected = this.value.includes(option.value);
|
|
711
711
|
const active = i === this.cursor;
|
|
712
712
|
if (active && selected) return opt(option, "active-selected");
|
|
713
713
|
if (selected) return opt(option, "selected");
|
|
714
714
|
return opt(option, active ? "active" : "inactive");
|
|
715
715
|
}).join(`
|
|
716
|
-
${require_consola_36c0034f.colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
|
|
716
|
+
${require_consola_36c0034f.colors$1.yellow(S_BAR)} `) + "\n" + footer + "\n";
|
|
717
717
|
}
|
|
718
|
-
default: return `${title}${require_consola_36c0034f.colors.cyan(S_BAR)} ${this.options.map((option, i) => {
|
|
718
|
+
default: return `${title}${require_consola_36c0034f.colors$1.cyan(S_BAR)} ${this.options.map((option, i) => {
|
|
719
719
|
const selected = this.value.includes(option.value);
|
|
720
720
|
const active = i === this.cursor;
|
|
721
721
|
if (active && selected) return opt(option, "active-selected");
|
|
722
722
|
if (selected) return opt(option, "selected");
|
|
723
723
|
return opt(option, active ? "active" : "inactive");
|
|
724
724
|
}).join(`
|
|
725
|
-
${require_consola_36c0034f.colors.cyan(S_BAR)} `)}
|
|
726
|
-
${require_consola_36c0034f.colors.cyan(S_BAR_END)}
|
|
725
|
+
${require_consola_36c0034f.colors$1.cyan(S_BAR)} `)}
|
|
726
|
+
${require_consola_36c0034f.colors$1.cyan(S_BAR_END)}
|
|
727
727
|
`;
|
|
728
728
|
}
|
|
729
729
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colors, getDefaultExportFromCjs, isUnicodeSupported } from "./consola_36c0034f-
|
|
1
|
+
import { colors$1 as colors, getDefaultExportFromCjs, isUnicodeSupported } from "./consola_36c0034f-BwyQ494_.mjs";
|
|
2
2
|
import { stdin, stdout } from "node:process";
|
|
3
3
|
import require$$0 from "tty";
|
|
4
4
|
import { WriteStream } from "node:tty";
|