refactor: update @openstapps/core

This commit is contained in:
Rainer Killinger
2022-09-02 15:56:04 +02:00
parent 608f58ccbf
commit 43c469d66a
3 changed files with 24 additions and 10 deletions

View File

@@ -10,12 +10,12 @@ import {
SCUserGroupSetting,
} from '@openstapps/core';
import {readFileSync} from 'fs';
import {resolve} from 'path';
import path from 'path';
/**
* Evaluates if a number is within the given range
*
* @param num The number that should be checked
* @param number_ The number that should be checked
* @param range Array of two numbers representing a range (inclusive interval)
*/
export function inRangeInclusive(number_: number, range: number[]): boolean {
@@ -474,6 +474,7 @@ const config: Partial<SCConfigFile> = {
id: 'personal',
items: [
{
authProvider: 'paia',
icon: 'account_circle',
route: '/library-account',
title: 'library account',
@@ -487,7 +488,21 @@ const config: Partial<SCConfigFile> = {
},
},
{
icon: 'grade',
authProvider: 'default',
icon: 'task',
route: '/assessments',
title: 'summary of grades',
translations: {
de: {
title: 'Notenspiegel',
},
en: {
title: 'summary of grades',
},
},
},
{
icon: 'star',
route: '/favorites',
title: 'favorites',
translations: {
@@ -588,9 +603,8 @@ const config: Partial<SCConfigFile> = {
},
},
backend: {
SCVersion: JSON.parse(readFileSync(resolve('.', '.', 'package.json'), 'utf-8').toString()).dependencies[
'@openstapps/core'
],
SCVersion: JSON.parse(readFileSync(path.resolve('.', '.', 'package.json'), 'utf8').toString())
.dependencies['@openstapps/core'],
externalRequestTimeout: 5000,
hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor],
mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'],