@kubb/core 3.3.5 → 3.4.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.
package/dist/index.cjs CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkDJTXTPU5_cjs = require('./chunk-DJTXTPU5.cjs');
6
- var chunk2I2KNTZ6_cjs = require('./chunk-2I2KNTZ6.cjs');
7
- var chunkYLXE25XM_cjs = require('./chunk-YLXE25XM.cjs');
8
- require('./chunk-RUVWHIUM.cjs');
9
- var chunkDM33VT7Z_cjs = require('./chunk-DM33VT7Z.cjs');
5
+ var chunk4ZMRID7I_cjs = require('./chunk-4ZMRID7I.cjs');
6
+ var chunkPWNHY2QL_cjs = require('./chunk-PWNHY2QL.cjs');
7
+ var chunk6ZGRP6P7_cjs = require('./chunk-6ZGRP6P7.cjs');
8
+ require('./chunk-P4ATJPSP.cjs');
9
+ var chunkIZ2EOWIL_cjs = require('./chunk-IZ2EOWIL.cjs');
10
10
  var fs = require('@kubb/fs');
11
11
  var path3 = require('path');
12
12
  var mod = require('module');
@@ -25,19 +25,19 @@ var process__default = /*#__PURE__*/_interopDefault(process);
25
25
  var fs__default = /*#__PURE__*/_interopDefault(fs$1);
26
26
 
27
27
  // src/index.ts
28
- chunkDM33VT7Z_cjs.init_cjs_shims();
28
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
29
29
 
30
30
  // src/build.ts
31
- chunkDM33VT7Z_cjs.init_cjs_shims();
31
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
32
32
 
33
33
  // src/PluginManager.ts
34
- chunkDM33VT7Z_cjs.init_cjs_shims();
34
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
35
35
 
36
36
  // src/PromiseManager.ts
37
- chunkDM33VT7Z_cjs.init_cjs_shims();
37
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
38
38
 
39
39
  // src/utils/executeStrategies.ts
40
- chunkDM33VT7Z_cjs.init_cjs_shims();
40
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
41
41
  function hookSeq(promises) {
42
42
  return promises.filter(Boolean).reduce(
43
43
  (promise, func) => {
@@ -99,12 +99,12 @@ function isPromiseRejectedResult(result) {
99
99
  }
100
100
 
101
101
  // src/errors.ts
102
- chunkDM33VT7Z_cjs.init_cjs_shims();
102
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
103
103
  var ValidationPluginError = class extends Error {
104
104
  };
105
105
 
106
106
  // src/plugin.ts
107
- chunkDM33VT7Z_cjs.init_cjs_shims();
107
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
108
108
  function createPlugin(factory) {
109
109
  return (options = {}) => {
110
110
  return factory(options);
@@ -155,7 +155,7 @@ var pluginCore = createPlugin((options) => {
155
155
  var PluginManager = class {
156
156
  plugins = /* @__PURE__ */ new Set();
157
157
  fileManager;
158
- events = new chunkDJTXTPU5_cjs.EventEmitter();
158
+ events = new chunk4ZMRID7I_cjs.EventEmitter();
159
159
  config;
160
160
  executed = [];
161
161
  logger;
@@ -167,7 +167,7 @@ var PluginManager = class {
167
167
  this.config = config;
168
168
  this.options = options;
169
169
  this.logger = options.logger;
170
- this.fileManager = new chunk2I2KNTZ6_cjs.FileManager();
170
+ this.fileManager = new chunkPWNHY2QL_cjs.FileManager();
171
171
  this.#promiseManager = new PromiseManager({
172
172
  nullCheck: (state) => !!state?.result
173
173
  });
@@ -237,7 +237,7 @@ Falling back on the first item.
237
237
  const names = this.hookForPluginSync({
238
238
  pluginKey: params.pluginKey,
239
239
  hookName: "resolveName",
240
- parameters: [chunkYLXE25XM_cjs.trim(params.name), params.type],
240
+ parameters: [chunk6ZGRP6P7_cjs.trim(params.name), params.type],
241
241
  message: `Resolving name '${params.name}' and type '${params.type}'`
242
242
  });
243
243
  if (names && names?.length > 1) {
@@ -253,14 +253,14 @@ Falling back on the first item.
253
253
  ]
254
254
  });
255
255
  }
256
- return chunkYLXE25XM_cjs.transformReservedWord(names?.at(0) || params.name);
256
+ return chunk6ZGRP6P7_cjs.transformReservedWord(names?.at(0) || params.name);
257
257
  }
258
258
  const name = this.hookFirstSync({
259
259
  hookName: "resolveName",
260
- parameters: [chunkYLXE25XM_cjs.trim(params.name), params.type],
260
+ parameters: [chunk6ZGRP6P7_cjs.trim(params.name), params.type],
261
261
  message: `Resolving name '${params.name}' and type '${params.type}'`
262
262
  }).result;
263
- return chunkYLXE25XM_cjs.transformReservedWord(name);
263
+ return chunk6ZGRP6P7_cjs.transformReservedWord(name);
264
264
  };
265
265
  /**
266
266
  * Instead of calling `pluginManager.events.on` you can use `pluginManager.on`. This one also has better types.
@@ -590,7 +590,7 @@ Falling back on the first item.
590
590
  }
591
591
  #parse(plugin, pluginManager, context) {
592
592
  const usedPluginNames = pluginManager.#usedPluginNames;
593
- chunk2I2KNTZ6_cjs.setUniqueName(plugin.name, usedPluginNames);
593
+ chunkPWNHY2QL_cjs.setUniqueName(plugin.name, usedPluginNames);
594
594
  const key = [plugin.name, usedPluginNames[plugin.name]].filter(Boolean);
595
595
  if (plugin.context && typeof plugin.context === "function") {
596
596
  return {
@@ -625,7 +625,7 @@ Falling back on the first item.
625
625
  };
626
626
 
627
627
  // src/config.ts
628
- chunkDM33VT7Z_cjs.init_cjs_shims();
628
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
629
629
  function defineConfig(options) {
630
630
  return options;
631
631
  }
@@ -633,9 +633,9 @@ function isInputPath(result) {
633
633
  return !!result && "path" in result?.input;
634
634
  }
635
635
  async function setup(options) {
636
- const { config, logger = chunkDJTXTPU5_cjs.createLogger() } = options;
636
+ const { config, logger = chunk4ZMRID7I_cjs.createLogger() } = options;
637
637
  try {
638
- if (isInputPath(config) && !new chunk2I2KNTZ6_cjs.URLPath(config.input.path).isURL) {
638
+ if (isInputPath(config) && !new chunkPWNHY2QL_cjs.URLPath(config.input.path).isURL) {
639
639
  await fs.read(config.input.path);
640
640
  }
641
641
  } catch (e) {
@@ -713,7 +713,7 @@ async function safeBuild(options) {
713
713
  if (options.config.output.barrelType) {
714
714
  await pluginManager.fileManager.add(rootFile);
715
715
  }
716
- files = await chunk2I2KNTZ6_cjs.processFiles({
716
+ files = await chunkPWNHY2QL_cjs.processFiles({
717
717
  root: options.config.root,
718
718
  extension: options.config.output.extension,
719
719
  dryRun: !options.config.output.write,
@@ -736,7 +736,7 @@ async function safeBuild(options) {
736
736
  }
737
737
 
738
738
  // src/BaseGenerator.ts
739
- chunkDM33VT7Z_cjs.init_cjs_shims();
739
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
740
740
  var BaseGenerator = class {
741
741
  #options = {};
742
742
  #context = {};
@@ -761,22 +761,22 @@ var BaseGenerator = class {
761
761
  };
762
762
 
763
763
  // src/PackageManager.ts
764
- chunkDM33VT7Z_cjs.init_cjs_shims();
764
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
765
765
 
766
766
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
767
- chunkDM33VT7Z_cjs.init_cjs_shims();
767
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
768
768
 
769
769
  // ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
770
- chunkDM33VT7Z_cjs.init_cjs_shims();
770
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
771
771
 
772
772
  // ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
773
- chunkDM33VT7Z_cjs.init_cjs_shims();
773
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
774
774
 
775
775
  // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
776
- chunkDM33VT7Z_cjs.init_cjs_shims();
776
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
777
777
 
778
778
  // ../../node_modules/.pnpm/yocto-queue@1.1.1/node_modules/yocto-queue/index.js
779
- chunkDM33VT7Z_cjs.init_cjs_shims();
779
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
780
780
  var Node = class {
781
781
  value;
782
782
  next;
@@ -974,13 +974,13 @@ function locatePathSync(paths, {
974
974
  }
975
975
 
976
976
  // ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
977
- chunkDM33VT7Z_cjs.init_cjs_shims();
977
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
978
978
  function toPath2(urlOrPath) {
979
979
  return urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
980
980
  }
981
981
 
982
982
  // ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
983
- chunkDM33VT7Z_cjs.init_cjs_shims();
983
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
984
984
 
985
985
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
986
986
  var findUpStop = Symbol("findUpStop");
@@ -1182,15 +1182,15 @@ var PackageManager = class _PackageManager {
1182
1182
 
1183
1183
  Object.defineProperty(exports, "FileManager", {
1184
1184
  enumerable: true,
1185
- get: function () { return chunk2I2KNTZ6_cjs.FileManager; }
1185
+ get: function () { return chunkPWNHY2QL_cjs.FileManager; }
1186
1186
  });
1187
1187
  Object.defineProperty(exports, "getSource", {
1188
1188
  enumerable: true,
1189
- get: function () { return chunk2I2KNTZ6_cjs.getSource; }
1189
+ get: function () { return chunkPWNHY2QL_cjs.getSource; }
1190
1190
  });
1191
1191
  Object.defineProperty(exports, "processFiles", {
1192
1192
  enumerable: true,
1193
- get: function () { return chunk2I2KNTZ6_cjs.processFiles; }
1193
+ get: function () { return chunkPWNHY2QL_cjs.processFiles; }
1194
1194
  });
1195
1195
  exports.BaseGenerator = BaseGenerator;
1196
1196
  exports.PackageManager = PackageManager;
package/dist/logger.cjs CHANGED
@@ -1,26 +1,26 @@
1
1
  'use strict';
2
2
 
3
- var chunkDJTXTPU5_cjs = require('./chunk-DJTXTPU5.cjs');
4
- require('./chunk-RUVWHIUM.cjs');
5
- require('./chunk-DM33VT7Z.cjs');
3
+ var chunk4ZMRID7I_cjs = require('./chunk-4ZMRID7I.cjs');
4
+ require('./chunk-P4ATJPSP.cjs');
5
+ require('./chunk-IZ2EOWIL.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "LogMapper", {
10
10
  enumerable: true,
11
- get: function () { return chunkDJTXTPU5_cjs.LogMapper; }
11
+ get: function () { return chunk4ZMRID7I_cjs.LogMapper; }
12
12
  });
13
13
  Object.defineProperty(exports, "createLogger", {
14
14
  enumerable: true,
15
- get: function () { return chunkDJTXTPU5_cjs.createLogger; }
15
+ get: function () { return chunk4ZMRID7I_cjs.createLogger; }
16
16
  });
17
17
  Object.defineProperty(exports, "randomCliColour", {
18
18
  enumerable: true,
19
- get: function () { return chunkDJTXTPU5_cjs.randomCliColour; }
19
+ get: function () { return chunk4ZMRID7I_cjs.randomCliColour; }
20
20
  });
21
21
  Object.defineProperty(exports, "randomColour", {
22
22
  enumerable: true,
23
- get: function () { return chunkDJTXTPU5_cjs.randomColour; }
23
+ get: function () { return chunk4ZMRID7I_cjs.randomColour; }
24
24
  });
25
25
  //# sourceMappingURL=logger.cjs.map
26
26
  //# sourceMappingURL=logger.cjs.map
package/dist/mocks.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk2I2KNTZ6_cjs = require('./chunk-2I2KNTZ6.cjs');
4
- var chunkYLXE25XM_cjs = require('./chunk-YLXE25XM.cjs');
5
- var chunkDM33VT7Z_cjs = require('./chunk-DM33VT7Z.cjs');
3
+ var chunkPWNHY2QL_cjs = require('./chunk-PWNHY2QL.cjs');
4
+ var chunk6ZGRP6P7_cjs = require('./chunk-6ZGRP6P7.cjs');
5
+ var chunkIZ2EOWIL_cjs = require('./chunk-IZ2EOWIL.cjs');
6
6
  var path = require('path');
7
7
 
8
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
  var path__default = /*#__PURE__*/_interopDefault(path);
11
11
 
12
12
  // mocks/index.ts
13
- chunkDM33VT7Z_cjs.init_cjs_shims();
13
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
14
14
  var mockedLogger = {
15
15
  emit(type, message) {
16
16
  },
@@ -21,15 +21,15 @@ var mockedLogger = {
21
21
  var createMockedPluginManager = (name) => ({
22
22
  resolveName: (result) => {
23
23
  if (result.type === "file") {
24
- return chunkYLXE25XM_cjs.camelCase(name || result.name);
24
+ return chunk6ZGRP6P7_cjs.camelCase(name || result.name);
25
25
  }
26
26
  if (result.type === "type") {
27
- return chunkYLXE25XM_cjs.pascalCase(result.name);
27
+ return chunk6ZGRP6P7_cjs.pascalCase(result.name);
28
28
  }
29
29
  if (result.type === "function") {
30
- return chunkYLXE25XM_cjs.camelCase(result.name);
30
+ return chunk6ZGRP6P7_cjs.camelCase(result.name);
31
31
  }
32
- return chunkYLXE25XM_cjs.camelCase(result.name);
32
+ return chunk6ZGRP6P7_cjs.camelCase(result.name);
33
33
  },
34
34
  config: {
35
35
  output: {
@@ -62,7 +62,7 @@ async function matchFiles(files) {
62
62
  return void 0;
63
63
  }
64
64
  for (const file of files) {
65
- const source = await chunk2I2KNTZ6_cjs.getSource(chunk2I2KNTZ6_cjs.createFile(file), { logger: mockedLogger });
65
+ const source = await chunkPWNHY2QL_cjs.getSource(chunkPWNHY2QL_cjs.createFile(file), { logger: mockedLogger });
66
66
  expect(source).toMatchFileSnapshot(path__default.default.join("__snapshots__", file.path));
67
67
  }
68
68
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkRUVWHIUM_cjs = require('./chunk-RUVWHIUM.cjs');
4
- var chunkDM33VT7Z_cjs = require('./chunk-DM33VT7Z.cjs');
3
+ var chunkP4ATJPSP_cjs = require('./chunk-P4ATJPSP.cjs');
4
+ var chunkIZ2EOWIL_cjs = require('./chunk-IZ2EOWIL.cjs');
5
5
  var process$1 = require('process');
6
6
  var g = require('readline');
7
7
  var tty = require('tty');
@@ -13,7 +13,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
13
  var g__default = /*#__PURE__*/_interopDefault(g);
14
14
 
15
15
  // ../../node_modules/.pnpm/consola@3.3.3/node_modules/consola/dist/chunks/prompt.mjs
16
- chunkDM33VT7Z_cjs.init_cjs_shims();
16
+ chunkIZ2EOWIL_cjs.init_cjs_shims();
17
17
  function getDefaultExportFromCjs(x2) {
18
18
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
19
19
  }
@@ -543,7 +543,7 @@ var ND = class extends x {
543
543
  return this._cursor;
544
544
  }
545
545
  };
546
- var unicode = chunkRUVWHIUM_cjs.isUnicodeSupported();
546
+ var unicode = chunkP4ATJPSP_cjs.isUnicodeSupported();
547
547
  var s = (c2, fallback) => unicode ? c2 : fallback;
548
548
  var S_STEP_ACTIVE = s("\u276F", ">");
549
549
  var S_STEP_CANCEL = s("\u25A0", "x");
@@ -560,16 +560,16 @@ var symbol = (state) => {
560
560
  switch (state) {
561
561
  case "initial":
562
562
  case "active": {
563
- return chunkRUVWHIUM_cjs.colors.cyan(S_STEP_ACTIVE);
563
+ return chunkP4ATJPSP_cjs.colors.cyan(S_STEP_ACTIVE);
564
564
  }
565
565
  case "cancel": {
566
- return chunkRUVWHIUM_cjs.colors.red(S_STEP_CANCEL);
566
+ return chunkP4ATJPSP_cjs.colors.red(S_STEP_CANCEL);
567
567
  }
568
568
  case "error": {
569
- return chunkRUVWHIUM_cjs.colors.yellow(S_STEP_ERROR);
569
+ return chunkP4ATJPSP_cjs.colors.yellow(S_STEP_ERROR);
570
570
  }
571
571
  case "submit": {
572
- return chunkRUVWHIUM_cjs.colors.green(S_STEP_SUBMIT);
572
+ return chunkP4ATJPSP_cjs.colors.green(S_STEP_SUBMIT);
573
573
  }
574
574
  }
575
575
  };
@@ -580,35 +580,35 @@ var text = (opts) => {
580
580
  defaultValue: opts.defaultValue,
581
581
  initialValue: opts.initialValue,
582
582
  render() {
583
- const title = `${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}
583
+ const title = `${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}
584
584
  ${symbol(this.state)} ${opts.message}
585
585
  `;
586
- const placeholder = opts.placeholder ? chunkRUVWHIUM_cjs.colors.inverse(opts.placeholder[0]) + chunkRUVWHIUM_cjs.colors.dim(opts.placeholder.slice(1)) : chunkRUVWHIUM_cjs.colors.inverse(chunkRUVWHIUM_cjs.colors.hidden("_"));
586
+ const placeholder = opts.placeholder ? chunkP4ATJPSP_cjs.colors.inverse(opts.placeholder[0]) + chunkP4ATJPSP_cjs.colors.dim(opts.placeholder.slice(1)) : chunkP4ATJPSP_cjs.colors.inverse(chunkP4ATJPSP_cjs.colors.hidden("_"));
587
587
  const value = this.value ? this.valueWithCursor : placeholder;
588
588
  switch (this.state) {
589
589
  case "error": {
590
590
  return `${title.trim()}
591
- ${chunkRUVWHIUM_cjs.colors.yellow(
591
+ ${chunkP4ATJPSP_cjs.colors.yellow(
592
592
  S_BAR
593
593
  )} ${value}
594
- ${chunkRUVWHIUM_cjs.colors.yellow(S_BAR_END)} ${chunkRUVWHIUM_cjs.colors.yellow(
594
+ ${chunkP4ATJPSP_cjs.colors.yellow(S_BAR_END)} ${chunkP4ATJPSP_cjs.colors.yellow(
595
595
  this.error
596
596
  )}
597
597
  `;
598
598
  }
599
599
  case "submit": {
600
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${chunkRUVWHIUM_cjs.colors.dim(
600
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${chunkP4ATJPSP_cjs.colors.dim(
601
601
  this.value || opts.placeholder
602
602
  )}`;
603
603
  }
604
604
  case "cancel": {
605
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${chunkRUVWHIUM_cjs.colors.strikethrough(
606
- chunkRUVWHIUM_cjs.colors.dim(this.value ?? "")
607
- )}${this.value?.trim() ? "\n" + chunkRUVWHIUM_cjs.colors.gray(S_BAR) : ""}`;
605
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${chunkP4ATJPSP_cjs.colors.strikethrough(
606
+ chunkP4ATJPSP_cjs.colors.dim(this.value ?? "")
607
+ )}${this.value?.trim() ? "\n" + chunkP4ATJPSP_cjs.colors.gray(S_BAR) : ""}`;
608
608
  }
609
609
  default: {
610
- return `${title}${chunkRUVWHIUM_cjs.colors.cyan(S_BAR)} ${value}
611
- ${chunkRUVWHIUM_cjs.colors.cyan(
610
+ return `${title}${chunkP4ATJPSP_cjs.colors.cyan(S_BAR)} ${value}
611
+ ${chunkP4ATJPSP_cjs.colors.cyan(
612
612
  S_BAR_END
613
613
  )}
614
614
  `;
@@ -625,23 +625,23 @@ var confirm = (opts) => {
625
625
  inactive,
626
626
  initialValue: opts.initialValue ?? true,
627
627
  render() {
628
- const title = `${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}
628
+ const title = `${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}
629
629
  ${symbol(this.state)} ${opts.message}
630
630
  `;
631
631
  const value = this.value ? active : inactive;
632
632
  switch (this.state) {
633
633
  case "submit": {
634
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${chunkRUVWHIUM_cjs.colors.dim(value)}`;
634
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${chunkP4ATJPSP_cjs.colors.dim(value)}`;
635
635
  }
636
636
  case "cancel": {
637
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${chunkRUVWHIUM_cjs.colors.strikethrough(
638
- chunkRUVWHIUM_cjs.colors.dim(value)
637
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${chunkP4ATJPSP_cjs.colors.strikethrough(
638
+ chunkP4ATJPSP_cjs.colors.dim(value)
639
639
  )}
640
- ${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}`;
640
+ ${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}`;
641
641
  }
642
642
  default: {
643
- return `${title}${chunkRUVWHIUM_cjs.colors.cyan(S_BAR)} ${this.value ? `${chunkRUVWHIUM_cjs.colors.green(S_RADIO_ACTIVE)} ${active}` : `${chunkRUVWHIUM_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkRUVWHIUM_cjs.colors.dim(active)}`} ${chunkRUVWHIUM_cjs.colors.dim("/")} ${this.value ? `${chunkRUVWHIUM_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkRUVWHIUM_cjs.colors.dim(inactive)}` : `${chunkRUVWHIUM_cjs.colors.green(S_RADIO_ACTIVE)} ${inactive}`}
644
- ${chunkRUVWHIUM_cjs.colors.cyan(S_BAR_END)}
643
+ return `${title}${chunkP4ATJPSP_cjs.colors.cyan(S_BAR)} ${this.value ? `${chunkP4ATJPSP_cjs.colors.green(S_RADIO_ACTIVE)} ${active}` : `${chunkP4ATJPSP_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkP4ATJPSP_cjs.colors.dim(active)}`} ${chunkP4ATJPSP_cjs.colors.dim("/")} ${this.value ? `${chunkP4ATJPSP_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkP4ATJPSP_cjs.colors.dim(inactive)}` : `${chunkP4ATJPSP_cjs.colors.green(S_RADIO_ACTIVE)} ${inactive}`}
644
+ ${chunkP4ATJPSP_cjs.colors.cyan(S_BAR_END)}
645
645
  `;
646
646
  }
647
647
  }
@@ -653,44 +653,44 @@ var select = (opts) => {
653
653
  const label = option.label ?? String(option.value);
654
654
  switch (state) {
655
655
  case "active": {
656
- return `${chunkRUVWHIUM_cjs.colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? chunkRUVWHIUM_cjs.colors.dim(`(${option.hint})`) : ""}`;
656
+ return `${chunkP4ATJPSP_cjs.colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? chunkP4ATJPSP_cjs.colors.dim(`(${option.hint})`) : ""}`;
657
657
  }
658
658
  case "selected": {
659
- return `${chunkRUVWHIUM_cjs.colors.dim(label)}`;
659
+ return `${chunkP4ATJPSP_cjs.colors.dim(label)}`;
660
660
  }
661
661
  case "cancelled": {
662
- return `${chunkRUVWHIUM_cjs.colors.strikethrough(chunkRUVWHIUM_cjs.colors.dim(label))}`;
662
+ return `${chunkP4ATJPSP_cjs.colors.strikethrough(chunkP4ATJPSP_cjs.colors.dim(label))}`;
663
663
  }
664
664
  }
665
- return `${chunkRUVWHIUM_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkRUVWHIUM_cjs.colors.dim(label)}`;
665
+ return `${chunkP4ATJPSP_cjs.colors.dim(S_RADIO_INACTIVE)} ${chunkP4ATJPSP_cjs.colors.dim(label)}`;
666
666
  };
667
667
  return new jD({
668
668
  options: opts.options,
669
669
  initialValue: opts.initialValue,
670
670
  render() {
671
- const title = `${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}
671
+ const title = `${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}
672
672
  ${symbol(this.state)} ${opts.message}
673
673
  `;
674
674
  switch (this.state) {
675
675
  case "submit": {
676
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${opt(
676
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${opt(
677
677
  this.options[this.cursor],
678
678
  "selected"
679
679
  )}`;
680
680
  }
681
681
  case "cancel": {
682
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${opt(
682
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${opt(
683
683
  this.options[this.cursor],
684
684
  "cancelled"
685
685
  )}
686
- ${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}`;
686
+ ${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}`;
687
687
  }
688
688
  default: {
689
- return `${title}${chunkRUVWHIUM_cjs.colors.cyan(S_BAR)} ${this.options.map(
689
+ return `${title}${chunkP4ATJPSP_cjs.colors.cyan(S_BAR)} ${this.options.map(
690
690
  (option, i) => opt(option, i === this.cursor ? "active" : "inactive")
691
691
  ).join(`
692
- ${chunkRUVWHIUM_cjs.colors.cyan(S_BAR)} `)}
693
- ${chunkRUVWHIUM_cjs.colors.cyan(S_BAR_END)}
692
+ ${chunkP4ATJPSP_cjs.colors.cyan(S_BAR)} `)}
693
+ ${chunkP4ATJPSP_cjs.colors.cyan(S_BAR_END)}
694
694
  `;
695
695
  }
696
696
  }
@@ -702,22 +702,22 @@ var multiselect = (opts) => {
702
702
  const label = option.label ?? String(option.value);
703
703
  switch (state) {
704
704
  case "active": {
705
- return `${chunkRUVWHIUM_cjs.colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? chunkRUVWHIUM_cjs.colors.dim(`(${option.hint})`) : ""}`;
705
+ return `${chunkP4ATJPSP_cjs.colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? chunkP4ATJPSP_cjs.colors.dim(`(${option.hint})`) : ""}`;
706
706
  }
707
707
  case "selected": {
708
- return `${chunkRUVWHIUM_cjs.colors.green(S_CHECKBOX_SELECTED)} ${chunkRUVWHIUM_cjs.colors.dim(label)}`;
708
+ return `${chunkP4ATJPSP_cjs.colors.green(S_CHECKBOX_SELECTED)} ${chunkP4ATJPSP_cjs.colors.dim(label)}`;
709
709
  }
710
710
  case "cancelled": {
711
- return `${chunkRUVWHIUM_cjs.colors.strikethrough(chunkRUVWHIUM_cjs.colors.dim(label))}`;
711
+ return `${chunkP4ATJPSP_cjs.colors.strikethrough(chunkP4ATJPSP_cjs.colors.dim(label))}`;
712
712
  }
713
713
  case "active-selected": {
714
- return `${chunkRUVWHIUM_cjs.colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? chunkRUVWHIUM_cjs.colors.dim(`(${option.hint})`) : ""}`;
714
+ return `${chunkP4ATJPSP_cjs.colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? chunkP4ATJPSP_cjs.colors.dim(`(${option.hint})`) : ""}`;
715
715
  }
716
716
  case "submitted": {
717
- return `${chunkRUVWHIUM_cjs.colors.dim(label)}`;
717
+ return `${chunkP4ATJPSP_cjs.colors.dim(label)}`;
718
718
  }
719
719
  }
720
- return `${chunkRUVWHIUM_cjs.colors.dim(S_CHECKBOX_INACTIVE)} ${chunkRUVWHIUM_cjs.colors.dim(label)}`;
720
+ return `${chunkP4ATJPSP_cjs.colors.dim(S_CHECKBOX_INACTIVE)} ${chunkP4ATJPSP_cjs.colors.dim(label)}`;
721
721
  };
722
722
  return new wD({
723
723
  options: opts.options,
@@ -727,35 +727,35 @@ var multiselect = (opts) => {
727
727
  validate(selected) {
728
728
  if (this.required && selected.length === 0) {
729
729
  return `Please select at least one option.
730
- ${chunkRUVWHIUM_cjs.colors.reset(
731
- chunkRUVWHIUM_cjs.colors.dim(
732
- `Press ${chunkRUVWHIUM_cjs.colors.gray(
733
- chunkRUVWHIUM_cjs.colors.bgWhite(chunkRUVWHIUM_cjs.colors.inverse(" space "))
734
- )} to select, ${chunkRUVWHIUM_cjs.colors.gray(
735
- chunkRUVWHIUM_cjs.colors.bgWhite(chunkRUVWHIUM_cjs.colors.inverse(" enter "))
730
+ ${chunkP4ATJPSP_cjs.colors.reset(
731
+ chunkP4ATJPSP_cjs.colors.dim(
732
+ `Press ${chunkP4ATJPSP_cjs.colors.gray(
733
+ chunkP4ATJPSP_cjs.colors.bgWhite(chunkP4ATJPSP_cjs.colors.inverse(" space "))
734
+ )} to select, ${chunkP4ATJPSP_cjs.colors.gray(
735
+ chunkP4ATJPSP_cjs.colors.bgWhite(chunkP4ATJPSP_cjs.colors.inverse(" enter "))
736
736
  )} to submit`
737
737
  )
738
738
  )}`;
739
739
  }
740
740
  },
741
741
  render() {
742
- const title = `${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}
742
+ const title = `${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}
743
743
  ${symbol(this.state)} ${opts.message}
744
744
  `;
745
745
  switch (this.state) {
746
746
  case "submit": {
747
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(chunkRUVWHIUM_cjs.colors.dim(", ")) || chunkRUVWHIUM_cjs.colors.dim("none")}`;
747
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(chunkP4ATJPSP_cjs.colors.dim(", ")) || chunkP4ATJPSP_cjs.colors.dim("none")}`;
748
748
  }
749
749
  case "cancel": {
750
- const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(chunkRUVWHIUM_cjs.colors.dim(", "));
751
- return `${title}${chunkRUVWHIUM_cjs.colors.gray(S_BAR)} ${label.trim() ? `${label}
752
- ${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}` : ""}`;
750
+ const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(chunkP4ATJPSP_cjs.colors.dim(", "));
751
+ return `${title}${chunkP4ATJPSP_cjs.colors.gray(S_BAR)} ${label.trim() ? `${label}
752
+ ${chunkP4ATJPSP_cjs.colors.gray(S_BAR)}` : ""}`;
753
753
  }
754
754
  case "error": {
755
755
  const footer = this.error.split("\n").map(
756
- (ln, i) => i === 0 ? `${chunkRUVWHIUM_cjs.colors.yellow(S_BAR_END)} ${chunkRUVWHIUM_cjs.colors.yellow(ln)}` : ` ${ln}`
756
+ (ln, i) => i === 0 ? `${chunkP4ATJPSP_cjs.colors.yellow(S_BAR_END)} ${chunkP4ATJPSP_cjs.colors.yellow(ln)}` : ` ${ln}`
757
757
  ).join("\n");
758
- return title + chunkRUVWHIUM_cjs.colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
758
+ return title + chunkP4ATJPSP_cjs.colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
759
759
  const selected = this.value.includes(option.value);
760
760
  const active = i === this.cursor;
761
761
  if (active && selected) {
@@ -766,10 +766,10 @@ ${chunkRUVWHIUM_cjs.colors.gray(S_BAR)}` : ""}`;
766
766
  }
767
767
  return opt(option, active ? "active" : "inactive");
768
768
  }).join(`
769
- ${chunkRUVWHIUM_cjs.colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
769
+ ${chunkP4ATJPSP_cjs.colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
770
770
  }
771
771
  default: {
772
- return `${title}${chunkRUVWHIUM_cjs.colors.cyan(S_BAR)} ${this.options.map((option, i) => {
772
+ return `${title}${chunkP4ATJPSP_cjs.colors.cyan(S_BAR)} ${this.options.map((option, i) => {
773
773
  const selected = this.value.includes(option.value);
774
774
  const active = i === this.cursor;
775
775
  if (active && selected) {
@@ -780,8 +780,8 @@ ${chunkRUVWHIUM_cjs.colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
780
780
  }
781
781
  return opt(option, active ? "active" : "inactive");
782
782
  }).join(`
783
- ${chunkRUVWHIUM_cjs.colors.cyan(S_BAR)} `)}
784
- ${chunkRUVWHIUM_cjs.colors.cyan(S_BAR_END)}
783
+ ${chunkP4ATJPSP_cjs.colors.cyan(S_BAR)} `)}
784
+ ${chunkP4ATJPSP_cjs.colors.cyan(S_BAR_END)}
785
785
  `;
786
786
  }
787
787
  }
@@ -856,5 +856,5 @@ async function prompt(message, opts = {}) {
856
856
 
857
857
  exports.kCancel = kCancel;
858
858
  exports.prompt = prompt;
859
- //# sourceMappingURL=prompt-2DO6IHGP.cjs.map
860
- //# sourceMappingURL=prompt-2DO6IHGP.cjs.map
859
+ //# sourceMappingURL=prompt-ZJNX5QEM.cjs.map
860
+ //# sourceMappingURL=prompt-ZJNX5QEM.cjs.map