This commit is contained in:
v-rucdu 2021-06-04 00:38:09 +05:30
Родитель c07c1b6585
Коммит 06c32e1dad
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -4,6 +4,7 @@ import { ExitCode } from "./utils/exitCode";
import * as logger from "./utils/logger";
import { isValidLogoImage } from "./utils/LogoChecker/logoImageChecker";
import { isValidLogoImageSVGContent } from "./utils/LogoChecker/logoImageSVGChecker";
import { LogoValidationError } from "./utils/validationError";
export async function IsValidLogo(FileName: string): Promise<ExitCode> {
if(FileName.indexOf("Logos") != -1 || FileName.indexOf("Data Connectors/Logo") != -1)
@ -15,6 +16,10 @@ export async function IsValidLogo(FileName: string): Promise<ExitCode> {
isValidLogoImageSVGContent(svgContent)
}
}
else
{
throw new LogoValidationError(`Logo must be in Logos or Logo folder ` + FileName);
}
return ExitCode.SUCCESS;
}