1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-24 16:43:27 +00:00
Files
browser/apps/desktop/native-messaging-test-runner/src/sdk-load.service.ts
Robyn MacCallum 3ecf3584de Fix DDG Native Messaging Test Runner Errors (#18355)
* Fix TS errors

* sdk loader mock

* Downgrade packages to be CommonJS-compatible

* Fix formattinmg

* Move logs to service

* package lock fixes
2026-02-17 09:39:07 -08:00

23 lines
805 B
TypeScript

import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk-load.service";
import { LogUtils } from "./log-utils";
/**
* SDK Load Service for the native messaging test runner.
* For Node.js environments, the SDK's Node.js build automatically loads WASM from the filesystem.
* No additional initialization is needed.
*/
export class TestRunnerSdkLoadService extends SdkLoadService {
async load(): Promise<void> {
// In Node.js, @bitwarden/sdk-internal automatically loads the WASM file
// from node/bitwarden_wasm_internal_bg.wasm using fs.readFileSync.
// No explicit loading is required.
}
override async loadAndInit(): Promise<void> {
LogUtils.logInfo("Initializing SDK");
await super.loadAndInit();
LogUtils.logSuccess("SDK initialized");
}
}