* Get the currently loaded UI version from the meta tag or the import.meta.env
()
| 109 | * Get the currently loaded UI version from the meta tag or the import.meta.env |
| 110 | */ |
| 111 | function getCurrentlyLoadedUIVersion(): string { |
| 112 | // first try to get from the index.html meta tag |
| 113 | const versionMeta = document |
| 114 | .querySelector('meta[name="app:build-version"]') |
| 115 | ?.getAttribute('content'); |
| 116 | |
| 117 | if (versionMeta && isSemanticVersion(versionMeta)) { |
| 118 | return versionMeta; |
| 119 | } |
| 120 | |
| 121 | return import.meta.env.APP_BUILD_VERSION; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Use the compatibility layer to check if the station API version is compatible with the UI. |
no test coverage detected