Skip to content

Commit

Permalink
use submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
BlowaterNostr committed Mar 28, 2024
1 parent d0ccc29 commit d1fc79a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
10 changes: 3 additions & 7 deletions main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ import Error404 from "./routes/_404.tsx";
import { render } from "https://esm.sh/[email protected]";
import { Mutation, RootResolver } from "./resolvers/root.ts";
import * as gql from "https://esm.sh/[email protected]";
import {
NostrEvent,
NostrFilters,
verifyEvent,
} from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/nostr.ts";
import { parseJSON } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/_helper.ts";
import { PublicKey } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/key.ts";
import { parseJSON } from "./nostr.ts/_helper.ts";
import { PublicKey } from "./nostr.ts/key.ts";
import { NostrEvent, NostrFilters, verifyEvent } from "./nostr.ts/nostr.ts";

const schema = gql.buildSchema(gql.print(typeDefs));

Expand Down
7 changes: 2 additions & 5 deletions resolvers/event.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
NostrEvent,
NostrKind,
} from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/nostr.ts";
import { kv } from "../main.tsx";
import { PublicKey } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/key.ts";
import { PublicKey } from "../nostr.ts/key.ts";
import { NostrEvent, NostrKind } from "../nostr.ts/nostr.ts";
import { pubkey_resolver } from "./pubkey.ts";

export type Actor = {
Expand Down
5 changes: 1 addition & 4 deletions resolvers/policy.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import {
NostrEvent,
NostrKind,
} from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/nostr.ts";
import { kv } from "../main.tsx";
import { NostrEvent, NostrKind } from "../nostr.ts/nostr.ts";

export async function Policies() {
const list = kv.list<NostrEvent>({ prefix: ["policy"] });
Expand Down
2 changes: 1 addition & 1 deletion resolvers/pubkey.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PublicKey } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/key.ts";
import { PublicKey } from "../nostr.ts/key.ts";
import { EventsResolver } from "./event.ts";

export const pubkey_resolver = async (pubkey: PublicKey) => {
Expand Down
8 changes: 4 additions & 4 deletions ws.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { PublicKey } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/key.ts";
import { PolicyResolver } from "./resolvers/policy.ts";
import { EventResolver } from "./resolvers/event.ts";
import { PublicKey } from "./nostr.ts/key.ts";
import {
_RelayResponse_EOSE,
_RelayResponse_Event,
Expand All @@ -9,9 +11,7 @@ import {
NostrEvent,
NostrFilters,
verifyEvent,
} from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/nostr.ts";
import { PolicyResolver } from "./resolvers/policy.ts";
import { EventResolver } from "./resolvers/event.ts";
} from "./nostr.ts/nostr.ts";

export const ws_handler = (connections: Map<WebSocket, Map<string, NostrFilters>>) => (req: Request) => {
if (req.headers.get("upgrade") != "websocket") {
Expand Down

0 comments on commit d1fc79a

Please sign in to comment.