engine: migrate platform-neutral crypto to Web Crypto#145
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR migrates the ChangesCrypto Migration to Web Crypto
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly Related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request migrates the platform-neutral crypto usage in @relaycast/engine from the Node.js node:crypto module to standard Web Crypto APIs. A new utility file packages/engine/src/lib/crypto.ts is introduced, containing helper functions for SHA-256 hashing, HMAC signatures, random hex generation, and UUID generation. Because the Web Crypto APIs are asynchronous, several internal functions (such as hashToken, signPayload, and buildKey) have been updated to return promises, and their callers have been updated to use await or Promise.all. Unit tests have also been added to verify the new crypto helpers. No review comments were provided, so there is no additional feedback.
|
Preview deployed!
This preview shares the staging database and will be cleaned up when the PR is merged or closed. Run E2E testsnpm run e2e -- https://pr145-api.relaycast.dev --ciOpen observer dashboard |
Summary
Validation
Closes #143