From 3090c7413159383f82462832e86ee2ac3539e680 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 20 Oct 2026 16:31:25 -0400 Subject: [PATCH] Fix pg migration import --- server/lib/offlineThresholds.ts | 8 -------- server/lib/readConfigFile.ts | 11 ++++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/server/lib/offlineThresholds.ts b/server/lib/offlineThresholds.ts index abcfd6993..ad1738a4e 100644 --- a/server/lib/offlineThresholds.ts +++ b/server/lib/offlineThresholds.ts @@ -13,14 +13,6 @@ export type OfflineThresholds = { remoteExitNodeMs: number; }; -export const DEFAULT_OFFLINE_THRESHOLDS: OfflineThresholds = { - checkIntervalMs: 30 * 1000, // 30 seconds - newtMs: 2 * 60 * 1000, // 2 minutes - newtWireguardMs: 8 * 60 * 1000, // 8 minutes - olmMs: 2 * 60 * 1000, // 2 minutes - remoteExitNodeMs: 2 * 60 * 1000 // 2 minutes -}; - export function getOfflineThresholds(): OfflineThresholds { const offlineChecker = config.getRawConfig().offline_checker; diff --git a/server/lib/readConfigFile.ts b/server/lib/readConfigFile.ts index 8ec49b038..d53045a9f 100644 --- a/server/lib/readConfigFile.ts +++ b/server/lib/readConfigFile.ts @@ -4,7 +4,16 @@ import { configFilePath1, configFilePath2 } from "./consts"; import { z } from "zod"; import stoi from "./stoi"; import { getEnvOrYaml, readEnvOrFile } from "./getEnvOrYaml"; -import { DEFAULT_OFFLINE_THRESHOLDS } from "@server/lib/offlineThresholds"; +// type-only: offlineThresholds imports config, which imports this file +import type { OfflineThresholds } from "@server/lib/offlineThresholds"; + +export const DEFAULT_OFFLINE_THRESHOLDS: OfflineThresholds = { + checkIntervalMs: 30 * 1000, // 30 seconds + newtMs: 2 * 60 * 1000, // 2 minutes + newtWireguardMs: 8 * 60 * 1000, // 8 minutes + olmMs: 2 * 60 * 1000, // 2 minutes + remoteExitNodeMs: 2 * 60 * 1000 // 2 minutes +}; const portSchema = z.number().positive().gt(0).lte(65535);