2026-02-05 23:38:52 -05:00
|
|
|
import pkg from "../../../package.json" with { type: "json" };
|
2026-02-05 23:23:08 -05:00
|
|
|
|
2026-01-04 21:58:59 -05:00
|
|
|
// App configuration
|
|
|
|
|
export const APP_CONFIG = {
|
2026-05-09 06:48:20 -04:00
|
|
|
name: "9Router Proxy",
|
2026-01-04 21:58:59 -05:00
|
|
|
description: "AI Infrastructure Management",
|
2026-02-05 23:23:08 -05:00
|
|
|
version: pkg.version,
|
2026-01-04 21:58:59 -05:00
|
|
|
};
|
|
|
|
|
|
2026-04-17 00:33:36 -04:00
|
|
|
// GitHub configuration
|
|
|
|
|
export const GITHUB_CONFIG = {
|
|
|
|
|
changelogUrl: "https://raw.githubusercontent.com/decolua/9router/refs/heads/master/CHANGELOG.md",
|
2026-05-16 01:38:06 -04:00
|
|
|
donateUrl: "https://9router.com/api/donate",
|
2026-04-17 00:33:36 -04:00
|
|
|
};
|
|
|
|
|
|
2026-04-23 05:39:31 -04:00
|
|
|
// Updater configuration
|
|
|
|
|
export const UPDATER_CONFIG = {
|
|
|
|
|
npmPackageName: "9router",
|
|
|
|
|
installCmd: "npm i -g 9router",
|
2026-05-09 11:48:07 -04:00
|
|
|
installCmdLatest: "npm i -g 9router@latest --prefer-online",
|
|
|
|
|
shutdownCountdownSec: 3,
|
2026-04-23 05:39:31 -04:00
|
|
|
exitDelayMs: 500,
|
2026-04-24 00:36:16 -04:00
|
|
|
statusPort: 20129,
|
|
|
|
|
statusPollIntervalMs: 1000,
|
|
|
|
|
statusLogTailLines: 8,
|
|
|
|
|
installRetries: 3,
|
|
|
|
|
installRetryDelayMs: 5000,
|
|
|
|
|
lingerAfterDoneMs: 30000,
|
2026-05-09 11:48:07 -04:00
|
|
|
waitForExitMinMs: 5000,
|
|
|
|
|
waitForExitMaxMs: 20000,
|
2026-04-24 00:36:16 -04:00
|
|
|
waitForExitCheckMs: 500,
|
|
|
|
|
appPort: 20128,
|
2026-04-23 05:39:31 -04:00
|
|
|
};
|
|
|
|
|
|
2026-01-04 21:58:59 -05:00
|
|
|
// Theme configuration
|
|
|
|
|
export const THEME_CONFIG = {
|
|
|
|
|
storageKey: "theme",
|
|
|
|
|
defaultTheme: "system", // "light" | "dark" | "system"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// Subscription
|
|
|
|
|
export const SUBSCRIPTION_CONFIG = {
|
|
|
|
|
price: 1.0,
|
|
|
|
|
currency: "USD",
|
|
|
|
|
interval: "month",
|
|
|
|
|
planName: "Pro Plan",
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// API endpoints
|
|
|
|
|
export const API_ENDPOINTS = {
|
|
|
|
|
users: "/api/users",
|
|
|
|
|
providers: "/api/providers",
|
|
|
|
|
payments: "/api/payments",
|
|
|
|
|
auth: "/api/auth",
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-01 21:31:16 -05:00
|
|
|
export const CONSOLE_LOG_CONFIG = {
|
|
|
|
|
maxLines: 200,
|
|
|
|
|
pollIntervalMs: 1000,
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-09 06:48:20 -04:00
|
|
|
// Client-side store TTL: how long fetched data stays fresh before re-fetching
|
|
|
|
|
export const CLIENT_STORE_TTL_MS = 60000;
|
|
|
|
|
|
2026-01-04 21:58:59 -05:00
|
|
|
// Re-export from providers.js for backward compatibility
|
|
|
|
|
export {
|
2026-02-06 23:17:06 -05:00
|
|
|
FREE_PROVIDERS,
|
2026-01-04 21:58:59 -05:00
|
|
|
OAUTH_PROVIDERS,
|
|
|
|
|
APIKEY_PROVIDERS,
|
2026-04-22 00:58:53 -04:00
|
|
|
WEB_COOKIE_PROVIDERS,
|
2026-01-04 21:58:59 -05:00
|
|
|
AI_PROVIDERS,
|
|
|
|
|
AUTH_METHODS,
|
|
|
|
|
} from "./providers.js";
|
|
|
|
|
|
|
|
|
|
// Re-export from models.js for backward compatibility
|
|
|
|
|
export {
|
|
|
|
|
PROVIDER_MODELS,
|
|
|
|
|
AI_MODELS,
|
|
|
|
|
} from "./models.js";
|