- Sync deletions: a 2xx Hiboutik answer is the truth, even an empty list; a failed call (HTTP error or non-list body) deletes nothing (HiboutikClient.getList). - Validate the environment at startup (HIBOUTIK_BASE_URL must be HTTPS), global ValidationPipe, Helmet, CORS opt-in, HTTP timeouts, rate limiting (60 req/min/IP, 5 on POST /sync), AllExceptionsFilter. - Postgres advisory lock so only one synchronization runs at a time across instances; syncAll is private, syncs start through startSync. - Fix the Jest moduleNameMapper; document the validation and security rules in CLAUDE.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
25 lines
536 B
JSON
25 lines
536 B
JSON
{
|
|
"moduleFileExtensions": ["js", "json", "ts"],
|
|
"rootDir": ".",
|
|
"testEnvironment": "node",
|
|
"testRegex": ".e2e-spec.ts$",
|
|
"setupFiles": ["<rootDir>/setup-env.ts"],
|
|
"transform": {
|
|
"^.+.ts$": "ts-jest",
|
|
"^.+.js$": [
|
|
"ts-jest",
|
|
{
|
|
"tsconfig": {
|
|
"allowJs": true,
|
|
"module": "commonjs",
|
|
"moduleResolution": "node"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"transformIgnorePatterns": ["/node_modules/(?!@nestjs/config/)"],
|
|
"moduleNameMapper": {
|
|
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
}
|
|
}
|