UNPKG

@gmjs/cli-wrapper

Version:
19 lines (18 loc) 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getErrorMessageInvalidOptionFormat = exports.getErrorMessageSpecialOptionNeedsToBeStandalone = void 0; function getErrorMessageSpecialOptionNeedsToBeStandalone(optionName) { return `'${optionName}' option should not be used with other options. It does not accept any parameters.`; } exports.getErrorMessageSpecialOptionNeedsToBeStandalone = getErrorMessageSpecialOptionNeedsToBeStandalone; function getErrorMessageInvalidOptionFormat(optionStr) { if (!optionStr.startsWith('-')) { return `Expected option, got '${optionStr}'.`; } return [ `Invalid option format '${optionStr}'.`, 'Allowed long form option formats are: --(no-)?-[a-z][a-z0-9]+ or --(no-)?-[a-z][a-z0-9]*(-[a-z][a-z0-9]*)* .', 'Allowed short form option formats are: -[A-Za-z] or for boolean option list -[A-Za-z]+ .', ].join(' '); } exports.getErrorMessageInvalidOptionFormat = getErrorMessageInvalidOptionFormat;