@apistudio/apim-cli
Version:
CLI for API Management Products
36 lines (31 loc) • 910 B
text/typescript
import { Command } from 'commander';
import {testAction} from '../../actions/test-action.js';
import {
TEST_DESC,
DEBUG,
GATEWAY_CREDENTIAL,
GATEWAY_ENDPOINT,
GATEWAY_USERNAME,
LOCALDIR_PATH,
TEST_ALL,
TEST_ASSETS,
ENV_DESC,
DEPLOY,
ENDPOINT
} from '../../constants/command-constants.js';
export const testCommand = new Command()
.name('test')
.description(TEST_DESC);
testCommand
.argument('[projects]')
.option('-n, --names <names>', TEST_ASSETS)
.option('-a, --all', TEST_ALL)
.requiredOption('-l, --localDir <localDir>', LOCALDIR_PATH)
.option('-t, --target <target>', GATEWAY_ENDPOINT)
.option('-u, --username <username>', GATEWAY_USERNAME)
.option('-pwd, --password <password>', GATEWAY_CREDENTIAL)
.option('-d, --debug', DEBUG)
.option('-e, --env <key=value>', ENV_DESC)
.option('-de, --deploy', DEPLOY)
.option('-en, --endpoints <endpoints>',ENDPOINT)
.action(testAction);