@aws-sdk/lib-storage 3.36.0 → 3.39.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,38 @@
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.39.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.38.0...v3.39.0) (2021-10-29)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/lib-storage
9
+
10
+
11
+
12
+
13
+
14
+ # [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/lib-storage
17
+
18
+
19
+
20
+
21
+
22
+ # [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
23
+
24
+ **Note:** Version bump only for package @aws-sdk/lib-storage
25
+
26
+
27
+
28
+
29
+
30
+ ## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
31
+
32
+ **Note:** Version bump only for package @aws-sdk/lib-storage
33
+
34
+
35
+
36
+
37
+
6
38
  # [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
7
39
 
8
40
 
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Upload = void 0;
4
+ const abort_controller_1 = require("@aws-sdk/abort-controller");
4
5
  const client_s3_1 = require("@aws-sdk/client-s3");
5
6
  const events_1 = require("events");
6
- const chunker_1 = require("./chunker");
7
7
  const bytelength_1 = require("./bytelength");
8
- const abort_controller_1 = require("@aws-sdk/abort-controller");
8
+ const chunker_1 = require("./chunker");
9
9
  const MIN_PART_SIZE = 1024 * 1024 * 5;
10
10
  class Upload extends events_1.EventEmitter {
11
11
  constructor(options) {
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getChunk = void 0;
4
- const stream_1 = require("stream");
5
4
  const buffer_1 = require("buffer");
5
+ const stream_1 = require("stream");
6
6
  const getChunkBuffer_1 = require("./chunks/getChunkBuffer");
7
7
  const getChunkStream_1 = require("./chunks/getChunkStream");
8
- const getDataReadableStream_1 = require("./chunks/getDataReadableStream");
9
8
  const getDataReadable_1 = require("./chunks/getDataReadable");
9
+ const getDataReadableStream_1 = require("./chunks/getDataReadableStream");
10
10
  const getChunk = (data, partSize) => {
11
11
  if (data instanceof buffer_1.Buffer) {
12
12
  return getChunkBuffer_1.getChunkBuffer(data, partSize);
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ClientDefaultValues = void 0;
4
- const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
5
4
  const fs_1 = require("fs");
5
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
6
6
  exports.ClientDefaultValues = {
7
7
  ...runtimeConfig_shared_1.ClientSharedValues,
8
8
  runtime: "node",
package/dist-es/Upload.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { __assign, __asyncValues, __awaiter, __extends, __generator } from "tslib";
2
+ import { AbortController } from "@aws-sdk/abort-controller";
2
3
  import { CompleteMultipartUploadCommand, CreateMultipartUploadCommand, PutObjectCommand, PutObjectTaggingCommand, UploadPartCommand, } from "@aws-sdk/client-s3";
3
4
  import { EventEmitter } from "events";
4
- import { getChunk } from "./chunker";
5
5
  import { byteLength } from "./bytelength";
6
- import { AbortController } from "@aws-sdk/abort-controller";
6
+ import { getChunk } from "./chunker";
7
7
  var MIN_PART_SIZE = 1024 * 1024 * 5;
8
8
  var Upload = (function (_super) {
9
9
  __extends(Upload, _super);
@@ -1,9 +1,9 @@
1
- import { Readable } from "stream";
2
1
  import { Buffer } from "buffer";
2
+ import { Readable } from "stream";
3
3
  import { getChunkBuffer } from "./chunks/getChunkBuffer";
4
4
  import { getChunkStream } from "./chunks/getChunkStream";
5
- import { getDataReadableStream } from "./chunks/getDataReadableStream";
6
5
  import { getDataReadable } from "./chunks/getDataReadable";
6
+ import { getDataReadableStream } from "./chunks/getDataReadableStream";
7
7
  export var getChunk = function (data, partSize) {
8
8
  if (data instanceof Buffer) {
9
9
  return getChunkBuffer(data, partSize);
@@ -1,4 +1,4 @@
1
1
  import { __assign } from "tslib";
2
- import { ClientSharedValues } from "./runtimeConfig.shared";
3
2
  import { lstatSync } from "fs";
3
+ import { ClientSharedValues } from "./runtimeConfig.shared";
4
4
  export var ClientDefaultValues = __assign(__assign({}, ClientSharedValues), { runtime: "node", lstatSync: lstatSync });
@@ -1,8 +1,8 @@
1
1
  /// <reference types="node" />
2
+ import { AbortSignal } from "@aws-sdk/abort-controller";
2
3
  import { ServiceOutputTypes } from "@aws-sdk/client-s3";
3
4
  import { EventEmitter } from "events";
4
5
  import { BodyDataTypes, Options, Progress } from "./types";
5
- import { AbortSignal } from "@aws-sdk/abort-controller";
6
6
  export interface RawDataPart {
7
7
  partNumber: number;
8
8
  data: BodyDataTypes;
@@ -1,17 +1,15 @@
1
- /// <reference types="node" />
1
+
2
+ import { AbortSignal } from "@aws-sdk/abort-controller";
2
3
  import { ServiceOutputTypes } from "@aws-sdk/client-s3";
3
4
  import { EventEmitter } from "events";
4
5
  import { BodyDataTypes, Options, Progress } from "./types";
5
- import { AbortSignal } from "@aws-sdk/abort-controller";
6
6
  export interface RawDataPart {
7
7
  partNumber: number;
8
8
  data: BodyDataTypes;
9
9
  lastPart?: boolean;
10
10
  }
11
11
  export declare class Upload extends EventEmitter {
12
- /**
13
- * S3 multipart upload does not allow more than 10000 parts.
14
- */
12
+
15
13
  private MAX_PARTS;
16
14
  private queueSize;
17
15
  private partSize;
@@ -1,3 +1,3 @@
1
- /// <reference types="node" />
1
+
2
2
  import { RawDataPart } from "../Upload";
3
3
  export declare function getChunkBuffer(data: Buffer, partSize: number): AsyncGenerator<RawDataPart, void, undefined>;
@@ -1,3 +1,3 @@
1
- /// <reference types="node" />
1
+
2
2
  import { RawDataPart } from "../Upload";
3
3
  export declare function getChunkStream<T>(data: T, partSize: number, getNextData: (data: T) => AsyncGenerator<Buffer>): AsyncGenerator<RawDataPart, void, undefined>;
@@ -1,3 +1,3 @@
1
- /// <reference types="node" />
1
+
2
2
  import { Readable } from "stream";
3
3
  export declare function getDataReadable(data: Readable): AsyncGenerator<Buffer>;
@@ -1,2 +1,2 @@
1
- /// <reference types="node" />
1
+
2
2
  export declare function getDataReadableStream(data: ReadableStream): AsyncGenerator<Buffer>;
@@ -1,6 +1,4 @@
1
- /**
2
- * @internal
3
- */
1
+
4
2
  export declare const ClientDefaultValues: {
5
3
  runtime: string;
6
4
  lstatSync: () => void;
@@ -1,8 +1,6 @@
1
- /// <reference types="node" />
1
+
2
2
  import { lstatSync } from "fs";
3
- /**
4
- * @internal
5
- */
3
+
6
4
  export declare const ClientDefaultValues: {
7
5
  runtime: string;
8
6
  lstatSync: typeof lstatSync;
@@ -1,6 +1,4 @@
1
- /**
2
- * @internal
3
- */
1
+
4
2
  export declare const ClientDefaultValues: {
5
3
  runtime: string;
6
4
  lstatSync: () => void;
@@ -1,6 +1,4 @@
1
- /**
2
- * @internal
3
- */
1
+
4
2
  export declare const ClientSharedValues: {
5
3
  lstatSync: () => void;
6
4
  };
@@ -9,35 +9,18 @@ export interface Progress {
9
9
  export declare type BodyDataTypes = PutObjectCommandInput["Body"];
10
10
  export declare type ServiceClients = S3Client;
11
11
  export interface Configuration {
12
- /**
13
- * The size of the concurrent queue manager to upload parts in parallel. Set to 1 for synchronous uploading of parts. Note that the uploader will buffer at most queueSize * partSize bytes into memory at any given time.
14
- * default: 4
15
- */
12
+
16
13
  queueSize: number;
17
- /**
18
- * Default: 5 mb
19
- * The size in bytes for each individual part to be uploaded. Adjust the part size to ensure the number of parts does not exceed maxTotalParts. See 5mb is the minimum allowed part size.
20
- */
14
+
21
15
  partSize: number;
22
- /**
23
- * Default: false
24
- * Whether to abort the multipart upload if an error occurs. Set to true if you want to handle failures manually. If set to false (default)
25
- * the upload will drop parts that have failed.
26
- */
16
+
27
17
  leavePartsOnError: boolean;
28
- /**
29
- * The tags to apply to the object.
30
- */
18
+
31
19
  tags: Tag[];
32
20
  }
33
21
  export interface Options extends Partial<Configuration> {
34
- /**
35
- * This is the data that is uploaded.
36
- */
22
+
37
23
  params: PutObjectCommandInput;
38
- /**
39
- * A service client.
40
- * This the target where we upload data.
41
- */
24
+
42
25
  client: ServiceClients;
43
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/lib-storage",
3
- "version": "3.36.0",
3
+ "version": "3.39.0",
4
4
  "description": "Storage higher order operation",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -31,8 +31,8 @@
31
31
  "@aws-sdk/client-s3": "^3.0.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@aws-sdk/abort-controller": "3.36.0",
35
- "@aws-sdk/client-s3": "3.36.0",
34
+ "@aws-sdk/abort-controller": "3.38.0",
35
+ "@aws-sdk/client-s3": "3.39.0",
36
36
  "@types/jest": "^26.0.4",
37
37
  "@types/node": "^14.11.2",
38
38
  "jasmine-core": "^3.6.0",