A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
refactor(api): make module-only helpers and fields private
Hampus1063ad35764f
diff --git a/fluxer_api/src/api/channel/PrivateChannelSnapshot.ts b/fluxer_api/src/api/channel/PrivateChannelSnapshot.tsindex cb8030a0b..c333ba916 100644--- a/fluxer_api/src/api/channel/PrivateChannelSnapshot.ts+++ b/fluxer_api/src/api/channel/PrivateChannelSnapshot.ts@@ -21,7 +21,7 @@ type SnapshotPatch = Partial<{snapshot_at: DbOp<Date>;}>;-export function isPrivateChannelType(type: number): boolean {+function isPrivateChannelType(type: number): boolean {return type === ChannelTypes.DM || type === ChannelTypes.GROUP_DM || type === ChannelTypes.DM_PERSONAL_NOTES;}diff --git a/fluxer_api/src/api/channel/services/message/CrosspostEmbedObjects.ts b/fluxer_api/src/api/channel/services/message/CrosspostEmbedObjects.tsindex fba90c17c..1ab8bdfcd 100644--- a/fluxer_api/src/api/channel/services/message/CrosspostEmbedObjects.ts+++ b/fluxer_api/src/api/channel/services/message/CrosspostEmbedObjects.ts@@ -48,7 +48,7 @@ export function forEachEmbedMedia(}}-export function collectEmbedContentHashes(message: Message): Array<string> {+function collectEmbedContentHashes(message: Message): Array<string> {const hashes: Array<string> = [];forEachEmbedMedia(message.embeds.map((embed) => embed.toMessageEmbed()),diff --git a/fluxer_api/src/api/channel/services/message/MessageValidationService.ts b/fluxer_api/src/api/channel/services/message/MessageValidationService.tsindex 82debfce9..ba8b8d8a3 100644--- a/fluxer_api/src/api/channel/services/message/MessageValidationService.ts+++ b/fluxer_api/src/api/channel/services/message/MessageValidationService.ts@@ -121,7 +121,7 @@ export class MessageValidationService {}}- validateContentLength(+ private validateContentLength(content: string | null | undefined,user: User | null,guildFeatures?: Iterable<string> | null,diff --git a/fluxer_api/src/api/channel/services/message/ThreadMessageActivity.ts b/fluxer_api/src/api/channel/services/message/ThreadMessageActivity.tsindex ae3964948..eb73f6335 100644--- a/fluxer_api/src/api/channel/services/message/ThreadMessageActivity.ts+++ b/fluxer_api/src/api/channel/services/message/ThreadMessageActivity.ts@@ -37,7 +37,7 @@ export class ThreadMessageActivity {private readonly gatewayService: IGatewayService,) {}- async assertCanUnarchive(state: ThreadState): Promise<void> {+ private async assertCanUnarchive(state: ThreadState): Promise<void> {if (!state.archived) return;if ((await this.channelRepository.threads.countActiveThreads(state.guildId)) >= MAX_ACTIVE_THREADS_PER_GUILD) {throw new MaxActiveThreadsError(MAX_ACTIVE_THREADS_PER_GUILD);diff --git a/fluxer_api/src/api/channel/services/thread/ThreadDenials.ts b/fluxer_api/src/api/channel/services/thread/ThreadDenials.tsindex 56e9be5be..eb89108ad 100644--- a/fluxer_api/src/api/channel/services/thread/ThreadDenials.ts+++ b/fluxer_api/src/api/channel/services/thread/ThreadDenials.ts@@ -9,7 +9,7 @@ import {MissingAccessError} from '@fluxer/errors/src/domains/core/MissingAccessEimport {MissingPermissionsError} from '@fluxer/errors/src/domains/core/MissingPermissionsError';import {CommunicationDisabledError} from '@fluxer/errors/src/domains/moderation/CommunicationDisabledError';-export function threadDenialError(denial: ThreadDenial): Error {+function threadDenialError(denial: ThreadDenial): Error {switch (denial) {case APIErrorCodes.MISSING_ACCESS:return new MissingAccessError();diff --git a/fluxer_api/src/api/channel/services/thread/ThreadParentSettings.ts b/fluxer_api/src/api/channel/services/thread/ThreadParentSettings.tsindex 56dadb47d..6ad2a47ae 100644--- a/fluxer_api/src/api/channel/services/thread/ThreadParentSettings.ts+++ b/fluxer_api/src/api/channel/services/thread/ThreadParentSettings.ts@@ -66,7 +66,7 @@ export function pickThreadParentSettings(channelType: number, data: object): Thrreturn Object.keys(picked).length > 0 ? (picked as ThreadParentSettingsInput) : null;}-export function assertSettableParentFlags(channelType: number, flags: number): void {+function assertSettableParentFlags(channelType: number, flags: number): void {const settable = settableChannelFlags(channelType);if ((flags & ~settable) === 0) return;if ((flags & ChannelFlags.HIDE_MEDIA_DOWNLOAD_OPTIONS) !== 0 && channelType !== ChannelTypes.GUILD_MEDIA) {diff --git a/fluxer_api/src/api/download/DownloadRedirects.ts b/fluxer_api/src/api/download/DownloadRedirects.tsindex 368831749..9a2752390 100644--- a/fluxer_api/src/api/download/DownloadRedirects.ts+++ b/fluxer_api/src/api/download/DownloadRedirects.ts@@ -44,7 +44,7 @@ function resolveCoordinateDocument(path: string): string {return match && document ? `${match[1]}/${document}` : path;}-export function resolveDownloadObjectPath(requestPath: string): string | null {+function resolveDownloadObjectPath(requestPath: string): string | null {if (!requestPath.startsWith(DOWNLOAD_PREFIX)) {return null;}diff --git a/fluxer_api/src/api/enforcement/SuspensionState.ts b/fluxer_api/src/api/enforcement/SuspensionState.tsindex 955343bb1..a4c47662c 100644--- a/fluxer_api/src/api/enforcement/SuspensionState.ts+++ b/fluxer_api/src/api/enforcement/SuspensionState.ts@@ -67,7 +67,7 @@ export async function applySuspension(return updated;}-export async function clearSuspensionState(+async function clearSuspensionState(users: Pick<UserRepository, 'patchUpsert' | 'updateFlags'>,user: User,): Promise<User> {@@ -84,7 +84,7 @@ export interface ExpiredSuspensionDeps {repository: Pick<EnforcementDecisionRepository, 'get' | 'endIfActive'>;}-export function hasExpiredSuspension(user: User, now: Date = new Date()): boolean {+function hasExpiredSuspension(user: User, now: Date = new Date()): user is User & {readonly tempBannedUntil: Date} {return ((user.flags & UserFlags.DISABLED) !== 0n &&user.tempBannedUntil !== null &&@@ -104,7 +104,7 @@ export async function clearExpiredSuspension(if (decision?.kind === 'suspension' && decision.status === 'active' && decision.ends_at !== null) {await repository.endIfActive(decision.decision_id, {outcome: 'expired',- endedAt: current.tempBannedUntil!,+ endedAt: current.tempBannedUntil,endedBy: SYSTEM_USER_ID,statement: null,});diff --git a/fluxer_api/src/api/experiment/ChannelThreadsGate.ts b/fluxer_api/src/api/experiment/ChannelThreadsGate.tsindex f905db378..e85019912 100644--- a/fluxer_api/src/api/experiment/ChannelThreadsGate.ts+++ b/fluxer_api/src/api/experiment/ChannelThreadsGate.ts@@ -89,7 +89,7 @@ export async function isTainted(guildId: GuildID, opts?: {fresh?: boolean}): Proreturn tainted;}-export function noteGuildThreadMarker(guildId: GuildID): void {+function noteGuildThreadMarker(guildId: GuildID): void {rememberTaint(guildId.toString(), true);}diff --git a/fluxer_api/src/api/gif/NatsGifProvider.ts b/fluxer_api/src/api/gif/NatsGifProvider.tsindex 76d26e57e..ab17fd6ad 100644--- a/fluxer_api/src/api/gif/NatsGifProvider.ts+++ b/fluxer_api/src/api/gif/NatsGifProvider.ts@@ -136,7 +136,7 @@ function readResolved(value: unknown): GifResponse | null {return parsed.data;}-export interface GifProviderMeta {+interface GifProviderMeta {readonly name: string;readonly displayName: string;readonly attributionRequired: boolean;diff --git a/fluxer_api/src/api/guild/GuildAuditLogEntryMapper.ts b/fluxer_api/src/api/guild/GuildAuditLogEntryMapper.tsindex a40db4122..f7f384c42 100644--- a/fluxer_api/src/api/guild/GuildAuditLogEntryMapper.ts+++ b/fluxer_api/src/api/guild/GuildAuditLogEntryMapper.ts@@ -23,7 +23,7 @@ type NumericAuditLogOptionKey =| 'max_uses'| 'uses';-export const GUILD_AUDIT_INTERNAL_CHANGE_KEYS: ReadonlySet<string> = new Set([+const GUILD_AUDIT_INTERNAL_CHANGE_KEYS: ReadonlySet<string> = new Set(['guild_id','member_count','banner_width',diff --git a/fluxer_api/src/api/infrastructure/AssetEntitlementUtils.ts b/fluxer_api/src/api/infrastructure/AssetEntitlementUtils.tsindex 56e100afb..737c7866f 100644--- a/fluxer_api/src/api/infrastructure/AssetEntitlementUtils.ts+++ b/fluxer_api/src/api/infrastructure/AssetEntitlementUtils.ts@@ -12,10 +12,7 @@ export function stripAnimationPrefix(hash: string): string {return hash.startsWith(ANIMATED_PREFIX) ? hash.substring(ANIMATED_PREFIX.length) : hash;}-export function stripAnimationPrefixIfNoEntitlement(- hash: string | null | undefined,- hasEntitlement: boolean,-): string | null {+function stripAnimationPrefixIfNoEntitlement(hash: string | null | undefined, hasEntitlement: boolean): string | null {if (hash == null) {return null;}diff --git a/fluxer_api/src/api/infrastructure/DiscriminatorService.ts b/fluxer_api/src/api/infrastructure/DiscriminatorService.tsindex 182efe775..de25b77d7 100644--- a/fluxer_api/src/api/infrastructure/DiscriminatorService.ts+++ b/fluxer_api/src/api/infrastructure/DiscriminatorService.ts@@ -39,7 +39,7 @@ interface ResolveUsernameChangeResult {discriminator: number;}-export class UsernameNotAvailableError extends BadRequestError {+class UsernameNotAvailableError extends BadRequestError {constructor() {super({code: APIErrorCodes.USERNAME_NOT_AVAILABLE});this.name = 'UsernameNotAvailableError';diff --git a/fluxer_api/src/api/infrastructure/LiveKitWebhookService.ts b/fluxer_api/src/api/infrastructure/LiveKitWebhookService.tsindex 81f05a400..f0e52501a 100644--- a/fluxer_api/src/api/infrastructure/LiveKitWebhookService.ts+++ b/fluxer_api/src/api/infrastructure/LiveKitWebhookService.ts@@ -189,7 +189,7 @@ export class LiveKitWebhookService {}}- async handleParticipantJoined(event: WebhookEvent): Promise<void> {+ private async handleParticipantJoined(event: WebhookEvent): Promise<void> {if (event.event !== 'participant_joined') {return;}@@ -327,7 +327,7 @@ export class LiveKitWebhookService {return result.participants.some((p) => p.identity === participantIdentity) ? 'present' : 'absent';}- async handleParticipantLeft(event: WebhookEvent): Promise<void> {+ private async handleParticipantLeft(event: WebhookEvent): Promise<void> {if (event.event !== 'participant_left' && event.event !== 'participant_connection_aborted') {return;}@@ -441,7 +441,7 @@ export class LiveKitWebhookService {}}- async handleTrackPublished(event: WebhookEvent): Promise<void> {+ private async handleTrackPublished(event: WebhookEvent): Promise<void> {if (event.event !== 'track_published') {return;}diff --git a/fluxer_api/src/api/infrastructure/SvcErrorReply.ts b/fluxer_api/src/api/infrastructure/SvcErrorReply.tsindex f522aa423..ad3a42928 100644--- a/fluxer_api/src/api/infrastructure/SvcErrorReply.ts+++ b/fluxer_api/src/api/infrastructure/SvcErrorReply.ts@@ -6,7 +6,7 @@ import type {INatsConnectionManager} from '@pkgs/nats/src/INatsConnectionManagerconst OVERLOADED = 'overloaded';-export function svcErrorReplyReason(decoded: unknown): string | null {+function svcErrorReplyReason(decoded: unknown): string | null {if (!isJsonRecord(decoded)) {return null;}@@ -14,7 +14,7 @@ export function svcErrorReplyReason(decoded: unknown): string | null {return typeof reason === 'string' && reason.length > 0 ? reason : null;}-export function throwForSvcErrorReply(service: string, decoded: unknown): void {+function throwForSvcErrorReply(service: string, decoded: unknown): void {const reason = svcErrorReplyReason(decoded);if (reason === null) {return;diff --git a/fluxer_api/src/api/middleware/AuditLogMiddleware.ts b/fluxer_api/src/api/middleware/AuditLogMiddleware.tsindex f2ba4aa8b..508670e65 100644--- a/fluxer_api/src/api/middleware/AuditLogMiddleware.ts+++ b/fluxer_api/src/api/middleware/AuditLogMiddleware.ts@@ -18,7 +18,7 @@ function hasOnlyLatin1WithHighBytes(value: string): boolean {return high;}-export function decodeHeaderUtf8(value: string): string {+function decodeHeaderUtf8(value: string): string {if (!hasOnlyLatin1WithHighBytes(value)) {return value;}diff --git a/fluxer_api/src/api/middleware/IpBanMiddleware.ts b/fluxer_api/src/api/middleware/IpBanMiddleware.tsindex 538c35311..e0ee61e2a 100644--- a/fluxer_api/src/api/middleware/IpBanMiddleware.ts+++ b/fluxer_api/src/api/middleware/IpBanMiddleware.ts@@ -321,7 +321,7 @@ class IpBanCache extends RefreshedCache {export const ipBanCache = new IpBanCache();-export const SIGN_IN_ROUTES: ReadonlySet<string> = new Set([+const SIGN_IN_ROUTES: ReadonlySet<string> = new Set(['/auth/login','/auth/login/mfa/totp','/auth/login/mfa/webauthn/authentication-options',diff --git a/fluxer_api/src/api/models/Guild.ts b/fluxer_api/src/api/models/Guild.tsindex a61d0e0ee..558af2735 100644--- a/fluxer_api/src/api/models/Guild.ts+++ b/fluxer_api/src/api/models/Guild.ts@@ -46,7 +46,7 @@ export class Guild {readonly afkTimeout: number;readonly disabledOperations: number;readonly memberCount: number;- readonly auditLogsIndexedAt: Date | null;+ private readonly auditLogsIndexedAt: Date | null;readonly membersIndexedAt: Date | null;readonly messageHistoryCutoff: Date | null;readonly invitesPausedUntil: Date | null;diff --git a/fluxer_api/src/api/models/Payment.ts b/fluxer_api/src/api/models/Payment.tsindex 42474fd43..2e638274a 100644--- a/fluxer_api/src/api/models/Payment.ts+++ b/fluxer_api/src/api/models/Payment.ts@@ -18,7 +18,7 @@ export class Payment {readonly isGift: boolean;readonly giftCode: string | null;readonly purchaseGeoipCountryCode: string | null;- readonly purchaseClientCountryCode: string | null;+ private readonly purchaseClientCountryCode: string | null;readonly euWithdrawalWaiverRequired: boolean;readonly euWithdrawalWaiverAccepted: boolean;readonly euWithdrawalWaiverAcceptedAt: Date | null;diff --git a/fluxer_api/src/api/read_state/ReadStateChannelMeta.ts b/fluxer_api/src/api/read_state/ReadStateChannelMeta.tsindex 50369a112..017cf8a2d 100644--- a/fluxer_api/src/api/read_state/ReadStateChannelMeta.ts+++ b/fluxer_api/src/api/read_state/ReadStateChannelMeta.ts@@ -58,7 +58,7 @@ export function readStateCapable(ctx: Context<HonoEnv>): boolean {return viewer.kind === 'user' && viewer.capable;}-export function readStateMarkerFor(channel: ReadStateChannelHint): ReadStateMarker | null {+function readStateMarkerFor(channel: ReadStateChannelHint): ReadStateMarker | null {if (channel.guildId === null || !THREAD_FEATURE_CHANNEL_TYPES.has(channel.type)) return null;const flags =ReadStateFlags.IS_GUILD_CHANNEL | (THREAD_CHANNEL_TYPES.has(channel.type) ? ReadStateFlags.IS_THREAD : 0);diff --git a/fluxer_api/src/api/search/meilisearch/MeilisearchIndexAdapter.ts b/fluxer_api/src/api/search/meilisearch/MeilisearchIndexAdapter.tsindex 25f252349..cf4a3a3a0 100644--- a/fluxer_api/src/api/search/meilisearch/MeilisearchIndexAdapter.ts+++ b/fluxer_api/src/api/search/meilisearch/MeilisearchIndexAdapter.ts@@ -13,7 +13,7 @@ import type {SearchOptions, SearchResult} from '@fluxer/schema/src/contracts/seaconst MAX_SEARCH_LIMIT = 1000;const MAX_TOTAL_HITS = 10000;-export const MEILISEARCH_MAX_TRACKED_BULK_TASKS = 4096;+const MEILISEARCH_MAX_TRACKED_BULK_TASKS = 4096;interface MeilisearchIndexAdapterOptions<TFilters> {client: MeilisearchClient;diff --git a/fluxer_api/src/api/search/thread/ThreadSearchService.ts b/fluxer_api/src/api/search/thread/ThreadSearchService.tsindex 129f9d43c..3146ae11c 100644--- a/fluxer_api/src/api/search/thread/ThreadSearchService.ts+++ b/fluxer_api/src/api/search/thread/ThreadSearchService.ts@@ -25,7 +25,7 @@ export function threadSearchCursor(id: bigint): ThreadSearchCursor {return {createdAt: snowflakeToDate(id).getTime(), idSequence: Number(id & ((1n << TIMESTAMP_SHIFT) - 1n))};}-export function toSearchableThread(view: ThreadView): SearchableThread {+function toSearchableThread(view: ThreadView): SearchableThread {const {channel, state} = view;return {id: channel.id.toString(),diff --git a/fluxer_api/src/api/theme/ThemeService.ts b/fluxer_api/src/api/theme/ThemeService.tsindex 2d04dbd66..35a0697e2 100644--- a/fluxer_api/src/api/theme/ThemeService.ts+++ b/fluxer_api/src/api/theme/ThemeService.ts@@ -13,7 +13,7 @@ export function setThemeCssMaxBytesForTesting(bytes: number | undefined): void {themeCssMaxBytesOverride = bytes;}-export function resolveThemeCssMaxBytes(): number {+function resolveThemeCssMaxBytes(): number {if (Config.dev.testModeEnabled && themeCssMaxBytesOverride !== undefined) {return themeCssMaxBytesOverride;}diff --git a/fluxer_api/src/api/user/UserGuildSettingsThreadView.ts b/fluxer_api/src/api/user/UserGuildSettingsThreadView.tsindex 76cd109fa..62a87a368 100644--- a/fluxer_api/src/api/user/UserGuildSettingsThreadView.ts+++ b/fluxer_api/src/api/user/UserGuildSettingsThreadView.ts@@ -21,7 +21,7 @@ const DM_SETTINGS_GUILD_ID = createGuildID(0n);export const SYSTEM_USER_GUILD_SETTINGS_VIEW: UserGuildSettingsThreadView = {flags: true};-export async function listThreadOnlyChannelIds(guildId: GuildID): Promise<Set<string>> {+async function listThreadOnlyChannelIds(guildId: GuildID): Promise<Set<string>> {const rows = await fetchMany<Pick<ThreadOnlyChannelsByGuildRow, 'channel_id'>>(FETCH_THREAD_ONLY_CHANNEL_IDS_CQL, {guild_id: guildId,});@@ -44,7 +44,7 @@ export async function controlUserGuildSettingsView(return hiddenChannelIds.size > 0 ? {flags: false, hiddenChannelIds} : undefined;}-export async function resolveUserGuildSettingsView(+async function resolveUserGuildSettingsView(settings: UserGuildSettings,viewer: ThreadViewer,): Promise<UserGuildSettingsThreadView | undefined> {diff --git a/fluxer_api/src/api/utils/CurrencyUtils.ts b/fluxer_api/src/api/utils/CurrencyUtils.tsindex 1341ce11c..70a3db66a 100644--- a/fluxer_api/src/api/utils/CurrencyUtils.ts+++ b/fluxer_api/src/api/utils/CurrencyUtils.ts@@ -21,7 +21,7 @@ export function getCurrencyPreferences(return getEnvCurrencyPreferences(countryCode);}-function getEnvCurrencyPreferences(countryCode: string | null | undefined): Array<Currency> {+export function getEnvCurrencyPreferences(countryCode: string | null | undefined): Array<Currency> {if (!countryCode) {return ['USD', 'EUR'];}diff --git a/fluxer_api/src/api/utils/UrlSanitizer.ts b/fluxer_api/src/api/utils/UrlSanitizer.tsindex 38a0b2091..8beb78d3a 100644--- a/fluxer_api/src/api/utils/UrlSanitizer.ts+++ b/fluxer_api/src/api/utils/UrlSanitizer.ts@@ -1,6 +1,6 @@// SPDX-License-Identifier: AGPL-3.0-or-later-export function sanitizeOptionalAbsoluteUrl(url: string | null | undefined): string | undefined {+function sanitizeOptionalAbsoluteUrl(url: string | null | undefined): string | undefined {if (typeof url !== 'string') {return;}diff --git a/fluxer_api/src/api/utils/UserPermissionUtils.ts b/fluxer_api/src/api/utils/UserPermissionUtils.tsindex 059ef686f..555863c6e 100644--- a/fluxer_api/src/api/utils/UserPermissionUtils.ts+++ b/fluxer_api/src/api/utils/UserPermissionUtils.ts@@ -80,7 +80,7 @@ export class UserPermissionUtils {}}- async checkMutualFriends({userId, targetId}: {userId: UserID; targetId: UserID}): Promise<boolean> {+ private async checkMutualFriends({userId, targetId}: {userId: UserID; targetId: UserID}): Promise<boolean> {const userFriends = await this.userRepository.listRelationships(userId);const targetFriends = await this.userRepository.listRelationships(targetId);const userFriendIds = new Set(@@ -122,7 +122,7 @@ export class UserPermissionUtils {return this.checkMutualGuilds(userGuildIds, targetGuildIds);}- checkMutualGuilds(userGuildIds: Array<GuildID>, targetGuildIds: Array<GuildID>): boolean {+ private checkMutualGuilds(userGuildIds: Array<GuildID>, targetGuildIds: Array<GuildID>): boolean {const userGuildIdSet = new Set(userGuildIds.map((id) => id.toString()));return targetGuildIds.some((id) => userGuildIdSet.has(id.toString()));}diff --git a/fluxer_api/src/api/utils/featureUtils.ts b/fluxer_api/src/api/utils/featureUtils.tsindex 52c2ed326..04d64fe0b 100644--- a/fluxer_api/src/api/utils/featureUtils.ts+++ b/fluxer_api/src/api/utils/featureUtils.ts@@ -7,7 +7,7 @@ import {THREAD_AWARE_ALL_PERMISSIONS, THREAD_PERMISSIONS} from '@fluxer/constantexport const CLIENT_FEATURES_HEADER = Headers.X_FLUXER_FEATURES;export const CHANNEL_THREADS_CLIENT_FEATURE = 'channel_threads';-export type ThreadPermissionMode = 'active';+type ThreadPermissionMode = 'active';export interface ProtectedBitActor {clientFeatures: ReadonlySet<string>;diff --git a/fluxer_api/src/api/voice/VoiceRepository.ts b/fluxer_api/src/api/voice/VoiceRepository.tsindex 7e417a39d..22d86e612 100644--- a/fluxer_api/src/api/voice/VoiceRepository.ts+++ b/fluxer_api/src/api/voice/VoiceRepository.ts@@ -111,7 +111,7 @@ export class VoiceRepository {return fullRegion;}- async listServersForRegion(regionId: string): Promise<Array<VoiceServerRecord>> {+ private async listServersForRegion(regionId: string): Promise<Array<VoiceServerRecord>> {const rows = await fetchMany<VoiceServerRow>(LIST_SERVERS_FOR_REGION_CQL, {region_id: regionId});return rows.map((row) => this.mapServerRow(row));}diff --git a/fluxer_api/src/api/worker/utils/ArchiveJson.ts b/fluxer_api/src/api/worker/utils/ArchiveJson.tsindex 06110a150..85af67ff7 100644--- a/fluxer_api/src/api/worker/utils/ArchiveJson.ts+++ b/fluxer_api/src/api/worker/utils/ArchiveJson.ts@@ -2,7 +2,7 @@const NON_ASCII_JSON_CHAR = /[\u007f-\uffff]/g;-export function stringifyArchiveJson(value: unknown, space: string | number = 2): string {+function stringifyArchiveJson(value: unknown, space: string | number = 2): string {const json = JSON.stringify(value, null, space);if (json === undefined) {throw new Error('Archive JSON value is not serializable');