mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 21:23:34 +00:00
Improve SDK direct function usage (#13353)
* feat: initalize WASM/SDK directly after load * fix: default sdk service trying to set log level * feat: wait for sdk to load in sdk service * fix: add required disposable polyfills * feat: update sdk version * feat: replace rc-specific workaround with global polyfill * fix: sdk service tests
This commit is contained in:
@@ -42,7 +42,7 @@ export class InitService {
|
||||
|
||||
init() {
|
||||
return async () => {
|
||||
await this.sdkLoadService.load();
|
||||
await this.sdkLoadService.loadAndInit();
|
||||
await this.stateService.init();
|
||||
|
||||
const activeAccount = await firstValueFrom(this.accountService.activeAccount$);
|
||||
|
||||
@@ -18,7 +18,7 @@ const supported = (() => {
|
||||
return false;
|
||||
})();
|
||||
|
||||
export class WebSdkLoadService implements SdkLoadService {
|
||||
export class WebSdkLoadService extends SdkLoadService {
|
||||
async load(): Promise<void> {
|
||||
let module: any;
|
||||
if (supported) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import "core-js/stable";
|
||||
import "core-js/proposals/explicit-resource-management";
|
||||
import "zone.js";
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
|
||||
Reference in New Issue
Block a user