-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Protocol services #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
Add redaxios as a new dependency in package.json for handling HTTP requests. This lightweight alternative to Axios is expected to enhance functionality while maintaining a small bundle size.
Introduce support for server-based operations by parsing a provided URI in the constructor. Add `serverRequest` method utilizing `redaxios` for handling requests to a remote server when `host`, `applicationId`, and `projectId` are provided.
✅ Deploy Preview for narodb ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Updated references of applicationId to orgId for clarity and consistency with the URI parameters in the Naro class. Adjusted constructor, serverRequest, and related logic to reflect this change without altering functionality.
Introduce a condition to handle `getAll` requests via `serverRequest` when a host is defined. This enables fetching data directly from the server, enhancing the method's versatility.
Converted getStructuredCollections to an async function to support server-side requests when a host is present. Fallbacks to core implementation if no host is provided.
Previously, the populate method did not account for cases where a host property was set, potentially causing incorrect behavior. This fix ensures the method uses a server request in such cases, improving functionality and consistency.
Removed redundant blank lines for consistency and added a missing server request in the get method to handle remote fetching correctly. This resolves potential issues when the host is defined.
Add a check to enforce the presence of a collection ID in the update method. Also, handle server-side updates when a host is specified, improving robustness and error handling.
Add a check to throw an error if the collection ID is missing. Also, handle delete requests through `serverRequest` when a host is defined. This prevents unexpected behavior and ensures robust error handling.
Ensure the `exists` method validates the presence of collection ID before proceeding. Added an additional condition to handle requests when
If a host is present, the count method now sends a server request before defaulting to local collection handling. This enhances functionality for remote-hosted scenarios.
Enhances the clear method to handle server requests when a host is present. Falls back to existing behavior when no host is detected.
Updated `getStructuredCollections` to be awaited in the test to ensure proper handling of asynchronous behavior. This change improves test reliability and accuracy.
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.
Protocol methods adapted