@nice-move/cli 0.11.0 → 0.11.2

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.
@@ -1,1124 +0,0 @@
1
- export const id = "vendors-node_modules_log-update_index_js";
2
- export const ids = ["vendors-node_modules_log-update_index_js"];
3
- export const modules = {
4
-
5
- /***/ "../../node_modules/restore-cursor/node_modules/mimic-fn/index.js":
6
- /*!************************************************************************!*\
7
- !*** ../../node_modules/restore-cursor/node_modules/mimic-fn/index.js ***!
8
- \************************************************************************/
9
- /***/ ((module) => {
10
-
11
-
12
-
13
- const mimicFn = (to, from) => {
14
- for (const prop of Reflect.ownKeys(from)) {
15
- Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
16
- }
17
-
18
- return to;
19
- };
20
-
21
- module.exports = mimicFn;
22
- // TODO: Remove this for the next major release
23
- module.exports["default"] = mimicFn;
24
-
25
-
26
- /***/ }),
27
-
28
- /***/ "../../node_modules/restore-cursor/node_modules/onetime/index.js":
29
- /*!***********************************************************************!*\
30
- !*** ../../node_modules/restore-cursor/node_modules/onetime/index.js ***!
31
- \***********************************************************************/
32
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
33
-
34
-
35
- const mimicFn = __webpack_require__(/*! mimic-fn */ "../../node_modules/restore-cursor/node_modules/mimic-fn/index.js");
36
-
37
- const calledFunctions = new WeakMap();
38
-
39
- const onetime = (function_, options = {}) => {
40
- if (typeof function_ !== 'function') {
41
- throw new TypeError('Expected a function');
42
- }
43
-
44
- let returnValue;
45
- let callCount = 0;
46
- const functionName = function_.displayName || function_.name || '<anonymous>';
47
-
48
- const onetime = function (...arguments_) {
49
- calledFunctions.set(onetime, ++callCount);
50
-
51
- if (callCount === 1) {
52
- returnValue = function_.apply(this, arguments_);
53
- function_ = null;
54
- } else if (options.throw === true) {
55
- throw new Error(`Function \`${functionName}\` can only be called once`);
56
- }
57
-
58
- return returnValue;
59
- };
60
-
61
- mimicFn(onetime, function_);
62
- calledFunctions.set(onetime, callCount);
63
-
64
- return onetime;
65
- };
66
-
67
- module.exports = onetime;
68
- // TODO: Remove this for the next major release
69
- module.exports["default"] = onetime;
70
-
71
- module.exports.callCount = function_ => {
72
- if (!calledFunctions.has(function_)) {
73
- throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
74
- }
75
-
76
- return calledFunctions.get(function_);
77
- };
78
-
79
-
80
- /***/ }),
81
-
82
- /***/ "../../node_modules/restore-cursor/node_modules/signal-exit/index.js":
83
- /*!***************************************************************************!*\
84
- !*** ../../node_modules/restore-cursor/node_modules/signal-exit/index.js ***!
85
- \***************************************************************************/
86
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
87
-
88
- // Note: since nyc uses this module to output coverage, any lines
89
- // that are in the direct sync flow of nyc's outputCoverage are
90
- // ignored, since we can never get coverage for them.
91
- // grab a reference to node's real process object right away
92
- var process = global.process
93
-
94
- const processOk = function (process) {
95
- return process &&
96
- typeof process === 'object' &&
97
- typeof process.removeListener === 'function' &&
98
- typeof process.emit === 'function' &&
99
- typeof process.reallyExit === 'function' &&
100
- typeof process.listeners === 'function' &&
101
- typeof process.kill === 'function' &&
102
- typeof process.pid === 'number' &&
103
- typeof process.on === 'function'
104
- }
105
-
106
- // some kind of non-node environment, just no-op
107
- /* istanbul ignore if */
108
- if (!processOk(process)) {
109
- module.exports = function () {
110
- return function () {}
111
- }
112
- } else {
113
- var assert = __webpack_require__(/*! assert */ "assert")
114
- var signals = __webpack_require__(/*! ./signals.js */ "../../node_modules/restore-cursor/node_modules/signal-exit/signals.js")
115
- var isWin = /^win/i.test(process.platform)
116
-
117
- var EE = __webpack_require__(/*! events */ "events")
118
- /* istanbul ignore if */
119
- if (typeof EE !== 'function') {
120
- EE = EE.EventEmitter
121
- }
122
-
123
- var emitter
124
- if (process.__signal_exit_emitter__) {
125
- emitter = process.__signal_exit_emitter__
126
- } else {
127
- emitter = process.__signal_exit_emitter__ = new EE()
128
- emitter.count = 0
129
- emitter.emitted = {}
130
- }
131
-
132
- // Because this emitter is a global, we have to check to see if a
133
- // previous version of this library failed to enable infinite listeners.
134
- // I know what you're about to say. But literally everything about
135
- // signal-exit is a compromise with evil. Get used to it.
136
- if (!emitter.infinite) {
137
- emitter.setMaxListeners(Infinity)
138
- emitter.infinite = true
139
- }
140
-
141
- module.exports = function (cb, opts) {
142
- /* istanbul ignore if */
143
- if (!processOk(global.process)) {
144
- return function () {}
145
- }
146
- assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
147
-
148
- if (loaded === false) {
149
- load()
150
- }
151
-
152
- var ev = 'exit'
153
- if (opts && opts.alwaysLast) {
154
- ev = 'afterexit'
155
- }
156
-
157
- var remove = function () {
158
- emitter.removeListener(ev, cb)
159
- if (emitter.listeners('exit').length === 0 &&
160
- emitter.listeners('afterexit').length === 0) {
161
- unload()
162
- }
163
- }
164
- emitter.on(ev, cb)
165
-
166
- return remove
167
- }
168
-
169
- var unload = function unload () {
170
- if (!loaded || !processOk(global.process)) {
171
- return
172
- }
173
- loaded = false
174
-
175
- signals.forEach(function (sig) {
176
- try {
177
- process.removeListener(sig, sigListeners[sig])
178
- } catch (er) {}
179
- })
180
- process.emit = originalProcessEmit
181
- process.reallyExit = originalProcessReallyExit
182
- emitter.count -= 1
183
- }
184
- module.exports.unload = unload
185
-
186
- var emit = function emit (event, code, signal) {
187
- /* istanbul ignore if */
188
- if (emitter.emitted[event]) {
189
- return
190
- }
191
- emitter.emitted[event] = true
192
- emitter.emit(event, code, signal)
193
- }
194
-
195
- // { <signal>: <listener fn>, ... }
196
- var sigListeners = {}
197
- signals.forEach(function (sig) {
198
- sigListeners[sig] = function listener () {
199
- /* istanbul ignore if */
200
- if (!processOk(global.process)) {
201
- return
202
- }
203
- // If there are no other listeners, an exit is coming!
204
- // Simplest way: remove us and then re-send the signal.
205
- // We know that this will kill the process, so we can
206
- // safely emit now.
207
- var listeners = process.listeners(sig)
208
- if (listeners.length === emitter.count) {
209
- unload()
210
- emit('exit', null, sig)
211
- /* istanbul ignore next */
212
- emit('afterexit', null, sig)
213
- /* istanbul ignore next */
214
- if (isWin && sig === 'SIGHUP') {
215
- // "SIGHUP" throws an `ENOSYS` error on Windows,
216
- // so use a supported signal instead
217
- sig = 'SIGINT'
218
- }
219
- /* istanbul ignore next */
220
- process.kill(process.pid, sig)
221
- }
222
- }
223
- })
224
-
225
- module.exports.signals = function () {
226
- return signals
227
- }
228
-
229
- var loaded = false
230
-
231
- var load = function load () {
232
- if (loaded || !processOk(global.process)) {
233
- return
234
- }
235
- loaded = true
236
-
237
- // This is the number of onSignalExit's that are in play.
238
- // It's important so that we can count the correct number of
239
- // listeners on signals, and don't wait for the other one to
240
- // handle it instead of us.
241
- emitter.count += 1
242
-
243
- signals = signals.filter(function (sig) {
244
- try {
245
- process.on(sig, sigListeners[sig])
246
- return true
247
- } catch (er) {
248
- return false
249
- }
250
- })
251
-
252
- process.emit = processEmit
253
- process.reallyExit = processReallyExit
254
- }
255
- module.exports.load = load
256
-
257
- var originalProcessReallyExit = process.reallyExit
258
- var processReallyExit = function processReallyExit (code) {
259
- /* istanbul ignore if */
260
- if (!processOk(global.process)) {
261
- return
262
- }
263
- process.exitCode = code || /* istanbul ignore next */ 0
264
- emit('exit', process.exitCode, null)
265
- /* istanbul ignore next */
266
- emit('afterexit', process.exitCode, null)
267
- /* istanbul ignore next */
268
- originalProcessReallyExit.call(process, process.exitCode)
269
- }
270
-
271
- var originalProcessEmit = process.emit
272
- var processEmit = function processEmit (ev, arg) {
273
- if (ev === 'exit' && processOk(global.process)) {
274
- /* istanbul ignore else */
275
- if (arg !== undefined) {
276
- process.exitCode = arg
277
- }
278
- var ret = originalProcessEmit.apply(this, arguments)
279
- /* istanbul ignore next */
280
- emit('exit', process.exitCode, null)
281
- /* istanbul ignore next */
282
- emit('afterexit', process.exitCode, null)
283
- /* istanbul ignore next */
284
- return ret
285
- } else {
286
- return originalProcessEmit.apply(this, arguments)
287
- }
288
- }
289
- }
290
-
291
-
292
- /***/ }),
293
-
294
- /***/ "../../node_modules/restore-cursor/node_modules/signal-exit/signals.js":
295
- /*!*****************************************************************************!*\
296
- !*** ../../node_modules/restore-cursor/node_modules/signal-exit/signals.js ***!
297
- \*****************************************************************************/
298
- /***/ ((module) => {
299
-
300
- // This is not the set of all possible signals.
301
- //
302
- // It IS, however, the set of all signals that trigger
303
- // an exit on either Linux or BSD systems. Linux is a
304
- // superset of the signal names supported on BSD, and
305
- // the unknown signals just fail to register, so we can
306
- // catch that easily enough.
307
- //
308
- // Don't bother with SIGKILL. It's uncatchable, which
309
- // means that we can't fire any callbacks anyway.
310
- //
311
- // If a user does happen to register a handler on a non-
312
- // fatal signal like SIGWINCH or something, and then
313
- // exit, it'll end up firing `process.emit('exit')`, so
314
- // the handler will be fired anyway.
315
- //
316
- // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
317
- // artificially, inherently leave the process in a
318
- // state from which it is not safe to try and enter JS
319
- // listeners.
320
- module.exports = [
321
- 'SIGABRT',
322
- 'SIGALRM',
323
- 'SIGHUP',
324
- 'SIGINT',
325
- 'SIGTERM'
326
- ]
327
-
328
- if (process.platform !== 'win32') {
329
- module.exports.push(
330
- 'SIGVTALRM',
331
- 'SIGXCPU',
332
- 'SIGXFSZ',
333
- 'SIGUSR2',
334
- 'SIGTRAP',
335
- 'SIGSYS',
336
- 'SIGQUIT',
337
- 'SIGIOT'
338
- // should detect profiler and enable/disable accordingly.
339
- // see #21
340
- // 'SIGPROF'
341
- )
342
- }
343
-
344
- if (process.platform === 'linux') {
345
- module.exports.push(
346
- 'SIGIO',
347
- 'SIGPOLL',
348
- 'SIGPWR',
349
- 'SIGSTKFLT',
350
- 'SIGUNUSED'
351
- )
352
- }
353
-
354
-
355
- /***/ }),
356
-
357
- /***/ "../../node_modules/cli-cursor/index.js":
358
- /*!**********************************************!*\
359
- !*** ../../node_modules/cli-cursor/index.js ***!
360
- \**********************************************/
361
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
362
-
363
- __webpack_require__.r(__webpack_exports__);
364
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
365
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
366
- /* harmony export */ });
367
- /* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ "node:process");
368
- /* harmony import */ var restore_cursor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! restore-cursor */ "../../node_modules/restore-cursor/index.js");
369
-
370
-
371
-
372
- let isHidden = false;
373
-
374
- const cliCursor = {};
375
-
376
- cliCursor.show = (writableStream = node_process__WEBPACK_IMPORTED_MODULE_0__.stderr) => {
377
- if (!writableStream.isTTY) {
378
- return;
379
- }
380
-
381
- isHidden = false;
382
- writableStream.write('\u001B[?25h');
383
- };
384
-
385
- cliCursor.hide = (writableStream = node_process__WEBPACK_IMPORTED_MODULE_0__.stderr) => {
386
- if (!writableStream.isTTY) {
387
- return;
388
- }
389
-
390
- (0,restore_cursor__WEBPACK_IMPORTED_MODULE_1__["default"])();
391
- isHidden = true;
392
- writableStream.write('\u001B[?25l');
393
- };
394
-
395
- cliCursor.toggle = (force, writableStream) => {
396
- if (force !== undefined) {
397
- isHidden = force;
398
- }
399
-
400
- if (isHidden) {
401
- cliCursor.show(writableStream);
402
- } else {
403
- cliCursor.hide(writableStream);
404
- }
405
- };
406
-
407
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cliCursor);
408
-
409
-
410
- /***/ }),
411
-
412
- /***/ "../../node_modules/is-fullwidth-code-point/index.js":
413
- /*!***********************************************************!*\
414
- !*** ../../node_modules/is-fullwidth-code-point/index.js ***!
415
- \***********************************************************/
416
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
417
-
418
- __webpack_require__.r(__webpack_exports__);
419
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
420
- /* harmony export */ "default": () => (/* binding */ isFullwidthCodePoint)
421
- /* harmony export */ });
422
- /* eslint-disable yoda */
423
-
424
- function isFullwidthCodePoint(codePoint) {
425
- if (!Number.isInteger(codePoint)) {
426
- return false;
427
- }
428
-
429
- // Code points are derived from:
430
- // https://unicode.org/Public/UNIDATA/EastAsianWidth.txt
431
- return codePoint >= 0x1100 && (
432
- codePoint <= 0x115F || // Hangul Jamo
433
- codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET
434
- codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET
435
- // CJK Radicals Supplement .. Enclosed CJK Letters and Months
436
- (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) ||
437
- // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
438
- (0x3250 <= codePoint && codePoint <= 0x4DBF) ||
439
- // CJK Unified Ideographs .. Yi Radicals
440
- (0x4E00 <= codePoint && codePoint <= 0xA4C6) ||
441
- // Hangul Jamo Extended-A
442
- (0xA960 <= codePoint && codePoint <= 0xA97C) ||
443
- // Hangul Syllables
444
- (0xAC00 <= codePoint && codePoint <= 0xD7A3) ||
445
- // CJK Compatibility Ideographs
446
- (0xF900 <= codePoint && codePoint <= 0xFAFF) ||
447
- // Vertical Forms
448
- (0xFE10 <= codePoint && codePoint <= 0xFE19) ||
449
- // CJK Compatibility Forms .. Small Form Variants
450
- (0xFE30 <= codePoint && codePoint <= 0xFE6B) ||
451
- // Halfwidth and Fullwidth Forms
452
- (0xFF01 <= codePoint && codePoint <= 0xFF60) ||
453
- (0xFFE0 <= codePoint && codePoint <= 0xFFE6) ||
454
- // Kana Supplement
455
- (0x1B000 <= codePoint && codePoint <= 0x1B001) ||
456
- // Enclosed Ideographic Supplement
457
- (0x1F200 <= codePoint && codePoint <= 0x1F251) ||
458
- // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
459
- (0x20000 <= codePoint && codePoint <= 0x3FFFD)
460
- );
461
- }
462
-
463
-
464
- /***/ }),
465
-
466
- /***/ "../../node_modules/log-update/index.js":
467
- /*!**********************************************!*\
468
- !*** ../../node_modules/log-update/index.js ***!
469
- \**********************************************/
470
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
471
-
472
- __webpack_require__.r(__webpack_exports__);
473
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
474
- /* harmony export */ createLogUpdate: () => (/* binding */ createLogUpdate),
475
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
476
- /* harmony export */ logUpdateStderr: () => (/* binding */ logUpdateStderr)
477
- /* harmony export */ });
478
- /* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ "node:process");
479
- /* harmony import */ var ansi_escapes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ansi-escapes */ "../../node_modules/log-update/node_modules/ansi-escapes/index.js");
480
- /* harmony import */ var cli_cursor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cli-cursor */ "../../node_modules/cli-cursor/index.js");
481
- /* harmony import */ var wrap_ansi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! wrap-ansi */ "../../node_modules/log-update/node_modules/wrap-ansi/index.js");
482
- /* harmony import */ var slice_ansi__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! slice-ansi */ "../../node_modules/slice-ansi/index.js");
483
- /* harmony import */ var strip_ansi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! strip-ansi */ "../../node_modules/strip-ansi/index.js");
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
- const defaultTerminalHeight = 24;
492
-
493
- const getWidth = stream => {
494
- const {columns} = stream;
495
-
496
- if (!columns) {
497
- return 80;
498
- }
499
-
500
- return columns;
501
- };
502
-
503
- const fitToTerminalHeight = (stream, text) => {
504
- const terminalHeight = stream.rows || defaultTerminalHeight;
505
- const lines = text.split('\n');
506
-
507
- const toRemove = lines.length - terminalHeight;
508
- if (toRemove <= 0) {
509
- return text;
510
- }
511
-
512
- return (0,slice_ansi__WEBPACK_IMPORTED_MODULE_4__["default"])(
513
- text,
514
- (0,strip_ansi__WEBPACK_IMPORTED_MODULE_5__["default"])(lines.slice(0, toRemove).join('\n')).length + 1,
515
- );
516
- };
517
-
518
- function createLogUpdate(stream, {showCursor = false} = {}) {
519
- let previousLineCount = 0;
520
- let previousWidth = getWidth(stream);
521
- let previousOutput = '';
522
-
523
- const render = (...arguments_) => {
524
- if (!showCursor) {
525
- cli_cursor__WEBPACK_IMPORTED_MODULE_2__["default"].hide();
526
- }
527
-
528
- let output = arguments_.join(' ') + '\n';
529
- output = fitToTerminalHeight(stream, output);
530
- const width = getWidth(stream);
531
- if (output === previousOutput && previousWidth === width) {
532
- return;
533
- }
534
-
535
- previousOutput = output;
536
- previousWidth = width;
537
- output = (0,wrap_ansi__WEBPACK_IMPORTED_MODULE_3__["default"])(output, width, {
538
- trim: false,
539
- hard: true,
540
- wordWrap: false,
541
- });
542
- stream.write(ansi_escapes__WEBPACK_IMPORTED_MODULE_1__["default"].eraseLines(previousLineCount) + output);
543
- previousLineCount = output.split('\n').length;
544
- };
545
-
546
- render.clear = () => {
547
- stream.write(ansi_escapes__WEBPACK_IMPORTED_MODULE_1__["default"].eraseLines(previousLineCount));
548
- previousOutput = '';
549
- previousWidth = getWidth(stream);
550
- previousLineCount = 0;
551
- };
552
-
553
- render.done = () => {
554
- previousOutput = '';
555
- previousWidth = getWidth(stream);
556
- previousLineCount = 0;
557
-
558
- if (!showCursor) {
559
- cli_cursor__WEBPACK_IMPORTED_MODULE_2__["default"].show();
560
- }
561
- };
562
-
563
- return render;
564
- }
565
-
566
- const logUpdate = createLogUpdate(node_process__WEBPACK_IMPORTED_MODULE_0__.stdout);
567
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (logUpdate);
568
-
569
- const logUpdateStderr = createLogUpdate(node_process__WEBPACK_IMPORTED_MODULE_0__.stderr);
570
-
571
-
572
- /***/ }),
573
-
574
- /***/ "../../node_modules/log-update/node_modules/ansi-escapes/index.js":
575
- /*!************************************************************************!*\
576
- !*** ../../node_modules/log-update/node_modules/ansi-escapes/index.js ***!
577
- \************************************************************************/
578
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
579
-
580
- __webpack_require__.r(__webpack_exports__);
581
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
582
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
583
- /* harmony export */ });
584
- const ESC = '\u001B[';
585
- const OSC = '\u001B]';
586
- const BEL = '\u0007';
587
- const SEP = ';';
588
- const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal';
589
-
590
- const ansiEscapes = {};
591
-
592
- ansiEscapes.cursorTo = (x, y) => {
593
- if (typeof x !== 'number') {
594
- throw new TypeError('The `x` argument is required');
595
- }
596
-
597
- if (typeof y !== 'number') {
598
- return ESC + (x + 1) + 'G';
599
- }
600
-
601
- return ESC + (y + 1) + ';' + (x + 1) + 'H';
602
- };
603
-
604
- ansiEscapes.cursorMove = (x, y) => {
605
- if (typeof x !== 'number') {
606
- throw new TypeError('The `x` argument is required');
607
- }
608
-
609
- let returnValue = '';
610
-
611
- if (x < 0) {
612
- returnValue += ESC + (-x) + 'D';
613
- } else if (x > 0) {
614
- returnValue += ESC + x + 'C';
615
- }
616
-
617
- if (y < 0) {
618
- returnValue += ESC + (-y) + 'A';
619
- } else if (y > 0) {
620
- returnValue += ESC + y + 'B';
621
- }
622
-
623
- return returnValue;
624
- };
625
-
626
- ansiEscapes.cursorUp = (count = 1) => ESC + count + 'A';
627
- ansiEscapes.cursorDown = (count = 1) => ESC + count + 'B';
628
- ansiEscapes.cursorForward = (count = 1) => ESC + count + 'C';
629
- ansiEscapes.cursorBackward = (count = 1) => ESC + count + 'D';
630
-
631
- ansiEscapes.cursorLeft = ESC + 'G';
632
- ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
633
- ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
634
- ansiEscapes.cursorGetPosition = ESC + '6n';
635
- ansiEscapes.cursorNextLine = ESC + 'E';
636
- ansiEscapes.cursorPrevLine = ESC + 'F';
637
- ansiEscapes.cursorHide = ESC + '?25l';
638
- ansiEscapes.cursorShow = ESC + '?25h';
639
-
640
- ansiEscapes.eraseLines = count => {
641
- let clear = '';
642
-
643
- for (let i = 0; i < count; i++) {
644
- clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
645
- }
646
-
647
- if (count) {
648
- clear += ansiEscapes.cursorLeft;
649
- }
650
-
651
- return clear;
652
- };
653
-
654
- ansiEscapes.eraseEndLine = ESC + 'K';
655
- ansiEscapes.eraseStartLine = ESC + '1K';
656
- ansiEscapes.eraseLine = ESC + '2K';
657
- ansiEscapes.eraseDown = ESC + 'J';
658
- ansiEscapes.eraseUp = ESC + '1J';
659
- ansiEscapes.eraseScreen = ESC + '2J';
660
- ansiEscapes.scrollUp = ESC + 'S';
661
- ansiEscapes.scrollDown = ESC + 'T';
662
-
663
- ansiEscapes.clearScreen = '\u001Bc';
664
-
665
- ansiEscapes.clearTerminal = process.platform === 'win32' ?
666
- `${ansiEscapes.eraseScreen}${ESC}0f` :
667
- // 1. Erases the screen (Only done in case `2` is not supported)
668
- // 2. Erases the whole screen including scrollback buffer
669
- // 3. Moves cursor to the top-left position
670
- // More info: https://www.real-world-systems.com/docs/ANSIcode.html
671
- `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
672
-
673
- ansiEscapes.beep = BEL;
674
-
675
- ansiEscapes.link = (text, url) => {
676
- return [
677
- OSC,
678
- '8',
679
- SEP,
680
- SEP,
681
- url,
682
- BEL,
683
- text,
684
- OSC,
685
- '8',
686
- SEP,
687
- SEP,
688
- BEL
689
- ].join('');
690
- };
691
-
692
- ansiEscapes.image = (buffer, options = {}) => {
693
- let returnValue = `${OSC}1337;File=inline=1`;
694
-
695
- if (options.width) {
696
- returnValue += `;width=${options.width}`;
697
- }
698
-
699
- if (options.height) {
700
- returnValue += `;height=${options.height}`;
701
- }
702
-
703
- if (options.preserveAspectRatio === false) {
704
- returnValue += ';preserveAspectRatio=0';
705
- }
706
-
707
- return returnValue + ':' + buffer.toString('base64') + BEL;
708
- };
709
-
710
- ansiEscapes.iTerm = {
711
- setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
712
-
713
- annotation: (message, options = {}) => {
714
- let returnValue = `${OSC}1337;`;
715
-
716
- const hasX = typeof options.x !== 'undefined';
717
- const hasY = typeof options.y !== 'undefined';
718
- if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== 'undefined')) {
719
- throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
720
- }
721
-
722
- message = message.replace(/\|/g, '');
723
-
724
- returnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
725
-
726
- if (options.length > 0) {
727
- returnValue +=
728
- (hasX ?
729
- [message, options.length, options.x, options.y] :
730
- [options.length, message]).join('|');
731
- } else {
732
- returnValue += message;
733
- }
734
-
735
- return returnValue + BEL;
736
- }
737
- };
738
-
739
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ansiEscapes);
740
-
741
-
742
- /***/ }),
743
-
744
- /***/ "../../node_modules/log-update/node_modules/wrap-ansi/index.js":
745
- /*!*********************************************************************!*\
746
- !*** ../../node_modules/log-update/node_modules/wrap-ansi/index.js ***!
747
- \*********************************************************************/
748
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
749
-
750
- __webpack_require__.r(__webpack_exports__);
751
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
752
- /* harmony export */ "default": () => (/* binding */ wrapAnsi)
753
- /* harmony export */ });
754
- /* harmony import */ var string_width__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! string-width */ "../../node_modules/string-width/index.js");
755
- /* harmony import */ var strip_ansi__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! strip-ansi */ "../../node_modules/strip-ansi/index.js");
756
- /* harmony import */ var ansi_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ansi-styles */ "../../node_modules/ansi-styles/index.js");
757
-
758
-
759
-
760
-
761
- const ESCAPES = new Set([
762
- '\u001B',
763
- '\u009B',
764
- ]);
765
-
766
- const END_CODE = 39;
767
- const ANSI_ESCAPE_BELL = '\u0007';
768
- const ANSI_CSI = '[';
769
- const ANSI_OSC = ']';
770
- const ANSI_SGR_TERMINATOR = 'm';
771
- const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
772
-
773
- const wrapAnsiCode = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
774
- const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
775
-
776
- // Calculate the length of words split on ' ', ignoring
777
- // the extra characters added by ansi escape codes
778
- const wordLengths = string => string.split(' ').map(character => (0,string_width__WEBPACK_IMPORTED_MODULE_0__["default"])(character));
779
-
780
- // Wrap a long word across multiple rows
781
- // Ansi escape codes do not count towards length
782
- const wrapWord = (rows, word, columns) => {
783
- const characters = [...word];
784
-
785
- let isInsideEscape = false;
786
- let isInsideLinkEscape = false;
787
- let visible = (0,string_width__WEBPACK_IMPORTED_MODULE_0__["default"])((0,strip_ansi__WEBPACK_IMPORTED_MODULE_1__["default"])(rows[rows.length - 1]));
788
-
789
- for (const [index, character] of characters.entries()) {
790
- const characterLength = (0,string_width__WEBPACK_IMPORTED_MODULE_0__["default"])(character);
791
-
792
- if (visible + characterLength <= columns) {
793
- rows[rows.length - 1] += character;
794
- } else {
795
- rows.push(character);
796
- visible = 0;
797
- }
798
-
799
- if (ESCAPES.has(character)) {
800
- isInsideEscape = true;
801
- isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK);
802
- }
803
-
804
- if (isInsideEscape) {
805
- if (isInsideLinkEscape) {
806
- if (character === ANSI_ESCAPE_BELL) {
807
- isInsideEscape = false;
808
- isInsideLinkEscape = false;
809
- }
810
- } else if (character === ANSI_SGR_TERMINATOR) {
811
- isInsideEscape = false;
812
- }
813
-
814
- continue;
815
- }
816
-
817
- visible += characterLength;
818
-
819
- if (visible === columns && index < characters.length - 1) {
820
- rows.push('');
821
- visible = 0;
822
- }
823
- }
824
-
825
- // It's possible that the last row we copy over is only
826
- // ansi escape characters, handle this edge-case
827
- if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
828
- rows[rows.length - 2] += rows.pop();
829
- }
830
- };
831
-
832
- // Trims spaces from a string ignoring invisible sequences
833
- const stringVisibleTrimSpacesRight = string => {
834
- const words = string.split(' ');
835
- let last = words.length;
836
-
837
- while (last > 0) {
838
- if ((0,string_width__WEBPACK_IMPORTED_MODULE_0__["default"])(words[last - 1]) > 0) {
839
- break;
840
- }
841
-
842
- last--;
843
- }
844
-
845
- if (last === words.length) {
846
- return string;
847
- }
848
-
849
- return words.slice(0, last).join(' ') + words.slice(last).join('');
850
- };
851
-
852
- // The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode
853
- //
854
- // 'hard' will never allow a string to take up more than columns characters
855
- //
856
- // 'soft' allows long words to expand past the column length
857
- const exec = (string, columns, options = {}) => {
858
- if (options.trim !== false && string.trim() === '') {
859
- return '';
860
- }
861
-
862
- let returnValue = '';
863
- let escapeCode;
864
- let escapeUrl;
865
-
866
- const lengths = wordLengths(string);
867
- let rows = [''];
868
-
869
- for (const [index, word] of string.split(' ').entries()) {
870
- if (options.trim !== false) {
871
- rows[rows.length - 1] = rows[rows.length - 1].trimStart();
872
- }
873
-
874
- let rowLength = (0,string_width__WEBPACK_IMPORTED_MODULE_0__["default"])(rows[rows.length - 1]);
875
-
876
- if (index !== 0) {
877
- if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
878
- // If we start with a new word but the current row length equals the length of the columns, add a new row
879
- rows.push('');
880
- rowLength = 0;
881
- }
882
-
883
- if (rowLength > 0 || options.trim === false) {
884
- rows[rows.length - 1] += ' ';
885
- rowLength++;
886
- }
887
- }
888
-
889
- // In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'
890
- if (options.hard && lengths[index] > columns) {
891
- const remainingColumns = (columns - rowLength);
892
- const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
893
- const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
894
- if (breaksStartingNextLine < breaksStartingThisLine) {
895
- rows.push('');
896
- }
897
-
898
- wrapWord(rows, word, columns);
899
- continue;
900
- }
901
-
902
- if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
903
- if (options.wordWrap === false && rowLength < columns) {
904
- wrapWord(rows, word, columns);
905
- continue;
906
- }
907
-
908
- rows.push('');
909
- }
910
-
911
- if (rowLength + lengths[index] > columns && options.wordWrap === false) {
912
- wrapWord(rows, word, columns);
913
- continue;
914
- }
915
-
916
- rows[rows.length - 1] += word;
917
- }
918
-
919
- if (options.trim !== false) {
920
- rows = rows.map(row => stringVisibleTrimSpacesRight(row));
921
- }
922
-
923
- const pre = [...rows.join('\n')];
924
-
925
- for (const [index, character] of pre.entries()) {
926
- returnValue += character;
927
-
928
- if (ESCAPES.has(character)) {
929
- const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}};
930
- if (groups.code !== undefined) {
931
- const code = Number.parseFloat(groups.code);
932
- escapeCode = code === END_CODE ? undefined : code;
933
- } else if (groups.uri !== undefined) {
934
- escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
935
- }
936
- }
937
-
938
- const code = ansi_styles__WEBPACK_IMPORTED_MODULE_2__["default"].codes.get(Number(escapeCode));
939
-
940
- if (pre[index + 1] === '\n') {
941
- if (escapeUrl) {
942
- returnValue += wrapAnsiHyperlink('');
943
- }
944
-
945
- if (escapeCode && code) {
946
- returnValue += wrapAnsiCode(code);
947
- }
948
- } else if (character === '\n') {
949
- if (escapeCode && code) {
950
- returnValue += wrapAnsiCode(escapeCode);
951
- }
952
-
953
- if (escapeUrl) {
954
- returnValue += wrapAnsiHyperlink(escapeUrl);
955
- }
956
- }
957
- }
958
-
959
- return returnValue;
960
- };
961
-
962
- // For each newline, invoke the method separately
963
- function wrapAnsi(string, columns, options) {
964
- return String(string)
965
- .normalize()
966
- .replace(/\r\n/g, '\n')
967
- .split('\n')
968
- .map(line => exec(line, columns, options))
969
- .join('\n');
970
- }
971
-
972
-
973
- /***/ }),
974
-
975
- /***/ "../../node_modules/restore-cursor/index.js":
976
- /*!**************************************************!*\
977
- !*** ../../node_modules/restore-cursor/index.js ***!
978
- \**************************************************/
979
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
980
-
981
- __webpack_require__.r(__webpack_exports__);
982
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
983
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
984
- /* harmony export */ });
985
- /* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ "node:process");
986
- /* harmony import */ var onetime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! onetime */ "../../node_modules/restore-cursor/node_modules/onetime/index.js");
987
- /* harmony import */ var signal_exit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! signal-exit */ "../../node_modules/restore-cursor/node_modules/signal-exit/index.js");
988
-
989
-
990
-
991
-
992
- const restoreCursor = onetime__WEBPACK_IMPORTED_MODULE_1__(() => {
993
- signal_exit__WEBPACK_IMPORTED_MODULE_2__(() => {
994
- node_process__WEBPACK_IMPORTED_MODULE_0__.stderr.write('\u001B[?25h');
995
- }, {alwaysLast: true});
996
- });
997
-
998
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (restoreCursor);
999
-
1000
-
1001
- /***/ }),
1002
-
1003
- /***/ "../../node_modules/slice-ansi/index.js":
1004
- /*!**********************************************!*\
1005
- !*** ../../node_modules/slice-ansi/index.js ***!
1006
- \**********************************************/
1007
- /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1008
-
1009
- __webpack_require__.r(__webpack_exports__);
1010
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1011
- /* harmony export */ "default": () => (/* binding */ sliceAnsi)
1012
- /* harmony export */ });
1013
- /* harmony import */ var is_fullwidth_code_point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-fullwidth-code-point */ "../../node_modules/is-fullwidth-code-point/index.js");
1014
- /* harmony import */ var ansi_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ansi-styles */ "../../node_modules/ansi-styles/index.js");
1015
-
1016
-
1017
-
1018
- const astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
1019
-
1020
- const ESCAPES = [
1021
- '\u001B',
1022
- '\u009B'
1023
- ];
1024
-
1025
- const wrapAnsi = code => `${ESCAPES[0]}[${code}m`;
1026
-
1027
- const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
1028
- let output = [];
1029
- ansiCodes = [...ansiCodes];
1030
-
1031
- for (let ansiCode of ansiCodes) {
1032
- const ansiCodeOrigin = ansiCode;
1033
- if (ansiCode.includes(';')) {
1034
- ansiCode = ansiCode.split(';')[0][0] + '0';
1035
- }
1036
-
1037
- const item = ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].codes.get(Number.parseInt(ansiCode, 10));
1038
- if (item) {
1039
- const indexEscape = ansiCodes.indexOf(item.toString());
1040
- if (indexEscape === -1) {
1041
- output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
1042
- } else {
1043
- ansiCodes.splice(indexEscape, 1);
1044
- }
1045
- } else if (isEscapes) {
1046
- output.push(wrapAnsi(0));
1047
- break;
1048
- } else {
1049
- output.push(wrapAnsi(ansiCodeOrigin));
1050
- }
1051
- }
1052
-
1053
- if (isEscapes) {
1054
- output = output.filter((element, index) => output.indexOf(element) === index);
1055
-
1056
- if (endAnsiCode !== undefined) {
1057
- const fistEscapeCode = wrapAnsi(ansi_styles__WEBPACK_IMPORTED_MODULE_1__["default"].codes.get(Number.parseInt(endAnsiCode, 10)));
1058
- // TODO: Remove the use of `.reduce` here.
1059
- // eslint-disable-next-line unicorn/no-array-reduce
1060
- output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
1061
- }
1062
- }
1063
-
1064
- return output.join('');
1065
- };
1066
-
1067
- function sliceAnsi(string, begin, end) {
1068
- const characters = [...string];
1069
- const ansiCodes = [];
1070
-
1071
- let stringEnd = typeof end === 'number' ? end : characters.length;
1072
- let isInsideEscape = false;
1073
- let ansiCode;
1074
- let visible = 0;
1075
- let output = '';
1076
-
1077
- for (const [index, character] of characters.entries()) {
1078
- let leftEscape = false;
1079
-
1080
- if (ESCAPES.includes(character)) {
1081
- const code = /\d[^m]*/.exec(string.slice(index, index + 18));
1082
- ansiCode = code && code.length > 0 ? code[0] : undefined;
1083
-
1084
- if (visible < stringEnd) {
1085
- isInsideEscape = true;
1086
-
1087
- if (ansiCode !== undefined) {
1088
- ansiCodes.push(ansiCode);
1089
- }
1090
- }
1091
- } else if (isInsideEscape && character === 'm') {
1092
- isInsideEscape = false;
1093
- leftEscape = true;
1094
- }
1095
-
1096
- if (!isInsideEscape && !leftEscape) {
1097
- visible++;
1098
- }
1099
-
1100
- if (!astralRegex.test(character) && (0,is_fullwidth_code_point__WEBPACK_IMPORTED_MODULE_0__["default"])(character.codePointAt())) {
1101
- visible++;
1102
-
1103
- if (typeof end !== 'number') {
1104
- stringEnd++;
1105
- }
1106
- }
1107
-
1108
- if (visible > begin && visible <= stringEnd) {
1109
- output += character;
1110
- } else if (visible === begin && !isInsideEscape && ansiCode !== undefined) {
1111
- output = checkAnsi(ansiCodes);
1112
- } else if (visible >= stringEnd) {
1113
- output += checkAnsi(ansiCodes, true, ansiCode);
1114
- break;
1115
- }
1116
- }
1117
-
1118
- return output;
1119
- }
1120
-
1121
-
1122
- /***/ })
1123
-
1124
- };