mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
9.2 KiB
JSON
1 line
9.2 KiB
JSON
{"ast":null,"code":"import { relative, basename } from '@sentry/utils';\n\n/** Rewrite event frames paths */\nclass RewriteFrames {\n /**\n * @inheritDoc\n */\n static __initStatic() {\n this.id = 'RewriteFrames';\n }\n\n /**\n * @inheritDoc\n */\n __init() {\n this.name = RewriteFrames.id;\n }\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n __init2() {\n this._prefix = 'app:///';\n }\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n ;\n RewriteFrames.prototype.__init.call(this);\n RewriteFrames.prototype.__init2.call(this);\n RewriteFrames.prototype.__init3.call(this);\n if (options.root) {\n this._root = options.root;\n }\n if (options.prefix) {\n this._prefix = options.prefix;\n }\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(event => {\n var self = getCurrentHub().getIntegration(RewriteFrames);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /** JSDoc */\n process(originalEvent) {\n let processedEvent = originalEvent;\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n __init3() {\n this._iteratee = frame => {\n if (!frame.filename) {\n return frame;\n }\n // Check if the frame filename begins with `/` or a Windows-style prefix such as `C:\\`\n var isWindowsFrame = /^[A-Z]:\\\\/.test(frame.filename);\n var startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n var filename = isWindowsFrame ? frame.filename.replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n var base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };\n }\n\n /** JSDoc */\n _processExceptionsEvent(event) {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n values: event.exception.values.map(value => ({\n ...value,\n ...(value.stacktrace && {\n stacktrace: this._processStacktrace(value.stacktrace)\n })\n }))\n }\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n _processStacktrace(stacktrace) {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f))\n };\n }\n}\nRewriteFrames.__initStatic();\nexport { RewriteFrames };","map":{"version":3,"names":["relative","basename","RewriteFrames","__initStatic","id","__init","name","__init2","_prefix","constructor","options","prototype","call","__init3","root","_root","prefix","iteratee","_iteratee","setupOnce","addGlobalEventProcessor","getCurrentHub","event","self","getIntegration","process","originalEvent","processedEvent","exception","Array","isArray","values","_processExceptionsEvent","frame","filename","isWindowsFrame","test","startsWithSlash","replace","base","map","value","stacktrace","_processStacktrace","_oO","frames","f"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@sentry/integrations/esm/rewriteframes.js"],"sourcesContent":["import { relative, basename } from '@sentry/utils';\n\n/** Rewrite event frames paths */\nclass RewriteFrames {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'RewriteFrames';}\n\n /**\n * @inheritDoc\n */\n __init() {this.name = RewriteFrames.id;}\n\n /**\n * @inheritDoc\n */\n \n\n /**\n * @inheritDoc\n */\n __init2() {this._prefix = 'app:///';}\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {;RewriteFrames.prototype.__init.call(this);RewriteFrames.prototype.__init2.call(this);RewriteFrames.prototype.__init3.call(this);\n if (options.root) {\n this._root = options.root;\n }\n if (options.prefix) {\n this._prefix = options.prefix;\n }\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(event => {\n var self = getCurrentHub().getIntegration(RewriteFrames);\n if (self) {\n return self.process(event);\n }\n return event;\n });\n }\n\n /** JSDoc */\n process(originalEvent) {\n let processedEvent = originalEvent;\n\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n __init3() {this._iteratee = (frame) => {\n if (!frame.filename) {\n return frame;\n }\n // Check if the frame filename begins with `/` or a Windows-style prefix such as `C:\\`\n var isWindowsFrame = /^[A-Z]:\\\\/.test(frame.filename);\n var startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n var filename = isWindowsFrame\n ? frame.filename\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n var base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };}\n\n /** JSDoc */\n _processExceptionsEvent(event) {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n values: event.exception.values.map(value => ({\n ...value,\n ...(value.stacktrace && { stacktrace: this._processStacktrace(value.stacktrace) }),\n })),\n },\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n _processStacktrace(stacktrace) {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f)),\n };\n }\n} RewriteFrames.__initStatic();\n\nexport { RewriteFrames };\n"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,QAAQ,QAAQ,eAAe;;AAElD;AACA,MAAMC,aAAa,CAAE;EACnB;AACF;AACA;EACG,OAAOC,YAAYA,CAAA,EAAG;IAAC,IAAI,CAACC,EAAE,GAAG,eAAe;EAAC;;EAElD;AACF;AACA;EACGC,MAAMA,CAAA,EAAG;IAAC,IAAI,CAACC,IA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