decord/source/__polyfill/04xxx/module_4347.js
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

52 lines
1.9 KiB
JavaScript

// Module ID: 4347
// Function ID: 4348
// Dependencies: [17, 4348, 4349]
// Exports: isRuntimeAlive
// Module 4347
import _mod17 from "module_17" /* 17 */;
import _mod4348 from "module_4348" /* 4348 */;
import _mod4349 from "module_4349" /* 4349 */;
function getInstalledNitro() {
return global.NitroModulesProxy;
}
const TurboModuleRegistry = _mod17.TurboModuleRegistry;
const installedNitro = getInstalledNitro();
if (null != installedNitro) {
let installedNitro1 = installedNitro;
if (installedNitro.version !== _mod4348.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 " + _mod4348.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 _mod4349.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;
};