posthog-js
Advanced tools
Comparing version 1.158.2 to 1.158.3
@@ -5,3 +5,3 @@ import { PostHog } from '../../posthog-core'; | ||
export declare class ExceptionObserver { | ||
private _endpoint; | ||
private _endpointSuffix; | ||
instance: PostHog; | ||
@@ -8,0 +8,0 @@ remoteEnabled: boolean | undefined; |
{ | ||
"name": "posthog-js", | ||
"version": "1.158.2", | ||
"version": "1.158.3", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
@@ -5,3 +5,3 @@ import { PostHog } from '../../posthog-core'; | ||
export declare class ExceptionObserver { | ||
private _endpoint; | ||
private _endpointSuffix; | ||
instance: PostHog; | ||
@@ -8,0 +8,0 @@ remoteEnabled: boolean | undefined; |
@@ -37,3 +37,3 @@ import { window } from '../../utils/globals'; | ||
// TODO: once BASE_ERROR_ENDPOINT is no longer /e/ this can be removed | ||
this._endpoint = ((_b = this.instance.persistence) === null || _b === void 0 ? void 0 : _b.props[EXCEPTION_CAPTURE_ENDPOINT]) || BASE_ERROR_ENDPOINT; | ||
this._endpointSuffix = ((_b = this.instance.persistence) === null || _b === void 0 ? void 0 : _b.props[EXCEPTION_CAPTURE_ENDPOINT]) || BASE_ERROR_ENDPOINT; | ||
this.startIfEnabled(); | ||
@@ -43,3 +43,4 @@ } | ||
get: function () { | ||
return this._endpoint; | ||
// Always respect any api_host set by the client config | ||
return this.instance.requestRouter.endpointFor('api', this._endpointSuffix); | ||
}, | ||
@@ -100,3 +101,3 @@ enumerable: false, | ||
this.remoteEnabled = !!autocaptureExceptionsResponse || false; | ||
this._endpoint = isObject(autocaptureExceptionsResponse) | ||
this._endpointSuffix = isObject(autocaptureExceptionsResponse) | ||
? autocaptureExceptionsResponse.endpoint || BASE_ERROR_ENDPOINT | ||
@@ -112,3 +113,3 @@ : BASE_ERROR_ENDPOINT; | ||
this.instance.persistence.register((_b = {}, | ||
_b[EXCEPTION_CAPTURE_ENDPOINT] = this._endpoint, | ||
_b[EXCEPTION_CAPTURE_ENDPOINT] = this._endpointSuffix, | ||
_b)); | ||
@@ -115,0 +116,0 @@ } |
@@ -61,3 +61,5 @@ /** | ||
// these errors are sent there too | ||
_posthog.capture('$exception', data, { _url: ((_f = _posthog.exceptionObserver) === null || _f === void 0 ? void 0 : _f.endpoint) || BASE_ERROR_ENDPOINT }); | ||
_posthog.capture('$exception', data, { | ||
_url: ((_f = _posthog.exceptionObserver) === null || _f === void 0 ? void 0 : _f.endpoint) || _posthog.requestRouter.endpointFor('api', BASE_ERROR_ENDPOINT), | ||
}); | ||
return event; | ||
@@ -64,0 +66,0 @@ }; |
{ | ||
"name": "posthog-js", | ||
"version": "1.158.2", | ||
"version": "1.158.3", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
7876684
25457