@blocklet/sdk 1.6.22-beta → 1.6.22-beta.2

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.
@@ -28,15 +28,15 @@ class WalletAuthenticator extends Authenticator {
28
28
  const info = await closure(options.appInfo)(...args);
29
29
 
30
30
  const { request, baseUrl } = args[0];
31
- const rootPath = '/';
32
- const pathPrefix = request.headers['x-path-prefix'] || rootPath;
33
- const groupPathPrefix = request.headers['x-group-path-prefix'] || rootPath;
31
+ const pathPrefix = request.headers['x-path-prefix'] || '/';
32
+ const groupPathPrefix = request.headers['x-group-path-prefix'] || '/';
34
33
  const blockletDid = request.headers['x-blocklet-did'];
35
34
 
36
35
  let appUrl = baseUrl;
37
36
  let subscriptionPath = joinUrl(groupPathPrefix, AUTH_SERVICE_PREFIX, 'websocket');
38
- if (env.isComponent && pathPrefix !== rootPath) {
39
- appUrl = joinUrl(appUrl, rootPath).replace(pathPrefix, rootPath);
37
+ // Child blocklets should set appInfo.link to exactly the same path as the root blocklet
38
+ if (env.isComponent && pathPrefix !== groupPathPrefix) {
39
+ appUrl = joinUrl(appUrl, '/').replace(pathPrefix, groupPathPrefix);
40
40
  subscriptionPath = joinUrl(pathPrefix, subscriptionPath);
41
41
  }
42
42
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.6.22-beta",
6
+ "version": "1.6.22-beta.2",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "files": [