feat: SDK update for version 0.33.0#109
Conversation
Greptile SummaryThis PR bumps the React Native SDK to version 0.33.0, adding three main improvements: JWT forwarding on realtime WebSocket connections (via URL param on web, custom header on native),
Confidence Score: 3/5The core realtime JWT and URL-encoding changes are straightforward and well-implemented, but the unconditional empty The src/services/avatars.ts and src/services/storage.ts — every method that appends Important Files Changed
|
| const uri = new URL(this.client.config.endpoint + apiPath); | ||
| payload['project'] = this.client.config.project; | ||
|
|
||
| payload['impersonateuserid'] = this.client.config.impersonateuserid; |
There was a problem hiding this comment.
Empty
impersonateuserid unconditionally appended to every URL
this.client.config.impersonateuserid defaults to '' (see client.ts line 175). Service.flatten does not filter empty strings, so every avatar and storage request URL will include ?impersonateuserid= even when no impersonation is configured. The same unconditional assignment appears in all other avatar methods (getCreditCard, getFlag, getFavicon, getImage, getInitials, getQR, getScreenshot, and their *URL counterparts) and in storage.ts (getFileDownload, getFilePreview, getFileView, and their URL variants).
The assignment should be guarded to only run when the value is non-empty.
| password: 'password', | ||
| oldPassword: 'password' // optional |
There was a problem hiding this comment.
Literal
'password' used as placeholder for both new and old password
Both password and oldPassword are now set to the same literal 'password' string in the example. A developer copying this code verbatim would set both fields to the exact same value and potentially not notice. Using distinct placeholders like '<NEW_PASSWORD>' and '<OLD_PASSWORD>' (matching the pre-existing '<OLD_PASSWORD>' style from the previous version) would make the intent clearer. The same pattern applies to create.md and update-recovery.md.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
This PR contains updates to the SDK for version 0.33.0.
What's Changed
impersonateUserIdonavatarsandstoragefile requests.