#!/usr/bin/env node // // Copyright (c) 2015 by ^Lift Security // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // // See the License for the specific language governing permissions and // limitations under the License. // 'use strict'; const Yargs = require('yargs'); Yargs .option('baseUrl') .option('proxy', { description: 'https proxy to be used for API calls', default: process.env.https_proxy || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.HTTP_PROXY, group: 'Connection:' }) .option('reporter', { description: 'output reporter', default: 'table', group: 'Output:' }) .option('preprocessor', { description: 'project preprocessor', group: 'Input:' }) .option('verbose', { description: 'provide more verbose output', boolean: true, group: 'Output:' }) .option('quiet', { description: 'suppress output', boolean: true, group: 'Output:' }) .option('ignore-server-errors', { description: 'do not exit with an error code when errors are due to server problems', group: 'Output:' }) .option('token', { description: 'authentication token used to make api requests', group: 'Connection:' }) .commandDir('../commands') .demandCommand() .alias('help', 'h') .wrap(null) .parse();