@floomhq/floom 1.0.28 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +6 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -654,7 +654,7 @@ function sleep(ms, signal) {
|
|
|
654
654
|
}, { once: true });
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
|
-
async function watch(intervalSeconds) {
|
|
657
|
+
async function watch(intervalSeconds, target, once) {
|
|
658
658
|
const cfg = await readConfig();
|
|
659
659
|
if (!cfg) {
|
|
660
660
|
throw new FloomError("Not signed in.", `Run \`${CLI_COMMAND} login\` before \`${CLI_COMMAND} watch\`, or use \`${CLI_COMMAND} add <link>\` without an account.`);
|
|
@@ -671,9 +671,11 @@ async function watch(intervalSeconds) {
|
|
|
671
671
|
};
|
|
672
672
|
process.on("SIGINT", stop);
|
|
673
673
|
process.on("SIGTERM", stop);
|
|
674
|
-
process.stdout.write(`${symbols.bullet} Watching Floom sync every ${intervalSeconds}s. Press Ctrl-C to stop.\n`);
|
|
674
|
+
process.stdout.write(`${symbols.bullet} Watching Floom sync for ${target} every ${intervalSeconds}s. Press Ctrl-C to stop.\n`);
|
|
675
675
|
while (!controller.signal.aborted) {
|
|
676
|
-
await sync({ spinner: false, quietUnchanged: true });
|
|
676
|
+
await sync({ spinner: false, quietUnchanged: true, target });
|
|
677
|
+
if (once)
|
|
678
|
+
return;
|
|
677
679
|
await sleep(intervalSeconds * 1000, controller.signal);
|
|
678
680
|
}
|
|
679
681
|
}
|
|
@@ -827,7 +829,7 @@ async function main() {
|
|
|
827
829
|
});
|
|
828
830
|
return;
|
|
829
831
|
}
|
|
830
|
-
await watch(flags.intervalSeconds);
|
|
832
|
+
await watch(flags.intervalSeconds, flags.target, flags.once);
|
|
831
833
|
return;
|
|
832
834
|
}
|
|
833
835
|
case "delete":
|