fix(client): set last-event-id header when sending#266
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis change set updates the Changes
Sequence Diagram(s)sequenceDiagram
participant C as Client
participant E as StandardRPCLinkCodec.encode
participant H as Headers Object
C->>E: Invoke encode(options, headers)
E->>H: Retrieve current headers (immutable copy)
alt options.lastEventId provided
H-->>E: Return existing 'last-event-id' value (if any)
alt Header not set
E->>H: Set 'last-event-id' = options.lastEventId
else alt Header is a non-array
E->>H: Convert existing value to array and append options.lastEventId
else
E->>H: Append options.lastEventId to existing array
end
end
E-->>C: Return updated headers
Poem
Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Definitions (2)packages/client/src/adapters/standard/rpc-link-codec.test.ts (1)
packages/client/src/adapters/standard/rpc-link-codec.ts (3)
🔇 Additional comments (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
More templates
@orpc/arktype
@orpc/client
@orpc/contract
@orpc/openapi-client
@orpc/react-query
@orpc/openapi
@orpc/server
@orpc/shared
@orpc/solid-query
@orpc/standard-server
@orpc/standard-server-fetch
@orpc/standard-server-node
@orpc/svelte-query
@orpc/valibot
@orpc/vue-colada
@orpc/vue-query
@orpc/zod
commit: |
Summary by CodeRabbit
Refactor
Tests