@yunzhanghu/sdk-nodejs 1.0.10 → 1.0.11

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.
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,7 @@
1
+ include: # include包含模板配置
2
+ - project: "laboratory/gitlab-ci"
3
+ ref: sdk-test
4
+ file: "/sdk-test.gitlab-ci.yml"
5
+
6
+
7
+ image: docker.yunzhanghu.net/base/node18-sdk-unittest:v1.0.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yunzhanghu/sdk-nodejs",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "云账户 SDK for Node.js",
5
5
  "main": "yzh/index.js",
6
6
  "scripts": {
@@ -47,4 +47,4 @@
47
47
  "git add"
48
48
  ]
49
49
  }
50
- }
50
+ }
@@ -252,7 +252,7 @@ export class YZHClient {
252
252
  const { data: axiosData } = result;
253
253
  let response = axiosData;
254
254
  // 需解密
255
- if (encryption) {
255
+ if (encryption && response?.data) {
256
256
  response = { ...response, data: this.decrypt(response.data) };
257
257
  }
258
258
  return response;
@@ -302,7 +302,7 @@ class YZHClient {
302
302
  const { data: axiosData } = result;
303
303
  let response = axiosData;
304
304
  // 需解密
305
- if (encryption) {
305
+ if (encryption && (response === null || response === void 0 ? void 0 : response.data)) {
306
306
  response = { ...response, data: this.decrypt(response.data) };
307
307
  }
308
308
  return response;