优化配置文件

This commit is contained in:
yml
2026-05-21 19:29:00 +08:00
parent 589de4b50b
commit 7513958a4c
23 changed files with 1061 additions and 676 deletions
@@ -1,15 +1,11 @@
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { runtimeConfig } from '../../config/runtime.js'
import { resolveDefaultViewport } from './session-browser-config.js'
const CURRENT_DIR = path.dirname(fileURLToPath(import.meta.url))
const PROJECT_ROOT = path.resolve(CURRENT_DIR, '../../..')
export const DATA_ROOT = path.resolve(PROJECT_ROOT, 'data/browser-sessions')
export const BROWSER_SESSION_DATA_ROOT = path.join(runtimeConfig.data.root, 'browser-sessions')
export const ACTIVITY_URL = 'https://df.qq.com/cp/a20240812cdk/index.html'
export const CHROME_PATH = String(runtimeConfig.browser.chromePath || '').trim()
export const REDEEM_SUCCESS_AUTO_CLOSE_MS = 3 * 60 * 1000
export const DEFAULT_VIEWPORT = resolveDefaultViewport()
export const DEFAULT_VIEWPORT = resolveDefaultViewport(runtimeConfig.browser.vncResolution)
export const SESSION_DEBUG_ENABLED = Boolean(runtimeConfig.session.debug)