@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
|
@@ -15,7 +15,7 @@ declare class Honeybadger extends Client {
|
|
|
15
15
|
withRequest<R>(request: Record<symbol, unknown>, handler: (...args: never[]) => R, onError?: (...args: unknown[]) => unknown): R | void;
|
|
16
16
|
run<R>(callback: (...args: never[]) => R): R;
|
|
17
17
|
}
|
|
18
|
+
declare const singleton: Honeybadger;
|
|
18
19
|
export { Types } from '@honeybadger-io/core';
|
|
19
|
-
|
|
20
|
-
export default _default;
|
|
20
|
+
export default singleton;
|
|
21
21
|
//# sourceMappingURL=server.d.ts.map
|
|
@@ -812,11 +812,6 @@ Object.defineProperty(client, "__esModule", { value: true });
|
|
|
812
812
|
client.Client = void 0;
|
|
813
813
|
var util_1$4 = util$1;
|
|
814
814
|
var store_1 = store;
|
|
815
|
-
var notifier = {
|
|
816
|
-
name: 'honeybadger-js',
|
|
817
|
-
url: 'https://github.com/honeybadger-io/honeybadger-js',
|
|
818
|
-
version: '6.1.3'
|
|
819
|
-
};
|
|
820
815
|
// Split at commas and spaces
|
|
821
816
|
var TAG_SEPARATOR = /,|\s+/;
|
|
822
817
|
// Checks for non-blank characters
|
|
@@ -828,13 +823,24 @@ var Client = /** @class */ (function () {
|
|
|
828
823
|
this.__store = null;
|
|
829
824
|
this.__beforeNotifyHandlers = [];
|
|
830
825
|
this.__afterNotifyHandlers = [];
|
|
826
|
+
this.__notifier = {
|
|
827
|
+
name: '@honeybadger-io/core',
|
|
828
|
+
url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/core',
|
|
829
|
+
version: '6.2.0'
|
|
830
|
+
};
|
|
831
831
|
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);
|
|
832
832
|
this.__initStore();
|
|
833
833
|
this.__transport = transport;
|
|
834
834
|
this.logger = (0, util_1$4.logger)(this);
|
|
835
835
|
}
|
|
836
836
|
Client.prototype.getVersion = function () {
|
|
837
|
-
return
|
|
837
|
+
return this.__notifier.version;
|
|
838
|
+
};
|
|
839
|
+
Client.prototype.getNotifier = function () {
|
|
840
|
+
return this.__notifier;
|
|
841
|
+
};
|
|
842
|
+
Client.prototype.setNotifier = function (notifier) {
|
|
843
|
+
this.__notifier = notifier;
|
|
838
844
|
};
|
|
839
845
|
Client.prototype.configure = function (opts) {
|
|
840
846
|
var _this = this;
|
|
@@ -1038,7 +1044,7 @@ var Client = /** @class */ (function () {
|
|
|
1038
1044
|
tags: uniqueTags,
|
|
1039
1045
|
});
|
|
1040
1046
|
// If we're passed a custom backtrace array, use it
|
|
1041
|
-
// Otherwise we make one.
|
|
1047
|
+
// Otherwise we make one.
|
|
1042
1048
|
if (!Array.isArray(notice.backtrace) || !notice.backtrace.length) {
|
|
1043
1049
|
if (typeof notice.stack !== 'string' || !notice.stack.trim()) {
|
|
1044
1050
|
notice.stack = (0, util_1$4.generateStackTrace)();
|
|
@@ -1082,7 +1088,7 @@ var Client = /** @class */ (function () {
|
|
|
1082
1088
|
var headers = (0, util_1$4.filter)(notice.headers, this.config.filters) || {};
|
|
1083
1089
|
var cgiData = (0, util_1$4.filter)(__assign(__assign({}, notice.cgiData), (0, util_1$4.formatCGIData)(headers, 'HTTP_')), this.config.filters);
|
|
1084
1090
|
return {
|
|
1085
|
-
notifier:
|
|
1091
|
+
notifier: this.__notifier,
|
|
1086
1092
|
breadcrumbs: {
|
|
1087
1093
|
enabled: !!this.config.breadcrumbsEnabled,
|
|
1088
1094
|
trail: notice.__breadcrumbs || []
|
|
@@ -1821,7 +1827,9 @@ stacked_store.StackedStore = StackedStore;
|
|
|
1821
1827
|
}
|
|
1822
1828
|
Honeybadger.prototype.factory = function (opts) {
|
|
1823
1829
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1824
|
-
|
|
1830
|
+
var clone = new Honeybadger(opts);
|
|
1831
|
+
clone.setNotifier(this.getNotifier());
|
|
1832
|
+
return clone;
|
|
1825
1833
|
};
|
|
1826
1834
|
Honeybadger.prototype.configure = function (opts) {
|
|
1827
1835
|
if (opts === void 0) { opts = {}; }
|
|
@@ -1879,14 +1887,21 @@ stacked_store.StackedStore = StackedStore;
|
|
|
1879
1887
|
};
|
|
1880
1888
|
return Honeybadger;
|
|
1881
1889
|
}(core_1.Client));
|
|
1882
|
-
var
|
|
1883
|
-
Object.defineProperty(exports, "Types", { enumerable: true, get: function () { return core_2.Types; } });
|
|
1884
|
-
exports.default = new Honeybadger({
|
|
1890
|
+
var singleton = new Honeybadger({
|
|
1885
1891
|
__plugins: [
|
|
1886
1892
|
(0, uncaught_exception_1.default)(),
|
|
1887
1893
|
(0, unhandled_rejection_1.default)()
|
|
1888
1894
|
],
|
|
1889
1895
|
});
|
|
1896
|
+
var NOTIFIER = {
|
|
1897
|
+
name: '@honeybadger-io/js',
|
|
1898
|
+
url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/js',
|
|
1899
|
+
version: '6.2.0'
|
|
1900
|
+
};
|
|
1901
|
+
singleton.setNotifier(NOTIFIER);
|
|
1902
|
+
var core_2 = src;
|
|
1903
|
+
Object.defineProperty(exports, "Types", { enumerable: true, get: function () { return core_2.Types; } });
|
|
1904
|
+
exports.default = singleton;
|
|
1890
1905
|
|
|
1891
1906
|
} (server$1));
|
|
1892
1907
|
|