@aws-sdk/lib-storage 3.170.0 → 3.171.0
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
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.171.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.170.0...v3.171.0) (2022-09-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **endpoint:** endpoints v2 codegen ([#3942](https://github.com/aws/aws-sdk-js-v3/issues/3942)) ([4b32da4](https://github.com/aws/aws-sdk-js-v3/commit/4b32da42011194d4eefe32eb6f7035872fb163c2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/lib-storage
|
package/dist-cjs/Upload.js
CHANGED
|
@@ -41,6 +41,7 @@ class Upload extends events_1.EventEmitter {
|
|
|
41
41
|
return super.on(event, listener);
|
|
42
42
|
}
|
|
43
43
|
async __uploadUsingPut(dataPart) {
|
|
44
|
+
var _a, _b;
|
|
44
45
|
this.isMultiPart = false;
|
|
45
46
|
const params = { ...this.params, Body: dataPart.data };
|
|
46
47
|
const requestHandler = this.client.config.requestHandler;
|
|
@@ -61,8 +62,11 @@ class Upload extends events_1.EventEmitter {
|
|
|
61
62
|
}
|
|
62
63
|
const [putResult, endpoint] = await Promise.all([
|
|
63
64
|
this.client.send(new client_s3_1.PutObjectCommand(params)),
|
|
64
|
-
this.client.config.endpoint(),
|
|
65
|
+
(_b = (_a = this.client.config) === null || _a === void 0 ? void 0 : _a.endpoint) === null || _b === void 0 ? void 0 : _b.call(_a),
|
|
65
66
|
]);
|
|
67
|
+
if (!endpoint) {
|
|
68
|
+
throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()".');
|
|
69
|
+
}
|
|
66
70
|
if (eventEmitter !== null) {
|
|
67
71
|
eventEmitter.off("xhr.upload.progress", uploadEventListener);
|
|
68
72
|
}
|
package/dist-es/Upload.js
CHANGED
|
@@ -53,11 +53,12 @@ var Upload = (function (_super) {
|
|
|
53
53
|
return _super.prototype.on.call(this, event, listener);
|
|
54
54
|
};
|
|
55
55
|
Upload.prototype.__uploadUsingPut = function (dataPart) {
|
|
56
|
+
var _a, _b;
|
|
56
57
|
return __awaiter(this, void 0, void 0, function () {
|
|
57
|
-
var params, requestHandler, eventEmitter, uploadEventListener,
|
|
58
|
+
var params, requestHandler, eventEmitter, uploadEventListener, _c, putResult, endpoint, locationKey, locationBucket, Location, totalSize;
|
|
58
59
|
var _this = this;
|
|
59
|
-
return __generator(this, function (
|
|
60
|
-
switch (
|
|
60
|
+
return __generator(this, function (_d) {
|
|
61
|
+
switch (_d.label) {
|
|
61
62
|
case 0:
|
|
62
63
|
this.isMultiPart = false;
|
|
63
64
|
params = __assign(__assign({}, this.params), { Body: dataPart.data });
|
|
@@ -79,10 +80,13 @@ var Upload = (function (_super) {
|
|
|
79
80
|
}
|
|
80
81
|
return [4, Promise.all([
|
|
81
82
|
this.client.send(new PutObjectCommand(params)),
|
|
82
|
-
this.client.config.endpoint(),
|
|
83
|
+
(_b = (_a = this.client.config) === null || _a === void 0 ? void 0 : _a.endpoint) === null || _b === void 0 ? void 0 : _b.call(_a),
|
|
83
84
|
])];
|
|
84
85
|
case 1:
|
|
85
|
-
|
|
86
|
+
_c = __read.apply(void 0, [_d.sent(), 2]), putResult = _c[0], endpoint = _c[1];
|
|
87
|
+
if (!endpoint) {
|
|
88
|
+
throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()".');
|
|
89
|
+
}
|
|
86
90
|
if (eventEmitter !== null) {
|
|
87
91
|
eventEmitter.off("xhr.upload.progress", uploadEventListener);
|
|
88
92
|
}
|
|
@@ -7,19 +7,14 @@ export interface Progress {
|
|
|
7
7
|
Bucket?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare type BodyDataTypes = PutObjectCommandInput["Body"];
|
|
10
|
-
|
|
11
10
|
export declare type ServiceClients = S3Client;
|
|
12
11
|
export interface Configuration {
|
|
13
12
|
queueSize: number;
|
|
14
|
-
|
|
15
13
|
partSize: number;
|
|
16
|
-
|
|
17
14
|
leavePartsOnError: boolean;
|
|
18
|
-
|
|
19
15
|
tags: Tag[];
|
|
20
16
|
}
|
|
21
17
|
export interface Options extends Partial<Configuration> {
|
|
22
18
|
params: PutObjectCommandInput;
|
|
23
|
-
|
|
24
19
|
client: S3Client;
|
|
25
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/lib-storage",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.171.0",
|
|
4
4
|
"description": "Storage higher order operation",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/smithy-client": "3.
|
|
27
|
+
"@aws-sdk/smithy-client": "3.171.0",
|
|
28
28
|
"buffer": "5.6.0",
|
|
29
29
|
"events": "3.3.0",
|
|
30
30
|
"stream-browserify": "3.0.0",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@aws-sdk/client-s3": "^3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@aws-sdk/abort-controller": "3.
|
|
39
|
-
"@aws-sdk/client-s3": "3.
|
|
38
|
+
"@aws-sdk/abort-controller": "3.171.0",
|
|
39
|
+
"@aws-sdk/client-s3": "3.171.0",
|
|
40
40
|
"@tsconfig/recommended": "1.0.1",
|
|
41
41
|
"@types/node": "^14.11.2",
|
|
42
42
|
"concurrently": "7.0.0",
|