UNPKG

auron

Version:

Interact with your ATProto labeler from your terminal

23 lines (22 loc) 963 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.eventCommand = void 0; const commander_1 = require("commander"); const event_1 = require("../controllers/event"); exports.eventCommand = new commander_1.Command("event"); exports.eventCommand .command("sync") .option("--cursor <string>", "Cursor to start fetching from") .option("-t, --types <items...>", "Only fetch events of these types") .option("--start <string>", "Only fetch events starting from a specific timestamp") .option("--end <string>", "Only fetch events before a specific timestamp") .description("Fetch your ozone events and store it in the local database") .action(async (options) => { const subjects = await (0, event_1.fetchEvents)({ cursor: options.cursor, types: options.types, createdAfter: options.start, createdBefore: options.end, }); await (0, event_1.saveEvents)(subjects); });