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

pkgcloud-cli

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pkgcloud-cli - npm Package Compare versions

Comparing version 0.2.6 to 0.3.0

27

helpers.js

@@ -5,2 +5,3 @@ var cloud = require('pkgcloud');

var dateformat = require('dateformat');
var prettyjson = require('prettyjson');

@@ -23,3 +24,2 @@ var exports = {};

var configFile = file;
var stats = fs.statSync(configFile);
var config = JSON.parse(fs.readFileSync(configFile).toString());

@@ -38,2 +38,19 @@

var assertSectionInConfigFile = function (config, sectionName) {
if (!config[sectionName]) {
console.error("The pkgcloud-cli.json section is missing a ["+
sectionName + "] section");
process.exit(0);
}
};
var globalErrorHandler = function(message, data){
var prettyJson = prettyjson.render(data);
console.log("\n");
console.log(message.red);
console.log(prettyJson);
console.log("\n");
process.exit(1);
};
exports.init = function(config, type, callback) {

@@ -44,2 +61,3 @@ if (!config) {

config = loadConfig(config);
assertSectionInConfigFile(config, type.toLowerCase());
if (type === CLIENT_TYPES.compute) {

@@ -54,2 +72,7 @@ client = cloud.compute.createClient(config.compute[0]);

}
if(client) {
client.on("log::error", globalErrorHandler);
}
return callback(null, client);

@@ -82,2 +105,2 @@ };

module.exports = exports;
module.exports = exports;

11

package.json
{
"name": "pkgcloud-cli",
"version": "0.2.6",
"version": "0.3.0",
"description": "CLI for pkgcloud",

@@ -53,11 +53,12 @@ "scripts": {

"dependencies": {
"commander": "~2.0.0",
"commander": "~2.2.0",
"pkgcloud": "~0.8.17",
"nconf": "~0.6.7",
"path": "~0.4.9",
"cli-table": "~0.2.0",
"cli-table": "~0.3.0",
"dateformat": "~1.0.6-1.2.3",
"underscore": "~1.5.2",
"pkginfo": "~0.3.0"
"underscore": "~1.6.0",
"pkginfo": "~0.3.0",
"prettyjson": "~1.0.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