75 lines
2.2 KiB
JavaScript
75 lines
2.2 KiB
JavaScript
// Module ID: 7705
|
|
// Function ID: 7706
|
|
// Name: getCurrentHubShim
|
|
// Dependencies: [7624, 7645, 7670]
|
|
|
|
// Module 7705 (getCurrentHubShim)
|
|
import getClient from "getClient" /* 7624 */;
|
|
import _flush from "_flush" /* 7645 */;
|
|
import addBreadcrumb from "addBreadcrumb" /* 7670 */;
|
|
|
|
require = arg1;
|
|
const dependencyMap = arg6;
|
|
function getCurrentHubShim() {
|
|
return {
|
|
bindClient(arg0) {
|
|
const currentScope = callback(7624).getCurrentScope();
|
|
currentScope.setClient(arg0);
|
|
},
|
|
withScope: getClient.withScope,
|
|
getClient() {
|
|
return callback(7624).getClient();
|
|
},
|
|
getScope: getClient.getCurrentScope,
|
|
getIsolationScope: getClient.getIsolationScope,
|
|
captureException(arg0, arg1) {
|
|
const currentScope = callback(7624).getCurrentScope();
|
|
return currentScope.captureException(arg0, arg1);
|
|
},
|
|
captureMessage(arg0, arg1, arg2) {
|
|
const currentScope = callback(7624).getCurrentScope();
|
|
return currentScope.captureMessage(arg0, arg1, arg2);
|
|
},
|
|
captureEvent: _flush.captureEvent,
|
|
addBreadcrumb: addBreadcrumb.addBreadcrumb,
|
|
setUser: _flush.setUser,
|
|
setTags: _flush.setTags,
|
|
setTag: _flush.setTag,
|
|
setExtra: _flush.setExtra,
|
|
setExtras: _flush.setExtras,
|
|
setContext: _flush.setContext,
|
|
getIntegration(id) {
|
|
const client = callback(7624).getClient();
|
|
let integrationByName = client;
|
|
if (client) {
|
|
integrationByName = client.getIntegrationByName(id.id);
|
|
}
|
|
if (!integrationByName) {
|
|
integrationByName = null;
|
|
}
|
|
return integrationByName;
|
|
},
|
|
startSession: _flush.startSession,
|
|
endSession: _flush.endSession,
|
|
captureSession(arg0) {
|
|
if (arg0) {
|
|
let tmpResult = tmp(tmp2[1]);
|
|
return tmpResult.endSession();
|
|
} else {
|
|
tmpResult = tmp(tmp2[0]);
|
|
const currentScope = tmpResult.getCurrentScope();
|
|
const client = tmp(tmp2[0]).getClient();
|
|
const session = currentScope.getSession();
|
|
let tmp4 = client;
|
|
if (client) {
|
|
tmp4 = session;
|
|
}
|
|
if (tmp4) {
|
|
client.captureSession(session);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
arg5.getCurrentHub = getCurrentHubShim;
|
|
arg5.getCurrentHubShim = getCurrentHubShim;
|