@huaweicloud/huaweicloud-sdk-core 3.0.22-beta → 3.0.26-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 +110 -1
- package/CHANGELOG_CN.md +109 -0
- package/ClientBuilder.js +2 -2
- package/auth/AKSKSigner.js +2 -2
- package/auth/BasicCredentials.js +1 -1
- package/auth/GlobalCredentials.js +1 -1
- package/http/DefaultHttpClient.js +6 -6
- package/logger/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,112 @@
|
|
|
1
|
+
# 3.0.26-beta 2021-12-17
|
|
2
|
+
|
|
3
|
+
### HuaweiCloud SDK CCE
|
|
4
|
+
|
|
5
|
+
- _Features_
|
|
6
|
+
- Support the interface `ShowVersion`
|
|
7
|
+
- _Bug Fix_
|
|
8
|
+
- None
|
|
9
|
+
- _Change_
|
|
10
|
+
- None
|
|
11
|
+
|
|
12
|
+
### HuaweiCloud SDK OCR
|
|
13
|
+
|
|
14
|
+
- _Features_
|
|
15
|
+
- Support the following interfaces��
|
|
16
|
+
- `RecognizeThailandIdcard`
|
|
17
|
+
- `RecognizeMyanmarIdcard`
|
|
18
|
+
- `RecognizeMyanmarDriverLicense`
|
|
19
|
+
- `RecognizeChileIdCard`
|
|
20
|
+
- `RecognizeThailandLicensePlate`
|
|
21
|
+
- _Bug Fix_
|
|
22
|
+
- None
|
|
23
|
+
- _Change_
|
|
24
|
+
- None
|
|
25
|
+
|
|
26
|
+
# 3.0.25-beta 2021-12-10
|
|
27
|
+
|
|
28
|
+
### HuaweiCloud SDK FRS
|
|
29
|
+
|
|
30
|
+
- _Features_
|
|
31
|
+
- None
|
|
32
|
+
- _Bug Fix_
|
|
33
|
+
- None
|
|
34
|
+
- _Change_
|
|
35
|
+
- Remove the response parameters `landmark`, `gender`, `yaw_angle`, `roll_angle`, `pitch_angle`, `headpose`, `smile`, `skin`, `ethnic` from the interface `DetectFaceByFile`
|
|
36
|
+
- Remove the response parameters `landmark`, `gender`, `yaw_angle`, `roll_angle`, `pitch_angle`, `headpose`, `smile`, `skin`, `ethnic` from the interface `DetectFaceByUrl`
|
|
37
|
+
- Remove the response parameters `landmark`, `gender`, `yaw_angle`, `roll_angle`, `pitch_angle`, `headpose`, `smile`, `skin`, `ethnic` from the interface `DetectFaceByBase64`
|
|
38
|
+
|
|
39
|
+
# 3.0.24-beta 2021-11-29
|
|
40
|
+
|
|
41
|
+
### HuaweiCloud SDK CCE
|
|
42
|
+
|
|
43
|
+
- _Features_
|
|
44
|
+
- None
|
|
45
|
+
- _Bug Fix_
|
|
46
|
+
- None
|
|
47
|
+
- _Change_
|
|
48
|
+
- Add the response parameter `cidrs` to the interface `ShowCluster`.
|
|
49
|
+
|
|
50
|
+
### HuaweiCloud SDK EVS
|
|
51
|
+
|
|
52
|
+
- _Features_
|
|
53
|
+
- None
|
|
54
|
+
- _Bug Fix_
|
|
55
|
+
- None
|
|
56
|
+
- _Change_
|
|
57
|
+
- Remove the interface `CinderExportToImage`.
|
|
58
|
+
|
|
59
|
+
### HuaweiCloud SDK ECS
|
|
60
|
+
|
|
61
|
+
- _Features_
|
|
62
|
+
- None
|
|
63
|
+
- _Bug Fix_
|
|
64
|
+
- None
|
|
65
|
+
- _Change_
|
|
66
|
+
- Add the response parameter `os:scheduler_hints` to the interfaces `NovaShowServer` and `NovaListServersDetails`.
|
|
67
|
+
|
|
68
|
+
### HuaweiCloud SDK FunctionGraph
|
|
69
|
+
|
|
70
|
+
- _Features_
|
|
71
|
+
- None
|
|
72
|
+
- _Bug Fix_
|
|
73
|
+
- None
|
|
74
|
+
- _Change_
|
|
75
|
+
- Add the response parameter `ListVersionAliases` to the interface `ListVersionAliases`.
|
|
76
|
+
- Update the request parameter `name` to required of the interfaces `CreateDependency` and `UpdateDependency`.
|
|
77
|
+
- Update the request parameters `name` and `content` to required of the interface `CreateEvent`.
|
|
78
|
+
|
|
79
|
+
# 3.0.23-beta 2021-11-25
|
|
80
|
+
|
|
81
|
+
### HuaweiCloud SDK CCE
|
|
82
|
+
|
|
83
|
+
- _Features_
|
|
84
|
+
- None
|
|
85
|
+
- _Bug Fix_
|
|
86
|
+
- None
|
|
87
|
+
- _Change_
|
|
88
|
+
- Add the response parameter `platformVersion` to the interface `ShowCluster`.
|
|
89
|
+
- Add the enumeration values `RollingBack` and `RollbackFailed` to the request parameter `status` of the interface `ListClusters`.
|
|
90
|
+
|
|
91
|
+
### HuaweiCloud SDK EIP
|
|
92
|
+
|
|
93
|
+
- _Features_
|
|
94
|
+
- None
|
|
95
|
+
- _Bug Fix_
|
|
96
|
+
- None
|
|
97
|
+
- _Change_
|
|
98
|
+
- Add the request and response parameter `alias` to the interfaces `CreatePrePaidPublicip` and `CreatePublicip`.
|
|
99
|
+
- Add the response parameter `alias` to the interfaces `ShowPublicip` and `UpdatePublicip`.
|
|
100
|
+
|
|
101
|
+
### HuaweiCloud SDK OCR
|
|
102
|
+
|
|
103
|
+
- _Features_
|
|
104
|
+
- None
|
|
105
|
+
- _Bug Fix_
|
|
106
|
+
- None
|
|
107
|
+
- _Change_
|
|
108
|
+
- Remove the response parameter `extracted_data` of the interface `RecognizeHandwriting`.
|
|
109
|
+
|
|
1
110
|
# 3.0.22-beta 2021-11-12
|
|
2
111
|
|
|
3
112
|
### HuaweiCloud SDK CCE
|
|
@@ -21,7 +130,7 @@
|
|
|
21
130
|
### HuaweiCloud SDK VPC
|
|
22
131
|
|
|
23
132
|
- _Features_
|
|
24
|
-
- Support interfaces(V3): `AddVpcExtendCidr
|
|
133
|
+
- Support interfaces(V3): `AddVpcExtendCidr`,`RemoveVpcExtendCidr`,`ListVpcs`,`ShowVpc`
|
|
25
134
|
- _Bug Fix_
|
|
26
135
|
- None
|
|
27
136
|
- _Change_
|
package/CHANGELOG_CN.md
CHANGED
|
@@ -1,3 +1,112 @@
|
|
|
1
|
+
# 3.0.26-beta 2021-12-17
|
|
2
|
+
|
|
3
|
+
### HuaweiCloud SDK CCE
|
|
4
|
+
|
|
5
|
+
- _新增特性_
|
|
6
|
+
- 支持接口`ShowVersion`
|
|
7
|
+
- _解决问题_
|
|
8
|
+
- 无
|
|
9
|
+
- _特性变更_
|
|
10
|
+
- 无
|
|
11
|
+
|
|
12
|
+
### HuaweiCloud SDK OCR
|
|
13
|
+
|
|
14
|
+
- _新增特性_
|
|
15
|
+
- 支持以下接口:
|
|
16
|
+
- `RecognizeThailandIdcard`
|
|
17
|
+
- `RecognizeMyanmarIdcard`
|
|
18
|
+
- `RecognizeMyanmarDriverLicense`
|
|
19
|
+
- `RecognizeChileIdCard`
|
|
20
|
+
- `RecognizeThailandLicensePlate`
|
|
21
|
+
- _解决问题_
|
|
22
|
+
- 无
|
|
23
|
+
- _特性变更_
|
|
24
|
+
- 无
|
|
25
|
+
|
|
26
|
+
# 3.0.25-beta 2021-12-10
|
|
27
|
+
|
|
28
|
+
### HuaweiCloud SDK FRS
|
|
29
|
+
|
|
30
|
+
- _新增特性_
|
|
31
|
+
- 无
|
|
32
|
+
- _解决问题_
|
|
33
|
+
- 无
|
|
34
|
+
- _特性变更_
|
|
35
|
+
- 接口`DetectFaceByFile`移除响应参数 `landmark`、`gender`、`yaw_angle`、`roll_angle`、`pitch_angle`、`headpose`、`smile`、`skin`、`ethnic`
|
|
36
|
+
- 接口`DetectFaceByUrl`移除响应参数 `landmark`、`gender`、`yaw_angle`、`roll_angle`、`pitch_angle`、`headpose`、`smile`、`skin`、`ethnic`
|
|
37
|
+
- 接口`DetectFaceByBase64`移除响应参数 `landmark`、`gender`、`yaw_angle`、`roll_angle`、`pitch_angle`、`headpose`、`smile`、`skin`、`ethnic`
|
|
38
|
+
|
|
39
|
+
# 3.0.24-beta 2021-11-29
|
|
40
|
+
|
|
41
|
+
### HuaweiCloud SDK CCE
|
|
42
|
+
|
|
43
|
+
- _新增特性_
|
|
44
|
+
- 无
|
|
45
|
+
- _解决问题_
|
|
46
|
+
- 无
|
|
47
|
+
- _特性变更_
|
|
48
|
+
- 接口`ShowCluster`新增响应参数`cidrs`
|
|
49
|
+
|
|
50
|
+
### HuaweiCloud SDK EVS
|
|
51
|
+
|
|
52
|
+
- _新增特性_
|
|
53
|
+
- 无
|
|
54
|
+
- _解决问题_
|
|
55
|
+
- 无
|
|
56
|
+
- _特性变更_
|
|
57
|
+
- 移除接口`CinderExportToImage`
|
|
58
|
+
|
|
59
|
+
### HuaweiCloud SDK ECS
|
|
60
|
+
|
|
61
|
+
- _新增特性_
|
|
62
|
+
- 无
|
|
63
|
+
- _解决问题_
|
|
64
|
+
- 无
|
|
65
|
+
- _特性变更_
|
|
66
|
+
- 接口`NovaShowServer`和`NovaListServersDetails`新增响应参数`os:scheduler_hints`
|
|
67
|
+
|
|
68
|
+
### HuaweiCloud SDK FunctionGraph
|
|
69
|
+
|
|
70
|
+
- _新增特性_
|
|
71
|
+
- 无
|
|
72
|
+
- _解决问题_
|
|
73
|
+
- 无
|
|
74
|
+
- _特性变更_
|
|
75
|
+
- 接口`ListVersionAliases`新增响应参数`ListVersionAliases`
|
|
76
|
+
- 接口`CreateDependency`和`UpdateDependency`的请求参数`name`改为必填
|
|
77
|
+
- 接口`CreateEvent`的请求参数`name`和`content`改为必填
|
|
78
|
+
|
|
79
|
+
# 3.0.23-beta 2021-11-25
|
|
80
|
+
|
|
81
|
+
### HuaweiCloud SDK CCE
|
|
82
|
+
|
|
83
|
+
- _新增特性_
|
|
84
|
+
- 无
|
|
85
|
+
- _解决问题_
|
|
86
|
+
- 无
|
|
87
|
+
- _特性变更_
|
|
88
|
+
- 接口`ShowCluster`新增响应参数`platformVersion`
|
|
89
|
+
- 接口`ListClusters`的请求参数`status`新增枚举值`RollingBack`和`RollbackFailed`
|
|
90
|
+
|
|
91
|
+
### HuaweiCloud SDK EIP
|
|
92
|
+
|
|
93
|
+
- _新增特性_
|
|
94
|
+
- 无
|
|
95
|
+
- _解决问题_
|
|
96
|
+
- 无
|
|
97
|
+
- _特性变更_
|
|
98
|
+
- 接口`CreatePrePaidPublicip`、`CreatePublicip`新增请求和响应参数`alias`
|
|
99
|
+
- 接口`ShowPublicip`、`UpdatePublicip`新增响应参数`alias`
|
|
100
|
+
|
|
101
|
+
### HuaweiCloud SDK OCR
|
|
102
|
+
|
|
103
|
+
- _新增特性_
|
|
104
|
+
- 无
|
|
105
|
+
- _解决问题_
|
|
106
|
+
- 无
|
|
107
|
+
- _特性变更_
|
|
108
|
+
- 接口`RecognizeHandwriting`移除响应参数`extracted_data`
|
|
109
|
+
|
|
1
110
|
# 3.0.22-beta 2021-11-12
|
|
2
111
|
|
|
3
112
|
### 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, "
|
|
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(), ""
|
|
100
|
+
var definedCredPath = path.join(this.init().getPath(), "".concat(sdkType));
|
|
101
101
|
if (!obj[sdkType]) {
|
|
102
102
|
credentialTYPE = require(definedCredPath);
|
|
103
103
|
// 多加一层
|
package/auth/AKSKSigner.js
CHANGED
|
@@ -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
|
|
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
|
|
156
|
+
canonicalHeaders += "".concat(lowerKey, ":").concat(allHeaders[key], "\n");
|
|
157
157
|
}
|
|
158
158
|
return canonicalHeaders;
|
|
159
159
|
};
|
package/auth/BasicCredentials.js
CHANGED
|
@@ -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("{"
|
|
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("{"
|
|
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: "
|
|
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
|
|
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: "
|
|
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: "
|
|
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:"
|
|
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