test-openapi
Version:
Automated client requests
66 lines (52 loc) • 1.6 kB
JavaScript
Object.defineProperty(exports,"__esModule",{value:true});exports.defineCli=void 0;var _yargs=_interopRequireDefault(require("yargs"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}
const defineCli=function(){
return _yargs.default.
options(CONFIG).
usage(USAGE).
example(RUN_EXAMPLE,"Run tasks").
help().
version().
strict();
};exports.defineCli=defineCli;
const CONFIG={
plugins:{
array:true,
string:true,
alias:"p",
requiresArg:true,
describe:"Plugin to extend the core features"},
report:{
describe:"Reporting options"},
"report.output":{
string:true,
alias:"o",
requiresArg:true,
describe:"File output (default: stdout)"},
"report.level":{
string:true,
alias:"l",
requiresArg:true,
describe:
"Verbosity among \"debug\", \"info\" (default for most reporting styles), \"warn\" (default for \"pretty\" reporting styles), \"error\" or \"silent\""},
only:{
array:true,
string:true,
alias:"f",
requiresArg:true,
describe:"Only run tasks whose key matches the regular expression"},
skip:{
array:true,
string:true,
alias:"x",
requiresArg:true,
describe:"Skip tasks whose key matches the regular expression"},
merge:{
describe:"Shared options assigned to each task"}};
const USAGE=`$0 [OPTS] [TASKS_FILES...]
Automated client requests
TASKS_FILES... are JSON or YAML files containing the tasks to perform.
Can include globbing patterns.
Defaults to any file ending with 'tasks.yml.json'`;
const RUN_EXAMPLE=
"$0 --merge.spec.definition ./openapi.yml --merge.call.server http://localhost:5001 ./**/*.tasks.yml";
//# sourceMappingURL=top.js.map
;