@huaweicloud/huaweicloud-sdk-core 3.0.22-beta → 3.0.23-beta

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/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ # 3.0.23-beta 2021-11-25
2
+
3
+ ### HuaweiCloud SDK CCE
4
+
5
+ - _Features_
6
+ - None
7
+ - _Bug Fix_
8
+ - None
9
+ - _Change_
10
+ - Add the response parameter `platformVersion` to the interface `ShowCluster`.
11
+ - Add the enumeration values `RollingBack` and `RollbackFailed` to the request parameter `status` of the interface `ListClusters`.
12
+
13
+ ### HuaweiCloud SDK EIP
14
+
15
+ - _Features_
16
+ - None
17
+ - _Bug Fix_
18
+ - None
19
+ - _Change_
20
+ - Add the request and response parameter `alias` to the interfaces `CreatePrePaidPublicip` and `CreatePublicip`.
21
+ - Add the response parameter `alias` to the interfaces `ShowPublicip` and `UpdatePublicip`.
22
+
23
+ ### HuaweiCloud SDK OCR
24
+
25
+ - _Features_
26
+ - None
27
+ - _Bug Fix_
28
+ - None
29
+ - _Change_
30
+ - Remove the response parameter `extracted_data` of the interface `RecognizeHandwriting`.
31
+
1
32
  # 3.0.22-beta 2021-11-12
2
33
 
3
34
  ### HuaweiCloud SDK CCE
package/CHANGELOG_CN.md CHANGED
@@ -1,3 +1,34 @@
1
+ # 3.0.23-beta 2021-11-25
2
+
3
+ ### HuaweiCloud SDK CCE
4
+
5
+ - _新增特性_
6
+ - 无
7
+ - _解决问题_
8
+ - 无
9
+ - _特性变更_
10
+ - 接口`ShowCluster`新增响应参数`platformVersion`
11
+ - 接口`ListClusters`的请求参数`status`新增枚举值`RollingBack`和`RollbackFailed`
12
+
13
+ ### HuaweiCloud SDK EIP
14
+
15
+ - _新增特性_
16
+ - 无
17
+ - _解决问题_
18
+ - 无
19
+ - _特性变更_
20
+ - 接口`CreatePrePaidPublicip`、`CreatePublicip`新增请求和响应参数`alias`
21
+ - 接口`ShowPublicip`、`UpdatePublicip`新增响应参数`alias`
22
+
23
+ ### HuaweiCloud SDK OCR
24
+
25
+ - _新增特性_
26
+ - 无
27
+ - _解决问题_
28
+ - 无
29
+ - _特性变更_
30
+ - 接口`RecognizeHandwriting`移除响应参数`extracted_data`
31
+
1
32
  # 3.0.22-beta 2021-11-12
2
33
 
3
34
  ### HuaweiCloud SDK CCE
package/ClientBuilder.js CHANGED
@@ -63,7 +63,7 @@ var ClientBuilder = /** @class */ (function () {
63
63
  this.credential = this.getCredentialFromEnvironment();
64
64
  }
65
65
  if (!this.credential) {
66
- throw new SdkException_1.SdkException("credential can not be null, " + this.credentialType + "Credential objects are required");
66
+ throw new SdkException_1.SdkException("credential can not be null, ".concat(this.credentialType, "Credential objects are required"));
67
67
  }
68
68
  var client = new DefaultHttpClient_1.DefaultHttpClient(axiosOptions);
69
69
  var hcClient = new HcClient_1.HcClient(client);
@@ -97,7 +97,7 @@ var ClientBuilder = /** @class */ (function () {
97
97
  break;
98
98
  default:
99
99
  var obj = {};
100
- var definedCredPath = path.join(this.init().getPath(), "" + sdkType);
100
+ var definedCredPath = path.join(this.init().getPath(), "".concat(sdkType));
101
101
  if (!obj[sdkType]) {
102
102
  credentialTYPE = require(definedCredPath);
103
103
  // 多加一层
@@ -106,7 +106,7 @@ var AKSKSigner = /** @class */ (function () {
106
106
  var stringToSign = this.getStringToSign(this.SDK_SIGNING_ALGORITHM, dateTimeStamp, canonicalRequestHash);
107
107
  var signatureString = this.hmacSHA256(credential.getSk(), stringToSign);
108
108
  var authorization = {
109
- Authorization: this.SDK_SIGNING_ALGORITHM + " Access=" + credential.getAk() + ", SignedHeaders=" + signedHeaderNames + ", Signature=" + signatureString
109
+ Authorization: "".concat(this.SDK_SIGNING_ALGORITHM, " Access=").concat(credential.getAk(), ", SignedHeaders=").concat(signedHeaderNames, ", Signature=").concat(signatureString)
110
110
  };
111
111
  Object.assign(allHeaders, authorization);
112
112
  return allHeaders;
@@ -153,7 +153,7 @@ var AKSKSigner = /** @class */ (function () {
153
153
  for (var _i = 0, sortedKeys_1 = sortedKeys; _i < sortedKeys_1.length; _i++) {
154
154
  var key = sortedKeys_1[_i];
155
155
  var lowerKey = key.toLocaleLowerCase();
156
- canonicalHeaders += lowerKey + ":" + allHeaders[key] + "\n";
156
+ canonicalHeaders += "".concat(lowerKey, ":").concat(allHeaders[key], "\n");
157
157
  }
158
158
  return canonicalHeaders;
159
159
  };
@@ -119,7 +119,7 @@ var BasicCredentials = /** @class */ (function () {
119
119
  }
120
120
  return Object.keys(params).reduce(function (parsedPath, param) {
121
121
  var value = encodeURIComponent(params[param]);
122
- return parsedPath.replace(new RegExp("{" + param + "}"), value);
122
+ return parsedPath.replace(new RegExp("{".concat(param, "}")), value);
123
123
  }, path);
124
124
  };
125
125
  return BasicCredentials;
@@ -130,6 +130,6 @@ function parsePath(path, params) {
130
130
  }
131
131
  return Object.keys(params).reduce(function (parsedPath, param) {
132
132
  var value = encodeURIComponent(params[param]);
133
- return parsedPath.replace(new RegExp("{" + param + "}"), value);
133
+ return parsedPath.replace(new RegExp("{".concat(param, "}")), value);
134
134
  }, path);
135
135
  }
@@ -102,24 +102,24 @@ var DefaultHttpClient = /** @class */ (function () {
102
102
  });
103
103
  this.axiosInstance.interceptors.request.use(function (request) {
104
104
  var url = request.url, method = request.method, data = request.data, headers = request.headers;
105
- _this.logger.debug("Request: " + method.toUpperCase() + " " + url + " " + JSON.stringify(headers) + " " + JSON.stringify(data));
105
+ _this.logger.debug("Request: ".concat(method.toUpperCase(), " ").concat(url, " ").concat(JSON.stringify(headers), " ").concat(JSON.stringify(data)));
106
106
  return request;
107
107
  });
108
108
  this.axiosInstance.interceptors.response.use(function (response) {
109
109
  var _a = response.config, url = _a.url, method = _a.method, status = response.status, statusText = response.statusText, headers = response.headers;
110
110
  var statusStr = '';
111
111
  if (status && statusText) {
112
- statusStr += status + ":" + statusText + " ";
112
+ statusStr += "".concat(status, ":").concat(statusText, " ");
113
113
  }
114
114
  else if (status) {
115
- statusStr += status + " ";
115
+ statusStr += "".concat(status, " ");
116
116
  }
117
117
  else if (statusText) {
118
- statusStr += statusText + " ";
118
+ statusStr += "".concat(statusText, " ");
119
119
  }
120
120
  var requestId = response.headers ? response.headers['x-request-id'] : undefined;
121
121
  var reponseLength = response.result ? JSON.stringify(response.result).length : 1;
122
- _this.logger.debug("Response: " + method.toUpperCase() + " " + statusStr + " " + url + " " + JSON.stringify(headers) + " " + reponseLength + " " + requestId);
122
+ _this.logger.debug("Response: ".concat(method.toUpperCase(), " ").concat(statusStr, " ").concat(url, " ").concat(JSON.stringify(headers), " ").concat(reponseLength, " ").concat(requestId));
123
123
  return response;
124
124
  });
125
125
  delete this.axiosInstance.defaults.headers.post['Content-Type'];
@@ -152,7 +152,7 @@ var DefaultHttpClient = /** @class */ (function () {
152
152
  case 0:
153
153
  endpoint = httpRequest.endpoint, queryParams = httpRequest.queryParams, method = httpRequest.method, data = httpRequest.data, headers = httpRequest.headers;
154
154
  headers = headers || {};
155
- this.logger.debug("send request start: " + endpoint + " ");
155
+ this.logger.debug("send request start: ".concat(endpoint, " "));
156
156
  url = endpoint;
157
157
  url = stripTrailingSlash(url);
158
158
  headers['User-Agent'] = "huaweicloud-usdk-nodejs/3.0";
package/logger/index.js CHANGED
@@ -120,7 +120,7 @@ function getLogger(name, level, existingLogger) {
120
120
  if (level !== undefined) {
121
121
  logger.setLevel(level);
122
122
  }
123
- logger.setName("nodesdk:" + name + ":" + instanceId);
123
+ logger.setName("nodesdk:".concat(name, ":").concat(instanceId));
124
124
  if (process.env.DEBUG === "DEBUG") {
125
125
  logger.setLevel(LogLevel.DEBUG);
126
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huaweicloud/huaweicloud-sdk-core",
3
- "version": "3.0.22-beta",
3
+ "version": "3.0.23-beta",
4
4
  "description": "Core code for Huaweicloud SDK for Node.js",
5
5
  "main": "huaweicloud-sdk-core.js",
6
6
  "typings": "huaweicloud-sdk-core.d.ts",