UNPKG

@lark-project/cli

Version:

飞书项目插件开发工具

23 lines (22 loc) 810 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.checkpointGet = void 0; const read_1 = require("./read"); /** * Return full checkpoint state as JSON to stdout. * * Filtering: both --phase and --step narrow the returned event list. * No arguments -> return every recorded event. */ function checkpointGet(options) { const events = (0, read_1.readEvents)(); const filtered = events.filter(ev => { if (options.phase !== undefined && ev.phase !== options.phase) return false; if (options.step !== undefined && ev.step !== options.step) return false; return true; }); process.stdout.write(JSON.stringify({ count: filtered.length, events: filtered }, null, 2) + '\n'); } exports.checkpointGet = checkpointGet;