keycloakify 11.6.2 → 11.7.1

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.
Files changed (72) hide show
  1. package/README.md +1 -1
  2. package/bin/{735.index.js → 288.index.js} +226 -360
  3. package/bin/313.index.js +377 -0
  4. package/bin/{174.index.js → 33.index.js} +37 -2
  5. package/bin/{840.index.js → 355.index.js} +348 -97
  6. package/bin/363.index.js +157 -145
  7. package/bin/453.index.js +5 -41
  8. package/bin/{503.index.js → 678.index.js} +577 -53
  9. package/bin/{921.index.js → 780.index.js} +54 -45
  10. package/bin/880.index.js +206 -21
  11. package/bin/9.index.js +850 -0
  12. package/bin/{525.index.js → 911.index.js} +1302 -2
  13. package/bin/930.index.js +3 -4
  14. package/bin/{153.index.js → 947.index.js} +22 -797
  15. package/bin/main.js +11 -10
  16. package/bin/shared/initializeSpa/index.d.ts +1 -0
  17. package/bin/shared/initializeSpa/initializeSpa.d.ts +9 -0
  18. package/bin/tools/getInstalledModuleDirPath.d.ts +0 -1
  19. package/bin/tools/isRootPath.d.ts +1 -0
  20. package/bin/tools/listInstalledModules.d.ts +0 -1
  21. package/package.json +22 -44
  22. package/src/bin/eject-page.ts +7 -81
  23. package/src/bin/initialize-account-theme/initialize-account-theme.ts +15 -14
  24. package/src/bin/initialize-admin-theme.ts +17 -124
  25. package/src/bin/initialize-email-theme.ts +10 -34
  26. package/src/bin/keycloakify/generateResources/generateResources.ts +49 -21
  27. package/src/bin/main.ts +5 -4
  28. package/src/bin/own.ts +1 -2
  29. package/src/bin/shared/{addSyncExtensionsToPostinstallScript.ts → initializeSpa/addSyncExtensionsToPostinstallScript.ts} +2 -2
  30. package/src/bin/shared/initializeSpa/index.ts +1 -0
  31. package/src/bin/shared/initializeSpa/initializeSpa.ts +149 -0
  32. package/src/bin/sync-extensions/extensionModuleMeta.ts +0 -1
  33. package/src/bin/sync-extensions/getExtensionModuleFileSourceCodeReadyToBeCopied.ts +4 -1
  34. package/src/bin/tools/getInstalledModuleDirPath.ts +24 -22
  35. package/src/bin/tools/isRootPath.ts +22 -0
  36. package/src/bin/tools/listInstalledModules.ts +2 -4
  37. package/src/bin/tsconfig.json +1 -1
  38. package/bin/375.index.js +0 -4089
  39. package/bin/490.index.js +0 -1108
  40. package/bin/568.index.js +0 -1867
  41. package/bin/743.index.js +0 -69
  42. package/bin/initialize-account-theme/copyBoilerplate.d.ts +0 -4
  43. package/bin/initialize-account-theme/initializeAccountTheme_multiPage.d.ts +0 -3
  44. package/bin/initialize-account-theme/initializeAccountTheme_singlePage.d.ts +0 -11
  45. package/bin/shared/getLatestsSemVersionedTag.d.ts +0 -15
  46. package/bin/shared/promptKeycloakVersion.d.ts +0 -10
  47. package/bin/tools/OptionalIfCanBeUndefined.d.ts +0 -14
  48. package/bin/tools/crc32.d.ts +0 -9
  49. package/bin/tools/deflate.d.ts +0 -24
  50. package/bin/tools/octokit-addons/getLatestsSemVersionedTag.d.ts +0 -15
  51. package/bin/tools/octokit-addons/listTags.d.ts +0 -13
  52. package/bin/tools/tee.d.ts +0 -3
  53. package/bin/tools/trimIndent.d.ts +0 -5
  54. package/src/bin/initialize-account-theme/copyBoilerplate.ts +0 -32
  55. package/src/bin/initialize-account-theme/initializeAccountTheme_multiPage.ts +0 -21
  56. package/src/bin/initialize-account-theme/initializeAccountTheme_singlePage.ts +0 -142
  57. package/src/bin/initialize-account-theme/src/single-page/KcContext.ts +0 -7
  58. package/src/bin/initialize-account-theme/src/single-page/KcPage.tsx +0 -11
  59. package/src/bin/shared/getLatestsSemVersionedTag.ts +0 -201
  60. package/src/bin/shared/promptKeycloakVersion.ts +0 -72
  61. package/src/bin/tools/OptionalIfCanBeUndefined.ts +0 -12
  62. package/src/bin/tools/crc32.ts +0 -73
  63. package/src/bin/tools/deflate.ts +0 -61
  64. package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +0 -47
  65. package/src/bin/tools/octokit-addons/listTags.ts +0 -60
  66. package/src/bin/tools/tee.ts +0 -39
  67. package/src/bin/tools/trimIndent.ts +0 -49
  68. /package/bin/shared/{addSyncExtensionsToPostinstallScript.d.ts → initializeSpa/addSyncExtensionsToPostinstallScript.d.ts} +0 -0
  69. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcContext.ts +0 -0
  70. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPage.tsx +0 -0
  71. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/KcPageStory.tsx +0 -0
  72. /package/src/bin/initialize-account-theme/{src/multi-page → multi-page-boilerplate}/i18n.ts +0 -0
@@ -1,7 +1,146 @@
1
- exports.id = 503;
2
- exports.ids = [503];
1
+ exports.id = 678;
2
+ exports.ids = [678];
3
3
  exports.modules = {
4
4
 
5
+ /***/ 18512:
6
+ /***/ ((module) => {
7
+
8
+ "use strict";
9
+
10
+ const x = module.exports;
11
+ const ESC = '\u001B[';
12
+ const OSC = '\u001B]';
13
+ const BEL = '\u0007';
14
+ const SEP = ';';
15
+ const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
16
+
17
+ x.cursorTo = (x, y) => {
18
+ if (typeof x !== 'number') {
19
+ throw new TypeError('The `x` argument is required');
20
+ }
21
+
22
+ if (typeof y !== 'number') {
23
+ return ESC + (x + 1) + 'G';
24
+ }
25
+
26
+ return ESC + (y + 1) + ';' + (x + 1) + 'H';
27
+ };
28
+
29
+ x.cursorMove = (x, y) => {
30
+ if (typeof x !== 'number') {
31
+ throw new TypeError('The `x` argument is required');
32
+ }
33
+
34
+ let ret = '';
35
+
36
+ if (x < 0) {
37
+ ret += ESC + (-x) + 'D';
38
+ } else if (x > 0) {
39
+ ret += ESC + x + 'C';
40
+ }
41
+
42
+ if (y < 0) {
43
+ ret += ESC + (-y) + 'A';
44
+ } else if (y > 0) {
45
+ ret += ESC + y + 'B';
46
+ }
47
+
48
+ return ret;
49
+ };
50
+
51
+ x.cursorUp = count => ESC + (typeof count === 'number' ? count : 1) + 'A';
52
+ x.cursorDown = count => ESC + (typeof count === 'number' ? count : 1) + 'B';
53
+ x.cursorForward = count => ESC + (typeof count === 'number' ? count : 1) + 'C';
54
+ x.cursorBackward = count => ESC + (typeof count === 'number' ? count : 1) + 'D';
55
+
56
+ x.cursorLeft = ESC + 'G';
57
+ x.cursorSavePosition = ESC + (isTerminalApp ? '7' : 's');
58
+ x.cursorRestorePosition = ESC + (isTerminalApp ? '8' : 'u');
59
+ x.cursorGetPosition = ESC + '6n';
60
+ x.cursorNextLine = ESC + 'E';
61
+ x.cursorPrevLine = ESC + 'F';
62
+ x.cursorHide = ESC + '?25l';
63
+ x.cursorShow = ESC + '?25h';
64
+
65
+ x.eraseLines = count => {
66
+ let clear = '';
67
+
68
+ for (let i = 0; i < count; i++) {
69
+ clear += x.eraseLine + (i < count - 1 ? x.cursorUp() : '');
70
+ }
71
+
72
+ if (count) {
73
+ clear += x.cursorLeft;
74
+ }
75
+
76
+ return clear;
77
+ };
78
+
79
+ x.eraseEndLine = ESC + 'K';
80
+ x.eraseStartLine = ESC + '1K';
81
+ x.eraseLine = ESC + '2K';
82
+ x.eraseDown = ESC + 'J';
83
+ x.eraseUp = ESC + '1J';
84
+ x.eraseScreen = ESC + '2J';
85
+ x.scrollUp = ESC + 'S';
86
+ x.scrollDown = ESC + 'T';
87
+
88
+ x.clearScreen = '\u001Bc';
89
+
90
+ x.clearTerminal = process.platform === 'win32' ?
91
+ `${x.eraseScreen}${ESC}0f` :
92
+ // 1. Erases the screen (Only done in case `2` is not supported)
93
+ // 2. Erases the whole screen including scrollback buffer
94
+ // 3. Moves cursor to the top-left position
95
+ // More info: https://www.real-world-systems.com/docs/ANSIcode.html
96
+ `${x.eraseScreen}${ESC}3J${ESC}H`;
97
+
98
+ x.beep = BEL;
99
+
100
+ x.link = (text, url) => {
101
+ return [
102
+ OSC,
103
+ '8',
104
+ SEP,
105
+ SEP,
106
+ url,
107
+ BEL,
108
+ text,
109
+ OSC,
110
+ '8',
111
+ SEP,
112
+ SEP,
113
+ BEL
114
+ ].join('');
115
+ };
116
+
117
+ x.image = (buf, opts) => {
118
+ opts = opts || {};
119
+
120
+ let ret = OSC + '1337;File=inline=1';
121
+
122
+ if (opts.width) {
123
+ ret += `;width=${opts.width}`;
124
+ }
125
+
126
+ if (opts.height) {
127
+ ret += `;height=${opts.height}`;
128
+ }
129
+
130
+ if (opts.preserveAspectRatio === false) {
131
+ ret += ';preserveAspectRatio=0';
132
+ }
133
+
134
+ return ret + ':' + buf.toString('base64') + BEL;
135
+ };
136
+
137
+ x.iTerm = {};
138
+
139
+ x.iTerm.setCwd = cwd => OSC + '50;CurrentDir=' + (cwd || process.cwd()) + BEL;
140
+
141
+
142
+ /***/ }),
143
+
5
144
  /***/ 35575:
6
145
  /***/ ((module, exports, __webpack_require__) => {
7
146
 
@@ -3298,6 +3437,442 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
3298
3437
  module.exports = NodeFsHandler;
3299
3438
 
3300
3439
 
3440
+ /***/ }),
3441
+
3442
+ /***/ 39340:
3443
+ /***/ ((__unused_webpack_module, exports) => {
3444
+
3445
+ "use strict";
3446
+
3447
+
3448
+ Object.defineProperty(exports, "__esModule", ({
3449
+ value: true
3450
+ }));
3451
+ exports.withPromise = exports.withCallback = void 0;
3452
+
3453
+ /**
3454
+ * Open the input with a normal callback function
3455
+ *
3456
+ * @param {Input} input - input object
3457
+ * @param {function} valueMapper - function which maps the resulting id and value back to the expected format
3458
+ * @param {function} callback - callback function
3459
+ */
3460
+ const withCallback = (input, valueMapper, callback) => {
3461
+ input.open();
3462
+ input.onSelect((id, value) => callback(valueMapper(id, value)));
3463
+ };
3464
+ /**
3465
+ * Open the input with a promise
3466
+ *
3467
+ * @param {Input} input - input object
3468
+ * @param {function} valueMapper - function which maps the resulting id and value back to the expected format
3469
+ */
3470
+
3471
+
3472
+ exports.withCallback = withCallback;
3473
+
3474
+ const withPromise = (input, valueMapper) => {
3475
+ return new Promise((resolve, reject) => {
3476
+ input.open();
3477
+ input.onSelect((id, value) => {
3478
+ if (id === null) {
3479
+ reject();
3480
+ } else {
3481
+ resolve(valueMapper(id, value));
3482
+ }
3483
+ });
3484
+ });
3485
+ };
3486
+
3487
+ exports.withPromise = withPromise;
3488
+
3489
+ /***/ }),
3490
+
3491
+ /***/ 99398:
3492
+ /***/ ((module, exports, __webpack_require__) => {
3493
+
3494
+ "use strict";
3495
+
3496
+
3497
+ Object.defineProperty(exports, "__esModule", ({
3498
+ value: true
3499
+ }));
3500
+ exports["default"] = void 0;
3501
+
3502
+ var _input = _interopRequireDefault(__webpack_require__(25730));
3503
+
3504
+ var _renderer = _interopRequireDefault(__webpack_require__(16059));
3505
+
3506
+ var _callbackMappers = __webpack_require__(39340);
3507
+
3508
+ var _valueMappers = __webpack_require__(26730);
3509
+
3510
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3511
+
3512
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
3513
+
3514
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3515
+
3516
+ /**
3517
+ * Default options
3518
+ */
3519
+ const defaultOptions = {
3520
+ outputStream: process.stdout,
3521
+ inputStream: process.stdin,
3522
+ values: [],
3523
+ defaultValue: 0,
3524
+ selected: '(x)',
3525
+ unselected: '( )',
3526
+ indentation: 0,
3527
+ cleanup: true,
3528
+ valueRenderer: value => value
3529
+ };
3530
+ /**
3531
+ * Create an instance of cli-select with the given options
3532
+ *
3533
+ * @param {object} options - options for cli-select
3534
+ * @param {function} callback - if specified, a callback will be used, otherwise a promise gets returned (optional)
3535
+ */
3536
+
3537
+ const creator = (options, callback) => {
3538
+ // merge options with default options
3539
+ options = _objectSpread({}, defaultOptions, options); // create renderer and input instances
3540
+
3541
+ const renderer = new _renderer.default(options, options.outputStream);
3542
+ const input = new _input.default(options.inputStream);
3543
+ input.setDefaultValue(options.defaultValue);
3544
+ input.attachRenderer(renderer); // handle array and object values
3545
+
3546
+ let valueMapper;
3547
+
3548
+ if (Array.isArray(options.values)) {
3549
+ valueMapper = (0, _valueMappers.withArrayValues)(options);
3550
+ } else {
3551
+ valueMapper = (0, _valueMappers.withObjectValues)(options);
3552
+ } // map values
3553
+
3554
+
3555
+ options.values = valueMapper.input;
3556
+ input.setValues(options.values); // handle different callback methods
3557
+
3558
+ if (typeof callback === 'function') {
3559
+ return (0, _callbackMappers.withCallback)(input, valueMapper.output, callback);
3560
+ } else {
3561
+ return (0, _callbackMappers.withPromise)(input, valueMapper.output);
3562
+ }
3563
+ };
3564
+
3565
+ exports = module.exports = creator;
3566
+ Object.defineProperty(exports, "__esModule", ({
3567
+ value: true
3568
+ }));
3569
+ var _default = creator;
3570
+ exports["default"] = _default;
3571
+
3572
+ /***/ }),
3573
+
3574
+ /***/ 25730:
3575
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3576
+
3577
+ "use strict";
3578
+
3579
+
3580
+ Object.defineProperty(exports, "__esModule", ({
3581
+ value: true
3582
+ }));
3583
+ exports["default"] = void 0;
3584
+
3585
+ var _readline = _interopRequireDefault(__webpack_require__(14521));
3586
+
3587
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3588
+
3589
+ /**
3590
+ * Handle cli input
3591
+ */
3592
+ class Input {
3593
+ /**
3594
+ * Input constructor
3595
+ *
3596
+ * @param {any} stream - stream to catch (optional)
3597
+ */
3598
+ constructor(stream = process.stdin) {
3599
+ // set default values
3600
+ this.stream = stream;
3601
+ this.values = [];
3602
+ this.selectedValue = 0;
3603
+
3604
+ this.onSelectListener = () => {};
3605
+
3606
+ this.onKeyPress = this.onKeyPress.bind(this);
3607
+ }
3608
+ /**
3609
+ * Set the available values
3610
+ *
3611
+ * @param {array} values - all available values
3612
+ */
3613
+
3614
+
3615
+ setValues(values) {
3616
+ this.values = values;
3617
+
3618
+ if (this.renderer) {
3619
+ this.renderer.setValues(values);
3620
+ }
3621
+ }
3622
+ /**
3623
+ * Set the default value
3624
+ *
3625
+ * @param {number} defaultValue - default value id
3626
+ */
3627
+
3628
+
3629
+ setDefaultValue(defaultValue) {
3630
+ this.selectedValue = defaultValue;
3631
+ }
3632
+ /**
3633
+ * Attach a renderer to the input catcher
3634
+ *
3635
+ * @param {Renderer} renderer - renderer to use for rendering responses
3636
+ */
3637
+
3638
+
3639
+ attachRenderer(renderer) {
3640
+ this.renderer = renderer;
3641
+ this.renderer.setValues(this.values);
3642
+ }
3643
+ /**
3644
+ * Register an on select listener
3645
+ *
3646
+ * @param {function} listener - listener function which receives two parameters: valueId and value
3647
+ */
3648
+
3649
+
3650
+ onSelect(listener) {
3651
+ this.onSelectListener = listener;
3652
+ }
3653
+ /**
3654
+ * Open the stream and listen for input
3655
+ */
3656
+
3657
+
3658
+ open() {
3659
+ // register keypress event
3660
+ _readline.default.emitKeypressEvents(this.stream); // handle keypress
3661
+
3662
+
3663
+ this.stream.on('keypress', this.onKeyPress); // initially render the response
3664
+
3665
+ if (this.renderer) {
3666
+ this.renderer.render(this.selectedValue);
3667
+ } // hide pressed keys and start listening on input
3668
+
3669
+
3670
+ this.stream.setRawMode(true);
3671
+ this.stream.resume();
3672
+ }
3673
+ /**
3674
+ * Close the stream
3675
+ *
3676
+ * @param {boolean} cancelled - true if no value was selected (optional)
3677
+ */
3678
+
3679
+
3680
+ close(cancelled = false) {
3681
+ // reset stream properties
3682
+ this.stream.setRawMode(false);
3683
+ this.stream.pause(); // cleanup the output
3684
+
3685
+ if (this.renderer) {
3686
+ this.renderer.cleanup();
3687
+ } // call the on select listener
3688
+
3689
+
3690
+ if (cancelled) {
3691
+ this.onSelectListener(null);
3692
+ } else {
3693
+ this.onSelectListener(this.selectedValue, this.values[this.selectedValue]);
3694
+ }
3695
+
3696
+ this.stream.removeListener('keypress', this.onKeyPress);
3697
+ }
3698
+ /**
3699
+ * Render the response
3700
+ */
3701
+
3702
+
3703
+ render() {
3704
+ if (!this.renderer) {
3705
+ return;
3706
+ }
3707
+
3708
+ this.renderer.render(this.selectedValue);
3709
+ }
3710
+ /**
3711
+ * Handle key press event
3712
+ *
3713
+ * @param {string} string - input string
3714
+ * @param {object} key - object containing information about the pressed key
3715
+ */
3716
+
3717
+
3718
+ onKeyPress(string, key) {
3719
+ if (key) {
3720
+ if (key.name === 'up' && this.selectedValue > 0) {
3721
+ this.selectedValue--;
3722
+ this.render();
3723
+ } else if (key.name === 'down' && this.selectedValue + 1 < this.values.length) {
3724
+ this.selectedValue++;
3725
+ this.render();
3726
+ } else if (key.name === 'return') {
3727
+ this.close();
3728
+ } else if (key.name === 'escape' || key.name === 'c' && key.ctrl) {
3729
+ this.close(true);
3730
+ }
3731
+ }
3732
+ }
3733
+
3734
+ }
3735
+
3736
+ exports["default"] = Input;
3737
+
3738
+ /***/ }),
3739
+
3740
+ /***/ 16059:
3741
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3742
+
3743
+ "use strict";
3744
+
3745
+
3746
+ Object.defineProperty(exports, "__esModule", ({
3747
+ value: true
3748
+ }));
3749
+ exports["default"] = void 0;
3750
+
3751
+ var _readline = _interopRequireDefault(__webpack_require__(14521));
3752
+
3753
+ var _ansiEscapes = __webpack_require__(18512);
3754
+
3755
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3756
+
3757
+ /**
3758
+ * Response renderer
3759
+ */
3760
+ class Renderer {
3761
+ /**
3762
+ * Renderer constructor
3763
+ *
3764
+ * @param {object} options - renderer options
3765
+ * @param {any} stream - stream to write to (optional)
3766
+ */
3767
+ constructor(options, stream = process.stdout) {
3768
+ this.options = options;
3769
+ this.stream = stream;
3770
+ this.values = [];
3771
+ this.initialRender = true;
3772
+ }
3773
+ /**
3774
+ * Set the available values
3775
+ *
3776
+ * @param {array} values - all available values
3777
+ */
3778
+
3779
+
3780
+ setValues(values) {
3781
+ this.values = values;
3782
+ }
3783
+ /**
3784
+ * Render the values
3785
+ *
3786
+ * @param {number} selectedValue - selected value (optional)
3787
+ */
3788
+
3789
+
3790
+ render(selectedValue = 0) {
3791
+ if (this.initialRender) {
3792
+ // hide the cursor initially
3793
+ this.initialRender = false;
3794
+ this.stream.write(_ansiEscapes.cursorHide);
3795
+ } else {
3796
+ // remove previous lines and values
3797
+ this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
3798
+ } // output the current values
3799
+
3800
+
3801
+ this.values.forEach((value, index) => {
3802
+ const symbol = selectedValue === index ? this.options.selected : this.options.unselected;
3803
+ const indentation = ' '.repeat(this.options.indentation);
3804
+ const renderedValue = this.options.valueRenderer(value, selectedValue === index);
3805
+ const end = index !== this.values.length - 1 ? '\n' : '';
3806
+ this.stream.write(indentation + symbol + ' ' + renderedValue + end);
3807
+ });
3808
+ }
3809
+ /**
3810
+ * Cleanup the console at the end
3811
+ */
3812
+
3813
+
3814
+ cleanup() {
3815
+ this.stream.write((0, _ansiEscapes.eraseLines)(this.values.length));
3816
+ this.stream.write(_ansiEscapes.cursorShow);
3817
+ }
3818
+
3819
+ }
3820
+
3821
+ exports["default"] = Renderer;
3822
+
3823
+ /***/ }),
3824
+
3825
+ /***/ 26730:
3826
+ /***/ ((__unused_webpack_module, exports) => {
3827
+
3828
+ "use strict";
3829
+
3830
+
3831
+ Object.defineProperty(exports, "__esModule", ({
3832
+ value: true
3833
+ }));
3834
+ exports.withObjectValues = exports.withArrayValues = void 0;
3835
+
3836
+ /**
3837
+ * Map incoming and outgoing values if the initial values are an array
3838
+ *
3839
+ * @param {object} options - cli-select options
3840
+ */
3841
+ const withArrayValues = options => {
3842
+ return {
3843
+ input: options.values,
3844
+ output: (id, value) => {
3845
+ return {
3846
+ id,
3847
+ value
3848
+ };
3849
+ }
3850
+ };
3851
+ };
3852
+ /**
3853
+ * Map incoming and outgoing values if the initial values are an object
3854
+ *
3855
+ * @param {object} options - cli-select options
3856
+ */
3857
+
3858
+
3859
+ exports.withArrayValues = withArrayValues;
3860
+
3861
+ const withObjectValues = options => {
3862
+ const originalValues = options.values;
3863
+ return {
3864
+ input: Object.values(originalValues),
3865
+ output: (id, value) => {
3866
+ return {
3867
+ id: Object.keys(originalValues)[id],
3868
+ value
3869
+ };
3870
+ }
3871
+ };
3872
+ };
3873
+
3874
+ exports.withObjectValues = withObjectValues;
3875
+
3301
3876
  /***/ }),
3302
3877
 
3303
3878
  /***/ 6330:
@@ -6976,57 +7551,6 @@ module.exports = function(num) {
6976
7551
  module.exports = eval("require")("fsevents");
6977
7552
 
6978
7553
 
6979
- /***/ }),
6980
-
6981
- /***/ 16453:
6982
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
6983
-
6984
- "use strict";
6985
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6986
- /* harmony export */ "is": () => (/* reexport safe */ _assert_mjs__WEBPACK_IMPORTED_MODULE_0__.is)
6987
- /* harmony export */ });
6988
- /* harmony import */ var _assert_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29041);
6989
-
6990
- //# sourceMappingURL=is.mjs.map
6991
-
6992
-
6993
- /***/ }),
6994
-
6995
- /***/ 23483:
6996
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
6997
-
6998
- "use strict";
6999
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7000
- /* harmony export */ "Y": () => (/* binding */ objectKeys)
7001
- /* harmony export */ });
7002
- /** https://docs.tsafe.dev/objectKeys */
7003
- function objectKeys(o) {
7004
- return Object.keys(o);
7005
- }
7006
-
7007
-
7008
- //# sourceMappingURL=objectKeys.mjs.map
7009
-
7010
-
7011
- /***/ }),
7012
-
7013
- /***/ 76030:
7014
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
7015
-
7016
- "use strict";
7017
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7018
- /* harmony export */ "r": () => (/* binding */ symToStr)
7019
- /* harmony export */ });
7020
- /** @see <https://docs.tsafe.dev/main/symtostr> */
7021
- function symToStr(wrap) {
7022
- // @ts-expect-error: We know better
7023
- return Object.keys(wrap)[0];
7024
- }
7025
-
7026
-
7027
- //# sourceMappingURL=symToStr.mjs.map
7028
-
7029
-
7030
7554
  /***/ }),
7031
7555
 
7032
7556
  /***/ 15133: