@oclif/core 3.26.4 → 4.0.0-beta.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/lib/command.js +6 -6
- package/lib/config/config.d.ts +3 -4
- package/lib/config/config.js +42 -39
- package/lib/config/ts-path.js +5 -5
- package/lib/errors/error.js +2 -5
- package/lib/errors/errors/cli.js +3 -3
- package/lib/errors/exit.d.ts +1 -0
- package/lib/errors/exit.js +8 -0
- package/lib/errors/index.d.ts +1 -1
- package/lib/errors/index.js +5 -8
- package/lib/errors/logger.js +5 -2
- package/lib/errors/warn.d.ts +13 -2
- package/lib/errors/warn.js +15 -11
- package/lib/execute.js +1 -1
- package/lib/{cli-ux/flush.js → flush.js} +1 -1
- package/lib/help/command.js +6 -5
- package/lib/help/formatter.js +8 -9
- package/lib/help/index.js +6 -9
- package/lib/help/root.js +3 -3
- package/lib/index.d.ts +2 -3
- package/lib/index.js +6 -12
- package/lib/interfaces/config.d.ts +1 -0
- package/lib/interfaces/pjson.d.ts +1 -1
- package/lib/interfaces/theme.d.ts +30 -19
- package/lib/interfaces/theme.js +2 -19
- package/lib/main.js +2 -2
- package/lib/parser/errors.js +5 -5
- package/lib/parser/help.js +2 -2
- package/lib/util/read-tsconfig.js +1 -1
- package/lib/{cli-ux → ux}/action/base.d.ts +5 -7
- package/lib/{cli-ux → ux}/action/base.js +0 -3
- package/lib/{cli-ux → ux}/action/spinner.d.ts +5 -4
- package/lib/{cli-ux → ux}/action/spinner.js +16 -39
- package/lib/ux/action/types.d.ts +5 -0
- package/lib/ux/colorize-json.d.ts +28 -0
- package/lib/ux/colorize-json.js +67 -0
- package/lib/ux/index.d.ts +64 -0
- package/lib/ux/index.js +76 -0
- package/lib/{cli-ux → ux}/list.d.ts +1 -1
- package/lib/{cli-ux → ux}/list.js +1 -2
- package/lib/ux/theme.d.ts +9 -0
- package/lib/ux/theme.js +43 -0
- package/lib/ux/write.d.ts +2 -0
- package/lib/ux/write.js +22 -0
- package/package.json +11 -32
- package/lib/cli-ux/action/spinners.d.ts +0 -251
- package/lib/cli-ux/action/spinners.js +0 -374
- package/lib/cli-ux/action/types.d.ts +0 -5
- package/lib/cli-ux/config.d.ts +0 -25
- package/lib/cli-ux/config.js +0 -52
- package/lib/cli-ux/exit.d.ts +0 -8
- package/lib/cli-ux/exit.js +0 -16
- package/lib/cli-ux/index.d.ts +0 -133
- package/lib/cli-ux/index.js +0 -183
- package/lib/cli-ux/prompt.d.ts +0 -32
- package/lib/cli-ux/prompt.js +0 -185
- package/lib/cli-ux/stream.d.ts +0 -23
- package/lib/cli-ux/stream.js +0 -43
- package/lib/cli-ux/styled/index.d.ts +0 -4
- package/lib/cli-ux/styled/index.js +0 -36
- package/lib/cli-ux/styled/object.d.ts +0 -1
- package/lib/cli-ux/styled/object.js +0 -39
- package/lib/cli-ux/styled/progress.d.ts +0 -2
- package/lib/cli-ux/styled/progress.js +0 -8
- package/lib/cli-ux/styled/table.d.ts +0 -45
- package/lib/cli-ux/styled/table.js +0 -345
- package/lib/cli-ux/styled/tree.d.ts +0 -9
- package/lib/cli-ux/styled/tree.js +0 -37
- package/lib/cli-ux/theme.d.ts +0 -11
- package/lib/cli-ux/theme.js +0 -61
- package/lib/cli-ux/wait.d.ts +0 -2
- package/lib/cli-ux/wait.js +0 -5
- package/lib/cli-ux/write.d.ts +0 -8
- package/lib/cli-ux/write.js +0 -15
- /package/lib/{cli-ux/flush.d.ts → flush.d.ts} +0 -0
- /package/lib/{cli-ux → ux}/action/simple.d.ts +0 -0
- /package/lib/{cli-ux → ux}/action/simple.js +0 -0
- /package/lib/{cli-ux → ux}/action/types.js +0 -0
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = {
|
|
4
|
-
arc: {
|
|
5
|
-
frames: ['◜', '◠', '◝', '◞', '◡', '◟'],
|
|
6
|
-
interval: 100,
|
|
7
|
-
},
|
|
8
|
-
arrow: {
|
|
9
|
-
frames: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'],
|
|
10
|
-
interval: 100,
|
|
11
|
-
},
|
|
12
|
-
arrow2: {
|
|
13
|
-
frames: ['⬆️ ', '↗️ ', '➡️ ', '↘️ ', '⬇️ ', '↙️ ', '⬅️ ', '↖️ '],
|
|
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: {
|
|
76
|
-
frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
|
|
77
|
-
interval: 80,
|
|
78
|
-
},
|
|
79
|
-
dots2: {
|
|
80
|
-
frames: ['⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷'],
|
|
81
|
-
interval: 80,
|
|
82
|
-
},
|
|
83
|
-
dots3: {
|
|
84
|
-
frames: ['⠋', '⠙', '⠚', '⠞', '⠖', '⠦', '⠴', '⠲', '⠳', '⠓'],
|
|
85
|
-
interval: 80,
|
|
86
|
-
},
|
|
87
|
-
dots4: {
|
|
88
|
-
frames: ['⠄', '⠆', '⠇', '⠋', '⠙', '⠸', '⠰', '⠠', '⠰', '⠸', '⠙', '⠋', '⠇', '⠆'],
|
|
89
|
-
interval: 80,
|
|
90
|
-
},
|
|
91
|
-
dots5: {
|
|
92
|
-
frames: ['⠋', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋'],
|
|
93
|
-
interval: 80,
|
|
94
|
-
},
|
|
95
|
-
dots6: {
|
|
96
|
-
frames: [
|
|
97
|
-
'⠁',
|
|
98
|
-
'⠉',
|
|
99
|
-
'⠙',
|
|
100
|
-
'⠚',
|
|
101
|
-
'⠒',
|
|
102
|
-
'⠂',
|
|
103
|
-
'⠂',
|
|
104
|
-
'⠒',
|
|
105
|
-
'⠲',
|
|
106
|
-
'⠴',
|
|
107
|
-
'⠤',
|
|
108
|
-
'⠄',
|
|
109
|
-
'⠄',
|
|
110
|
-
'⠤',
|
|
111
|
-
'⠴',
|
|
112
|
-
'⠲',
|
|
113
|
-
'⠒',
|
|
114
|
-
'⠂',
|
|
115
|
-
'⠂',
|
|
116
|
-
'⠒',
|
|
117
|
-
'⠚',
|
|
118
|
-
'⠙',
|
|
119
|
-
'⠉',
|
|
120
|
-
'⠁',
|
|
121
|
-
],
|
|
122
|
-
interval: 80,
|
|
123
|
-
},
|
|
124
|
-
dots7: {
|
|
125
|
-
frames: [
|
|
126
|
-
'⠈',
|
|
127
|
-
'⠉',
|
|
128
|
-
'⠋',
|
|
129
|
-
'⠓',
|
|
130
|
-
'⠒',
|
|
131
|
-
'⠐',
|
|
132
|
-
'⠐',
|
|
133
|
-
'⠒',
|
|
134
|
-
'⠖',
|
|
135
|
-
'⠦',
|
|
136
|
-
'⠤',
|
|
137
|
-
'⠠',
|
|
138
|
-
'⠠',
|
|
139
|
-
'⠤',
|
|
140
|
-
'⠦',
|
|
141
|
-
'⠖',
|
|
142
|
-
'⠒',
|
|
143
|
-
'⠐',
|
|
144
|
-
'⠐',
|
|
145
|
-
'⠒',
|
|
146
|
-
'⠓',
|
|
147
|
-
'⠋',
|
|
148
|
-
'⠉',
|
|
149
|
-
'⠈',
|
|
150
|
-
],
|
|
151
|
-
interval: 80,
|
|
152
|
-
},
|
|
153
|
-
dots8: {
|
|
154
|
-
frames: [
|
|
155
|
-
'⠁',
|
|
156
|
-
'⠁',
|
|
157
|
-
'⠉',
|
|
158
|
-
'⠙',
|
|
159
|
-
'⠚',
|
|
160
|
-
'⠒',
|
|
161
|
-
'⠂',
|
|
162
|
-
'⠂',
|
|
163
|
-
'⠒',
|
|
164
|
-
'⠲',
|
|
165
|
-
'⠴',
|
|
166
|
-
'⠤',
|
|
167
|
-
'⠄',
|
|
168
|
-
'⠄',
|
|
169
|
-
'⠤',
|
|
170
|
-
'⠠',
|
|
171
|
-
'⠠',
|
|
172
|
-
'⠤',
|
|
173
|
-
'⠦',
|
|
174
|
-
'⠖',
|
|
175
|
-
'⠒',
|
|
176
|
-
'⠐',
|
|
177
|
-
'⠐',
|
|
178
|
-
'⠒',
|
|
179
|
-
'⠓',
|
|
180
|
-
'⠋',
|
|
181
|
-
'⠉',
|
|
182
|
-
'⠈',
|
|
183
|
-
'⠈',
|
|
184
|
-
],
|
|
185
|
-
interval: 80,
|
|
186
|
-
},
|
|
187
|
-
dots9: {
|
|
188
|
-
frames: ['⢹', '⢺', '⢼', '⣸', '⣇', '⡧', '⡗', '⡏'],
|
|
189
|
-
interval: 80,
|
|
190
|
-
},
|
|
191
|
-
dots10: {
|
|
192
|
-
frames: ['⢄', '⢂', '⢁', '⡁', '⡈', '⡐', '⡠'],
|
|
193
|
-
interval: 80,
|
|
194
|
-
},
|
|
195
|
-
dots11: {
|
|
196
|
-
frames: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'],
|
|
197
|
-
interval: 100,
|
|
198
|
-
},
|
|
199
|
-
earth: {
|
|
200
|
-
frames: ['🌍 ', '🌎 ', '🌏 '],
|
|
201
|
-
interval: 180,
|
|
202
|
-
},
|
|
203
|
-
flip: {
|
|
204
|
-
frames: ['_', '_', '_', '-', '`', '`', "'", '´', '-', '_', '_', '_'],
|
|
205
|
-
interval: 70,
|
|
206
|
-
},
|
|
207
|
-
growHorizontal: {
|
|
208
|
-
frames: ['▏', '▎', '▍', '▌', '▋', '▊', '▉', '▊', '▋', '▌', '▍', '▎'],
|
|
209
|
-
interval: 120,
|
|
210
|
-
},
|
|
211
|
-
growVertical: {
|
|
212
|
-
frames: ['▁', '▃', '▄', '▅', '▆', '▇', '▆', '▅', '▄', '▃'],
|
|
213
|
-
interval: 120,
|
|
214
|
-
},
|
|
215
|
-
hamburger: {
|
|
216
|
-
frames: ['☱', '☲', '☴'],
|
|
217
|
-
interval: 100,
|
|
218
|
-
},
|
|
219
|
-
hearts: {
|
|
220
|
-
frames: ['💛 ', '💙 ', '💜 ', '💚 ', '❤️ '],
|
|
221
|
-
interval: 100,
|
|
222
|
-
},
|
|
223
|
-
hexagon: {
|
|
224
|
-
frames: ['⬡', '⬢'],
|
|
225
|
-
interval: 400,
|
|
226
|
-
},
|
|
227
|
-
line: {
|
|
228
|
-
frames: ['-', '\\', '|', '/'],
|
|
229
|
-
interval: 130,
|
|
230
|
-
},
|
|
231
|
-
line2: {
|
|
232
|
-
frames: ['⠂', '-', '–', '—', '–', '-'],
|
|
233
|
-
interval: 100,
|
|
234
|
-
},
|
|
235
|
-
monkey: {
|
|
236
|
-
frames: ['🙈 ', '🙈 ', '🙉 ', '🙊 '],
|
|
237
|
-
interval: 300,
|
|
238
|
-
},
|
|
239
|
-
moon: {
|
|
240
|
-
frames: ['🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 '],
|
|
241
|
-
interval: 80,
|
|
242
|
-
},
|
|
243
|
-
noise: {
|
|
244
|
-
frames: ['▓', '▒', '░'],
|
|
245
|
-
interval: 100,
|
|
246
|
-
},
|
|
247
|
-
pipe: {
|
|
248
|
-
frames: ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'],
|
|
249
|
-
interval: 100,
|
|
250
|
-
},
|
|
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,
|
|
285
|
-
},
|
|
286
|
-
runner: {
|
|
287
|
-
frames: ['🚶 ', '🏃 '],
|
|
288
|
-
interval: 140,
|
|
289
|
-
},
|
|
290
|
-
simpleDots: {
|
|
291
|
-
frames: ['. ', '.. ', '...', ' '],
|
|
292
|
-
interval: 400,
|
|
293
|
-
},
|
|
294
|
-
simpleDotsScrolling: {
|
|
295
|
-
frames: ['. ', '.. ', '...', ' ..', ' .', ' '],
|
|
296
|
-
interval: 200,
|
|
297
|
-
},
|
|
298
|
-
smiley: {
|
|
299
|
-
frames: ['😄 ', '😝 '],
|
|
300
|
-
interval: 200,
|
|
301
|
-
},
|
|
302
|
-
squareCorners: {
|
|
303
|
-
frames: ['◰', '◳', '◲', '◱'],
|
|
304
|
-
interval: 180,
|
|
305
|
-
},
|
|
306
|
-
squish: {
|
|
307
|
-
frames: ['╫', '╪'],
|
|
308
|
-
interval: 100,
|
|
309
|
-
},
|
|
310
|
-
star: {
|
|
311
|
-
frames: ['✶', '✸', '✹', '✺', '✹', '✷'],
|
|
312
|
-
interval: 70,
|
|
313
|
-
},
|
|
314
|
-
star2: {
|
|
315
|
-
frames: ['+', 'x', '*'],
|
|
316
|
-
interval: 80,
|
|
317
|
-
},
|
|
318
|
-
toggle: {
|
|
319
|
-
frames: ['⊶', '⊷'],
|
|
320
|
-
interval: 250,
|
|
321
|
-
},
|
|
322
|
-
toggle2: {
|
|
323
|
-
frames: ['▫', '▪'],
|
|
324
|
-
interval: 80,
|
|
325
|
-
},
|
|
326
|
-
toggle3: {
|
|
327
|
-
frames: ['□', '■'],
|
|
328
|
-
interval: 120,
|
|
329
|
-
},
|
|
330
|
-
toggle4: {
|
|
331
|
-
frames: ['■', '□', '▪', '▫'],
|
|
332
|
-
interval: 100,
|
|
333
|
-
},
|
|
334
|
-
toggle5: {
|
|
335
|
-
frames: ['▮', '▯'],
|
|
336
|
-
interval: 100,
|
|
337
|
-
},
|
|
338
|
-
toggle6: {
|
|
339
|
-
frames: ['ဝ', '၀'],
|
|
340
|
-
interval: 300,
|
|
341
|
-
},
|
|
342
|
-
toggle7: {
|
|
343
|
-
frames: ['⦾', '⦿'],
|
|
344
|
-
interval: 80,
|
|
345
|
-
},
|
|
346
|
-
toggle8: {
|
|
347
|
-
frames: ['◍', '◌'],
|
|
348
|
-
interval: 100,
|
|
349
|
-
},
|
|
350
|
-
toggle9: {
|
|
351
|
-
frames: ['◉', '◎'],
|
|
352
|
-
interval: 100,
|
|
353
|
-
},
|
|
354
|
-
toggle10: {
|
|
355
|
-
frames: ['㊂', '㊀', '㊁'],
|
|
356
|
-
interval: 100,
|
|
357
|
-
},
|
|
358
|
-
toggle11: {
|
|
359
|
-
frames: ['⧇', '⧆'],
|
|
360
|
-
interval: 50,
|
|
361
|
-
},
|
|
362
|
-
toggle12: {
|
|
363
|
-
frames: ['☗', '☖'],
|
|
364
|
-
interval: 120,
|
|
365
|
-
},
|
|
366
|
-
toggle13: {
|
|
367
|
-
frames: ['=', '*', '-'],
|
|
368
|
-
interval: 80,
|
|
369
|
-
},
|
|
370
|
-
triangle: {
|
|
371
|
-
frames: ['◢', '◣', '◤', '◥'],
|
|
372
|
-
interval: 50,
|
|
373
|
-
},
|
|
374
|
-
};
|
package/lib/cli-ux/config.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ActionBase } from './action/base';
|
|
2
|
-
export type Levels = 'debug' | 'error' | 'fatal' | 'info' | 'trace' | 'warn';
|
|
3
|
-
export interface ConfigMessage {
|
|
4
|
-
prop: string;
|
|
5
|
-
type: 'config';
|
|
6
|
-
value: any;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
10
|
-
*/
|
|
11
|
-
export declare class Config {
|
|
12
|
-
action: ActionBase;
|
|
13
|
-
errorsHandled: boolean;
|
|
14
|
-
outputLevel: Levels;
|
|
15
|
-
showStackTrace: boolean;
|
|
16
|
-
get context(): any;
|
|
17
|
-
set context(v: unknown);
|
|
18
|
-
get debug(): boolean;
|
|
19
|
-
set debug(v: boolean);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
23
|
-
*/
|
|
24
|
-
export declare const config: Config;
|
|
25
|
-
export default config;
|
package/lib/cli-ux/config.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.config = exports.Config = void 0;
|
|
7
|
-
const cache_1 = __importDefault(require("../cache"));
|
|
8
|
-
const simple_1 = __importDefault(require("./action/simple"));
|
|
9
|
-
const spinner_1 = __importDefault(require("./action/spinner"));
|
|
10
|
-
const g = global;
|
|
11
|
-
const globals = g.ux || (g.ux = {});
|
|
12
|
-
const actionType = (Boolean(process.stderr.isTTY) &&
|
|
13
|
-
!process.env.CI &&
|
|
14
|
-
!['dumb', 'emacs-color'].includes(process.env.TERM) &&
|
|
15
|
-
'spinner') ||
|
|
16
|
-
'simple';
|
|
17
|
-
const Action = actionType === 'spinner' ? spinner_1.default : simple_1.default;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
20
|
-
*/
|
|
21
|
-
class Config {
|
|
22
|
-
action = new Action();
|
|
23
|
-
errorsHandled = false;
|
|
24
|
-
outputLevel = 'info';
|
|
25
|
-
showStackTrace = true;
|
|
26
|
-
get context() {
|
|
27
|
-
return globals.context || {};
|
|
28
|
-
}
|
|
29
|
-
set context(v) {
|
|
30
|
-
globals.context = v;
|
|
31
|
-
}
|
|
32
|
-
get debug() {
|
|
33
|
-
return globals.debug || process.env.DEBUG === '*';
|
|
34
|
-
}
|
|
35
|
-
set debug(v) {
|
|
36
|
-
globals.debug = v;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.Config = Config;
|
|
40
|
-
function fetch() {
|
|
41
|
-
const core = cache_1.default.getInstance().get('@oclif/core');
|
|
42
|
-
const major = core?.version.split('.')[0] || 'unknown';
|
|
43
|
-
if (globals[major])
|
|
44
|
-
return globals[major];
|
|
45
|
-
globals[major] = new Config();
|
|
46
|
-
return globals[major];
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
50
|
-
*/
|
|
51
|
-
exports.config = fetch();
|
|
52
|
-
exports.default = exports.config;
|
package/lib/cli-ux/exit.d.ts
DELETED
package/lib/cli-ux/exit.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExitError = void 0;
|
|
4
|
-
class ExitError extends Error {
|
|
5
|
-
code;
|
|
6
|
-
error;
|
|
7
|
-
ux;
|
|
8
|
-
constructor(status, error) {
|
|
9
|
-
const code = 'EEXIT';
|
|
10
|
-
super(error ? error.message : `${code}: ${status}`);
|
|
11
|
-
this.error = error;
|
|
12
|
-
this.ux = { exit: status };
|
|
13
|
-
this.code = code;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ExitError = ExitError;
|
package/lib/cli-ux/index.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import * as Errors from '../errors';
|
|
2
|
-
import { ActionBase } from './action/base';
|
|
3
|
-
import * as uxPrompt from './prompt';
|
|
4
|
-
import * as styled from './styled';
|
|
5
|
-
import uxWait from './wait';
|
|
6
|
-
export declare class ux {
|
|
7
|
-
static config: import("./config").Config;
|
|
8
|
-
static get action(): ActionBase;
|
|
9
|
-
static annotation(text: string, annotation: string): void;
|
|
10
|
-
/**
|
|
11
|
-
* "press anykey to continue"
|
|
12
|
-
*/
|
|
13
|
-
static get anykey(): typeof uxPrompt.anykey;
|
|
14
|
-
static get confirm(): typeof uxPrompt.confirm;
|
|
15
|
-
static debug(format: string, ...args: string[]): void;
|
|
16
|
-
static done(): Promise<void>;
|
|
17
|
-
static flush(ms?: number): Promise<void>;
|
|
18
|
-
static info(format: string, ...args: string[]): void;
|
|
19
|
-
static log(format?: string, ...args: string[]): void;
|
|
20
|
-
static logToStderr(format?: string, ...args: string[]): void;
|
|
21
|
-
static get progress(): typeof styled.progress;
|
|
22
|
-
static get prompt(): typeof uxPrompt.prompt;
|
|
23
|
-
static styledHeader(header: string): void;
|
|
24
|
-
static styledJSON(obj: unknown): void;
|
|
25
|
-
static styledObject(obj: any, keys?: string[]): void;
|
|
26
|
-
static get table(): typeof styled.Table.table;
|
|
27
|
-
static trace(format: string, ...args: string[]): void;
|
|
28
|
-
static get tree(): typeof styled.tree;
|
|
29
|
-
static url(text: string, uri: string, params?: {}): void;
|
|
30
|
-
static get wait(): typeof uxWait;
|
|
31
|
-
}
|
|
32
|
-
declare const action: ActionBase, annotation: typeof ux.annotation, anykey: typeof uxPrompt.anykey, confirm: typeof uxPrompt.confirm, debug: typeof ux.debug, done: typeof ux.done, flush: typeof ux.flush, info: typeof ux.info, log: typeof ux.log, logToStderr: typeof ux.logToStderr, progress: typeof styled.progress, prompt: typeof uxPrompt.prompt, styledHeader: typeof ux.styledHeader, styledJSON: typeof ux.styledJSON, styledObject: typeof ux.styledObject, table: typeof styled.Table.table, trace: typeof ux.trace, tree: typeof styled.tree, url: typeof ux.url, wait: (ms?: number) => Promise<void>;
|
|
33
|
-
declare const error: typeof Errors.error, exit: typeof Errors.exit, warn: typeof Errors.warn;
|
|
34
|
-
export {
|
|
35
|
-
/**
|
|
36
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
37
|
-
*/
|
|
38
|
-
action,
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
41
|
-
*/
|
|
42
|
-
annotation,
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
45
|
-
*/
|
|
46
|
-
anykey,
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
49
|
-
*/
|
|
50
|
-
confirm,
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
53
|
-
*/
|
|
54
|
-
debug,
|
|
55
|
-
/**
|
|
56
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
57
|
-
*/
|
|
58
|
-
done,
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
61
|
-
*/
|
|
62
|
-
error,
|
|
63
|
-
/**
|
|
64
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
65
|
-
*/
|
|
66
|
-
exit,
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
69
|
-
*/
|
|
70
|
-
flush,
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
73
|
-
*/
|
|
74
|
-
info,
|
|
75
|
-
/**
|
|
76
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
77
|
-
*/
|
|
78
|
-
log,
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
81
|
-
*/
|
|
82
|
-
logToStderr,
|
|
83
|
-
/**
|
|
84
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
85
|
-
*/
|
|
86
|
-
progress,
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
89
|
-
*/
|
|
90
|
-
prompt,
|
|
91
|
-
/**
|
|
92
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
93
|
-
*/
|
|
94
|
-
styledHeader,
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
97
|
-
*/
|
|
98
|
-
styledJSON,
|
|
99
|
-
/**
|
|
100
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
101
|
-
*/
|
|
102
|
-
styledObject,
|
|
103
|
-
/**
|
|
104
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
105
|
-
*/
|
|
106
|
-
table,
|
|
107
|
-
/**
|
|
108
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
109
|
-
*/
|
|
110
|
-
trace,
|
|
111
|
-
/**
|
|
112
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
113
|
-
*/
|
|
114
|
-
tree,
|
|
115
|
-
/**
|
|
116
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
117
|
-
*/
|
|
118
|
-
url,
|
|
119
|
-
/**
|
|
120
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
121
|
-
*/
|
|
122
|
-
wait,
|
|
123
|
-
/**
|
|
124
|
-
* @deprecated `ux` will be removed in the next major. See https://github.com/oclif/core/discussions/999
|
|
125
|
-
*/
|
|
126
|
-
warn, };
|
|
127
|
-
export { ActionBase } from './action/base';
|
|
128
|
-
export { Config, config } from './config';
|
|
129
|
-
export { ExitError } from './exit';
|
|
130
|
-
export { IPromptOptions } from './prompt';
|
|
131
|
-
export { Table } from './styled';
|
|
132
|
-
export { colorize } from './theme';
|
|
133
|
-
export { default as write } from './write';
|