Releases: jeffbski-rga/aws-s3-multipart-copy
Releases · jeffbski-rga/aws-s3-multipart-copy
v4.0.0 - Improved interface
Breaking change - revised the interface to better match desired usage.
createDeps only receives the relevant S3 Commands and returns a set of async functions that can be wrapped with async retry functionality.
The CopyMultipart constructor now takes s3Client, the deps, params, an optional logger and a few extra options.
Example usage:
import {
S3Client,
CreateMultipartUploadCommand,
AbortMultipartUploadCommand,
CompleteMultipartUploadCommand,
UploadPartCopyCommand,
ListPartsCommand
} from "@aws-sdk/client-s3";
const awsClientS3Commands = {
CreateMultipartUploadCommand,
AbortMultipartUploadCommand,
CompleteMultipartUploadCommand,
UploadPartCopyCommand,
ListPartsCommand
};
const awsClientDeps = createDeps(awsClientS3Commands);
// awsClientDeps async function properties can be wrapped with async/retry logic if desired
const s3Client = new S3Client({ region: 'us-east-1' });
const params = { /* copyObjectMultipartParams here */ };
const copyMultipart = new CopyMultipart({ s3Client, awsClientDeps, params });
await copyMultipart.done();
v3.0.0
Breaking Changes
- uses AWS SDK V3
- update the createDeps to input the AWS SDK V3 commands and S3Client so that any AWS SDK V3 version can be used (regardless of what was used in this library). These deps are passed into the CopyObjectMultipart constructor.
- CopyObjectMultpart is now a class so it must be instantiated
- request_context is now named requestContext
Details
- update to AWS SDK V3 using code from https://github.com/spencer-jacobs/aws-s3-multipart-copy
- update and cleanup dependencies
- switch to c8 for code coverage
- using TS now for the source code, compiled to cjs