Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
skipVersion: boolean,
bridgeVersion: string
} = {}) {
try {
if (!bridgeVersion) {
const bridgeDep = await manifest.getNativeDependency(PackagePath.fromString('react-native-electrode-bridge'))
if (!bridgeDep) {
throw new Error('react-native-electrode-bridge not found in manifest. please provide explicit version')
}
if (!bridgeDep.version) {
throw new Error('react-native-electrode-bridge version not defined. This should not happen')
}
bridgeVersion = bridgeDep.version
}
await ApiGen.regenerateCode({bridgeVersion, skipVersion})
} catch (e) {
coreUtils.logErrorAndExitProcess(e)
}
}
const bridgeDep = await manifest.getNativeDependency(electrodeBridgePkg, {
manifestId,
})
if (!bridgeDep) {
throw new Error(
`react-native-electrode-bridge is not found in manifest. Specify explicit --bridgeVersion in the command.\n ${errorMessage}`
)
}
if (!bridgeDep.version) {
throw new Error(
`react-native-electrode-bridge version not defined. Specify explicit --bridgeVersion in the command. \n ${errorMessage}`
)
}
bridgeVersion = bridgeDep.version
}
await ApiGen.regenerateCode({ bridgeVersion, skipVersion })
}