mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
1 line
7.1 KiB
JSON
1 line
7.1 KiB
JSON
|
|
{"ast":null,"code":"import { getGlobalObject, CONSOLE_LEVELS, fill, severityLevelFromString, safeJoin } from '@sentry/utils';\nvar global = getGlobalObject();\n\n/** Send Console API calls as Sentry Events */\nclass CaptureConsole {\n /**\n * @inheritDoc\n */\n static __initStatic() {\n this.id = 'CaptureConsole';\n }\n\n /**\n * @inheritDoc\n */\n __init() {\n this.name = CaptureConsole.id;\n }\n\n /**\n * @inheritDoc\n */\n __init2() {\n this._levels = CONSOLE_LEVELS;\n }\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n ;\n CaptureConsole.prototype.__init.call(this);\n CaptureConsole.prototype.__init2.call(this);\n if (options.levels) {\n this._levels = options.levels;\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (!('console' in global)) {\n return;\n }\n this._levels.forEach(level => {\n if (!(level in global.console)) {\n return;\n }\n fill(global.console, level, originalConsoleMethod => (...args) => {\n var hub = getCurrentHub();\n if (hub.getIntegration(CaptureConsole)) {\n hub.withScope(scope => {\n scope.setLevel(severityLevelFromString(level));\n scope.setExtra('arguments', args);\n scope.addEventProcessor(event => {\n event.logger = 'console';\n return event;\n });\n let message = safeJoin(args, ' ');\n if (level === 'assert') {\n if (args[0] === false) {\n message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;\n scope.setExtra('arguments', args.slice(1));\n hub.captureMessage(message);\n }\n } else if (level === 'error' && args[0] instanceof Error) {\n hub.captureException(args[0]);\n } else {\n hub.captureMessage(message);\n }\n });\n }\n\n // this fails for some browsers. :(\n if (originalConsoleMethod) {\n originalConsoleMethod.apply(global.console, args);\n }\n });\n });\n }\n}\nCaptureConsole.__initStatic();\nexport { CaptureConsole };","map":{"version":3,"names":["getGlobalObject","CONSOLE_LEVELS","fill","severityLevelFromString","safeJoin","global","CaptureConsole","__initStatic","id","__init","name","__init2","_levels","constructor","options","prototype","call","levels","setupOnce","_","getCurrentHub","forEach","level","console","originalConsoleMethod","args","hub","getIntegration","withScope","scope","setLevel","setExtra","addEventProcessor","event","logger","message","slice","captureMessage","Error","captureException","apply"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@sentry/integrations/esm/captureconsole.js"],"sourcesContent":["import { getGlobalObject, CONSOLE_LEVELS, fill, severityLevelFromString, safeJoin } from '@sentry/utils';\n\nvar global = getGlobalObject();\n\n/** Send Console API calls as Sentry Events */\nclass CaptureConsole {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'CaptureConsole';}\n\n /**\n * @inheritDoc\n */\n __init() {this.name = CaptureConsole.id;}\n\n /**\n * @inheritDoc\n */\n __init2() {this._levels = CONSOLE_LEVELS;}\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {;CaptureConsole.prototype.__init.call(this);CaptureConsole.prototype.__init2.call(this);\n if (options.levels) {\n this._levels = options.levels;\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n if (!('console' in global)) {\n return;\n }\n\n this._levels.forEach((level) => {\n if (!(level in global.console)) {\n return;\n }\n\n fill(global.console, level, (originalConsoleMethod) => (...args) => {\n var hub = getCurrentHub();\n\n if (hub.getIntegration(CaptureConsole)) {\n hub.withScope(scope => {\n scope.setLevel(severityLevelFromString(
|