2026-08-04 08:36:32 +00:00
// Module ID: 4020
// Function ID: 4021
2026-07-29 08:29:29 +00:00
// Name: getInstalledNitro
2026-08-04 08:36:32 +00:00
// Dependencies: [17, 4021, 4022]
2026-07-29 08:29:29 +00:00
// Exports: isRuntimeAlive
2026-08-04 08:36:32 +00:00
// Module 4020 (getInstalledNitro)
2026-07-29 08:29:29 +00:00
import { TurboModuleRegistry } from "get ActivityIndicator" ;
function getInstalledNitro ( ) {
return global . NitroModulesProxy ;
}
const installedNitro = getInstalledNitro ( ) ;
if ( null != installedNitro ) {
let installedNitro1 = installedNitro ;
if ( installedNitro . version !== require ( "items" ) . version ) {
const _Error2 = Error ;
const version = installedNitro . version ;
const _HermesInternal2 = HermesInternal ;
const error = new Error ( "Nitro was installed twice: once with native version " + version + " and once with JS version " + require ( "items" ) . version + ". This usually means react-native-nitro-modules exists multiple times in node_modules (e.g. in monorepos or double-linked setups)." ) ;
throw error ;
}
} else {
try {
const enforcing = TurboModuleRegistry . getEnforcing ( "NitroModules" ) ;
const installResult = enforcing . install ( ) ;
if ( null != installResult ) {
const _Error = Error ;
const _HermesInternal = HermesInternal ;
const error1 = new Error ( "Failed to install Nitro: " + installResult ) ;
throw error1 ;
} else {
installedNitro1 = getInstalledNitro ( ) ;
if ( null == installedNitro1 ) {
const _Error3 = Error ;
const error2 = new Error ( "NitroModules was installed, but `global.NitroModulesProxy` was null!" ) ;
const moduleNotFoundError = new require ( "_isNativeReflectConstruct" ) . ModuleNotFoundError ( error2 ) ;
throw moduleNotFoundError ;
}
}
} catch ( tmp13 ) {
const moduleNotFoundError1 = new require ( "_isNativeReflectConstruct" ) . ModuleNotFoundError ( tmp13 ) ;
throw moduleNotFoundError1 ;
}
}
export const NitroModules = installedNitro1 ;
export const isRuntimeAlive = function isRuntimeAlive ( ) {
return null != globalThis . _ _nitroJsiCache && null != globalThis . _ _nitroDispatcher ;
} ;