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

s3-cli

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

s3-cli - npm Package Compare versions

Comparing version 0.11.1 to 0.12.0

44

cli.js

@@ -55,19 +55,27 @@ #!/usr/bin/env node

var client;
fs.readFile(args.config, {encoding: 'utf8'}, function(err, contents) {
if (err) {
console.error("This utility needs a config file formatted the same as for s3cmd");
process.exit(1);
return;
}
var config = ini.parse(contents);
var accessKeyId, secretAccessKey;
if (config && config.default) {
accessKeyId = config.default.access_key;
secretAccessKey = config.default.secret_key;
}
if (!secretAccessKey || !accessKeyId) {
console.error("Config file missing access_key or secret_key");
process.exit(1);
return;
}
if (process.env.AWS_SECRET_KEY && process.env.AWS_ACCESS_KEY) {
setup(process.env.AWS_SECRET_KEY, process.env.AWS_ACCESS_KEY);
} else {
fs.readFile(args.config, {encoding: 'utf8'}, function(err, contents) {
if (err) {
console.error("This utility needs a config file formatted the same as for s3cmd");
process.exit(1);
return;
}
var config = ini.parse(contents);
var accessKeyId, secretAccessKey;
if (config && config.default) {
accessKeyId = config.default.access_key;
secretAccessKey = config.default.secret_key;
}
if (!secretAccessKey || !accessKeyId) {
console.error("Config file missing access_key or secret_key");
process.exit(1);
return;
}
setup(secretAccessKey, accessKeyId);
});
}
function setup(secretAccessKey, accessKeyId) {
var maxSockets = parseInt(args['max-sockets'], 10);

@@ -88,3 +96,3 @@ http.globalAgent.maxSockets = maxSockets;

fn();
});
}

@@ -91,0 +99,0 @@ function cmdSync() {

{
"name": "s3-cli",
"version": "0.11.1",
"version": "0.12.0",
"description": "command line utility to go along with s3 module",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,2 +21,13 @@ # s3 cli

## Configuration
s3-cli is compatible with s3cmd's config file, so if you already have that
configured, you're all set. Otherwise you can put this in `~/.s3cfg`:
```ini
[default]
access_key = foo
secret_key = bar
```
## Documentation

@@ -23,0 +34,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