mirror of
https://github.com/caprover/caprover
synced 2026-08-13 11:10:55 +00:00
30 lines
375 B
JavaScript
30 lines
375 B
JavaScript
const ora = require("ora")
|
|
|
|
class SpinnerHelper {
|
|
constructor() {
|
|
this.spinner
|
|
}
|
|
|
|
setColor(color) {
|
|
this.spinner.color = color
|
|
}
|
|
|
|
start(message) {
|
|
this.spinner = ora(message).start()
|
|
}
|
|
|
|
stop() {
|
|
this.spinner.stop()
|
|
}
|
|
|
|
succeed() {
|
|
this.spinner.succeed()
|
|
}
|
|
|
|
fail() {
|
|
this.spinner.fail()
|
|
}
|
|
}
|
|
|
|
module.exports = new SpinnerHelper()
|