@blocklet/ui-react 2.13.27 → 2.13.29
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/lib/common/ws.js +2 -1
- package/package.json +7 -7
- package/src/common/ws.js +2 -1
package/lib/common/ws.js
CHANGED
|
@@ -2,6 +2,7 @@ import { useContext } from 'react';
|
|
|
2
2
|
import { WsClient } from '@arcblock/ws';
|
|
3
3
|
import { SessionContext } from '@arcblock/did-connect/lib/Session';
|
|
4
4
|
import { joinURL } from 'ufo';
|
|
5
|
+
import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
|
|
5
6
|
|
|
6
7
|
const client = {};
|
|
7
8
|
|
|
@@ -10,7 +11,7 @@ export function create(endpoint = 'admin') {
|
|
|
10
11
|
if (!window?.blocklet && window?.env?.apiPrefix) {
|
|
11
12
|
pathPrefix = window.env.apiPrefix;
|
|
12
13
|
}
|
|
13
|
-
const url = joinURL(pathPrefix,
|
|
14
|
+
const url = joinURL(pathPrefix, BLOCKLET_SERVICE_PATH_PREFIX, endpoint);
|
|
14
15
|
return new WsClient(url, {
|
|
15
16
|
heartbeatIntervalMs: 100 * 1000,
|
|
16
17
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.29",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/constant": "^1.16.
|
|
36
|
-
"@abtnode/util": "^1.16.
|
|
37
|
-
"@arcblock/bridge": "^2.13.
|
|
38
|
-
"@arcblock/react-hooks": "^2.13.
|
|
35
|
+
"@abtnode/constant": "^1.16.43",
|
|
36
|
+
"@abtnode/util": "^1.16.43",
|
|
37
|
+
"@arcblock/bridge": "^2.13.29",
|
|
38
|
+
"@arcblock/react-hooks": "^2.13.29",
|
|
39
39
|
"@arcblock/ws": "^1.20.8",
|
|
40
|
-
"@blocklet/constant": "^1.16.
|
|
40
|
+
"@blocklet/constant": "^1.16.43",
|
|
41
41
|
"@blocklet/did-space-react": "^1.0.51",
|
|
42
42
|
"@iconify-icons/logos": "^1.2.36",
|
|
43
43
|
"@iconify-icons/material-symbols": "^1.2.58",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"jest": "^29.7.0",
|
|
95
95
|
"unbuild": "^2.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "98e08de2a4ec51ae6181b57e2c6cf175eabd92ff"
|
|
98
98
|
}
|
package/src/common/ws.js
CHANGED
|
@@ -2,6 +2,7 @@ import { useContext } from 'react';
|
|
|
2
2
|
import { WsClient } from '@arcblock/ws';
|
|
3
3
|
import { SessionContext } from '@arcblock/did-connect/lib/Session';
|
|
4
4
|
import { joinURL } from 'ufo';
|
|
5
|
+
import { BLOCKLET_SERVICE_PATH_PREFIX } from '@arcblock/ux/lib/Util/constant';
|
|
5
6
|
|
|
6
7
|
const client = {};
|
|
7
8
|
|
|
@@ -10,7 +11,7 @@ export function create(endpoint = 'admin') {
|
|
|
10
11
|
if (!window?.blocklet && window?.env?.apiPrefix) {
|
|
11
12
|
pathPrefix = window.env.apiPrefix;
|
|
12
13
|
}
|
|
13
|
-
const url = joinURL(pathPrefix,
|
|
14
|
+
const url = joinURL(pathPrefix, BLOCKLET_SERVICE_PATH_PREFIX, endpoint);
|
|
14
15
|
return new WsClient(url, {
|
|
15
16
|
heartbeatIntervalMs: 100 * 1000,
|
|
16
17
|
});
|