Compare commits

..

62 Commits

Author SHA1 Message Date
Rainer Killinger
622481a3c9 docs: update changelogs for release\n\nci: publish release 2024-03-28 14:27:56 +01:00
Thea Schöbl
1ab5c0c355 fix: inPlace in list items is placed weird 2024-03-27 13:45:22 +00:00
Rainer Killinger
b0f6ffb21c refactor: ajdust app environment to backend version >= v3.1.0 2024-03-27 10:11:32 +01:00
Rainer Killinger
e658cff9d2 refactor: use GET for id-cards requests 2024-03-27 09:55:31 +01:00
Rainer Killinger
e71355a2fb fix: malformed Bearer header in id-cards provider 2024-03-27 09:55:30 +01:00
100607740b fix: angular lsp broken 2024-03-27 09:55:30 +01:00
Thea Schöbl
10c4466b37 feat: update to angular 17 2024-03-27 09:55:30 +01:00
Rainer Killinger
09faa66e98 fix: broken build and test stage 2024-03-27 09:55:30 +01:00
Rainer Killinger
7c5687111f fix: check-icons script in app 2024-03-27 09:55:30 +01:00
Rainer Killinger
c066028e49 refactor: update asdf .tool-versions 2024-03-27 09:55:30 +01:00
0858a26dc1 fix: dish prices sometimes go missing 2024-03-27 09:55:30 +01:00
8667603bd6 feat: export core version in package 2024-03-27 09:55:29 +01:00
65bc9a76b6 feat: add syncpack semver ranges 2024-03-27 09:55:29 +01:00
912ae42270 feat: add ability to check for existence of a field 2024-03-27 09:55:29 +01:00
c4a5d6e73b fix: exclude app.js and lib from typescript compliation 2024-03-27 09:55:29 +01:00
deed376c24 feat: enable checkJs by default 2024-03-27 09:55:29 +01:00
a4cc23e9a8 feat: add direnv for nix
feat: update nix flake to not rely on buildFHSUserEnv
2024-03-27 09:55:29 +01:00
e8d72683ef fix: backend tests break every year
refactor: update some backend unit tests
2024-03-27 09:55:28 +01:00
Rainer Killinger
e3d068f8d4 fix: iOS build resources 2024-03-27 09:55:28 +01:00
Rainer Killinger
b346d216a3 refactor: add asdf tool versioning file 2024-03-27 09:55:28 +01:00
dbb558508f fix: changeset crashes because it uses internal prettier version 2024-03-27 09:55:28 +01:00
Rainer Killinger
754d99c1b4 refactor: overhaul minimal-deployment compose file 2024-03-27 09:55:27 +01:00
Rainer Killinger
689ac68be3 fix: pin alpine version to 3.18 and add healthchecks 2024-03-06 11:45:40 +01:00
Rainer Killinger
d36d9596fc docs: update changelogs for release 2023-12-19 15:32:42 +01:00
Thea Schöbl
8d50f669e7 feat: collapse detail titles into header bar 2023-12-19 14:16:38 +01:00
Jovan Krunić
dce08d9c03 fix: reverse workaround after update of capacitor
Closes #179
2023-12-19 13:12:25 +00:00
Rainer Killinger
296054c8e0 docs: update changelogs for release
ci: publish release
2023-12-13 16:42:45 +01:00
859763367e fix: throw error if config import fails
feat: log used config in backend
2023-12-12 14:37:24 +01:00
Rainer Killinger
848fde4660 refactor: increase maxRequestBodySize to 2 MB 2023-12-11 13:00:52 +01:00
Rainer Killinger
bd1046a19a docs: update changelogs for release
ci: publish release
2023-12-08 18:03:41 +01:00
Rainer Killinger
3b9068197c fix: pettier config causing changeset to crash 2023-12-08 17:35:00 +01:00
Thea Schöbl
d2c8120255 feat: simplify version history api 2023-12-08 13:49:53 +00:00
d44204cf8d fix: remove old console.log statements 2023-12-06 17:15:03 +01:00
9d5dd05bb6 refactor: remove nullish coalecing pipe 2023-12-06 17:15:03 +01:00
288a49113f refactor: migrate to strict template checking 2023-12-06 17:14:55 +01:00
791b5c895d fix: hide navigation from jop posting search 2023-12-05 15:51:57 +00:00
d7a85b7fae feat: improved e2e tests 2023-12-05 15:17:00 +00:00
Rainer Killinger
bff2d985aa refactor: use latest backend (4.1.0) 2023-12-05 12:06:11 +00:00
Rainer Killinger
655efc9d29 fix: map location preview collapsed in webkit 2023-12-05 12:06:11 +00:00
Rainer Killinger
66712bdd24 fix: iOS app not starting 2023-12-05 11:19:46 +00:00
8b5b4c765b fix: my app card layout 2023-12-05 10:36:22 +00:00
Thea Schöbl
31a6ebfd3f feat: upgrade prettier to v3 2023-12-05 10:36:04 +00:00
Rainer Killinger
991ed1cb1f docs: update changelogs for release
ci: publish release
2023-12-01 19:05:06 +01:00
Rainer Killinger
1efe5c1449 refactor: don't open webpack-bundle-analyzer 2023-12-01 18:28:41 +01:00
Rainer Killinger
4dbeb9936c refactor: adjust f-u release version history 2023-12-01 18:19:36 +01:00
Rainer Killinger
29e6128141 fix: resources:ios script not being BSD compatible 2023-12-01 18:15:15 +01:00
Rainer Killinger
753dc7cd11 docs: update changelogs for release
ci: publish release
2023-12-01 16:42:33 +01:00
Rainer Killinger
4f3834c20e refactor: update capacitor-secure-storage-plugin 2023-12-01 13:42:22 +00:00
Rainer Killinger
cfb4aa364f refactor: add new book and periodical categories 2023-12-01 12:50:28 +00:00
Thea Schöbl
37945f7d19 feat: app release notes 2023-12-01 12:34:20 +00:00
5d47a17629 fix: android system bars always have light buttons 2023-12-01 12:23:38 +01:00
61587c7ba1 feat: add alert when critical errors prevent an app launch 2023-11-28 09:01:23 +00:00
066e374462 feat: upgrade to capacitor 5.0 2023-11-28 09:01:23 +00:00
a02190fe5a fix: flaky tests due to console.error checks 2023-11-27 19:54:28 +01:00
04e275e967 feat: add share option in detail views 2023-11-14 16:37:12 +01:00
f618725598 feat: full database clone feature in api-cli 2023-10-20 15:13:26 +02:00
theld
06b8ca109e feat: job portal
fix: disable function scoping lint rule
fix: outdated contributing docs for adding SCThings
2023-10-20 15:13:26 +02:00
f3ba8af051 fix: prevent duplicate publishes 2023-10-20 14:19:07 +02:00
2e0020b5c8 fix: non-publish branches fail on main 2023-10-20 14:15:22 +02:00
d17e8abea3 fix: docs fail to generate 2023-10-20 14:04:08 +02:00
ef092a8bff fix: library login fails 2023-10-17 18:00:55 +02:00
656f2266e3 feat: add scripts to enable login flow from localhost 2023-10-17 14:50:34 +02:00
495 changed files with 18936 additions and 14216 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

1
.gitignore vendored
View File

@@ -24,6 +24,7 @@ report-junit.xml
# NixOS flake
result
hsperfdata_root
.direnv/
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

View File

@@ -1,6 +1,11 @@
.limit_publish_pipelines:
rules:
- if: '($CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "develop") && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
- if: '$CI_COMMIT_BRANCH == "develop" && $CI_COMMIT_MESSAGE =~ /ci: publish prerelease/ && $CI_PIPELINE_SOURCE != "schedule"'
variables:
PUBLISH_TAG: next
- if: '$CI_COMMIT_BRANCH == "main" && $CI_COMMIT_MESSAGE =~ /ci: publish release/ && $CI_PIPELINE_SOURCE != "schedule"'
variables:
PUBLISH_TAG: latest
deploy:
stage: publish
@@ -24,8 +29,6 @@ publish image:
image:
name: gcr.io/kaniko-project/executor:v1.12.1-debug
entrypoint: [""]
variables:
PUBLISH_TAG: next
script:
- >
/kaniko/executor
@@ -50,9 +53,6 @@ publish image:
- IMAGE_NAME: app
DEPLOY_DIR: frontend/app
rules:
- if: $CI_COMMIT_BRANCH == 'main'
variables:
PUBLISH_TAG: latest
- !reference [.limit_publish_pipelines, rules]
publish packages:
@@ -61,16 +61,12 @@ publish packages:
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
PUBLISH_TAG: next
script:
- pnpm install
- pnpm build
- pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_AUTH_TOKEN}"
- pnpm publish -r --publish-branch ${CI_COMMIT_BRANCH} --tag ${PUBLISH_TAG} --no-git-checks # TODO: Git checks...
rules:
- if: $CI_COMMIT_BRANCH == 'main'
variables:
PUBLISH_TAG: latest
- !reference [.limit_publish_pipelines, rules]
publish docs:
@@ -84,5 +80,4 @@ publish docs:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == 'main'
- !reference [.limit_publish_pipelines, rules]

1
.prettierignore Normal file
View File

@@ -0,0 +1 @@
pnpm-lock.yaml

View File

@@ -2,7 +2,7 @@
/** @type {import('syncpack').RcFile} */
const config = {
semverRange: '',
semverGroups: [{range: ''}],
source: ['package.json', '**/package.json'],
indent: ' ',
sortFirst: [
@@ -49,7 +49,7 @@ const config = {
{
label: 'Packages should use workspace version',
dependencies: ['@openstapps/**'],
dependencyTypes: ['prod', 'dev'],
dependencyTypes: ['prod', 'dev', 'peer'],
packages: ['**'],
pinVersion: 'workspace:*',
},

3
.tool-versions Normal file
View File

@@ -0,0 +1,3 @@
nodejs 18.19.1
pnpm 8.15.4
python 3.11.5

View File

@@ -37,13 +37,13 @@ Adding new types requires changes at multiple locations for it to work correctly
- Add your SCThing and SCThingWithoutReferences to `src/things/your-thing-name.ts` and make them extend `SCThingWithoutReferences` and `SCThing` respectively
- Add your SCThingMeta to `src/things/your-thing-name.ts` and make it extend `SCThingMeta`
- Add your SCThingMeta to `SCClasses` in `src/meta.ts`
- Add your SCThing to `SCThingsWithoutDiff` in `src/meta.ts`
- Add your SCThing to `SCIndexableThings ` in `src/meta.ts`
- Add your SCThingWithoutReferences to `SCAssociatedThingWithoutReferences` in `src/meta.ts`
- Add your SCThing to `SCAssociatedThing` in `src/meta.ts`
- Add your SCThing to the `SCThingType` enum in `src/things/abstract/thing.ts`
- Add an example file for your SCThing in `test/resources/YourThingName.json`
- Add the following lines for your SCThing in `test/type.spec.ts`:
- Make sure your SCThing (but not SCThingWithoutReferences!) includes the `@indexable` and `@validatable` JSDoc annotations, otherwise neither JSON Schemas nor Elasticsearch mappings will be generated
```typescript
/**
* Types of properties of SCYourThingName

View File

@@ -1,5 +1,46 @@
# @openstapps/backend
## 3.2.0
### Minor Changes
- 912ae422: Add the ability to filter by existence of a field
### Patch Changes
- 689ac68b: pin alpine version to 3.18 and add healthchecks
- e8d72683: Backend unit tests break every year
- Updated dependencies [912ae422]
- @openstapps/core@4.0.0
- @openstapps/core-tools@3.0.0
- @openstapps/logger@3.0.0
## 3.1.2
### Patch Changes
- Fix backend rejecting plugins
- Fix backend sliently falling back to default configs
## 3.1.1
### Patch Changes
- Fix version history offered by backend
- Updated dependencies
- @openstapps/core@3.1.1
## 3.1.0
### Minor Changes
- 06b8ca10: Add job portal feature
### Patch Changes
- Updated dependencies [06b8ca10]
- @openstapps/core@3.1.0
## 3.0.1
### Patch Changes

View File

@@ -9,4 +9,6 @@ ENV NODE_ENV=production
WORKDIR /app
EXPOSE 3000
HEALTHCHECK --interval=10s --timeout=10s --start-period=10s --retries=12 CMD curl -s --fail --request POST --data '{}' --header 'Content-Type: application/json' http://localhost:3000/ >/dev/null || exit 1
ENTRYPOINT ["node", "app.js"]

View File

@@ -1,5 +1,3 @@
// @ts-check
/**
* This is the database configuration for the technical university of berlin
*

View File

@@ -22,6 +22,7 @@ const app = {
name: 'Goethe-Uni',
privacyPolicyUrl: 'https://mobile.server.uni-frankfurt.de/_static/privacy.md',
settings: [userGroupSetting, languageSetting],
versionHistory: [],
};
export default app;

View File

@@ -1,4 +1,3 @@
// @ts-check
import {SCSettingInputType, SCThingOriginType, SCThingType} from '@openstapps/core';
/** @type {import('@openstapps/core').SCLanguageSetting} */

View File

@@ -1,4 +1,3 @@
// @ts-check
/** @type {import('@openstapps/core').SCAppConfigurationMenuCategory[]} */
const menus = [
{
@@ -56,6 +55,19 @@ const menus = [
},
},
},
{
icon: 'work',
route: '/jobs',
title: 'job postings',
translations: {
de: {
title: 'Jobangebote',
},
en: {
title: 'job postings',
},
},
},
],
title: 'overview',
route: '/overview',

View File

@@ -1,4 +1,3 @@
// @ts-check
import {SCSettingInputType, SCThingOriginType, SCThingType} from '@openstapps/core';
/** @type {import('@openstapps/core').SCUserGroupSetting} */

View File

@@ -1,4 +1,3 @@
// @ts-check
import {SCThingType} from '@openstapps/core';
/** @type {import('@openstapps/core').SCBackendAggregationConfiguration[]} */

View File

@@ -1,4 +1,3 @@
// @ts-check
import {
month,
sommerRange,

View File

@@ -1,4 +1,3 @@
// @ts-check
import {SCThingType} from '@openstapps/core';
import aggregations from './aggregations.js';
import boostings from './boostings.js';
@@ -17,7 +16,7 @@ export const backend = {
hiddenTypes: [SCThingType.DateSeries, SCThingType.Diff, SCThingType.Floor],
mappingIgnoredTags: ['minlength', 'pattern', 'see', 'tjs-format'],
maxMultiSearchRouteQueries: 5,
maxRequestBodySize: 512 * 1024,
maxRequestBodySize: 2e6,
name: 'Goethe-Universität Frankfurt am Main',
namespace: '909a8cbc-8520-456c-b474-ef1525f14209',
sortableFields: [

View File

@@ -1,4 +1,3 @@
// @ts-check
import app from './app/index.js';
import {backend, internal} from './backend/index.js';

View File

@@ -1,5 +1,3 @@
// @ts-check
/**
* This is the default configuration for elasticsearch (a database)
*
@@ -11,13 +9,13 @@
*
* To get more information about the meaning of specific fields, please use your IDE to read the TSDoc documentation.
*
* @type {import('../../src/storage/elasticsearch/types/elasticsearch-config.js')}
* @type {import('../../src/storage/elasticsearch/types/elasticsearch-config.js').ElasticsearchConfigFile}
*/
const config = {
internal: {
database: {
name: 'elasticsearch',
version: '5.6',
version: '8.4.2',
query: {
minMatch: '75%',
queryType: 'dis_max',

View File

@@ -1,4 +1,3 @@
// @ts-check
import {readFile} from 'fs/promises';
import {SCAboutPageContentType} from '@openstapps/core';

View File

@@ -1,4 +1,3 @@
// @ts-check
/**
* Generates a range of numbers that represent consecutive calendar months
*

View File

@@ -0,0 +1,37 @@
import {readFile, readdir} from 'fs/promises';
import url from 'url';
import path from 'path';
/**
* @example version(1, import.meta.url)
* @param options {Omit<import('@openstapps/core').SCAppVersionInfo, 'releaseNotes' | 'translations'>}
* @param base {string}
* @returns {Promise<import('@openstapps/core').SCAppVersionInfo>}
*/
export async function version(options, base) {
const de = await readFile(new URL(`${options.version}.de.md`, base), 'utf8');
const en = await readFile(new URL(`${options.version}.en.md`, base), 'utf8');
return {
...options,
releaseNotes: de,
translations: {
en: {
releaseNotes: en,
},
},
};
}
/**
* @param base {string} Base path of the file as `import.meta.url`
* @returns {Promise<import('@openstapps/core').SCAppVersionInfo[]>}
*/
export async function versions(base) {
const directory = await readdir(path.dirname(url.fileURLToPath(base)));
const versions = [
...new Set(directory.filter(it => it.endsWith('.md')).map(it => it.replace(/\.\w+\.md$/, ''))),
].sort((a, b) => -a.localeCompare(b, undefined, {numeric: true}));
return Promise.all(versions.map(versionName => version({version: versionName}, base)));
}

View File

@@ -1,4 +1,3 @@
// @ts-check
import {SCAboutPageContentType} from '@openstapps/core';
import {markdown} from '../../default/tools/markdown.js';

View File

@@ -1,4 +1,3 @@
// @ts-check
import {SCAboutPageContentType} from '@openstapps/core';
/** @type {import('@openstapps/core').SCAboutPage} */

View File

@@ -1,4 +1,3 @@
// @ts-check
import about from './about.js';
import imprint from './imprint.js';
import privacy from './privacy.js';

View File

@@ -1,4 +1,3 @@
// @ts-check
import {markdown} from '../../default/tools/markdown.js';
/** @type {import('@openstapps/core').SCAboutPage} */

View File

@@ -1,7 +1,7 @@
// @ts-check
import aboutPages from './about-pages/index.js';
import defaultApp from '../default/app/index.js';
import {backend as defaultBackend, internal as defaultInternal} from '../default/backend/index.js';
import versionHistory from './version-history/index.js';
/**
* This is the default configuration for the Goethe university of Frankfurt
@@ -76,6 +76,7 @@ const config = {
} */
},
},
versionHistory,
aboutPages,
},
backend: defaultBackend,

View File

@@ -0,0 +1,52 @@
# Goethe-Uni App 2.4
Wir freuen uns euch mehr in der Goethe-Uni App
bieten zu können.
## Navigation zu Gebäuden und Orten
Als eines der Ergebnisse des Ideenwettbewerbs wurde jetzt
ein Navigationsfeature in die App integriert.
Orte auf der Karte, Mensen, sowie sogar Termine (wenn hinterlegt)
bieten jetzt direkt die Option eine Verbindung zu finden, gestützt
durch die Karten App auf deinem Gerät.
## Integration der Jobbörse
Jobs findest du ab sofort auch in der Goethe-Uni App.
Auch das ist ein Ergebnis des Ideenwettbewerbs,
und wir freuen uns es euch hier präsentieren zu können!
## Der Umweltscore
Der Umweltscore für Gerichte wird nun auch in der App angezeigt.
> Nachhaltigkeit, Umweltschutz, Gesundheit und Klimawandel sind
> zentrale Begriffe im gesellschaftlichen Miteinander.
> Unsere Ernährung spielt hierbei eine wichtige Rolle.
> Das Studierendenwerk Frankfurt am Main zeichnet seine Speisenpläne
> ab sofort mit einem Umweltscore aus.
> Anhand dieser Bewertung können Sie direkt ersehen,
> welchen Einfluss Ihre Essenauswahl auf das Klima hat.
## Weitere Verbesserungen
### Performance
Die Performance der App beim Navigieren wurde stark verbessert und ist datensparender.
### Kalender
Die Kalenderabschnitte haben jetzt neue Namen bekommen:
- Der _Kalender_ zeigt Termine für spezifische Tage
- Die _Wochenübersicht_ ist ein Stundenplan mit allen Termine, die sich wiederholen (z. B. Vorlesungen)
- Die _Einzeltermine_ zeigen alle Termine, die sich nicht wiederholen
(z. B. Klausuren)
### Meine App
Der "Meine Kurse" Abschnitt wurde überarbeitet, und zeigt jetzt Termine
für die nächsten Tage und mit mehr Details an.

View File

@@ -0,0 +1,49 @@
# Goethe-Uni App 2.4
The Goethe-Uni App got even better!
## Navigation to buildings and places
As part of the "Ideenwettbewerb," the idea competition,
we have now integrated a navigation feature into the app.
Orte auf der Karte, Mensen, sowie sogar Termine (wenn hinterlegt)
bieten jetzt direkt die Option eine Verbindung zu finden, gestützt
durch die Karten App auf deinem Gerät.
## Integration of the job market
Jobs are now also available in the Goethe-Uni App.
This feature is also a result of the idea competition,
and we're happy to be able to present it to you here!
## The environment score
The environment score for dishes is now displayed inside the app.
> Sustainability, environment protection, health, and climate change are
> central topics in how we live today in our society.
> Our eating habits play an important role in it.
> The "Studierendenwerk Frankfurt am Main" is marking up its menus
> from now on with the so-called "Umweltscore," the environment score.
> Based on this rating, you can see the impact your meal choice would have on our climate.
## Further improvements
### Performance
The performance while navigating around the app has been heavily improved and requires less data to work.
### Calendar
The calendar sections have new names:
- The _calendar_ shows appointments on specific days
- The _week overview_ is a schedule with all events that repeat (e.g. lectures)
- The _single events_ show all appointments that don't repeat (e.g. exams)
### My App
The "my courses" section has been revamped,
and now shows events for the next days and with more detail.

View File

@@ -0,0 +1,6 @@
import {versions} from '../../default/tools/version.js';
/** @type {import('@openstapps/core').SCAppVersionInfo[]} */
const versionHistory = await versions(import.meta.url);
export default versionHistory;

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/backend",
"description": "A reference implementation for a StApps backend",
"version": "3.0.1",
"version": "3.2.0",
"private": true,
"type": "module",
"license": "AGPL-3.0-only",
@@ -64,7 +64,7 @@
"express-prom-bundle": "6.6.0",
"express-promise-router": "4.1.1",
"got": "12.6.0",
"moment": "2.29.4",
"moment": "2.30.1",
"morgan": "1.10.0",
"nock": "13.3.1",
"node-cache": "5.1.2",
@@ -98,9 +98,9 @@
"sinon": "15.0.4",
"sinon-express-mock": "2.2.1",
"supertest": "6.3.3",
"ts-node": "10.9.1",
"ts-node": "10.9.2",
"tsup": "6.7.0",
"typescript": "5.1.6"
"typescript": "5.4.2"
},
"tsup": {
"entry": [

View File

@@ -2,6 +2,7 @@ import {cosmiconfig, PublicExplorer} from 'cosmiconfig';
import {SCConfigFile} from '@openstapps/core';
import path from 'path';
import deepmerge from 'deepmerge';
import {Logger} from '@openstapps/logger';
const fallbackNamespace = 'default';
const configPath = 'config';
@@ -23,31 +24,25 @@ function configLoader(moduleName: string): PublicExplorer {
* Find and load a config file
*/
async function findConfig<T>(moduleName: string, namespace = fallbackNamespace): Promise<T> {
return configLoader(moduleName)
.search(path.posix.join('.', configPath, namespace))
.then(it => it!.config as T)
.catch(() =>
configLoader(moduleName)
.search(path.posix.join('.', configPath, fallbackNamespace))
.then(it => it!.config),
);
}
const config = await configLoader(moduleName).search(path.posix.join('.', configPath, namespace));
/**
* Loads a config file
*/
async function loadConfig<T>(moduleName: string): Promise<T> {
const namespace = process.env.NODE_APP_INSTANCE;
const database = process.env.NODE_CONFIG_ENV;
const config = await findConfig<T>(moduleName, namespace);
if (database) {
const databaseConfig = await findConfig<T>(database, namespace);
return deepmerge(config, databaseConfig);
if (config) {
Logger.info(`Using ${namespace} config for ${moduleName}`);
return config.config;
} else {
Logger.info(`Using ${fallbackNamespace} config for ${moduleName}`);
return configLoader(moduleName)
.search(path.posix.join('.', configPath, fallbackNamespace))
.then(it => it!.config);
}
return config;
}
export const backendConfig = await loadConfig<SCConfigFile>('backend');
export const prometheusConfig = await loadConfig<unknown>('prometheus');
const namespace = process.env.NODE_APP_INSTANCE;
const database = process.env.NODE_CONFIG_ENV;
export const prometheusConfig = await findConfig<unknown>('prometheus', namespace);
const backendConfigWithoutDatabase = await findConfig<SCConfigFile>('backend', namespace);
export const backendConfig = database
? deepmerge(backendConfigWithoutDatabase, await findConfig<never>(database, namespace))
: backendConfigWithoutDatabase;

View File

@@ -84,7 +84,10 @@ export class Elasticsearch implements Database {
* @param config an assembled config file
* @param mailQueue a mail queue for monitoring
*/
constructor(private readonly config: SCConfigFile, mailQueue?: MailQueue) {
constructor(
private readonly config: SCConfigFile,
mailQueue?: MailQueue,
) {
if (config.internal.database === undefined || typeof config.internal.database.version !== 'string') {
throw new TypeError('Database version is undefined. Check your config file');
}

View File

@@ -21,16 +21,31 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
*/
export function buildValueFilter(
filter: SCSearchValueFilter,
): QueryDslSpecificQueryContainer<'term'> | QueryDslSpecificQueryContainer<'terms'> {
return Array.isArray(filter.arguments.value)
? {
terms: {
[`${filter.arguments.field}.raw`]: filter.arguments.value,
):
| QueryDslSpecificQueryContainer<'exists'>
| QueryDslSpecificQueryContainer<'term'>
| QueryDslSpecificQueryContainer<'terms'> {
switch (typeof filter.arguments.value) {
case 'undefined': {
return {
exists: {
field: filter.arguments.field,
},
}
: {
};
}
case 'string': {
return {
term: {
[`${filter.arguments.field}.raw`]: filter.arguments.value,
},
};
}
case 'object': {
return {
terms: {
[`${filter.arguments.field}.raw`]: filter.arguments.value,
},
};
}
}
}

View File

@@ -14,6 +14,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {
SCBook,
SCBulkAddRoute,
SCBulkDoneRoute,
SCBulkRequest,
@@ -23,29 +24,30 @@ import {
import {expect} from 'chai';
import {bulk, DEFAULT_TEST_TIMEOUT} from '../common.js';
import {testApp} from '../tests-setup.js';
import {readFile} from 'fs/promises';
import {v4} from 'uuid';
import bookFile from '@openstapps/core/test/resources/indexable/Book.2.json' assert {type: 'json'};
const book = JSON.parse(
await readFile('node_modules/@openstapps/core/test/resources/indexable/Book.2.json', 'utf8'),
).instance;
const book = bookFile.instance as SCBook;
describe('Bulk routes', async function () {
// increase timeout for the suite
this.timeout(DEFAULT_TEST_TIMEOUT);
const request: SCBulkRequest = {
expiration: bulk.expiration,
source: bulk.source,
type: bulk.type,
};
const bulkRoute = new SCBulkRoute();
const bulkAddRoute = new SCBulkAddRoute();
const bulkDoneRoute = new SCBulkDoneRoute();
let request: SCBulkRequest;
let bulkRoute: SCBulkRoute;
let bulkAddRoute: SCBulkAddRoute;
let bulkDoneRoute: SCBulkDoneRoute;
// afterEach(async function() {
// TODO: Delete saved bulks
// });
before(function () {
request = {
expiration: bulk.expiration,
source: bulk.source,
type: bulk.type,
};
bulkRoute = new SCBulkRoute();
bulkAddRoute = new SCBulkAddRoute();
bulkDoneRoute = new SCBulkDoneRoute();
});
it('should create bulk', async function () {
const {status, body, error} = await testApp

View File

@@ -21,7 +21,12 @@ import {expect} from 'chai';
describe('Index route', async function () {
// increase timeout for the suite
this.timeout(DEFAULT_TEST_TIMEOUT);
const indexRoute = new SCIndexRoute();
let indexRoute: SCIndexRoute;
before(function () {
indexRoute = new SCIndexRoute();
});
it('should respond with both app and backend configuration', async function () {
const request: SCIndexRequest = {};

View File

@@ -30,15 +30,11 @@ import chaiAsPromised from 'chai-as-promised';
import {DEFAULT_TEST_TIMEOUT} from '../common.js';
import {testApp} from '../tests-setup.js';
import {backendConfig} from '../../src/config.js';
import {readFile} from 'fs/promises';
import registerRequest from '@openstapps/core/test/resources/PluginRegisterRequest.1.json' assert {type: 'json'};
// for using promises in expectations (to.eventually.be...)
use(chaiAsPromised);
const registerRequest = JSON.parse(
await readFile('node_modules/@openstapps/core/test/resources/PluginRegisterRequest.1.json', 'utf8'),
);
// cast it because of "TS2322: Type 'string' is not assignable to type '"add"'"
export const registerAddRequest: SCPluginAdd = registerRequest.instance as SCPluginAdd;

View File

@@ -47,8 +47,8 @@ describe('Create route', async function () {
const statusCodeSuccess = 222;
const bodySuccess = {foo: true};
const sandbox = sinon.createSandbox();
const validationError = new SCValidationErrorResponse([]);
const internalServerError = new SCInternalServerErrorResponse();
let validationError: SCValidationErrorResponse;
let internalServerError: SCInternalServerErrorResponse;
beforeEach(function () {
app = express();
@@ -64,6 +64,9 @@ describe('Create route', async function () {
handler = (_request, _app) => {
return Promise.resolve(bodySuccess);
};
validationError = new SCValidationErrorResponse([]);
internalServerError = new SCInternalServerErrorResponse();
});
afterEach(function () {

View File

@@ -29,11 +29,19 @@ import {backendConfig} from '../../src/config.js';
describe('Search route', async function () {
// increase timeout for the suite
this.timeout(DEFAULT_TEST_TIMEOUT);
const searchRoute = new SCSearchRoute();
const multiSearchRoute = new SCMultiSearchRoute();
const syntaxError = new SCSyntaxErrorResponse('Foo Message');
const methodNotAllowedError = new SCMethodNotAllowedErrorResponse();
const tooManyRequestsError = new SCTooManyRequestsErrorResponse();
let searchRoute: SCSearchRoute;
let multiSearchRoute: SCMultiSearchRoute;
let syntaxError: SCSyntaxErrorResponse;
let methodNotAllowedError: SCMethodNotAllowedErrorResponse;
let tooManyRequestsError: SCTooManyRequestsErrorResponse;
before(function () {
searchRoute = new SCSearchRoute();
multiSearchRoute = new SCMultiSearchRoute();
syntaxError = new SCSyntaxErrorResponse('Foo Message');
methodNotAllowedError = new SCMethodNotAllowedErrorResponse();
tooManyRequestsError = new SCTooManyRequestsErrorResponse();
});
it('should reject GET, PUT with a valid search query', async function () {
// const expectedParams = JSON.parse(JSON.stringify(defaultParams));

View File

@@ -13,23 +13,25 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {SCThingUpdateRoute} from '@openstapps/core';
import {SCBook, SCThingUpdateRoute} from '@openstapps/core';
import chaiAsPromised from 'chai-as-promised';
import {bulkStorageMock, DEFAULT_TEST_TIMEOUT} from '../common.js';
import {expect, use} from 'chai';
import {testApp} from '../tests-setup.js';
import {readFile} from 'fs/promises';
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' assert {type: 'json'};
use(chaiAsPromised);
const book = JSON.parse(
await readFile('node_modules/@openstapps/core/test/resources/indexable/Book.1.json', 'utf8'),
).instance;
const book = bookFile.instance as SCBook;
describe('Thing update route', async function () {
// increase timeout for the suite
this.timeout(DEFAULT_TEST_TIMEOUT);
const thingUpdateRoute = new SCThingUpdateRoute();
let thingUpdateRoute: SCThingUpdateRoute;
before(function () {
thingUpdateRoute = new SCThingUpdateRoute();
});
it('should update a thing', async function () {
const thingUpdateRouteurlPath = thingUpdateRoute.urlPath

View File

@@ -39,7 +39,6 @@ import {Elasticsearch} from '../../../src/storage/elasticsearch/elasticsearch.js
import {bulk, DEFAULT_TEST_TIMEOUT, getTransport, getIndex} from '../../common.js';
import fs from 'fs';
import {backendConfig} from '../../../src/config.js';
import {readFile} from 'fs/promises';
import {
ACTIVE_INDICES_ALIAS,
getIndexUID,
@@ -50,6 +49,11 @@ import {
} from '../../../src/storage/elasticsearch/util/index.js';
import cron from 'node-cron';
import {query} from './query.js';
import messageFile from '@openstapps/core/test/resources/indexable/Message.1.json' assert {type: 'json'};
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' assert {type: 'json'};
const message = messageFile.instance as SCMessage;
const book = bookFile.instance as SCBook;
use(chaiAsPromised);
@@ -60,13 +64,6 @@ function searchResponse<T>(...hits: SearchHit<T>[]): SearchResponse<T> {
return {hits: {hits}, took: 0, timed_out: false, _shards: {total: 1, failed: 0, successful: 1}};
}
const message = JSON.parse(
await readFile('node_modules/@openstapps/core/test/resources/indexable/Message.1.json', 'utf8'),
);
const book = JSON.parse(
await readFile('node_modules/@openstapps/core/test/resources/indexable/Book.1.json', 'utf8'),
);
describe('Elasticsearch', function () {
// increase timeout for the suite
this.timeout(DEFAULT_TEST_TIMEOUT);
@@ -74,8 +71,15 @@ describe('Elasticsearch', function () {
before(function () {
// eslint-disable-next-line no-console
console.log('before');
sandbox.stub(fs, 'readFileSync').returns('{}');
sandbox.stub(backendConfig.internal.boostings.default[0], 'fields').value({
'academicTerms.acronym': {
'SS 2023': 1.05,
'WS 2023/24': 1.1,
'SoSe 2023': 1.05,
'WiSe 2023/24': 1.1,
},
});
});
after(function () {
sandbox.restore();
@@ -445,7 +449,7 @@ describe('Elasticsearch', function () {
_id: '',
_index: '',
_score: 0,
_source: message as SCMessage,
_source: message,
};
sandbox.stub(es.client, 'search').resolves(searchResponse(foundObject));
@@ -475,7 +479,7 @@ describe('Elasticsearch', function () {
const object: SearchHit<SCMessage> = {
_id: '',
_index: oldIndex,
_source: message as SCMessage,
_source: message,
};
sandbox.stub(es.client, 'search').resolves(searchResponse<SCMessage>(object));
sandbox.stub(es, 'prepareBulkWrite').resolves(index);
@@ -489,7 +493,7 @@ describe('Elasticsearch', function () {
sandbox.stub(es.client, 'create').resolves({result: 'not_found'} as CreateResponse);
await es.init();
return expect(es.post(message as SCMessage, bulk)).to.rejectedWith('creation');
return expect(es.post(message, bulk)).to.rejectedWith('creation');
});
it('should create a new object', async function () {
@@ -502,7 +506,7 @@ describe('Elasticsearch', function () {
});
await es.init();
await es.post(message as SCMessage, bulk);
await es.post(message, bulk);
expect(createStub.called).to.be.true;
expect(caughtParameter.document).to.be.eql({
@@ -527,7 +531,7 @@ describe('Elasticsearch', function () {
_id: '',
_index: getIndex(),
_score: 0,
_source: message as SCMessage,
_source: message,
};
sandbox.stub(es.client, 'search').resolves(searchResponse());
@@ -541,7 +545,7 @@ describe('Elasticsearch', function () {
_id: '',
_index: getIndex(),
_score: 0,
_source: message as SCMessage,
_source: message,
};
sandbox.stub(es.client, 'search').resolves(searchResponse(object));
// @ts-expect-error unused
@@ -564,13 +568,13 @@ describe('Elasticsearch', function () {
_id: '123',
_index: getIndex(),
_score: 0,
_source: message as SCMessage,
_source: message,
};
const objectBook: SearchHit<SCBook> = {
_id: '321',
_index: getIndex(),
_score: 0,
_source: book as SCBook,
_source: book,
};
const fakeEsAggregations = {
'@all': {

View File

@@ -2,7 +2,7 @@
"extends": "@openstapps/tsconfig",
"compilerOptions": {
"resolveJsonModule": true,
"useUnknownInCatchVariables": false,
"allowJs": true
}
"useUnknownInCatchVariables": false
},
"exclude": ["lib", "app.js"]
}

View File

@@ -1,5 +1,11 @@
# @openstapps/database
## 3.2.0
### Patch Changes
- 689ac68b: pin alpine version to 3.18 and add healthchecks
## 3.0.0
### Patch Changes

View File

@@ -14,4 +14,6 @@ RUN chown elasticsearch:elasticsearch config/elasticsearch.yml
USER elasticsearch
HEALTHCHECK --interval=10s --timeout=10s --start-period=60s --retries=12 CMD curl --fail -s http://localhost:9200/ >/dev/null || exit 1
CMD ["/usr/share/elasticsearch/bin/elasticsearch"]

View File

@@ -3,3 +3,4 @@ discovery.type: "single-node"
cluster.routing.allocation.disk.threshold_enabled: false
network.bind_host: 0.0.0.0
xpack.security.enabled: false
ingest.geoip.downloader.enabled: false

View File

@@ -1,6 +1,6 @@
{
"name": "@openstapps/database",
"version": "3.0.0",
"version": "3.2.0",
"private": true,
"files": [
"config",

View File

@@ -16,7 +16,7 @@
// ESM is not supported, and cts is not detected, so we use type-checked cjs instead.
/** @type {import('../src/common').ConfigFile} */
const configFile = {
module.exports = {
activeVersions: ['1\\.0\\.\\d+', '2\\.0\\.\\d+'],
hiddenRoutes: ['/bulk'],
logFormat: 'default',
@@ -31,5 +31,3 @@ const configFile = {
dhparam: '/etc/nginx/certs/dhparam.pem',
},
};
export default configFile;

View File

@@ -50,8 +50,8 @@
"dockerode": "3.3.5",
"is-cidr": "4.0.2",
"mustache": "4.2.0",
"semver": "7.3.8",
"typescript": "5.1.6"
"semver": "7.6.0",
"typescript": "5.4.2"
},
"devDependencies": {
"@openstapps/api-cli": "workspace:*",
@@ -65,7 +65,7 @@
"@types/mustache": "4.2.2",
"@types/node": "18.15.3",
"@types/proxyquire": "1.3.28",
"@types/semver": "7.3.13",
"@types/semver": "7.5.8",
"@types/sha1": "1.1.3",
"@types/sinon": "10.0.14",
"@types/sinon-chai": "3.2.9",
@@ -75,7 +75,7 @@
"mocha-junit-reporter": "2.2.0",
"sinon": "15.0.4",
"sinon-chai": "3.7.0",
"ts-node": "10.9.1",
"ts-node": "10.9.2",
"tsup": "6.7.0"
},
"tsup": {

View File

@@ -1,4 +1,4 @@
{
"extends": "@openstapps/tsconfig",
"exclude": ["./config/", "./lib/"]
"exclude": ["config", "lib", "app.js"]
}

View File

@@ -5,6 +5,7 @@
<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"/>
<item title="job postings" title.de="Jobangebote" icon="work" route="/jobs"/>
</group>
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>

View File

@@ -5,6 +5,7 @@
<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"/>
<item title="job postings" title.de="Jobangebote" icon="work" route="/jobs"/>
</group>
<group title="canteen" title.de="Mensa" icon="local_cafe" route="/canteen"/>
<group title="campus map" title.de="Campus Karte" icon="map" route="/map"/>

View File

@@ -1,4 +1,3 @@
// @ts-check
const fs = require("fs");
const path = require("node:path");
const child_process = require("child_process");

View File

@@ -1,4 +1,3 @@
// @ts-check
"use strict"
const rule = require('./copyright-header-rule')

View File

@@ -1,5 +1,3 @@
// @ts-check
/** @type {import('eslint').Linter.Config} */
const config = {
root: true,

View File

@@ -18,16 +18,15 @@
"devDependencies": {
"@openstapps/tsconfig": "workspace:*",
"@types/node": "18.15.3",
"eslint": "8.43.0",
"typescript": "5.1.6"
"eslint": "8.57.0",
"typescript": "5.4.2"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"eslint": "8.43.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-jsdoc": "46.4.2",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-unicorn": "47.0.0"
"@typescript-eslint/eslint-plugin": "7.2.0",
"@typescript-eslint/parser": "7.2.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jsdoc": "48.2.1",
"eslint-plugin-unicorn": "51.0.1"
}
}

View File

@@ -1,5 +1,11 @@
# @openstapps/prettier-config
## 3.2.0
### Patch Changes
- dbb55850: Update Prettier to 3.1.1
## 3.0.0
### Major Changes
@@ -30,7 +36,7 @@
```js
#!/usr/bin/env node
import './lib/app.js';
import "./lib/app.js";
```
- 64caebaf: Migrate to ESM
@@ -69,11 +75,14 @@
- 64caebaf: Migrated changelogs to changeset format
```js
import fs from 'fs';
import fs from "fs";
const path = 'packages/logger/CHANGELOG.md';
const path = "packages/logger/CHANGELOG.md";
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
fs.writeFileSync(
path,
fs.readFileSync(path, "utf8").replace(/^#+\s+\[/gm, "## ["),
);
```
- 98546a97: Migrate away from @openstapps/configuration
@@ -115,7 +124,7 @@
```js
#!/usr/bin/env node
import './lib/app.js';
import "./lib/app.js";
```
- 64caebaf: Migrate to ESM
@@ -154,11 +163,14 @@
- 64caebaf: Migrated changelogs to changeset format
```js
import fs from 'fs';
import fs from "fs";
const path = 'packages/logger/CHANGELOG.md';
const path = "packages/logger/CHANGELOG.md";
fs.writeFileSync(path, fs.readFileSync(path, 'utf8').replace(/^#+\s+\[/gm, '## ['));
fs.writeFileSync(
path,
fs.readFileSync(path, "utf8").replace(/^#+\s+\[/gm, "## ["),
);
```
- 98546a97: Migrate away from @openstapps/configuration

View File

@@ -0,0 +1,15 @@
/** @type {import('prettier').Config} */
const config = {
tabWidth: 2,
printWidth: 110,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'consistent',
trailingComma: 'all',
bracketSpacing: false,
arrowParens: 'avoid',
endOfLine: 'lf'
}
export default config;

View File

@@ -1,13 +0,0 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"tabWidth": 2,
"printWidth": 110,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "consistent",
"trailingComma": "all",
"bracketSpacing": false,
"arrowParens": "avoid",
"endOfLine": "lf"
}

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/prettier-config",
"description": "StApps Prettier Config",
"version": "3.0.0",
"version": "3.2.0",
"type": "module",
"license": "GPL-3.0-only",
"repository": "git@gitlab.com:openstapps/prettier-config.git",
@@ -9,16 +9,19 @@
"contributors": [
"Rainer Killinger <mail-openstapps@killinger.co>"
],
"main": "index.json",
"main": "index.js",
"files": [
"index.json",
"index.js",
"CHANGELOG.md",
"README.md"
],
"scripts": {
"test": "npx prettier --config index.json --check \"test/*.js\""
"test": "prettier --config index.js --check \"test/*.js\""
},
"devDependencies": {
"prettier": "3.1.1"
},
"peerDependencies": {
"prettier": "2.8.6"
"prettier": "3.1.1"
}
}

View File

@@ -43,8 +43,8 @@
"@openstapps/logger": "workspace:*",
"@slack/web-api": "6.8.1",
"commander": "10.0.0",
"date-fns": "2.30.0",
"glob": "10.2.7",
"date-fns": "3.6.0",
"glob": "10.3.10",
"mustache": "4.2.0"
},
"devDependencies": {
@@ -53,7 +53,7 @@
"@openstapps/tsconfig": "workspace:*",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
"@types/glob": "8.0.1",
"@types/glob": "8.1.0",
"@types/mocha": "10.0.1",
"@types/mustache": "4.2.2",
"@types/node": "18.15.3",
@@ -63,9 +63,9 @@
"chai-as-promised": "7.1.1",
"mocha": "10.2.0",
"mocha-junit-reporter": "2.2.0",
"ts-node": "10.9.1",
"ts-node": "10.9.2",
"tsup": "6.7.0",
"typescript": "5.1.6"
"typescript": "5.4.2"
},
"tsup": {
"entry": [

View File

@@ -1,3 +1,4 @@
{
"extends": "@openstapps/tsconfig"
"extends": "@openstapps/tsconfig",
"exclude": ["lib", "app.js"]
}

View File

@@ -14,6 +14,7 @@
"noFallthroughCasesInSwitch": true,
"isolatedModules": true,
"allowJs": true,
"checkJs": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": true,

View File

@@ -1,5 +1,30 @@
# @openstapps/minimal-connector
## 3.2.0
### Patch Changes
- Updated dependencies [912ae422]
- @openstapps/core@4.0.0
- @openstapps/api@4.0.0
- @openstapps/logger@3.0.0
## 3.1.1
### Patch Changes
- Updated dependencies
- @openstapps/api@3.1.1
- @openstapps/core@3.1.1
## 3.1.0
### Patch Changes
- Updated dependencies [06b8ca10]
- @openstapps/core@3.1.0
- @openstapps/api@3.1.0
## 3.0.0
### Major Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/minimal-connector",
"description": "This is a minimal connector which serves as an example",
"version": "3.0.0",
"version": "3.2.0",
"private": true,
"type": "module",
"license": "GPL-3.0-only",
@@ -53,9 +53,9 @@
"mocha": "10.2.0",
"mocha-junit-reporter": "2.2.0",
"nock": "13.3.1",
"ts-node": "10.9.1",
"ts-node": "10.9.2",
"tsup": "6.7.0",
"typescript": "5.1.6"
"typescript": "5.4.2"
},
"tsup": {
"entry": [

View File

@@ -51,7 +51,7 @@ export class MinimalConnector extends Connector<SCMessage> {
protected async fetchItems(): Promise<SCMessage[]> {
return [
{
audiences: ['students', 'employees'],
audiences: ['students', 'employees', 'guests'],
categories: [],
description: 'Some description 1',
messageBody: 'Some message 1',
@@ -61,7 +61,7 @@ export class MinimalConnector extends Connector<SCMessage> {
uid: createUUID({id: 'message_1'}, this.licensePlate),
},
{
audiences: ['students', 'employees'],
audiences: ['students', 'employees', 'guests'],
categories: [],
description: 'Some description 2',
messageBody: 'Some message 2',
@@ -71,7 +71,7 @@ export class MinimalConnector extends Connector<SCMessage> {
uid: '', // see Connetor.getItems()
},
{
audiences: ['students', 'employees'],
audiences: ['students', 'employees', 'guests'],
categories: [],
description: 'Some description 3',
messageBody: 'Some message 3',

View File

@@ -1,3 +1,4 @@
{
"extends": "@openstapps/tsconfig"
"extends": "@openstapps/tsconfig",
"exclude": ["lib", "app.js"]
}

View File

@@ -1,44 +1,62 @@
version: '3.7'
x-development-variables: &development-variables
NODE_ENV: "development"
ALLOW_NO_TRANSPORT: "true"
services:
database:
image: registry.gitlab.com/openstapps/openstapps/database:2.0.0
volumes:
- ./database:/usr/share/elasticsearch/data
image: registry.gitlab.com/openstapps/openstapps/database:3.0.0
# If you need persistence for debugging purposes uncomment the following lines
#volumes:
# - ./database:/usr/share/elasticsearch/data
expose:
- "9200"
- 9200
ports:
- 127.0.0.1:9200:9200
environment:
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
restart: unless-stopped
backend:
image: registry.gitlab.com/openstapps/openstapps/backend:3.0.0-next.0
image: registry.gitlab.com/openstapps/openstapps/backend:3.1.0
environment:
<<: *development-variables
ES_ADDR: "http://database:9200"
NODE_CONFIG_ENV: "elasticsearch"
ALLOW_NO_TRANSPORT: "true"
NODE_APP_INSTANCE: "f-u"
PROMETHEUS_MIDDLEWARE: "false"
expose:
- 3000
ports:
- 3000:3000
links:
- "database"
- 127.0.0.1:3000:3000
labels:
- stapps.version=1.0.0
- stapps.version=4.1.0
restart: unless-stopped
depends_on:
- database
api:
image: registry.gitlab.com/openstapps/openstapps/api:3.0.0-next.0
links:
- "backend"
- database
minimal-connector:
image: registry.gitlab.com/openstapps/minimal-connector:core-0.23
container_name: minimal-connector-0.23
command: ["http://backend:3000", "minimal-connector", "f-u"]
# api:
# image: registry.gitlab.com/openstapps/openstapps/api:3.0.0
# links:
# - backend
app:
image: registry.gitlab.com/openstapps/app/executable:core-0.23
expose:
- 8100
ports:
- 8100:8100
# minimal-connector:
# image: registry.gitlab.com/openstapps/minimal-connector:core-0.23
# container_name: minimal-connector-0.23
# command: ["http://backend:3000", "minimal-connector", "f-u"]
# app:
# image: registry.gitlab.com/openstapps/app/executable:core-0.23
# expose:
# - 8100
# ports:
# - 8100:8100

View File

@@ -1,5 +1,34 @@
# @openstapps/minimal-plugin
## 3.2.0
### Patch Changes
- Updated dependencies [912ae422]
- @openstapps/core@4.0.0
- @openstapps/api@4.0.0
- @openstapps/api-plugin@4.0.0
- @openstapps/core-tools@3.0.0
- @openstapps/logger@3.0.0
## 3.1.1
### Patch Changes
- Updated dependencies
- @openstapps/api@3.1.1
- @openstapps/api-plugin@3.1.1
- @openstapps/core@3.1.1
## 3.1.0
### Patch Changes
- Updated dependencies [06b8ca10]
- @openstapps/core@3.1.0
- @openstapps/api@3.1.0
- @openstapps/api-plugin@3.1.0
## 3.0.0
### Major Changes

View File

@@ -1,7 +1,7 @@
{
"name": "@openstapps/minimal-plugin",
"description": "Minimal Plugin",
"version": "3.0.0",
"version": "3.2.0",
"private": true,
"type": "module",
"license": "GPL-3.0-only",
@@ -35,7 +35,7 @@
"@openstapps/logger": "workspace:*",
"commander": "10.0.0",
"express": "4.18.2",
"ts-node": "10.9.1"
"ts-node": "10.9.2"
},
"devDependencies": {
"@openstapps/eslint-config": "workspace:*",
@@ -44,7 +44,7 @@
"@types/express": "4.17.17",
"@types/node": "18.15.3",
"tsup": "6.7.0",
"typescript": "5.1.6"
"typescript": "5.4.2"
},
"tsup": {
"entry": [

View File

@@ -1,3 +1,4 @@
{
"extends": "@openstapps/tsconfig"
"extends": "@openstapps/tsconfig",
"exclude": ["lib", "app.js"]
}

40
flake.lock generated
View File

@@ -1,12 +1,30 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1689752456,
"narHash": "sha256-VOChdECcEI8ixz8QY+YC4JaNEFwQd1V8bA0G4B28Ki0=",
"lastModified": 1701626906,
"narHash": "sha256-ugr1QyzzwNk505ICE4VMQzonHQ9QS5W33xF2FXzFQ00=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7f256d7da238cb627ef189d56ed590739f42f13b",
"rev": "0c6d8c783336a59f4c59d4a6daed6ab269c4b361",
"type": "github"
},
"original": {
@@ -18,8 +36,24 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

142
flake.nix
View File

@@ -1,77 +1,75 @@
{
description = "A Nix-flake-based development environment for OpenStApps";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
buildToolsVersion = "30.0.3";
overlays = [
(final: prev: rec {
nodejs = prev.nodejs-18_x;
pnpm = prev.nodePackages.pnpm;
chrome = prev.google-chrome;
firefox = prev.firefox;
webkit = prev.epiphany; # Safari-ish browser
android = prev.androidenv.composeAndroidPackages {
buildToolsVersions = [ "${buildToolsVersion}" ];
platformVersions = [ "32" ];
};
cypress = prev.cypress.overrideAttrs(cyPrev: rec {
version = "13.2.0";
src = prev.fetchzip {
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
hash = "sha256-9o0nprGcJhudS1LNm+T7Vf0Dwd1RBauYKI+w1FBQ3ZM=";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}: let
aapt2buildToolsVersion = "33.0.2";
in
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: rec {
fontMin = prev.python311.withPackages (ps: with ps; [brotli fonttools] ++ (with fonttools.optional-dependencies; [woff]));
android = prev.androidenv.composeAndroidPackages {
buildToolsVersions = ["30.0.3" aapt2buildToolsVersion];
platformVersions = ["33"];
};
});
})
];
# TODO: aarch64-linux, x68_64-darwin, aarch64-darwin
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs {
inherit overlays system;
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
cypress = prev.cypress.overrideAttrs (cyPrev: rec {
version = "13.2.0";
src = prev.fetchzip {
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
hash = "sha256-9o0nprGcJhudS1LNm+T7Vf0Dwd1RBauYKI+w1FBQ3ZM=";
};
});
})
];
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
});
in
{
devShells = forEachSupportedSystem ({ pkgs }:
let
python = (pkgs.python311.withPackages(ps: with ps; [ brotli fonttools ] ++ (with fonttools.optional-dependencies; [ ufo lxml unicode woff ])));
in
{
default = (pkgs.buildFHSUserEnv {
name = "StApps Dev";
targetPkgs = pkgs: with pkgs; [
nodejs
pnpm
python
docker
# tools
curl
jq
# browsers
firefox
chrome
webkit
cypress
# android
jdk17
android.androidsdk
musl
];
runScript = "bash";
profile = ''
export CYPRESS_INSTALL_BINARY=0
export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress
export ANDROID_SDK_ROOT=${pkgs.android.androidsdk}/libexec/android-sdk
export ANDROID_JAVA_HOME=${pkgs.jdk.home}
export DOCKER_HOST=unix:///run/user/1000/docker.sock
{ dockerd-rootless & } 2>/dev/null
'';
}).env;
});
};
};
androidFhs = pkgs.buildFHSUserEnv {
name = "android-env";
targetPkgs = pkgs: with pkgs; [];
runScript = "bash";
profile = ''
export ALLOW_NINJA_ENV=true
export USE_CCACHE=1
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
'';
};
in {
devShell = pkgs.mkShell rec {
nativeBuildInputs = [androidFhs];
buildInputs = with pkgs; [
nodejs-18_x
nodePackages.pnpm
# tools
curl
jq
fontMin
# browsers
firefox
google-chrome
epiphany # Safari-ish browser
cypress
# android
jdk17
android.androidsdk
musl
];
ANDROID_JAVA_HOME = "${pkgs.jdk.home}";
ANDROID_SDK_ROOT = "${pkgs.android.androidsdk}/libexec/android-sdk";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/${aapt2buildToolsVersion}/aapt2";
CYPRESS_INSTALL_BINARY = "0";
CYPRESS_RUN_BINARY = "${pkgs.cypress}/bin/Cypress";
};
});
}

View File

@@ -5,10 +5,4 @@
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not kaios 2.5
not op_mini all
not IE 9-11
> 0.5% in DE and last 2 major versions and supports es6 and not dead

View File

@@ -46,6 +46,7 @@
"unicorn/no-nested-ternary": "off",
"unicorn/better-regex": "off",
"unicorn/no-non-null-assertion": "off",
"unicorn/consistent-function-scoping": ["error", {"checkArrowFunctions": false}],
"jsdoc/no-types": "error",
"jsdoc/require-param": "off",
"jsdoc/require-param-description": "error",

View File

@@ -37,6 +37,7 @@ resources/*/icon/
resources/*/splash/
android/app/src/main/res/**/*.png
ios/App/App/Assets.xcassets/**/*.png
AndroidManifest.xml.orig
.DS_Store
Thumbs.db

View File

@@ -1,5 +1,52 @@
# @openstapps/app
## 3.2.0
### Patch Changes
- 689ac68b: pin alpine version to 3.18 and add healthchecks
- Updated dependencies [912ae422]
- @openstapps/core@4.0.0
- @openstapps/api@4.0.0
- @openstapps/collection-utils@3.0.0
## 3.1.2
### Patch Changes
- Fix for Android users not being able to log in
## 3.1.1
### Patch Changes
- Fix version history offered by backend
- Updated dependencies
- @openstapps/api@3.1.1
- @openstapps/core@3.1.1
## 3.1.1
### Patch Changes
- last minute deployment changes
## 3.1.0
### Minor Changes
- 06b8ca10: Add job portal feature
- 066e3744: Update to Capacitor 5.x
### Patch Changes
- 066e3744: Update logo flow to use capacitor-assets (single asset)
- 066e3744: Replace NavigationBar/StatusBar plugins with native color setting
- 066e3744: Hide splash screen only when app is ready
- Updated dependencies [06b8ca10]
- @openstapps/core@3.1.0
- @openstapps/api@3.1.0
## 3.0.0
### Major Changes

View File

@@ -1,7 +1,7 @@
# Creates a docker image with only the app as an executable unit
# Dependencies need to be installed beforehand
# Needs to be build beforehand
FROM node:18-alpine
FROM node:18-alpine3.18
WORKDIR /app
COPY www/ /app/www

View File

@@ -52,7 +52,7 @@ All the npm scripts are defined in `package.json` [file](package.json). It is re
## Most useful commands
## Editing the Ionic Database from the browser
### Editing the Ionic Database from the browser
Add the following function using the browser console
@@ -90,6 +90,19 @@ You'll need to run _Chromium_ using
pnpm chromium:no-cors
```
### Help, I can't log in!
Login services will often block hosts not coming from the production
server. You can circumvent this locally by using the `:virtual-host`
scripts:
```shell
# Start the dev server on mobile.app.uni-frankfurt.de
pnpm start:virtual-host
# Run chromium with flags that redirect mobile.app.uni-frankfurt.de to localhost:8100
pnpm chromium:virtual-host
```
### Running the app
Install the npm packages needed for running the app (as for any other node project which uses npm):

View File

@@ -1,6 +1,7 @@
apply plugin: 'com.android.application'
android {
namespace "de.anyschool.app"
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "de.anyschool.app"

View File

@@ -2,8 +2,8 @@
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
@@ -23,8 +23,6 @@ dependencies {
implementation project(':capacitor-preferences')
implementation project(':capacitor-share')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation project(':hugotomazi-capacitor-navigation-bar')
implementation project(':transistorsoft-capacitor-background-fetch')
implementation project(':capacitor-secure-storage-plugin')

View File

@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.anyschool.app">
<?xml version='1.0' encoding='utf-8' ?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
@@ -10,16 +8,14 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name="de.anyschool.app.MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout"
android:exported="true"
android:label="@string/title_activity_main"
android:launchMode="singleTask"
android:name="de.anyschool.app.MainActivity"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -37,20 +33,14 @@
<data android:host="@string/app_host" android:scheme="https" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
android:grantUriPermissions="true"
android:name="androidx.core.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

View File

@@ -55,14 +55,6 @@
"pkg": "@capacitor/splash-screen",
"classpath": "com.capacitorjs.plugins.splashscreen.SplashScreenPlugin"
},
{
"pkg": "@capacitor/status-bar",
"classpath": "com.capacitorjs.plugins.statusbar.StatusBarPlugin"
},
{
"pkg": "@hugotomazi/capacitor-navigation-bar",
"classpath": "br.com.tombus.capacitor.plugin.navigationbar.NavigationBarPlugin"
},
{
"pkg": "@transistorsoft/capacitor-background-fetch",
"classpath": "com.transistorsoft.bgfetch.capacitor.BackgroundFetchPlugin"

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -1,34 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

View File

@@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

View File

@@ -0,0 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1024"
android:viewportHeight="1024">
<group android:scaleX="0.649"
android:scaleY="0.649"
android:translateX="176.63525"
android:translateY="179.712">
<path
android:pathData="M272.4,232.1L483.6,232.1A38,38 0,0 1,521.6 270.2L521.6,481.4A38,38 0,0 1,483.6 519.4L272.4,519.4A38,38 0,0 1,234.4 481.4L234.4,270.2A38,38 0,0 1,272.4 232.1z"
android:strokeWidth="0.839386"
android:fillColor="#00b5cc"/>
<path
android:pathData="M584.2,402.8L662,402.8A19.4,19.4 0,0 1,681.4 422.2L681.4,499.9A19.4,19.4 0,0 1,662 519.4L584.2,519.4A19.4,19.4 0,0 1,564.8 499.9L564.8,422.2A19.4,19.4 0,0 1,584.2 402.8z"
android:strokeWidth="0.842212"
android:fillColor="#3be40b"/>
<path
android:pathData="M591.8,562.6L769.3,562.6A27,27 0,0 1,796.3 589.6L796.3,767A27,27 0,0 1,769.3 794.1L591.8,794.1A27,27 0,0 1,564.8 767L564.8,589.6A27,27 0,0 1,591.8 562.6z"
android:strokeWidth="0.832623"
android:fillColor="#c90e20"/>
<path
android:pathData="M371.2,562.6L496.3,562.6A25.3,25.3 0,0 1,521.6 587.9L521.6,713A25.3,25.3 0,0 1,496.3 738.3L371.2,738.3A25.3,25.3 0,0 1,345.9 713L345.9,587.9A25.3,25.3 0,0 1,371.2 562.6z"
android:strokeWidth="0.846446"
android:fillColor="#e4a20b"/>
</group>
</vector>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorBackground">#000</color>
</resources>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
<item name="android:windowBackground">@color/colorPrimary</item>
<item name="android:navigationBarColor">@color/colorBackground</item>
</style>
</resources>

Some files were not shown because too many files have changed in this diff Show More