import * as Sentry from '@sentry/electron' ; type Init = typeof Sentry . init ; const { init } = process . type === 'browser' ? require ( '@sentry/electron/dist/main' ) : require ( '@sentry/electron/dist/renderer' ) ; const reporterConfiguration = { dsn : SENTRY_DSN , defaultIntegrations : false , environment : process . env . NODE_ENV , enableJavaScript : true , enableNative : false , enableUnresponsive : false , } as Sentry . ElectronOptions ; const initializeReporter = ( ) => init ( reporterConfiguration ) ; const userReportProblem = ( title , body , logs , email , extra ) => { return Sentry . captureMessage ( title , { user : { email , } , extra : { body , logs , ... extra , } , } ) ; } ; export default { initializeReporter , userReportProblem } ;