@oclif/core 3.0.0-beta.9 → 3.0.0

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 (142) hide show
  1. package/README.md +4 -2
  2. package/flush.d.ts +3 -0
  3. package/flush.js +1 -0
  4. package/handle.js +1 -0
  5. package/lib/args.d.ts +2 -2
  6. package/lib/args.js +17 -18
  7. package/lib/{ux → cli-ux}/action/base.d.ts +19 -21
  8. package/lib/{ux → cli-ux}/action/base.js +126 -120
  9. package/lib/{ux → cli-ux}/action/simple.js +25 -30
  10. package/lib/{ux → cli-ux}/action/spinner.d.ts +9 -7
  11. package/lib/{ux → cli-ux}/action/spinner.js +45 -37
  12. package/lib/{ux → cli-ux}/action/spinners.js +187 -187
  13. package/lib/cli-ux/action/types.d.ts +5 -0
  14. package/lib/cli-ux/action/types.js +2 -0
  15. package/lib/{ux → cli-ux}/config.d.ts +5 -5
  16. package/lib/{ux → cli-ux}/config.js +17 -17
  17. package/lib/{ux → cli-ux}/exit.js +3 -0
  18. package/lib/cli-ux/flush.d.ts +1 -0
  19. package/lib/cli-ux/flush.js +28 -0
  20. package/lib/cli-ux/index.d.ts +39 -0
  21. package/lib/{ux → cli-ux}/index.js +74 -88
  22. package/lib/{ux → cli-ux}/list.js +3 -3
  23. package/lib/{ux → cli-ux}/prompt.d.ts +3 -3
  24. package/lib/{ux → cli-ux}/prompt.js +35 -25
  25. package/lib/{ux → cli-ux}/stream.d.ts +6 -6
  26. package/lib/{ux → cli-ux}/stream.js +11 -10
  27. package/lib/cli-ux/styled/index.d.ts +4 -0
  28. package/lib/cli-ux/styled/index.js +11 -0
  29. package/lib/{ux → cli-ux}/styled/object.js +7 -9
  30. package/lib/{ux → cli-ux}/styled/table.d.ts +10 -10
  31. package/lib/{ux → cli-ux}/styled/table.js +130 -133
  32. package/lib/{ux → cli-ux}/styled/tree.js +11 -13
  33. package/lib/cli-ux/wait.js +5 -0
  34. package/lib/command.d.ts +82 -88
  35. package/lib/command.js +196 -175
  36. package/lib/config/config.d.ts +89 -90
  37. package/lib/config/config.js +466 -566
  38. package/lib/config/index.d.ts +0 -1
  39. package/lib/config/index.js +1 -3
  40. package/lib/config/plugin-loader.d.ts +12 -12
  41. package/lib/config/plugin-loader.js +72 -56
  42. package/lib/config/plugin.d.ts +25 -24
  43. package/lib/config/plugin.js +188 -154
  44. package/lib/config/ts-node.d.ts +2 -1
  45. package/lib/config/ts-node.js +71 -58
  46. package/lib/config/util.d.ts +1 -11
  47. package/lib/config/util.js +6 -59
  48. package/lib/errors/config.d.ts +1 -1
  49. package/lib/errors/config.js +6 -6
  50. package/lib/errors/errors/cli.d.ts +7 -7
  51. package/lib/errors/errors/cli.js +20 -16
  52. package/lib/errors/errors/exit.d.ts +1 -4
  53. package/lib/errors/errors/exit.js +1 -1
  54. package/lib/errors/errors/module-load.d.ts +1 -4
  55. package/lib/errors/errors/module-load.js +1 -1
  56. package/lib/errors/errors/pretty-print.d.ts +1 -1
  57. package/lib/errors/errors/pretty-print.js +12 -10
  58. package/lib/errors/handle.d.ts +12 -2
  59. package/lib/errors/handle.js +26 -14
  60. package/lib/errors/index.d.ts +10 -10
  61. package/lib/errors/index.js +25 -24
  62. package/lib/errors/logger.d.ts +2 -2
  63. package/lib/errors/logger.js +14 -13
  64. package/lib/execute.d.ts +6 -6
  65. package/lib/execute.js +10 -9
  66. package/lib/flags.d.ts +103 -32
  67. package/lib/flags.js +79 -45
  68. package/lib/help/command.d.ts +16 -14
  69. package/lib/help/command.js +178 -163
  70. package/lib/help/docopts.d.ts +5 -5
  71. package/lib/help/docopts.js +50 -54
  72. package/lib/help/formatter.d.ts +37 -37
  73. package/lib/help/formatter.js +66 -55
  74. package/lib/help/index.d.ts +25 -21
  75. package/lib/help/index.js +169 -147
  76. package/lib/help/root.d.ts +1 -1
  77. package/lib/help/root.js +15 -17
  78. package/lib/help/util.d.ts +2 -8
  79. package/lib/help/util.js +8 -28
  80. package/lib/index.d.ts +19 -20
  81. package/lib/index.js +37 -43
  82. package/lib/interfaces/config.d.ts +67 -66
  83. package/lib/interfaces/errors.d.ts +5 -5
  84. package/lib/interfaces/help.d.ts +17 -17
  85. package/lib/interfaces/hooks.d.ts +49 -49
  86. package/lib/interfaces/index.d.ts +7 -7
  87. package/lib/interfaces/manifest.d.ts +1 -1
  88. package/lib/interfaces/parser.d.ts +175 -51
  89. package/lib/interfaces/pjson.d.ts +41 -41
  90. package/lib/interfaces/plugin.d.ts +47 -41
  91. package/lib/interfaces/s3-manifest.d.ts +7 -7
  92. package/lib/interfaces/topic.d.ts +1 -1
  93. package/lib/interfaces/ts-config.d.ts +7 -7
  94. package/lib/main.d.ts +2 -2
  95. package/lib/main.js +16 -16
  96. package/lib/module-loader.d.ts +67 -77
  97. package/lib/module-loader.js +183 -150
  98. package/lib/parser/errors.d.ts +7 -7
  99. package/lib/parser/errors.js +29 -22
  100. package/lib/parser/help.js +5 -5
  101. package/lib/parser/index.js +2 -2
  102. package/lib/parser/parse.d.ts +9 -6
  103. package/lib/parser/parse.js +253 -221
  104. package/lib/parser/validate.js +53 -33
  105. package/lib/performance.d.ts +43 -32
  106. package/lib/performance.js +133 -91
  107. package/lib/screen.js +2 -2
  108. package/lib/settings.d.ts +11 -12
  109. package/lib/settings.js +2 -2
  110. package/lib/util/aggregate-flags.d.ts +2 -0
  111. package/lib/util/aggregate-flags.js +13 -0
  112. package/lib/util/cache-command.d.ts +3 -0
  113. package/lib/util/cache-command.js +109 -0
  114. package/lib/util/cache-default-value.d.ts +2 -0
  115. package/lib/util/cache-default-value.js +28 -0
  116. package/lib/util/ensure-arg-object.d.ts +12 -0
  117. package/lib/util/ensure-arg-object.js +14 -0
  118. package/lib/util/fs.d.ts +7 -0
  119. package/lib/util/fs.js +54 -0
  120. package/lib/util/os.d.ts +19 -0
  121. package/lib/util/os.js +28 -0
  122. package/lib/{util.d.ts → util/util.d.ts} +7 -16
  123. package/lib/util/util.js +98 -0
  124. package/package.json +35 -37
  125. package/lib/util.js +0 -126
  126. package/lib/ux/flush.d.ts +0 -1
  127. package/lib/ux/flush.js +0 -27
  128. package/lib/ux/index.d.ts +0 -58
  129. package/lib/ux/styled/index.d.ts +0 -6
  130. package/lib/ux/styled/index.js +0 -13
  131. package/lib/ux/styled/json.d.ts +0 -1
  132. package/lib/ux/styled/json.js +0 -15
  133. package/lib/ux/wait.js +0 -7
  134. package/lib/{ux → cli-ux}/action/simple.d.ts +4 -4
  135. package/lib/{ux → cli-ux}/action/spinners.d.ts +117 -117
  136. package/lib/{ux → cli-ux}/exit.d.ts +2 -2
  137. package/lib/{ux → cli-ux}/list.d.ts +0 -0
  138. package/lib/{ux → cli-ux}/styled/object.d.ts +0 -0
  139. package/lib/{ux → cli-ux}/styled/progress.d.ts +0 -0
  140. package/lib/{ux → cli-ux}/styled/progress.js +0 -0
  141. package/lib/{ux → cli-ux}/styled/tree.d.ts +1 -1
  142. /package/lib/{ux → cli-ux}/wait.d.ts +0 -0
@@ -1,41 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const chalk = require("chalk");
4
- const supportsColor = require("supports-color");
5
- const stripAnsi = require('strip-ansi');
6
- const ansiStyles = require('ansi-styles');
3
+ const tslib_1 = require("tslib");
4
+ const ansi_styles_1 = tslib_1.__importDefault(require("ansi-styles"));
5
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const strip_ansi_1 = tslib_1.__importDefault(require("strip-ansi"));
7
+ const supportsColor = tslib_1.__importStar(require("supports-color"));
7
8
  const screen_1 = require("../../screen");
8
- const spinners_1 = require("./spinners");
9
9
  const base_1 = require("./base");
10
+ const spinners_1 = tslib_1.__importDefault(require("./spinners"));
11
+ const ansiEscapes = require('ansi-escapes');
10
12
  function color(s) {
11
13
  if (!supportsColor)
12
14
  return s;
13
15
  const has256 = supportsColor.stdout ? supportsColor.stdout.has256 : (process.env.TERM || '').includes('256');
14
- return has256 ? `\u001B[38;5;104m${s}${ansiStyles.reset.open}` : chalk.magenta(s);
16
+ return has256 ? `\u001B[38;5;104m${s}${ansi_styles_1.default.reset.open}` : chalk_1.default.magenta(s);
15
17
  }
16
18
  class SpinnerAction extends base_1.ActionBase {
19
+ frameIndex;
20
+ frames;
21
+ spinner;
22
+ type = 'spinner';
17
23
  constructor() {
18
24
  super();
19
- this.type = 'spinner';
20
- this.frames = spinners_1.default[process.platform === 'win32' ? 'line' : 'dots2'].frames;
25
+ this.frames = this.getFrames();
21
26
  this.frameIndex = 0;
22
27
  }
23
- _start() {
24
- this._reset();
25
- if (this.spinner)
26
- clearInterval(this.spinner);
27
- this._render();
28
- this.spinner = setInterval(icon => this._render.bind(this)(icon), process.platform === 'win32' ? 500 : 100, 'spinner');
29
- const interval = this.spinner;
30
- interval.unref();
28
+ _frame() {
29
+ const frame = this.frames[this.frameIndex];
30
+ this.frameIndex = ++this.frameIndex % this.frames.length;
31
+ return color(frame);
31
32
  }
32
- _stop(status) {
33
- if (this.task)
34
- this.task.status = status;
35
- if (this.spinner)
36
- clearInterval(this.spinner);
37
- this._render();
38
- this.output = undefined;
33
+ _lines(s) {
34
+ return (0, strip_ansi_1.default)(s).split('\n').map((l) => Math.ceil(l.length / screen_1.errtermwidth)).reduce((c, i) => c + i, 0);
39
35
  }
40
36
  _pause(icon) {
41
37
  if (this.spinner)
@@ -45,34 +41,46 @@ class SpinnerAction extends base_1.ActionBase {
45
41
  this._render(` ${icon}`);
46
42
  this.output = undefined;
47
43
  }
48
- _frame() {
49
- const frame = this.frames[this.frameIndex];
50
- this.frameIndex = ++this.frameIndex % this.frames.length;
51
- return color(frame);
52
- }
53
44
  _render(icon) {
54
- const task = this.task;
55
- if (!task)
45
+ if (!this.task)
56
46
  return;
57
47
  this._reset();
58
48
  this._flushStdout();
59
49
  const frame = icon === 'spinner' ? ` ${this._frame()}` : icon || '';
60
- const status = task.status ? ` ${task.status}` : '';
61
- this.output = `${task.action}...${frame}${status}\n`;
50
+ const status = this.task.status ? ` ${this.task.status}` : '';
51
+ this.output = `${this.task.action}...${frame}${status}\n`;
62
52
  this._write(this.std, this.output);
63
53
  }
64
54
  _reset() {
65
55
  if (!this.output)
66
56
  return;
67
- const ansiEscapes = require('ansi-escapes');
68
57
  const lines = this._lines(this.output);
69
58
  this._write(this.std, ansiEscapes.cursorLeft + ansiEscapes.cursorUp(lines) + ansiEscapes.eraseDown);
70
59
  this.output = undefined;
71
60
  }
72
- _lines(s) {
73
- return stripAnsi(s).split('\n')
74
- .map(l => Math.ceil(l.length / screen_1.errtermwidth))
75
- .reduce((c, i) => c + i, 0);
61
+ _start(opts) {
62
+ if (opts.style)
63
+ this.frames = this.getFrames(opts);
64
+ this._reset();
65
+ if (this.spinner)
66
+ clearInterval(this.spinner);
67
+ this._render();
68
+ this.spinner = setInterval((icon) => this._render.bind(this)(icon), process.platform === 'win32' ? 500 : 100, 'spinner');
69
+ const interval = this.spinner;
70
+ interval.unref();
71
+ }
72
+ _stop(status) {
73
+ if (this.task)
74
+ this.task.status = status;
75
+ if (this.spinner)
76
+ clearInterval(this.spinner);
77
+ this._render();
78
+ this.output = undefined;
79
+ }
80
+ getFrames(opts) {
81
+ if (opts?.style)
82
+ return spinners_1.default[opts.style].frames;
83
+ return spinners_1.default[process.platform === 'win32' ? 'line' : 'dots2'].frames;
76
84
  }
77
85
  }
78
86
  exports.default = SpinnerAction;
@@ -1,32 +1,98 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- hexagon: {
5
- interval: 400,
6
- frames: ['⬡', '⬢'],
4
+ arc: {
5
+ frames: ['◜', '◠', '◝', '◞', '◡', '◟'],
6
+ interval: 100,
7
7
  },
8
- dots: {
8
+ arrow: {
9
+ frames: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'],
10
+ interval: 100,
11
+ },
12
+ arrow2: {
13
+ frames: ['⬆️ ', '↗️ ', '➡️ ', '↘️ ', '⬇️ ', '↙️ ', '⬅️ ', '↖️ '],
9
14
  interval: 80,
15
+ },
16
+ arrow3: {
17
+ frames: ['▹▹▹▹▹', '▸▹▹▹▹', '▹▸▹▹▹', '▹▹▸▹▹', '▹▹▹▸▹', '▹▹▹▹▸'],
18
+ interval: 120,
19
+ },
20
+ balloon: {
21
+ frames: [' ', '.', 'o', 'O', '@', '*', ' '],
22
+ interval: 140,
23
+ },
24
+ balloon2: {
25
+ frames: ['.', 'o', 'O', '°', 'O', 'o', '.'],
26
+ interval: 120,
27
+ },
28
+ bounce: {
29
+ frames: ['⠁', '⠂', '⠄', '⠂'],
30
+ interval: 120,
31
+ },
32
+ bouncingBall: {
33
+ frames: [
34
+ '( ● )',
35
+ '( ● )',
36
+ '( ● )',
37
+ '( ● )',
38
+ '( ●)',
39
+ '( ● )',
40
+ '( ● )',
41
+ '( ● )',
42
+ '( ● )',
43
+ '(● )',
44
+ ],
45
+ interval: 80,
46
+ },
47
+ bouncingBar: {
48
+ frames: ['[ ]', '[ =]', '[ ==]', '[ ===]', '[====]', '[=== ]', '[== ]', '[= ]'],
49
+ interval: 80,
50
+ },
51
+ boxBounce: {
52
+ frames: ['▖', '▘', '▝', '▗'],
53
+ interval: 120,
54
+ },
55
+ boxBounce2: {
56
+ frames: ['▌', '▀', '▐', '▄'],
57
+ interval: 100,
58
+ },
59
+ circle: {
60
+ frames: ['◡', '⊙', '◠'],
61
+ interval: 120,
62
+ },
63
+ circleHalves: {
64
+ frames: ['◐', '◓', '◑', '◒'],
65
+ interval: 50,
66
+ },
67
+ circleQuarters: {
68
+ frames: ['◴', '◷', '◶', '◵'],
69
+ interval: 120,
70
+ },
71
+ clock: {
72
+ frames: ['🕐 ', '🕑 ', '🕒 ', '🕓 ', '🕔 ', '🕕 ', '🕖 ', '🕗 ', '🕘 ', '🕙 ', '🕚 '],
73
+ interval: 100,
74
+ },
75
+ dots: {
10
76
  frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
77
+ interval: 80,
11
78
  },
12
79
  dots2: {
13
- interval: 80,
14
80
  frames: ['⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷'],
81
+ interval: 80,
15
82
  },
16
83
  dots3: {
17
- interval: 80,
18
84
  frames: ['⠋', '⠙', '⠚', '⠞', '⠖', '⠦', '⠴', '⠲', '⠳', '⠓'],
85
+ interval: 80,
19
86
  },
20
87
  dots4: {
21
- interval: 80,
22
88
  frames: ['⠄', '⠆', '⠇', '⠋', '⠙', '⠸', '⠰', '⠠', '⠰', '⠸', '⠙', '⠋', '⠇', '⠆'],
89
+ interval: 80,
23
90
  },
24
91
  dots5: {
25
- interval: 80,
26
92
  frames: ['⠋', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋'],
93
+ interval: 80,
27
94
  },
28
95
  dots6: {
29
- interval: 80,
30
96
  frames: [
31
97
  '⠁',
32
98
  '⠉',
@@ -53,9 +119,9 @@ exports.default = {
53
119
  '⠉',
54
120
  '⠁',
55
121
  ],
122
+ interval: 80,
56
123
  },
57
124
  dots7: {
58
- interval: 80,
59
125
  frames: [
60
126
  '⠈',
61
127
  '⠉',
@@ -82,9 +148,9 @@ exports.default = {
82
148
  '⠉',
83
149
  '⠈',
84
150
  ],
151
+ interval: 80,
85
152
  },
86
153
  dots8: {
87
- interval: 80,
88
154
  frames: [
89
155
  '⠁',
90
156
  '⠁',
@@ -116,259 +182,193 @@ exports.default = {
116
182
  '⠈',
117
183
  '⠈',
118
184
  ],
185
+ interval: 80,
119
186
  },
120
187
  dots9: {
121
- interval: 80,
122
188
  frames: ['⢹', '⢺', '⢼', '⣸', '⣇', '⡧', '⡗', '⡏'],
189
+ interval: 80,
123
190
  },
124
191
  dots10: {
125
- interval: 80,
126
192
  frames: ['⢄', '⢂', '⢁', '⡁', '⡈', '⡐', '⡠'],
193
+ interval: 80,
127
194
  },
128
195
  dots11: {
129
- interval: 100,
130
196
  frames: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'],
131
- },
132
- line: {
133
- interval: 130,
134
- frames: ['-', '\\', '|', '/'],
135
- },
136
- line2: {
137
- interval: 100,
138
- frames: ['⠂', '-', '–', '—', '–', '-'],
139
- },
140
- pipe: {
141
197
  interval: 100,
142
- frames: ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'],
143
198
  },
144
- simpleDots: {
145
- interval: 400,
146
- frames: ['. ', '.. ', '...', ' '],
147
- },
148
- simpleDotsScrolling: {
149
- interval: 200,
150
- frames: ['. ', '.. ', '...', ' ..', ' .', ' '],
199
+ earth: {
200
+ frames: ['🌍 ', '🌎 ', '🌏 '],
201
+ interval: 180,
151
202
  },
152
- star: {
203
+ flip: {
204
+ frames: ['_', '_', '_', '-', '`', '`', "'", '´', '-', '_', '_', '_'],
153
205
  interval: 70,
154
- frames: ['✶', '✸', '✹', '✺', '✹', '✷'],
155
206
  },
156
- star2: {
157
- interval: 80,
158
- frames: ['+', 'x', '*'],
207
+ growHorizontal: {
208
+ frames: ['▏', '▎', '▍', '▌', '▋', '▊', '▉', '▊', '▋', '▌', '▍', '▎'],
209
+ interval: 120,
159
210
  },
160
- flip: {
161
- interval: 70,
162
- frames: ['_', '_', '_', '-', '`', '`', '\'', '´', '-', '_', '_', '_'],
211
+ growVertical: {
212
+ frames: ['▁', '▃', '▄', '▅', '▆', '▇', '▆', '▅', '▄', '▃'],
213
+ interval: 120,
163
214
  },
164
215
  hamburger: {
165
- interval: 100,
166
216
  frames: ['☱', '☲', '☴'],
217
+ interval: 100,
167
218
  },
168
- growVertical: {
169
- interval: 120,
170
- frames: ['▁', '▃', '▄', '▅', '▆', '▇', '▆', '▅', '▄', '▃'],
219
+ hearts: {
220
+ frames: ['💛 ', '💙 ', '💜 ', '💚 ', '❤️ '],
221
+ interval: 100,
171
222
  },
172
- growHorizontal: {
173
- interval: 120,
174
- frames: ['▏', '▎', '▍', '▌', '▋', '▊', '▉', '▊', '▋', '▌', '▍', '▎'],
223
+ hexagon: {
224
+ frames: ['⬡', '⬢'],
225
+ interval: 400,
175
226
  },
176
- balloon: {
177
- interval: 140,
178
- frames: [' ', '.', 'o', 'O', '@', '*', ' '],
227
+ line: {
228
+ frames: ['-', '\\', '|', '/'],
229
+ interval: 130,
179
230
  },
180
- balloon2: {
181
- interval: 120,
182
- frames: ['.', 'o', 'O', '°', 'O', 'o', '.'],
231
+ line2: {
232
+ frames: ['⠂', '-', '–', '—', '–', '-'],
233
+ interval: 100,
234
+ },
235
+ monkey: {
236
+ frames: ['🙈 ', '🙈 ', '🙉 ', '🙊 '],
237
+ interval: 300,
238
+ },
239
+ moon: {
240
+ frames: ['🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 '],
241
+ interval: 80,
183
242
  },
184
243
  noise: {
185
- interval: 100,
186
244
  frames: ['▓', '▒', '░'],
245
+ interval: 100,
187
246
  },
188
- bounce: {
189
- interval: 120,
190
- frames: ['⠁', '⠂', '⠄', '⠂'],
247
+ pipe: {
248
+ frames: ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'],
249
+ interval: 100,
191
250
  },
192
- boxBounce: {
193
- interval: 120,
194
- frames: ['', '▘', '▝', '▗'],
251
+ pong: {
252
+ frames: [
253
+ '▐⠂ ▌',
254
+ '▐⠈ ▌',
255
+ '▐ ⠂ ▌',
256
+ '▐ ⠠ ▌',
257
+ '▐ ⡀ ▌',
258
+ '▐ ⠠ ▌',
259
+ '▐ ⠂ ▌',
260
+ '▐ ⠈ ▌',
261
+ '▐ ⠂ ▌',
262
+ '▐ ⠠ ▌',
263
+ '▐ ⡀ ▌',
264
+ '▐ ⠠ ▌',
265
+ '▐ ⠂ ▌',
266
+ '▐ ⠈ ▌',
267
+ '▐ ⠂▌',
268
+ '▐ ⠠▌',
269
+ '▐ ⡀▌',
270
+ '▐ ⠠ ▌',
271
+ '▐ ⠂ ▌',
272
+ '▐ ⠈ ▌',
273
+ '▐ ⠂ ▌',
274
+ '▐ ⠠ ▌',
275
+ '▐ ⡀ ▌',
276
+ '▐ ⠠ ▌',
277
+ '▐ ⠂ ▌',
278
+ '▐ ⠈ ▌',
279
+ '▐ ⠂ ▌',
280
+ '▐ ⠠ ▌',
281
+ '▐ ⡀ ▌',
282
+ '▐⠠ ▌',
283
+ ],
284
+ interval: 80,
195
285
  },
196
- boxBounce2: {
197
- interval: 100,
198
- frames: ['▌', '▀', '▐', '▄'],
286
+ runner: {
287
+ frames: ['🚶 ', '🏃 '],
288
+ interval: 140,
199
289
  },
200
- triangle: {
201
- interval: 50,
202
- frames: ['◢', '◣', '◤', '◥'],
290
+ simpleDots: {
291
+ frames: ['. ', '.. ', '...', ' '],
292
+ interval: 400,
203
293
  },
204
- arc: {
205
- interval: 100,
206
- frames: ['◜', '◠', '◝', '◞', '◡', '◟'],
294
+ simpleDotsScrolling: {
295
+ frames: ['. ', '.. ', '...', ' ..', ' .', ' '],
296
+ interval: 200,
207
297
  },
208
- circle: {
209
- interval: 120,
210
- frames: ['◡', '⊙', '◠'],
298
+ smiley: {
299
+ frames: ['😄 ', '😝 '],
300
+ interval: 200,
211
301
  },
212
302
  squareCorners: {
213
- interval: 180,
214
303
  frames: ['◰', '◳', '◲', '◱'],
215
- },
216
- circleQuarters: {
217
- interval: 120,
218
- frames: ['◴', '◷', '◶', '◵'],
219
- },
220
- circleHalves: {
221
- interval: 50,
222
- frames: ['◐', '◓', '◑', '◒'],
304
+ interval: 180,
223
305
  },
224
306
  squish: {
225
- interval: 100,
226
307
  frames: ['╫', '╪'],
308
+ interval: 100,
309
+ },
310
+ star: {
311
+ frames: ['✶', '✸', '✹', '✺', '✹', '✷'],
312
+ interval: 70,
313
+ },
314
+ star2: {
315
+ frames: ['+', 'x', '*'],
316
+ interval: 80,
227
317
  },
228
318
  toggle: {
229
- interval: 250,
230
319
  frames: ['⊶', '⊷'],
320
+ interval: 250,
231
321
  },
232
322
  toggle2: {
233
- interval: 80,
234
323
  frames: ['▫', '▪'],
324
+ interval: 80,
235
325
  },
236
326
  toggle3: {
237
- interval: 120,
238
327
  frames: ['□', '■'],
328
+ interval: 120,
239
329
  },
240
330
  toggle4: {
241
- interval: 100,
242
331
  frames: ['■', '□', '▪', '▫'],
332
+ interval: 100,
243
333
  },
244
334
  toggle5: {
245
- interval: 100,
246
335
  frames: ['▮', '▯'],
336
+ interval: 100,
247
337
  },
248
338
  toggle6: {
249
- interval: 300,
250
339
  frames: ['ဝ', '၀'],
340
+ interval: 300,
251
341
  },
252
342
  toggle7: {
253
- interval: 80,
254
343
  frames: ['⦾', '⦿'],
344
+ interval: 80,
255
345
  },
256
346
  toggle8: {
257
- interval: 100,
258
347
  frames: ['◍', '◌'],
348
+ interval: 100,
259
349
  },
260
350
  toggle9: {
261
- interval: 100,
262
351
  frames: ['◉', '◎'],
352
+ interval: 100,
263
353
  },
264
354
  toggle10: {
265
- interval: 100,
266
355
  frames: ['㊂', '㊀', '㊁'],
356
+ interval: 100,
267
357
  },
268
358
  toggle11: {
269
- interval: 50,
270
359
  frames: ['⧇', '⧆'],
360
+ interval: 50,
271
361
  },
272
362
  toggle12: {
273
- interval: 120,
274
363
  frames: ['☗', '☖'],
364
+ interval: 120,
275
365
  },
276
366
  toggle13: {
277
- interval: 80,
278
367
  frames: ['=', '*', '-'],
279
- },
280
- arrow: {
281
- interval: 100,
282
- frames: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'],
283
- },
284
- arrow2: {
285
- interval: 80,
286
- frames: ['⬆️ ', '↗️ ', '➡️ ', '↘️ ', '⬇️ ', '↙️ ', '⬅️ ', '↖️ '],
287
- },
288
- arrow3: {
289
- interval: 120,
290
- frames: ['▹▹▹▹▹', '▸▹▹▹▹', '▹▸▹▹▹', '▹▹▸▹▹', '▹▹▹▸▹', '▹▹▹▹▸'],
291
- },
292
- bouncingBar: {
293
368
  interval: 80,
294
- frames: ['[ ]', '[ =]', '[ ==]', '[ ===]', '[====]', '[=== ]', '[== ]', '[= ]'],
295
369
  },
296
- bouncingBall: {
297
- interval: 80,
298
- frames: [
299
- '( ● )',
300
- '( ● )',
301
- '( ● )',
302
- '( ● )',
303
- '( ●)',
304
- '( ● )',
305
- '( ● )',
306
- '( ● )',
307
- '( ● )',
308
- '(● )',
309
- ],
310
- },
311
- smiley: {
312
- interval: 200,
313
- frames: ['😄 ', '😝 '],
314
- },
315
- monkey: {
316
- interval: 300,
317
- frames: ['🙈 ', '🙈 ', '🙉 ', '🙊 '],
318
- },
319
- hearts: {
320
- interval: 100,
321
- frames: ['💛 ', '💙 ', '💜 ', '💚 ', '❤️ '],
322
- },
323
- clock: {
324
- interval: 100,
325
- frames: ['🕐 ', '🕑 ', '🕒 ', '🕓 ', '🕔 ', '🕕 ', '🕖 ', '🕗 ', '🕘 ', '🕙 ', '🕚 '],
326
- },
327
- earth: {
328
- interval: 180,
329
- frames: ['🌍 ', '🌎 ', '🌏 '],
330
- },
331
- moon: {
332
- interval: 80,
333
- frames: ['🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 '],
334
- },
335
- runner: {
336
- interval: 140,
337
- frames: ['🚶 ', '🏃 '],
338
- },
339
- pong: {
340
- interval: 80,
341
- frames: [
342
- '▐⠂ ▌',
343
- '▐⠈ ▌',
344
- '▐ ⠂ ▌',
345
- '▐ ⠠ ▌',
346
- '▐ ⡀ ▌',
347
- '▐ ⠠ ▌',
348
- '▐ ⠂ ▌',
349
- '▐ ⠈ ▌',
350
- '▐ ⠂ ▌',
351
- '▐ ⠠ ▌',
352
- '▐ ⡀ ▌',
353
- '▐ ⠠ ▌',
354
- '▐ ⠂ ▌',
355
- '▐ ⠈ ▌',
356
- '▐ ⠂▌',
357
- '▐ ⠠▌',
358
- '▐ ⡀▌',
359
- '▐ ⠠ ▌',
360
- '▐ ⠂ ▌',
361
- '▐ ⠈ ▌',
362
- '▐ ⠂ ▌',
363
- '▐ ⠠ ▌',
364
- '▐ ⡀ ▌',
365
- '▐ ⠠ ▌',
366
- '▐ ⠂ ▌',
367
- '▐ ⠈ ▌',
368
- '▐ ⠂ ▌',
369
- '▐ ⠠ ▌',
370
- '▐ ⡀ ▌',
371
- '▐⠠ ▌',
372
- ],
370
+ triangle: {
371
+ frames: ['◢', '◣', '◤', '◥'],
372
+ interval: 50,
373
373
  },
374
374
  };
@@ -0,0 +1,5 @@
1
+ import spinners from './spinners';
2
+ export type Options = {
3
+ stdout?: boolean;
4
+ style?: keyof typeof spinners;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +1,19 @@
1
1
  import { ActionBase } from './action/base';
2
- export type Levels = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace';
2
+ export type Levels = 'debug' | 'error' | 'fatal' | 'info' | 'trace' | 'warn';
3
3
  export interface ConfigMessage {
4
- type: 'config';
5
4
  prop: string;
5
+ type: 'config';
6
6
  value: any;
7
7
  }
8
8
  export declare class Config {
9
- outputLevel: Levels;
10
9
  action: ActionBase;
11
10
  errorsHandled: boolean;
11
+ outputLevel: Levels;
12
12
  showStackTrace: boolean;
13
- get debug(): boolean;
14
- set debug(v: boolean);
15
13
  get context(): any;
16
14
  set context(v: unknown);
15
+ get debug(): boolean;
16
+ set debug(v: boolean);
17
17
  }
18
18
  export declare const config: Config;
19
19
  export default config;