UNPKG

balena-cli

Version:

The official balena Command Line Interface

25 lines (24 loc) 949 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const lazy_1 = require("../../utils/lazy"); class SSHKeyListCmd extends core_1.Command { async run() { await this.parse(SSHKeyListCmd); const keys = await (0, lazy_1.getBalenaSdk)().models.key.getAll(); const displayKeys = keys.map((k) => { return { id: k.id, name: k.title }; }); console.log((0, lazy_1.getVisuals)().table.horizontal(displayKeys, ['id', 'name'])); } } SSHKeyListCmd.aliases = ['keys', 'key list']; SSHKeyListCmd.deprecateAliases = true; SSHKeyListCmd.description = (0, lazy_1.stripIndent) ` List the SSH keys in balenaCloud. List all SSH keys registered in balenaCloud for the logged in user. `; SSHKeyListCmd.examples = ['$ balena ssh-key list']; SSHKeyListCmd.authenticated = true; exports.default = SSHKeyListCmd; //# sourceMappingURL=list.js.map