@blocklet/sdk 1.16.27-beta-21d213c5 → 1.16.27-beta-8f022f16

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.
@@ -37,9 +37,11 @@ async function getAppInfo({ request, baseUrl, getBlocklet, getNodeInfo, }) {
37
37
  nodeInfo: info,
38
38
  });
39
39
  }
40
+ const blockletName = blocklet.environmentObj?.BLOCKLET_APP_NAME || blocklet.meta?.name;
41
+ const blockletDescription = blocklet.environmentObj?.BLOCKLET_APP_DESCRIPTION || blocklet.meta?.description;
40
42
  return {
41
- name: blocklet.meta.name,
42
- description: blocklet.meta.description || `Connect to ${blocklet.meta.name}`,
43
+ name: blockletName,
44
+ description: blockletDescription || `Connect to ${blockletName}`,
43
45
  icon: (0, ufo_1.joinURL)(baseUrl, constant_1.WELLKNOWN_SERVICE_PATH_PREFIX, `/blocklet/logo?v=${version}`),
44
46
  link: (0, util_1.getConnectAppUrl)({ request, baseUrl }),
45
47
  updateSubEndpoint: true,
@@ -54,10 +56,12 @@ async function getMemberAppInfo({ request, baseUrl, getBlocklet, getNodeInfo, })
54
56
  const [blocklet, info] = await Promise.all([getBlocklet(), getNodeInfo()]);
55
57
  const sourceAppPid = (0, login_1.getSourceAppPid)(request);
56
58
  const version = (0, get_1.default)(blocklet, 'meta.version', '');
57
- if (sourceAppPid) {
59
+ if (sourceAppPid && blocklet) {
60
+ const blockletName = blocklet.environmentObj?.BLOCKLET_APP_NAME || blocklet.meta?.name;
61
+ const blockletDescription = blocklet.environmentObj?.BLOCKLET_APP_DESCRIPTION || blocklet.meta?.description;
58
62
  return {
59
- name: blocklet.meta.name,
60
- description: blocklet.meta.description || `Connect to ${blocklet.meta.name}`,
63
+ name: blockletName,
64
+ description: blockletDescription || `Connect to ${blockletName}`,
61
65
  icon: (0, ufo_1.joinURL)(baseUrl, constant_1.WELLKNOWN_SERVICE_PATH_PREFIX, `/blocklet/logo?v=${version}`),
62
66
  link: (0, util_1.getConnectAppUrl)({ request, baseUrl }),
63
67
  updateSubEndpoint: true,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.27-beta-21d213c5",
6
+ "version": "1.16.27-beta-8f022f16",
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,15 +27,15 @@
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.27-beta-21d213c5",
31
- "@abtnode/constant": "1.16.27-beta-21d213c5",
30
+ "@abtnode/client": "1.16.27-beta-8f022f16",
31
+ "@abtnode/constant": "1.16.27-beta-8f022f16",
32
32
  "@arcblock/did": "1.18.123",
33
33
  "@arcblock/did-auth": "1.18.123",
34
34
  "@arcblock/jwt": "1.18.123",
35
35
  "@arcblock/ws": "1.18.123",
36
- "@blocklet/constant": "1.16.27-beta-21d213c5",
37
- "@blocklet/env": "1.16.27-beta-21d213c5",
38
- "@blocklet/meta": "1.16.27-beta-21d213c5",
36
+ "@blocklet/constant": "1.16.27-beta-8f022f16",
37
+ "@blocklet/env": "1.16.27-beta-8f022f16",
38
+ "@blocklet/meta": "1.16.27-beta-8f022f16",
39
39
  "@did-connect/authenticator": "^2.2.4",
40
40
  "@did-connect/handler": "^2.2.4",
41
41
  "@nedb/core": "^2.1.5",
@@ -76,5 +76,5 @@
76
76
  "ts-node": "^10.9.1",
77
77
  "typescript": "^5.0.4"
78
78
  },
79
- "gitHead": "1beb3311565336a17ee1b049379a8c864f494242"
79
+ "gitHead": "8889fa58ff4cc85b60cd999126341a4a8d0ae9d4"
80
80
  }