@controlplane/cli
Version:
Control Plane Corporation CLI
28 lines • 1.01 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.ListDeployments = void 0;
const options_1 = require("./options");
const generic_1 = require("./generic");
const command_1 = require("../cli/command");
const functions_1 = require("../util/functions");
class ListDeployments extends command_1.Command {
constructor(resolve) {
super();
this.resolve = resolve;
this.command = 'get-deployments <ref>';
this.describe = 'Retrieve the current deployments of the referenced workload';
}
builder(yargs) {
return (0, functions_1.pipe)(
//
generic_1.withSingleRef, options_1.withAllOptions)(yargs);
}
async handle(args) {
let link = this.resolve.resourceLink(args.ref, this.session.context);
link += '/deployment';
const body = await this.client.get(link);
this.session.outFormat(body);
}
}
exports.ListDeployments = ListDeployments;
//# sourceMappingURL=deployment.js.map
;