From 5d6af51d240d72d451e7a601047986e4d93ddfdc Mon Sep 17 00:00:00 2001 From: Kanailal Manna Date: Mon, 26 Feb 2024 09:16:16 +0530 Subject: [PATCH] Removing circular dependency Resolve: #88 there is a circular dependency between `src/ws/websocket.ts` and `src/api/extensions.ts` ``` Circular dependency: src/ws/websocket.ts -> src/api/extensions.ts -> src/ws/websocket.ts ``` removing dependency from websocket.ts --- package-lock.json | 4 ++-- src/ws/websocket.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f8a05ce..23793fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "neutralino-client-library", + "name": "@neutralinojs/lib", "version": "5.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "neutralino-client-library", + "name": "@neutralinojs/lib", "version": "5.0.1", "license": "MIT", "devDependencies": { diff --git a/src/ws/websocket.ts b/src/ws/websocket.ts index ed72503..e18b0f8 100644 --- a/src/ws/websocket.ts +++ b/src/ws/websocket.ts @@ -1,4 +1,3 @@ -import * as extensions from '../api/extensions'; import * as events from '../browser/events'; import { base64ToBytesArray } from '../helpers'; @@ -59,7 +58,7 @@ function registerLibraryEvents() { return; } - let stats = await extensions.getStats(); + let stats = await sendMessage('extensions.getStats'); for(let extension of stats.connected) { events.dispatch('extensionReady', extension); }