25 lines
585 B
TypeScript
Executable File
25 lines
585 B
TypeScript
Executable File
#!/usr/bin/env -S deno run --allow-all
|
|
|
|
/**
|
|
* uptime.link runner agent.
|
|
*
|
|
* The runner connects to an uptime.link instance, fetches assigned check jobs,
|
|
* executes them from the local network location, and reports results back.
|
|
*/
|
|
|
|
import { UptimeRunnerCli } from './ts/cli.ts';
|
|
|
|
async function main(): Promise<void> {
|
|
const cli = new UptimeRunnerCli();
|
|
await cli.parseAndExecute(Deno.args);
|
|
}
|
|
|
|
if (import.meta.main) {
|
|
try {
|
|
await main();
|
|
} catch (error) {
|
|
console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
Deno.exit(1);
|
|
}
|
|
}
|