mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
1 line
6.7 KiB
JSON
1 line
6.7 KiB
JSON
|
|
{"ast":null,"code":"import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';\nimport { loadModule, logger, fill } from '@sentry/utils';\n\n/** Tracing integration for node-mysql package */\nclass Mysql {\n constructor() {\n Mysql.prototype.__init.call(this);\n }\n /**\n * @inheritDoc\n */\n static __initStatic() {\n this.id = 'Mysql';\n }\n\n /**\n * @inheritDoc\n */\n __init() {\n this.name = Mysql.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n var pkg = loadModule('mysql/lib/Connection.js');\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n fill(pkg, 'createQuery', function (orig) {\n return function (options, values, callback) {\n var scope = getCurrentHub().getScope();\n var parentSpan = _optionalChain([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]);\n var span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({\n description: typeof options === 'string' ? options : options.sql,\n op: 'db'\n })]);\n if (typeof callback === 'function') {\n return orig.call(this, options, values, function (err, result, fields) {\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n callback(err, result, fields);\n });\n }\n if (typeof values === 'function') {\n return orig.call(this, options, function (err, result, fields) {\n _optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]);\n values(err, result, fields);\n });\n }\n return orig.call(this, options, values, callback);\n };\n });\n }\n}\nMysql.__initStatic();\nexport { Mysql };","map":{"version":3,"names":["_optionalChain","loadModule","logger","fill","Mysql","constructor","prototype","__init","call","__initStatic","id","name","setupOnce","_","getCurrentHub","pkg","__SENTRY_DEBUG__","error","orig","options","values","callback","scope","getScope","parentSpan","_2","getSpan","_3","span","_4","startChild","_5","description","sql","op","err","result","fields","_6","finish","_7","_8","_9"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@sentry/tracing/esm/integrations/node/mysql.js"],"sourcesContent":["import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';\nimport { loadModule, logger, fill } from '@sentry/utils';\n\n/** Tracing integration for node-mysql package */\nclass Mysql {constructor() { Mysql.prototype.__init.call(this); }\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Mysql';}\n\n /**\n * @inheritDoc\n */\n __init() {this.name = Mysql.id;}\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n var pkg = loadModule('mysql/lib/Connection.js');\n\n if (!pkg) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Mysql Integration was unable to require `mysql` package.');\n return;\n }\n\n // The original function will have one of these signatures:\n // function (callback) => void\n // function (options, callback) => void\n // function (options, values, callback) => void\n fill(pkg, 'createQuery', function (orig) {\n return function ( options, values, callback) {\n var scope = getCurrentHub().getScope();\n var parentSpan = _optionalChain([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]);\n var span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5({\n description: typeof options === 'string' ? options : (options ).sql,\n op: 'db',\n
|