Skip to content

Releases: Hussaincodes01/HackPair

Hack-Pair 0.2.8

15 Jun 06:52

Choose a tag to compare

fixed sever.js opening inside of VS code automatically

Hack-Pair 0.2.7

14 Jun 21:06

Choose a tag to compare

Server startup race condition fixed — the exit event can fire before the data event on Windows (pipe buffering). Now:

  • stdoutBuffer accumulates all output — seenStartup stays true once "running at" appears, even if the exit event fires first
  • exit handler only rejects on non-zero exit codes when startup wasn't seen — code 0 with startup data waits for the health poll
  • If server exits with code 0 but startup was seen, the health endpoint is still polled and startup resolves on timeout as a fallback
    Missing Windows env vars — added APPDATA, SystemRoot, TEMP, TMP to childEnv (some Node.js modules need these on Windows)
    Stale server cleanup — killExistingServer() kills any lingering process before spawning a new one. Server is also cleaned up in the catch block when room creation fails, so a failed attempt doesn't leave a zombie process blocking port 3001

Hack-Pair Stable 0.2.6

14 Jun 18:37

Choose a tag to compare

Here are all changes from v0.2.2 → v0.2.5:
Tunneling (ngrok → Cloudflare)

  • Replaced ngrok (manual CLI) with Cloudflare Quick Tunnels — fully automatic, no account/token needed
  • cloudflared binary auto-downloads via npm — user never interacts with it
  • Room creator gets a https://*.trycloudflare.com URL automatically on room creation
  • Graceful fallback to local LAN IP if tunnel fails
    Security Fixes
  • CORS hardened: origin: true → dynamic allow-list (localhost, LAN IPs, *.trycloudflare.com only)
  • Invite code bias fixed: modulo bias removed — rejection sampling for uniform distribution
  • Memory leak fixed: duplicate Socket.IO event listeners on reconnect — single setupListeners() with proper cleanup
  • Env leak fixed: server child process no longer gets full process.env — only PORT, CLOUDFLARED_*, NODE_ENV, PATH
  • Same CORS fix applied to dashboard-tool
    Dependency Cleanup
  • Removed 6 unused deps from server: @fastify/static, lib0, uuid, zod, pino-pretty, @hacksync/shared
  • Moved socket.io-client from devDependencies → dependencies (correct semantic placement)
  • Aligned fastify version between server and dashboard-tool
    Infrastructure
  • Added .vscode/settings.json — forces VS Code to use workspace TypeScript (5.9.3) instead of built-in version (fixes false red squiggles)
  • Extension README.md added (shows in VS Code marketplace)
  • Root README.md updated with Cloudflare tunnel docs
  • Version bumped from 0.2.2 → 0.2.5

UPDATE
Server startup fixed — startServer() now:

  • Polls the health endpoint (/api/health) until the server actually responds
  • Waits up to 8 seconds (was a blind 3-second timeout that resolved even if server failed)
  • Shows the actual server error output on failure instead of generic "fetch failed"
  • Captures stderr from the server process and surfaces it in the error message
  • Rejects with a clear message like "Server error: EADDRINUSE port 3001" or "Server exited unexpectedly"

Hack-Pair 0.3.0

13 Jun 09:53

Choose a tag to compare

Tunnel error handling improved — now shows the actual reason instead of just "Public tunnel unavailable":

  • "cloudflared package not found" → module not resolved
  • "Failed to download tunnel binary: ..." → binary download failed
  • "cloudflared tunnel timed out (30s)" → network issue or firewall blocking Cloudflare
  • "Cloudflare tunnel error: ..." → actual error from cloudflared
  • "cloudflared exited (code X) before providing a URL" → binary crashed