Files
bitvid/tools/fleet/bin/core/wake-wait.mjs
T
2026-10-24 15:42:46 -04:00

17 lines
595 B
JavaScript

#!/usr/bin/env node
// One detached waiter for a busy pane. Started by nudgeMail, not by hand.
import { flag, loadConfig, runningAsMain } from '../lib.mjs';
import { runWakeWait } from './ops.mjs';
if (runningAsMain(import.meta.url)) {
const c = loadConfig();
runWakeWait(c, {
area: flag(process.argv, '--area'),
from: flag(process.argv, '--from') || 'fleet',
file: flag(process.argv, '--file') || '',
pollMs: Number(flag(process.argv, '--poll-ms')) || 0,
maxMs: Number(flag(process.argv, '--max-ms')) || 0,
enterOnly: process.argv.includes('--enter-only'),
});
}