UNPKG

liveperson-functions-cli

Version:
42 lines 1.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Domain = void 0; const core_1 = require("@oclif/core"); const add_controller_1 = require("../../controller/add.controller"); const utils_1 = require("../../shared/utils"); class Domain extends core_1.Command { constructor() { super(...arguments); this.addController = new add_controller_1.AddController(); } /** * Runs the create command and parses the passed functions * @returns {Promise<void>} - create command * @memberof Domain */ async run() { try { const domains = (0, utils_1.parseInput)(Domain.flags, this.argv); await this.addController.addDomains(domains); } catch (error) { this.exit(1); } } } exports.Domain = Domain; Domain.flags = { help: core_1.Flags.help({ char: 'h', description: 'Show help for the add:domain command', }), }; Domain.description = `"Adds a domain to your account's whitelist. Domains containing * wildcards have to be enclosed in ""`; Domain.strict = false; Domain.args = [{ name: '"...domainURLs"' }]; Domain.examples = [ '> <%= config.bin %> add:domain', '> <%= config.bin %> add:domain "*.liveperson.com"', '> <%= config.bin %> add:domain "*.liveperson.com" a-domain.co.uk', ]; //# sourceMappingURL=domain.js.map