Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
id: update.id,
builder: update.builder,
target: update.target,
status: update.status || '',
name: (
(update.target ? _targetStringFromTarget(update.target) : update.builder.name) +
' '.repeat(80)
).substr(0, 40),
};
if (update.status !== undefined) {
data.status = update.status;
}
switch (update.state) {
case BuilderProgressState.Error:
data.status = 'Error: ' + update.error;
bars.update(update.id, data);
break;
case BuilderProgressState.Stopped:
data.status = 'Done.';
bars.complete(update.id);
bars.update(update.id, data, update.total, update.total);
break;
case BuilderProgressState.Waiting:
bars.update(update.id, data);
break;
case BuilderProgressState.Running:
bars.update(update.id, data, update.current, update.total);