gitlab-cli
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -64,2 +64,7 @@ #!/usr/bin/env node | ||
// accept self-signed or unauthorized certificates | ||
if (deps.options.acceptCerts) { | ||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; | ||
} | ||
// resolve "me" in username | ||
@@ -171,2 +176,4 @@ if (deps.options.username === "me") { | ||
if (typeof data.length === 'number') { | ||
if (deps.options.json) console.log('['); | ||
data.forEach(function(item, i) { | ||
@@ -180,5 +187,6 @@ if (inFilters(item) && hasLabels(item)) { | ||
} | ||
console.log("-------------------------------------"); | ||
if (!deps.options.json) console.log("-------------------------------------"); | ||
} | ||
}); | ||
if (deps.options.json) console.log(']'); | ||
} | ||
@@ -198,3 +206,3 @@ else if (inFilters(data) && hasLabels(data)) { | ||
} | ||
console.log('done'); | ||
if (!deps.options.json) console.log('done'); | ||
} | ||
@@ -201,0 +209,0 @@ }); |
@@ -84,6 +84,6 @@ var defaults = require('../defaults'); | ||
{ | ||
if (argv['u'] && argv.u.trim() !== '') { | ||
if (typeof(argv['u']) === 'string' && argv.u.trim() !== '') { | ||
data.username = argv.u.trim(); | ||
} | ||
else if(argv['user'] && argv.user.trim() !== '') { | ||
else if(typeof(argv['user']) === 'string' && argv.user.trim() !== '') { | ||
data.username = argv.user.trim(); | ||
@@ -90,0 +90,0 @@ } |
@@ -39,4 +39,12 @@ var defaults = require('../defaults'); | ||
if (argv['u'] || argv['user']) { | ||
options.username = argv.u || argv.user; | ||
} | ||
if (argv['accept-certs']) { | ||
options.acceptCerts = true; | ||
} | ||
return options; | ||
} | ||
module.exports = parse; |
{ | ||
"name": "gitlab-cli", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"description": "Gitlab API on the command line", | ||
@@ -5,0 +5,0 @@ "main": "./bin/cli.js", |
@@ -33,2 +33,3 @@ Usage: gitlab Action [Resource] [Options] | ||
--data-json JSON Set data using a JSON string. If "data" is also set, it will overwrite existing keys. | ||
--accept-certs If present all SSL certificates (including self-signed) will be accepted | ||
--debug If present will display debug information |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
23168
771
4