{"version":3,"file":"fetch.mjs","names":[],"sources":["../../src/reporters/fetch.ts"],"sourcesContent":["import type { DiagnosticReporter } from '../diagnostic'\n\n/**\n * Creates a reporter that POSTs each diagnostic as JSON to the given URL.\n * Errors are swallowed so reporting never throws into user code.\n */\n/* @__NO_SIDE_EFFECTS__ */\nexport function createFetchReporter(url: string): DiagnosticReporter {\n  return (diagnostic) => {\n    fetch(url, {\n      method: 'POST',\n      headers: { 'Content-Type': 'application/json' },\n      body: JSON.stringify(diagnostic),\n    }).catch(() => {})\n  }\n}\n"],"mappings":";;;;;;AAOA,SAAgB,oBAAoB,KAAiC;CACnE,QAAQ,eAAe;EACrB,MAAM,KAAK;GACT,QAAQ;GACR,SAAS,EAAE,gBAAgB,mBAAmB;GAC9C,MAAM,KAAK,UAAU,UAAU;EACjC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;CACnB;AACF"}