okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
d51d71e7c
main
1/** The host's design-mode placeholder for the engine version; it is not an engine anyone installed. */ 2const PLACEHOLDER_ENGINE = / ^strata-engine 0\.1\.0$ / ; 3/** The engine version the app shows: the installed engine's once the host has read it; until then nothing (never the placeholder). */ 4export function shownEngineVersion ( native :{ available ?:boolean ; installed ?:{ engine ?:{ version ?:string | null } | null } | null } | null | undefined , storeVersion :string | undefined ) :string | undefined { 5if ( native ?. available ) return native . installed ?. engine ?. version ?? undefined ; 6return storeVersion && ! PLACEHOLDER_ENGINE . test ( storeVersion ) ?storeVersion :undefined ; 7} 8