"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SSEStream = void 0;
const stream_1 = require("stream");
class SSEStream extends stream_1.Transform {
    constructor() {
        super({
            writableObjectMode: true,
        });
    }
    _transform(data, _encoding, done) {
        this.push(`data: ${typeof data === 'string' ? data : JSON.stringify(data)}\n\n`);
        done();
    }
}
exports.SSEStream = SSEStream;
