2025-08-11 16:52:26 +07:00
|
|
|
import '@revenge-mod/modules/metro/patches'
|
2025-07-07 19:32:58 +07:00
|
|
|
import '@revenge-mod/utils/patches/proxy'
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
onModuleFirstRequired,
|
|
|
|
|
onModuleInitialized,
|
|
|
|
|
} from '@revenge-mod/modules/metro/subscriptions'
|
2025-10-17 15:49:50 +07:00
|
|
|
import { onError } from '~index'
|
2025-07-07 19:32:58 +07:00
|
|
|
|
|
|
|
|
const IndexModuleId = 0
|
|
|
|
|
|
|
|
|
|
onModuleFirstRequired(IndexModuleId, function onIndexRequired() {
|
|
|
|
|
try {
|
|
|
|
|
if (__BUILD_FLAG_LOG_PROMISE_REJECTIONS__)
|
2025-09-10 00:18:10 +07:00
|
|
|
// @as-require
|
|
|
|
|
import('./patches/log-promise-rejections')
|
2025-07-07 19:32:58 +07:00
|
|
|
|
2025-07-10 12:39:25 +07:00
|
|
|
if (__DEV__)
|
2025-07-08 11:24:48 +07:00
|
|
|
nativeLoggingHook(`\u001b[31m--- PREINIT STAGE ---\u001b[0m`, 1)
|
|
|
|
|
|
2025-07-07 19:32:58 +07:00
|
|
|
// Initialize preinit libraries
|
2025-09-10 00:18:10 +07:00
|
|
|
// @as-require
|
|
|
|
|
import('@revenge-mod/react/preinit')
|
|
|
|
|
// @as-require
|
|
|
|
|
import('@revenge-mod/assets/preinit')
|
|
|
|
|
// @as-require
|
|
|
|
|
import('@revenge-mod/discord/preinit')
|
2025-07-07 19:32:58 +07:00
|
|
|
|
|
|
|
|
onModuleInitialized(IndexModuleId, function onIndexInitialized() {
|
2025-07-19 23:23:32 +07:00
|
|
|
if (__DEV__)
|
|
|
|
|
nativeLoggingHook(`\u001b[31m--- INIT STAGE ---\u001b[0m`, 1)
|
2025-07-07 19:32:58 +07:00
|
|
|
|
2025-07-19 23:23:32 +07:00
|
|
|
try {
|
2025-09-10 00:18:10 +07:00
|
|
|
// @as-require
|
|
|
|
|
import('./init')
|
2025-07-07 19:32:58 +07:00
|
|
|
} catch (e) {
|
|
|
|
|
onError(e)
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-08-11 16:52:26 +07:00
|
|
|
|
|
|
|
|
// Run all preinit plugins
|
2025-09-10 00:18:10 +07:00
|
|
|
// @as-require
|
|
|
|
|
import('~/plugins/preinit')
|
|
|
|
|
// @as-require
|
|
|
|
|
import('@revenge-mod/plugins/preinit')
|
2025-07-07 19:32:58 +07:00
|
|
|
} catch (e) {
|
|
|
|
|
onError(e)
|
|
|
|
|
}
|
|
|
|
|
})
|