react-mirrorstate 0.2.0 → 0.2.1
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.
|
@@ -5,9 +5,9 @@ class WebSocketConnectionManager {
|
|
|
5
5
|
isConnecting = false;
|
|
6
6
|
listeners = new Map();
|
|
7
7
|
currentStates = new Map();
|
|
8
|
-
getWebSocketConfig() {
|
|
8
|
+
async getWebSocketConfig() {
|
|
9
9
|
try {
|
|
10
|
-
const config =
|
|
10
|
+
const config = await import("virtual:mirrorstate/config");
|
|
11
11
|
return config;
|
|
12
12
|
}
|
|
13
13
|
catch {
|
|
@@ -31,7 +31,7 @@ class WebSocketConnectionManager {
|
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
this.isConnecting = true;
|
|
34
|
-
const config = this.getWebSocketConfig();
|
|
34
|
+
const config = await this.getWebSocketConfig();
|
|
35
35
|
const wsUrl = this.buildWebSocketURL(config.WS_PATH);
|
|
36
36
|
logger(`Connecting to ${wsUrl}`);
|
|
37
37
|
this.ws = new WebSocket(wsUrl);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-mirrorstate",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "React library for bidirectional state synchronization with MirrorState",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"directory": "packages/react-mirrorstate"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"debug": "^4.4.
|
|
26
|
-
"immer": "^10.
|
|
25
|
+
"debug": "^4.4.3",
|
|
26
|
+
"immer": "^10.1.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/debug": "^4.1.12",
|
|
30
|
-
"@types/react": "^
|
|
31
|
-
"react": "^
|
|
32
|
-
"typescript": "^5.
|
|
30
|
+
"@types/react": "^19.2.2",
|
|
31
|
+
"react": "^19.2.0",
|
|
32
|
+
"typescript": "^5.9.3"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": ">=18.0.0"
|