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

asap-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

asap-cli - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.nvmrc

23

lib/asap-config.js

@@ -7,8 +7,10 @@ var _ = require('lodash');

getFromOptions: (options) => {
getFromOptions: function getFromOptions(options) {
var asapConfigPath = options.configFile || './.asap-config';
return q()
.then(() => fs.exists(asapConfigPath))
.then((exists) => {
.then(function () {
return fs.exists(asapConfigPath);
})
.then(function (exists) {
if (exists) {

@@ -18,3 +20,3 @@ return fs.readFile(asapConfigPath);

})
.then((fileContent) => {
.then(function (fileContent) {
if (fileContent) {

@@ -27,9 +29,9 @@ return _.assign({}, JSON.parse(fileContent), options);

validate: (config) => {
validate: function validate(config) {
var validateString = (value) => _.isString(value) && value;
var validateArray = (value) => _.isArray(value) && value.length > 0;
var validateString = function (value) { return _.isString(value) && value; };
var validateArray = function (value) { return _.isArray(value) && value.length > 0; };
var validators = [
_.partial((value) => validateArray(value) || validateString(value), config.audience),
_.partial(function (value) { return validateArray(value) || validateString(value); }, config.audience),
_.partial(validateString, config.issuer),

@@ -40,3 +42,3 @@ _.partial(validateString, config.kid),

var allRequiredConfigProvided = _.every(validators, (validator) => validator());
var allRequiredConfigProvided = _.every(validators, function (validator) { return validator(); });
if (!allRequiredConfigProvided) {

@@ -50,6 +52,5 @@ return q.reject(

save: (configFile, config) => {
save: function save(configFile, config) {
return fs.writeFile(configFile, JSON.stringify(config, null, 2));
}
};

@@ -26,8 +26,4 @@ var jwtAuthentication = require('jwt-authentication');

return generateAuthorizationHeader(claims, authHeaderOpts)
.catch((error) => {
console.error('Generate JWT Auth Token failed.', error);
return q.reject(error);
});
return generateAuthorizationHeader(claims, authHeaderOpts);
}
};
{
"name": "asap-cli",
"version": "0.0.3",
"version": "0.0.4",
"description": "A command line utility for generating ASAP (JWT tokens as per the Atlassian Service Authentication Protocol) token and making curl calls with the same.",
"license": "MIT",
"bin": {
"asap": "./asap.js"
"asap": "./bin/asap"
},

@@ -39,3 +39,6 @@ "repository": {

"proxyquire": "^1.7.4"
},
"engines": {
"node": ">=0.10"
}
}
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