Add WebSocket support and update dependencies

- Introduced WebSocket polyfill for Node.js in seed-activity.ts and seed-profiles.ts to support applesauce-relay and RxJS.
- Updated package.json and package-lock.json to include 'ws' version 8.19.0 and '@types/ws' version 8.18.1 as dependencies.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Dorian
2026-02-12 13:25:58 +00:00
parent 4bc14caae7
commit ab0560de00
4 changed files with 49 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
// Polyfill WebSocket for Node.js (required by applesauce-relay / RxJS)
import WebSocket from 'ws'
if (!globalThis.WebSocket) {
;(globalThis as unknown as Record<string, unknown>).WebSocket = WebSocket
}
import { Relay } from 'applesauce-relay'
import { PrivateKeySigner } from 'applesauce-signers/signers/private-key-signer'
import {