fedapay-cli
Version:
A command-line tool for FedaPay
56 lines (55 loc) • 1.89 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const command_1 = require("@oclif/command");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
const samples_1 = tslib_1.__importDefault(require("../samples"));
const samples_list_json_1 = tslib_1.__importDefault(require("../samples/samples-list.json"));
/**
* SamplesList class extending the superClass Samples
*/
class SamplesList extends command_1.Command {
async run() {
/**
* Display every fedapay samples available.
*/
this.log();
this.log(chalk_1.default.bold.italic('A list of available Fedapay samples.'));
this.log();
for (const key in samples_list_json_1.default) {
if (Object.prototype.hasOwnProperty.call(samples_list_json_1.default, key)) {
this.log(chalk_1.default.bold(key));
this.log(samples_list_json_1.default[key].description);
this.log(`Repo: ${samples_list_json_1.default[key].repository}`);
this.log();
}
}
}
}
exports.default = SamplesList;
/**
* @param string
* Description of the command Samples:list description
*/
SamplesList.description = 'A list of available Fedapay Samples integrations that can be setup and bootstrap by the CLI.';
/**
* @param string
* custom usage string for help
* this overrides the default usage
*/
SamplesList.usage = 'samples:list [parameters...]';
/**
* @param object
* Declaration of the command flags
*/
SamplesList.flags = Object.assign(Object.assign({}, samples_1.default.flags), { help: command_1.flags.help({
char: 'h',
description: 'List Fedapay Samples supported by the CLI'
}) });
/**
* @param string[]
* some examples of the custommers list use for help
*/
SamplesList.examples = [
'samples:list'
];