Compare commits

..

6 Commits

Author SHA1 Message Date
Rainer Killinger
dde4a0d1cd 0.3.0 2022-08-24 12:30:57 +02:00
Rainer Killinger
ba07267372 ci: enforce npm audit for production dependencies 2022-08-23 10:56:36 +02:00
Rainer Killinger
001cd4b4de refactor: update some dependencies 2022-08-23 10:56:35 +02:00
Rainer Killinger
c2b0d22a25 refactor: move to express-prom-bundle for monitoring 2022-08-23 10:56:32 +02:00
Jovan Krunić
9e1017edfb refactor: use material symbols for menu 2022-08-22 15:25:00 +00:00
Rainer Killinger
557d050b36 docs: update changelog 2022-08-22 17:16:31 +02:00
8 changed files with 219 additions and 795 deletions

View File

@@ -50,10 +50,7 @@ audit:
dependencies: dependencies:
- build - build
script: script:
- npm audit - npm audit --production
allow_failure: true
except:
- schedules
pages: pages:
stage: deploy stage: deploy
@@ -66,13 +63,6 @@ pages:
paths: paths:
- public - public
scheduled-audit:
stage: audit
script:
- npm audit --audit-level=high
only:
- schedules
ci: ci:
stage: test stage: test
dependencies: dependencies:

View File

@@ -1,3 +1,12 @@
# [0.2.0](https://gitlab.com/openstapps/backend/compare/v0.1.0...v0.2.0) (2022-08-22)
### Bug Fixes
* update PAIA API URL ([a20200e](https://gitlab.com/openstapps/backend/commit/a20200e52a725ede42cb5e026a5a693b1ba3d149))
# [0.1.0](https://gitlab.com/openstapps/backend/compare/16bbb7e9e36b7adf27452e1b09f7970e98aa27df...v0.1.0) (2022-06-30) # [0.1.0](https://gitlab.com/openstapps/backend/compare/16bbb7e9e36b7adf27452e1b09f7970e98aa27df...v0.1.0) (2022-06-30)

View File

@@ -3,19 +3,20 @@
import {SCAboutPageContentType, SCConfigFile, SCLanguageCode} from '@openstapps/core'; import {SCAboutPageContentType, SCConfigFile, SCLanguageCode} from '@openstapps/core';
import {RecursivePartial} from '@openstapps/logger/lib/common'; import {RecursivePartial} from '@openstapps/logger/lib/common';
const markdownSources: {[key in SCLanguageCode]?: { const markdownSources: {
/** [key in SCLanguageCode]?: {
* Privacy policy markdown /**
*/ * Privacy policy markdown
privacyPolicy?: string; */
/** privacyPolicy?: string;
* Terms and conditions markdown /**
*/ * Terms and conditions markdown
termsAndConditions?: string; */
}} = {en: {}, de: {}}; termsAndConditions?: string;
};
} = {en: {}, de: {}};
markdownSources.de!.privacyPolicy = markdownSources.de!.privacyPolicy = `
`
Diese Datenschutzerklärung dient zur Erfüllung der nach Artikel 13 EU DSGVO geforderten Informationspflicht bei Erhebung von Daten zum Zeitpunkt der Erhebung bei betroffenen Personen. Diese Datenschutzerklärung dient zur Erfüllung der nach Artikel 13 EU DSGVO geforderten Informationspflicht bei Erhebung von Daten zum Zeitpunkt der Erhebung bei betroffenen Personen.
# **Name und Anschrift des Verantwortlichen** # **Name und Anschrift des Verantwortlichen**
@@ -176,8 +177,7 @@ Pseudonymisierung gehören kann.</li>
</ol> </ol>
`; `;
markdownSources.de!.termsAndConditions = markdownSources.de!.termsAndConditions = `
`
<p>Stand: 04. November 2015</p> <p>Stand: 04. November 2015</p>
<p>Es gilt der jeweilige Datenschutz der Hochschule im jeweiligen Bundesland. Darüber hinaus gelten die folgenden Vereinbarungen. Mit der Installation erklären Sie sich bereit die folgenden Bedingungen zu akzeptieren. <br> <p>Es gilt der jeweilige Datenschutz der Hochschule im jeweiligen Bundesland. Darüber hinaus gelten die folgenden Vereinbarungen. Mit der Installation erklären Sie sich bereit die folgenden Bedingungen zu akzeptieren. <br>
</p> </p>
@@ -282,8 +282,7 @@ markdownSources.de!.termsAndConditions =
<p>Fragen oder Anmerkungen zu dieser AGB richten Sie bitte an: <a href="mailto:app@rz.uni-frankfurt.de">app@rz.uni-frankfurt.de</a></p> <p>Fragen oder Anmerkungen zu dieser AGB richten Sie bitte an: <a href="mailto:app@rz.uni-frankfurt.de">app@rz.uni-frankfurt.de</a></p>
`; `;
markdownSources.en!.privacyPolicy = markdownSources.en!.privacyPolicy = `
`
This data protection declaration serves to fulfill the information obligation required under Article 13 EU DSGVO when data is collected at the time of collection from data subjects. This data protection declaration serves to fulfill the information obligation required under Article 13 EU DSGVO when data is collected at the time of collection from data subjects.
# **Name and address of the responsible person** # **Name and address of the responsible person**
@@ -445,8 +444,7 @@ Pseudonymization may include.</li>
</ol> </ol>
`; `;
markdownSources.en!.termsAndConditions = markdownSources.en!.termsAndConditions = `
`
<p>As of November 04, 2015</p> <p>As of November 04, 2015</p>
<p>The respective data protection of the university in the respective federal state applies. In addition, the following agreements apply. By installing you agree to accept the following terms and conditions. <br> <p>The respective data protection of the university in the respective federal state applies. In addition, the following agreements apply. By installing you agree to accept the following terms and conditions. <br>
</p> </p>
@@ -551,7 +549,6 @@ markdownSources.en!.termsAndConditions =
<p>If you have any questions or comments about these terms and conditions, please contact: <a href="mailto:app@rz.uni-frankfurt.de">app@rz.uni-frankfurt.de</a></p> <p>If you have any questions or comments about these terms and conditions, please contact: <a href="mailto:app@rz.uni-frankfurt.de">app@rz.uni-frankfurt.de</a></p>
`; `;
/** /**
* This is the default configuration for the Goethe university of Frankfurt * This is the default configuration for the Goethe university of Frankfurt
*/ */
@@ -598,8 +595,7 @@ const config: RecursivePartial<SCConfigFile> = {
title: 'Über das StApps Projekt', title: 'Über das StApps Projekt',
content: [ content: [
{ {
title: title: 'Verbundprojekt mehrerer Hochschulen für eine generische Studierenden-App',
'Verbundprojekt mehrerer Hochschulen für eine generische Studierenden-App',
content: { content: {
type: SCAboutPageContentType.MARKDOWN, type: SCAboutPageContentType.MARKDOWN,
value: ` value: `
@@ -622,8 +618,7 @@ const config: RecursivePartial<SCConfigFile> = {
}, },
translations: { translations: {
en: { en: {
title: title: 'Collaborative project of multiple universities for a single generic study app',
'Collaborative project of multiple universities for a single generic study app',
}, },
}, },
type: SCAboutPageContentType.SECTION, type: SCAboutPageContentType.SECTION,
@@ -649,8 +644,7 @@ const config: RecursivePartial<SCConfigFile> = {
Norbert-Wollheim-Platz 1<br> Norbert-Wollheim-Platz 1<br>
60629 Frankfurt 60629 Frankfurt
`, `,
translations: { translations: {},
},
type: SCAboutPageContentType.MARKDOWN, type: SCAboutPageContentType.MARKDOWN,
}, },
], ],
@@ -669,8 +663,7 @@ const config: RecursivePartial<SCConfigFile> = {
'[app@rz.uni-frankfurt.de](mailto:app@rz.uni-frankfurt.de)<br>' + '[app@rz.uni-frankfurt.de](mailto:app@rz.uni-frankfurt.de)<br>' +
'[+49 69 798 32936](tel:+496979832936)<br>' + '[+49 69 798 32936](tel:+496979832936)<br>' +
'[https://app.rz.uni-frankfurt.de](https://app.rz.uni-frankfurt.de)', '[https://app.rz.uni-frankfurt.de](https://app.rz.uni-frankfurt.de)',
translations: { translations: {},
},
type: SCAboutPageContentType.MARKDOWN, type: SCAboutPageContentType.MARKDOWN,
}, },
], ],
@@ -696,7 +689,7 @@ const config: RecursivePartial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'document', icon: 'description',
title: 'Impressum', title: 'Impressum',
link: 'imprint', link: 'imprint',
translations: { translations: {
@@ -707,7 +700,7 @@ const config: RecursivePartial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'shield-half', icon: 'policy',
title: 'Datenschutz', title: 'Datenschutz',
link: 'privacy', link: 'privacy',
translations: { translations: {
@@ -718,7 +711,7 @@ const config: RecursivePartial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'reader', icon: 'text_snippet',
title: 'Allgemeine Geschäftsbedingungen', title: 'Allgemeine Geschäftsbedingungen',
link: 'terms', link: 'terms',
translations: { translations: {
@@ -729,7 +722,7 @@ const config: RecursivePartial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'library', icon: 'copyright',
title: 'Bibliotheken und Lizenzen', title: 'Bibliotheken und Lizenzen',
link: 'licenses', link: 'licenses',
translations: { translations: {

View File

@@ -18,31 +18,29 @@ import {resolve} from 'path';
* @param num The number that should be checked * @param num The number that should be checked
* @param range Array of two numbers representing a range (inclusive interval) * @param range Array of two numbers representing a range (inclusive interval)
*/ */
export function inRangeInclusive(num: number, range: number[]): boolean { export function inRangeInclusive(number_: number, range: number[]): boolean {
return num >= range[0] && num <= range[1]; return number_ >= range[0] && number_ <= range[1];
} }
const sommerRange = [4, 9]; const sommerRange = [4, 9];
const winterRange = [10, 3]; const winterRange = [10, 3];
const month = new Date().getMonth(); const month = new Date().getMonth();
const year = new Date().getFullYear(); const year = new Date().getFullYear();
const winterYearOffset = (month < winterRange[0] ? -1 : 0); const winterYearOffset = month < winterRange[0] ? -1 : 0;
const sommerYear = year + (month <= winterRange[1] ? -1 : 0); const sommerYear = year + (month <= winterRange[1] ? -1 : 0);
const winterYear = `${year + winterYearOffset}/${(year + 1 + winterYearOffset) const winterYear = `${year + winterYearOffset}/${(year + 1 + winterYearOffset).toString().slice(-2)}`;
.toString()
.slice(-2)}`;
const wsAcronymShort = `WS ${winterYear}`; const wsAcronymShort = `WS ${winterYear}`;
const ssAcronymShort = `SS ${sommerYear}`; const ssAcronymShort = `SS ${sommerYear}`;
const wsAcronymLong = `WiSe ${winterYear}`; const wsAcronymLong = `WiSe ${winterYear}`;
const ssAcronymLong = `SoSe ${sommerYear}`; const ssAcronymLong = `SoSe ${sommerYear}`;
const userGroupSetting: SCUserGroupSetting = { const userGroupSetting: SCUserGroupSetting = {
categories: ['profile'], categories: ['profile'],
defaultValue: 'students', defaultValue: 'students',
description: 'The user group the app is going to be used.' description:
+ 'This settings for example is getting used for the predefined price category of mensa meals.', 'The user group the app is going to be used.' +
'This settings for example is getting used for the predefined price category of mensa meals.',
inputType: SCSettingInputType.SingleChoice, inputType: SCSettingInputType.SingleChoice,
name: 'group', name: 'group',
order: 1, order: 1,
@@ -53,24 +51,17 @@ const userGroupSetting: SCUserGroupSetting = {
}, },
translations: { translations: {
de: { de: {
description: 'Mit welcher Benutzergruppe soll die App verwendet werden?' description:
+ ' Die Einstellung wird beispielsweise für die Vorauswahl der Preiskategorie der Mensa verwendet.', 'Mit welcher Benutzergruppe soll die App verwendet werden?' +
' Die Einstellung wird beispielsweise für die Vorauswahl der Preiskategorie der Mensa verwendet.',
name: 'Gruppe', name: 'Gruppe',
values: [ values: ['Student', 'Angestellter', 'Gast'],
'Student',
'Angestellter',
'Gast',
],
}, },
en: { en: {
description: `The user group the app is going to be used.' description: `The user group the app is going to be used.'
+ ' This settings for example is getting used for the predefined price category of mensa meals.`, + ' This settings for example is getting used for the predefined price category of mensa meals.`,
name: 'Group', name: 'Group',
values: [ values: ['student', 'employee', 'guest'],
'student',
'employee',
'guest',
],
}, },
}, },
type: SCThingType.Setting, type: SCThingType.Setting,
@@ -94,18 +85,12 @@ const languageSetting: SCLanguageSetting = {
de: { de: {
description: 'Die Sprache in der die App angezeigt wird.', description: 'Die Sprache in der die App angezeigt wird.',
name: 'Sprache', name: 'Sprache',
values: [ values: ['Deutsch', 'English'],
'Deutsch',
'English',
],
}, },
en: { en: {
description: 'The language this app is going to use.', description: 'The language this app is going to use.',
name: 'Language', name: 'Language',
values: [ values: ['Deutsch', 'English'],
'Deutsch',
'English',
],
}, },
}, },
type: SCThingType.Setting, type: SCThingType.Setting,
@@ -132,8 +117,7 @@ const config: Partial<SCConfigFile> = {
title: 'Über das StApps Projekt', title: 'Über das StApps Projekt',
content: [ content: [
{ {
title: title: 'Verbundprojekt mehrerer Hochschulen für eine generische Studierenden-App',
'Verbundprojekt mehrerer Hochschulen für eine generische Studierenden-App',
content: { content: {
type: SCAboutPageContentType.MARKDOWN, type: SCAboutPageContentType.MARKDOWN,
value: ` value: `
@@ -154,8 +138,7 @@ const config: Partial<SCConfigFile> = {
}, },
translations: { translations: {
en: { en: {
title: title: 'Collaborative project of multiple universities for a single generic study app',
'Collaborative project of multiple universities for a single generic study app',
}, },
}, },
type: SCAboutPageContentType.SECTION, type: SCAboutPageContentType.SECTION,
@@ -200,10 +183,7 @@ const config: Partial<SCConfigFile> = {
type: SCAboutPageContentType.MARKDOWN, type: SCAboutPageContentType.MARKDOWN,
}, },
{ {
value: value: '[mail]()<br>' + '[+49 12 345 67890]()<br>' + '[https://localhost/]()',
'[mail]()<br>' +
'[+49 12 345 67890]()<br>' +
'[https://localhost/]()',
translations: { translations: {
en: { en: {
value: 'This would be the english contact information', value: 'This would be the english contact information',
@@ -223,7 +203,7 @@ const config: Partial<SCConfigFile> = {
type: SCAboutPageContentType.SECTION, type: SCAboutPageContentType.SECTION,
}, },
{ {
icon: 'newspaper', icon: 'campaign',
title: 'Neue Funktionen / Gelöste Probleme', title: 'Neue Funktionen / Gelöste Probleme',
link: 'changelog', link: 'changelog',
translations: { translations: {
@@ -234,7 +214,7 @@ const config: Partial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'document', icon: 'description',
title: 'Impressum', title: 'Impressum',
link: 'imprint', link: 'imprint',
translations: { translations: {
@@ -245,7 +225,7 @@ const config: Partial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'shield-half', icon: 'policy',
title: 'Datenschutz', title: 'Datenschutz',
link: 'privacy', link: 'privacy',
translations: { translations: {
@@ -256,7 +236,7 @@ const config: Partial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'reader', icon: 'text_snippet',
title: 'Allgemeine Geschäftsbedingungen', title: 'Allgemeine Geschäftsbedingungen',
link: 'terms', link: 'terms',
translations: { translations: {
@@ -267,7 +247,7 @@ const config: Partial<SCConfigFile> = {
type: SCAboutPageContentType.ROUTER_LINK, type: SCAboutPageContentType.ROUTER_LINK,
}, },
{ {
icon: 'library', icon: 'copyright',
title: 'Bibliotheken und Lizenzen', title: 'Bibliotheken und Lizenzen',
link: 'licenses', link: 'licenses',
translations: { translations: {
@@ -363,26 +343,11 @@ const config: Partial<SCConfigFile> = {
campusPolygon: { campusPolygon: {
coordinates: [ coordinates: [
[ [
[ [8.660_432_999_690_723, 50.123_027_017_044_436],
8.660432999690723, [8.675_496_285_518_358, 50.123_027_017_044_436],
50.123027017044436, [8.675_496_285_518_358, 50.130_661_764_486_42],
], [8.660_432_999_690_723, 50.130_661_764_486_42],
[ [8.660_432_999_690_723, 50.123_027_017_044_436],
8.675496285518358,
50.123027017044436,
],
[
8.675496285518358,
50.13066176448642,
],
[
8.660432999690723,
50.13066176448642,
],
[
8.660432999690723,
50.123027017044436,
],
], ],
], ],
type: 'Polygon', type: 'Polygon',
@@ -397,6 +362,7 @@ const config: Partial<SCConfigFile> = {
}, },
menus: [ menus: [
{ {
// unused
icon: 'menu', icon: 'menu',
id: 'main', id: 'main',
items: [ items: [
@@ -427,7 +393,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'calendar', icon: 'calendar_month',
route: '/schedule', route: '/schedule',
title: 'schedule', title: 'schedule',
translations: { translations: {
@@ -440,7 +406,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'cafe', icon: 'local_cafe',
route: '/canteen', route: '/canteen',
title: 'canteen', title: 'canteen',
translations: { translations: {
@@ -453,7 +419,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'search', icon: 'local_library',
route: '/hebis-search', route: '/hebis-search',
title: 'library catalog', title: 'library catalog',
translations: { translations: {
@@ -466,7 +432,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'folder', icon: 'inventory_2',
route: '/catalog', route: '/catalog',
title: 'course catalog', title: 'course catalog',
translations: { translations: {
@@ -503,11 +469,12 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'person', // unused
icon: 'account_circle',
id: 'personal', id: 'personal',
items: [ items: [
{ {
icon: 'library', icon: 'account_circle',
route: '/library-account', route: '/library-account',
title: 'library account', title: 'library account',
translations: { translations: {
@@ -520,7 +487,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'star', icon: 'grade',
route: '/favorites', route: '/favorites',
title: 'favorites', title: 'favorites',
translations: { translations: {
@@ -533,7 +500,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'person', icon: 'account_circle',
route: '/profile', route: '/profile',
title: 'profile', title: 'profile',
translations: { translations: {
@@ -559,7 +526,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'information', icon: 'info',
route: '/about', route: '/about',
title: 'about', title: 'about',
translations: { translations: {
@@ -572,7 +539,7 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
{ {
icon: 'chatbubbles', icon: 'rate_review',
route: '/feedback', route: '/feedback',
title: 'feedback', title: 'feedback',
translations: { translations: {
@@ -598,10 +565,7 @@ const config: Partial<SCConfigFile> = {
], ],
name: 'Goethe-Uni', name: 'Goethe-Uni',
privacyPolicyUrl: 'https://mobile.server.uni-frankfurt.de/_static/privacy.md', privacyPolicyUrl: 'https://mobile.server.uni-frankfurt.de/_static/privacy.md',
settings: [ settings: [userGroupSetting, languageSetting],
userGroupSetting,
languageSetting,
],
}, },
auth: { auth: {
paia: { paia: {
@@ -611,7 +575,8 @@ const config: Partial<SCConfigFile> = {
url: 'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php', url: 'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
}, },
endpoints: { endpoints: {
authorization: 'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php', authorization:
'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
mapping: { mapping: {
id: '$.email', id: '$.email',
name: '$.name', name: '$.name',
@@ -623,14 +588,11 @@ const config: Partial<SCConfigFile> = {
}, },
}, },
backend: { backend: {
SCVersion: JSON.parse((readFileSync(resolve('.', '.', 'package.json'), 'utf-8')).toString()) SCVersion: JSON.parse(readFileSync(resolve('.', '.', 'package.json'), 'utf-8').toString()).dependencies[
.dependencies['@openstapps/core'], '@openstapps/core'
externalRequestTimeout: 5000,
hiddenTypes: [
SCThingType.DateSeries,
SCThingType.Diff,
SCThingType.Floor,
], ],
externalRequestTimeout: 5000,
hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor],
mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'], mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'],
maxMultiSearchRouteQueries: 5, maxMultiSearchRouteQueries: 5,
maxRequestBodySize: 512 * 1024, maxRequestBodySize: 512 * 1024,
@@ -659,20 +621,12 @@ const config: Partial<SCConfigFile> = {
}, },
{ {
fieldName: 'geo', fieldName: 'geo',
onlyOnTypes: [ onlyOnTypes: [SCThingType.Building, SCThingType.PointOfInterest, SCThingType.Room],
SCThingType.Building,
SCThingType.PointOfInterest,
SCThingType.Room,
],
sortTypes: ['distance'], sortTypes: ['distance'],
}, },
{ {
fieldName: 'geo', fieldName: 'geo',
onlyOnTypes: [ onlyOnTypes: [SCThingType.Building, SCThingType.PointOfInterest, SCThingType.Room],
SCThingType.Building,
SCThingType.PointOfInterest,
SCThingType.Room,
],
sortTypes: ['distance'], sortTypes: ['distance'],
}, },
{ {
@@ -690,9 +644,7 @@ const config: Partial<SCConfigFile> = {
}, },
{ {
fieldName: 'offers', fieldName: 'offers',
onlyOnTypes: [ onlyOnTypes: [SCThingType.Dish],
SCThingType.Dish,
],
sortTypes: ['price'], sortTypes: ['price'],
}, },
], ],
@@ -725,31 +677,19 @@ const config: Partial<SCConfigFile> = {
}, },
{ {
fieldName: 'academicTerms.acronym', fieldName: 'academicTerms.acronym',
onlyOnTypes: [ onlyOnTypes: [SCThingType.AcademicEvent, SCThingType.SportCourse],
SCThingType.AcademicEvent,
SCThingType.SportCourse,
],
}, },
{ {
fieldName: 'academicTerm.acronym', fieldName: 'academicTerm.acronym',
onlyOnTypes: [ onlyOnTypes: [SCThingType.Catalog],
SCThingType.Catalog,
],
}, },
{ {
fieldName: 'majors', fieldName: 'majors',
onlyOnTypes: [ onlyOnTypes: [SCThingType.AcademicEvent],
SCThingType.AcademicEvent,
],
}, },
{ {
fieldName: 'keywords', fieldName: 'keywords',
onlyOnTypes: [ onlyOnTypes: [SCThingType.Article, SCThingType.Book, SCThingType.Message, SCThingType.Video],
SCThingType.Article,
SCThingType.Book,
SCThingType.Message,
SCThingType.Video,
],
}, },
{ {
fieldName: 'type', fieldName: 'type',
@@ -772,7 +712,7 @@ const config: Partial<SCConfigFile> = {
{ {
factor: 1, factor: 1,
fields: { fields: {
'categories': { categories: {
'course': 1.08, 'course': 1.08,
'integrated course': 1.08, 'integrated course': 1.08,
'introductory class': 1.05, 'introductory class': 1.05,
@@ -790,11 +730,11 @@ const config: Partial<SCConfigFile> = {
{ {
factor: 1, factor: 1,
fields: { fields: {
'categories': { categories: {
'cafe': 1.1, cafe: 1.1,
'learn': 1.1, learn: 1.1,
'library': 1.2, library: 1.2,
'restaurant': 1.1, restaurant: 1.1,
}, },
}, },
type: SCThingType.PointOfInterest, type: SCThingType.PointOfInterest,
@@ -802,7 +742,7 @@ const config: Partial<SCConfigFile> = {
{ {
factor: 1, factor: 1,
fields: { fields: {
'categories': { categories: {
'main dish': 2, 'main dish': 2,
}, },
}, },
@@ -813,7 +753,7 @@ const config: Partial<SCConfigFile> = {
{ {
factor: 1, factor: 1,
fields: { fields: {
'categories': { categories: {
'cafe': 2, 'cafe': 2,
'canteen': 2, 'canteen': 2,
'restaurant': 2, 'restaurant': 2,

View File

@@ -1,7 +1,10 @@
{ {
"metricsPath": "/metrics", "metricsPath": "/metrics",
"collectDefaultMetrics": true, "includeMethod": true,
"requestDurationBuckets": [0.1, 0.5, 1, 2, 5, 10, 20], "includePath": true,
"requestLengthBuckets": [512, 1024, 5120, 10240, 51200, 102400], "promClient": {
"responseLengthBuckets": [512, 1024, 5120, 10240, 51200, 102400] "collectDefaultMetrics": {
}
},
"for-more-options-see": "https://github.com/jochen-schweizer/express-prom-bundle#options"
} }

721
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "@openstapps/backend", "name": "@openstapps/backend",
"version": "0.2.0", "version": "0.3.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@@ -23,27 +23,27 @@
} }
}, },
"@babel/compat-data": { "@babel/compat-data": {
"version": "7.18.8", "version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.13.tgz",
"integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", "integrity": "sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw==",
"dev": true "dev": true
}, },
"@babel/core": { "@babel/core": {
"version": "7.18.10", "version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz",
"integrity": "sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==", "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@ampproject/remapping": "^2.1.0", "@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.18.6", "@babel/code-frame": "^7.18.6",
"@babel/generator": "^7.18.10", "@babel/generator": "^7.18.13",
"@babel/helper-compilation-targets": "^7.18.9", "@babel/helper-compilation-targets": "^7.18.9",
"@babel/helper-module-transforms": "^7.18.9", "@babel/helper-module-transforms": "^7.18.9",
"@babel/helpers": "^7.18.9", "@babel/helpers": "^7.18.9",
"@babel/parser": "^7.18.10", "@babel/parser": "^7.18.13",
"@babel/template": "^7.18.10", "@babel/template": "^7.18.10",
"@babel/traverse": "^7.18.10", "@babel/traverse": "^7.18.13",
"@babel/types": "^7.18.10", "@babel/types": "^7.18.13",
"convert-source-map": "^1.7.0", "convert-source-map": "^1.7.0",
"debug": "^4.1.0", "debug": "^4.1.0",
"gensync": "^1.0.0-beta.2", "gensync": "^1.0.0-beta.2",
@@ -60,12 +60,12 @@
} }
}, },
"@babel/generator": { "@babel/generator": {
"version": "7.18.12", "version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.12.tgz", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz",
"integrity": "sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==", "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/types": "^7.18.10", "@babel/types": "^7.18.13",
"@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/gen-mapping": "^0.3.2",
"jsesc": "^2.5.1" "jsesc": "^2.5.1"
}, },
@@ -256,9 +256,9 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.18.11", "version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.11.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz",
"integrity": "sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==", "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==",
"dev": true "dev": true
}, },
"@babel/template": { "@babel/template": {
@@ -273,19 +273,19 @@
} }
}, },
"@babel/traverse": { "@babel/traverse": {
"version": "7.18.11", "version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.11.tgz", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz",
"integrity": "sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==", "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.18.6", "@babel/code-frame": "^7.18.6",
"@babel/generator": "^7.18.10", "@babel/generator": "^7.18.13",
"@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-environment-visitor": "^7.18.9",
"@babel/helper-function-name": "^7.18.9", "@babel/helper-function-name": "^7.18.9",
"@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6",
"@babel/parser": "^7.18.11", "@babel/parser": "^7.18.13",
"@babel/types": "^7.18.10", "@babel/types": "^7.18.13",
"debug": "^4.1.0", "debug": "^4.1.0",
"globals": "^11.1.0" "globals": "^11.1.0"
}, },
@@ -299,9 +299,9 @@
} }
}, },
"@babel/types": { "@babel/types": {
"version": "7.18.10", "version": "7.18.13",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.10.tgz", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz",
"integrity": "sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==", "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-string-parser": "^7.18.10", "@babel/helper-string-parser": "^7.18.10",
@@ -797,6 +797,7 @@
"version": "1.19.2", "version": "1.19.2",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
"integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
"dev": true,
"requires": { "requires": {
"@types/connect": "*", "@types/connect": "*",
"@types/node": "*" "@types/node": "*"
@@ -838,6 +839,7 @@
"version": "3.4.35", "version": "3.4.35",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
"integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
"dev": true,
"requires": { "requires": {
"@types/node": "*" "@types/node": "*"
} }
@@ -864,6 +866,7 @@
"version": "4.17.13", "version": "4.17.13",
"resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
"integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
"dev": true,
"requires": { "requires": {
"@types/body-parser": "*", "@types/body-parser": "*",
"@types/express-serve-static-core": "^4.17.18", "@types/express-serve-static-core": "^4.17.18",
@@ -871,18 +874,11 @@
"@types/serve-static": "*" "@types/serve-static": "*"
} }
}, },
"@types/express-prometheus-middleware": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@types/express-prometheus-middleware/-/express-prometheus-middleware-1.2.1.tgz",
"integrity": "sha512-5bAqiUHo+UlGsWmVr9oV9eiFd7SnkIgU53RSp/txd8KMDU73Yrdva7WezIJazbW+CldGJu0zF3DPqk8KSJVYDQ==",
"requires": {
"@types/express": "*"
}
},
"@types/express-serve-static-core": { "@types/express-serve-static-core": {
"version": "4.17.30", "version": "4.17.30",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz", "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.30.tgz",
"integrity": "sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==", "integrity": "sha512-gstzbTWro2/nFed1WXtf+TtrpwxH7Ggs4RLYTLbeVgIkUQOI3WG/JKjgeOU1zXDvezllupjrf8OPIdvTbIaVOQ==",
"dev": true,
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
"@types/qs": "*", "@types/qs": "*",
@@ -925,7 +921,8 @@
"@types/mime": { "@types/mime": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz",
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==",
"dev": true
}, },
"@types/minimist": { "@types/minimist": {
"version": "1.2.2", "version": "1.2.2",
@@ -982,12 +979,14 @@
"@types/qs": { "@types/qs": {
"version": "6.9.7", "version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
"dev": true
}, },
"@types/range-parser": { "@types/range-parser": {
"version": "1.2.4", "version": "1.2.4",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==",
"dev": true
}, },
"@types/responselike": { "@types/responselike": {
"version": "1.0.0", "version": "1.0.0",
@@ -1007,6 +1006,7 @@
"version": "1.15.0", "version": "1.15.0",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz",
"integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==", "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==",
"dev": true,
"requires": { "requires": {
"@types/mime": "*", "@types/mime": "*",
"@types/node": "*" "@types/node": "*"
@@ -1072,14 +1072,14 @@
} }
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.34.0.tgz",
"integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "integrity": "sha512-eRfPPcasO39iwjlUAMtjeueRGuIrW3TQ9WseIDl7i5UWuFbf83yYaU7YPs4j8+4CxUMIsj1k+4kV+E+G+6ypDQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "5.33.1", "@typescript-eslint/scope-manager": "5.34.0",
"@typescript-eslint/type-utils": "5.33.1", "@typescript-eslint/type-utils": "5.34.0",
"@typescript-eslint/utils": "5.33.1", "@typescript-eslint/utils": "5.34.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"functional-red-black-tree": "^1.0.1", "functional-red-black-tree": "^1.0.1",
"ignore": "^5.2.0", "ignore": "^5.2.0",
@@ -1089,52 +1089,52 @@
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/parser": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.34.0.tgz",
"integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "integrity": "sha512-SZ3NEnK4usd2CXkoV3jPa/vo1mWX1fqRyIVUQZR4As1vyp4fneknBNJj+OFtV8WAVgGf+rOHMSqQbs2Qn3nFZQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/scope-manager": "5.33.1", "@typescript-eslint/scope-manager": "5.34.0",
"@typescript-eslint/types": "5.33.1", "@typescript-eslint/types": "5.34.0",
"@typescript-eslint/typescript-estree": "5.33.1", "@typescript-eslint/typescript-estree": "5.34.0",
"debug": "^4.3.4" "debug": "^4.3.4"
} }
}, },
"@typescript-eslint/scope-manager": { "@typescript-eslint/scope-manager": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.34.0.tgz",
"integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "integrity": "sha512-HNvASMQlah5RsBW6L6c7IJ0vsm+8Sope/wu5sEAf7joJYWNb1LDbJipzmdhdUOnfrDFE6LR1j57x1EYVxrY4ow==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.33.1", "@typescript-eslint/types": "5.34.0",
"@typescript-eslint/visitor-keys": "5.33.1" "@typescript-eslint/visitor-keys": "5.34.0"
} }
}, },
"@typescript-eslint/type-utils": { "@typescript-eslint/type-utils": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.34.0.tgz",
"integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "integrity": "sha512-Pxlno9bjsQ7hs1pdWRUv9aJijGYPYsHpwMeCQ/Inavhym3/XaKt1ZKAA8FIw4odTBfowBdZJDMxf2aavyMDkLg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/utils": "5.33.1", "@typescript-eslint/utils": "5.34.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"tsutils": "^3.21.0" "tsutils": "^3.21.0"
} }
}, },
"@typescript-eslint/types": { "@typescript-eslint/types": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.34.0.tgz",
"integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "integrity": "sha512-49fm3xbbUPuzBIOcy2CDpYWqy/X7VBkxVN+DC21e0zIm3+61Z0NZi6J9mqPmSW1BDVk9FIOvuCFyUPjXz93sjA==",
"dev": true "dev": true
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.34.0.tgz",
"integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "integrity": "sha512-mXHAqapJJDVzxauEkfJI96j3D10sd567LlqroyCeJaHnu42sDbjxotGb3XFtGPYKPD9IyLjhsoULML1oI3M86A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.33.1", "@typescript-eslint/types": "5.34.0",
"@typescript-eslint/visitor-keys": "5.33.1", "@typescript-eslint/visitor-keys": "5.34.0",
"debug": "^4.3.4", "debug": "^4.3.4",
"globby": "^11.1.0", "globby": "^11.1.0",
"is-glob": "^4.0.3", "is-glob": "^4.0.3",
@@ -1143,15 +1143,15 @@
} }
}, },
"@typescript-eslint/utils": { "@typescript-eslint/utils": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.34.0.tgz",
"integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "integrity": "sha512-kWRYybU4Rn++7lm9yu8pbuydRyQsHRoBDIo11k7eqBWTldN4xUdVUMCsHBiE7aoEkFzrUEaZy3iH477vr4xHAQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.9", "@types/json-schema": "^7.0.9",
"@typescript-eslint/scope-manager": "5.33.1", "@typescript-eslint/scope-manager": "5.34.0",
"@typescript-eslint/types": "5.33.1", "@typescript-eslint/types": "5.34.0",
"@typescript-eslint/typescript-estree": "5.33.1", "@typescript-eslint/typescript-estree": "5.34.0",
"eslint-scope": "^5.1.1", "eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0" "eslint-utils": "^3.0.0"
}, },
@@ -1175,12 +1175,12 @@
} }
}, },
"@typescript-eslint/visitor-keys": { "@typescript-eslint/visitor-keys": {
"version": "5.33.1", "version": "5.34.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.34.0.tgz",
"integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "integrity": "sha512-O1moYjOSrab0a2fUvFpsJe0QHtvTC+cR+ovYpgKrAVXzqQyc74mv76TgY6z+aEtjQE2vgZux3CQVtGryqdcOAw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/types": "5.33.1", "@typescript-eslint/types": "5.34.0",
"eslint-visitor-keys": "^3.3.0" "eslint-visitor-keys": "^3.3.0"
} }
}, },
@@ -1623,9 +1623,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001378", "version": "1.0.30001382",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001378.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001382.tgz",
"integrity": "sha512-JVQnfoO7FK7WvU4ZkBRbPjaot4+YqxogSDosHv0Hv5mWpUESmN+UubMU6L/hGz8QlQ2aY5U0vR6MOs6j/CXpNA==", "integrity": "sha512-2rtJwDmSZ716Pxm1wCtbPvHtbDWAreTPxXbkc5RkKglow3Ig/4GNGazDI9/BVnXbG/wnv6r3B5FEbkfg9OcTGg==",
"dev": true "dev": true
}, },
"chai": { "chai": {
@@ -2284,9 +2284,9 @@
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.4.222", "version": "1.4.226",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.222.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.226.tgz",
"integrity": "sha512-gEM2awN5HZknWdLbngk4uQCVfhucFAfFzuchP3wM3NN6eow1eDU0dFy2kts43FB20ZfhVFF0jmFSTb1h5OhyIg==", "integrity": "sha512-CvevLaSiUp0u12K0e+QhMX1hn724nSUNO9ToBek+FMHk/5RofrQs5MChjrD0re0IwqxDFxFMSZD+uic05i2Z5w==",
"dev": true "dev": true
}, },
"emoji-regex": { "emoji-regex": {
@@ -2735,13 +2735,12 @@
} }
} }
}, },
"express-prometheus-middleware": { "express-prom-bundle": {
"version": "1.2.0", "version": "6.5.0",
"resolved": "https://registry.npmjs.org/express-prometheus-middleware/-/express-prometheus-middleware-1.2.0.tgz", "resolved": "https://registry.npmjs.org/express-prom-bundle/-/express-prom-bundle-6.5.0.tgz",
"integrity": "sha512-efSwft67rdtiW40D0im1f7Rz1TCGHGzPj6lfK0MxZDcPj6z4f/Ab5VNkWPYZEjvLqZiZ7fbS00CYzpigO8tS+g==", "integrity": "sha512-paFAm0FK7TV1Ln6Blh9edDt2mJ4Pk6Py/fjhZDMcoMHENYryBjCpnXDXuCu8NE1kkvp58IrPcAAkNeNqdvZnnw==",
"requires": { "requires": {
"prometheus-gc-stats": "^0.6.2", "on-finished": "^2.3.0",
"response-time": "^2.3.2",
"url-value-parser": "^2.0.0" "url-value-parser": "^2.0.0"
} }
}, },
@@ -3008,487 +3007,6 @@
"wide-align": "^1.1.5" "wide-align": "^1.1.5"
} }
}, },
"gc-stats": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/gc-stats/-/gc-stats-1.4.0.tgz",
"integrity": "sha512-4FcCj9e8j8rCjvLkqRpGZBLgTC/xr9XEf5By3x77cDucWWB3pJK6FEwXZCTCbb4z8xdaOoi4owBNrvn3ciDdxA==",
"optional": true,
"requires": {
"nan": "^2.13.2",
"node-pre-gyp": "^0.13.0"
},
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true,
"optional": true
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
"bundled": true,
"optional": true
},
"are-we-there-yet": {
"version": "1.1.5",
"bundled": true,
"optional": true,
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
}
},
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"chownr": {
"version": "1.1.1",
"bundled": true,
"optional": true
},
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"debug": {
"version": "4.1.1",
"bundled": true,
"optional": true,
"requires": {
"ms": "^2.1.1"
}
},
"deep-extend": {
"version": "0.6.0",
"bundled": true,
"optional": true
},
"delegates": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"detect-libc": {
"version": "1.0.3",
"bundled": true,
"optional": true
},
"fs-minipass": {
"version": "1.2.5",
"bundled": true,
"optional": true,
"requires": {
"minipass": "^2.2.1"
}
},
"fs.realpath": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"gauge": {
"version": "2.7.4",
"bundled": true,
"optional": true,
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
}
},
"glob": {
"version": "7.1.3",
"bundled": true,
"optional": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"has-unicode": {
"version": "2.0.1",
"bundled": true,
"optional": true
},
"iconv-lite": {
"version": "0.4.24",
"bundled": true,
"optional": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ignore-walk": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"minimatch": "^3.0.4"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"optional": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true,
"optional": true
},
"ini": {
"version": "1.3.5",
"bundled": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
},
"isarray": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
}
},
"minizlib": {
"version": "1.2.1",
"bundled": true,
"optional": true,
"requires": {
"minipass": "^2.2.1"
}
},
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.1.1",
"bundled": true,
"optional": true
},
"needle": {
"version": "2.3.1",
"bundled": true,
"optional": true,
"requires": {
"debug": "^4.1.0",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
}
},
"node-pre-gyp": {
"version": "0.13.0",
"bundled": true,
"optional": true,
"requires": {
"detect-libc": "^1.0.2",
"mkdirp": "^0.5.1",
"needle": "^2.2.1",
"nopt": "^4.0.1",
"npm-packlist": "^1.1.6",
"npmlog": "^4.0.2",
"rc": "^1.2.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"tar": "^4"
}
},
"nopt": {
"version": "4.0.1",
"bundled": true,
"optional": true,
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
}
},
"npm-bundled": {
"version": "1.0.6",
"bundled": true,
"optional": true
},
"npm-packlist": {
"version": "1.4.1",
"bundled": true,
"optional": true,
"requires": {
"ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1"
}
},
"npmlog": {
"version": "4.1.2",
"bundled": true,
"optional": true,
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
"bundled": true,
"optional": true
},
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
},
"os-homedir": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"os-tmpdir": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"osenv": {
"version": "0.1.5",
"bundled": true,
"optional": true,
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true,
"optional": true
},
"process-nextick-args": {
"version": "2.0.0",
"bundled": true,
"optional": true
},
"rc": {
"version": "1.2.8",
"bundled": true,
"optional": true,
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
"minimist": "^1.2.0",
"strip-json-comments": "~2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"optional": true
}
}
},
"readable-stream": {
"version": "2.3.6",
"bundled": true,
"optional": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"rimraf": {
"version": "2.6.3",
"bundled": true,
"optional": true,
"requires": {
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
"bundled": true,
"optional": true
},
"sax": {
"version": "1.2.4",
"bundled": true,
"optional": true
},
"semver": {
"version": "5.7.0",
"bundled": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
"bundled": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
"bundled": true,
"optional": true
},
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"string_decoder": {
"version": "1.1.1",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "~5.1.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-json-comments": {
"version": "2.0.1",
"bundled": true,
"optional": true
},
"tar": {
"version": "4.4.8",
"bundled": true,
"optional": true,
"requires": {
"chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
"minipass": "^2.3.4",
"minizlib": "^1.1.1",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
"yallist": "^3.0.2"
}
},
"util-deprecate": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"wide-align": {
"version": "1.1.3",
"bundled": true,
"optional": true,
"requires": {
"string-width": "^1.0.2 || 2"
}
},
"wrappy": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"optional": true
}
}
},
"gensync": { "gensync": {
"version": "1.0.0-beta.2", "version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -4305,9 +3823,9 @@
"dev": true "dev": true
}, },
"keyv": { "keyv": {
"version": "4.3.3", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/keyv/-/keyv-4.3.3.tgz", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.4.1.tgz",
"integrity": "sha512-AcysI17RvakTh8ir03+a3zJr5r0ovnAH/XTXei/4HIv3bL2K/jzvgivLK9UuI/JbU1aJjM3NSAnVvVVd3n+4DQ==", "integrity": "sha512-PzByhNxfBLnSBW2MZi1DF+W5+qB/7BMpOokewqIvqS8GFtP7xHm2oeGU72Y1fhtfOv/FiEnI4+nyViYDmUChnw==",
"requires": { "requires": {
"compress-brotli": "^1.3.8", "compress-brotli": "^1.3.8",
"json-buffer": "3.0.1" "json-buffer": "3.0.1"
@@ -4728,9 +4246,9 @@
} }
}, },
"minipass-fetch": { "minipass-fetch": {
"version": "2.1.0", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz", "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz",
"integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==", "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==",
"requires": { "requires": {
"encoding": "^0.1.13", "encoding": "^0.1.13",
"minipass": "^3.1.6", "minipass": "^3.1.6",
@@ -5350,12 +4868,6 @@
"resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.0.0.tgz", "resolved": "https://registry.npmjs.org/openapi-types/-/openapi-types-12.0.0.tgz",
"integrity": "sha512-6Wd9k8nmGQHgCbehZCP6wwWcfXcvinhybUTBatuhjRsCxUIujuYFZc9QnGeae75CyHASewBtxs0HX/qwREReUw==" "integrity": "sha512-6Wd9k8nmGQHgCbehZCP6wwWcfXcvinhybUTBatuhjRsCxUIujuYFZc9QnGeae75CyHASewBtxs0HX/qwREReUw=="
}, },
"optional": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz",
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==",
"optional": true
},
"optionator": { "optionator": {
"version": "0.9.1", "version": "0.9.1",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@@ -5631,16 +5143,6 @@
"tdigest": "^0.1.1" "tdigest": "^0.1.1"
} }
}, },
"prometheus-gc-stats": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/prometheus-gc-stats/-/prometheus-gc-stats-0.6.3.tgz",
"integrity": "sha512-vCX+HZ1jZHkha25r5dAcRSNjue+K3Hn0B33EcZl7y3hgp3o1YsQ4Y3x7oJWKvDdbelFIL0McsXGmRg3zBrmq+g==",
"optional": true,
"requires": {
"gc-stats": "^1.4.0",
"optional": "^0.1.3"
}
},
"promise-inflight": { "promise-inflight": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
@@ -5919,9 +5421,9 @@
} }
}, },
"redoc-cli": { "redoc-cli": {
"version": "0.13.18", "version": "0.13.19",
"resolved": "https://registry.npmjs.org/redoc-cli/-/redoc-cli-0.13.18.tgz", "resolved": "https://registry.npmjs.org/redoc-cli/-/redoc-cli-0.13.19.tgz",
"integrity": "sha512-ywV4WnIGKlfVUJ8w3mrkDT4hBYVLqkOgOvcIGaiG+D77ZrkwiH6p0TzjlE8BDrAfhSAgrLza5ncPVjLz843OXg==", "integrity": "sha512-CiVC66jwtC1jcdCAGr35ZbYLrG6lG8LJTJtOOe5a5IhoZJqslhBJx9GW4eMaUsNbiv8jabmutxIqKiGQYcMkAw==",
"dev": true, "dev": true,
"requires": { "requires": {
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
@@ -5932,7 +5434,7 @@
"node-libs-browser": "^2.2.1", "node-libs-browser": "^2.2.1",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1", "react-dom": "^17.0.1",
"redoc": "2.0.0-rc.75", "redoc": "2.0.0-rc.76",
"styled-components": "^5.3.0", "styled-components": "^5.3.0",
"update-notifier": "^5.0.1", "update-notifier": "^5.0.1",
"yargs": "^17.3.1" "yargs": "^17.3.1"
@@ -8359,9 +7861,9 @@
} }
}, },
"redoc": { "redoc": {
"version": "2.0.0-rc.75", "version": "2.0.0-rc.76",
"resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.75.tgz", "resolved": "https://registry.npmjs.org/redoc/-/redoc-2.0.0-rc.76.tgz",
"integrity": "sha512-TCVNjvcBL9x5zSBiPMktA3zyykNN352mXyisfXgriZolct9bASqMdII+a4+tvUH1sA8YgdE1A4mW3YfXD6cR4w==", "integrity": "sha512-7PbH/0GUaH9GoGjaCI8tfCvkzVQY3BGhiBX9lLgpJ6oGAhvioiac7kjTwltRxl5+sDr58AyyB/4XyTBEPqbupw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@redocly/openapi-core": "^1.0.0-beta.104", "@redocly/openapi-core": "^1.0.0-beta.104",
@@ -9248,15 +8750,6 @@
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
}, },
"response-time": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/response-time/-/response-time-2.3.2.tgz",
"integrity": "sha512-MUIDaDQf+CVqflfTdQ5yam+aYCkXj1PY8fjlPDQ6ppxJlmgZb864pHtA750mayywNg8tx4rS7qH9JXd/OF+3gw==",
"requires": {
"depd": "~1.1.0",
"on-headers": "~1.0.1"
}
},
"responselike": { "responselike": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz",
@@ -9600,9 +9093,9 @@
} }
}, },
"spdx-license-ids": { "spdx-license-ids": {
"version": "3.0.11", "version": "3.0.12",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz",
"integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==", "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==",
"dev": true "dev": true
}, },
"split": { "split": {
@@ -10045,9 +9538,9 @@
} }
}, },
"marked": { "marked": {
"version": "4.0.18", "version": "4.0.19",
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.19.tgz",
"integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==", "integrity": "sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ==",
"dev": true "dev": true
}, },
"minimatch": { "minimatch": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "@openstapps/backend", "name": "@openstapps/backend",
"version": "0.2.0", "version": "0.3.0",
"description": "A reference implementation for a StApps backend", "description": "A reference implementation for a StApps backend",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"author": "André Bierlein <andre.mt.bierlein@gmail.com>", "author": "André Bierlein <andre.mt.bierlein@gmail.com>",
@@ -37,12 +37,11 @@
"@openstapps/core": "0.69.0", "@openstapps/core": "0.69.0",
"@openstapps/core-tools": "0.32.0", "@openstapps/core-tools": "0.32.0",
"@openstapps/logger": "1.0.0", "@openstapps/logger": "1.0.0",
"@types/express-prometheus-middleware": "1.2.1",
"@types/node": "14.18.24", "@types/node": "14.18.24",
"config": "3.3.7", "config": "3.3.7",
"cors": "2.8.5", "cors": "2.8.5",
"express": "4.18.1", "express": "4.18.1",
"express-prometheus-middleware": "1.2.0", "express-prom-bundle": "6.5.0",
"express-promise-router": "4.1.1", "express-promise-router": "4.1.1",
"got": "11.8.5", "got": "11.8.5",
"moment": "2.29.4", "moment": "2.29.4",
@@ -76,8 +75,8 @@
"@types/sinon-express-mock": "1.3.9", "@types/sinon-express-mock": "1.3.9",
"@types/supertest": "2.0.12", "@types/supertest": "2.0.12",
"@types/uuid": "8.3.4", "@types/uuid": "8.3.4",
"@typescript-eslint/eslint-plugin": "5.33.1", "@typescript-eslint/eslint-plugin": "5.34.0",
"@typescript-eslint/parser": "5.33.1", "@typescript-eslint/parser": "5.34.0",
"chai": "4.3.6", "chai": "4.3.6",
"chai-as-promised": "7.1.1", "chai-as-promised": "7.1.1",
"conventional-changelog-cli": "2.2.2", "conventional-changelog-cli": "2.2.2",
@@ -92,7 +91,7 @@
"nyc": "15.1.0", "nyc": "15.1.0",
"prepend-file-cli": "1.0.6", "prepend-file-cli": "1.0.6",
"prettier": "2.7.1", "prettier": "2.7.1",
"redoc-cli": "0.13.18", "redoc-cli": "0.13.19",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"sinon": "14.0.0", "sinon": "14.0.0",
"sinon-express-mock": "2.2.1", "sinon-express-mock": "2.2.1",

View File

@@ -13,13 +13,10 @@
* this program. If not, see <https://www.gnu.org/licenses/>. * this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import {Logger} from '@openstapps/logger'; import {Logger} from '@openstapps/logger';
import express from 'express'; import express_prom_bundle from 'express-prom-bundle';
import expressPrometheusMiddleware from 'express-prometheus-middleware';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
type UserOptions = Parameters<typeof expressPrometheusMiddleware>[0];
/** /**
* Create and configure a new Express Prometheus Middleware instance * Create and configure a new Express Prometheus Middleware instance
* *
@@ -29,15 +26,15 @@ type UserOptions = Parameters<typeof expressPrometheusMiddleware>[0];
* *
* @returns express.Express * @returns express.Express
*/ */
export function getPrometheusMiddleware(): express.Express { export function getPrometheusMiddleware(): express_prom_bundle.Middleware {
const configFileName = path.join('./config', 'prometheus.json'); const configFileName = path.join('./config', 'prometheus.json');
let options: UserOptions = {}; let options: express_prom_bundle.Opts = {};
try { try {
options = JSON.parse(fs.readFileSync(configFileName, 'utf8')); options = JSON.parse(fs.readFileSync(configFileName, 'utf8'));
} catch (error) { } catch (error) {
Logger.warn('Could not get options for Prometheus Middleware.', error); Logger.warn("Couldn't get options from config file for Prometheus Middleware.", error);
} }
return expressPrometheusMiddleware(options); return express_prom_bundle(options);
} }