@aws-amplify/storage
Advanced tools
Comparing version 1.0.37-unstable.0 to 1.0.37-unstable.1
"use strict"; | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -64,2 +72,3 @@ return new (P || (P = Promise))(function (resolve, reject) { | ||
}; | ||
var localTestingStorageEndpoint = 'http://localhost:20005'; | ||
/** | ||
@@ -405,10 +414,13 @@ * Provide storage methods to use AWS S3 | ||
AWSS3Provider.prototype._createS3 = function (config) { | ||
var bucket = config.bucket, region = config.region, credentials = config.credentials; | ||
return new S3({ | ||
apiVersion: '2006-03-01', | ||
params: { Bucket: bucket }, | ||
signatureVersion: 'v4', | ||
region: region, | ||
credentials: credentials | ||
}); | ||
var bucket = config.bucket, region = config.region, credentials = config.credentials, dangerouslyConnectToHttpEndpointForTesting = config.dangerouslyConnectToHttpEndpointForTesting; | ||
var localTestingConfig = {}; | ||
if (dangerouslyConnectToHttpEndpointForTesting) { | ||
localTestingConfig = { | ||
endpoint: localTestingStorageEndpoint, | ||
s3BucketEndpoint: true, | ||
s3ForcePathStyle: true | ||
}; | ||
} | ||
return new S3(__assign({ apiVersion: '2006-03-01', params: { Bucket: bucket }, signatureVersion: 'v4', region: region, | ||
credentials: credentials }, localTestingConfig)); | ||
}; | ||
@@ -415,0 +427,0 @@ AWSS3Provider.CATEGORY = 'Storage'; |
{ | ||
"name": "@aws-amplify/storage", | ||
"version": "1.0.37-unstable.0+c3c1e68e", | ||
"version": "1.0.37-unstable.1+4390e8ed", | ||
"description": "Storage category of aws-amplify", | ||
@@ -52,3 +52,3 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@aws-amplify/core": "1.0.32-unstable.6+c3c1e68e" | ||
"@aws-amplify/core": "1.0.32-unstable.7+4390e8ed" | ||
}, | ||
@@ -81,3 +81,3 @@ "jest": { | ||
}, | ||
"gitHead": "c3c1e68ea4783a4f6ea475f3733edb9cd3413e58" | ||
"gitHead": "4390e8edd24027af42ce4717ec116af8ddb9b2fc" | ||
} |
@@ -42,2 +42,4 @@ /* | ||
const localTestingStorageEndpoint = 'http://localhost:20005'; | ||
/** | ||
@@ -407,3 +409,17 @@ * Provide storage methods to use AWS S3 | ||
private _createS3(config) { | ||
const { bucket, region, credentials } = config; | ||
const { | ||
bucket, | ||
region, | ||
credentials, | ||
dangerouslyConnectToHttpEndpointForTesting | ||
} = config; | ||
let localTestingConfig = {}; | ||
if(dangerouslyConnectToHttpEndpointForTesting) { | ||
localTestingConfig = { | ||
endpoint: localTestingStorageEndpoint, | ||
s3BucketEndpoint: true, | ||
s3ForcePathStyle : true | ||
}; | ||
} | ||
@@ -415,5 +431,6 @@ return new S3({ | ||
region, | ||
credentials | ||
credentials, | ||
...localTestingConfig | ||
}); | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
4945771
25323