@honeybadger-io/js 6.1.3 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/honeybadger.d.ts +2 -2
- package/dist/browser/honeybadger.js +27 -12
- package/dist/browser/honeybadger.js.map +1 -1
- package/dist/browser/honeybadger.min.js +1 -1
- package/dist/browser/honeybadger.min.js.map +1 -1
- package/dist/server/honeybadger.d.ts +2 -2
- package/dist/server/honeybadger.js +27 -12
- package/dist/server/honeybadger.js.map +1 -1
- package/package.json +4 -4
|
@@ -12,7 +12,7 @@ declare class Honeybadger extends Client {
|
|
|
12
12
|
private isUserFeedbackScriptUrlAlreadyVisible;
|
|
13
13
|
private getUserFeedbackSubmitUrl;
|
|
14
14
|
}
|
|
15
|
+
declare const singleton: Honeybadger;
|
|
15
16
|
export { Types } from '@honeybadger-io/core';
|
|
16
|
-
|
|
17
|
-
export default _default;
|
|
17
|
+
export default singleton;
|
|
18
18
|
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -798,11 +798,6 @@
|
|
|
798
798
|
client.Client = void 0;
|
|
799
799
|
var util_1$6 = util$1;
|
|
800
800
|
var store_1 = store;
|
|
801
|
-
var notifier = {
|
|
802
|
-
name: 'honeybadger-js',
|
|
803
|
-
url: 'https://github.com/honeybadger-io/honeybadger-js',
|
|
804
|
-
version: '6.1.3'
|
|
805
|
-
};
|
|
806
801
|
// Split at commas and spaces
|
|
807
802
|
var TAG_SEPARATOR = /,|\s+/;
|
|
808
803
|
// Checks for non-blank characters
|
|
@@ -814,13 +809,24 @@
|
|
|
814
809
|
this.__store = null;
|
|
815
810
|
this.__beforeNotifyHandlers = [];
|
|
816
811
|
this.__afterNotifyHandlers = [];
|
|
812
|
+
this.__notifier = {
|
|
813
|
+
name: '@honeybadger-io/core',
|
|
814
|
+
url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/core',
|
|
815
|
+
version: '6.2.0'
|
|
816
|
+
};
|
|
817
817
|
this.config = __assign({ apiKey: null, endpoint: 'https://api.honeybadger.io', environment: null, hostname: null, projectRoot: null, component: null, action: null, revision: null, reportData: null, breadcrumbsEnabled: true, maxBreadcrumbs: 40, maxObjectDepth: 8, logger: console, developmentEnvironments: ['dev', 'development', 'test'], debug: false, tags: null, enableUncaught: true, enableUnhandledRejection: true, afterUncaught: function () { return true; }, filters: ['creditcard', 'password'], __plugins: [] }, opts);
|
|
818
818
|
this.__initStore();
|
|
819
819
|
this.__transport = transport;
|
|
820
820
|
this.logger = (0, util_1$6.logger)(this);
|
|
821
821
|
}
|
|
822
822
|
Client.prototype.getVersion = function () {
|
|
823
|
-
return
|
|
823
|
+
return this.__notifier.version;
|
|
824
|
+
};
|
|
825
|
+
Client.prototype.getNotifier = function () {
|
|
826
|
+
return this.__notifier;
|
|
827
|
+
};
|
|
828
|
+
Client.prototype.setNotifier = function (notifier) {
|
|
829
|
+
this.__notifier = notifier;
|
|
824
830
|
};
|
|
825
831
|
Client.prototype.configure = function (opts) {
|
|
826
832
|
var _this = this;
|
|
@@ -1024,7 +1030,7 @@
|
|
|
1024
1030
|
tags: uniqueTags,
|
|
1025
1031
|
});
|
|
1026
1032
|
// If we're passed a custom backtrace array, use it
|
|
1027
|
-
// Otherwise we make one.
|
|
1033
|
+
// Otherwise we make one.
|
|
1028
1034
|
if (!Array.isArray(notice.backtrace) || !notice.backtrace.length) {
|
|
1029
1035
|
if (typeof notice.stack !== 'string' || !notice.stack.trim()) {
|
|
1030
1036
|
notice.stack = (0, util_1$6.generateStackTrace)();
|
|
@@ -1068,7 +1074,7 @@
|
|
|
1068
1074
|
var headers = (0, util_1$6.filter)(notice.headers, this.config.filters) || {};
|
|
1069
1075
|
var cgiData = (0, util_1$6.filter)(__assign(__assign({}, notice.cgiData), (0, util_1$6.formatCGIData)(headers, 'HTTP_')), this.config.filters);
|
|
1070
1076
|
return {
|
|
1071
|
-
notifier:
|
|
1077
|
+
notifier: this.__notifier,
|
|
1072
1078
|
breadcrumbs: {
|
|
1073
1079
|
enabled: !!this.config.breadcrumbsEnabled,
|
|
1074
1080
|
trail: notice.__breadcrumbs || []
|
|
@@ -2064,7 +2070,9 @@
|
|
|
2064
2070
|
};
|
|
2065
2071
|
Honeybadger.prototype.factory = function (opts) {
|
|
2066
2072
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2067
|
-
|
|
2073
|
+
var clone = new Honeybadger(opts);
|
|
2074
|
+
clone.setNotifier(this.getNotifier());
|
|
2075
|
+
return clone;
|
|
2068
2076
|
};
|
|
2069
2077
|
Honeybadger.prototype.checkIn = function (_id) {
|
|
2070
2078
|
throw new Error('Honeybadger.checkIn() is not supported on the browser');
|
|
@@ -2214,9 +2222,7 @@
|
|
|
2214
2222
|
};
|
|
2215
2223
|
return Honeybadger;
|
|
2216
2224
|
}(core_1.Client));
|
|
2217
|
-
var
|
|
2218
|
-
Object.defineProperty(exports, "Types", { enumerable: true, get: function () { return core_2.Types; } });
|
|
2219
|
-
exports.default = new Honeybadger({
|
|
2225
|
+
var singleton = new Honeybadger({
|
|
2220
2226
|
__plugins: [
|
|
2221
2227
|
(0, onerror_1.onError)(),
|
|
2222
2228
|
(0, onunhandledrejection_1.default)(),
|
|
@@ -2225,6 +2231,15 @@
|
|
|
2225
2231
|
(0, breadcrumbs_1.default)()
|
|
2226
2232
|
]
|
|
2227
2233
|
});
|
|
2234
|
+
var NOTIFIER = {
|
|
2235
|
+
name: '@honeybadger-io/js',
|
|
2236
|
+
url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/js',
|
|
2237
|
+
version: '6.2.0'
|
|
2238
|
+
};
|
|
2239
|
+
singleton.setNotifier(NOTIFIER);
|
|
2240
|
+
var core_2 = src;
|
|
2241
|
+
Object.defineProperty(exports, "Types", { enumerable: true, get: function () { return core_2.Types; } });
|
|
2242
|
+
exports.default = singleton;
|
|
2228
2243
|
|
|
2229
2244
|
} (browser$1));
|
|
2230
2245
|
|