Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-aws-s3-typescript

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-aws-s3-typescript - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

dist/ErrorThrower.js

@@ -20,3 +20,3 @@ "use strict";

var throwUploadError = function (config, file) {
exports.throwError(config);
(0, exports.throwError)(config);
if (!file) {

@@ -23,0 +23,0 @@ throw new Error("File cannot be empty");

"use strict";
var __assign = (this && this.__assign) || function () {
__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;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -59,3 +70,3 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

case 0:
ErrorThrower_1.throwUploadError(this.config, file);
(0, ErrorThrower_1.throwUploadError)(this.config, file);
fd = new FormData();

@@ -70,3 +81,3 @@ if (file.type == null) {

key = "" + (this.config.dirName ? this.config.dirName + '/' : '') + fileName;
url = Url_1.default(this.config);
url = (0, Url_1.default)(this.config);
fd.append('key', key);

@@ -131,6 +142,7 @@ fd.append('acl', 'public-read');

ReactS3Client.prototype.listFiles = function () {
var _a;
return __awaiter(this, void 0, void 0, function () {
var awsConfig, s3, req, err_1;
return __generator(this, function (_a) {
switch (_a.label) {
var awsConfig, s3, url, req, err_1;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:

@@ -148,5 +160,6 @@ awsConfig = (function (_a) {

});
_a.label = 1;
url = (0, Url_1.default)(this.config);
_b.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, s3

@@ -158,3 +171,3 @@ .listObjects({

case 2:
req = _a.sent();
req = _b.sent();
if (req.$response.error) {

@@ -176,6 +189,6 @@ return [2 /*return*/, Promise.reject({

message: 'Objects listed succesfully',
data: req.$response.data,
data: __assign(__assign({}, req.$response.data), { Contents: (_a = req.$response.data.Contents) === null || _a === void 0 ? void 0 : _a.map(function (e) { return (__assign(__assign({}, e), { publicUrl: url + "/" + e.Key })); }) }),
})];
case 3:
err_1 = _a.sent();
err_1 = _b.sent();
return [2 /*return*/, Promise.reject({

@@ -182,0 +195,0 @@ err: 'Something went wrong!',

{
"name": "react-aws-s3-typescript",
"version": "1.1.1",
"version": "1.1.2",
"description": "Open source npm package to upload your files into AWS S3 Bucket directly using react(typescript template)",

@@ -41,15 +41,16 @@ "main": "dist/index.js",

"devDependencies": {
"@types/jest": "^26.0.19",
"@types/node": "^14.14.16",
"@types/jest": "^27.0.2",
"@types/node": "^14.17.18",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"ts-jest": "^26.4.4",
"prettier": "^2.4.1",
"ts-jest": "^26.5.6",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.1.3"
"typescript": "^4.4.3"
},
"dependencies": {
"@types/crypto-js": "^4.0.1",
"aws-sdk": "^2.817.0",
"short-uuid": "^4.1.0"
"@types/crypto-js": "^4.0.2",
"aws-sdk": "^2.993.0",
"crypto-js": "^4.1.1",
"short-uuid": "^4.2.0"
},

@@ -56,0 +57,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc