@quilted/create 0.2.22 → 0.2.23

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 (99) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/esnext/app.esnext +2 -4
  3. package/build/esnext/module.esnext +1 -2
  4. package/build/esnext/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.esnext +2 -4
  5. package/build/esnext/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.esnext +1 -2
  6. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/expand.esnext +3 -6
  7. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/parse.esnext +4 -8
  8. package/build/esnext/node_modules/.pnpm/braces@3.0.2/node_modules/braces/lib/utils.esnext +8 -16
  9. package/build/esnext/node_modules/.pnpm/common-tags@1.8.2/node_modules/common-tags/es/TemplateTag/TemplateTag.esnext +3 -6
  10. package/build/esnext/node_modules/.pnpm/fastq@1.13.0/node_modules/fastq/queue.esnext +1 -2
  11. package/build/esnext/node_modules/.pnpm/fill-range@7.0.1/node_modules/fill-range/index.esnext +12 -24
  12. package/build/esnext/node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.esnext +1 -2
  13. package/build/esnext/node_modules/.pnpm/kleur@3.0.3/node_modules/kleur/index.esnext +1 -2
  14. package/build/esnext/node_modules/.pnpm/micromatch@4.0.5/node_modules/micromatch/index.esnext +6 -12
  15. package/build/esnext/node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.esnext +19 -38
  16. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.esnext +8 -16
  17. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.esnext +3 -6
  18. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.esnext +3 -6
  19. package/build/esnext/node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.esnext +2 -4
  20. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/datepart.esnext +1 -2
  21. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/day.esnext +1 -2
  22. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/hours.esnext +2 -4
  23. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/index.esnext +1 -2
  24. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/meridiem.esnext +1 -2
  25. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/milliseconds.esnext +1 -2
  26. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/minutes.esnext +1 -2
  27. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/month.esnext +1 -2
  28. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/seconds.esnext +1 -2
  29. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/dateparts/year.esnext +1 -2
  30. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocomplete.esnext +16 -30
  31. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/autocompleteMultiselect.esnext +6 -12
  32. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/confirm.esnext +4 -8
  33. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/date.esnext +9 -18
  34. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/index.esnext +1 -2
  35. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/multiselect.esnext +8 -13
  36. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/number.esnext +11 -22
  37. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/prompt.esnext +4 -8
  38. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/select.esnext +10 -17
  39. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/text.esnext +9 -18
  40. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/elements/toggle.esnext +7 -14
  41. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/index.esnext +15 -30
  42. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/prompts.esnext +1 -2
  43. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/action.esnext +24 -48
  44. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/clear.esnext +13 -26
  45. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/entriesToDisplay.esnext +2 -4
  46. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/figures.esnext +1 -2
  47. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/index.esnext +1 -2
  48. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/lines.esnext +2 -4
  49. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/strip.esnext +1 -2
  50. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/style.esnext +1 -2
  51. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/dist/util/wrap.esnext +3 -6
  52. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/index.esnext +2 -4
  53. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/datepart.esnext +1 -2
  54. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/day.esnext +1 -2
  55. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/hours.esnext +1 -2
  56. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/index.esnext +1 -2
  57. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/meridiem.esnext +1 -2
  58. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/milliseconds.esnext +1 -2
  59. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/minutes.esnext +1 -2
  60. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/month.esnext +1 -2
  61. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/seconds.esnext +1 -2
  62. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/dateparts/year.esnext +1 -2
  63. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocomplete.esnext +11 -22
  64. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/autocompleteMultiselect.esnext +6 -12
  65. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/confirm.esnext +4 -8
  66. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/date.esnext +8 -16
  67. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/index.esnext +1 -2
  68. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/multiselect.esnext +4 -8
  69. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/number.esnext +10 -20
  70. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/prompt.esnext +4 -8
  71. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/select.esnext +5 -10
  72. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/text.esnext +8 -16
  73. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/elements/toggle.esnext +7 -14
  74. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/index.esnext +4 -8
  75. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/prompts.esnext +1 -2
  76. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/action.esnext +24 -48
  77. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/clear.esnext +2 -4
  78. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/entriesToDisplay.esnext +2 -4
  79. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/figures.esnext +1 -2
  80. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/index.esnext +1 -2
  81. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/lines.esnext +2 -4
  82. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/strip.esnext +1 -2
  83. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/style.esnext +1 -2
  84. package/build/esnext/node_modules/.pnpm/prompts@2.4.2/node_modules/prompts/lib/util/wrap.esnext +2 -4
  85. package/build/esnext/node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.esnext +3 -6
  86. package/build/esnext/node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.esnext +6 -12
  87. package/build/esnext/node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.esnext +1 -2
  88. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/compose/resolve-flow-collection.esnext +11 -12
  89. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/lexer.esnext +17 -18
  90. package/build/esnext/node_modules/.pnpm/yaml@2.1.1/node_modules/yaml/browser/dist/parse/parser.esnext +9 -10
  91. package/build/esnext/package.esnext +7 -14
  92. package/build/esnext/server.esnext +1 -2
  93. package/build/esnext/shared/prompts.esnext +3 -6
  94. package/build/esnext/shared.esnext +3 -6
  95. package/package.json +1 -1
  96. package/templates/app-empty/tsconfig.json +2 -1
  97. package/templates/app-graphql/tsconfig.json +2 -1
  98. package/templates/app-trpc/tsconfig.json +2 -1
  99. package/templates/workspace/package.json +2 -2
@@ -36,10 +36,8 @@ import { c as constants } from './constants.esnext';
36
36
  };
37
37
  exports.escapeLast = (input, char, lastIdx) => {
38
38
  const idx = input.lastIndexOf(char, lastIdx);
39
- if (idx === -1)
40
- return input;
41
- if (input[idx - 1] === "\\")
42
- return exports.escapeLast(input, char, idx - 1);
39
+ if (idx === -1) return input;
40
+ if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
43
41
  return `${input.slice(0, idx)}\\${input.slice(idx)}`;
44
42
  };
45
43
  exports.removePrefix = (input, state = {}) => {
@@ -1,8 +1,7 @@
1
1
  var datepart;
2
2
  var hasRequiredDatepart;
3
3
  function requireDatepart() {
4
- if (hasRequiredDatepart)
5
- return datepart;
4
+ if (hasRequiredDatepart) return datepart;
6
5
  hasRequiredDatepart = 1;
7
6
  class DatePart {
8
7
  constructor({
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var day;
4
4
  var hasRequiredDay;
5
5
  function requireDay() {
6
- if (hasRequiredDay)
7
- return day;
6
+ if (hasRequiredDay) return day;
8
7
  hasRequiredDay = 1;
9
8
  const DatePart = requireDatepart();
10
9
  const pos = (n) => {
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var hours;
4
4
  var hasRequiredHours;
5
5
  function requireHours() {
6
- if (hasRequiredHours)
7
- return hours;
6
+ if (hasRequiredHours) return hours;
8
7
  hasRequiredHours = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Hours extends DatePart {
@@ -22,8 +21,7 @@ function requireHours() {
22
21
  }
23
22
  toString() {
24
23
  let hours2 = this.date.getHours();
25
- if (/h/.test(this.token))
26
- hours2 = hours2 % 12 || 12;
24
+ if (/h/.test(this.token)) hours2 = hours2 % 12 || 12;
27
25
  return this.token.length > 1 ? String(hours2).padStart(2, "0") : hours2;
28
26
  }
29
27
  }
@@ -11,8 +11,7 @@ import { __require as requireYear } from './year.esnext';
11
11
  var dateparts;
12
12
  var hasRequiredDateparts;
13
13
  function requireDateparts() {
14
- if (hasRequiredDateparts)
15
- return dateparts;
14
+ if (hasRequiredDateparts) return dateparts;
16
15
  hasRequiredDateparts = 1;
17
16
  dateparts = {
18
17
  DatePart: requireDatepart(),
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var meridiem;
4
4
  var hasRequiredMeridiem;
5
5
  function requireMeridiem() {
6
- if (hasRequiredMeridiem)
7
- return meridiem;
6
+ if (hasRequiredMeridiem) return meridiem;
8
7
  hasRequiredMeridiem = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Meridiem extends DatePart {
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var milliseconds;
4
4
  var hasRequiredMilliseconds;
5
5
  function requireMilliseconds() {
6
- if (hasRequiredMilliseconds)
7
- return milliseconds;
6
+ if (hasRequiredMilliseconds) return milliseconds;
8
7
  hasRequiredMilliseconds = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Milliseconds extends DatePart {
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var minutes;
4
4
  var hasRequiredMinutes;
5
5
  function requireMinutes() {
6
- if (hasRequiredMinutes)
7
- return minutes;
6
+ if (hasRequiredMinutes) return minutes;
8
7
  hasRequiredMinutes = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Minutes extends DatePart {
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var month;
4
4
  var hasRequiredMonth;
5
5
  function requireMonth() {
6
- if (hasRequiredMonth)
7
- return month;
6
+ if (hasRequiredMonth) return month;
8
7
  hasRequiredMonth = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Month extends DatePart {
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var seconds;
4
4
  var hasRequiredSeconds;
5
5
  function requireSeconds() {
6
- if (hasRequiredSeconds)
7
- return seconds;
6
+ if (hasRequiredSeconds) return seconds;
8
7
  hasRequiredSeconds = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Seconds extends DatePart {
@@ -3,8 +3,7 @@ import { __require as requireDatepart } from './datepart.esnext';
3
3
  var year;
4
4
  var hasRequiredYear;
5
5
  function requireYear() {
6
- if (hasRequiredYear)
7
- return year;
6
+ if (hasRequiredYear) return year;
8
7
  hasRequiredYear = 1;
9
8
  const DatePart = requireDatepart();
10
9
  class Year extends DatePart {
@@ -6,8 +6,7 @@ import { __require as requireUtil } from '../util/index.esnext';
6
6
  var autocomplete;
7
7
  var hasRequiredAutocomplete;
8
8
  function requireAutocomplete() {
9
- if (hasRequiredAutocomplete)
10
- return autocomplete;
9
+ if (hasRequiredAutocomplete) return autocomplete;
11
10
  hasRequiredAutocomplete = 1;
12
11
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
13
12
  try {
@@ -78,22 +77,18 @@ function requireAutocomplete() {
78
77
  }
79
78
  get fallback() {
80
79
  let choice;
81
- if (typeof this._fb === "number")
82
- choice = this.choices[this._fb];
83
- else if (typeof this._fb === "string")
84
- choice = {
85
- title: this._fb
86
- };
80
+ if (typeof this._fb === "number") choice = this.choices[this._fb];
81
+ else if (typeof this._fb === "string") choice = {
82
+ title: this._fb
83
+ };
87
84
  return choice || this._fb || {
88
85
  title: this.i18n.noMatches
89
86
  };
90
87
  }
91
88
  moveSelect(i) {
92
89
  this.select = i;
93
- if (this.suggestions.length > 0)
94
- this.value = getVal(this.suggestions, i);
95
- else
96
- this.value = this.fallback.value;
90
+ if (this.suggestions.length > 0) this.value = getVal(this.suggestions, i);
91
+ else this.value = this.fallback.value;
97
92
  this.fire();
98
93
  }
99
94
  complete(cb) {
@@ -101,8 +96,7 @@ function requireAutocomplete() {
101
96
  return _asyncToGenerator(function* () {
102
97
  const p = _this.completing = _this.suggest(_this.input, _this.choices);
103
98
  const suggestions = yield p;
104
- if (_this.completing !== p)
105
- return;
99
+ if (_this.completing !== p) return;
106
100
  _this.suggestions = suggestions.map((s, i, arr) => ({
107
101
  title: getTitle(arr, i),
108
102
  value: getVal(arr, i),
@@ -159,8 +153,7 @@ function requireAutocomplete() {
159
153
  this.render();
160
154
  }
161
155
  delete() {
162
- if (this.cursor === 0)
163
- return this.bell();
156
+ if (this.cursor === 0) return this.bell();
164
157
  let s1 = this.input.slice(0, this.cursor - 1);
165
158
  let s2 = this.input.slice(this.cursor);
166
159
  this.input = `${s1}${s2}`;
@@ -169,8 +162,7 @@ function requireAutocomplete() {
169
162
  this.render();
170
163
  }
171
164
  deleteForward() {
172
- if (this.cursor * this.scale >= this.rendered.length)
173
- return this.bell();
165
+ if (this.cursor * this.scale >= this.rendered.length) return this.bell();
174
166
  let s1 = this.input.slice(0, this.cursor);
175
167
  let s2 = this.input.slice(this.cursor + 1);
176
168
  this.input = `${s1}${s2}`;
@@ -204,8 +196,7 @@ function requireAutocomplete() {
204
196
  next() {
205
197
  if (this.select === this.suggestions.length - 1) {
206
198
  this.moveSelect(0);
207
- } else
208
- this.moveSelect(this.select + 1);
199
+ } else this.moveSelect(this.select + 1);
209
200
  this.render();
210
201
  }
211
202
  nextPage() {
@@ -217,14 +208,12 @@ function requireAutocomplete() {
217
208
  this.render();
218
209
  }
219
210
  left() {
220
- if (this.cursor <= 0)
221
- return this.bell();
211
+ if (this.cursor <= 0) return this.bell();
222
212
  this.cursor = this.cursor - 1;
223
213
  this.render();
224
214
  }
225
215
  right() {
226
- if (this.cursor * this.scale >= this.rendered.length)
227
- return this.bell();
216
+ if (this.cursor * this.scale >= this.rendered.length) return this.bell();
228
217
  this.cursor = this.cursor + 1;
229
218
  this.render();
230
219
  }
@@ -245,12 +234,9 @@ function requireAutocomplete() {
245
234
  return prefix + " " + title + color.gray(desc || "");
246
235
  }
247
236
  render() {
248
- if (this.closed)
249
- return;
250
- if (this.firstRender)
251
- this.out.write(cursor.hide);
252
- else
253
- this.out.write(clear(this.outputText, this.out.columns));
237
+ if (this.closed) return;
238
+ if (this.firstRender) this.out.write(cursor.hide);
239
+ else this.out.write(clear(this.outputText, this.out.columns));
254
240
  super.render();
255
241
  let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
256
242
  this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(" ");
@@ -6,8 +6,7 @@ import { __require as requireUtil } from '../util/index.esnext';
6
6
  var autocompleteMultiselect;
7
7
  var hasRequiredAutocompleteMultiselect;
8
8
  function requireAutocompleteMultiselect() {
9
- if (hasRequiredAutocompleteMultiselect)
10
- return autocompleteMultiselect;
9
+ if (hasRequiredAutocompleteMultiselect) return autocompleteMultiselect;
11
10
  hasRequiredAutocompleteMultiselect = 1;
12
11
  const color = requireKleur();
13
12
  const _require = requireSrc(), cursor = _require.cursor;
@@ -51,8 +50,7 @@ function requireAutocompleteMultiselect() {
51
50
  this.render();
52
51
  }
53
52
  right() {
54
- if (this.value.filter((e) => e.selected).length >= this.maxChoices)
55
- return this.bell();
53
+ if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
56
54
  this.filteredOptions[this.cursor].selected = true;
57
55
  this.render();
58
56
  }
@@ -129,10 +127,8 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
129
127
  }
130
128
  renderOption(cursor2, v, i) {
131
129
  let title;
132
- if (v.disabled)
133
- title = cursor2 === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
134
- else
135
- title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
130
+ if (v.disabled) title = cursor2 === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
131
+ else title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
136
132
  return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
137
133
  }
138
134
  renderDoneOrInstructions() {
@@ -146,10 +142,8 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
146
142
  return output.join(" ");
147
143
  }
148
144
  render() {
149
- if (this.closed)
150
- return;
151
- if (this.firstRender)
152
- this.out.write(cursor.hide);
145
+ if (this.closed) return;
146
+ if (this.firstRender) this.out.write(cursor.hide);
153
147
  super.render();
154
148
  let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
155
149
  if (this.showMinError) {
@@ -6,8 +6,7 @@ import { __require as requireSrc } from '../../../../../sisteransi@1.0.5/node_mo
6
6
  var confirm;
7
7
  var hasRequiredConfirm;
8
8
  function requireConfirm() {
9
- if (hasRequiredConfirm)
10
- return confirm;
9
+ if (hasRequiredConfirm) return confirm;
11
10
  hasRequiredConfirm = 1;
12
11
  const color = requireKleur();
13
12
  const Prompt = requirePrompt();
@@ -61,12 +60,9 @@ function requireConfirm() {
61
60
  return this.bell();
62
61
  }
63
62
  render() {
64
- if (this.closed)
65
- return;
66
- if (this.firstRender)
67
- this.out.write(cursor.hide);
68
- else
69
- this.out.write(clear(this.outputText, this.out.columns));
63
+ if (this.closed) return;
64
+ if (this.firstRender) this.out.write(cursor.hide);
65
+ else this.out.write(clear(this.outputText, this.out.columns));
70
66
  super.render();
71
67
  this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(this.done), this.done ? this.value ? this.yesMsg : this.noMsg : color.gray(this.initialValue ? this.yesOption : this.noOption)].join(" ");
72
68
  this.out.write(erase.line + cursor.to(0) + this.outputText);
@@ -7,8 +7,7 @@ import { __require as requireDateparts } from '../dateparts/index.esnext';
7
7
  var date;
8
8
  var hasRequiredDate;
9
9
  function requireDate() {
10
- if (hasRequiredDate)
11
- return date;
10
+ if (hasRequiredDate) return date;
12
11
  hasRequiredDate = 1;
13
12
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
14
13
  try {
@@ -93,8 +92,7 @@ function requireDate() {
93
92
  return this._date;
94
93
  }
95
94
  set date(date2) {
96
- if (date2)
97
- this._date.setTime(date2.getTime());
95
+ if (date2) this._date.setTime(date2.getTime());
98
96
  }
99
97
  set mask(mask) {
100
98
  let result;
@@ -110,10 +108,8 @@ function requireDate() {
110
108
  }) : result[idx] || match);
111
109
  }
112
110
  let parts = this.parts.reduce((arr, i) => {
113
- if (typeof i === "string" && typeof arr[arr.length - 1] === "string")
114
- arr[arr.length - 1] += i;
115
- else
116
- arr.push(i);
111
+ if (typeof i === "string" && typeof arr[arr.length - 1] === "string") arr[arr.length - 1] += i;
112
+ else arr.push(i);
117
113
  return arr;
118
114
  }, []);
119
115
  this.parts.splice(0);
@@ -182,15 +178,13 @@ function requireDate() {
182
178
  }
183
179
  left() {
184
180
  let prev = this.parts[this.cursor].prev();
185
- if (prev == null)
186
- return this.bell();
181
+ if (prev == null) return this.bell();
187
182
  this.moveCursor(this.parts.indexOf(prev));
188
183
  this.render();
189
184
  }
190
185
  right() {
191
186
  let next = this.parts[this.cursor].next();
192
- if (next == null)
193
- return this.bell();
187
+ if (next == null) return this.bell();
194
188
  this.moveCursor(this.parts.indexOf(next));
195
189
  this.render();
196
190
  }
@@ -207,12 +201,9 @@ function requireDate() {
207
201
  }
208
202
  }
209
203
  render() {
210
- if (this.closed)
211
- return;
212
- if (this.firstRender)
213
- this.out.write(cursor.hide);
214
- else
215
- this.out.write(clear(this.outputText, this.out.columns));
204
+ if (this.closed) return;
205
+ if (this.firstRender) this.out.write(cursor.hide);
206
+ else this.out.write(clear(this.outputText, this.out.columns));
216
207
  super.render();
217
208
  this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), []).join("")].join(" ");
218
209
  if (this.error) {
@@ -11,8 +11,7 @@ import { __require as requireConfirm } from './confirm.esnext';
11
11
  var elements;
12
12
  var hasRequiredElements;
13
13
  function requireElements() {
14
- if (hasRequiredElements)
15
- return elements;
14
+ if (hasRequiredElements) return elements;
16
15
  hasRequiredElements = 1;
17
16
  elements = {
18
17
  TextPrompt: requireText(),
@@ -6,8 +6,7 @@ import { __require as requireUtil } from '../util/index.esnext';
6
6
  var multiselect;
7
7
  var hasRequiredMultiselect;
8
8
  function requireMultiselect() {
9
- if (hasRequiredMultiselect)
10
- return multiselect;
9
+ if (hasRequiredMultiselect) return multiselect;
11
10
  hasRequiredMultiselect = 1;
12
11
  const color = requireKleur();
13
12
  const _require = requireSrc(), cursor = _require.cursor;
@@ -27,11 +26,10 @@ function requireMultiselect() {
27
26
  this.instructions = opts.instructions;
28
27
  this.optionsPerPage = opts.optionsPerPage || 10;
29
28
  this.value = opts.choices.map((ch, idx) => {
30
- if (typeof ch === "string")
31
- ch = {
32
- title: ch,
33
- value: idx
34
- };
29
+ if (typeof ch === "string") ch = {
30
+ title: ch,
31
+ value: idx
32
+ };
35
33
  return {
36
34
  title: ch && (ch.title || ch.value || ch),
37
35
  description: ch && ch.description,
@@ -111,8 +109,7 @@ function requireMultiselect() {
111
109
  this.render();
112
110
  }
113
111
  right() {
114
- if (this.value.filter((e) => e.selected).length >= this.maxChoices)
115
- return this.bell();
112
+ if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
116
113
  this.value[this.cursor].selected = true;
117
114
  this.render();
118
115
  }
@@ -215,10 +212,8 @@ Instructions:
215
212
  return output.join(" ");
216
213
  }
217
214
  render() {
218
- if (this.closed)
219
- return;
220
- if (this.firstRender)
221
- this.out.write(cursor.hide);
215
+ if (this.closed) return;
216
+ if (this.firstRender) this.out.write(cursor.hide);
222
217
  super.render();
223
218
  let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
224
219
  if (this.showMinError) {
@@ -6,8 +6,7 @@ import { __require as requireUtil } from '../util/index.esnext';
6
6
  var number;
7
7
  var hasRequiredNumber;
8
8
  function requireNumber() {
9
- if (hasRequiredNumber)
10
- return number;
9
+ if (hasRequiredNumber) return number;
11
10
  hasRequiredNumber = 1;
12
11
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
13
12
  try {
@@ -146,8 +145,7 @@ function requireNumber() {
146
145
  if (this.value === "") {
147
146
  this.value = this.min - this.inc;
148
147
  }
149
- if (this.value >= this.max)
150
- return this.bell();
148
+ if (this.value >= this.max) return this.bell();
151
149
  this.value += this.inc;
152
150
  this.color = `cyan`;
153
151
  this.fire();
@@ -158,8 +156,7 @@ function requireNumber() {
158
156
  if (this.value === "") {
159
157
  this.value = this.min + this.inc;
160
158
  }
161
- if (this.value <= this.min)
162
- return this.bell();
159
+ if (this.value <= this.min) return this.bell();
163
160
  this.value -= this.inc;
164
161
  this.color = `cyan`;
165
162
  this.fire();
@@ -167,8 +164,7 @@ function requireNumber() {
167
164
  }
168
165
  delete() {
169
166
  let val = this.value.toString();
170
- if (val.length === 0)
171
- return this.bell();
167
+ if (val.length === 0) return this.bell();
172
168
  this.value = this.parse(val = val.slice(0, -1)) || ``;
173
169
  if (this.value !== "" && this.value < this.min) {
174
170
  this.value = this.min;
@@ -183,30 +179,23 @@ function requireNumber() {
183
179
  this.render();
184
180
  }
185
181
  _(c, key) {
186
- if (!this.valid(c))
187
- return this.bell();
182
+ if (!this.valid(c)) return this.bell();
188
183
  const now = Date.now();
189
- if (now - this.lastHit > 1e3)
190
- this.typed = ``;
184
+ if (now - this.lastHit > 1e3) this.typed = ``;
191
185
  this.typed += c;
192
186
  this.lastHit = now;
193
187
  this.color = `cyan`;
194
- if (c === `.`)
195
- return this.fire();
188
+ if (c === `.`) return this.fire();
196
189
  this.value = Math.min(this.parse(this.typed), this.max);
197
- if (this.value > this.max)
198
- this.value = this.max;
199
- if (this.value < this.min)
200
- this.value = this.min;
190
+ if (this.value > this.max) this.value = this.max;
191
+ if (this.value < this.min) this.value = this.min;
201
192
  this.fire();
202
193
  this.render();
203
194
  }
204
195
  render() {
205
- if (this.closed)
206
- return;
196
+ if (this.closed) return;
207
197
  if (!this.firstRender) {
208
- if (this.outputError)
209
- this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
198
+ if (this.outputError) this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
210
199
  this.out.write(clear(this.outputText, this.out.columns));
211
200
  }
212
201
  super.render();
@@ -7,8 +7,7 @@ import { __require as requireKleur } from '../../../../../kleur@3.0.3/node_modul
7
7
  var prompt;
8
8
  var hasRequiredPrompt;
9
9
  function requirePrompt() {
10
- if (hasRequiredPrompt)
11
- return prompt;
10
+ if (hasRequiredPrompt) return prompt;
12
11
  hasRequiredPrompt = 1;
13
12
  const readline = require$$0;
14
13
  const _require = requireUtil(), action = _require.action;
@@ -27,8 +26,7 @@ function requirePrompt() {
27
26
  escapeCodeTimeout: 50
28
27
  });
29
28
  readline.emitKeypressEvents(this.in, rl);
30
- if (this.in.isTTY)
31
- this.in.setRawMode(true);
29
+ if (this.in.isTTY) this.in.setRawMode(true);
32
30
  const isSelect = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1;
33
31
  const keypress = (str, key) => {
34
32
  let a = action(key, isSelect);
@@ -43,8 +41,7 @@ function requirePrompt() {
43
41
  this.close = () => {
44
42
  this.out.write(cursor.show);
45
43
  this.in.removeListener("keypress", keypress);
46
- if (this.in.isTTY)
47
- this.in.setRawMode(false);
44
+ if (this.in.isTTY) this.in.setRawMode(false);
48
45
  rl.close();
49
46
  this.emit(this.aborted ? "abort" : this.exited ? "exit" : "submit", this.value);
50
47
  this.closed = true;
@@ -63,8 +60,7 @@ function requirePrompt() {
63
60
  }
64
61
  render() {
65
62
  this.onRender(color);
66
- if (this.firstRender)
67
- this.firstRender = false;
63
+ if (this.firstRender) this.firstRender = false;
68
64
  }
69
65
  }
70
66
  prompt = Prompt;
@@ -6,8 +6,7 @@ import { __require as requireSrc } from '../../../../../sisteransi@1.0.5/node_mo
6
6
  var select;
7
7
  var hasRequiredSelect;
8
8
  function requireSelect() {
9
- if (hasRequiredSelect)
10
- return select;
9
+ if (hasRequiredSelect) return select;
11
10
  hasRequiredSelect = 1;
12
11
  const color = requireKleur();
13
12
  const Prompt = requirePrompt();
@@ -21,11 +20,10 @@ function requireSelect() {
21
20
  this.warn = opts.warn || "- This option is disabled";
22
21
  this.cursor = opts.initial || 0;
23
22
  this.choices = opts.choices.map((ch, idx) => {
24
- if (typeof ch === "string")
25
- ch = {
26
- title: ch,
27
- value: idx
28
- };
23
+ if (typeof ch === "string") ch = {
24
+ title: ch,
25
+ value: idx
26
+ };
29
27
  return {
30
28
  title: ch && (ch.title || ch.value || ch),
31
29
  value: ch && (ch.value === void 0 ? idx : ch.value),
@@ -67,8 +65,7 @@ function requireSelect() {
67
65
  this.render();
68
66
  this.out.write("\n");
69
67
  this.close();
70
- } else
71
- this.bell();
68
+ } else this.bell();
72
69
  }
73
70
  first() {
74
71
  this.moveCursor(0);
@@ -99,19 +96,15 @@ function requireSelect() {
99
96
  this.render();
100
97
  }
101
98
  _(c, key) {
102
- if (c === " ")
103
- return this.submit();
99
+ if (c === " ") return this.submit();
104
100
  }
105
101
  get selection() {
106
102
  return this.choices[this.cursor];
107
103
  }
108
104
  render() {
109
- if (this.closed)
110
- return;
111
- if (this.firstRender)
112
- this.out.write(cursor.hide);
113
- else
114
- this.out.write(clear(this.outputText, this.out.columns));
105
+ if (this.closed) return;
106
+ if (this.firstRender) this.out.write(cursor.hide);
107
+ else this.out.write(clear(this.outputText, this.out.columns));
115
108
  super.render();
116
109
  let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage), startIndex = _entriesToDisplay.startIndex, endIndex = _entriesToDisplay.endIndex;
117
110
  this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(" ");