mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +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 })]);\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\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\n return orig.call(this, options, values, callback);\n };\n });\n }\n}Mysql.__initStatic();\n\nexport { Mysql };\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,kCAAk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