Spaces:
Sleeping
Sleeping
Commit History
-
docs: add Vietnamese translation for the testing guide
- Translate tests/README.md into Vietnamese6ebdbe8
-
feat: add runtime configuration for rate limiting and Redis
- Update rate-limit and Redis settings via the admin API without restarting - Apply changes immediately through in-memory overridese9d5bbe -
refactor: extract routes into separate module with favicon support
- Move route parsing and request dispatch into server/route.js - Add favicon and API attribution handling - Require /api prefix and strip trailing slashes when parsing routes - Emit compact JSON responses to reduce payload size - Update and extend tests for the new route handlingad871c9
-
feat: add cascade delete for related resources
- Delete child resources when a parent resource is deleted - Document cascade behavior in the README5533459 -
feat: require confirm body for reset-database and extract mock factory
- Guard the reset-database admin endpoint behind a confirmation body - Extract a mock factory to simplify test configuration7db7c77 -
refactor: move SENSITIVE_KEYS to config module
- Centralize sensitive environment keys in config and export thema3bf2e3
-
refactor: rewrite rate-limiter with circuit breaker and CIDR support
- Add three-tier fallback: Redis Lua, in-memory LRU, and allow-all - Implement a circuit breaker with escalating block durations - Support CIDR-based trusted proxy extraction7b6e647 -
feat: add admin routes with argon2 auth
- Add admin endpoints for runtime configuration and database reset - Hash and verify admin keys with argon2 using a 5s cached LRU - Polish the API documentation2e6d0d7
-
test: refactor test infra with createClearCjs helper
- Add a helper to clear the CJS require cache between module re-imports - Simplify server tests that inject mock dependencies13def79 -
fix: load env at startup and add admin key with argon2
- Call loadEnv() during server startup instead of lazily - Add ADMIN_KEY to the config module - Add argon2 dependency for admin password hashingbd2e5f8
-
feat: add graceful shutdown handler
- Close the HTTP server and Redis connection on SIGINT and SIGTERM - Add an integration test covering the shutdown pathcfbebe0 -
feat: seed environment settings and extract SETTING_DEFS
- Move environment settings into a shared config definition - Persist environment-backed settings into the settings table at seed time7f0d072 -
feat: add pagination, search, and sorting to list endpoints
- Support _page, _limit, _start, and _end pagination parameters - Add q text search across resources - Add _sort and _order on all listable resourceseab7289
-
test: add load-env coverage test
- Test chained env loading, override precedence, and error paths45c48e9 -
test: migrate test imports to CJS _require for V8 coverage
- Route dynamic imports through the CJS cache helper - Ensure V8 coverage is tracked for CommonJS modules9c74555
-
refactor: reorganize src into feature subdirectories
- Group config, db, middleware, redis, and server code into subfolders - Update all require paths across the codebase1f0f638 -
test: add server unit tests and restructure test suite
- Add unit tests for the HTTP request handler and route parsing - Organize test files by module directory62e3094
-
test: add unit tests for core modules
- Cover config, load-env, database, migrate, seed, redis, and rate-limiter - Re-import modules with different environment values to hit each branch25059bd
-
refactor: add v8 ignore annotations and export printLog for tests
- Annotate CLI-only and environment-loading code paths for V8 coverage - Remove the legacy tests/test.js runner replaced by vitest - Export printLog from the server module for coverage testsf19b08d -
test: migrate to vitest with integration tests and CI workflow
- Replace the ad-hoc node test runner with vitest - Add an integration suite covering all API endpoints against a real server - Add helpers to start and stop an isolated server and seed a temp database - Add a GitHub Actions workflow running tests on Node 22, 24, and 26 with coverage75a60d6
-
feat: scaffold HTTP REST API server with SQLite backend
- Set up the project with Node.js built-ins only (http, SQLite, Redis client) - Implement JSONPlaceholder-compatible CRUD endpoints for all six resources - Add in-memory and Redis-backed rate limiting - Add dotenv-based environment loading with example env files1a25764