This commit is contained in:
Benjamin Toby
2025-07-15 10:02:20 +01:00
parent 8865292893
commit a71614cb0f
18 changed files with 99 additions and 34 deletions
+3 -3
View File
@@ -72,16 +72,16 @@ function watchFiles(_a) {
fs_1.default.watchFile(filePath, {
interval: interval || 200,
}, (curr, prev) => {
if (global.SYNCING)
if (fs_1.default.existsSync(global.SYNCING_FILE))
return;
const INTERVAL = (options === null || options === void 0 ? void 0 : options.interval)
? options.interval
: UPDATE_TIMEOUT;
clearTimeout(timeout);
timeout = setTimeout(() => {
global.SYNCING = true;
fs_1.default.writeFileSync(global.SYNCING_FILE, `SYNCING FILE: curr:${curr} :: prev:${prev}`);
sync({ options, filePath, files });
process.exit(1);
process.exit(global.SYNC_SUCCESS_EXIT_CODE);
}, INTERVAL);
});
}