UNPKG

@apillon/cli

Version:
41 lines 1.96 kB
#!/usr/bin/env node "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const chalk_1 = __importDefault(require("chalk")); const commander_1 = require("commander"); const config_1 = __importDefault(require("./config")); const hosting_commands_1 = require("./modules/hosting/hosting.commands"); const nfts_commands_1 = require("./modules/nfts/nfts.commands"); const storage_commands_1 = require("./modules/storage/storage.commands"); const cloud_functions_commands_1 = require("./modules/cloud-functions/cloud-functions.commands"); const indexing_commands_1 = require("./modules/indexing/indexing.commands"); const cli = new commander_1.Command('apillon').version(config_1.default.VERSION); cli.addHelpText('beforeAll', chalk_1.default.black.bgYellow(` ▶◀ Apillon CLI v${config_1.default.VERSION} ▶◀ `)); cli.addHelpText('afterAll', chalk_1.default.yellow(` Find more help at wiki.apillon.io/build/6-apillon-cli.html `)); cli.addOption(new commander_1.Option('--key <api key>', 'Apillon API key') .env('APILLON_API_KEY') .makeOptionMandatory()); cli.addOption(new commander_1.Option('--secret <api secret>', 'Apillon API secret') .env('APILLON_API_SECRET') .makeOptionMandatory()); cli.addOption(new commander_1.Option('--debug', 'Output debug messages').env('APILLON_DEBUG')); cli.configureHelp({ showGlobalOptions: true, sortOptions: true, sortSubcommands: true, }); cli.showHelpAfterError('Run with --help for additional information!'); (0, storage_commands_1.createStorageCommands)(cli); (0, hosting_commands_1.createHostingCommands)(cli); (0, nfts_commands_1.createNftsCommands)(cli); (0, cloud_functions_commands_1.createCloudFunctionsCommands)(cli); (0, indexing_commands_1.createIndexingCommands)(cli); cli.parse(); //# sourceMappingURL=index.js.map