refactor: app core version check

This commit is contained in:
Rainer Killinger
2023-07-18 12:41:53 +02:00
parent 9ec35e65f8
commit 2fe8275f2f
4 changed files with 6 additions and 7 deletions

View File

@@ -21,8 +21,8 @@ import {
SCThingOriginType, SCThingOriginType,
SCThingType, SCThingType,
} from '@openstapps/core'; } from '@openstapps/core';
import packageInfo from '@openstapps/core/package.json';
import {Polygon} from 'geojson'; import {Polygon} from 'geojson';
import {environment} from '../../../environments/environment';
// provides sample aggregations to be used in tests or backendless development // provides sample aggregations to be used in tests or backendless development
export const sampleAggregations: SCBackendAggregationConfiguration[] = [ export const sampleAggregations: SCBackendAggregationConfiguration[] = [
@@ -195,7 +195,7 @@ export const sampleIndexResponse: SCIndexResponse = {
}, },
auth: {}, auth: {},
backend: { backend: {
SCVersion: environment.sc_version, SCVersion: packageInfo.version,
externalRequestTimeout: 5000, externalRequestTimeout: 5000,
hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor], hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor],
mappingIgnoredTags: [], mappingIgnoredTags: [],

View File

@@ -15,6 +15,7 @@
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {Client} from '@openstapps/api'; import {Client} from '@openstapps/api';
import {SCAppConfiguration, SCIndexResponse} from '@openstapps/core'; import {SCAppConfiguration, SCIndexResponse} from '@openstapps/core';
import packageInfo from '@openstapps/core/package.json';
import {NGXLogger} from 'ngx-logger'; import {NGXLogger} from 'ngx-logger';
import {environment} from '../../../environments/environment'; import {environment} from '../../../environments/environment';
import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider'; import {StAppsWebHttpClient} from '../data/stapps-web-http-client.provider';
@@ -54,7 +55,7 @@ export class ConfigProvider {
/** /**
* Version of the @openstapps/core package that app is using * Version of the @openstapps/core package that app is using
*/ */
scVersion = environment.sc_version; scVersion = packageInfo.version;
/** /**
* First session indicator (config not found in storage) * First session indicator (config not found in storage)

View File

@@ -21,8 +21,7 @@ export const environment = {
backend_url: 'https://mobile.server.uni-frankfurt.de', backend_url: 'https://mobile.server.uni-frankfurt.de',
app_host: 'mobile.app.uni-frankfurt.de', app_host: 'mobile.app.uni-frankfurt.de',
custom_url_scheme: 'de.anyschool.app', custom_url_scheme: 'de.anyschool.app',
backend_version: '3.0.0', backend_version: '4.0.0',
sc_version: '1.0.1',
production: true, production: true,
}; };

View File

@@ -21,8 +21,7 @@ export const environment = {
backend_url: 'https://mobile.server.uni-frankfurt.de', backend_url: 'https://mobile.server.uni-frankfurt.de',
app_host: 'mobile.app.uni-frankfurt.de', app_host: 'mobile.app.uni-frankfurt.de',
custom_url_scheme: 'de.anyschool.app', custom_url_scheme: 'de.anyschool.app',
backend_version: '3.0.0', backend_version: '4.0.0',
sc_version: '1.0.1',
production: false, production: false,
}; };