browser-debugger-cli
Version:
DevTools telemetry in your terminal. For humans and agents. Direct WebSocket to Chrome's debugging port.
24 lines • 930 B
JavaScript
/**
* Session output file management.
*
* Handles writing final session output to disk.
* Note: Live preview/details now use IPC streaming instead of file writes.
*/
import { AtomicFileWriter } from '../utils/atomicFile.js';
import { getSessionFilePath, ensureSessionDir } from './paths.js';
/**
* Write session output to the final JSON file.
*
* This is written once at the end of a session.
* Note: Preview/details data is now accessed via IPC streaming during collection.
*
* @param output - The BdgOutput data to write
* @param compact - If true, use compact JSON format (no indentation)
*/
export function writeSessionOutput(output, compact = false) {
ensureSessionDir();
const outputPath = getSessionFilePath('OUTPUT');
const jsonString = compact ? JSON.stringify(output) : JSON.stringify(output, null, 2);
AtomicFileWriter.writeSync(outputPath, jsonString);
}
//# sourceMappingURL=output.js.map