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:
35
package-lock.json
generated
35
package-lock.json
generated
@@ -19,10 +19,12 @@
|
|||||||
"nostr-tools": "^2.23.0",
|
"nostr-tools": "^2.23.0",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^3.0.4",
|
||||||
"vue": "^3.5.24",
|
"vue": "^3.5.24",
|
||||||
"vue-router": "^4.6.3"
|
"vue-router": "^4.6.3",
|
||||||
|
"ws": "^8.19.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^24.10.0",
|
"@types/node": "^24.10.0",
|
||||||
|
"@types/ws": "^8.18.1",
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@vue/tsconfig": "^0.8.1",
|
"@vue/tsconfig": "^0.8.1",
|
||||||
"autoprefixer": "^10.4.22",
|
"autoprefixer": "^10.4.22",
|
||||||
@@ -3336,6 +3338,16 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/ws": {
|
||||||
|
"version": "8.18.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz",
|
||||||
|
"integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@vitejs/plugin-vue": {
|
"node_modules/@vitejs/plugin-vue": {
|
||||||
"version": "6.0.4",
|
"version": "6.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.4.tgz",
|
||||||
@@ -9073,6 +9085,27 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/ws": {
|
||||||
|
"version": "8.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz",
|
||||||
|
"integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"bufferutil": "^4.0.1",
|
||||||
|
"utf-8-validate": ">=5.0.2"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"bufferutil": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"utf-8-validate": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/yallist": {
|
"node_modules/yallist": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||||
|
|||||||
@@ -25,10 +25,12 @@
|
|||||||
"nostr-tools": "^2.23.0",
|
"nostr-tools": "^2.23.0",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^3.0.4",
|
||||||
"vue": "^3.5.24",
|
"vue": "^3.5.24",
|
||||||
"vue-router": "^4.6.3"
|
"vue-router": "^4.6.3",
|
||||||
|
"ws": "^8.19.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^24.10.0",
|
"@types/node": "^24.10.0",
|
||||||
|
"@types/ws": "^8.18.1",
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"@vue/tsconfig": "^0.8.1",
|
"@vue/tsconfig": "^0.8.1",
|
||||||
"autoprefixer": "^10.4.22",
|
"autoprefixer": "^10.4.22",
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
*
|
*
|
||||||
* Run after seed-profiles.ts and with the relay already running.
|
* 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 { Relay } from 'applesauce-relay'
|
||||||
import { PrivateKeySigner } from 'applesauce-signers/signers/private-key-signer'
|
import { PrivateKeySigner } from 'applesauce-signers/signers/private-key-signer'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -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 { Relay } from 'applesauce-relay'
|
||||||
import { PrivateKeySigner } from 'applesauce-signers/signers/private-key-signer'
|
import { PrivateKeySigner } from 'applesauce-signers/signers/private-key-signer'
|
||||||
import {
|
import {
|
||||||
|
|||||||
Reference in New Issue
Block a user