fix: исправлена TypeScript ошибка и улучшена обработка ошибок сборки

- Исправлена TypeScript ошибка в login.ts: добавлено поле retryAfter в тип ResponseData
- Улучшена обработка ошибок в manage.sh: добавлена проверка успешности сборки перед проверкой standalone директории
- Предупреждение о missing standalone директории теперь выдает ошибку с подробным описанием
This commit is contained in:
kilyabin
2025-11-28 00:42:04 +04:00
parent 9df04745df
commit dd6058881c
2 changed files with 10 additions and 2 deletions

View File

@@ -176,7 +176,11 @@ case "$1" in
# Build
echo -e "${YELLOW}Building application...${NC}"
npm run build
if ! npm run build; then
echo -e "${RED}Build failed! Please check the error messages above.${NC}"
echo -e "${RED}The .next/standalone directory will not be created if the build fails.${NC}"
exit 1
fi
# Ensure public directory and static files are accessible in standalone build
echo -e "${YELLOW}Setting up static files...${NC}"
@@ -195,7 +199,10 @@ case "$1" in
echo -e "${RED}Warning: .next/static directory not found!${NC}"
fi
else
echo -e "${RED}Warning: .next/standalone directory not found!${NC}"
echo -e "${RED}Error: .next/standalone directory not found!${NC}"
echo -e "${RED}This usually means the build failed or output: 'standalone' is not configured correctly.${NC}"
echo -e "${RED}Please check next.config.js and ensure the build completed successfully.${NC}"
exit 1
fi
# Set ownership

View File

@@ -4,6 +4,7 @@ import { verifyPassword, setSessionCookie } from '@/shared/utils/auth'
type ResponseData = {
success?: boolean
error?: string
retryAfter?: number
}
// Rate limiting: 5 попыток в 15 минут