File tree Expand file tree Collapse file tree
applications/sckanner/frontend/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,26 @@ export const STRINGS_NUMBERS = [
7878
7979// Get version from Vite environment variable (set at build time)
8080export const SCKANNER_VERSION = import . meta. env . VITE_APP_VERSION || '3.1.1' ;
81- export const COMPOSER_VERSION = '6.0.0' ;
81+
82+ const COMPOSER_PACKAGE_JSON_URL =
83+ 'https://raw.githubusercontent.com/MetaCell/sckan-composer/refs/heads/main/applications/composer/frontend/package.json' ;
84+
85+ // Fetch Composer version from its package.json on GitHub
86+ const fetchComposerVersion = ( ) : string => {
87+ try {
88+ const request = new XMLHttpRequest ( ) ;
89+ request . open ( 'GET' , COMPOSER_PACKAGE_JSON_URL , false ) ;
90+ request . send ( null ) ;
91+ if ( request . status === 200 ) {
92+ const data = JSON . parse ( request . responseText ) ;
93+ return data ?. version || '' ;
94+ }
95+ } catch {
96+ // fallback on error
97+ }
98+ return '' ;
99+ } ;
100+ export const COMPOSER_VERSION = fetchComposerVersion ( ) ;
82101
83102// Fetch NEURONDM version from remote sckan-version-info.json
84103const fetchNeurondmVersion = ( ) : string => {
You can’t perform that action at this time.
0 commit comments