okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-025-fix (6 owner-QA fixes) into f-026-reld51d71e7c

main
679 B8 linesraw
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 {
5  if (native?.available) return native.installed?.engine?.version ?? undefined;
6  return storeVersion && !PLACEHOLDER_ENGINE.test(storeVersion) ? storeVersion : undefined;
7}
8