decord/source/__polyfill/04xxx/module_4380.js
github-actions 03cf168fbc chore: update source for alpha 347.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
2026-09-17 08:17:09 +00:00

52 lines
1.9 KiB
JavaScript

// Module ID: 4380
// Function ID: 4381
// Dependencies: [17, 4381, 4382]
// Exports: isRuntimeAlive
// Module 4380
import _mod17 from "module_17" /* 17 */;
import _mod4381 from "module_4381" /* 4381 */;
import _mod4382 from "module_4382" /* 4382 */;
function getInstalledNitro() {
return global.NitroModulesProxy;
}
const TurboModuleRegistry = _mod17.TurboModuleRegistry;
const installedNitro = getInstalledNitro();
if (null != installedNitro) {
let installedNitro1 = installedNitro;
if (installedNitro.version !== _mod4381.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 " + _mod4381.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 _mod4382.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;
};