@kubb/core 3.0.0-beta.11 → 3.0.0-beta.12
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/{chunk-S22N4SXV.cjs → chunk-4XGZX65D.cjs} +10 -10
- package/dist/{chunk-S22N4SXV.cjs.map → chunk-4XGZX65D.cjs.map} +1 -1
- package/dist/{chunk-2U6NQV4E.cjs → chunk-JAYRFK2Q.cjs} +4 -4
- package/dist/{chunk-2U6NQV4E.cjs.map → chunk-JAYRFK2Q.cjs.map} +1 -1
- package/dist/{chunk-MNBVVNEF.cjs → chunk-S6YT3VKM.cjs} +8 -8
- package/dist/{chunk-MNBVVNEF.cjs.map → chunk-S6YT3VKM.cjs.map} +1 -1
- package/dist/{chunk-E6CN2CZC.js → chunk-TJZXNSNV.js} +2 -2
- package/dist/{chunk-E6CN2CZC.js.map → chunk-TJZXNSNV.js.map} +1 -1
- package/dist/{chunk-6XTAOEVP.cjs → chunk-UVSDTTKT.cjs} +4 -4
- package/dist/{chunk-6XTAOEVP.cjs.map → chunk-UVSDTTKT.cjs.map} +1 -1
- package/dist/{chunk-I2VBU4S2.cjs → chunk-YDM5C5HG.cjs} +33 -33
- package/dist/{chunk-I2VBU4S2.cjs.map → chunk-YDM5C5HG.cjs.map} +1 -1
- package/dist/{chunk-PKTBHC5T.cjs → chunk-YT6XFJAC.cjs} +6 -6
- package/dist/{chunk-PKTBHC5T.cjs.map → chunk-YT6XFJAC.cjs.map} +1 -1
- package/dist/index.cjs +34 -34
- package/dist/index.js +1 -1
- package/dist/logger.cjs +7 -7
- package/dist/logger.js +1 -1
- package/dist/mocks.cjs +9 -9
- package/dist/{prompt-3GFRRR4Q.cjs → prompt-6MY3EF35.cjs} +62 -62
- package/dist/{prompt-3GFRRR4Q.cjs.map → prompt-6MY3EF35.cjs.map} +1 -1
- package/dist/transformers.cjs +23 -23
- package/dist/utils.cjs +17 -17
- package/package.json +6 -6
- package/src/utils/EventEmitter.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkS6YT3VKM_cjs = require('./chunk-S6YT3VKM.cjs');
|
|
4
|
+
var chunkUVSDTTKT_cjs = require('./chunk-UVSDTTKT.cjs');
|
|
5
5
|
var process$1 = require('process');
|
|
6
6
|
var f = require('readline');
|
|
7
7
|
var require$$0 = require('tty');
|
|
@@ -14,7 +14,7 @@ var f__default = /*#__PURE__*/_interopDefault(f);
|
|
|
14
14
|
var require$$0__default = /*#__PURE__*/_interopDefault(require$$0);
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs
|
|
17
|
-
|
|
17
|
+
chunkUVSDTTKT_cjs.init_cjs_shims();
|
|
18
18
|
var ESC = "\x1B";
|
|
19
19
|
var CSI = `${ESC}[`;
|
|
20
20
|
var beep = "\x07";
|
|
@@ -109,7 +109,7 @@ var createColors = (enabled = isColorSupported) => ({
|
|
|
109
109
|
picocolors.exports = createColors();
|
|
110
110
|
picocolors.exports.createColors = createColors;
|
|
111
111
|
var picocolorsExports = picocolors.exports;
|
|
112
|
-
var l = /* @__PURE__ */
|
|
112
|
+
var l = /* @__PURE__ */ chunkS6YT3VKM_cjs.getDefaultExportFromCjs(picocolorsExports);
|
|
113
113
|
function z({ onlyFirst: t = false } = {}) {
|
|
114
114
|
const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
|
|
115
115
|
return new RegExp(u, t ? void 0 : "g");
|
|
@@ -475,7 +475,7 @@ var oD = class extends h {
|
|
|
475
475
|
return this._cursor;
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
var unicode =
|
|
478
|
+
var unicode = chunkS6YT3VKM_cjs.isUnicodeSupported();
|
|
479
479
|
var s = (c2, fallback) => unicode ? c2 : fallback;
|
|
480
480
|
var S_STEP_ACTIVE = s("\u276F", ">");
|
|
481
481
|
var S_STEP_CANCEL = s("\u25A0", "x");
|
|
@@ -492,16 +492,16 @@ var symbol = (state) => {
|
|
|
492
492
|
switch (state) {
|
|
493
493
|
case "initial":
|
|
494
494
|
case "active": {
|
|
495
|
-
return
|
|
495
|
+
return chunkS6YT3VKM_cjs.colors.cyan(S_STEP_ACTIVE);
|
|
496
496
|
}
|
|
497
497
|
case "cancel": {
|
|
498
|
-
return
|
|
498
|
+
return chunkS6YT3VKM_cjs.colors.red(S_STEP_CANCEL);
|
|
499
499
|
}
|
|
500
500
|
case "error": {
|
|
501
|
-
return
|
|
501
|
+
return chunkS6YT3VKM_cjs.colors.yellow(S_STEP_ERROR);
|
|
502
502
|
}
|
|
503
503
|
case "submit": {
|
|
504
|
-
return
|
|
504
|
+
return chunkS6YT3VKM_cjs.colors.green(S_STEP_SUBMIT);
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
};
|
|
@@ -512,35 +512,35 @@ var text = (opts) => {
|
|
|
512
512
|
defaultValue: opts.defaultValue,
|
|
513
513
|
initialValue: opts.initialValue,
|
|
514
514
|
render() {
|
|
515
|
-
const title = `${
|
|
515
|
+
const title = `${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}
|
|
516
516
|
${symbol(this.state)} ${opts.message}
|
|
517
517
|
`;
|
|
518
|
-
const placeholder = opts.placeholder ?
|
|
518
|
+
const placeholder = opts.placeholder ? chunkS6YT3VKM_cjs.colors.inverse(opts.placeholder[0]) + chunkS6YT3VKM_cjs.colors.dim(opts.placeholder.slice(1)) : chunkS6YT3VKM_cjs.colors.inverse(chunkS6YT3VKM_cjs.colors.hidden("_"));
|
|
519
519
|
const value = this.value ? this.valueWithCursor : placeholder;
|
|
520
520
|
switch (this.state) {
|
|
521
521
|
case "error": {
|
|
522
522
|
return `${title.trim()}
|
|
523
|
-
${
|
|
523
|
+
${chunkS6YT3VKM_cjs.colors.yellow(
|
|
524
524
|
S_BAR
|
|
525
525
|
)} ${value}
|
|
526
|
-
${
|
|
526
|
+
${chunkS6YT3VKM_cjs.colors.yellow(S_BAR_END)} ${chunkS6YT3VKM_cjs.colors.yellow(
|
|
527
527
|
this.error
|
|
528
528
|
)}
|
|
529
529
|
`;
|
|
530
530
|
}
|
|
531
531
|
case "submit": {
|
|
532
|
-
return `${title}${
|
|
532
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${chunkS6YT3VKM_cjs.colors.dim(
|
|
533
533
|
this.value || opts.placeholder
|
|
534
534
|
)}`;
|
|
535
535
|
}
|
|
536
536
|
case "cancel": {
|
|
537
|
-
return `${title}${
|
|
538
|
-
|
|
539
|
-
)}${this.value?.trim() ? "\n" +
|
|
537
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${chunkS6YT3VKM_cjs.colors.strikethrough(
|
|
538
|
+
chunkS6YT3VKM_cjs.colors.dim(this.value ?? "")
|
|
539
|
+
)}${this.value?.trim() ? "\n" + chunkS6YT3VKM_cjs.colors.gray(S_BAR) : ""}`;
|
|
540
540
|
}
|
|
541
541
|
default: {
|
|
542
|
-
return `${title}${
|
|
543
|
-
${
|
|
542
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.cyan(S_BAR)} ${value}
|
|
543
|
+
${chunkS6YT3VKM_cjs.colors.cyan(
|
|
544
544
|
S_BAR_END
|
|
545
545
|
)}
|
|
546
546
|
`;
|
|
@@ -557,23 +557,23 @@ var confirm = (opts) => {
|
|
|
557
557
|
inactive,
|
|
558
558
|
initialValue: opts.initialValue ?? true,
|
|
559
559
|
render() {
|
|
560
|
-
const title = `${
|
|
560
|
+
const title = `${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}
|
|
561
561
|
${symbol(this.state)} ${opts.message}
|
|
562
562
|
`;
|
|
563
563
|
const value = this.value ? active : inactive;
|
|
564
564
|
switch (this.state) {
|
|
565
565
|
case "submit": {
|
|
566
|
-
return `${title}${
|
|
566
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${chunkS6YT3VKM_cjs.colors.dim(value)}`;
|
|
567
567
|
}
|
|
568
568
|
case "cancel": {
|
|
569
|
-
return `${title}${
|
|
570
|
-
|
|
569
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${chunkS6YT3VKM_cjs.colors.strikethrough(
|
|
570
|
+
chunkS6YT3VKM_cjs.colors.dim(value)
|
|
571
571
|
)}
|
|
572
|
-
${
|
|
572
|
+
${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}`;
|
|
573
573
|
}
|
|
574
574
|
default: {
|
|
575
|
-
return `${title}${
|
|
576
|
-
${
|
|
575
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.cyan(S_BAR)} ${this.value ? `${chunkS6YT3VKM_cjs.colors.green(S_RADIO_ACTIVE)} ${active}` : `${chunkS6YT3VKM_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkS6YT3VKM_cjs.colors.dim(active)}`} ${chunkS6YT3VKM_cjs.colors.dim("/")} ${this.value ? `${chunkS6YT3VKM_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkS6YT3VKM_cjs.colors.dim(inactive)}` : `${chunkS6YT3VKM_cjs.colors.green(S_RADIO_ACTIVE)} ${inactive}`}
|
|
576
|
+
${chunkS6YT3VKM_cjs.colors.cyan(S_BAR_END)}
|
|
577
577
|
`;
|
|
578
578
|
}
|
|
579
579
|
}
|
|
@@ -585,44 +585,44 @@ var select = (opts) => {
|
|
|
585
585
|
const label = option.label ?? String(option.value);
|
|
586
586
|
switch (state) {
|
|
587
587
|
case "active": {
|
|
588
|
-
return `${
|
|
588
|
+
return `${chunkS6YT3VKM_cjs.colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? chunkS6YT3VKM_cjs.colors.dim(`(${option.hint})`) : ""}`;
|
|
589
589
|
}
|
|
590
590
|
case "selected": {
|
|
591
|
-
return `${
|
|
591
|
+
return `${chunkS6YT3VKM_cjs.colors.dim(label)}`;
|
|
592
592
|
}
|
|
593
593
|
case "cancelled": {
|
|
594
|
-
return `${
|
|
594
|
+
return `${chunkS6YT3VKM_cjs.colors.strikethrough(chunkS6YT3VKM_cjs.colors.dim(label))}`;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
return `${
|
|
597
|
+
return `${chunkS6YT3VKM_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkS6YT3VKM_cjs.colors.dim(label)}`;
|
|
598
598
|
};
|
|
599
599
|
return new ED({
|
|
600
600
|
options: opts.options,
|
|
601
601
|
initialValue: opts.initialValue,
|
|
602
602
|
render() {
|
|
603
|
-
const title = `${
|
|
603
|
+
const title = `${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}
|
|
604
604
|
${symbol(this.state)} ${opts.message}
|
|
605
605
|
`;
|
|
606
606
|
switch (this.state) {
|
|
607
607
|
case "submit": {
|
|
608
|
-
return `${title}${
|
|
608
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${opt(
|
|
609
609
|
this.options[this.cursor],
|
|
610
610
|
"selected"
|
|
611
611
|
)}`;
|
|
612
612
|
}
|
|
613
613
|
case "cancel": {
|
|
614
|
-
return `${title}${
|
|
614
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${opt(
|
|
615
615
|
this.options[this.cursor],
|
|
616
616
|
"cancelled"
|
|
617
617
|
)}
|
|
618
|
-
${
|
|
618
|
+
${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}`;
|
|
619
619
|
}
|
|
620
620
|
default: {
|
|
621
|
-
return `${title}${
|
|
621
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.cyan(S_BAR)} ${this.options.map(
|
|
622
622
|
(option, i) => opt(option, i === this.cursor ? "active" : "inactive")
|
|
623
623
|
).join(`
|
|
624
|
-
${
|
|
625
|
-
${
|
|
624
|
+
${chunkS6YT3VKM_cjs.colors.cyan(S_BAR)} `)}
|
|
625
|
+
${chunkS6YT3VKM_cjs.colors.cyan(S_BAR_END)}
|
|
626
626
|
`;
|
|
627
627
|
}
|
|
628
628
|
}
|
|
@@ -634,22 +634,22 @@ var multiselect = (opts) => {
|
|
|
634
634
|
const label = option.label ?? String(option.value);
|
|
635
635
|
switch (state) {
|
|
636
636
|
case "active": {
|
|
637
|
-
return `${
|
|
637
|
+
return `${chunkS6YT3VKM_cjs.colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? chunkS6YT3VKM_cjs.colors.dim(`(${option.hint})`) : ""}`;
|
|
638
638
|
}
|
|
639
639
|
case "selected": {
|
|
640
|
-
return `${
|
|
640
|
+
return `${chunkS6YT3VKM_cjs.colors.green(S_CHECKBOX_SELECTED)} ${chunkS6YT3VKM_cjs.colors.dim(label)}`;
|
|
641
641
|
}
|
|
642
642
|
case "cancelled": {
|
|
643
|
-
return `${
|
|
643
|
+
return `${chunkS6YT3VKM_cjs.colors.strikethrough(chunkS6YT3VKM_cjs.colors.dim(label))}`;
|
|
644
644
|
}
|
|
645
645
|
case "active-selected": {
|
|
646
|
-
return `${
|
|
646
|
+
return `${chunkS6YT3VKM_cjs.colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? chunkS6YT3VKM_cjs.colors.dim(`(${option.hint})`) : ""}`;
|
|
647
647
|
}
|
|
648
648
|
case "submitted": {
|
|
649
|
-
return `${
|
|
649
|
+
return `${chunkS6YT3VKM_cjs.colors.dim(label)}`;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
return `${
|
|
652
|
+
return `${chunkS6YT3VKM_cjs.colors.dim(S_CHECKBOX_INACTIVE)} ${chunkS6YT3VKM_cjs.colors.dim(label)}`;
|
|
653
653
|
};
|
|
654
654
|
return new iD({
|
|
655
655
|
options: opts.options,
|
|
@@ -659,35 +659,35 @@ var multiselect = (opts) => {
|
|
|
659
659
|
validate(selected) {
|
|
660
660
|
if (this.required && selected.length === 0) {
|
|
661
661
|
return `Please select at least one option.
|
|
662
|
-
${
|
|
663
|
-
|
|
664
|
-
`Press ${
|
|
665
|
-
|
|
666
|
-
)} to select, ${
|
|
667
|
-
|
|
662
|
+
${chunkS6YT3VKM_cjs.colors.reset(
|
|
663
|
+
chunkS6YT3VKM_cjs.colors.dim(
|
|
664
|
+
`Press ${chunkS6YT3VKM_cjs.colors.gray(
|
|
665
|
+
chunkS6YT3VKM_cjs.colors.bgWhite(chunkS6YT3VKM_cjs.colors.inverse(" space "))
|
|
666
|
+
)} to select, ${chunkS6YT3VKM_cjs.colors.gray(
|
|
667
|
+
chunkS6YT3VKM_cjs.colors.bgWhite(chunkS6YT3VKM_cjs.colors.inverse(" enter "))
|
|
668
668
|
)} to submit`
|
|
669
669
|
)
|
|
670
670
|
)}`;
|
|
671
671
|
}
|
|
672
672
|
},
|
|
673
673
|
render() {
|
|
674
|
-
const title = `${
|
|
674
|
+
const title = `${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}
|
|
675
675
|
${symbol(this.state)} ${opts.message}
|
|
676
676
|
`;
|
|
677
677
|
switch (this.state) {
|
|
678
678
|
case "submit": {
|
|
679
|
-
return `${title}${
|
|
679
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(chunkS6YT3VKM_cjs.colors.dim(", ")) || chunkS6YT3VKM_cjs.colors.dim("none")}`;
|
|
680
680
|
}
|
|
681
681
|
case "cancel": {
|
|
682
|
-
const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(
|
|
683
|
-
return `${title}${
|
|
684
|
-
${
|
|
682
|
+
const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(chunkS6YT3VKM_cjs.colors.dim(", "));
|
|
683
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.gray(S_BAR)} ${label.trim() ? `${label}
|
|
684
|
+
${chunkS6YT3VKM_cjs.colors.gray(S_BAR)}` : ""}`;
|
|
685
685
|
}
|
|
686
686
|
case "error": {
|
|
687
687
|
const footer = this.error.split("\n").map(
|
|
688
|
-
(ln, i) => i === 0 ? `${
|
|
688
|
+
(ln, i) => i === 0 ? `${chunkS6YT3VKM_cjs.colors.yellow(S_BAR_END)} ${chunkS6YT3VKM_cjs.colors.yellow(ln)}` : ` ${ln}`
|
|
689
689
|
).join("\n");
|
|
690
|
-
return title +
|
|
690
|
+
return title + chunkS6YT3VKM_cjs.colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
|
|
691
691
|
const selected = this.value.includes(option.value);
|
|
692
692
|
const active = i === this.cursor;
|
|
693
693
|
if (active && selected) {
|
|
@@ -698,10 +698,10 @@ ${chunkMNBVVNEF_cjs.colors.gray(S_BAR)}` : ""}`;
|
|
|
698
698
|
}
|
|
699
699
|
return opt(option, active ? "active" : "inactive");
|
|
700
700
|
}).join(`
|
|
701
|
-
${
|
|
701
|
+
${chunkS6YT3VKM_cjs.colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
|
|
702
702
|
}
|
|
703
703
|
default: {
|
|
704
|
-
return `${title}${
|
|
704
|
+
return `${title}${chunkS6YT3VKM_cjs.colors.cyan(S_BAR)} ${this.options.map((option, i) => {
|
|
705
705
|
const selected = this.value.includes(option.value);
|
|
706
706
|
const active = i === this.cursor;
|
|
707
707
|
if (active && selected) {
|
|
@@ -712,8 +712,8 @@ ${chunkMNBVVNEF_cjs.colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
|
|
|
712
712
|
}
|
|
713
713
|
return opt(option, active ? "active" : "inactive");
|
|
714
714
|
}).join(`
|
|
715
|
-
${
|
|
716
|
-
${
|
|
715
|
+
${chunkS6YT3VKM_cjs.colors.cyan(S_BAR)} `)}
|
|
716
|
+
${chunkS6YT3VKM_cjs.colors.cyan(S_BAR_END)}
|
|
717
717
|
`;
|
|
718
718
|
}
|
|
719
719
|
}
|
|
@@ -756,5 +756,5 @@ async function prompt(message, opts = {}) {
|
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
exports.prompt = prompt;
|
|
759
|
-
//# sourceMappingURL=prompt-
|
|
760
|
-
//# sourceMappingURL=prompt-
|
|
759
|
+
//# sourceMappingURL=prompt-6MY3EF35.cjs.map
|
|
760
|
+
//# sourceMappingURL=prompt-6MY3EF35.cjs.map
|