diff --git a/extensions/discord/src/monitor/sender-identity.ts b/extensions/discord/src/monitor/sender-identity.ts index 43f2b89f5ee..b385160d675 100644 --- a/extensions/discord/src/monitor/sender-identity.ts +++ b/extensions/discord/src/monitor/sender-identity.ts @@ -23,6 +23,7 @@ type DiscordWebhookMessageLike = { type DiscordMemberLike = { nickname?: string | null; + nick?: string | null; }; export function resolveDiscordWebhookId(message: DiscordWebhookMessageLike): string | null { @@ -61,7 +62,10 @@ export function resolveDiscordSenderIdentity(params: { const senderTag = formatDiscordUserTag(params.author); const senderDisplay = - params.member?.nickname ?? params.author.globalName ?? params.author.username; + params.member?.nickname ?? + params.member?.nick ?? + params.author.globalName ?? + params.author.username; const senderLabel = senderDisplay && senderTag && senderDisplay !== senderTag ? `${senderDisplay} (${senderTag})` diff --git a/extensions/tlon/src/urbit/sse-client.ts b/extensions/tlon/src/urbit/sse-client.ts index a779d5d37b6..2670a708773 100644 --- a/extensions/tlon/src/urbit/sse-client.ts +++ b/extensions/tlon/src/urbit/sse-client.ts @@ -1,5 +1,6 @@ import { randomUUID } from "node:crypto"; import { Readable } from "node:stream"; +import type { ReadableStream as WebReadableStream } from "node:stream/web"; import type { LookupFn, SsrFPolicy } from "../../api.js"; import { ensureUrbitChannelOpen, pokeUrbitChannel, scryUrbitPath } from "./channel-ops.js"; import { getUrbitContext, normalizeUrbitCookie } from "./context.js"; @@ -206,7 +207,11 @@ export class UrbitSSEClient { if (!body) { return; } - const stream = body instanceof ReadableStream ? Readable.fromWeb(body) : body; + // Bridge DOM fetch stream types to Node's stream/web declaration on newer TS/node combos. + const stream = + body instanceof ReadableStream + ? Readable.fromWeb(body as unknown as WebReadableStream) + : body; let buffer = ""; try { diff --git a/src/cli/program/route-specs.ts b/src/cli/program/route-specs.ts index 4a2d8c1aa94..7fc1ca34da8 100644 --- a/src/cli/program/route-specs.ts +++ b/src/cli/program/route-specs.ts @@ -35,7 +35,7 @@ function createParsedRoute(params: { if (!args) { return false; } - await params.definition.runParsedArgs(args); + await params.definition.runParsedArgs(args as never); return true; }, }; diff --git a/src/cli/program/routed-command-definitions.ts b/src/cli/program/routed-command-definitions.ts index 7f16aee91b4..67e18ea0659 100644 --- a/src/cli/program/routed-command-definitions.ts +++ b/src/cli/program/routed-command-definitions.ts @@ -20,7 +20,10 @@ export type RoutedCommandDefinition> = { runParsedArgs: (args: ParsedRouteArgs) => Promise; }; -export type AnyRoutedCommandDefinition = RoutedCommandDefinition>; +export type AnyRoutedCommandDefinition = { + parseArgs: RouteArgParser; + runParsedArgs: (args: never) => Promise; +}; function defineRoutedCommand>( definition: RoutedCommandDefinition,