UNPKG

alwaysai

Version:

The alwaysAI command-line interface (CLI)

27 lines 990 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.alwaysaiUserEmailCliInput = void 0; const alwayscli_1 = require("@alwaysai/alwayscli"); const constants_1 = require("../constants"); const placeholder = '<address>'; exports.alwaysaiUserEmailCliInput = { required: false, async getValue(argv) { if (!argv) { return undefined; } if (argv.length > 1) { throw new alwayscli_1.CliUsageError(`Expected a single ${placeholder}`); } if (!argv[0]) { throw new alwayscli_1.CliUsageError(`Expected an ${placeholder}`); } if (!constants_1.VALID_EMAIL_REGULAR_EXPRESSION.test(argv[0])) { throw new alwayscli_1.CliTerseError(`"${argv[0]}" is not a valid email`); } return argv[0]; }, description: 'Email address associated with your alwaysAI user account', placeholder }; //# sourceMappingURL=alwaysai-user-email-cli-input.js.map