MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / resolveDesktopAppVersion

Function resolveDesktopAppVersion

apps/desktop/main/runtime-compat.ts:8–16  ·  view source on GitHub ↗
(electronVersion: string | null | undefined, bundledVersion?: string)

Source from the content-addressed store, hash-verified

6} from '@openchatlab/node-runtime/src/data-dir-compat'
7
8export function resolveDesktopAppVersion(electronVersion: string | null | undefined, bundledVersion?: string): string {
9 const normalizedElectronVersion = normalizeVersion(electronVersion)
10 if (normalizedElectronVersion && normalizedElectronVersion !== '0.0.0') return normalizedElectronVersion
11
12 const normalizedBundledVersion = normalizeVersion(bundledVersion)
13 if (normalizedBundledVersion) return normalizedBundledVersion
14
15 return normalizedElectronVersion || '0.0.0'
16}
17
18export function getDesktopAppVersion(electronVersion: string | null | undefined): string {
19 return resolveDesktopAppVersion(electronVersion, typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : undefined)

Callers 2

getDesktopAppVersionFunction · 0.85

Calls 1

normalizeVersionFunction · 0.85

Tested by

no test coverage detected