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

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

gitlab-cli - npm Package Compare versions

Comparing version 0.0.17 to 0.1.0

24

bin/cli.js
#!/usr/bin/env node
var path = require('path');
var fs = require('fs');
var home = require('home');
var optimist = require('optimist');

@@ -7,3 +10,2 @@ var gitlab = require('node-gitlab');

var stringify = require('../lib/stringify');
var defaults = require('../lib/defaults');
var optionsParser = require('../lib/parser/optionsParser');

@@ -14,3 +16,2 @@ var dataParser = require('../lib/parser/dataParser');

var argv = optimist.argv;
var fs = require('fs');

@@ -22,2 +23,7 @@ var deps = {}; // dependencies passed around

if (argv.env) {
console.log('The --env option is not used anymore. Please use --config instead.');
process.exit(1);
}
// help wanted or missing arguments, exit

@@ -30,5 +36,15 @@ if (argv['h'] || argv['help'] || argv._.length < 1) {

// load environment
var env = argv.env || 'default';
var config = require('../config/' + env);
var configPath = (typeof argv.config === 'string') ? argv.config : '~/.config/gitlab-cli/default.js';
try {
var configFullPath = home.resolve(configPath);
} catch(error) {
}
if (!configFullPath || !fs.existsSync(configFullPath)) {
console.log('Configuration file could not be found under: ' + configPath + '\nPlease create it from the example under config/default.sample.js');
process.exit(1);
}
var config = require(configFullPath);
// aliases file might not exist

@@ -35,0 +51,0 @@ try {

@@ -47,4 +47,11 @@ var defaults = require('../defaults');

if (argv['config']) {
options.config = argv['config'];
}
else {
options.config = '~/.config/gitlab-cli/default.js'
}
return options;
}
module.exports = parse;

9

package.json
{
"name": "gitlab-cli",
"version": "0.0.17",
"version": "0.1.0",
"description": "Gitlab API on the command line",

@@ -23,5 +23,10 @@ "main": "./bin/cli.js",

},
"keywords": ["gitlab", "cli", "command line"],
"keywords": [
"gitlab",
"cli",
"command line"
],
"readmeFilename": "README.md",
"dependencies": {
"home": "^0.1.3",
"node-gitlab": ">=0.0.6",

@@ -28,0 +33,0 @@ "optimist": ">=0.6.0"

@@ -30,6 +30,6 @@ Usage: gitlab Action [Resource] [Options]

--json Output all data as JSON
--env ENVIRONMENT Environment to use under /config/. If not set will use the 'default' environment.
--data key=value,... Set data by comma separated list of key=value pairs.
--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
--config=path/to/config.js Set path to configuration file to use. If not set it will look for the file in ~/.config/gitlab-cli/default.js
--debug If present will display debug information
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