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

@elasticprojects/abstract-cli

Package Overview
Dependencies
Maintainers
1
Versions
965
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elasticprojects/abstract-cli - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

lib/__mocks__/child-process-promise.js

21

lib/index.js

@@ -6,3 +6,4 @@ "use strict";

});
exports.UnknownError = exports.ProjectStatusError = exports.ProjectNotFoundError = exports.StoreInitError = undefined;
exports.UnknownError = exports.ProjectStatusError = exports.ProjectNotFoundError = exports.StoreInitError = exports.ParseError = undefined;
exports.run = run;
exports.status = status;

@@ -63,2 +64,4 @@

class ParseError extends Error {}
exports.ParseError = ParseError;
class StoreInitError extends AbstractCLIError {}

@@ -80,7 +83,19 @@ exports.StoreInitError = StoreInitError;

function processOutput(output) {
return JSON.parse(output.stdout);
try {
return JSON.parse(output.stdout);
} catch (err) {
throw new ParseError(output.stdout);
}
}
function processError(error) {
const output = JSON.parse(error.stderr);
// allow processOutput to throw a parse error without it being caught here;
if (error instanceof ParseError) throw error;
let output;
try {
output = JSON.parse(error.stderr);
} catch (err) {
throw new ParseError(error.stderr);
}
const klass = ERRORS[output.code] ? ERRORS[output.code] : UnknownError;

@@ -87,0 +102,0 @@ throw new klass(output);

6

package.json

@@ -8,3 +8,3 @@ {

],
"version": "0.0.4",
"version": "0.0.5",
"license": "UNLICENSED",

@@ -15,3 +15,4 @@ "repository": "elasticprojects/deskapi",

"lint": "eslint index.js",
"prepublish": "babel src/ -d lib && flow-copy-source src lib"
"prepublish": "babel src/ -d lib && flow-copy-source src lib",
"test": "jest"
},

@@ -25,2 +26,3 @@ "devDependencies": {

"flow-copy-source": "^1.2.1",
"jest": "^21.2.1",
"publish": "^0.6.0"

@@ -27,0 +29,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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