s3-asset-uploader
Advanced tools
Comparing version 2.4.0 to 2.4.1
16
index.js
@@ -34,4 +34,4 @@ /** | ||
* @typedef {Object} S3SyncConfig | ||
* @property {string} key - your AWS access key ID | ||
* @property {string} secret - your AWS secret access key | ||
* @property {string} [key] - your AWS access key ID | ||
* @property {string} [secret] - your AWS secret access key | ||
* @property {AWS.S3.BucketName} bucket - the name of the destination AWS S3 bucket | ||
@@ -93,6 +93,10 @@ */ | ||
constructor(config, options) { | ||
this.client = new AWS.S3({ | ||
accessKeyId: config.key, | ||
secretAccessKey: config.secret | ||
}) | ||
let s3ClientConfiguration = {} | ||
if (config.key && config.secret) { | ||
s3ClientConfiguration = { | ||
accessKeyId: config.key, | ||
secretAccessKey: config.secret | ||
} | ||
} | ||
this.client = new AWS.S3(s3ClientConfiguration) | ||
this.bucket = config.bucket | ||
@@ -99,0 +103,0 @@ this.path = fs.realpathSync(options.path) |
{ | ||
"name": "s3-asset-uploader", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "AWS S3 Asset Uploader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
29143
819
1