How to use the cli-spinners.dots.interval function in cli-spinners

To help you get started, we’ve selected a few cli-spinners examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github musically-ut / appreciate / cli.js View on Github external
});

            spinnerNames.sort();

            const maxPadding = Math.max.apply(
                null,
                spinnerNames.map(x => {
                    return x.length;
                })
            );

            const multiSpinners = new Multispinner(spinnerNames, {
                clear: false,
                autoStart: true,
                frames: dotsSpinner.frames,
                interval: dotsSpinner.interval
            });

            let allModuleInfos = uniqueModuleInfos.map(x => {
                return makeTask(token, x, multiSpinners, maxPadding);
            });

            // Place checking for musically-ut/appreciate at the top of the
            // list for recovery afterwards.
            allModuleInfos.unshift(checkIsAppreciateAppreciated(token, multiSpinners));

            return Promise.all(allModuleInfos);
        })
        .then(allModuleInfosResolved => {
github moneyhub / navy / packages / navy / src / cli / updates.js View on Github external
}

    draw()
  }

  const spinner = setInterval(() => {
    spinnerIndex++

    if (spinnerIndex >= dots.frames.length) {
      spinnerIndex = 0
    }

    spinnerFrame = dots.frames[spinnerIndex]

    redraw()
  }, dots.interval)

  draw()

  await Promise.all(ps.map(async service => {
    try {
      if (!service || !service.raw || !service.raw.Image) {
        return updateStatus[service.id] = 'NO_IMAGE'
      }

      updateStatus[service.id] = await hasUpdate(service.image, service.raw.Image, navyFile)
    } catch (ex) {
      debug('Error checking update for', service.name, ex.stack || ex.message)
      updateStatus[service.id] = 'UNKNOWN_ERROR'
    }
  }))
github moneyhub / navy / packages / navy / src / driver-logging.js View on Github external
export function startDriverLogging(message: string) {
  _isDriverLogging = true
  _message = message

  _redraw()

  _spinnerInterval = setInterval(() => {
    _spinnerIndex++

    if (_spinnerIndex >= dots.frames.length) {
      _spinnerIndex = 0
    }

    _redraw()
  }, dots.interval)
}
github bs-community / blessing-skin-server / resources / assets / src / scripts / cli / Spinner.ts View on Github external
start(message = '') {
    this.timerId = window.setInterval(() => {
      this.index += 1
      this.index %= dots.frames.length

      this.stdio.reset()
      this.stdio.print(`${dots.frames[this.index]} ${message}`)
    }, dots.interval)
  }
github SBoudrias / Inquirer.js / packages / core / index.js View on Github external
startLoading() {
    this.setState({ loadingIncrement: 0, status: 'loading' });
    setTimeout(this.onLoaderTick, spinner.interval);
  }