@aws-sdk/lib-storage 3.53.1 → 3.55.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 +24 -0
- package/dist-cjs/Upload.js +4 -4
- package/dist-cjs/chunker.js +5 -5
- package/dist-es/Upload.js +2 -2
- package/package.json +5 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.55.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.1...v3.55.0) (2022-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/lib-storage
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [3.54.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.0...v3.54.1) (2022-03-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/lib-storage
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.54.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.1...v3.54.0) (2022-03-11)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @aws-sdk/lib-storage
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [3.53.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.53.0...v3.53.1) (2022-02-25)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @aws-sdk/lib-storage
|
package/dist-cjs/Upload.js
CHANGED
|
@@ -25,7 +25,7 @@ class Upload extends events_1.EventEmitter {
|
|
|
25
25
|
this.client = options.client;
|
|
26
26
|
this.params = options.params;
|
|
27
27
|
this.__validateInput();
|
|
28
|
-
this.totalBytes = bytelength_1.byteLength(this.params.Body);
|
|
28
|
+
this.totalBytes = (0, bytelength_1.byteLength)(this.params.Body);
|
|
29
29
|
this.bytesUploadedSoFar = 0;
|
|
30
30
|
this.abortController = new abort_controller_1.AbortController();
|
|
31
31
|
}
|
|
@@ -44,7 +44,7 @@ class Upload extends events_1.EventEmitter {
|
|
|
44
44
|
const params = { ...this.params, Body: dataPart.data };
|
|
45
45
|
const putResult = await this.client.send(new client_s3_1.PutObjectCommand(params));
|
|
46
46
|
this.putResponse = putResult;
|
|
47
|
-
const totalSize = bytelength_1.byteLength(dataPart.data);
|
|
47
|
+
const totalSize = (0, bytelength_1.byteLength)(dataPart.data);
|
|
48
48
|
this.__notifyProgress({
|
|
49
49
|
loaded: totalSize,
|
|
50
50
|
total: totalSize,
|
|
@@ -96,7 +96,7 @@ class Upload extends events_1.EventEmitter {
|
|
|
96
96
|
...(partResult.ChecksumSHA1 && { ChecksumSHA1: partResult.ChecksumSHA1 }),
|
|
97
97
|
...(partResult.ChecksumSHA256 && { ChecksumSHA256: partResult.ChecksumSHA256 }),
|
|
98
98
|
});
|
|
99
|
-
this.bytesUploadedSoFar += bytelength_1.byteLength(dataPart.data);
|
|
99
|
+
this.bytesUploadedSoFar += (0, bytelength_1.byteLength)(dataPart.data);
|
|
100
100
|
this.__notifyProgress({
|
|
101
101
|
loaded: this.bytesUploadedSoFar,
|
|
102
102
|
total: this.totalBytes,
|
|
@@ -116,7 +116,7 @@ class Upload extends events_1.EventEmitter {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
async __doMultipartUpload() {
|
|
119
|
-
const dataFeeder = chunker_1.getChunk(this.params.Body, this.partSize);
|
|
119
|
+
const dataFeeder = (0, chunker_1.getChunk)(this.params.Body, this.partSize);
|
|
120
120
|
for (let index = 0; index < this.queueSize; index++) {
|
|
121
121
|
const currentUpload = this.__doConcurrentUpload(dataFeeder);
|
|
122
122
|
this.concurrentUploaders.push(currentUpload);
|
package/dist-cjs/chunker.js
CHANGED
|
@@ -9,19 +9,19 @@ const getDataReadable_1 = require("./chunks/getDataReadable");
|
|
|
9
9
|
const getDataReadableStream_1 = require("./chunks/getDataReadableStream");
|
|
10
10
|
const getChunk = (data, partSize) => {
|
|
11
11
|
if (data instanceof buffer_1.Buffer) {
|
|
12
|
-
return getChunkBuffer_1.getChunkBuffer(data, partSize);
|
|
12
|
+
return (0, getChunkBuffer_1.getChunkBuffer)(data, partSize);
|
|
13
13
|
}
|
|
14
14
|
else if (data instanceof stream_1.Readable) {
|
|
15
|
-
return getChunkStream_1.getChunkStream(data, partSize, getDataReadable_1.getDataReadable);
|
|
15
|
+
return (0, getChunkStream_1.getChunkStream)(data, partSize, getDataReadable_1.getDataReadable);
|
|
16
16
|
}
|
|
17
17
|
else if (data instanceof String || typeof data === "string" || data instanceof Uint8Array) {
|
|
18
|
-
return getChunkBuffer_1.getChunkBuffer(buffer_1.Buffer.from(data), partSize);
|
|
18
|
+
return (0, getChunkBuffer_1.getChunkBuffer)(buffer_1.Buffer.from(data), partSize);
|
|
19
19
|
}
|
|
20
20
|
if (typeof data.stream === "function") {
|
|
21
|
-
return getChunkStream_1.getChunkStream(data.stream(), partSize, getDataReadableStream_1.getDataReadableStream);
|
|
21
|
+
return (0, getChunkStream_1.getChunkStream)(data.stream(), partSize, getDataReadableStream_1.getDataReadableStream);
|
|
22
22
|
}
|
|
23
23
|
else if (data instanceof ReadableStream) {
|
|
24
|
-
return getChunkStream_1.getChunkStream(data, partSize, getDataReadableStream_1.getDataReadableStream);
|
|
24
|
+
return (0, getChunkStream_1.getChunkStream)(data, partSize, getDataReadableStream_1.getDataReadableStream);
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
throw new Error("Body Data is unsupported format, expected data to be one of: string | Uint8Array | Buffer | Readable | ReadableStream | Blob;.");
|
package/dist-es/Upload.js
CHANGED
|
@@ -111,7 +111,7 @@ var Upload = (function (_super) {
|
|
|
111
111
|
if (!(dataFeeder_1_1 = _b.sent(), !dataFeeder_1_1.done)) return [3, 11];
|
|
112
112
|
dataPart = dataFeeder_1_1.value;
|
|
113
113
|
if (this.uploadedParts.length > this.MAX_PARTS) {
|
|
114
|
-
throw new Error("Exceeded "
|
|
114
|
+
throw new Error("Exceeded ".concat(this.MAX_PARTS, " as part of the upload to ").concat(this.params.Key, " and ").concat(this.params.Bucket, "."));
|
|
115
115
|
}
|
|
116
116
|
_b.label = 3;
|
|
117
117
|
case 3:
|
|
@@ -247,7 +247,7 @@ var Upload = (function (_super) {
|
|
|
247
247
|
throw new Error("InputError: Upload requires a AWS client to do uploads with.");
|
|
248
248
|
}
|
|
249
249
|
if (this.partSize < MIN_PART_SIZE) {
|
|
250
|
-
throw new Error("EntityTooSmall: Your proposed upload partsize ["
|
|
250
|
+
throw new Error("EntityTooSmall: Your proposed upload partsize [".concat(this.partSize, "] is smaller than the minimum allowed size [").concat(MIN_PART_SIZE, "] (5MB)"));
|
|
251
251
|
}
|
|
252
252
|
if (this.queueSize < 1) {
|
|
253
253
|
throw new Error("Queue size: Must have at least one uploading queue.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/lib-storage",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.55.0",
|
|
4
4
|
"description": "Storage higher order operation",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
@@ -26,28 +26,22 @@
|
|
|
26
26
|
"buffer": "5.6.0",
|
|
27
27
|
"events": "3.3.0",
|
|
28
28
|
"stream-browserify": "3.0.0",
|
|
29
|
-
"tslib": "^2.3.
|
|
29
|
+
"tslib": "^2.3.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@aws-sdk/abort-controller": "^3.0.0",
|
|
33
33
|
"@aws-sdk/client-s3": "^3.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@aws-sdk/abort-controller": "3.
|
|
37
|
-
"@aws-sdk/client-s3": "3.
|
|
36
|
+
"@aws-sdk/abort-controller": "3.55.0",
|
|
37
|
+
"@aws-sdk/client-s3": "3.55.0",
|
|
38
38
|
"@tsconfig/recommended": "1.0.1",
|
|
39
39
|
"@types/node": "^14.11.2",
|
|
40
40
|
"concurrently": "7.0.0",
|
|
41
41
|
"downlevel-dts": "0.7.0",
|
|
42
|
-
"jasmine-core": "^3.6.0",
|
|
43
|
-
"karma": "^5.2.3",
|
|
44
|
-
"karma-chrome-launcher": "^3.1.0",
|
|
45
|
-
"karma-jasmine": "^4.0.1",
|
|
46
|
-
"karma-spec-reporter": "^0.0.32",
|
|
47
|
-
"karma-typescript": "^5.2.0",
|
|
48
42
|
"rimraf": "3.0.2",
|
|
49
43
|
"typedoc": "0.19.2",
|
|
50
|
-
"typescript": "~4.
|
|
44
|
+
"typescript": "~4.6.2",
|
|
51
45
|
"web-streams-polyfill": "^3.0.0"
|
|
52
46
|
},
|
|
53
47
|
"typesVersions": {
|