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:
@@ -4,6 +4,12 @@
|
||||
*
|
||||
* Run after seed-profiles.ts and with the relay already running.
|
||||
*/
|
||||
// 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 {
|
||||
|
||||
Reference in New Issue
Block a user