mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-10-20 16:32:16 +00:00
Compare commits
66
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
991fab373c | ||
|
|
3547ad19f6 | ||
|
|
d5fbd8654c | ||
|
|
c9ada93f87 | ||
|
|
6d782ecb10 | ||
|
|
1cc3ffedf8 | ||
|
|
05a0525320 | ||
|
|
3c08704345 | ||
|
|
6b17416d61 | ||
|
|
019f80134d | ||
|
|
ba728d551b | ||
|
|
c6dfbd6add | ||
|
|
27877c6607 | ||
|
|
f552586b50 | ||
|
|
4c3f3ef14c | ||
|
|
4c5d529589 | ||
|
|
09ad903a30 | ||
|
|
a482f0bf0b | ||
|
|
da81e06bc2 | ||
|
|
3efd5d4b31 | ||
|
|
3ee036c85e | ||
|
|
8cec8bacbe | ||
|
|
790b10e57b | ||
|
|
2a5c8724b1 | ||
|
|
4b145f3b2f | ||
|
|
2438873fd0 | ||
|
|
fbb42042bf | ||
|
|
209469c6a7 | ||
|
|
736950e064 | ||
|
|
090ec17ccb | ||
|
|
66ae7a39a1 | ||
|
|
58b4822265 | ||
|
|
9026c88fac | ||
|
|
1f7b010dc9 | ||
|
|
01c9b63eb9 | ||
|
|
b109100257 | ||
|
|
5f48bca962 | ||
|
|
d1709c3353 | ||
|
|
65facc131a | ||
|
|
a1de793993 | ||
|
|
592e655990 | ||
|
|
5d0d2dd136 | ||
|
|
f5582e91fe | ||
|
|
2c7bed0b8b | ||
|
|
87d0af5a39 | ||
|
|
8ccbfac0b1 | ||
|
|
8550bf976b | ||
|
|
86004881b0 | ||
|
|
3d19fc87e3 | ||
|
|
80bcdad851 | ||
|
|
afd1c8d87e | ||
|
|
6941f83b8f | ||
|
|
3a274a3a7f | ||
|
|
5a48342a8d | ||
|
|
6b06de4019 | ||
|
|
c5c9bcf433 | ||
|
|
b40ba7ad63 | ||
|
|
362f6adf07 | ||
|
|
bbd6b0f874 | ||
|
|
b1a9ba44d0 | ||
|
|
bee38d4a59 | ||
|
|
a5c5c31d09 | ||
|
|
c8e290200f | ||
|
|
ef4e1f8ded | ||
|
|
5759a1cbb1 | ||
|
|
b8ac30b9d0 |
+2
-1
@@ -98,7 +98,8 @@ typings/
|
||||
|
||||
# ignore ide files
|
||||
.idea
|
||||
.vscode
|
||||
.vscode?*
|
||||
!.vscode/launch.json
|
||||
|
||||
# ignore lib
|
||||
lib
|
||||
|
||||
+8
-23
@@ -21,13 +21,7 @@ include:
|
||||
- local: /.gitlab/publishing.gitlab-ci.yml
|
||||
|
||||
variables:
|
||||
TURBO_CACHE_BYPASS:
|
||||
value: ''
|
||||
options:
|
||||
- '--force'
|
||||
- '--no-cache'
|
||||
- ''
|
||||
description: Bypass turbo cache
|
||||
TURBO_CACHE_BYPASS: "--force --no-cache"
|
||||
|
||||
default:
|
||||
image: registry.gitlab.com/openstapps/openstapps/node-builder
|
||||
@@ -36,10 +30,7 @@ default:
|
||||
interruptible: true
|
||||
before_script:
|
||||
- corepack enable
|
||||
- corepack prepare pnpm@latest-8 --activate
|
||||
- echo TURBO_API=$TURBO_API >> .env.local
|
||||
- echo TURBO_TOKEN=$TURBO_TOKEN >> .env.local
|
||||
- echo TURBO_TEAM=$TURBO_TEAM >> .env.local
|
||||
- corepack prepare pnpm@latest-10 --activate
|
||||
- pnpm config set store-dir .pnpm-store
|
||||
cache: &pnpm_cache
|
||||
key:
|
||||
@@ -63,13 +54,13 @@ build:
|
||||
# - pnpm i --prefer-offline
|
||||
# - pnpm build:full:skip || pnpm i -r --prefer-offline
|
||||
- pnpm install
|
||||
# TODO: whats the benifit for CI? something doesn't work with git here...
|
||||
# TODO: whats the benefit for CI? something doesn't work with git here...
|
||||
# "🦋 error Error: Failed to find where HEAD diverged from master. Does master exist?"
|
||||
# - pnpm changeset:status
|
||||
- pnpm build:full $TURBO_CACHE_BYPASS
|
||||
- .gitlab/ci/enableGitlabReviewToolbar.sh frontend/app/www/index.html "$CI_PROJECT_ID" "$CI_OPEN_MERGE_REQUESTS"
|
||||
- cp frontend/app/www/index.html frontend/app/www/200.html
|
||||
- pnpm dlx surge -p frontend/app/www -d https://$CI_PROJECT_NAME-$DEPLOY_ID.surge.sh/
|
||||
- .gitlab/ci/enableGitlabReviewToolbar.sh frontend/app/www/browser/index.html "$CI_PROJECT_ID" "$CI_OPEN_MERGE_REQUESTS"
|
||||
- cp frontend/app/www/browser/index.html frontend/app/www/browser/200.html
|
||||
- pnpm dlx surge -p frontend/app/www/browser -d https://$CI_PROJECT_NAME-$DEPLOY_ID.surge.sh/
|
||||
cache:
|
||||
<<: *pnpm_cache
|
||||
policy: pull-push
|
||||
@@ -105,13 +96,7 @@ unit:
|
||||
stage: test
|
||||
needs: ['build']
|
||||
script:
|
||||
# - pnpm config set recursive-install false
|
||||
# - pnpm i --prefer-offline
|
||||
# - pnpm test:skip || pnpm i -r --prefer-offline
|
||||
- pnpm install
|
||||
- cd node_modules/.pnpm/re2*/node_modules/re2
|
||||
- npm run install
|
||||
- cd $CI_PROJECT_DIR
|
||||
- pnpm test $TURBO_CACHE_BYPASS
|
||||
coverage: '/Statements[^:]*\:[^:]*\s+([\d\.]+)%/'
|
||||
artifacts:
|
||||
@@ -135,6 +120,6 @@ audit:
|
||||
script:
|
||||
- pnpm audit --prod --audit-level critical
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH == 'main'
|
||||
allow_failure: false
|
||||
- !reference [.limit_pipelines, rules]
|
||||
# - if: $CI_COMMIT_BRANCH == 'main'
|
||||
# allow_failure: false
|
||||
|
||||
@@ -27,7 +27,7 @@ publish image:
|
||||
- tags
|
||||
needs: ['deploy']
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:v1.12.1-debug
|
||||
name: gcr.io/kaniko-project/executor:v1.24.0-debug
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- >
|
||||
|
||||
@@ -27,6 +27,7 @@ const config = {
|
||||
'bin',
|
||||
'files',
|
||||
'engines',
|
||||
'packageManager',
|
||||
'scripts',
|
||||
'dependencies',
|
||||
'devDependencies',
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
nodejs 18.19.1
|
||||
pnpm 8.15.4
|
||||
python 3.11.5
|
||||
nodejs 22.16.0
|
||||
pnpm 10.12.3
|
||||
python 3.11.5
|
||||
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Launch Chrome",
|
||||
"request": "launch",
|
||||
"type": "chrome",
|
||||
"url": "http://localhost:8100",
|
||||
"webRoot": "${workspaceFolder}/frontend/app/www"
|
||||
},
|
||||
{
|
||||
"type":"node",
|
||||
"request": "launch",
|
||||
"name": "Run mocha for nodejs workspace",
|
||||
"runtimeExecutable": "${fileDirname}/../node_modules/.bin/c8",
|
||||
"cwd": "${fileDirname}/../",
|
||||
"runtimeArgs": ["--config", "${workspaceFolder}/.c8rc.json", "${fileDirname}/../node_modules/.bin/mocha", "--exit", "--reporter", "spec"]
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -9,8 +9,8 @@ integration:
|
||||
- name: registry.gitlab.com/openstapps/openstapps/database:latest
|
||||
alias: elasticsearch
|
||||
script:
|
||||
- pnpm --filter=@openstapps/backend install
|
||||
- pnpm test:integration:backend
|
||||
- pnpm install
|
||||
- pnpm test:integration:backend --force --no-cache
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
|
||||
@@ -1,5 +1,59 @@
|
||||
# @openstapps/backend
|
||||
|
||||
## 4.0.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 019f8013: Enable ID cards and assessments using Shibboleth as identity provider
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [86004881]
|
||||
- Updated dependencies [09ad903a]
|
||||
- @openstapps/core-tools@4.0.5
|
||||
- @openstapps/core@4.0.5
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 6b06de40: Updated nodemailer dependency
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c8e29020]
|
||||
- @openstapps/core@4.0.0
|
||||
- @openstapps/core-tools@4.0.0
|
||||
- @openstapps/logger@4.0.0
|
||||
|
||||
## 3.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -29,19 +29,6 @@ const menus = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'local_library',
|
||||
route: '/hebis-search',
|
||||
title: 'library catalog',
|
||||
translations: {
|
||||
de: {
|
||||
title: 'Bibliothekskatalog',
|
||||
},
|
||||
en: {
|
||||
title: 'library catalog',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'inventory_2',
|
||||
route: '/catalog',
|
||||
@@ -112,7 +99,7 @@ const menus = [
|
||||
icon: 'school',
|
||||
items: [
|
||||
{
|
||||
icon: 'grade',
|
||||
icon: 'star',
|
||||
route: '/favorites',
|
||||
title: 'favorites',
|
||||
translations: {
|
||||
@@ -137,20 +124,6 @@ const menus = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
authProvider: 'paia',
|
||||
icon: 'badge',
|
||||
route: '/library-account',
|
||||
title: 'library account',
|
||||
translations: {
|
||||
de: {
|
||||
title: 'Bibliothekskonto',
|
||||
},
|
||||
en: {
|
||||
title: 'library account',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: 'settings',
|
||||
route: '/settings',
|
||||
|
||||
@@ -5,8 +5,8 @@ const userGroupSetting = {
|
||||
categories: ['profile'],
|
||||
defaultValue: 'students',
|
||||
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.',
|
||||
'The user group the app is going to use primarily.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
inputType: SCSettingInputType.SingleChoice,
|
||||
name: 'group',
|
||||
order: 1,
|
||||
@@ -25,7 +25,7 @@ const userGroupSetting = {
|
||||
},
|
||||
en: {
|
||||
description:
|
||||
'The user group the app is going to be used.' +
|
||||
'The user group the app is going to use primarily.' +
|
||||
' This settings for example is getting used for the predefined price category of mensa meals.',
|
||||
name: 'Group',
|
||||
values: ['students', 'employees', 'guests'],
|
||||
|
||||
@@ -13,42 +13,24 @@ const config = {
|
||||
default: {
|
||||
client: {
|
||||
clientId: '1cac3f99-33fa-4234-8438-979f07e0cdab',
|
||||
scopes: '',
|
||||
url: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0',
|
||||
scopes: 'openid profile email offline_access',
|
||||
url: 'https://idp.ub.uni-frankfurt.de/idp/profile/oidc',
|
||||
},
|
||||
endpoints: {
|
||||
authorization: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/authorize',
|
||||
endSession: 'https://cas.rz.uni-frankfurt.de/cas/logout',
|
||||
authorization: 'https://idp.ub.uni-frankfurt.de/idp/profile/oidc/authorize',
|
||||
endSession: 'https://idp.ub.uni-frankfurt.de/idp/profile/oidc/end-session',
|
||||
mapping: {
|
||||
id: '$.id',
|
||||
email: '$.attributes.mailPrimaryAddress',
|
||||
familyName: '$.attributes.sn',
|
||||
givenName: '$.attributes.givenName',
|
||||
name: '$.attributes.givenName',
|
||||
role: '$.attributes.eduPersonPrimaryAffiliation',
|
||||
studentId: '$.attributes.employeeNumber',
|
||||
},
|
||||
token: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/accessToken',
|
||||
userinfo: 'https://cas.rz.uni-frankfurt.de/cas/oauth2.0/profile',
|
||||
},
|
||||
},
|
||||
paia: {
|
||||
client: {
|
||||
clientId: '',
|
||||
scopes: '',
|
||||
url: 'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
|
||||
},
|
||||
endpoints: {
|
||||
authorization:
|
||||
'https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php',
|
||||
endSession: 'https://ubffm.hds.hebis.de/Shibboleth.sso/Logout',
|
||||
mapping: {
|
||||
id: '$.email',
|
||||
id: '$.preferred_username',
|
||||
email: '$.mailPrimaryAddress',
|
||||
familyName: '$.family_name',
|
||||
givenName: '$.given_name',
|
||||
name: '$.name',
|
||||
role: '$.type',
|
||||
role: '$.eduPersonPrimaryAffiliation',
|
||||
studentId: '$.employeeNumber',
|
||||
},
|
||||
token: 'https://hds.hebis.de/paia/auth/login',
|
||||
userinfo: 'https://hds.hebis.de/paia/core',
|
||||
token: 'https://idp.ub.uni-frankfurt.de/idp/profile/oidc/token',
|
||||
userinfo: 'https://idp.ub.uni-frankfurt.de/idp/profile/oidc/userinfo',
|
||||
revoke: 'https://idp.ub.uni-frankfurt.de/idp/profile/oauth2/revocation',
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -58,22 +40,12 @@ const config = {
|
||||
extern: {
|
||||
hisometry: {
|
||||
authProvider: 'default',
|
||||
url: 'https://his-self-service.rz.uni-frankfurt.de',
|
||||
url: 'https://his-self-service.rz.uni-frankfurt.de/v2',
|
||||
},
|
||||
daia: {
|
||||
url: 'https://daia.hebis.de/DAIA2/UB_Frankfurt',
|
||||
},
|
||||
hebisProxy: {
|
||||
url: 'https://proxy.ub.uni-frankfurt.de/login?qurl=',
|
||||
},
|
||||
paia: {
|
||||
authProvider: 'paia',
|
||||
url: 'https://hds.hebis.de/paia/core',
|
||||
},
|
||||
/** TODO: idCards: {
|
||||
idCards: {
|
||||
authProvider: 'default',
|
||||
url: 'TODO',
|
||||
} */
|
||||
url: 'https://id-cards.rz.uni-frankfurt.de/v2/id-cards',
|
||||
},
|
||||
},
|
||||
},
|
||||
versionHistory,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend",
|
||||
"description": "A reference implementation for a StApps backend",
|
||||
"version": "3.3.2",
|
||||
"version": "4.0.6",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -43,33 +43,33 @@
|
||||
"test:unit": "cross-env NODE_CONFIG_ENV=elasticsearch ALLOW_NO_TRANSPORT=true STAPPS_LOG_LEVEL=0 mocha --exit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/elasticsearch": "8.4.0",
|
||||
"@elastic/elasticsearch": "8.19.2",
|
||||
"@openstapps/core": "workspace:*",
|
||||
"@openstapps/core-tools": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"@types/body-parser": "1.19.2",
|
||||
"@types/body-parser": "1.19.6",
|
||||
"@types/cors": "2.8.13",
|
||||
"@types/express": "4.17.17",
|
||||
"@types/geojson": "1.0.6",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/node-cron": "3.0.7",
|
||||
"@types/nodemailer": "6.4.7",
|
||||
"@types/nodemailer": "8.0.2",
|
||||
"@types/promise-queue": "2.2.0",
|
||||
"@types/uuid": "8.3.4",
|
||||
"body-parser": "1.20.2",
|
||||
"body-parser": "1.20.3",
|
||||
"cors": "2.8.5",
|
||||
"cosmiconfig": "8.1.3",
|
||||
"deepmerge": "4.3.1",
|
||||
"express": "4.18.2",
|
||||
"express": "4.21.2",
|
||||
"express-prom-bundle": "6.6.0",
|
||||
"express-promise-router": "4.1.1",
|
||||
"got": "12.6.0",
|
||||
"moment": "2.30.1",
|
||||
"morgan": "1.10.0",
|
||||
"morgan": "1.10.1",
|
||||
"nock": "13.3.1",
|
||||
"node-cache": "5.1.2",
|
||||
"node-cron": "3.0.2",
|
||||
"nodemailer": "6.9.1",
|
||||
"nodemailer": "8.0.11",
|
||||
"prom-client": "14.1.1",
|
||||
"promise-queue": "2.2.5",
|
||||
"uuid": "8.3.2"
|
||||
@@ -80,27 +80,27 @@
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@testdeck/mocha": "0.3.3",
|
||||
"@types/chai": "4.3.5",
|
||||
"@types/chai-as-promised": "7.1.5",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/morgan": "1.9.4",
|
||||
"@types/chai": "4.3.20",
|
||||
"@types/chai-as-promised": "7.1.8",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/morgan": "1.9.10",
|
||||
"@types/sinon": "10.0.14",
|
||||
"@types/sinon-express-mock": "1.3.9",
|
||||
"@types/supertest": "2.0.12",
|
||||
"c8": "7.14.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"c8": "10.1.3",
|
||||
"chai": "4.5.0",
|
||||
"chai-as-promised": "7.1.2",
|
||||
"cross-env": "7.0.3",
|
||||
"get-port": "5.1.1",
|
||||
"mocha": "10.2.0",
|
||||
"mocha": "10.8.2",
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"mocked-env": "1.3.5",
|
||||
"sinon": "15.0.4",
|
||||
"sinon-express-mock": "2.2.1",
|
||||
"supertest": "6.3.3",
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "5.4.2"
|
||||
"tsup": "8.5.0",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Logger, SMTP} from '@openstapps/logger';
|
||||
import {MailOptions} from 'nodemailer/lib/sendmail-transport';
|
||||
import {SendMailOptions} from 'nodemailer';
|
||||
import Queue from 'promise-queue';
|
||||
/**
|
||||
* A queue that can send mails in serial
|
||||
@@ -36,7 +36,7 @@ export class MailQueue {
|
||||
* the transport gets ready this mails are getting pushed in to
|
||||
* the normal queue.
|
||||
*/
|
||||
dryQueue: MailOptions[];
|
||||
dryQueue: SendMailOptions[];
|
||||
|
||||
/**
|
||||
* A queue that saves mails, that are being sent in series
|
||||
@@ -68,7 +68,7 @@ export class MailQueue {
|
||||
* Adds a mail into the queue so it gets send when the queue is ready
|
||||
* @param mail Information required for sending a mail
|
||||
*/
|
||||
private async addToQueue(mail: MailOptions) {
|
||||
private async addToQueue(mail: SendMailOptions) {
|
||||
return this.queue.add<string>(() => this.transport.sendMail(mail));
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ export class MailQueue {
|
||||
* Push a mail into the queue so it gets send when the queue is ready
|
||||
* @param mail Information required for sending a mail
|
||||
*/
|
||||
public async push(mail: MailOptions) {
|
||||
public async push(mail: SendMailOptions) {
|
||||
if (this.transport.isVerified()) {
|
||||
await this.addToQueue(mail);
|
||||
} else {
|
||||
|
||||
@@ -13,12 +13,7 @@
|
||||
* 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 {
|
||||
AggregateName,
|
||||
AggregationsAggregate,
|
||||
AggregationsFiltersAggregate,
|
||||
AggregationsMultiTermsBucket,
|
||||
} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
@@ -26,16 +21,16 @@ import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
* @param aggregationResponse - aggregations response from elasticsearch
|
||||
*/
|
||||
export function parseAggregations(
|
||||
aggregationResponse: Record<AggregateName, AggregationsAggregate>,
|
||||
aggregationResponse: Record<estypes.AggregateName, estypes.AggregationsAggregate>,
|
||||
): SCFacet[] {
|
||||
const facets: SCFacet[] = [];
|
||||
|
||||
for (const aggregateName in aggregationResponse) {
|
||||
const aggregation = aggregationResponse[aggregateName] as AggregationsMultiTermsBucket;
|
||||
const aggregation = aggregationResponse[aggregateName] as estypes.AggregationsMultiTermsBucket;
|
||||
const type = aggregateName === '@all' ? {} : {onlyOnType: aggregateName as SCThingType};
|
||||
|
||||
for (const field in aggregation) {
|
||||
const fieldAggregate = aggregation[field] as AggregationsFiltersAggregate;
|
||||
const fieldAggregate = aggregation[field] as estypes.AggregationsFiltersAggregate;
|
||||
if (typeof fieldAggregate !== 'object') continue;
|
||||
|
||||
const buckets = Object.values(fieldAggregate.buckets).map(bucket => {
|
||||
|
||||
@@ -14,13 +14,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client, events} from '@elastic/elasticsearch';
|
||||
import {
|
||||
AggregateName,
|
||||
AggregationsMultiTermsBucket,
|
||||
IndicesGetAliasResponse,
|
||||
SearchHit,
|
||||
SearchResponse,
|
||||
} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCConfigFile, SCSearchQuery, SCSearchResponse, SCThings, SCUuid} from '@openstapps/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import moment from 'moment';
|
||||
@@ -113,7 +107,9 @@ export class Elasticsearch implements Database {
|
||||
/**
|
||||
* Gets a map which contains each alias and all indices that are associated with each alias
|
||||
*/
|
||||
private async cleanupDeadIndices(retryOptions: Partial<RetryOptions<IndicesGetAliasResponse>> = {}) {
|
||||
private async cleanupDeadIndices(
|
||||
retryOptions: Partial<RetryOptions<estypes.IndicesGetAliasResponse>> = {},
|
||||
) {
|
||||
const aliasResponse = await retryCatch({
|
||||
maxRetries: 10,
|
||||
retryInterval: 2000,
|
||||
@@ -147,7 +143,7 @@ export class Elasticsearch implements Database {
|
||||
* @param uid an UID to use for the search
|
||||
* @returns an elasticsearch object containing the thing
|
||||
*/
|
||||
private async getObject(uid: SCUuid): Promise<SearchHit<SCThings> | undefined> {
|
||||
private async getObject(uid: SCUuid): Promise<estypes.SearchHit<SCThings> | undefined> {
|
||||
const searchResponse = await this.client.search<SCThings>({
|
||||
body: {
|
||||
query: {
|
||||
@@ -273,7 +269,9 @@ export class Elasticsearch implements Database {
|
||||
/**
|
||||
* Initialize the elasticsearch database (call all needed methods)
|
||||
*/
|
||||
public async init(retryOptions: Partial<RetryOptions<IndicesGetAliasResponse>> = {}): Promise<void> {
|
||||
public async init(
|
||||
retryOptions: Partial<RetryOptions<estypes.IndicesGetAliasResponse>> = {},
|
||||
): Promise<void> {
|
||||
const monitoringConfiguration = this.config.internal.monitoring;
|
||||
|
||||
if (monitoringConfiguration !== undefined) {
|
||||
@@ -373,7 +371,7 @@ export class Elasticsearch implements Database {
|
||||
| undefined,
|
||||
};
|
||||
|
||||
const response: SearchResponse<SCThings> = await this.client.search({
|
||||
const response: estypes.SearchResponse<SCThings> = await this.client.search({
|
||||
aggs: aggregations,
|
||||
query: buildQuery(parameters, this.config, esConfig),
|
||||
from: parameters.from,
|
||||
@@ -394,7 +392,9 @@ export class Elasticsearch implements Database {
|
||||
facets:
|
||||
response.aggregations === undefined
|
||||
? []
|
||||
: parseAggregations(response.aggregations as Record<AggregateName, AggregationsMultiTermsBucket>),
|
||||
: parseAggregations(
|
||||
response.aggregations as Record<estypes.AggregateName, estypes.AggregationsMultiTermsBucket>,
|
||||
),
|
||||
pagination: {
|
||||
count: response.hits.hits.length,
|
||||
offset: typeof parameters.from === 'number' ? parameters.from : 0,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client} from '@elastic/elasticsearch';
|
||||
import {SearchRequest} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {
|
||||
SCMonitoringConfiguration,
|
||||
SCMonitoringLogAction,
|
||||
@@ -128,7 +128,7 @@ export async function setUp(
|
||||
|
||||
cron.schedule(trigger.executionTime, async () => {
|
||||
// execute watch (search->condition->action)
|
||||
const result = await esClient.search<SCThings>(watcher.query as SearchRequest);
|
||||
const result = await esClient.search<SCThings>(watcher.query as estypes.SearchRequest);
|
||||
|
||||
// check conditions
|
||||
const total =
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslFunctionScoreContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCBackendConfigurationSearchBoostingType} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -22,8 +22,8 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
*/
|
||||
export function buildFunctionsForBoostingTypes(
|
||||
boostingTypes: SCBackendConfigurationSearchBoostingType[],
|
||||
): QueryDslFunctionScoreContainer[] {
|
||||
const functions: QueryDslFunctionScoreContainer[] = [];
|
||||
): estypes.QueryDslFunctionScoreContainer[] {
|
||||
const functions: estypes.QueryDslFunctionScoreContainer[] = [];
|
||||
|
||||
for (const boostingForOneSCType of boostingTypes) {
|
||||
const typeFilter: QueryDslSpecificQueryContainer<'term'> = {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslFunctionScoreContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCBackendConfigurationSearchBoostingContext, SCSearchContext} from '@openstapps/core';
|
||||
import {buildFunctionsForBoostingTypes} from './boost-functions.js';
|
||||
|
||||
@@ -24,7 +24,7 @@ import {buildFunctionsForBoostingTypes} from './boost-functions.js';
|
||||
export function buildScoringFunctions(
|
||||
boostings: SCBackendConfigurationSearchBoostingContext,
|
||||
context: SCSearchContext | undefined,
|
||||
): QueryDslFunctionScoreContainer[] {
|
||||
): estypes.QueryDslFunctionScoreContainer[] {
|
||||
// default context
|
||||
let functions = buildFunctionsForBoostingTypes(boostings['default' as SCSearchContext]);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCSearchFilter} from '@openstapps/core';
|
||||
import {buildBooleanFilter} from './filters/boolean.js';
|
||||
import {buildAvailabilityFilter} from './filters/availability.js';
|
||||
@@ -26,7 +26,7 @@ import {buildValueFilter} from './filters/value.js';
|
||||
* Converts Array of Filters to elasticsearch query-syntax
|
||||
* @param filter A search filter for the retrieval of the data
|
||||
*/
|
||||
export function buildFilter(filter: SCSearchFilter): QueryDslQueryContainer {
|
||||
export function buildFilter(filter: SCSearchFilter): estypes.QueryDslQueryContainer {
|
||||
switch (filter.type) {
|
||||
case 'value': {
|
||||
return buildValueFilter(filter);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslBoolQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCSearchBooleanFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
import {buildFilter} from '../filter.js';
|
||||
@@ -22,7 +22,7 @@ import {buildFilter} from '../filter.js';
|
||||
* @param filter A search filter for the retrieval of the data
|
||||
*/
|
||||
export function buildBooleanFilter(filter: SCSearchBooleanFilter): QueryDslSpecificQueryContainer<'bool'> {
|
||||
const result: QueryDslBoolQuery = {
|
||||
const result: estypes.QueryDslBoolQuery = {
|
||||
minimum_should_match: 0,
|
||||
must: [],
|
||||
must_not: [],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslDateRangeQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCSearchDateRangeFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
export function buildDateRangeFilter(
|
||||
filter: SCSearchDateRangeFilter,
|
||||
): QueryDslSpecificQueryContainer<'range'> {
|
||||
const dateRangeObject: QueryDslDateRangeQuery = {
|
||||
const dateRangeObject: estypes.QueryDslDateRangeQuery = {
|
||||
format: filter.arguments.format,
|
||||
time_zone: filter.arguments.timeZone,
|
||||
relation: filter.arguments.relation,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslGeoDistanceQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCSearchDistanceFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
export function buildDistanceFilter(
|
||||
filter: SCSearchDistanceFilter,
|
||||
): QueryDslSpecificQueryContainer<'geo_distance'> {
|
||||
const geoObject: QueryDslGeoDistanceQuery = {
|
||||
const geoObject: estypes.QueryDslGeoDistanceQuery = {
|
||||
distance: `${filter.arguments.distance}m`,
|
||||
[`${filter.arguments.field}.point`]: {
|
||||
lat: filter.arguments.position[1],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslNumberRangeQuery} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCSearchNumericRangeFilter} from '@openstapps/core';
|
||||
import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
|
||||
@@ -23,7 +23,7 @@ import {QueryDslSpecificQueryContainer} from '../../types/util.js';
|
||||
export function buildNumericRangeFilter(
|
||||
filter: SCSearchNumericRangeFilter,
|
||||
): QueryDslSpecificQueryContainer<'range'> {
|
||||
const numericRangeObject: QueryDslNumberRangeQuery = {
|
||||
const numericRangeObject: estypes.QueryDslNumberRangeQuery = {
|
||||
relation: filter.arguments.relation,
|
||||
};
|
||||
if (filter.arguments.bounds.lowerBound?.mode === 'exclusive') {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCConfigFile, SCSearchQuery} from '@openstapps/core';
|
||||
import {ElasticsearchConfig} from '../types/elasticsearch-config.js';
|
||||
import {buildFilter} from './filter.js';
|
||||
@@ -29,7 +29,7 @@ export const buildQuery = function buildQuery(
|
||||
parameters: SCSearchQuery,
|
||||
defaultConfig: SCConfigFile,
|
||||
elasticsearchConfig: ElasticsearchConfig,
|
||||
): QueryDslQueryContainer {
|
||||
): estypes.QueryDslQueryContainer {
|
||||
// if config provides a minMatch parameter, we use query_string instead of a match query
|
||||
let query;
|
||||
if (elasticsearchConfig.query === undefined) {
|
||||
@@ -83,7 +83,7 @@ export const buildQuery = function buildQuery(
|
||||
);
|
||||
}
|
||||
|
||||
const functionScoreQuery: QueryDslQueryContainer = {
|
||||
const functionScoreQuery: estypes.QueryDslQueryContainer = {
|
||||
function_score: {
|
||||
functions: buildScoringFunctions(defaultConfig.internal.boostings, parameters.context),
|
||||
query: {
|
||||
@@ -97,7 +97,8 @@ export const buildQuery = function buildQuery(
|
||||
},
|
||||
};
|
||||
|
||||
const mustMatch = functionScoreQuery.function_score?.query?.bool?.must;
|
||||
const mustMatch = (functionScoreQuery.function_score as estypes.QueryDslFunctionScoreQuery | undefined)
|
||||
?.query?.bool?.must;
|
||||
|
||||
if (Array.isArray(mustMatch)) {
|
||||
if (query !== undefined) {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Sort} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCSearchSort} from '@openstapps/core';
|
||||
import {buildDistanceSort} from './sort/distance.js';
|
||||
import {buildDucetSort} from './sort/ducet.js';
|
||||
@@ -24,7 +24,7 @@ import {buildPriceSort} from './sort/price.js';
|
||||
* @param sorts Sorting rules to apply to the data that is being queried
|
||||
* @returns an array of sort queries
|
||||
*/
|
||||
export const buildSort = function buildSort(sorts: SCSearchSort[]): Sort {
|
||||
export const buildSort = function buildSort(sorts: SCSearchSort[]): estypes.Sort {
|
||||
return sorts.map(sort => {
|
||||
switch (sort.type) {
|
||||
case 'generic': {
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCDistanceSort} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a distance sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildDistanceSort(sort: SCDistanceSort): SortOptions {
|
||||
export function buildDistanceSort(sort: SCDistanceSort): estypes.SortOptions {
|
||||
return {
|
||||
_geo_distance: {
|
||||
mode: 'avg',
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCDucetSort} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a ducet sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildDucetSort(sort: SCDucetSort): SortOptions {
|
||||
export function buildDucetSort(sort: SCDucetSort): estypes.SortOptions {
|
||||
return {
|
||||
[`${sort.arguments.field}.sort`]: sort.order,
|
||||
};
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCGenericSort} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a generic sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildGenericSort(sort: SCGenericSort): SortOptions {
|
||||
export function buildGenericSort(sort: SCGenericSort): estypes.SortOptions {
|
||||
return {
|
||||
[sort.arguments.field]: sort.order,
|
||||
};
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SortOptions} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCPriceSort, SCSportCoursePriceGroup, SCThingsField} from '@openstapps/core';
|
||||
|
||||
/**
|
||||
* Converts a price sort to elasticsearch syntax
|
||||
* @param sort A sorting definition
|
||||
*/
|
||||
export function buildPriceSort(sort: SCPriceSort): SortOptions {
|
||||
export function buildPriceSort(sort: SCPriceSort): estypes.SortOptions {
|
||||
return {
|
||||
_script: {
|
||||
order: sort.order,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* 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 {Client} from '@elastic/elasticsearch';
|
||||
import {Client, estypes} from '@elastic/elasticsearch';
|
||||
import {SCThingType} from '@openstapps/core';
|
||||
import type {AggregationSchema} from '@openstapps/core/lib/mappings/aggregations.json.js';
|
||||
import type {ElasticsearchTemplateCollection} from '@openstapps/core/lib/mappings/mappings.json.js';
|
||||
@@ -36,7 +36,10 @@ export const aggregations = JSON.parse(
|
||||
* @param client An elasticsearch client to use
|
||||
* @param type the SCThingType of which the template should be set
|
||||
*/
|
||||
export async function putTemplate(client: Client, type: SCThingType) {
|
||||
export async function putTemplate(
|
||||
client: Client,
|
||||
type: SCThingType,
|
||||
): Promise<estypes.IndicesPutTemplateResponse> {
|
||||
const sanitizedType = `template_${type.replaceAll(/\s/g, '_')}`;
|
||||
|
||||
return client.indices.putTemplate({
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
|
||||
export type QueryDslSpecificQueryContainer<T extends keyof QueryDslQueryContainer> = Required<
|
||||
Pick<QueryDslQueryContainer, T>
|
||||
export type QueryDslSpecificQueryContainer<T extends keyof estypes.QueryDslQueryContainer> = Required<
|
||||
Pick<estypes.QueryDslQueryContainer, T>
|
||||
>;
|
||||
|
||||
@@ -19,7 +19,7 @@ import sinon from 'sinon';
|
||||
import {MailQueue} from '../../src/notification/mail-queue.js';
|
||||
import {expect} from 'chai';
|
||||
import Queue from 'promise-queue';
|
||||
import {MailOptions} from 'nodemailer/lib/sendmail-transport';
|
||||
import {SendMailOptions} from 'nodemailer';
|
||||
import {getTransport, TRANSPORT_SEND_RESPONSE} from '../common.js';
|
||||
|
||||
describe('MailQueue', async function () {
|
||||
@@ -54,7 +54,7 @@ describe('MailQueue', async function () {
|
||||
const transport = getTransport(false);
|
||||
// @ts-expect-error not assignable
|
||||
const mailQueue = new MailQueue(transport);
|
||||
const mail: MailOptions = {from: 'Foo', subject: 'Foo Subject'};
|
||||
const mail: SendMailOptions = {from: 'Foo', subject: 'Foo Subject'};
|
||||
for (let i = 0; i < numberOfMails; i++) {
|
||||
await mailQueue.push(mail);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ describe('MailQueue', async function () {
|
||||
const queueAddStub = sandbox.stub(Queue.prototype, 'add');
|
||||
// @ts-expect-error not assignable
|
||||
const mailQueue = new MailQueue(getTransport(false));
|
||||
const mail: MailOptions = {};
|
||||
const mail: SendMailOptions = {};
|
||||
mailQueue.push(mail);
|
||||
|
||||
expect(queueAddStub.called).to.be.false;
|
||||
@@ -81,7 +81,7 @@ describe('MailQueue', async function () {
|
||||
const transport = getTransport(false);
|
||||
// @ts-expect-error not assignable
|
||||
const mailQueue = new MailQueue(transport);
|
||||
const mail: MailOptions = {from: 'Foo', subject: 'Foo Subject'};
|
||||
const mail: SendMailOptions = {from: 'Foo', subject: 'Foo Subject'};
|
||||
// fake that transport is verified
|
||||
transport.isVerified = () => true;
|
||||
mailQueue.push(mail);
|
||||
@@ -97,7 +97,7 @@ describe('MailQueue', async function () {
|
||||
const transport = getTransport(false);
|
||||
// @ts-expect-error not assignable
|
||||
const mailQueue = new MailQueue(transport);
|
||||
const mail: MailOptions = {from: 'Foo', subject: 'Foo Subject'};
|
||||
const mail: SendMailOptions = {from: 'Foo', subject: 'Foo Subject'};
|
||||
// fake that transport is verified
|
||||
transport.isVerified = () => true;
|
||||
await mailQueue.push(mail);
|
||||
|
||||
@@ -25,7 +25,7 @@ import {expect} from 'chai';
|
||||
import {bulk, DEFAULT_TEST_TIMEOUT} from '../common.js';
|
||||
import {testApp} from '../tests-setup.js';
|
||||
import {v4} from 'uuid';
|
||||
import bookFile from '@openstapps/core/test/resources/indexable/Book.2.json' assert {type: 'json'};
|
||||
import bookFile from '@openstapps/core/test/resources/indexable/Book.2.json' with {type: 'json'};
|
||||
|
||||
const book = bookFile.instance as SCBook;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ 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 registerRequest from '@openstapps/core/test/resources/PluginRegisterRequest.1.json' assert {type: 'json'};
|
||||
import registerRequest from '@openstapps/core/test/resources/PluginRegisterRequest.1.json' with {type: 'json'};
|
||||
|
||||
// for using promises in expectations (to.eventually.be...)
|
||||
use(chaiAsPromised);
|
||||
|
||||
@@ -18,7 +18,7 @@ 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 bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' assert {type: 'json'};
|
||||
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' with {type: 'json'};
|
||||
|
||||
use(chaiAsPromised);
|
||||
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
* 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 {AggregateName, AggregationsMultiTermsBucket} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {SCFacet, SCThingType} from '@openstapps/core';
|
||||
import {expect} from 'chai';
|
||||
import {parseAggregations} from '../../../src/storage/elasticsearch/aggregations.js';
|
||||
|
||||
describe('Aggregations', function () {
|
||||
const aggregations: Record<AggregateName, Partial<AggregationsMultiTermsBucket>> = {
|
||||
const aggregations: Record<estypes.AggregateName, Partial<estypes.AggregationsMultiTermsBucket>> = {
|
||||
'catalog': {
|
||||
'doc_count': 4,
|
||||
'superCatalogs.categories': {
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
* 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 {Client, Diagnostic} from '@elastic/elasticsearch';
|
||||
import Indices from '@elastic/elasticsearch/lib/api/api/indices.js';
|
||||
import {CreateResponse, SearchHit, SearchResponse} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {Client, Diagnostic, estypes} from '@elastic/elasticsearch';
|
||||
import {
|
||||
SCBook,
|
||||
SCBulkResponse,
|
||||
@@ -49,9 +47,10 @@ 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'};
|
||||
import messageFile from '@openstapps/core/test/resources/indexable/Message.1.json' with {type: 'json'};
|
||||
import bookFile from '@openstapps/core/test/resources/indexable/Book.1.json' with {type: 'json'};
|
||||
|
||||
const indicesPrototype = Object.getPrototypeOf(new Client({node: 'http://localhost:9200'}).indices);
|
||||
const message = messageFile.instance as SCMessage;
|
||||
const book = bookFile.instance as SCBook;
|
||||
|
||||
@@ -60,7 +59,7 @@ use(chaiAsPromised);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function searchResponse<T>(...hits: SearchHit<T>[]): SearchResponse<T> {
|
||||
function searchResponse<T>(...hits: estypes.SearchHit<T>[]): estypes.SearchResponse<T> {
|
||||
return {hits: {hits}, took: 0, timed_out: false, _shards: {total: 1, failed: 0, successful: 1}};
|
||||
}
|
||||
|
||||
@@ -312,13 +311,13 @@ describe('Elasticsearch', function () {
|
||||
|
||||
beforeEach(function () {
|
||||
sandbox
|
||||
.stub(Indices.default.prototype, 'getAlias')
|
||||
.stub(indicesPrototype, 'getAlias')
|
||||
.resolves({[oldIndex]: {aliases: {[SCThingType.Book]: {}}}} as any);
|
||||
sandbox.stub(Indices.default.prototype, 'putTemplate').resolves({} as any);
|
||||
createStub = sandbox.stub(Indices.default.prototype, 'create').resolves({} as any);
|
||||
deleteStub = sandbox.stub(Indices.default.prototype, 'delete').resolves({} as any);
|
||||
refreshStub = sandbox.stub(Indices.default.prototype, 'refresh').resolves({} as any);
|
||||
updateAliasesStub = sandbox.stub(Indices.default.prototype, 'updateAliases').resolves({} as any);
|
||||
sandbox.stub(indicesPrototype, 'putTemplate').resolves({} as any);
|
||||
createStub = sandbox.stub(indicesPrototype, 'create').resolves({} as any);
|
||||
deleteStub = sandbox.stub(indicesPrototype, 'delete').resolves({} as any);
|
||||
refreshStub = sandbox.stub(indicesPrototype, 'refresh').resolves({} as any);
|
||||
updateAliasesStub = sandbox.stub(indicesPrototype, 'updateAliases').resolves({} as any);
|
||||
es = new Elasticsearch(backendConfig);
|
||||
});
|
||||
|
||||
@@ -445,7 +444,7 @@ describe('Elasticsearch', function () {
|
||||
});
|
||||
|
||||
it('should provide the thing if object is found', async function () {
|
||||
const foundObject: SearchHit<SCMessage> = {
|
||||
const foundObject: estypes.SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: '',
|
||||
_score: 0,
|
||||
@@ -466,7 +465,7 @@ describe('Elasticsearch', function () {
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
sandbox.stub(Indices.default.prototype, 'getAlias').resolves({} as any);
|
||||
sandbox.stub(indicesPrototype, 'getAlias').resolves({} as any);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
@@ -476,7 +475,7 @@ describe('Elasticsearch', function () {
|
||||
it('should not post if the object already exists in an index which will not be rolled over', async function () {
|
||||
const index = getIndex();
|
||||
const oldIndex = index.replace('foosource', 'barsource');
|
||||
const object: SearchHit<SCMessage> = {
|
||||
const object: estypes.SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: oldIndex,
|
||||
_source: message,
|
||||
@@ -490,7 +489,7 @@ describe('Elasticsearch', function () {
|
||||
|
||||
it('should reject if there is an object creation error on the elasticsearch side', async function () {
|
||||
sandbox.stub(es.client, 'search').resolves(searchResponse());
|
||||
sandbox.stub(es.client, 'create').resolves({result: 'not_found'} as CreateResponse);
|
||||
sandbox.stub(es.client, 'create').resolves({result: 'not_found'} as estypes.CreateResponse);
|
||||
|
||||
await es.init();
|
||||
return expect(es.post(message, bulk)).to.rejectedWith('creation');
|
||||
@@ -527,7 +526,7 @@ describe('Elasticsearch', function () {
|
||||
sandbox.restore();
|
||||
});
|
||||
it('should reject to put if the object does not already exist', async function () {
|
||||
const object: SearchHit<SCMessage> = {
|
||||
const object: estypes.SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
@@ -541,7 +540,7 @@ describe('Elasticsearch', function () {
|
||||
// noinspection JSUnusedLocalSymbols
|
||||
it('should update the object if it already exists', async function () {
|
||||
let caughtParameter: any;
|
||||
const object: SearchHit<SCMessage> = {
|
||||
const object: estypes.SearchHit<SCMessage> = {
|
||||
_id: '',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
@@ -564,13 +563,13 @@ describe('Elasticsearch', function () {
|
||||
describe('search', async function () {
|
||||
let es: Elasticsearch;
|
||||
const sandbox = sinon.createSandbox();
|
||||
const objectMessage: SearchHit<SCMessage> = {
|
||||
const objectMessage: estypes.SearchHit<SCMessage> = {
|
||||
_id: '123',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
_source: message,
|
||||
};
|
||||
const objectBook: SearchHit<SCBook> = {
|
||||
const objectBook: estypes.SearchHit<SCBook> = {
|
||||
_id: '321',
|
||||
_index: getIndex(),
|
||||
_score: 0,
|
||||
@@ -595,7 +594,7 @@ describe('Elasticsearch', function () {
|
||||
},
|
||||
},
|
||||
};
|
||||
const fakeSearchResponse: SearchResponse<SCThings> = {
|
||||
const fakeSearchResponse: estypes.SearchResponse<SCThings> = {
|
||||
took: 12,
|
||||
timed_out: false,
|
||||
// @ts-expect-error not assignable
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Client} from '@elastic/elasticsearch';
|
||||
import {SearchResponse} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {
|
||||
SCMonitoringConfiguration,
|
||||
SCMonitoringLogAction,
|
||||
@@ -111,7 +111,7 @@ describe('Monitoring', async function () {
|
||||
});
|
||||
|
||||
it('should log errors where conditions failed', async function () {
|
||||
const fakeSearchResponse: SearchResponse<SCThings> = {
|
||||
const fakeSearchResponse: estypes.SearchResponse<SCThings> = {
|
||||
took: 12,
|
||||
timed_out: false,
|
||||
// @ts-expect-error not assignable
|
||||
|
||||
@@ -31,7 +31,7 @@ import {buildQuery} from '../../../src/storage/elasticsearch/query/query.js';
|
||||
import {buildSort} from '../../../src/storage/elasticsearch/query/sort.js';
|
||||
import {ElasticsearchConfig} from '../../../src/storage/elasticsearch/types/elasticsearch-config.js';
|
||||
import {QueryDslSpecificQueryContainer} from '../../../src/storage/elasticsearch/types/util.js';
|
||||
import {QueryDslRangeQuery, SortCombinations} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
import {backendConfig} from '../../../src/config.js';
|
||||
|
||||
describe('Query', function () {
|
||||
@@ -364,9 +364,9 @@ describe('Query', function () {
|
||||
expect(filter).to.deep.equal(expectedFilter);
|
||||
for (const bound of ['g', 'l']) {
|
||||
const inclusiveExists =
|
||||
typeof filter.range.price?.[`${bound}t` as keyof QueryDslRangeQuery] !== 'undefined';
|
||||
typeof filter.range.price?.[`${bound}t` as keyof estypes.QueryDslRangeQuery] !== 'undefined';
|
||||
const exclusiveExists =
|
||||
typeof filter.range.price?.[`${bound}te` as keyof QueryDslRangeQuery] !== 'undefined';
|
||||
typeof filter.range.price?.[`${bound}te` as keyof estypes.QueryDslRangeQuery] !== 'undefined';
|
||||
|
||||
// only one should exist at the same time
|
||||
expect(inclusiveExists && exclusiveExists).to.be.false;
|
||||
@@ -623,8 +623,8 @@ describe('Query', function () {
|
||||
},
|
||||
},
|
||||
];
|
||||
let sorts: SortCombinations[] = [];
|
||||
const expectedSorts: {[key: string]: SortCombinations} = {
|
||||
let sorts: estypes.SortCombinations[] = [];
|
||||
const expectedSorts: {[key: string]: estypes.SortCombinations} = {
|
||||
ducet: {
|
||||
'name.sort': 'desc',
|
||||
},
|
||||
@@ -651,7 +651,7 @@ describe('Query', function () {
|
||||
},
|
||||
};
|
||||
before(function () {
|
||||
sorts = buildSort(searchSCSearchSort) as SortCombinations[];
|
||||
sorts = buildSort(searchSCSearchSort) as estypes.SortCombinations[];
|
||||
});
|
||||
|
||||
it('should build ducet sort', function () {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {QueryDslQueryContainer} from '@elastic/elasticsearch/lib/api/types.js';
|
||||
import {estypes} from '@elastic/elasticsearch';
|
||||
|
||||
export const query: QueryDslQueryContainer = {
|
||||
export const query: estypes.QueryDslQueryContainer = {
|
||||
function_score: {
|
||||
functions: [
|
||||
{
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/database
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
## 3.2.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM elasticsearch:8.4.2
|
||||
FROM elasticsearch:8.19.21
|
||||
|
||||
EXPOSE 9200
|
||||
EXPOSE 9300
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/database",
|
||||
"version": "3.2.0",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"files": [
|
||||
"config",
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# @openstapps/proxy
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8ccbfac0: Bumping proxy version to rebuild image
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c8e29020]
|
||||
- @openstapps/logger@4.0.0
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
+10
-10
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/proxy",
|
||||
"description": "NGINX proxy that is dynamically configured by a Node.js script",
|
||||
"version": "3.0.0",
|
||||
"version": "4.0.5",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "AGPL-3.0-only",
|
||||
@@ -44,39 +44,39 @@
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"@types/config": "3.3.0",
|
||||
"@types/dockerode": "3.3.17",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/sha1": "1.1.3",
|
||||
"config": "3.3.9",
|
||||
"dockerode": "3.3.5",
|
||||
"is-cidr": "4.0.2",
|
||||
"mustache": "4.2.0",
|
||||
"semver": "7.6.0",
|
||||
"typescript": "5.4.2"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/api-cli": "workspace:*",
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/chai": "4.3.5",
|
||||
"@types/chai": "4.3.20",
|
||||
"@types/config": "3.3.0",
|
||||
"@types/dockerode": "3.3.17",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/mustache": "4.2.2",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/proxyquire": "1.3.28",
|
||||
"@types/semver": "7.5.8",
|
||||
"@types/sha1": "1.1.3",
|
||||
"@types/sinon": "10.0.14",
|
||||
"@types/sinon-chai": "3.2.9",
|
||||
"c8": "7.14.0",
|
||||
"chai": "4.3.7",
|
||||
"mocha": "10.2.0",
|
||||
"c8": "10.1.3",
|
||||
"chai": "4.5.0",
|
||||
"mocha": "10.8.2",
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"sinon": "15.0.4",
|
||||
"sinon-chai": "3.7.0",
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "6.7.0"
|
||||
"tsup": "8.5.0"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/backend-config
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
@@ -30,7 +42,7 @@
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
import "./lib/app.js";
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
@@ -105,7 +117,7 @@
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
import "./lib/app.js";
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/backend-config",
|
||||
"description": "Backend Configuration for OpenStApps",
|
||||
"version": "3.0.0",
|
||||
"version": "4.0.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<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="favorites" title.de="Favoriten" icon="star" 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"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<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="favorites" title.de="Favoriten" icon="star" 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"/>
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/eslint-config
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
@@ -30,7 +42,7 @@
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
import "./lib/app.js";
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
@@ -75,11 +87,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
|
||||
@@ -122,7 +137,7 @@
|
||||
|
||||
```js
|
||||
#!/usr/bin/env node
|
||||
import './lib/app.js';
|
||||
import "./lib/app.js";
|
||||
```
|
||||
|
||||
- 64caebaf: Migrate to ESM
|
||||
@@ -167,11 +182,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
|
||||
|
||||
@@ -22,7 +22,7 @@ const config = {
|
||||
'plugin:unicorn/recommended',
|
||||
'prettier',
|
||||
],
|
||||
plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc'],
|
||||
plugins: ['eslint-plugin-unicorn', 'eslint-plugin-jsdoc', '@stylistic/eslint-plugin'],
|
||||
settings: {
|
||||
jsdoc: {
|
||||
mode: 'typescript',
|
||||
@@ -76,7 +76,7 @@ const config = {
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
'@stylistic/lines-between-class-members': ['error', 'always'],
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
@@ -85,7 +85,6 @@ const config = {
|
||||
argsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/lines-between-class-members': ['error', 'always'],
|
||||
'@typescript-eslint/no-explicit-any': 'error',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/eslint-config",
|
||||
"description": "A collection of configuration base files for StApps projects. Just an (unused) experiment for now.",
|
||||
"version": "3.0.0",
|
||||
"version": "4.0.3",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
@@ -17,13 +17,14 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/node": "22.15.31",
|
||||
"eslint": "8.57.0",
|
||||
"typescript": "5.4.2"
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "7.2.0",
|
||||
"@typescript-eslint/parser": "7.2.0",
|
||||
"@stylistic/eslint-plugin": "5.10.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.39.1",
|
||||
"@typescript-eslint/parser": "8.39.1",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-jsdoc": "48.2.1",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/prettier-config
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
## 3.2.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -9,7 +9,8 @@ const config = {
|
||||
trailingComma: 'all',
|
||||
bracketSpacing: false,
|
||||
arrowParens: 'avoid',
|
||||
endOfLine: 'lf'
|
||||
endOfLine: 'lf',
|
||||
htmlWhitespaceSensitivity: 'strict'
|
||||
}
|
||||
|
||||
export default config;
|
||||
module.exports = config;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@openstapps/prettier-config",
|
||||
"description": "StApps Prettier Config",
|
||||
"version": "3.2.0",
|
||||
"type": "module",
|
||||
"version": "4.0.0",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/prettier-config.git",
|
||||
"author": "Thea Schöbl <dev@theaninova.de>",
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
# @openstapps/projectmanagement
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 86004881: Updated node-glob dependency
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/gitlab-api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c8e29020]
|
||||
- @openstapps/collection-utils@4.0.0
|
||||
- @openstapps/gitlab-api@4.0.0
|
||||
- @openstapps/logger@4.0.0
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/projectmanagement",
|
||||
"description": "Main documentation and scripts for maintenance.",
|
||||
"version": "3.0.0",
|
||||
"version": "4.0.5",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -41,31 +41,30 @@
|
||||
"@openstapps/collection-utils": "workspace:*",
|
||||
"@openstapps/gitlab-api": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"@slack/web-api": "6.8.1",
|
||||
"commander": "10.0.0",
|
||||
"date-fns": "3.6.0",
|
||||
"glob": "10.3.10",
|
||||
"glob": "10.5.0",
|
||||
"mustache": "4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/chai": "4.3.5",
|
||||
"@types/chai-as-promised": "7.1.5",
|
||||
"@types/chai": "4.3.20",
|
||||
"@types/chai-as-promised": "7.1.8",
|
||||
"@types/glob": "8.1.0",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/mustache": "4.2.2",
|
||||
"@types/node": "18.15.3",
|
||||
"@types/node": "22.15.31",
|
||||
"@types/tmp": "0.2.3",
|
||||
"c8": "7.14.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"mocha": "10.2.0",
|
||||
"c8": "10.1.3",
|
||||
"chai": "4.5.0",
|
||||
"chai-as-promised": "7.1.2",
|
||||
"mocha": "10.8.2",
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "5.4.2"
|
||||
"tsup": "8.5.0",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
User,
|
||||
} from '@openstapps/gitlab-api';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {WebClient} from '@slack/web-api';
|
||||
import {CONCURRENCY, GROUPS, MAX_DEPTH_FOR_REMINDER, NOTE_PREFIX, SLACK_CHANNEL} from '../configuration.js';
|
||||
import {mapAsyncLimit} from '@openstapps/collection-utils';
|
||||
|
||||
@@ -53,8 +52,7 @@ export async function remind(api: Api): Promise<void> {
|
||||
Logger.info(`Found ${mergeRequests.length} open merge requests.`);
|
||||
|
||||
// instantiate slack client
|
||||
const client =
|
||||
process.env.SLACK_API_TOKEN === undefined ? undefined : new WebClient(process.env.SLACK_API_TOKEN);
|
||||
const client = undefined;
|
||||
|
||||
// get members of the main group
|
||||
const members = await api.getMembers(MembershipScope.GROUPS, GROUPS[0]);
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @openstapps/tsconfig
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
## 3.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/tsconfig",
|
||||
"description": "The tsconfig for the openstapps project",
|
||||
"version": "3.3.0",
|
||||
"version": "4.0.0",
|
||||
"type": "commonjs",
|
||||
"license": "GPL-3.0-only",
|
||||
"repository": "git@gitlab.com:openstapps/eslint-config.git",
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ const args = files.map(it => `${it.split('/', 2)[1]}='${it}'`);
|
||||
|
||||
console.log(
|
||||
'Collecting coverage...',
|
||||
await promisify(exec)(`cobertura-merge -o ./coverage.xml ${args.join(' ')}`),
|
||||
await promisify(exec)(`merge-cobertura -o ./coverage.xml ${args.join(' ')}`),
|
||||
);
|
||||
|
||||
const reportFiles = await glob('./*/*/coverage/report-junit.xml');
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# @openstapps/minimal-connector
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [09ad903a]
|
||||
- @openstapps/core@4.0.5
|
||||
- @openstapps/api@4.0.5
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b40ba7ad]
|
||||
- @openstapps/api@4.0.1
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c8e29020]
|
||||
- @openstapps/api@4.0.0
|
||||
- @openstapps/core@4.0.0
|
||||
- @openstapps/logger@4.0.0
|
||||
|
||||
## 3.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-connector",
|
||||
"description": "This is a minimal connector which serves as an example",
|
||||
"version": "3.3.2",
|
||||
"version": "4.0.5",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -42,20 +42,20 @@
|
||||
"@openstapps/eslint-config": "workspace:*",
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/chai": "4.3.5",
|
||||
"@types/chai-as-promised": "7.1.5",
|
||||
"@types/mocha": "10.0.1",
|
||||
"@types/node": "18.15.3",
|
||||
"c8": "7.14.0",
|
||||
"chai": "4.3.7",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"@types/chai": "4.3.20",
|
||||
"@types/chai-as-promised": "7.1.8",
|
||||
"@types/mocha": "10.0.10",
|
||||
"@types/node": "22.15.31",
|
||||
"c8": "10.1.3",
|
||||
"chai": "4.5.0",
|
||||
"chai-as-promised": "7.1.2",
|
||||
"conventional-changelog-cli": "2.2.2",
|
||||
"mocha": "10.2.0",
|
||||
"mocha": "10.8.2",
|
||||
"mocha-junit-reporter": "2.2.0",
|
||||
"nock": "13.3.1",
|
||||
"ts-node": "10.9.2",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "5.4.2"
|
||||
"tsup": "8.5.0",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @openstapps/minimal-deployment
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
version: '3.7'
|
||||
|
||||
x-development-variables: &development-variables
|
||||
NODE_ENV: "development"
|
||||
ALLOW_NO_TRANSPORT: "true"
|
||||
|
||||
services:
|
||||
database:
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:3.0.0
|
||||
image: registry.gitlab.com/openstapps/openstapps/database:4.0.1
|
||||
# If you need persistence for debugging purposes uncomment the following lines
|
||||
#volumes:
|
||||
# volumes:
|
||||
# - ./database:/usr/share/elasticsearch/data
|
||||
expose:
|
||||
- 9200
|
||||
ports:
|
||||
- 127.0.0.1:9200:9200
|
||||
environment:
|
||||
- bootstrap.memory_lock=true
|
||||
- "ES_JAVA_OPTS=-Xms2g -Xmx2g"
|
||||
- discovery.type=single-node
|
||||
# - bootstrap.memory_lock=true
|
||||
# - discovery.type=single-node
|
||||
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
|
||||
ulimits:
|
||||
memlock:
|
||||
soft: -1
|
||||
@@ -25,7 +23,7 @@ services:
|
||||
restart: unless-stopped
|
||||
|
||||
backend:
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:3.1.0
|
||||
image: registry.gitlab.com/openstapps/openstapps/backend:4.0.1
|
||||
environment:
|
||||
<<: *development-variables
|
||||
ES_ADDR: "http://database:9200"
|
||||
@@ -37,10 +35,11 @@ services:
|
||||
ports:
|
||||
- 127.0.0.1:3000:3000
|
||||
labels:
|
||||
- stapps.version=4.1.0
|
||||
- stapps.version=4.0.0
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- database
|
||||
database:
|
||||
condition: service_healthy
|
||||
links:
|
||||
- database
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-deployment",
|
||||
"version": "3.0.0",
|
||||
"version": "4.0.1",
|
||||
"private": true,
|
||||
"files": [
|
||||
"database",
|
||||
|
||||
@@ -1,5 +1,52 @@
|
||||
# @openstapps/minimal-plugin
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [86004881]
|
||||
- Updated dependencies [09ad903a]
|
||||
- @openstapps/core-tools@4.0.5
|
||||
- @openstapps/core@4.0.5
|
||||
- @openstapps/api-plugin@4.0.5
|
||||
- @openstapps/api@4.0.5
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6b06de40]
|
||||
- @openstapps/logger@4.0.2
|
||||
- @openstapps/api-plugin@4.0.2
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/core-tools@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
- Updated dependencies [b40ba7ad]
|
||||
- @openstapps/api-plugin@4.0.1
|
||||
- @openstapps/api@4.0.1
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [c8e29020]
|
||||
- @openstapps/api@4.0.0
|
||||
- @openstapps/api-plugin@4.0.0
|
||||
- @openstapps/core@4.0.0
|
||||
- @openstapps/core-tools@4.0.0
|
||||
- @openstapps/logger@4.0.0
|
||||
|
||||
## 3.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@openstapps/minimal-plugin",
|
||||
"description": "Minimal Plugin",
|
||||
"version": "3.3.2",
|
||||
"version": "4.0.5",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"license": "GPL-3.0-only",
|
||||
@@ -34,7 +34,7 @@
|
||||
"@openstapps/core-tools": "workspace:*",
|
||||
"@openstapps/logger": "workspace:*",
|
||||
"commander": "10.0.0",
|
||||
"express": "4.18.2",
|
||||
"express": "4.21.2",
|
||||
"ts-node": "10.9.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -42,9 +42,9 @@
|
||||
"@openstapps/prettier-config": "workspace:*",
|
||||
"@openstapps/tsconfig": "workspace:*",
|
||||
"@types/express": "4.17.17",
|
||||
"@types/node": "18.15.3",
|
||||
"tsup": "6.7.0",
|
||||
"typescript": "5.4.2"
|
||||
"@types/node": "22.15.31",
|
||||
"tsup": "8.5.0",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"tsup": {
|
||||
"entry": [
|
||||
|
||||
Generated
+6
-6
@@ -5,11 +5,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1709747860,
|
||||
"narHash": "sha256-RT4zuBy579m+l8VyIQFOR66WXfcs4g1jntZUHjh6eoI=",
|
||||
"lastModified": 1717112898,
|
||||
"narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "58ae79ea707579c40102ddf62d84b902a987c58b",
|
||||
"rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
flake-utils,
|
||||
}:
|
||||
let
|
||||
aapt2buildToolsVersion = "33.0.2";
|
||||
aapt2buildToolsVersion = "34.0.0";
|
||||
in
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
@@ -19,7 +19,7 @@
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(final: prev: rec {
|
||||
(final: prev: {
|
||||
fontMin = prev.python311.withPackages (
|
||||
ps:
|
||||
with ps;
|
||||
@@ -30,21 +30,20 @@
|
||||
++ (with fonttools.optional-dependencies; [ woff ])
|
||||
);
|
||||
android = prev.androidenv.composeAndroidPackages {
|
||||
buildToolsVersions = [
|
||||
buildToolsVersions = prev.lib.lists.unique [
|
||||
"34.0.0"
|
||||
aapt2buildToolsVersion
|
||||
];
|
||||
platformVersions = [ "34" ];
|
||||
};
|
||||
cypress = prev.cypress.overrideAttrs (cyPrev: rec {
|
||||
version = "13.2.0";
|
||||
version = "13.10.0";
|
||||
src = prev.fetchzip {
|
||||
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
|
||||
hash = "sha256-9o0nprGcJhudS1LNm+T7Vf0Dwd1RBauYKI+w1FBQ3ZM=";
|
||||
hash = "sha256-wKNXo2lWndsQaouOiul0rsOWah+RRQ6fljzdeC8/KW4=";
|
||||
};
|
||||
});
|
||||
nodejs = prev.nodejs_18;
|
||||
corepack = prev.corepack_18;
|
||||
nodejs = prev.nodejs_22;
|
||||
})
|
||||
];
|
||||
config = {
|
||||
@@ -54,7 +53,6 @@
|
||||
};
|
||||
androidFhs = pkgs.buildFHSUserEnv {
|
||||
name = "android-env";
|
||||
targetPkgs = pkgs: with pkgs; [ ];
|
||||
runScript = "bash";
|
||||
profile = ''
|
||||
export ALLOW_NINJA_ENV=true
|
||||
@@ -68,7 +66,7 @@
|
||||
nativeBuildInputs = [ androidFhs ];
|
||||
buildInputs = with pkgs; [
|
||||
nodejs
|
||||
corepack
|
||||
nodePackages.pnpm
|
||||
# tools
|
||||
curl
|
||||
jq
|
||||
@@ -83,6 +81,8 @@
|
||||
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";
|
||||
# https://github.com/nodejs/node/issues/48444#issuecomment-1591882694
|
||||
UV_USE_IO_URING = "0";
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"plugin:unicorn/recommended",
|
||||
"prettier"
|
||||
],
|
||||
"plugins": ["eslint-plugin-unicorn", "eslint-plugin-jsdoc"],
|
||||
"plugins": ["eslint-plugin-unicorn", "eslint-plugin-jsdoc", "@stylistic/eslint-plugin"],
|
||||
"settings": {
|
||||
"jsdoc": {
|
||||
"mode": "typescript"
|
||||
@@ -63,9 +63,10 @@
|
||||
"argsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/lines-between-class-members": ["error", "always"],
|
||||
"@stylistic/lines-between-class-members": ["error", "always"],
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@angular-eslint/use-lifecycle-interface": "error"
|
||||
"@angular-eslint/use-lifecycle-interface": "error",
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
e2e:
|
||||
image: registry.gitlab.com/openstapps/openstapps/app-cypress:node-18
|
||||
image: registry.gitlab.com/openstapps/openstapps/app-cypress
|
||||
stage: test
|
||||
script:
|
||||
- pnpm --filter=@openstapps/app install
|
||||
- pnpm install
|
||||
- pnpm --filter=@openstapps/app exec cypress install
|
||||
- cd node_modules/.pnpm/re2*/node_modules/re2
|
||||
- npm run install
|
||||
- cd $CI_PROJECT_DIR
|
||||
- pnpm test:integration:app
|
||||
- pnpm test:integration:app --force --no-cache
|
||||
artifacts:
|
||||
when: on_failure
|
||||
paths:
|
||||
|
||||
@@ -1,5 +1,59 @@
|
||||
# @openstapps/app
|
||||
|
||||
## 4.0.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 09ad903a: Upgrade to Capacitor 8 and Anuglar 20
|
||||
- 86004881: Updated node-glob dependency
|
||||
- Updated dependencies [09ad903a]
|
||||
- @openstapps/core@4.0.5
|
||||
- @openstapps/api@4.0.5
|
||||
|
||||
## 4.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3a274a3a: Upgrade to Capacitor 7 and Anuglar 18
|
||||
- @openstapps/api@4.0.2
|
||||
- @openstapps/collection-utils@4.0.0
|
||||
- @openstapps/core@4.0.2
|
||||
|
||||
## 4.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @openstapps/core@4.0.2
|
||||
- @openstapps/api@4.0.2
|
||||
|
||||
## 4.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b40ba7ad: Updated Elasticsearch dependency
|
||||
- Updated dependencies [b40ba7ad]
|
||||
- @openstapps/api@4.0.1
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 4.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
- c8e29020: Update to Node 22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b8ac30b9: Migrated IonIcons replacer to a custom component
|
||||
- b8ac30b9: Migrated to Ionic standalone components
|
||||
|
||||
Angular ESBuild will not work with `IonicModule` apps
|
||||
|
||||
- b8ac30b9: Migrated to Angular ESBuild
|
||||
- Updated dependencies [c8e29020]
|
||||
- @openstapps/api@4.0.0
|
||||
- @openstapps/collection-utils@4.0.0
|
||||
- @openstapps/core@4.0.0
|
||||
|
||||
## 3.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
FROM node:18-alpine3.18
|
||||
|
||||
WORKDIR /app
|
||||
COPY www/ /app/www
|
||||
COPY www/browser /app/www/browser
|
||||
COPY package.json /app
|
||||
|
||||
EXPOSE 8100
|
||||
|
||||
RUN npm install -g http-server
|
||||
CMD http-server www --p 8100
|
||||
CMD http-server www/browser --p 8100
|
||||
|
||||
+19
-16
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* Copyright (C) 2026 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -13,26 +13,29 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface PAIAAuthorizationResponseJson {
|
||||
code: string;
|
||||
state: string;
|
||||
patron: string;
|
||||
export interface URLOpenListenerEvent {
|
||||
url: string;
|
||||
}
|
||||
|
||||
export class PAIAAuthorizationResponse {
|
||||
code: string;
|
||||
export interface AppInfo {
|
||||
name: string;
|
||||
id: string;
|
||||
build: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
state: string;
|
||||
export interface PluginListenerHandle {
|
||||
remove: () => Promise<void>;
|
||||
}
|
||||
|
||||
patron: string;
|
||||
|
||||
constructor(response: PAIAAuthorizationResponseJson) {
|
||||
this.code = response.code;
|
||||
this.state = response.state;
|
||||
this.patron = response.patron;
|
||||
export class AppMock {
|
||||
addListener<T>(_eventName: string, _listener: (event: T) => void): Promise<PluginListenerHandle> {
|
||||
return Promise.resolve({remove: () => Promise.resolve()});
|
||||
}
|
||||
|
||||
toJson(): PAIAAuthorizationResponseJson {
|
||||
return {code: this.code, state: this.state, patron: this.patron};
|
||||
getInfo(): Promise<AppInfo> {
|
||||
return Promise.resolve({name: 'StApps', id: 'de.anyschool.app', build: '1', version: '1.2.3'});
|
||||
}
|
||||
}
|
||||
|
||||
export const App = new AppMock();
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (C) 2026 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* tsconfig.spec.json maps every `@capacitor/*` import to this folder, so this
|
||||
* file replaces `@capacitor/core` in all tests – including the imports made by
|
||||
* real Capacitor plugins (registerPlugin, WebPlugin, CapacitorHttp, …).
|
||||
*
|
||||
* Therefore everything is re-exported from the real package (imported via a
|
||||
* relative path, which bypasses the path mapping) and only `Capacitor` is
|
||||
* replaced by a controllable mock. The local export shadows the one from
|
||||
* `export *`.
|
||||
*/
|
||||
export * from '../../node_modules/@capacitor/core';
|
||||
|
||||
type Platform = 'web' | 'ios' | 'android';
|
||||
|
||||
export class CapacitorMock {
|
||||
private platform: Platform = 'web';
|
||||
|
||||
getPlatform(): Platform {
|
||||
return this.platform;
|
||||
}
|
||||
|
||||
isNativePlatform(): boolean {
|
||||
return this.platform !== 'web';
|
||||
}
|
||||
|
||||
isPluginAvailable(_name: string): boolean {
|
||||
return this.isNativePlatform();
|
||||
}
|
||||
|
||||
convertFileSrc(filePath: string): string {
|
||||
return filePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test helper: simulate running on the given platform.
|
||||
*/
|
||||
setPlatform(platform: Platform): void {
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test helper: back to the default (web), call this in afterEach.
|
||||
*/
|
||||
reset(): void {
|
||||
this.platform = 'web';
|
||||
}
|
||||
}
|
||||
|
||||
export const Capacitor = new CapacitorMock();
|
||||
@@ -94,3 +94,8 @@ capacitor-cordova-android-plugins
|
||||
|
||||
# Copied web assets
|
||||
app/src/main/assets/public
|
||||
|
||||
# Generated Config files
|
||||
app/src/main/assets/capacitor.config.json
|
||||
app/src/main/assets/capacitor.plugins.json
|
||||
app/src/main/res/xml/config.xml
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
namespace "de.anyschool.app"
|
||||
compileSdk rootProject.ext.compileSdkVersion
|
||||
namespace = "de.anyschool.app"
|
||||
compileSdk = rootProject.ext.compileSdkVersion
|
||||
defaultConfig {
|
||||
applicationId "de.anyschool.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
@@ -13,7 +13,7 @@ android {
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
||||
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
android {
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
||||
dependencies {
|
||||
implementation project(':capacitor-community-in-app-review')
|
||||
implementation project(':capacitor-community-screen-brightness')
|
||||
implementation project(':capacitor-app')
|
||||
implementation project(':capacitor-browser')
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
|
||||
android:exported="true"
|
||||
android:label="@string/title_activity_main"
|
||||
android:launchMode="singleTask"
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
[
|
||||
{
|
||||
"pkg": "@capacitor-community/in-app-review",
|
||||
"classpath": "com.getcapacitor.community.inappreview.InAppReviewPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@capacitor-community/screen-brightness",
|
||||
"classpath": "com.elylucas.capscreenbrightness.ScreenBrightnessPlugin"
|
||||
|
||||
@@ -7,5 +7,6 @@
|
||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
||||
<item name="android:windowBackground">@color/colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/colorBackground</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
@@ -17,6 +18,7 @@
|
||||
<item name="android:windowBackground">@color/colorPrimary</item>
|
||||
<item name="android:navigationBarColor">@color/colorBackground</item>
|
||||
<item name="android:windowLightNavigationBar" tools:targetApi="27">true</item>
|
||||
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.2.1'
|
||||
classpath 'com.google.gms:google-services:4.4.0'
|
||||
classpath 'com.android.tools.build:gradle:8.13.0'
|
||||
classpath 'com.google.gms:google-services:4.4.4'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
@@ -1,57 +1,60 @@
|
||||
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
||||
include ':capacitor-android'
|
||||
project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm/@capacitor+android@6.1.1_@capacitor+core@6.1.1/node_modules/@capacitor/android/capacitor')
|
||||
project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm/@capacitor+android@8.5.2_@capacitor+core@8.5.2/node_modules/@capacitor/android/capacitor')
|
||||
|
||||
include ':capacitor-community-in-app-review'
|
||||
project(':capacitor-community-in-app-review').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+in-app-review@8.0.0_@capacitor+core@8.5.2/node_modules/@capacitor-community/in-app-review/android')
|
||||
|
||||
include ':capacitor-community-screen-brightness'
|
||||
project(':capacitor-community-screen-brightness').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+screen-brightness@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor-community/screen-brightness/android')
|
||||
project(':capacitor-community-screen-brightness').projectDir = new File('../../../node_modules/.pnpm/@capacitor-community+screen-brightness@8.0.0_@capacitor+core@8.5.2/node_modules/@capacitor-community/screen-brightness/android')
|
||||
|
||||
include ':capacitor-app'
|
||||
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/app/android')
|
||||
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@8.1.1_@capacitor+core@8.5.2/node_modules/@capacitor/app/android')
|
||||
|
||||
include ':capacitor-browser'
|
||||
project(':capacitor-browser').projectDir = new File('../../../node_modules/.pnpm/@capacitor+browser@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/browser/android')
|
||||
project(':capacitor-browser').projectDir = new File('../../../node_modules/.pnpm/@capacitor+browser@8.0.4_@capacitor+core@8.5.2/node_modules/@capacitor/browser/android')
|
||||
|
||||
include ':capacitor-clipboard'
|
||||
project(':capacitor-clipboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+clipboard@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/clipboard/android')
|
||||
project(':capacitor-clipboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+clipboard@8.0.1_@capacitor+core@8.5.2/node_modules/@capacitor/clipboard/android')
|
||||
|
||||
include ':capacitor-device'
|
||||
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/device/android')
|
||||
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@8.0.3_@capacitor+core@8.5.2/node_modules/@capacitor/device/android')
|
||||
|
||||
include ':capacitor-dialog'
|
||||
project(':capacitor-dialog').projectDir = new File('../../../node_modules/.pnpm/@capacitor+dialog@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/dialog/android')
|
||||
project(':capacitor-dialog').projectDir = new File('../../../node_modules/.pnpm/@capacitor+dialog@8.0.1_@capacitor+core@8.5.2/node_modules/@capacitor/dialog/android')
|
||||
|
||||
include ':capacitor-filesystem'
|
||||
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/.pnpm/@capacitor+filesystem@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/filesystem/android')
|
||||
project(':capacitor-filesystem').projectDir = new File('../../../node_modules/.pnpm/@capacitor+filesystem@8.1.3_@capacitor+core@8.5.2/node_modules/@capacitor/filesystem/android')
|
||||
|
||||
include ':capacitor-geolocation'
|
||||
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/geolocation/android')
|
||||
project(':capacitor-geolocation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+geolocation@8.2.2_@capacitor+core@8.5.2/node_modules/@capacitor/geolocation/android')
|
||||
|
||||
include ':capacitor-haptics'
|
||||
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/haptics/android')
|
||||
project(':capacitor-haptics').projectDir = new File('../../../node_modules/.pnpm/@capacitor+haptics@8.0.2_@capacitor+core@8.5.2/node_modules/@capacitor/haptics/android')
|
||||
|
||||
include ':capacitor-keyboard'
|
||||
project(':capacitor-keyboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+keyboard@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/keyboard/android')
|
||||
project(':capacitor-keyboard').projectDir = new File('../../../node_modules/.pnpm/@capacitor+keyboard@8.0.5_@capacitor+core@8.5.2/node_modules/@capacitor/keyboard/android')
|
||||
|
||||
include ':capacitor-local-notifications'
|
||||
project(':capacitor-local-notifications').projectDir = new File('../../../node_modules/.pnpm/@capacitor+local-notifications@6.0.0_@capacitor+core@6.1.1/node_modules/@capacitor/local-notifications/android')
|
||||
project(':capacitor-local-notifications').projectDir = new File('../../../node_modules/.pnpm/@capacitor+local-notifications@8.3.1_@capacitor+core@8.5.2/node_modules/@capacitor/local-notifications/android')
|
||||
|
||||
include ':capacitor-network'
|
||||
project(':capacitor-network').projectDir = new File('../../../node_modules/.pnpm/@capacitor+network@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/network/android')
|
||||
project(':capacitor-network').projectDir = new File('../../../node_modules/.pnpm/@capacitor+network@8.0.1_@capacitor+core@8.5.2/node_modules/@capacitor/network/android')
|
||||
|
||||
include ':capacitor-preferences'
|
||||
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/preferences/android')
|
||||
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@8.0.1_@capacitor+core@8.5.2/node_modules/@capacitor/preferences/android')
|
||||
|
||||
include ':capacitor-screen-orientation'
|
||||
project(':capacitor-screen-orientation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+screen-orientation@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/screen-orientation/android')
|
||||
project(':capacitor-screen-orientation').projectDir = new File('../../../node_modules/.pnpm/@capacitor+screen-orientation@8.0.1_@capacitor+core@8.5.2/node_modules/@capacitor/screen-orientation/android')
|
||||
|
||||
include ':capacitor-share'
|
||||
project(':capacitor-share').projectDir = new File('../../../node_modules/.pnpm/@capacitor+share@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/share/android')
|
||||
project(':capacitor-share').projectDir = new File('../../../node_modules/.pnpm/@capacitor+share@8.0.2_@capacitor+core@8.5.2/node_modules/@capacitor/share/android')
|
||||
|
||||
include ':capacitor-splash-screen'
|
||||
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/.pnpm/@capacitor+splash-screen@6.0.1_@capacitor+core@6.1.1/node_modules/@capacitor/splash-screen/android')
|
||||
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/.pnpm/@capacitor+splash-screen@8.0.2_@capacitor+core@8.5.2/node_modules/@capacitor/splash-screen/android')
|
||||
|
||||
include ':transistorsoft-capacitor-background-fetch'
|
||||
project(':transistorsoft-capacitor-background-fetch').projectDir = new File('../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@5.2.0_@capacitor+core@6.1.1/node_modules/@transistorsoft/capacitor-background-fetch/android')
|
||||
project(':transistorsoft-capacitor-background-fetch').projectDir = new File('../../../node_modules/.pnpm/@transistorsoft+capacitor-background-fetch@8.1.3_@capacitor+core@8.5.2/node_modules/@transistorsoft/capacitor-background-fetch/android')
|
||||
|
||||
include ':capacitor-secure-storage-plugin'
|
||||
project(':capacitor-secure-storage-plugin').projectDir = new File('../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.9.0_@capacitor+core@6.1.1/node_modules/capacitor-secure-storage-plugin/android')
|
||||
project(':capacitor-secure-storage-plugin').projectDir = new File('../../../node_modules/.pnpm/capacitor-secure-storage-plugin@0.13.0_@capacitor+core@8.5.2/node_modules/capacitor-secure-storage-plugin/android')
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Vendored
+22
-15
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -55,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -83,10 +85,8 @@ done
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -133,10 +133,13 @@ location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
@@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
@@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC3045
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
@@ -197,16 +200,20 @@ if "$cygwin" || "$msys" ; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
Vendored
+14
-12
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
echo. 1>&2
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||
echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
ext {
|
||||
minSdkVersion = 22
|
||||
compileSdkVersion = 34
|
||||
targetSdkVersion = 34
|
||||
androidxActivityVersion = '1.8.0'
|
||||
androidxAppCompatVersion = '1.6.1'
|
||||
androidxCoordinatorLayoutVersion = '1.2.0'
|
||||
androidxCoreVersion = '1.12.0'
|
||||
androidxFragmentVersion = '1.6.2'
|
||||
coreSplashScreenVersion = '1.0.1'
|
||||
androidxWebkitVersion = '1.9.0'
|
||||
minSdkVersion = 24
|
||||
compileSdkVersion = 36
|
||||
targetSdkVersion = 36
|
||||
androidxActivityVersion = '1.11.0'
|
||||
androidxAppCompatVersion = '1.7.1'
|
||||
androidxCoordinatorLayoutVersion = '1.3.0'
|
||||
androidxCoreVersion = '1.17.0'
|
||||
androidxFragmentVersion = '1.8.9'
|
||||
coreSplashScreenVersion = '1.2.0'
|
||||
androidxWebkitVersion = '1.14.0'
|
||||
junitVersion = '4.13.2'
|
||||
androidxJunitVersion = '1.1.5'
|
||||
androidxEspressoCoreVersion = '3.5.1'
|
||||
cordovaAndroidVersion = '10.1.1'
|
||||
androidxJunitVersion = '1.3.0'
|
||||
androidxEspressoCoreVersion = '3.7.0'
|
||||
cordovaAndroidVersion = '14.0.1'
|
||||
}
|
||||
@@ -11,12 +11,12 @@
|
||||
"schematics": {},
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"builder": "@angular-devkit/build-angular:application",
|
||||
"options": {
|
||||
"outputPath": "www",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "zone.js",
|
||||
"browser": "src/main.ts",
|
||||
"polyfills": ["zone.js", "src/ion-icons.js"],
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"allowedCommonJsDependencies": [
|
||||
"moment",
|
||||
@@ -40,6 +40,16 @@
|
||||
"glob": "CHANGELOG.md",
|
||||
"input": ".",
|
||||
"output": "assets"
|
||||
},
|
||||
{
|
||||
"glob": "maplibre-gl-worker.mjs",
|
||||
"input": "node_modules/maplibre-gl/dist",
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"glob": "maplibre-gl-shared.mjs",
|
||||
"input": "node_modules/maplibre-gl/dist",
|
||||
"output": "/"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
@@ -72,9 +82,7 @@
|
||||
]
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
@@ -197,6 +205,30 @@
|
||||
},
|
||||
"@ionic/angular-toolkit:page": {
|
||||
"styleext": "scss"
|
||||
},
|
||||
"@schematics/angular:component": {
|
||||
"type": "component"
|
||||
},
|
||||
"@schematics/angular:directive": {
|
||||
"type": "directive"
|
||||
},
|
||||
"@schematics/angular:service": {
|
||||
"type": "service"
|
||||
},
|
||||
"@schematics/angular:guard": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:interceptor": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:module": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:pipe": {
|
||||
"typeSeparator": "."
|
||||
},
|
||||
"@schematics/angular:resolver": {
|
||||
"typeSeparator": "."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import {CapacitorConfig} from '@capacitor/cli';
|
||||
const config: CapacitorConfig = {
|
||||
appId: 'de.anyschool.app',
|
||||
appName: 'StApps',
|
||||
webDir: 'www',
|
||||
webDir: 'www/browser',
|
||||
cordova: {
|
||||
preferences: {
|
||||
'AndroidXEnabled': 'true',
|
||||
|
||||
@@ -22,6 +22,7 @@ export default defineConfig({
|
||||
mochaFile: 'coverage/integration-report-junit-[hash].xml',
|
||||
},
|
||||
baseUrl: 'http://localhost:4200',
|
||||
injectDocumentDomain: true,
|
||||
supportFile: 'cypress/support/index.ts',
|
||||
videosFolder: 'cypress/videos',
|
||||
screenshotsFolder: 'cypress/screenshots',
|
||||
|
||||
@@ -175,16 +175,6 @@
|
||||
"hisometry": {
|
||||
"authProvider": "default",
|
||||
"url": "https://his-self-service.rz.uni-frankfurt.de"
|
||||
},
|
||||
"daia": {
|
||||
"url": "https://daia.hebis.de/DAIA2/UB_Frankfurt"
|
||||
},
|
||||
"hebisProxy": {
|
||||
"url": "https://proxy.ub.uni-frankfurt.de/login?qurl="
|
||||
},
|
||||
"paia": {
|
||||
"authProvider": "paia",
|
||||
"url": "https://hds.hebis.de/paia/core"
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
@@ -193,9 +183,6 @@
|
||||
},
|
||||
"feedback": {
|
||||
"urlPath": "/feedback"
|
||||
},
|
||||
"hebis-plugin": {
|
||||
"urlPath": "/hebissearch"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -229,19 +216,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "local_library",
|
||||
"route": "/hebis-search",
|
||||
"title": "library catalog",
|
||||
"translations": {
|
||||
"de": {
|
||||
"title": "Bibliothekskatalog"
|
||||
},
|
||||
"en": {
|
||||
"title": "library catalog"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "inventory_2",
|
||||
"route": "/catalog",
|
||||
@@ -299,7 +273,7 @@
|
||||
"icon": "school",
|
||||
"items": [
|
||||
{
|
||||
"icon": "grade",
|
||||
"icon": "star",
|
||||
"route": "/favorites",
|
||||
"title": "favorites",
|
||||
"translations": {
|
||||
@@ -324,20 +298,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"authProvider": "paia",
|
||||
"icon": "badge",
|
||||
"route": "/library-account",
|
||||
"title": "library account",
|
||||
"translations": {
|
||||
"de": {
|
||||
"title": "Bibliothekskonto"
|
||||
},
|
||||
"en": {
|
||||
"title": "library account"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"icon": "settings",
|
||||
"route": "/settings",
|
||||
@@ -473,24 +433,6 @@
|
||||
"token": "https://cas.rz.uni-frankfurt.de/cas/oauth2.0/accessToken",
|
||||
"userinfo": "https://cas.rz.uni-frankfurt.de/cas/oauth2.0/profile"
|
||||
}
|
||||
},
|
||||
"paia": {
|
||||
"client": {
|
||||
"clientId": "",
|
||||
"scopes": "",
|
||||
"url": "https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php"
|
||||
},
|
||||
"endpoints": {
|
||||
"authorization": "https://hds.hebis.de/Shibboleth.sso/UBFFM?target=https://hds.hebis.de/ubffm/paia_login_stub.php",
|
||||
"endSession": "https://ubffm.hds.hebis.de/Shibboleth.sso/Logout",
|
||||
"mapping": {
|
||||
"id": "$.email",
|
||||
"name": "$.name",
|
||||
"role": "$.type"
|
||||
},
|
||||
"token": "https://hds.hebis.de/paia/auth/login",
|
||||
"userinfo": "https://hds.hebis.de/paia/core"
|
||||
}
|
||||
}
|
||||
},
|
||||
"backend": {
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*/
|
||||
|
||||
describe('context menu', function () {
|
||||
const contextMenuSelector = 'stapps-context-menu-modal';
|
||||
|
||||
beforeEach(function () {
|
||||
cy.interceptSearch({
|
||||
extends: {query: 'a'},
|
||||
@@ -29,25 +31,25 @@ describe('context menu', function () {
|
||||
cy.patchSearchPage();
|
||||
cy.get('ion-searchbar').type('a');
|
||||
cy.wait('@search');
|
||||
cy.get('ion-searchbar > ion-menu-button').click();
|
||||
cy.get('ion-toolbar > ion-menu-button').click();
|
||||
});
|
||||
|
||||
it('should sort', function () {
|
||||
cy.get('stapps-context').within(() => {
|
||||
cy.get(contextMenuSelector).within(() => {
|
||||
cy.contains('ion-item', 'Name').click();
|
||||
cy.wait('@search');
|
||||
});
|
||||
});
|
||||
|
||||
it('should filter', function () {
|
||||
cy.get('stapps-context').within(() => {
|
||||
cy.get(contextMenuSelector).within(() => {
|
||||
cy.contains('ion-item', '(17) Akademische Veranstaltung').click();
|
||||
cy.wait('@search');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have a working delete button', function () {
|
||||
cy.get('stapps-context').within(() => {
|
||||
cy.get(contextMenuSelector).within(() => {
|
||||
cy.contains('ion-item', '(17) Akademische Veranstaltung').click();
|
||||
|
||||
cy.get('.checkbox-checked').should('have.length', 1);
|
||||
@@ -60,7 +62,7 @@ describe('context menu', function () {
|
||||
it('should truncate long category items', function () {
|
||||
cy.contains('ion-list', 'Akademische Veranstaltung / Kategorien').within(() => {
|
||||
cy.contains('ion-item', '(1) Tutorium').should('not.exist');
|
||||
cy.get('div > ion-button').click();
|
||||
cy.get('ion-button').click();
|
||||
cy.contains('ion-item', '(1) Tutorium').should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -33,9 +33,9 @@ describe('dashboard', async function () {
|
||||
describe('schedule section', function () {
|
||||
it('should lead to the week overview', function () {
|
||||
cy.get('.schedule')
|
||||
.contains('a', /Wochen.*übersicht/)
|
||||
.contains('a', /Wochen.*ansicht/)
|
||||
.click();
|
||||
cy.url().should('include', '/schedule/week-overview');
|
||||
cy.url().should('include', '/schedule/weekly-view');
|
||||
});
|
||||
|
||||
it('should lead to the calendar', function () {
|
||||
|
||||
@@ -41,8 +41,8 @@ describe('favorites', function () {
|
||||
});
|
||||
cy.get('stapps-favorite-button').click();
|
||||
cy.get('stapps-favorite-button > ion-button > ion-icon')
|
||||
.invoke('attr', 'ng-reflect-fill')
|
||||
.should('eq', 'true');
|
||||
.invoke('attr', 'class')
|
||||
.should('eq', 'selected');
|
||||
});
|
||||
cy.visit('/favorites');
|
||||
cy.get('stapps-data-list-item').within(() => {
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('schedule', function () {
|
||||
cy.get('ion-searchbar').click().type('a');
|
||||
cy.wait('@search');
|
||||
cy.wait('@chips');
|
||||
cy.wait(200);
|
||||
cy.wait(1000);
|
||||
cy.contains('ion-item', 'UNIcert (Test)')
|
||||
.contains('stapps-add-event-action-chip', 'Termine Auswählen')
|
||||
.click();
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import equal from 'fast-deep-equal';
|
||||
import {extendsDeepEqual} from '@openstapps/collection-utils';
|
||||
import {SCSearchRequest, SCSearchResponse} from '@openstapps/core';
|
||||
import {CORE_VERSION, SCIndexResponse, SCSearchRequest, SCSearchResponse} from '@openstapps/core';
|
||||
import * as defaultConfig from '../../fixtures/config/default-config.json';
|
||||
|
||||
type InterceptArguments = {
|
||||
fixture?: string | SCSearchResponse | ((request: SCSearchRequest) => SCSearchResponse);
|
||||
@@ -34,7 +35,12 @@ type InterceptArguments = {
|
||||
*
|
||||
*/
|
||||
export function interceptConfig(config?: string) {
|
||||
cy.intercept({url: '/', method: 'POST'}, {fixture: config || 'config/default-config.json'}).as('config');
|
||||
let localConfig: SCIndexResponse = defaultConfig as unknown as SCIndexResponse;
|
||||
localConfig.backend.SCVersion = CORE_VERSION;
|
||||
cy.intercept(
|
||||
{url: '/', method: 'POST'},
|
||||
config ? {fixture: config} : {body: JSON.stringify(localConfig)},
|
||||
).as('config');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@ const config = {
|
||||
htmlGlob: 'src/**/*.html',
|
||||
scriptGlob: 'src/**/*.ts',
|
||||
additionalIcons: {
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet'],
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet', 'expand_more', 'expand_all'],
|
||||
navigation: [
|
||||
'home',
|
||||
'newspaper',
|
||||
@@ -30,7 +30,7 @@ const config = {
|
||||
'local_library',
|
||||
'inventory_2',
|
||||
'map',
|
||||
'grade',
|
||||
'star',
|
||||
'account_circle',
|
||||
'settings',
|
||||
'info',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user