@sentry/hub
Advanced tools
Comparing version 4.3.2 to 4.3.3
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var logger_1 = require("@sentry/utils/logger"); | ||
@@ -79,3 +49,3 @@ var misc_1 = require("@sentry/utils/misc"); | ||
if (top && top.client && top.client[method]) { | ||
(_a = top.client)[method].apply(_a, __spread(args, [top.scope])); | ||
(_a = top.client)[method].apply(_a, tslib_1.__spread(args, [top.scope])); | ||
} | ||
@@ -98,3 +68,3 @@ }; | ||
if (top && top.client && top.client[method]) { | ||
(_a = top.client)[method].apply(_a, __spread(args, [top.scope])).catch(function (err) { | ||
(_a = top.client)[method].apply(_a, tslib_1.__spread(args, [top.scope])).catch(function (err) { | ||
logger_1.logger.error(err); | ||
@@ -211,3 +181,3 @@ }); | ||
var eventId = (this._lastEventId = misc_1.uuid4()); | ||
this.invokeClientAsync('captureException', exception, __assign({}, hint, { event_id: eventId })); | ||
this.invokeClientAsync('captureException', exception, tslib_1.__assign({}, hint, { event_id: eventId })); | ||
return eventId; | ||
@@ -225,3 +195,3 @@ }; | ||
var eventId = (this._lastEventId = misc_1.uuid4()); | ||
this.invokeClientAsync('captureMessage', message, level, __assign({}, hint, { event_id: eventId })); | ||
this.invokeClientAsync('captureMessage', message, level, tslib_1.__assign({}, hint, { event_id: eventId })); | ||
return eventId; | ||
@@ -237,3 +207,3 @@ }; | ||
var eventId = (this._lastEventId = misc_1.uuid4()); | ||
this.invokeClientAsync('captureEvent', event, __assign({}, hint, { event_id: eventId })); | ||
this.invokeClientAsync('captureEvent', event, tslib_1.__assign({}, hint, { event_id: eventId })); | ||
return eventId; | ||
@@ -259,3 +229,3 @@ }; | ||
Hub.prototype.addBreadcrumb = function (breadcrumb, hint) { | ||
this.invokeClient('addBreadcrumb', breadcrumb, __assign({}, hint)); | ||
this.invokeClient('addBreadcrumb', breadcrumb, tslib_1.__assign({}, hint)); | ||
}; | ||
@@ -262,0 +232,0 @@ /** |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
var __generator = (this && this.__generator) || function (thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
}; | ||
var __read = (this && this.__read) || function (o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
}; | ||
var __spread = (this && this.__spread) || function () { | ||
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
}; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
var misc_1 = require("@sentry/utils/misc"); | ||
@@ -130,5 +55,5 @@ var object_1 = require("@sentry/utils/object"); | ||
Scope.prototype.notifyEventProcessors = function (event, hint) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var e_1, _a, processedEvent, _b, _c, processor, e_2, e_1_1; | ||
return __generator(this, function (_d) { | ||
return tslib_1.__generator(this, function (_d) { | ||
switch (_d.label) { | ||
@@ -140,3 +65,3 @@ case 0: | ||
_d.trys.push([1, 8, 9, 10]); | ||
_b = __values(__spread(getGlobalEventProcessors(), this.eventProcessors)), _c = _b.next(); | ||
_b = tslib_1.__values(tslib_1.__spread(getGlobalEventProcessors(), this.eventProcessors)), _c = _b.next(); | ||
_d.label = 2; | ||
@@ -149,3 +74,3 @@ case 2: | ||
_d.trys.push([3, 5, , 6]); | ||
return [4 /*yield*/, processor(__assign({}, processedEvent), hint)]; | ||
return [4 /*yield*/, processor(tslib_1.__assign({}, processedEvent), hint)]; | ||
case 4: | ||
@@ -194,3 +119,3 @@ processedEvent = _d.sent(); | ||
var _a; | ||
this.tags = __assign({}, this.tags, (_a = {}, _a[key] = value, _a)); | ||
this.tags = tslib_1.__assign({}, this.tags, (_a = {}, _a[key] = value, _a)); | ||
this.notifyScopeListeners(); | ||
@@ -205,3 +130,3 @@ return this; | ||
var _a; | ||
this.extra = __assign({}, this.extra, (_a = {}, _a[key] = extra, _a)); | ||
this.extra = tslib_1.__assign({}, this.extra, (_a = {}, _a[key] = extra, _a)); | ||
this.notifyScopeListeners(); | ||
@@ -240,4 +165,4 @@ return this; | ||
newScope.tags = object_1.assign(scope.tags); | ||
newScope.breadcrumbs = __spread(scope.breadcrumbs); | ||
newScope.eventProcessors = __spread(scope.eventProcessors); | ||
newScope.breadcrumbs = tslib_1.__spread(scope.breadcrumbs); | ||
newScope.eventProcessors = tslib_1.__spread(scope.eventProcessors); | ||
} | ||
@@ -264,4 +189,4 @@ return newScope; | ||
maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0 | ||
? __spread(this.breadcrumbs, [breadcrumb]).slice(-maxBreadcrumbs) | ||
: __spread(this.breadcrumbs, [breadcrumb]); | ||
? tslib_1.__spread(this.breadcrumbs, [breadcrumb]).slice(-maxBreadcrumbs) | ||
: tslib_1.__spread(this.breadcrumbs, [breadcrumb]); | ||
this.notifyScopeListeners(); | ||
@@ -302,13 +227,13 @@ }; | ||
Scope.prototype.applyToEvent = function (event, hint, maxBreadcrumbs) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var hasNoBreadcrumbs; | ||
return __generator(this, function (_a) { | ||
return tslib_1.__generator(this, function (_a) { | ||
if (this.extra && Object.keys(this.extra).length) { | ||
event.extra = __assign({}, this.extra, event.extra); | ||
event.extra = tslib_1.__assign({}, this.extra, event.extra); | ||
} | ||
if (this.tags && Object.keys(this.tags).length) { | ||
event.tags = __assign({}, this.tags, event.tags); | ||
event.tags = tslib_1.__assign({}, this.tags, event.tags); | ||
} | ||
if (this.user && Object.keys(this.user).length) { | ||
event.user = __assign({}, this.user, event.user); | ||
event.user = tslib_1.__assign({}, this.user, event.user); | ||
} | ||
@@ -315,0 +240,0 @@ if (this.level) { |
{ | ||
"name": "@sentry/hub", | ||
"version": "4.3.2", | ||
"version": "4.3.3", | ||
"description": "Sentry hub which handles global state managment.", | ||
@@ -18,4 +18,5 @@ "repository": "git://github.com/getsentry/raven-js.git", | ||
"dependencies": { | ||
"@sentry/types": "4.3.2", | ||
"@sentry/utils": "4.3.2" | ||
"@sentry/types": "4.3.3", | ||
"@sentry/utils": "4.3.3", | ||
"tslib": "^1.9.3" | ||
}, | ||
@@ -22,0 +23,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73485
3
955
+ Addedtslib@^1.9.3
+ Added@sentry/types@4.3.3(transitive)
+ Added@sentry/utils@4.3.3(transitive)
+ Addedtslib@1.14.1(transitive)
- Removed@sentry/types@4.3.2(transitive)
- Removed@sentry/utils@4.3.2(transitive)
Updated@sentry/types@4.3.3
Updated@sentry/utils@4.3.3