Skip to content

Modernize toolchain, fix RPC relay bugs, and add tests/CI#7

Open
cleanunicorn wants to merge 1 commit into
masterfrom
claude/old-project-upgrade-wuanxg
Open

Modernize toolchain, fix RPC relay bugs, and add tests/CI#7
cleanunicorn wants to merge 1 commit into
masterfrom
claude/old-project-upgrade-wuanxg

Conversation

@cleanunicorn

Copy link
Copy Markdown
Contributor

Tooling & dependencies:

  • Bump to TypeScript 6, ESLint 10 (flat config), Prettier 3, Express 5,
    axios 1.17, ws 8.21, @types/node 22; drop Node 16 for Node 22 LTS.
  • Enable TypeScript strict mode and replace implicit any with proper
    shared types (JSON-RPC and Nym protocol interfaces).
  • Replace .eslintrc/.eslintignore with eslint.config.mjs flat config.
  • Add dotenv support and an env-exit.sample.

Bug fixes:

  • Preserve the caller's JSON-RPC id end to end so wallets/MetaMask can
    correlate responses (previously overwritten by the exit's counter).
  • Never hang a request: the exit now replies with a JSON-RPC error on
    upstream failure, and the entry fails pending requests on timeout and
    when the Nym connection is not ready.
  • Robust websocket handling with error events and automatic reconnect.
  • Validate incoming requests as JSON-RPC before relaying.

Docker:

  • Multi-stage build on node:22-slim that downloads a pinned, prebuilt
    nym-client binary instead of compiling all of Nym from Rust source.
  • Idempotent, signal-forwarding startup script.
  • Fix Readme docker run tag (spook -> spook-entry).

Quality:

  • Add Vitest unit tests for the protocol helpers.
  • Add a GitHub Actions CI workflow (lint, format, typecheck, build, test
    on Node 20 and 22).

https://claude.ai/code/session_01VGxurA1zANfZjMjSixDM4h

Tooling & dependencies:
- Bump to TypeScript 6, ESLint 10 (flat config), Prettier 3, Express 5,
  axios 1.17, ws 8.21, @types/node 22; drop Node 16 for Node 22 LTS.
- Enable TypeScript strict mode and replace implicit `any` with proper
  shared types (JSON-RPC and Nym protocol interfaces).
- Replace .eslintrc/.eslintignore with eslint.config.mjs flat config.
- Add dotenv support and an env-exit.sample.

Bug fixes:
- Preserve the caller's JSON-RPC `id` end to end so wallets/MetaMask can
  correlate responses (previously overwritten by the exit's counter).
- Never hang a request: the exit now replies with a JSON-RPC error on
  upstream failure, and the entry fails pending requests on timeout and
  when the Nym connection is not ready.
- Robust websocket handling with error events and automatic reconnect.
- Validate incoming requests as JSON-RPC before relaying.

Docker:
- Multi-stage build on node:22-slim that downloads a pinned, prebuilt
  nym-client binary instead of compiling all of Nym from Rust source.
- Idempotent, signal-forwarding startup script.
- Fix Readme docker run tag (spook -> spook-entry).

Quality:
- Add Vitest unit tests for the protocol helpers.
- Add a GitHub Actions CI workflow (lint, format, typecheck, build, test
  on Node 20 and 22).

https://claude.ai/code/session_01VGxurA1zANfZjMjSixDM4h
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.

2 participants