fix: rename passParams -> gateParams & rateLimit static values#43
Merged
Merged
Conversation
Deploying feathers-utils with
|
| Latest commit: |
45ab367
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d4cfcdd4.feathers-utils.pages.dev |
| Branch Preview URL: | https://fix-rename-gate-params-rate.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 primarily renames the utility function and related documentation from
passParamstogateParamsthroughout the codebase, and introduces improvements to therateLimithook to support statickeyandpointsoptions. These changes enhance clarity, consistency, and flexibility in how parameters are selected for caching and rate limiting.Key changes:
Parameter selection utility renaming and documentation updates
passParamsutility and all related references, documentation, tests, and examples togateParamsfor improved clarity and alignment with its purpose. This includes updates in the cache hook documentation, tests, and code comments. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]Rate limiting enhancements
rateLimithook to accept a static string for thekeyoption, allowing for global rate limiting across all requests to an endpoint, and a static number for thepointsoption, enabling fixed or dynamic cost per request. [1] [2] [3] [4] [5]Documentation improvements
rateLimitandcachehook documentation to clearly describe the new options and usage patterns, including examples for global rate limiting and custom points per request. [1] [2] [3] [4] [5] [6] [7]These changes improve the developer experience by making parameter gating more explicit and flexible, and by enabling more advanced rate limiting strategies.