All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.cjs.feedback.js.map Maven / Gradle / Ivy

There is a newer version: 8.39.0
Show newest version
{"version":3,"file":"feedback.js","sources":["../../src/feedback.ts"],"sourcesContent":["import type { EventHint, FeedbackEvent, SendFeedbackParams } from '@sentry/types';\nimport { dropUndefinedKeys } from '@sentry/utils';\nimport { getClient, getCurrentScope } from './currentScopes';\n\n/**\n * Send user feedback to Sentry.\n */\nexport function captureFeedback(\n  params: SendFeedbackParams,\n  hint: EventHint & { includeReplay?: boolean } = {},\n  scope = getCurrentScope(),\n): string {\n  const { message, name, email, url, source, associatedEventId, tags } = params;\n\n  const feedbackEvent: FeedbackEvent = {\n    contexts: {\n      feedback: dropUndefinedKeys({\n        contact_email: email,\n        name,\n        message,\n        url,\n        source,\n        associated_event_id: associatedEventId,\n      }),\n    },\n    type: 'feedback',\n    level: 'info',\n    tags,\n  };\n\n  const client = (scope && scope.getClient()) || getClient();\n\n  if (client) {\n    client.emit('beforeSendFeedback', feedbackEvent, hint);\n  }\n\n  const eventId = scope.captureEvent(feedbackEvent, hint);\n\n  return eventId;\n}\n"],"names":["getCurrentScope","dropUndefinedKeys","getClient"],"mappings":";;;;;AAIA;AACA;AACA;AACO,SAAS,eAAe;AAC/B,EAAE,MAAM;AACR,EAAE,IAAI,GAA4C,EAAE;AACpD,EAAE,KAAM,GAAEA,6BAAe,EAAE;AAC3B,EAAU;AACV,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,iBAAiB,EAAE,IAAK,EAAA,GAAI,MAAM,CAAA;AAC/E;AACA,EAAE,MAAM,aAAa,GAAkB;AACvC,IAAI,QAAQ,EAAE;AACd,MAAM,QAAQ,EAAEC,uBAAiB,CAAC;AAClC,QAAQ,aAAa,EAAE,KAAK;AAC5B,QAAQ,IAAI;AACZ,QAAQ,OAAO;AACf,QAAQ,GAAG;AACX,QAAQ,MAAM;AACd,QAAQ,mBAAmB,EAAE,iBAAiB;AAC9C,OAAO,CAAC;AACR,KAAK;AACL,IAAI,IAAI,EAAE,UAAU;AACpB,IAAI,KAAK,EAAE,MAAM;AACjB,IAAI,IAAI;AACR,GAAG,CAAA;AACH;AACA,EAAE,MAAM,MAAA,GAAS,CAAC,SAAS,KAAK,CAAC,SAAS,EAAE,KAAKC,uBAAS,EAAE,CAAA;AAC5D;AACA,EAAE,IAAI,MAAM,EAAE;AACd,IAAI,MAAM,CAAC,IAAI,CAAC,oBAAoB,EAAE,aAAa,EAAE,IAAI,CAAC,CAAA;AAC1D,GAAE;AACF;AACA,EAAE,MAAM,OAAQ,GAAE,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;AACzD;AACA,EAAE,OAAO,OAAO,CAAA;AAChB;;;;"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy