mirror of
https://github.com/hzrd149/nsite-gateway.git
synced 2025-07-25 14:45:32 +00:00
Remove unused dependencies
This commit is contained in:
parent
364e947245
commit
6f8b0038c3
5
.changeset/crazy-rocks-enjoy.md
Normal file
5
.changeset/crazy-rocks-enjoy.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"nsite-gateway": patch
|
||||
---
|
||||
|
||||
Remove unused dependencies
|
32
package.json
32
package.json
@ -19,31 +19,28 @@
|
||||
"public"
|
||||
],
|
||||
"dependencies": {
|
||||
"@keyv/redis": "^4.3.2",
|
||||
"@keyv/sqlite": "^4.0.1",
|
||||
"@keyv/redis": "^4.6.0",
|
||||
"@keyv/sqlite": "^4.0.5",
|
||||
"@koa/cors": "^5.0.0",
|
||||
"blossom-client-sdk": "^3.0.1",
|
||||
"debug": "^4.4.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"debug": "^4.4.1",
|
||||
"dotenv": "^16.6.1",
|
||||
"follow-redirects": "^1.15.9",
|
||||
"keyv": "^5.3.2",
|
||||
"koa": "^2.16.0",
|
||||
"keyv": "^5.4.0",
|
||||
"koa": "^2.16.1",
|
||||
"koa-morgan": "^1.0.1",
|
||||
"koa-send": "^5.0.1",
|
||||
"koa-static": "^5.0.0",
|
||||
"mime": "^4.0.7",
|
||||
"nostr-tools": "^2.12.0",
|
||||
"nsite-cli": "^0.1.16",
|
||||
"nostr-tools": "^2.15.1",
|
||||
"pac-proxy-agent": "^7.2.0",
|
||||
"proxy-agent": "^6.5.0",
|
||||
"websocket-polyfill": "1.0.0",
|
||||
"ws": "^8.18.1",
|
||||
"ws": "^8.18.3",
|
||||
"xbytes": "^1.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.28.1",
|
||||
"@changesets/cli": "^2.29.5",
|
||||
"@swc-node/register": "^1.10.10",
|
||||
"@swc/core": "^1.11.16",
|
||||
"@swc/core": "^1.13.1",
|
||||
"@types/better-sqlite3": "^7.6.13",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/follow-redirects": "^1.14.4",
|
||||
@ -53,13 +50,12 @@
|
||||
"@types/koa-static": "^4.0.4",
|
||||
"@types/koa__cors": "^5.0.0",
|
||||
"@types/koa__router": "^12.0.4",
|
||||
"@types/node": "^20.17.30",
|
||||
"@types/node": "^20.19.9",
|
||||
"@types/proxy-from-env": "^1.0.4",
|
||||
"@types/ws": "^8.18.1",
|
||||
"esbuild": "^0.25.2",
|
||||
"nodemon": "^3.1.9",
|
||||
"pkg": "^5.8.1",
|
||||
"prettier": "^3.5.3",
|
||||
"esbuild": "^0.25.8",
|
||||
"nodemon": "^3.1.10",
|
||||
"prettier": "^3.6.2",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"resolutions": {
|
||||
|
2236
pnpm-lock.yaml
generated
2236
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1 +1,2 @@
|
||||
export const NSITE_KIND = 34128 as number;
|
||||
export const USER_BLOSSOM_SERVER_LIST_KIND = 10063 as number;
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Filter, NostrEvent, SimplePool } from "nostr-tools";
|
||||
import { getServersFromServerListEvent, USER_BLOSSOM_SERVER_LIST_KIND } from "blossom-client-sdk";
|
||||
|
||||
import { LOOKUP_RELAYS } from "./env.js";
|
||||
import { pubkeyRelays, pubkeyServers } from "./cache.js";
|
||||
import logger from "./logger.js";
|
||||
import { npubEncode } from "nostr-tools/nip19";
|
||||
import { USER_BLOSSOM_SERVER_LIST_KIND } from "./const.js";
|
||||
|
||||
const pool = new SimplePool();
|
||||
|
||||
@ -35,9 +35,9 @@ export async function getUserBlossomServers(pubkey: string, relays: string[]) {
|
||||
if (cached) return cached;
|
||||
|
||||
const blossomServersEvent = await pool.get(relays, { kinds: [USER_BLOSSOM_SERVER_LIST_KIND], authors: [pubkey] });
|
||||
const servers = blossomServersEvent
|
||||
? getServersFromServerListEvent(blossomServersEvent).map((u) => u.toString())
|
||||
: undefined;
|
||||
const servers = blossomServersEvent?.tags
|
||||
.filter((t) => t[0] === "server" && t[1] && URL.canParse(t[1]))
|
||||
.map((t) => new URL(t[1]).toString());
|
||||
|
||||
// Save servers if found
|
||||
if (servers) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user