fluxninja / aperture

Rate limiting, caching, and request prioritization for modern workloads
https://docs.fluxninja.com
Apache License 2.0
622 stars 24 forks source link

Fix bytes marshalling issue in js sdk #3046

Closed hdkshingala closed 9 months ago

hdkshingala commented 9 months ago
Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 9 months ago

Walkthrough

The recent updates to the Aperture JS SDK involve refinements to the retryAfter method, including changes to its structure and the handling of the waitTime property. Additionally, there are improvements to condition checks and data transformations within the _Flow class. New utility functions have been added for data conversion, such as transforming buffer data to base64 and converting protobuf timestamps to JSON. These changes enhance the SDK's functionality and data handling capabilities.

Changes

File Path Summary
.../aperture-js/sdk/flow.ts Updated retryAfter method structure and waitTime handling, improved condition checks and data transformations within _Flow class, added bufferToByteArrayJson and protoTimestampToJSON functions.

🐇✨ In the code where flows entwine, A rabbit tweaked the Aperture line. With a hop and a skip, data transforms, And in binary stars, new functions are born. 🌟🐾


Tips ### Chat with CodeRabbit Bot (`@coderabbitai`) - If you reply to a *review comment* from CodeRabbit, the bot will automatically respond. - To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment - Note: Review comments are made on code diffs or files, not on the PR overview. - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Note: For conversation with the bot, please use the review comments on code diffs or files. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json`
hdkshingala commented 9 months ago

This is merged with @kwapik PR