@blocklet/sdk 1.16.18-beta-aa01bd8e → 1.16.18-beta-bb4ebacc
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/config.js +0 -3
- package/lib/index.d.ts +1 -0
- package/lib/service/notification.js +0 -25
- package/lib/types/notification.d.ts +1 -0
- package/lib/validators/notification.js +1 -0
- package/package.json +10 -10
package/lib/config.js
CHANGED
|
@@ -301,9 +301,6 @@ if (inRuntimeEnv && !process.env.BLOCKLET_HOOK_NAME) {
|
|
|
301
301
|
notification_1.default.on(constant_1.BlockletInternalEvents.componentStarted, runInServer(refreshBlockletJs, 'new'));
|
|
302
302
|
notification_1.default.on(constant_1.BlockletInternalEvents.componentStopped, runInServer(refreshBlockletJs, 'new'));
|
|
303
303
|
notification_1.default.on(constant_1.BlockletInternalEvents.componentRemoved, runInServer(refreshBlockletJs, 'new'));
|
|
304
|
-
// for backward compatibility
|
|
305
|
-
notification_1.default.on(constant_1.BlockletInternalEvents.componentsUpdated, runInServer(_handleComponentUpdateOld, 'old'));
|
|
306
|
-
notification_1.default.on(constant_1.BlockletInternalEvents.componentsUpdated, runInServer(refreshBlockletJs, 'old'));
|
|
307
304
|
// Do an initial fetch
|
|
308
305
|
fetchBlockletJs();
|
|
309
306
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ const events_1 = __importDefault(require("events"));
|
|
|
33
33
|
const ws_1 = require("@arcblock/ws");
|
|
34
34
|
const channel_1 = require("@blocklet/meta/lib/channel");
|
|
35
35
|
const constant_1 = require("@blocklet/constant");
|
|
36
|
-
const server_version_1 = __importDefault(require("../util/server-version"));
|
|
37
36
|
const check_blocklet_env_1 = __importDefault(require("../util/check-blocklet-env"));
|
|
38
37
|
const send_notification_1 = require("../util/send-notification");
|
|
39
38
|
const constants_1 = require("../util/constants");
|
|
@@ -184,30 +183,6 @@ const initClient = () => {
|
|
|
184
183
|
});
|
|
185
184
|
}
|
|
186
185
|
});
|
|
187
|
-
// for backward compatibility, should be removed if Server@1.6.14 is not supported anymore
|
|
188
|
-
messageChannel.on(event, ({ status, response } = {}) => {
|
|
189
|
-
if (server_version_1.default.gt('1.16.14')) {
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
if (status === 'ok') {
|
|
193
|
-
const { data, sender } = response;
|
|
194
|
-
// verify sender is server
|
|
195
|
-
if (!Jwt.verify(sender.token, process.env.ABT_NODE_PK)) {
|
|
196
|
-
const message = `verify sender failed in internal events. event: ${event}, sender: ${JSON.stringify(sender)}`;
|
|
197
|
-
emitError({ message });
|
|
198
|
-
console.error(message);
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
emitter.emit(event, data);
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
emitError(response);
|
|
205
|
-
console.error({
|
|
206
|
-
status,
|
|
207
|
-
response,
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
186
|
});
|
|
212
187
|
appPublicChannel.on(notification_1.NOTIFICATION_TYPES.HI, ({ status, response } = {}) => {
|
|
213
188
|
if (status === 'ok') {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.18-beta-
|
|
6
|
+
"version": "1.16.18-beta-bb4ebacc",
|
|
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,24 @@
|
|
|
26
26
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@abtnode/client": "1.16.18-beta-
|
|
30
|
-
"@abtnode/constant": "1.16.18-beta-
|
|
29
|
+
"@abtnode/client": "1.16.18-beta-bb4ebacc",
|
|
30
|
+
"@abtnode/constant": "1.16.18-beta-bb4ebacc",
|
|
31
31
|
"@arcblock/did": "1.18.95",
|
|
32
32
|
"@arcblock/did-auth": "1.18.95",
|
|
33
33
|
"@arcblock/jwt": "1.18.95",
|
|
34
34
|
"@arcblock/ws": "1.18.95",
|
|
35
|
-
"@blocklet/constant": "1.16.18-beta-
|
|
36
|
-
"@blocklet/env": "1.16.18-beta-
|
|
37
|
-
"@blocklet/meta": "1.16.18-beta-
|
|
38
|
-
"@did-connect/authenticator": "^2.2.
|
|
39
|
-
"@did-connect/handler": "^2.2.
|
|
35
|
+
"@blocklet/constant": "1.16.18-beta-bb4ebacc",
|
|
36
|
+
"@blocklet/env": "1.16.18-beta-bb4ebacc",
|
|
37
|
+
"@blocklet/meta": "1.16.18-beta-bb4ebacc",
|
|
38
|
+
"@did-connect/authenticator": "^2.2.1",
|
|
39
|
+
"@did-connect/handler": "^2.2.1",
|
|
40
40
|
"@nedb/core": "^2.1.5",
|
|
41
41
|
"@ocap/mcrypto": "1.18.95",
|
|
42
42
|
"@ocap/wallet": "1.18.95",
|
|
43
43
|
"axios": "^0.27.2",
|
|
44
44
|
"cheerio": "^1.0.0-rc.12",
|
|
45
45
|
"fs-extra": "^10.1.0",
|
|
46
|
-
"joi": "17.
|
|
46
|
+
"joi": "17.11.0",
|
|
47
47
|
"json-stable-stringify": "^1.0.1",
|
|
48
48
|
"lodash": "^4.17.21",
|
|
49
49
|
"lru-cache": "^6.0.0",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"ts-node": "^10.9.1",
|
|
75
75
|
"typescript": "^5.0.4"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "aca7ff8eb508ecf586108b99a9e07ceab2a62430"
|
|
78
78
|
}
|