Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
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 => {
}
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'
}
}))
export function startDriverLogging(message: string) {
_isDriverLogging = true
_message = message
_redraw()
_spinnerInterval = setInterval(() => {
_spinnerIndex++
if (_spinnerIndex >= dots.frames.length) {
_spinnerIndex = 0
}
_redraw()
}, dots.interval)
}
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)
}
startLoading() {
this.setState({ loadingIncrement: 0, status: 'loading' });
setTimeout(this.onLoaderTick, spinner.interval);
}