UNPKG

@xgheaven/nos-cli

Version:
39 lines (38 loc) 1.59 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var jsome_1 = __importDefault(require("jsome")); var bucket_base_command_1 = require("./bucket-base-command"); var BucketListCommand = /** @class */ (function (_super) { __extends(BucketListCommand, _super); function BucketListCommand() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.command = 'list'; _this.describe = 'List all buckets'; return _this; } BucketListCommand.prototype.handler = function (args) { var client = this.client; client.listBucket().then(function (_a) { var items = _a.items; jsome_1.default(items); }); }; return BucketListCommand; }(bucket_base_command_1.BucketBaseCommand)); exports.BucketListCommand = BucketListCommand;