mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-13 01:36:22 +00:00
refactor: app core version check
This commit is contained in:
@@ -21,8 +21,8 @@ import {
|
||||
SCThingOriginType,
|
||||
SCThingType,
|
||||
} from '@openstapps/core';
|
||||
import packageInfo from '@openstapps/core/package.json';
|
||||
import {Polygon} from 'geojson';
|
||||
import {environment} from '../../../environments/environment';
|
||||
|
||||
// provides sample aggregations to be used in tests or backendless development
|
||||
export const sampleAggregations: SCBackendAggregationConfiguration[] = [
|
||||
@@ -195,7 +195,7 @@ export const sampleIndexResponse: SCIndexResponse = {
|
||||
},
|
||||
auth: {},
|
||||
backend: {
|
||||
SCVersion: environment.sc_version,
|
||||
SCVersion: packageInfo.version,
|
||||
externalRequestTimeout: 5000,
|
||||
hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor],
|
||||
mappingIgnoredTags: [],
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {Client} from '@openstapps/api';
|
||||
import {SCAppConfiguration, SCIndexResponse} from '@openstapps/core';
|
||||
import packageInfo from '@openstapps/core/package.json';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {environment} from '../../../environments/environment';
|
||||
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
|
||||
*/
|
||||
scVersion = environment.sc_version;
|
||||
scVersion = packageInfo.version;
|
||||
|
||||
/**
|
||||
* First session indicator (config not found in storage)
|
||||
|
||||
@@ -21,8 +21,7 @@ export const environment = {
|
||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||
app_host: 'mobile.app.uni-frankfurt.de',
|
||||
custom_url_scheme: 'de.anyschool.app',
|
||||
backend_version: '3.0.0',
|
||||
sc_version: '1.0.1',
|
||||
backend_version: '4.0.0',
|
||||
production: true,
|
||||
};
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@ export const environment = {
|
||||
backend_url: 'https://mobile.server.uni-frankfurt.de',
|
||||
app_host: 'mobile.app.uni-frankfurt.de',
|
||||
custom_url_scheme: 'de.anyschool.app',
|
||||
backend_version: '3.0.0',
|
||||
sc_version: '1.0.1',
|
||||
backend_version: '4.0.0',
|
||||
production: false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user