@blocklet/sdk 1.8.39 → 1.8.40
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.d.ts +4 -1
- package/lib/env.js +11 -6
- package/lib/index.d.ts +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +12 -11
package/lib/env.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
declare type BlockletPreferences = {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
1
4
|
declare const env: Readonly<{
|
|
2
5
|
appId: string;
|
|
3
6
|
appName: string;
|
|
@@ -8,6 +11,6 @@ declare const env: Readonly<{
|
|
|
8
11
|
cacheDir: string;
|
|
9
12
|
mode: string;
|
|
10
13
|
appStorageEndpoint: string;
|
|
11
|
-
preferences:
|
|
14
|
+
preferences: BlockletPreferences;
|
|
12
15
|
}>;
|
|
13
16
|
export = env;
|
package/lib/env.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
const constant_1 = require("@blocklet/constant");
|
|
6
|
+
const try_json_parse_1 = __importDefault(require("try-json-parse"));
|
|
7
|
+
const preferences = Object.keys(process.env)
|
|
8
|
+
.filter((x) => x.startsWith(constant_1.BLOCKLET_PREFERENCE_PREFIX))
|
|
9
|
+
.reduce((acc, x) => {
|
|
10
|
+
acc[x.replace(constant_1.BLOCKLET_PREFERENCE_PREFIX, '')] = (0, try_json_parse_1.default)(process.env[x]);
|
|
11
|
+
return acc;
|
|
12
|
+
}, {});
|
|
3
13
|
const env = Object.freeze({
|
|
4
14
|
appId: process.env.BLOCKLET_APP_ID,
|
|
5
15
|
appName: process.env.BLOCKLET_APP_NAME,
|
|
@@ -10,11 +20,6 @@ const env = Object.freeze({
|
|
|
10
20
|
cacheDir: process.env.BLOCKLET_CACHE_DIR,
|
|
11
21
|
mode: process.env.BLOCKLET_MODE,
|
|
12
22
|
appStorageEndpoint: process.env.BLOCKLET_APP_SPACE_ENDPOINT,
|
|
13
|
-
preferences
|
|
14
|
-
.filter((x) => x.startsWith(constant_1.BLOCKLET_PREFERENCE_PREFIX))
|
|
15
|
-
.reduce((acc, x) => {
|
|
16
|
-
acc[x.replace(constant_1.BLOCKLET_PREFERENCE_PREFIX, '')] = process.env[x];
|
|
17
|
-
return acc;
|
|
18
|
-
}, {}),
|
|
23
|
+
preferences,
|
|
19
24
|
});
|
|
20
25
|
module.exports = env;
|
package/lib/index.d.ts
CHANGED
package/lib/version.d.ts
CHANGED
package/lib/version.js
CHANGED
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.40",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"typings": "lib/index.d.ts",
|
|
@@ -26,24 +26,25 @@
|
|
|
26
26
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@abtnode/client": "1.8.
|
|
30
|
-
"@abtnode/constant": "1.8.
|
|
31
|
-
"@arcblock/did-auth": "1.18.
|
|
32
|
-
"@arcblock/jwt": "1.18.
|
|
33
|
-
"@arcblock/ws": "1.18.
|
|
34
|
-
"@blocklet/constant": "1.8.
|
|
35
|
-
"@blocklet/meta": "1.8.
|
|
29
|
+
"@abtnode/client": "1.8.40",
|
|
30
|
+
"@abtnode/constant": "1.8.40",
|
|
31
|
+
"@arcblock/did-auth": "1.18.26",
|
|
32
|
+
"@arcblock/jwt": "1.18.26",
|
|
33
|
+
"@arcblock/ws": "1.18.26",
|
|
34
|
+
"@blocklet/constant": "1.8.40",
|
|
35
|
+
"@blocklet/meta": "1.8.40",
|
|
36
36
|
"@did-connect/authenticator": "^2.1.26",
|
|
37
37
|
"@did-connect/handler": "^2.1.26",
|
|
38
38
|
"@nedb/core": "^2.0.5",
|
|
39
|
-
"@ocap/mcrypto": "1.18.
|
|
40
|
-
"@ocap/wallet": "1.18.
|
|
39
|
+
"@ocap/mcrypto": "1.18.26",
|
|
40
|
+
"@ocap/wallet": "1.18.26",
|
|
41
41
|
"axios": "^0.27.2",
|
|
42
42
|
"fs-extra": "^10.1.0",
|
|
43
43
|
"joi": "17.6.3",
|
|
44
44
|
"json-stable-stringify": "^1.0.1",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
46
46
|
"lru-cache": "^6.0.0",
|
|
47
|
+
"try-json-parse": "^1.0.0",
|
|
47
48
|
"url-join": "^4.0.1"
|
|
48
49
|
},
|
|
49
50
|
"resolutions": {
|
|
@@ -68,5 +69,5 @@
|
|
|
68
69
|
"ts-node": "^10.9.1",
|
|
69
70
|
"typescript": "^4.8.4"
|
|
70
71
|
},
|
|
71
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "336dbe0ad2cf512a322358899e56aab3668b1715"
|
|
72
73
|
}
|