@fdm-monster/server
Version:
FDM Monster is a bulk OctoPrint, Klipper, PrusaLink and BambuLab manager to set up, configure and monitor 3D printers. Our aim is to provide neat overview over your farm.
22 lines (21 loc) • 864 B
JavaScript
import { AppConstants } from "../server.constants.js";
//#region src/tasks/client-bundle.task.ts
var ClientDistDownloadTask = class ClientDistDownloadTask {
logger;
constructor(loggerFactory, clientBundleService) {
this.clientBundleService = clientBundleService;
this.logger = loggerFactory(ClientDistDownloadTask.name);
}
async run() {
const result = await this.clientBundleService.shouldUpdateWithReason(false, AppConstants.defaultClientMinimum);
if (!result.shouldUpdate) {
this.logger.log(`Client bundle update skipped. Reason: ${result.reason}`);
return;
}
this.logger.log(`Client bundle update required. Reason for updating: ${result.reason}`);
await this.clientBundleService.downloadClientUpdate(AppConstants.defaultClientMinimum);
}
};
//#endregion
export { ClientDistDownloadTask };
//# sourceMappingURL=client-bundle.task.js.map