@blocklet/sdk 1.16.41-beta-20250319-131732-1224cca5 → 1.16.41-beta-20250321-223009-25dace48

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.
@@ -20,7 +20,9 @@ function getFederatedMasterAppInfo({ blocklet, sourceAppPid, version, groupPathP
20
20
  const master = federated.sites.find((x) => x.appPid === sourceAppPid);
21
21
  if (!master) {
22
22
  config_1.default.logger.error('Federated master app not found', { sourceAppPid });
23
- throw new Error(`Federated master app not found: ${sourceAppPid}`);
23
+ // FIXME: @zhanghan 暂时先返回 null,确保 service 不会挂掉
24
+ return null;
25
+ // throw new Error(`Federated master app not found: ${sourceAppPid}`);
24
26
  }
25
27
  return {
26
28
  name: master.appName,
@@ -62,7 +62,7 @@ class WalletHandlers extends did_auth_1.WalletHandlers {
62
62
  ...opts,
63
63
  });
64
64
  this.getConnectedDid = ({ req, didwallet, extraParams }) => {
65
- if (extraParams && extraParams.autoConnect === 'false') {
65
+ if (['false', false].includes(extraParams?.autoConnect)) {
66
66
  return null;
67
67
  }
68
68
  if (!this.enableConnect) {
@@ -79,6 +79,10 @@ class WalletHandlers extends did_auth_1.WalletHandlers {
79
79
  // @ts-ignore
80
80
  this.on('updated', (session) => {
81
81
  this.sendToRelayFn(session.token, 'updated', session).catch(console.error);
82
+ // NOTICE: 如果当前的 did-connect 会话是和其他会话是关联的,则需要将消息广播到关联的 channel
83
+ if (session.sourceToken) {
84
+ this.sendToRelayFn(session.sourceToken, 'updated', session).catch(console.error);
85
+ }
82
86
  });
83
87
  }
84
88
  attach({ onStart = noop, ...opts }) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.41-beta-20250319-131732-1224cca5",
6
+ "version": "1.16.41-beta-20250321-223009-25dace48",
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",
@@ -27,16 +27,16 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/client": "1.16.41-beta-20250319-131732-1224cca5",
31
- "@abtnode/constant": "1.16.41-beta-20250319-131732-1224cca5",
32
- "@abtnode/util": "1.16.41-beta-20250319-131732-1224cca5",
30
+ "@abtnode/client": "1.16.41-beta-20250321-223009-25dace48",
31
+ "@abtnode/constant": "1.16.41-beta-20250321-223009-25dace48",
32
+ "@abtnode/util": "1.16.41-beta-20250321-223009-25dace48",
33
33
  "@arcblock/did": "1.19.15",
34
34
  "@arcblock/did-auth": "1.19.15",
35
35
  "@arcblock/jwt": "1.19.15",
36
36
  "@arcblock/ws": "1.19.15",
37
- "@blocklet/constant": "1.16.41-beta-20250319-131732-1224cca5",
38
- "@blocklet/env": "1.16.41-beta-20250319-131732-1224cca5",
39
- "@blocklet/meta": "1.16.41-beta-20250319-131732-1224cca5",
37
+ "@blocklet/constant": "1.16.41-beta-20250321-223009-25dace48",
38
+ "@blocklet/env": "1.16.41-beta-20250321-223009-25dace48",
39
+ "@blocklet/meta": "1.16.41-beta-20250321-223009-25dace48",
40
40
  "@did-connect/authenticator": "^2.2.7",
41
41
  "@did-connect/handler": "^2.2.7",
42
42
  "@nedb/core": "^2.1.5",
@@ -82,5 +82,5 @@
82
82
  "ts-node": "^10.9.1",
83
83
  "typescript": "^5.6.3"
84
84
  },
85
- "gitHead": "a05391c26247f000ae87f30a36789313857f313e"
85
+ "gitHead": "b12975e9604c4faf73766feb325f9124226bfff1"
86
86
  }