Skip to content

Remove auth dependency#1

Closed
kleberbaum wants to merge 3 commits into
mainfrom
netsnek/fix-crypto.createsign-in-cloudflare-worker
Closed

Remove auth dependency#1
kleberbaum wants to merge 3 commits into
mainfrom
netsnek/fix-crypto.createsign-in-cloudflare-worker

Conversation

@kleberbaum
Copy link
Copy Markdown
Member

Summary

  • drop auth usage to avoid crypto.createSign
  • patch pylon to avoid crypto.createSign

Testing

  • 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

@kleberbaum kleberbaum self-assigned this Jun 28, 2025
@kleberbaum kleberbaum requested a review from Copilot June 28, 2025 18:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.js with WebCrypto-based async signing.
  • Add a postinstall script and include patch-package in 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 declared async. Please add async to the function signature to avoid syntax errors.
+  const key = await crypto.subtle.importKey(

Comment thread patches/@getcronit+pylon+2.0.0.patch Outdated
Comment thread package.json Outdated
kleberbaum and others added 2 commits June 28, 2025 20:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kleberbaum kleberbaum closed this Jun 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants