UNPKG

@controlplane/cli

Version:

Control Plane Corporation CLI

38 lines 1.54 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QuotaCmd = void 0; const generic_1 = require("./generic"); const command_1 = require("../cli/command"); const query_1 = require("./query"); const resolver_1 = require("./resolver"); const options_1 = require("./options"); class QuotaCmd extends command_1.Command { constructor() { super(...arguments); this.command = 'quota'; this.describe = 'Show quotas'; } builder(yargs) { const resolver = (0, resolver_1.kindResolver)('quota'); const schema = { props: [...query_1.defaultProps, 'origin', 'max', 'current', 'unit'], }; const opts = [options_1.withOrgOptions, options_1.withStandardOptions]; const commandName = 'quota'; const commandNamePlural = 'quotas'; const commandNameA = 'a quota'; return (yargs .demandCommand() .version(false) .help() // generic .command(new generic_1.Get(commandNamePlural, resolver, ...opts).toYargs()) .command(new generic_1.Query(commandNamePlural, resolver, schema, ...opts).toYargs()) .command(new generic_1.ListPermissions(commandNameA, resolver, ...opts).toYargs()) .command(new generic_1.Edit(commandName, resolver, ...opts).toYargs()) .command(new generic_1.Patch(commandName, resolver, ...opts).toYargs())); } handle() { } } exports.QuotaCmd = QuotaCmd; //# sourceMappingURL=quota.js.map