{
  "version": 3,
  "sources": ["../../../../src/packages/logger/streamParser.ts"],
  "sourcesContent": ["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport bole from 'bole';\nimport ndjson from 'ndjson';\nimport type { LogBase } from './LogBase.ts';\n\nexport type Reporter<LogObj extends LogBase> = (logObj: LogObj) => void;\n\nexport type StreamParser<LogObj extends LogBase> = {\n  on: (event: 'data', reporter: Reporter<LogObj>) => void;\n  removeListener: (event: 'data', reporter: Reporter<LogObj>) => void;\n};\n\nexport const streamParser: StreamParser<LogBase> = createStreamParser();\n\nexport function createStreamParser<\n  LogObj extends LogBase,\n>(): StreamParser<LogObj> {\n  const sp: StreamParser<LogObj> = ndjson.parse();\n  bole.output([\n    {\n      level: 'debug',\n      stream: sp,\n    },\n  ]);\n  return sp;\n}\n"],
  "mappings": "AAEA,OAAO,UAAU;AACjB,OAAO,YAAY;AAUZ,MAAM,eAAsC,mBAAmB;AAE/D,SAAS,qBAEU;AACxB,QAAM,KAA2B,OAAO,MAAM;AAC9C,OAAK,OAAO;AAAA,IACV;AAAA,MACE,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,EACF,CAAC;AACD,SAAO;AACT;",
  "names": []
}
