Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhihua committed Mar 24, 2023
1 parent 2cdf808 commit d0f0c30
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions packages/prompts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -607,21 +607,12 @@ const frames = unicode ? ['◒', '◐', '◓', '◑'] : ['•', 'o', 'O', '0'];
export const spinner = () => {
let unblock: () => void;
let loop: NodeJS.Timer;
<<<<<<< HEAD
let message = ''
const delay = unicode ? 80 : 120;
return {
start(msg = '') {
this.message(msg)
message = _message.replace(/\.?\.?\.$/, '');
=======
let message = '';
const delay = unicode ? 80 : 120;
return {
start(msg = '') {
this.message(msg);
message = message.replace(/\.?\.?\.$/, '');
>>>>>>> main
unblock = block();
process.stdout.write(`${color.gray(S_BAR)}\n${color.magenta('○')} ${message}\n`);
let i = 0;
Expand All @@ -639,17 +630,10 @@ export const spinner = () => {
}, delay);
},
message(msg = '') {
<<<<<<< HEAD
message = msg ?? message
},
stop(msg = '') {
this.message(msg)
=======
message = msg ?? message;
},
stop(msg = '') {
this.message(msg);
>>>>>>> main
process.stdout.write(cursor.move(-999, -2));
process.stdout.write(erase.down(2));
clearInterval(loop);
Expand Down

0 comments on commit d0f0c30

Please sign in to comment.