@oclif/core 1.1.1 → 1.3.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.
- package/CHANGELOG.md +23 -0
- package/README.md +8 -4
- package/lib/cli-ux/action/base.d.ts +35 -0
- package/lib/cli-ux/action/base.js +166 -0
- package/lib/cli-ux/action/pride-spinner.d.ts +4 -0
- package/lib/cli-ux/action/pride-spinner.js +31 -0
- package/lib/cli-ux/action/simple.d.ts +11 -0
- package/lib/cli-ux/action/simple.js +52 -0
- package/lib/cli-ux/action/spinner.d.ts +16 -0
- package/lib/cli-ux/action/spinner.js +79 -0
- package/lib/cli-ux/action/spinners.d.ts +0 -0
- package/lib/cli-ux/action/spinners.js +373 -0
- package/lib/cli-ux/config.d.ts +20 -0
- package/lib/cli-ux/config.js +45 -0
- package/lib/cli-ux/deps.d.ts +22 -0
- package/lib/cli-ux/deps.js +47 -0
- package/lib/cli-ux/exit.d.ts +8 -0
- package/lib/cli-ux/exit.js +13 -0
- package/lib/cli-ux/index.d.ts +37 -0
- package/lib/cli-ux/index.js +139 -0
- package/lib/cli-ux/list.d.ts +3 -0
- package/lib/cli-ux/list.js +30 -0
- package/lib/cli-ux/open.d.ts +6 -0
- package/lib/cli-ux/open.js +70 -0
- package/lib/cli-ux/prompt.d.ts +29 -0
- package/lib/cli-ux/prompt.js +150 -0
- package/lib/cli-ux/styled/header.d.ts +1 -0
- package/lib/cli-ux/styled/header.js +8 -0
- package/lib/cli-ux/styled/json.d.ts +1 -0
- package/lib/cli-ux/styled/json.js +16 -0
- package/lib/cli-ux/styled/object.d.ts +1 -0
- package/lib/cli-ux/styled/object.js +39 -0
- package/lib/cli-ux/styled/progress.d.ts +1 -0
- package/lib/cli-ux/styled/progress.js +14 -0
- package/lib/cli-ux/styled/table.d.ts +45 -0
- package/lib/cli-ux/styled/table.js +312 -0
- package/lib/cli-ux/styled/tree.d.ts +9 -0
- package/lib/cli-ux/styled/tree.js +40 -0
- package/lib/cli-ux/wait.d.ts +2 -0
- package/lib/cli-ux/wait.js +8 -0
- package/lib/command.js +4 -5
- package/lib/config/config.js +10 -5
- package/lib/config/plugin.js +1 -1
- package/lib/help/util.js +2 -2
- package/lib/index.d.ts +2 -1
- package/lib/index.js +3 -1
- package/lib/interfaces/hooks.d.ts +3 -1
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/s3-manifest.d.ts +14 -0
- package/lib/interfaces/s3-manifest.js +2 -0
- package/package.json +21 -4
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
hexagon: {
|
|
4
|
+
interval: 400,
|
|
5
|
+
frames: ['⬡', '⬢'],
|
|
6
|
+
},
|
|
7
|
+
dots: {
|
|
8
|
+
interval: 80,
|
|
9
|
+
frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
|
|
10
|
+
},
|
|
11
|
+
dots2: {
|
|
12
|
+
interval: 80,
|
|
13
|
+
frames: ['⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷'],
|
|
14
|
+
},
|
|
15
|
+
dots3: {
|
|
16
|
+
interval: 80,
|
|
17
|
+
frames: ['⠋', '⠙', '⠚', '⠞', '⠖', '⠦', '⠴', '⠲', '⠳', '⠓'],
|
|
18
|
+
},
|
|
19
|
+
dots4: {
|
|
20
|
+
interval: 80,
|
|
21
|
+
frames: ['⠄', '⠆', '⠇', '⠋', '⠙', '⠸', '⠰', '⠠', '⠰', '⠸', '⠙', '⠋', '⠇', '⠆'],
|
|
22
|
+
},
|
|
23
|
+
dots5: {
|
|
24
|
+
interval: 80,
|
|
25
|
+
frames: ['⠋', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋'],
|
|
26
|
+
},
|
|
27
|
+
dots6: {
|
|
28
|
+
interval: 80,
|
|
29
|
+
frames: [
|
|
30
|
+
'⠁',
|
|
31
|
+
'⠉',
|
|
32
|
+
'⠙',
|
|
33
|
+
'⠚',
|
|
34
|
+
'⠒',
|
|
35
|
+
'⠂',
|
|
36
|
+
'⠂',
|
|
37
|
+
'⠒',
|
|
38
|
+
'⠲',
|
|
39
|
+
'⠴',
|
|
40
|
+
'⠤',
|
|
41
|
+
'⠄',
|
|
42
|
+
'⠄',
|
|
43
|
+
'⠤',
|
|
44
|
+
'⠴',
|
|
45
|
+
'⠲',
|
|
46
|
+
'⠒',
|
|
47
|
+
'⠂',
|
|
48
|
+
'⠂',
|
|
49
|
+
'⠒',
|
|
50
|
+
'⠚',
|
|
51
|
+
'⠙',
|
|
52
|
+
'⠉',
|
|
53
|
+
'⠁',
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
dots7: {
|
|
57
|
+
interval: 80,
|
|
58
|
+
frames: [
|
|
59
|
+
'⠈',
|
|
60
|
+
'⠉',
|
|
61
|
+
'⠋',
|
|
62
|
+
'⠓',
|
|
63
|
+
'⠒',
|
|
64
|
+
'⠐',
|
|
65
|
+
'⠐',
|
|
66
|
+
'⠒',
|
|
67
|
+
'⠖',
|
|
68
|
+
'⠦',
|
|
69
|
+
'⠤',
|
|
70
|
+
'⠠',
|
|
71
|
+
'⠠',
|
|
72
|
+
'⠤',
|
|
73
|
+
'⠦',
|
|
74
|
+
'⠖',
|
|
75
|
+
'⠒',
|
|
76
|
+
'⠐',
|
|
77
|
+
'⠐',
|
|
78
|
+
'⠒',
|
|
79
|
+
'⠓',
|
|
80
|
+
'⠋',
|
|
81
|
+
'⠉',
|
|
82
|
+
'⠈',
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
dots8: {
|
|
86
|
+
interval: 80,
|
|
87
|
+
frames: [
|
|
88
|
+
'⠁',
|
|
89
|
+
'⠁',
|
|
90
|
+
'⠉',
|
|
91
|
+
'⠙',
|
|
92
|
+
'⠚',
|
|
93
|
+
'⠒',
|
|
94
|
+
'⠂',
|
|
95
|
+
'⠂',
|
|
96
|
+
'⠒',
|
|
97
|
+
'⠲',
|
|
98
|
+
'⠴',
|
|
99
|
+
'⠤',
|
|
100
|
+
'⠄',
|
|
101
|
+
'⠄',
|
|
102
|
+
'⠤',
|
|
103
|
+
'⠠',
|
|
104
|
+
'⠠',
|
|
105
|
+
'⠤',
|
|
106
|
+
'⠦',
|
|
107
|
+
'⠖',
|
|
108
|
+
'⠒',
|
|
109
|
+
'⠐',
|
|
110
|
+
'⠐',
|
|
111
|
+
'⠒',
|
|
112
|
+
'⠓',
|
|
113
|
+
'⠋',
|
|
114
|
+
'⠉',
|
|
115
|
+
'⠈',
|
|
116
|
+
'⠈',
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
dots9: {
|
|
120
|
+
interval: 80,
|
|
121
|
+
frames: ['⢹', '⢺', '⢼', '⣸', '⣇', '⡧', '⡗', '⡏'],
|
|
122
|
+
},
|
|
123
|
+
dots10: {
|
|
124
|
+
interval: 80,
|
|
125
|
+
frames: ['⢄', '⢂', '⢁', '⡁', '⡈', '⡐', '⡠'],
|
|
126
|
+
},
|
|
127
|
+
dots11: {
|
|
128
|
+
interval: 100,
|
|
129
|
+
frames: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'],
|
|
130
|
+
},
|
|
131
|
+
line: {
|
|
132
|
+
interval: 130,
|
|
133
|
+
frames: ['-', '\\', '|', '/'],
|
|
134
|
+
},
|
|
135
|
+
line2: {
|
|
136
|
+
interval: 100,
|
|
137
|
+
frames: ['⠂', '-', '–', '—', '–', '-'],
|
|
138
|
+
},
|
|
139
|
+
pipe: {
|
|
140
|
+
interval: 100,
|
|
141
|
+
frames: ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'],
|
|
142
|
+
},
|
|
143
|
+
simpleDots: {
|
|
144
|
+
interval: 400,
|
|
145
|
+
frames: ['. ', '.. ', '...', ' '],
|
|
146
|
+
},
|
|
147
|
+
simpleDotsScrolling: {
|
|
148
|
+
interval: 200,
|
|
149
|
+
frames: ['. ', '.. ', '...', ' ..', ' .', ' '],
|
|
150
|
+
},
|
|
151
|
+
star: {
|
|
152
|
+
interval: 70,
|
|
153
|
+
frames: ['✶', '✸', '✹', '✺', '✹', '✷'],
|
|
154
|
+
},
|
|
155
|
+
star2: {
|
|
156
|
+
interval: 80,
|
|
157
|
+
frames: ['+', 'x', '*'],
|
|
158
|
+
},
|
|
159
|
+
flip: {
|
|
160
|
+
interval: 70,
|
|
161
|
+
frames: ['_', '_', '_', '-', '`', '`', '\'', '´', '-', '_', '_', '_'],
|
|
162
|
+
},
|
|
163
|
+
hamburger: {
|
|
164
|
+
interval: 100,
|
|
165
|
+
frames: ['☱', '☲', '☴'],
|
|
166
|
+
},
|
|
167
|
+
growVertical: {
|
|
168
|
+
interval: 120,
|
|
169
|
+
frames: ['▁', '▃', '▄', '▅', '▆', '▇', '▆', '▅', '▄', '▃'],
|
|
170
|
+
},
|
|
171
|
+
growHorizontal: {
|
|
172
|
+
interval: 120,
|
|
173
|
+
frames: ['▏', '▎', '▍', '▌', '▋', '▊', '▉', '▊', '▋', '▌', '▍', '▎'],
|
|
174
|
+
},
|
|
175
|
+
balloon: {
|
|
176
|
+
interval: 140,
|
|
177
|
+
frames: [' ', '.', 'o', 'O', '@', '*', ' '],
|
|
178
|
+
},
|
|
179
|
+
balloon2: {
|
|
180
|
+
interval: 120,
|
|
181
|
+
frames: ['.', 'o', 'O', '°', 'O', 'o', '.'],
|
|
182
|
+
},
|
|
183
|
+
noise: {
|
|
184
|
+
interval: 100,
|
|
185
|
+
frames: ['▓', '▒', '░'],
|
|
186
|
+
},
|
|
187
|
+
bounce: {
|
|
188
|
+
interval: 120,
|
|
189
|
+
frames: ['⠁', '⠂', '⠄', '⠂'],
|
|
190
|
+
},
|
|
191
|
+
boxBounce: {
|
|
192
|
+
interval: 120,
|
|
193
|
+
frames: ['▖', '▘', '▝', '▗'],
|
|
194
|
+
},
|
|
195
|
+
boxBounce2: {
|
|
196
|
+
interval: 100,
|
|
197
|
+
frames: ['▌', '▀', '▐', '▄'],
|
|
198
|
+
},
|
|
199
|
+
triangle: {
|
|
200
|
+
interval: 50,
|
|
201
|
+
frames: ['◢', '◣', '◤', '◥'],
|
|
202
|
+
},
|
|
203
|
+
arc: {
|
|
204
|
+
interval: 100,
|
|
205
|
+
frames: ['◜', '◠', '◝', '◞', '◡', '◟'],
|
|
206
|
+
},
|
|
207
|
+
circle: {
|
|
208
|
+
interval: 120,
|
|
209
|
+
frames: ['◡', '⊙', '◠'],
|
|
210
|
+
},
|
|
211
|
+
squareCorners: {
|
|
212
|
+
interval: 180,
|
|
213
|
+
frames: ['◰', '◳', '◲', '◱'],
|
|
214
|
+
},
|
|
215
|
+
circleQuarters: {
|
|
216
|
+
interval: 120,
|
|
217
|
+
frames: ['◴', '◷', '◶', '◵'],
|
|
218
|
+
},
|
|
219
|
+
circleHalves: {
|
|
220
|
+
interval: 50,
|
|
221
|
+
frames: ['◐', '◓', '◑', '◒'],
|
|
222
|
+
},
|
|
223
|
+
squish: {
|
|
224
|
+
interval: 100,
|
|
225
|
+
frames: ['╫', '╪'],
|
|
226
|
+
},
|
|
227
|
+
toggle: {
|
|
228
|
+
interval: 250,
|
|
229
|
+
frames: ['⊶', '⊷'],
|
|
230
|
+
},
|
|
231
|
+
toggle2: {
|
|
232
|
+
interval: 80,
|
|
233
|
+
frames: ['▫', '▪'],
|
|
234
|
+
},
|
|
235
|
+
toggle3: {
|
|
236
|
+
interval: 120,
|
|
237
|
+
frames: ['□', '■'],
|
|
238
|
+
},
|
|
239
|
+
toggle4: {
|
|
240
|
+
interval: 100,
|
|
241
|
+
frames: ['■', '□', '▪', '▫'],
|
|
242
|
+
},
|
|
243
|
+
toggle5: {
|
|
244
|
+
interval: 100,
|
|
245
|
+
frames: ['▮', '▯'],
|
|
246
|
+
},
|
|
247
|
+
toggle6: {
|
|
248
|
+
interval: 300,
|
|
249
|
+
frames: ['ဝ', '၀'],
|
|
250
|
+
},
|
|
251
|
+
toggle7: {
|
|
252
|
+
interval: 80,
|
|
253
|
+
frames: ['⦾', '⦿'],
|
|
254
|
+
},
|
|
255
|
+
toggle8: {
|
|
256
|
+
interval: 100,
|
|
257
|
+
frames: ['◍', '◌'],
|
|
258
|
+
},
|
|
259
|
+
toggle9: {
|
|
260
|
+
interval: 100,
|
|
261
|
+
frames: ['◉', '◎'],
|
|
262
|
+
},
|
|
263
|
+
toggle10: {
|
|
264
|
+
interval: 100,
|
|
265
|
+
frames: ['㊂', '㊀', '㊁'],
|
|
266
|
+
},
|
|
267
|
+
toggle11: {
|
|
268
|
+
interval: 50,
|
|
269
|
+
frames: ['⧇', '⧆'],
|
|
270
|
+
},
|
|
271
|
+
toggle12: {
|
|
272
|
+
interval: 120,
|
|
273
|
+
frames: ['☗', '☖'],
|
|
274
|
+
},
|
|
275
|
+
toggle13: {
|
|
276
|
+
interval: 80,
|
|
277
|
+
frames: ['=', '*', '-'],
|
|
278
|
+
},
|
|
279
|
+
arrow: {
|
|
280
|
+
interval: 100,
|
|
281
|
+
frames: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'],
|
|
282
|
+
},
|
|
283
|
+
arrow2: {
|
|
284
|
+
interval: 80,
|
|
285
|
+
frames: ['⬆️ ', '↗️ ', '➡️ ', '↘️ ', '⬇️ ', '↙️ ', '⬅️ ', '↖️ '],
|
|
286
|
+
},
|
|
287
|
+
arrow3: {
|
|
288
|
+
interval: 120,
|
|
289
|
+
frames: ['▹▹▹▹▹', '▸▹▹▹▹', '▹▸▹▹▹', '▹▹▸▹▹', '▹▹▹▸▹', '▹▹▹▹▸'],
|
|
290
|
+
},
|
|
291
|
+
bouncingBar: {
|
|
292
|
+
interval: 80,
|
|
293
|
+
frames: ['[ ]', '[ =]', '[ ==]', '[ ===]', '[====]', '[=== ]', '[== ]', '[= ]'],
|
|
294
|
+
},
|
|
295
|
+
bouncingBall: {
|
|
296
|
+
interval: 80,
|
|
297
|
+
frames: [
|
|
298
|
+
'( ● )',
|
|
299
|
+
'( ● )',
|
|
300
|
+
'( ● )',
|
|
301
|
+
'( ● )',
|
|
302
|
+
'( ●)',
|
|
303
|
+
'( ● )',
|
|
304
|
+
'( ● )',
|
|
305
|
+
'( ● )',
|
|
306
|
+
'( ● )',
|
|
307
|
+
'(● )',
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
smiley: {
|
|
311
|
+
interval: 200,
|
|
312
|
+
frames: ['😄 ', '😝 '],
|
|
313
|
+
},
|
|
314
|
+
monkey: {
|
|
315
|
+
interval: 300,
|
|
316
|
+
frames: ['🙈 ', '🙈 ', '🙉 ', '🙊 '],
|
|
317
|
+
},
|
|
318
|
+
hearts: {
|
|
319
|
+
interval: 100,
|
|
320
|
+
frames: ['💛 ', '💙 ', '💜 ', '💚 ', '❤️ '],
|
|
321
|
+
},
|
|
322
|
+
clock: {
|
|
323
|
+
interval: 100,
|
|
324
|
+
frames: ['🕐 ', '🕑 ', '🕒 ', '🕓 ', '🕔 ', '🕕 ', '🕖 ', '🕗 ', '🕘 ', '🕙 ', '🕚 '],
|
|
325
|
+
},
|
|
326
|
+
earth: {
|
|
327
|
+
interval: 180,
|
|
328
|
+
frames: ['🌍 ', '🌎 ', '🌏 '],
|
|
329
|
+
},
|
|
330
|
+
moon: {
|
|
331
|
+
interval: 80,
|
|
332
|
+
frames: ['🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 '],
|
|
333
|
+
},
|
|
334
|
+
runner: {
|
|
335
|
+
interval: 140,
|
|
336
|
+
frames: ['🚶 ', '🏃 '],
|
|
337
|
+
},
|
|
338
|
+
pong: {
|
|
339
|
+
interval: 80,
|
|
340
|
+
frames: [
|
|
341
|
+
'▐⠂ ▌',
|
|
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
|
+
},
|
|
373
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionBase } from './action/base';
|
|
2
|
+
export declare type Levels = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace';
|
|
3
|
+
export interface ConfigMessage {
|
|
4
|
+
type: 'config';
|
|
5
|
+
prop: string;
|
|
6
|
+
value: any;
|
|
7
|
+
}
|
|
8
|
+
export declare class Config {
|
|
9
|
+
outputLevel: Levels;
|
|
10
|
+
action: ActionBase;
|
|
11
|
+
prideAction: ActionBase;
|
|
12
|
+
errorsHandled: boolean;
|
|
13
|
+
showStackTrace: boolean;
|
|
14
|
+
get debug(): boolean;
|
|
15
|
+
set debug(v: boolean);
|
|
16
|
+
get context(): any;
|
|
17
|
+
set context(v: any);
|
|
18
|
+
}
|
|
19
|
+
export declare const config: Config;
|
|
20
|
+
export default config;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.config = exports.Config = void 0;
|
|
4
|
+
const semver = require("semver");
|
|
5
|
+
const version = semver.parse(require('../../package.json').version);
|
|
6
|
+
const g = global;
|
|
7
|
+
const globals = g['cli-ux'] || (g['cli-ux'] = {});
|
|
8
|
+
const actionType = (Boolean(process.stderr.isTTY) &&
|
|
9
|
+
!process.env.CI &&
|
|
10
|
+
!['dumb', 'emacs-color'].includes(process.env.TERM) &&
|
|
11
|
+
'spinner') || 'simple';
|
|
12
|
+
/* eslint-disable node/no-missing-require */
|
|
13
|
+
const Action = actionType === 'spinner' ? require('./action/spinner').default : require('./action/simple').default;
|
|
14
|
+
const PrideAction = actionType === 'spinner' ? require('./action/pride-spinner').default : require('./action/simple').default;
|
|
15
|
+
/* eslint-enable node/no-missing-require */
|
|
16
|
+
class Config {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.outputLevel = 'info';
|
|
19
|
+
this.action = new Action();
|
|
20
|
+
this.prideAction = new PrideAction();
|
|
21
|
+
this.errorsHandled = false;
|
|
22
|
+
this.showStackTrace = true;
|
|
23
|
+
}
|
|
24
|
+
get debug() {
|
|
25
|
+
return globals.debug || process.env.DEBUG === '*';
|
|
26
|
+
}
|
|
27
|
+
set debug(v) {
|
|
28
|
+
globals.debug = v;
|
|
29
|
+
}
|
|
30
|
+
get context() {
|
|
31
|
+
return globals.context || {};
|
|
32
|
+
}
|
|
33
|
+
set context(v) {
|
|
34
|
+
globals.context = v;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.Config = Config;
|
|
38
|
+
function fetch() {
|
|
39
|
+
if (globals[version.major])
|
|
40
|
+
return globals[version.major];
|
|
41
|
+
globals[version.major] = new Config();
|
|
42
|
+
return globals[version.major];
|
|
43
|
+
}
|
|
44
|
+
exports.config = fetch();
|
|
45
|
+
exports.default = exports.config;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly stripAnsi: (string: string) => string;
|
|
3
|
+
readonly ansiStyles: {
|
|
4
|
+
readonly modifier: import("ansi-styles").Modifier;
|
|
5
|
+
readonly color: import("ansi-styles").ForegroundColor & import("ansi-styles").ColorBase;
|
|
6
|
+
readonly bgColor: import("ansi-styles").BackgroundColor & import("ansi-styles").ColorBase;
|
|
7
|
+
readonly codes: ReadonlyMap<number, number>;
|
|
8
|
+
} & import("ansi-styles").BackgroundColor & import("ansi-styles").ForegroundColor & import("ansi-styles").Modifier;
|
|
9
|
+
readonly ansiEscapes: any;
|
|
10
|
+
readonly passwordPrompt: any;
|
|
11
|
+
readonly screen: typeof import("@oclif/screen");
|
|
12
|
+
readonly open: typeof import("./open").default;
|
|
13
|
+
readonly prompt: typeof import("./prompt");
|
|
14
|
+
readonly styledObject: typeof import("./styled/object").default;
|
|
15
|
+
readonly styledHeader: typeof import("./styled/header").default;
|
|
16
|
+
readonly styledJSON: typeof import("./styled/json").default;
|
|
17
|
+
readonly table: typeof import("./styled/table").table;
|
|
18
|
+
readonly tree: typeof import("./styled/tree").default;
|
|
19
|
+
readonly wait: (ms?: number) => Promise<unknown>;
|
|
20
|
+
readonly progress: typeof import("./styled/progress").default;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable node/no-missing-require */
|
|
4
|
+
exports.default = {
|
|
5
|
+
get stripAnsi() {
|
|
6
|
+
return require('strip-ansi');
|
|
7
|
+
},
|
|
8
|
+
get ansiStyles() {
|
|
9
|
+
return require('ansi-styles');
|
|
10
|
+
},
|
|
11
|
+
get ansiEscapes() {
|
|
12
|
+
return require('ansi-escapes');
|
|
13
|
+
},
|
|
14
|
+
get passwordPrompt() {
|
|
15
|
+
return require('password-prompt');
|
|
16
|
+
},
|
|
17
|
+
get screen() {
|
|
18
|
+
return require('@oclif/screen');
|
|
19
|
+
},
|
|
20
|
+
get open() {
|
|
21
|
+
return require('./open').default;
|
|
22
|
+
},
|
|
23
|
+
get prompt() {
|
|
24
|
+
return require('./prompt');
|
|
25
|
+
},
|
|
26
|
+
get styledObject() {
|
|
27
|
+
return require('./styled/object').default;
|
|
28
|
+
},
|
|
29
|
+
get styledHeader() {
|
|
30
|
+
return require('./styled/header').default;
|
|
31
|
+
},
|
|
32
|
+
get styledJSON() {
|
|
33
|
+
return require('./styled/json').default;
|
|
34
|
+
},
|
|
35
|
+
get table() {
|
|
36
|
+
return require('./styled/table').table;
|
|
37
|
+
},
|
|
38
|
+
get tree() {
|
|
39
|
+
return require('./styled/tree').default;
|
|
40
|
+
},
|
|
41
|
+
get wait() {
|
|
42
|
+
return require('./wait').default;
|
|
43
|
+
},
|
|
44
|
+
get progress() {
|
|
45
|
+
return require('./styled/progress').default;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExitError = void 0;
|
|
4
|
+
class ExitError extends Error {
|
|
5
|
+
constructor(status, error) {
|
|
6
|
+
const code = 'EEXIT';
|
|
7
|
+
super(error ? error.message : `${code}: ${status}`);
|
|
8
|
+
this.error = error;
|
|
9
|
+
this['cli-ux'] = { exit: status };
|
|
10
|
+
this.code = code;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ExitError = ExitError;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as Errors from '../errors';
|
|
2
|
+
import { ActionBase } from './action/base';
|
|
3
|
+
import { config, Config } from './config';
|
|
4
|
+
import { ExitError } from './exit';
|
|
5
|
+
import { IPromptOptions } from './prompt';
|
|
6
|
+
import * as Table from './styled/table';
|
|
7
|
+
export declare const ux: {
|
|
8
|
+
config: Config;
|
|
9
|
+
warn: typeof Errors.warn;
|
|
10
|
+
error: typeof Errors.error;
|
|
11
|
+
exit: typeof Errors.exit;
|
|
12
|
+
readonly prompt: typeof import("./prompt").prompt;
|
|
13
|
+
/**
|
|
14
|
+
* "press anykey to continue"
|
|
15
|
+
*/
|
|
16
|
+
readonly anykey: typeof import("./prompt").anykey;
|
|
17
|
+
readonly confirm: typeof import("./prompt").confirm;
|
|
18
|
+
readonly action: ActionBase;
|
|
19
|
+
readonly prideAction: ActionBase;
|
|
20
|
+
styledObject(obj: any, keys?: string[] | undefined): void;
|
|
21
|
+
readonly styledHeader: typeof import("./styled/header").default;
|
|
22
|
+
readonly styledJSON: typeof import("./styled/json").default;
|
|
23
|
+
readonly table: typeof Table.table;
|
|
24
|
+
readonly tree: typeof import("./styled/tree").default;
|
|
25
|
+
readonly open: typeof import("./open").default;
|
|
26
|
+
readonly wait: (ms?: number) => Promise<unknown>;
|
|
27
|
+
readonly progress: typeof import("./styled/progress").default;
|
|
28
|
+
done(): Promise<void>;
|
|
29
|
+
trace(format: string, ...args: string[]): void;
|
|
30
|
+
debug(format: string, ...args: string[]): void;
|
|
31
|
+
info(format: string, ...args: string[]): void;
|
|
32
|
+
log(format?: string | undefined, ...args: string[]): void;
|
|
33
|
+
url(text: string, uri: string, params?: {}): void;
|
|
34
|
+
annotation(text: string, annotation: string): void;
|
|
35
|
+
flush(): Promise<void>;
|
|
36
|
+
};
|
|
37
|
+
export { config, ActionBase, Config, ExitError, IPromptOptions, Table, };
|