Skip to content

feat: core enhancements (chokidar, locking, validation, filtering, cors) - #3

Merged
xircons merged 10 commits into
devfrom
feat/core-enhancements
Jun 12, 2026
Merged

feat: core enhancements (chokidar, locking, validation, filtering, cors)#3
xircons merged 10 commits into
devfrom
feat/core-enhancements

Conversation

@xircons

@xircons xircons commented Jun 12, 2026

Copy link
Copy Markdown
Owner

This PR merges the core enhancements into the dev branch.

🔴 Critical Fixes

  1. Chokidar File Watcher: Replaced fs.watch with chokidar to resolve instability and added a 100ms debounce.
  2. File Locking: Added .zero-mock.lock generation during initialization to prevent multiple instances from corrupting the same file.
  3. Zod Validation: Dynamic schema inference (via inferSchema) now automatically validates incoming POST/PUT/PATCH bodies against existing data shapes.

🟡 Advanced Features

  1. Advanced Filtering: Added support for suffix operators (_gte, _lte, _like) and sorting (_sort, _order).
  2. Standardized Errors: All error responses now strictly follow the shape: { error, message, statusCode }.
  3. Pagination Metadata: Added the X-Total-Count header and response wrapping when pagination (_page, _limit) is used.

🟢 Customization

  1. CORS Configuration: Added CLI options (--cors-origin, --cors-methods, --cors-credentials) for granular CORS control.

xircons and others added 9 commits June 12, 2026 21:16
chore: integrate release pipeline and testing suite
# 1.0.0 (2026-06-12)

### Bug Fixes

* **ci:** bump to 0.1.1, simplify npm publish, refresh Actions ([56dbd71](56dbd71))

### Features

* add chokidar file watcher with debounce for live reload ([e38b7c1](e38b7c1))
* delay, logging, list filters/pagination, watch mode; docs: demo GIF + README ([7a53693](7a53693))
# 1.0.0 (2026-06-12)

### Bug Fixes

* **ci:** bump to 0.1.1, simplify npm publish, refresh Actions ([56dbd71](56dbd71))
* force publish to npm after 2fa issue ([20dd17a](20dd17a))

### Features

* add chokidar file watcher with debounce for live reload ([e38b7c1](e38b7c1))
* delay, logging, list filters/pagination, watch mode; docs: demo GIF + README ([7a53693](7a53693))
@xircons xircons closed this Jun 12, 2026
@xircons xircons reopened this Jun 12, 2026
@xircons
xircons merged commit 1dcebae into dev Jun 12, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants