@blocklet/sdk 1.16.37-beta-20241225-042616-74a39677 → 1.16.37-beta-20250102-115729-ae7f327e

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.
@@ -50,6 +50,7 @@ const component_api_1 = __importDefault(require("../util/component-api"));
50
50
  const parse_docker_endpoint_1 = require("../util/parse-docker-endpoint");
51
51
  // eslint-disable-next-line require-await
52
52
  const doCall = async ({ url, headers = {}, ...options }, retryOptions = {}) => (0, p_retry_1.default)(async () => {
53
+ const startTime = Date.now();
53
54
  try {
54
55
  const res = await (0, component_api_1.default)({
55
56
  url,
@@ -57,11 +58,13 @@ const doCall = async ({ url, headers = {}, ...options }, retryOptions = {}) => (
57
58
  ...options,
58
59
  headers,
59
60
  });
60
- config_1.logger.info(`call ${url} api success`);
61
+ const duration = Date.now() - startTime;
62
+ config_1.logger.info(`component.call succeed in ${duration}ms: ${url} `);
61
63
  return res;
62
64
  }
63
65
  catch (error) {
64
- config_1.logger.error(`call ${url} api failed`, {
66
+ const duration = Date.now() - startTime;
67
+ config_1.logger.error(`component.call failed in ${duration}ms`, {
65
68
  url,
66
69
  responseStatus: (0, get_1.default)(error, 'response.status'),
67
70
  responseData: (0, get_1.default)(error, 'response.data'),
@@ -1,3 +1,2 @@
1
- import axios from 'axios';
2
- declare const componentApi: axios.AxiosInstance;
1
+ declare const componentApi: import("axios").AxiosInstance;
3
2
  export default componentApi;
@@ -2,6 +2,5 @@
2
2
  * 用于在 SDK 中向 blocklet-service 发起 http 请求
3
3
  * 该封装中,会在请求的 header 中增加签名信息,确保安全性(签名信息的验证由 blocklet-service 的接口去做验证)
4
4
  */
5
- import Axios from 'axios';
6
- declare const axios: Axios.AxiosInstance;
5
+ declare const axios: import("axios").AxiosInstance;
7
6
  export default axios;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.37-beta-20241225-042616-74a39677",
6
+ "version": "1.16.37-beta-20250102-115729-ae7f327e",
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,22 +27,22 @@
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.37-beta-20241225-042616-74a39677",
31
- "@abtnode/constant": "1.16.37-beta-20241225-042616-74a39677",
32
- "@abtnode/util": "1.16.37-beta-20241225-042616-74a39677",
33
- "@arcblock/did": "1.18.162",
34
- "@arcblock/did-auth": "1.18.162",
35
- "@arcblock/jwt": "1.18.162",
36
- "@arcblock/ws": "1.18.162",
37
- "@blocklet/constant": "1.16.37-beta-20241225-042616-74a39677",
38
- "@blocklet/env": "1.16.37-beta-20241225-042616-74a39677",
39
- "@blocklet/meta": "1.16.37-beta-20241225-042616-74a39677",
30
+ "@abtnode/client": "1.16.37-beta-20250102-115729-ae7f327e",
31
+ "@abtnode/constant": "1.16.37-beta-20250102-115729-ae7f327e",
32
+ "@abtnode/util": "1.16.37-beta-20250102-115729-ae7f327e",
33
+ "@arcblock/did": "1.18.166",
34
+ "@arcblock/did-auth": "1.18.166",
35
+ "@arcblock/jwt": "1.18.166",
36
+ "@arcblock/ws": "1.18.166",
37
+ "@blocklet/constant": "1.16.37-beta-20250102-115729-ae7f327e",
38
+ "@blocklet/env": "1.16.37-beta-20250102-115729-ae7f327e",
39
+ "@blocklet/meta": "1.16.37-beta-20250102-115729-ae7f327e",
40
40
  "@did-connect/authenticator": "^2.2.4",
41
41
  "@did-connect/handler": "^2.2.4",
42
42
  "@nedb/core": "^2.1.5",
43
- "@ocap/mcrypto": "1.18.162",
44
- "@ocap/wallet": "1.18.162",
45
- "axios": "^1.7.5",
43
+ "@ocap/mcrypto": "1.18.166",
44
+ "@ocap/wallet": "1.18.166",
45
+ "axios": "^1.7.9",
46
46
  "cheerio": "1.0.0-rc.12",
47
47
  "debug": "^4.3.7",
48
48
  "fs-extra": "^11.2.0",
@@ -81,5 +81,5 @@
81
81
  "ts-node": "^10.9.1",
82
82
  "typescript": "^5.6.3"
83
83
  },
84
- "gitHead": "7cf5cfe0d4d8e356cbf5e175c2028bee8bdf43eb"
84
+ "gitHead": "3f2d744095b2056010fdd1635841857a65f12232"
85
85
  }