@huaweicloud/huaweicloud-sdk-core 3.1.21 → 3.1.22
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 +38 -0
- package/CHANGELOG_CN.md +38 -0
- package/HcClient.js +11 -4
- package/README_CN.md +1 -1
- package/SdkStreamResponse.d.ts +4 -0
- package/SdkStreamResponse.js +29 -0
- package/auth/AKSKSigner.js +2 -1
- package/http/DefaultHttpClient.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
# 3.1.22 2023-02-02
|
|
2
|
+
|
|
3
|
+
### HuaweiCloud SDK AOS
|
|
4
|
+
|
|
5
|
+
- _Features_
|
|
6
|
+
- Support the interface `UpdateStack`
|
|
7
|
+
- _Bug Fix_
|
|
8
|
+
- None
|
|
9
|
+
- _Change_
|
|
10
|
+
- Add the request parameter `executor` to the interface `ApplyExecutionPlan`
|
|
11
|
+
- Changes of the interface `ListStackEvents`:
|
|
12
|
+
- Add the request parameters `filter`, `field`
|
|
13
|
+
- Remove the response parameters `resource_id_key`, `resource_id_value`, `resource_name`, `resource_type`, `time`, `event_type`, `event_message`, `elapsed_seconds`
|
|
14
|
+
- The response parameter `stack_name` changed to required of the interface `GetStackMetadata`
|
|
15
|
+
- Add the request parameter `executor` to the interface `CreateStack`
|
|
16
|
+
- Changes of the interface `ListStackResources`:
|
|
17
|
+
- Add the response parameter `index_key`
|
|
18
|
+
- Remove the enum values `DELETION_SKIPPED` from the response parameter `resource_status`
|
|
19
|
+
- Add the request parameter `executor` to the interface `DeployStack`
|
|
20
|
+
|
|
21
|
+
### HuaweiCloud SDK IMS
|
|
22
|
+
|
|
23
|
+
- _Features_
|
|
24
|
+
- None
|
|
25
|
+
- _Bug Fix_
|
|
26
|
+
- None
|
|
27
|
+
- _Change_
|
|
28
|
+
- Add the enum values `IsoImage` to the request parameter `type` to the interface `CreateImage`
|
|
29
|
+
|
|
30
|
+
### HuaweiCloud SDK Moderation
|
|
31
|
+
|
|
32
|
+
- _Features_
|
|
33
|
+
- None
|
|
34
|
+
- _Bug Fix_
|
|
35
|
+
- None
|
|
36
|
+
- _Change_
|
|
37
|
+
- Add the request parameter `white_glossaries` to the interface `RunTextModeration`
|
|
38
|
+
|
|
1
39
|
# 3.1.21 2023-01-12
|
|
2
40
|
|
|
3
41
|
### HuaweiCloud SDK FRS
|
package/CHANGELOG_CN.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
# 3.1.22 2023-02-02
|
|
2
|
+
|
|
3
|
+
### HuaweiCloud SDK AOS
|
|
4
|
+
|
|
5
|
+
- _新增特性_
|
|
6
|
+
- 支持接口`UpdateStack`
|
|
7
|
+
- _解决问题_
|
|
8
|
+
- 无
|
|
9
|
+
- _特性变更_
|
|
10
|
+
- 接口`ApplyExecutionPlan`新增请求参数 `executor`
|
|
11
|
+
- 接口`ListStackEvents`:
|
|
12
|
+
- 新增请求参数 `filter`、`field`
|
|
13
|
+
- 移除响应参数 `resource_id_key`、`resource_id_value`、`resource_name`、`resource_type`、`time`、`event_type`、`event_message`、`elapsed_seconds`
|
|
14
|
+
- 接口`GetStackMetadata`响应参数`stack_name`改为必填
|
|
15
|
+
- 接口`CreateStack`新增请求参数 `executor`
|
|
16
|
+
- 接口`ListStackResources`:
|
|
17
|
+
- 新增响应参数 `index_key`
|
|
18
|
+
- 响应参数`resource_status`移除枚举值`DELETION_SKIPPED`
|
|
19
|
+
- 接口`DeployStack`新增请求参数 `executor`
|
|
20
|
+
|
|
21
|
+
### HuaweiCloud SDK IMS
|
|
22
|
+
|
|
23
|
+
- _新增特性_
|
|
24
|
+
- 无
|
|
25
|
+
- _解决问题_
|
|
26
|
+
- 无
|
|
27
|
+
- _特性变更_
|
|
28
|
+
- 接口`CreateImage`请求参数`type`新增枚举值`IsoImage`
|
|
29
|
+
|
|
30
|
+
### HuaweiCloud SDK Moderation
|
|
31
|
+
|
|
32
|
+
- _新增特性_
|
|
33
|
+
- 无
|
|
34
|
+
- _解决问题_
|
|
35
|
+
- 无
|
|
36
|
+
- _特性变更_
|
|
37
|
+
- 接口`RunTextModeration`新增请求参数 `white_glossaries`
|
|
38
|
+
|
|
1
39
|
# 3.1.21 2023-01-12
|
|
2
40
|
|
|
3
41
|
### HuaweiCloud SDK FRS
|
package/HcClient.js
CHANGED
|
@@ -60,6 +60,7 @@ exports.HcClient = void 0;
|
|
|
60
60
|
var IHttpRequestBuilder_1 = require("./http/IHttpRequestBuilder");
|
|
61
61
|
var ExceptionUtil_1 = require("./exception/ExceptionUtil");
|
|
62
62
|
var logger_1 = require("./logger");
|
|
63
|
+
var SdkStreamResponse_1 = require("./SdkStreamResponse");
|
|
63
64
|
var HcClient = /** @class */ (function () {
|
|
64
65
|
function HcClient(client) {
|
|
65
66
|
this.proxyAgent = '';
|
|
@@ -166,15 +167,21 @@ var HcClient = /** @class */ (function () {
|
|
|
166
167
|
HcClient.prototype.extractResponse = function (result) {
|
|
167
168
|
var headers = result.headers;
|
|
168
169
|
var contentType = headers['content-type'];
|
|
169
|
-
contentType = contentType.toLowerCase();
|
|
170
|
-
if (contentType
|
|
171
|
-
|
|
170
|
+
contentType = contentType === null || contentType === void 0 ? void 0 : contentType.toLowerCase();
|
|
171
|
+
if (contentType
|
|
172
|
+
&& (contentType.startsWith('application/octet-stream')
|
|
173
|
+
|| contentType.startsWith("image")
|
|
174
|
+
|| contentType.startsWith("application/zip"))) {
|
|
175
|
+
var streamRes = new SdkStreamResponse_1.SdkStreamResponse();
|
|
176
|
+
streamRes.body = result.data;
|
|
177
|
+
streamRes.httpStatusCode = result.statusCode;
|
|
178
|
+
return streamRes;
|
|
172
179
|
}
|
|
173
180
|
else {
|
|
174
181
|
var response = result.data instanceof Object ? result.data : {};
|
|
175
182
|
var sdkRespone = response;
|
|
176
183
|
sdkRespone.httpStatusCode = result.statusCode;
|
|
177
|
-
return
|
|
184
|
+
return sdkRespone;
|
|
178
185
|
}
|
|
179
186
|
};
|
|
180
187
|
HcClient.loggerName = 'HcClient';
|
package/README_CN.md
CHANGED
|
@@ -120,7 +120,7 @@ client.withProxyAgent("http://username:password@proxy.huaweicloud.com:8080")
|
|
|
120
120
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
### 2.
|
|
123
|
+
### 2. 认证信息配置 [:top:](#用户手册-top)
|
|
124
124
|
|
|
125
125
|
华为云服务存在两种部署方式,Region 级服务和 Global 级服务。
|
|
126
126
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2023 Huawei Technologies Co.,Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
6
|
+
* or more contributor license agreements. See the NOTICE file
|
|
7
|
+
* distributed with this work for additional information
|
|
8
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
9
|
+
* to you under the Apache License, Version 2.0 (the
|
|
10
|
+
* "License"); you may not use this file except in compliance
|
|
11
|
+
* with the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing,
|
|
16
|
+
* software distributed under the License is distributed on an
|
|
17
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
18
|
+
* KIND, either express or implied. See the License for the
|
|
19
|
+
* specific language governing permissions and limitations
|
|
20
|
+
* under the License.
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.SdkStreamResponse = void 0;
|
|
24
|
+
var SdkStreamResponse = /** @class */ (function () {
|
|
25
|
+
function SdkStreamResponse() {
|
|
26
|
+
}
|
|
27
|
+
return SdkStreamResponse;
|
|
28
|
+
}());
|
|
29
|
+
exports.SdkStreamResponse = SdkStreamResponse;
|
package/auth/AKSKSigner.js
CHANGED
|
@@ -76,6 +76,7 @@ var AKSKSigner = /** @class */ (function () {
|
|
|
76
76
|
};
|
|
77
77
|
;
|
|
78
78
|
AKSKSigner.sign = function (request, credential) {
|
|
79
|
+
var _a;
|
|
79
80
|
var authenticationHeaders = {};
|
|
80
81
|
var dateTimeStamp = request.headers[this.HeaderXDate];
|
|
81
82
|
if (dateTimeStamp) {
|
|
@@ -98,7 +99,7 @@ var AKSKSigner = /** @class */ (function () {
|
|
|
98
99
|
var allHeaders = {};
|
|
99
100
|
var current_headers = {};
|
|
100
101
|
Object.assign(current_headers, request.headers);
|
|
101
|
-
if (current_headers['content-type'].indexOf('multipart/form-data') !== -1) {
|
|
102
|
+
if (((_a = current_headers['content-type']) === null || _a === void 0 ? void 0 : _a.indexOf('multipart/form-data')) !== -1) {
|
|
102
103
|
delete current_headers['content-type'];
|
|
103
104
|
}
|
|
104
105
|
Object.assign(allHeaders, current_headers, authenticationHeaders);
|
|
@@ -132,7 +132,7 @@ var DefaultHttpClient = /** @class */ (function () {
|
|
|
132
132
|
DefaultHttpClient.httpResponse = res;
|
|
133
133
|
var result = _this._convertResponse(httpRequest, res);
|
|
134
134
|
return {
|
|
135
|
-
data: result
|
|
135
|
+
data: result,
|
|
136
136
|
statusCode: res.status,
|
|
137
137
|
headers: res.headers
|
|
138
138
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@huaweicloud/huaweicloud-sdk-core",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.22",
|
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/lodash": "^4.14.172",
|
|
37
37
|
"@types/mocha": "^8.2.2",
|
|
38
38
|
"@types/node": "^14.14.37",
|
|
39
|
-
"@types/sinon": "^10.0.
|
|
39
|
+
"@types/sinon": "^10.0.13",
|
|
40
40
|
"busboy": "^0.3.1",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-like": "^1.1.1",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"nock": "^13.1.0",
|
|
48
48
|
"nyc": "^15.1.0",
|
|
49
49
|
"shx": "^0.3.2",
|
|
50
|
-
"sinon": "^
|
|
51
|
-
"ts-node": "^9.1
|
|
50
|
+
"sinon": "^15.0.1",
|
|
51
|
+
"ts-node": "^10.9.1",
|
|
52
52
|
"tslint": "^6.1.3",
|
|
53
53
|
"typescript": "^4.1.0"
|
|
54
54
|
}
|