diff --git a/e2e/harness/seed/space.ts b/e2e/harness/seed/space.ts index 6a069077..55106837 100644 --- a/e2e/harness/seed/space.ts +++ b/e2e/harness/seed/space.ts @@ -13,7 +13,7 @@ import { import type {EventTemplate, HashedEvent, SignedEvent, StampedEvent} from "@welshman/util" import {Nip59} from "@welshman/signer" import {DirectMessage, EventWriter, Profile} from "@welshman/domain" -import type {BaseEventReader, ConfiguredKind, KindFactory} from "@welshman/domain" +import type {BaseEventReader, ConfiguredKind, EventQuery, KindFactory} from "@welshman/domain" import type {RoomOptions, TestRelay} from "../zooid/types" import type {Zooid} from "../zooid/relay" import type {TenantName} from "../zooid/config" @@ -81,9 +81,9 @@ export type SeededSpace = { // This space's domain kinds, bound to a resolver that answers with its url, so a writer built // here renders its relay hints as this space. For everything `event()` takes a template for: // `space.event(user, () => space.kind(Article).writer().setTitle("x").renderTemplate())`. - kind>( - factory: KindFactory, - ): ConfiguredKind + kind, Q extends EventQuery>( + factory: KindFactory, + ): ConfiguredKind } export type SeedSpaceOptions = { @@ -209,8 +209,9 @@ export const seedSpace = ({zooid, enqueue, startedAt, name}: SeedSpaceOptions): created_at: createdAt, })) - const kind = >(factory: KindFactory) => - factory.configure(context) + const kind = , Q extends EventQuery>( + factory: KindFactory, + ) => factory.configure(context) // Every wrap is published over the sender's own connection, since a gift wrap's author is an // ephemeral key nobody in this process can authenticate as. zooid stores it anyway, authorizing a diff --git a/package.json b/package.json index 647910f2..0323dd66 100644 --- a/package.json +++ b/package.json @@ -82,16 +82,16 @@ "@types/throttle-debounce": "^5.0.2", "@vite-pwa/assets-generator": "^1.0.2", "@vite-pwa/sveltekit": "^1.1.0", - "@welshman/app": "^0.9.10", - "@welshman/content": "^0.9.10", - "@welshman/domain": "^0.9.10", - "@welshman/editor": "^0.9.10", - "@welshman/feeds": "^0.9.10", - "@welshman/lib": "^0.9.10", - "@welshman/net": "^0.9.10", - "@welshman/signer": "^0.9.10", - "@welshman/store": "^0.9.10", - "@welshman/util": "^0.9.10", + "@welshman/app": "^0.10.2", + "@welshman/content": "^0.10.2", + "@welshman/domain": "^0.10.2", + "@welshman/editor": "^0.10.2", + "@welshman/feeds": "^0.10.2", + "@welshman/lib": "^0.10.2", + "@welshman/net": "^0.10.2", + "@welshman/signer": "^0.10.2", + "@welshman/store": "^0.10.2", + "@welshman/util": "^0.10.2", "cheerio": "^1.2.0", "compressorjs-next": "^1.1.2", "dompurify": "^3.4.13", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a76e1aad..96a127a6 100644 Binary files a/pnpm-lock.yaml and b/pnpm-lock.yaml differ diff --git a/src/app/access.ts b/src/app/access.ts index f6b93a23..8b5988b9 100644 --- a/src/app/access.ts +++ b/src/app/access.ts @@ -7,6 +7,7 @@ import { isRelayUrl, makeEvent, normalizeRelayUrl, + relay, FOLLOWS, MESSAGING_RELAYS, PROFILE, @@ -101,7 +102,7 @@ export const deriveRelayAuthError = (url: string) => }) export const publishJoinRequest = (url: string, claim?: string) => { - const eventWriter = writer(RelayJoin).forceRelays(url) + const eventWriter = writer(RelayJoin).forceRoutes(relay(url)) if (claim) { eventWriter.setClaim(claim) @@ -111,7 +112,7 @@ export const publishJoinRequest = (url: string, claim?: string) => { } export const publishLeaveRequest = (url: string) => - command(writer(RelayLeave).forceRelays(url)).then(publish) + command(writer(RelayLeave).forceRoutes(relay(url))).then(publish) // A relay answers a re-sent request with "duplicate:" and a membership it already has with // "already a member" — both leave us where we wanted to be, so only anything else is a refusal. diff --git a/src/app/components/CalendarEventForm.svelte b/src/app/components/CalendarEventForm.svelte index 0fe81194..3354fe68 100644 --- a/src/app/components/CalendarEventForm.svelte +++ b/src/app/components/CalendarEventForm.svelte @@ -2,6 +2,7 @@ import type {Snippet} from "svelte" import {writable} from "svelte/store" import {randomId} from "@welshman/lib" + import {relay} from "@welshman/util" import {publish} from "@welshman/app" import {TimeEvent} from "@welshman/domain" import {preventDefault} from "@lib/html" @@ -100,7 +101,7 @@ if (h) { eventWriter.setRoom(url, h) } else { - eventWriter.forceRelays(url) + eventWriter.forceRoutes(relay(url)) } const calendarThunk = await command(eventWriter).then(publish) diff --git a/src/app/components/ClassifiedForm.svelte b/src/app/components/ClassifiedForm.svelte index a304383b..405a0f03 100644 --- a/src/app/components/ClassifiedForm.svelte +++ b/src/app/components/ClassifiedForm.svelte @@ -1,6 +1,7 @@