Remove auth dependency#1
Closed
kleberbaum wants to merge 3 commits into
Closed
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the dependency on Node’s crypto.createSign by patching the @getcronit/pylon library to use WebCrypto, and ensures the patch is applied automatically by adding patch-package in package.json.
- Replace synchronous Node crypto signing in
auth.jswith WebCrypto-based async signing. - Add a
postinstallscript and includepatch-packagein dependencies for automatic patching.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| patches/@getcronit+pylon+2.0.0.patch | Switches from crypto.createSign to WebCrypto crypto.subtle. |
| package.json | Adds "postinstall": "patch-package" and the patch-package dependency. |
Comments suppressed due to low confidence (2)
patches/@getcronit+pylon+2.0.0.patch:17
- [nitpick] New async signing logic isn’t covered by existing tests. Please add unit tests to verify WebCrypto-based signatures produce the expected base64 output.
+ const signature = await crypto.subtle.sign(
patches/@getcronit+pylon+2.0.0.patch:10
- The function now uses
await, so its enclosing function must be declaredasync. Please addasyncto the function signature to avoid syntax errors.
+ const key = await crypto.subtle.importKey(
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
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.
Summary
authusage to avoid crypto.createSignTesting
npm run build(fails: Cannot find type definition file for 'bun-types')npm test(fails: vitest not found)Codex couldn't run certain commands due to environment limitations. Consider configuring a setup script or internet access in your Codex environment to install dependencies.
https://chatgpt.com/codex/tasks/task_e_6860245c2490832d86639962e35b1ba3