Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 25, 2025

Vercel-ready Edge Function variant added so the service can be hosted on Vercel with parity to the Cloudflare worker.

  • New Vercel package: packages/vercel with edge handler using Hono, shared sanitize/headers logic, /api path normalization, and fallback in-memory cache for non-Cloudflare runtimes.
  • Demo and docs: Demo HTML/assets bundled via ?raw; README in root and package documents Vercel setup and build command.
  • Tests: Vitest config and handler tests ensure demo fallback and SVG generation behavior without external calls.
  • Tooling: Vitest dependency uses caret range; generated api/ output ignored in git.

Example (edge handler export):

export const config = { runtime: "edge" };

export default async function handler(request: Request): Promise<Response> {
  return handleRequest(request); // normalizes /api/* to worker routes and serves SVG/demo
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • leetcode.cn
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development /home/REDACTED/work/LeetCode-Stats-Card/LeetCode-Stats-Card/node_modules/.pnpm/tinypool@1.1.1/node_modules/tinypool/dist/index.js/../entry/process.js (dns block)
  • leetcode.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development /home/REDACTED/work/LeetCode-Stats-Card/LeetCode-Stats-Card/node_modules/.pnpm/tinypool@1.1.1/node_modules/tinypool/dist/index.js/../entry/process.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Vercel Version</issue_title>
<issue_description>Hi How to Create a vercel version of this is that possible?</issue_description>

<agent_instructions>Yes, the core logic is in packages/core, and you can ask the coding agent to add a Vercel version of packages/cloudflare-worker.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@JacobLinCool Yes, the core logic is in [packages/core](https://github.com/JacobLinCool/LeetCode-Stats-Card/tree/main/packages/core), and you can ask the coding agent to add a Vercel version of [packages/cloudflare-worker](https://github.com/JacobLinCool/LeetCode-Stats-Card/tree/main/packages/cloudflare-worker.).

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Dec 25, 2025

⚠️ No Changeset found

Latest commit: 4b4c023

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI and others added 2 commits December 25, 2025 14:45
Co-authored-by: JacobLinCool <28478594+JacobLinCool@users.noreply.github.com>
Co-authored-by: JacobLinCool <28478594+JacobLinCool@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Vercel version for cloudflare worker Add Vercel Edge deployment for LeetCode Stats Card Dec 25, 2025
Copilot AI requested a review from JacobLinCool December 25, 2025 14:49
@JacobLinCool JacobLinCool mentioned this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vercel Version

2 participants