@apistudio/apim-cli
Version:
CLI for API Management Products
34 lines (32 loc) • 1.05 kB
text/typescript
/**
* Copyright Super iPaaS Integration LLC, an IBM Company 2024
*/
import { Command } from 'commander';
import { LOCALDIR_PATH,
DEPLOY_ALL,
ARCHIVE_PATH,
GATEWAY_ENDPOINT,
GATEWAY_CREDENTIAL,
GATEWAY_USERNAME,
GATEWAY_MCSP_TOKEN,
OVERWRITE_ASSETS,
DEPLOY_DESC,
DEPLOY_ASSETS,
DEBUG} from '../../constants/command-constants.js';
import { deployAction } from '../../actions/deploy-action.js';
export const deployCommand: Command = new Command()
.name('deploy')
.description(DEPLOY_DESC);
deployCommand
.argument('[projects]')
.option('-l, --localDir <localDir>',LOCALDIR_PATH)
.option('-a, --all', DEPLOY_ALL)
.option('-n, --names <names>', DEPLOY_ASSETS)
.option('-ar, --archive <archive>', ARCHIVE_PATH)
.requiredOption('-t, --target <target>', GATEWAY_ENDPOINT)
.option('-u, --username <username>', GATEWAY_USERNAME)
.option('-pwd, --password <password>', GATEWAY_CREDENTIAL)
.option('-at','authToken',GATEWAY_MCSP_TOKEN)
.option('-ow, --overwrite', OVERWRITE_ASSETS)
.option('-d, --debug', DEBUG)
.action(deployAction);