mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 14:02:48 +00:00
feat: migrate backend to cosmiconfig
This commit is contained in:
53
configuration/backend-config/about-page.xsd
Normal file
53
configuration/backend-config/about-page.xsd
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
|
||||
<xs:element name="page">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="contents">
|
||||
<xs:attribute name="href" type="xs:string" use="required"/>
|
||||
<xs:attribute name="lang" type="xs:language"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="contents">
|
||||
<xs:sequence>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="section" type="section"/>
|
||||
<xs:element name="link" type="link"/>
|
||||
<xs:element name="markdown">
|
||||
<xs:complexType>
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string"/>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="rows" type="table"/>
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="table">
|
||||
<xs:sequence>
|
||||
<xs:element name="columns" type="contents" maxOccurs="unbounded" minOccurs="0"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="section">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="contents">
|
||||
<xs:attribute name="title" type="xs:string" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="link">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="xs:normalizedString">
|
||||
<xs:attribute name="icon" type="xs:string" use="required"/>
|
||||
<xs:attribute name="href" type="xs:string" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
32
configuration/backend-config/menu.xsd
Normal file
32
configuration/backend-config/menu.xsd
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
|
||||
<xs:element name="menu">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="group" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="item" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="xs:normalizedString">
|
||||
<xs:attributeGroup ref="link"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="title" type="xs:string" use="required"/>
|
||||
<xs:attributeGroup ref="link"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:attributeGroup name="link">
|
||||
<xs:attribute name="route" type="xs:string" use="required"/>
|
||||
<xs:attribute name="icon" type="xs:string" use="required"/>
|
||||
<xs:attribute name="authProvider" type="xs:string"/>
|
||||
</xs:attributeGroup>
|
||||
</xs:schema>
|
||||
17
configuration/backend-config/package.json
Normal file
17
configuration/backend-config/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "2.1.0",
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||
"devDependencies": {
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/eslint-config": "workspace:*"
|
||||
},
|
||||
"prettier": "@openstapps/prettier-config",
|
||||
"eslintConfig": {
|
||||
"extends": ["@openstapps/eslint-configt"]
|
||||
}
|
||||
}
|
||||
44
configuration/backend-config/test/about-page.xml
Normal file
44
configuration/backend-config/test/about-page.xml
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<page href="about"
|
||||
lang="de"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="file://../about-page.xsd">
|
||||
<section title="Über Open StApps">
|
||||
<section title="Verbundprojekt mehrerer Hochschulen für eine generische Studierenden-App">
|
||||
<markdown>
|
||||
Open StApps bietet Studierenden aller beteiligten Hochschulen eine qualitativ
|
||||
hochwertige App für den Studienalltag. Open StApps-Verbundpartner integrieren
|
||||
generalisierbare Studierendenprozesse so in App-Module, dass diese auch
|
||||
von anderen Hochschulen verwendet werden können. Die in der Open StApps App
|
||||
verwendeten Daten einer Datenquelle sind in einem generalisierten Datenmodell
|
||||
so aufbereitet, dass ein Austausch oder Abschaltung der Datenquelle problemlos möglich
|
||||
ist und die Open StApps App problemlos weiterhin funktionsfähig bleibt.
|
||||
</markdown>
|
||||
</section>
|
||||
<section title="Goethe-Uni Kontakt">
|
||||
<rows>
|
||||
<columns>
|
||||
<markdown>Adresse</markdown>
|
||||
<markdown>
|
||||
Goethe Universität<br>
|
||||
Hochschulrechenzentrum (HRZ)<br>
|
||||
Norbert-Wollheim-Platz 1<br>
|
||||
60629 Frankfurt
|
||||
</markdown>
|
||||
</columns>
|
||||
<columns>
|
||||
<markdown>Kontaktinformationen</markdown>
|
||||
<markdown>
|
||||
[app@rz.uni-frankfurt.de](mailto:app@rz.uni-frankfurt.de)<br>
|
||||
[+49 69 798 32936](tel:+496979832936)<br>
|
||||
[https://app.rz.uni-frankfurt.de](https://app.rz.uni-frankfurt.de)
|
||||
</markdown>
|
||||
</columns>
|
||||
</rows>
|
||||
</section>
|
||||
<link href="changelog" icon="newspaper">Neue Funktionen / Gelöste Probleme</link>
|
||||
<link href="imprint" icon="description">Impressum</link>
|
||||
<link href="privacy" icon="policy">Datenschutz</link>
|
||||
<link href="licenses" icon="copyright">Bibliotheken und Lizenzen</link>
|
||||
</section>
|
||||
</page>
|
||||
18
configuration/backend-config/test/menu.de.xml
Normal file
18
configuration/backend-config/test/menu.de.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<menu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://../menu.xsd">
|
||||
<group title="Übersicht" icon="home" route="/overview">
|
||||
<item title="news" title.de="Aktuelles" icon="newspaper" route="/news">Aktuelles</item>
|
||||
<item title="search" title.de="Suche" icon="search" route="/search"/>
|
||||
<item title="library catalog" title.de="Bibliothekskatalog" icon="local_library" route="/hebis-search"/>
|
||||
<item title="course catalog" title.de="Vorlesungsverzeichnis" icon="inventory_2" route="/catalog"/>
|
||||
</group>
|
||||
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
|
||||
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>
|
||||
<group title="my app" title.de="Meine App" icon="school" route="/profile">
|
||||
<item title="favorites" title.de="Favoriten" icon="grade" route="/favorites"/>
|
||||
<item title="schedule" title.de="Stundenplan" icon="calendar_today" route="/schedule"/>
|
||||
<item title="library account" title.de="Bibliothekskonto" icon="badge" route="/library-account" authProvider="paia"/>
|
||||
<item title="settings" title.de="Einstellungen" icon="settings" route="/settings"/>
|
||||
<item title="About the App" title.de="Über die App" icon="info" route="/about"/>
|
||||
</group>
|
||||
</menu>
|
||||
18
configuration/backend-config/test/menu.xml
Normal file
18
configuration/backend-config/test/menu.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<menu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://../menu.xsd">
|
||||
<group title="overview" title.de="Übersicht" icon="home" route="/overview">
|
||||
<item title="news" title.de="Aktuelles" icon="newspaper" route="/news" />
|
||||
<item title="search" title.de="Suche" icon="search" route="/search"/>
|
||||
<item title="library catalog" title.de="Bibliothekskatalog" icon="local_library" route="/hebis-search"/>
|
||||
<item title="course catalog" title.de="Vorlesungsverzeichnis" icon="inventory_2" route="/catalog"/>
|
||||
</group>
|
||||
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
|
||||
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>
|
||||
<group title="my app" title.de="Meine App" icon="school" route="/profile">
|
||||
<item title="favorites" title.de="Favoriten" icon="grade" route="/favorites"/>
|
||||
<item title="schedule" title.de="Stundenplan" icon="calendar_today" route="/schedule"/>
|
||||
<item title="library account" title.de="Bibliothekskonto" icon="badge" route="/library-account" authProvider="paia"/>
|
||||
<item title="settings" title.de="Einstellungen" icon="settings" route="/settings"/>
|
||||
<item title="About the App" title.de="Über die App" icon="info" route="/about"/>
|
||||
</group>
|
||||
</menu>
|
||||
3
configuration/backend-config/tsconfig.json
Normal file
3
configuration/backend-config/tsconfig.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "@openstapps/tsconfig"
|
||||
}
|
||||
Reference in New Issue
Block a user