feat: Cloudflare Worker Conversion#124
Conversation
- Added wrangler.toml configuration with secrets management - Created src/worker.ts as CF Worker entry point - Replaced Node.js Buffer with Web API btoa/atob - Added X25519_PRIVATE_KEY to environment schema - Replaced process.env access with context.env in ERC20 handler - Removed dotenv dependency from env types - Added health check endpoint (GET /) - Added CORS support for all responses - Added environment variable validation - Updated package.json with wrangler dev/deploy scripts - Updated tsup config to include worker entry Closes ubiquity-os#92
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 27 minutes and 20 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 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 |
Unused dependencies (1)
Unlisted binaries (1)
|
Convert to Cloudflare Worker
Closes #92
Changes
New:
src/worker.ts— Cloudflare Worker entry pointConfiguration
wrangler.tomlwith proper Worker config,nodejs_compatflag, and secrets documentationwrangler dev,wrangler deploy, andcf-buildscripts topackage.jsontsup.config.tsto include the worker entry pointNode.js → Web API Migration
Buffer.from(...).toString("base64")withbtoa()inencode-decode.tsprocess.env.X25519_PRIVATE_KEYwithcontext.env.X25519_PRIVATE_KEYin ERC20 permit handler (with fallback for backward compat)dotenv/configimport fromsrc/types/env.tsX25519_PRIVATE_KEYto the environment schemaBackward Compatibility
src/main.ts) is preservedsrc/index.ts) remain unchangedContextandPayloadoverloads as beforeTesting