refactor: trim irc helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 16:37:14 +01:00
parent 476ac66d80
commit dc1d6856bc
7 changed files with 11 additions and 11 deletions

View File

@@ -11,7 +11,7 @@ import {
const IRC_ERROR_CODES = new Set(["432", "464", "465"]);
const IRC_NICK_COLLISION_CODES = new Set(["433", "436"]);
export type IrcPrivmsgEvent = {
type IrcPrivmsgEvent = {
senderNick: string;
senderUser?: string;
senderHost?: string;
@@ -39,7 +39,7 @@ export type IrcClientOptions = {
onLine?: (line: string) => void;
};
export type IrcNickServOptions = {
type IrcNickServOptions = {
enabled?: boolean;
service?: string;
password?: string;

View File

@@ -42,7 +42,7 @@ const IrcNickServSchema = z
}
});
export const IrcAccountSchemaBase = z
const IrcAccountSchemaBase = z
.object({
name: z.string().optional(),
enabled: z.boolean().optional(),
@@ -68,7 +68,7 @@ export const IrcAccountSchemaBase = z
})
.strict();
export const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => {
const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => {
requireOpenAllowFrom({
policy: value.dmPolicy,
allowFrom: value.allowFrom,

View File

@@ -10,7 +10,7 @@ import type { RuntimeEnv } from "./runtime-api.js";
import { getIrcRuntime } from "./runtime.js";
import type { CoreConfig, IrcInboundMessage } from "./types.js";
export type IrcMonitorOptions = {
type IrcMonitorOptions = {
accountId?: string;
config?: CoreConfig;
runtime?: RuntimeEnv;

View File

@@ -3,14 +3,14 @@ import { normalizeIrcAllowlist, resolveIrcAllowlistMatch } from "./normalize.js"
import type { IrcAccountConfig, IrcChannelConfig } from "./types.js";
import type { IrcInboundMessage } from "./types.js";
export type IrcGroupMatch = {
type IrcGroupMatch = {
allowed: boolean;
groupConfig?: IrcChannelConfig;
wildcardConfig?: IrcChannelConfig;
hasConfiguredGroups: boolean;
};
export type IrcGroupAccessGate = {
type IrcGroupAccessGate = {
allowed: boolean;
reason: string;
};

View File

@@ -3,7 +3,7 @@ import { hasIrcControlChars, stripIrcControlChars } from "./control-chars.js";
const IRC_TARGET_PATTERN = /^[^\s:]+$/u;
export type ParsedIrcLine = {
type ParsedIrcLine = {
raw: string;
prefix?: string;
command: string;
@@ -11,7 +11,7 @@ export type ParsedIrcLine = {
trailing?: string;
};
export type ParsedIrcPrefix = {
type ParsedIrcPrefix = {
nick?: string;
user?: string;
host?: string;

View File

@@ -18,7 +18,7 @@ type SendIrcOptions = {
client?: IrcClient;
};
export type SendIrcResult = {
type SendIrcResult = {
messageId: string;
target: string;
};

View File

@@ -66,7 +66,7 @@ export type IrcAccountConfig = {
mediaMaxMb?: number;
};
export type IrcConfig = IrcAccountConfig & {
type IrcConfig = IrcAccountConfig & {
accounts?: Record<string, IrcAccountConfig>;
defaultAccount?: string;
};