New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

s3proxy

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s3proxy - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

23

index.js

@@ -23,11 +23,11 @@ /* jslint node: true, esversion: 6 */

this.bucket = p.bucket;
this.options =
Object.getOwnPropertyNames(p)
.filter(name => name !== 'bucket')
.reduce((obj, name) => {
const withName = {};
withName[name] = p[name];
return Object.assign({}, obj, withName);
}, {});
this.options = Object.getOwnPropertyNames(p)
.filter(name => name !== 'bucket')
.reduce((obj, name) => {
const withName = {};
withName[name] = p[name];
return Object.assign({}, obj, withName);
}, {});
}
init(done) {

@@ -42,2 +42,3 @@ this.s3 = new AWS.S3(Object.assign({ apiVersion: '2006-03-01' }, this.options));

}
createReadStream(key) {

@@ -58,2 +59,3 @@ this.isInitialized();

}
isInitialized() {

@@ -65,5 +67,7 @@ if (!this.s3) {

}
static stripLeadingSlash(str) {
return str.replace(/^\/+/, '');
}
healthCheck(done) {

@@ -75,2 +79,3 @@ const s3request = this.s3.headBucket({ Bucket: this.bucket }, (error, data) => {

}
healthCheckStream(res) {

@@ -85,2 +90,3 @@ const s3request = this.s3.headBucket({ Bucket: this.bucket });

}
head(req, res) {

@@ -91,2 +97,3 @@ const stream = this.createReadStream(req.url);

}
get(req, res) {

@@ -93,0 +100,0 @@ const stream = this.createReadStream(req.url);

{
"name": "s3proxy",
"version": "1.3.0",
"version": "1.3.1",
"description": "Streaming web proxy for AWS S3",
"main": "index.js",
"devDependencies": {
"chai": "^4.1.2",
"chai-http": "^3.0.0",
"eslint": "^4.7.0",
"eslint-config-airbnb-base": "^12.0.0",
"eslint-plugin-import": "^2.7.0",
"express": "^4.15.4",
"express-request-id": "^1.4.0",
"istanbul": "^0.4.5",
"mocha": "^3.5.3",
"morgan": "^1.9.0"
"chai": "^4.2.0",
"chai-http": "^4.3.0",
"eslint": "^6.0.1",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.18.0",
"express": "^4.17.1",
"express-request-id": "^1.4.1",
"mocha": "^6.1.4",
"morgan": "^1.9.1",
"nyc": "^14.1.1"
},
"dependencies": {
"aws-sdk": "^2.118.0"
"aws-sdk": "^2.484.0",
"istanbul": "^0.4.5"
},
"scripts": {
"test": "make -j test",
"istanbul": "istanbul",
"nyc-coverage": "nyc --reporter=html --reporter=text",
"mocha": "mocha"

@@ -25,0 +26,0 @@ },

@@ -130,6 +130,31 @@ # s3proxy

## init method
S3Proxy is a subclass of EventEmitter. That means you can register event listeners on the async calls.
```
proxy.on('init', () => {
app.listen();
});
proxy.on('error', (error) => {
console.error(error);
});
proxy.init();
```
`init` also accepts a callback function:
```
proxy.init((error) => {
if (error) {
console.error(error);
}
else {
app.listen();
}
});
```
## Development
### Test execution
The current test suite consists of some unit tests, but most of the tests are functional tests that require AWS S3 acces.
It uses a pubic bucket called s3proxy-public.
The current test suite consists of some unit tests, but most of the tests are functional tests that require AWS S3 access.
It uses a public bucket called s3proxy-public.

@@ -136,0 +161,0 @@ ```

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