UNPKG

@holographxyz/cli

Version:
32 lines (31 loc) 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); class CustomHelp extends core_1.Help { formatCommand(command) { if (command.id === 'config') { return super.formatCommand(command); } command.examples = command.examples?.map(example => { if (typeof example === 'string') { example += ' --env mainnet|testnet|develop|experimental'; } else if (typeof example.command === 'string') { example.command += ' --env mainnet|testnet|develop|experimental'; } return example; }); command.flags = { ...command.flags, env: { name: 'env', type: 'option', description: 'Holograph environment to use', options: ['mainnet', 'testnet', 'develop', 'experimental'], default: 'testnet', }, }; return super.formatCommand(command); } } exports.default = CustomHelp;