Updated logo validator
This commit is contained in:
Родитель
c07c1b6585
Коммит
06c32e1dad
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче