diff --git a/.github/workflows/app-eps_develop.yml b/.github/workflows/app-eps_develop.yml index e9d66debb..23719110b 100644 --- a/.github/workflows/app-eps_develop.yml +++ b/.github/workflows/app-eps_develop.yml @@ -45,14 +45,23 @@ jobs: password: ${{ secrets.DOCKER_HUB_PW }} - name: Build and push to docker.io - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: ./infrastructure/docker/app-eps/ tags: ${{ steps.meta.outputs.tags }} - push: true + push: false + load: true labels: | app-eps.image.revision=${{ github.sha }} + - name: Sign and push docker image + uses: sudo-bot/action-docker-sign@latest + with: + image-ref: ${{steps.meta.outputs.tags}} + private-key-id: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + private-key: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + private-key-passphrase: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} + container_scan: name: Container Scan needs: build_and_push diff --git a/.github/workflows/bff_develop.yml b/.github/workflows/bff_develop.yml index 7f3e64aef..312a4ad05 100644 --- a/.github/workflows/bff_develop.yml +++ b/.github/workflows/bff_develop.yml @@ -44,10 +44,21 @@ jobs: - name: build, package and publish the image run: | - mvn -B clean verify spring-boot:build-image -am -pl iris-client-bff -Dspring-boot.build-image.publish=true -Dversion.tag=${{ steps.meta.outputs.version }} - env: - DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} - DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + mvn -B clean verify spring-boot:build-image -am -pl iris-client-bff -Dspring-boot.build-image.publish=false -Dimage.tag=${{ steps.meta.outputs.tags }} + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USER }} + password: ${{ secrets.DOCKER_HUB_PW }} + + - name: Sign and push docker image + uses: sudo-bot/action-docker-sign@latest + with: + image-ref: ${{steps.meta.outputs.tags}} + private-key-id: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + private-key: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + private-key-passphrase: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} - name: Upload Test Reports if: always() diff --git a/.github/workflows/fe-e2e-test.yml b/.github/workflows/fe-e2e-test.yml index 9b140da2c..5dc4cf93f 100644 --- a/.github/workflows/fe-e2e-test.yml +++ b/.github/workflows/fe-e2e-test.yml @@ -22,7 +22,7 @@ jobs: - name: Cypress run # Install NPM dependencies, cache them correctly and run all Cypress tests - uses: cypress-io/github-action@v2.11.7 + uses: cypress-io/github-action@v3.0.2 timeout-minutes: 20 with: browser: chrome diff --git a/.github/workflows/fe_develop.yml b/.github/workflows/fe_develop.yml index 9cf9e398e..940826731 100644 --- a/.github/workflows/fe_develop.yml +++ b/.github/workflows/fe_develop.yml @@ -40,17 +40,26 @@ jobs: password: ${{ secrets.DOCKER_HUB_PW }} - name: Build and push to docker.io - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: ./iris-client-fe/ tags: ${{ steps.meta.outputs.tags }} - push: true + push: false + load: true build-args: | VUE_APP_VERSION_ID=${{ steps.meta.outputs.tags }} VUE_APP_BUILD_ID=${{ github.sha }} labels: | iris.client-fe.image.revision=${{ github.sha }} + - name: Sign and push docker image + uses: sudo-bot/action-docker-sign@latest + with: + image-ref: ${{steps.meta.outputs.tags}} + private-key-id: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + private-key: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + private-key-passphrase: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} + container_scan: name: Container Scan needs: build_and_push diff --git a/.github/workflows/iris-client-eps_develop.yml b/.github/workflows/iris-client-eps_develop.yml index 312823408..5e76d8cf1 100644 --- a/.github/workflows/iris-client-eps_develop.yml +++ b/.github/workflows/iris-client-eps_develop.yml @@ -45,14 +45,23 @@ jobs: password: ${{ secrets.DOCKER_HUB_PW }} - name: Build and push to docker.io - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: ./infrastructure/docker/iris-client-eps/ tags: ${{ steps.meta.outputs.tags }} - push: true + push: false + load: true labels: | iris.client-eps.image.revision=${{ github.sha }} + - name: Sign and push docker image + uses: sudo-bot/action-docker-sign@latest + with: + image-ref: ${{steps.meta.outputs.tags}} + private-key-id: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + private-key: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + private-key-passphrase: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} + container_scan: name: Container Scan needs: build_and_push diff --git a/.github/workflows/iris-client-proxy_develop.yml b/.github/workflows/iris-client-proxy_develop.yml index 69bb1f84e..c612e4b63 100644 --- a/.github/workflows/iris-client-proxy_develop.yml +++ b/.github/workflows/iris-client-proxy_develop.yml @@ -45,14 +45,23 @@ jobs: password: ${{ secrets.DOCKER_HUB_PW }} - name: Build and push to docker.io - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: ./infrastructure/docker/iris-client-proxy/ tags: ${{ steps.meta.outputs.tags }} - push: true + push: false + load: true labels: | iris.client-proxy.image.revision=${{ github.sha }} + - name: Sign and push docker image + uses: sudo-bot/action-docker-sign@latest + with: + image-ref: ${{steps.meta.outputs.tags}} + private-key-id: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + private-key: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + private-key-passphrase: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} + container_scan: name: Container Scan needs: build_and_push diff --git a/.github/workflows/nginx_develop.yml b/.github/workflows/nginx_develop.yml index 9be4da999..7a0e7f1af 100644 --- a/.github/workflows/nginx_develop.yml +++ b/.github/workflows/nginx_develop.yml @@ -13,6 +13,8 @@ on: branches: - develop paths: + - iris-client-fe/** + - iris-client-bff/** - infrastructure/docker/nginx/** - .github/workflows/nginx_develop.yml @@ -45,14 +47,23 @@ jobs: password: ${{ secrets.DOCKER_HUB_PW }} - name: Build and push to docker.io - uses: docker/build-push-action@v2.8.0 + uses: docker/build-push-action@v2.9.0 with: context: ./infrastructure/docker/nginx/ tags: ${{ steps.meta.outputs.tags }} - push: true + push: false + load: true labels: | iris.client-nginx.image.revision=${{ github.sha }} + - name: Sign and push docker image + uses: sudo-bot/action-docker-sign@latest + with: + image-ref: ${{steps.meta.outputs.tags}} + private-key-id: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + private-key: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + private-key-passphrase: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} + container_scan: name: Container Scan needs: build_and_push diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index 34546c0c6..6433a48e9 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -17,6 +17,11 @@ jobs: if: "!contains(github.event.head_commit.message, 'skip ci')" runs-on: ubuntu-latest + env: + DCT_PRIVATE_KEY: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY }} + DCT_PRIVATE_KEY_PASSPHRASE: ${{ secrets.DOCKER_HUB_DCT_PASSPHRASE }} + DCT_PRIVATE_KEY_IDENTIFIER: ${{ secrets.DOCKER_HUB_DCT_PRIVATE_KEY_IDENTIFIER }} + steps: - name: Checkout code uses: actions/checkout@v2.4.0 @@ -35,7 +40,10 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_PW }} - + + - name: Setup DCT + run: sh ./.setup_dct.sh + - run: chmod +x ./.prepare-release.sh - run: node -v; npm -v diff --git a/.prepare-release.sh b/.prepare-release.sh index e788f60ed..02cc653a2 100644 --- a/.prepare-release.sh +++ b/.prepare-release.sh @@ -108,12 +108,13 @@ printf "\n Set version to POMs and build BFF image and JAR \n\n" # Set new version in pom.xml using mvn versions:set command mvn versions:set -DnewVersion=$VERSION -DprocessAllModules=true +BFF_IMAGE_NAME="$NAMESPACE/iris-client-bff" + # Package the new version and copy it to release folder # These files will be upload to github by @semantic-release/github -mvn -B clean verify spring-boot:repackage spring-boot:build-image -Dspring-boot.build-image.publish=false +mvn -B clean verify spring-boot:repackage spring-boot:build-image -Dspring-boot.build-image.publish=false -Dimage.tag=$BFF_IMAGE_NAME:$VERSION mkdir release && cp ./iris-client-bff/target/*.jar release -BFF_IMAGE_NAME="$NAMESPACE/iris-client-bff" docker tag $BFF_IMAGE_NAME:$VERSION $BFF_IMAGE_NAME:latest docker tag $BFF_IMAGE_NAME:$VERSION $BFF_IMAGE_NAME:$MAJOR_LATEST docker tag $BFF_IMAGE_NAME:$VERSION $BFF_IMAGE_NAME:$MINOR_LATEST @@ -169,6 +170,49 @@ cd ../../infrastructure/stand-alone-deployment && zip -qr ../../release/stand-al cd ../../ +printf "\n Signing images and tags with DCT \n\n" + +# print identifier of used dct signing key +echo "signing-key identifier = $DCT_PRIVATE_KEY_IDENTIFIER" +export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE="$DCT_PRIVATE_KEY_PASSPHRASE" +export DOCKER_CONTENT_TRUST=1 + +docker trust sign --local $NGINX_IMAGE_NAME:$VERSION +docker trust sign --local $NGINX_IMAGE_NAME:$MAJOR_LATEST +docker trust sign --local $NGINX_IMAGE_NAME:$MINOR_LATEST +docker trust sign --local $IRIS_CLIENT_EPS_IMAGE_NAME:$VERSION +docker trust sign --local $IRIS_CLIENT_EPS_IMAGE_NAME:$MAJOR_LATEST +docker trust sign --local $IRIS_CLIENT_EPS_IMAGE_NAME:$MINOR_LATEST +docker trust sign --local $IRIS_CLIENT_PROXY_IMAGE_NAME:$VERSION +docker trust sign --local $IRIS_CLIENT_PROXY_IMAGE_NAME:$MAJOR_LATEST +docker trust sign --local $IRIS_CLIENT_PROXY_IMAGE_NAME:$MINOR_LATEST +docker trust sign --local $APP_EPS_IMAGE_NAME:$VERSION +docker trust sign --local $APP_EPS_IMAGE_NAME:$MAJOR_LATEST +docker trust sign --local $APP_EPS_IMAGE_NAME:$MINOR_LATEST +docker trust sign --local $FE_IMAGE_NAME:$VERSION +docker trust sign --local $FE_IMAGE_NAME:$MAJOR_LATEST +docker trust sign --local $FE_IMAGE_NAME:$MINOR_LATEST +docker trust sign --local $BFF_IMAGE_NAME:latest +docker trust sign --local $BFF_IMAGE_NAME:$MAJOR_LATEST +docker trust sign --local $BFF_IMAGE_NAME:$MINOR_LATEST + +if (( $RELEASE )); then + docker trust sign --local $NGINX_IMAGE_NAME:$MAJOR + docker trust sign --local $NGINX_IMAGE_NAME:$MINOR + docker trust sign --local $IRIS_CLIENT_EPS_IMAGE_NAME:$MAJOR + docker trust sign --local $IRIS_CLIENT_EPS_IMAGE_NAME:$MINOR + docker trust sign --local $IRIS_CLIENT_PROXY_IMAGE_NAME:$MAJOR + docker trust sign --local $IRIS_CLIENT_PROXY_IMAGE_NAME:$MINOR + docker trust sign --local $APP_EPS_IMAGE_NAME:$MAJOR + docker trust sign --local $APP_EPS_IMAGE_NAME:$MINOR + docker trust sign --local $FE_IMAGE_NAME:$MAJOR + docker trust sign --local $FE_IMAGE_NAME:$MINOR + docker trust sign --local $BFF_IMAGE_NAME:$MAJOR + docker trust sign --local $BFF_IMAGE_NAME:$MINOR +fi + +export DOCKER_CONTENT_TRUST=0 + printf "\n Push images and tags to docker registry \n\n" docker push $BFF_IMAGE_NAME:$VERSION diff --git a/.reuse/dep5 b/.reuse/dep5 index ac7ac3373..e75e260e5 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -5,13 +5,13 @@ Source: https://github.com/iris-connect/iris-client Files: * # Copyright: $YEAR $NAME <$CONTACT> -Copyright: 2021-2021 The IRIS Client Authors (see AUTHORS.md) +Copyright: 2021-present The IRIS Client Authors (see AUTHORS.md) License: AGPL-3.0-or-later # File from SORMAS with own license -Files: iris-client-bff/src/main/java/iris/client_bff/core/Base32.java -Copyright: Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) -License: GPL-3.0-or-later +#Files: iris-client-bff/src/main/java/iris/client_bff/core/Base32.java +#Copyright: Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) +#License: GPL-3.0-or-later # Files from Maven Wrapper with own license Files: **/MavenWrapperDownloader.java diff --git a/.setup_dct.sh b/.setup_dct.sh new file mode 100644 index 000000000..3807e9d27 --- /dev/null +++ b/.setup_dct.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# exit when any command fails +set -e + +DCT_PATH=~/.docker/trust/private/ + +DCT_KEY_FILE="$DCT_PATH$DCT_PRIVATE_KEY_IDENTIFIER.key" + +mkdir -p "$DCT_PATH" + +echo "$DCT_PRIVATE_KEY" > "$DCT_KEY_FILE" + +chmod 600 "$DCT_KEY_FILE" + +export DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE="$DCT_PRIVATE_KEY_PASSPHRASE" +export DOCKER_CONTENT_TRUST=1 +docker trust key load "$DCT_KEY_FILE" + diff --git a/AUTHORS.md b/AUTHORS.md index 0fdbcd618..c5adf7132 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -10,3 +10,4 @@ This file lists all individual authors that have contributed significant code to * Nadine Schwingler * Tim Lusa * Fabio Aversente +* Timo Bögner diff --git a/BFF-THIRD-PARTY-LICENSES.md b/BFF-THIRD-PARTY-LICENSES.md index 70b6542f2..8fd5c8118 100644 --- a/BFF-THIRD-PARTY-LICENSES.md +++ b/BFF-THIRD-PARTY-LICENSES.md @@ -19,7 +19,7 @@ List of third-party dependencies grouped by their license type. * spring-commons (io.rest-assured:spring-commons:4.4.0 - http://maven.apache.org) * spring-mock-mvc (io.rest-assured:spring-mock-mvc:4.4.0 - http://maven.apache.org) * xml-path (io.rest-assured:xml-path:4.4.0 - http://code.google.com/p/rest-assured/xml-path) - * Swagger UI (org.webjars:swagger-ui:4.1.3 - http://webjars.org) + * Swagger UI (org.webjars:swagger-ui:4.5.0 - http://webjars.org) Apache License 2.0: @@ -52,13 +52,12 @@ List of third-party dependencies grouped by their license type. * Apache HttpClient Mime (org.apache.httpcomponents:httpmime:4.5.13 - http://hc.apache.org/httpcomponents-client) * Apache Log4j API (org.apache.logging.log4j:log4j-api:2.17.1 - https://logging.apache.org/log4j/2.x/log4j-api/) * Apache Log4j to SLF4J Adapter (org.apache.logging.log4j:log4j-to-slf4j:2.17.1 - https://logging.apache.org/log4j/2.x/log4j-to-slf4j/) - * Lucene Common Analyzers (org.apache.lucene:lucene-analyzers-common:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-analyzers-common) - * Lucene Core (org.apache.lucene:lucene-core:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-core) - * Lucene Facets (org.apache.lucene:lucene-facet:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-facet) - * Lucene Join (org.apache.lucene:lucene-join:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-join) - * Lucene Queries (org.apache.lucene:lucene-queries:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-queries) - * Lucene QueryParsers (org.apache.lucene:lucene-queryparser:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-queryparser) - * Lucene Sandbox (org.apache.lucene:lucene-sandbox:8.7.0 - https://lucene.apache.org/lucene-parent/lucene-sandbox) + * Lucene Common Analyzers (org.apache.lucene:lucene-analyzers-common:8.11.1 - https://lucene.apache.org/lucene-parent/lucene-analyzers-common) + * Lucene Core (org.apache.lucene:lucene-core:8.11.1 - https://lucene.apache.org/lucene-parent/lucene-core) + * Lucene Facets (org.apache.lucene:lucene-facet:8.11.1 - https://lucene.apache.org/lucene-parent/lucene-facet) + * Lucene Join (org.apache.lucene:lucene-join:8.11.1 - https://lucene.apache.org/lucene-parent/lucene-join) + * Lucene Queries (org.apache.lucene:lucene-queries:8.11.1 - https://lucene.apache.org/lucene-parent/lucene-queries) + * Lucene QueryParsers (org.apache.lucene:lucene-queryparser:8.11.1 - https://lucene.apache.org/lucene-parent/lucene-queryparser) * Maven Artifact Resolver API (org.apache.maven.resolver:maven-resolver-api:1.4.1 - https://maven.apache.org/resolver/maven-resolver-api/) * tomcat-embed-core (org.apache.tomcat.embed:tomcat-embed-core:9.0.56 - https://tomcat.apache.org/) * tomcat-embed-el (org.apache.tomcat.embed:tomcat-embed-el:9.0.56 - https://tomcat.apache.org/) @@ -148,7 +147,7 @@ List of third-party dependencies grouped by their license type. BSD-2-Clause: * HdrHistogram (org.hdrhistogram:HdrHistogram:2.1.12 - http://hdrhistogram.github.io/HdrHistogram/) - * PostgreSQL JDBC Driver (org.postgresql:postgresql:42.3.1 - https://jdbc.postgresql.org) + * PostgreSQL JDBC Driver (org.postgresql:postgresql:42.3.3 - https://jdbc.postgresql.org) BSD-3-Clause: @@ -220,6 +219,7 @@ List of third-party dependencies grouped by their license type. Eclipse Distribution License v. 1.0: * Jakarta Persistence API (jakarta.persistence:jakarta.persistence-api:2.2.3 - https://github.com/eclipse-ee4j/jpa-api) + * javax.persistence-api (javax.persistence:javax.persistence-api:2.2 - https://github.com/javaee/jpa-spec) * SDO API (org.eclipse.persistence:commonj.sdo:2.1.1 - http://www.eclipse.org/eclipselink) * EclipseLink Core (org.eclipse.persistence:org.eclipse.persistence.core:2.7.9 - http://www.eclipse.org/eclipselink) * EclipseLink Moxy (org.eclipse.persistence:org.eclipse.persistence.moxy:2.7.9 - http://www.eclipse.org/eclipselink) @@ -252,6 +252,7 @@ List of third-party dependencies grouped by their license type. Eclipse Public License v1.0: + * javax.persistence-api (javax.persistence:javax.persistence-api:2.2 - https://github.com/javaee/jpa-spec) * Eclipse ECJ (org.eclipse.jdt.core.compiler:ecj:4.4.2 - http://www.eclipse.org/jdt/) * SDO API (org.eclipse.persistence:commonj.sdo:2.1.1 - http://www.eclipse.org/eclipselink) @@ -278,11 +279,11 @@ List of third-party dependencies grouped by their license type. GNU Lesser General Public License v2.1 or later: - * Hibernate Search Backend - Lucene (org.hibernate.search:hibernate-search-backend-lucene:6.0.6.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-backend-lucene/) - * Hibernate Search Engine (org.hibernate.search:hibernate-search-engine:6.0.6.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-engine/) - * Hibernate Search ORM Integration (org.hibernate.search:hibernate-search-mapper-orm:6.0.6.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-mapper-orm/) - * Hibernate Search Mapper - POJO Base (org.hibernate.search:hibernate-search-mapper-pojo-base:6.0.6.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-mapper-pojo-base/) - * Hibernate Search Utils - Common (org.hibernate.search:hibernate-search-util-common:6.0.6.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-util-common/) + * Hibernate Search Backend - Lucene (org.hibernate.search:hibernate-search-backend-lucene:6.1.1.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-backend-lucene/) + * Hibernate Search Engine (org.hibernate.search:hibernate-search-engine:6.1.1.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-engine/) + * Hibernate Search ORM Integration (org.hibernate.search:hibernate-search-mapper-orm:6.1.1.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-mapper-orm/) + * Hibernate Search Mapper - POJO Base (org.hibernate.search:hibernate-search-mapper-pojo-base:6.1.1.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-mapper-pojo-base/) + * Hibernate Search Utils - Common (org.hibernate.search:hibernate-search-util-common:6.1.1.Final - http://hibernate.org/search/hibernate-search-parent-public/hibernate-search-util-common/) GNU Library General Public License v2.1 or later: @@ -355,9 +356,9 @@ List of third-party dependencies grouped by their license type. * Woodstox (com.fasterxml.woodstox:woodstox-core:6.2.6 - https://github.com/FasterXML/woodstox) * org.apiguardian:apiguardian-api (org.apiguardian:apiguardian-api:1.1.2 - https://github.com/apiguardian-team/apiguardian) * org.opentest4j:opentest4j (org.opentest4j:opentest4j:1.2.0 - https://github.com/ota4j-team/opentest4j) - * springdoc-openapi-common (org.springdoc:springdoc-openapi-common:1.6.4 - https://springdoc.org/springdoc-openapi-common/) - * springdoc-openapi-ui (org.springdoc:springdoc-openapi-ui:1.6.4 - https://springdoc.org/springdoc-openapi-ui/) - * springdoc-openapi-webmvc-core (org.springdoc:springdoc-openapi-webmvc-core:1.6.4 - https://springdoc.org/springdoc-openapi-webmvc-core/) + * springdoc-openapi-common (org.springdoc:springdoc-openapi-common:1.6.6 - https://springdoc.org/springdoc-openapi-common/) + * springdoc-openapi-ui (org.springdoc:springdoc-openapi-ui:1.6.6 - https://springdoc.org/springdoc-openapi-ui/) + * springdoc-openapi-webmvc-core (org.springdoc:springdoc-openapi-webmvc-core:1.6.6 - https://springdoc.org/springdoc-openapi-webmvc-core/) The Apache Software License, Version 2.0: diff --git a/CHANGELOG.md b/CHANGELOG.md index dfbab1f58..44c039596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +# [1.4.0-rc.3](https://github.com/iris-connect/iris-client/compare/v1.4.0-rc.2...v1.4.0-rc.3) (2022-02-21) + + +### Bug Fixes + +* Removes license reference for code from SORMAS that isn't used anymore. ([00db4a4](https://github.com/iris-connect/iris-client/commit/00db4a410fad6edc69ae7437c73030309a74ca5a)) + +# [1.4.0-rc.2](https://github.com/iris-connect/iris-client/compare/v1.4.0-rc.1...v1.4.0-rc.2) (2022-02-21) + + +### Bug Fixes + +* **deps:** Updates Postgresql JDBC driver (now 42.3.2) to fix a vulnerability in this dependency. ([7dd2641](https://github.com/iris-connect/iris-client/commit/7dd2641b44ced77146461622c4b84f8fa2eb48ac)) +* Updates data-export code to handle breaking changes of sheetJS module export. ([f4f38c8](https://github.com/iris-connect/iris-client/commit/f4f38c81e7c3626d52bbedd837a128b569c522fb)), closes [#628](https://github.com/iris-connect/iris-client/issues/628) + + +### Features + +* Extends the audit metadata in BFF to save who create and last modify an entity. ([246eaa5](https://github.com/iris-connect/iris-client/commit/246eaa5833cbe85d765093420df9f729221875dd)), closes [iris-connect/iris-backlog#234](https://github.com/iris-connect/iris-backlog/issues/234) [#597](https://github.com/iris-connect/iris-client/issues/597) +* Health departments with IRIS can send messages to each other, encrypted and secured via the IRIS-Connect secure network. There is a central output and input for messages. Currently, only text messages are possible. In the near future, data sets as attachments will follow. ([6922f2c](https://github.com/iris-connect/iris-client/commit/6922f2c8dd3f7bbf0eed4b576625c45762450379)), closes [iris-connect/iris-backlog#256](https://github.com/iris-connect/iris-backlog/issues/256) [iris-connect/iris-backlog#259](https://github.com/iris-connect/iris-backlog/issues/259) [#541](https://github.com/iris-connect/iris-client/issues/541) + +# [1.4.0-rc.1](https://github.com/iris-connect/iris-client/compare/v1.3.1...v1.4.0-rc.1) (2022-02-04) + + +### Features + +* Images are signed before uploading to docker to insure their integrity. ([20f4381](https://github.com/iris-connect/iris-client/commit/20f4381115bb24d5f0ecc550c9ba66bb1c3f5b86)), closes [#569](https://github.com/iris-connect/iris-client/issues/569) + ## [1.3.1](https://github.com/iris-connect/iris-client/compare/v1.3.0...v1.3.1) (2022-02-01) diff --git a/FE-THIRD-PARTY-LICENSES-DEV.md b/FE-THIRD-PARTY-LICENSES-DEV.md index 1413a8cd0..a2520b4ca 100644 --- a/FE-THIRD-PARTY-LICENSES-DEV.md +++ b/FE-THIRD-PARTY-LICENSES-DEV.md @@ -1,14 +1,14 @@ module name | license | repository ---|---|--- @babel/code-frame@7.16.7 | MIT | https://github.com/babel/babel -@babel/compat-data@7.16.8 | MIT | https://github.com/babel/babel +@babel/compat-data@7.17.0 | MIT | https://github.com/babel/babel @babel/core@7.16.0 | MIT | https://github.com/babel/babel @babel/generator@7.16.8 | MIT | https://github.com/babel/babel @babel/helper-annotate-as-pure@7.16.7 | MIT | https://github.com/babel/babel @babel/helper-builder-binary-assignment-operator-visitor@7.16.7 | MIT | https://github.com/babel/babel @babel/helper-compilation-targets@7.16.7 | MIT | https://github.com/babel/babel -@babel/helper-create-class-features-plugin@7.16.7 | MIT | https://github.com/babel/babel -@babel/helper-create-regexp-features-plugin@7.16.7 | MIT | https://github.com/babel/babel +@babel/helper-create-class-features-plugin@7.17.1 | MIT | https://github.com/babel/babel +@babel/helper-create-regexp-features-plugin@7.17.0 | MIT | https://github.com/babel/babel @babel/helper-define-polyfill-provider@0.3.1 | MIT | https://github.com/babel/babel-polyfills @babel/helper-environment-visitor@7.16.7 | MIT | https://github.com/babel/babel @babel/helper-explode-assignable-expression@7.16.7 | MIT | https://github.com/babel/babel @@ -36,23 +36,23 @@ module name | license | repository @babel/plugin-proposal-async-generator-functions@7.16.8 | MIT | https://github.com/babel/babel @babel/plugin-proposal-class-properties@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-class-static-block@7.16.7 | MIT | https://github.com/babel/babel -@babel/plugin-proposal-decorators@7.16.7 | MIT | https://github.com/babel/babel +@babel/plugin-proposal-decorators@7.17.2 | MIT | https://github.com/babel/babel @babel/plugin-proposal-dynamic-import@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-export-namespace-from@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-json-strings@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-logical-assignment-operators@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-nullish-coalescing-operator@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-numeric-separator@7.16.7 | MIT | https://github.com/babel/babel -@babel/plugin-proposal-object-rest-spread@7.16.7 | MIT | https://github.com/babel/babel +@babel/plugin-proposal-object-rest-spread@7.17.3 | MIT | https://github.com/babel/babel @babel/plugin-proposal-optional-catch-binding@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-optional-chaining@7.16.7 | MIT | https://github.com/babel/babel -@babel/plugin-proposal-private-methods@7.16.7 | MIT | https://github.com/babel/babel +@babel/plugin-proposal-private-methods@7.16.11 | MIT | https://github.com/babel/babel @babel/plugin-proposal-private-property-in-object@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-proposal-unicode-property-regex@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-syntax-async-generators@7.8.4 | MIT | https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators @babel/plugin-syntax-class-properties@7.12.13 | MIT | https://github.com/babel/babel @babel/plugin-syntax-class-static-block@7.14.5 | MIT | https://github.com/babel/babel -@babel/plugin-syntax-decorators@7.16.7 | MIT | https://github.com/babel/babel +@babel/plugin-syntax-decorators@7.17.0 | MIT | https://github.com/babel/babel @babel/plugin-syntax-dynamic-import@7.8.3 | MIT | https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-dynamic-import @babel/plugin-syntax-export-namespace-from@7.8.3 | MIT | https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-export-namespace-from @babel/plugin-syntax-json-strings@7.8.3 | MIT | https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-json-strings @@ -71,7 +71,7 @@ module name | license | repository @babel/plugin-transform-block-scoping@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-classes@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-computed-properties@7.16.7 | MIT | https://github.com/babel/babel -@babel/plugin-transform-destructuring@7.16.7 | MIT | https://github.com/babel/babel +@babel/plugin-transform-destructuring@7.17.3 | MIT | https://github.com/babel/babel @babel/plugin-transform-dotall-regex@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-duplicate-keys@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-exponentiation-operator@7.16.7 | MIT | https://github.com/babel/babel @@ -90,7 +90,7 @@ module name | license | repository @babel/plugin-transform-property-literals@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-regenerator@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-reserved-words@7.16.7 | MIT | https://github.com/babel/babel -@babel/plugin-transform-runtime@7.16.8 | MIT | https://github.com/babel/babel +@babel/plugin-transform-runtime@7.17.0 | MIT | https://github.com/babel/babel @babel/plugin-transform-shorthand-properties@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-spread@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-sticky-regex@7.16.7 | MIT | https://github.com/babel/babel @@ -98,15 +98,15 @@ module name | license | repository @babel/plugin-transform-typeof-symbol@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-unicode-escapes@7.16.7 | MIT | https://github.com/babel/babel @babel/plugin-transform-unicode-regex@7.16.7 | MIT | https://github.com/babel/babel -@babel/preset-env@7.16.8 | MIT | https://github.com/babel/babel +@babel/preset-env@7.16.11 | MIT | https://github.com/babel/babel @babel/preset-modules@0.1.5 | MIT | https://github.com/babel/preset-modules -@babel/runtime@7.16.7 | MIT | https://github.com/babel/babel +@babel/runtime@7.17.2 | MIT | https://github.com/babel/babel @babel/template@7.16.7 | MIT | https://github.com/babel/babel @babel/traverse@7.16.8 | MIT | https://github.com/babel/babel @babel/types@7.16.8 | MIT | https://github.com/babel/babel @cypress/request@2.88.10 | Apache-2.0 | https://github.com/cypress-io/request @cypress/xvfb@1.2.4 | MIT | https://github.com/cypress-io/xvfb -@eslint/eslintrc@1.0.5 | MIT | https://github.com/eslint/eslintrc +@eslint/eslintrc@1.1.0 | MIT | https://github.com/eslint/eslintrc @hapi/hoek@9.2.1 | BSD-3-Clause | https://github.com/hapijs/hoek @hapi/topo@5.1.0 | BSD-3-Clause | https://github.com/hapijs/topo @humanwhocodes/config-array@0.9.2 | Apache-2.0 | https://github.com/humanwhocodes/config-array @@ -117,7 +117,7 @@ module name | license | repository @nodelib/fs.walk@1.2.8 | MIT | https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk @polka/url@1.0.0-next.21 | MIT | https://github.com/lukeed/polka @rushstack/eslint-patch@1.1.0 | MIT | https://github.com/microsoft/rushstack -@sideway/address@4.1.2 | BSD-3-Clause | https://github.com/sideway/address +@sideway/address@4.1.3 | BSD-3-Clause | https://github.com/sideway/address @sideway/formula@3.0.0 | BSD-3-Clause | https://github.com/sideway/formula @sideway/pinpoint@2.0.0 | BSD-3-Clause | https://github.com/sideway/pinpoint @soda/friendly-errors-webpack-plugin@1.8.1 | MIT | https://github.com/sodatea/friendly-errors-webpack-plugin @@ -127,9 +127,9 @@ module name | license | repository @types/bonjour@3.5.9 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/connect-history-api-fallback@1.3.5 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/connect@3.4.35 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped -@types/eslint-scope@3.7.1 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped +@types/eslint-scope@3.7.3 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/eslint@7.28.2 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped -@types/estree@0.0.50 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped +@types/estree@0.0.51 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/express-serve-static-core@4.17.25 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/express@4.17.13 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/html-minifier-terser@6.0.0 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @@ -148,8 +148,6 @@ module name | license | repository @types/sinonjs__fake-timers@8.1.1 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/sizzle@2.3.3 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/sockjs@0.3.33 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped -@types/webpack-dev-middleware@5.0.2 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped -@types/webpack-dev-server@4.3.1 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/webpack-env@1.16.3 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/ws@8.2.2 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @types/yauzl@2.9.2 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped @@ -168,7 +166,7 @@ module name | license | repository @vue/babel-helper-vue-transform-on@1.0.2 | MIT | @vue/babel-plugin-jsx@1.1.1 | MIT | https://github.com/vuejs/jsx-next @vue/babel-plugin-transform-vue-jsx@1.2.1 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-plugin-transform-vue-jsx -@vue/babel-preset-app@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli +@vue/babel-preset-app@5.0.1 | MIT | https://github.com/vuejs/vue-cli @vue/babel-preset-jsx@1.2.4 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-preset-jsx @vue/babel-sugar-composition-api-inject-h@1.2.1 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-sugar-composition-api-inject-h @vue/babel-sugar-composition-api-render-instance@1.2.4 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-sugar-composition-api-render-instance @@ -176,15 +174,15 @@ module name | license | repository @vue/babel-sugar-inject-h@1.2.2 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-sugar-inject-h @vue/babel-sugar-v-model@1.2.3 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-sugar-v-model @vue/babel-sugar-v-on@1.2.3 | MIT | https://github.com/vuejs/jsx/tree/master/packages/babel-sugar-v-on -@vue/cli-overlay@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-plugin-babel@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-plugin-e2e-cypress@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-plugin-eslint@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-plugin-router@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-plugin-typescript@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-plugin-vuex@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-service@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli -@vue/cli-shared-utils@5.0.0-rc.2 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-overlay@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-plugin-babel@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-plugin-e2e-cypress@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-plugin-eslint@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-plugin-router@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-plugin-typescript@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-plugin-vuex@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-service@5.0.1 | MIT | https://github.com/vuejs/vue-cli +@vue/cli-shared-utils@5.0.1 | MIT | https://github.com/vuejs/vue-cli @vue/component-compiler-utils@3.3.0 | MIT | https://github.com/vuejs/component-compiler-utils @vue/eslint-config-typescript@10.0.0 | MIT | https://github.com/vuejs/eslint-config-typescript @vue/test-utils@1.3.0 | MIT | https://github.com/vuejs/vue-test-utils @@ -218,6 +216,7 @@ ajv-formats@2.1.1 | MIT | https://github.com/ajv-validator/ajv-formats ajv-keywords@3.5.2 | MIT | https://github.com/epoberezkin/ajv-keywords ajv-keywords@5.1.0 | MIT | https://github.com/epoberezkin/ajv-keywords ajv@6.12.6 | MIT | https://github.com/ajv-validator/ajv +ajv@8.10.0 | MIT | https://github.com/ajv-validator/ajv ajv@8.8.2 | MIT | https://github.com/ajv-validator/ajv ajv@8.9.0 | MIT | https://github.com/ajv-validator/ajv alphanum-sort@1.0.2 | MIT | https://github.com/TrySound/alphanum-sort @@ -255,7 +254,7 @@ aws4@1.11.0 | MIT | https://github.com/mhart/aws4 babel-loader@8.2.3 | MIT | https://github.com/babel/babel-loader babel-plugin-dynamic-import-node@2.3.3 | MIT | https://github.com/airbnb/babel-plugin-dynamic-import-node babel-plugin-polyfill-corejs2@0.3.1 | MIT | https://github.com/babel/babel-polyfills -babel-plugin-polyfill-corejs3@0.5.1 | MIT | https://github.com/babel/babel-polyfills +babel-plugin-polyfill-corejs3@0.5.2 | MIT | https://github.com/babel/babel-polyfills babel-plugin-polyfill-regenerator@0.3.1 | MIT | https://github.com/babel/babel-polyfills balanced-match@1.0.0 | MIT | https://github.com/juliangruber/balanced-match base64-js@1.5.1 | MIT | https://github.com/beatgammit/base64-js @@ -295,6 +294,7 @@ caseless@0.12.0 | Apache-2.0 | https://github.com/mikeal/caseless chalk@2.4.2 | MIT | https://github.com/chalk/chalk chalk@3.0.0 | MIT | https://github.com/chalk/chalk chalk@4.1.2 | MIT | https://github.com/chalk/chalk +charcodes@0.2.0 | MIT | https://github.com/xtuc/charcodes check-more-types@2.24.0 | MIT | https://github.com/kensho/check-more-types chokidar@3.5.1 | MIT | https://github.com/paulmillr/chokidar chokidar@3.5.2 | MIT | https://github.com/paulmillr/chokidar @@ -344,7 +344,7 @@ convert-source-map@1.8.0 | MIT | https://github.com/thlorenz/convert-source-map cookie-signature@1.0.6 | MIT | https://github.com/visionmedia/node-cookie-signature cookie@0.4.0 | MIT | https://github.com/jshttp/cookie copy-webpack-plugin@9.0.1 | MIT | https://github.com/webpack-contrib/copy-webpack-plugin -core-js-compat@3.20.3 | MIT | https://github.com/zloirock/core-js +core-js-compat@3.21.1 | MIT | https://github.com/zloirock/core-js core-util-is@1.0.2 | MIT | https://github.com/isaacs/core-util-is cosmiconfig@6.0.0 | MIT | https://github.com/davidtheclark/cosmiconfig cosmiconfig@7.0.1 | MIT | https://github.com/davidtheclark/cosmiconfig @@ -366,7 +366,7 @@ csso@4.2.0 | MIT | https://github.com/css/csso csv-parse@4.15.4 | MIT | https://github.com/wdavidw/node-csv-parse csv2md@1.1.0 | MIT | https://github.com/pstaender/csv2md cypress-fail-fast@3.3.0 | MIT | https://github.com/javierbrea/cypress-fail-fast -cypress@9.3.1 | MIT | https://github.com/cypress-io/cypress +cypress@9.5.0 | MIT | https://github.com/cypress-io/cypress dashdash@1.14.1 | MIT | https://github.com/trentm/node-dashdash de-indent@1.0.2 | MIT | https://github.com/yyx990803/de-indent debug@2.6.9 | MIT | https://github.com/visionmedia/debug @@ -426,17 +426,17 @@ escape-string-regexp@4.0.0 | MIT | https://github.com/sindresorhus/escape-string eslint-config-prettier@8.3.0 | MIT | https://github.com/prettier/eslint-config-prettier eslint-plugin-cypress@2.12.1 | MIT | https://github.com/cypress-io/eslint-plugin-cypress eslint-plugin-prettier@4.0.0 | MIT | https://github.com/prettier/eslint-plugin-prettier -eslint-plugin-vue@8.3.0 | MIT | https://github.com/vuejs/eslint-plugin-vue +eslint-plugin-vue@8.4.1 | MIT | https://github.com/vuejs/eslint-plugin-vue eslint-scope@5.1.1 | BSD-2-Clause | https://github.com/eslint/eslint-scope eslint-scope@6.0.0 | BSD-2-Clause | https://github.com/eslint/eslint-scope -eslint-scope@7.1.0 | BSD-2-Clause | https://github.com/eslint/eslint-scope +eslint-scope@7.1.1 | BSD-2-Clause | https://github.com/eslint/eslint-scope eslint-utils@3.0.0 | MIT | https://github.com/mysticatea/eslint-utils eslint-visitor-keys@2.1.0 | Apache-2.0 | https://github.com/eslint/eslint-visitor-keys eslint-visitor-keys@3.1.0 | Apache-2.0 | https://github.com/eslint/eslint-visitor-keys -eslint-visitor-keys@3.2.0 | Apache-2.0 | https://github.com/eslint/eslint-visitor-keys +eslint-visitor-keys@3.3.0 | Apache-2.0 | https://github.com/eslint/eslint-visitor-keys eslint-webpack-plugin@3.1.0 | MIT | https://github.com/webpack-contrib/eslint-webpack-plugin -eslint@8.7.0 | MIT | https://github.com/eslint/eslint -espree@9.3.0 | BSD-2-Clause | https://github.com/eslint/espree +eslint@8.9.0 | MIT | https://github.com/eslint/eslint +espree@9.3.1 | BSD-2-Clause | https://github.com/eslint/espree esquery@1.4.0 | BSD-3-Clause | https://github.com/estools/esquery esrecurse@4.3.0 | BSD-2-Clause | https://github.com/estools/esrecurse estraverse@4.3.0 | BSD-2-Clause | https://github.com/estools/estraverse @@ -506,6 +506,7 @@ glob@7.1.6 | ISC | https://github.com/isaacs/node-glob global-dirs@3.0.0 | MIT | https://github.com/sindresorhus/global-dirs globals@11.12.0 | MIT | https://github.com/sindresorhus/globals globals@13.12.0 | MIT | https://github.com/sindresorhus/globals +globals@13.12.1 | MIT | https://github.com/sindresorhus/globals globby@11.0.4 | MIT | https://github.com/sindresorhus/globby graceful-fs@4.2.9 | ISC | https://github.com/isaacs/node-graceful-fs gzip-size@6.0.0 | MIT | https://github.com/sindresorhus/gzip-size @@ -558,7 +559,7 @@ invert-kv@2.0.0 | MIT | https://github.com/sindresorhus/invert-kv ip@1.1.5 | MIT | https://github.com/indutny/node-ip ipaddr.js@1.9.1 | MIT | https://github.com/whitequark/ipaddr.js ipaddr.js@2.0.1 | MIT | https://github.com/whitequark/ipaddr.js -iris-client-frontend@1.3.1-POST-RELEASE | UNLICENSED | +iris-client-frontend@1.4.0-rc.3-POST-RELEASE | UNLICENSED | is-absolute-url@3.0.3 | MIT | https://github.com/sindresorhus/is-absolute-url is-arguments@1.1.1 | MIT | https://github.com/inspect-js/is-arguments is-arrayish@0.2.1 | MIT | https://github.com/qix-/node-is-arrayish @@ -598,7 +599,7 @@ isobject@3.0.1 | MIT | https://github.com/jonschlinkert/isobject isstream@0.1.2 | MIT | https://github.com/rvagg/isstream javascript-stringify@2.1.0 | MIT | https://github.com/blakeembrey/javascript-stringify jest-worker@27.3.1 | MIT | https://github.com/facebook/jest -joi@17.4.2 | BSD-3-Clause | https://github.com/sideway/joi +joi@17.6.0 | BSD-3-Clause | https://github.com/sideway/joi js-beautify@1.14.0 | MIT | https://github.com/beautify-web/js-beautify js-message@1.0.7 | MIT | https://github.com/RIAEvangelist/js-message js-queue@2.0.2 | MIT | https://github.com/RIAEvangelist/js-queue @@ -629,7 +630,7 @@ levn@0.4.1 | MIT | https://github.com/gkz/levn license-checker@25.0.1 | BSD-3-Clause | https://github.com/davglass/license-checker lilconfig@2.0.4 | MIT | https://github.com/antonk52/lilconfig lines-and-columns@1.1.6 | MIT | https://github.com/eventualbuddha/lines-and-columns -lint-staged@12.3.1 | MIT | https://github.com/okonet/lint-staged +lint-staged@12.3.4 | MIT | https://github.com/okonet/lint-staged listr2@3.13.5 | MIT | https://github.com/cenk1cenk2/listr2 listr2@4.0.1 | MIT | https://github.com/cenk1cenk2/listr2 loader-runner@4.2.0 | MIT | https://github.com/webpack/loader-runner @@ -691,7 +692,7 @@ mime@1.6.0 | MIT | https://github.com/broofa/node-mime mime@2.6.0 | MIT | https://github.com/broofa/mime mimic-fn@1.2.0 | MIT | https://github.com/sindresorhus/mimic-fn mimic-fn@2.1.0 | MIT | https://github.com/sindresorhus/mimic-fn -mini-css-extract-plugin@2.4.4 | MIT | https://github.com/webpack-contrib/mini-css-extract-plugin +mini-css-extract-plugin@2.5.3 | MIT | https://github.com/webpack-contrib/mini-css-extract-plugin minimalistic-assert@1.0.1 | ISC | https://github.com/calvinmetcalf/minimalistic-assert minimatch@3.0.4 | ISC | https://github.com/isaacs/minimatch minimist@1.2.5 | MIT | https://github.com/substack/minimist @@ -837,11 +838,9 @@ proxy-from-env@1.0.0 | MIT | https://github.com/Rob--W/proxy-from-env pseudomap@1.0.2 | ISC | https://github.com/isaacs/pseudomap psl@1.8.0 | MIT | https://github.com/lupomontero/psl pump@3.0.0 | MIT | https://github.com/mafintosh/pump -punycode@1.3.2 | MIT | https://github.com/bestiejs/punycode.js punycode@2.1.1 | MIT | https://github.com/bestiejs/punycode.js qs@6.5.2 | BSD-3-Clause | https://github.com/ljharb/qs qs@6.7.0 | BSD-3-Clause | https://github.com/ljharb/qs -querystring@0.2.0 | MIT | https://github.com/Gozala/querystring queue-microtask@1.2.3 | MIT | https://github.com/feross/queue-microtask randombytes@2.1.0 | MIT | https://github.com/crypto-browserify/randombytes range-parser@1.2.1 | MIT | https://github.com/jshttp/range-parser @@ -856,15 +855,15 @@ readdir-scoped-modules@1.1.0 | ISC | https://github.com/npm/readdir-scoped-modul readdirp@3.5.0 | MIT | https://github.com/paulmillr/readdirp readdirp@3.6.0 | MIT | https://github.com/paulmillr/readdirp rechoir@0.6.2 | MIT | https://github.com/tkellen/node-rechoir -regenerate-unicode-properties@9.0.0 | MIT | https://github.com/mathiasbynens/regenerate-unicode-properties +regenerate-unicode-properties@10.0.1 | MIT | https://github.com/mathiasbynens/regenerate-unicode-properties regenerate@1.4.2 | MIT | https://github.com/mathiasbynens/regenerate regenerator-runtime@0.13.9 | MIT | https://github.com/facebook/regenerator/tree/master/packages/runtime regenerator-transform@0.14.5 | MIT | https://github.com/facebook/regenerator/tree/master/packages/regenerator-transform regexp.prototype.flags@1.3.1 | MIT | https://github.com/es-shims/RegExp.prototype.flags regexpp@3.2.0 | MIT | https://github.com/mysticatea/regexpp -regexpu-core@4.8.0 | MIT | https://github.com/mathiasbynens/regexpu-core -regjsgen@0.5.2 | MIT | https://github.com/bnjmnt4n/regjsgen -regjsparser@0.7.0 | BSD-2-Clause | https://github.com/jviereck/regjsparser +regexpu-core@5.0.1 | MIT | https://github.com/mathiasbynens/regexpu-core +regjsgen@0.6.0 | MIT | https://github.com/bnjmnt4n/regjsgen +regjsparser@0.8.4 | BSD-2-Clause | https://github.com/jviereck/regjsparser relateurl@0.2.7 | MIT | https://github.com/stevenvachon/relateurl renderkid@3.0.0 | MIT | https://github.com/AriaMinaei/RenderKid request-progress@3.0.0 | MIT | https://github.com/IndigoUnited/node-request-progress @@ -886,8 +885,8 @@ rxjs@7.5.2 | Apache-2.0 | https://github.com/reactivex/rxjs safe-buffer@5.1.2 | MIT | https://github.com/feross/safe-buffer safe-buffer@5.2.1 | MIT | https://github.com/feross/safe-buffer safer-buffer@2.1.2 | MIT | https://github.com/ChALkeR/safer-buffer -sass-loader@12.4.0 | MIT | https://github.com/webpack-contrib/sass-loader -sass@1.48.0 | MIT | https://github.com/sass/dart-sass +sass-loader@12.6.0 | MIT | https://github.com/webpack-contrib/sass-loader +sass@1.49.7 | MIT | https://github.com/sass/dart-sass schema-utils@2.7.0 | MIT | https://github.com/webpack/schema-utils schema-utils@2.7.1 | MIT | https://github.com/webpack/schema-utils schema-utils@3.1.1 | MIT | https://github.com/webpack/schema-utils @@ -1006,7 +1005,6 @@ universalify@2.0.0 | MIT | https://github.com/RyanZim/universalify unpipe@1.0.0 | MIT | https://github.com/stream-utils/unpipe untildify@4.0.0 | MIT | https://github.com/sindresorhus/untildify uri-js@4.4.1 | BSD-2-Clause | https://github.com/garycourt/uri-js -url@0.11.0 | MIT | https://github.com/defunctzombie/node-url util-deprecate@1.0.2 | MIT | https://github.com/TooTallNate/util-deprecate util-extend@1.0.3 | MIT | https://github.com/isaacs/util-extend utila@0.4.0 | MIT | https://github.com/AriaMinaei/utila @@ -1038,7 +1036,7 @@ webpack-dev-server@4.7.3 | MIT | https://github.com/webpack/webpack-dev-server webpack-merge@5.8.0 | MIT | https://github.com/survivejs/webpack-merge webpack-sources@3.2.3 | MIT | https://github.com/webpack/webpack-sources webpack-virtual-modules@0.4.3 | MIT | https://github.com/sysgears/webpack-virtual-modules -webpack@5.67.0 | MIT | https://github.com/webpack/webpack +webpack@5.69.1 | MIT | https://github.com/webpack/webpack websocket-driver@0.7.4 | Apache-2.0 | https://github.com/faye/websocket-driver-node websocket-extensions@0.1.4 | Apache-2.0 | https://github.com/faye/websocket-extensions-node whatwg-fetch@3.6.2 | MIT | https://github.com/github/fetch diff --git a/FE-THIRD-PARTY-LICENSES-PROD.md b/FE-THIRD-PARTY-LICENSES-PROD.md index 5f0f6d2ae..16971d9f6 100644 --- a/FE-THIRD-PARTY-LICENSES-PROD.md +++ b/FE-THIRD-PARTY-LICENSES-PROD.md @@ -1,36 +1,35 @@ module name | license | repository ---|---|--- -@fontsource/roboto@4.5.1 | MIT | https://github.com/fontsource/fontsource +@fontsource/roboto@4.5.3 | MIT | https://github.com/fontsource/fontsource @mdi/font@6.5.95 | Apache-2.0 | https://github.com/Templarian/MaterialDesign-Webfont @types/lodash@4.14.178 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped -adler-32@1.2.0 | Apache-2.0 | https://github.com/SheetJS/js-adler32 adler-32@1.3.0 | Apache-2.0 | https://github.com/SheetJS/js-adler32 -axios@0.25.0 | MIT | https://github.com/axios/axios +axios@0.26.0 | MIT | https://github.com/axios/axios cfb@1.2.1 | Apache-2.0 | https://github.com/SheetJS/js-cfb -chart.js@3.7.0 | MIT | https://github.com/chartjs/Chart.js +chart.js@3.7.1 | MIT | https://github.com/chartjs/Chart.js codepage@1.15.0 | Apache-2.0 | https://github.com/SheetJS/js-codepage -core-js@3.20.3 | MIT | https://github.com/zloirock/core-js -crc-32@1.2.0 | Apache-2.0 | https://github.com/SheetJS/js-crc32 +core-js@3.21.1 | MIT | https://github.com/zloirock/core-js +crc-32@1.2.1 | Apache-2.0 | https://github.com/SheetJS/js-crc32 dayjs@1.10.7 | MIT | https://github.com/iamkun/dayjs deepmerge@4.2.2 | MIT | https://github.com/TehShrike/deepmerge exit-on-epipe@1.0.1 | Apache-2.0 | https://github.com/SheetJS/node-exit-on-epipe -follow-redirects@1.14.7 | MIT | https://github.com/follow-redirects/follow-redirects +follow-redirects@1.14.8 | MIT | https://github.com/follow-redirects/follow-redirects frac@1.1.2 | Apache-2.0 | https://github.com/SheetJS/frac -iris-client-frontend@1.3.1-POST-RELEASE | UNLICENSED | +iris-client-frontend@1.4.0-rc.3-POST-RELEASE | UNLICENSED | lodash@4.17.21 | MIT | https://github.com/lodash/lodash -printj@1.1.2 | Apache-2.0 | https://github.com/SheetJS/printj printj@1.2.3 | Apache-2.0 | https://github.com/SheetJS/printj printj@1.3.0 | Apache-2.0 | https://github.com/SheetJS/printj +printj@1.3.1 | Apache-2.0 | https://github.com/SheetJS/printj shvl@2.0.3 | MIT | https://github.com/robinvdvleuten/shvl ssf@0.11.2 | Apache-2.0 | https://github.com/SheetJS/ssf vue-class-component@7.2.6 | MIT | https://github.com/vuejs/vue-class-component vue-property-decorator@9.1.2 | MIT | https://github.com/kaorun343/vue-property-decorator vue-router@3.5.3 | MIT | https://github.com/vuejs/vue-router vue@2.6.14 | MIT | https://github.com/vuejs/vue -vuetify@2.6.2 | MIT | https://github.com/vuetifyjs/vuetify +vuetify@2.6.3 | MIT | https://github.com/vuetifyjs/vuetify vuex-persistedstate@4.1.0 | MIT | https://github.com/robinvdvleuten/vuex-persistedstate vuex@3.6.2 | MIT | https://github.com/vuejs/vuex wmf@1.0.2 | Apache-2.0 | https://github.com/SheetJS/js-wmf word@0.3.0 | Apache-2.0 | https://github.com/SheetJS/js-word -xlsx@0.17.5 | Apache-2.0 | https://github.com/SheetJS/sheetjs +xlsx@0.18.2 | Apache-2.0 | https://github.com/SheetJS/sheetjs diff --git a/LICENSES/GPL-3.0-or-later.txt b/LICENSES/GPL-3.0-or-later.txt deleted file mode 100644 index d41c0bd98..000000000 --- a/LICENSES/GPL-3.0-or-later.txt +++ /dev/null @@ -1,232 +0,0 @@ -GNU GENERAL PUBLIC LICENSE -Version 3, 29 June 2007 - -Copyright © 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -Preamble - -The GNU General Public License is a free, copyleft license for software and other kinds of works. - -The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. - -To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. - -For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. - -Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. - -Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. - -The precise terms and conditions for copying, distribution and modification follow. - -TERMS AND CONDITIONS - -0. Definitions. - -“This License” refers to version 3 of the GNU General Public License. - -“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. - -“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. - -To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. - -A “covered work” means either the unmodified Program or a work based on the Program. - -To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. - -To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. - -An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. - -1. Source Code. -The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. - -A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. - -The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. - -The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. - -The Corresponding Source for a work in source code form is that same work. - -2. Basic Permissions. -All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. - -You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - -3. Protecting Users' Legal Rights From Anti-Circumvention Law. -No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. - -4. Conveying Verbatim Copies. -You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. - -5. Conveying Modified Source Versions. -You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. - - c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. - -6. Conveying Non-Source Forms. -You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: - - a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. - - d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. - -A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. - -“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). - -The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. - -Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. - -7. Additional Terms. -“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. - -Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or authors of the material; or - - e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. - -8. Termination. -You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. - -9. Acceptance Not Required for Having Copies. -You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. - -10. Automatic Licensing of Downstream Recipients. -Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. - -An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. - -11. Patents. -A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. - -A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. - -In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. - -A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. - -12. No Surrender of Others' Freedom. -If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. - -13. Use with the GNU Affero General Public License. -Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. - -14. Revised Versions of this License. -The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. - -Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. - -15. Disclaimer of Warranty. -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -16. Limitation of Liability. -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -17. Interpretation of Sections 15 and 16. -If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - -END OF TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. - - - Copyright (C) - - 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, either version 3 of the License, or (at your option) any later version. - - 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 . - -Also add information on how to contact you by electronic and paper mail. - -If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. - -You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/README.adoc b/README.adoc index 4310d47c9..46fb0c001 100644 --- a/README.adoc +++ b/README.adoc @@ -46,7 +46,7 @@ chore/{issue number}-{name} ⇒ which is neither feature nor bugfix [[java]] === Java parts -We use *Java 11* and the following code style. +We use *Java 17* and the following code style. ==== Eclipse diff --git a/infrastructure/deployment/docker-compose-ext-postgres.yml b/infrastructure/deployment/docker-compose-ext-postgres.yml index b97ab88e7..24c21b780 100644 --- a/infrastructure/deployment/docker-compose-ext-postgres.yml +++ b/infrastructure/deployment/docker-compose-ext-postgres.yml @@ -8,7 +8,7 @@ version: "3.4" services: # IRIS Client backend for frontend iris-client: - image: inoeg/iris-client-bff:1.3 + image: inoeg/iris-client-bff:1.4-latest expose: - 8092 environment: @@ -35,7 +35,7 @@ services: # IRIS Client Frontend for users iris-frontend: - image: inoeg/iris-client-frontend:1.3 + image: inoeg/iris-client-frontend:1.4-latest expose: - 28080 environment: @@ -50,7 +50,7 @@ services: # Endpoint server to communicate with Apps and IRIS Connect central services eps: - image: inoeg/iris-client-eps:1.3 + image: inoeg/iris-client-eps:1.4-latest expose: - 4446 - 5556 @@ -70,7 +70,7 @@ services: # Proxy for inbound connections. private-proxy: - image: inoeg/iris-client-proxy:1.3 + image: inoeg/iris-client-proxy:1.4-latest expose: - 5545 - 8877 @@ -95,7 +95,7 @@ services: restart: unless-stopped private-proxy-eps: - image: inoeg/iris-client-eps:1.3 + image: inoeg/iris-client-eps:1.4-latest expose: - 7766 - 7776 @@ -115,7 +115,7 @@ services: # Reverse Proxy nginx: - image: inoeg/iris-client-nginx:1.3 + image: inoeg/iris-client-nginx:1.4-latest ports: - ${IRIS_CLIENT_PORT:-443}:443 environment: diff --git a/infrastructure/deployment/docker-compose.yml b/infrastructure/deployment/docker-compose.yml index d323f25fb..c64a02a8e 100644 --- a/infrastructure/deployment/docker-compose.yml +++ b/infrastructure/deployment/docker-compose.yml @@ -37,7 +37,7 @@ services: # IRIS Client backend for frontend iris-client: - image: inoeg/iris-client-bff:1.3 + image: inoeg/iris-client-bff:1.4-latest expose: - 8092 environment: @@ -66,7 +66,7 @@ services: # IRIS Client Frontend for users iris-frontend: - image: inoeg/iris-client-frontend:1.3 + image: inoeg/iris-client-frontend:1.4-latest expose: - 28080 environment: @@ -81,7 +81,7 @@ services: # Endpoint server to communicate with Apps and IRIS Connect central services eps: - image: inoeg/iris-client-eps:1.3 + image: inoeg/iris-client-eps:1.4-latest expose: - 4446 - 5556 @@ -101,7 +101,7 @@ services: # Proxy for inbound connections. private-proxy: - image: inoeg/iris-client-proxy:1.3 + image: inoeg/iris-client-proxy:1.4-latest expose: - 5545 - 8877 @@ -126,7 +126,7 @@ services: restart: unless-stopped private-proxy-eps: - image: inoeg/iris-client-eps:1.3 + image: inoeg/iris-client-eps:1.4-latest expose: - 7766 # JSON-RPC server for internal connections from iris-client - 7776 # gRPC protocol @@ -146,7 +146,7 @@ services: # Reverse Proxy nginx: - image: inoeg/iris-client-nginx:1.3 + image: inoeg/iris-client-nginx:1.4-latest ports: - ${IRIS_CLIENT_PORT:-443}:443 environment: diff --git a/infrastructure/deployment/docs/Upgrade-Guides.md b/infrastructure/deployment/docs/Upgrade-Guides.md index 1bd1d12da..f47993b71 100644 --- a/infrastructure/deployment/docs/Upgrade-Guides.md +++ b/infrastructure/deployment/docs/Upgrade-Guides.md @@ -3,11 +3,12 @@ ## IRIS-Client - Docker Compose Installation -### 1.2.x -> 1.3.0 +### 1.2.x -> 1.3.1 -[Hier](https://github.com/iris-connect/iris-client/releases/tag/v1.3.0) finden Sie Informationen zum Release 1.3.0. +[Hier](https://github.com/iris-connect/iris-client/releases/tag/v1.3.0) finden Sie Informationen zum Release 1.3.0. +[Hier](https://github.com/iris-connect/iris-client/releases/tag/v1.3.1) finden Sie Informationen zum Release 1.3.1. -1. Laden Sie sich [das neue Release](https://github.com/iris-connect/iris-client/releases/download/v1.3.0/deployment-1.3.0.zip) herunter und entpacken Sie es in ein `Zielverzeichnis`. +1. Laden Sie sich [das neue Release](https://github.com/iris-connect/iris-client/releases/download/v1.3.1/deployment-1.3.1.zip) herunter und entpacken Sie es in ein `Zielverzeichnis`. 2. Wechseln Sie in das aktuelle `Installationsverzeichnis`. 3. Ersetzen Sie ihre aktuelle `docker-compose.yml` mit der Version aus dem neuen Release. ``` @@ -31,7 +32,7 @@ ``` $ docker-compose up -d ``` -9. Loggen Sie sich mit Ihrem Benutzer ein und gehen Sie auf `Über IRIS`. Unter Version sollten Sie die neue Version `1.3.0` vorfinden. +9. Loggen Sie sich mit Ihrem Benutzer ein und gehen Sie auf `Über IRIS`. Unter Version sollten Sie die neue Version `1.3.1` vorfinden. ### 1.1.x -> 1.2.1 @@ -116,9 +117,10 @@ ## IRIS-Client - Stand-Alone Installation -### 1.2.x -> 1.3.0 +### 1.2.x -> 1.3.1 -[Hier](https://github.com/iris-connect/iris-client/releases/tag/v1.3.0) finden Sie Informationen zum Release 1.3.0. +[Hier](https://github.com/iris-connect/iris-client/releases/tag/v1.3.0) finden Sie Informationen zum Release 1.3.0. +[Hier](https://github.com/iris-connect/iris-client/releases/tag/v1.3.1) finden Sie Informationen zum Release 1.3.1. Dieser Upgrade-Guide geht davon aus, dass Sie den IRIS Client in einem `Installationsverzeichnis` installiert haben und dabei die Stand-Alone Ordner Struktur benutzen. @@ -134,7 +136,7 @@ Dieser Upgrade-Guide geht davon aus, dass Sie den IRIS Client in einem `Installa #### IRIS Client BFF -1. Laden Sie sich die [aktuelle Version vom IRIS CLient BFF](https://github.com/iris-connect/iris-client/releases/download/v1.3.0/iris-client-bff-1.3.0.jar) herunter. +1. Laden Sie sich die [aktuelle Version vom IRIS CLient BFF](https://github.com/iris-connect/iris-client/releases/download/v1.3.1/iris-client-bff-1.3.1.jar) herunter. 2. Kopieren sie die ausführbare Datei in den `bin` Ordner vom `Installationsverzeichnis`. @@ -144,7 +146,7 @@ Dieser Upgrade-Guide geht davon aus, dass Sie den IRIS Client in einem `Installa #### IRIS CLient Frontend -1. Laden Sie sich [das neue Release](https://github.com/iris-connect/iris-client/releases/download/v1.3.0/iris-client-fe-1.3.0.zip) herunter und entpacken Sie es in ein `Zielverzeichnis`. +1. Laden Sie sich [das neue Release](https://github.com/iris-connect/iris-client/releases/download/v1.3.1/iris-client-fe-1.3.1.zip) herunter und entpacken Sie es in ein `Zielverzeichnis`. 2. Kopieren Sie den gesamten Inhalt vom `Zielverzeichnis` in den `public` Ordner vom `Installationsverzeichnis`. > Sollten Sie einen eigenen Webserver betreiben, müssen Sie den Pfad entsprechend anpassen. @@ -154,7 +156,7 @@ Dieser Upgrade-Guide geht davon aus, dass Sie den IRIS Client in einem `Installa #### Konfigurations-Dateien -1. Laden Sie sich [das neue Release](https://github.com/iris-connect/iris-client/releases/download/v1.3.0/stand-alone-deployment-1.3.0.zip) herunter und entpacken Sie es in ein `Zielverzeichnis`. +1. Laden Sie sich [das neue Release](https://github.com/iris-connect/iris-client/releases/download/v1.3.1/stand-alone-deployment-1.3.1.zip) herunter und entpacken Sie es in ein `Zielverzeichnis`. 2. Kopieren und ersetzen Sie den gesamten Inhalt der EPS Konfiguration in den entsprechenden Ordner vom `Installationsverzeichnis`. ``` @@ -168,7 +170,7 @@ Dieser Upgrade-Guide geht davon aus, dass Sie den IRIS Client in einem `Installa #### Hinweis zu neuem Verhalten beim Start-Skript -Im Ordner 'scipts' der 'stand-alone-deployment-1.3.0.zip' ist eine neues Skript 'import-root-cert.sh' enthalten. Mit diesem können die nun benötigten Root-Zertifikate in den Key-Store der verwendetet Java-Installation importiert werden. Dies erfolgt für die in der '.env' gesetzten Umgebung ('IRIS_ENV'). Das Skript wird mit dem 'start-iris-client-bff.sh' zusammen ausgeführt, so dass kein zusätzliche Aktion nötig ist. **Beim ersten Start muss allerdings für den Import ein Passwort bei 'sudo' eingegeben werden!** +Im Ordner 'scipts' der 'stand-alone-deployment-1.3.1.zip' ist eine neues Skript 'import-root-cert.sh' enthalten. Mit diesem können die nun benötigten Root-Zertifikate in den Key-Store der verwendetet Java-Installation importiert werden. Dies erfolgt für die in der '.env' gesetzten Umgebung ('IRIS_ENV'). Das Skript wird mit dem 'start-iris-client-bff.sh' zusammen ausgeführt, so dass kein zusätzliche Aktion nötig ist. **Beim ersten Start muss allerdings für den Import ein Passwort bei 'sudo' eingegeben werden!** ### 1.1.x -> 1.2.1 diff --git a/infrastructure/dev/settings/roles/ga-gotham/settings.yml b/infrastructure/dev/settings/roles/ga-gotham/settings.yml new file mode 100644 index 000000000..1e5fbcdc7 --- /dev/null +++ b/infrastructure/dev/settings/roles/ga-gotham/settings.yml @@ -0,0 +1,45 @@ +name: ga-gotham +directory: + type: api + settings: + jsonrpc_client: + tls: + certificate_file: "/$DIR/../../certs/ga-gotham.crt" + key_file: "/$DIR/../../certs/ga-gotham.key" + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + endpoints: [ "https://iris.staging.iris-gateway.de:3322/jsonrpc" ] + server_names: [ "sd-1" ] +channels: # defines all the channels that we want to open when starting the server + - name: main JSON-RPC client # creates outgoing JSONRPC connections to deliver and receive messages + type: jsonrpc_client + settings: + endpoint: http://iris-client:8092/data-submission-rpc + - name: main gRPC server # accepts incoming gRPC connections to deliver and receive messages + type: grpc_server + settings: + bind_address: "0.0.0.0:8888" + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/ga-gotham.crt" + key_file: "/$DIR/../../certs/ga-gotham.key" + - name: main gRPC client # creates outgoing gRPC connections to deliver and receive messages + type: grpc_client + settings: + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/ga-gotham.crt" + key_file: "/$DIR/../../certs/ga-gotham.key" + - name: main JSON-RPC server # accepts incoming JSONRPC connections to deliver and receive messages + type: jsonrpc_server + settings: + bind_address: "0.0.0.0:5556" + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/ga-gotham.crt" + key_file: "/$DIR/../../certs/ga-gotham.key" + verify_client: false +signing: + certificate_file: "/$DIR/../../certs/ga-gotham-sign.crt" + key_file: "/$DIR/../../certs/ga-gotham-sign.key" + ca_certificate_file: "/$DIR/../../certs/root.crt" diff --git a/infrastructure/dev/settings/roles/hd-1/settings.yml b/infrastructure/dev/settings/roles/hd-1/settings.yml index 0cc793502..a0a351355 100644 --- a/infrastructure/dev/settings/roles/hd-1/settings.yml +++ b/infrastructure/dev/settings/roles/hd-1/settings.yml @@ -11,6 +11,14 @@ directory: endpoints: [ "https://iris.staging.iris-gateway.de:3322/jsonrpc" ] server_names: [ "sd-1" ] channels: # defines all the channels that we want to open when starting the server + - name: main gRPC server # accepts incoming gRPC connections to deliver and receive messages + type: grpc_server + settings: + bind_address: "0.0.0.0:8888" + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/hd-1.crt" + key_file: "/$DIR/../../certs/hd-1.key" - name: main JSON-RPC client # creates outgoing JSONRPC connections to deliver and receive messages type: jsonrpc_client settings: diff --git a/infrastructure/dev/settings/roles/private-proxy-eps-gotham/settings.yml b/infrastructure/dev/settings/roles/private-proxy-eps-gotham/settings.yml new file mode 100644 index 000000000..66dd830c8 --- /dev/null +++ b/infrastructure/dev/settings/roles/private-proxy-eps-gotham/settings.yml @@ -0,0 +1,41 @@ +name: private-proxy-gotham +directory: + type: api + settings: + jsonrpc_client: + tls: + certificate_file: "/$DIR/../../certs/private-proxy-gotham.crt" + key_file: "/$DIR/../../certs/private-proxy-gotham.key" + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + endpoints: [ "https://iris.staging.iris-gateway.de:3322/jsonrpc" ] + server_names: [ "sd-1" ] +channels: # defines all the channels that we want to open when starting the server + - name: main gRPC server # accepts incoming gRPC connections to deliver and receive messages + type: grpc_server + settings: + bind_address: "0.0.0.0:7776" + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/private-proxy-gotham.crt" + key_file: "/$DIR/../../certs/private-proxy-gotham.key" + - name: main JSON-RPC client # creates outgoing JSONRPC connections to deliver and receive messages + type: jsonrpc_client + settings: + endpoint: http://private-proxy:8877/jsonrpc + - name: main gRPC client # creates outgoing gRPC connections to deliver and receive messages + type: grpc_client + settings: + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/private-proxy-gotham.crt" + key_file: "/$DIR/../../certs/private-proxy-gotham.key" + - name: main JSON-RPC server # accepts incoming JSONRPC connections to deliver and receive messages + type: jsonrpc_server + settings: + bind_address: "0.0.0.0:7766" + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/private-proxy-gotham.crt" + key_file: "/$DIR/../../certs/private-proxy-gotham.key" + verify_client: false diff --git a/infrastructure/dev/settings/roles/private-proxy-gotham/settings.yml b/infrastructure/dev/settings/roles/private-proxy-gotham/settings.yml new file mode 100644 index 000000000..5398b54cc --- /dev/null +++ b/infrastructure/dev/settings/roles/private-proxy-gotham/settings.yml @@ -0,0 +1,26 @@ +private: + name: private-proxy-gotham + datastore: + type: file + settings: + filename: /private-proxy-gotham/private-proxy-announcements.db + bind_address: 0.0.0.0:5546 + internal_endpoint: + address: "iris-client:8092/data-submission-rpc" + tls: + verify_client: false + server_name: proxy2.dev.test-gesundheitsamt.de + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/internal-server-2.crt" + key_file: "/$DIR/../../certs/internal-server-2.key" + #verify_service_call: true + jsonrpc_client: + endpoint: https://private-proxy-1:7766/jsonrpc + server_name: private-proxy-gotham + tls: + ca_certificate_files: [ "/$DIR/../../certs/root.crt" ] + certificate_file: "/$DIR/../../certs/private-proxy-gotham.crt" + key_file: "/$DIR/../../certs/private-proxy-gotham.key" + jsonrpc_server: # the JSON-RPC server that the EPS server uses for communication + bind_address: 0.0.0.0:8877 + diff --git a/infrastructure/docker/app-eps/Dockerfile b/infrastructure/docker/app-eps/Dockerfile index 3538052bc..d6fc3d8bd 100644 --- a/infrastructure/docker/app-eps/Dockerfile +++ b/infrastructure/docker/app-eps/Dockerfile @@ -1,4 +1,4 @@ -FROM inoeg/eps:v0.2.1 +FROM inoeg/eps:v0.2.4 COPY conf /app/settings COPY ca /app/settings/ca diff --git a/infrastructure/docker/iris-client-eps/Dockerfile b/infrastructure/docker/iris-client-eps/Dockerfile index 07aa7be28..eedbd3099 100644 --- a/infrastructure/docker/iris-client-eps/Dockerfile +++ b/infrastructure/docker/iris-client-eps/Dockerfile @@ -1,4 +1,4 @@ -FROM inoeg/eps:v0.2.1 +FROM inoeg/eps:v0.2.4 COPY conf /app/settings COPY ca /app/settings/ca diff --git a/infrastructure/docker/iris-client-proxy/Dockerfile b/infrastructure/docker/iris-client-proxy/Dockerfile index 93bf4ecbd..10a95189c 100644 --- a/infrastructure/docker/iris-client-proxy/Dockerfile +++ b/infrastructure/docker/iris-client-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM inoeg/proxy:v0.2.1 +FROM inoeg/proxy:v0.2.4 COPY conf /app/settings COPY ca /app/settings/ca diff --git a/infrastructure/docker/nginx/Dockerfile b/infrastructure/docker/nginx/Dockerfile index 48571c85e..9a729ac25 100644 --- a/infrastructure/docker/nginx/Dockerfile +++ b/infrastructure/docker/nginx/Dockerfile @@ -1,3 +1,3 @@ -FROM nginx:1.21.5-alpine +FROM nginx:1.21.6-alpine RUN echo 'server_tokens off;' > /etc/nginx/conf.d/server_tokens.conf COPY config/templates/ /etc/nginx/templates/ diff --git a/iris-client-bff/pom.xml b/iris-client-bff/pom.xml index 9ae5e07ca..4e9910675 100644 --- a/iris-client-bff/pom.xml +++ b/iris-client-bff/pom.xml @@ -12,7 +12,7 @@ iris-gateway iris-client-bff - 1.3.1-POST-RELEASE + 1.4.0-rc.3-POST-RELEASE IRIS Client Backend for Frontend Backend for frontend (BFF) of the client for the health departments. Communicates directly with the SORMAS of this department. @@ -27,10 +27,11 @@ 17 inoeg ${project.version} + ${docker.image.prefix}/${project.artifactId}:${version.tag} 0.10.4 1.6.5 1.16.3 - 6.0.6.Final + 6.1.1.Final @@ -105,6 +106,8 @@ org.postgresql postgresql + 42.3.3 runtime @@ -303,7 +306,7 @@ org.springdoc springdoc-openapi-ui - 1.6.4 + 1.6.6 @@ -327,7 +330,7 @@ - ${docker.image.prefix}/${project.artifactId}:${version.tag} + ${image.tag} ${basedir}/bindings/ca-certificates:/platform/bindings/ca-certificates diff --git a/iris-client-bff/src/main/java/iris/client_bff/auth/db/DbAuthSecurityAdapter.java b/iris-client-bff/src/main/java/iris/client_bff/auth/db/DbAuthSecurityAdapter.java index 43d7f4bea..419133ea3 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/auth/db/DbAuthSecurityAdapter.java +++ b/iris-client-bff/src/main/java/iris/client_bff/auth/db/DbAuthSecurityAdapter.java @@ -49,6 +49,9 @@ public class DbAuthSecurityAdapter extends WebSecurityConfigurerAdapter { @Autowired private Environment env; + @Autowired + private UserDetailsServiceImpl userService; + private PasswordEncoder passwordEncoder; private JWTVerifier jwtVerifier; @@ -83,7 +86,7 @@ protected void configure(HttpSecurity http) throws Exception { .logoutSuccessHandler(new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK)) .and() .addFilter(new JWTAuthenticationFilter(authenticationManager(), jwtSigner, loginAttempts)) - .addFilterAfter(new JWTAuthorizationFilter(jwtVerifier), JWTAuthenticationFilter.class) + .addFilterAfter(new JWTAuthorizationFilter(jwtVerifier, userService), JWTAuthenticationFilter.class) .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); } diff --git a/iris-client-bff/src/main/java/iris/client_bff/auth/db/IrisAuditorAware.java b/iris-client-bff/src/main/java/iris/client_bff/auth/db/IrisAuditorAware.java new file mode 100644 index 000000000..abbf36f19 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/auth/db/IrisAuditorAware.java @@ -0,0 +1,28 @@ +package iris.client_bff.auth.db; + +import iris.client_bff.users.entities.UserAccount; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; + +import java.util.Optional; +import java.util.UUID; + +import org.springframework.data.domain.AuditorAware; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; + +@Component +public class IrisAuditorAware implements AuditorAware { + + @Override + public Optional getCurrentAuditor() { + + return Optional.ofNullable(SecurityContextHolder.getContext() + .getAuthentication()) + .map(Authentication::getDetails) + .filter(UserAccount.class::isInstance) + .map(UserAccount.class::cast) + .map(UserAccount::getId) + .map(UserAccountIdentifier::toUuid); + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/auth/db/JWTAuthorizationFilter.java b/iris-client-bff/src/main/java/iris/client_bff/auth/db/JWTAuthorizationFilter.java index d556c8744..8f0877da0 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/auth/db/JWTAuthorizationFilter.java +++ b/iris-client-bff/src/main/java/iris/client_bff/auth/db/JWTAuthorizationFilter.java @@ -3,6 +3,7 @@ import static iris.client_bff.auth.db.SecurityConstants.*; import iris.client_bff.auth.db.jwt.JWTVerifier; +import iris.client_bff.users.UserDetailsServiceImpl; import lombok.extern.slf4j.Slf4j; import java.io.IOException; @@ -26,11 +27,14 @@ @Slf4j public class JWTAuthorizationFilter extends OncePerRequestFilter { - private JWTVerifier jwtVerifier; + private final JWTVerifier jwtVerifier; + private final UserDetailsServiceImpl userService; - public JWTAuthorizationFilter(JWTVerifier jwtVerifier) { + public JWTAuthorizationFilter(JWTVerifier jwtVerifier, UserDetailsServiceImpl userService) { super(); + this.jwtVerifier = jwtVerifier; + this.userService = userService; } @Override @@ -75,10 +79,13 @@ private UserAccountAuthentication authenticate(String token) { DecodedJWT jwt = jwtVerifier.verify(token); var userName = jwt.getSubject(); + var userAccount = userService.findByUsername(userName); + + if (userAccount.isPresent() && jwtVerifier.isTokenWhitelisted(token)) { - if (userName != null && jwtVerifier.isTokenWhitelisted(token)) { var authority = new SimpleGrantedAuthority(jwt.getClaim(JWT_CLAIM_USER_ROLE).asString()); - return new UserAccountAuthentication(userName, true, List.of(authority)); + + return new UserAccountAuthentication(userAccount.get(), true, List.of(authority)); } return null; } diff --git a/iris-client-bff/src/main/java/iris/client_bff/auth/db/UserAccountAuthentication.java b/iris-client-bff/src/main/java/iris/client_bff/auth/db/UserAccountAuthentication.java index 9a18ad3e2..b8ec1ddc1 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/auth/db/UserAccountAuthentication.java +++ b/iris-client-bff/src/main/java/iris/client_bff/auth/db/UserAccountAuthentication.java @@ -1,9 +1,8 @@ package iris.client_bff.auth.db; +import iris.client_bff.users.entities.UserAccount; import iris.client_bff.users.entities.UserRole; import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; import java.util.Collection; @@ -11,15 +10,15 @@ import org.springframework.security.core.GrantedAuthority; @AllArgsConstructor -@Getter -@Builder public class UserAccountAuthentication implements Authentication { - private String userName; + private static final long serialVersionUID = 2483888828181651499L; + + private final UserAccount userAccount; private boolean authenticated; - private Collection grantedAuthorities; + private final Collection grantedAuthorities; @Override public Collection getAuthorities() { @@ -33,12 +32,12 @@ public Object getCredentials() { @Override public Object getDetails() { - return userName; + return userAccount; } @Override public Object getPrincipal() { - return userName; + return userAccount.getUserName(); } @Override @@ -53,7 +52,7 @@ public void setAuthenticated(boolean b) throws IllegalArgumentException { @Override public String getName() { - return userName; + return userAccount.getUserName(); } public boolean isAdmin() { @@ -61,5 +60,4 @@ public boolean isAdmin() { .stream() .anyMatch(auth -> auth.getAuthority().equals(UserRole.ADMIN.name())); } - } diff --git a/iris-client-bff/src/main/java/iris/client_bff/cases/CaseDataRequest.java b/iris-client-bff/src/main/java/iris/client_bff/cases/CaseDataRequest.java index f74710046..4eca9b565 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/cases/CaseDataRequest.java +++ b/iris-client-bff/src/main/java/iris/client_bff/cases/CaseDataRequest.java @@ -84,14 +84,6 @@ public CaseDataRequest(String refId, String name, Instant requestStart, Instant this.announcementToken = announcementToken; } - public Instant getLastModifiedAt() { - return this.getMetadata().getLastModified(); - } - - public Instant getCreatedAt() { - return this.getMetadata().getCreated(); - } - @Embeddable @EqualsAndHashCode @RequiredArgsConstructor(staticName = "of") diff --git a/iris-client-bff/src/main/java/iris/client_bff/cases/web/CaseDataRequestController.java b/iris-client-bff/src/main/java/iris/client_bff/cases/web/CaseDataRequestController.java index a3316c5c8..678c1f599 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/cases/web/CaseDataRequestController.java +++ b/iris-client-bff/src/main/java/iris/client_bff/cases/web/CaseDataRequestController.java @@ -14,6 +14,7 @@ import iris.client_bff.core.utils.ValidationHelper; import iris.client_bff.events.exceptions.IRISDataRequestException; import iris.client_bff.ui.messages.ErrorMessages; +import iris.client_bff.users.UserDetailsServiceImpl; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -43,132 +44,125 @@ @RequestMapping("/data-requests-client/cases") public class CaseDataRequestController { - private static final String FIELD_ID = "id"; - private static final String FIELD_STATUS = "status"; - private static final String FIELD_COMMENT = "comment"; - private static final String FIELD_NAME = "name"; - private static final String FIELD_EXTERNAL_CASE_ID = "externalCaseId"; - - private final CaseDataRequestService caseDataRequestService; - - private final CaseDataSubmissionService submissionService; - private final ValidationHelper validHelper; - - @GetMapping - @ResponseStatus(OK) - public Page getAll( - @RequestParam(required = false) Status status, - @RequestParam(required = false) String search, - Pageable pageable) { - if (status != null && StringUtils.isNotEmpty(search)) { - return caseDataRequestService.search(status, search, pageable).map(IndexCaseMapper::map); - } else if (StringUtils.isNotEmpty(search)) { - return caseDataRequestService.search(search, pageable).map(IndexCaseMapper::map); - } else if (status != null) { - return caseDataRequestService.findByStatus(status, pageable).map(IndexCaseMapper::map); - } - return caseDataRequestService.findAll(pageable).map(IndexCaseMapper::map); + private static final String FIELD_STATUS = "status"; + private static final String FIELD_COMMENT = "comment"; + private static final String FIELD_NAME = "name"; + private static final String FIELD_EXTERNAL_CASE_ID = "externalCaseId"; + + private final CaseDataRequestService caseDataRequestService; + + private final CaseDataSubmissionService submissionService; + private final ValidationHelper validHelper; + private final UserDetailsServiceImpl userService; + + @GetMapping + @ResponseStatus(OK) + public Page getAll( + @RequestParam(required = false) Status status, + @RequestParam(required = false) String search, + Pageable pageable) { + + if (status != null && StringUtils.isNotEmpty(search)) { + return caseDataRequestService.search(status, search, pageable).map(IndexCaseMapper::map); + } else if (StringUtils.isNotEmpty(search)) { + return caseDataRequestService.search(search, pageable).map(IndexCaseMapper::map); + } else if (status != null) { + return caseDataRequestService.findByStatus(status, pageable).map(IndexCaseMapper::map); } - @PostMapping - @ResponseStatus(OK) - public IndexCaseDetailsDTO create(@RequestBody @Valid IndexCaseInsertDTO insert) { - IndexCaseInsertDTO insertValidated = validateIndexCaseInsertDTO(insert); - - try { - return mapDetailed(caseDataRequestService.create(insertValidated)); - } catch (IRISDataRequestException e) { - // TODO: use ExceptionMapper? - throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, ErrorMessages.CASE_DATA_REQUEST_CREATION); - } + return caseDataRequestService.findAll(pageable).map(IndexCaseMapper::map); + } + + @PostMapping + @ResponseStatus(OK) + public IndexCaseDetailsDTO create(@RequestBody @Valid IndexCaseInsertDTO insert) { + IndexCaseInsertDTO insertValidated = validateIndexCaseInsertDTO(insert); + + try { + return mapDetailed(caseDataRequestService.create(insertValidated), userService); + } catch (IRISDataRequestException e) { + // TODO: use ExceptionMapper? + throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, ErrorMessages.CASE_DATA_REQUEST_CREATION); } + } - @GetMapping("/{id}") - @ResponseStatus(OK) - public ResponseEntity getDetails(@PathVariable UUID id) { - if (ValidationHelper.isUUIDInputValid(id.toString(), FIELD_ID)) { - return caseDataRequestService.findDetailed(id).map((dataRequest -> { - var indexCaseDetailsDTO = mapDetailed(dataRequest); + @GetMapping("/{id}") + @ResponseStatus(OK) + public ResponseEntity getDetails(@PathVariable UUID id) { + return caseDataRequestService.findDetailed(id).map((dataRequest -> { + var indexCaseDetailsDTO = mapDetailed(dataRequest, userService); - submissionService.findByRequest(dataRequest).ifPresent(indexCaseDetailsDTO::setSubmissionData); + submissionService.findByRequest(dataRequest).ifPresent(indexCaseDetailsDTO::setSubmissionData); - return indexCaseDetailsDTO; - })).map(ResponseEntity::ok).orElseGet(ResponseEntity.notFound()::build); - } else { - return new ResponseEntity<>(HttpStatus.BAD_REQUEST); - } - } + return indexCaseDetailsDTO; + })).map(ResponseEntity::ok).orElseGet(ResponseEntity.notFound()::build); + } + + @PatchMapping("/{id}") + @ResponseStatus(OK) + public ResponseEntity update(@PathVariable UUID id, + @RequestBody @Valid IndexCaseUpdateDTO update) { - @PatchMapping("/{id}") - @ResponseStatus(OK) - public ResponseEntity update(@PathVariable UUID id, - @RequestBody @Valid IndexCaseUpdateDTO update) { - if (!ValidationHelper.isUUIDInputValid(id.toString(), FIELD_ID)) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } + var updateValidated = validateIndexCaseUpdateDTO(update); + + return caseDataRequestService.findDetailed(id) + .map(it -> caseDataRequestService.update(it, updateValidated)) + .map(it -> mapDetailed(it, userService)) + .map(ResponseEntity::ok) + .orElseGet(ResponseEntity.notFound()::build); + } + + private IndexCaseUpdateDTO validateIndexCaseUpdateDTO(IndexCaseUpdateDTO update) { + if (update == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } - IndexCaseUpdateDTO updateValidated = validateIndexCaseUpdateDTO(update); + if (validHelper.isPossibleAttack(update.getComment(), FIELD_COMMENT, false)) { + update.setComment(ErrorMessages.INVALID_INPUT_STRING); + } - ResponseEntity responseEntity = caseDataRequestService.findDetailed(id) - .map(it -> caseDataRequestService.update(it, updateValidated)) - .map(IndexCaseMapper::mapDetailed) - .map(ResponseEntity::ok) - .orElseGet(ResponseEntity.notFound()::build); + if (validHelper.isPossibleAttack(update.getName(), FIELD_NAME, false)) { + update.setName(ErrorMessages.INVALID_INPUT_STRING); + } - return responseEntity; + if (validHelper.isPossibleAttack(update.getExternalCaseId(), FIELD_EXTERNAL_CASE_ID, false)) { + update.setExternalCaseId(ErrorMessages.INVALID_INPUT_STRING); } - private IndexCaseUpdateDTO validateIndexCaseUpdateDTO(IndexCaseUpdateDTO update) { - if (update == null) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } - - if (validHelper.isPossibleAttack(update.getComment(), FIELD_COMMENT, false)) { - update.setComment(ErrorMessages.INVALID_INPUT_STRING); - } - - if (validHelper.isPossibleAttack(update.getName(), FIELD_NAME, false)) { - update.setName(ErrorMessages.INVALID_INPUT_STRING); - } - - if (validHelper.isPossibleAttack(update.getExternalCaseId(), FIELD_EXTERNAL_CASE_ID, false)) { - update.setExternalCaseId(ErrorMessages.INVALID_INPUT_STRING); - } - - if (update.getStatus() != null - && !(update.getStatus() == IndexCaseStatusDTO.DATA_RECEIVED - || update.getStatus() == IndexCaseStatusDTO.DATA_REQUESTED - || update.getStatus() == IndexCaseStatusDTO.ABORTED - || update.getStatus() == IndexCaseStatusDTO.CLOSED)) { - log.warn(ErrorMessages.INVALID_INPUT + FIELD_STATUS + update.getStatus()); - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } - - return update; + if (update.getStatus() != null + && !(update.getStatus() == IndexCaseStatusDTO.DATA_RECEIVED + || update.getStatus() == IndexCaseStatusDTO.DATA_REQUESTED + || update.getStatus() == IndexCaseStatusDTO.ABORTED + || update.getStatus() == IndexCaseStatusDTO.CLOSED)) { + log.warn(ErrorMessages.INVALID_INPUT + FIELD_STATUS + update.getStatus()); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); } - private IndexCaseInsertDTO validateIndexCaseInsertDTO(IndexCaseInsertDTO insert) { - if (insert == null) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } + return update; + } - if (validHelper.isPossibleAttack(insert.getComment(), FIELD_COMMENT, false)) { - insert.setComment(ErrorMessages.INVALID_INPUT_STRING); - } + private IndexCaseInsertDTO validateIndexCaseInsertDTO(IndexCaseInsertDTO insert) { + if (insert == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } - if (validHelper.isPossibleAttack(insert.getName(), FIELD_NAME, false)) { - insert.setName(ErrorMessages.INVALID_INPUT_STRING); - } + if (validHelper.isPossibleAttack(insert.getComment(), FIELD_COMMENT, false)) { + insert.setComment(ErrorMessages.INVALID_INPUT_STRING); + } - if (validHelper.isPossibleAttack(insert.getExternalCaseId(), FIELD_EXTERNAL_CASE_ID, false)) { - insert.setExternalCaseId(ErrorMessages.INVALID_INPUT_STRING); - } + if (validHelper.isPossibleAttack(insert.getName(), FIELD_NAME, false)) { + insert.setName(ErrorMessages.INVALID_INPUT_STRING); + } - if (insert.getStart() == null) { - log.warn(ErrorMessages.INVALID_INPUT + " - start: null"); - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } + if (validHelper.isPossibleAttack(insert.getExternalCaseId(), FIELD_EXTERNAL_CASE_ID, false)) { + insert.setExternalCaseId(ErrorMessages.INVALID_INPUT_STRING); + } - return insert; + if (insert.getStart() == null) { + log.warn(ErrorMessages.INVALID_INPUT + " - start: null"); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); } + + return insert; + } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/cases/web/IndexCaseMapper.java b/iris-client-bff/src/main/java/iris/client_bff/cases/web/IndexCaseMapper.java index 90aaec0bf..a09b85a0e 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/cases/web/IndexCaseMapper.java +++ b/iris-client-bff/src/main/java/iris/client_bff/cases/web/IndexCaseMapper.java @@ -1,153 +1,171 @@ package iris.client_bff.cases.web; +import static lombok.AccessLevel.*; + import iris.client_bff.cases.CaseDataRequest; import iris.client_bff.cases.model.CaseDataSubmission; import iris.client_bff.cases.web.request_dto.IndexCaseDTO; import iris.client_bff.cases.web.request_dto.IndexCaseDetailsDTO; import iris.client_bff.cases.web.request_dto.IndexCaseStatusDTO; -import iris.client_bff.cases.web.submission_dto.*; +import iris.client_bff.cases.web.submission_dto.ContactCategory; +import iris.client_bff.cases.web.submission_dto.ContactPerson; +import iris.client_bff.cases.web.submission_dto.ContactPersonAllOfContactInformation; +import iris.client_bff.cases.web.submission_dto.ContactPersonAllOfWorkPlace; +import iris.client_bff.cases.web.submission_dto.ContactPersonList; +import iris.client_bff.cases.web.submission_dto.ContactsAndEvents; +import iris.client_bff.cases.web.submission_dto.ContactsAndEventsDataProvider; +import iris.client_bff.cases.web.submission_dto.Event; +import iris.client_bff.cases.web.submission_dto.EventList; import iris.client_bff.core.Sex; import iris.client_bff.core.web.dto.Address; +import iris.client_bff.users.UserDetailsServiceImpl; +import iris.client_bff.users.entities.UserAccount; import lombok.NoArgsConstructor; -import java.time.LocalDate; -import java.time.ZoneId; import java.util.Optional; import java.util.stream.Collectors; -import static lombok.AccessLevel.PRIVATE; - @NoArgsConstructor(access = PRIVATE) public class IndexCaseMapper { - public static IndexCaseDetailsDTO mapDetailed(CaseDataRequest indexCase) { - return IndexCaseDetailsDTO.builder() - .caseId(indexCase.getId().toString()) - .comment(indexCase.getComment()) - .externalCaseId(indexCase.getRefId()) - .name(indexCase.getName()) - .status(IndexCaseStatusDTO.valueOf(indexCase.getStatus().name())) - .start(indexCase.getRequestStart()) - .end(indexCase.getRequestEnd()) - .readableToken(indexCase.getReadableToken()) - .build(); - } - - public static IndexCaseDTO map(CaseDataRequest indexCase) { - - return IndexCaseDTO.builder() - .caseId(indexCase.getId().toString()) - .comment(indexCase.getComment()) - .externalCaseId(indexCase.getRefId()) - .name(indexCase.getName()) - .status(IndexCaseStatusDTO.valueOf(indexCase.getStatus().name())) - .start(indexCase.getRequestStart()) - .end(indexCase.getRequestEnd()) - .build(); - } - - public static ContactsAndEvents mapDataSubmission(CaseDataSubmission submission) { - var contactsAndEventsDataProvider = ContactsAndEventsDataProvider.builder() - .firstName(submission.getDataProvider().getFirstName()) - .lastName(submission.getDataProvider().getLastName()) - .dateOfBirth(submission.getDataProvider().getDateOfBirth()) - .build(); - - var contacts = ContactPersonList.builder() - .contactPersons(submission.getContacts().stream().map(contact -> { - - var contactPerson = ContactPerson.builder() - .dateOfBirth(contact.getDateOfBirth()) - .firstName(contact.getFirstName()) - .lastName(contact.getLastName()) - .phone(contact.getPhone()) - .email(contact.getEmail()) - .mobilePhone(contact.getMobilePhone()) - .sex(Sex.valueOf(Optional.ofNullable(contact.getSex()).orElse(Sex.UNKNOWN).name())) - .build(); - - if (contact.getAddress() != null) { - var address = Address.builder() - .city(contact.getAddress().getCity()) - .houseNumber(contact.getAddress().getHouseNumber()) - .street(contact.getAddress().getStreet()) - .zipCode(contact.getAddress().getZipCode()) - .build(); - - contactPerson.setAddress(address); - } - - var contactInformation = ContactPersonAllOfContactInformation - .builder() - .basicConditions(contact.getBasicConditions()) - .firstContactDate(contact.getFirstContactDate()) - .lastContactDate(contact.getLastContactDate()) - .build(); - - if (contact.getContactCategory() != null) { - contactInformation.setContactCategory(ContactCategory.valueOf(contact.getContactCategory().name())); - } - - contactPerson.setContactInformation(contactInformation); - - var workplace = ContactPersonAllOfWorkPlace.builder() - .name(contact.getWorkplaceName()) - .pointOfContact(contact.getWorkplacePointOfContact()) - .phone(contact.getWorkplacePhone()) - .build(); - - if (contact.getWorkplaceAddress() != null) { - workplace.setAddress(Address.builder() - .zipCode(contact.getWorkplaceAddress().getZipCode()) - .city(contact.getWorkplaceAddress().getCity()) - .houseNumber(contact.getWorkplaceAddress().getHouseNumber()) - .street(contact.getWorkplaceAddress().getStreet()) - .build()); - } - - contactPerson.setWorkPlace(workplace); - - return contactPerson; - }).collect(Collectors.toList())) - .startDate(submission.getContactsStartDateAsLocalDate()) - .endDate(submission.getContactsEndDateAsLocalDate()) - .build(); - - EventList events; - if (submission.getEvents().isEmpty()) { - events = EventList.builder().build(); - } else { - events = EventList.builder() - .events(submission.getEvents().stream().map(event -> { - - var eventResult = Event.builder() - .name(event.getName()) - .phone(event.getPhone()) - .additionalInformation(event.getAdditionalInformation()) - .build(); - - iris.client_bff.core.model.Address addressDB = event.getAddress(); - if (addressDB != null) { - var address = Address.builder() - .city(addressDB.getCity()) - .houseNumber(addressDB.getHouseNumber()) - .street(addressDB.getStreet()) - .zipCode(addressDB.getZipCode()) - .build(); - eventResult.setAddress(address); - } - - return eventResult; - }).collect(Collectors.toList())) - .endDate(submission.getEventsEndDateAsLocalDate()) - .startDate(submission.getEventsStartDateAsLocalDate()) - .build(); - } - - return ContactsAndEvents.builder() - .dataProvider(contactsAndEventsDataProvider) - .contacts(contacts) - .events(events) - .build(); - } + public static IndexCaseDetailsDTO mapDetailed(CaseDataRequest indexCase, UserDetailsServiceImpl userService) { + + return IndexCaseDetailsDTO.builder() + .caseId(indexCase.getId().toString()) + .comment(indexCase.getComment()) + .externalCaseId(indexCase.getRefId()) + .name(indexCase.getName()) + .status(IndexCaseStatusDTO.valueOf(indexCase.getStatus().name())) + .start(indexCase.getRequestStart()) + .end(indexCase.getRequestEnd()) + .readableToken(indexCase.getReadableToken()) + .createdAt(indexCase.getCreatedAt()) + .createdBy(userService.findByUuid(indexCase.getCreatedBy()).map(IndexCaseMapper::getFullName).orElse(null)) + .lastModifiedAt(indexCase.getLastModifiedAt()) + .lastModifiedBy( + userService.findByUuid(indexCase.getLastModifiedBy()).map(IndexCaseMapper::getFullName).orElse(null)) + .build(); + } + + public static IndexCaseDTO map(CaseDataRequest indexCase) { + + return IndexCaseDTO.builder() + .caseId(indexCase.getId().toString()) + .comment(indexCase.getComment()) + .externalCaseId(indexCase.getRefId()) + .name(indexCase.getName()) + .status(IndexCaseStatusDTO.valueOf(indexCase.getStatus().name())) + .start(indexCase.getRequestStart()) + .end(indexCase.getRequestEnd()) + .build(); + } + + public static ContactsAndEvents mapDataSubmission(CaseDataSubmission submission) { + var contactsAndEventsDataProvider = ContactsAndEventsDataProvider.builder() + .firstName(submission.getDataProvider().getFirstName()) + .lastName(submission.getDataProvider().getLastName()) + .dateOfBirth(submission.getDataProvider().getDateOfBirth()) + .build(); + + var contacts = ContactPersonList.builder() + .contactPersons(submission.getContacts().stream().map(contact -> { + + var contactPerson = ContactPerson.builder() + .dateOfBirth(contact.getDateOfBirth()) + .firstName(contact.getFirstName()) + .lastName(contact.getLastName()) + .phone(contact.getPhone()) + .email(contact.getEmail()) + .mobilePhone(contact.getMobilePhone()) + .sex(Sex.valueOf(Optional.ofNullable(contact.getSex()).orElse(Sex.UNKNOWN).name())) + .build(); + + if (contact.getAddress() != null) { + var address = Address.builder() + .city(contact.getAddress().getCity()) + .houseNumber(contact.getAddress().getHouseNumber()) + .street(contact.getAddress().getStreet()) + .zipCode(contact.getAddress().getZipCode()) + .build(); + + contactPerson.setAddress(address); + } + + var contactInformation = ContactPersonAllOfContactInformation + .builder() + .basicConditions(contact.getBasicConditions()) + .firstContactDate(contact.getFirstContactDate()) + .lastContactDate(contact.getLastContactDate()) + .build(); + + if (contact.getContactCategory() != null) { + contactInformation.setContactCategory(ContactCategory.valueOf(contact.getContactCategory().name())); + } + + contactPerson.setContactInformation(contactInformation); + + var workplace = ContactPersonAllOfWorkPlace.builder() + .name(contact.getWorkplaceName()) + .pointOfContact(contact.getWorkplacePointOfContact()) + .phone(contact.getWorkplacePhone()) + .build(); + + if (contact.getWorkplaceAddress() != null) { + workplace.setAddress(Address.builder() + .zipCode(contact.getWorkplaceAddress().getZipCode()) + .city(contact.getWorkplaceAddress().getCity()) + .houseNumber(contact.getWorkplaceAddress().getHouseNumber()) + .street(contact.getWorkplaceAddress().getStreet()) + .build()); + } + + contactPerson.setWorkPlace(workplace); + + return contactPerson; + }).collect(Collectors.toList())) + .startDate(submission.getContactsStartDateAsLocalDate()) + .endDate(submission.getContactsEndDateAsLocalDate()) + .build(); + + EventList events; + if (submission.getEvents().isEmpty()) { + events = EventList.builder().build(); + } else { + events = EventList.builder() + .events(submission.getEvents().stream().map(event -> { + + var eventResult = Event.builder() + .name(event.getName()) + .phone(event.getPhone()) + .additionalInformation(event.getAdditionalInformation()) + .build(); + + iris.client_bff.core.model.Address addressDB = event.getAddress(); + if (addressDB != null) { + var address = Address.builder() + .city(addressDB.getCity()) + .houseNumber(addressDB.getHouseNumber()) + .street(addressDB.getStreet()) + .zipCode(addressDB.getZipCode()) + .build(); + eventResult.setAddress(address); + } + + return eventResult; + }).collect(Collectors.toList())) + .endDate(submission.getEventsEndDateAsLocalDate()) + .startDate(submission.getEventsStartDateAsLocalDate()) + .build(); + } + + return ContactsAndEvents.builder() + .dataProvider(contactsAndEventsDataProvider) + .contacts(contacts) + .events(events) + .build(); + } + + private static String getFullName(UserAccount user) { + return user.getFirstName() + " " + user.getLastName(); + } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/cases/web/request_dto/IndexCaseDetailsDTO.java b/iris-client-bff/src/main/java/iris/client_bff/cases/web/request_dto/IndexCaseDetailsDTO.java index 94c4ed673..9f3f61334 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/cases/web/request_dto/IndexCaseDetailsDTO.java +++ b/iris-client-bff/src/main/java/iris/client_bff/cases/web/request_dto/IndexCaseDetailsDTO.java @@ -1,12 +1,16 @@ package iris.client_bff.cases.web.request_dto; +import static lombok.AccessLevel.*; + import iris.client_bff.cases.web.submission_dto.ContactsAndEvents; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; import java.time.Instant; -import static lombok.AccessLevel.PRIVATE; - @Data @Builder @ToString @@ -22,4 +26,8 @@ public class IndexCaseDetailsDTO { private IndexCaseStatusDTO status; private ContactsAndEvents submissionData; private String readableToken; + private Instant createdAt; + private Instant lastModifiedAt; + private String createdBy; + private String lastModifiedBy; } diff --git a/iris-client-bff/src/main/java/iris/client_bff/config/DataSubmissionConfig.java b/iris-client-bff/src/main/java/iris/client_bff/config/DataSubmissionConfig.java index 0e902020d..fba92be4f 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/config/DataSubmissionConfig.java +++ b/iris-client-bff/src/main/java/iris/client_bff/config/DataSubmissionConfig.java @@ -2,6 +2,7 @@ import iris.client_bff.cases.eps.CaseDataController; import iris.client_bff.events.eps.EventDataController; +import iris.client_bff.iris_messages.eps.IrisMessageDataController; import lombok.AllArgsConstructor; import org.springframework.context.annotation.Bean; @@ -21,6 +22,8 @@ public class DataSubmissionConfig { EventDataController eventDataController; + IrisMessageDataController irisMessageDataController; + @Bean(name = DATA_SUBMISSION_ENDPOINT) public CompositeJsonServiceExporter jsonRpcServiceImplExporter() { return createCompositeJsonServiceExporter(); @@ -34,7 +37,8 @@ public CompositeJsonServiceExporter jsonRpcServiceImplExporterWithSlash() { private CompositeJsonServiceExporter createCompositeJsonServiceExporter() { CompositeJsonServiceExporter compositeJsonServiceExporter = new CompositeJsonServiceExporter(); - compositeJsonServiceExporter.setServices(new Object[] { caseDataController, eventDataController }); + compositeJsonServiceExporter.setServices(new Object[] { caseDataController, eventDataController, irisMessageDataController }); + compositeJsonServiceExporter.setAllowExtraParams(true); // Used to allow the EPS to add common parameters (e.g. a signature) and not have to change all methods. return compositeJsonServiceExporter; } diff --git a/iris-client-bff/src/main/java/iris/client_bff/config/HibernateSearchConfig.java b/iris-client-bff/src/main/java/iris/client_bff/config/HibernateSearchConfig.java index 97241ca82..c89a1e8df 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/config/HibernateSearchConfig.java +++ b/iris-client-bff/src/main/java/iris/client_bff/config/HibernateSearchConfig.java @@ -1,13 +1,19 @@ package iris.client_bff.config; +import iris.client_bff.IrisClientBffApplication; import iris.client_bff.cases.CaseDataRequest; import iris.client_bff.cases.CaseDataRequest.DataRequestIdentifier; import iris.client_bff.events.EventDataRequest; import iris.client_bff.events.model.Location.LocationIdentifier; +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageFolder; import lombok.NonNull; import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import java.util.List; + import javax.annotation.PostConstruct; import javax.persistence.EntityManagerFactory; @@ -24,10 +30,17 @@ import org.hibernate.search.mapper.orm.massindexing.MassIndexer; import org.hibernate.search.mapper.orm.session.SearchSession; import org.hibernate.search.mapper.pojo.bridge.IdentifierBridge; +import org.hibernate.search.mapper.pojo.bridge.ValueBridge; import org.hibernate.search.mapper.pojo.bridge.runtime.IdentifierBridgeFromDocumentIdentifierContext; import org.hibernate.search.mapper.pojo.bridge.runtime.IdentifierBridgeToDocumentIdentifierContext; +import org.hibernate.search.mapper.pojo.bridge.runtime.ValueBridgeToIndexedValueContext; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; +import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ScannedGenericBeanDefinition; +import org.springframework.core.type.filter.AnnotationTypeFilter; import org.springframework.stereotype.Component; @Configuration @@ -46,8 +59,9 @@ SearchSession getSearchSession() { @PostConstruct void initialize() throws InterruptedException { - MassIndexer indexer = createAndGetSearchSession().massIndexer(CaseDataRequest.class, EventDataRequest.class) - .threadsToLoadObjects(2); + var classes = searchClassesWithAnnotationIndexed(); + + MassIndexer indexer = createAndGetSearchSession().massIndexer(classes).threadsToLoadObjects(2); try { indexer.startAndWait(); } catch (InterruptedException e) { @@ -56,6 +70,26 @@ void initialize() throws InterruptedException { } } + private List> searchClassesWithAnnotationIndexed() { + + var scanner = new ClassPathScanningCandidateComponentProvider(false); + scanner.addIncludeFilter(new AnnotationTypeFilter(Indexed.class)); + + var components = scanner.findCandidateComponents(IrisClientBffApplication.class.getPackageName()); + + return components.stream() + .filter(ScannedGenericBeanDefinition.class::isInstance) + .map(ScannedGenericBeanDefinition.class::cast) + .map(AbstractBeanDefinition::getBeanClassName) + .map(this::loadClass) + .toList(); + } + + @SneakyThrows + private Class loadClass(String clazz) { + return getClass().getClassLoader().loadClass(clazz); + } + SearchSession createAndGetSearchSession() { return session == null @@ -138,6 +172,52 @@ public LocationIdentifier fromDocumentIdentifier(String value, return value == null ? null : LocationIdentifier.of(value); } }); + + context.bridges().exactType(IrisMessage.IrisMessageIdentifier.class) + .identifierBridge(new IdentifierBridge<>() { + + @Override + public String toDocumentIdentifier( + IrisMessage.IrisMessageIdentifier value, + IdentifierBridgeToDocumentIdentifierContext context) { + return value.toString(); + } + + @Override + public IrisMessage.IrisMessageIdentifier fromDocumentIdentifier( + String value, + IdentifierBridgeFromDocumentIdentifierContext context) { + return value == null ? null : IrisMessage.IrisMessageIdentifier.of(value); + } + }); + + context.bridges().exactType(IrisMessageFolder.IrisMessageFolderIdentifier.class) + .identifierBridge(new IdentifierBridge<>() { + + @Override + public String toDocumentIdentifier( + IrisMessageFolder.IrisMessageFolderIdentifier value, + IdentifierBridgeToDocumentIdentifierContext context) { + return value.toString(); + } + + @Override + public IrisMessageFolder.IrisMessageFolderIdentifier fromDocumentIdentifier( + String value, + IdentifierBridgeFromDocumentIdentifierContext context) { + return value == null ? null : IrisMessageFolder.IrisMessageFolderIdentifier.of(value); + } + }); + + context.bridges().exactType(IrisMessageFolder.IrisMessageFolderIdentifier.class) + .valueBridge(new ValueBridge() { + @Override + public String toIndexedValue( + IrisMessageFolder.IrisMessageFolderIdentifier value, + ValueBridgeToIndexedValueContext context) { + return value == null ? null : value.toString(); + } + }); } } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/core/Aggregate.java b/iris-client-bff/src/main/java/iris/client_bff/core/Aggregate.java index eb1925ef0..763384ec5 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/core/Aggregate.java +++ b/iris-client-bff/src/main/java/iris/client_bff/core/Aggregate.java @@ -3,6 +3,10 @@ import lombok.EqualsAndHashCode; import lombok.Getter; +import java.time.Instant; +import java.util.UUID; +import java.util.function.Function; + import javax.persistence.EmbeddedId; import javax.persistence.EntityListeners; import javax.persistence.MappedSuperclass; @@ -40,4 +44,27 @@ public abstract class Aggregate, ID extends Id> exten void markNotNew() { this.isNew = false; } + + public Instant getLastModifiedAt() { + return getMetadata(Metadata::getLastModified); + } + + public UUID getLastModifiedBy() { + return getMetadata(Metadata::getLastModifiedBy); + } + + public Instant getCreatedAt() { + return getMetadata(Metadata::getCreated); + } + + public UUID getCreatedBy() { + return getMetadata(Metadata::getCreatedBy); + } + + private R getMetadata(Function getter) { + + // The null check must be because Hibernate does not create an object if all fields are null. + // https://stackoverflow.com/questions/13606220/embedded-object-not-instantiated-automatically-if-it-has-no-basic-datatype-fiel + return getMetadata() == null ? null : getter.apply(getMetadata()); + } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/core/Base32.java b/iris-client-bff/src/main/java/iris/client_bff/core/Base32.java deleted file mode 100644 index a516b7ef3..000000000 --- a/iris-client-bff/src/main/java/iris/client_bff/core/Base32.java +++ /dev/null @@ -1,180 +0,0 @@ -/******************************************************************************* - * SORMAS® - Surveillance Outbreak Response Management & Analysis System - * Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * - * 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, either version 3 of the License, or - * (at your option) any later version. - * - * 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 . - *******************************************************************************/ -package iris.client_bff.core; - -import java.security.SecureRandom; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Locale; - -/** - * Encodes arbitrary byte arrays as case-insensitive base-32 strings. - *

- * The implementation is slightly different than in RFC 4648. During encoding, padding is not added, and during decoding - * the last incomplete chunk is not taken into account. The result is that multiple strings decode to the same byte - * array, for example, string of sixteen 7s ("7...7") and seventeen 7s both decode to the same byte array. TODO(sarvar): - * Revisit this encoding and whether this ambiguity needs fixing. - * - * @author sweis@google.com (Steve Weis) - * @author Neal Gafter - */ -public class Base32 { - // singleton - - private static final int SECRET_SIZE = 10; - - private static final SecureRandom RANDOM = new SecureRandom(); - - private static final Base32 INSTANCE = new Base32("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"); // RFC 4648/3548 - - static Base32 getInstance() { - return INSTANCE; - } - - // 32 alpha-numeric characters. - private String ALPHABET; - private char[] DIGITS; - private int MASK; - private int SHIFT; - private HashMap CHAR_MAP; - - static final String SEPARATOR = "-"; - - protected Base32(String alphabet) { - this.ALPHABET = alphabet; - DIGITS = ALPHABET.toCharArray(); - MASK = DIGITS.length - 1; - SHIFT = Integer.numberOfTrailingZeros(DIGITS.length); - CHAR_MAP = new HashMap(); - for (int i = 0; i < DIGITS.length; i++) { - CHAR_MAP.put(DIGITS[i], i); - } - } - - public static byte[] decode(String encoded) throws DecodingException { - return getInstance().decodeInternal(encoded); - } - - protected byte[] decodeInternal(String encoded) throws DecodingException { - // Remove whitespace and separators - encoded = encoded.trim().replaceAll(SEPARATOR, "").replaceAll(" ", ""); - - // Remove padding. Note: the padding is used as hint to determine how many - // bits to decode from the last incomplete chunk (which is commented out - // below, so this may have been wrong to start with). - encoded = encoded.replaceFirst("[=]*$", ""); - - // Canonicalize to all upper case - encoded = encoded.toUpperCase(Locale.US); - if (encoded.length() == 0) { - return new byte[0]; - } - int encodedLength = encoded.length(); - int outLength = encodedLength * SHIFT / 8; - byte[] result = new byte[outLength]; - int buffer = 0; - int next = 0; - int bitsLeft = 0; - for (char c : encoded.toCharArray()) { - if (!CHAR_MAP.containsKey(c)) { - throw new DecodingException("Illegal character: " + c); - } - buffer <<= SHIFT; - buffer |= CHAR_MAP.get(c) & MASK; - bitsLeft += SHIFT; - if (bitsLeft >= 8) { - result[next++] = (byte) (buffer >> (bitsLeft - 8)); - bitsLeft -= 8; - } - } - // We'll ignore leftover bits for now. - // - // if (next != outLength || bitsLeft >= SHIFT) { - // throw new DecodingException("Bits left: " + bitsLeft); - // } - return result; - } - - public static String encode(byte[] data, int separatorBlockSize) { - return getInstance().encodeInternal(data, separatorBlockSize); - } - - protected String encodeInternal(byte[] data, int separatorBlockSize) { - if (data.length == 0) { - return ""; - } - - // SHIFT is the number of bits per output character, so the length of the - // output is the length of the input multiplied by 8/SHIFT, rounded up. - if (data.length >= (1 << 28)) { - // The computation below will fail, so don't do it. - throw new IllegalArgumentException(); - } - - int outputLength = (data.length * 8 + SHIFT - 1) / SHIFT; - if (separatorBlockSize > 0) { - outputLength += outputLength / separatorBlockSize - 1; - } - StringBuilder result = new StringBuilder(outputLength); - - int buffer = data[0]; - int next = 1; - int bitsLeft = 8; - while (bitsLeft > 0 || next < data.length) { - if (bitsLeft < SHIFT) { - if (next < data.length) { - buffer <<= 8; - buffer |= (data[next++] & 0xff); - bitsLeft += 8; - } else { - int pad = SHIFT - bitsLeft; - buffer <<= pad; - bitsLeft += pad; - } - } - int index = MASK & (buffer >> (bitsLeft - SHIFT)); - bitsLeft -= SHIFT; - result.append(DIGITS[index]); - if (separatorBlockSize > 0 && (result.length() + 1) % (separatorBlockSize + 1) == 0 - && outputLength - result.length() > separatorBlockSize / 2) - result.append(SEPARATOR); - } - return result.toString(); - } - - @SuppressWarnings("serial") - public static class DecodingException extends Exception { - - public DecodingException(String message) { - super(message); - } - } - - public static String random() { - - // Allocating the buffer - byte[] buffer = new byte[SECRET_SIZE]; - - // Filling the buffer with random numbers. - RANDOM.nextBytes(buffer); - - // Getting the key and converting it to Base32 - byte[] secretKey = Arrays.copyOf(buffer, SECRET_SIZE); - return encode(secretKey, 0); - } -} diff --git a/iris-client-bff/src/main/java/iris/client_bff/core/Metadata.java b/iris-client-bff/src/main/java/iris/client_bff/core/Metadata.java index 01d0babba..990de0258 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/core/Metadata.java +++ b/iris-client-bff/src/main/java/iris/client_bff/core/Metadata.java @@ -3,12 +3,16 @@ import lombok.Getter; import java.time.Instant; +import java.util.UUID; +import javax.persistence.Column; import javax.persistence.Embeddable; import org.hibernate.search.engine.backend.types.Sortable; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField; +import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; /** @@ -19,9 +23,18 @@ public class Metadata { @CreatedDate + @Column(updatable = false) @GenericField(sortable = Sortable.YES) Instant created; + @LastModifiedDate @GenericField(sortable = Sortable.YES) Instant lastModified; + + @CreatedBy + @Column(updatable = false) + UUID createdBy; + + @LastModifiedBy + UUID lastModifiedBy; } diff --git a/iris-client-bff/src/main/java/iris/client_bff/core/SormasRefId.java b/iris-client-bff/src/main/java/iris/client_bff/core/SormasRefId.java deleted file mode 100644 index 9c1e597a4..000000000 --- a/iris-client-bff/src/main/java/iris/client_bff/core/SormasRefId.java +++ /dev/null @@ -1,51 +0,0 @@ -package iris.client_bff.core; - -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; - -import java.io.Serializable; -import java.nio.ByteBuffer; - -import javax.persistence.Embeddable; - -@Embeddable -@EqualsAndHashCode -@RequiredArgsConstructor(staticName = "of") -@NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) -public class SormasRefId implements Serializable { - - private static final long serialVersionUID = 6897690346724487232L; - - final String refId; - - public static SormasRefId random() { - - java.util.UUID randomUuid = java.util.UUID.randomUUID(); - - long leastSignificantBits = randomUuid.getLeastSignificantBits(); - long mostSignificantBits = randomUuid.getMostSignificantBits(); - - byte[] bytes = longToBytes(leastSignificantBits, mostSignificantBits); - - return of(Base32.encode(bytes, 6)); - } - - private static byte[] longToBytes(long x, long y) { - - ByteBuffer buffer = ByteBuffer.allocate(2 * Long.SIZE / 8); - buffer.putLong(x); - buffer.putLong(y); - return buffer.array(); - } - - /* - * (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return refId; - } -} diff --git a/iris-client-bff/src/main/java/iris/client_bff/core/utils/HibernateSearcher.java b/iris-client-bff/src/main/java/iris/client_bff/core/utils/HibernateSearcher.java index da8bc8d37..8e76ced87 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/core/utils/HibernateSearcher.java +++ b/iris-client-bff/src/main/java/iris/client_bff/core/utils/HibernateSearcher.java @@ -40,7 +40,7 @@ public SearchResult search(String search, Pageable pageable, String[] fie } private PredicateFinalStep createQuery(String keyword, String[] fields, - UnaryOperator> statusMatchFunc, SearchPredicateFactory f) { + UnaryOperator> searchInterceptor, SearchPredicateFactory f) { var boolPred = f.bool(); @@ -48,7 +48,7 @@ private PredicateFinalStep createQuery(String keyword, String[] fields, boolPred = boolPred.must(f2 -> createQueryPart(keywordPart, fields, f2)); } - return statusMatchFunc.apply(boolPred); + return searchInterceptor.apply(boolPred); } private PredicateFinalStep createQueryPart(String keyword, String[] fields, SearchPredicateFactory f) { diff --git a/iris-client-bff/src/main/java/iris/client_bff/core/utils/ValidationHelper.java b/iris-client-bff/src/main/java/iris/client_bff/core/utils/ValidationHelper.java index 125134096..1277f65f1 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/core/utils/ValidationHelper.java +++ b/iris-client-bff/src/main/java/iris/client_bff/core/utils/ValidationHelper.java @@ -27,8 +27,6 @@ public class ValidationHelper { private final AlertService alertService; private final CentralConfigurationService configService; - public static final Pattern UUID_REGEX = Pattern - .compile("([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})"); public static final Pattern PW_REGEX = Pattern .compile( "^(?=.*[0123456789_\\-#()@§!$].*[0123456789_\\-#()@§!$])(?=.*[ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜẞabcdefghijklmnopqrstuvwxyzäöüß])([ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜẞ]|[abcdefghijklmnopqrstuvwxyzäöüß]|[0123456789]|[_\\-#()@§!$]){8,}$"); @@ -101,16 +99,6 @@ public class ValidationHelper { { "CREATE", "INDEX" }, { "DROP", "INDEX" }, { "CREATE", "VIEW" }, { "DROP", "VIEW" } }; - public static boolean isUUIDInputValid(String id, String idName) { - - if (UUID_REGEX.matcher(id).matches()) { - return true; - } - - log.warn(ErrorMessages.INVALID_INPUT + idName + id); - return false; - } - public boolean isPasswordValid(String password) { return PW_REGEX.matcher(password).matches(); } diff --git a/iris-client-bff/src/main/java/iris/client_bff/events/EventDataRequest.java b/iris-client-bff/src/main/java/iris/client_bff/events/EventDataRequest.java index 986d79c84..1a8758a63 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/events/EventDataRequest.java +++ b/iris-client-bff/src/main/java/iris/client_bff/events/EventDataRequest.java @@ -91,14 +91,6 @@ public EventDataRequest(String refId, String name, Instant requestStart, Instant this.announcementToken = announcementToken; } - public Instant getLastModifiedAt() { - return this.getMetadata().getLastModified(); - } - - public Instant getCreatedAt() { - return this.getMetadata().getCreated(); - } - @Embeddable @EqualsAndHashCode @RequiredArgsConstructor(staticName = "of") diff --git a/iris-client-bff/src/main/java/iris/client_bff/events/model/Location.java b/iris-client-bff/src/main/java/iris/client_bff/events/model/Location.java index c594011d3..16f800f54 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/events/model/Location.java +++ b/iris-client-bff/src/main/java/iris/client_bff/events/model/Location.java @@ -19,11 +19,9 @@ import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField; -import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; import org.hibernate.search.mapper.pojo.mapping.definition.annotation.KeywordField; @Entity -@Indexed @Data @NoArgsConstructor @AllArgsConstructor diff --git a/iris-client-bff/src/main/java/iris/client_bff/events/web/EventDataRequestController.java b/iris-client-bff/src/main/java/iris/client_bff/events/web/EventDataRequestController.java index e2707e8d7..7d57ee9e9 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/events/web/EventDataRequestController.java +++ b/iris-client-bff/src/main/java/iris/client_bff/events/web/EventDataRequestController.java @@ -18,6 +18,8 @@ import iris.client_bff.events.web.dto.GuestListDataProvider; import iris.client_bff.events.web.dto.LocationInformation; import iris.client_bff.ui.messages.ErrorMessages; +import iris.client_bff.users.UserDetailsServiceImpl; +import iris.client_bff.users.entities.UserAccount; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -51,210 +53,214 @@ @AllArgsConstructor public class EventDataRequestController { - private static final String FIELD_PROVIDER_ID = "providerId"; - private static final String FIELD_LOCATION_ID = "locationId"; - private static final String FIELD_REQUEST_DETAILS = "requestDetails"; - private static final String FIELD_STATUS = "status"; - private static final String FIELD_EXTERNAL_REQUEST_ID = "externalRequestId"; - private static final String FIELD_NAME = "name"; - private static final String FIELD_COMMENT = "comment"; - private static final String FIELD_CODE = "code"; - private static final String FIELD_SEARCH = "search"; - - private EventDataRequestService dataRequestService; - private EventDataSubmissionRepository submissionRepo; - - private ValidationHelper validHelper; - private ModelMapper modelMapper; + private static final String FIELD_PROVIDER_ID = "providerId"; + private static final String FIELD_LOCATION_ID = "locationId"; + private static final String FIELD_REQUEST_DETAILS = "requestDetails"; + private static final String FIELD_STATUS = "status"; + private static final String FIELD_EXTERNAL_REQUEST_ID = "externalRequestId"; + private static final String FIELD_NAME = "name"; + private static final String FIELD_COMMENT = "comment"; + private static final String FIELD_SEARCH = "search"; + + private final UserDetailsServiceImpl userService; + private EventDataRequestService dataRequestService; + private EventDataSubmissionRepository submissionRepo; + + private ValidationHelper validHelper; + private ModelMapper modelMapper; + + private final Function eventMapperFunction = ( + EventDataRequest request) -> { + ExistingDataRequestClientWithLocation mapped = EventMapper.map(request); + mapped.setLocationInformation(modelMapper.map(request.getLocation(), LocationInformation.class)); + return mapped; + }; + + @PostMapping + @ResponseStatus(HttpStatus.CREATED) + public ResponseEntity createDataRequest(@Valid @RequestBody DataRequestClient request) { + + DataRequestClient requestValidated = validateDataRequestClient(request); + + var result = dataRequestService.createDataRequest(requestValidated); + + return ok(mapDataRequestDetails(result)); + } + + @GetMapping + @ResponseStatus(HttpStatus.OK) + public Page getDataRequests( + @RequestParam(required = false) Status status, + @RequestParam(required = false) String search, + Pageable pageable) { + if (validHelper.isPossibleAttack(search, FIELD_SEARCH, false)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } - private final Function eventMapperFunction = ( - EventDataRequest request) -> { - ExistingDataRequestClientWithLocation mapped = EventMapper.map(request); - mapped.setLocationInformation(modelMapper.map(request.getLocation(), LocationInformation.class)); - return mapped; - }; + if (status != null && StringUtils.isNotEmpty(search)) { + return dataRequestService.search(status, search, pageable).map(eventMapperFunction); + } else if (StringUtils.isNotEmpty(search)) { + return dataRequestService.search(search, pageable).map(eventMapperFunction); + } else if (status != null) { + return dataRequestService.findByStatus(status, pageable).map(eventMapperFunction); + } + return dataRequestService.findAll(pageable).map(eventMapperFunction); + } - @PostMapping - @ResponseStatus(HttpStatus.CREATED) - public ResponseEntity createDataRequest(@Valid @RequestBody DataRequestClient request) { + @GetMapping("/{code}") + @ResponseStatus(HttpStatus.OK) + public ResponseEntity getDataRequestByCode(@PathVariable UUID code) { - DataRequestClient requestValidated = validateDataRequestClient(request); + var dataRequest = dataRequestService.findById(code); - var result = dataRequestService.createDataRequest(requestValidated); + if (dataRequest.isPresent()) { - return ok(mapDataRequestDetails(result)); - } + DataRequestDetails requestDetails = mapDataRequestDetails(dataRequest.get()); + addSubmissionsToRequest(dataRequest.get(), requestDetails); - @GetMapping - @ResponseStatus(HttpStatus.OK) - public Page getDataRequests( - @RequestParam(required = false) Status status, - @RequestParam(required = false) String search, - Pageable pageable) { - if (validHelper.isPossibleAttack(search, FIELD_SEARCH, false)) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } - - if (status != null && StringUtils.isNotEmpty(search)) { - return dataRequestService.search(status, search, pageable).map(eventMapperFunction); - } else if (StringUtils.isNotEmpty(search)) { - return dataRequestService.search(search, pageable).map(eventMapperFunction); - } else if (status != null) { - return dataRequestService.findByStatus(status, pageable).map(eventMapperFunction); - } - return dataRequestService.findAll(pageable).map(eventMapperFunction); - } + return ResponseEntity.of(Optional.of(requestDetails)); - @GetMapping("/{code}") - @ResponseStatus(HttpStatus.OK) - public ResponseEntity getDataRequestByCode(@PathVariable UUID code) { - if (ValidationHelper.isUUIDInputValid(code.toString(), FIELD_CODE)) { - var dataRequest = dataRequestService.findById(code); - if (dataRequest.isPresent()) { - DataRequestDetails requestDetails = mapDataRequestDetails(dataRequest.get()); - addSubmissionsToRequest(dataRequest.get(), requestDetails); - - return ResponseEntity.of(Optional.of(requestDetails)); - } else { - return new ResponseEntity<>(HttpStatus.NOT_FOUND); - } - } else { - return new ResponseEntity<>(HttpStatus.BAD_REQUEST); - } + } else { + return new ResponseEntity<>(HttpStatus.NOT_FOUND); } + } - @PatchMapping("/{code}") - @ResponseStatus(HttpStatus.OK) - public ResponseEntity update(@PathVariable UUID code, @RequestBody EventUpdateDTO patch) { - if (!ValidationHelper.isUUIDInputValid(code.toString(), FIELD_CODE)) { - return new ResponseEntity<>(HttpStatus.BAD_REQUEST); - } + @PatchMapping("/{code}") + @ResponseStatus(HttpStatus.OK) + public ResponseEntity update(@PathVariable UUID code, @RequestBody EventUpdateDTO patch) { - EventUpdateDTO patchValidated = validateEventUpdateDTO(patch); + EventUpdateDTO patchValidated = validateEventUpdateDTO(patch); - var dataRequest = dataRequestService.findById(code); - if (dataRequest.isPresent()) { - EventDataRequest updated = dataRequestService.update(dataRequest.get(), patchValidated); + var dataRequest = dataRequestService.findById(code); + if (dataRequest.isPresent()) { + EventDataRequest updated = dataRequestService.update(dataRequest.get(), patchValidated); - DataRequestDetails requestDetails = mapDataRequestDetails(updated); - addSubmissionsToRequest(dataRequest.get(), requestDetails); + DataRequestDetails requestDetails = mapDataRequestDetails(updated); + addSubmissionsToRequest(dataRequest.get(), requestDetails); - return ResponseEntity.of(Optional.of(requestDetails)); - } else { - return new ResponseEntity<>(HttpStatus.NOT_FOUND); - } + return ResponseEntity.of(Optional.of(requestDetails)); + } else { + return new ResponseEntity<>(HttpStatus.NOT_FOUND); } + } - private EventUpdateDTO validateEventUpdateDTO(EventUpdateDTO patch) { - if (patch == null) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } - - if (validHelper.isPossibleAttack(patch.getComment(), FIELD_COMMENT, false)) { - patch.setComment(ErrorMessages.INVALID_INPUT_STRING); - } - - if (validHelper.isPossibleAttack(patch.getName(), FIELD_NAME, false)) { - patch.setName(ErrorMessages.INVALID_INPUT_STRING); - } - - if (validHelper.isPossibleAttack(patch.getExternalRequestId(), FIELD_EXTERNAL_REQUEST_ID, false)) { - patch.setExternalRequestId(ErrorMessages.INVALID_INPUT_STRING); - } - - if (patch.getStatus() != null - && !(patch.getStatus() == EventStatusDTO.DATA_RECEIVED - || patch.getStatus() == EventStatusDTO.DATA_REQUESTED - || patch.getStatus() == EventStatusDTO.ABORTED - || patch.getStatus() == EventStatusDTO.CLOSED)) { - log.warn(ErrorMessages.INVALID_INPUT + FIELD_STATUS + patch.getStatus()); - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } - - return patch; + private EventUpdateDTO validateEventUpdateDTO(EventUpdateDTO patch) { + if (patch == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); } - private DataRequestClient validateDataRequestClient(DataRequestClient request) { - if (request == null) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } - - if (validHelper.isPossibleAttack(request.getComment(), FIELD_COMMENT, false)) { - request.setComment(ErrorMessages.INVALID_INPUT_STRING); - } - - if (validHelper.isPossibleAttack(request.getName(), FIELD_NAME, false)) { - request.setName(ErrorMessages.INVALID_INPUT_STRING); - } - - if (validHelper.isPossibleAttack(request.getRequestDetails(), FIELD_REQUEST_DETAILS, false)) { - request.setRequestDetails(ErrorMessages.INVALID_INPUT_STRING); - } + if (validHelper.isPossibleAttack(patch.getComment(), FIELD_COMMENT, false)) { + patch.setComment(ErrorMessages.INVALID_INPUT_STRING); + } - if (validHelper.isPossibleAttackForRequiredValue(request.getExternalRequestId(), FIELD_EXTERNAL_REQUEST_ID, - false)) { - request.setExternalRequestId(ErrorMessages.INVALID_INPUT_STRING); - } + if (validHelper.isPossibleAttack(patch.getName(), FIELD_NAME, false)) { + patch.setName(ErrorMessages.INVALID_INPUT_STRING); + } - if (validHelper.isPossibleAttackForRequiredValue(request.getProviderId(), FIELD_PROVIDER_ID, false)) { - request.setProviderId(ErrorMessages.INVALID_INPUT_STRING); - } + if (validHelper.isPossibleAttack(patch.getExternalRequestId(), FIELD_EXTERNAL_REQUEST_ID, false)) { + patch.setExternalRequestId(ErrorMessages.INVALID_INPUT_STRING); + } - if (validHelper.isPossibleAttackForRequiredValue(request.getLocationId(), FIELD_LOCATION_ID, false)) { - request.setLocationId(ErrorMessages.INVALID_INPUT_STRING); - } + if (patch.getStatus() != null + && !(patch.getStatus() == EventStatusDTO.DATA_RECEIVED + || patch.getStatus() == EventStatusDTO.DATA_REQUESTED + || patch.getStatus() == EventStatusDTO.ABORTED + || patch.getStatus() == EventStatusDTO.CLOSED)) { + log.warn(ErrorMessages.INVALID_INPUT + FIELD_STATUS + patch.getStatus()); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } - boolean isInvalid = false; + return patch; + } - if (request.getStart() == null) { - log.warn(ErrorMessages.INVALID_INPUT + " - start: null"); - isInvalid = true; - } + private DataRequestClient validateDataRequestClient(DataRequestClient request) { + if (request == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } - if (request.getEnd() == null) { - log.warn(ErrorMessages.INVALID_INPUT + " - end: null"); - isInvalid = true; - } + if (validHelper.isPossibleAttack(request.getComment(), FIELD_COMMENT, false)) { + request.setComment(ErrorMessages.INVALID_INPUT_STRING); + } - if (isInvalid) { - throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); - } + if (validHelper.isPossibleAttack(request.getName(), FIELD_NAME, false)) { + request.setName(ErrorMessages.INVALID_INPUT_STRING); + } - return request; + if (validHelper.isPossibleAttack(request.getRequestDetails(), FIELD_REQUEST_DETAILS, false)) { + request.setRequestDetails(ErrorMessages.INVALID_INPUT_STRING); } - private DataRequestDetails mapDataRequestDetails(EventDataRequest request) { - DataRequestDetails mapped = modelMapper.map(request, DataRequestDetails.class); - mapped.setCode(request.getId().toString()); - mapped.setStart(request.getRequestStart()); - mapped.setEnd(request.getRequestEnd()); - mapped.setLocationInformation(modelMapper.map(request.getLocation(), LocationInformation.class)); - mapped.setLastModifiedAt(request.getLastModifiedAt()); - mapped.setRequestedAt(request.getCreatedAt()); - mapped.setExternalRequestId(request.getRefId()); - return mapped; + if (validHelper.isPossibleAttackForRequiredValue(request.getExternalRequestId(), FIELD_EXTERNAL_REQUEST_ID, + false)) { + request.setExternalRequestId(ErrorMessages.INVALID_INPUT_STRING); } - private void addSubmissionsToRequest(EventDataRequest request, DataRequestDetails requestDetails) { - submissionRepo.findAllByRequest(request).get().findFirst() - .ifPresent(it -> addSubmissionToRequest(requestDetails, it)); + if (validHelper.isPossibleAttackForRequiredValue(request.getProviderId(), FIELD_PROVIDER_ID, false)) { + request.setProviderId(ErrorMessages.INVALID_INPUT_STRING); } - private void addSubmissionToRequest(DataRequestDetails requestDetails, EventDataSubmission submission) { + if (validHelper.isPossibleAttackForRequiredValue(request.getLocationId(), FIELD_LOCATION_ID, false)) { + request.setLocationId(ErrorMessages.INVALID_INPUT_STRING); + } - var dataProvider = modelMapper.map(submission.getDataProvider(), GuestListDataProvider.class); + boolean isInvalid = false; - var guests = submission.getGuests().stream().map(it -> modelMapper.map(it, Guest.class)) - .collect(Collectors.toList()); + if (request.getStart() == null) { + log.warn(ErrorMessages.INVALID_INPUT + " - start: null"); + isInvalid = true; + } - var guestList = GuestList.builder() - .additionalInformation(submission.getAdditionalInformation()) - .startDate(submission.getStartDate()) - .endDate(submission.getEndDate()) - .dataProvider(dataProvider) - .guests(guests) - .build(); + if (request.getEnd() == null) { + log.warn(ErrorMessages.INVALID_INPUT + " - end: null"); + isInvalid = true; + } - requestDetails.setSubmissionData(guestList); + if (isInvalid) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); } + + return request; + } + + private DataRequestDetails mapDataRequestDetails(EventDataRequest request) { + + DataRequestDetails mapped = modelMapper.map(request, DataRequestDetails.class); + mapped.setCode(request.getId().toString()); + mapped.setStart(request.getRequestStart()); + mapped.setEnd(request.getRequestEnd()); + mapped.setLocationInformation(modelMapper.map(request.getLocation(), LocationInformation.class)); + mapped.setLastModifiedAt(request.getLastModifiedAt()); + mapped.setRequestedAt(request.getCreatedAt()); + mapped.setExternalRequestId(request.getRefId()); + mapped.setCreatedBy(userService.findByUuid(request.getCreatedBy()).map(this::getFullName).orElse(null)); + mapped.setLastModifiedBy(userService.findByUuid(request.getLastModifiedBy()).map(this::getFullName).orElse(null)); + return mapped; + } + + private void addSubmissionsToRequest(EventDataRequest request, DataRequestDetails requestDetails) { + submissionRepo.findAllByRequest(request).get().findFirst() + .ifPresent(it -> addSubmissionToRequest(requestDetails, it)); + } + + private void addSubmissionToRequest(DataRequestDetails requestDetails, EventDataSubmission submission) { + + var dataProvider = modelMapper.map(submission.getDataProvider(), GuestListDataProvider.class); + + var guests = submission.getGuests().stream().map(it -> modelMapper.map(it, Guest.class)) + .collect(Collectors.toList()); + + var guestList = GuestList.builder() + .additionalInformation(submission.getAdditionalInformation()) + .startDate(submission.getStartDate()) + .endDate(submission.getEndDate()) + .dataProvider(dataProvider) + .guests(guests) + .build(); + + requestDetails.setSubmissionData(guestList); + } + + private String getFullName(UserAccount user) { + return user.getFirstName() + " " + user.getLastName(); + } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/events/web/dto/DataRequestDetails.java b/iris-client-bff/src/main/java/iris/client_bff/events/web/dto/DataRequestDetails.java index 1827ad82e..1e790278c 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/events/web/dto/DataRequestDetails.java +++ b/iris-client-bff/src/main/java/iris/client_bff/events/web/dto/DataRequestDetails.java @@ -17,32 +17,35 @@ @AllArgsConstructor(access = PRIVATE) public class DataRequestDetails { - public enum StatusEnum { - DATA_REQUESTED, DATA_RECEIVED, CLOSED, ABORTED; - } + public enum StatusEnum { + DATA_REQUESTED, DATA_RECEIVED, CLOSED, ABORTED; + } - private StatusEnum status; + private StatusEnum status; - private String code; + private String code; - private String name; + private String name; - private String externalRequestId; + private String externalRequestId; - private Instant start; + private Instant start; - private Instant end; + private Instant end; - private Instant requestedAt; + private Instant requestedAt; - private Instant lastModifiedAt; + private Instant lastModifiedAt; - private String requestDetails; + private String requestDetails; - private LocationInformation locationInformation; + private LocationInformation locationInformation; - private GuestList submissionData; + private GuestList submissionData; - private String comment; + private String comment; + private Instant createdAt; + private String createdBy; + private String lastModifiedBy; } diff --git a/iris-client-bff/src/main/java/iris/client_bff/hd_search/HdSearchException.java b/iris-client-bff/src/main/java/iris/client_bff/hd_search/HdSearchException.java new file mode 100644 index 000000000..0d205fe7f --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/hd_search/HdSearchException.java @@ -0,0 +1,27 @@ +package iris.client_bff.hd_search; + +import org.apache.commons.lang3.exception.ExceptionUtils; + +import java.io.Serial; + +public class HdSearchException extends RuntimeException { + + @Serial + private static final long serialVersionUID = -3649251457000674951L; + + public HdSearchException(String failedMethod, Throwable cause) { + super("Call to '" + failedMethod + "' failed", cause); + } + + public HdSearchException(String message) { + super(message); + } + + public HdSearchException(Throwable cause) { + super(cause); + } + + public String getErrorMessage() { + return ExceptionUtils.getRootCause(this).getMessage(); + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/hd_search/HealthDepartment.java b/iris-client-bff/src/main/java/iris/client_bff/hd_search/HealthDepartment.java new file mode 100644 index 000000000..de43504d5 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/hd_search/HealthDepartment.java @@ -0,0 +1,36 @@ +package iris.client_bff.hd_search; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class HealthDepartment { + + private String name; + private String rkiCode; + private String epsName; + private String department; + private Address address; + private ContactData contactData; + private ContactData covid19ContactData; + private ContactData entryContactData; + + @Data + @JsonIgnoreProperties(ignoreUnknown = true) + private class Address { + private String street; + private String zipCode; + private String city; + } + + @Data + @JsonIgnoreProperties(ignoreUnknown = true) + private class ContactData { + private String phone; + private String fax; + @JsonProperty("eMail") + private String eMail; + } +} \ No newline at end of file diff --git a/iris-client-bff/src/main/java/iris/client_bff/hd_search/eps/EPSHdSearchClient.java b/iris-client-bff/src/main/java/iris/client_bff/hd_search/eps/EPSHdSearchClient.java new file mode 100644 index 000000000..7b7d83a42 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/hd_search/eps/EPSHdSearchClient.java @@ -0,0 +1,34 @@ +package iris.client_bff.hd_search.eps; + +import com.googlecode.jsonrpc4j.JsonRpcHttpClient; +import iris.client_bff.config.BackendServiceProperties; +import iris.client_bff.hd_search.HdSearchException; +import iris.client_bff.hd_search.HealthDepartment; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +@Slf4j +@Service +@AllArgsConstructor +public class EPSHdSearchClient { + + private final JsonRpcHttpClient epsRpcClient; + private BackendServiceProperties config; + + public List searchForHd(String search) { + + var methodName = config.getEndpoint() + ".searchForHd"; + Map payload = Map.of("searchKeyword", search); + + try { + return Arrays.stream(epsRpcClient.invoke(methodName, payload, HealthDepartment[].class)).toList(); + } catch (Throwable t) { + throw new HdSearchException(methodName, t); + } + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessage.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessage.java new file mode 100644 index 000000000..1adc9f01e --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessage.java @@ -0,0 +1,107 @@ +package iris.client_bff.iris_messages; + +import iris.client_bff.core.Aggregate; +import iris.client_bff.core.Id; +import lombok.AccessLevel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.RequiredArgsConstructor; + +import java.io.Serial; +import java.io.Serializable; +import java.util.UUID; + +import javax.persistence.AttributeOverride; +import javax.persistence.AttributeOverrides; +import javax.persistence.Column; +import javax.persistence.Embeddable; +import javax.persistence.Embedded; +import javax.persistence.Entity; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import org.hibernate.search.engine.backend.types.Sortable; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexedEmbedded; + +@Entity +@Table(name = "iris_message") +@Indexed +@Data +@EqualsAndHashCode(callSuper = true, exclude = "folder") +@NoArgsConstructor +public class IrisMessage extends Aggregate { + + public static final int SUBJECT_MAX_LENGTH = 500; + public static final int BODY_MAX_LENGTH = 6000; + + { + id = IrisMessage.IrisMessageIdentifier.of(UUID.randomUUID()); + } + + @ManyToOne + @JoinColumn(name="folder_id", nullable=false) + @IndexedEmbedded(includeEmbeddedObjectId = true) + private IrisMessageFolder folder; + + @Column(nullable = false) + @FullTextField(name = "subject_search", analyzer = "german") + @GenericField(sortable = Sortable.YES) + private String subject; + + @Column(nullable = false) + private String body; + + @Column(nullable = false) + @Embedded + @IndexedEmbedded + @AttributeOverrides({ + @AttributeOverride( name = "id", column = @Column(name = "hd_author_id")), + @AttributeOverride( name = "name", column = @Column(name = "hd_author_name")) + }) + private IrisMessageHdContact hdAuthor; + + @Column(nullable = false) + @Embedded + @IndexedEmbedded + @AttributeOverrides({ + @AttributeOverride( name = "id", column = @Column(name = "hd_recipient_id")), + @AttributeOverride( name = "name", column = @Column(name = "hd_recipient_name")) + }) + private IrisMessageHdContact hdRecipient; + + private boolean isRead; + + @Embeddable + @EqualsAndHashCode + @RequiredArgsConstructor(staticName = "of") + @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) + public static class IrisMessageIdentifier implements Id, Serializable { + + @Serial + private static final long serialVersionUID = 1140444389070674189L; + + private final UUID id; + + /** + * for JSON deserialization + */ + public static IrisMessage.IrisMessageIdentifier of(String uuid) { + return of(UUID.fromString(uuid)); + } + + @Override + public String toString() { + return id.toString(); + } + + public UUID toUUID() { + return id; + } + } + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageContext.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageContext.java new file mode 100644 index 000000000..a70d5e4ca --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageContext.java @@ -0,0 +1,6 @@ +package iris.client_bff.iris_messages; + +public enum IrisMessageContext { + INBOX, + OUTBOX; +} \ No newline at end of file diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageException.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageException.java new file mode 100644 index 000000000..9a1f2b7e3 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageException.java @@ -0,0 +1,26 @@ +package iris.client_bff.iris_messages; + +import org.apache.commons.lang3.exception.ExceptionUtils; + +import java.io.Serial; + +public class IrisMessageException extends RuntimeException { + @Serial + private static final long serialVersionUID = 8068203942662884747L; + + public IrisMessageException(String failedMethod, Throwable cause) { + super("Call to '" + failedMethod + "' failed", cause); + } + + public IrisMessageException(String message) { + super(message); + } + + public IrisMessageException(Throwable cause) { + super(cause); + } + + public String getErrorMessage() { + return ExceptionUtils.getRootCause(this).getMessage(); + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolder.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolder.java new file mode 100644 index 000000000..7e8cd0f85 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolder.java @@ -0,0 +1,71 @@ +package iris.client_bff.iris_messages; + +import iris.client_bff.core.Aggregate; +import iris.client_bff.core.Id; +import lombok.AccessLevel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.RequiredArgsConstructor; +import lombok.ToString; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Set; +import java.util.UUID; + +import javax.persistence.*; + +@Entity +@Table(name = "iris_message_folder") +@Data +@EqualsAndHashCode(callSuper = true, exclude = "messages") +@NoArgsConstructor +public class IrisMessageFolder extends Aggregate { + + { + id = IrisMessageFolder.IrisMessageFolderIdentifier.of(UUID.randomUUID()); + } + + @ToString.Exclude + @OneToMany(mappedBy = "folder", cascade = CascadeType.ALL, orphanRemoval = true) + private Set messages; + + @Column(nullable = false) + private String name; + + @Enumerated(EnumType.STRING) + private IrisMessageContext context; + + @Embedded + @AttributeOverride(name = "id", column = @Column(name = "parent_folder")) + private IrisMessageFolderIdentifier parentFolder; + + @Embeddable + @EqualsAndHashCode + @RequiredArgsConstructor(staticName = "of") + @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) + public static class IrisMessageFolderIdentifier implements Id, Serializable { + + @Serial + private static final long serialVersionUID = -8255216015747810442L; + + final UUID id; + + /** + * for JSON deserialization + */ + public static IrisMessageFolder.IrisMessageFolderIdentifier of(String uuid) { + return of(UUID.fromString(uuid)); + } + + @Override + public String toString() { + return id.toString(); + } + + public UUID toUUID() { + return id; + } + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolderInitializer.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolderInitializer.java new file mode 100644 index 000000000..8de74cb99 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolderInitializer.java @@ -0,0 +1,34 @@ +package iris.client_bff.iris_messages; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.PostConstruct; + +import org.springframework.stereotype.Component; + +@Component +@AllArgsConstructor +@Slf4j +public class IrisMessageFolderInitializer { + + private IrisMessageFolderRepository folderRepository; + + @PostConstruct + protected void createMessageFoldersIfNotExist() { + if (folderRepository.count() == 0) { + IrisMessageFolder inboxFolder = new IrisMessageFolder(); + inboxFolder + .setName("Posteingang") + .setContext(IrisMessageContext.INBOX); + IrisMessageFolder outboxFolder = new IrisMessageFolder(); + outboxFolder + .setName("Postausgang") + .setContext(IrisMessageContext.OUTBOX); + folderRepository.save(inboxFolder); + folderRepository.save(outboxFolder); + } else { + log.info("Initial iris message folders already exists. Skip creating of folders."); + } + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolderRepository.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolderRepository.java new file mode 100644 index 000000000..f86134cf7 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageFolderRepository.java @@ -0,0 +1,16 @@ +package iris.client_bff.iris_messages; + +import org.springframework.data.jpa.repository.JpaRepository; + +import iris.client_bff.iris_messages.IrisMessageFolder.IrisMessageFolderIdentifier; + +import java.util.List; +import java.util.Optional; + +public interface IrisMessageFolderRepository extends JpaRepository { + + Optional findFirstByContextAndParentFolderIsNull(IrisMessageContext context); + + List findAllByParentFolder(IrisMessageFolderIdentifier parentFolder); + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageHdContact.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageHdContact.java new file mode 100644 index 000000000..0c9fef34e --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageHdContact.java @@ -0,0 +1,42 @@ +package iris.client_bff.iris_messages; + +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +import javax.persistence.Embeddable; +import javax.persistence.Transient; + +import org.hibernate.search.engine.backend.types.Sortable; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField; +import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField; + +@Data +@Embeddable +@Builder +@NoArgsConstructor +public class IrisMessageHdContact { + + public static final int ID_MAX_LENGTH = 255; + public static final int NAME_MAX_LENGTH = 255; + + private String id; + @FullTextField(name = "name_search", analyzer = "german") + @GenericField(sortable = Sortable.YES) + private String name; + + @ToString.Exclude + @Transient + private boolean isOwn; + + public IrisMessageHdContact(String id, String name) { + this.id = id; + this.name = name; + } + + public IrisMessageHdContact(String id, String name, boolean isOwn) { + this(id, name); + this.isOwn = isOwn; + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageRepository.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageRepository.java new file mode 100644 index 000000000..bbcb029ae --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageRepository.java @@ -0,0 +1,17 @@ +package iris.client_bff.iris_messages; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +public interface IrisMessageRepository extends JpaRepository { + + @Query("select count(m) from IrisMessage m where m.isRead = false and m.folder.id = :folderId") + int getCountUnreadByFolderId(IrisMessageFolder.IrisMessageFolderIdentifier folderId); + + int countByIsReadFalse(); + + Page findAllByFolderIdOrderByIsReadAsc(IrisMessageFolder.IrisMessageFolderIdentifier folder, Pageable pageable); + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageService.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageService.java new file mode 100644 index 000000000..e170364cd --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/IrisMessageService.java @@ -0,0 +1,104 @@ +package iris.client_bff.iris_messages; + +import iris.client_bff.core.utils.HibernateSearcher; +import iris.client_bff.hd_search.HealthDepartment; +import iris.client_bff.hd_search.eps.EPSHdSearchClient; +import iris.client_bff.iris_messages.IrisMessage.IrisMessageIdentifier; +import iris.client_bff.iris_messages.IrisMessageFolder.IrisMessageFolderIdentifier; +import iris.client_bff.iris_messages.eps.EPSIrisMessageClient; +import lombok.RequiredArgsConstructor; + +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +public class IrisMessageService { + + private static final String[] SEARCH_FIELDS = { "subject_search", "hdAuthor.name_search", "hdRecipient.name_search" }; + + private final IrisMessageRepository messageRepository; + private final IrisMessageFolderRepository folderRepository; + private final HibernateSearcher searcher; + private final EPSIrisMessageClient irisMessageClient; + private final EPSHdSearchClient hdSearchClient; + + public Optional findById(IrisMessageIdentifier messageId) { + return messageRepository.findById(messageId); + } + + public Page search(IrisMessageFolderIdentifier folderId, String searchString, Pageable pageable) { + if (StringUtils.isEmpty(searchString)) { + return messageRepository.findAllByFolderIdOrderByIsReadAsc(folderId, pageable); + } + var result = searcher.search( + searchString, + pageable, + SEARCH_FIELDS, + it -> it.must(f2 -> f2.match().field("folder.id").matching(folderId)), + IrisMessage.class); + return new PageImpl<>(result.hits(), pageable, result.total().hitCount()); + } + + public int getCountUnreadByFolderId(IrisMessageFolderIdentifier folderId) { + return messageRepository.getCountUnreadByFolderId(folderId); + } + + public int getCountUnread() { + return messageRepository.countByIsReadFalse(); + } + + public List getFolders() { + return folderRepository.findAll(); + } + + public List getHdContacts(String search) throws IrisMessageException { + + List contacts = this.irisMessageClient.getIrisMessageHdContacts(); + + if (search == null || search.equals("")) { + return contacts; + } + + List healthDepartments = this.hdSearchClient.searchForHd(search); + List hdEpsNames = healthDepartments + .stream() + .map(HealthDepartment::getEpsName) + .filter(Objects::nonNull) + .toList(); + + return contacts + .stream() + .filter(contact -> hdEpsNames.contains(contact.getId()) || contact.getName().contains(search) + || contact.getId().contains(search)) + .toList(); + } + + public IrisMessageHdContact getOwnHdContact() { + return this.irisMessageClient.getOwnIrisMessageHdContact(); + } + + public IrisMessage sendMessage(IrisMessage message) throws IrisMessageException { + this.irisMessageClient.createIrisMessage(message); + return this.messageRepository.save(message); + } + + public IrisMessage saveMessage(IrisMessage message) { + return this.messageRepository.save(message); + } + + public Optional updateReadState(IrisMessageIdentifier messageId, Boolean readed) { + + Optional message = findById(messageId); + + return message.map(it -> it.setRead(readed)) + .map(this::saveMessage); + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/EPSIrisMessageClient.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/EPSIrisMessageClient.java new file mode 100644 index 000000000..b0a31b1bf --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/EPSIrisMessageClient.java @@ -0,0 +1,78 @@ +package iris.client_bff.iris_messages.eps; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.googlecode.jsonrpc4j.JsonRpcHttpClient; +import iris.client_bff.config.RPCClientProperties; +import iris.client_bff.iris_messages.*; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.*; + +@Service +@RequiredArgsConstructor +public class EPSIrisMessageClient { + + private static final int READ_TIMEOUT = 12 * 1000; + + private final JsonRpcHttpClient epsRpcClient; + private final RPCClientProperties rpcClientProps; + + public IrisMessageHdContact getOwnIrisMessageHdContact() { + String ownId = rpcClientProps.getOwnEndpoint(); + return new IrisMessageHdContact(ownId, ownId, true); + } + + public Optional findIrisMessageHdContactById(String contactId) throws IrisMessageException { + List contacts = this.getIrisMessageHdContacts(); + return contacts.stream().filter(contact -> contact.getId().equals(contactId)).findFirst(); + } + + public List getIrisMessageHdContacts() throws IrisMessageException { + var methodName = rpcClientProps.getOwnEndpoint() + "._directory"; + try { + return epsRpcClient.invoke(methodName, null, Directory.class).entries().stream() + .filter(this::isHealthDepartmentWithInterGaCommunication) + .map(directoryEntry -> new IrisMessageHdContact(directoryEntry.name, directoryEntry.name)) + .sorted(Comparator.comparing(IrisMessageHdContact::getName, String.CASE_INSENSITIVE_ORDER)) + .toList(); + } catch (Throwable t) { + throw new IrisMessageException(t); + } + } + + private boolean isHealthDepartmentWithInterGaCommunication(DirectoryEntry directoryEntry) { + + return + directoryEntry.groups() != null && + directoryEntry.groups().contains("health-departments") && + directoryEntry.services() != null && + directoryEntry.services().stream().anyMatch(service -> service.name().equals("inter-ga-communication")); + } + + public void createIrisMessage(IrisMessage message) throws IrisMessageException { + String methodName = message.getHdRecipient().getId() + ".createIrisMessage"; + Map payload = Map.of("irisMessage", IrisMessageTransferDto.fromEntity(message)); + int defaultReadTimeout = this.epsRpcClient.getReadTimeoutMillis(); + try { + this.epsRpcClient.setReadTimeoutMillis(READ_TIMEOUT); + this.epsRpcClient.invoke(methodName, payload); + } catch (Throwable t) { + throw new IrisMessageException(t); + } finally { + this.epsRpcClient.setReadTimeoutMillis(defaultReadTimeout); + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + record Directory(@NotNull List<@Valid DirectoryEntry> entries) {} + + @JsonIgnoreProperties(ignoreUnknown = true) + record DirectoryEntry(@NotNull String name, Set groups, List<@Valid DirectoryEntryService> services) {} + + @JsonIgnoreProperties(ignoreUnknown = true) + record DirectoryEntryService(@NotNull String name) {} + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageBuilderEps.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageBuilderEps.java new file mode 100644 index 000000000..d5c9ee67e --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageBuilderEps.java @@ -0,0 +1,59 @@ +package iris.client_bff.iris_messages.eps; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageContext; +import iris.client_bff.iris_messages.IrisMessageException; +import iris.client_bff.iris_messages.IrisMessageFolder; +import iris.client_bff.iris_messages.IrisMessageFolderRepository; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import lombok.RequiredArgsConstructor; + +import java.util.Objects; +import java.util.Optional; + +import org.springframework.context.support.MessageSourceAccessor; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +class IrisMessageBuilderEps { + + private final IrisMessageFolderRepository folderRepository; + private final EPSIrisMessageClient irisMessageClient; + private final MessageSourceAccessor messages; + + public IrisMessage build(IrisMessageTransferDto messageTransfer) throws IrisMessageException { + + Optional folder = this.folderRepository + .findFirstByContextAndParentFolderIsNull(IrisMessageContext.INBOX); + if (folder.isEmpty()) { + throw new IrisMessageException(messages.getMessage("iris_message.invalid_folder")); + } + + IrisMessageHdContact hdAuthor = new IrisMessageHdContact( + messageTransfer.getHdAuthor().getId(), + messageTransfer.getHdAuthor().getName()); + + IrisMessageHdContact hdRecipient = new IrisMessageHdContact( + messageTransfer.getHdRecipient().getId(), + messageTransfer.getHdRecipient().getName()); + + // ensure that the message was sent to the correct recipient + IrisMessageHdContact hdOwn = this.irisMessageClient.getOwnIrisMessageHdContact(); + if (!Objects.equals(hdOwn.getId(), hdRecipient.getId())) { + throw new IrisMessageException(messages.getMessage("iris_message.invalid_recipient")); + } + + IrisMessage message = new IrisMessage(); + + message + .setHdAuthor(hdAuthor) + .setHdRecipient(hdRecipient) + .setSubject(messageTransfer.getSubject()) + .setBody(messageTransfer.getBody()) + .setFolder(folder.get()) + .setRead(false); + + return message; + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageDataController.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageDataController.java new file mode 100644 index 000000000..33da87411 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageDataController.java @@ -0,0 +1,12 @@ +package iris.client_bff.iris_messages.eps; + +import com.googlecode.jsonrpc4j.JsonRpcParam; +import iris.client_bff.iris_messages.IrisMessageException; + +import javax.validation.Valid; + +public interface IrisMessageDataController { + IrisMessageTransferDto createIrisMessage( + @Valid @JsonRpcParam(value = "irisMessage") IrisMessageTransferDto messageTransfer + ) throws IrisMessageException; +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageDataControllerImpl.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageDataControllerImpl.java new file mode 100644 index 000000000..360f64ba4 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageDataControllerImpl.java @@ -0,0 +1,37 @@ +package iris.client_bff.iris_messages.eps; + +import iris.client_bff.config.JsonRpcDataValidator; +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageException; +import iris.client_bff.iris_messages.IrisMessageService; +import lombok.RequiredArgsConstructor; + +import org.springframework.context.support.MessageSourceAccessor; +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +class IrisMessageDataControllerImpl implements IrisMessageDataController { + + private final IrisMessageTransferDefuse messageTransferDefuse; + private final IrisMessageService irisMessageService; + private final IrisMessageBuilderEps irisMessageBuilder; + private final MessageSourceAccessor messages; + + private final JsonRpcDataValidator jsonRpcDataValidator; + + @Override + public IrisMessageTransferDto createIrisMessage(IrisMessageTransferDto messageTransfer) throws IrisMessageException { + if (messageTransfer == null) { + throw new IrisMessageException(messages.getMessage("iris_message.invalid_id")); + } + try { + jsonRpcDataValidator.validateData(messageTransfer); + IrisMessage message = this.irisMessageBuilder.build(this.messageTransferDefuse.defuse(messageTransfer)); + IrisMessage savedMessage = this.irisMessageService.saveMessage(message); + return IrisMessageTransferDto.fromEntity(savedMessage); + } catch (Throwable e) { + throw new IrisMessageException(e); + } + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageTransferDefuse.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageTransferDefuse.java new file mode 100644 index 000000000..4bfc91ddd --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageTransferDefuse.java @@ -0,0 +1,41 @@ +package iris.client_bff.iris_messages.eps; + +import iris.client_bff.core.utils.ValidationHelper; +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import static iris.client_bff.ui.messages.ErrorMessages.INVALID_INPUT_STRING; + +@Service +@RequiredArgsConstructor +public class IrisMessageTransferDefuse { + + private final ValidationHelper validationHelper; + + IrisMessageTransferDto defuse(IrisMessageTransferDto message) { + return IrisMessageTransferDto.builder() + .hdAuthor(this.defuse(message.getHdAuthor(), "author")) + .hdRecipient(this.defuse(message.getHdRecipient(), "recipient")) + .subject(this.defuse(message.getSubject(), "subject", IrisMessage.SUBJECT_MAX_LENGTH)) + .body(this.defuse(message.getBody(), "body", IrisMessage.BODY_MAX_LENGTH)) + .build(); + } + + private IrisMessageTransferDto.HdContact defuse(IrisMessageTransferDto.HdContact contact, String field) { + return new IrisMessageTransferDto.HdContact() + .setId(this.defuse(contact.getId(), field + ".id", IrisMessageHdContact.ID_MAX_LENGTH)) + .setName(this.defuse(contact.getName(), field + ".id", IrisMessageHdContact.NAME_MAX_LENGTH)); + } + + private String defuse(String input, String field, int maxLength) { + if (input == null) return null; + if (this.validationHelper.isPossibleAttack(input, field, true)) { + return INVALID_INPUT_STRING; + } + return StringUtils.truncate(input, maxLength); + } + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageTransferDto.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageTransferDto.java new file mode 100644 index 000000000..bec9f3765 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/eps/IrisMessageTransferDto.java @@ -0,0 +1,63 @@ +package iris.client_bff.iris_messages.eps; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class IrisMessageTransferDto { + + // we send the name & id as we do not know if the author`s health department is accessible by the recipient + @Valid + private HdContact hdAuthor; + + // the recipient is used to check if it is identical with the endpoint identifier of the health department, the + // message is sent to + @Valid + private HdContact hdRecipient; + + @NotBlank + @Size(max = IrisMessage.SUBJECT_MAX_LENGTH) + private String subject; + + @NotBlank + @Size(max = IrisMessage.BODY_MAX_LENGTH) + private String body; + + public static IrisMessageTransferDto fromEntity(IrisMessage message) { + return IrisMessageTransferDto.builder() + .hdAuthor(HdContact.fromEntity(message.getHdAuthor())) + .hdRecipient(HdContact.fromEntity(message.getHdRecipient())) + .subject(message.getSubject()) + .body(message.getBody()) + .build(); + } + + @Data + public static class HdContact { + + @NotBlank + @Size(max = IrisMessageHdContact.ID_MAX_LENGTH) + private String id; + + @NotBlank + @Size(max = IrisMessageHdContact.NAME_MAX_LENGTH) + private String name; + + public static HdContact fromEntity(IrisMessageHdContact contact) { + return new HdContact() + .setId(contact.getId()) + .setName(contact.getName()); + } + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageBuilderWeb.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageBuilderWeb.java new file mode 100644 index 000000000..b56731219 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageBuilderWeb.java @@ -0,0 +1,51 @@ +package iris.client_bff.iris_messages.web; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageContext; +import iris.client_bff.iris_messages.IrisMessageException; +import iris.client_bff.iris_messages.IrisMessageFolder; +import iris.client_bff.iris_messages.IrisMessageFolderRepository; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import iris.client_bff.iris_messages.eps.EPSIrisMessageClient; +import lombok.RequiredArgsConstructor; + +import java.util.Optional; + +import org.springframework.stereotype.Service; + +@Service +@RequiredArgsConstructor +class IrisMessageBuilderWeb { + + private final IrisMessageFolderRepository folderRepository; + private final EPSIrisMessageClient irisMessageClient; + + public IrisMessage build(IrisMessageInsertDto messageInsert) throws IrisMessageException { + + Optional folder = this.folderRepository + .findFirstByContextAndParentFolderIsNull(IrisMessageContext.OUTBOX); + if (folder.isEmpty()) { + throw new IrisMessageException("iris_message.invalid_folder"); + } + + IrisMessageHdContact hdAuthor = this.irisMessageClient.getOwnIrisMessageHdContact(); + + Optional hdRecipient = this.irisMessageClient + .findIrisMessageHdContactById(messageInsert.getHdRecipient()); + if (hdRecipient.isEmpty()) { + throw new IrisMessageException("iris_message.invalid_recipient"); + } + + IrisMessage message = new IrisMessage(); + + message + .setHdAuthor(hdAuthor) + .setHdRecipient(hdRecipient.get()) + .setSubject(messageInsert.getSubject()) + .setBody(messageInsert.getBody()) + .setFolder(folder.get()) + .setRead(true); + + return message; + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageController.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageController.java new file mode 100644 index 000000000..97b9258ef --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageController.java @@ -0,0 +1,184 @@ +package iris.client_bff.iris_messages.web; + +import iris.client_bff.core.utils.ValidationHelper; +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessage.IrisMessageIdentifier; +import iris.client_bff.iris_messages.IrisMessageException; +import iris.client_bff.iris_messages.IrisMessageFolder; +import iris.client_bff.iris_messages.IrisMessageFolder.IrisMessageFolderIdentifier; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import iris.client_bff.iris_messages.IrisMessageService; +import iris.client_bff.ui.messages.ErrorMessages; +import lombok.AllArgsConstructor; + +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +import javax.validation.Valid; +import javax.validation.constraints.Size; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.data.web.PageableDefault; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.BindingResult; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PatchMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseStatus; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.server.ResponseStatusException; +import org.springframework.web.servlet.support.ServletUriComponentsBuilder; + +@RestController +@AllArgsConstructor +@Validated +@RequestMapping("/iris-messages") +public class IrisMessageController { + + private static final String FIELD_SEARCH = "search"; + + private static final String FIELD_HD_RECIPIENT = "hdRecipient"; + private static final String FIELD_SUBJECT = "subject"; + private static final String FIELD_BODY = "body"; + + private IrisMessageService irisMessageService; + private final IrisMessageBuilderWeb irisMessageBuilder; + private final ValidationHelper validationHelper; + + @GetMapping() + public Page getMessages( + @RequestParam() IrisMessageFolderIdentifier folder, + @RequestParam(required = false) String search, + @PageableDefault(sort = "metadata.created", direction = Sort.Direction.DESC) Pageable pageable) { + this.validateField(search, FIELD_SEARCH); + return this.irisMessageService.search(folder, search, pageable).map(IrisMessageListItemDto::fromEntity); + } + + @PostMapping() + @ResponseStatus(HttpStatus.CREATED) + public ResponseEntity createAndSendMessage(@Valid @RequestBody IrisMessageInsertDto irisMessageInsert, + BindingResult bindingResult) { + this.validateConstraints(bindingResult); + this.validateIrisMessageInsert(irisMessageInsert); + try { + IrisMessage message = irisMessageBuilder.build(irisMessageInsert); + IrisMessage sentMessage = irisMessageService.sendMessage(message); + URI location = ServletUriComponentsBuilder + .fromCurrentRequest() + .path("/{id}") + .buildAndExpand(sentMessage.getId()) + .toUri(); + return ResponseEntity.created(location).build(); + } catch (Throwable e) { + String errorMessage = e instanceof IrisMessageException ime + ? ime.getErrorMessage() + : "iris_message.submission_error"; + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, errorMessage); + } + } + + private void validateIrisMessageInsert(IrisMessageInsertDto irisMessageInsert) { + if (irisMessageInsert == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "iris_message.submission_error"); + } + this.validateField(irisMessageInsert.getHdRecipient(), FIELD_HD_RECIPIENT); + this.validateField(irisMessageInsert.getSubject(), FIELD_SUBJECT); + this.validateField(irisMessageInsert.getBody(), FIELD_BODY); + } + + @GetMapping("/{messageId}") + public ResponseEntity getMessageDetails(@PathVariable IrisMessageIdentifier messageId) { + Optional irisMessage = this.irisMessageService.findById(messageId); + + return irisMessage + .map(IrisMessageDetailsDto::fromEntity) + .map(ResponseEntity::ok) + .orElseGet(ResponseEntity.notFound()::build); + } + + @PatchMapping("/{messageId}") + public ResponseEntity updateMessage( + @PathVariable IrisMessageIdentifier messageId, + @RequestBody @Valid IrisMessageUpdateDto irisMessageUpdate, + BindingResult bindingResult) { + this.validateConstraints(bindingResult); + this.validateIrisMessageUpdate(irisMessageUpdate); + + var updatedMessage = this.irisMessageService.updateReadState(messageId, irisMessageUpdate.getIsRead()); + + return updatedMessage + .map(IrisMessageDetailsDto::fromEntity) + .map(ResponseEntity::ok) + .orElseGet(ResponseEntity.notFound()::build); + } + + private void validateIrisMessageUpdate(IrisMessageUpdateDto irisMessageUpdate) { + if (irisMessageUpdate == null || irisMessageUpdate.getIsRead() == null) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } + } + + @GetMapping("/folders") + public ResponseEntity> getMessageFolders() { + List irisMessageFolders = irisMessageService.getFolders(); + // there should always be at least one inbox and one outbox folder. No folders at all = error + if (irisMessageFolders.isEmpty()) { + return new ResponseEntity<>(HttpStatus.NOT_FOUND); + } + return ResponseEntity.ok(IrisMessageFolderDto.fromEntity(irisMessageFolders)); + } + + @GetMapping("/hd-contacts") + public ResponseEntity> getMessageHdContacts( + @Valid @Size(max = 100) @RequestParam(required = false) String search, + @RequestParam(defaultValue = "false") boolean includeOwn) { + validateField(search, FIELD_SEARCH); + try { + ArrayList irisMessageContacts = new ArrayList<>(irisMessageService.getHdContacts(search)); + if (!includeOwn) { + IrisMessageHdContact ownContact = this.irisMessageService.getOwnHdContact(); + irisMessageContacts.removeIf(c -> c.getId().equals(ownContact.getId())); + } + return ResponseEntity.ok(irisMessageContacts); + } catch (Throwable e) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "iris_message.missing_hd_contacts"); + } + } + + @GetMapping("/count/unread") + public ResponseEntity getUnreadMessageCount( + @RequestParam(required = false) IrisMessageFolderIdentifier folder) { + + var count = folder == null + ? irisMessageService.getCountUnread() + : irisMessageService.getCountUnreadByFolderId(folder); + + return ResponseEntity.ok(count); + } + + private void validateConstraints(BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + String message = ErrorMessages.INVALID_INPUT + ": " + bindingResult.getFieldErrors().stream() + .map(fieldError -> String.format("%s: %s", fieldError.getField(), fieldError.getDefaultMessage())) + .collect(Collectors.joining(", ")); + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, message); + } + } + + private void validateField(String value, String field) { + if (validationHelper.isPossibleAttack(value, field, false)) { + throw new ResponseStatusException(HttpStatus.BAD_REQUEST, ErrorMessages.INVALID_INPUT); + } + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageDetailsDto.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageDetailsDto.java new file mode 100644 index 000000000..7e1764954 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageDetailsDto.java @@ -0,0 +1,32 @@ +package iris.client_bff.iris_messages.web; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import lombok.*; + +import java.time.Instant; + +@Value +class IrisMessageDetailsDto { + + private String id; + private String subject; + private String body; + private IrisMessageHdContact hdAuthor; + private IrisMessageHdContact hdRecipient; + private Instant createdAt; + private Boolean isRead; + + public static IrisMessageDetailsDto fromEntity(IrisMessage message) { + return new IrisMessageDetailsDto( + message.getId().toString(), + message.getSubject(), + message.getBody(), + message.getHdAuthor(), + message.getHdRecipient(), + message.getMetadata().getCreated(), + message.isRead() + ); + } + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageFolderDto.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageFolderDto.java new file mode 100644 index 000000000..7bd4bcd2f --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageFolderDto.java @@ -0,0 +1,58 @@ +package iris.client_bff.iris_messages.web; + +import iris.client_bff.iris_messages.IrisMessageContext; +import iris.client_bff.iris_messages.IrisMessageFolder; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; + +@Data +class IrisMessageFolderDto { + + private String id; + private String name; + private IrisMessageContext context; + private List items; + + private static IrisMessageFolderDto findParentFolderDto(List folderDtoList, IrisMessageFolder folder) { + if (folder.getParentFolder() == null) { + return null; + } + for ( IrisMessageFolderDto folderDto : folderDtoList ) { + if(folderDto.getId().equals(folder.getParentFolder().toString())) { + return folderDto; + } + if(!folderDto.items.isEmpty()) { + IrisMessageFolderDto parentFolderDto = IrisMessageFolderDto.findParentFolderDto(folderDto.items, folder); + if (parentFolderDto != null) { + return parentFolderDto; + } + } + } + return null; + } + + public static IrisMessageFolderDto fromEntity(IrisMessageFolder folder) { + return new IrisMessageFolderDto() + .setId(folder.getId().toString()) + .setName(folder.getName()) + .setContext(folder.getContext()) + .setItems(new ArrayList<>()); + } + + public static List fromEntity(List folderList) { + List folderDtoList = new ArrayList<>(); + for ( IrisMessageFolder folder : folderList ) { + IrisMessageFolderDto folderDto = IrisMessageFolderDto.fromEntity(folder); + IrisMessageFolderDto parentFolderDto = IrisMessageFolderDto.findParentFolderDto(folderDtoList, folder); + if (parentFolderDto != null) { + parentFolderDto.items.add(folderDto); + } else { + folderDtoList.add( folderDto ); + } + } + return folderDtoList; + } + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageInsertDto.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageInsertDto.java new file mode 100644 index 000000000..b0dda4df7 --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageInsertDto.java @@ -0,0 +1,25 @@ +package iris.client_bff.iris_messages.web; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +@Data +public class IrisMessageInsertDto { + + @NotBlank + @Size(max = IrisMessageHdContact.ID_MAX_LENGTH) + private String hdRecipient; + + @NotBlank + @Size(max = IrisMessage.SUBJECT_MAX_LENGTH) + private String subject; + + @NotBlank + @Size(max = IrisMessage.BODY_MAX_LENGTH) + private String body; + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageListItemDto.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageListItemDto.java new file mode 100644 index 000000000..bf4efd3ad --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageListItemDto.java @@ -0,0 +1,29 @@ +package iris.client_bff.iris_messages.web; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import lombok.Value; + +import java.time.Instant; + +@Value +class IrisMessageListItemDto { + + private String id; + private String subject; + private IrisMessageHdContact hdAuthor; + private IrisMessageHdContact hdRecipient; + private Instant createdAt; + private Boolean isRead; + + public static IrisMessageListItemDto fromEntity(IrisMessage message) { + return new IrisMessageListItemDto( + message.getId().toString(), + message.getSubject(), + message.getHdAuthor(), + message.getHdRecipient(), + message.getMetadata().getCreated(), + message.isRead() + ); + } +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageUpdateDto.java b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageUpdateDto.java new file mode 100644 index 000000000..82322683b --- /dev/null +++ b/iris-client-bff/src/main/java/iris/client_bff/iris_messages/web/IrisMessageUpdateDto.java @@ -0,0 +1,17 @@ +package iris.client_bff.iris_messages.web; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; + +@Data +@AllArgsConstructor +@NoArgsConstructor +class IrisMessageUpdateDto { + + @NotNull + private Boolean isRead; + +} diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/UserAccountsRepository.java b/iris-client-bff/src/main/java/iris/client_bff/users/UserAccountsRepository.java index f6f63138c..d79b51eb0 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/UserAccountsRepository.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/UserAccountsRepository.java @@ -1,14 +1,14 @@ package iris.client_bff.users; import iris.client_bff.users.entities.UserAccount; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; import iris.client_bff.users.entities.UserRole; import java.util.Optional; -import java.util.UUID; import org.springframework.data.jpa.repository.JpaRepository; -public interface UserAccountsRepository extends JpaRepository { +public interface UserAccountsRepository extends JpaRepository { Optional findByUserName(String userName); long countByRole(UserRole role); diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/UserDetailsServiceImpl.java b/iris-client-bff/src/main/java/iris/client_bff/users/UserDetailsServiceImpl.java index 551f9edb9..7d8369e42 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/UserDetailsServiceImpl.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/UserDetailsServiceImpl.java @@ -6,6 +6,7 @@ import iris.client_bff.auth.db.UserAccountAuthentication; import iris.client_bff.auth.db.jwt.JWTService; import iris.client_bff.users.entities.UserAccount; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; import iris.client_bff.users.entities.UserRole; import iris.client_bff.users.web.dto.UserInsertDTO; import iris.client_bff.users.web.dto.UserRoleDTO; @@ -52,11 +53,15 @@ public UserDetails loadUserByUsername(String username) { return new User(userAccount.getUserName(), userAccount.getPassword(), authorities); } + public Optional findByUuid(UUID id) { + return userAccountsRepository.findById(UserAccountIdentifier.of(id)); + } + public Optional findByUsername(String username) { return userAccountsRepository.findByUserName(username); } - public boolean isOldPasswordCorrect(@NonNull UUID id, @NonNull String oldPassword) { + public boolean isOldPasswordCorrect(@NonNull UserAccountIdentifier id, @NonNull String oldPassword) { return userAccountsRepository.findById(id) .map(UserAccount::getPassword) @@ -74,17 +79,18 @@ public UserAccount create(UserInsertDTO userInsertDTO) { return userAccountsRepository.save(userAccount); } - public UserAccount update(UUID userId, UserUpdateDTO userUpdateDTO, UserAccountAuthentication authentication) { + public UserAccount update(UserAccountIdentifier userId, UserUpdateDTO userUpdateDTO, + UserAccountAuthentication authentication) { log.info("Update user: {}", userId); - var userAccount = findUser(userId); + var userAccount = loadUser(userId); var isAdmin = authentication.isAdmin(); var invalidateTokens = false; var oldUserName = userAccount.getUserName(); - if (!isAdmin && !oldUserName.equals(authentication.getUserName())) { + if (!isAdmin && !oldUserName.equals(authentication.getName())) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "A non admin user can't change other users!"); } @@ -143,7 +149,7 @@ public UserAccount update(UUID userId, UserUpdateDTO userUpdateDTO, UserAccountA return userAccountsRepository.save(userAccount); } - public void deleteById(UUID id, String currentUserName) { + public void deleteById(UserAccountIdentifier id, String currentUserName) { userAccountsRepository.findById(id) .ifPresent(it -> { @@ -160,14 +166,14 @@ public void deleteById(UUID id, String currentUserName) { userAccountsRepository.deleteById(id); } - public boolean isItCurrentUser(UUID userId, UserAccountAuthentication authentication) { + public boolean isItCurrentUser(UserAccountIdentifier userId, UserAccountAuthentication authentication) { - var userAccount = findUser(userId); + var userAccount = loadUser(userId); - return authentication.getUserName().equals(userAccount.getUserName()); + return authentication.getName().equals(userAccount.getUserName()); } - private UserAccount findUser(UUID userId) { + private UserAccount loadUser(UserAccountIdentifier userId) { return userAccountsRepository.findById(userId) .orElseThrow(() -> { diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/entities/UserAccount.java b/iris-client-bff/src/main/java/iris/client_bff/users/entities/UserAccount.java index 8e9bc411e..f5bdb53ff 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/entities/UserAccount.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/entities/UserAccount.java @@ -1,23 +1,35 @@ package iris.client_bff.users.entities; +import iris.client_bff.core.Aggregate; +import iris.client_bff.core.Id; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; +import lombok.AccessLevel; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.RequiredArgsConstructor; +import java.io.Serializable; import java.util.UUID; import javax.persistence.Column; +import javax.persistence.Embeddable; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; -import javax.persistence.Id; import javax.persistence.Table; @Entity -@Data @Table(name = "user_accounts") -public class UserAccount { +@Data +@EqualsAndHashCode(callSuper = true) +@NoArgsConstructor +public class UserAccount extends Aggregate { - @Id - private UUID user_id = UUID.randomUUID(); + { + id = UserAccountIdentifier.of(UUID.randomUUID()); + } @Column(nullable = false) private String userName; @@ -31,4 +43,32 @@ public class UserAccount { @Enumerated(EnumType.STRING) @Column(nullable = false) private UserRole role; + + @Embeddable + @Getter + @EqualsAndHashCode + @RequiredArgsConstructor(staticName = "of") + @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) + public static class UserAccountIdentifier implements Id, Serializable { + + private static final long serialVersionUID = -8254677010830428881L; + + final UUID userId; + + /** + * for JSON deserialization + */ + private static UserAccountIdentifier of(String uuid) { + return of(UUID.fromString(uuid)); + } + + @Override + public String toString() { + return userId.toString(); + } + + public UUID toUuid() { + return userId; + } + } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/web/UserController.java b/iris-client-bff/src/main/java/iris/client_bff/users/web/UserController.java index 7308fa23a..4d52ff2ec 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/web/UserController.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/web/UserController.java @@ -7,6 +7,7 @@ import iris.client_bff.core.utils.ValidationHelper; import iris.client_bff.ui.messages.ErrorMessages; import iris.client_bff.users.UserDetailsServiceImpl; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; import iris.client_bff.users.web.dto.UserDTO; import iris.client_bff.users.web.dto.UserInsertDTO; import iris.client_bff.users.web.dto.UserListDTO; @@ -16,7 +17,6 @@ import lombok.extern.slf4j.Slf4j; import java.security.Principal; -import java.util.UUID; import java.util.stream.Collectors; import javax.validation.Valid; @@ -54,7 +54,8 @@ public class UserController { @PreAuthorize("hasAuthority('ADMIN')") public UserListDTO getAllUsers() { return new UserListDTO() - .users(this.userService.loadAll().stream().map(UserMappers::map).collect(Collectors.toList())); + .users(this.userService.loadAll().stream().map(it -> UserMappers.map(it, userService)) + .collect(Collectors.toList())); } @PostMapping @@ -66,12 +67,12 @@ public UserDTO createUser(@RequestBody @Valid UserInsertDTO userInsert) { checkUniqueUsername(userInsertValidated.getUserName()); - return map(userService.create(userInsertValidated)); + return map(userService.create(userInsertValidated), userService); } @PatchMapping("/{id}") @ResponseStatus(HttpStatus.OK) - public UserDTO updateUser(@PathVariable UUID id, @RequestBody @Valid UserUpdateDTO userUpdateDTO, + public UserDTO updateUser(@PathVariable UserAccountIdentifier id, @RequestBody @Valid UserUpdateDTO userUpdateDTO, UserAccountAuthentication authentication) { var userUpdateDTOValidated = validateUserUpdateDTO(userUpdateDTO); @@ -80,13 +81,13 @@ public UserDTO updateUser(@PathVariable UUID id, @RequestBody @Valid UserUpdateD checkUniqueUsername(userName, id); checkOldPassword(userUpdateDTOValidated.getOldPassword(), userUpdateDTOValidated.getPassword(), authentication, id); - return map(userService.update(id, userUpdateDTOValidated, authentication)); + return map(userService.update(id, userUpdateDTOValidated, authentication), userService); } @DeleteMapping("/{id}") @ResponseStatus(HttpStatus.NO_CONTENT) @PreAuthorize("hasAuthority('ADMIN')") - public void deleteUser(@PathVariable UUID id, Principal principal) { + public void deleteUser(@PathVariable UserAccountIdentifier id, Principal principal) { this.userService.deleteById(id, principal.getName()); } @@ -189,21 +190,21 @@ private void checkUniqueUsername(String username) { }); } - private void checkUniqueUsername(String username, UUID id) { + private void checkUniqueUsername(String username, UserAccountIdentifier id) { if (isBlank(username)) { return; } userService.findByUsername(username) - .filter(it -> !it.getUser_id().equals(id)) + .filter(it -> !it.getId().equals(id)) .ifPresent(__ -> { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "UserController.username.notunique"); }); } private void checkOldPassword(String oldPassword, String password, UserAccountAuthentication authentication, - UUID id) { + UserAccountIdentifier id) { if (isBlank(password) || (authentication.isAdmin() && !userService.isItCurrentUser(id, authentication))) { diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/web/UserMappers.java b/iris-client-bff/src/main/java/iris/client_bff/users/web/UserMappers.java index 27039d7f5..42894248c 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/web/UserMappers.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/web/UserMappers.java @@ -1,18 +1,28 @@ package iris.client_bff.users.web; +import iris.client_bff.users.UserDetailsServiceImpl; import iris.client_bff.users.entities.UserAccount; import iris.client_bff.users.web.dto.UserDTO; import iris.client_bff.users.web.dto.UserRoleDTO; public class UserMappers { - public static UserDTO map(UserAccount account) { - return new UserDTO() + public static UserDTO map(UserAccount account, UserDetailsServiceImpl userService) { + + return UserDTO.builder() .userName(account.getUserName()) .firstName(account.getFirstName()) .lastName(account.getLastName()) - .id(account.getUser_id().toString()) - .role(UserRoleDTO.valueOf(account.getRole().name())); + .id(account.getId().toString()) + .role(UserRoleDTO.valueOf(account.getRole().name())) + .createdAt(account.getCreatedAt()) + .lastModifiedAt(account.getLastModifiedAt()) + .createdBy(userService.findByUuid(account.getCreatedBy()).map(UserMappers::getFullName).orElse(null)) + .lastModifiedBy(userService.findByUuid(account.getLastModifiedBy()).map(UserMappers::getFullName).orElse(null)) + .build(); } + private static String getFullName(UserAccount user) { + return user.getFirstName() + " " + user.getLastName(); + } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/web/UserProfileController.java b/iris-client-bff/src/main/java/iris/client_bff/users/web/UserProfileController.java index 60421ecc1..a2df1b530 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/web/UserProfileController.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/web/UserProfileController.java @@ -25,7 +25,7 @@ public UserDTO getUserProfile(Principal principal) { if (byUsername.isEmpty()) { return null; } else { - return UserMappers.map(byUsername.get()); + return UserMappers.map(byUsername.get(), userService); } } } diff --git a/iris-client-bff/src/main/java/iris/client_bff/users/web/dto/UserDTO.java b/iris-client-bff/src/main/java/iris/client_bff/users/web/dto/UserDTO.java index 1c2a0403c..83550bba9 100644 --- a/iris-client-bff/src/main/java/iris/client_bff/users/web/dto/UserDTO.java +++ b/iris-client-bff/src/main/java/iris/client_bff/users/web/dto/UserDTO.java @@ -1,161 +1,22 @@ package iris.client_bff.users.web.dto; -import java.util.Objects; +import lombok.Builder; +import lombok.Value; -import javax.validation.Valid; - -import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Instant; +@Value +@Builder public class UserDTO { - @JsonProperty("id") - private String id; - - @JsonProperty("firstName") - private String firstName; - - @JsonProperty("lastName") - private String lastName; - - @JsonProperty("userName") - private String userName; - - @JsonProperty("role") - private UserRoleDTO role; - - public UserDTO id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * - * @return id - */ - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public UserDTO firstName(String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * - * @return firstName - */ - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public UserDTO lastName(String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * - * @return lastName - */ - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public UserDTO userName(String userName) { - this.userName = userName; - return this; - } - - /** - * Get userName - * - * @return userName - */ - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public UserDTO role(UserRoleDTO role) { - this.role = role; - return this; - } - - /** - * Get role - * - * @return role - */ - @Valid - - public UserRoleDTO getRole() { - return role; - } - - public void setRole(UserRoleDTO role) { - this.role = role; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - UserDTO userDTO = (UserDTO) o; - return Objects.equals(this.id, userDTO.id) && - Objects.equals(this.firstName, userDTO.firstName) && - Objects.equals(this.lastName, userDTO.lastName) && - Objects.equals(this.userName, userDTO.userName) && - Objects.equals(this.role, userDTO.role); - } - - @Override - public int hashCode() { - return Objects.hash(id, firstName, lastName, userName, role); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" userName: ").append(toIndentedString(userName)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); - sb.append("}"); - return sb.toString(); - } + private String id; + private String firstName; + private String lastName; + private String userName; + private UserRoleDTO role; - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } + private Instant createdAt; + private Instant lastModifiedAt; + private String createdBy; + private String lastModifiedBy; } diff --git a/iris-client-bff/src/main/resources/db/migration/V1008__add_audit_metadata.sql b/iris-client-bff/src/main/resources/db/migration/V1008__add_audit_metadata.sql new file mode 100644 index 000000000..f581c0623 --- /dev/null +++ b/iris-client-bff/src/main/resources/db/migration/V1008__add_audit_metadata.sql @@ -0,0 +1,26 @@ +ALTER TABLE case_data_request ADD created_by uuid NULL; +ALTER TABLE case_data_request ADD last_modified_by uuid NULL; +ALTER TABLE case_data_request ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE case_data_request ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE case_data_submission ADD created_by uuid NULL; +ALTER TABLE case_data_submission ADD last_modified_by uuid NULL; +ALTER TABLE case_data_submission ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE case_data_submission ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE event_data_request ADD created_by uuid NULL; +ALTER TABLE event_data_request ADD last_modified_by uuid NULL; +ALTER TABLE event_data_request ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE event_data_request ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE event_data_submission ADD created_by uuid NULL; +ALTER TABLE event_data_submission ADD last_modified_by uuid NULL; +ALTER TABLE event_data_submission ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE event_data_submission ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE user_accounts ADD created timestamp NULL; +ALTER TABLE user_accounts ADD created_by uuid NULL; +ALTER TABLE user_accounts ADD last_modified timestamp NULL; +ALTER TABLE user_accounts ADD last_modified_by uuid NULL; +ALTER TABLE user_accounts ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE user_accounts ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); diff --git a/iris-client-bff/src/main/resources/db/migration/V1009__add_iris_messages.sql b/iris-client-bff/src/main/resources/db/migration/V1009__add_iris_messages.sql new file mode 100644 index 000000000..cc46a5277 --- /dev/null +++ b/iris-client-bff/src/main/resources/db/migration/V1009__add_iris_messages.sql @@ -0,0 +1,33 @@ +CREATE TABLE iris_message_folder ( + id uuid NOT NULL, + name varchar(255) NOT NULL, + parent_folder uuid NULL, + context varchar(50) NOT NULL, + created timestamp NOT NULL, + last_modified timestamp NOT NULL, + created_by uuid NULL, + last_modified_by uuid NULL, + CONSTRAINT iris_message_folder_pkey PRIMARY KEY (id), + FOREIGN KEY (created_by) REFERENCES user_accounts(user_id), + FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id) +); + +CREATE TABLE iris_message ( + id uuid NOT NULL, + folder_id uuid NOT NULL, + subject varchar(500) NOT NULL, + body varchar(6000) NOT NULL, + hd_author_id varchar(255) NOT NULL, + hd_author_name varchar(255) NOT NULL, + hd_recipient_id varchar(255) NOT NULL, + hd_recipient_name varchar(255) NOT NULL, + is_read bool NULL, + created timestamp NOT NULL, + last_modified timestamp NOT NULL, + created_by uuid NULL, + last_modified_by uuid NULL, + CONSTRAINT iris_message_pkey PRIMARY KEY (id), + CONSTRAINT iris_message_folder_fk FOREIGN KEY (folder_id) REFERENCES iris_message_folder(id), + FOREIGN KEY (created_by) REFERENCES user_accounts(user_id), + FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id) +); diff --git a/iris-client-bff/src/main/resources/db/migration_mssql/V1008__add_audit_metadata.sql b/iris-client-bff/src/main/resources/db/migration_mssql/V1008__add_audit_metadata.sql new file mode 100644 index 000000000..6eb09544b --- /dev/null +++ b/iris-client-bff/src/main/resources/db/migration_mssql/V1008__add_audit_metadata.sql @@ -0,0 +1,27 @@ +ALTER TABLE case_data_request ADD created_by binary(255) NULL; +ALTER TABLE case_data_request ADD last_modified_by binary(255) NULL; +ALTER TABLE case_data_request ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE case_data_request ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE case_data_submission ADD created_by binary(255) NULL; +ALTER TABLE case_data_submission ADD last_modified_by binary(255) NULL; +ALTER TABLE case_data_submission ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE case_data_submission ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE event_data_request ADD created_by binary(255) NULL; +ALTER TABLE event_data_request ADD last_modified_by binary(255) NULL; +ALTER TABLE event_data_request ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE event_data_request ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE event_data_submission ADD created_by binary(255) NULL; +ALTER TABLE event_data_submission ADD last_modified_by binary(255) NULL; +ALTER TABLE event_data_submission ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE event_data_submission ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE user_accounts ADD created datetime2 NULL; +ALTER TABLE user_accounts ADD created_by binary(255) NULL; +ALTER TABLE user_accounts ADD last_modified datetime2 NULL; +ALTER TABLE user_accounts ADD last_modified_by binary(255) NULL; +ALTER TABLE user_accounts ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE user_accounts ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + \ No newline at end of file diff --git a/iris-client-bff/src/main/resources/db/migration_mssql/V1009__add_iris_messages.sql b/iris-client-bff/src/main/resources/db/migration_mssql/V1009__add_iris_messages.sql new file mode 100644 index 000000000..3354628ec --- /dev/null +++ b/iris-client-bff/src/main/resources/db/migration_mssql/V1009__add_iris_messages.sql @@ -0,0 +1,33 @@ +CREATE TABLE iris_message_folder ( + id binary(255) NOT NULL, + name varchar(255) NOT NULL, + parent_folder binary(255) NULL, + context varchar(50) NOT NULL, + created datetime2 NOT NULL, + last_modified datetime2 NOT NULL, + created_by binary(255) NULL, + last_modified_by binary(255) NULL, + CONSTRAINT iris_message_folder_pkey PRIMARY KEY (id), + FOREIGN KEY (created_by) REFERENCES user_accounts(user_id), + FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id) +); + +CREATE TABLE iris_message ( + id binary(255) NOT NULL, + folder_id binary(255) NOT NULL, + subject varchar(500) NOT NULL, + body varchar(6000) NOT NULL, + hd_author_id varchar(255) NOT NULL, + hd_author_name varchar(255) NOT NULL, + hd_recipient_id varchar(255) NOT NULL, + hd_recipient_name varchar(255) NOT NULL, + is_read bit NULL, + created datetime2 NOT NULL, + last_modified datetime2 NOT NULL, + created_by binary(255) NULL, + last_modified_by binary(255) NULL, + CONSTRAINT iris_message_pkey PRIMARY KEY (id), + CONSTRAINT iris_message_folder_fk FOREIGN KEY (folder_id) REFERENCES iris_message_folder(id), + FOREIGN KEY (created_by) REFERENCES user_accounts(user_id), + FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id) +); diff --git a/iris-client-bff/src/main/resources/db/migration_mysql/V1008__add_audit_metadata.sql b/iris-client-bff/src/main/resources/db/migration_mysql/V1008__add_audit_metadata.sql new file mode 100644 index 000000000..cfb0929ec --- /dev/null +++ b/iris-client-bff/src/main/resources/db/migration_mysql/V1008__add_audit_metadata.sql @@ -0,0 +1,26 @@ +ALTER TABLE case_data_request ADD created_by binary(16) NULL; +ALTER TABLE case_data_request ADD last_modified_by binary(16) NULL; +ALTER TABLE case_data_request ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE case_data_request ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE case_data_submission ADD created_by binary(16) NULL; +ALTER TABLE case_data_submission ADD last_modified_by binary(16) NULL; +ALTER TABLE case_data_submission ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE case_data_submission ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE event_data_request ADD created_by binary(16) NULL; +ALTER TABLE event_data_request ADD last_modified_by binary(16) NULL; +ALTER TABLE event_data_request ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE event_data_request ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE event_data_submission ADD created_by binary(16) NULL; +ALTER TABLE event_data_submission ADD last_modified_by binary(16) NULL; +ALTER TABLE event_data_submission ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE event_data_submission ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); + +ALTER TABLE user_accounts ADD created DATETIME NULL; +ALTER TABLE user_accounts ADD created_by binary(16) NULL; +ALTER TABLE user_accounts ADD last_modified DATETIME NULL; +ALTER TABLE user_accounts ADD last_modified_by binary(16) NULL; +ALTER TABLE user_accounts ADD FOREIGN KEY (created_by) REFERENCES user_accounts(user_id); +ALTER TABLE user_accounts ADD FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id); diff --git a/iris-client-bff/src/main/resources/db/migration_mysql/V1009__add_iris_messages.sql b/iris-client-bff/src/main/resources/db/migration_mysql/V1009__add_iris_messages.sql new file mode 100644 index 000000000..53abfd5de --- /dev/null +++ b/iris-client-bff/src/main/resources/db/migration_mysql/V1009__add_iris_messages.sql @@ -0,0 +1,33 @@ +CREATE TABLE iris_message_folder ( + id binary(16) NOT NULL, + name varchar(255) NOT NULL, + parent_folder binary(16) NULL, + context varchar(50) NOT NULL, + created datetime NOT NULL, + last_modified datetime NOT NULL, + created_by binary(16) NULL, + last_modified_by binary(16) NULL, + CONSTRAINT iris_message_folder_pkey PRIMARY KEY (id), + FOREIGN KEY (created_by) REFERENCES user_accounts(user_id), + FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id) +); + +CREATE TABLE iris_message ( + id binary(16) NOT NULL, + folder_id binary(16) NOT NULL, + subject varchar(500) NOT NULL, + body varchar(6000) NOT NULL, + hd_author_id varchar(255) NOT NULL, + hd_author_name varchar(255) NOT NULL, + hd_recipient_id varchar(255) NOT NULL, + hd_recipient_name varchar(255) NOT NULL, + is_read bool NULL, + created datetime NOT NULL, + last_modified datetime NOT NULL, + created_by binary(16) NULL, + last_modified_by binary(16) NULL, + CONSTRAINT iris_message_pkey PRIMARY KEY (id), + CONSTRAINT iris_message_folder_fk FOREIGN KEY (folder_id) REFERENCES iris_message_folder(id), + FOREIGN KEY (created_by) REFERENCES user_accounts(user_id), + FOREIGN KEY (last_modified_by) REFERENCES user_accounts(user_id) +); diff --git a/iris-client-bff/src/main/resources/messages.properties b/iris-client-bff/src/main/resources/messages.properties index 708ce7b8d..b3f062949 100644 --- a/iris-client-bff/src/main/resources/messages.properties +++ b/iris-client-bff/src/main/resources/messages.properties @@ -17,3 +17,9 @@ app.status.connection_closed_by_remote=Eine vorhandene Verbindung wurde vom Remo app.status.access_denied=Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte. app.status.no_such_host=Der Host des App Anbieters kann nicht ermittelt werden. app.status.timeout=Es gab eine Zeitüberschreitung bei der Anfrage. + +iris_message.submission_error=Fehler: Nachricht konnte nicht gesendet werden +iris_message.invalid_id=Die Nachrichten ID ist ungültig. +iris_message.invalid_recipient=Der Empfänger der Nachricht ist ungültig. +iris_message.missing_hd_contacts=Die Gesundheitsamt-Kontakte konnten nicht geladen werden. +iris_message.invalid_folder=Der Nachrichten-Ordner ist ungültig. diff --git a/iris-client-bff/src/main/resources/messages_de.properties b/iris-client-bff/src/main/resources/messages_de.properties index 708ce7b8d..b3f062949 100644 --- a/iris-client-bff/src/main/resources/messages_de.properties +++ b/iris-client-bff/src/main/resources/messages_de.properties @@ -17,3 +17,9 @@ app.status.connection_closed_by_remote=Eine vorhandene Verbindung wurde vom Remo app.status.access_denied=Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte. app.status.no_such_host=Der Host des App Anbieters kann nicht ermittelt werden. app.status.timeout=Es gab eine Zeitüberschreitung bei der Anfrage. + +iris_message.submission_error=Fehler: Nachricht konnte nicht gesendet werden +iris_message.invalid_id=Die Nachrichten ID ist ungültig. +iris_message.invalid_recipient=Der Empfänger der Nachricht ist ungültig. +iris_message.missing_hd_contacts=Die Gesundheitsamt-Kontakte konnten nicht geladen werden. +iris_message.invalid_folder=Der Nachrichten-Ordner ist ungültig. diff --git a/iris-client-bff/src/main/resources/messages_en.properties b/iris-client-bff/src/main/resources/messages_en.properties index e28b429de..44c32d19f 100644 --- a/iris-client-bff/src/main/resources/messages_en.properties +++ b/iris-client-bff/src/main/resources/messages_en.properties @@ -17,3 +17,9 @@ app.status.connection_closed_by_remote=An existing connection has been closed by app.status.access_denied=A connection could not be established because the target computer refused to connect. app.status.no_such_host=The host of the app provider cannot be determined. app.status.timeout=The request timed out. + +iris_message.submission_error=Error: Message could not be sent +iris_message.invalid_id=The message ID is invalid. +iris_message.invalid_recipient=The recipient of the message is invalid. +iris_message.missing_hd_contacts=The health department contacts could not be loaded. +iris_message.invalid_folder=The message folder is invalid. diff --git a/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseControllerTest.java b/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseControllerTest.java index b63d017a2..6935ffdec 100644 --- a/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseControllerTest.java +++ b/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseControllerTest.java @@ -17,6 +17,8 @@ import iris.client_bff.cases.web.request_dto.IndexCaseStatusDTO; import iris.client_bff.cases.web.request_dto.IndexCaseUpdateDTO; import iris.client_bff.events.exceptions.IRISDataRequestException; +import iris.client_bff.users.UserDetailsServiceImpl; +import iris.client_bff.users.entities.UserAccount; import java.time.Instant; import java.util.List; @@ -56,16 +58,20 @@ class IndexCaseControllerTest { @MockBean CaseDataRequestService service; + @MockBean + UserDetailsServiceImpl userService; // mock responses private final CaseDataRequest MOCK_CASE = getCase(); private final UUID MOCK_CASE_ID = UUID.fromString(MOCK_CASE.getId().toString()); private final IndexCaseDTO MOCK_CASE_DTO = map(MOCK_CASE); - private final IndexCaseDetailsDTO MOCK_CASE_DETAILED_DTO = mapDetailed(MOCK_CASE); private final Page casesPage = new RestResponsePage<>(List.of(MOCK_CASE)); + private IndexCaseDetailsDTO MOCK_CASE_DETAILED_DTO; + @BeforeEach void setUp() throws IRISDataRequestException { + when(service.findAll(any(Pageable.class))).thenReturn(casesPage); when(service.findByStatus(any(Status.class), any(Pageable.class))).thenReturn(casesPage); @@ -85,6 +91,10 @@ void setUp() throws IRISDataRequestException { when(service.create(any())).thenReturn(MOCK_CASE); + when(userService.findByUuid(any())) + .thenReturn(Optional.of(new UserAccount().setFirstName("Max").setLastName("Muster"))); + + MOCK_CASE_DETAILED_DTO = mapDetailed(MOCK_CASE, userService); } @Test @@ -212,7 +222,7 @@ void update() throws Exception { var updated = om.readValue(res.getResponse().getContentAsString(), IndexCaseDetailsDTO.class); - var expected = mapDetailed(MOCK_CASE); + var expected = mapDetailed(MOCK_CASE, userService); expected.setName(updatedName); assertEquals(expected, updated); diff --git a/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseMapperTest.java b/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseMapperTest.java index a0afefc5d..e788ad2a5 100644 --- a/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseMapperTest.java +++ b/iris-client-bff/src/test/java/iris/client_bff/cases/web/IndexCaseMapperTest.java @@ -1,16 +1,26 @@ package iris.client_bff.cases.web; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; import iris.client_bff.cases.CaseDataRequest; import iris.client_bff.cases.CaseDataRequest.Status; -import iris.client_bff.cases.eps.dto.*; +import iris.client_bff.cases.eps.dto.CaseDataProvider; +import iris.client_bff.cases.eps.dto.ContactCategory; +import iris.client_bff.cases.eps.dto.ContactInformation; +import iris.client_bff.cases.eps.dto.ContactPerson; +import iris.client_bff.cases.eps.dto.Contacts; +import iris.client_bff.cases.eps.dto.Events; +import iris.client_bff.cases.eps.dto.WorkPlace; import iris.client_bff.cases.model.CaseDataSubmission; import iris.client_bff.cases.model.CaseEvent; import iris.client_bff.cases.model.Contact; import iris.client_bff.cases.web.request_dto.IndexCaseDTO; import iris.client_bff.cases.web.request_dto.IndexCaseDetailsDTO; import iris.client_bff.cases.web.request_dto.IndexCaseStatusDTO; +import iris.client_bff.users.UserDetailsServiceImpl; +import iris.client_bff.users.entities.UserAccount; import iris.client_bff.utils.DtoSupplier; import java.time.Instant; @@ -41,8 +51,14 @@ void init() { @Test void mapDetailed() { + + var userService = mock(UserDetailsServiceImpl.class); + when(userService.findByUuid(any())) + .thenReturn(Optional.of(new UserAccount().setFirstName("Max").setLastName("Muster"))); + var request = getRequest(); - var mapped = IndexCaseMapper.mapDetailed(request); + var mapped = IndexCaseMapper.mapDetailed(request, userService); + var name = "Max Muster"; var expected = IndexCaseDetailsDTO.builder() .name("request_name") @@ -52,6 +68,8 @@ void mapDetailed() { .end(END) .comment("a-comment-here") .caseId(request.getId().toString()) + .createdBy(name) + .lastModifiedBy(name) .build(); assertEquals(expected, mapped); @@ -92,7 +110,8 @@ void mapDataSubmission() { assertEquals(contact.getPhone(), expectedContact.getPhone()); assertEquals(contact.getMobilePhone(), expectedContact.getMobilePhone()); assertEquals(contact.getEmail(), expectedContact.getEmail()); - assertEquals(contact.getContactCategory().toString(), expectedContact.getContactInformation().getContactCategory().toString()); + assertEquals(contact.getContactCategory().toString(), + expectedContact.getContactInformation().getContactCategory().toString()); assertEquals(contact.getFirstContactDate(), expectedContact.getContactInformation().getFirstContactDate()); assertEquals(contact.getLastContactDate(), expectedContact.getContactInformation().getLastContactDate()); assertEquals(contact.getBasicConditions(), expectedContact.getContactInformation().getBasicConditions()); @@ -104,7 +123,8 @@ void mapDataSubmission() { assertEquals(contact.getWorkplacePointOfContact(), expectedContact.getWorkPlace().getPointOfContact()); assertEquals(contact.getWorkplacePhone(), expectedContact.getWorkPlace().getPhone()); assertEquals(contact.getWorkplaceAddress().getStreet(), expectedContact.getWorkPlace().getAddress().getStreet()); - assertEquals(contact.getWorkplaceAddress().getHouseNumber(), expectedContact.getWorkPlace().getAddress().getHouseNumber()); + assertEquals(contact.getWorkplaceAddress().getHouseNumber(), + expectedContact.getWorkPlace().getAddress().getHouseNumber()); assertEquals(contact.getWorkplaceAddress().getZipCode(), expectedContact.getWorkPlace().getAddress().getZipCode()); assertEquals(contact.getWorkplaceAddress().getCity(), expectedContact.getWorkPlace().getAddress().getCity()); diff --git a/iris-client-bff/src/test/java/iris/client_bff/core/mail/EmailSenderIntegrationTests.java b/iris-client-bff/src/test/java/iris/client_bff/core/mail/EmailSenderIntegrationTests.java index 6fdcb30ef..321875d81 100644 --- a/iris-client-bff/src/test/java/iris/client_bff/core/mail/EmailSenderIntegrationTests.java +++ b/iris-client-bff/src/test/java/iris/client_bff/core/mail/EmailSenderIntegrationTests.java @@ -112,7 +112,7 @@ Try sendTestEmailEn() { Try sendTestEmailDe() { - var locale = Locale.GERMAN; + var locale = new Locale("de", "DE", "test"); var subject = messages.getMessage("TestMail.subject", locale); var email = new TestEmail(subject, TestKeys.TEST_MAIL_FTL, getParameters(), locale); @@ -122,7 +122,7 @@ Try sendTestEmailDe() { Try sendTestHtmlEmailDe() { - var locale = Locale.GERMAN; + var locale = new Locale("de", "DE", "test"); var subject = messages.getMessage("TestMail.subject", locale); var email = new TestEmail(subject, TestKeys.TEST_HTML_MAIL_FTLH, getParameters(), locale); diff --git a/iris-client-bff/src/test/java/iris/client_bff/dbms/DatabasesystemIT.java b/iris-client-bff/src/test/java/iris/client_bff/dbms/DatabasesystemIT.java index 5a709913d..3464afbf3 100644 --- a/iris-client-bff/src/test/java/iris/client_bff/dbms/DatabasesystemIT.java +++ b/iris-client-bff/src/test/java/iris/client_bff/dbms/DatabasesystemIT.java @@ -12,8 +12,14 @@ import iris.client_bff.events.EventDataRequestService; import iris.client_bff.events.EventDataRequestsDataInitializer; import iris.client_bff.events.EventDataSubmissionRepository; +import iris.client_bff.iris_messages.IrisMessageContext; +import iris.client_bff.iris_messages.IrisMessageFolder; +import iris.client_bff.iris_messages.IrisMessageFolderRepository; +import iris.client_bff.iris_messages.IrisMessageService; import java.time.Instant; +import java.util.List; +import java.util.Optional; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -36,6 +42,10 @@ abstract class DatabasesystemIT { private EventDataRequestService eventReqService; @Autowired private CaseDataRequestService caseReqService; + @Autowired + private IrisMessageService irisMessageService; + @Autowired + private IrisMessageFolderRepository irisMessageFolderRepository; @Test void eventRequests() { @@ -116,4 +126,31 @@ void caseSubmissions() { assertThat(caseSubmissions.findAllByRequest(CaseDataRequestDataInitializer.DATA_REQUEST_1).toList()).hasSize(1); } + @Test + void irisMessages() { + + List inboxRootFolders = irisMessageFolderRepository.findAll(); + assertThat(inboxRootFolders).hasSize(3); + + Optional inboxRootFolder = irisMessageFolderRepository.findFirstByContextAndParentFolderIsNull(IrisMessageContext.INBOX); + assertThat(inboxRootFolder.isPresent()).isTrue(); + assertThat(irisMessageService.search(inboxRootFolder.get().getId(), null, null).toList()).hasSize(2); + + Optional outboxRootFolder = irisMessageFolderRepository.findFirstByContextAndParentFolderIsNull(IrisMessageContext.OUTBOX); + assertThat(outboxRootFolder.isPresent()).isTrue(); + assertThat(irisMessageService.search(outboxRootFolder.get().getId(), null, null).toList()).hasSize(1); + + List inboxNestedFolders = irisMessageFolderRepository.findAllByParentFolder(inboxRootFolder.get().getId()); + assertThat(inboxNestedFolders).hasSize(1); + + assertThat(irisMessageService.search(inboxNestedFolders.get(0).getId(), null, null).toList()).hasSize(1); + + assertThat(irisMessageService.getCountUnread()).isEqualTo(3); + + assertThat(irisMessageService.getCountUnreadByFolderId(inboxRootFolder.get().getId())).isEqualTo(2); + assertThat(irisMessageService.getCountUnreadByFolderId(outboxRootFolder.get().getId())).isEqualTo(0); + assertThat(irisMessageService.getCountUnreadByFolderId(inboxNestedFolders.get(0).getId())).isEqualTo(1); + + } + } diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageDataInitializer.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageDataInitializer.java new file mode 100644 index 000000000..c58d48e20 --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageDataInitializer.java @@ -0,0 +1,56 @@ +package iris.client_bff.iris_messages; + +import static org.assertj.core.api.Assertions.*; + +import iris.client_bff.DataInitializer; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.util.Optional; + +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +@Component +@RequiredArgsConstructor +@Slf4j +@Order(10) +public class IrisMessageDataInitializer implements DataInitializer { + + private final IrisMessageRepository messageRepository; + + private final IrisMessageFolderRepository folderRepository; + + private final IrisMessageTestData testData; + + @Getter + private IrisMessageFolder inboxFolder; + + @Override + public void initialize() { + + log.debug("Test data: creating iris messages …"); + + Optional folder = this.folderRepository + .findFirstByContextAndParentFolderIsNull(IrisMessageContext.INBOX); + assertThat(folder).isPresent(); + this.inboxFolder = folder.get(); + IrisMessageFolder nestedInboxFolder = this.testData.getTestMessageFolder(inboxFolder, "nested inbox"); + + this.folderRepository.save(nestedInboxFolder); + + Optional outboxFolder = this.folderRepository + .findFirstByContextAndParentFolderIsNull(IrisMessageContext.OUTBOX); + assertThat(outboxFolder).isPresent(); + + var message = this.testData.getTestInboxMessage(inboxFolder); + message.setSubject("First test inbox subject"); + this.messageRepository.save(message); + this.messageRepository.save(this.testData.getTestInboxMessage(inboxFolder)); + + this.messageRepository.save(this.testData.getTestInboxMessage(nestedInboxFolder)); + + this.messageRepository.save(this.testData.getTestOutboxMessage(outboxFolder.get())); + } +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageServiceTest.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageServiceTest.java new file mode 100644 index 000000000..13598ac7d --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageServiceTest.java @@ -0,0 +1,192 @@ +package iris.client_bff.iris_messages; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +import iris.client_bff.core.utils.HibernateSearcher; +import iris.client_bff.hd_search.eps.EPSHdSearchClient; +import iris.client_bff.iris_messages.IrisMessage.IrisMessageIdentifier; +import iris.client_bff.iris_messages.eps.EPSIrisMessageClient; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.AdditionalAnswers; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageImpl; +import org.springframework.data.domain.Pageable; + +@ExtendWith(MockitoExtension.class) +public class IrisMessageServiceTest { + + IrisMessageTestData testData; + + @Mock + IrisMessageRepository messageRepository; + + @Mock + IrisMessageFolderRepository folderRepository; + + @Mock + HibernateSearcher searcher; + + @Mock + EPSIrisMessageClient irisMessageClient; + + @Mock + EPSHdSearchClient hdSearchClient; + + IrisMessageService service; + + private final IrisMessageIdentifier ID_NOT_FOUND = IrisMessageIdentifier.of(UUID.randomUUID()); + + @BeforeEach + void setUp() { + this.testData = new IrisMessageTestData(); + this.service = new IrisMessageService( + this.messageRepository, + this.folderRepository, + this.searcher, + this.irisMessageClient, + this.hdSearchClient); + } + + @Test + void findById() { + when(this.messageRepository.findById(any())).thenReturn(Optional.of(this.testData.MOCK_INBOX_MESSAGE)); + + var message = this.service.findById(this.testData.MOCK_INBOX_MESSAGE.getId()); + + verify(this.messageRepository).findById(any()); + + assertTrue(message.isPresent()); + assertEquals(message.get(), this.testData.MOCK_INBOX_MESSAGE); + } + + @Test + void findById_notFound() { + when(this.messageRepository.findById(this.ID_NOT_FOUND)) + .thenReturn(Optional.empty()); + + var message = this.service.findById(this.ID_NOT_FOUND); + + verify(this.messageRepository).findById(any()); + + assertTrue(message.isEmpty()); + } + + @Test + void search() { + + IrisMessage message = this.testData.MOCK_INBOX_MESSAGE; + + var folderId = message.getFolder().getId(); + + Page page = new PageImpl<>(List.of(message)); + + when(this.messageRepository.findAllByFolderIdOrderByIsReadAsc(eq(folderId), nullable(Pageable.class))) + .thenReturn(page); + + var messagePage = this.service.search(folderId, null, null); + + verify(this.messageRepository).findAllByFolderIdOrderByIsReadAsc(eq(folderId), nullable(Pageable.class)); + + assertEquals(1, messagePage.getContent().size()); + assertEquals(page.getContent(), messagePage.getContent()); + } + + @Test + void getCountUnreadByFolderId() { + + var folderId = this.testData.MOCK_INBOX_FOLDER.getId(); + + when(this.messageRepository.getCountUnreadByFolderId(any(IrisMessageFolder.IrisMessageFolderIdentifier.class))) + .thenReturn(3); + + var count = this.service.getCountUnreadByFolderId(folderId); + + verify(this.messageRepository).getCountUnreadByFolderId(eq(folderId)); + + assertEquals(3, count); + + } + + @Test + void getCountUnread() { + + when(this.messageRepository.countByIsReadFalse()).thenReturn(3); + + var count = this.service.getCountUnread(); + + verify(this.messageRepository).countByIsReadFalse(); + + assertEquals(3, count); + + } + + @Test + void getFolders() { + + when(this.folderRepository.findAll()) + .thenReturn(List.of(this.testData.MOCK_INBOX_FOLDER, this.testData.MOCK_OUTBOX_FOLDER)); + + var folders = this.service.getFolders(); + + verify(this.folderRepository).findAll(); + + assertEquals(2, folders.size()); + + } + + @Test + void getHdContacts() { + + when(this.irisMessageClient.getIrisMessageHdContacts()).thenReturn(List.of(this.testData.MOCK_CONTACT_OTHER)); + + var contacts = this.service.getHdContacts(null); + + verify(this.irisMessageClient).getIrisMessageHdContacts(); + + assertEquals(contacts.size(), 1); + assertEquals(contacts.get(0), this.testData.MOCK_CONTACT_OTHER); + + } + + @Test + void getOwnHdContact() { + + when(this.irisMessageClient.getOwnIrisMessageHdContact()).thenReturn(this.testData.MOCK_CONTACT_OWN); + + var contact = this.service.getOwnHdContact(); + + verify(this.irisMessageClient).getOwnIrisMessageHdContact(); + + assertEquals(contact, this.testData.MOCK_CONTACT_OWN); + + } + + @Test + void sendMessage() { + + IrisMessage message = this.testData.MOCK_OUTBOX_MESSAGE; + + doNothing().when(this.irisMessageClient).createIrisMessage(any(IrisMessage.class)); + when(this.messageRepository.save(any(IrisMessage.class))).then(AdditionalAnswers.returnsFirstArg()); + + var sentMessage = this.service.sendMessage(message); + + verify(this.irisMessageClient).createIrisMessage(message); + verify(this.messageRepository).save(message); + + assertEquals(sentMessage, message); + + } + +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageTestData.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageTestData.java new file mode 100644 index 000000000..3163f2e05 --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/IrisMessageTestData.java @@ -0,0 +1,89 @@ +package iris.client_bff.iris_messages; + +import iris.client_bff.iris_messages.web.IrisMessageInsertDto; +import org.springframework.stereotype.Component; + +@Component +public class IrisMessageTestData { + + private final IrisMessageFolder MOCK_DEFAULT_FOLDER = getTestDefaultMessageFolder(); + + public final IrisMessageFolder MOCK_INBOX_FOLDER = MOCK_DEFAULT_FOLDER; + public final IrisMessageFolder MOCK_OUTBOX_FOLDER = getTestMessageFolder(IrisMessageContext.OUTBOX, "outbox folder"); + + public final IrisMessageHdContact MOCK_CONTACT_OWN = getTestMessageHdContactOwn(); + public final IrisMessageHdContact MOCK_CONTACT_OTHER = getTestMessageHdContactOther(); + + public final IrisMessage MOCK_INBOX_MESSAGE = getTestInboxMessage(MOCK_INBOX_FOLDER); + public final IrisMessage MOCK_OUTBOX_MESSAGE = getTestOutboxMessage(MOCK_OUTBOX_FOLDER); + + public final static String INVALID_SUBJECT = "S".repeat(Math.max(0, IrisMessage.SUBJECT_MAX_LENGTH + 1)); + public final static String INVALID_BODY = "B".repeat(Math.max(0, IrisMessage.BODY_MAX_LENGTH + 1)); + + private IrisMessageHdContact getTestMessageHdContactOwn() { + return new IrisMessageHdContact() + .setName("test-own-contact") + .setId("test-own-contact-id") + .setOwn(true); + } + + private IrisMessageHdContact getTestMessageHdContactOther() { + return new IrisMessageHdContact() + .setName("test-other-contact") + .setId("test-other-contact-id") + .setOwn(false); + } + + private IrisMessageFolder getTestDefaultMessageFolder() { + return new IrisMessageFolder() + .setContext(IrisMessageContext.INBOX) + .setName("default folder"); + } + + public IrisMessageFolder getTestMessageFolder(IrisMessageFolder parentFolder, String name) { + return getTestMessageFolder(parentFolder.getContext(), name) + .setParentFolder(parentFolder.getId()); + } + + private IrisMessageFolder getTestMessageFolder(IrisMessageContext context, String name) { + return new IrisMessageFolder() + .setContext(context) + .setName(name); + } + + public IrisMessage getTestInboxMessage() { + IrisMessageFolder folder = this.getTestMessageFolder(IrisMessageContext.INBOX, "inbox folder"); + return this.getTestInboxMessage(folder); + } + + public IrisMessage getTestOutboxMessage(IrisMessageFolder folder) { + IrisMessage message = new IrisMessage(); + message + .setSubject("Test outbox subject") + .setBody("Test outbox body") + .setFolder(folder) + .setHdAuthor(this.getTestMessageHdContactOwn()) + .setHdRecipient(this.getTestMessageHdContactOther()) + .setRead(true); + return message; + } + + public IrisMessage getTestInboxMessage(IrisMessageFolder folder) { + IrisMessage message = new IrisMessage(); + message + .setSubject("Test inbox subject") + .setBody("Test inbox body") + .setFolder(folder) + .setHdAuthor(this.getTestMessageHdContactOther()) + .setHdRecipient(this.getTestMessageHdContactOwn()) + .setRead(false); + return message; + } + + public IrisMessageInsertDto getTestMessageInsert(IrisMessage message) { + return new IrisMessageInsertDto() + .setSubject(message.getSubject()) + .setBody(message.getBody()) + .setHdRecipient(message.getHdRecipient().getId()); + } +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/eps/IrisMessageBuilderEpsTest.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/eps/IrisMessageBuilderEpsTest.java new file mode 100644 index 000000000..e6412a4f4 --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/eps/IrisMessageBuilderEpsTest.java @@ -0,0 +1,63 @@ +package iris.client_bff.iris_messages.eps; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageFolderRepository; +import iris.client_bff.iris_messages.IrisMessageTestData; + +import java.util.Optional; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.context.support.MessageSourceAccessor; + +@ExtendWith(MockitoExtension.class) +public class IrisMessageBuilderEpsTest { + + IrisMessageTestData testData; + + @Mock + IrisMessageFolderRepository folderRepository; + + @Mock + EPSIrisMessageClient irisMessageClient; + + @Mock + MessageSourceAccessor messages; + + IrisMessageBuilderEps builder; + + @BeforeEach + void setUp() { + this.testData = new IrisMessageTestData(); + this.builder = new IrisMessageBuilderEps(this.folderRepository, this.irisMessageClient, this.messages); + } + + @Test + void buildTransfer() { + + IrisMessage message = this.testData.MOCK_INBOX_MESSAGE; + IrisMessageTransferDto messageTransfer = IrisMessageTransferDto.fromEntity(message); + + when(this.folderRepository.findFirstByContextAndParentFolderIsNull(any())) + .thenReturn(Optional.of(this.testData.MOCK_INBOX_FOLDER)); + + when(this.irisMessageClient.getOwnIrisMessageHdContact()).thenReturn(this.testData.MOCK_CONTACT_OWN); + + var builtMessage = this.builder.build(messageTransfer); + + verify(this.folderRepository).findFirstByContextAndParentFolderIsNull(any()); + + verify(this.irisMessageClient).getOwnIrisMessageHdContact(); + + // messages should be identical except ID: toString removes the ID + assertEquals(message.toString(), builtMessage.toString()); + + } +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/eps/IrisMessageDataControllerTest.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/eps/IrisMessageDataControllerTest.java new file mode 100644 index 000000000..27eb5eb20 --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/eps/IrisMessageDataControllerTest.java @@ -0,0 +1,139 @@ +package iris.client_bff.iris_messages.eps; + +import static io.restassured.module.mockmvc.RestAssuredMockMvc.*; +import static org.assertj.core.api.Assertions.*; +import static org.hamcrest.Matchers.*; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.*; +import static org.springframework.http.HttpStatus.*; + +import io.restassured.http.ContentType; +import io.restassured.parsing.Parser; +import iris.client_bff.IrisWebIntegrationTest; +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageContext; +import iris.client_bff.iris_messages.IrisMessageException; +import iris.client_bff.iris_messages.IrisMessageFolder; +import iris.client_bff.iris_messages.IrisMessageFolderRepository; +import iris.client_bff.iris_messages.IrisMessageRepository; +import iris.client_bff.iris_messages.IrisMessageTestData; +import iris.client_bff.ui.messages.ErrorMessages; +import lombok.AllArgsConstructor; + +import java.util.Optional; + +import org.junit.jupiter.api.Test; +import org.mockito.Mockito; +import org.springframework.context.support.MessageSourceAccessor; +import org.springframework.test.web.servlet.MockMvc; + +@IrisWebIntegrationTest +@AllArgsConstructor +class IrisMessageDataControllerTest { + + private static final String JSON_RPC = "application/json-rpc"; + + IrisMessageDataController dataController; + IrisMessageRepository messageRepository; + IrisMessageFolderRepository folderRepository; + EPSIrisMessageClient messageClient; + MessageSourceAccessor messages; + MockMvc mvc; + + @Test + void createIrisMessage() { + + IrisMessage localMessage = this.messageRepository.save(this.getMessage()); + IrisMessageTransferDto localMessageTransfer = IrisMessageTransferDto.fromEntity(localMessage); + + IrisMessageTransferDto remoteMessageTransfer = this.dataController.createIrisMessage(localMessageTransfer); + + assertNotNull(remoteMessageTransfer); + assertThat(localMessageTransfer).isEqualTo(remoteMessageTransfer); + } + + @Test + void createIrisMessage_shouldFail_noData() { + + var e = assertThrows(IrisMessageException.class, () -> this.dataController.createIrisMessage(null)); + + assertNotNull(e.getMessage()); + assertThat(e.getMessage()).contains(messages.getMessage("iris_message.invalid_id")); + } + + @Test + void createIrisMessage_shouldFail_invalidData() { + + IrisMessageTransferDto localMessageTransfer = Mockito.spy(IrisMessageTransferDto.fromEntity(this.getMessage())); + + localMessageTransfer.setSubject(IrisMessageTestData.INVALID_SUBJECT); + verify(localMessageTransfer).setSubject(IrisMessageTestData.INVALID_SUBJECT); + + localMessageTransfer.setBody(IrisMessageTestData.INVALID_BODY); + verify(localMessageTransfer).setBody(IrisMessageTestData.INVALID_BODY); + + var e = assertThrows(IrisMessageException.class, + () -> this.dataController.createIrisMessage(localMessageTransfer)); + + assertNotNull(e.getMessage()); + assertTrue(e.getMessage().contains(ErrorMessages.INVALID_INPUT)); + } + + @Test + void createMessage_RealCommunucation() { + + var json = """ + { + "id":"1", + "jsonrpc":"2.0", + "method":"createIrisMessage", + "params":{ + "irisMessage":{ + "hdAuthor":{ + "id":"hd-1", + "name":"HD 1" + }, + "hdRecipient":{ + "id":"hd-1", + "name":"HD 1" + }, + "subject":"Test Mail", + "body":"This is a Test Mail" + }, + "_client":{"name":"hd-1"} + } + } + """; + + given().mockMvc(mvc) + .contentType(ContentType.JSON) + .body(json) + + .when() + .post("/data-submission-rpc") + + .then() + .status(OK) + .contentType(JSON_RPC) + .parser(JSON_RPC, Parser.JSON) + .body("id", equalTo("1")) + .body("result.subject", equalTo("Test Mail")); + } + + private IrisMessage getMessage() { + + IrisMessageTestData testData = new IrisMessageTestData(); + + Optional outboxFolder = this.folderRepository + .findFirstByContextAndParentFolderIsNull(IrisMessageContext.OUTBOX); + + assertThat(outboxFolder).isPresent(); + + IrisMessage message = testData.getTestOutboxMessage(outboxFolder.get()); + + // for testing purposes, we use ourselves as message recipient + message.setHdRecipient(this.messageClient.getOwnIrisMessageHdContact()); + + return message; + } +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageBuilderWebTest.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageBuilderWebTest.java new file mode 100644 index 000000000..b86883277 --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageBuilderWebTest.java @@ -0,0 +1,68 @@ +package iris.client_bff.iris_messages.web; + +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; + +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessageFolderRepository; +import iris.client_bff.iris_messages.IrisMessageTestData; +import iris.client_bff.iris_messages.eps.EPSIrisMessageClient; + +import java.util.Optional; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.context.support.MessageSourceAccessor; + +@ExtendWith(MockitoExtension.class) +public class IrisMessageBuilderWebTest { + + IrisMessageTestData testData; + + @Mock + IrisMessageFolderRepository folderRepository; + + @Mock + EPSIrisMessageClient irisMessageClient; + + @Mock + MessageSourceAccessor messages; + + IrisMessageBuilderWeb builder; + + @BeforeEach + void setUp() { + this.testData = new IrisMessageTestData(); + this.builder = new IrisMessageBuilderWeb(this.folderRepository, this.irisMessageClient); + } + + @Test + void buildInsert() { + + IrisMessage message = this.testData.MOCK_OUTBOX_MESSAGE; + IrisMessageInsertDto messageInsert = this.testData.getTestMessageInsert(message); + + when(this.folderRepository.findFirstByContextAndParentFolderIsNull(any())) + .thenReturn(Optional.of(this.testData.MOCK_OUTBOX_FOLDER)); + + when(this.irisMessageClient.getOwnIrisMessageHdContact()).thenReturn(this.testData.MOCK_CONTACT_OWN); + when(this.irisMessageClient.findIrisMessageHdContactById(any(String.class))) + .thenReturn(Optional.of(this.testData.MOCK_CONTACT_OTHER)); + + var builtMessage = this.builder.build(messageInsert); + + verify(this.folderRepository).findFirstByContextAndParentFolderIsNull(any()); + + verify(this.irisMessageClient).getOwnIrisMessageHdContact(); + verify(this.irisMessageClient).findIrisMessageHdContactById(any(String.class)); + + // messages should be identical except ID: toString removes the ID + assertEquals(message.toString(), builtMessage.toString()); + + } + +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageControllerIntegrationTest.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageControllerIntegrationTest.java new file mode 100644 index 000000000..415d22a5c --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageControllerIntegrationTest.java @@ -0,0 +1,45 @@ +package iris.client_bff.iris_messages.web; + +import static io.restassured.module.mockmvc.RestAssuredMockMvc.*; +import static org.hamcrest.Matchers.*; + +import io.restassured.http.ContentType; +import iris.client_bff.IrisWebIntegrationTest; +import iris.client_bff.iris_messages.IrisMessageDataInitializer; +import lombok.RequiredArgsConstructor; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.springframework.http.HttpStatus; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.web.servlet.MockMvc; + +/** + * @author Jens Kutzsche + */ +@IrisWebIntegrationTest +@RequiredArgsConstructor +class IrisMessageControllerIntegrationTest { + + private final String baseUrl = "/iris-messages"; + + private final MockMvc mockMvc; + private final IrisMessageDataInitializer initializer; + + @Test + @WithMockUser() + @DisplayName("Tests getMessage to search with folder and search string") + void getMessage_WithFolderAndSearchString_ReturnsMessage() throws Exception { + + given().mockMvc(mockMvc) + .param("folder", initializer.getInboxFolder().getId().toString()) + .param("search", "First test") + .when() + .get(baseUrl) + .then() + .status(HttpStatus.OK) + .contentType(ContentType.JSON) + .body("content", hasSize(1)) + .body("content[0].subject", is("First test inbox subject")); + } +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageControllerTest.java b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageControllerTest.java new file mode 100644 index 000000000..eae6bfb21 --- /dev/null +++ b/iris-client-bff/src/test/java/iris/client_bff/iris_messages/web/IrisMessageControllerTest.java @@ -0,0 +1,343 @@ +package iris.client_bff.iris_messages.web; + +import static org.assertj.core.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.ArgumentMatchers.*; +import static org.mockito.Mockito.*; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; + +import iris.client_bff.IrisWebIntegrationTest; +import iris.client_bff.RestResponsePage; +import iris.client_bff.iris_messages.IrisMessage; +import iris.client_bff.iris_messages.IrisMessage.IrisMessageIdentifier; +import iris.client_bff.iris_messages.IrisMessageFolder; +import iris.client_bff.iris_messages.IrisMessageFolder.IrisMessageFolderIdentifier; +import iris.client_bff.iris_messages.IrisMessageHdContact; +import iris.client_bff.iris_messages.IrisMessageService; +import iris.client_bff.iris_messages.IrisMessageTestData; +import lombok.RequiredArgsConstructor; + +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.data.domain.Pageable; +import org.springframework.http.MediaType; +import org.springframework.security.test.context.support.WithMockUser; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.MockMvcResultMatchers; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +@IrisWebIntegrationTest +@RequiredArgsConstructor +class IrisMessageControllerTest { + + private final String baseUrl = "/iris-messages"; + + TypeReference> PAGE_TYPE = new TypeReference<>() {}; + + private final MockMvc mockMvc; + private final ObjectMapper om; + + private final IrisMessageTestData testData; + + @MockBean + private IrisMessageService irisMessageService; + + @MockBean + private IrisMessageBuilderWeb irisMessageBuilder; + + @Test + void endpointShouldBeProtected() throws Exception { + mockMvc.perform(get(baseUrl)) + .andExpect(MockMvcResultMatchers.status().isForbidden()) + .andReturn(); + } + + @Test + @WithMockUser() + void getInboxMessages() throws Exception { + this.getMessages(testData.MOCK_INBOX_MESSAGE, testData.MOCK_INBOX_MESSAGE.getFolder().getId()); + } + + @Test + @WithMockUser() + void getOutboxMessages() throws Exception { + this.getMessages(testData.MOCK_OUTBOX_MESSAGE, testData.MOCK_OUTBOX_MESSAGE.getFolder().getId()); + } + + @Test + @WithMockUser() + void getMessages_shouldFail() throws Exception { + mockMvc.perform(get(baseUrl)) + .andExpect(MockMvcResultMatchers.status().is4xxClientError()) + .andReturn(); + } + + @Test + @WithMockUser() + public void createAndSendMessage() throws Exception { + IrisMessage irisMessage = testData.MOCK_OUTBOX_MESSAGE; + + IrisMessageInsertDto messageInsert = this.testData.getTestMessageInsert(irisMessage); + + when(irisMessageBuilder.build(any(IrisMessageInsertDto.class))).thenReturn(irisMessage); + + when(irisMessageService.sendMessage(any())).thenReturn(irisMessage); + when(irisMessageService.findById(irisMessage.getId())).thenReturn(Optional.of(irisMessage)); + + ObjectMapper objectMapper = new ObjectMapper(); + + var postResult = mockMvc + .perform( + MockMvcRequestBuilders.post(baseUrl) + .content(objectMapper.writeValueAsString(messageInsert)) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().isCreated()) + .andReturn(); + + verify(irisMessageBuilder).build(messageInsert); + verify(irisMessageService).sendMessage(any()); + + String location = postResult.getResponse().getHeader("location"); + assert location != null; + String messageId = location.substring(location.lastIndexOf('/') + 1); + + var res = mockMvc.perform(get(baseUrl + "/" + messageId)) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).findById(any()); + + var messageDetailsDto = om.readValue(res.getResponse().getContentAsString(), IrisMessageDetailsDto.class); + + assertThat(messageDetailsDto.getHdRecipient().getId()).isEqualTo(messageInsert.getHdRecipient()); + assertThat(messageDetailsDto.getSubject()).isEqualTo(messageInsert.getSubject()); + assertThat(messageDetailsDto.getBody()).isEqualTo(messageInsert.getBody()); + + } + + @Test + @WithMockUser() + public void createMessage_shouldFail() throws Exception { + IrisMessage irisMessage = testData.MOCK_OUTBOX_MESSAGE; + mockMvc + .perform( + MockMvcRequestBuilders + .multipart(baseUrl) + .param("hdRecipient", irisMessage.getHdRecipient().getId()) + .param("subject", IrisMessageTestData.INVALID_SUBJECT) + .param("body", IrisMessageTestData.INVALID_BODY)) + .andExpect(MockMvcResultMatchers.status().is4xxClientError()) + .andReturn(); + + } + + @Test + @WithMockUser() + void getMessageDetails() throws Exception { + + IrisMessageIdentifier messageId = testData.MOCK_INBOX_MESSAGE.getId(); + + when(irisMessageService.findById(messageId)).thenReturn(Optional.of(testData.MOCK_INBOX_MESSAGE)); + + var res = mockMvc.perform(get(baseUrl + "/" + messageId)) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).findById(messageId); + + var messageDetailsDto = om.readValue(res.getResponse().getContentAsString(), IrisMessageDetailsDto.class); + + assertThat(messageDetailsDto) + .isEqualTo(IrisMessageDetailsDto.fromEntity(testData.MOCK_INBOX_MESSAGE)); + } + + @Test + @WithMockUser() + void getMessageDetails_shouldFail() throws Exception { + + IrisMessageIdentifier invalidId = IrisMessageIdentifier.of(UUID.randomUUID()); + + when(irisMessageService.findById(invalidId)).thenReturn(Optional.empty()); + + var res = mockMvc.perform(get(baseUrl + "/" + invalidId)) + .andExpect(MockMvcResultMatchers.status().is4xxClientError()) + .andReturn(); + + verify(irisMessageService).findById(invalidId); + + assertThat(res.getResponse().getContentAsString()).isEmpty(); + } + + @Test + @WithMockUser() + void updateMessage() throws Exception { + IrisMessageUpdateDto messageUpdate = new IrisMessageUpdateDto(true); + + IrisMessage updatedMessage = spy(testData.getTestInboxMessage()); + updatedMessage.setRead(true); + verify(updatedMessage).setRead(true); + + when(irisMessageService.updateReadState(updatedMessage.getId(), messageUpdate.getIsRead())) + .thenReturn(Optional.of(updatedMessage)); + + var res = mockMvc + .perform( + MockMvcRequestBuilders.patch(baseUrl + "/" + updatedMessage.getId()) + .content(om.writeValueAsString(messageUpdate)) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).updateReadState(updatedMessage.getId(), messageUpdate.getIsRead()); + + var messageDetailsDto = om.readValue(res.getResponse().getContentAsString(), IrisMessageDetailsDto.class); + + assertEquals(messageDetailsDto.getIsRead(), true); + assertThat(messageDetailsDto).isEqualTo(IrisMessageDetailsDto.fromEntity(updatedMessage)); + } + + @Test + @WithMockUser() + void updateMessage_shouldFail() throws Exception { + UUID invalidId = UUID.randomUUID(); + + IrisMessageUpdateDto messageUpdate = new IrisMessageUpdateDto(true); + + when(irisMessageService.findById(any())).thenReturn(Optional.empty()); + + mockMvc + .perform( + MockMvcRequestBuilders.patch(baseUrl + "/" + invalidId) + .content(om.writeValueAsString(messageUpdate)) + .contentType(MediaType.APPLICATION_JSON)) + .andExpect(MockMvcResultMatchers.status().is4xxClientError()) + .andReturn(); + } + + @Test + @WithMockUser() + void getMessageFolders() throws Exception { + + List folderList = List.of(testData.MOCK_INBOX_FOLDER, testData.MOCK_OUTBOX_FOLDER); + + when(irisMessageService.getFolders()).thenReturn(folderList); + + var res = mockMvc.perform(get(baseUrl + "/folders")) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).getFolders(); + + List folderDtoList = om.readValue(res.getResponse().getContentAsString(), + new TypeReference<>() {}); + + assertEquals(2, folderDtoList.size()); + assertThat(folderDtoList).isEqualTo(IrisMessageFolderDto.fromEntity(folderList)); + } + + @Test + @WithMockUser() + void getMessageHdContactsWithoutOwn() throws Exception { + + when(irisMessageService.getHdContacts(null)).thenReturn(List.of(testData.MOCK_CONTACT_OTHER)); + when(irisMessageService.getOwnHdContact()).thenReturn(testData.MOCK_CONTACT_OWN); + + var res = mockMvc + .perform(get(baseUrl + "/hd-contacts")) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).getHdContacts(null); + verify(irisMessageService).getOwnHdContact(); + + List contacts = om.readValue(res.getResponse().getContentAsString(), + new TypeReference<>() {}); + + assertEquals(1, contacts.size()); + assertThat(contacts).contains(testData.MOCK_CONTACT_OTHER); + assertThat(contacts).doesNotContain(testData.MOCK_CONTACT_OWN); + } + + @Test + @WithMockUser() + void getMessageHdContactsIncludingOwn() throws Exception { + + when(irisMessageService.getHdContacts(null)).thenReturn(List.of(testData.MOCK_CONTACT_OTHER, testData.MOCK_CONTACT_OWN)); + + var res = mockMvc + .perform(get(baseUrl + "/hd-contacts").queryParam("includeOwn", "true")) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).getHdContacts(null); + + List contacts = om.readValue(res.getResponse().getContentAsString(), + new TypeReference<>() {}); + + assertEquals(2, contacts.size()); + assertThat(contacts).contains(testData.MOCK_CONTACT_OTHER); + assertThat(contacts).contains(testData.MOCK_CONTACT_OWN); + } + + @Test + @WithMockUser() + void getUnreadMessageCount() throws Exception { + when(irisMessageService.getCountUnread()).thenReturn(2); + + var res = mockMvc + .perform(get(baseUrl + "/count/unread")) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).getCountUnread(); + + Integer count = om.readValue(res.getResponse().getContentAsString(), new TypeReference<>() {}); + + assertEquals(2, count); + } + + @Test + @WithMockUser() + void getUnreadMessageCountByFolder() throws Exception { + when(irisMessageService.getCountUnreadByFolderId(any())).thenReturn(1); + + var res = mockMvc + .perform(get(baseUrl + "/count/unread") + .queryParam("folder", testData.MOCK_INBOX_FOLDER.getId().toString())) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).getCountUnreadByFolderId(testData.MOCK_INBOX_FOLDER.getId()); + + Integer count = om.readValue(res.getResponse().getContentAsString(), new TypeReference<>() {}); + + assertEquals(1, count); + } + + private void getMessages(IrisMessage message, IrisMessageFolderIdentifier folderId) throws Exception { + + when(irisMessageService.search(eq(folderId), nullable(String.class), any(Pageable.class))) + .thenReturn(new RestResponsePage<>(List.of(message))); + + var res = mockMvc.perform(get(baseUrl) + .param("folder", folderId.toString())) + .andExpect(MockMvcResultMatchers.status().isOk()) + .andReturn(); + + verify(irisMessageService).search(eq(folderId), nullable(String.class), any(Pageable.class)); + + var messagesPage = om.readValue(res.getResponse().getContentAsString(), PAGE_TYPE); + + assertEquals(1, messagesPage.getContent().size()); + assertThat(messagesPage.getContent().get(0)).isEqualTo(IrisMessageListItemDto.fromEntity(message)); + + } + +} diff --git a/iris-client-bff/src/test/java/iris/client_bff/users/UserControllerTests.java b/iris-client-bff/src/test/java/iris/client_bff/users/UserControllerTests.java index 1e21a57b5..d1da22ba3 100644 --- a/iris-client-bff/src/test/java/iris/client_bff/users/UserControllerTests.java +++ b/iris-client-bff/src/test/java/iris/client_bff/users/UserControllerTests.java @@ -9,6 +9,7 @@ import iris.client_bff.core.alert.AlertService; import iris.client_bff.core.utils.ValidationHelper; import iris.client_bff.users.entities.UserAccount; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; import iris.client_bff.users.entities.UserRole; import iris.client_bff.users.web.UserController; import iris.client_bff.users.web.dto.UserInsertDTO; @@ -63,18 +64,19 @@ public void init() { account.setRole(UserRole.valueOf(user.getRole().name())); return account; }); - when(userService.update(any(UUID.class), any(UserUpdateDTO.class), any(UserAccountAuthentication.class))) - .thenAnswer(it -> { - var user = it.getArgument(1, UserUpdateDTO.class); - var account = new UserAccount(); - account.setFirstName(user.getFirstName()); - account.setLastName(user.getLastName()); - account.setPassword(user.getPassword()); - account.setUserName(user.getUserName()); - account.setRole(UserRole.valueOf(user.getRole().name())); - return account; - }); - when(userService.isOldPasswordCorrect(any(UUID.class), anyString())).thenReturn(true); + when(userService.update(any(UserAccountIdentifier.class), any(UserUpdateDTO.class), + any(UserAccountAuthentication.class))) + .thenAnswer(it -> { + var user = it.getArgument(1, UserUpdateDTO.class); + var account = new UserAccount(); + account.setFirstName(user.getFirstName()); + account.setLastName(user.getLastName()); + account.setPassword(user.getPassword()); + account.setUserName(user.getUserName()); + account.setRole(UserRole.valueOf(user.getRole().name())); + return account; + }); + when(userService.isOldPasswordCorrect(any(UserAccountIdentifier.class), anyString())).thenReturn(true); userController = new UserController(userService, validationHelper); } @@ -89,11 +91,11 @@ void testWrongPasswords(String pw) { var dto2 = new UserUpdateDTO().firstName("fn1").lastName("ln1").userName("un").password(pw).oldPassword(pw) .role(UserRoleDTO.USER); - var authentication = new UserAccountAuthentication("fn", true, + var authentication = new UserAccountAuthentication(createUserAccount("fn"), true, List.of(new SimpleGrantedAuthority(UserRole.USER.name()))); Assertions.assertThrows(ResponseStatusException.class, - () -> userController.updateUser(UUID.randomUUID(), dto2, authentication)); + () -> userController.updateUser(UserAccountIdentifier.of(UUID.randomUUID()), dto2, authentication)); } @ParameterizedTest @@ -108,12 +110,10 @@ void testCorrectPasswords(String pw) { var dto2 = new UserUpdateDTO().firstName("fn1").lastName("ln1").userName("un").password(pw).oldPassword(pw) .role(UserRoleDTO.USER); - var authentication = new UserAccountAuthentication("fn", true, + var authentication = new UserAccountAuthentication(createUserAccount("fn"), true, List.of(new SimpleGrantedAuthority(UserRole.USER.name()))); - var id = UUID.randomUUID(); var account = new UserAccount(); - account.setUser_id(id); account.setFirstName("fn"); account.setLastName("ln"); account.setPassword(pw); @@ -122,9 +122,9 @@ void testCorrectPasswords(String pw) { when(userService.findByUsername(anyString())).thenReturn(Optional.of(account)); - userController.updateUser(id, dto2, authentication); + userController.updateUser(account.getId(), dto2, authentication); - verify(userService).update(id, dto2, authentication); + verify(userService).update(account.getId(), dto2, authentication); assertThat(user).isNotNull(); } @@ -133,11 +133,10 @@ void testNewUserNameExist() { var dto = new UserUpdateDTO().firstName("fn1").lastName("ln1").userName("un").password("abcde123") .oldPassword("abcde123").role(UserRoleDTO.USER); - var authentication = new UserAccountAuthentication("test", true, + var authentication = new UserAccountAuthentication(createUserAccount("test"), true, List.of(new SimpleGrantedAuthority(UserRole.ADMIN.name()))); var account = new UserAccount(); - account.setUser_id(UUID.randomUUID()); account.setFirstName("fn"); account.setLastName("ln"); account.setPassword("abcde123"); @@ -147,20 +146,17 @@ void testNewUserNameExist() { when(userService.findByUsername(anyString())).thenReturn(Optional.of(account)); Assertions.assertThrows(ResponseStatusException.class, - () -> userController.updateUser(UUID.randomUUID(), dto, authentication)); + () -> userController.updateUser(UserAccountIdentifier.of(UUID.randomUUID()), dto, authentication)); } @Test void testRootChangePW_ownWithOldPassword() { var dto = new UserUpdateDTO().password("abcde1234").role(UserRoleDTO.ADMIN); - var authentication = new UserAccountAuthentication("test", true, + var authentication = new UserAccountAuthentication(createUserAccount("test"), true, List.of(new SimpleGrantedAuthority(UserRole.ADMIN.name()))); - var id = UUID.randomUUID(); - var account = new UserAccount(); - account.setUser_id(id); account.setFirstName("fn"); account.setLastName("ln"); account.setPassword("abcde123"); @@ -168,27 +164,24 @@ void testRootChangePW_ownWithOldPassword() { account.setRole(UserRole.ADMIN); when(userService.findByUsername(anyString())).thenReturn(Optional.of(account)); - when(userService.isItCurrentUser(any(UUID.class), any(UserAccountAuthentication.class))) + when(userService.isItCurrentUser(any(UserAccountIdentifier.class), any(UserAccountAuthentication.class))) .thenReturn(true); Assertions.assertThrows(ResponseStatusException.class, - () -> userController.updateUser(id, dto, authentication)); + () -> userController.updateUser(account.getId(), dto, authentication)); var dto2 = dto.oldPassword("abcde123"); - Assertions.assertDoesNotThrow(() -> userController.updateUser(id, dto2, authentication)); + Assertions.assertDoesNotThrow(() -> userController.updateUser(account.getId(), dto2, authentication)); } @Test void testRootChangePW_foreignWithoutOldPassword() { var dto = new UserUpdateDTO().password("abcde123").role(UserRoleDTO.ADMIN); - var authentication = new UserAccountAuthentication("test", true, + var authentication = new UserAccountAuthentication(createUserAccount("test"), true, List.of(new SimpleGrantedAuthority(UserRole.ADMIN.name()))); - var id = UUID.randomUUID(); - var account = new UserAccount(); - account.setUser_id(id); account.setFirstName("fn"); account.setLastName("ln"); account.setPassword("abcde123"); @@ -196,9 +189,13 @@ void testRootChangePW_foreignWithoutOldPassword() { account.setRole(UserRole.ADMIN); when(userService.findByUsername(anyString())).thenReturn(Optional.of(account)); - when(userService.isItCurrentUser(any(UUID.class), any(UserAccountAuthentication.class))) + when(userService.isItCurrentUser(any(UserAccountIdentifier.class), any(UserAccountAuthentication.class))) .thenReturn(false); - Assertions.assertDoesNotThrow(() -> userController.updateUser(id, dto, authentication)); + Assertions.assertDoesNotThrow(() -> userController.updateUser(account.getId(), dto, authentication)); + } + + private UserAccount createUserAccount(String userName) { + return new UserAccount().setUserName(userName); } } diff --git a/iris-client-bff/src/test/java/iris/client_bff/users/UserDetailsServiceImplTests.java b/iris-client-bff/src/test/java/iris/client_bff/users/UserDetailsServiceImplTests.java index a2c35a1da..ddbbb1017 100644 --- a/iris-client-bff/src/test/java/iris/client_bff/users/UserDetailsServiceImplTests.java +++ b/iris-client-bff/src/test/java/iris/client_bff/users/UserDetailsServiceImplTests.java @@ -8,6 +8,7 @@ import iris.client_bff.auth.db.UserAccountAuthentication; import iris.client_bff.auth.db.jwt.JWTService; import iris.client_bff.users.entities.UserAccount; +import iris.client_bff.users.entities.UserAccount.UserAccountIdentifier; import iris.client_bff.users.entities.UserRole; import iris.client_bff.users.web.dto.UserRoleDTO; import iris.client_bff.users.web.dto.UserUpdateDTO; @@ -42,16 +43,14 @@ class UserDetailsServiceImplTests { UserDetailsServiceImpl userDetailsService; - UUID notFound = UUID.randomUUID(); - UUID foundAdmin = UUID.randomUUID(); - UUID foundUser = UUID.randomUUID(); + UserAccountIdentifier notFound = UserAccountIdentifier.of(UUID.randomUUID()); UserAccount admin = userAccountAdmin(); UserAccount user = spy(userAccountUser()); - UserAccountAuthentication adminAuth = new UserAccountAuthentication("mm", true, + UserAccountAuthentication adminAuth = new UserAccountAuthentication(admin, true, List.of(new SimpleGrantedAuthority("ADMIN"))); - UserAccountAuthentication userAuth = new UserAccountAuthentication("tm", true, + UserAccountAuthentication userAuth = new UserAccountAuthentication(user, true, List.of(new SimpleGrantedAuthority("USER"))); @BeforeEach @@ -73,7 +72,7 @@ void fails_notAdmin_changeOtherProfil() { mockAdminFound(); - assertThrows(RuntimeException.class, () -> userDetailsService.update(foundAdmin, null, userAuth)); + assertThrows(RuntimeException.class, () -> userDetailsService.update(admin.getId(), null, userAuth)); } @Test @@ -83,7 +82,7 @@ void fails_notAdmin_changeUserName() { var dto = new UserUpdateDTO().userName("new"); - assertThrows(RuntimeException.class, () -> userDetailsService.update(foundUser, dto, userAuth)); + assertThrows(RuntimeException.class, () -> userDetailsService.update(user.getId(), dto, userAuth)); } @Test @@ -93,7 +92,7 @@ void fails_notAdmin_changeRole() { var dto = new UserUpdateDTO().role(UserRoleDTO.ADMIN); - assertThrows(RuntimeException.class, () -> userDetailsService.update(foundUser, dto, userAuth)); + assertThrows(RuntimeException.class, () -> userDetailsService.update(user.getId(), dto, userAuth)); } @Test @@ -104,7 +103,7 @@ void fails_lastAdmin_changeRole() { var dto = new UserUpdateDTO().role(UserRoleDTO.USER); - assertThrows(RuntimeException.class, () -> userDetailsService.update(foundAdmin, dto, adminAuth)); + assertThrows(RuntimeException.class, () -> userDetailsService.update(admin.getId(), dto, adminAuth)); } @Test @@ -115,12 +114,10 @@ void ok_admin_changeNothing() { var dto = new UserUpdateDTO(); - userDetailsService.update(foundUser, dto, adminAuth); + userDetailsService.update(user.getId(), dto, adminAuth); - verify(user).getUserName(); - verify(user).getRole(); verify(userAccountsRepository).save(user); - verifyNoMoreInteractions(user, jwtService, userAccountsRepository); + verifyNoMoreInteractions(jwtService, userAccountsRepository); } @Test @@ -131,7 +128,7 @@ void ok_admin_changeAll() { var dto = new UserUpdateDTO().firstName("fn").lastName("ln").userName("un").password("pw").role(UserRoleDTO.ADMIN); - var ret = userDetailsService.update(foundUser, dto, adminAuth); + var ret = userDetailsService.update(user.getId(), dto, adminAuth); assertThat(ret).extracting("firstName", "lastName", "userName", "role") .containsExactly("fn", "ln", "un", UserRole.ADMIN); @@ -150,19 +147,19 @@ void ok_tokenInvalidateOnRigthChanges() { var dto = new UserUpdateDTO().userName("un"); - userDetailsService.update(foundUser, dto, adminAuth); + userDetailsService.update(user.getId(), dto, adminAuth); verify(jwtService).invalidateTokensOfUser("tm"); dto = new UserUpdateDTO().password("pw"); - userDetailsService.update(foundUser, dto, adminAuth); + userDetailsService.update(user.getId(), dto, adminAuth); verify(jwtService).invalidateTokensOfUser("un"); dto = new UserUpdateDTO().role(UserRoleDTO.ADMIN); - userDetailsService.update(foundUser, dto, adminAuth); + userDetailsService.update(user.getId(), dto, adminAuth); verify(jwtService, times(2)).invalidateTokensOfUser("un"); } @@ -172,11 +169,11 @@ void ok_isOldPasswordCorrect() { mockUserFound(); - var value = userDetailsService.isOldPasswordCorrect(foundUser, "password"); + var value = userDetailsService.isOldPasswordCorrect(user.getId(), "password"); assertTrue(value); - verify(userAccountsRepository).findById(foundUser); + verify(userAccountsRepository).findById(user.getId()); verifyNoMoreInteractions(userAccountsRepository); } @@ -185,18 +182,17 @@ void fails_isOldPasswordCorrect() { mockUserFound(); - var value = userDetailsService.isOldPasswordCorrect(foundUser, "pass"); + var value = userDetailsService.isOldPasswordCorrect(user.getId(), "pass"); assertFalse(value); - verify(userAccountsRepository).findById(foundUser); + verify(userAccountsRepository).findById(user.getId()); verifyNoMoreInteractions(userAccountsRepository); } private UserAccount userAccountAdmin() { var account = new UserAccount(); - account.setUser_id(foundAdmin); account.setFirstName("Max"); account.setLastName("Muster"); account.setUserName("mm"); @@ -209,7 +205,6 @@ private UserAccount userAccountAdmin() { private UserAccount userAccountUser() { var account = new UserAccount(); - account.setUser_id(foundUser); account.setFirstName("Thomas"); account.setLastName("Müller"); account.setUserName("tm"); @@ -224,11 +219,11 @@ private void mockUserNotFound() { } private void mockAdminFound() { - when(userAccountsRepository.findById(foundAdmin)).thenReturn(Optional.of(admin)); + when(userAccountsRepository.findById(admin.getId())).thenReturn(Optional.of(admin)); } private void mockUserFound() { - when(userAccountsRepository.findById(foundUser)).thenReturn(Optional.of(user)); + when(userAccountsRepository.findById(user.getId())).thenReturn(Optional.of(user)); } private void mockCountLastAdmin() { diff --git a/iris-client-bff/src/test/resources/messages_de.properties b/iris-client-bff/src/test/resources/messages_de_DE_test.properties similarity index 100% rename from iris-client-bff/src/test/resources/messages_de.properties rename to iris-client-bff/src/test/resources/messages_de_DE_test.properties diff --git a/iris-client-fe/package-lock.json b/iris-client-fe/package-lock.json index 0f35fabdf..2ae1db33c 100644 --- a/iris-client-fe/package-lock.json +++ b/iris-client-fe/package-lock.json @@ -1,61 +1,61 @@ { "name": "iris-client-frontend", - "version": "1.3.1-POST-RELEASE", + "version": "1.4.0-rc.3-POST-RELEASE", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "iris-client-frontend", - "version": "1.3.1-POST-RELEASE", + "version": "1.4.0-rc.3-POST-RELEASE", "dependencies": { - "@fontsource/roboto": "^4.5.1", + "@fontsource/roboto": "^4.5.3", "@mdi/font": "^6.5.95", "@types/lodash": "^4.14.178", - "axios": "^0.25.0", - "chart.js": "^3.7.0", - "core-js": "^3.20.3", + "axios": "^0.26.0", + "chart.js": "^3.7.1", + "core-js": "^3.21.1", "dayjs": "^1.10.7", "lodash": "^4.17.21", "vue": "^2.6.14", "vue-class-component": "^7.2.6", "vue-property-decorator": "^9.1.2", "vue-router": "^3.5.3", - "vuetify": "^2.6.2", + "vuetify": "^2.6.3", "vuex": "^3.6.2", "vuex-persistedstate": "^4.1.0", - "xlsx": "^0.17.5" + "xlsx": "^0.18.2" }, "devDependencies": { "@rushstack/eslint-patch": "^1.1.0", - "@vue/cli-plugin-babel": "~5.0.0-rc.2", - "@vue/cli-plugin-e2e-cypress": "~5.0.0-rc.2", - "@vue/cli-plugin-eslint": "~5.0.0-rc.2", - "@vue/cli-plugin-router": "~5.0.0-rc.2", - "@vue/cli-plugin-typescript": "~5.0.0-rc.2", - "@vue/cli-plugin-vuex": "~5.0.0-rc.2", - "@vue/cli-service": "~5.0.0-rc.2", + "@vue/cli-plugin-babel": "~5.0.1", + "@vue/cli-plugin-e2e-cypress": "~5.0.1", + "@vue/cli-plugin-eslint": "~5.0.1", + "@vue/cli-plugin-router": "~5.0.1", + "@vue/cli-plugin-typescript": "~5.0.1", + "@vue/cli-plugin-vuex": "~5.0.1", + "@vue/cli-service": "~5.0.1", "@vue/eslint-config-typescript": "^10.0.0", "@vue/test-utils": "^1.3.0", "compression-webpack-plugin": "^9.2.0", "csv2md": "^1.1.0", - "cypress": "^9.3.1", + "cypress": "^9.5.0", "cypress-fail-fast": "^3.3.0", - "eslint": "^8.7.0", + "eslint": "^8.9.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-vue": "^8.3.0", + "eslint-plugin-vue": "^8.4.1", "husky": "^7.0.4", "license-checker": "^25.0.1", - "lint-staged": "^12.3.1", + "lint-staged": "^12.3.4", "miragejs": "^0.1.43", "prettier": "^2.5.1", - "sass": "~1.48.0", - "sass-loader": "^12.4.0", + "sass": "~1.49.7", + "sass-loader": "^12.6.0", "typescript": "~4.5.5", "vue-cli-plugin-vuetify": "~2.4.5", "vue-template-compiler": "^2.6.14", "vuetify-loader": "^1.7.3", - "webpack": "^5.67.0" + "webpack": "^5.69.1" } }, "node_modules/@babel/code-frame": { @@ -71,9 +71,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", - "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", "dev": true, "engines": { "node": ">=6.9.0" @@ -167,9 +167,9 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", - "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.1.tgz", + "integrity": "sha512-JBdSr/LtyYIno/pNnJ75lBcqc3Z1XXujzPanHqjvvrhOA+DTceTFuJi8XjmWTZh4r3fsdfqaCMN0iZemdkxZHQ==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.7", @@ -188,13 +188,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", - "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^4.7.1" + "regexpu-core": "^5.0.1" }, "engines": { "node": ">=6.9.0" @@ -570,14 +570,16 @@ } }, "node_modules/@babel/plugin-proposal-decorators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.16.7.tgz", - "integrity": "sha512-DoEpnuXK14XV9btI1k8tzNGCutMclpj4yru8aXKoHlVmbO1s+2A+g2+h4JhcjrxkFJqzbymnLG6j/niOf3iFXQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.17.2.tgz", + "integrity": "sha512-WH8Z95CwTq/W8rFbMqb9p3hicpt4RX4f0K659ax2VHxgOyT6qQmUaEVEjIh4WR9Eh9NymkVn5vwsrE68fAQNUw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.17.1", "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-decorators": "^7.16.7" + "@babel/helper-replace-supers": "^7.16.7", + "@babel/plugin-syntax-decorators": "^7.17.0", + "charcodes": "^0.2.0" }, "engines": { "node": ">=6.9.0" @@ -683,12 +685,12 @@ } }, "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", - "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.16.4", + "@babel/compat-data": "^7.17.0", "@babel/helper-compilation-targets": "^7.16.7", "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", @@ -735,12 +737,12 @@ } }, "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", - "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.10", "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { @@ -824,9 +826,9 @@ } }, "node_modules/@babel/plugin-syntax-decorators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.16.7.tgz", - "integrity": "sha512-vQ+PxL+srA7g6Rx6I1e15m55gftknl2X8GCUW1JTlkTaXZLJOS0UcaY0eK9jYT7IYf4awn6qwyghVHLDz1WyMw==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.17.0.tgz", + "integrity": "sha512-qWe85yCXsvDEluNP0OyeQjH63DlhAR3W7K9BxxU1MvbDb48tgBG+Ao6IJJ6smPDrrVzSQZrbF6donpkFBMcs3A==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.16.7" @@ -1091,9 +1093,9 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", - "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz", + "integrity": "sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.16.7" @@ -1391,9 +1393,9 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.8.tgz", - "integrity": "sha512-6Kg2XHPFnIarNweZxmzbgYnnWsXxkx9WQUVk2sksBRL80lBC1RAQV3wQagWxdCHiYHqPN+oenwNIuttlYgIbQQ==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.0.tgz", + "integrity": "sha512-fr7zPWnKXNc1xoHfrIU9mN/4XKX4VLZ45Q+oMhfsYIaHvg7mHgmhfOy/ckRWqDK7XF3QDigRpkh5DKq6+clE8A==", "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.16.7", @@ -1518,9 +1520,9 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", - "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz", + "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==", "dev": true, "dependencies": { "@babel/compat-data": "^7.16.8", @@ -1541,7 +1543,7 @@ "@babel/plugin-proposal-object-rest-spread": "^7.16.7", "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-private-methods": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.11", "@babel/plugin-proposal-private-property-in-object": "^7.16.7", "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -1622,9 +1624,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.4" @@ -1739,14 +1741,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", + "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", @@ -1759,9 +1761,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1786,9 +1788,9 @@ } }, "node_modules/@fontsource/roboto": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.1.tgz", - "integrity": "sha512-3mhfL+eNPG/woMNqwD/OHaW5qMpeGEBsDwzmhFmjB1yUV+M+M9P0NhP/AyHvnGz3DrqkvZ7CPzNMa+UkVLeELg==" + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.3.tgz", + "integrity": "sha512-NUvBTj332dFRdiVkLlavXbDGoD2zyyeGYmMyrXOnctg/3e4pq95+rJgNfUP+k4v8UBk2L1aomGw9dDjbRdAmTg==" }, "node_modules/@hapi/hoek": { "version": "9.2.1", @@ -1884,9 +1886,9 @@ "dev": true }, "node_modules/@sideway/address": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.2.tgz", - "integrity": "sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", + "integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0" @@ -2053,9 +2055,9 @@ } }, "node_modules/@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, "dependencies": { "@types/eslint": "*", @@ -2063,9 +2065,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "node_modules/@types/express": { @@ -2205,43 +2207,6 @@ "@types/node": "*" } }, - "node_modules/@types/webpack-dev-middleware": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@types/webpack-dev-middleware/-/webpack-dev-middleware-5.0.2.tgz", - "integrity": "sha512-S3WUtef//Vx6WETyWZkM45WqgRxWSaqbpWtPcKySNRhiQNyhCqM9EueggaMX3L9N2IbG4dJIK5PgYcAWUifUbA==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "tapable": "^2.1.1", - "webpack": "^5.38.1" - } - }, - "node_modules/@types/webpack-dev-middleware/node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@types/webpack-dev-server": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/webpack-dev-server/-/webpack-dev-server-4.3.1.tgz", - "integrity": "sha512-sFAFnvz1Ah17Kt4pFjATbPtuAmFS9s2dUUKhpz0kkB+X7vpJF2tbO7JoHP42od0SKijtrB7CHbsa3/lnztjpvw==", - "dev": true, - "dependencies": { - "@types/bonjour": "*", - "@types/connect-history-api-fallback": "*", - "@types/express": "*", - "@types/serve-index": "*", - "@types/serve-static": "*", - "@types/webpack-dev-middleware": "*", - "chokidar": "^3.5.1", - "http-proxy-middleware": "^2.0.0", - "webpack": "*" - } - }, "node_modules/@types/webpack-env": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.16.3.tgz", @@ -2625,58 +2590,6 @@ "node": ">=4" } }, - "node_modules/@vue/babel-preset-app": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-5.0.0-rc.2.tgz", - "integrity": "sha512-EqOuXInrc36XwHBb+XsY4yBnrIXHbxqYQNvm57QErW3uv5sSfTvJpWAdnVFuJs8tnP4m00fHiuQKK6gP34dvqQ==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.16", - "@babel/helper-compilation-targets": "^7.12.16", - "@babel/helper-module-imports": "^7.12.13", - "@babel/plugin-proposal-class-properties": "^7.12.13", - "@babel/plugin-proposal-decorators": "^7.12.13", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.12.13", - "@babel/plugin-transform-runtime": "^7.12.15", - "@babel/preset-env": "^7.12.16", - "@babel/runtime": "^7.12.13", - "@vue/babel-plugin-jsx": "^1.0.3", - "@vue/babel-preset-jsx": "^1.1.2", - "babel-plugin-dynamic-import-node": "^2.3.3", - "core-js": "^3.8.3", - "core-js-compat": "^3.8.3", - "semver": "^7.3.4" - }, - "peerDependencies": { - "@babel/core": "*", - "core-js": "^3", - "vue": "^2 || ^3.2.13" - }, - "peerDependenciesMeta": { - "core-js": { - "optional": true - }, - "vue": { - "optional": true - } - } - }, - "node_modules/@vue/babel-preset-app/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@vue/babel-preset-jsx": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.2.4.tgz", @@ -2803,20 +2716,20 @@ } }, "node_modules/@vue/cli-overlay": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-5.0.0-rc.2.tgz", - "integrity": "sha512-RbpWGDkf9hH2rkcbM9pgODecyd7nQNUesRyE7g4leqV7If8EilfKa2PU7K++ujw2+0tK9cs2wsXmm6punlt1wQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-5.0.1.tgz", + "integrity": "sha512-8cLpHoQVYHoI4EjUG4+gbuUI9xxhkP5Vz/o/WLAkAAs//+1vE/A5AjCdLeQYGR9X6T4+b/kci2ArIpSSsRi8/Q==", "dev": true }, "node_modules/@vue/cli-plugin-babel": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.0-rc.2.tgz", - "integrity": "sha512-r00Oc9qvp1WB0/pvwJ3sIRgMa0Dtha6Z1X1pf7cGCryP9Eh/bAWv4nbOnSwLYSlt8pclNQfoIeYsG9vOjDicvg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.1.tgz", + "integrity": "sha512-OVAbxmnlSHBk2I01q4Fs69rrqm43KxXmaltzXE0HT0KGT2UbwXZOLfdlf2CIun3du9JhPP0ElA33WGkXGEP6OQ==", "dev": true, "dependencies": { "@babel/core": "^7.12.16", - "@vue/babel-preset-app": "^5.0.0-rc.2", - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/babel-preset-app": "^5.0.1", + "@vue/cli-shared-utils": "^5.0.1", "babel-loader": "^8.2.2", "thread-loader": "^3.0.0", "webpack": "^5.54.0" @@ -2825,13 +2738,65 @@ "@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0" } }, + "node_modules/@vue/cli-plugin-babel/node_modules/@vue/babel-preset-app": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-5.0.1.tgz", + "integrity": "sha512-6G7Cf4qm3FBJNWsZYWWcyK5/eVutkHtYxJFPKP1O09efMnAKPSzVljBT+MyJ/OMUGTdCuw2zLyc9iaEhpZv+MQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.16", + "@babel/helper-compilation-targets": "^7.12.16", + "@babel/helper-module-imports": "^7.12.13", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-proposal-decorators": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/plugin-transform-runtime": "^7.12.15", + "@babel/preset-env": "^7.12.16", + "@babel/runtime": "^7.12.13", + "@vue/babel-plugin-jsx": "^1.0.3", + "@vue/babel-preset-jsx": "^1.1.2", + "babel-plugin-dynamic-import-node": "^2.3.3", + "core-js": "^3.8.3", + "core-js-compat": "^3.8.3", + "semver": "^7.3.4" + }, + "peerDependencies": { + "@babel/core": "*", + "core-js": "^3", + "vue": "^2 || ^3.2.13" + }, + "peerDependenciesMeta": { + "core-js": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@vue/cli-plugin-babel/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@vue/cli-plugin-e2e-cypress": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-e2e-cypress/-/cli-plugin-e2e-cypress-5.0.0-rc.2.tgz", - "integrity": "sha512-pgCKj3m/pCS/I84noRX9uFVJEQSvshI7ONIFUxKiWP8PFMABp8urez66f2Kit+k7QlRhVr3KmFnYZOVnlBp0wA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-e2e-cypress/-/cli-plugin-e2e-cypress-5.0.1.tgz", + "integrity": "sha512-twQIk20YNCQRp41xdwgYe0Tfq4LOvmSpzkT45XH91wQMfBq1+3PtT8fy7DdGnN7Dd3QTnWECQlLKJk/9Le6Q7A==", "dev": true, "dependencies": { - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-shared-utils": "^5.0.1", "eslint-plugin-cypress": "^2.11.2" }, "peerDependencies": { @@ -2840,12 +2805,12 @@ } }, "node_modules/@vue/cli-plugin-eslint": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-5.0.0-rc.2.tgz", - "integrity": "sha512-kRP6/618AkV6Y12ht7YIwvWtW9ygku6s/5uySoBCYEegWce82NPxk2A2TPFmqYRsOG50A3XojK+v0QMdMc+VSQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-5.0.1.tgz", + "integrity": "sha512-ZGxIAT4b9ppMbePJrsZA6e5882n7JIQgji8LLyYSMuf0+GTsEjUDz01nRmAD7PW+Gpf8+B5oA2tU+S3E5l6/WA==", "dev": true, "dependencies": { - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-shared-utils": "^5.0.1", "eslint-webpack-plugin": "^3.1.0", "globby": "^11.0.2", "webpack": "^5.54.0", @@ -2857,28 +2822,27 @@ } }, "node_modules/@vue/cli-plugin-router": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-5.0.0-rc.2.tgz", - "integrity": "sha512-RtbEJD2n6ADbuWB47GU8I6vQfiNZ54ovkWarNkPCcjj+5CC7YQ1tr39pJwAzlwM9eZdxtKHpOS8DkFDB9qJakQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-5.0.1.tgz", + "integrity": "sha512-Eu56AQUEK0uULgIQotZwi5eijYNBS3+znMc0u/kaI1puW3+f/qP3YCtffp5CeVcG2Kxwrx66XBI6PMHg8hPdmA==", "dev": true, "dependencies": { - "@vue/cli-shared-utils": "^5.0.0-rc.2" + "@vue/cli-shared-utils": "^5.0.1" }, "peerDependencies": { "@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0" } }, "node_modules/@vue/cli-plugin-typescript": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-typescript/-/cli-plugin-typescript-5.0.0-rc.2.tgz", - "integrity": "sha512-0u16Yt/XanVMMW4bD2Tk5YbYVSetbf4GEqPHVY9FnBtzpu21DXHmilLyq6bXCaKqgnrlCOdrbQZdHl5By+/xyg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-typescript/-/cli-plugin-typescript-5.0.1.tgz", + "integrity": "sha512-EqSNXcPtsGouTafFeFzqiEcf8T3cPu0nvNp1EsKUbx4jTR4IHbcHr1yS6mQQEwR5jbG/wfoSgwQbrhsGkLLT0Q==", "dev": true, "dependencies": { "@babel/core": "^7.12.16", "@types/webpack-env": "^1.15.2", - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-shared-utils": "^5.0.1", "babel-loader": "^8.2.2", - "cache-loader": "^4.1.0", "fork-ts-checker-webpack-plugin": "^6.4.0", "globby": "^11.0.2", "thread-loader": "^3.0.0", @@ -2888,40 +2852,43 @@ }, "peerDependencies": { "@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0", + "cache-loader": "^4.1.0", "typescript": ">=2", "vue": "^2 || ^3.2.13", "vue-template-compiler": "^2.0.0" }, "peerDependenciesMeta": { + "cache-loader": { + "optional": true + }, "vue-template-compiler": { "optional": true } } }, "node_modules/@vue/cli-plugin-vuex": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-5.0.0-rc.2.tgz", - "integrity": "sha512-c3cO6+2ojOKUmt7kNGgzA8Ht4FZ+SUnrMc1Vjy8SjdVOrf/SxBcmaQted92H7Y3mx+qkektDstvQ+/nGWIztAw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-5.0.1.tgz", + "integrity": "sha512-5J/n+Ht4r2eVuncwCXcZPHzYCz/2haktle4WcggWiKeg3jSQVUJbjviPBs6sOo3y/LG3CEfZMP9bPJjVDbexpQ==", "dev": true, "peerDependencies": { "@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0" } }, "node_modules/@vue/cli-service": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-5.0.0-rc.2.tgz", - "integrity": "sha512-bLmBWWx3E8prGr3tmjRZLhr9o/XOBpuXmXpJydFtLlDeh4g/ZVqALJdheVClHwIijxmP7zrHqVeDlF+MY+mSeg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-5.0.1.tgz", + "integrity": "sha512-lhTW1d8waZv1VaRSvhE5pWWfkdmAgRTRSluDfyxkehZHMAWi//rd7a9zppN3k9Zr4X3oYVii+u7wR/RcTlr9cQ==", "dev": true, "dependencies": { "@babel/helper-compilation-targets": "^7.12.16", "@soda/friendly-errors-webpack-plugin": "^1.8.0", "@soda/get-current-script": "^1.0.2", "@types/minimist": "^1.2.0", - "@types/webpack-dev-server": "^4.1.0", - "@vue/cli-overlay": "^5.0.0-rc.2", - "@vue/cli-plugin-router": "^5.0.0-rc.2", - "@vue/cli-plugin-vuex": "^5.0.0-rc.2", - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-overlay": "^5.0.1", + "@vue/cli-plugin-router": "^5.0.1", + "@vue/cli-plugin-vuex": "^5.0.1", + "@vue/cli-shared-utils": "^5.0.1", "@vue/component-compiler-utils": "^3.3.0", "@vue/vue-loader-v15": "npm:vue-loader@^15.9.7", "@vue/web-component-wrapper": "^1.3.0", @@ -2930,7 +2897,6 @@ "address": "^1.1.2", "autoprefixer": "^10.2.4", "browserslist": "^4.16.3", - "cache-loader": "^4.1.0", "case-sensitive-paths-webpack-plugin": "^2.3.0", "cli-highlight": "^2.1.10", "clipboardy": "^2.3.0", @@ -2951,7 +2917,7 @@ "launch-editor-middleware": "^2.2.1", "lodash.defaultsdeep": "^4.6.1", "lodash.mapvalues": "^4.6.0", - "mini-css-extract-plugin": "~2.4.3", + "mini-css-extract-plugin": "^2.5.3", "minimist": "^1.2.5", "module-alias": "^2.2.2", "portfinder": "^1.0.26", @@ -2966,7 +2932,7 @@ "webpack": "^5.54.0", "webpack-bundle-analyzer": "^4.4.0", "webpack-chain": "^6.5.1", - "webpack-dev-server": "^4.1.0", + "webpack-dev-server": "^4.7.3", "webpack-merge": "^5.7.3", "webpack-virtual-modules": "^0.4.2", "whatwg-fetch": "^3.6.2" @@ -2982,6 +2948,9 @@ "webpack-sources": "*" }, "peerDependenciesMeta": { + "cache-loader": { + "optional": true + }, "less-loader": { "optional": true }, @@ -3006,9 +2975,9 @@ } }, "node_modules/@vue/cli-shared-utils": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-5.0.0-rc.2.tgz", - "integrity": "sha512-jzSZPj92T3i23XrbCW2HNmsI6LG4P5kmerneUtTF8uwMMi540PQePA+clxUmRyNnhVJN9KnWQc10Y2+jwfXkKA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-5.0.1.tgz", + "integrity": "sha512-oL164c3yDhdLHgiFvSkXuP7z0eEY8gqTYzHHbvQJCIBtRZ/0H9Q7xICpAeMZ63lJvS2+fA5bQfv+kPII/kcjmQ==", "dev": true, "dependencies": { "chalk": "^4.1.2", @@ -3016,7 +2985,7 @@ "joi": "^17.4.0", "launch-editor": "^2.2.1", "lru-cache": "^6.0.0", - "node-fetch": "^2.6.1", + "node-fetch": "^2.6.7", "node-ipc": "^9.1.1", "open": "^8.0.2", "ora": "^5.3.0", @@ -3480,15 +3449,11 @@ } }, "node_modules/adler-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz", - "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.0.tgz", + "integrity": "sha512-f5nltvjl+PRUh6YNfUstRaXwJxtfnKEWhAWWlmKvh+Y3J2+98a0KKVYDEhz6NdKGqswLhjNGznxfSsZGOvOd9g==", "dependencies": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" - }, - "bin": { - "adler32": "bin/adler32.njs" + "printj": "~1.2.2" }, "engines": { "node": ">=0.8" @@ -3806,11 +3771,11 @@ "dev": true }, "node_modules/axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz", + "integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==", "dependencies": { - "follow-redirects": "^1.14.7" + "follow-redirects": "^1.14.8" } }, "node_modules/babel-loader": { @@ -3856,13 +3821,13 @@ } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.1.tgz", - "integrity": "sha512-TihqEe4sQcb/QcPJvxe94/9RZuLQuF1+To4WqQcRvc+3J3gLCPIPgDKzGLG6zmQLfH3nn25heRuDNkS2KR4I8A==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", + "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", "dev": true, "dependencies": { "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.20.0" + "core-js-compat": "^3.21.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -4130,7 +4095,9 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/buffer-json/-/buffer-json-2.0.0.tgz", "integrity": "sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "node_modules/bytes": { "version": "3.0.0", @@ -4146,6 +4113,8 @@ "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-4.1.0.tgz", "integrity": "sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw==", "dev": true, + "optional": true, + "peer": true, "dependencies": { "buffer-json": "^2.0.0", "find-cache-dir": "^3.0.0", @@ -4279,28 +4248,6 @@ "node": ">=0.8" } }, - "node_modules/cfb/node_modules/adler-32": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.0.tgz", - "integrity": "sha512-f5nltvjl+PRUh6YNfUstRaXwJxtfnKEWhAWWlmKvh+Y3J2+98a0KKVYDEhz6NdKGqswLhjNGznxfSsZGOvOd9g==", - "dependencies": { - "printj": "~1.2.2" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/cfb/node_modules/adler-32/node_modules/printj": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/printj/-/printj-1.2.3.tgz", - "integrity": "sha512-sanczS6xOJOg7IKDvi4sGOUOe7c1tsEzjwlLFH/zgwx/uyImVM9/rgBkc8AfiQa/Vg54nRd8mkm9yI7WV/O+WA==", - "bin": { - "printj": "bin/printj.njs" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/cfb/node_modules/printj": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/printj/-/printj-1.3.0.tgz", @@ -4326,10 +4273,19 @@ "node": ">=4" } }, + "node_modules/charcodes": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/charcodes/-/charcodes-0.2.0.tgz", + "integrity": "sha512-Y4kiDb+AM4Ecy58YkuZrrSRJBDQdQ2L+NyS1vHHFtNtUjgutcZfx3yp1dAONI/oPaPmyGfCLx5CxL+zauIMyKQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/chart.js": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.0.tgz", - "integrity": "sha512-31gVuqqKp3lDIFmzpKIrBeum4OpZsQjSIAqlOpgjosHDJZlULtvwLEZKtEhIAZc7JMPaHlYMys40Qy9Mf+1AAg==" + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.1.tgz", + "integrity": "sha512-8knRegQLFnPQAheZV8MjxIXc5gQEfDFD897BJgv/klO/vtIyFFmgMXrNfgrXpbTr/XbTturxRgxIXx/Y+ASJBA==" }, "node_modules/check-more-types": { "version": "2.24.0", @@ -5046,9 +5002,9 @@ } }, "node_modules/core-js": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.3.tgz", - "integrity": "sha512-vVl8j8ph6tRS3B8qir40H7yw7voy17xL0piAjlbBUsH7WIfzoedL/ZOr1OV9FyZQLWXsayOJyV4tnRyXR85/ag==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz", + "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -5056,9 +5012,9 @@ } }, "node_modules/core-js-compat": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.3.tgz", - "integrity": "sha512-c8M5h0IkNZ+I92QhIpuSijOxGAcj3lgpsWdkCqmUTZNwidujF4r3pi6x1DCN+Vcs5qTS2XWWMfWSuCqyupX8gw==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", + "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", "dev": true, "dependencies": { "browserslist": "^4.19.1", @@ -5101,12 +5057,12 @@ } }, "node_modules/crc-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", - "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.1.tgz", + "integrity": "sha512-Dn/xm/1vFFgs3nfrpEVScHoIslO9NZRITWGz/1E/St6u4xw99vfZzVkW0OSnzx2h9egej9xwMCEut6sqwokM/w==", "dependencies": { "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" + "printj": "~1.3.1" }, "bin": { "crc32": "bin/crc32.njs" @@ -5115,6 +5071,17 @@ "node": ">=0.8" } }, + "node_modules/crc-32/node_modules/printj": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.3.1.tgz", + "integrity": "sha512-GA3TdL8szPK4AQ2YnOe/b+Y1jUFwmmGMMK/qbY7VcE3Z7FU8JstbKiKRzO6CIiAKPhTO8m01NoQ0V5f3jc4OGg==", + "bin": { + "printj": "bin/printj.njs" + }, + "engines": { + "node": ">=0.8" + } + }, "node_modules/cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -5692,9 +5659,9 @@ } }, "node_modules/cypress": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.3.1.tgz", - "integrity": "sha512-BODdPesxX6bkVUnH8BVsV8I/jn57zQtO1FEOUTiuG2us3kslW7g0tcuwiny7CKCmJUZz8S/D587ppC+s58a+5Q==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.0.tgz", + "integrity": "sha512-rC5QPolKsVjJ8QJZ7IeZ6HlKM4gswBGZc0XvoAJNL8urQCSL8zTX0A/ai/h35WfF47NQ0iSZnwIXBlHX3MOUIQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -5735,10 +5702,10 @@ "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", + "semver": "^7.3.2", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", - "url": "^0.11.0", "yauzl": "^2.10.0" }, "bin": { @@ -6015,6 +5982,21 @@ "node": ">=8" } }, + "node_modules/cypress/node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/cypress/node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6768,12 +6750,12 @@ } }, "node_modules/eslint": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", - "integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", + "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.1.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -6781,10 +6763,10 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -6865,9 +6847,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.3.0.tgz", - "integrity": "sha512-IIuLHw4vQxGlHcoP2dG6t/2OVdQf2qoyAzEGAxreU1afZOHGA7y3TWq8I+r3ZA6Wjs6xpeUWGHlT31QGr9Rb5g==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz", + "integrity": "sha512-nmWOhNmDx9TZ+yP9ZhezTkZUupSHsYA2TocRm+efPSXMOyFrVczVlaIuQcLBjCtI8CbkBiUQ3VcyQsjlIhDrhA==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", @@ -7055,9 +7037,9 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -7068,9 +7050,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -7200,23 +7182,23 @@ } }, "node_modules/espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "dependencies": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -7687,9 +7669,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "funding": [ { "type": "individual", @@ -8992,14 +8974,14 @@ } }, "node_modules/joi": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.2.tgz", - "integrity": "sha512-Lm56PP+n0+Z2A2rfRvsfWVDXGEWjXxatPopkQ8qQ5mxCEhwHG+Ettgg5o98FFaxilOxozoa14cFhrE/hOzh/Nw==", + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz", + "integrity": "sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==", "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0", "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.0", + "@sideway/address": "^4.1.3", "@sideway/formula": "^3.0.0", "@sideway/pinpoint": "^2.0.0" } @@ -9298,9 +9280,9 @@ "dev": true }, "node_modules/lint-staged": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.1.tgz", - "integrity": "sha512-Ocht/eT+4/siWOZDJpNUKcKX2UeWW/pDbohJ4gRsrafAjBi79JK8kiNVk2ciIVNKdw0Q4ABptl2nr6uQAlRImw==", + "version": "12.3.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.4.tgz", + "integrity": "sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w==", "dev": true, "dependencies": { "cli-truncate": "^3.1.0", @@ -10336,12 +10318,12 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.4.4.tgz", - "integrity": "sha512-UJ+aNuFQaQaECu7AamlWOBLj2cJ6XSGU4zNiqXeZ7lZLe5VD0DoSPWFbWArXueo+6FZVbgHzpX9lUIaBIDLuYg==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.5.3.tgz", + "integrity": "sha512-YseMB8cs8U/KCaAGQoqYmfUuhhGW0a9p9XvWXrxVOkE3/IiISTLw4ALNt7JR5B2eYauFM+PQGSbXMDmVbR7Tfw==", "dev": true, "dependencies": { - "schema-utils": "^3.1.0" + "schema-utils": "^4.0.0" }, "engines": { "node": ">= 12.13.0" @@ -10354,18 +10336,53 @@ "webpack": "^5.0.0" } }, + "node_modules/mini-css-extract-plugin/node_modules/ajv": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/mini-css-extract-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">= 12.13.0" }, "funding": { "type": "opencollective", @@ -12018,9 +12035,9 @@ } }, "node_modules/printj": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", - "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.2.3.tgz", + "integrity": "sha512-sanczS6xOJOg7IKDvi4sGOUOe7c1tsEzjwlLFH/zgwx/uyImVM9/rgBkc8AfiQa/Vg54nRd8mkm9yI7WV/O+WA==", "bin": { "printj": "bin/printj.njs" }, @@ -12262,16 +12279,6 @@ "node": ">=0.6" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -12470,9 +12477,9 @@ "dev": true }, "node_modules/regenerate-unicode-properties": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", - "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", "dev": true, "dependencies": { "regenerate": "^1.4.2" @@ -12525,15 +12532,15 @@ } }, "node_modules/regexpu-core": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", - "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", "dev": true, "dependencies": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^9.0.0", - "regjsgen": "^0.5.2", - "regjsparser": "^0.7.0", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.0.0" }, @@ -12542,15 +12549,15 @@ } }, "node_modules/regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", "dev": true }, "node_modules/regjsparser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", - "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", "dev": true, "dependencies": { "jsesc": "~0.5.0" @@ -12755,9 +12762,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.48.0.tgz", - "integrity": "sha512-hQi5g4DcfjcipotoHZ80l7GNJHGqQS5LwMBjVYB/TaT0vcSSpbgM8Ad7cgfsB2M0MinbkEQQPO9+sjjSiwxqmw==", + "version": "1.49.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz", + "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -12768,13 +12775,13 @@ "sass": "sass.js" }, "engines": { - "node": ">=8.9.0" + "node": ">=12.0.0" } }, "node_modules/sass-loader": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.4.0.tgz", - "integrity": "sha512-7xN+8khDIzym1oL9XyS6zP6Ges+Bo2B2xbPrjdMHEYyV3AQYhd/wXeru++3ODHF0zMjYmVadblSKrPrjEkL8mg==", + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz", + "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==", "dev": true, "dependencies": { "klona": "^2.0.4", @@ -12791,6 +12798,7 @@ "fibers": ">= 3.1.0", "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0", "sass": "^1.3.0", + "sass-embedded": "*", "webpack": "^5.0.0" }, "peerDependenciesMeta": { @@ -12802,6 +12810,9 @@ }, "sass": { "optional": true + }, + "sass-embedded": { + "optional": true } } }, @@ -14082,22 +14093,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14452,9 +14447,9 @@ "dev": true }, "node_modules/vuetify": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.6.2.tgz", - "integrity": "sha512-nx3uZkO8MZNMshUEh1xKaQ1hQYepNwWFn3FVxKt+XBVf7ZFscd0GS/a3KZo4B3baXQmziCQAZKNIQF5IWeaIUw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.6.3.tgz", + "integrity": "sha512-Zfiz2DZnp1DvxqGaSCGqGjv4mPNAurJJ5Xwy7bzNzIySGLlRdlO8UH6aNWnSgfaAsLP3voxadSGDm6tKM8Ys7w==", "funding": { "type": "github", "url": "https://github.com/sponsors/johnleider" @@ -14589,13 +14584,13 @@ "dev": true }, "node_modules/webpack": { - "version": "5.67.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.67.0.tgz", - "integrity": "sha512-LjFbfMh89xBDpUMgA1W9Ur6Rn/gnr2Cq1jjHFPo4v6a79/ypznSYbAyPgGhwsxBtMIaEmDD1oJoA7BEYw/Fbrw==", + "version": "5.69.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.69.1.tgz", + "integrity": "sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A==", "dev": true, "dependencies": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", @@ -15254,14 +15249,14 @@ } }, "node_modules/xlsx": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.17.5.tgz", - "integrity": "sha512-lXNU0TuYsvElzvtI6O7WIVb9Zar1XYw7Xb3VAx2wn8N/n0whBYrCnHMxtFyIiUU1Wjf09WzmLALDfBO5PqTb1g==", + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.2.tgz", + "integrity": "sha512-BWLS+GO5yg5Hnro8mpbNkZq/a+dZ8689otFuHmb9wgCtiMpL+I9dpc+Sans6K9yYxTLEZ235Kr/JkmoTEMunzQ==", "dependencies": { - "adler-32": "~1.2.0", - "cfb": "^1.1.4", + "adler-32": "~1.3.0", + "cfb": "~1.2.1", "codepage": "~1.15.0", - "crc-32": "~1.2.0", + "crc-32": "~1.2.1", "ssf": "~0.11.2", "wmf": "~1.0.1", "word": "~0.3.0" @@ -15437,9 +15432,9 @@ } }, "@babel/compat-data": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", - "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.0.tgz", + "integrity": "sha512-392byTlpGWXMv4FbyWw3sAZ/FrW/DrwqLGXpy0mbyNe9Taqv1mg9yON5/o0cnr8XYCkFTZbC1eV+c+LAROgrng==", "dev": true }, "@babel/core": { @@ -15508,9 +15503,9 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", - "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", + "version": "7.17.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.1.tgz", + "integrity": "sha512-JBdSr/LtyYIno/pNnJ75lBcqc3Z1XXujzPanHqjvvrhOA+DTceTFuJi8XjmWTZh4r3fsdfqaCMN0iZemdkxZHQ==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.7", @@ -15523,13 +15518,13 @@ } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", - "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz", + "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^4.7.1" + "regexpu-core": "^5.0.1" } }, "@babel/helper-define-polyfill-provider": { @@ -15800,14 +15795,16 @@ } }, "@babel/plugin-proposal-decorators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.16.7.tgz", - "integrity": "sha512-DoEpnuXK14XV9btI1k8tzNGCutMclpj4yru8aXKoHlVmbO1s+2A+g2+h4JhcjrxkFJqzbymnLG6j/niOf3iFXQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.17.2.tgz", + "integrity": "sha512-WH8Z95CwTq/W8rFbMqb9p3hicpt4RX4f0K659ax2VHxgOyT6qQmUaEVEjIh4WR9Eh9NymkVn5vwsrE68fAQNUw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.17.1", "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-decorators": "^7.16.7" + "@babel/helper-replace-supers": "^7.16.7", + "@babel/plugin-syntax-decorators": "^7.17.0", + "charcodes": "^0.2.0" } }, "@babel/plugin-proposal-dynamic-import": { @@ -15871,12 +15868,12 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", - "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz", + "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==", "dev": true, "requires": { - "@babel/compat-data": "^7.16.4", + "@babel/compat-data": "^7.17.0", "@babel/helper-compilation-targets": "^7.16.7", "@babel/helper-plugin-utils": "^7.16.7", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", @@ -15905,12 +15902,12 @@ } }, "@babel/plugin-proposal-private-methods": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", - "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz", + "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.10", "@babel/helper-plugin-utils": "^7.16.7" } }, @@ -15964,9 +15961,9 @@ } }, "@babel/plugin-syntax-decorators": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.16.7.tgz", - "integrity": "sha512-vQ+PxL+srA7g6Rx6I1e15m55gftknl2X8GCUW1JTlkTaXZLJOS0UcaY0eK9jYT7IYf4awn6qwyghVHLDz1WyMw==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.17.0.tgz", + "integrity": "sha512-qWe85yCXsvDEluNP0OyeQjH63DlhAR3W7K9BxxU1MvbDb48tgBG+Ao6IJJ6smPDrrVzSQZrbF6donpkFBMcs3A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.16.7" @@ -16144,9 +16141,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", - "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.3.tgz", + "integrity": "sha512-dDFzegDYKlPqa72xIlbmSkly5MluLoaC1JswABGktyt6NTXSBcUuse/kWE/wvKFWJHPETpi158qJZFS3JmykJg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.16.7" @@ -16330,9 +16327,9 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.8.tgz", - "integrity": "sha512-6Kg2XHPFnIarNweZxmzbgYnnWsXxkx9WQUVk2sksBRL80lBC1RAQV3wQagWxdCHiYHqPN+oenwNIuttlYgIbQQ==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.0.tgz", + "integrity": "sha512-fr7zPWnKXNc1xoHfrIU9mN/4XKX4VLZ45Q+oMhfsYIaHvg7mHgmhfOy/ckRWqDK7XF3QDigRpkh5DKq6+clE8A==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.16.7", @@ -16409,9 +16406,9 @@ } }, "@babel/preset-env": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", - "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", + "version": "7.16.11", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz", + "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==", "dev": true, "requires": { "@babel/compat-data": "^7.16.8", @@ -16432,7 +16429,7 @@ "@babel/plugin-proposal-object-rest-spread": "^7.16.7", "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", "@babel/plugin-proposal-optional-chaining": "^7.16.7", - "@babel/plugin-proposal-private-methods": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.11", "@babel/plugin-proposal-private-property-in-object": "^7.16.7", "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -16504,9 +16501,9 @@ } }, "@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" @@ -16607,14 +16604,14 @@ } }, "@eslint/eslintrc": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", - "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", + "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.2.0", + "espree": "^9.3.1", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", @@ -16624,9 +16621,9 @@ }, "dependencies": { "globals": { - "version": "13.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", - "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", + "version": "13.12.1", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", + "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -16641,9 +16638,9 @@ } }, "@fontsource/roboto": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.1.tgz", - "integrity": "sha512-3mhfL+eNPG/woMNqwD/OHaW5qMpeGEBsDwzmhFmjB1yUV+M+M9P0NhP/AyHvnGz3DrqkvZ7CPzNMa+UkVLeELg==" + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/@fontsource/roboto/-/roboto-4.5.3.tgz", + "integrity": "sha512-NUvBTj332dFRdiVkLlavXbDGoD2zyyeGYmMyrXOnctg/3e4pq95+rJgNfUP+k4v8UBk2L1aomGw9dDjbRdAmTg==" }, "@hapi/hoek": { "version": "9.2.1", @@ -16727,9 +16724,9 @@ "dev": true }, "@sideway/address": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.2.tgz", - "integrity": "sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", + "integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", "dev": true, "requires": { "@hapi/hoek": "^9.0.0" @@ -16871,9 +16868,9 @@ } }, "@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, "requires": { "@types/eslint": "*", @@ -16881,9 +16878,9 @@ } }, "@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true }, "@types/express": { @@ -17023,42 +17020,6 @@ "@types/node": "*" } }, - "@types/webpack-dev-middleware": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@types/webpack-dev-middleware/-/webpack-dev-middleware-5.0.2.tgz", - "integrity": "sha512-S3WUtef//Vx6WETyWZkM45WqgRxWSaqbpWtPcKySNRhiQNyhCqM9EueggaMX3L9N2IbG4dJIK5PgYcAWUifUbA==", - "dev": true, - "requires": { - "@types/connect": "*", - "tapable": "^2.1.1", - "webpack": "^5.38.1" - }, - "dependencies": { - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - } - } - }, - "@types/webpack-dev-server": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/webpack-dev-server/-/webpack-dev-server-4.3.1.tgz", - "integrity": "sha512-sFAFnvz1Ah17Kt4pFjATbPtuAmFS9s2dUUKhpz0kkB+X7vpJF2tbO7JoHP42od0SKijtrB7CHbsa3/lnztjpvw==", - "dev": true, - "requires": { - "@types/bonjour": "*", - "@types/connect-history-api-fallback": "*", - "@types/express": "*", - "@types/serve-index": "*", - "@types/serve-static": "*", - "@types/webpack-dev-middleware": "*", - "chokidar": "^3.5.1", - "http-proxy-middleware": "^2.0.0", - "webpack": "*" - } - }, "@types/webpack-env": { "version": "1.16.3", "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.16.3.tgz", @@ -17312,41 +17273,6 @@ } } }, - "@vue/babel-preset-app": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-5.0.0-rc.2.tgz", - "integrity": "sha512-EqOuXInrc36XwHBb+XsY4yBnrIXHbxqYQNvm57QErW3uv5sSfTvJpWAdnVFuJs8tnP4m00fHiuQKK6gP34dvqQ==", - "dev": true, - "requires": { - "@babel/core": "^7.12.16", - "@babel/helper-compilation-targets": "^7.12.16", - "@babel/helper-module-imports": "^7.12.13", - "@babel/plugin-proposal-class-properties": "^7.12.13", - "@babel/plugin-proposal-decorators": "^7.12.13", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-jsx": "^7.12.13", - "@babel/plugin-transform-runtime": "^7.12.15", - "@babel/preset-env": "^7.12.16", - "@babel/runtime": "^7.12.13", - "@vue/babel-plugin-jsx": "^1.0.3", - "@vue/babel-preset-jsx": "^1.1.2", - "babel-plugin-dynamic-import-node": "^2.3.3", - "core-js": "^3.8.3", - "core-js-compat": "^3.8.3", - "semver": "^7.3.4" - }, - "dependencies": { - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, "@vue/babel-preset-jsx": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@vue/babel-preset-jsx/-/babel-preset-jsx-1.2.4.tgz", @@ -17447,42 +17373,77 @@ } }, "@vue/cli-overlay": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-5.0.0-rc.2.tgz", - "integrity": "sha512-RbpWGDkf9hH2rkcbM9pgODecyd7nQNUesRyE7g4leqV7If8EilfKa2PU7K++ujw2+0tK9cs2wsXmm6punlt1wQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-overlay/-/cli-overlay-5.0.1.tgz", + "integrity": "sha512-8cLpHoQVYHoI4EjUG4+gbuUI9xxhkP5Vz/o/WLAkAAs//+1vE/A5AjCdLeQYGR9X6T4+b/kci2ArIpSSsRi8/Q==", "dev": true }, "@vue/cli-plugin-babel": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.0-rc.2.tgz", - "integrity": "sha512-r00Oc9qvp1WB0/pvwJ3sIRgMa0Dtha6Z1X1pf7cGCryP9Eh/bAWv4nbOnSwLYSlt8pclNQfoIeYsG9vOjDicvg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.1.tgz", + "integrity": "sha512-OVAbxmnlSHBk2I01q4Fs69rrqm43KxXmaltzXE0HT0KGT2UbwXZOLfdlf2CIun3du9JhPP0ElA33WGkXGEP6OQ==", "dev": true, "requires": { "@babel/core": "^7.12.16", - "@vue/babel-preset-app": "^5.0.0-rc.2", - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/babel-preset-app": "^5.0.1", + "@vue/cli-shared-utils": "^5.0.1", "babel-loader": "^8.2.2", "thread-loader": "^3.0.0", "webpack": "^5.54.0" + }, + "dependencies": { + "@vue/babel-preset-app": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/babel-preset-app/-/babel-preset-app-5.0.1.tgz", + "integrity": "sha512-6G7Cf4qm3FBJNWsZYWWcyK5/eVutkHtYxJFPKP1O09efMnAKPSzVljBT+MyJ/OMUGTdCuw2zLyc9iaEhpZv+MQ==", + "dev": true, + "requires": { + "@babel/core": "^7.12.16", + "@babel/helper-compilation-targets": "^7.12.16", + "@babel/helper-module-imports": "^7.12.13", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-proposal-decorators": "^7.12.13", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.12.13", + "@babel/plugin-transform-runtime": "^7.12.15", + "@babel/preset-env": "^7.12.16", + "@babel/runtime": "^7.12.13", + "@vue/babel-plugin-jsx": "^1.0.3", + "@vue/babel-preset-jsx": "^1.1.2", + "babel-plugin-dynamic-import-node": "^2.3.3", + "core-js": "^3.8.3", + "core-js-compat": "^3.8.3", + "semver": "^7.3.4" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@vue/cli-plugin-e2e-cypress": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-e2e-cypress/-/cli-plugin-e2e-cypress-5.0.0-rc.2.tgz", - "integrity": "sha512-pgCKj3m/pCS/I84noRX9uFVJEQSvshI7ONIFUxKiWP8PFMABp8urez66f2Kit+k7QlRhVr3KmFnYZOVnlBp0wA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-e2e-cypress/-/cli-plugin-e2e-cypress-5.0.1.tgz", + "integrity": "sha512-twQIk20YNCQRp41xdwgYe0Tfq4LOvmSpzkT45XH91wQMfBq1+3PtT8fy7DdGnN7Dd3QTnWECQlLKJk/9Le6Q7A==", "dev": true, "requires": { - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-shared-utils": "^5.0.1", "eslint-plugin-cypress": "^2.11.2" } }, "@vue/cli-plugin-eslint": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-5.0.0-rc.2.tgz", - "integrity": "sha512-kRP6/618AkV6Y12ht7YIwvWtW9ygku6s/5uySoBCYEegWce82NPxk2A2TPFmqYRsOG50A3XojK+v0QMdMc+VSQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-eslint/-/cli-plugin-eslint-5.0.1.tgz", + "integrity": "sha512-ZGxIAT4b9ppMbePJrsZA6e5882n7JIQgji8LLyYSMuf0+GTsEjUDz01nRmAD7PW+Gpf8+B5oA2tU+S3E5l6/WA==", "dev": true, "requires": { - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-shared-utils": "^5.0.1", "eslint-webpack-plugin": "^3.1.0", "globby": "^11.0.2", "webpack": "^5.54.0", @@ -17490,25 +17451,24 @@ } }, "@vue/cli-plugin-router": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-5.0.0-rc.2.tgz", - "integrity": "sha512-RtbEJD2n6ADbuWB47GU8I6vQfiNZ54ovkWarNkPCcjj+5CC7YQ1tr39pJwAzlwM9eZdxtKHpOS8DkFDB9qJakQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-router/-/cli-plugin-router-5.0.1.tgz", + "integrity": "sha512-Eu56AQUEK0uULgIQotZwi5eijYNBS3+znMc0u/kaI1puW3+f/qP3YCtffp5CeVcG2Kxwrx66XBI6PMHg8hPdmA==", "dev": true, "requires": { - "@vue/cli-shared-utils": "^5.0.0-rc.2" + "@vue/cli-shared-utils": "^5.0.1" } }, "@vue/cli-plugin-typescript": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-typescript/-/cli-plugin-typescript-5.0.0-rc.2.tgz", - "integrity": "sha512-0u16Yt/XanVMMW4bD2Tk5YbYVSetbf4GEqPHVY9FnBtzpu21DXHmilLyq6bXCaKqgnrlCOdrbQZdHl5By+/xyg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-typescript/-/cli-plugin-typescript-5.0.1.tgz", + "integrity": "sha512-EqSNXcPtsGouTafFeFzqiEcf8T3cPu0nvNp1EsKUbx4jTR4IHbcHr1yS6mQQEwR5jbG/wfoSgwQbrhsGkLLT0Q==", "dev": true, "requires": { "@babel/core": "^7.12.16", "@types/webpack-env": "^1.15.2", - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-shared-utils": "^5.0.1", "babel-loader": "^8.2.2", - "cache-loader": "^4.1.0", "fork-ts-checker-webpack-plugin": "^6.4.0", "globby": "^11.0.2", "thread-loader": "^3.0.0", @@ -17518,27 +17478,26 @@ } }, "@vue/cli-plugin-vuex": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-5.0.0-rc.2.tgz", - "integrity": "sha512-c3cO6+2ojOKUmt7kNGgzA8Ht4FZ+SUnrMc1Vjy8SjdVOrf/SxBcmaQted92H7Y3mx+qkektDstvQ+/nGWIztAw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-plugin-vuex/-/cli-plugin-vuex-5.0.1.tgz", + "integrity": "sha512-5J/n+Ht4r2eVuncwCXcZPHzYCz/2haktle4WcggWiKeg3jSQVUJbjviPBs6sOo3y/LG3CEfZMP9bPJjVDbexpQ==", "dev": true, "requires": {} }, "@vue/cli-service": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-5.0.0-rc.2.tgz", - "integrity": "sha512-bLmBWWx3E8prGr3tmjRZLhr9o/XOBpuXmXpJydFtLlDeh4g/ZVqALJdheVClHwIijxmP7zrHqVeDlF+MY+mSeg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-5.0.1.tgz", + "integrity": "sha512-lhTW1d8waZv1VaRSvhE5pWWfkdmAgRTRSluDfyxkehZHMAWi//rd7a9zppN3k9Zr4X3oYVii+u7wR/RcTlr9cQ==", "dev": true, "requires": { "@babel/helper-compilation-targets": "^7.12.16", "@soda/friendly-errors-webpack-plugin": "^1.8.0", "@soda/get-current-script": "^1.0.2", "@types/minimist": "^1.2.0", - "@types/webpack-dev-server": "^4.1.0", - "@vue/cli-overlay": "^5.0.0-rc.2", - "@vue/cli-plugin-router": "^5.0.0-rc.2", - "@vue/cli-plugin-vuex": "^5.0.0-rc.2", - "@vue/cli-shared-utils": "^5.0.0-rc.2", + "@vue/cli-overlay": "^5.0.1", + "@vue/cli-plugin-router": "^5.0.1", + "@vue/cli-plugin-vuex": "^5.0.1", + "@vue/cli-shared-utils": "^5.0.1", "@vue/component-compiler-utils": "^3.3.0", "@vue/vue-loader-v15": "npm:vue-loader@^15.9.7", "@vue/web-component-wrapper": "^1.3.0", @@ -17547,7 +17506,6 @@ "address": "^1.1.2", "autoprefixer": "^10.2.4", "browserslist": "^4.16.3", - "cache-loader": "^4.1.0", "case-sensitive-paths-webpack-plugin": "^2.3.0", "cli-highlight": "^2.1.10", "clipboardy": "^2.3.0", @@ -17568,7 +17526,7 @@ "launch-editor-middleware": "^2.2.1", "lodash.defaultsdeep": "^4.6.1", "lodash.mapvalues": "^4.6.0", - "mini-css-extract-plugin": "~2.4.3", + "mini-css-extract-plugin": "^2.5.3", "minimist": "^1.2.5", "module-alias": "^2.2.2", "portfinder": "^1.0.26", @@ -17583,16 +17541,16 @@ "webpack": "^5.54.0", "webpack-bundle-analyzer": "^4.4.0", "webpack-chain": "^6.5.1", - "webpack-dev-server": "^4.1.0", + "webpack-dev-server": "^4.7.3", "webpack-merge": "^5.7.3", "webpack-virtual-modules": "^0.4.2", "whatwg-fetch": "^3.6.2" } }, "@vue/cli-shared-utils": { - "version": "5.0.0-rc.2", - "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-5.0.0-rc.2.tgz", - "integrity": "sha512-jzSZPj92T3i23XrbCW2HNmsI6LG4P5kmerneUtTF8uwMMi540PQePA+clxUmRyNnhVJN9KnWQc10Y2+jwfXkKA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@vue/cli-shared-utils/-/cli-shared-utils-5.0.1.tgz", + "integrity": "sha512-oL164c3yDhdLHgiFvSkXuP7z0eEY8gqTYzHHbvQJCIBtRZ/0H9Q7xICpAeMZ63lJvS2+fA5bQfv+kPII/kcjmQ==", "dev": true, "requires": { "chalk": "^4.1.2", @@ -17600,7 +17558,7 @@ "joi": "^17.4.0", "launch-editor": "^2.2.1", "lru-cache": "^6.0.0", - "node-fetch": "^2.6.1", + "node-fetch": "^2.6.7", "node-ipc": "^9.1.1", "open": "^8.0.2", "ora": "^5.3.0", @@ -17990,12 +17948,11 @@ "dev": true }, "adler-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz", - "integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.0.tgz", + "integrity": "sha512-f5nltvjl+PRUh6YNfUstRaXwJxtfnKEWhAWWlmKvh+Y3J2+98a0KKVYDEhz6NdKGqswLhjNGznxfSsZGOvOd9g==", "requires": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" + "printj": "~1.2.2" } }, "aggregate-error": { @@ -18221,11 +18178,11 @@ "dev": true }, "axios": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", - "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", + "version": "0.26.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.0.tgz", + "integrity": "sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==", "requires": { - "follow-redirects": "^1.14.7" + "follow-redirects": "^1.14.8" } }, "babel-loader": { @@ -18261,13 +18218,13 @@ } }, "babel-plugin-polyfill-corejs3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.1.tgz", - "integrity": "sha512-TihqEe4sQcb/QcPJvxe94/9RZuLQuF1+To4WqQcRvc+3J3gLCPIPgDKzGLG6zmQLfH3nn25heRuDNkS2KR4I8A==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", + "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", "dev": true, "requires": { "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.20.0" + "core-js-compat": "^3.21.0" } }, "babel-plugin-polyfill-regenerator": { @@ -18472,7 +18429,9 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/buffer-json/-/buffer-json-2.0.0.tgz", "integrity": "sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==", - "dev": true + "dev": true, + "optional": true, + "peer": true }, "bytes": { "version": "3.0.0", @@ -18485,6 +18444,8 @@ "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-4.1.0.tgz", "integrity": "sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw==", "dev": true, + "optional": true, + "peer": true, "requires": { "buffer-json": "^2.0.0", "find-cache-dir": "^3.0.0", @@ -18586,21 +18547,6 @@ "printj": "~1.3.0" }, "dependencies": { - "adler-32": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.0.tgz", - "integrity": "sha512-f5nltvjl+PRUh6YNfUstRaXwJxtfnKEWhAWWlmKvh+Y3J2+98a0KKVYDEhz6NdKGqswLhjNGznxfSsZGOvOd9g==", - "requires": { - "printj": "~1.2.2" - }, - "dependencies": { - "printj": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/printj/-/printj-1.2.3.tgz", - "integrity": "sha512-sanczS6xOJOg7IKDvi4sGOUOe7c1tsEzjwlLFH/zgwx/uyImVM9/rgBkc8AfiQa/Vg54nRd8mkm9yI7WV/O+WA==" - } - } - }, "printj": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/printj/-/printj-1.3.0.tgz", @@ -18619,10 +18565,16 @@ "supports-color": "^5.3.0" } }, + "charcodes": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/charcodes/-/charcodes-0.2.0.tgz", + "integrity": "sha512-Y4kiDb+AM4Ecy58YkuZrrSRJBDQdQ2L+NyS1vHHFtNtUjgutcZfx3yp1dAONI/oPaPmyGfCLx5CxL+zauIMyKQ==", + "dev": true + }, "chart.js": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.0.tgz", - "integrity": "sha512-31gVuqqKp3lDIFmzpKIrBeum4OpZsQjSIAqlOpgjosHDJZlULtvwLEZKtEhIAZc7JMPaHlYMys40Qy9Mf+1AAg==" + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-3.7.1.tgz", + "integrity": "sha512-8knRegQLFnPQAheZV8MjxIXc5gQEfDFD897BJgv/klO/vtIyFFmgMXrNfgrXpbTr/XbTturxRgxIXx/Y+ASJBA==" }, "check-more-types": { "version": "2.24.0", @@ -19169,14 +19121,14 @@ } }, "core-js": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.20.3.tgz", - "integrity": "sha512-vVl8j8ph6tRS3B8qir40H7yw7voy17xL0piAjlbBUsH7WIfzoedL/ZOr1OV9FyZQLWXsayOJyV4tnRyXR85/ag==" + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz", + "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==" }, "core-js-compat": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.3.tgz", - "integrity": "sha512-c8M5h0IkNZ+I92QhIpuSijOxGAcj3lgpsWdkCqmUTZNwidujF4r3pi6x1DCN+Vcs5qTS2XWWMfWSuCqyupX8gw==", + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz", + "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==", "dev": true, "requires": { "browserslist": "^4.19.1", @@ -19211,12 +19163,19 @@ } }, "crc-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", - "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.1.tgz", + "integrity": "sha512-Dn/xm/1vFFgs3nfrpEVScHoIslO9NZRITWGz/1E/St6u4xw99vfZzVkW0OSnzx2h9egej9xwMCEut6sqwokM/w==", "requires": { "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" + "printj": "~1.3.1" + }, + "dependencies": { + "printj": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.3.1.tgz", + "integrity": "sha512-GA3TdL8szPK4AQ2YnOe/b+Y1jUFwmmGMMK/qbY7VcE3Z7FU8JstbKiKRzO6CIiAKPhTO8m01NoQ0V5f3jc4OGg==" + } } }, "cross-spawn": { @@ -19644,9 +19603,9 @@ } }, "cypress": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.3.1.tgz", - "integrity": "sha512-BODdPesxX6bkVUnH8BVsV8I/jn57zQtO1FEOUTiuG2us3kslW7g0tcuwiny7CKCmJUZz8S/D587ppC+s58a+5Q==", + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.5.0.tgz", + "integrity": "sha512-rC5QPolKsVjJ8QJZ7IeZ6HlKM4gswBGZc0XvoAJNL8urQCSL8zTX0A/ai/h35WfF47NQ0iSZnwIXBlHX3MOUIQ==", "dev": true, "requires": { "@cypress/request": "^2.88.10", @@ -19686,10 +19645,10 @@ "pretty-bytes": "^5.6.0", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", + "semver": "^7.3.2", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", - "url": "^0.11.0", "yauzl": "^2.10.0" }, "dependencies": { @@ -19823,6 +19782,15 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -20478,12 +20446,12 @@ "dev": true }, "eslint": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.7.0.tgz", - "integrity": "sha512-ifHYzkBGrzS2iDU7KjhCAVMGCvF6M3Xfs8X8b37cgrUlDt6bWRTpRh6T/gtSXv1HJ/BUGgmjvNvOEGu85Iif7w==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", + "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.0.5", + "@eslint/eslintrc": "^1.1.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -20491,10 +20459,10 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.0", + "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.2.0", - "espree": "^9.3.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -20572,9 +20540,9 @@ "dev": true }, "eslint-scope": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", - "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", + "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -20582,9 +20550,9 @@ } }, "eslint-visitor-keys": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz", - "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true }, "estraverse": { @@ -20696,9 +20664,9 @@ } }, "eslint-plugin-vue": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.3.0.tgz", - "integrity": "sha512-IIuLHw4vQxGlHcoP2dG6t/2OVdQf2qoyAzEGAxreU1afZOHGA7y3TWq8I+r3ZA6Wjs6xpeUWGHlT31QGr9Rb5g==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-8.4.1.tgz", + "integrity": "sha512-nmWOhNmDx9TZ+yP9ZhezTkZUupSHsYA2TocRm+efPSXMOyFrVczVlaIuQcLBjCtI8CbkBiUQ3VcyQsjlIhDrhA==", "dev": true, "requires": { "eslint-utils": "^3.0.0", @@ -20770,20 +20738,20 @@ } }, "espree": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz", - "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", + "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", "dev": true, "requires": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^3.1.0" + "eslint-visitor-keys": "^3.3.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", - "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true } } @@ -21170,9 +21138,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" }, "forever-agent": { "version": "0.6.1", @@ -22113,14 +22081,14 @@ } }, "joi": { - "version": "17.4.2", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.2.tgz", - "integrity": "sha512-Lm56PP+n0+Z2A2rfRvsfWVDXGEWjXxatPopkQ8qQ5mxCEhwHG+Ettgg5o98FFaxilOxozoa14cFhrE/hOzh/Nw==", + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz", + "integrity": "sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==", "dev": true, "requires": { "@hapi/hoek": "^9.0.0", "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.0", + "@sideway/address": "^4.1.3", "@sideway/formula": "^3.0.0", "@sideway/pinpoint": "^2.0.0" } @@ -22360,9 +22328,9 @@ "dev": true }, "lint-staged": { - "version": "12.3.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.1.tgz", - "integrity": "sha512-Ocht/eT+4/siWOZDJpNUKcKX2UeWW/pDbohJ4gRsrafAjBi79JK8kiNVk2ciIVNKdw0Q4ABptl2nr6uQAlRImw==", + "version": "12.3.4", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.3.4.tgz", + "integrity": "sha512-yv/iK4WwZ7/v0GtVkNb3R82pdL9M+ScpIbJLJNyCXkJ1FGaXvRCOg/SeL59SZtPpqZhE7BD6kPKFLIDUhDx2/w==", "dev": true, "requires": { "cli-truncate": "^3.1.0", @@ -23149,23 +23117,51 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.4.4.tgz", - "integrity": "sha512-UJ+aNuFQaQaECu7AamlWOBLj2cJ6XSGU4zNiqXeZ7lZLe5VD0DoSPWFbWArXueo+6FZVbgHzpX9lUIaBIDLuYg==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.5.3.tgz", + "integrity": "sha512-YseMB8cs8U/KCaAGQoqYmfUuhhGW0a9p9XvWXrxVOkE3/IiISTLw4ALNt7JR5B2eYauFM+PQGSbXMDmVbR7Tfw==", "dev": true, "requires": { - "schema-utils": "^3.1.0" + "schema-utils": "^4.0.0" }, "dependencies": { + "ajv": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", + "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", "dev": true, "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" } } } @@ -24364,9 +24360,9 @@ } }, "printj": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", - "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.2.3.tgz", + "integrity": "sha512-sanczS6xOJOg7IKDvi4sGOUOe7c1tsEzjwlLFH/zgwx/uyImVM9/rgBkc8AfiQa/Vg54nRd8mkm9yI7WV/O+WA==" }, "process-nextick-args": { "version": "2.0.1", @@ -24552,12 +24548,6 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -24713,9 +24703,9 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", - "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", + "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", "dev": true, "requires": { "regenerate": "^1.4.2" @@ -24753,29 +24743,29 @@ "dev": true }, "regexpu-core": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", - "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", + "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", "dev": true, "requires": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^9.0.0", - "regjsgen": "^0.5.2", - "regjsparser": "^0.7.0", + "regenerate-unicode-properties": "^10.0.1", + "regjsgen": "^0.6.0", + "regjsparser": "^0.8.2", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.0.0" } }, "regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", + "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", "dev": true }, "regjsparser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", - "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", + "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -24933,9 +24923,9 @@ "dev": true }, "sass": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.48.0.tgz", - "integrity": "sha512-hQi5g4DcfjcipotoHZ80l7GNJHGqQS5LwMBjVYB/TaT0vcSSpbgM8Ad7cgfsB2M0MinbkEQQPO9+sjjSiwxqmw==", + "version": "1.49.7", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz", + "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", @@ -24944,9 +24934,9 @@ } }, "sass-loader": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.4.0.tgz", - "integrity": "sha512-7xN+8khDIzym1oL9XyS6zP6Ges+Bo2B2xbPrjdMHEYyV3AQYhd/wXeru++3ODHF0zMjYmVadblSKrPrjEkL8mg==", + "version": "12.6.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz", + "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==", "dev": true, "requires": { "klona": "^2.0.4", @@ -25933,24 +25923,6 @@ "punycode": "^2.1.0" } }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -26226,9 +26198,9 @@ "dev": true }, "vuetify": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.6.2.tgz", - "integrity": "sha512-nx3uZkO8MZNMshUEh1xKaQ1hQYepNwWFn3FVxKt+XBVf7ZFscd0GS/a3KZo4B3baXQmziCQAZKNIQF5IWeaIUw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.6.3.tgz", + "integrity": "sha512-Zfiz2DZnp1DvxqGaSCGqGjv4mPNAurJJ5Xwy7bzNzIySGLlRdlO8UH6aNWnSgfaAsLP3voxadSGDm6tKM8Ys7w==", "requires": {} }, "vuetify-loader": { @@ -26326,13 +26298,13 @@ "dev": true }, "webpack": { - "version": "5.67.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.67.0.tgz", - "integrity": "sha512-LjFbfMh89xBDpUMgA1W9Ur6Rn/gnr2Cq1jjHFPo4v6a79/ypznSYbAyPgGhwsxBtMIaEmDD1oJoA7BEYw/Fbrw==", + "version": "5.69.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.69.1.tgz", + "integrity": "sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A==", "dev": true, "requires": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", "@webassemblyjs/ast": "1.11.1", "@webassemblyjs/wasm-edit": "1.11.1", "@webassemblyjs/wasm-parser": "1.11.1", @@ -26800,14 +26772,14 @@ "requires": {} }, "xlsx": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.17.5.tgz", - "integrity": "sha512-lXNU0TuYsvElzvtI6O7WIVb9Zar1XYw7Xb3VAx2wn8N/n0whBYrCnHMxtFyIiUU1Wjf09WzmLALDfBO5PqTb1g==", + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.2.tgz", + "integrity": "sha512-BWLS+GO5yg5Hnro8mpbNkZq/a+dZ8689otFuHmb9wgCtiMpL+I9dpc+Sans6K9yYxTLEZ235Kr/JkmoTEMunzQ==", "requires": { - "adler-32": "~1.2.0", - "cfb": "^1.1.4", + "adler-32": "~1.3.0", + "cfb": "~1.2.1", "codepage": "~1.15.0", - "crc-32": "~1.2.0", + "crc-32": "~1.2.1", "ssf": "~0.11.2", "wmf": "~1.0.1", "word": "~0.3.0" diff --git a/iris-client-fe/package.json b/iris-client-fe/package.json index a4932a80a..3edcc4c2a 100644 --- a/iris-client-fe/package.json +++ b/iris-client-fe/package.json @@ -1,6 +1,6 @@ { "name": "iris-client-frontend", - "version": "1.3.1-POST-RELEASE", + "version": "1.4.0-rc.3-POST-RELEASE", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -15,54 +15,54 @@ "convert-licenses": "(csv2md licenses-prod.csv > licenses-prod.md || true) && csv2md licenses-dev.csv > licenses-dev.md" }, "dependencies": { - "@fontsource/roboto": "^4.5.1", + "@fontsource/roboto": "^4.5.3", "@mdi/font": "^6.5.95", "@types/lodash": "^4.14.178", - "axios": "^0.25.0", - "chart.js": "^3.7.0", - "core-js": "^3.20.3", + "axios": "^0.26.0", + "chart.js": "^3.7.1", + "core-js": "^3.21.1", "dayjs": "^1.10.7", "lodash": "^4.17.21", "vue": "^2.6.14", "vue-class-component": "^7.2.6", "vue-property-decorator": "^9.1.2", "vue-router": "^3.5.3", - "vuetify": "^2.6.2", + "vuetify": "^2.6.3", "vuex": "^3.6.2", "vuex-persistedstate": "^4.1.0", - "xlsx": "^0.17.5" + "xlsx": "^0.18.2" }, "devDependencies": { "@rushstack/eslint-patch": "^1.1.0", - "@vue/cli-plugin-babel": "~5.0.0-rc.2", - "@vue/cli-plugin-e2e-cypress": "~5.0.0-rc.2", - "@vue/cli-plugin-eslint": "~5.0.0-rc.2", - "@vue/cli-plugin-router": "~5.0.0-rc.2", - "@vue/cli-plugin-typescript": "~5.0.0-rc.2", - "@vue/cli-plugin-vuex": "~5.0.0-rc.2", - "@vue/cli-service": "~5.0.0-rc.2", + "@vue/cli-plugin-babel": "~5.0.1", + "@vue/cli-plugin-e2e-cypress": "~5.0.1", + "@vue/cli-plugin-eslint": "~5.0.1", + "@vue/cli-plugin-router": "~5.0.1", + "@vue/cli-plugin-typescript": "~5.0.1", + "@vue/cli-plugin-vuex": "~5.0.1", + "@vue/cli-service": "~5.0.1", "@vue/eslint-config-typescript": "^10.0.0", "@vue/test-utils": "^1.3.0", "compression-webpack-plugin": "^9.2.0", "csv2md": "^1.1.0", - "cypress": "^9.3.1", + "cypress": "^9.5.0", "cypress-fail-fast": "^3.3.0", - "eslint": "^8.7.0", + "eslint": "^8.9.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", - "eslint-plugin-vue": "^8.3.0", + "eslint-plugin-vue": "^8.4.1", "husky": "^7.0.4", "license-checker": "^25.0.1", - "lint-staged": "^12.3.1", + "lint-staged": "^12.3.4", "miragejs": "^0.1.43", "prettier": "^2.5.1", - "sass": "~1.48.0", - "sass-loader": "^12.4.0", + "sass": "~1.49.7", + "sass-loader": "^12.6.0", "typescript": "~4.5.5", "vue-cli-plugin-vuetify": "~2.4.5", "vue-template-compiler": "^2.6.14", "vuetify-loader": "^1.7.3", - "webpack": "^5.67.0" + "webpack": "^5.69.1" }, "gitHooks": { "pre-commit": "lint-staged" diff --git a/iris-client-fe/src/App.vue b/iris-client-fe/src/App.vue index 9233e9e53..b5a8fa622 100644 --- a/iris-client-fe/src/App.vue +++ b/iris-client-fe/src/App.vue @@ -3,26 +3,33 @@