@blocklet/sdk 1.16.19 → 1.16.20-beta-cf6dfce1

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.
@@ -31,7 +31,6 @@ const path_1 = require("path");
31
31
  const util_1 = require("@blocklet/meta/lib/util");
32
32
  const axios_1 = __importDefault(require("axios"));
33
33
  const get_1 = __importDefault(require("lodash/get"));
34
- const omit_1 = __importDefault(require("lodash/omit"));
35
34
  const url_join_1 = __importDefault(require("url-join"));
36
35
  const constant_1 = require("@blocklet/constant");
37
36
  const config_1 = require("../config");
@@ -57,7 +56,7 @@ const doCall = async ({ url, headers = {}, ...options }) => {
57
56
  url,
58
57
  responseStatus: (0, get_1.default)(error, 'response.status'),
59
58
  responseData: (0, get_1.default)(error, 'response.data'),
60
- error: (0, omit_1.default)(error, 'response'),
59
+ error: (0, get_1.default)(error, 'message'),
61
60
  });
62
61
  throw error;
63
62
  }
@@ -79,6 +79,8 @@ const getAuthenticatorProps = (options = {}) => ({
79
79
  agentDid,
80
80
  };
81
81
  },
82
+ // FIXME: @zhanghan 这里是否要增加 memberAppInfo 信息
83
+ // 这里用于非 blocklet-service 提供的 did-connect,因为其逻辑的处理是交由 blocklet-app 自己完成的,所以之前一直展示的都是当前应用的信息(member blocklet)
82
84
  async delegator({ request }) {
83
85
  const sourceAppPid = (0, login_1.getSourceAppPid)(request);
84
86
  if (sourceAppPid) {
@@ -3,6 +3,7 @@ type PageData = {
3
3
  title?: string;
4
4
  description?: string;
5
5
  ogImage?: string;
6
+ embed?: string;
6
7
  };
7
8
  type FallbackOptions = {
8
9
  root?: string | undefined;
@@ -49,6 +49,9 @@ const fallback = (file, options = {}) => {
49
49
  <meta name="twitter:card" content="summary_large_image" data-react-helmet="true" />`;
50
50
  source = source.replace('</head>', `${og}</head>`);
51
51
  }
52
+ if (pageData.embed) {
53
+ source = source.replace('</head>', `<link rel="blocklet-open-embed" type="application/json" href="${pageData.embed}" /></head>`);
54
+ }
52
55
  // inline blocklet.js
53
56
  const blockletJs = (0, config_1.getBlockletJs)(pageGroup, pathPrefix);
54
57
  if (blockletJs) {
@@ -32,6 +32,7 @@ declare const _default: {
32
32
  title?: string;
33
33
  description?: string;
34
34
  ogImage?: string;
35
+ embed?: string;
35
36
  }>;
36
37
  }) => (req: import("express").Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>, res: import("express").Response<any, Record<string, any>>, next: import("express").NextFunction) => Promise<void>;
37
38
  sitemap: (generatorFn: (fn: (item: {
package/lib/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const version = "1.16.19";
1
+ declare const version = "1.16.20";
2
2
  export { version };
3
3
  declare const _default: {
4
4
  version: string;
package/lib/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- const version = '1.16.19';
4
+ const version = '1.16.20';
5
5
  exports.version = version;
6
6
  exports.default = { version };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.19",
6
+ "version": "1.16.20-beta-cf6dfce1",
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,20 +26,20 @@
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.19",
30
- "@abtnode/constant": "1.16.19",
31
- "@arcblock/did": "1.18.101",
32
- "@arcblock/did-auth": "1.18.101",
33
- "@arcblock/jwt": "1.18.101",
34
- "@arcblock/ws": "1.18.101",
35
- "@blocklet/constant": "1.16.19",
36
- "@blocklet/env": "1.16.19",
37
- "@blocklet/meta": "1.16.19",
29
+ "@abtnode/client": "1.16.20-beta-cf6dfce1",
30
+ "@abtnode/constant": "1.16.20-beta-cf6dfce1",
31
+ "@arcblock/did": "1.18.103",
32
+ "@arcblock/did-auth": "1.18.103",
33
+ "@arcblock/jwt": "1.18.103",
34
+ "@arcblock/ws": "1.18.103",
35
+ "@blocklet/constant": "1.16.20-beta-cf6dfce1",
36
+ "@blocklet/env": "1.16.20-beta-cf6dfce1",
37
+ "@blocklet/meta": "1.16.20-beta-cf6dfce1",
38
38
  "@did-connect/authenticator": "^2.2.1",
39
39
  "@did-connect/handler": "^2.2.1",
40
40
  "@nedb/core": "^2.1.5",
41
- "@ocap/mcrypto": "1.18.101",
42
- "@ocap/wallet": "1.18.101",
41
+ "@ocap/mcrypto": "1.18.103",
42
+ "@ocap/wallet": "1.18.103",
43
43
  "axios": "^0.27.2",
44
44
  "cheerio": "^1.0.0-rc.12",
45
45
  "fs-extra": "^10.1.0",
@@ -74,5 +74,5 @@
74
74
  "ts-node": "^10.9.1",
75
75
  "typescript": "^5.0.4"
76
76
  },
77
- "gitHead": "d7ad91ba5d0e15c2a311c335e24882b572f4169e"
77
+ "gitHead": "bc2f0c9c5a39b124c7a7b64ec907527b3e8ccdf1"
78
78
  }