/** * ███████╗██╗ ██╗██████╗ ███████╗████████╗ ██████╗ ██████╗ ███████╗ * ██╔════╝██║ ██║██╔══██╗ ██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗██╔════╝ * ███████╗██║ ██║██████╔╝█████╗███████╗ ██║ ██║ ██║██████╔╝█████╗ * ╚════██║██║ ██║██╔══██╗╚════╝╚════██║ ██║ ██║ ██║██╔══██╗██╔══╝ * ███████║╚██████╔╝██████╔╝ ███████║ ██║ ╚██████╔╝██║ ██║███████╗ * ╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ * Advanced Subscription Manager for QX, Loon, Surge and Clash. * @author: Peng-YM * @github: https://github.com/sub-store-org/Sub-Store * @documentation: https://www.notion.so/Sub-Store-6259586994d34c11a4ced5c406264b46 */ import { version } from '../package.json'; import $ from '@/core/app'; import getWorkerThreads from '@/runtime/worker-threads'; console.log( ` ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ Sub-Store -- v${version} ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ `, ); import migrate from '@/utils/migration'; import serve from '@/restful'; if ($.env.isNode) { if (typeof Promise.withResolvers !== 'function') { eval("require('core-js/actual/promise/with-resolvers')"); } const workerThreads = getWorkerThreads(); if (typeof workerThreads.markAsUncloneable !== 'function') { // ponytail: Node < 22 cannot mark web objects uncloneable; remove this fallback when the Android runtime reaches Node 22. workerThreads.markAsUncloneable = () => {}; } eval('process').on('uncaughtExceptionMonitor', (error, origin) => { console.error(`[FATAL] ${origin}: ${error?.stack ?? error}`); }); } migrate(); serve();