package.build.cjs.clientreport.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
Utilities for all Sentry JavaScript SDKs
The newest version!
{"version":3,"file":"clientreport.js","sources":["../../src/clientreport.ts"],"sourcesContent":["import type { ClientReport, ClientReportEnvelope, ClientReportItem } from '@sentry/types';\n\nimport { createEnvelope } from './envelope';\nimport { dateTimestampInSeconds } from './time';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nexport function createClientReportEnvelope(\n discarded_events: ClientReport['discarded_events'],\n dsn?: string,\n timestamp?: number,\n): ClientReportEnvelope {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n"],"names":["dateTimestampInSeconds","createEnvelope"],"mappings":";;;;;AAKA;AACA;AACA;AACA;AACA;AACO,SAAS,0BAA0B;AAC1C,EAAE,gBAAgB;AAClB,EAAE,GAAG;AACL,EAAE,SAAS;AACX,EAAwB;AACxB,EAAE,MAAM,gBAAgB,GAAqB;AAC7C,IAAI,EAAE,IAAI,EAAE,eAAA,EAAiB;AAC7B,IAAI;AACJ,MAAM,SAAS,EAAE,SAAA,IAAaA,2BAAsB,EAAE;AACtD,MAAM,gBAAgB;AACtB,KAAK;AACL,GAAG;AACH,EAAE,OAAOC,uBAAc,CAAuB,GAAA,GAAM,EAAE,GAAA,EAAM,GAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC;AACrF;;;;"}