chore(deps): upgrade all dependencies, toolchains and images (#2825)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-17 21:08:56 +02:00
1 parent 56e04e7b53
commit 3b552e00ef
510 files changed
+23614 -37473

No files matched your search

@@ -107,7 +107,7 @@ export class MessageInteractionRepository extends IMessageInteractionRepository
async removeChannelPin(channelId: ChannelID, messageId: MessageID): Promise<void> {
const message = await this.messageRepository.getMessage(channelId, messageId);
if (!message || !message.pinnedTimestamp) {
if (!message?.pinnedTimestamp) {
return;
}
await deleteOneOrMany(
@@ -617,7 +617,7 @@ export class ChannelOperationsService {
auditLogReason: string | null;
}): Promise<void> {
const channel = await this.channelRepository.channelData.findUnique(params.channelId);
if (!channel || !channel.guildId) throw new UnknownChannelError();
if (!channel?.guildId) throw new UnknownChannelError();
const canManageRoles = await this.gatewayService.checkPermission({
guildId: channel.guildId,
userId: params.userId,
@@ -690,7 +690,7 @@ export class ChannelOperationsService {
auditLogReason: string | null;
}): Promise<void> {
const channel = await this.channelRepository.channelData.findUnique(params.channelId);
if (!channel || !channel.guildId) throw new UnknownChannelError();
if (!channel?.guildId) throw new UnknownChannelError();
const canManageRoles = await this.gatewayService.checkPermission({
guildId: channel.guildId,
userId: params.userId,
@@ -115,7 +115,7 @@ export class MessageDeleteService {
}): Promise<void> {
const channelId = webhook.channelId!;
const channel = await this.deps.channelRepository.channelData.findUnique(channelId);
if (!channel || !channel.guildId) {
if (!channel?.guildId) {
throw new CannotExecuteOnDmError();
}
const message = await this.deps.channelRepository.messages.getMessage(channelId, messageId);
@@ -312,7 +312,7 @@ function collectEmbedReferencedAttachmentCdnKeys(message: Message, ownKeys: Read
const mediaPrefix = `${Config.endpoints.media}/`;
const keys = new Set<string>();
const consider = (url: string | null | undefined): void => {
if (!url || !url.startsWith(mediaPrefix)) {
if (!url?.startsWith(mediaPrefix)) {
return;
}
const key = url.slice(mediaPrefix.length);
@@ -94,7 +94,7 @@ export class MessageMentionService {
referencedMessage?.authorId &&
referencedMessage.authorId !== message.authorId &&
!isDMChannel &&
(!allowedMentions || allowedMentions.replied_user !== false);
allowedMentions?.replied_user !== false;
if (shouldAddReferencedUser) {
userMentions.add(referencedMessage!.authorId!);
}
@@ -569,7 +569,7 @@ export class MessagePersistenceService {
}
const updatedSnapshots = message.messageSnapshots.map((snapshot, index) => {
const edit = snapshotEdits[index];
if (!edit || !edit.attachments || edit.attachments.length === 0) {
if (!edit?.attachments || edit.attachments.length === 0) {
return snapshot.toMessageSnapshot();
}
const snapshotRow = snapshot.toMessageSnapshot();
@@ -80,7 +80,7 @@ export class MessageProcessingService {
requestCache: RequestCache;
}): Promise<void> {
if (channel.guildId || channel.type !== ChannelTypes.DM) return;
if (!channel.recipientIds || channel.recipientIds.size !== 2) return;
if (channel.recipientIds?.size !== 2) return;
const recipientIds = Array.from(channel.recipientIds);
const openStates = await this.batchCheckDmChannelOpen(recipientIds, channelId);
const closedRecipients = openStates.filter((state) => !state.isOpen);
@@ -7,8 +7,8 @@ import {
} from '@app/api/channel/services/message/MessageResponseDataService';
import {Message} from '@app/api/models/Message';
import {MessageTypes} from '@fluxer/constants/src/ChannelConstants';
import type {NatsConnection} from '@nats-io/transport-node';
import type {INatsConnectionManager} from '@pkgs/nats/src/INatsConnectionManager';
import type {NatsConnection} from 'nats';
import {describe, expect, it} from 'vitest';
const encoder = new TextEncoder();
@@ -11,7 +11,9 @@ import {isJsonRecord, parseJsonRecord, parseJsonWithGuard} from '@app/api/utils/
import type {MessageResponse} from '@fluxer/schema/src/domains/message/MessageResponseSchemas';
import type {INatsConnectionManager} from '@pkgs/nats/src/INatsConnectionManager';
import {NatsConnectionManager} from '@pkgs/nats/src/NatsConnectionManager';
import {StringCodec} from 'nats';
const textEncoder = new TextEncoder();
const textDecoder = new TextDecoder();
const MESSAGE_RESPONSE_SERVICE_SUBJECT = 'svc.messages';
const MESSAGE_RESPONSE_SERVICE_TIMEOUT_MS = 6000;
@@ -79,8 +81,6 @@ function isMessageServiceResponse(value: unknown): value is MessageServiceRespon
}
export class MessageResponseDataService {
private readonly codec = StringCodec();
constructor(private readonly connectionManager: INatsConnectionManager) {}
async listMessages(params: {
@@ -307,10 +307,10 @@ export class MessageResponseDataService {
const connection = this.connectionManager.getConnection();
const response = await connection.request(
MESSAGE_RESPONSE_SERVICE_SUBJECT,
this.codec.encode(JSON.stringify(payload)),
textEncoder.encode(JSON.stringify(payload)),
{timeout: MESSAGE_RESPONSE_SERVICE_TIMEOUT_MS},
);
const decoded = this.codec.decode(response.data);
const decoded = textDecoder.decode(response.data);
const parsed = parseJsonWithGuard(decoded, isMessageServiceResponse);
if (!parsed) {
throwForSvcErrorReply('message-response-service', parseJsonRecord(decoded));
@@ -1059,7 +1059,7 @@ export class MessageSendService {
}): Promise<Message> {
const channelId = webhook.channelId!;
const channel = await this.deps.channelRepository.channelData.findUnique(channelId);
if (!channel || !channel.guildId) {
if (!channel?.guildId) {
throw new CannotExecuteOnDmError();
}
const guild = await this.deps.gatewayService.getGuildData({
@@ -1245,7 +1245,7 @@ export class MessageSendService {
}): Promise<Message> {
const channelId = webhook.channelId!;
const channel = await this.deps.channelRepository.channelData.findUnique(channelId);
if (!channel || !channel.guildId) {
if (!channel?.guildId) {
throw new CannotExecuteOnDmError();
}
const existingMessage = await this.deps.channelRepository.messages.getMessage(channelId, messageId);