function validateActionInputs(inputs) {
    if (!inputs.ReleaseType && !inputs.ReleaseVersion) {
        throw new Error(`Must specify either "${InputNames.ReleaseType}" or "${InputNames.ReleaseVersion}".`);
    }
    if (inputs.ReleaseType && inputs.ReleaseVersion) {
        throw new Error(`Must specify either "${InputNames.ReleaseType}" or "${InputNames.ReleaseVersion}", not both.`);
    }
    if (inputs.ReleaseType &&
        !Object.values(AcceptedSemverReleaseTypes).includes(inputs.ReleaseType)) {
        const tab = (0,dist.tabs)(1, '\n');
        throw new Error(`Unrecognized "${InputNames.ReleaseType}". Must be one of:${tab}${Object.keys(AcceptedSemverReleaseTypes).join(tab)}`);
    }
    if (inputs.ReleaseVersion) {
        if (!(0,dist.isValidSemver)(inputs.ReleaseVersion)) {
            throw new Error(`"${InputNames.ReleaseVersion}" must be a plain SemVer version string. Received: ${inputs.ReleaseVersion}`);
        }
    }
}
/**
 * Validates the inputs to the Action, defined earlier in this file.
 * Throws an error if validation fails.
 */
Validates the inputs to the Action, defined earlier in this file.
Throws an error if validation fails.
Validates the inputs to the Action defined earlier in this file . Throws an error if validation fails .
function validateActionInputs(inputs) {
    if (!inputs.ReleaseType && !inputs.ReleaseVersion) {
        throw new Error(`Must specify either "${InputNames.ReleaseType}" or "${InputNames.ReleaseVersion}".`);
    }
    if (inputs.ReleaseType && inputs.ReleaseVersion) {
        throw new Error(`Must specify either "${InputNames.ReleaseType}" or "${InputNames.ReleaseVersion}", not both.`);
    }
    if (inputs.ReleaseType &&
        !Object.values(AcceptedSemverReleaseTypes).includes(inputs.ReleaseType)) {
        const tab = (0,dist.tabs)(1, '\n');
        throw new Error(`Unrecognized "${InputNames.ReleaseType}". Must be one of:${tab}${Object.keys(AcceptedSemverReleaseTypes).join(tab)}`);
    }
    if (inputs.ReleaseVersion) {
        if (!(0,dist.isValidSemver)(inputs.ReleaseVersion)) {
            throw new Error(`"${InputNames.ReleaseVersion}" must be a plain SemVer version string. Received: ${inputs.ReleaseVersion}`);
        }
    }
}
function validateActionInputs ( inputs ) { if ( ! inputs . ReleaseType && ! inputs . ReleaseVersion ) { throw new Error ( ` ${ InputNames . ReleaseType } ${ InputNames . ReleaseVersion } ` ) ; } if ( inputs . ReleaseType && inputs . ReleaseVersion ) { throw new Error ( ` ${ InputNames . ReleaseType } ${ InputNames . ReleaseVersion } ` ) ; } if ( inputs . ReleaseType && ! Object . values ( AcceptedSemverReleaseTypes ) . includes ( inputs . ReleaseType ) ) { const tab = ( 0 , dist . tabs ) ( 1 , '\n' ) ; throw new Error ( ` ${ InputNames . ReleaseType } ${ tab } ${ Object . keys ( AcceptedSemverReleaseTypes ) . join ( tab ) } ` ) ; } if ( inputs . ReleaseVersion ) { if ( ! ( 0 , dist . isValidSemver ) ( inputs . ReleaseVersion ) ) { throw new Error ( ` ${ InputNames . ReleaseVersion } ${ inputs . ReleaseVersion } ` ) ; } } }
Validates the inputs to the Action, defined earlier in this file.
Validates the inputs to the Action defined earlier in this file .