@dotbots-boutique/auth-sdk 1.0.20 → 1.0.21
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/cjs/index.js +22 -1
- package/dist/esm/index.js +22 -1
- package/dist/types/DotBotsAuth.d.ts +1 -1
- package/dist/types/index.js +22 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -588,6 +588,27 @@ class DotBotsAuth {
|
|
|
588
588
|
console.info = forward('info', this._console.info);
|
|
589
589
|
console.warn = forward('warn', this._console.warn);
|
|
590
590
|
console.error = forward('error', this._console.error);
|
|
591
|
+
window.addEventListener('error', (event) => {
|
|
592
|
+
window.parent.postMessage({
|
|
593
|
+
type: 'DOTBOTS_LOG',
|
|
594
|
+
level: 'error',
|
|
595
|
+
message: `Uncaught error: ${event.message} (${event.filename}:${event.lineno}:${event.colno})`,
|
|
596
|
+
timestamp: new Date().toISOString(),
|
|
597
|
+
appId,
|
|
598
|
+
}, '*');
|
|
599
|
+
});
|
|
600
|
+
window.addEventListener('unhandledrejection', (event) => {
|
|
601
|
+
const reason = event.reason instanceof Error
|
|
602
|
+
? `${event.reason.message}\n${event.reason.stack ?? ''}`
|
|
603
|
+
: String(event.reason);
|
|
604
|
+
window.parent.postMessage({
|
|
605
|
+
type: 'DOTBOTS_LOG',
|
|
606
|
+
level: 'error',
|
|
607
|
+
message: `Unhandled promise rejection: ${reason}`,
|
|
608
|
+
timestamp: new Date().toISOString(),
|
|
609
|
+
appId,
|
|
610
|
+
}, '*');
|
|
611
|
+
});
|
|
591
612
|
}
|
|
592
613
|
async buildRequest(url, options) {
|
|
593
614
|
const headers = new Headers(options?.headers);
|
|
@@ -618,7 +639,7 @@ class DotBotsAuth {
|
|
|
618
639
|
}
|
|
619
640
|
}
|
|
620
641
|
}
|
|
621
|
-
DotBotsAuth.SDK_VERSION = '1.0.
|
|
642
|
+
DotBotsAuth.SDK_VERSION = '1.0.21';
|
|
622
643
|
|
|
623
644
|
exports.DotBotsAuth = DotBotsAuth;
|
|
624
645
|
exports.DotBotsAuthError = DotBotsAuthError;
|
package/dist/esm/index.js
CHANGED
|
@@ -586,6 +586,27 @@ class DotBotsAuth {
|
|
|
586
586
|
console.info = forward('info', this._console.info);
|
|
587
587
|
console.warn = forward('warn', this._console.warn);
|
|
588
588
|
console.error = forward('error', this._console.error);
|
|
589
|
+
window.addEventListener('error', (event) => {
|
|
590
|
+
window.parent.postMessage({
|
|
591
|
+
type: 'DOTBOTS_LOG',
|
|
592
|
+
level: 'error',
|
|
593
|
+
message: `Uncaught error: ${event.message} (${event.filename}:${event.lineno}:${event.colno})`,
|
|
594
|
+
timestamp: new Date().toISOString(),
|
|
595
|
+
appId,
|
|
596
|
+
}, '*');
|
|
597
|
+
});
|
|
598
|
+
window.addEventListener('unhandledrejection', (event) => {
|
|
599
|
+
const reason = event.reason instanceof Error
|
|
600
|
+
? `${event.reason.message}\n${event.reason.stack ?? ''}`
|
|
601
|
+
: String(event.reason);
|
|
602
|
+
window.parent.postMessage({
|
|
603
|
+
type: 'DOTBOTS_LOG',
|
|
604
|
+
level: 'error',
|
|
605
|
+
message: `Unhandled promise rejection: ${reason}`,
|
|
606
|
+
timestamp: new Date().toISOString(),
|
|
607
|
+
appId,
|
|
608
|
+
}, '*');
|
|
609
|
+
});
|
|
589
610
|
}
|
|
590
611
|
async buildRequest(url, options) {
|
|
591
612
|
const headers = new Headers(options?.headers);
|
|
@@ -616,6 +637,6 @@ class DotBotsAuth {
|
|
|
616
637
|
}
|
|
617
638
|
}
|
|
618
639
|
}
|
|
619
|
-
DotBotsAuth.SDK_VERSION = '1.0.
|
|
640
|
+
DotBotsAuth.SDK_VERSION = '1.0.21';
|
|
620
641
|
|
|
621
642
|
export { DotBotsAuth, DotBotsAuthError };
|
|
@@ -11,7 +11,7 @@ export declare class DotBotsAuth {
|
|
|
11
11
|
private initialized;
|
|
12
12
|
private initializePromise;
|
|
13
13
|
private readonly _console;
|
|
14
|
-
static readonly SDK_VERSION = "1.0.
|
|
14
|
+
static readonly SDK_VERSION = "1.0.21";
|
|
15
15
|
constructor(config: DotBotsConfig);
|
|
16
16
|
initialize(): Promise<void>;
|
|
17
17
|
private _doInitialize;
|
package/dist/types/index.js
CHANGED
|
@@ -586,6 +586,27 @@ class DotBotsAuth {
|
|
|
586
586
|
console.info = forward('info', this._console.info);
|
|
587
587
|
console.warn = forward('warn', this._console.warn);
|
|
588
588
|
console.error = forward('error', this._console.error);
|
|
589
|
+
window.addEventListener('error', (event) => {
|
|
590
|
+
window.parent.postMessage({
|
|
591
|
+
type: 'DOTBOTS_LOG',
|
|
592
|
+
level: 'error',
|
|
593
|
+
message: `Uncaught error: ${event.message} (${event.filename}:${event.lineno}:${event.colno})`,
|
|
594
|
+
timestamp: new Date().toISOString(),
|
|
595
|
+
appId,
|
|
596
|
+
}, '*');
|
|
597
|
+
});
|
|
598
|
+
window.addEventListener('unhandledrejection', (event) => {
|
|
599
|
+
const reason = event.reason instanceof Error
|
|
600
|
+
? `${event.reason.message}\n${event.reason.stack ?? ''}`
|
|
601
|
+
: String(event.reason);
|
|
602
|
+
window.parent.postMessage({
|
|
603
|
+
type: 'DOTBOTS_LOG',
|
|
604
|
+
level: 'error',
|
|
605
|
+
message: `Unhandled promise rejection: ${reason}`,
|
|
606
|
+
timestamp: new Date().toISOString(),
|
|
607
|
+
appId,
|
|
608
|
+
}, '*');
|
|
609
|
+
});
|
|
589
610
|
}
|
|
590
611
|
async buildRequest(url, options) {
|
|
591
612
|
const headers = new Headers(options?.headers);
|
|
@@ -616,6 +637,6 @@ class DotBotsAuth {
|
|
|
616
637
|
}
|
|
617
638
|
}
|
|
618
639
|
}
|
|
619
|
-
DotBotsAuth.SDK_VERSION = '1.0.
|
|
640
|
+
DotBotsAuth.SDK_VERSION = '1.0.21';
|
|
620
641
|
|
|
621
642
|
export { DotBotsAuth, DotBotsAuthError };
|