decord/source/__polyfill/04xxx/module_4378.js
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

52 lines
1.9 KiB
JavaScript

// Module ID: 4378
// Function ID: 4379
// Dependencies: [17, 4379, 4380]
// Exports: isRuntimeAlive
// Module 4378
import _mod17 from "module_17" /* 17 */;
import _mod4379 from "module_4379" /* 4379 */;
import _mod4380 from "module_4380" /* 4380 */;
function getInstalledNitro() {
return global.NitroModulesProxy;
}
const TurboModuleRegistry = _mod17.TurboModuleRegistry;
const installedNitro = getInstalledNitro();
if (null != installedNitro) {
let installedNitro1 = installedNitro;
if (installedNitro.version !== _mod4379.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 " + _mod4379.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 _mod4380.ModuleNotFoundError(error2);
throw moduleNotFoundError;
}
}
} catch (tmp13) {
const moduleNotFoundError1 = new tmp3(tmp[2]).ModuleNotFoundError(tmp13);
throw moduleNotFoundError1;
}
}
export const NitroModules = installedNitro1;
export const isRuntimeAlive = function isRuntimeAlive() {
return null != globalThis.__nitroJsiCache && null != globalThis.__nitroDispatcher;
};