Merged
Conversation
Deploying feathers-utils with
|
| Latest commit: |
369c701
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6f921d30.feathers-utils.pages.dev |
| Branch Preview URL: | https://feat-new-hook-ratelimit.feathers-utils.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new
rateLimithook to the codebase, enabling flexible and configurable rate limiting for Feathers services using therate-limiter-flexiblelibrary. It also adds documentation, tests, and updates dependencies to support this new feature. Additionally, there is a minor improvement to the error message in thedisallowhook.Key changes:
New Feature: Rate Limiting
rateLimithook (src/hooks/rate-limit/rate-limit.hook.ts) that integrates withrate-limiter-flexibleto limit service method calls based on configurable options such as key and points. The hook supports all backends provided by the library and stores rate limit results oncontext.params.rateLimit.rateLimithook in the main hooks index (src/hooks/index.ts).rateLimithook, including usage examples and advanced configuration options (src/hooks/rate-limit/rate-limit.hook.md).rateLimithook to cover normal operation, custom options, error cases, and integration with Feathers hooks (src/hooks/rate-limit/rate-limit.hook.test.ts).rateLimithook in the main test runner (test/index.test.ts).Dependency Management
rate-limiter-flexibleas both a dependency and an optional peer dependency inpackage.json, and updatedpnpm-lock.yamlto include the new package. [1] [2] [3] [4]Configuration Updates
.claude/settings.jsonto allow web fetches and additional bash/test commands, likely to support new development and CI workflows.Minor Improvements
disallowhook to include the service path, making debugging easier (src/hooks/disallow/disallow.hook.ts).