ConstOptionalbaseDir: stringAbsolute path to the JSONL file for this report type
WriteStream instance for append-only writes, null until initialized
Singleshot initialization function that creates directory and stream. Protected by singleshot to ensure one-time execution. Sets up error handler that emits to exitEmitter.
Timeout-protected write function with backpressure handling. Waits for drain event if write buffer is full. Times out after 15 seconds and returns TIMEOUT_SYMBOL.
ReadonlybaseDir: stringReadonlyreportName: ReportNameInitializes the JSONL file and write stream. Safe to call multiple times - singleshot ensures one-time execution.
Whether this is the first initialization (informational only)
Promise that resolves when initialization is complete
Writes event data to JSONL file with metadata. Appends a single line with JSON object containing:
Event data object to write
Metadata options for filtering and search
JSONL-based report adapter with append-only writes.
Features:
File format: ./dump/report/{reportName}.jsonl Each line contains: reportName, data, metadata, timestamp
Use this adapter for event logging and post-processing analytics.