Modernize toolchain, fix RPC relay bugs, and add tests/CI#7
Open
cleanunicorn wants to merge 1 commit into
Open
Modernize toolchain, fix RPC relay bugs, and add tests/CI#7cleanunicorn wants to merge 1 commit into
cleanunicorn wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tooling & dependencies:
axios 1.17, ws 8.21, @types/node 22; drop Node 16 for Node 22 LTS.
anywith propershared types (JSON-RPC and Nym protocol interfaces).
Bug fixes:
idend to end so wallets/MetaMask cancorrelate responses (previously overwritten by the exit's counter).
upstream failure, and the entry fails pending requests on timeout and
when the Nym connection is not ready.
Docker:
nym-client binary instead of compiling all of Nym from Rust source.
Quality:
on Node 20 and 22).
https://claude.ai/code/session_01VGxurA1zANfZjMjSixDM4h