@blocklet/sdk 1.8.5 → 1.8.8
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/env.js +13 -0
- package/package.json +14 -14
package/lib/env.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
const { getParentComponentName } = require('@blocklet/meta/lib/util');
|
|
2
2
|
|
|
3
3
|
const parsePorts = () => JSON.parse(process.env.BLOCKLET_WEB_PORTS);
|
|
4
|
+
const parseMountPoints = () => JSON.parse(process.env.BLOCKLET_MOUNT_POINTS);
|
|
5
|
+
|
|
6
|
+
const getComponentMountPoint = (s) => {
|
|
7
|
+
const mountPoints = parseMountPoints();
|
|
8
|
+
const item = mountPoints.find((x) => [x.title, x.name, x.did].includes(s));
|
|
9
|
+
return item ? item.mountPoint : '';
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const getComponentMountPoints = () => {
|
|
13
|
+
return parseMountPoints();
|
|
14
|
+
};
|
|
4
15
|
|
|
5
16
|
const getWebEndpoint = (name) => {
|
|
6
17
|
const ports = parsePorts();
|
|
@@ -30,4 +41,6 @@ module.exports = Object.freeze({
|
|
|
30
41
|
getWebEndpoint,
|
|
31
42
|
getChildWebEndpoint,
|
|
32
43
|
getParentWebEndpoint,
|
|
44
|
+
getComponentMountPoints,
|
|
45
|
+
getComponentMountPoint,
|
|
33
46
|
});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.8.
|
|
6
|
+
"version": "1.8.8",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/client": "1.8.
|
|
23
|
-
"@abtnode/constant": "1.8.
|
|
24
|
-
"@arcblock/did-auth": "1.17.
|
|
25
|
-
"@arcblock/jwt": "1.17.
|
|
26
|
-
"@arcblock/ws": "1.17.
|
|
27
|
-
"@blocklet/meta": "1.8.
|
|
28
|
-
"@did-connect/authenticator": "^2.
|
|
29
|
-
"@did-connect/handler": "^2.
|
|
22
|
+
"@abtnode/client": "1.8.8",
|
|
23
|
+
"@abtnode/constant": "1.8.8",
|
|
24
|
+
"@arcblock/did-auth": "1.17.11",
|
|
25
|
+
"@arcblock/jwt": "1.17.11",
|
|
26
|
+
"@arcblock/ws": "1.17.11",
|
|
27
|
+
"@blocklet/meta": "1.8.8",
|
|
28
|
+
"@did-connect/authenticator": "^2.1.4",
|
|
29
|
+
"@did-connect/handler": "^2.1.4",
|
|
30
30
|
"@nedb/core": "^1.3.2",
|
|
31
|
-
"@ocap/mcrypto": "1.17.
|
|
32
|
-
"@ocap/wallet": "1.17.
|
|
31
|
+
"@ocap/mcrypto": "1.17.11",
|
|
32
|
+
"@ocap/wallet": "1.17.11",
|
|
33
33
|
"axios": "^0.27.2",
|
|
34
|
-
"fs-extra": "^10.0
|
|
34
|
+
"fs-extra": "^10.1.0",
|
|
35
35
|
"joi": "^17.6.0",
|
|
36
36
|
"lodash": "^4.17.21",
|
|
37
37
|
"lru-cache": "^6.0.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"detect-port": "^1.3.0",
|
|
42
|
-
"jest": "^27.
|
|
42
|
+
"jest": "^27.5.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "8da61db2342d7c53f2b803e5193c03d82bce8f77"
|
|
45
45
|
}
|