From 864c08638ca5e84cb94525dc393a77dadc23fc01 Mon Sep 17 00:00:00 2001 From: Thiago Lugli Date: Thu, 24 Oct 2024 12:18:27 -0300 Subject: [PATCH 01/13] kie-issues#1560: Migrate Tasks Console pages to the Management Console and remove the Task Console (#2700) --- .../docker-compose/README.md | 4 +- .../docker-compose/docker-compose.yml | 25 +- .../docker-compose/startServices.sh | 5 +- .../env/index.js | 9 - .../install.js | 5 - .../package.json | 1 - packages/kogito-task-console/Containerfile | 51 - packages/kogito-task-console/README.md | 138 -- packages/kogito-task-console/entrypoint.sh | 27 - packages/kogito-task-console/env/index.js | 59 - packages/kogito-task-console/package.json | 38 - .../README.md | 89 +- .../install.js | 5 +- .../package.json | 3 +- .../src/Chart.lock | 7 +- .../src/Chart.yaml | 3 - .../src/README.md | 76 +- .../src/charts/task-console/Chart.yaml | 6 - .../src/charts/task-console/README.md | 46 - .../task-console/templates/_helpers.tpl | 40 - .../templates/deployment.yaml.helm | 112 - .../task-console/templates/hpa.yaml.helm | 28 - .../task-console/templates/ingress.yaml.helm | 61 - .../task-console/templates/route.yaml.helm | 25 - .../task-console/templates/service.yaml.helm | 18 - .../templates/serviceaccount.yaml.helm | 12 - .../tests/test-connection.yaml.helm | 15 - .../src/charts/task-console/values.yaml | 118 - .../src/templates/NOTES.txt | 46 - .../src/values-kubernetes.yaml | 5 - .../src/values-minikube-nginx.yaml | 5 - .../src/values-openshift.yaml | 6 - .../README.md | 35 + .../docs/taskconsole.png | Bin .../docs/taskdetails.png} | Bin .../docs/taskfilters.png} | Bin .../docs/taskforms.png} | Bin .../docs/taskstates.png} | Bin .../package.json | 2 + .../resources/form-displayer.html | 0 .../ManagementConsole/ManagementConsole.tsx | 16 +- .../ManagementConsoleNav.tsx | 13 +- .../ManagementConsoleRoutes.tsx | 12 +- .../JobsContainer.tsx} | 4 +- .../TaskFormContainer/TaskFormContainer.tsx | 4 +- .../TasksContainer/TasksContainer.tsx} | 2 +- .../JobsPage.tsx} | 13 +- .../pages/TaskDetailsPage/TaskDetailsPage.tsx | 34 +- .../FormNotification/FormNotification.tsx | 0 .../components/pages/TasksPage/TasksPage.tsx} | 20 +- .../src/components/pages/index.ts | 4 +- .../src/components/styles.css | 8 + .../src/resources/form-displayer.ts | 2 +- .../webpack.config.js | 1 + .../src/TaskForms/TaskFormGatewayApi.ts | 42 +- .../src/TaskInbox/TaskInboxGatewayApi.ts | 2 +- .../src/TaskInbox/TaskInboxQueries.ts | 24 +- .../src/utils/QueryUtils.ts | 7 +- .../README.md | 109 - .../build/defaultEnvJson.js | 40 - .../dev/config/kogito-realm.json | 1996 ----------------- .../dev/server/MockData/controllers.js | 127 -- .../dev/server/MockData/forms/ApplyForVisa.js | 98 - .../server/MockData/forms/ConfirmTravel.js | 84 - .../MockData/forms/ConfirmTravelDraft7.js | 92 - .../dev/server/MockData/forms/EmptyForm.js | 23 - .../dev/server/MockData/graphql.js | 728 ------ .../dev/server/MockData/rest.js | 49 - .../dev/server/MockData/types.js | 637 ------ .../dev/server/app.js | 23 - .../dev/server/config/index.js | 25 - .../dev/server/server.js | 196 -- .../docs/testusersystem-add-user.png | Bin 150582 -> 0 bytes .../docs/testusersystem-menu-add.png | Bin 116452 -> 0 bytes .../docs/testusersystem-menu.png | Bin 116466 -> 0 bytes .../env/index.js | 51 - .../package.json | 101 - .../console/TaskConsole/TaskConsole.tsx | 66 - .../console/TaskConsoleNav/TaskConsoleNav.tsx | 42 - .../TaskConsoleRoutes/TaskConsoleRoutes.tsx | 33 - .../src/components/console/index.ts | 21 - .../src/components/pages/index.ts | 20 - .../src/components/styles.css | 25 - .../TaskConsoleContextsProvider.tsx | 37 - .../src/declare.d.ts | 27 - .../src/env/Env.ts | 36 - .../src/env/EnvConstants.ts | 22 - .../src/env/EnvJson.ts | 29 - .../src/favicon.ico | Bin 1371 -> 0 bytes .../src/index.html | 33 - .../src/index.tsx | 107 - .../src/static/env.json | 1 - .../src/static/taskConsoleLogo.svg | 153 -- .../tsconfig.json | 12 - .../webpack.config.js | 140 -- pnpm-lock.yaml | 259 +-- repo/graph.dot | 10 - repo/graph.json | 44 - 98 files changed, 258 insertions(+), 6571 deletions(-) delete mode 100644 packages/kogito-task-console/Containerfile delete mode 100644 packages/kogito-task-console/README.md delete mode 100644 packages/kogito-task-console/entrypoint.sh delete mode 100644 packages/kogito-task-console/env/index.js delete mode 100644 packages/kogito-task-console/package.json delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm delete mode 100644 packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/docs/taskconsole.png (100%) rename packages/{runtime-tools-task-console-webapp/docs/details.png => runtime-tools-management-console-webapp/docs/taskdetails.png} (100%) rename packages/{runtime-tools-task-console-webapp/docs/filters.png => runtime-tools-management-console-webapp/docs/taskfilters.png} (100%) rename packages/{runtime-tools-task-console-webapp/docs/forms.png => runtime-tools-management-console-webapp/docs/taskforms.png} (100%) rename packages/{runtime-tools-task-console-webapp/docs/states.png => runtime-tools-management-console-webapp/docs/taskstates.png} (100%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/resources/form-displayer.html (100%) rename packages/runtime-tools-management-console-webapp/src/components/containers/{JobsManagementContainer/JobsManagementContainer.tsx => JobsContainer/JobsContainer.tsx} (93%) rename packages/{runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components => runtime-tools-management-console-webapp/src/components/containers}/TaskFormContainer/TaskFormContainer.tsx (95%) rename packages/{runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx => runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx} (96%) rename packages/runtime-tools-management-console-webapp/src/components/pages/{JobsManagementPage/JobsManagementPage.tsx => JobsPage/JobsPage.tsx} (76%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx (88%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/src/components/pages/TaskDetailsPage/components/FormNotification/FormNotification.tsx (100%) rename packages/{runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx => runtime-tools-management-console-webapp/src/components/pages/TasksPage/TasksPage.tsx} (75%) rename packages/{runtime-tools-task-console-webapp => runtime-tools-management-console-webapp}/src/resources/form-displayer.ts (94%) delete mode 100644 packages/runtime-tools-task-console-webapp/README.md delete mode 100644 packages/runtime-tools-task-console-webapp/build/defaultEnvJson.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/config/kogito-realm.json delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/controllers.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/ApplyForVisa.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/ConfirmTravel.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/ConfirmTravelDraft7.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/forms/EmptyForm.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/graphql.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/rest.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/MockData/types.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/app.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/config/index.js delete mode 100644 packages/runtime-tools-task-console-webapp/dev/server/server.js delete mode 100644 packages/runtime-tools-task-console-webapp/docs/testusersystem-add-user.png delete mode 100644 packages/runtime-tools-task-console-webapp/docs/testusersystem-menu-add.png delete mode 100644 packages/runtime-tools-task-console-webapp/docs/testusersystem-menu.png delete mode 100644 packages/runtime-tools-task-console-webapp/env/index.js delete mode 100644 packages/runtime-tools-task-console-webapp/package.json delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/TaskConsole/TaskConsole.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/TaskConsoleNav/TaskConsoleNav.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/TaskConsoleRoutes/TaskConsoleRoutes.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/console/index.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/pages/index.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/components/styles.css delete mode 100644 packages/runtime-tools-task-console-webapp/src/context/TaskConsoleContext/TaskConsoleContextsProvider.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/declare.d.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/env/Env.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/env/EnvConstants.ts delete mode 100644 packages/runtime-tools-task-console-webapp/src/env/EnvJson.ts delete mode 100755 packages/runtime-tools-task-console-webapp/src/favicon.ico delete mode 100755 packages/runtime-tools-task-console-webapp/src/index.html delete mode 100755 packages/runtime-tools-task-console-webapp/src/index.tsx delete mode 100644 packages/runtime-tools-task-console-webapp/src/static/env.json delete mode 100644 packages/runtime-tools-task-console-webapp/src/static/taskConsoleLogo.svg delete mode 100644 packages/runtime-tools-task-console-webapp/tsconfig.json delete mode 100644 packages/runtime-tools-task-console-webapp/webpack.config.js diff --git a/examples/jbpm-compact-architecture-example/docker-compose/README.md b/examples/jbpm-compact-architecture-example/docker-compose/README.md index efc66a2e671..62c8d80dd1a 100644 --- a/examples/jbpm-compact-architecture-example/docker-compose/README.md +++ b/examples/jbpm-compact-architecture-example/docker-compose/README.md @@ -6,14 +6,13 @@ To allow a quick setup of all services required to run this demo, we provide a d - PgAdmin - Kogito Example Service (Only available if the example has been compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`) - Kogito Management Console -- Kogito Task Console - Keycloak The docker compose template provides three profiles to enable starting only the set of services you want to use. The profiles are: - **infra**: Starts only the minimal infrastructure to run the example (Postgresql, pgadmin, Kogito Data Index) - **example**: Starts the services in _infra_ profile and the Kogito Example Service. Requires the example to be compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`. -- **full** (default): includes all the above and also starts the **Management Console**, **Task Console** and a **Keycloak** to handle the consoles authentication. Requires the example to be compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`. +- **full** (default): includes all the above and also starts the **Management Console** and **Keycloak** to handle the console authentication. Requires the example to be compiled using the `container` mvn profile eg: `mvn clean package -Dcontainer`. > NOTE: In order to use it, please ensure you have Docker Compose installed on your machine, otherwise follow the instructions available > in [here](https://docs.docker.com/compose/install/). @@ -34,7 +33,6 @@ Once the services are started (depending on the profile), the following ports wi - PgAdmin: 8055 - Kogito Example Service: 8080 - Kogito Management Console: 8280 -- Kogito Task Console: 8380 - Keycloak: 8480 ## Stopping and removing volume data diff --git a/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml b/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml index 6e7484029c4..4490b4adaea 100644 --- a/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml +++ b/examples/jbpm-compact-architecture-example/docker-compose/docker-compose.yml @@ -97,27 +97,14 @@ services: depends_on: jbpm-compact-architecture-example-service: condition: service_started + # keycloak: + # condition: service_healthy volumes: - ./svg/:/home/kogito/data/svg/ environment: RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE: "DEV" RUNTIME_TOOLS_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8080/graphql - - task-console: - container_name: task-console - image: ${KOGITO_TASK_CONSOLE_IMAGE} - profiles: ["full"] - ports: - - 8380:8080 - depends_on: - jbpm-compact-architecture-example-service: - condition: service_started - keycloak: - condition: service_healthy - environment: - RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE: "PROD" - RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT: http://${DOCKER_GATEWAY_HOST:-host.docker.internal}:8080/graphql - KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration - KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth - KOGITO_CONSOLES_KEYCLOAK_REALM: kogito - KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: kogito-console-quarkus + # KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: http://localhost:8480/auth/realms/kogito/.well-known/openid-configuration + # KOGITO_CONSOLES_KEYCLOAK_URL: http://localhost:8480/auth + # KOGITO_CONSOLES_KEYCLOAK_REALM: kogito + # KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID: kogito-console-quarkus diff --git a/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh b/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh index e8a42f5b2ee..a24bd93e4e7 100755 --- a/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh +++ b/examples/jbpm-compact-architecture-example/docker-compose/startServices.sh @@ -6,8 +6,6 @@ echo "Script requires your Kogito Example to be compiled" PROJECT_VERSION=$(cd ../ && mvn help:evaluate -Dexpression=project.version -q -DforceStdout) KOGITO_MANAGEMENT_CONSOLE_IMAGE=$(cd ../ && mvn help:evaluate -Dexpression=kogito.management-console.image -q -DforceStdout) -KOGITO_TASK_CONSOLE_IMAGE=$(cd ../ && mvn help:evaluate -Dexpression=kogito.task-console.image -q -DforceStdout) - if [ -n "$1" ]; then if [[ ("$1" == "full") || ("$1" == "infra") || ("$1" == "example")]]; @@ -17,14 +15,13 @@ if [ -n "$1" ]; then echo "Unknown docker profile '$1'. The supported profiles are:" echo "* 'infra': Use this profile to start only the minimum infrastructure to run the example (postgresql, data-index & jobs-service)." echo "* 'example': Use this profile to start the example infrastructure and the kogito-example service. Requires the example to be compiled using the 'container' profile (-Pcontainer)" - echo "* 'full' (default): Starts full example setup, including infrastructure (database, data-index & jobs-service), the kogito-example-service container and the runtime consoles (management-console, task-console & keycloak). Requires the example to be compiled using the 'container' profile (-Pcontainer)" + echo "* 'full' (default): Starts full example setup, including infrastructure (database, data-index & jobs-service), the kogito-example-service container and the runtime consoles (management-console & keycloak). Requires the example to be compiled using the 'container' profile (-Pcontainer)" exit 1; fi fi echo "PROJECT_VERSION=${PROJECT_VERSION}" > ".env" echo "KOGITO_MANAGEMENT_CONSOLE_IMAGE=${KOGITO_MANAGEMENT_CONSOLE_IMAGE}" >> ".env" -echo "KOGITO_TASK_CONSOLE_IMAGE=${KOGITO_TASK_CONSOLE_IMAGE}" >> ".env" echo "COMPOSE_PROFILES='${PROFILE}'" >> ".env" if [ "$(uname)" == "Darwin" ]; then diff --git a/examples/jbpm-compact-architecture-example/env/index.js b/examples/jbpm-compact-architecture-example/env/index.js index a047ba465e4..16c5c38a4fe 100644 --- a/examples/jbpm-compact-architecture-example/env/index.js +++ b/examples/jbpm-compact-architecture-example/env/index.js @@ -23,26 +23,17 @@ const { env: { kogitoManagementConsole: kogitoManagementConsoleImageEnv }, } = require("@kie-tools/kogito-management-console/env"); -const { - env: { kogitoTaskConsole: kogitoTaskConsoleImageEnv }, -} = require("@kie-tools/kogito-task-console/env"); - module.exports = composeEnv([require("@kie-tools/root-env/env")], { vars: varsWithName({ JBPM_COMPACT_ARCHITECTURE_EXAMPLE__managementConsoleImage: { default: `${kogitoManagementConsoleImageEnv.registry}/${kogitoManagementConsoleImageEnv.account}/${kogitoManagementConsoleImageEnv.name}:${kogitoManagementConsoleImageEnv.buildTag}`, description: "The image for the Kogito Management Console.", }, - JBPM_COMPACT_ARCHITECTURE_EXAMPLE__taskConsoleImage: { - default: `${kogitoTaskConsoleImageEnv.registry}/${kogitoTaskConsoleImageEnv.account}/${kogitoTaskConsoleImageEnv.name}:${kogitoTaskConsoleImageEnv.buildTag}`, - description: "The image for the Kogito Task Console.", - }, }), get env() { return { jbpmCompactArchitectureExample: { kogitoManagementConsoleImage: getOrDefault(this.vars.JBPM_COMPACT_ARCHITECTURE_EXAMPLE__managementConsoleImage), - kogitoTaskConsoleImage: getOrDefault(this.vars.JBPM_COMPACT_ARCHITECTURE_EXAMPLE__taskConsoleImage), version: require("../package.json").version, }, }; diff --git a/examples/jbpm-compact-architecture-example/install.js b/examples/jbpm-compact-architecture-example/install.js index fea906ae027..bfd7bde0f2b 100644 --- a/examples/jbpm-compact-architecture-example/install.js +++ b/examples/jbpm-compact-architecture-example/install.js @@ -29,8 +29,3 @@ setPomProperty({ key: "kogito.management-console.image", value: env.jbpmCompactArchitectureExample.kogitoManagementConsoleImage, }); - -setPomProperty({ - key: "kogito.task-console.image", - value: env.jbpmCompactArchitectureExample.kogitoTaskConsoleImage, -}); diff --git a/examples/jbpm-compact-architecture-example/package.json b/examples/jbpm-compact-architecture-example/package.json index 0798fce2a16..ea517540de3 100644 --- a/examples/jbpm-compact-architecture-example/package.json +++ b/examples/jbpm-compact-architecture-example/package.json @@ -41,7 +41,6 @@ }, "devDependencies": { "@kie-tools/kogito-management-console": "workspace:*", - "@kie-tools/kogito-task-console": "workspace:*", "@kie-tools/root-env": "workspace:*", "run-script-os": "^1.1.6" }, diff --git a/packages/kogito-task-console/Containerfile b/packages/kogito-task-console/Containerfile deleted file mode 100644 index 6c8f1034d94..00000000000 --- a/packages/kogito-task-console/Containerfile +++ /dev/null @@ -1,51 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/ubi-minimal:9.4 - -ARG KOGITO_TASK_CONSOLE_PORT=8080 - -ENV RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE="PROD" - -COPY entrypoint.sh dist-dev/image-env-to-json-standalone dist-dev/EnvJson.schema.json /tmp/ - -RUN microdnf --disableplugin=subscription-manager -y install httpd \ - && microdnf --disableplugin=subscription-manager clean all \ - && echo "Mutex posixsem" >> /etc/httpd/conf/httpd.conf \ - && sed -i -e "/#ServerName www.example.com:80/aHeader set Content-Security-Policy \"frame-ancestors 'self';\"" /etc/httpd/conf/httpd.conf \ - && sed -i -e 's/Options Indexes FollowSymLinks/Options -Indexes +FollowSymLinks/' /etc/httpd/conf/httpd.conf \ - && sed -i "s/Listen 80/Listen ${KOGITO_TASK_CONSOLE_PORT}/g" /etc/httpd/conf/httpd.conf \ - && sed -i "s/#ServerName www.example.com:80/ServerName 127.0.0.1:${KOGITO_TASK_CONSOLE_PORT}/g" /etc/httpd/conf/httpd.conf \ - && sed -i '$ a ServerTokens Prod' /etc/httpd/conf/httpd.conf \ - && sed -i '$ a ServerSignature Off' /etc/httpd/conf/httpd.conf \ - && sed -i -e '//a RewriteEngine on\n RewriteCond %{REQUEST_FILENAME} -f [OR]\n RewriteCond %{REQUEST_FILENAME} -d\n RewriteRule ^ - [L]\n RewriteRule ^ index.html [L]' /etc/httpd/conf/httpd.conf \ - && chmod -R g=u /etc/httpd/conf \ - && mkdir /task-console \ - && mv -t /task-console /tmp/entrypoint.sh /tmp/image-env-to-json-standalone /tmp/EnvJson.schema.json \ - && chgrp -R 0 /var/log/httpd /var/run/httpd /var/www/html /task-console \ - && chmod -R g=u /var/log/httpd /var/run/httpd /var/www/html /task-console \ - && chmod +x /task-console/entrypoint.sh /task-console/image-env-to-json-standalone - -COPY dist-dev/runtime-tools-task-console-webapp /task-console/app - -RUN if [ -f /task-console/app/env.json ]; then chmod a+w /task-console/app/env.json; fi - -EXPOSE ${KOGITO_TASK_CONSOLE_PORT} - -USER 1000 - -ENTRYPOINT [ "/task-console/entrypoint.sh" ] diff --git a/packages/kogito-task-console/README.md b/packages/kogito-task-console/README.md deleted file mode 100644 index 23229fca149..00000000000 --- a/packages/kogito-task-console/README.md +++ /dev/null @@ -1,138 +0,0 @@ - - -# kogito-task-console - -This package contains the `Containerfile/Dockerfile` and scripts to build a container image for Task Console. It also generated a JSON Schema for the `env.json` file, enabling it to be validated. - -## Additional requirements - -- docker - -## Build - -- Enable the image to be built: - - ```bash - export KIE_TOOLS_BUILD__buildContainerImages=true - ``` - -- (Optional) The image name and tags can be customized by setting the following environment variables: - - ```bash - export KOGITO_TASK_CONSOLE__registry= - export KOGITO_TASK_CONSOLE__account= - export KOGITO_TASK_CONSOLE__name= - export KOGITO_TASK_CONSOLE__buildTag= - ``` - - > Default values can be found [here](./env/index.js). - -- After optionally setting up the environment variables, run the following in the root folder of the repository to build the package: - - ```bash - pnpm -F @kie-tools/kogito-task-console... build:prod - ``` - -- Then check if the image is correctly stored: - - ```bash - docker images - ``` - -## Run - -- Start up a clean container with: - - ```bash - docker run -t -p 8080:8080 -i --rm docker.io/apache/incubator-kie-kogito-task-console:main - ``` - - Task Console will be up at http://localhost:8080 - -## Customization - -1. Run a container with custom environment variables: - - [comment]: <> (//TODO: Use EnvJson.schema.json to generate this documentation somehow.. See https://github.com/kiegroup/kie-issues/issues/16) - - | Name | Description | Default | - | :---------------------------------------------------------: | :-----------------------------------------------------------: | :-------------------------------------------------------------------------------------: | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE` | Env Mode: "PROD" or "DEV". PROD enables Keycloak integration. | "PROD" | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_NAME` | Task Console app name. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_VERSION` | Task Console app version. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_STATES_LIST` | Pre-selected task states. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_ACTIVE_STATES_LIST` | Pre-selected task active states. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT` | The URL that points to the Data Index service. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK` | Disables Keycloak health-check. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_UPDATE_TOKEN_VALIDITY` | Update token validity in minutes. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL` | Keycloak health-check URL. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_REALM` | Keycloak realm name. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_URL` | Keycloak auth URL. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - | `KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID` | Keycloak Client ID. | See [ defaultEnvJson.js ](../runtime-tools-task-console-webapp/build/defaultEnvJson.js) | - - ### Examples - - 1. Using a different Data Index Service. - - ```bash - docker run -t -p 8080:8080 -e RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT= -i --rm docker.io/apache/incubator-kie-kogito-task-console:main - ``` - - _NOTE: Replace `docker` with `podman` if necessary._ - -2. Write a custom `Containerfile/Dockerfile` from the image: - - ```docker - FROM docker.io/apache/incubator-kie-kogito-task-console:main - - ENV RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT= - ``` - -3. Create the application from the image in OpenShift and set the deployment environment variable right from the OpenShift UI. - -## Custom Port - -The port used internally on the container can be changed: - -When building, set the `KOGITO_TASK_CONSOLE__port` environment variable to any port you want, and the Containerfile will be built using that port. - ---- - -Apache KIE (incubating) is an effort undergoing incubation at The Apache Software -Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is -required of all newly accepted projects until a further review indicates that -the infrastructure, communications, and decision making process have stabilized -in a manner consistent with other successful ASF projects. While incubation -status is not necessarily a reflection of the completeness or stability of the -code, it does indicate that the project has yet to be fully endorsed by the ASF. - -Some of the incubating project’s releases may not be fully compliant with ASF -policy. For example, releases may have incomplete or un-reviewed licensing -conditions. What follows is a list of known issues the project is currently -aware of (note that this list, by definition, is likely to be incomplete): - -- Hibernate, an LGPL project, is being used. Hibernate is in the process of - relicensing to ASL v2 -- Some files, particularly test files, and those not supporting comments, may - be missing the ASF Licensing Header - -If you are planning to incorporate this work into your product/project, please -be aware that you will need to conduct a thorough licensing review to determine -the overall implications of including this work. For the current status of this -project through the Apache Incubator visit: -https://incubator.apache.org/projects/kie.html diff --git a/packages/kogito-task-console/entrypoint.sh b/packages/kogito-task-console/entrypoint.sh deleted file mode 100644 index a68f59c1593..00000000000 --- a/packages/kogito-task-console/entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Copying the Task Console assets here is essential for when the container is running with the readOnlyRootFilesystem flag. -# But, just like any other directory modified during runtime, the /var/www/html must be a mounted volume in the container in this case. -cp -R /task-console/app/* /var/www/html - -/task-console/image-env-to-json-standalone --directory /var/www/html --json-schema /task-console/EnvJson.schema.json - -httpd -D FOREGROUND diff --git a/packages/kogito-task-console/env/index.js b/packages/kogito-task-console/env/index.js deleted file mode 100644 index 07cac3a780b..00000000000 --- a/packages/kogito-task-console/env/index.js +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env"); - -const rootEnv = require("@kie-tools/root-env/env"); - -module.exports = composeEnv([rootEnv], { - vars: varsWithName({ - KOGITO_TASK_CONSOLE__registry: { - default: "docker.io", - description: "E.g., `docker.io` or `quay.io`.", - }, - KOGITO_TASK_CONSOLE__account: { - default: "apache", - description: "E.g,. `apache` or `kie-tools-bot`", - }, - KOGITO_TASK_CONSOLE__name: { - default: "incubator-kie-kogito-task-console", - description: "Name of the image itself.", - }, - KOGITO_TASK_CONSOLE__buildTag: { - default: rootEnv.env.root.streamName, - description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0", - }, - KOGITO_TASK_CONSOLE__port: { - default: 8080, - description: "The internal container port.", - }, - }), - get env() { - return { - kogitoTaskConsole: { - registry: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__registry), - account: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__account), - name: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__name), - buildTag: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__buildTag), - port: getOrDefault(this.vars.KOGITO_TASK_CONSOLE__port), - version: require("../package.json").version, - }, - }; - }, -}); diff --git a/packages/kogito-task-console/package.json b/packages/kogito-task-console/package.json deleted file mode 100644 index 10273fd9fcf..00000000000 --- a/packages/kogito-task-console/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "private": true, - "name": "@kie-tools/kogito-task-console", - "version": "0.0.0", - "description": "", - "license": "Apache-2.0", - "homepage": "https://github.com/apache/incubator-kie-tools", - "repository": { - "type": "git", - "url": "https://github.com/apache/incubator-kie-tools.git" - }, - "bugs": { - "url": "https://github.com/apache/incubator-kie-tools/issues" - }, - "scripts": { - "build:dev": "pnpm cleanup && pnpm env-json:schema:generate && pnpm copy:assets && run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", - "build:prod": "pnpm cleanup && pnpm env-json:schema:generate && pnpm copy:assets && run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"", - "cleanup": "rimraf dist-dev && mkdir dist-dev", - "copy:assets": "pnpm copy:webapp-assets && pnpm copy:image-env-to-json", - "copy:image-env-to-json": "run-script-os", - "copy:image-env-to-json:linux:darwin": "cp ./node_modules/@kie-tools/image-env-to-json/dist/linux/image-env-to-json-standalone ./dist-dev/", - "copy:image-env-to-json:win32": "pnpm powershell \"Copy-Item ./node_modules/@kie-tools/image-env-to-json/dist/linux/image-env-to-json-standalone ./dist-dev/\"", - "copy:webapp-assets": "run-script-os", - "copy:webapp-assets:linux:darwin": "cp -R ./node_modules/@kie-tools/runtime-tools-task-console-webapp/dist/ ./dist-dev/runtime-tools-task-console-webapp", - "copy:webapp-assets:win32": "pnpm powershell \"Copy-Item -R ./node_modules/@kie-tools/runtime-tools-task-console-webapp/dist/ ./dist-dev/runtime-tools-task-console-webapp\"", - "env-json:schema:generate": "ts-json-schema-generator --tsconfig ./node_modules/@kie-tools/runtime-tools-task-console-webapp/tsconfig.json --path ./node_modules/@kie-tools/runtime-tools-task-console-webapp/src/env/EnvJson.ts --type EnvJson --id EnvJson --out ./dist-dev/EnvJson.schema.json", - "image:docker:build": "kie-tools--image-builder build -r \"$(build-env kogitoTaskConsole.registry)\" -a \"$(build-env kogitoTaskConsole.account)\" -n \"$(build-env kogitoTaskConsole.name)\" -t \"$(build-env kogitoTaskConsole.buildTag)\" --build-arg KOGITO_TASK_CONSOLE_PORT=\"$(build-env kogitoTaskConsole.port)\"" - }, - "devDependencies": { - "@kie-tools/image-builder": "workspace:*", - "@kie-tools/image-env-to-json": "workspace:*", - "@kie-tools/root-env": "workspace:*", - "@kie-tools/runtime-tools-task-console-webapp": "workspace:*", - "rimraf": "^3.0.2", - "run-script-os": "^1.1.6", - "ts-json-schema-generator": "^1.1.2" - } -} diff --git a/packages/runtime-tools-consoles-helm-chart/README.md b/packages/runtime-tools-consoles-helm-chart/README.md index 753c17c4152..f26136b9c6f 100644 --- a/packages/runtime-tools-consoles-helm-chart/README.md +++ b/packages/runtime-tools-consoles-helm-chart/README.md @@ -17,7 +17,7 @@ # runtime-tools-consoles-helm-chart -This chart can be used to deploy Task and Management consoles images on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. +This chart can be used to deploy the Management Console image on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. ## Additional requirements @@ -27,7 +27,6 @@ This chart can be used to deploy Task and Management consoles images on a [Kuber ## Components - Management Console -- Task Console ## Installing the Chart @@ -55,12 +54,6 @@ In order to get runtime-tools-consoles running you need to run these commands: export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") echo "Management Console URL: http://127.0.0.1:8081" kubectl --namespace default port-forward $POD_NAME 8081:$CONTAINER_PORT - -2. Run the following commands in a separate terminal to port-forward Task Console application: - export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/component=task-console,app.kubernetes.io/instance=runtime-tools-consoles" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Task Console URL: http://127.0.0.1:8080" - kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT ``` ### Minikube install @@ -86,7 +79,6 @@ Run the following commands: export MINIKUBE_IP=$(minikube ip) echo "\n# Minikube Runtime Tools Consoles Helm Chart hostnames" | sudo tee -a /etc/hosts echo "$MINIKUBE_IP management-console.local" | sudo tee -a /etc/hosts - echo "$MINIKUBE_IP task-console.local" | sudo tee -a /etc/hosts ``` ### Kubernetes install @@ -108,8 +100,6 @@ REVISION: 1 NOTES: 1. Management Console available at: http://management-console. -2. Task Console available at: - http://task-console. ``` ### OpenShift install @@ -139,8 +129,6 @@ REVISION: 1 NOTES: 1. Management Console available at: https://management-console. -2. Task Console available at: - https://task-console. ``` ## Installing a released version from the OCI registry: @@ -196,51 +184,36 @@ The following table lists the configurable parameters of the Runtime Tools Conso -| Key | Type | Default | Description | -| -------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | -| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | -| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | -| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | -| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | -| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | -| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | -| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | -| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | -| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | -| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | -| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | -| fullnameOverride | string | `""` | Overrides charts full name | -| nameOverride | string | `""` | Overrides charts name | -| management-console.appNameOverride | string | `""` | Overrides the deployed application name | -| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| management-console.enabled | bool | `true` | Enable or disable Management Console installation | -| management-console.fullnameOverride | string | `""` | Overrides charts full name | -| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| management-console.name | string | `"management-console"` | Component name | -| management-console.nameOverride | string | `""` | Overrides charts name | -| management-console.nodeSelector | object | `{}` | | -| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | -| task-console.appNameOverride | string | `""` | Overrides the deployed application name | -| task-console.appTaskActiveStatesListOverride | string | `""` | Overrides the Task Console active states list | -| task-console.appTaskStatesListOverride | string | `""` | Overrides the Task Console states list | -| task-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| task-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| task-console.enabled | bool | `true` | Enable or disable Task Console installation | -| task-console.fullnameOverride | string | `""` | Overrides charts full name | -| task-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-task-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| task-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| task-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"task-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| task-console.name | string | `"task-console"` | Component name | -| task-console.nameOverride | string | `""` | Overrides charts name | -| task-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"task-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| task-console.service | object | `{"nodePort":"","port":8080,"targetPort":8080,"type":"ClusterIP"}` | Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| task-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | +| Key | Type | Default | Description | +| ------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | +| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | +| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | +| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | +| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | +| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | +| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | +| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | +| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | +| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | +| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | +| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | +| fullnameOverride | string | `""` | Overrides charts full name | +| nameOverride | string | `""` | Overrides charts name | +| management-console.appNameOverride | string | `""` | Overrides the deployed application name | +| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | +| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | +| management-console.enabled | bool | `true` | Enable or disable Management Console installation | +| management-console.fullnameOverride | string | `""` | Overrides charts full name | +| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | +| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | +| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | +| management-console.name | string | `"management-console"` | Component name | +| management-console.nameOverride | string | `""` | Overrides charts name | +| management-console.nodeSelector | object | `{}` | | +| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | +| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | +| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | --- diff --git a/packages/runtime-tools-consoles-helm-chart/install.js b/packages/runtime-tools-consoles-helm-chart/install.js index f6772ba9f2b..2a4ef2108bd 100644 --- a/packages/runtime-tools-consoles-helm-chart/install.js +++ b/packages/runtime-tools-consoles-helm-chart/install.js @@ -23,7 +23,7 @@ const fs = require("fs"); // Set version for the Chart (and its dependencies) and Subcharts console.log("[runtime-tools-consoles-helm-chart install.js] Updating Chart.yaml files..."); -const chartFiles = ["src/Chart.yaml", "src/charts/task-console/Chart.yaml", "src/charts/management-console/Chart.yaml"]; +const chartFiles = ["src/Chart.yaml", "src/charts/management-console/Chart.yaml"]; chartFiles.forEach((file) => { const doc = yaml.parseDocument(fs.readFileSync(file, "utf8")); if (file == "src/Chart.yaml") { @@ -33,7 +33,6 @@ chartFiles.forEach((file) => { doc.setIn(["appVersion"], env.runtimeToolsConsolesHelmChart.tag); if (doc.getIn(["dependencies"])) { doc.setIn(["dependencies", "0", "version"], env.runtimeToolsConsolesHelmChart.tag); - doc.setIn(["dependencies", "1", "version"], env.runtimeToolsConsolesHelmChart.tag); } console.log(yaml.stringify(doc)); fs.writeFileSync(file, yaml.stringify(doc), "utf8"); @@ -41,7 +40,7 @@ chartFiles.forEach((file) => { // Set tags used for images console.log("[runtime-tools-consoles-helm-chart install.js] Updating values.yaml files..."); -const valuesFiles = ["src/charts/task-console/values.yaml", "src/charts/management-console/values.yaml"]; +const valuesFiles = ["src/charts/management-console/values.yaml"]; valuesFiles.forEach((file) => { const doc = yaml.parseDocument(fs.readFileSync(file, "utf8")); doc.setIn(["image", "tag"], env.root.streamName); diff --git a/packages/runtime-tools-consoles-helm-chart/package.json b/packages/runtime-tools-consoles-helm-chart/package.json index 6417a365bcb..69554b0ff3f 100644 --- a/packages/runtime-tools-consoles-helm-chart/package.json +++ b/packages/runtime-tools-consoles-helm-chart/package.json @@ -25,8 +25,7 @@ "update-readmes": "node scripts/update-readmes.js && pnpm format" }, "dependencies": { - "@kie-tools/kogito-management-console": "workspace:*", - "@kie-tools/kogito-task-console": "workspace:*" + "@kie-tools/kogito-management-console": "workspace:*" }, "devDependencies": { "@kie-tools/root-env": "workspace:*", diff --git a/packages/runtime-tools-consoles-helm-chart/src/Chart.lock b/packages/runtime-tools-consoles-helm-chart/src/Chart.lock index c2311558156..fd4d0ce91a7 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/Chart.lock +++ b/packages/runtime-tools-consoles-helm-chart/src/Chart.lock @@ -2,8 +2,5 @@ dependencies: - name: management-console repository: "" version: 0.0.0 -- name: task-console - repository: "" - version: 0.0.0 -digest: sha256:bd9701735749abd6ed320a0f90d3b9b6dae4ac27b5c7e3b5d72de1037016a3d3 -generated: "2024-08-09T11:12:50.052943-03:00" +digest: sha256:84cd8d19b35a87b2a5393ae1880b8c76be191f4c1839739cd6783454b02c503f +generated: "2024-10-23T12:57:15.741355-03:00" diff --git a/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml b/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml index 2c74756c5f1..442f09e499e 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/Chart.yaml @@ -8,6 +8,3 @@ dependencies: - name: management-console version: 0.0.0 condition: management-console.enabled - - name: task-console - version: 0.0.0 - condition: task-console.enabled diff --git a/packages/runtime-tools-consoles-helm-chart/src/README.md b/packages/runtime-tools-consoles-helm-chart/src/README.md index 835c5537dde..d48cf608cb0 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/README.md +++ b/packages/runtime-tools-consoles-helm-chart/src/README.md @@ -26,55 +26,39 @@ A Helm chart to deploy Runtime Tools Consoles on Kubernetes | Repository | Name | Version | | ---------- | ------------------ | ------- | | | management-console | 0.0.0 | -| | task-console | 0.0.0 | ## Values -| Key | Type | Default | Description | -| -------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | -| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | -| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | -| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | -| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | -| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | -| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | -| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | -| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | -| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | -| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | -| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | -| fullnameOverride | string | `""` | Overrides charts full name | -| nameOverride | string | `""` | Overrides charts name | -| management-console.appNameOverride | string | `""` | Overrides the deployed application name | -| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| management-console.enabled | bool | `true` | Enable or disable Management Console installation | -| management-console.fullnameOverride | string | `""` | Overrides charts full name | -| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| management-console.name | string | `"management-console"` | Component name | -| management-console.nameOverride | string | `""` | Overrides charts name | -| management-console.nodeSelector | object | `{}` | | -| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | -| task-console.appNameOverride | string | `""` | Overrides the deployed application name | -| task-console.appTaskActiveStatesListOverride | string | `""` | Overrides the Task Console active states list | -| task-console.appTaskStatesListOverride | string | `""` | Overrides the Task Console states list | -| task-console.appVersionOverride | string | `""` | Overrides the deployed application version | -| task-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| task-console.enabled | bool | `true` | Enable or disable Task Console installation | -| task-console.fullnameOverride | string | `""` | Overrides charts full name | -| task-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-task-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| task-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| task-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"task-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| task-console.name | string | `"task-console"` | Component name | -| task-console.nameOverride | string | `""` | Overrides charts name | -| task-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"task-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| task-console.service | object | `{"nodePort":"","port":8080,"targetPort":8080,"type":"ClusterIP"}` | Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| task-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | +| Key | Type | Default | Description | +| ------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| global.dataIndexUrl | string | `""` | Set the URL that points to the Data Index service | +| global.environment | string | `"DEV"` | If want to enable Keycloak integration set it to PROD, otherwise set it to DEV | +| global.ingressSource | string | `""` | Which ingress source is being used (none/"minikube"/"kubernetes"/"openshift") Obs.: For NOTES generation only | +| global.keycloakClientId | string | `""` | If using environment = PROD, set the KeyCloak client id | +| global.keycloakHealthCheck | bool | `false` | If using environment = PROD, enable or disable Keycloak health check | +| global.keycloakHealthCheckUrl | string | `""` | If using environment = PROD, set the KeyCloak health check url | +| global.keycloakRealm | string | `""` | If using environment = PROD, set the KeyCloak realm name | +| global.keycloakTokenValidity | string | `""` | If using environment = PROD, set the KeyCloak token validity | +| global.keycloakUrl | string | `""` | If using environment = PROD, set the KeyCloak auth url | +| global.kubernetesClusterDomain | string | `""` | If using Minikube or Kubernetes, set the cluster domain | +| global.kubernetesIngressClass | string | `""` | If using Minikube or Kubernetes, set the Ingress class (i.e: nginx) | +| global.openshiftRouteDomain | string | `""` | If using OpenShift Routes, set the Route domain | +| fullnameOverride | string | `""` | Overrides charts full name | +| nameOverride | string | `""` | Overrides charts name | +| management-console.appNameOverride | string | `""` | Overrides the deployed application name | +| management-console.appVersionOverride | string | `""` | Overrides the deployed application version | +| management-console.autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Management Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | +| management-console.enabled | bool | `true` | Enable or disable Management Console installation | +| management-console.fullnameOverride | string | `""` | Overrides charts full name | +| management-console.image | object | `{"account":"apache","name":"incubator-kie-kogito-management-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | +| management-console.imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | +| management-console.ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"management-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Management Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | +| management-console.name | string | `"management-console"` | Component name | +| management-console.nameOverride | string | `""` | Overrides charts name | +| management-console.nodeSelector | object | `{}` | | +| management-console.openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"management-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Management Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | +| management-console.service | object | `{"nodePort":"","port":8081,"targetPort":8080,"type":"ClusterIP"}` | Management Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | +| management-console.serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Management Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | --- diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml deleted file mode 100644 index ad9821ad989..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/Chart.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v2 -name: task-console -description: A Helm chart to deploy Runtime Tools Task Console on Kubernetes -type: application -version: 0.0.0 -appVersion: 0.0.0 diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md deleted file mode 100644 index d83d76cb985..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/README.md +++ /dev/null @@ -1,46 +0,0 @@ - - -# task-console - -![Version: 0.0.0](https://img.shields.io/badge/Version-0.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.0](https://img.shields.io/badge/AppVersion-0.0.0-informational?style=flat-square) - -A Helm chart to deploy Runtime Tools Task Console on Kubernetes - -## Values - -| Key | Type | Default | Description | -| ------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -| appNameOverride | string | `""` | Overrides the deployed application name | -| appTaskActiveStatesListOverride | string | `""` | Overrides the Task Console active states list | -| appTaskStatesListOverride | string | `""` | Overrides the Task Console states list | -| appVersionOverride | string | `""` | Overrides the deployed application version | -| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | -| enabled | bool | `true` | Enable or disable Task Console installation | -| fullnameOverride | string | `""` | Overrides charts full name | -| image | object | `{"account":"apache","name":"incubator-kie-kogito-task-console","pullPolicy":"IfNotPresent","registry":"docker.io","tag":"main"}` | Image source configuration for the Management Console image | -| imagePullSecrets | list | `[]` | Pull secrets used when pulling Management Console image | -| ingress | object | `{"annotations":{},"className":"{{ .Values.global.kubernetesIngressClass }}","enabled":false,"hosts":[{"host":"task-console.{{ .Values.global.kubernetesClusterDomain }}","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]}` | Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) | -| name | string | `"task-console"` | Component name | -| nameOverride | string | `""` | Overrides charts name | -| openshiftRoute | object | `{"annotations":{},"enabled":false,"host":"task-console.{{ .Values.global.openshiftRouteDomain }}","tls":{"insecureEdgeTerminationPolicy":"None","termination":"edge"}}` | Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) | -| service | object | `{"nodePort":"","port":8080,"targetPort":8080,"type":"ClusterIP"}` | Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) | -| serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) | - ---- - -Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl deleted file mode 100644 index fdede13cbb1..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/_helpers.tpl +++ /dev/null @@ -1,40 +0,0 @@ -{{/* -Create a fully qualified name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "taskConsole.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name .Values.name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} - -{{/* -These can be overriden by the base chart. -*/}} -{{- define "selectorLabels" -}} -{{- end -}} -{{- define "labels" -}} -{{- end -}} - -{{- define "taskConsole.selectorLabels" -}} -app.kubernetes.io/component: {{ .Values.name | quote }} -{{ include "selectorLabels" . }} -{{- end -}} - -{{- define "taskConsole.labels" -}} -{{ include "taskConsole.selectorLabels" . }} -{{ include "labels" . }} -{{- end -}} - -{{/* -Create the name of the service account to use for the task console component -*/}} -{{- define "taskConsole.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "taskConsole.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} \ No newline at end of file diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm deleted file mode 100644 index e14c0d7f7e0..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/deployment.yaml.helm +++ /dev/null @@ -1,112 +0,0 @@ -{{- $dataIndexUrl := .Values.global.dataIndexUrl | required ".Values.global.dataIndexUrl is required." -}} ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "taskConsole.fullname" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "taskConsole.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "taskConsole.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "taskConsole.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Values.name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.registry }}/{{ .Values.image.account }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - {{- with .Values.env }} - env: - {{- tpl (toYaml .) $ | nindent 12 }} - {{- end }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - env: - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE - value: {{ .Values.global.environment }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT - value: {{ $dataIndexUrl }} - {{- if .Values.appNameOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_NAME - value: {{ .Values.appNameOverride }} - {{- end }} - {{- if .Values.appVersionOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_VERSION - value: {{ .Values.appVersionOverride }} - {{- end }} - {{- if .Values.appTaskStatesListOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_STATES_LIST - value: {{ .Values.appTaskStatesListOverride }} - {{- end }} - {{- if .Values.appTaskActiveStatesListOverride }} - - name: RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_ACTIVE_STATES_LIST - value: {{ .Values.appTaskActiveStatesListOverride }} - {{- end }} - {{- if .Values.global.keycloakHealthCheck }} - - name: KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK - value: true - {{- end }} - {{- if .Values.global.keycloakTokenValidity }} - - name: KOGITO_CONSOLES_KEYCLOAK_UPDATE_TOKEN_VALIDITY - value: {{ .Values.global.keycloakTokenValidity }} - {{- end }} - {{- if .Values.global.keycloakHealthCheckUrl }} - - name: KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL - value: {{ .Values.global.keycloakHealthCheckUrl }} - {{- end }} - {{- if .Values.global.keycloakRealm }} - - name: KOGITO_CONSOLES_KEYCLOAK_REALM - value: {{ .Values.global.keycloakRealm }} - {{- end }} - {{- if .Values.global.keycloakUrl }} - - name: KOGITO_CONSOLES_KEYCLOAK_URL - value: {{ .Values.global.keycloakUrl }} - {{- end }} - {{- if .Values.global.keycloakClientId }} - - name: KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID - value: {{ .Values.global.keycloakClientId }} - {{- end }} - ports: - - name: http - containerPort: {{ .Values.service.targetPort }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm deleted file mode 100644 index c20d58f6716..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/hpa.yaml.helm +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "taskConsole.fullname" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "taskConsole.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm deleted file mode 100644 index 985d68395d1..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/ingress.yaml.helm +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "taskConsole.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ tpl .Values.ingress.className . | quote }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ tpl .host $ | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm deleted file mode 100644 index 359caa20f27..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/route.yaml.helm +++ /dev/null @@ -1,25 +0,0 @@ -{{- if and (.Capabilities.APIVersions.Has "route.openshift.io/v1/Route") (.Values.openshiftRoute.enabled) -}} -{{- $fullName := include "taskConsole.fullname" . -}} -{{- $svcPort := .Values.service.targetPort -}} -kind: Route -apiVersion: route.openshift.io/v1 -metadata: - name: {{ $fullName }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} - {{- with .Values.openshiftRoute.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - host: {{ tpl .Values.openshiftRoute.host . | quote }} - to: - name: {{ $fullName }} - kind: Service - port: - targetPort: {{ $svcPort }} - {{- with .Values.openshiftRoute.tls }} - tls: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm deleted file mode 100644 index 4ca1e450e18..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/service.yaml.helm +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "taskConsole.fullname" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetPort }} - protocol: TCP - name: http - {{- if (and (eq .Values.service.type "NodePort")) }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} - selector: - {{- include "taskConsole.selectorLabels" . | nindent 4 }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm deleted file mode 100644 index 527cc3cb033..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/templates/serviceaccount.yaml.helm +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "taskConsole.serviceAccountName" . }} - labels: - {{- include "taskConsole.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm deleted file mode 100644 index 9347d65d3f6..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/tests/test-connection.yaml.helm +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "task-console.fullname" . }}-test-connection" - labels: - {{- include "task-console.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "task-console.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never diff --git a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml b/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml deleted file mode 100644 index 431d6bfd3b3..00000000000 --- a/packages/runtime-tools-consoles-helm-chart/src/charts/task-console/values.yaml +++ /dev/null @@ -1,118 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Task Console application -# -- Enable or disable Task Console installation -enabled: true - -# -- Component name -name: task-console - -# -- Overrides the deployed application name -appNameOverride: "" - -# -- Overrides the deployed application version -appVersionOverride: "" - -# -- Overrides the Task Console states list -appTaskStatesListOverride: "" - -# -- Overrides the Task Console active states list -appTaskActiveStatesListOverride: "" - -# @ignored -replicaCount: 1 - -# -- Image source configuration for the Management Console image -image: - registry: docker.io - account: apache - name: incubator-kie-kogito-task-console - pullPolicy: IfNotPresent - tag: "main" # AUTO-GENERATED BY install.js. DO NOT CHANGE MANUALLY. - -# -- Pull secrets used when pulling Management Console image -imagePullSecrets: [] - -# -- Overrides charts name -nameOverride: "" -# -- Overrides charts full name -fullnameOverride: "" - -# -- Task Console ServiceAccount configuration (https://kubernetes.io/docs/concepts/security/service-accounts/) -serviceAccount: - create: true - annotations: {} - name: "" - -# @ignored -podAnnotations: {} - -# @ignored -podSecurityContext: {} - -# @ignored -securityContext: {} - -# -- Task Console Service configuration (https://kubernetes.io/docs/concepts/services-networking/service/) -service: - type: ClusterIP - port: 8080 - targetPort: 8080 - nodePort: "" - -# -- Task Console Ingress configuration (https://kubernetes.io/docs/concepts/services-networking/ingress/) -ingress: - enabled: false - className: "{{ .Values.global.kubernetesIngressClass }}" - annotations: {} - hosts: - - host: task-console.{{ .Values.global.kubernetesClusterDomain }} - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - -# -- Task Console OpenShift Route configuration (https://docs.openshift.com/container-platform/4.14/networking/routes/route-configuration.html) -openshiftRoute: - enabled: false - annotations: {} - host: task-console.{{ .Values.global.openshiftRouteDomain }} - tls: - termination: edge - insecureEdgeTerminationPolicy: None - -# @ignored -resources: {} - -# -- Task Console HorizontalPodAutoscaler configuration (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - -# @ignored -nodeSelector: {} - -# @ignored -tolerations: [] - -# @ignored -affinity: {} diff --git a/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt b/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt index 90aa9790ab6..55da498cc10 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt +++ b/packages/runtime-tools-consoles-helm-chart/src/templates/NOTES.txt @@ -29,33 +29,6 @@ In order to get {{ .Release.Name }} running you need to run these commands: {{- end }} {{- end }} -{{- if and (index .Values "task-console" "enabled") (index .Values "task-console" "ingress" "enabled") }} -2. Task Console available at: -{{- range $host := index .Values "task-console" "ingress" "hosts" }} - {{- range .paths }} - http{{ if index $.Values "task-console" "ingress" "tls" }}s{{ end }}://{{ tpl $host.host $ }}{{ .path }} - {{- end }} -{{- end }} -{{- else }} - -2. Run the following commands in a separate terminal to port-forward Task Console application: -{{- if contains "NodePort" ( index .Values "task-console" "service" "type" ) }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "taskConsole.fullname" ( index .Subcharts "task-console" ) }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" ( index .Values "task-console" "service" "type" ) }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "taskConsole.fullname" ( index .Subcharts "task-console" ) }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "taskConsole.fullname" ( index .Subcharts "task-console" ) }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ index .Values "task-console" "service" "port" }} -{{- else if contains "ClusterIP" ( index .Values "task-console" "service" "type" ) }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/component={{ index .Values "task-console" "name" }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Task Console URL: http://127.0.0.1:{{ index .Values "task-console" "service" "port" }}" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME {{ index .Values "task-console" "service" "port" }}:$CONTAINER_PORT -{{- end }} -{{- end }} - {{- else if eq .Values.global.ingressSource "minikube" }} You may need to add the above hostnames to your /etc/hosts file, mapping them to your minikube ip. @@ -70,13 +43,6 @@ Run the following commands: {{- end }} {{- end }} {{- end }} -{{- if index .Values "task-console" "enabled" }} -{{- range $host := index .Values "task-console" "ingress" "hosts" }} - {{- range .paths }} - echo "$MINIKUBE_IP {{ tpl $host.host $ }}" | sudo tee -a /etc/hosts - {{- end }} -{{- end }} -{{- end }} {{- else if eq .Values.global.ingressSource "openshift" }} @@ -84,10 +50,6 @@ Run the following commands: 1. Management Console available at: http{{ if index $.Values "management-console" "openshiftRoute" "tls" }}s{{ end }}://{{ tpl (index .Values "management-console" "openshiftRoute" "host") . }} {{- end }} -{{- if index .Values "task-console" "enabled" }} -2. Task Console available at: - http{{ if index $.Values "task-console" "openshiftRoute" "tls" }}s{{ end }}://{{ tpl (index .Values "task-console" "openshiftRoute" "host") . }} -{{- end }} {{- else }} {{- if and ( index .Values "management-console" "enabled" ) ( index .Values "management-console" "ingress" "enabled" ) }} @@ -98,13 +60,5 @@ Run the following commands: {{- end }} {{- end }} {{- end }} -{{- if and ( index .Values "task-console" "enabled" ) ( index .Values "task-console" "ingress" "enabled" ) }} -2. Task Console available at: -{{- range $host := index .Values "task-console" "ingress" "hosts" }} - {{- range .paths }} - http{{ if index $.Values "task-console" "ingress" "tls" }}s{{ end }}://{{ tpl $host.host $ }}{{ .path }} - {{- end }} -{{- end }} -{{- end }} {{- end }} diff --git a/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml b/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml index 1ee20785f24..d08ceb6dd66 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/values-kubernetes.yaml @@ -17,11 +17,6 @@ # under the License. # -# Task Console application -task-console: - ingress: - enabled: true - # Management Console application management-console: ingress: diff --git a/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml b/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml index a040808a5a3..07af76f1645 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/values-minikube-nginx.yaml @@ -17,11 +17,6 @@ # under the License. # -# Task Console application -task-console: - ingress: - enabled: true - # Management Console application management-console: ingress: diff --git a/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml b/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml index 7146a9fee1c..9470e232095 100644 --- a/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml +++ b/packages/runtime-tools-consoles-helm-chart/src/values-openshift.yaml @@ -17,12 +17,6 @@ # under the License. # -# Task Console application -task-console: - openshiftRoute: - enabled: true - host: task-console.{{ .Values.global.openshiftRouteDomain }} - # Management Console application management-console: openshiftRoute: diff --git a/packages/runtime-tools-management-console-webapp/README.md b/packages/runtime-tools-management-console-webapp/README.md index 6210e53c8d1..4083d328dfe 100644 --- a/packages/runtime-tools-management-console-webapp/README.md +++ b/packages/runtime-tools-management-console-webapp/README.md @@ -185,6 +185,41 @@ The milestones panel show the list of milestones present and their current state ![Milestones](./docs/milestones.png?raw=true "Milestones") +## Working with the Tasks panel + +The tasks panel shows a list of user tasks which are available for a process. Each column contains detailed information about the user task which are - _Name_, _Process_, _Priority_, _Status_, _Started_ and _Last update_. The columns are sortable. + +![Tasks](./docs/taskconsole.png?raw=true "Tasks") + +The task console consist of filters, which can be used to narrow down the search on a user task. There are two filters available + +- A filter based on the status(dropdown) +- A filter based on the task name(text search) + +![Filters](./docs/taskfilters.png?raw=true "Filters") + +The _Status_ filter can be dropped down to view the and select the states available + +![States](./docs/taskstates.png?raw=true "States") + +A _refresh_ button is available to refresh the list of user tasks + +A _Reset to default_ button is available to reset the filters to its initial state. + +The user task list also supports pagination. + +Clicking on the name of the user task will navigate to another screen, which consist of the auto generated forms. + +### Task details + +The task details page consist of an auto generated forms and buttons to perform corresponding action on the user tasks. + +![Forms](./docs/taskforms.png?raw=true "Forms") + +The task details page also contains a _View details_ button, to view more details about the task. + +![Details](./docs/taskdetails.png?raw=true "Details") + ## Enabling Keycloak security ### Starting and Configuring the Keycloak Server diff --git a/packages/runtime-tools-task-console-webapp/docs/taskconsole.png b/packages/runtime-tools-management-console-webapp/docs/taskconsole.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/taskconsole.png rename to packages/runtime-tools-management-console-webapp/docs/taskconsole.png diff --git a/packages/runtime-tools-task-console-webapp/docs/details.png b/packages/runtime-tools-management-console-webapp/docs/taskdetails.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/details.png rename to packages/runtime-tools-management-console-webapp/docs/taskdetails.png diff --git a/packages/runtime-tools-task-console-webapp/docs/filters.png b/packages/runtime-tools-management-console-webapp/docs/taskfilters.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/filters.png rename to packages/runtime-tools-management-console-webapp/docs/taskfilters.png diff --git a/packages/runtime-tools-task-console-webapp/docs/forms.png b/packages/runtime-tools-management-console-webapp/docs/taskforms.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/forms.png rename to packages/runtime-tools-management-console-webapp/docs/taskforms.png diff --git a/packages/runtime-tools-task-console-webapp/docs/states.png b/packages/runtime-tools-management-console-webapp/docs/taskstates.png similarity index 100% rename from packages/runtime-tools-task-console-webapp/docs/states.png rename to packages/runtime-tools-management-console-webapp/docs/taskstates.png diff --git a/packages/runtime-tools-management-console-webapp/package.json b/packages/runtime-tools-management-console-webapp/package.json index 6a568f18fb8..1e58f2cbd96 100644 --- a/packages/runtime-tools-management-console-webapp/package.json +++ b/packages/runtime-tools-management-console-webapp/package.json @@ -56,6 +56,8 @@ "@graphql-codegen/typescript": "^2.8.8", "@graphql-codegen/typescript-operations": "^2.5.13", "@graphql-codegen/typescript-react-apollo": "^3.3.7", + "@kie-tools-core/envelope": "workspace:*", + "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/webpack-base": "workspace:*", "@kie-tools/eslint": "workspace:*", "@kie-tools/root-env": "workspace:*", diff --git a/packages/runtime-tools-task-console-webapp/resources/form-displayer.html b/packages/runtime-tools-management-console-webapp/resources/form-displayer.html similarity index 100% rename from packages/runtime-tools-task-console-webapp/resources/form-displayer.html rename to packages/runtime-tools-management-console-webapp/resources/form-displayer.html diff --git a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx index d7dfcd4c2ef..dea6d49fa17 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsole/ManagementConsole.tsx @@ -31,6 +31,8 @@ import { PageLayout } from "@kie-tools/runtime-tools-components/dist/components/ import { ProcessListContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessList"; import { ProcessDetailsContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/ProcessDetails"; import { JobsManagementContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement"; +import { TaskInboxContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskInbox"; +import { TaskFormContextProvider } from "@kie-tools/runtime-tools-process-webapp-components/dist/TaskForms"; interface IOwnProps { apolloClient: ApolloClient; @@ -64,11 +66,15 @@ const ManagementConsole: React.FC = ({ apolloClient, userContext, chi - - - - - + + + + + + + + + diff --git a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx index 62c15c8972d..279d056c599 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleNav/ManagementConsoleNav.tsx @@ -34,9 +34,16 @@ const ManagementConsoleNav: React.FC = ({ pathname }) => { Process Instances - - - Jobs Management + + + Jobs + + + + + + + Tasks diff --git a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx index 4201fee73db..18be1aabe22 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/console/ManagementConsoleRoutes/ManagementConsoleRoutes.tsx @@ -18,7 +18,7 @@ */ import * as React from "react"; import { Redirect, Route, Switch } from "react-router-dom"; -import { JobsManagementPage, ProcessListPage, ProcessDetailsPage } from "../../pages"; +import { JobsPage, ProcessListPage, ProcessDetailsPage, TasksPage, TaskDetailsPage } from "../../pages"; import { PageNotFound } from "@kie-tools/runtime-tools-shared-webapp-components/dist/PageNotFound"; import { NoData } from "@kie-tools/runtime-tools-shared-webapp-components/dist/NoData"; @@ -27,17 +27,17 @@ const ManagementConsoleRoutes: React.FC = () => { } /> - + + + } /> } + render={(_props) => } /> ( - - )} + render={(_props) => } /> ); diff --git a/packages/runtime-tools-management-console-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx b/packages/runtime-tools-management-console-webapp/src/components/containers/JobsContainer/JobsContainer.tsx similarity index 93% rename from packages/runtime-tools-management-console-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx rename to packages/runtime-tools-management-console-webapp/src/components/containers/JobsContainer/JobsContainer.tsx index e4cdf71052d..4bc5e8611ad 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/containers/JobsManagementContainer/JobsManagementContainer.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/containers/JobsContainer/JobsContainer.tsx @@ -24,9 +24,9 @@ import { useJobsManagementGatewayApi, } from "@kie-tools/runtime-tools-process-webapp-components/dist/JobsManagement"; -const JobsManagementContainer: React.FC = () => { +const JobsContainer: React.FC = () => { const gatewayApi: JobsManagementGatewayApi = useJobsManagementGatewayApi(); return ; }; -export default JobsManagementContainer; +export default JobsContainer; diff --git a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components/TaskFormContainer/TaskFormContainer.tsx b/packages/runtime-tools-management-console-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx similarity index 95% rename from packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components/TaskFormContainer/TaskFormContainer.tsx rename to packages/runtime-tools-management-console-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx index 7899ec20456..8e74e503305 100644 --- a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/components/TaskFormContainer/TaskFormContainer.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/containers/TaskFormContainer/TaskFormContainer.tsx @@ -48,7 +48,7 @@ const TaskFormContainer: React.FC = ({ driver={{ doSubmit(phase?: string, payload?: any): Promise { return gatewayApi - .doSubmit(userTask, phase, payload) + .doSubmitAsAnonymous(userTask, phase, payload) .then((result) => onSubmitSuccess(phase)) .catch((error) => { const message = error.response ? error.response.data : error.message; @@ -56,7 +56,7 @@ const TaskFormContainer: React.FC = ({ }); }, getTaskFormSchema(): Promise> { - return gatewayApi.getTaskFormSchema(userTask); + return gatewayApi.getTaskFormSchemaAsAnonymous(userTask); }, getCustomForm(): Promise
{ return gatewayApi.getCustomForm(userTask); diff --git a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx b/packages/runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx similarity index 96% rename from packages/runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx rename to packages/runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx index 9f0f921d274..07daf8e161c 100644 --- a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskInboxPage/container/TaskInboxContainer/TaskInboxContainer.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/containers/TasksContainer/TasksContainer.tsx @@ -45,7 +45,7 @@ const TaskInboxContainer: React.FC = ({ ouiaId, ouiaSafe }) => { return ( = () => { +const JobsPage: React.FC = () => { useEffect(() => { - return ouiaPageTypeAndObjectId("jobs-management"); + return ouiaPageTypeAndObjectId("jobs"); }); return ( - - {/* */} + - + ); }; -export default JobsManagementPage; +export default JobsPage; diff --git a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx b/packages/runtime-tools-management-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx similarity index 88% rename from packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx rename to packages/runtime-tools-management-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx index f4921801abe..42765ff8469 100644 --- a/packages/runtime-tools-task-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx @@ -36,7 +36,7 @@ import { PageSection } from "@patternfly/react-core/dist/js/components/Page"; import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye"; import { Grid, GridItem } from "@patternfly/react-core/dist/js/layouts/Grid"; import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex"; -import TaskFormContainer from "./components/TaskFormContainer/TaskFormContainer"; +import TaskFormContainer from "../../containers/TaskFormContainer/TaskFormContainer"; import FormNotification, { Notification } from "./components/FormNotification/FormNotification"; import { TaskInboxGatewayApi, @@ -102,7 +102,7 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui message: submitMessage, details: notificationDetails, customAction: { - label: "Go to Task Inbox", + label: "Go to Tasks", onClick: () => { setNotification(null); goToInbox(); @@ -116,7 +116,7 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui const goToInbox = () => { taskInboxGatewayApi.clearOpenTask(); - props.history.push("/"); + props.history.push("/Tasks"); }; const onSubmitSuccess = (phase: string) => { @@ -136,9 +136,9 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui - - - + + + @@ -154,9 +154,9 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui - - - + + + @@ -229,7 +229,7 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui taskInboxGatewayApi.clearOpenTask(); }} > - Task Inbox + Tasks {userTask.referenceName} diff --git a/packages/runtime-tools-management-console-webapp/src/components/pages/TasksPage/TasksPage.tsx b/packages/runtime-tools-management-console-webapp/src/components/pages/TasksPage/TasksPage.tsx index 3555d1eedc1..8c5a04f836b 100644 --- a/packages/runtime-tools-management-console-webapp/src/components/pages/TasksPage/TasksPage.tsx +++ b/packages/runtime-tools-management-console-webapp/src/components/pages/TasksPage/TasksPage.tsx @@ -31,7 +31,7 @@ import { Card } from "@patternfly/react-core/dist/js/components/Card"; const TasksPage: React.FC = (ouiaId, ouiaSafe) => { useEffect(() => { - return ouiaPageTypeAndObjectId("task-inbox-page"); + return ouiaPageTypeAndObjectId("tasks-page"); }); return ( diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUINav/DevUINav.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUINav/DevUINav.tsx index 385becff1a7..11cd6cd707a 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUINav/DevUINav.tsx +++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUINav/DevUINav.tsx @@ -42,15 +42,15 @@ const DevUINav: React.FC = ({ pathname }) => { )} {(!availablePages || availablePages.includes("Jobs")) && ( - - + + Jobs )} {(!availablePages || availablePages.includes("Tasks")) && ( - - + + Tasks diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx index 672af3bbbc5..996749734a3 100755 --- a/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx +++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/DevUI/DevUIRoutes/DevUIRoutes.tsx @@ -35,9 +35,9 @@ interface IOwnProps { type DevUIRoute = { enabled: () => boolean; node: React.ReactNode }; -const defaultPath = "/JobsManagement"; +const defaultPath = "/Jobs"; -const defaultButton = "Go to jobs management"; +const defaultButton = "Go to Jobs"; const DevUIRoutes: React.FC = ({ navigate }) => { const context = useDevUIAppContext(); @@ -58,11 +58,11 @@ const DevUIRoutes: React.FC = ({ navigate }) => { }, { enabled: () => context.isProcessEnabled, - node: , + node: , }, { enabled: () => context.isProcessEnabled, - node: , + node: , }, { enabled: () => context.isProcessEnabled, diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx index b0e2e195e87..61e527ca871 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx +++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/containers/TaskInboxContainer/TaskInboxContainer.tsx @@ -54,7 +54,7 @@ const TaskInboxContainer: React.FC = ({ ouiaId, ouiaSafe }) => { return ( = ({ ouiaId, ouiaSafe }) => { return ( - + diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx index 04a2eb65a91..7be81daef6e 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx +++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskDetailsPage/TaskDetailsPage.tsx @@ -103,7 +103,7 @@ const TaskDetailsPage: React.FC & OUIAProps> = ({ oui details: notificationDetails, customActions: [ { - label: "Go to Task Inbox", + label: "Go to Tasks", onClick: () => { setNotification(null); goToInbox(); diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx index 3ee7a8a5c68..0aa9b2c3de1 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx +++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/TaskInboxPage.tsx @@ -35,7 +35,7 @@ const TaskInboxPage: React.FC = (ouiaId, ouiaSafe) => { const appContext = useDevUIAppContext(); const user: string = appContext.getCurrentUser().id; useEffect(() => { - return ouiaPageTypeAndObjectId("task-inbox-page"); + return ouiaPageTypeAndObjectId("tasks-page"); }); const renderTaskInbox = (): JSX.Element => { @@ -46,18 +46,16 @@ const TaskInboxPage: React.FC = (ouiaId, ouiaSafe) => { - + {user.length > 0 && } - + {renderTaskInbox()} diff --git a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx index 600e1ed8c40..24b37e96218 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx +++ b/packages/runtime-tools-process-dev-ui-webapp/src/components/pages/TaskInboxPage/components/TaskInboxSwitchUser.tsx @@ -71,7 +71,7 @@ const TaskInboxSwitchUser: React.FC = ({ user, ouiaId, ou isPlain dropdownItems={dropdownItems()} className="DevUI-switchUser-dropdown-styling" - {...componentOuiaProps(ouiaId, "task-inbox-switch-user", ouiaSafe)} + {...componentOuiaProps(ouiaId, "tasks-switch-user", ouiaSafe)} /> ); }; diff --git a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelope.tsx b/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelope.tsx index 0c32d7a585c..0fae898bd44 100644 --- a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelope.tsx +++ b/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelope.tsx @@ -28,7 +28,7 @@ import { JobsManagementEnvelopeApiImpl } from "./JobsManagementEnvelopeApiImpl"; /** * Function that starts an Envelope application. * @param args.config: This passes envelope div config - * @param args.container: The HTML element in which the Jobs Management View will render + * @param args.container: The HTML element in which the Jobs view will render * @param args.bus: The implementation of a `bus` that knows how to send messages to the Channel. * */ diff --git a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelopeContext.ts b/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelopeContext.ts index 19ddbe4b104..7db7a55936b 100644 --- a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelopeContext.ts +++ b/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/JobsManagementEnvelopeContext.ts @@ -16,9 +16,10 @@ * specific language governing permissions and limitations * under the License. */ + /** * This is a convenience class that the Envelope view can use. - * Since the Jobs Management View is very simple, it's empty. + * Since the Jobs View is very simple, it's empty. */ // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/components/JobsManagementTable/JobsManagementTable.tsx b/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/components/JobsManagementTable/JobsManagementTable.tsx index 3823eecaeb1..1219a0b8d70 100644 --- a/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/components/JobsManagementTable/JobsManagementTable.tsx +++ b/packages/runtime-tools-process-enveloped-components/src/jobsManagement/envelope/components/JobsManagementTable/JobsManagementTable.tsx @@ -354,7 +354,7 @@ const JobsManagementTable: React.FC = ({ actionResolver={checkNotEmpty() ? actionResolver : undefined} sortBy={sortBy} onSort={onSort} - aria-label="Jobs management Table" + aria-label="Jobs table" className="kogito-jobs-management__table" {...componentOuiaProps(ouiaId, "jobs-management-table", ouiaSafe)} > diff --git a/packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxChannelApi.ts b/packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxChannelApi.ts index 075ccc341fa..39ac71eec06 100644 --- a/packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxChannelApi.ts +++ b/packages/runtime-tools-process-enveloped-components/src/taskInbox/api/TaskInboxChannelApi.ts @@ -20,7 +20,7 @@ import { UserTaskInstance } from "@kie-tools/runtime-tools-process-gateway-api/d import { QueryFilter, SortBy, TaskInboxState } from "./TaskInboxEnvelopeApi"; /** - * Channel Api for Task Inbox + * Channel Api for Tasks */ export interface TaskInboxChannelApi { /** diff --git a/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInbox/TaskInbox.tsx b/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInbox/TaskInbox.tsx index a06c55cb4a5..fb8b849ebb1 100644 --- a/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInbox/TaskInbox.tsx +++ b/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInbox/TaskInbox.tsx @@ -45,7 +45,7 @@ export interface TaskInboxProps { const UserTaskLoadingComponent = ( - + ); @@ -212,7 +212,7 @@ const TaskInbox: React.FC = ({ }; return ( -
+
= ({ title="No status is selected" body="Try selecting at least one status to see results" onClick={() => doApplyFilter({ taskStates: activeStates, taskNames: [] })} - ouiaId="task-inbox-no-status" + ouiaId="tasks-no-status" /> ) : ( <> diff --git a/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInboxToolbar/TaskInboxToolbar.tsx b/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInboxToolbar/TaskInboxToolbar.tsx index 3a2a2008122..55cf641caa5 100644 --- a/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInboxToolbar/TaskInboxToolbar.tsx +++ b/packages/runtime-tools-process-enveloped-components/src/taskInbox/envelope/components/TaskInboxToolbar/TaskInboxToolbar.tsx @@ -214,12 +214,12 @@ const TaskInboxToolbar: React.FC = ({ return ( {toolbarItems} From 9a8d8c93f83ca0f5b972643b53691d2a7a2ed655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Jo=C3=A3o=20Motta?= Date: Tue, 29 Oct 2024 12:26:50 -0300 Subject: [PATCH 04/13] kie-issues#1498: Add "Generate form code for human interactions" command in the BPMN VS Code extension (#2660) --- packages/bpmn-vscode-extension/package.json | 11 +- .../src/extension/extension.ts | 7 + .../README.md | 10 +- .../src/theme.ts | 7 +- .../src/uniforms/renderForm.tsx | 2 +- .../README.md | 10 +- .../src/theme.ts | 7 +- .../src/uniforms/AutoForm.tsx | 5 +- .../src/uniforms/renderForm.tsx | 2 +- .../tests/AutoForm.test.tsx | 2 +- .../README.md | 64 +++++ .../docs/vscode-command-diagram.png | Bin 0 -> 73465 bytes .../env/index.js | 27 ++ .../package.json | 37 +++ .../src/generateFormCodeCommand.ts | 234 ++++++++++++++++++ .../tsconfig.json | 3 + .../src/generateFormCode.ts | 21 +- packages/form-code-generator/src/types.ts | 14 +- .../tests/__mocks__/partternfly.ts | 6 +- .../tests/generateFormCode.test.ts | 42 ++-- .../jbpm-form-code-generator-themes/README.md | 18 +- .../jbpmBootstrap4FormCodeGeneratorTheme.ts | 14 +- .../jbpmPatternflyFormCodeGeneratorTheme.ts | 14 +- ...zationUtil.ts => removeInvalidVarChars.ts} | 3 +- .../src/types.ts | 5 +- .../jbpmBootstrap4FormGeneratorTheme.test.ts | 28 +-- .../jbpmPatternflyFormGeneratorTheme.test.ts | 28 +-- .../package.json | 13 +- .../src/extension/extension.ts | 7 + pnpm-lock.yaml | 40 +++ repo/graph.dot | 6 +- repo/graph.json | 39 ++- 32 files changed, 592 insertions(+), 134 deletions(-) create mode 100644 packages/form-code-generator-vscode-command/README.md create mode 100644 packages/form-code-generator-vscode-command/docs/vscode-command-diagram.png create mode 100644 packages/form-code-generator-vscode-command/env/index.js create mode 100644 packages/form-code-generator-vscode-command/package.json create mode 100644 packages/form-code-generator-vscode-command/src/generateFormCodeCommand.ts create mode 100644 packages/form-code-generator-vscode-command/tsconfig.json rename packages/jbpm-form-code-generator-themes/src/{inputSanitizationUtil.ts => removeInvalidVarChars.ts} (87%) diff --git a/packages/bpmn-vscode-extension/package.json b/packages/bpmn-vscode-extension/package.json index 276a8cf74d4..12f1b6d6e90 100644 --- a/packages/bpmn-vscode-extension/package.json +++ b/packages/bpmn-vscode-extension/package.json @@ -30,6 +30,7 @@ "@kie-tools-core/i18n": "workspace:*", "@kie-tools-core/patternfly-base": "workspace:*", "@kie-tools-core/vscode-extension": "workspace:*", + "@kie-tools/form-code-generator-vscode-command": "workspace:*", "@kie-tools/kie-bc-editors": "workspace:*" }, "devDependencies": { @@ -65,11 +66,15 @@ "dark": "./static/svg-icon-dark.png", "light": "./static/svg-icon-light.png" }, - "title": "Get BPMN Editor Preview SVG" + "title": "BPMN Editor: Get preview SVG" }, { "command": "extension.kogito.silentlyGenerateSvgBpmn", - "title": "Generate SVG without any notification" + "title": "BPMN Editor: Generate SVG without any notification" + }, + { + "command": "extension.apache.kie.bpmnEditor.generateFormCode", + "title": "BPMN Editor: Generate form code for human interactions from jBPM project" } ], "configuration": { @@ -93,7 +98,7 @@ }, "customEditors": [ { - "displayName": "BPMN Editor", + "displayName": "Apache KIE BPMN Editor", "selector": [ { "filenamePattern": "*.{bpmn,bpmn2}" diff --git a/packages/bpmn-vscode-extension/src/extension/extension.ts b/packages/bpmn-vscode-extension/src/extension/extension.ts index 6be21138b73..6f6438483f6 100644 --- a/packages/bpmn-vscode-extension/src/extension/extension.ts +++ b/packages/bpmn-vscode-extension/src/extension/extension.ts @@ -23,6 +23,7 @@ import { I18n } from "@kie-tools-core/i18n/dist/core"; import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; +import { generateFormsCommand } from "@kie-tools/form-code-generator-vscode-command/dist/generateFormCodeCommand"; let backendProxy: VsCodeBackendProxy; @@ -49,6 +50,12 @@ export function activate(context: vscode.ExtensionContext) { backendProxy: backendProxy, }); + context.subscriptions.push( + vscode.commands.registerCommand("extension.apache.kie.bpmnEditor.generateFormCode", async (args: any) => + generateFormsCommand() + ) + ); + KogitoVsCode.VsCodeRecommendation.showExtendedServicesRecommendation(context); console.info("Extension is successfully setup."); diff --git a/packages/form-code-generator-bootstrap4-theme/README.md b/packages/form-code-generator-bootstrap4-theme/README.md index 46e7ba68974..1ab727ae04d 100644 --- a/packages/form-code-generator-bootstrap4-theme/README.md +++ b/packages/form-code-generator-bootstrap4-theme/README.md @@ -33,11 +33,11 @@ You can consume this package in two ways: ```ts { - id: string; // The form id - sanitizedId: string; // The form id, any # is replaced by _ - disabled?: boolean; // Enable/disable form (read only) - placeholder?: boolean; // Enable/disable placeholders - schema: Bridge; // A Uniforms Bridge instance + id: string; // The form id + idWithoutInvalidTsVarChars: string; // The form id, any # is replaced by _ + disabled?: boolean; // Enable/disable form (read only) + placeholder?: boolean; // Enable/disable placeholders + schema: Bridge; // A Uniforms Bridge instance } ``` diff --git a/packages/form-code-generator-bootstrap4-theme/src/theme.ts b/packages/form-code-generator-bootstrap4-theme/src/theme.ts index 6db8be721cc..a22fd0ae0d3 100644 --- a/packages/form-code-generator-bootstrap4-theme/src/theme.ts +++ b/packages/form-code-generator-bootstrap4-theme/src/theme.ts @@ -35,15 +35,14 @@ export const bootstrap4FormCodeGeneratorTheme: FormCodeGeneratorTheme { const form = renderForm({ id: formSchema.name, - sanitizedId: formSchema.name, schema: new JSONSchemaBridge(formSchema.schema, () => true), disabled: false, placeholder: true, }); return { - id: formSchema.name, - assetName: `${formSchema.name}.${BOOTSTRAP4_FILE_EXT}`, - type: BOOTSTRAP4_FILE_EXT, + name: formSchema.name, + fileName: `${formSchema.name}.${BOOTSTRAP4_FILE_EXT}`, + fileExt: BOOTSTRAP4_FILE_EXT, content: unescape(form), config: { schema: JSON.stringify(formSchema.schema), diff --git a/packages/form-code-generator-bootstrap4-theme/src/uniforms/renderForm.tsx b/packages/form-code-generator-bootstrap4-theme/src/uniforms/renderForm.tsx index 7a814c8bc37..8f63ae0c5f2 100644 --- a/packages/form-code-generator-bootstrap4-theme/src/uniforms/renderForm.tsx +++ b/packages/form-code-generator-bootstrap4-theme/src/uniforms/renderForm.tsx @@ -25,7 +25,7 @@ import unescape from "lodash/unescape"; interface Args { id: string; - sanitizedId: string; + idWithoutInvalidTsVarChars?: string; disabled?: boolean; placeholder?: boolean; schema: Bridge; diff --git a/packages/form-code-generator-patternfly-theme/README.md b/packages/form-code-generator-patternfly-theme/README.md index 068c7f80731..709cc3a2537 100644 --- a/packages/form-code-generator-patternfly-theme/README.md +++ b/packages/form-code-generator-patternfly-theme/README.md @@ -33,11 +33,11 @@ You can consume this package in two ways: ```ts { - id: string; // The form id - sanitizedId: string; // The form id, any # is replaced by _ - disabled?: boolean; // Enable/disable form (read only) - placeholder?: boolean; // Enable/disable placeholders - schema: Bridge; // A Uniforms Bridge instance + id: string; // The form id + idWithoutInvalidTsVarChars: string; // The form id, any # is replaced by _ + disabled?: boolean; // Enable/disable form (read only) + placeholder?: boolean; // Enable/disable placeholders + schema: Bridge; // A Uniforms Bridge instance } ``` diff --git a/packages/form-code-generator-patternfly-theme/src/theme.ts b/packages/form-code-generator-patternfly-theme/src/theme.ts index 470794ef479..0e511903056 100644 --- a/packages/form-code-generator-patternfly-theme/src/theme.ts +++ b/packages/form-code-generator-patternfly-theme/src/theme.ts @@ -31,15 +31,14 @@ export const patternflyFormCodeGeneratorTheme: FormCodeGeneratorTheme { const form = renderForm({ id: formSchema.name, - sanitizedId: formSchema.name, schema: new JSONSchemaBridge(formSchema.schema, () => true), disabled: false, placeholder: true, }); return { - id: formSchema.name, - assetName: `${formSchema.name}.${PATTERNFLY_FILE_EXT}`, - type: PATTERNFLY_FILE_EXT, + name: formSchema.name, + fileName: `${formSchema.name}.${PATTERNFLY_FILE_EXT}`, + fileExt: PATTERNFLY_FILE_EXT, content: unescape(form), config: { schema: JSON.stringify(formSchema.schema), diff --git a/packages/form-code-generator-patternfly-theme/src/uniforms/AutoForm.tsx b/packages/form-code-generator-patternfly-theme/src/uniforms/AutoForm.tsx index 11088b0a087..ffb59cc8fec 100644 --- a/packages/form-code-generator-patternfly-theme/src/uniforms/AutoForm.tsx +++ b/packages/form-code-generator-patternfly-theme/src/uniforms/AutoForm.tsx @@ -35,7 +35,7 @@ import { getStaticCodeBlock } from "./staticCode/staticCodeBlocks"; export type AutoFormProps = { id: string; - sanitizedId: string; + idWithoutInvalidTsVarChars?: string; disabled?: boolean; placeholder?: boolean; schema: Bridge; @@ -54,7 +54,8 @@ const AutoForm: React.FC = (props) => { staticCodeArray = union(staticCodeArray, input.requiredCode); }); - const formName = `Form${props.sanitizedId ? `${NS_SEPARATOR}${props.sanitizedId}` : ""}`; + const formId = props.idWithoutInvalidTsVarChars ?? props.id; + const formName = `Form${formId ? `${NS_SEPARATOR}${formId}` : ""}`; const hooks = inputs.map((input) => input.stateCode).join("\n"); const elements = inputs.map((input) => input.jsxCode).join("\n"); const staticCodeStr: string = staticCodeArray.map((id) => JSON.stringify(getStaticCodeBlock(id))).join("\n"); diff --git a/packages/form-code-generator-patternfly-theme/src/uniforms/renderForm.tsx b/packages/form-code-generator-patternfly-theme/src/uniforms/renderForm.tsx index 7a814c8bc37..8f63ae0c5f2 100644 --- a/packages/form-code-generator-patternfly-theme/src/uniforms/renderForm.tsx +++ b/packages/form-code-generator-patternfly-theme/src/uniforms/renderForm.tsx @@ -25,7 +25,7 @@ import unescape from "lodash/unescape"; interface Args { id: string; - sanitizedId: string; + idWithoutInvalidTsVarChars?: string; disabled?: boolean; placeholder?: boolean; schema: Bridge; diff --git a/packages/form-code-generator-patternfly-theme/tests/AutoForm.test.tsx b/packages/form-code-generator-patternfly-theme/tests/AutoForm.test.tsx index 263fef45ddc..bfcf22fc40f 100644 --- a/packages/form-code-generator-patternfly-theme/tests/AutoForm.test.tsx +++ b/packages/form-code-generator-patternfly-theme/tests/AutoForm.test.tsx @@ -76,7 +76,7 @@ const schema = { const props: AutoFormProps = { id: "HRInterview", - sanitizedId: "HRInterview", + idWithoutInvalidTsVarChars: "HRInterview", schema: createSchema(schema), disabled: false, placeholder: true, diff --git a/packages/form-code-generator-vscode-command/README.md b/packages/form-code-generator-vscode-command/README.md new file mode 100644 index 00000000000..39f84cb4bd9 --- /dev/null +++ b/packages/form-code-generator-vscode-command/README.md @@ -0,0 +1,64 @@ + + +## Form Code Generator VS Code command + +This package is a VS Code command for generating form code from jBPM projects. + +## How it works? + +The command provides a user-friendly interface for generating form code from jBPM projects. It interacts with the file system getting the jBPM JSON Schemas that are generated during compile time, and feeding them to the "form-code-generator" that will generate the form code using one of two themes: Bootstrap4 or Patternfly. + +## Usage + +The command name will change depending on the host extension, but it should be available in the command palette. After starting the command, the user will be prompted with a few questions, which can be represented using the following diagram: + +![VS Code command diagram](./docs/vscode-command-diagram.png?raw=true "VS Code command diagram") + +## Build + +In order to build the library you must run the following command in the root folder of the repository: + +```shell script +pnpm -F @kie-tools/form-code-generator-vscode-command... build:prod +``` + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/form-code-generator-vscode-command/docs/vscode-command-diagram.png b/packages/form-code-generator-vscode-command/docs/vscode-command-diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..ef42a5d8d2bc3c8824fd7ace6af3bd07ec355993 GIT binary patch literal 73465 zcmeEu2V7HG+BY(&*il48L5iV>(t8sGDWOXh1S2ItD2ap)(sZo!OA~2I5fKqVkS4@J zM?fi}RHYXI=^egvA(>%DXJ_}_+1c6s)|sCs=bn4+xljE+<>aQOy5g?whqjZEk?le% zoz@~FBS(^vQJ^WefRXf*+H&BZO%7U$vSg2I=?BTkH1|8opLMizwZPb-$yf#C)<3cG z^IG8?99acUv-0zsT)fC_jxn*so7g#UW6_Ra2wXR@L}Q5))Nt+?TU!%Wegz?JUT}#+ zAA>c=xj2B2>N?;rK3*^^APYW$3&MiyA67cbhP_0gs(7_hE_kbnrcfG`;5 zP*KuRQ)T6s1D|a%HfZpVBHGLb2j3!Rg~!=}5d}VeF>bK*+B3CHEKKm24NJg#bVlPH zFgWb`Yw!zli*WOatnc2z%)}PGKF+s3Vv56?qw(uQ;3fE31>{+IPk}|?{{`fT1OQ*K zCg9;~gwX^v;3D3RF<&1$Bdcw5ijNsvB+TOSY=6j~p!#FHLFd@4Mkjd3ULhcwFxV~%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eL$jAs@+6geyAXJTZGJx=nM54E1*!Q{)QMr{HVKwmsf2 zg!FJwN>q=gkArNkZh~4QHCgim4kLjXS;!)hlu%%;GSpp|x6@|uWX8p?9rb77*n%3z9y2GM>E zp#3B)PIEZ-15YFuJ?Htykf@O6HjgLJvdDB?s{E|`9305%Pq7MSb0al+kt_3K*lE|w z^ZFhO&*g9hdHQxA9y4(QNk&!)LCW>DXlQRcuzU)fY%T%n3Ok&*MFVs4G(>GibGq$R zyv@^XqQN6V4?83%>`b!nFL`*=#crbFJ9NIN`xq_~Z`++S_ha~J9Rwayp0}rBE$ZLp z7ks(wQ5T|{``|KO6{`E7iWbGo@$m8dsfGK+)aNv@)?Mdm8TZOse0p&vbif<SKIT3=^P!$ zyxe9Nn~)>YPk?&S;QRF=#md-gU#YtwJd%>1bZl{|vpFL2LkG+{1x3wk-KecUPP)VV zF+!=hHRl4Q&J7*5DO*v-{UKC_if{EFPwBFFW!Hp8+}v2j*hWDsjhblpzVJY5uR4`( zQJao8w;WL2d!5rvB)QN&GnW^gJ`7&o+3co{&Zu(z5Nq3Wk~>H=_l4!U9h!PWv5X`~ zl=2YLA>%VN50if#f=axVms>tX<$8CtMO#CF4TB_s$EKWJj?{-TgdE4(_1qm^$}tp% zPe-C0^URWkFwQ;}RfC}?++~BcbE1TyHd=l-8{1iIb!ZQ=LqCHYykz>!QMHQ*DOMGH zrd*9A*Rrw>AGu@9aOggFn!Bl}_($&pI_s1nPG2J#CP%Gx55`GBh`S^EojZ4{UfdDei#)3tGZgx?8thd%+Pb-wuiXA$QNhXa literal 0 HcmV?d00001 diff --git a/packages/form-code-generator-vscode-command/env/index.js b/packages/form-code-generator-vscode-command/env/index.js new file mode 100644 index 00000000000..61bc742bd66 --- /dev/null +++ b/packages/form-code-generator-vscode-command/env/index.js @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env"); + +module.exports = composeEnv([require("@kie-tools/root-env/env")], { + vars: varsWithName({}), + get env() { + return {}; + }, +}); diff --git a/packages/form-code-generator-vscode-command/package.json b/packages/form-code-generator-vscode-command/package.json new file mode 100644 index 00000000000..d3651ad6ffc --- /dev/null +++ b/packages/form-code-generator-vscode-command/package.json @@ -0,0 +1,37 @@ +{ + "name": "@kie-tools/form-code-generator-vscode-command", + "version": "0.0.0", + "description": "", + "license": "Apache-2.0", + "keywords": [], + "homepage": "https://github.com/apache/incubator-kie-tools", + "repository": { + "type": "git", + "url": "https://github.com/apache/incubator-kie-tools.git" + }, + "bugs": { + "url": "https://github.com/apache/incubator-kie-tools/issues" + }, + "files": [ + "dist" + ], + "scripts": { + "build:dev": "rimraf dist && tsc", + "build:prod": "pnpm lint && rimraf dist && tsc", + "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"" + }, + "dependencies": { + "@kie-tools/form-code-generator": "workspace:*", + "@kie-tools/form-code-generator-bootstrap4-theme": "workspace:*", + "@kie-tools/form-code-generator-patternfly-theme": "workspace:*", + "@kie-tools/jbpm-form-code-generator-themes": "workspace:*" + }, + "devDependencies": { + "@kie-tools/eslint": "workspace:*", + "@kie-tools/root-env": "workspace:*", + "@kie-tools/tsconfig": "workspace:*", + "@types/vscode": "1.67.0", + "rimraf": "^3.0.2", + "typescript": "^5.5.3" + } +} diff --git a/packages/form-code-generator-vscode-command/src/generateFormCodeCommand.ts b/packages/form-code-generator-vscode-command/src/generateFormCodeCommand.ts new file mode 100644 index 00000000000..6e09ac4c42d --- /dev/null +++ b/packages/form-code-generator-vscode-command/src/generateFormCodeCommand.ts @@ -0,0 +1,234 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import * as vscode from "vscode"; +import * as fs from "fs"; +import * as path from "path"; +import { generateFormCode } from "@kie-tools/form-code-generator/dist/generateFormCode"; +import { removeInvalidVarChars } from "@kie-tools/jbpm-form-code-generator-themes/dist/removeInvalidVarChars"; +import { jbpmBootstrap4FormCodeGeneratorTheme } from "@kie-tools/jbpm-form-code-generator-themes/dist/jbpmBootstrap4FormCodeGeneratorTheme"; +import { jbpmPatternflyFormCodeGeneratorTheme } from "@kie-tools/jbpm-form-code-generator-themes/dist/jbpmPatternflyFormCodeGeneratorTheme"; +import { FormSchema } from "@kie-tools/form-code-generator/dist/types"; +import { PATTERNFLY_FILE_EXT } from "@kie-tools/form-code-generator-patternfly-theme/dist/theme"; +import { BOOTSTRAP4_FILE_EXT } from "@kie-tools/form-code-generator-bootstrap4-theme/dist/theme"; + +const FORM_CODE_GENERATION_DEST_PATH = "src/main/resources/forms"; +const JSON_SCHEMA_PATH = "target/classes/META-INF/jsonSchema"; + +export async function generateFormsCommand() { + // Get workspace path as default value + const defaultPath = vscode.workspace.workspaceFolders ? vscode.workspace.workspaceFolders[0].uri.fsPath : undefined; + + // Select project path + const projectUri = await vscode.window.showOpenDialog({ + canSelectFiles: false, + canSelectFolders: true, + canSelectMany: false, + title: "Select Project Folder", + defaultUri: defaultPath ? vscode.Uri.file(defaultPath) : undefined, + }); + + // Check if a path was selected + if (projectUri === undefined || projectUri[0] === undefined) { + return; + } + + // Get project path + const projectPath = projectUri[0].fsPath; + + // Check if project has a target folder + if (fs.existsSync(`${projectPath}/target`) === false) { + vscode.window.showErrorMessage( + `Couldn't find project's "target" folder. Please, install the project before using the command.` + ); + return; + } + // Check if project has the JSON Schemas folder + if (fs.existsSync(`${projectPath}/${JSON_SCHEMA_PATH}`) === false) { + vscode.window.showErrorMessage( + `Couldn't find any JSON Schema, did you install your project ("mvn clean install") using the jbpm dependency?` + ); + return; + } + + // Select theme + const theme = await vscode.window.showQuickPick(["Bootstrap4", "Patternfly"], { + placeHolder: "Select the form theme", + }); + // Check if a theme was selected + if (theme === undefined) { + return; + } + + const formSchemas: FormSchema[] = await getFormSchemas(projectPath); + + const existingFiles: { fileName: string; ext: string }[] = []; + for (const { name: fileName } of formSchemas) { + // Check if form `tsx` or `html` file already exists + if ( + fs.existsSync( + `${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}/${removeInvalidVarChars(path.parse(fileName).name)}.${PATTERNFLY_FILE_EXT}` + ) + ) { + existingFiles.push({ fileName, ext: PATTERNFLY_FILE_EXT }); + } + if ( + fs.existsSync( + `${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}/${removeInvalidVarChars(path.parse(fileName).name)}.${BOOTSTRAP4_FILE_EXT}` + ) + ) { + existingFiles.push({ fileName, ext: BOOTSTRAP4_FILE_EXT }); + } + } + + if (existingFiles.length === 0) { + saveFormCode(projectPath, theme, formSchemas); + return; + } + + const shouldOverride = await vscode.window.showQuickPick(["Override", "Cancel"], { + placeHolder: "You already have custom forms in this project. Do you want to override them?", + }); + if (shouldOverride === "Override") { + // Remove previous files. + // In case the user has `tsx` files and are generating `html` files, the `tsx` files should be removed + existingFiles.forEach(({ fileName, ext }) => { + fs.rmSync( + `${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}/${removeInvalidVarChars(path.parse(fileName).name)}.${ext}` + ); + }); + saveFormCode(projectPath, theme, formSchemas); + } + return; +} + +async function getFormSchemas(projectPath: string): Promise { + const GENERATE_FOR_ALL_HUMAN_INTERACTIONS = "Generate form code for all human interactions"; + const GENERATE_FOR_SPECIFIC_HUMAN_INTERACTIONS = "Generate form code for specific human interactions"; + + const generationChoice = await vscode.window.showQuickPick( + [GENERATE_FOR_ALL_HUMAN_INTERACTIONS, GENERATE_FOR_SPECIFIC_HUMAN_INTERACTIONS], + { + placeHolder: "Select an option", + } + ); + + const jsonSchemaFilesName = fs.readdirSync(`${projectPath}/${JSON_SCHEMA_PATH}`); + if (generationChoice === GENERATE_FOR_SPECIFIC_HUMAN_INTERACTIONS) { + const selectedOptions = await vscode.window.showQuickPick( + jsonSchemaFilesName.map((jsonSchemaFile) => ({ + label: path.parse(jsonSchemaFile).name, + })), + { + canPickMany: true, + placeHolder: "Choose the human interactions", + } + ); + + if (selectedOptions === undefined || selectedOptions.length === 0) { + return []; + } + + return readAndParseJsonSchemas( + projectPath, + selectedOptions.reduce( + (jsonSchemaFilesName: string[], option) => + option.label ? [...jsonSchemaFilesName, `${option.label}.json`] : jsonSchemaFilesName, + [] + ) + ); + } + + if (generationChoice === GENERATE_FOR_ALL_HUMAN_INTERACTIONS) { + return readAndParseJsonSchemas(projectPath, jsonSchemaFilesName); + } + + return []; +} + +function readAndParseJsonSchemas(projectPath: string, jsonSchemaFilesName: string[]) { + const formSchemas: FormSchema[] = []; + const failedParsingFilesName: string[] = []; + for (const jsonSchemaFileName of jsonSchemaFilesName) { + try { + formSchemas.push({ + name: path.parse(jsonSchemaFileName).name, + schema: JSON.parse(fs.readFileSync(`${projectPath}/${JSON_SCHEMA_PATH}/${jsonSchemaFileName}`, "utf-8")), + }); + } catch (error) { + console.error(`Error while parsing ${jsonSchemaFileName}:`, error); + failedParsingFilesName.push(jsonSchemaFileName); + } + } + if (failedParsingFilesName.length > 0) { + vscode.window.showErrorMessage( + "JSON Schema parsing failed for the following files:", + failedParsingFilesName.join(", ") + ); + } + return formSchemas; +} + +function saveFormCode(projectPath: string, theme: string, formSchemas: FormSchema[]) { + const formCode = + theme.toLowerCase() === "bootstrap4" + ? generateFormCode({ formCodeGeneratorTheme: jbpmBootstrap4FormCodeGeneratorTheme, formSchemas }) + : theme.toLowerCase() === "patternfly" + ? generateFormCode({ formCodeGeneratorTheme: jbpmPatternflyFormCodeGeneratorTheme, formSchemas }) + : undefined; + + if (formCode === undefined) { + vscode.window.showErrorMessage(`The "${theme}" theme isn't available.`); + return undefined; + } + + // Save form assets + const formAssets = formCode.reduce((acc, { formAsset }) => (formAsset !== undefined ? [...acc, formAsset] : acc), []); + if (formAssets.length > 0) { + // Create FORMS_PATH directory if doesn't exist + if (fs.existsSync(`${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}`) === false) { + fs.mkdirSync(`${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}`); + } + // Create form code and config files + formAssets.forEach((formAsset) => { + fs.writeFileSync( + `${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}/${formAsset.fileNameWithoutInvalidVarChars}`, + formAsset.content + ); + fs.writeFileSync( + `${projectPath}/${FORM_CODE_GENERATION_DEST_PATH}/${formAsset.nameWithoutInvalidTsVarChars}.config`, + JSON.stringify(formAsset.config, null, 2) + ); + }); + vscode.window.showInformationMessage( + `Success generating form code for the following files: ${formAssets.map((formAsset) => formAsset.fileName).join(", ")}` + ); + } + + // Show errors + const formErrors = formCode.reduce( + (acc, { formError }) => (formError?.error !== undefined ? [...acc, formError] : acc), + [] + ); + if (formErrors.length > 0) { + vscode.window.showErrorMessage( + `Error generating the form code for the following files: ${formErrors.map((formError) => formError.fileName).join(", ")}` + ); + } +} diff --git a/packages/form-code-generator-vscode-command/tsconfig.json b/packages/form-code-generator-vscode-command/tsconfig.json new file mode 100644 index 00000000000..8cb7f1eed0e --- /dev/null +++ b/packages/form-code-generator-vscode-command/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@kie-tools/tsconfig/tsconfig.esm.json" +} diff --git a/packages/form-code-generator/src/generateFormCode.ts b/packages/form-code-generator/src/generateFormCode.ts index 9db2d57ea5f..058d4fb1e07 100644 --- a/packages/form-code-generator/src/generateFormCode.ts +++ b/packages/form-code-generator/src/generateFormCode.ts @@ -34,13 +34,16 @@ export function generateFormCode) { - return formSchemas.reduce((generatedForms, formSchema) => { - try { - generatedForms.push({ formAsset: formGeneratorTheme.generate(formSchema), formError: undefined }); - } catch (error) { - console.error(`Error generating form: ${error}`); - generatedForms.push({ formAsset: undefined, formError: error }); - } - return generatedForms; - }, [] as FormCodeGeneration[]); + return formSchemas.reduce( + (generatedForms, formSchema) => { + try { + generatedForms.push({ formAsset: formGeneratorTheme.generate(formSchema), formError: undefined }); + } catch (error) { + console.trace(`Error generating form: `, error); + generatedForms.push({ formAsset: undefined, formError: error }); + } + return generatedForms; + }, + [] as FormCodeGeneration[] + ); } diff --git a/packages/form-code-generator/src/types.ts b/packages/form-code-generator/src/types.ts index 9943e2cde55..e0bdcec459d 100644 --- a/packages/form-code-generator/src/types.ts +++ b/packages/form-code-generator/src/types.ts @@ -33,15 +33,16 @@ export interface FormConfiguration { } export interface FormAsset { - id: string; - assetName: string; + name: string; + fileName: string; content: string; - type: FormThemeFileExt; + fileExt: FormThemeFileExt; config: FormConfiguration; } export interface FormCodeGenerationError { error: Error; + fileName: string; } export interface FormCodeGeneratorTheme< @@ -51,7 +52,10 @@ export interface FormCodeGeneratorTheme< generate: (formSchema: FormSchema) => CustomFormAsset; } -export interface FormCodeGeneration { - formAsset: FormAsset | undefined; +export interface FormCodeGeneration< + FormThemeFileExt extends string, + CustomFormAsset extends FormAsset, +> { + formAsset: CustomFormAsset | undefined; formError: FormCodeGenerationError | undefined; } diff --git a/packages/form-code-generator/tests/__mocks__/partternfly.ts b/packages/form-code-generator/tests/__mocks__/partternfly.ts index d54abc89d91..2b263ea6589 100644 --- a/packages/form-code-generator/tests/__mocks__/partternfly.ts +++ b/packages/form-code-generator/tests/__mocks__/partternfly.ts @@ -22,10 +22,10 @@ import { FormCodeGeneratorTheme, FormSchema } from "../../dist/types"; export const dummyPatternflyTheme: FormCodeGeneratorTheme<"tsx"> = { generate({ schema, name }: FormSchema) { return { - id: name, + name, content: name, - type: "tsx", - assetName: `${name}.tsx`, + fileExt: "tsx", + fileName: `${name}.tsx`, config: { schema: JSON.stringify(schema), resources: { styles: {}, scripts: {} }, diff --git a/packages/form-code-generator/tests/generateFormCode.test.ts b/packages/form-code-generator/tests/generateFormCode.test.ts index ca849e5b749..1cd4d899749 100644 --- a/packages/form-code-generator/tests/generateFormCode.test.ts +++ b/packages/form-code-generator/tests/generateFormCode.test.ts @@ -28,11 +28,11 @@ describe("FormCodeGenerator tests", () => { formSchemas: [{ name: "", schema: {} }], formCodeGeneratorTheme: { generate: ({ name, schema }) => ({ - assetName: "", + fileName: "", config: { schema: "", resources: { scripts: {}, styles: {} } }, content: "", - id: "", - type: "", + name: "", + fileExt: "", }), }, }); @@ -41,10 +41,10 @@ describe("FormCodeGenerator tests", () => { expect(formCode[0]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "", - assetName: "", + name: "", + fileName: "", config: { resources: { scripts: {}, styles: {} }, schema: "" }, - type: "", + fileExt: "", }), formError: undefined, }) @@ -61,10 +61,10 @@ describe("FormCodeGenerator tests", () => { expect(formCode[0]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "test", - assetName: "test.tsx", + name: "test", + fileName: "test.tsx", config: { resources: { scripts: {}, styles: {} }, schema: "{}" }, - type: "tsx", + fileExt: "tsx", }), formError: undefined, }) @@ -84,10 +84,10 @@ describe("FormCodeGenerator tests", () => { expect(formCode[0]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "Apply#For#Visa", - assetName: "Apply#For#Visa.tsx", + name: "Apply#For#Visa", + fileName: "Apply#For#Visa.tsx", config: { resources: { scripts: {}, styles: {} }, schema: JSON.stringify(ApplyForVisaSchema) }, - type: "tsx", + fileExt: "tsx", }), formError: undefined, }) @@ -95,10 +95,10 @@ describe("FormCodeGenerator tests", () => { expect(formCode[1]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "ConfirmTravel", - assetName: "ConfirmTravel.tsx", + name: "ConfirmTravel", + fileName: "ConfirmTravel.tsx", config: { resources: { scripts: {}, styles: {} }, schema: JSON.stringify(ConfirmTravelSchema) }, - type: "tsx", + fileExt: "tsx", }), formError: undefined, }) @@ -118,10 +118,10 @@ describe("FormCodeGenerator tests", () => { } return { - id: schema.name, + name: schema.name, content: schema.name, - type: "txt", - assetName: `${schema.name}.txt`, + fileExt: "txt", + fileName: `${schema.name}.txt`, config: { schema: "", resources: { styles: {}, scripts: {} }, @@ -139,10 +139,10 @@ describe("FormCodeGenerator tests", () => { expect(formCode[1]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "ConfirmTravel", - assetName: "ConfirmTravel.txt", + name: "ConfirmTravel", + fileName: "ConfirmTravel.txt", config: { resources: { scripts: {}, styles: {} }, schema: "" }, - type: "txt", + fileExt: "txt", }), formError: undefined, }) diff --git a/packages/jbpm-form-code-generator-themes/README.md b/packages/jbpm-form-code-generator-themes/README.md index 625f509bb69..0bd1d8c0b06 100644 --- a/packages/jbpm-form-code-generator-themes/README.md +++ b/packages/jbpm-form-code-generator-themes/README.md @@ -51,17 +51,17 @@ The `jbpmFormsCode` will give you the following object: ```ts { - id: string, // The form id - sanitizedId: string, // The same value as "id" but any "#" occorrence is replaced by "_" - assetName: string, // The form name - sanitizedAssetName: string, // The same value as "assetName" but any "#" occorrence is replaced by "_" - type: string, // The file extension of the code - content: string, // The unescaped form code + name: string, // The form id + nameWithoutInvalidTsVarChars: string, // The same value as "id" but any "#" occorrence is replaced by "_" + fileName: string, // The form name + fileNameWithoutInvalidVarChars: string, // The same value as "assetName" but any "#" occorrence is replaced by "_" + fileExt: string, // The file extension of the code + content: string, // The unescaped form code config: { - schema: string, // The stringifyied JSON Schema + schema: string, // The stringifyied JSON Schema resources: { - styles: {}, // Any style that need to be loaded - scripts: {}, // Any script that need to be loaded + styles: {}, // Any style that need to be loaded + scripts: {}, // Any script that need to be loaded }, }, } diff --git a/packages/jbpm-form-code-generator-themes/src/jbpmBootstrap4FormCodeGeneratorTheme.ts b/packages/jbpm-form-code-generator-themes/src/jbpmBootstrap4FormCodeGeneratorTheme.ts index ad2f0cdbba6..f906af79f3c 100644 --- a/packages/jbpm-form-code-generator-themes/src/jbpmBootstrap4FormCodeGeneratorTheme.ts +++ b/packages/jbpm-form-code-generator-themes/src/jbpmBootstrap4FormCodeGeneratorTheme.ts @@ -29,7 +29,7 @@ import { import unescape from "lodash/unescape"; import JSONSchemaBridge from "uniforms-bridge-json-schema"; import { getUniformsSchema } from "./getUniformsSchema"; -import { inputSanitizationUtil } from "./inputSanitizationUtil"; +import { removeInvalidVarChars } from "./removeInvalidVarChars"; import { JbpmFormAssetBase } from "./types"; export interface Bootstrap4FormAsset extends FormAsset, JbpmFormAssetBase {} @@ -39,17 +39,17 @@ export const jbpmBootstrap4FormCodeGeneratorTheme: FormCodeGeneratorTheme true), disabled: false, placeholder: true, }); return { - id: formSchema.name, - sanitizedId: inputSanitizationUtil(formSchema.name), - assetName: `${formSchema.name}.${BOOTSTRAP4_FILE_EXT}`, - sanitizedAssetName: `${inputSanitizationUtil(formSchema.name)}.${BOOTSTRAP4_FILE_EXT}`, - type: BOOTSTRAP4_FILE_EXT, + name: formSchema.name, + nameWithoutInvalidTsVarChars: removeInvalidVarChars(formSchema.name), + fileName: `${formSchema.name}.${BOOTSTRAP4_FILE_EXT}`, + fileNameWithoutInvalidVarChars: `${removeInvalidVarChars(formSchema.name)}.${BOOTSTRAP4_FILE_EXT}`, + fileExt: BOOTSTRAP4_FILE_EXT, content: unescape(form), config: { schema: JSON.stringify(formSchema.schema), diff --git a/packages/jbpm-form-code-generator-themes/src/jbpmPatternflyFormCodeGeneratorTheme.ts b/packages/jbpm-form-code-generator-themes/src/jbpmPatternflyFormCodeGeneratorTheme.ts index e6002898489..548f93b6fd5 100644 --- a/packages/jbpm-form-code-generator-themes/src/jbpmPatternflyFormCodeGeneratorTheme.ts +++ b/packages/jbpm-form-code-generator-themes/src/jbpmPatternflyFormCodeGeneratorTheme.ts @@ -23,7 +23,7 @@ import { PATTERNFLY_FILE_EXT, PatternflyFileExt } from "@kie-tools/form-code-gen import unescape from "lodash/unescape"; import JSONSchemaBridge from "uniforms-bridge-json-schema"; import { getUniformsSchema } from "./getUniformsSchema"; -import { inputSanitizationUtil } from "./inputSanitizationUtil"; +import { removeInvalidVarChars } from "./removeInvalidVarChars"; import { JbpmFormAssetBase } from "./types"; export interface PatternflyFormAsset extends FormAsset, JbpmFormAssetBase {} @@ -33,17 +33,17 @@ export const jbpmPatternflyFormCodeGeneratorTheme: FormCodeGeneratorTheme true), disabled: false, placeholder: true, }); return { - id: formSchema.name, - sanitizedId: inputSanitizationUtil(formSchema.name), - assetName: `${formSchema.name}.${PATTERNFLY_FILE_EXT}`, - sanitizedAssetName: `${inputSanitizationUtil(formSchema.name)}.${PATTERNFLY_FILE_EXT}`, - type: PATTERNFLY_FILE_EXT, + name: formSchema.name, + nameWithoutInvalidTsVarChars: removeInvalidVarChars(formSchema.name), + fileName: `${formSchema.name}.${PATTERNFLY_FILE_EXT}`, + fileNameWithoutInvalidVarChars: `${removeInvalidVarChars(formSchema.name)}.${PATTERNFLY_FILE_EXT}`, + fileExt: PATTERNFLY_FILE_EXT, content: unescape(form), config: { schema: JSON.stringify(formSchema.schema), diff --git a/packages/jbpm-form-code-generator-themes/src/inputSanitizationUtil.ts b/packages/jbpm-form-code-generator-themes/src/removeInvalidVarChars.ts similarity index 87% rename from packages/jbpm-form-code-generator-themes/src/inputSanitizationUtil.ts rename to packages/jbpm-form-code-generator-themes/src/removeInvalidVarChars.ts index 6066c8a5306..2a3e27bb38f 100644 --- a/packages/jbpm-form-code-generator-themes/src/inputSanitizationUtil.ts +++ b/packages/jbpm-form-code-generator-themes/src/removeInvalidVarChars.ts @@ -17,6 +17,7 @@ * under the License. */ -export const inputSanitizationUtil = (unsanitizedString: string) => { +// Remove character that are invalid during variable declaration +export const removeInvalidVarChars = (unsanitizedString: string) => { return unsanitizedString.replaceAll("#", "_"); }; diff --git a/packages/jbpm-form-code-generator-themes/src/types.ts b/packages/jbpm-form-code-generator-themes/src/types.ts index 8560d8fb3bf..2f6075b2e0a 100644 --- a/packages/jbpm-form-code-generator-themes/src/types.ts +++ b/packages/jbpm-form-code-generator-themes/src/types.ts @@ -17,7 +17,8 @@ * under the License. */ +// https://github.com/apache/incubator-kie-issues/issues/528 export interface JbpmFormAssetBase { - sanitizedId: string; - sanitizedAssetName: string; + nameWithoutInvalidTsVarChars: string; + fileNameWithoutInvalidVarChars: string; } diff --git a/packages/jbpm-form-code-generator-themes/tests/jbpmBootstrap4FormGeneratorTheme.test.ts b/packages/jbpm-form-code-generator-themes/tests/jbpmBootstrap4FormGeneratorTheme.test.ts index f5b556f6d2f..7392c57afa2 100644 --- a/packages/jbpm-form-code-generator-themes/tests/jbpmBootstrap4FormGeneratorTheme.test.ts +++ b/packages/jbpm-form-code-generator-themes/tests/jbpmBootstrap4FormGeneratorTheme.test.ts @@ -34,10 +34,10 @@ describe("jbpmBootstrap4FormCodeGeneratorTheme tests", () => { }); expect(formAsset).not.toBeUndefined(); - expect(formAsset.id).toStrictEqual("ApplyFor#Visa"); - expect(formAsset.sanitizedId).toStrictEqual("ApplyFor_Visa"); - expect(formAsset.assetName).toStrictEqual("ApplyFor#Visa.html"); - expect(formAsset.sanitizedAssetName).toStrictEqual("ApplyFor_Visa.html"); + expect(formAsset.name).toStrictEqual("ApplyFor#Visa"); + expect(formAsset.nameWithoutInvalidTsVarChars).toStrictEqual("ApplyFor_Visa"); + expect(formAsset.fileName).toStrictEqual("ApplyFor#Visa.html"); + expect(formAsset.fileNameWithoutInvalidVarChars).toStrictEqual("ApplyFor_Visa.html"); expect(formAsset.content).not.toBeUndefined(); expect(formAsset.config).not.toBeUndefined(); expect(formAsset.config).toMatchObject({ @@ -67,10 +67,10 @@ describe("jbpmBootstrap4FormCodeGeneratorTheme tests", () => { expect(formAssets[0]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "Apply#For#Visa", - sanitizedId: "Apply_For_Visa", - assetName: "Apply#For#Visa.html", - sanitizedAssetName: "Apply_For_Visa.html", + name: "Apply#For#Visa", + nameWithoutInvalidTsVarChars: "Apply_For_Visa", + fileName: "Apply#For#Visa.html", + fileNameWithoutInvalidVarChars: "Apply_For_Visa.html", config: { resources: { styles: { @@ -83,7 +83,7 @@ describe("jbpmBootstrap4FormCodeGeneratorTheme tests", () => { }, schema: JSON.stringify(ApplyForVisaSchema), }, - type: "html", + fileExt: "html", }), formError: undefined, }) @@ -92,10 +92,10 @@ describe("jbpmBootstrap4FormCodeGeneratorTheme tests", () => { expect(formAssets[1]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "ConfirmTravel", - sanitizedId: "ConfirmTravel", - assetName: "ConfirmTravel.html", - sanitizedAssetName: "ConfirmTravel.html", + name: "ConfirmTravel", + nameWithoutInvalidTsVarChars: "ConfirmTravel", + fileName: "ConfirmTravel.html", + fileNameWithoutInvalidVarChars: "ConfirmTravel.html", config: { resources: { styles: { @@ -108,7 +108,7 @@ describe("jbpmBootstrap4FormCodeGeneratorTheme tests", () => { }, schema: JSON.stringify(ConfirmTravelSchema), }, - type: "html", + fileExt: "html", }), formError: undefined, }) diff --git a/packages/jbpm-form-code-generator-themes/tests/jbpmPatternflyFormGeneratorTheme.test.ts b/packages/jbpm-form-code-generator-themes/tests/jbpmPatternflyFormGeneratorTheme.test.ts index 371e8827e06..f7c112a044d 100644 --- a/packages/jbpm-form-code-generator-themes/tests/jbpmPatternflyFormGeneratorTheme.test.ts +++ b/packages/jbpm-form-code-generator-themes/tests/jbpmPatternflyFormGeneratorTheme.test.ts @@ -29,10 +29,10 @@ describe("jbpmPatternflyFormCodeGeneratorTheme tests", () => { }); expect(formAsset).not.toBeUndefined(); - expect(formAsset.id).toStrictEqual("ApplyFor#Visa"); - expect(formAsset.sanitizedId).toStrictEqual("ApplyFor_Visa"); - expect(formAsset.assetName).toStrictEqual("ApplyFor#Visa.tsx"); - expect(formAsset.sanitizedAssetName).toStrictEqual("ApplyFor_Visa.tsx"); + expect(formAsset.name).toStrictEqual("ApplyFor#Visa"); + expect(formAsset.nameWithoutInvalidTsVarChars).toStrictEqual("ApplyFor_Visa"); + expect(formAsset.fileName).toStrictEqual("ApplyFor#Visa.tsx"); + expect(formAsset.fileNameWithoutInvalidVarChars).toStrictEqual("ApplyFor_Visa.tsx"); expect(formAsset.content).not.toBeUndefined(); expect(formAsset.content).toContain("const Form__ApplyFor_Visa"); expect(formAsset.content).toContain("export default Form__ApplyFor_Visa;"); @@ -59,12 +59,12 @@ describe("jbpmPatternflyFormCodeGeneratorTheme tests", () => { expect(formAssets[0]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "Apply#For#Visa", - sanitizedId: "Apply_For_Visa", - assetName: "Apply#For#Visa.tsx", - sanitizedAssetName: "Apply_For_Visa.tsx", + name: "Apply#For#Visa", + nameWithoutInvalidTsVarChars: "Apply_For_Visa", + fileName: "Apply#For#Visa.tsx", + fileNameWithoutInvalidVarChars: "Apply_For_Visa.tsx", config: { resources: { scripts: {}, styles: {} }, schema: JSON.stringify(ApplyForVisaSchema) }, - type: "tsx", + fileExt: "tsx", }), formError: undefined, }) @@ -73,12 +73,12 @@ describe("jbpmPatternflyFormCodeGeneratorTheme tests", () => { expect(formAssets[1]).toEqual( expect.objectContaining({ formAsset: expect.objectContaining({ - id: "ConfirmTravel", - sanitizedId: "ConfirmTravel", - assetName: "ConfirmTravel.tsx", - sanitizedAssetName: "ConfirmTravel.tsx", + name: "ConfirmTravel", + nameWithoutInvalidTsVarChars: "ConfirmTravel", + fileName: "ConfirmTravel.tsx", + fileNameWithoutInvalidVarChars: "ConfirmTravel.tsx", config: { resources: { scripts: {}, styles: {} }, schema: JSON.stringify(ConfirmTravelSchema) }, - type: "tsx", + fileExt: "tsx", }), formError: undefined, }) diff --git a/packages/kie-editors-dev-vscode-extension/package.json b/packages/kie-editors-dev-vscode-extension/package.json index e6f92302c56..cb21f557cc2 100644 --- a/packages/kie-editors-dev-vscode-extension/package.json +++ b/packages/kie-editors-dev-vscode-extension/package.json @@ -39,6 +39,7 @@ "@kie-tools-core/patternfly-base": "workspace:*", "@kie-tools-core/vscode-extension": "workspace:*", "@kie-tools-core/workspace": "workspace:*", + "@kie-tools/form-code-generator-vscode-command": "workspace:*", "@kie-tools/kie-bc-editors": "workspace:*", "@kie-tools/pmml-editor": "workspace:*", "@kie-tools/vscode-java-code-completion-extension-plugin": "workspace:*", @@ -96,15 +97,19 @@ "dark": "./static/svg-icon-dark.png", "light": "./static/svg-icon-light.png" }, - "title": "Save Preview SVG" + "title": "Kogito Editors: Save Preview SVG" }, { "command": "extension.kogito.runTest", - "title": "Run" + "title": "Kogito Editors: Run" }, { "command": "extension.kogito.silentlyGenerateSvg", - "title": "Generate SVG without any notification" + "title": "Kogito Editors: Generate SVG without any notification" + }, + { + "command": "extension.apache.kie.kogitoEditors.generateFormCode", + "title": "Kogito Editors: Generate form code for human interactions from jBPM project" } ], "configuration": { @@ -144,7 +149,7 @@ }, "customEditors": [ { - "displayName": "KIE Kogito Editors", + "displayName": "Apache KIE Kogito Editors", "selector": [ { "filenamePattern": "*.{dmn,bpmn,bpmn2,scesim,pmml}" diff --git a/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts b/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts index 34a952c7eed..6c16d35aaf4 100644 --- a/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts +++ b/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts @@ -23,6 +23,7 @@ import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@ki import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; +import { generateFormsCommand } from "@kie-tools/form-code-generator-vscode-command/dist/generateFormCodeCommand"; let backendProxy: VsCodeBackendProxy; @@ -67,6 +68,12 @@ export async function activate(context: vscode.ExtensionContext) { backendProxy: backendProxy, }); + context.subscriptions.push( + vscode.commands.registerCommand("extension.apache.kie.kogitoEditors.generateFormCode", async (args: any) => + generateFormsCommand() + ) + ); + console.info("Extension is successfully setup."); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2b56e36c473..89ac815c00d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1131,6 +1131,9 @@ importers: '@kie-tools-core/vscode-extension': specifier: workspace:* version: link:../vscode-extension + '@kie-tools/form-code-generator-vscode-command': + specifier: workspace:* + version: link:../form-code-generator-vscode-command '@kie-tools/kie-bc-editors': specifier: workspace:* version: link:../kie-bc-editors @@ -5013,6 +5016,40 @@ importers: specifier: ^3.0.0 version: 3.0.0 + packages/form-code-generator-vscode-command: + dependencies: + '@kie-tools/form-code-generator': + specifier: workspace:* + version: link:../form-code-generator + '@kie-tools/form-code-generator-bootstrap4-theme': + specifier: workspace:* + version: link:../form-code-generator-bootstrap4-theme + '@kie-tools/form-code-generator-patternfly-theme': + specifier: workspace:* + version: link:../form-code-generator-patternfly-theme + '@kie-tools/jbpm-form-code-generator-themes': + specifier: workspace:* + version: link:../jbpm-form-code-generator-themes + devDependencies: + '@kie-tools/eslint': + specifier: workspace:* + version: link:../eslint + '@kie-tools/root-env': + specifier: workspace:* + version: link:../root-env + '@kie-tools/tsconfig': + specifier: workspace:* + version: link:../tsconfig + '@types/vscode': + specifier: 1.67.0 + version: 1.67.0 + rimraf: + specifier: ^3.0.2 + version: 3.0.2 + typescript: + specifier: ^5.5.3 + version: 5.5.3 + packages/form-dmn: dependencies: '@kie-tools-core/i18n': @@ -5879,6 +5916,9 @@ importers: '@kie-tools-core/workspace': specifier: workspace:* version: link:../workspace + '@kie-tools/form-code-generator-vscode-command': + specifier: workspace:* + version: link:../form-code-generator-vscode-command '@kie-tools/kie-bc-editors': specifier: workspace:* version: link:../kie-bc-editors diff --git a/repo/graph.dot b/repo/graph.dot index 46b184fa133..3090bb49c1b 100644 --- a/repo/graph.dot +++ b/repo/graph.dot @@ -49,6 +49,7 @@ digraph G { "@kie-tools/bpmn-marshaller" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/xml-parser-ts-codegen" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "bpmn-vscode-extension" [ color = "blue", fontcolor = "blue", style = "rounded" ]; + "@kie-tools/form-code-generator-vscode-command" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/kie-bc-editors" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/stunner-editors" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie-tools/vscode-java-code-completion-extension-plugin" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; @@ -120,10 +121,10 @@ digraph G { "@kie-tools/form-code-generator" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/form-code-generator-bootstrap4-theme" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/form-code-generator-patternfly-theme" [ color = "blue", fontcolor = "blue", style = "rounded" ]; + "@kie-tools/jbpm-form-code-generator-themes" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools-core/i18n" [ color = "purple", fontcolor = "purple", style = "rounded" ]; "@kie-tools/import-java-classes-component" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools-core/vscode-java-code-completion" [ color = "purple", fontcolor = "purple", style = "rounded" ]; - "@kie-tools/jbpm-form-code-generator-themes" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/runtime-tools-process-dev-ui-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/jobs-service-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/yaml-language-server" [ color = "blue", fontcolor = "blue", style = "rounded" ]; @@ -250,6 +251,7 @@ digraph G { "@kie-tools/boxed-expression-component" -> "@kie-tools/storybook-base" [ style = "dashed", color = "blue" ]; "@kie-tools/bpmn-marshaller" -> "@kie-tools/xml-parser-ts-codegen" [ style = "dashed", color = "blue" ]; "bpmn-vscode-extension" -> "@kie-tools-core/vscode-extension" [ style = "solid", color = "blue" ]; + "bpmn-vscode-extension" -> "@kie-tools/form-code-generator-vscode-command" [ style = "solid", color = "blue" ]; "bpmn-vscode-extension" -> "@kie-tools/kie-bc-editors" [ style = "solid", color = "blue" ]; "bpmn-vscode-extension" -> "@kie-tools/stunner-editors" [ style = "dashed", color = "blue" ]; "bpmn-vscode-extension" -> "@kie-tools/vscode-java-code-completion-extension-plugin" [ style = "dashed", color = "blue" ]; @@ -390,6 +392,7 @@ digraph G { "@kie-tools/form-code-generator-bootstrap4-theme" -> "@kie-tools-core/webpack-base" [ style = "dashed", color = "blue" ]; "@kie-tools/form-code-generator-patternfly-theme" -> "@kie-tools/form-code-generator" [ style = "solid", color = "blue" ]; "@kie-tools/form-code-generator-patternfly-theme" -> "@kie-tools-core/webpack-base" [ style = "dashed", color = "blue" ]; + "@kie-tools/form-code-generator-vscode-command" -> "@kie-tools/jbpm-form-code-generator-themes" [ style = "solid", color = "blue" ]; "@kie-tools/form-dmn" -> "@kie-tools/form" [ style = "solid", color = "blue" ]; "@kie-tools-core/i18n" -> "@kie-tools/eslint" [ style = "dashed", color = "purple" ]; "@kie-tools-core/i18n" -> "@kie-tools/jest-base" [ style = "dashed", color = "purple" ]; @@ -421,6 +424,7 @@ digraph G { "@kie-tools/kie-bc-editors" -> "@kie-tools/dmn-language-service" [ style = "solid", color = "blue" ]; "@kie-tools/kie-bc-editors" -> "@kie-tools/pmml-editor-marshaller" [ style = "solid", color = "blue" ]; "kie-editors-dev-vscode-extension" -> "@kie-tools-core/vscode-extension" [ style = "solid", color = "black" ]; + "kie-editors-dev-vscode-extension" -> "@kie-tools/form-code-generator-vscode-command" [ style = "solid", color = "black" ]; "kie-editors-dev-vscode-extension" -> "@kie-tools/kie-bc-editors" [ style = "solid", color = "black" ]; "kie-editors-dev-vscode-extension" -> "@kie-tools/pmml-editor" [ style = "solid", color = "black" ]; "kie-editors-dev-vscode-extension" -> "@kie-tools/vscode-java-code-completion-extension-plugin" [ style = "solid", color = "black" ]; diff --git a/repo/graph.json b/repo/graph.json index 3e1949c32b0..3ccae914e70 100644 --- a/repo/graph.json +++ b/repo/graph.json @@ -71,7 +71,9 @@ { "id": "@kie-tools/xml-parser-ts-codegen" }, { "id": "@kie-tools/xml-parser-ts" }, { "id": "bpmn-vscode-extension" }, + { "id": "@kie-tools/form-code-generator-vscode-command" }, { "id": "@kie-tools/vscode-java-code-completion-extension-plugin" }, + { "id": "@kie-tools/jbpm-form-code-generator-themes" }, { "id": "@kie-tools/pmml-editor-marshaller" }, { "id": "@kie-tools/stunner-editors-dmn-loader" }, { "id": "chrome-extension-pack-kogito-kie-editors" }, @@ -133,7 +135,6 @@ { "id": "@kie-tools/form-code-generator-bootstrap4-theme" }, { "id": "@kie-tools/form-code-generator-patternfly-theme" }, { "id": "@kie-tools/import-java-classes-component" }, - { "id": "@kie-tools/jbpm-form-code-generator-themes" }, { "id": "@kie-tools/runtime-tools-process-webapp-components" }, { "id": "@kie-tools/runtime-tools-shared-webapp-components" }, { "id": "@kie-tools/jobs-service-webapp" }, @@ -854,6 +855,11 @@ "target": "@kie-tools-core/vscode-extension", "weight": 1 }, + { + "source": "bpmn-vscode-extension", + "target": "@kie-tools/form-code-generator-vscode-command", + "weight": 1 + }, { "source": "bpmn-vscode-extension", "target": "@kie-tools/kie-bc-editors", @@ -869,11 +875,26 @@ "target": "@kie-tools/vscode-java-code-completion-extension-plugin", "weight": 1 }, + { + "source": "@kie-tools/form-code-generator-vscode-command", + "target": "@kie-tools/jbpm-form-code-generator-themes", + "weight": 1 + }, { "source": "@kie-tools/vscode-java-code-completion-extension-plugin", "target": "@kie-tools/maven-base", "weight": 1 }, + { + "source": "@kie-tools/jbpm-form-code-generator-themes", + "target": "@kie-tools/form-code-generator-bootstrap4-theme", + "weight": 1 + }, + { + "source": "@kie-tools/jbpm-form-code-generator-themes", + "target": "@kie-tools/form-code-generator-patternfly-theme", + "weight": 1 + }, { "source": "@kie-tools/pmml-editor-marshaller", "target": "@kie-tools/eslint", @@ -1639,16 +1660,6 @@ "target": "@kie-tools-core/webpack-base", "weight": 1 }, - { - "source": "@kie-tools/jbpm-form-code-generator-themes", - "target": "@kie-tools/form-code-generator-bootstrap4-theme", - "weight": 1 - }, - { - "source": "@kie-tools/jbpm-form-code-generator-themes", - "target": "@kie-tools/form-code-generator-patternfly-theme", - "weight": 1 - }, { "source": "@kie-tools/runtime-tools-process-webapp-components", "target": "@kie-tools/runtime-tools-process-enveloped-components", @@ -1684,6 +1695,11 @@ "target": "@kie-tools-core/vscode-extension", "weight": 1 }, + { + "source": "kie-editors-dev-vscode-extension", + "target": "@kie-tools/form-code-generator-vscode-command", + "weight": 1 + }, { "source": "kie-editors-dev-vscode-extension", "target": "@kie-tools/kie-bc-editors", @@ -2635,6 +2651,7 @@ ["@kie-tools/form-code-generator", "packages/form-code-generator"], ["@kie-tools/form-code-generator-bootstrap4-theme", "packages/form-code-generator-bootstrap4-theme"], ["@kie-tools/form-code-generator-patternfly-theme", "packages/form-code-generator-patternfly-theme"], + ["@kie-tools/form-code-generator-vscode-command", "packages/form-code-generator-vscode-command"], ["@kie-tools/form-dmn", "packages/form-dmn"], ["@kie-tools-core/i18n", "packages/i18n"], ["@kie-tools/i18n-common-dictionary", "packages/i18n-common-dictionary"], From ef0f2e95b949c2729d1158a138f9f6fed82f5576 Mon Sep 17 00:00:00 2001 From: Fabrizio Antonangeli Date: Tue, 29 Oct 2024 16:27:25 +0100 Subject: [PATCH 05/13] NO-ISSUE: Fixed typo in incubator-kie-serverless-logic-web-tools-swf-dev-mode image name (#2713) --- .../env/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js b/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js index 804d8ff6bd6..46309cc6e2a 100644 --- a/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js +++ b/packages/serverless-logic-web-tools-swf-dev-mode-image-env/env/index.js @@ -32,7 +32,7 @@ module.exports = composeEnv([rootEnv], { description: "E.g,. `apache` or `kie-tools-bot`", }, SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageName: { - default: "incubator-serverless-logic-web-tools-swf-dev-mode", + default: "incubator-kie-serverless-logic-web-tools-swf-dev-mode", description: "Name of the image itself.", }, SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageBuildTag: { From 448d767495d268ddd7f1185e4e5eec3833fa9b21 Mon Sep 17 00:00:00 2001 From: Dmitrii Tikhomirov Date: Tue, 29 Oct 2024 12:07:13 -0700 Subject: [PATCH 06/13] kie-issues#1549: kn-workflow-plugin check for the presence of an image in the local Docker image does not cover all cases (#2685) --- packages/kn-plugin-workflow/go.mod | 3 +- packages/kn-plugin-workflow/go.sum | 1 + .../pkg/common/containers.go | 95 ++++++++++++++----- .../pkg/common/containers_test.go | 75 +++++++++++++++ 4 files changed, 147 insertions(+), 27 deletions(-) create mode 100644 packages/kn-plugin-workflow/pkg/common/containers_test.go diff --git a/packages/kn-plugin-workflow/go.mod b/packages/kn-plugin-workflow/go.mod index 35e3663862a..b8dfab167a6 100644 --- a/packages/kn-plugin-workflow/go.mod +++ b/packages/kn-plugin-workflow/go.mod @@ -12,6 +12,7 @@ require ( github.com/apache/incubator-kie-tools/packages/sonataflow-operator/api v0.0.0 github.com/apache/incubator-kie-tools/packages/sonataflow-operator/workflowproj v0.0.0 github.com/beevik/etree v1.2.0 + github.com/docker/distribution v2.8.2+incompatible github.com/docker/docker v24.0.9+incompatible github.com/docker/go-connections v0.4.0 github.com/jstemmer/go-junit-report/v2 v2.0.0 @@ -31,7 +32,6 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect github.com/dustin/go-humanize v1.0.1 // indirect @@ -88,6 +88,7 @@ require ( github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect golang.org/x/crypto v0.21.0 // indirect diff --git a/packages/kn-plugin-workflow/go.sum b/packages/kn-plugin-workflow/go.sum index f4a9214d352..7c2d83ca084 100644 --- a/packages/kn-plugin-workflow/go.sum +++ b/packages/kn-plugin-workflow/go.sum @@ -347,6 +347,7 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/packages/kn-plugin-workflow/pkg/common/containers.go b/packages/kn-plugin-workflow/pkg/common/containers.go index af06f6a68a9..afb2482b69e 100644 --- a/packages/kn-plugin-workflow/pkg/common/containers.go +++ b/packages/kn-plugin-workflow/pkg/common/containers.go @@ -20,10 +20,13 @@ package common import ( + "bufio" + "bytes" "context" "encoding/json" "errors" "fmt" + "github.com/docker/distribution/reference" "io" "os" "os/exec" @@ -31,11 +34,11 @@ import ( "runtime" "strings" "syscall" + "time" "github.com/apache/incubator-kie-tools/packages/kn-plugin-workflow/pkg/metadata" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" - "github.com/docker/docker/api/types/filters" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/go-connections/nat" @@ -51,6 +54,10 @@ type DockerLogMessage struct { ID string `json:"id,omitempty"` } +type DockerClient interface { + ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) +} + func getDockerClient() (*client.Client, error) { cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) if err != nil { @@ -198,29 +205,71 @@ func GracefullyStopTheContainerWhenInterrupted(containerTool string) { }() } -func pullDockerImage(cli *client.Client, ctx context.Context) (io.ReadCloser, error) { +func pullDockerImage(cli *client.Client, ctx context.Context) error { // Check if the image exists locally. - // For that we should check only the image name and tag, removing the registry, - // as `docker image ls --filter reference=` will return empty if the image_full_url is not the first tag - // of an image. - imageNameWithoutRegistry := strings.Split(metadata.DevModeImage, "/") - imageFilters := filters.NewArgs() - imageFilters.Add("reference", fmt.Sprintf("*/%s", imageNameWithoutRegistry[len(imageNameWithoutRegistry)-1])) - images, err := cli.ImageList(ctx, types.ImageListOptions{Filters: imageFilters}) + exists, err := CheckImageExists(cli, ctx, metadata.DevModeImage) if err != nil { - return nil, fmt.Errorf("error listing images: %s", err) + return fmt.Errorf("error listing images: %s", err) } // If the image is not found locally, pull it from the remote registry - if len(images) == 0 { - reader, err := cli.ImagePull(ctx, metadata.DevModeImage, types.ImagePullOptions{}) - if err != nil { - return nil, fmt.Errorf("\nError pulling image: %s. Error is: %s", metadata.DevModeImage, err) + if !exists { + fmt.Printf("\n⏳ Retrieving (%s), this could take some time...\n", metadata.DevModeImage) + + ctx, cancel := context.WithTimeout(ctx, 1*time.Minute) + defer cancel() + + reader, writer := io.Pipe() + defer writer.Close() + + var stderr bytes.Buffer + + go func() { + scanner := bufio.NewScanner(reader) + for scanner.Scan() { + fmt.Print(".") + } + }() + + // we use local docker client to pull the image + cmd := exec.CommandContext(ctx, "docker", "pull", metadata.DevModeImage) + cmd.Stdout = writer + cmd.Stderr = &stderr + + if err := cmd.Start(); err != nil { + return fmt.Errorf("\nError pulling image: %s. Error is: %s", metadata.DevModeImage, err) + } + + if err := cmd.Wait(); err != nil { + return fmt.Errorf("\nError pulling image: %s. Error is: %s", metadata.DevModeImage, stderr.String()) } - return reader, nil + fmt.Println("\n🎉 Successfully pulled the image") + } + + return nil +} + +func CheckImageExists(cli DockerClient, ctx context.Context, imageName string) (bool, error) { + named, err := reference.ParseNormalizedNamed(imageName) + + if tagged, ok := named.(reference.Tagged); ok { + imageName = fmt.Sprintf("%s:%s", reference.Path(named), tagged.Tag()) + } else { + imageName = fmt.Sprintf("%s:%s", reference.Path(named), "latest") + } + images, err := cli.ImageList(ctx, types.ImageListOptions{All: true}) + if err != nil { + return false, fmt.Errorf("error listing images: %s", err) } - return nil, nil + for _, image := range images { + for _, tag := range image.RepoTags { + if strings.HasSuffix(tag, imageName) { + return true, nil + } + } + } + return false, nil } func processDockerImagePullLogs(reader io.ReadCloser) error { @@ -286,24 +335,18 @@ func startDockerContainer(cli *client.Client, ctx context.Context, resp containe } func runDockerContainer(portMapping string, path string) error { - ctx := context.Background() + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) + defer cancel() + cli, err := getDockerClient() if err != nil { return err } - - reader, err := pullDockerImage(cli, ctx) + err = pullDockerImage(cli, ctx) if err != nil { return err } - if reader != nil { - fmt.Printf("\n⏳ Retrieving (%s), this could take some time...\n", metadata.DevModeImage) - if err := processDockerImagePullLogs(reader); err != nil { - return err - } - } - resp, err := createDockerContainer(cli, ctx, portMapping, path) if err != nil { return err diff --git a/packages/kn-plugin-workflow/pkg/common/containers_test.go b/packages/kn-plugin-workflow/pkg/common/containers_test.go new file mode 100644 index 00000000000..c54cfc7f6c6 --- /dev/null +++ b/packages/kn-plugin-workflow/pkg/common/containers_test.go @@ -0,0 +1,75 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package common + +import ( + "context" + "github.com/docker/docker/api/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + + "testing" +) + +type MockDockerClient struct { + mock.Mock +} + +func (m *MockDockerClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) { + args := m.Called(ctx, options) + return args.Get(0).([]types.ImageSummary), args.Error(1) +} + +func TestCheckImageExists(t *testing.T) { + + tests := []struct { + lookup string + images []string + expected bool + }{ + {"docker.io/example/app-image:latest", []string{"docker.io/example/app-image:latest"}, true}, + {"docker.io/demo/service-image:1.0", []string{"demo/service-image:1.0"}, true}, + + {"docker.io/testuser/sample-app", []string{"docker.io/testuser/sample-app:latest"}, true}, + {"docker.io/testuser/sample-app", []string{"testuser/sample-app:latest"}, true}, + + {"testuser/sample-app:dev", []string{"docker.io/testuser/sample-app:dev"}, true}, + {"testuser/sample-app:dev", []string{"testuser/sample-app:dev"}, true}, + + {"docker.io/example/app-image:latest", []string{"app-image:latest"}, false}, + {"docker.io/testuser/sample-app", []string{"sample-app:latest"}, false}, + {"testuser/sample-app:dev", []string{"sample-app:dev"}, false}, + } + + for _, test := range tests { + ctx := context.Background() + mockClient := new(MockDockerClient) + + mockClient.On("ImageList", ctx, mock.Anything).Return([]types.ImageSummary{ + { + RepoTags: test.images, + }, + }, nil) + + exists, err := CheckImageExists(mockClient, ctx, test.lookup) + assert.NoError(t, err, "Error should be nil") + assert.True(t, exists == test.expected, "Expected %t, got %t", test.expected, exists) + } +} From ddda0e885f48d2fcb95c57683742d3cf1ba57660 Mon Sep 17 00:00:00 2001 From: Alex Porcelli Date: Wed, 30 Oct 2024 14:11:19 -0400 Subject: [PATCH 07/13] kie-issues#1594: Security fixes for dev-deployment-kogito-quarkus-blank-app (#2716) Co-authored-by: Tiago Bento --- .../Containerfile | 4 +- .../pom.xml | 90 +++++++++++++------ 2 files changed, 65 insertions(+), 29 deletions(-) diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile b/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile index 9fad06ed812..d593ff44c4f 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/Containerfile @@ -30,7 +30,7 @@ COPY --chown=$USER_ID:$USER_ID dist-dev/quarkus-app $HOME_PATH/app/ COPY --chown=$USER_ID:$USER_ID dist-dev/settings.xml /tmp/kogito/.m2/settings.xml # Pre-populate local Maven repository for faster startup -RUN ./mvnw clean package -B -nsu --settings /tmp/kogito/.m2/settings.xml -Dmaven.test.skip -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH} \ +RUN ./mvnw -Dmaven=3.9.6 clean package -B -nsu --settings /tmp/kogito/.m2/settings.xml -Dmaven.test.skip -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH} \ && chgrp -R 0 $HOME_PATH/app && chmod -R g=u $HOME_PATH/app && chgrp -R 0 /tmp/kogito && chmod -R g=u /tmp/kogito && chgrp -R 0 /.m2 && chmod -R g=u /.m2 USER $USER_ID @@ -39,4 +39,4 @@ EXPOSE 8080 ENTRYPOINT ["/bin/bash", "-c"] -CMD ["dev-deployment-upload-service && cp -r $HOME_PATH/app/. /tmp/app && cd /tmp/app && ./mvnw quarkus:dev -o -s=/tmp/kogito/.m2/settings.xml -Dquarkus.analytics.disabled=true -Ddebug=false -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH}"] +CMD ["dev-deployment-upload-service && cp -r $HOME_PATH/app/. /tmp/app && cd /tmp/app && ./mvnw -Dmaven=3.9.6 quarkus:dev -o -s=/tmp/kogito/.m2/settings.xml -Dquarkus.analytics.disabled=true -Ddebug=false -Dmaven.repo.local=/tmp/kogito/.m2/repository -Dquarkus.http.non-application-root-path=${ROOT_PATH}/q -Dquarkus.http.root-path=${ROOT_PATH}"] diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index b2f9abac4cd..0708db7b997 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -25,11 +25,8 @@ - - org.apache - apache - 32 - + + 4.0.0 org.kie.kogito @@ -47,7 +44,7 @@ 3.4.1 3.13.0 - 3.2.0 + 3.3.1 3.0.0-M7 3.5.0 3.1.3 @@ -55,7 +52,6 @@ 3.12.1 3.6.1 3.4.1 - 3.2.0 3.4.0 1.6.0 @@ -67,6 +63,8 @@ 4.13.2 1.26.1 0.5 + 2.16.1 + 3.25.5 @@ -94,6 +92,18 @@ + + + + com.google.protobuf + protobuf-java + ${version.com.google.protobuf} + + + com.google.protobuf + protobuf-java-util + ${version.com.google.protobuf} + org.apache.commons commons-compress @@ -214,7 +224,6 @@ - org.apache.maven.plugins maven-site-plugin ${version.maven.site.plugin} @@ -231,24 +240,6 @@ - org.apache.maven.plugins - maven-remote-resources-plugin - ${version.maven.remote.resources.plugin} - - - org.apache.commons - commons-compress - ${version.org.apache.commons.commons-compress} - - - org.iq80.snappy - snappy - ${version.org.iq80.snappy} - - - - - org.apache.maven.plugins maven-jar-plugin ${version.maven.jar.plugin} @@ -260,7 +251,6 @@ - org.apache.maven.plugins maven-surefire-plugin ${version.maven.surefire.plugin} @@ -276,6 +266,32 @@ + + maven-resources-plugin + ${version.maven.resources.plugin} + + + + + commons-io + commons-io + ${version.commons-io} + + + + + maven-compiler-plugin + ${version.maven.compiler.plugin} + + + + + commons-io + commons-io + ${version.commons-io} + + + @@ -336,4 +352,24 @@ + + + apache.snapshots + Apache Snapshot Repository + https://repository.apache.org/snapshots + + false + + + + + + apache.snapshots + Apache Snapshot Repository + https://repository.apache.org/snapshots + + false + + + From c60e8c40b7dc6c5171a23d73675fae1989cdb97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jos=C3=A9=20dos=20Santos?= Date: Wed, 30 Oct 2024 15:14:56 -0300 Subject: [PATCH 08/13] kie-issues#2549: Decision Service cannot be recognized in columns of decision table (#2684) --- .../src/parser/VariablesRepository.ts | 32 ++- packages/feel-input-component/package.json | 1 + .../included.dmn | 106 ++++++++++ .../modelWithInclude.dmn | 188 ++++++++++++++++++ .../tests/semanticTokensProvider.test.ts | 150 ++++++++++++++ pnpm-lock.yaml | 3 + 6 files changed, 479 insertions(+), 1 deletion(-) create mode 100644 packages/feel-input-component/tests-data/variables-inside-decision-tables/included.dmn create mode 100644 packages/feel-input-component/tests-data/variables-inside-decision-tables/modelWithInclude.dmn diff --git a/packages/dmn-feel-antlr4-parser/src/parser/VariablesRepository.ts b/packages/dmn-feel-antlr4-parser/src/parser/VariablesRepository.ts index 5f137916a3f..a923a0186f7 100644 --- a/packages/dmn-feel-antlr4-parser/src/parser/VariablesRepository.ts +++ b/packages/dmn-feel-antlr4-parser/src/parser/VariablesRepository.ts @@ -379,6 +379,35 @@ export class VariablesRepository { this.addVariable(id, "", FeelSyntacticSymbolNature.LocalVariable, parent); } + private addDecisionTableEntryNode(parent: VariableContext, entryId: string) { + const ruleInputElementNode = this.addVariable(entryId, "", FeelSyntacticSymbolNature.LocalVariable, parent); + parent.children.set(ruleInputElementNode.uuid, ruleInputElementNode); + this.addVariable(ruleInputElementNode.uuid, "", FeelSyntacticSymbolNature.LocalVariable, ruleInputElementNode); + } + + private addDecisionTable(parent: VariableContext, decisionTable: DmnDecisionTable) { + const variableNode = this.addVariable( + decisionTable["@_id"] ?? "", + "", + FeelSyntacticSymbolNature.LocalVariable, + parent + ); + parent.children.set(variableNode.uuid, variableNode); + + if (decisionTable.rule) { + for (const ruleElement of decisionTable.rule) { + ruleElement.inputEntry?.forEach((ruleInputElement) => + this.addDecisionTableEntryNode(parent, ruleInputElement["@_id"] ?? "") + ); + ruleElement.outputEntry?.forEach((ruleOutputElement) => + this.addDecisionTableEntryNode(parent, ruleOutputElement["@_id"] ?? "") + ); + } + } + + this.addVariable(variableNode.uuid, "", FeelSyntacticSymbolNature.LocalVariable, parent); + } + private addInvocation(parent: VariableContext, element: DmnInvocation) { if (element.binding) { for (const bindingElement of element.binding) { @@ -594,7 +623,8 @@ export class VariablesRepository { break; case "decisionTable": - // Do nothing because DecisionTable does not define variables + // It doesn't define variables but we need it to create its own context to use variables inside of Decision Table. + this.addDecisionTable(parent, expression); break; case "context": diff --git a/packages/feel-input-component/package.json b/packages/feel-input-component/package.json index be2dfee300d..da5dc24036d 100644 --- a/packages/feel-input-component/package.json +++ b/packages/feel-input-component/package.json @@ -30,6 +30,7 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-react": "^7.16.0", "@kie-tools-core/webpack-base": "workspace:*", + "@kie-tools/dmn-marshaller": "workspace:*", "@kie-tools/eslint": "workspace:*", "@kie-tools/jest-base": "workspace:*", "@kie-tools/root-env": "workspace:*", diff --git a/packages/feel-input-component/tests-data/variables-inside-decision-tables/included.dmn b/packages/feel-input-component/tests-data/variables-inside-decision-tables/included.dmn new file mode 100644 index 00000000000..20e48f0279a --- /dev/null +++ b/packages/feel-input-component/tests-data/variables-inside-decision-tables/included.dmn @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + Input + + + + + + + + + + + + + + + + + 190 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/feel-input-component/tests-data/variables-inside-decision-tables/modelWithInclude.dmn b/packages/feel-input-component/tests-data/variables-inside-decision-tables/modelWithInclude.dmn new file mode 100644 index 00000000000..29d96398958 --- /dev/null +++ b/packages/feel-input-component/tests-data/variables-inside-decision-tables/modelWithInclude.dmn @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + Input + + + + + + + - + + + MyIncludedModel.MyDS(LocalInput) + MyIncludedModel.RemoteInput + + + + + + + + - + + + LocalInput + LocalDecision + + + + + + + + - + + + MyIncludedModel.MyDS(LocalInput) + MyIncludedModel.RemoteInput + LocalInput + LocalDecision + + + + + + + + + + + + + + + + + + + 60 + 118 + 773 + 240 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/feel-input-component/tests/semanticTokensProvider.test.ts b/packages/feel-input-component/tests/semanticTokensProvider.test.ts index 644547c8dac..44d2261587c 100644 --- a/packages/feel-input-component/tests/semanticTokensProvider.test.ts +++ b/packages/feel-input-component/tests/semanticTokensProvider.test.ts @@ -22,6 +22,9 @@ import { BuiltInTypes, DmnDefinitions, FeelVariables } from "@kie-tools/dmn-feel import * as Monaco from "@kie-tools-core/monaco-editor"; import { Element } from "@kie-tools/feel-input-component/dist/themes/Element"; +import * as fs from "fs"; +import * as path from "path"; +import { getMarshaller } from "@kie-tools/dmn-marshaller"; describe("Semantic Tokens Provider", () => { const cancellationTokenMock = { @@ -286,6 +289,145 @@ ThatShouldFailWhenBreakLine`, } }); }); + + describe("variables inside Decision Tables", () => { + const dmnModelWithIncludesPosixPathRelativeToTheTestFile = + "../tests-data/variables-inside-decision-tables/modelWithInclude.dmn"; + const includedDmnModelPosixPathRelativeToTheTestFile = + "../tests-data/variables-inside-decision-tables/included.dmn"; + const localModel = getDmnModelFromFilePath(dmnModelWithIncludesPosixPathRelativeToTheTestFile); + const includedModel = getDmnModelFromFilePath(includedDmnModelPosixPathRelativeToTheTestFile); + + test("should recognize local nodes", async () => { + const expression = "LocalInput + LocalDecision"; + const id = "_AEC3EEB0-8436-4767-A214-20FF5E5CB7BE"; + const modelMock = createModelMockForExpression(expression); + + const feelVariables = new FeelVariables( + localModel.definitions, + new Map([[includedModel.definitions["@_namespace"] ?? "", includedModel]]) + ); + + const semanticTokensProvider = new SemanticTokensProvider(feelVariables, id, () => {}); + + const semanticMonacoTokens = await semanticTokensProvider.provideDocumentSemanticTokens( + modelMock as unknown as Monaco.editor.ITextModel, + null, + cancellationTokenMock + ); + + const expected = [ + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: 0, + tokenLength: "LocalInput".length, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "LocalInput".length + 3, // +3 because of the " + " + tokenLength: "LocalDecision".length, + }), + ]; + + for (let i = 0; i < expected.length; i++) { + expect(semanticMonacoTokens?.data[i]).toEqual(expected[i]); + } + }); + + test("should recognize included nodes", async () => { + const expression = "MyIncludedModel.MyDS(LocalInput) + MyIncludedModel.RemoteInput"; + const id = "_206131ED-0B81-4013-980A-4BB2539A53D0"; + const modelMock = createModelMockForExpression(expression); + + const feelVariables = new FeelVariables( + localModel.definitions, + new Map([[includedModel.definitions["@_namespace"] ?? "", includedModel]]) + ); + + const semanticTokensProvider = new SemanticTokensProvider(feelVariables, id, () => {}); + + const semanticMonacoTokens = await semanticTokensProvider.provideDocumentSemanticTokens( + modelMock as unknown as Monaco.editor.ITextModel, + null, + cancellationTokenMock + ); + + const expected = [ + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: 0, + tokenLength: "MyIncludedModel.MyDS".length, + tokenType: Element.FunctionCall, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "MyIncludedModel.MyDS".length + 1, // +1 because of the "(" + tokenLength: "LocalInput".length, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "LocalInput".length + ") + ".length, + tokenLength: "MyIncludedModel.RemoteInput".length, + }), + ]; + + for (let i = 0; i < expected.length; i++) { + expect(semanticMonacoTokens?.data[i]).toEqual(expected[i]); + } + }); + + test("should recognize included nodes mixed with included nodes", async () => { + const expression = "MyIncludedModel.MyDS(LocalInput) + MyIncludedModel.RemoteInput + LocalInput + LocalDecision"; + const id = "_18832484-9481-49BC-BD40-927CB9872C6B"; + const modelMock = createModelMockForExpression(expression); + + const feelVariables = new FeelVariables( + localModel.definitions, + new Map([[includedModel.definitions["@_namespace"] ?? "", includedModel]]) + ); + + const semanticTokensProvider = new SemanticTokensProvider(feelVariables, id, () => {}); + + const semanticMonacoTokens = await semanticTokensProvider.provideDocumentSemanticTokens( + modelMock as unknown as Monaco.editor.ITextModel, + null, + cancellationTokenMock + ); + + const expected = [ + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: 0, + tokenLength: "MyIncludedModel.MyDS".length, + tokenType: Element.FunctionCall, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "MyIncludedModel.MyDS".length + 1, // +1 because of the "(" + tokenLength: "LocalInput".length, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "LocalInput".length + ") + ".length, + tokenLength: "MyIncludedModel.RemoteInput".length, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "MyIncludedModel.RemoteInput".length + " + ".length, + tokenLength: "LocalInput".length, + }), + ...getMonacoSemanticToken({ + startLineRelativeToPreviousLine: 0, + startIndexRelativeToPreviousStartIndex: "LocalInput".length + " + ".length, + tokenLength: "LocalDecision".length, + }), + ]; + + for (let i = 0; i < expected.length; i++) { + expect(semanticMonacoTokens?.data[i]).toEqual(expected[i]); + } + }); + }); }); function getDmnModelWithContextEntry({ @@ -377,3 +519,11 @@ function createModelMockForExpression(expression: string) { getLinesContent: jest.fn().mockReturnValue(expression.split("\n")), }; } + +function getDmnModelFromFilePath(modelFilePosixPathRelativeToTheTestFile: string) { + const { parser } = getMarshaller( + fs.readFileSync(path.join(__dirname, modelFilePosixPathRelativeToTheTestFile), "utf-8"), + { upgradeTo: "latest" } + ); + return parser.parse(); +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 89ac815c00d..d553e306137 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4532,6 +4532,9 @@ importers: '@kie-tools-core/webpack-base': specifier: workspace:* version: link:../webpack-base + '@kie-tools/dmn-marshaller': + specifier: workspace:* + version: link:../dmn-marshaller '@kie-tools/eslint': specifier: workspace:* version: link:../eslint From d0418c49f1d6574f04a0298a7c62dc08451a14f3 Mon Sep 17 00:00:00 2001 From: Tiago Bento <1584568+tiagobento@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:14:45 -0400 Subject: [PATCH 09/13] NO-ISSUE: Remove `@kie-tools/backend` (#2714) --- .../package.json | 1 - .../src/extension.ts | 10 - packages/backend/LICENSE | 201 ------------------ packages/backend/README.md | 44 ---- packages/backend/env/index.js | 27 --- packages/backend/jest.config.js | 29 --- packages/backend/package.json | 56 ----- .../src/api/core/BackendManagerService.ts | 139 ------------ packages/backend/src/api/core/BackendProxy.ts | 69 ------ packages/backend/src/api/core/Capability.ts | 24 --- .../src/api/core/CapabilityResponse.ts | 69 ------ .../src/api/core/CapabilityResponseStatus.ts | 38 ---- packages/backend/src/api/core/Service.ts | 43 ---- packages/backend/src/api/core/index.ts | 25 --- packages/backend/src/api/http/HttpBridge.ts | 33 --- packages/backend/src/api/http/HttpRequest.ts | 32 --- packages/backend/src/api/http/HttpResponse.ts | 28 --- packages/backend/src/api/http/HttpService.ts | 64 ------ .../backend/src/api/http/LocalHttpServer.ts | 45 ---- .../backend/src/api/http/LocalHttpService.ts | 50 ----- packages/backend/src/api/http/index.ts | 25 --- packages/backend/src/api/index.ts | 21 -- packages/backend/src/channel-api/ServiceId.ts | 25 --- .../capability/CapabilityChannelApi.ts | 23 -- .../src/channel-api/capability/index.ts | 21 -- .../testScenarioRunner/TestResult.ts | 41 ---- .../TestScenarioRunnerCapability.ts | 39 ---- .../capability/testScenarioRunner/index.ts | 21 -- .../extension/BackendExtensionApi.ts | 27 --- .../src/channel-api/extension/index.ts | 20 -- packages/backend/src/channel-api/index.ts | 22 -- .../src/http-bridge/DefaultHttpBridge.ts | 44 ---- packages/backend/src/http-bridge/index.ts | 20 -- packages/backend/src/i18n/BackendI18n.ts | 31 --- packages/backend/src/i18n/index.ts | 21 -- packages/backend/src/i18n/locales/de.ts | 31 --- packages/backend/src/i18n/locales/en.ts | 31 --- packages/backend/src/i18n/locales/index.ts | 21 -- packages/backend/src/i18n/setup.ts | 29 --- .../backend/src/node/QuarkusLocalServer.ts | 93 -------- .../src/node/TestScenarioRunnerService.ts | 115 ---------- packages/backend/src/node/index.ts | 22 -- packages/backend/src/node/utils.ts | 121 ----------- .../backend/src/vscode/VsCodeBackendProxy.ts | 140 ------------ .../vscode/VsCodeTestScenarioRunnerService.ts | 35 --- packages/backend/src/vscode/index.ts | 21 -- .../api/core/BackendManagerService.test.ts | 199 ----------------- .../tests/api/core/BackendProxy.test.ts | 72 ------- .../tests/api/core/CapabilityResponse.test.ts | 51 ----- packages/backend/tests/api/dummyServices.ts | 56 ----- .../tests/api/http/HttpService.test.ts | 63 ------ .../tests/api/http/LocalHttpService.test.ts | 66 ------ .../http-bridge/DefaultHttpBridge.test.ts | 78 ------- .../tests/node/QuarkusLocalServer.test.ts | 179 ---------------- packages/backend/tests/node/utils.test.ts | 199 ----------------- packages/backend/tsconfig.json | 3 - packages/backend/tsconfig.tests.json | 3 - packages/bpmn-vscode-extension/package.json | 1 - .../src/extension/extension.ts | 10 +- packages/dmn-editor-standalone/package.json | 1 - packages/dmn-vscode-extension/package.json | 2 - .../src/extension/extension.ts | 12 +- .../dmn-vscode-extension/webpack.config.js | 6 - packages/editor/package.json | 1 - .../editor/src/api/KogitoEditorChannelApi.ts | 7 +- .../package.json | 1 - .../src/extension/extension.ts | 11 +- packages/kie-editors-standalone/package.json | 1 - packages/pmml-vscode-extension/package.json | 1 - .../src/extension/extension.ts | 16 +- .../package.json | 1 - ...lessWorkflowDiagramEditorChannelApiImpl.ts | 3 - ...WorkflowDiagramEditorChannelApiProducer.ts | 4 - .../src/extension/extension.ts | 12 -- .../package.json | 1 - .../api/DashbuilderViewerChannelApiImpl.ts | 4 - .../DashbuilderViewerChannelApiProducer.ts | 3 - .../src/browser/extension.ts | 12 -- .../src/extension/ComponentsHttpServer.ts | 12 +- .../src/extension/extension.ts | 21 +- packages/vscode-extension/package.json | 1 - .../DefaultVsCodeKieEditorChannelApiImpl.ts | 2 - .../src/VsCodeKieEditorChannelApiProducer.ts | 8 +- .../src/VsCodeKieEditorControllerFactory.ts | 6 +- packages/vscode-extension/src/index.ts | 6 - packages/webpack-base/package.json | 1 + .../webpack-base/webpack.common.config.js | 1 + packages/yard-vscode-extension/package.json | 1 - .../src/extension/extension.ts | 13 -- pnpm-lock.yaml | 56 +---- repo/graph.dot | 6 +- repo/graph.json | 79 ++++--- 92 files changed, 65 insertions(+), 3314 deletions(-) delete mode 100644 packages/backend/LICENSE delete mode 100644 packages/backend/README.md delete mode 100644 packages/backend/env/index.js delete mode 100644 packages/backend/jest.config.js delete mode 100644 packages/backend/package.json delete mode 100644 packages/backend/src/api/core/BackendManagerService.ts delete mode 100644 packages/backend/src/api/core/BackendProxy.ts delete mode 100644 packages/backend/src/api/core/Capability.ts delete mode 100644 packages/backend/src/api/core/CapabilityResponse.ts delete mode 100644 packages/backend/src/api/core/CapabilityResponseStatus.ts delete mode 100644 packages/backend/src/api/core/Service.ts delete mode 100644 packages/backend/src/api/core/index.ts delete mode 100644 packages/backend/src/api/http/HttpBridge.ts delete mode 100644 packages/backend/src/api/http/HttpRequest.ts delete mode 100644 packages/backend/src/api/http/HttpResponse.ts delete mode 100644 packages/backend/src/api/http/HttpService.ts delete mode 100644 packages/backend/src/api/http/LocalHttpServer.ts delete mode 100644 packages/backend/src/api/http/LocalHttpService.ts delete mode 100644 packages/backend/src/api/http/index.ts delete mode 100644 packages/backend/src/api/index.ts delete mode 100644 packages/backend/src/channel-api/ServiceId.ts delete mode 100644 packages/backend/src/channel-api/capability/CapabilityChannelApi.ts delete mode 100644 packages/backend/src/channel-api/capability/index.ts delete mode 100644 packages/backend/src/channel-api/capability/testScenarioRunner/TestResult.ts delete mode 100644 packages/backend/src/channel-api/capability/testScenarioRunner/TestScenarioRunnerCapability.ts delete mode 100644 packages/backend/src/channel-api/capability/testScenarioRunner/index.ts delete mode 100644 packages/backend/src/channel-api/extension/BackendExtensionApi.ts delete mode 100644 packages/backend/src/channel-api/extension/index.ts delete mode 100644 packages/backend/src/channel-api/index.ts delete mode 100644 packages/backend/src/http-bridge/DefaultHttpBridge.ts delete mode 100644 packages/backend/src/http-bridge/index.ts delete mode 100644 packages/backend/src/i18n/BackendI18n.ts delete mode 100644 packages/backend/src/i18n/index.ts delete mode 100644 packages/backend/src/i18n/locales/de.ts delete mode 100644 packages/backend/src/i18n/locales/en.ts delete mode 100644 packages/backend/src/i18n/locales/index.ts delete mode 100644 packages/backend/src/i18n/setup.ts delete mode 100644 packages/backend/src/node/QuarkusLocalServer.ts delete mode 100644 packages/backend/src/node/TestScenarioRunnerService.ts delete mode 100644 packages/backend/src/node/index.ts delete mode 100644 packages/backend/src/node/utils.ts delete mode 100644 packages/backend/src/vscode/VsCodeBackendProxy.ts delete mode 100644 packages/backend/src/vscode/VsCodeTestScenarioRunnerService.ts delete mode 100644 packages/backend/src/vscode/index.ts delete mode 100644 packages/backend/tests/api/core/BackendManagerService.test.ts delete mode 100644 packages/backend/tests/api/core/BackendProxy.test.ts delete mode 100644 packages/backend/tests/api/core/CapabilityResponse.test.ts delete mode 100644 packages/backend/tests/api/dummyServices.ts delete mode 100644 packages/backend/tests/api/http/HttpService.test.ts delete mode 100644 packages/backend/tests/api/http/LocalHttpService.test.ts delete mode 100644 packages/backend/tests/http-bridge/DefaultHttpBridge.test.ts delete mode 100644 packages/backend/tests/node/QuarkusLocalServer.test.ts delete mode 100644 packages/backend/tests/node/utils.test.ts delete mode 100644 packages/backend/tsconfig.json delete mode 100644 packages/backend/tsconfig.tests.json diff --git a/examples/base64png-editor-vscode-extension/package.json b/examples/base64png-editor-vscode-extension/package.json index 0e70e043272..6155b482575 100644 --- a/examples/base64png-editor-vscode-extension/package.json +++ b/examples/base64png-editor-vscode-extension/package.json @@ -23,7 +23,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/i18n": "workspace:*", "@kie-tools-core/patternfly-base": "workspace:*", diff --git a/examples/base64png-editor-vscode-extension/src/extension.ts b/examples/base64png-editor-vscode-extension/src/extension.ts index 93e2dccc967..46efb46d375 100644 --- a/examples/base64png-editor-vscode-extension/src/extension.ts +++ b/examples/base64png-editor-vscode-extension/src/extension.ts @@ -19,21 +19,13 @@ import * as vscode from "vscode"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; import * as path from "path"; import * as fs from "fs"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -let backendProxy: VsCodeBackendProxy; - export function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - backendProxy = new VsCodeBackendProxy(context, backendI18n); - /** * Starts the extension and set initial properties: * @@ -58,7 +50,6 @@ export function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/envelope/index.js" }, }), ]), - backendProxy: backendProxy, }); /** @@ -92,5 +83,4 @@ export function activate(context: vscode.ExtensionContext) { export function deactivate() { console.info("Extension is deactivating"); - backendProxy?.stopServices(); } diff --git a/packages/backend/LICENSE b/packages/backend/LICENSE deleted file mode 100644 index 261eeb9e9f8..00000000000 --- a/packages/backend/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/packages/backend/README.md b/packages/backend/README.md deleted file mode 100644 index 0a65c0e8f01..00000000000 --- a/packages/backend/README.md +++ /dev/null @@ -1,44 +0,0 @@ - - -Apache KIE Tools Backend API - ---- - -Apache KIE (incubating) is an effort undergoing incubation at The Apache Software -Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is -required of all newly accepted projects until a further review indicates that -the infrastructure, communications, and decision making process have stabilized -in a manner consistent with other successful ASF projects. While incubation -status is not necessarily a reflection of the completeness or stability of the -code, it does indicate that the project has yet to be fully endorsed by the ASF. - -Some of the incubating project’s releases may not be fully compliant with ASF -policy. For example, releases may have incomplete or un-reviewed licensing -conditions. What follows is a list of known issues the project is currently -aware of (note that this list, by definition, is likely to be incomplete): - -- Hibernate, an LGPL project, is being used. Hibernate is in the process of - relicensing to ASL v2 -- Some files, particularly test files, and those not supporting comments, may - be missing the ASF Licensing Header - -If you are planning to incorporate this work into your product/project, please -be aware that you will need to conduct a thorough licensing review to determine -the overall implications of including this work. For the current status of this -project through the Apache Incubator visit: -https://incubator.apache.org/projects/kie.html diff --git a/packages/backend/env/index.js b/packages/backend/env/index.js deleted file mode 100644 index 61bc742bd66..00000000000 --- a/packages/backend/env/index.js +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env"); - -module.exports = composeEnv([require("@kie-tools/root-env/env")], { - vars: varsWithName({}), - get env() { - return {}; - }, -}); diff --git a/packages/backend/jest.config.js b/packages/backend/jest.config.js deleted file mode 100644 index e26a965fbbf..00000000000 --- a/packages/backend/jest.config.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -const { config, typescriptTransform } = require("@kie-tools/jest-base/jest.config"); - -/** @type {import('ts-jest').JestConfigWithTsJest} */ -module.exports = { - ...config, - testEnvironment: "node", - transform: { - ...typescriptTransform, - }, -}; diff --git a/packages/backend/package.json b/packages/backend/package.json deleted file mode 100644 index 792009c6f83..00000000000 --- a/packages/backend/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@kie-tools-core/backend", - "version": "0.0.0", - "description": "", - "license": "Apache-2.0", - "keywords": [], - "homepage": "https://github.com/apache/incubator-kie-tools", - "repository": { - "type": "git", - "url": "https://github.com/apache/incubator-kie-tools.git" - }, - "bugs": { - "url": "https://github.com/apache/incubator-kie-tools/issues" - }, - "files": [ - "dist", - "src" - ], - "scripts": { - "build:dev": "rimraf dist && tsc -p tsconfig.json", - "build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json && pnpm test", - "lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"", - "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" - }, - "dependencies": { - "@kie-tools-core/i18n": "workspace:*", - "@kie-tools-core/notifications": "workspace:*", - "@kie-tools-core/workspace": "workspace:*", - "axios": "^1.7.4", - "fast-xml-parser": "^4.4.1", - "portfinder": "^1.0.32", - "semver": "^7.5.4", - "sinon": "^11.1.1" - }, - "devDependencies": { - "@babel/core": "^7.16.0", - "@babel/preset-env": "^7.16.0", - "@babel/preset-react": "^7.16.0", - "@kie-tools/eslint": "workspace:*", - "@kie-tools/jest-base": "workspace:*", - "@kie-tools/root-env": "workspace:*", - "@kie-tools/tsconfig": "workspace:*", - "@types/jest": "^29.5.12", - "@types/jest-when": "^3.5.5", - "@types/semver": "^7.5.2", - "@types/sinon": "^10.0.2", - "@types/vscode": "1.67.0", - "jest": "^29.7.0", - "jest-junit": "^16.0.0", - "jest-when": "^3.6.0", - "rimraf": "^3.0.2", - "stream": "^0.0.2", - "ts-jest": "^29.1.5", - "typescript": "^5.5.3" - } -} diff --git a/packages/backend/src/api/core/BackendManagerService.ts b/packages/backend/src/api/core/BackendManagerService.ts deleted file mode 100644 index a33e22d9afa..00000000000 --- a/packages/backend/src/api/core/BackendManagerService.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { HttpBridge, HttpService, LocalHttpServer, LocalHttpService } from ".."; -import { Service } from "./Service"; - -/** - * Service responsible for managing all backend services. - */ -export class BackendManagerService implements Service { - private readonly serviceRegistry: Map = new Map(); - - /** - * @param args.bridge Service bridge. Required to start up HTTP services. - * @param args.localHttpServer Local HTTP server. Required to start up local HTTP services. - * @param args.bootstrapServices Services that should be started up along with the backend manager. - * @param args.lazyServices Services that should be started upon the first usage. - */ - public constructor( - private readonly args: { - bridge?: HttpBridge; - localHttpServer?: LocalHttpServer; - bootstrapServices?: Service[]; - lazyServices?: Service[]; - } - ) {} - - public identify(): string { - return "BACKEND_MANAGER"; - } - - public async start(): Promise { - if (this.args.localHttpServer) { - await this.registerService(this.args.localHttpServer); - } - - if (!this.args.bootstrapServices || this.args.bootstrapServices.length === 0) { - return; - } - - for (const service of this.args.bootstrapServices) { - await this.registerService(service); - } - } - - public stop(): void { - this.serviceRegistry.forEach((service) => service.stop()); - this.serviceRegistry.clear(); - } - - public async satisfyRequirements(): Promise { - return true; - } - - /** - * Register and start up a new service. - * @param service Service to be registered. - * @returns True if registration succeeded otherwise false. - */ - public async registerService(service: Service): Promise { - if (this.serviceRegistry.has(service.identify())) { - return true; - } - - if (!(await service.satisfyRequirements())) { - console.warn(`Could not satisfy requirements for service ${service.identify()}. Skipping registration.`); - return false; - } - - try { - await service.start(); - - if (service instanceof HttpService) { - if (!this.args.bridge) { - console.warn(`Could not register an HTTP service (${service.identify()}) without having an HTTP bridge.`); - return false; - } - service.registerHttpBridge(this.args.bridge); - } - - if (service instanceof LocalHttpService) { - if (!this.args.localHttpServer || !this.serviceRegistry.get(this.args.localHttpServer.identify())) { - console.warn( - `Could not register a local HTTP service (${service.identify()}) without having a local server registered.` - ); - return false; - } - service.registerPort(this.args.localHttpServer.getPort()); - } - - this.serviceRegistry.set(service.identify(), service); - return true; - } catch (e) { - console.error(`An error has occurred while starting ${service.identify()} up: ${e}`); - return false; - } - } - - /** - * Look up for a service from the registry by its identifier. - * @param id The identifier of the service. - * @returns The required service if it is registered otherwise undefined. - */ - public async getService(id: string): Promise { - const registeredService = this.serviceRegistry.get(id); - - if (registeredService) { - return registeredService as T; - } - - if (!this.args.lazyServices || this.args.lazyServices.length === 0) { - return; - } - - const lazyService = this.args.lazyServices.find((s) => s.identify() === id); - - if (!lazyService || !(await this.registerService(lazyService))) { - return; - } - - return lazyService as T; - } -} diff --git a/packages/backend/src/api/core/BackendProxy.ts b/packages/backend/src/api/core/BackendProxy.ts deleted file mode 100644 index 4906cbb64e7..00000000000 --- a/packages/backend/src/api/core/BackendProxy.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { BackendManagerService } from "./BackendManagerService"; -import { Capability } from "./Capability"; -import { CapabilityResponse } from "./CapabilityResponse"; - -/** - * Expose all relevant methods for clients accessing backend services. - */ -export class BackendProxy { - protected backendManager: BackendManagerService | undefined; - - /** - * Register the backend manager. - * @param backendManager The backend manager - */ - public registerBackendManager(backendManager: BackendManagerService) { - this.backendManager = backendManager; - } - - /** - * Execute the given callback if the capability is resolved otherwise reject the promise. - * @param serviceId Id of the service associated with the capability. - * @param consumer Consumer to run. - */ - public async withCapability( - serviceId: string, - consumer: (capability: T) => Promise> - ): Promise> { - if (!this.backendManager) { - return CapabilityResponse.missingInfra(); - } - - const service = await this.backendManager.getService(serviceId); - - if (!service) { - return CapabilityResponse.notAvailable(`Service ${serviceId} not available.`); - } - - return consumer(service as Capability as T); - } - - /** - * Stop all backend services through backend manager. - */ - public stopServices(): void { - if (!this.backendManager) { - return; - } - this.backendManager.stop(); - } -} diff --git a/packages/backend/src/api/core/Capability.ts b/packages/backend/src/api/core/Capability.ts deleted file mode 100644 index b4344740817..00000000000 --- a/packages/backend/src/api/core/Capability.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Base interface for all capabilities. - */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface Capability {} diff --git a/packages/backend/src/api/core/CapabilityResponse.ts b/packages/backend/src/api/core/CapabilityResponse.ts deleted file mode 100644 index 7127efcc746..00000000000 --- a/packages/backend/src/api/core/CapabilityResponse.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { CapabilityResponseStatus } from "./CapabilityResponseStatus"; - -/** - * Arguments to build a capability response. - */ -interface CapabilityResponseArgs { - status: CapabilityResponseStatus; - body?: T; - message?: string; -} - -/** - * Wrapper object for capability responses. - */ -export class CapabilityResponse { - public readonly status: CapabilityResponseStatus; - public readonly body?: T; - public readonly message?: string; - public constructor(args: CapabilityResponseArgs) { - this.status = args.status; - this.body = args.body; - this.message = args.message; - } - - /** - * Utility to create a response with OK status and optional body. - * @param body Optional body that the response can include. - * @returns A capability response with OK status. - */ - public static ok(body?: U): CapabilityResponse { - return new CapabilityResponse({ status: CapabilityResponseStatus.OK, body: body }); - } - - /** - * Utility to create a response with NOT_AVAILABLE status and message. - * @param message Message associated with the unavailability of the capability. - * @returns A capability response with NOT_AVAILABLE status. - */ - public static notAvailable(message: string): CapabilityResponse { - return new CapabilityResponse({ status: CapabilityResponseStatus.NOT_AVAILABLE, message: message }); - } - - /** - * Utility to create a response with MISSING_INFRA status. - * @returns A capability response with MISSING_INFRA status. - */ - public static missingInfra(): CapabilityResponse { - return new CapabilityResponse({ status: CapabilityResponseStatus.MISSING_INFRA }); - } -} diff --git a/packages/backend/src/api/core/CapabilityResponseStatus.ts b/packages/backend/src/api/core/CapabilityResponseStatus.ts deleted file mode 100644 index a25d477754b..00000000000 --- a/packages/backend/src/api/core/CapabilityResponseStatus.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Available status for capability responses. - */ -export enum CapabilityResponseStatus { - /** - * Response completed. - */ - OK = "OK", - - /** - * Infrastructure for capabilities is not available. - */ - MISSING_INFRA = "MISSING_INFRA", - - /** - * Requested capability could not be resolved. - */ - NOT_AVAILABLE = "NOT_AVAILABLE", -} diff --git a/packages/backend/src/api/core/Service.ts b/packages/backend/src/api/core/Service.ts deleted file mode 100644 index 3651dac86c7..00000000000 --- a/packages/backend/src/api/core/Service.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * A service that has an identity and lifecycle methods. - */ -export interface Service { - /** - * Inform the identity of the service. - */ - identify(): string; - - /** - * Start the service. - */ - start(): Promise; - - /** - * Stop the service. - */ - stop(): void; - - /** - * Check whether all requirements are met or not before starting the service up. - */ - satisfyRequirements(): Promise; -} diff --git a/packages/backend/src/api/core/index.ts b/packages/backend/src/api/core/index.ts deleted file mode 100644 index 8bc571c31b0..00000000000 --- a/packages/backend/src/api/core/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { BackendManagerService } from "./BackendManagerService"; -export { BackendProxy } from "./BackendProxy"; -export { Capability } from "./Capability"; -export { CapabilityResponse } from "./CapabilityResponse"; -export { CapabilityResponseStatus } from "./CapabilityResponseStatus"; -export { Service } from "./Service"; diff --git a/packages/backend/src/api/http/HttpBridge.ts b/packages/backend/src/api/http/HttpBridge.ts deleted file mode 100644 index 109f44df506..00000000000 --- a/packages/backend/src/api/http/HttpBridge.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { HttpRequest } from "./HttpRequest"; -import { HttpResponse } from "./HttpResponse"; - -/** - * Bridge between channels and external services accessed through HTTP. - */ -export interface HttpBridge { - /** - * Perform a request to a server and return a response. - * @param request The request to the server - * @returns The response associated with the request. - */ - request(request: HttpRequest): Promise; -} diff --git a/packages/backend/src/api/http/HttpRequest.ts b/packages/backend/src/api/http/HttpRequest.ts deleted file mode 100644 index f16540684c0..00000000000 --- a/packages/backend/src/api/http/HttpRequest.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Represent an HTTP request. - */ -export interface HttpRequest { - /** - * The endpoint to send the request. - */ - endpoint: string; - /** - * Optional body request. - */ - body?: any; -} diff --git a/packages/backend/src/api/http/HttpResponse.ts b/packages/backend/src/api/http/HttpResponse.ts deleted file mode 100644 index 9c07f30fdbe..00000000000 --- a/packages/backend/src/api/http/HttpResponse.ts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Represent an HTTP response. - */ -export interface HttpResponse { - /** - * Optional body response. - */ - body?: any; -} diff --git a/packages/backend/src/api/http/HttpService.ts b/packages/backend/src/api/http/HttpService.ts deleted file mode 100644 index dabdf911be2..00000000000 --- a/packages/backend/src/api/http/HttpService.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Service } from ".."; -import { HttpBridge } from "./HttpBridge"; -import { HttpResponse } from "./HttpResponse"; - -/** - * A service that makes HTTP requests. - */ -export abstract class HttpService implements Service { - private bridge: HttpBridge | undefined; - - public abstract identify(): string; - - public async start(): Promise { - /* Nothing to do here as default implementation */ - } - - public stop(): void { - /* Nothing to do here as default implementation */ - } - - public async satisfyRequirements(): Promise { - return true; - } - - /** - * Register the HTTP bridge to be used when making requests. - * @param bridge The HTTP bridge. - */ - public registerHttpBridge(bridge: HttpBridge): void { - this.bridge = bridge; - } - - /** - * Execute a request. - * @param endpoint Full path endpoint. - * @param body Optional request body. - * @returns The Http response. - */ - public execute(endpoint: string, body?: any): Promise { - if (!this.bridge) { - return Promise.reject("Service bridge is not registered."); - } - return this.bridge.request({ endpoint: endpoint, body: body }); - } -} diff --git a/packages/backend/src/api/http/LocalHttpServer.ts b/packages/backend/src/api/http/LocalHttpServer.ts deleted file mode 100644 index 6e618eba63c..00000000000 --- a/packages/backend/src/api/http/LocalHttpServer.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Service } from ".."; - -/** - * A service that controls a local HTTP server. - */ -export abstract class LocalHttpServer implements Service { - /** - * Port number of the local http server. - */ - protected port: number; - - /** - * Inform the registered port. - */ - public getPort(): number { - return this.port; - } - - public abstract identify(): string; - - public abstract start(): Promise; - - public abstract stop(): void; - - public abstract satisfyRequirements(): Promise; -} diff --git a/packages/backend/src/api/http/LocalHttpService.ts b/packages/backend/src/api/http/LocalHttpService.ts deleted file mode 100644 index abd4e4d8207..00000000000 --- a/packages/backend/src/api/http/LocalHttpService.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { HttpResponse } from "./HttpResponse"; -import { HttpService } from "./HttpService"; - -/** - * A service that makes local HTTP requests. - */ -export abstract class LocalHttpService extends HttpService { - private readonly hostname = "http://localhost"; - private port: number | undefined; - - /** - * Register the local HTTP port to use when making requests. - * @param port The port to be accessed. - */ - public registerPort(port: number): void { - this.port = port; - } - - /** - * Execute a local request. - * @param path Path of the local endpoint. - * @param body Optional request body. - * @returns The Http response. - */ - public execute(path: string, body?: any): Promise { - if (!this.port) { - return Promise.reject("Local port not registered."); - } - return super.execute(`${this.hostname}:${this.port}${path}`, body); - } -} diff --git a/packages/backend/src/api/http/index.ts b/packages/backend/src/api/http/index.ts deleted file mode 100644 index a6fe6a346e6..00000000000 --- a/packages/backend/src/api/http/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { HttpBridge } from "./HttpBridge"; -export { HttpRequest } from "./HttpRequest"; -export { HttpResponse } from "./HttpResponse"; -export { HttpService } from "./HttpService"; -export { LocalHttpServer } from "./LocalHttpServer"; -export { LocalHttpService } from "./LocalHttpService"; diff --git a/packages/backend/src/api/index.ts b/packages/backend/src/api/index.ts deleted file mode 100644 index 757c0c8aec5..00000000000 --- a/packages/backend/src/api/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from "./core"; -export * from "./http"; diff --git a/packages/backend/src/channel-api/ServiceId.ts b/packages/backend/src/channel-api/ServiceId.ts deleted file mode 100644 index a2b36e1697b..00000000000 --- a/packages/backend/src/channel-api/ServiceId.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Identification of services. - */ -export enum ServiceId { - TEST_SCENARIO_RUNNER = "TEST_SCENARIO_RUNNER", -} diff --git a/packages/backend/src/channel-api/capability/CapabilityChannelApi.ts b/packages/backend/src/channel-api/capability/CapabilityChannelApi.ts deleted file mode 100644 index 33d3b87456f..00000000000 --- a/packages/backend/src/channel-api/capability/CapabilityChannelApi.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface CapabilityChannelApi { - // receive_xxx methods go here. -} diff --git a/packages/backend/src/channel-api/capability/index.ts b/packages/backend/src/channel-api/capability/index.ts deleted file mode 100644 index 2922f5e6e26..00000000000 --- a/packages/backend/src/channel-api/capability/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { CapabilityChannelApi } from "./CapabilityChannelApi"; -export * from "./testScenarioRunner"; diff --git a/packages/backend/src/channel-api/capability/testScenarioRunner/TestResult.ts b/packages/backend/src/channel-api/capability/testScenarioRunner/TestResult.ts deleted file mode 100644 index c0be0ffcfbb..00000000000 --- a/packages/backend/src/channel-api/capability/testScenarioRunner/TestResult.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export interface TestResult { - /** - * Path of the result file. - */ - filePath: string; - /** - * Number of tests. - */ - tests: number; - /** - * Number of errors. - */ - errors: number; - /** - * Number of skipped. - */ - skipped: number; - /** - * Number of failures. - */ - failures: number; -} diff --git a/packages/backend/src/channel-api/capability/testScenarioRunner/TestScenarioRunnerCapability.ts b/packages/backend/src/channel-api/capability/testScenarioRunner/TestScenarioRunnerCapability.ts deleted file mode 100644 index 91a2fcf6f39..00000000000 --- a/packages/backend/src/channel-api/capability/testScenarioRunner/TestScenarioRunnerCapability.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { Capability, CapabilityResponse } from "../../../api"; -import { TestResult } from "./TestResult"; - -/** - * Capability for running test scenarios. - */ -export interface TestScenarioRunnerCapability extends Capability { - /** - * Execute a `mvn clean test` on the given `baseDir` and report back the result. - * @param baseDir Directory path where the `pom.xml` file is located. - * @param runnerClass Fully qualified class name of the runner, e.g. `testscenario.KogitoScenarioJunitActivatorTest`. - * @returns Test result. - */ - execute(baseDir: string, runnerClass: string): Promise>; - - /** - * Stop the current active execution, if any. - */ - stopActiveExecution(): void; -} diff --git a/packages/backend/src/channel-api/capability/testScenarioRunner/index.ts b/packages/backend/src/channel-api/capability/testScenarioRunner/index.ts deleted file mode 100644 index 6ca7db4a002..00000000000 --- a/packages/backend/src/channel-api/capability/testScenarioRunner/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { TestResult } from "./TestResult"; -export { TestScenarioRunnerCapability } from "./TestScenarioRunnerCapability"; diff --git a/packages/backend/src/channel-api/extension/BackendExtensionApi.ts b/packages/backend/src/channel-api/extension/BackendExtensionApi.ts deleted file mode 100644 index 458415d3d09..00000000000 --- a/packages/backend/src/channel-api/extension/BackendExtensionApi.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { BackendManagerService } from "../../api"; - -/** - * Backend API exposed by an extension. - */ -export interface BackendExtensionApi { - backendManager: BackendManagerService; -} diff --git a/packages/backend/src/channel-api/extension/index.ts b/packages/backend/src/channel-api/extension/index.ts deleted file mode 100644 index 47bae19d820..00000000000 --- a/packages/backend/src/channel-api/extension/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { BackendExtensionApi } from "./BackendExtensionApi"; diff --git a/packages/backend/src/channel-api/index.ts b/packages/backend/src/channel-api/index.ts deleted file mode 100644 index 2fd471338d7..00000000000 --- a/packages/backend/src/channel-api/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from "./capability"; -export * from "./extension"; -export { ServiceId } from "./ServiceId"; diff --git a/packages/backend/src/http-bridge/DefaultHttpBridge.ts b/packages/backend/src/http-bridge/DefaultHttpBridge.ts deleted file mode 100644 index 13535670e7a..00000000000 --- a/packages/backend/src/http-bridge/DefaultHttpBridge.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import axios, { AxiosError } from "axios"; -import { HttpBridge, HttpRequest, HttpResponse } from "../api"; - -/** - * Default bridge between channels and external services that are accessed through HTTP. - */ -export class DefaultHttpBridge implements HttpBridge { - public async request(request: HttpRequest): Promise { - try { - const response = request.body - ? await axios.post(request.endpoint, request.body) - : await axios.get(request.endpoint); - return { body: response.data }; - } catch (e) { - let message = e.message; - - const axiosError = e as AxiosError; - if (axiosError.config?.url) { - message += " " + axiosError.config.url; - } - - return Promise.reject(message); - } - } -} diff --git a/packages/backend/src/http-bridge/index.ts b/packages/backend/src/http-bridge/index.ts deleted file mode 100644 index 60838c99815..00000000000 --- a/packages/backend/src/http-bridge/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { DefaultHttpBridge } from "./DefaultHttpBridge"; diff --git a/packages/backend/src/i18n/BackendI18n.ts b/packages/backend/src/i18n/BackendI18n.ts deleted file mode 100644 index c4fbd4da55d..00000000000 --- a/packages/backend/src/i18n/BackendI18n.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { ReferenceDictionary } from "@kie-tools-core/i18n/dist/core"; - -interface BackendDictionary extends ReferenceDictionary { - dontShowAgain: string; - installExtension: string; - installBackendExtensionMessage: string; - viewTestSummary: string; - runningTestScenarios: string; - testScenarioSummary: (tests: number, errors: number, skipped: number, failures: number) => string; -} - -export interface BackendI18n extends BackendDictionary {} diff --git a/packages/backend/src/i18n/index.ts b/packages/backend/src/i18n/index.ts deleted file mode 100644 index 424796ab1c9..00000000000 --- a/packages/backend/src/i18n/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export * from "./BackendI18n"; -export * from "./setup"; diff --git a/packages/backend/src/i18n/locales/de.ts b/packages/backend/src/i18n/locales/de.ts deleted file mode 100644 index 203335c7c23..00000000000 --- a/packages/backend/src/i18n/locales/de.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { BackendI18n } from ".."; - -export const de: BackendI18n = { - dontShowAgain: "Nicht mehr anzeigen", - installExtension: "Installieren", - installBackendExtensionMessage: - "Installieren Sie die Backend-Erweiterung, um die Möglichkeiten der Editoren zu erweitern.", - viewTestSummary: "Zusammenfassung anzeigen", - runningTestScenarios: "Ausführung von Testszenarien ...", - testScenarioSummary: (tests: number, errors: number, skipped: number, failures: number) => - `Vollständige Ausführung von ${tests} Tests (Fehler: ${errors}, Übersprungen: ${skipped}, Fehlschläge: ${failures})`, -}; diff --git a/packages/backend/src/i18n/locales/en.ts b/packages/backend/src/i18n/locales/en.ts deleted file mode 100644 index 3f98295668e..00000000000 --- a/packages/backend/src/i18n/locales/en.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { BackendI18n } from ".."; - -export const en: BackendI18n = { - dontShowAgain: "Don't Show Again", - installExtension: "Install", - installBackendExtensionMessage: - "Consider installing the backend extension to augment the capabilities of the editors.", - viewTestSummary: "View summary", - runningTestScenarios: "Running test scenarios ...", - testScenarioSummary: (tests: number, errors: number, skipped: number, failures: number) => - `Completed execution of ${tests} tests (errors: ${errors}, skipped: ${skipped}, failures: ${failures})`, -}; diff --git a/packages/backend/src/i18n/locales/index.ts b/packages/backend/src/i18n/locales/index.ts deleted file mode 100644 index ce52f5ba8d3..00000000000 --- a/packages/backend/src/i18n/locales/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { en } from "./en"; -export { de } from "./de"; diff --git a/packages/backend/src/i18n/setup.ts b/packages/backend/src/i18n/setup.ts deleted file mode 100644 index 81c51e12119..00000000000 --- a/packages/backend/src/i18n/setup.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { I18nDefaults, I18nDictionaries } from "@kie-tools-core/i18n/dist/core"; -import { BackendI18n } from "./BackendI18n"; -import { en } from "./locales"; -import { de } from "./locales"; - -export const backendI18nDefaults: I18nDefaults = { locale: "en", dictionary: en }; -export const backendI18nDictionaries: I18nDictionaries = new Map([ - ["en", en], - ["de", de], -]); diff --git a/packages/backend/src/node/QuarkusLocalServer.ts b/packages/backend/src/node/QuarkusLocalServer.ts deleted file mode 100644 index 44602abb0f3..00000000000 --- a/packages/backend/src/node/QuarkusLocalServer.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import * as cp from "child_process"; -import * as fs from "fs"; -import { getPortPromise } from "portfinder"; -import { LocalHttpServer } from "../api"; -import * as utils from "./utils"; - -export class QuarkusLocalServer extends LocalHttpServer { - private activeProcess: cp.ChildProcess | undefined; - - public constructor(private readonly jarFilePath: string) { - super(); - } - - public identify(): string { - return "QUARKUS_LOCAL_SERVER"; - } - - public async start(): Promise { - this.activeProcess = cp.spawn("java", [`-Dquarkus.http.port=${this.port}`, "-jar", this.jarFilePath]); - - const timeoutPromise = new Promise((resolve) => { - setTimeout(() => { - resolve(false); - }, 5000); - }); - - const checkServerPromise = new Promise((resolve) => { - if (!this.activeProcess || !this.activeProcess.stdout) { - resolve(false); - return; - } - - this.activeProcess.stdout.on("data", (data) => { - if (data.toString().includes("Listening on")) { - resolve(true); - } - }); - }); - - return Promise.race([timeoutPromise, checkServerPromise]).then((result: boolean) => { - if (!result) { - throw new Error("Could not start the Quarkus local server."); - } - }); - } - - public stop(): void { - if (!this.activeProcess) { - return; - } - utils.killProcess(this.activeProcess); - this.activeProcess = undefined; - } - - public async satisfyRequirements(): Promise { - if (!fs.existsSync(this.jarFilePath)) { - console.error(`${this.jarFilePath} does not exist.`); - return false; - } - - if (!(await utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 }))) { - console.error("Java 11.0.0+ could not be identified."); - return false; - } - - try { - this.port = await getPortPromise({ port: 8082 }); - return true; - } catch (e) { - console.error(e); - return false; - } - } -} diff --git a/packages/backend/src/node/TestScenarioRunnerService.ts b/packages/backend/src/node/TestScenarioRunnerService.ts deleted file mode 100644 index 8dddcff292d..00000000000 --- a/packages/backend/src/node/TestScenarioRunnerService.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import * as cp from "child_process"; -import { XMLParser } from "fast-xml-parser"; -import * as fs from "fs"; -import * as path from "path"; -import { CapabilityResponse, Service } from "../api"; -import { ServiceId, TestResult, TestScenarioRunnerCapability } from "../channel-api"; -import * as utils from "./utils"; - -export class TestScenarioRunnerService implements Service, TestScenarioRunnerCapability { - private activeProcess: cp.ChildProcess | undefined; - - public identify(): string { - return ServiceId.TEST_SCENARIO_RUNNER; - } - - public async start(): Promise { - /* Nothing to do here */ - } - - public stop(): void { - if (!this.activeProcess) { - return; - } - - utils.killProcess(this.activeProcess); - this.activeProcess = undefined; - } - - public async satisfyRequirements(): Promise { - if (!(await utils.isMavenAvailable({ major: 3, minor: 6, patch: 2 }))) { - console.error("Maven 3.6.2+ could not be identified."); - return false; - } - - if (!(await utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 }))) { - console.error("Java 11.0.0+ could not be identified."); - return false; - } - - return true; - } - - public stopActiveExecution() { - this.stop(); - } - - public execute(baseDir: string, runnerClass: string): Promise> { - if (!fs.existsSync(path.join(baseDir, "pom.xml"))) { - return Promise.reject(`Unable to find a pom.xml file inside ${baseDir}`); - } - - if (!fs.existsSync(path.join(baseDir, "src", "test", "java", runnerClass.replace(".", path.sep) + ".java"))) { - return Promise.reject(`Unable to find ${runnerClass} file in the src/test/java folder`); - } - - return new Promise((resolve, reject) => { - this.stopActiveExecution(); - - this.activeProcess = cp.spawn("mvn", ["clean", "test", "-f", baseDir]); - - this.activeProcess.on("exit", (code: number | null) => { - if (code !== 0) { - resolve(CapabilityResponse.ok()); - return; - } - - const resultFilePath = path.join(baseDir, "target", "surefire-reports", runnerClass + ".txt"); - - if (!fs.existsSync(resultFilePath)) { - reject("Test report file could not be found."); - return; - } - - const resultXmlPath = path.join(baseDir, "target", "surefire-reports", "TEST-" + runnerClass + ".xml"); - const parser = new XMLParser({ - attributeNamePrefix: "", - removeNSPrefix: true, - ignoreAttributes: false, - parseAttributeValue: true, - trimValues: true, - }); - const attrsMap = parser.parse(fs.readFileSync(resultXmlPath).toString()).testsuites.testsuite[0]; - - resolve( - CapabilityResponse.ok({ - filePath: resultFilePath, - tests: attrsMap.tests, - errors: attrsMap.errors, - failures: attrsMap.failures, - skipped: attrsMap.skipped, - }) - ); - }); - }); - } -} diff --git a/packages/backend/src/node/index.ts b/packages/backend/src/node/index.ts deleted file mode 100644 index 9b0215e53e0..00000000000 --- a/packages/backend/src/node/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { QuarkusLocalServer } from "./QuarkusLocalServer"; -export { TestScenarioRunnerService } from "./TestScenarioRunnerService"; -export * from "./utils"; diff --git a/packages/backend/src/node/utils.ts b/packages/backend/src/node/utils.ts deleted file mode 100644 index 2f9c454b4f1..00000000000 --- a/packages/backend/src/node/utils.ts +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import * as cp from "child_process"; -import * as os from "os"; -import { lte } from "semver"; - -interface Version { - major: number; - minor: number; - patch: number; -} - -/** - * Verify if Maven is installed on the local machine. - * @param version Optional minimum version to match. - * @returns Whether Maven is installed or not. - */ -export function isMavenAvailable(version?: Version): Promise { - return new Promise((resolve) => { - cp.exec("mvn -version", (error, stdout, _) => { - if (error) { - resolve(false); - return; - } - - const firstLine = stdout.toString().split("\n")[0]; - const regexMatch = new RegExp("^(Apache Maven) (\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:[_\\.](\\d+))?)?)?").exec( - firstLine - ); - - if (!regexMatch) { - resolve(false); - return; - } - - if (!version) { - resolve(!!regexMatch); - return; - } - - const [, , major, minor, patch] = regexMatch; - - const requiredVersion = Object.values(version).join("."); - const actualVersion = `${+major}.${minor ? +minor : 0}.${patch ? +patch : 0}`; - - resolve(lte(requiredVersion, actualVersion)); - }); - }); -} - -/** - * Verify if Java is installed on the local machine. - * @param version Optional minimum version to match. - * @returns Whether Java is installed or not. - */ -export function isJavaAvailable(version?: Version): Promise { - return new Promise((resolve) => { - cp.exec("java -version", (error, _, stderr) => { - if (error) { - resolve(false); - return; - } - - const firstLine = stderr.toString().split("\n")[0]; - const regexMatch = new RegExp( - '^(java|openjdk) (version) "?(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:[_\\.](\\d+))?)?)?"?' - ).exec(firstLine); - - if (!regexMatch) { - resolve(false); - return; - } - - if (!version) { - resolve(!!regexMatch); - return; - } - - const [, , , major, minor, patch] = regexMatch; - - const requiredVersion = Object.values(version).join("."); - const actualVersion = `${+major}.${minor ? +minor : 0}.${patch ? +patch : 0}`; - - resolve(lte(requiredVersion, actualVersion)); - }); - }); -} - -/** - * Kill the given process. - * @param process Process to be killed. - */ -export function killProcess(process: cp.ChildProcess) { - switch (os.platform()) { - case "win32": - cp.spawn("taskkill", ["/pid", process.pid!.toString(), "/f", "/t"]); - break; - case "darwin": - case "linux": - default: - process.kill("SIGINT"); - break; - } -} diff --git a/packages/backend/src/vscode/VsCodeBackendProxy.ts b/packages/backend/src/vscode/VsCodeBackendProxy.ts deleted file mode 100644 index ea991db3bfb..00000000000 --- a/packages/backend/src/vscode/VsCodeBackendProxy.ts +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { I18n } from "@kie-tools-core/i18n/dist/core/I18n"; -import * as vscode from "vscode"; -import { BackendProxy, Capability, CapabilityResponse, CapabilityResponseStatus } from "../api"; -import { BackendExtensionApi } from "../channel-api"; -import { BackendI18n } from "../i18n"; - -const SUGGEST_BACKEND_KEY = "SUGGEST_BACKEND"; - -/** - * Augmented {@link BackendProxy} for the VS Code channel. - */ -export class VsCodeBackendProxy extends BackendProxy { - /** - * @param context The `vscode.ExtensionContext` provided on the activate method of the extension. - * @param backendI18n I18n for backend services. - * @param backendExtensionId The backend extension ID in `publisher.name` format (optional). - */ - public constructor( - private readonly context: vscode.ExtensionContext, - private readonly backendI18n: I18n, - private readonly backendExtensionId?: string - ) { - super(); - } - - public async withCapability( - serviceId: string, - consumer: (capability: T) => Promise> - ): Promise> { - await this.tryLoadBackendExtension(false); - - const response = await super.withCapability(serviceId, consumer); - if (response.status === CapabilityResponseStatus.MISSING_INFRA) { - this.suggestBackendExtension(); - } - return response; - } - - /** - * Try to load the API from the backend extension if it hasn't been already loaded. - * @param suggestInstall Whether or not to suggest installing the backend extension in case it is missing. - */ - public async tryLoadBackendExtension(suggestInstall: boolean): Promise { - if (!this.backendExtensionId) { - return; // Ignoring since no backend extension ID is provided - } - - const backendExtension = vscode.extensions.getExtension(this.backendExtensionId); - - if (!backendExtension) { - if (suggestInstall) { - this.trySuggestBackendExtension(); - } - return; // Backend extension is not installed - } - - if (this.backendManager && backendExtension) { - return; // Backend extension API already loaded - } - - const backendExtensionApi: BackendExtensionApi = backendExtension.isActive - ? backendExtension.exports - : await backendExtension.activate(); - - this.backendManager = backendExtensionApi.backendManager; - } - - /** - * If `SUGGEST_BACKEND` config is enabled, - * show a notification informing the user to install the backend extension. - * This notification also includes a `Don't show again` button to disable the `SUGGEST_BACKEND` config. - */ - public trySuggestBackendExtension(): void { - const suggestBackend = this.context.globalState.get(SUGGEST_BACKEND_KEY) ?? true; - - if (!suggestBackend) { - return; - } - - const i18n = this.backendI18n.getCurrent(); - - vscode.window - .showInformationMessage(i18n.installBackendExtensionMessage, i18n.installExtension, i18n.dontShowAgain) - .then(async (selection) => { - if (!selection) { - return; - } - - if (selection === i18n.installExtension) { - await vscode.env.openExternal( - vscode.Uri.parse(`${vscode.env.uriScheme}:extension/${this.backendExtensionId}`) - ); - } - - if (selection === i18n.dontShowAgain) { - this.context.globalState.update(SUGGEST_BACKEND_KEY, false); - } - }); - } - - /** - * Show a notification informing the user to install the backend extension. - */ - public suggestBackendExtension(): void { - const i18n = this.backendI18n.getCurrent(); - - vscode.window - .showInformationMessage(i18n.installBackendExtensionMessage, i18n.installExtension) - .then(async (selection) => { - if (!selection) { - return; - } - - if (selection === i18n.installExtension) { - await vscode.env.openExternal( - vscode.Uri.parse(`${vscode.env.uriScheme}:extension/${this.backendExtensionId}`) - ); - } - }); - } -} diff --git a/packages/backend/src/vscode/VsCodeTestScenarioRunnerService.ts b/packages/backend/src/vscode/VsCodeTestScenarioRunnerService.ts deleted file mode 100644 index 248226a1601..00000000000 --- a/packages/backend/src/vscode/VsCodeTestScenarioRunnerService.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import * as vscode from "vscode"; -import { TestScenarioRunnerService } from "../node"; - -/** - * Augmented {@link TestScenarioRunnerService} for the VS Code channel. - */ -export class VsCodeTestScenarioRunnerService extends TestScenarioRunnerService { - public async satisfyRequirements(): Promise { - if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) { - console.error("There isn't any workspace folder on VS Code."); - return false; - } - - return super.satisfyRequirements(); - } -} diff --git a/packages/backend/src/vscode/index.ts b/packages/backend/src/vscode/index.ts deleted file mode 100644 index c7150e73b10..00000000000 --- a/packages/backend/src/vscode/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -export { VsCodeBackendProxy } from "./VsCodeBackendProxy"; -export { VsCodeTestScenarioRunnerService } from "./VsCodeTestScenarioRunnerService"; diff --git a/packages/backend/tests/api/core/BackendManagerService.test.ts b/packages/backend/tests/api/core/BackendManagerService.test.ts deleted file mode 100644 index 02020948d73..00000000000 --- a/packages/backend/tests/api/core/BackendManagerService.test.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { BackendManagerService, HttpBridge } from "@kie-tools-core/backend/dist/api"; -import { createMockedService, DummyHttpService, DummyLocalHttpServer, DummyLocalHttpService } from "../dummyServices"; - -const localHttpServer = new DummyLocalHttpServer(); - -describe("satisfy requirements of the backend manager service", () => { - test("should always return TRUE since there are no requirements to satisfy", async () => { - const manager = new BackendManagerService({}); - await expect(manager.satisfyRequirements()).resolves.toBeTruthy(); - }); -}); - -describe("stop the backend manager service", () => { - test("should stop all registered services", async () => { - const serviceA = createMockedService("Service A"); - const serviceB = createMockedService("Service B"); - const serviceC = createMockedService("Service C"); - const manager = new BackendManagerService({ - localHttpServer: localHttpServer, - bootstrapServices: [serviceA, serviceB], - lazyServices: [serviceC], - }); - const localServerStopFn = jest.spyOn(localHttpServer, "stop"); - await manager.start(); - await manager.getService("Service C"); - manager.stop(); - expect(serviceA.stop).toHaveBeenCalled(); - expect(serviceB.stop).toHaveBeenCalled(); - expect(serviceC.stop).toHaveBeenCalled(); - expect(localServerStopFn).toHaveBeenCalled(); - }); -}); - -describe("start the backend manager service", () => { - test("should not register when there is no service to be registered", async () => { - const manager = new BackendManagerService({}); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await manager.start(); - expect(registerServiceFn).not.toHaveBeenCalled(); - }); - - test("should only register the local http server", async () => { - const manager = new BackendManagerService({ localHttpServer: localHttpServer }); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await manager.start(); - expect(registerServiceFn).toHaveBeenCalledTimes(1); - expect(registerServiceFn).toHaveBeenCalledWith(localHttpServer); - }); - - test("should only register the bootstrap services", async () => { - const serviceA = createMockedService("Service A"); - const serviceB = createMockedService("Service B"); - const manager = new BackendManagerService({ bootstrapServices: [serviceA, serviceB] }); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await manager.start(); - expect(registerServiceFn).toHaveBeenCalledTimes(2); - expect(registerServiceFn).toHaveBeenCalledWith(serviceA); - expect(registerServiceFn).toHaveBeenCalledWith(serviceB); - }); - - test("should register both the local http server and the bootstrap services", async () => { - const serviceA = createMockedService("Service A"); - const serviceB = createMockedService("Service B"); - const manager = new BackendManagerService({ - localHttpServer: localHttpServer, - bootstrapServices: [serviceA, serviceB], - }); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await manager.start(); - expect(registerServiceFn).toHaveBeenCalledTimes(3); - expect(registerServiceFn).toHaveBeenCalledWith(localHttpServer); - expect(registerServiceFn).toHaveBeenCalledWith(serviceA); - expect(registerServiceFn).toHaveBeenCalledWith(serviceB); - }); - - test("should not register the lazy services", async () => { - const serviceA = createMockedService("Service A"); - const serviceB = createMockedService("Service B"); - const manager = new BackendManagerService({ lazyServices: [serviceA, serviceB] }); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await manager.start(); - expect(registerServiceFn).not.toHaveBeenCalled(); - }); -}); - -describe("retrieve a service", () => { - test("should return undefined when the required service is not found", async () => { - const manager = new BackendManagerService({}); - await expect(manager.getService("Unknown Service")).resolves.toBeUndefined(); - }); - - test("should return undefined when the required service is not found while having other lazy services", async () => { - const manager = new BackendManagerService({ lazyServices: [createMockedService("Service A")] }); - await expect(manager.getService("Unknown Service")).resolves.toBeUndefined(); - }); - - test("should return the required bootstrap service", async () => { - const serviceId = "Service A"; - const serviceA = createMockedService(serviceId); - const manager = new BackendManagerService({ bootstrapServices: [serviceA] }); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await manager.start(); - await expect(manager.getService(serviceId)).resolves.toBe(serviceA); - expect(registerServiceFn).toHaveBeenCalledTimes(1); - }); - - test("should register and return the required lazy service", async () => { - const serviceId = "Service A"; - const serviceA = createMockedService(serviceId); - const manager = new BackendManagerService({ lazyServices: [serviceA] }); - const registerServiceFn = jest.spyOn(manager, "registerService"); - await expect(manager.getService(serviceId)).resolves.toBe(serviceA); - expect(registerServiceFn).toHaveBeenCalled(); - }); -}); - -describe("register a new service", () => { - const httpService = new DummyHttpService(); - const localHttpService = new DummyLocalHttpService(); - const httpBridge: jest.Mocked = { - request: jest.fn(), - }; - - test("should return TRUE when the service is already registered", async () => { - const serviceA = createMockedService("Service A"); - const manager = new BackendManagerService({ bootstrapServices: [serviceA] }); - await manager.start(); - await expect(manager.registerService(serviceA)).resolves.toBeTruthy(); - }); - - test("should return FALSE when the requirements are not satisfied", async () => { - const serviceA = createMockedService("Service A", false); - const manager = new BackendManagerService({}); - await expect(manager.registerService(serviceA)).resolves.toBeFalsy(); - }); - - test("should start the service when the requirements are satisfied", async () => { - const serviceA = createMockedService("Service A"); - const manager = new BackendManagerService({}); - await expect(manager.registerService(serviceA)).resolves.toBeTruthy(); - expect(serviceA.start).toHaveBeenCalled(); - }); - - test("should return FALSE when an error occurs while starting the service up", async () => { - const serviceA = createMockedService("Service A"); - const manager = new BackendManagerService({}); - serviceA.start.mockRejectedValueOnce("Some error"); - await expect(manager.registerService(serviceA)).resolves.toBeFalsy(); - }); - - test("should return FALSE when there is no HTTP bridge for an HTTP service", async () => { - const manager = new BackendManagerService({}); - await expect(manager.registerService(httpService)).resolves.toBeFalsy(); - }); - - test("should return TRUE when there is an HTTP bridge for an HTTP service", async () => { - const manager = new BackendManagerService({ bridge: httpBridge }); - const registerHttpBridgeFn = jest.spyOn(httpService, "registerHttpBridge"); - await expect(manager.registerService(httpService)).resolves.toBeTruthy(); - expect(registerHttpBridgeFn).toHaveBeenCalled(); - }); - - test("should return FALSE when there is no HTTP bridge for a local HTTP service", async () => { - const manager = new BackendManagerService({}); - await expect(manager.registerService(localHttpService)).resolves.toBeFalsy(); - }); - - test("should return FALSE when there is no local HTTP server for a local HTTP service", async () => { - const manager = new BackendManagerService({ bridge: httpBridge }); - await expect(manager.registerService(localHttpService)).resolves.toBeFalsy(); - }); - - test("should return TRUE when there is a local HTTP server for a local HTTP service", async () => { - const manager = new BackendManagerService({ bridge: httpBridge, localHttpServer: localHttpServer }); - const registerPortFn = jest.spyOn(localHttpService, "registerPort"); - await manager.start(); - await expect(manager.registerService(localHttpService)).resolves.toBeTruthy(); - expect(registerPortFn).toHaveBeenCalled(); - }); -}); diff --git a/packages/backend/tests/api/core/BackendProxy.test.ts b/packages/backend/tests/api/core/BackendProxy.test.ts deleted file mode 100644 index 41615a9afad..00000000000 --- a/packages/backend/tests/api/core/BackendProxy.test.ts +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { - BackendManagerService, - BackendProxy, - CapabilityResponse, - CapabilityResponseStatus, -} from "@kie-tools-core/backend/dist/api"; -import { createMockedService } from "../dummyServices"; - -const backendManager = new BackendManagerService({}); - -let backendProxy: BackendProxy; -beforeEach(() => { - backendProxy = new BackendProxy(); -}); - -describe("stop services", () => { - test("should call the registered backend manager stop function", () => { - const stopFn = jest.spyOn(backendManager, "stop"); - backendProxy.registerBackendManager(backendManager); - backendProxy.stopServices(); - expect(stopFn).toHaveBeenCalled(); - }); -}); - -describe("access a capability", () => { - const testServiceId = "Service A"; - - test("should return a MISSING_INFRA response when no backend manager is registered", async () => { - const response = await backendProxy.withCapability(testServiceId, async () => CapabilityResponse.ok()); - expect(response.status).toBe(CapabilityResponseStatus.MISSING_INFRA); - }); - - test("should return a NOT_AVAILABLE response when the required service is not found", async () => { - jest.spyOn(backendManager, "getService").mockResolvedValueOnce(undefined); - backendProxy.registerBackendManager(backendManager); - - const response = await backendProxy.withCapability(testServiceId, async () => CapabilityResponse.ok()); - expect(response.status).toBe(CapabilityResponseStatus.NOT_AVAILABLE); - expect(response.message).toBe(`Service ${testServiceId} not available.`); - }); - - test("should execute the callback when the service is found", async () => { - const responseContent = { foo: "bar" }; - jest.spyOn(backendManager, "getService").mockResolvedValueOnce(createMockedService("Service A")); - const testCallback = jest.fn().mockImplementation(async () => CapabilityResponse.ok(responseContent)); - backendProxy.registerBackendManager(backendManager); - - const response = await backendProxy.withCapability(testServiceId, testCallback); - expect(testCallback).toHaveBeenCalled(); - expect(response.status).toBe(CapabilityResponseStatus.OK); - expect(response.body).toBe(responseContent); - }); -}); diff --git a/packages/backend/tests/api/core/CapabilityResponse.test.ts b/packages/backend/tests/api/core/CapabilityResponse.test.ts deleted file mode 100644 index 8afa7c008ec..00000000000 --- a/packages/backend/tests/api/core/CapabilityResponse.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { CapabilityResponse, CapabilityResponseStatus } from "@kie-tools-core/backend/dist/api"; - -describe("utility methods to create a CapabilityResponse", () => { - test("should be an empty OK response", () => { - const response = CapabilityResponse.ok(); - expect(response.status).toBe(CapabilityResponseStatus.OK); - expect(response.body).toBeUndefined(); - expect(response.message).toBeUndefined(); - }); - - test("should be an OK response with a body", () => { - const responseBody = { foo: "bar" }; - const response = CapabilityResponse.ok(responseBody); - expect(response.status).toBe(CapabilityResponseStatus.OK); - expect(response.body).toBe(responseBody); - expect(response.message).toBeUndefined(); - }); - - test("should be a NOT_AVAILABLE response", () => { - const responseMessage = "some message"; - const response = CapabilityResponse.notAvailable(responseMessage); - expect(response.status).toBe(CapabilityResponseStatus.NOT_AVAILABLE); - expect(response.body).toBeUndefined(); - expect(response.message).toBe(responseMessage); - }); - - test("should be a MISSING_INFRA response", () => { - const response = CapabilityResponse.missingInfra(); - expect(response.status).toBe(CapabilityResponseStatus.MISSING_INFRA); - expect(response.body).toBeUndefined(); - }); -}); diff --git a/packages/backend/tests/api/dummyServices.ts b/packages/backend/tests/api/dummyServices.ts deleted file mode 100644 index 48147bd3359..00000000000 --- a/packages/backend/tests/api/dummyServices.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { HttpService, LocalHttpServer, LocalHttpService, Service } from "@kie-tools-core/backend/dist/api"; - -export class DummyLocalHttpServer extends LocalHttpServer { - public identify(): string { - return "Dummy Local HTTP Server"; - } - public async start(): Promise { - // Intentionally empty - } - public stop(): void { - // Intentionally empty - } - public async satisfyRequirements(): Promise { - return true; - } -} - -export class DummyHttpService extends HttpService { - public identify(): string { - return "Dummy HTTP Service"; - } -} - -export class DummyLocalHttpService extends LocalHttpService { - public identify(): string { - return "Dummy Local HTTP Service"; - } -} - -export function createMockedService(id: string, reqSatisfied: boolean = true): jest.Mocked { - return { - identify: jest.fn(() => id), - satisfyRequirements: jest.fn(async () => reqSatisfied), - start: jest.fn(), - stop: jest.fn(), - }; -} diff --git a/packages/backend/tests/api/http/HttpService.test.ts b/packages/backend/tests/api/http/HttpService.test.ts deleted file mode 100644 index 84685a811e8..00000000000 --- a/packages/backend/tests/api/http/HttpService.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { HttpBridge, HttpResponse, HttpService } from "@kie-tools-core/backend/dist/api"; -import { DummyHttpService } from "../dummyServices"; - -let httpService: HttpService; -beforeEach(() => { - httpService = new DummyHttpService(); -}); - -describe("execute http requests", () => { - const testEndpoint = "some.endpoint/test"; - test("should reject promise when bridge is not registered", async () => { - try { - await httpService.execute(testEndpoint); - fail("should not have reached here"); - } catch (e) { - expect(e).toBe("Service bridge is not registered."); - } - }); - - test("should return response when bridge is registered", async () => { - const response: HttpResponse = { body: "some content" }; - const bridge: jest.Mocked = { request: jest.fn().mockResolvedValue(response) }; - httpService.registerHttpBridge(bridge); - await expect(httpService.execute(testEndpoint)).resolves.toBe(response); - }); - - test("should reject the promise when an error occurs in the bridge", async () => { - const errorMsg = "Some error"; - const bridge: jest.Mocked = { request: jest.fn().mockRejectedValue(errorMsg) }; - httpService.registerHttpBridge(bridge); - try { - await httpService.execute(testEndpoint); - fail("should not have reached here"); - } catch (e) { - expect(e).toBe(errorMsg); - } - }); -}); - -describe("satisfy requirements of the http service", () => { - test("should always return TRUE since there are no requirements to satisfy", async () => { - await expect(httpService.satisfyRequirements()).resolves.toBeTruthy(); - }); -}); diff --git a/packages/backend/tests/api/http/LocalHttpService.test.ts b/packages/backend/tests/api/http/LocalHttpService.test.ts deleted file mode 100644 index 715cb33db99..00000000000 --- a/packages/backend/tests/api/http/LocalHttpService.test.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { HttpResponse, HttpService, LocalHttpService } from "@kie-tools-core/backend/dist/api"; -import { DummyLocalHttpService } from "../dummyServices"; - -const testEndpoint = "/some/local/endpoint"; -const testResponse: HttpResponse = { body: "some response content" }; -const testPort = 8099; - -let localHttpService: LocalHttpService; -beforeEach(() => { - localHttpService = new DummyLocalHttpService(); -}); - -describe("execute local http requests", () => { - test("should reject promise when port is not registered", async () => { - try { - await localHttpService.execute(testEndpoint); - fail("should not have reached here"); - } catch (e) { - expect(e).toBe("Local port not registered."); - } - }); - - test("should return response when port is registered", async () => { - const requestBody = "some request content"; - jest.spyOn(HttpService.prototype, "execute").mockResolvedValue(testResponse); - - localHttpService.registerPort(testPort); - await expect(localHttpService.execute(testEndpoint, requestBody)).resolves.toMatchObject(testResponse); - expect(HttpService.prototype.execute).toHaveBeenCalledWith( - `http://localhost:${testPort}${testEndpoint}`, - requestBody - ); - }); - - test("should reject the promise when an error occurs in the bridge", async () => { - const errorMsg = "Some error"; - jest.spyOn(HttpService.prototype, "execute").mockRejectedValue(errorMsg); - - localHttpService.registerPort(testPort); - try { - await localHttpService.execute(testEndpoint); - fail("should not have reached here"); - } catch (e) { - expect(e).toBe(errorMsg); - } - }); -}); diff --git a/packages/backend/tests/http-bridge/DefaultHttpBridge.test.ts b/packages/backend/tests/http-bridge/DefaultHttpBridge.test.ts deleted file mode 100644 index 4db9a866e7b..00000000000 --- a/packages/backend/tests/http-bridge/DefaultHttpBridge.test.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import axios, { AxiosError } from "axios"; -import { DefaultHttpBridge } from "@kie-tools-core/backend/dist/http-bridge"; - -jest.mock("axios"); -const mockAxios = axios as jest.Mocked; - -const bridge = new DefaultHttpBridge(); -const testEndpoint = "some.endpoint/test"; - -describe("requests throught DefaultHttpBridge", () => { - test("should execute GET when the request does not have a body", async () => { - mockAxios.get.mockResolvedValueOnce({}); - await bridge.request({ endpoint: testEndpoint }); - expect(mockAxios.get).toHaveBeenCalledWith(testEndpoint); - }); - - test("should execute POST when the request has a body", async () => { - const requestBody = { foo: "bar" }; - mockAxios.post.mockResolvedValueOnce({}); - await bridge.request({ endpoint: testEndpoint, body: requestBody }); - expect(mockAxios.post).toHaveBeenCalledWith(testEndpoint, requestBody); - }); - - test("should return the response data on success of a GET", async () => { - const responseData = { some: "data" }; - mockAxios.get.mockResolvedValueOnce({ data: responseData }); - const response = await bridge.request({ endpoint: testEndpoint }); - expect(response.body).toBe(responseData); - }); - - test("should return the response data on success of a POST", async () => { - const responseData = { some: "data" }; - mockAxios.post.mockResolvedValueOnce({ data: responseData }); - const response = await bridge.request({ endpoint: testEndpoint, body: { foo: "bar" } }); - expect(response.body).toBe(responseData); - }); - - test("should reject the promise when a generic error ocurrs", async () => { - const errorMsg = "Some error"; - mockAxios.get.mockRejectedValueOnce(new Error(errorMsg)); - try { - await bridge.request({ endpoint: testEndpoint }); - fail("should not have reached here"); - } catch (e) { - expect(e).toBe(errorMsg); - } - }); - - test("should reject the promise when an error ocurrs on the endpoint", async () => { - const errorMsg = "Some error"; - mockAxios.get.mockRejectedValueOnce({ message: errorMsg, config: { url: testEndpoint } } as AxiosError); - try { - await bridge.request({ endpoint: testEndpoint }); - fail("should not have reached here"); - } catch (e) { - expect(e).toBe(`${errorMsg} ${testEndpoint}`); - } - }); -}); diff --git a/packages/backend/tests/node/QuarkusLocalServer.test.ts b/packages/backend/tests/node/QuarkusLocalServer.test.ts deleted file mode 100644 index 95753df6191..00000000000 --- a/packages/backend/tests/node/QuarkusLocalServer.test.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import * as cp from "child_process"; -import * as events from "events"; -import * as fs from "fs"; -import * as portfinder from "portfinder"; -import * as sinon from "sinon"; -import * as stream from "stream"; -import { QuarkusLocalServer } from "@kie-tools-core/backend/dist/node"; -import * as utils from "@kie-tools-core/backend/dist/node/utils"; - -jest.mock("fs"); - -const testPort = 8099; -const testJarFile = "jar/file/path.jar"; - -beforeAll(() => { - jest.resetAllMocks(); -}); - -describe("satisfy requirements of the Quarkus local server", () => { - const service = new QuarkusLocalServer(testJarFile); - const mockGetPortPromise = jest.spyOn(portfinder, "getPortPromise"); - const mockIsJavaAvailableFn = jest.spyOn(utils, "isJavaAvailable"); - const mockFs = fs as jest.Mocked; - - test("should check if path provided in the constructor exists", async () => { - await service.satisfyRequirements(); - expect(mockFs.existsSync).toHaveBeenCalledWith(testJarFile); - }); - - test("should return FALSE when the runner jar file is missing", async () => { - mockFs.existsSync.mockReturnValueOnce(false); - await expect(service.satisfyRequirements()).resolves.toBeFalsy(); - expect(mockIsJavaAvailableFn).not.toHaveBeenCalled(); - }); - - test("should return FALSE when java is missing", async () => { - mockFs.existsSync.mockReturnValueOnce(true); - mockIsJavaAvailableFn.mockResolvedValueOnce(false); - await expect(service.satisfyRequirements()).resolves.toBeFalsy(); - }); - - test("should return FALSE when an error occurs while trying to find a port", async () => { - mockFs.existsSync.mockReturnValue(true); - mockIsJavaAvailableFn.mockResolvedValueOnce(true); - mockGetPortPromise.mockRejectedValueOnce(new Error()); - await expect(service.satisfyRequirements()).resolves.toBeFalsy(); - }); - - test("should return TRUE when all requirements are satisfied", async () => { - mockFs.existsSync.mockReturnValueOnce(true); - mockIsJavaAvailableFn.mockResolvedValueOnce(true); - mockGetPortPromise.mockResolvedValueOnce(testPort); - await expect(service.satisfyRequirements()).resolves.toBeTruthy(); - expect(service.getPort()).toBe(testPort); - }); -}); - -describe("start the Quarkus local server", () => { - const sandbox = sinon.createSandbox(); - - let quarkusServer: QuarkusLocalServer; - beforeEach(() => { - quarkusServer = new QuarkusLocalServer(testJarFile); - }); - - afterEach(() => { - sandbox.restore(); - }); - - test("should reject the promise when cannot identify that Quarkus is up (timeout reached)", async () => { - const process = new events.EventEmitter() as cp.ChildProcess; - process.stdout = new events.EventEmitter() as stream.Readable; - sandbox.stub(cp, "spawn").returns(process); - - try { - await quarkusServer.start(); - fail("should not have reached here"); - } catch (e) { - expect(e.message).toBe("Could not start the Quarkus local server."); - } - }, 10000); - - test("should reject the promise when there is no stdout", async () => { - sandbox.stub(cp, "spawn").returns(new events.EventEmitter() as cp.ChildProcess); - - try { - await quarkusServer.start(); - fail("should not have reached here"); - } catch (e) { - expect(e.message).toBe("Could not start the Quarkus local server."); - } - }, 10000); - - test("should reject the promise when the expected data is not emitted on the stdout (timeout reached)", async () => { - const process = new events.EventEmitter() as cp.ChildProcess; - process.stdout = new events.EventEmitter() as stream.Readable; - sandbox.stub(cp, "spawn").returns(process); - - setTimeout(() => { - process.stdout!.emit("data", "Some other data"); - }, 1000); - - try { - await quarkusServer.start(); - fail("should not have reached here"); - } catch (e) { - expect(e.message).toBe("Could not start the Quarkus local server."); - } - }, 10000); - - test("should resolve the promise when Quarkus is up", async () => { - const process = new events.EventEmitter() as cp.ChildProcess; - process.stdout = new events.EventEmitter() as stream.Readable; - sandbox.stub(cp, "spawn").returns(process); - - setTimeout(() => { - process.stdout!.emit("data", "Listening on"); - }, 500); - - await expect(quarkusServer.start()).resolves.toBeUndefined(); - }); -}); - -describe("stop the Quarkus local server", () => { - const sandbox = sinon.createSandbox(); - const mockKillProcessFn = jest.spyOn(utils, "killProcess"); - - let quarkusServer: QuarkusLocalServer; - beforeEach(() => { - quarkusServer = new QuarkusLocalServer(testJarFile); - }); - - afterEach(() => { - sandbox.restore(); - }); - - test("should do nothing since there is no active process", async () => { - quarkusServer.stop(); - expect(mockKillProcessFn).not.toHaveBeenCalled(); - }); - - test("should kill the process", async () => { - await startQuarkusServerTest(quarkusServer); - quarkusServer.stop(); - expect(mockKillProcessFn).toHaveBeenCalled(); - }); - - async function startQuarkusServerTest(server: QuarkusLocalServer): Promise { - const process = { kill: jest.fn(), pid: 9999 } as unknown as cp.ChildProcess; - process.stdout = new events.EventEmitter() as stream.Readable; - sandbox.stub(cp, "spawn").returns(process); - - setTimeout(() => { - process.stdout!.emit("data", "Listening on"); - }, 500); - - await server.start(); - sandbox.restore(); - } -}); diff --git a/packages/backend/tests/node/utils.test.ts b/packages/backend/tests/node/utils.test.ts deleted file mode 100644 index bedb5c0ef52..00000000000 --- a/packages/backend/tests/node/utils.test.ts +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import * as cp from "child_process"; -import * as utils from "@kie-tools-core/backend/dist/node"; -import * as sinon from "sinon"; -import * as os from "os"; - -jest.mock("child_process"); - -describe("utility to check whether maven is available or not", () => { - test("should return FALSE when an error occurs", async () => { - mockCpExecCallbackOnce({ name: "error", message: "error" }, "", ""); - await expect(utils.isMavenAvailable({ major: 3, minor: 6, patch: 3 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when stdout is empty", async () => { - mockCpExecCallbackOnce(null, "", ""); - await expect(utils.isMavenAvailable({ major: 3, minor: 6, patch: 3 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when regex does not match", async () => { - mockCpExecCallbackOnce(null, "some text that does not match the regex", ""); - await expect(utils.isMavenAvailable({ major: 3, minor: 6, patch: 3 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when minimun required version > actual version", async () => { - mockCpExecCallbackOnce(null, "Apache Maven 3.6.3", ""); - await expect(utils.isMavenAvailable({ major: 4, minor: 0, patch: 0 })).resolves.toBeFalsy(); - }); - - test("should return TRUE when a match is found and version is not specified", async () => { - mockCpExecCallbackOnce(null, "Apache Maven 3.6.3", ""); - await expect(utils.isMavenAvailable()).resolves.toBeTruthy(); - }); - - test("should return TRUE when only the major value is found/given", async () => { - mockCpExecCallbackOnce(null, "Apache Maven 3", ""); - await expect(utils.isMavenAvailable({ major: 3, minor: 0, patch: 0 })).resolves.toBeTruthy(); - }); - - test("should return TRUE when minimun required version == actual version", async () => { - mockCpExecCallbackOnce(null, "Apache Maven 3.6.3", ""); - await expect(utils.isMavenAvailable({ major: 3, minor: 6, patch: 3 })).resolves.toBeTruthy(); - }); - - test("should return TRUE when minimun required version < actual version", async () => { - mockCpExecCallbackOnce(null, "Apache Maven 3.6.3", ""); - await expect(utils.isMavenAvailable({ major: 3, minor: 5, patch: 2 })).resolves.toBeTruthy(); - }); - - test("should return TRUE when minimun required version < actual version (some combinations)", async () => { - const versions = [ - { major: 2, minor: 15, patch: 0 }, - { major: 2, minor: 0, patch: 15 }, - { major: 2, minor: 15, patch: 15 }, - { major: 2, minor: 0, patch: 0 }, - { major: 3, minor: 6, patch: 0 }, - { major: 3, minor: 0, patch: 10 }, - ]; - - for (const v of versions) { - mockCpExecCallbackOnce(null, "Apache Maven 3.6.3", ""); - await expect(utils.isMavenAvailable(v)).resolves.toBeTruthy(); - } - }); -}); - -describe("utility to check whether java|openjdk is available or not", () => { - test("should return FALSE when an error occurs", async () => { - mockCpExecCallbackOnce({ name: "error", message: "error" }, "", ""); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when stderr is empty", async () => { - mockCpExecCallbackOnce(null, "", ""); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when regex does not match", async () => { - mockCpExecCallbackOnce(null, "", "some text that does not match the regex"); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when minimun required version > actual version (up to java 8 format)", async () => { - mockCpExecCallbackOnce(null, "", 'java version "1.7.0_55"'); - await expect(utils.isJavaAvailable({ major: 1, minor: 8, patch: 0 })).resolves.toBeFalsy(); - mockCpExecCallbackOnce(null, "", 'openjdk version "1.7.0_55"'); - await expect(utils.isJavaAvailable({ major: 1, minor: 8, patch: 0 })).resolves.toBeFalsy(); - }); - - test("should return FALSE when minimun required version > actual version (java 9+ format)", async () => { - mockCpExecCallbackOnce(null, "", 'java version "11.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 12, minor: 0, patch: 0 })).resolves.toBeFalsy(); - mockCpExecCallbackOnce(null, "", 'openjdk version "11.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 12, minor: 0, patch: 0 })).resolves.toBeFalsy(); - }); - - test("should return TRUE when a match is found and version is not specified", async () => { - mockCpExecCallbackOnce(null, "", 'java version "11.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable()).resolves.toBeTruthy(); - mockCpExecCallbackOnce(null, "", 'openjdk version "11.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable()).resolves.toBeTruthy(); - }); - - test("should return TRUE when only the major value is found/given", async () => { - mockCpExecCallbackOnce(null, "", 'java version "11" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeTruthy(); - mockCpExecCallbackOnce(null, "", 'openjdk version "11" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeTruthy(); - }); - - test("should return TRUE when minimun required version == actual version", async () => { - mockCpExecCallbackOnce(null, "", 'java version "11.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeTruthy(); - mockCpExecCallbackOnce(null, "", 'openjdk version "11.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeTruthy(); - }); - - test("should return TRUE when minimun required version < actual version", async () => { - mockCpExecCallbackOnce(null, "", 'java version "12.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeTruthy(); - mockCpExecCallbackOnce(null, "", 'openjdk version "12.0.0" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable({ major: 11, minor: 0, patch: 0 })).resolves.toBeTruthy(); - }); - - test("should return TRUE when minimun required version < actual version (some combinations)", async () => { - const versions = [ - { major: 9, minor: 15, patch: 0 }, - { major: 9, minor: 0, patch: 15 }, - { major: 9, minor: 15, patch: 15 }, - { major: 9, minor: 0, patch: 0 }, - { major: 10, minor: 10, patch: 0 }, - { major: 10, minor: 0, patch: 15 }, - ]; - - for (const v of versions) { - mockCpExecCallbackOnce(null, "", 'java version "10.10.10" 2020-04-14 LTS'); - await expect(utils.isJavaAvailable(v)).resolves.toBeTruthy(); - } - }); -}); - -function mockCpExecCallbackOnce(error: cp.ExecException | null, stdout: string, stderr: string) { - (cp as jest.Mocked).exec.mockImplementationOnce((( - command: string, - callback?: (error: cp.ExecException | null, stdout: string, stderr: string) => void - ): cp.ChildProcess => { - if (callback) { - callback(error, stdout, stderr); - } - - return {} as cp.ChildProcess; - }) as typeof cp.exec); -} - -describe("Utility to kill a process", () => { - const process = { kill: jest.fn(), pid: 9999 } as unknown as cp.ChildProcess; - const sandbox = sinon.createSandbox(); - - afterEach(() => { - sandbox.restore(); - }); - - test("should kill the process through taskkill on Windows OS", async () => { - const cpStub = sandbox.stub(cp, "spawn"); - sandbox.stub(os, "platform").returns("win32"); - utils.killProcess(process); - expect(cpStub.called).toBeTruthy(); - }); - - test("should kill the process through the active process on Linux OS", async () => { - sandbox.stub(os, "platform").returns("linux"); - utils.killProcess(process); - expect(process.kill).toHaveBeenCalled(); - }); - - test("should kill the process through the active process on Mac OS", async () => { - sandbox.stub(os, "platform").returns("darwin"); - utils.killProcess(process); - expect(process.kill).toHaveBeenCalled(); - }); -}); diff --git a/packages/backend/tsconfig.json b/packages/backend/tsconfig.json deleted file mode 100644 index a0f97e68c47..00000000000 --- a/packages/backend/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@kie-tools/tsconfig/tsconfig.cjs.json" -} diff --git a/packages/backend/tsconfig.tests.json b/packages/backend/tsconfig.tests.json deleted file mode 100644 index fc8520e7376..00000000000 --- a/packages/backend/tsconfig.tests.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./tsconfig.json" -} diff --git a/packages/bpmn-vscode-extension/package.json b/packages/bpmn-vscode-extension/package.json index 12f1b6d6e90..2a09b5ed3cb 100644 --- a/packages/bpmn-vscode-extension/package.json +++ b/packages/bpmn-vscode-extension/package.json @@ -25,7 +25,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/i18n": "workspace:*", "@kie-tools-core/patternfly-base": "workspace:*", diff --git a/packages/bpmn-vscode-extension/src/extension/extension.ts b/packages/bpmn-vscode-extension/src/extension/extension.ts index 6f6438483f6..941fb58fb8c 100644 --- a/packages/bpmn-vscode-extension/src/extension/extension.ts +++ b/packages/bpmn-vscode-extension/src/extension/extension.ts @@ -17,22 +17,15 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; import { generateFormsCommand } from "@kie-tools/form-code-generator-vscode-command/dist/generateFormCodeCommand"; -let backendProxy: VsCodeBackendProxy; - export function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - backendProxy = new VsCodeBackendProxy(context, backendI18n); - KogitoVsCode.startExtension({ extensionName: "kie-group.bpmn-vscode-extension", context: context, @@ -47,7 +40,6 @@ export function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/webview/BpmnEditorEnvelopeApp.js" }, }), ]), - backendProxy: backendProxy, }); context.subscriptions.push( @@ -62,5 +54,5 @@ export function activate(context: vscode.ExtensionContext) { } export function deactivate() { - backendProxy?.stopServices(); + console.info("Extension is deactivated."); } diff --git a/packages/dmn-editor-standalone/package.json b/packages/dmn-editor-standalone/package.json index 1715ade3959..06d6adc1c7a 100644 --- a/packages/dmn-editor-standalone/package.json +++ b/packages/dmn-editor-standalone/package.json @@ -33,7 +33,6 @@ "@babel/preset-env": "^7.16.0", "@babel/preset-react": "^7.16.0", "@babel/preset-typescript": "^7.22.5", - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/dmn-vscode-extension/package.json b/packages/dmn-vscode-extension/package.json index 618329ea0af..0a44f0b4ea7 100644 --- a/packages/dmn-vscode-extension/package.json +++ b/packages/dmn-vscode-extension/package.json @@ -25,7 +25,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/i18n": "workspace:*", "@kie-tools-core/patternfly-base": "workspace:*", @@ -47,7 +46,6 @@ "copy-webpack-plugin": "^11.0.0", "process": "^0.11.10", "rimraf": "^3.0.2", - "stream-browserify": "3.0.0", "webpack": "^5.94.0", "webpack-cli": "^4.10.0", "webpack-dev-server": "^4.15.1", diff --git a/packages/dmn-vscode-extension/src/extension/extension.ts b/packages/dmn-vscode-extension/src/extension/extension.ts index d6cf46b97b5..3e8f4d5b4c2 100644 --- a/packages/dmn-vscode-extension/src/extension/extension.ts +++ b/packages/dmn-vscode-extension/src/extension/extension.ts @@ -17,21 +17,13 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; -let backendProxy: VsCodeBackendProxy; - export function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - backendProxy = new VsCodeBackendProxy(context, backendI18n); - KogitoVsCode.startExtension({ extensionName: "kie-group.dmn-vscode-extension", context: context, @@ -52,7 +44,6 @@ export function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/webview/SceSimEditorEnvelopeApp.js" }, }), ]), - backendProxy: backendProxy, }); KogitoVsCode.startExtension({ @@ -69,7 +60,6 @@ export function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/webview/NewDmnEditorEnvelopeApp.js" }, }), ]), - backendProxy: backendProxy, }); KogitoVsCode.VsCodeRecommendation.showExtendedServicesRecommendation(context); @@ -78,5 +68,5 @@ export function activate(context: vscode.ExtensionContext) { } export function deactivate() { - backendProxy?.stopServices(); + console.info("Extension is deactivated."); } diff --git a/packages/dmn-vscode-extension/webpack.config.js b/packages/dmn-vscode-extension/webpack.config.js index be947339e93..3086d7b2830 100644 --- a/packages/dmn-vscode-extension/webpack.config.js +++ b/packages/dmn-vscode-extension/webpack.config.js @@ -99,11 +99,5 @@ module.exports = async (webpackEnv) => [ ], }), ], - resolve: { - fallback: { - stream: require.resolve("stream-browserify"), - buffer: require.resolve("buffer/"), - }, - }, }), ]; diff --git a/packages/editor/package.json b/packages/editor/package.json index 2e567161ee9..aef14fe06c5 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -26,7 +26,6 @@ "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/envelope": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/editor/src/api/KogitoEditorChannelApi.ts b/packages/editor/src/api/KogitoEditorChannelApi.ts index dfd5fce0ae6..e15c68e3aee 100644 --- a/packages/editor/src/api/KogitoEditorChannelApi.ts +++ b/packages/editor/src/api/KogitoEditorChannelApi.ts @@ -17,7 +17,6 @@ * under the License. */ -import { CapabilityChannelApi } from "@kie-tools-core/backend/dist/channel-api"; import { NotificationsChannelApi } from "@kie-tools-core/notifications/dist/api"; import { I18nChannelApi } from "@kie-tools-core/i18n/dist/api"; import { WorkspaceChannelApi } from "@kie-tools-core/workspace/dist/api"; @@ -26,11 +25,7 @@ import { StateControlCommand } from "./StateControlCommand"; import { EditorTheme } from "./EditorTheme"; import { SharedValueProvider } from "@kie-tools-core/envelope-bus/dist/api"; -export interface KogitoEditorChannelApi - extends I18nChannelApi, - CapabilityChannelApi, - WorkspaceChannelApi, - NotificationsChannelApi { +export interface KogitoEditorChannelApi extends I18nChannelApi, WorkspaceChannelApi, NotificationsChannelApi { kogitoEditor_ready(): void; kogitoEditor_setContentError(content: EditorContent): void; kogitoEditor_stateControlCommandUpdate(command: StateControlCommand): void; diff --git a/packages/kie-editors-dev-vscode-extension/package.json b/packages/kie-editors-dev-vscode-extension/package.json index cb21f557cc2..88b1726ac2e 100644 --- a/packages/kie-editors-dev-vscode-extension/package.json +++ b/packages/kie-editors-dev-vscode-extension/package.json @@ -30,7 +30,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts b/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts index 6c16d35aaf4..70df0a5be2d 100644 --- a/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts +++ b/packages/kie-editors-dev-vscode-extension/src/extension/extension.ts @@ -17,22 +17,14 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; import { generateFormsCommand } from "@kie-tools/form-code-generator-vscode-command/dist/generateFormCodeCommand"; -let backendProxy: VsCodeBackendProxy; - export async function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - backendProxy = new VsCodeBackendProxy(context, backendI18n); - KogitoVsCode.startExtension({ extensionName: "kie-group.kie-editors-dev-vscode-extension", context: context, @@ -65,7 +57,6 @@ export async function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/webview/PMMLEditorEnvelopeApp.js" }, }), ]), - backendProxy: backendProxy, }); context.subscriptions.push( @@ -78,5 +69,5 @@ export async function activate(context: vscode.ExtensionContext) { } export function deactivate() { - backendProxy?.stopServices(); + console.info("Extension is deactivated."); } diff --git a/packages/kie-editors-standalone/package.json b/packages/kie-editors-standalone/package.json index 1363eec9c35..3f5049949a6 100644 --- a/packages/kie-editors-standalone/package.json +++ b/packages/kie-editors-standalone/package.json @@ -42,7 +42,6 @@ "@babel/core": "^7.16.0", "@babel/preset-env": "^7.16.0", "@babel/preset-react": "^7.16.0", - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/pmml-vscode-extension/package.json b/packages/pmml-vscode-extension/package.json index d19ca6c7414..80d800ba83b 100644 --- a/packages/pmml-vscode-extension/package.json +++ b/packages/pmml-vscode-extension/package.json @@ -25,7 +25,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/i18n": "workspace:*", "@kie-tools-core/monaco-editor": "workspace:*", diff --git a/packages/pmml-vscode-extension/src/extension/extension.ts b/packages/pmml-vscode-extension/src/extension/extension.ts index f2c5d052a9c..80327590198 100644 --- a/packages/pmml-vscode-extension/src/extension/extension.ts +++ b/packages/pmml-vscode-extension/src/extension/extension.ts @@ -17,26 +17,13 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; -let backendProxy: VsCodeBackendProxy; - export function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - backendProxy = new VsCodeBackendProxy(context, backendI18n); - - const pmmlEnvelope = { - envelopePath: "dist/webview/PmmlEditorEnvelopeApp.js", - resourcesPathPrefix: "dist/webview/editors/pmml", - }; - KogitoVsCode.startExtension({ extensionName: "kie-group.pmml-vscode-extension", context: context, @@ -49,12 +36,11 @@ export function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/webview/PmmlEditorEnvelopeApp.js" }, }), ]), - backendProxy: backendProxy, }); console.info("Extension is successfully setup."); } export function deactivate() { - backendProxy?.stopServices(); + console.info("Extension is deactivated."); } diff --git a/packages/serverless-workflow-vscode-extension/package.json b/packages/serverless-workflow-vscode-extension/package.json index 50e4a75384e..22d25c03228 100644 --- a/packages/serverless-workflow-vscode-extension/package.json +++ b/packages/serverless-workflow-vscode-extension/package.json @@ -30,7 +30,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiImpl.ts b/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiImpl.ts index 4f6bb260d5b..9bb9c15708e 100644 --- a/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiImpl.ts +++ b/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiImpl.ts @@ -17,7 +17,6 @@ * under the License. */ -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; import { EditorContent, EditorTheme, @@ -68,7 +67,6 @@ export class ServerlessWorkflowDiagramEditorChannelApiImpl implements Serverless private readonly editor: VsCodeKieEditorController, resourceContentService: ResourceContentService, vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - backendProxy: BackendProxy, vscodeNotifications: VsCodeNotificationsChannelApiImpl, javaCodeCompletionApi: JavaCodeCompletionApi, viewType: string, @@ -81,7 +79,6 @@ export class ServerlessWorkflowDiagramEditorChannelApiImpl implements Serverless editor, resourceContentService, vscodeWorkspace, - backendProxy, vscodeNotifications, javaCodeCompletionApi, viewType, diff --git a/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiProducer.ts b/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiProducer.ts index b27d32ba3a9..4f4ee671e4d 100644 --- a/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiProducer.ts +++ b/packages/serverless-workflow-vscode-extension/src/extension/ServerlessWorkflowDiagramEditorChannelApiProducer.ts @@ -17,10 +17,8 @@ * under the License. */ -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; import { KogitoEditorChannelApi } from "@kie-tools-core/editor/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; -import { NotificationsChannelApi } from "@kie-tools-core/notifications/dist/api"; import { VsCodeI18n } from "@kie-tools-core/vscode-extension/dist/i18n"; import { VsCodeKieEditorChannelApiProducer } from "@kie-tools-core/vscode-extension/dist/VsCodeKieEditorChannelApiProducer"; import { VsCodeKieEditorController } from "@kie-tools-core/vscode-extension/dist/VsCodeKieEditorController"; @@ -47,7 +45,6 @@ export class ServerlessWorkflowDiagramEditorChannelApiProducer implements VsCode editor: VsCodeKieEditorController, resourceContentService: ResourceContentService, vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - backendProxy: BackendProxy, vscodeNotifications: VsCodeNotificationsChannelApiImpl, javaCodeCompletionApi: JavaCodeCompletionApi, viewType: string, @@ -57,7 +54,6 @@ export class ServerlessWorkflowDiagramEditorChannelApiProducer implements VsCode editor, resourceContentService, vscodeWorkspace, - backendProxy, vscodeNotifications, javaCodeCompletionApi, viewType, diff --git a/packages/serverless-workflow-vscode-extension/src/extension/extension.ts b/packages/serverless-workflow-vscode-extension/src/extension/extension.ts index 3a0ae3d8d3f..795caa83801 100644 --- a/packages/serverless-workflow-vscode-extension/src/extension/extension.ts +++ b/packages/serverless-workflow-vscode-extension/src/extension/extension.ts @@ -17,10 +17,7 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode/VsCodeBackendProxy"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KieToolsVsCodeExtensions from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; import { ServerlessWorkflowDiagramEditorChannelApiProducer } from "./ServerlessWorkflowDiagramEditorChannelApiProducer"; @@ -38,14 +35,6 @@ import { RedHatAuthExtensionStateStore } from "./RedHatAuthExtensionStateStore"; export async function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - const backendProxy = new VsCodeBackendProxy(context, backendI18n); - context.subscriptions.push( - new vscode.Disposable(() => { - return backendProxy.stopServices(); - }) - ); - const configuration = new SwfVsCodeExtensionConfiguration(); const redhatAuthExtensionStateStore = new RedHatAuthExtensionStateStore(); @@ -101,7 +90,6 @@ export async function activate(context: vscode.ExtensionContext) { vsCodeSwfLanguageService, swfServiceCatalogSupportActions, }), - backendProxy, }); setupBuiltInVsCodeEditorSwfContributions({ diff --git a/packages/vscode-extension-dashbuilder-editor/package.json b/packages/vscode-extension-dashbuilder-editor/package.json index 24d93d939fc..ac939c34eef 100644 --- a/packages/vscode-extension-dashbuilder-editor/package.json +++ b/packages/vscode-extension-dashbuilder-editor/package.json @@ -28,7 +28,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiImpl.ts b/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiImpl.ts index d215c7984f4..e1162ce0797 100644 --- a/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiImpl.ts +++ b/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiImpl.ts @@ -17,7 +17,6 @@ * under the License. */ -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; import { EditorContent, EditorTheme, @@ -25,7 +24,6 @@ import { StateControlCommand, } from "@kie-tools-core/editor/dist/api"; import { SharedValueProvider } from "@kie-tools-core/envelope-bus/dist/api"; - import { I18n } from "@kie-tools-core/i18n/dist/core"; import { Notification } from "@kie-tools-core/notifications/dist/api"; import { DefaultVsCodeKieEditorChannelApiImpl } from "@kie-tools-core/vscode-extension/dist/DefaultVsCodeKieEditorChannelApiImpl"; @@ -53,7 +51,6 @@ export class DashbuilderViewerChannelApiImpl implements DashbuilderViewerChannel private readonly editor: VsCodeKieEditorController, resourceContentService: ResourceContentService, vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - backendProxy: BackendProxy, vscodeNotifications: VsCodeNotificationsChannelApiImpl, javaCodeCompletionApi: JavaCodeCompletionApi, viewType: string, @@ -64,7 +61,6 @@ export class DashbuilderViewerChannelApiImpl implements DashbuilderViewerChannel editor, resourceContentService, vscodeWorkspace, - backendProxy, vscodeNotifications, javaCodeCompletionApi, viewType, diff --git a/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiProducer.ts b/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiProducer.ts index 915047fe55a..1ab077ded67 100644 --- a/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiProducer.ts +++ b/packages/vscode-extension-dashbuilder-editor/src/api/DashbuilderViewerChannelApiProducer.ts @@ -17,7 +17,6 @@ * under the License. */ -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; import { KogitoEditorChannelApi } from "@kie-tools-core/editor/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; import { VsCodeKieEditorChannelApiProducer } from "@kie-tools-core/vscode-extension/dist/VsCodeKieEditorChannelApiProducer"; @@ -40,7 +39,6 @@ export class DashbuilderViewerChannelApiProducer implements VsCodeKieEditorChann editor: VsCodeKieEditorController, resourceContentService: ResourceContentService, vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - backendProxy: BackendProxy, vscodeNotifications: VsCodeNotificationsChannelApiImpl, javaCodeCompletionApi: JavaCodeCompletionApi, viewType: string, @@ -50,7 +48,6 @@ export class DashbuilderViewerChannelApiProducer implements VsCodeKieEditorChann editor, resourceContentService, vscodeWorkspace, - backendProxy, vscodeNotifications, javaCodeCompletionApi, viewType, diff --git a/packages/vscode-extension-dashbuilder-editor/src/browser/extension.ts b/packages/vscode-extension-dashbuilder-editor/src/browser/extension.ts index de680573e4c..022091a9e0a 100644 --- a/packages/vscode-extension-dashbuilder-editor/src/browser/extension.ts +++ b/packages/vscode-extension-dashbuilder-editor/src/browser/extension.ts @@ -17,8 +17,6 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; @@ -34,15 +32,6 @@ const componentServerUrl = "https://start.kubesmarts.org/dashbuilder-client/dash export async function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - const backendProxy = new VsCodeBackendProxy(context, backendI18n); - - context.subscriptions.push( - new vscode.Disposable(() => { - return backendProxy.stopServices(); - }) - ); - const kieEditorsStore = await KogitoVsCode.startExtension({ extensionName: "kie-group.vscode-extension-dashbuilder-editor", context: context, @@ -57,7 +46,6 @@ export async function activate(context: vscode.ExtensionContext) { }), ]), channelApiProducer: new DashbuilderViewerChannelApiProducer(new Promise((resolve) => resolve(componentServerUrl))), - backendProxy: backendProxy, }); const configuration = new DashbuilderVsCodeExtensionConfiguration(); diff --git a/packages/vscode-extension-dashbuilder-editor/src/extension/ComponentsHttpServer.ts b/packages/vscode-extension-dashbuilder-editor/src/extension/ComponentsHttpServer.ts index ba194c99e5d..4df2fd7e324 100644 --- a/packages/vscode-extension-dashbuilder-editor/src/extension/ComponentsHttpServer.ts +++ b/packages/vscode-extension-dashbuilder-editor/src/extension/ComponentsHttpServer.ts @@ -17,14 +17,14 @@ * under the License. */ -import { LocalHttpServer } from "@kie-tools-core/backend/dist/api"; import { getPortPromise } from "portfinder"; import * as http from "http"; import * as fs from "fs"; import * as path from "path"; -export class ComponentServer extends LocalHttpServer { +export class ComponentServer { private server: http.Server; + public port: number | undefined; requestListener = (request: any, response: any) => { if (["/", "", "index.html"].includes(request.url)) { @@ -33,8 +33,8 @@ export class ComponentServer extends LocalHttpServer { return; } - var userInput = path.normalize(request.url).replace(/^(\.\.(\/|\\|$))+/, ""); - var filePath = path.join(this.componentsPath, userInput); + const userInput = path.normalize(request.url).replace(/^(\.\.(\/|\\|$))+/, ""); + const filePath = path.join(this.componentsPath, userInput); if (filePath.indexOf(this.componentsPath) !== 0) { console.debug("Denying access to file " + filePath); response.writeHead(403); @@ -58,9 +58,7 @@ export class ComponentServer extends LocalHttpServer { }); }; - constructor(private readonly componentsPath: string) { - super(); - } + constructor(private readonly componentsPath: string) {} identify(): string { return "Components HTTP Server"; diff --git a/packages/vscode-extension-dashbuilder-editor/src/extension/extension.ts b/packages/vscode-extension-dashbuilder-editor/src/extension/extension.ts index 3ff9bf0eb92..d58f50fb70d 100644 --- a/packages/vscode-extension-dashbuilder-editor/src/extension/extension.ts +++ b/packages/vscode-extension-dashbuilder-editor/src/extension/extension.ts @@ -17,14 +17,10 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KogitoVsCode from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; import * as path from "path"; -import { BackendManagerService } from "@kie-tools-core/backend/dist/api"; import { ComponentServer } from "./ComponentsHttpServer"; import { DashbuilderVsCodeExtensionConfiguration } from "./configuration"; import { setupDashboardEditorControls } from "./setupDashboardEditorControls"; @@ -32,26 +28,16 @@ import { DashbuilderViewerChannelApiProducer } from "../api/DashbuilderViewerCha import { setupBuiltInVsCodeEditorDashbuilderContributions } from "./builtInVsCodeEditorDashbuilderContributions"; import { VsCodeDashbuilderLanguageService } from "./languageService/VsCodeDashbuilderLanguageService"; -let backendProxy: VsCodeBackendProxy; - export async function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); const componentsPath = path.join(context.extensionPath, "/dist/webview/dashbuilder/component/"); const componentServer = new ComponentServer(componentsPath); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - const backendManager = new BackendManagerService({ localHttpServer: componentServer }); - backendProxy = new VsCodeBackendProxy(context, backendI18n); - - backendProxy.registerBackendManager(backendManager); - - await backendManager.start().catch((e) => { - console.info("Not able to start component server."); - }); + componentServer.start(); context.subscriptions.push( new vscode.Disposable(() => { - return backendProxy.stopServices(); + return componentServer.stop(); }) ); @@ -70,11 +56,10 @@ export async function activate(context: vscode.ExtensionContext) { ]), channelApiProducer: new DashbuilderViewerChannelApiProducer( new Promise((resolve) => { - const componentServerUrl = `http://localhost:${componentServer.getPort()}`; + const componentServerUrl = `http://localhost:${componentServer.port}`; resolve(componentServerUrl); }) ), - backendProxy: backendProxy, }); const configuration = new DashbuilderVsCodeExtensionConfiguration(); diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json index 23dbebb4bfb..5d77e5129c8 100644 --- a/packages/vscode-extension/package.json +++ b/packages/vscode-extension/package.json @@ -26,7 +26,6 @@ "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts b/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts index b1a3112ace7..54f20d27ff1 100644 --- a/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts +++ b/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts @@ -17,7 +17,6 @@ * under the License. */ -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; import { EditorContent, KogitoEditorChannelApi, StateControlCommand } from "@kie-tools-core/editor/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; import { Notification } from "@kie-tools-core/notifications/dist/api"; @@ -47,7 +46,6 @@ export class DefaultVsCodeKieEditorChannelApiImpl implements KogitoEditorChannel protected readonly editor: VsCodeKieEditorController, protected readonly resourceContentService: ResourceContentService, protected readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - protected readonly backendProxy: BackendProxy, protected readonly vscodeNotifications: VsCodeNotificationsChannelApiImpl, protected readonly javaCodeCompletionApi: JavaCodeCompletionApi, protected readonly viewType: string, diff --git a/packages/vscode-extension/src/VsCodeKieEditorChannelApiProducer.ts b/packages/vscode-extension/src/VsCodeKieEditorChannelApiProducer.ts index f2d569fd9b5..910a4c157f3 100644 --- a/packages/vscode-extension/src/VsCodeKieEditorChannelApiProducer.ts +++ b/packages/vscode-extension/src/VsCodeKieEditorChannelApiProducer.ts @@ -19,9 +19,7 @@ import { KogitoEditorChannelApi } from "@kie-tools-core/editor/dist/api"; import { VsCodeKieEditorController } from "./VsCodeKieEditorController"; -import { ResourceContentService, WorkspaceChannelApi } from "@kie-tools-core/workspace/dist/api"; -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; -import { NotificationsChannelApi } from "@kie-tools-core/notifications/dist/api"; +import { ResourceContentService } from "@kie-tools-core/workspace/dist/api"; import { JavaCodeCompletionApi } from "@kie-tools-core/vscode-java-code-completion/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; import { VsCodeI18n } from "./i18n"; @@ -39,7 +37,6 @@ export interface VsCodeKieEditorChannelApiProducer { * @param editor * @param resourceContentService * @param vscodeWorkspace - * @param backendProxy * @param vscodeNotifications * @param javaCodeCompletionApi * @param viewType @@ -49,7 +46,6 @@ export interface VsCodeKieEditorChannelApiProducer { editor: VsCodeKieEditorController, resourceContentService: ResourceContentService, vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - backendProxy: BackendProxy, vscodeNotifications: VsCodeNotificationsChannelApiImpl, javaCodeCompletionApi: JavaCodeCompletionApi, viewType: string, @@ -62,7 +58,6 @@ export class DefaultVsCodeEditorChannelApiProducer implements VsCodeKieEditorCha editor: VsCodeKieEditorController, resourceContentService: ResourceContentService, vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - backendProxy: BackendProxy, vscodeNotifications: VsCodeNotificationsChannelApiImpl, javaCodeCompletionApi: JavaCodeCompletionApi, viewType: string, @@ -72,7 +67,6 @@ export class DefaultVsCodeEditorChannelApiProducer implements VsCodeKieEditorCha editor, resourceContentService, vscodeWorkspace, - backendProxy, vscodeNotifications, javaCodeCompletionApi, viewType, diff --git a/packages/vscode-extension/src/VsCodeKieEditorControllerFactory.ts b/packages/vscode-extension/src/VsCodeKieEditorControllerFactory.ts index eeca06c13e5..79701998c8f 100644 --- a/packages/vscode-extension/src/VsCodeKieEditorControllerFactory.ts +++ b/packages/vscode-extension/src/VsCodeKieEditorControllerFactory.ts @@ -20,9 +20,7 @@ import * as vscode from "vscode"; import { Uri, Webview } from "vscode"; import * as __path from "path"; -import { NotificationsChannelApi } from "@kie-tools-core/notifications/dist/api"; -import { BackendProxy } from "@kie-tools-core/backend/dist/api"; -import { ResourceContentService, WorkspaceChannelApi } from "@kie-tools-core/workspace/dist/api"; +import { ResourceContentService } from "@kie-tools-core/workspace/dist/api"; import { EditorEnvelopeLocator, EnvelopeContent, @@ -53,7 +51,6 @@ export class VsCodeKieEditorControllerFactory { private readonly editorEnvelopeLocator: EditorEnvelopeLocator, private readonly messageBroadcaster: EnvelopeBusMessageBroadcaster, private readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl, - private readonly backendProxy: BackendProxy, private readonly vscodeNotifications: VsCodeNotificationsChannelApiImpl, private readonly javaCodeCompletionApi: JavaCodeCompletionApi, private readonly viewType: string, @@ -120,7 +117,6 @@ export class VsCodeKieEditorControllerFactory { editor, resourceContentService, this.vscodeWorkspace, - this.backendProxy, this.vscodeNotifications, this.javaCodeCompletionApi, this.viewType, diff --git a/packages/vscode-extension/src/index.ts b/packages/vscode-extension/src/index.ts index fa5d8941fdf..3841bace3bb 100644 --- a/packages/vscode-extension/src/index.ts +++ b/packages/vscode-extension/src/index.ts @@ -17,7 +17,6 @@ * under the License. */ -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode"; import { EditorEnvelopeLocator } from "@kie-tools-core/editor/dist/api"; import { I18n } from "@kie-tools-core/i18n/dist/core"; import { VsCodeJavaCodeCompletionApiImpl } from "@kie-tools-core/vscode-java-code-completion/dist/vscode"; @@ -42,7 +41,6 @@ import { VsCodeRecommendation } from "./VsCodeRecommendation"; * @param args.webviewLocation The relative path to search for an "index.js" file for the WebView panel. * @param args.context The vscode.ExtensionContext provided on the activate method of the extension. * @param args.routes The routes to be used to find resources for each language. - * @param args.backendProxy The proxy between channels and available backend services. * @param args.channelApiProducer Optional producer of custom KogitoEditorChannelApi instances. */ export async function startExtension(args: { @@ -52,12 +50,9 @@ export async function startExtension(args: { generateSvgCommandId?: string; silentlyGenerateSvgCommandId?: string; editorEnvelopeLocator: EditorEnvelopeLocator; - backendProxy: VsCodeBackendProxy; channelApiProducer?: VsCodeKieEditorChannelApiProducer; editorDocumentType?: "text" | "custom"; }) { - await args.backendProxy.tryLoadBackendExtension(true); - const i18n = new I18n(vsCodeI18nDefaults, vsCodeI18nDictionaries, vscode.env.language); const vscodeWorkspace = new VsCodeWorkspaceChannelApiImpl(); const editorStore = new VsCodeKieEditorStore(); @@ -71,7 +66,6 @@ export async function startExtension(args: { args.editorEnvelopeLocator, messageBroadcaster, vscodeWorkspace, - args.backendProxy, vscodeNotifications, vsCodeJavaCodeCompletionChannelApi, args.viewType, diff --git a/packages/webpack-base/package.json b/packages/webpack-base/package.json index 5c76fa380ec..a6bd94a7ed6 100644 --- a/packages/webpack-base/package.json +++ b/packages/webpack-base/package.json @@ -24,6 +24,7 @@ "path-browserify": "^1.0.1", "querystring-es3": "^0.2.1", "source-map-loader": "^2.0.2", + "stream-browserify": "^3.0.0", "ts-loader": "^9.4.2", "webpack": "^5.94.0" } diff --git a/packages/webpack-base/webpack.common.config.js b/packages/webpack-base/webpack.common.config.js index a10f0c908fe..b2f85e6d8bf 100644 --- a/packages/webpack-base/webpack.common.config.js +++ b/packages/webpack-base/webpack.common.config.js @@ -121,6 +121,7 @@ module.exports = (webpackEnv) => { child_process: false, net: false, buffer: require.resolve("buffer/"), + stream: require.resolve("stream-browserify"), querystring: require.resolve("querystring-es3"), }, extensions: [".tsx", ".ts", ".js", ".jsx"], diff --git a/packages/yard-vscode-extension/package.json b/packages/yard-vscode-extension/package.json index ecff850f0e5..ab377802792 100644 --- a/packages/yard-vscode-extension/package.json +++ b/packages/yard-vscode-extension/package.json @@ -29,7 +29,6 @@ "watch": "export WEBPACK__sourceMaps=true; WEBPACK__minimize=false; webpack --env dev" }, "dependencies": { - "@kie-tools-core/backend": "workspace:*", "@kie-tools-core/editor": "workspace:*", "@kie-tools-core/envelope-bus": "workspace:*", "@kie-tools-core/i18n": "workspace:*", diff --git a/packages/yard-vscode-extension/src/extension/extension.ts b/packages/yard-vscode-extension/src/extension/extension.ts index 99e0400b3a1..d69310687b4 100644 --- a/packages/yard-vscode-extension/src/extension/extension.ts +++ b/packages/yard-vscode-extension/src/extension/extension.ts @@ -17,27 +17,15 @@ * under the License. */ -import { backendI18nDefaults, backendI18nDictionaries } from "@kie-tools-core/backend/dist/i18n"; -import { VsCodeBackendProxy } from "@kie-tools-core/backend/dist/vscode/VsCodeBackendProxy"; import { EditorEnvelopeLocator, EnvelopeContentType, EnvelopeMapping } from "@kie-tools-core/editor/dist/api"; -import { I18n } from "@kie-tools-core/i18n/dist/core"; import * as KieToolsVsCodeExtensions from "@kie-tools-core/vscode-extension"; import * as vscode from "vscode"; import { YardVsCodeExtensionConfiguration, WEBVIEW_EDITOR_VIEW_TYPE } from "./configuration"; import { setupDiagramEditorControls } from "./setupDiagramEditorControls"; -import { COMMAND_IDS } from "./commandIds"; export async function activate(context: vscode.ExtensionContext) { console.info("Extension is alive."); - const backendI18n = new I18n(backendI18nDefaults, backendI18nDictionaries, vscode.env.language); - const backendProxy = new VsCodeBackendProxy(context, backendI18n); - context.subscriptions.push( - new vscode.Disposable(() => { - return backendProxy.stopServices(); - }) - ); - const configuration = new YardVsCodeExtensionConfiguration(); const kieEditorsStore = await KieToolsVsCodeExtensions.startExtension({ @@ -53,7 +41,6 @@ export async function activate(context: vscode.ExtensionContext) { envelopeContent: { type: EnvelopeContentType.PATH, path: "dist/webview/YardEditorEnvelopeApp.js" }, }), ]), - backendProxy, }); await setupDiagramEditorControls({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d553e306137..4e0942d4870 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -183,9 +183,6 @@ importers: examples/base64png-editor-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../../packages/backend '@kie-tools-core/editor': specifier: workspace:* version: link:../../packages/editor @@ -1018,13 +1015,13 @@ importers: version: 6.2.0(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)) + version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) jest-junit: specifier: ^16.0.0 version: 16.0.0 jest-when: specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3))) + version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3))) react-json-view: specifier: ^1.21.3 version: 1.21.3(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) @@ -1039,7 +1036,7 @@ importers: version: 7.4.6 ts-jest: specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3) + version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -1116,9 +1113,6 @@ importers: packages/bpmn-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -3579,9 +3573,6 @@ importers: '@babel/preset-typescript': specifier: ^7.22.5 version: 7.23.0(@babel/core@7.23.9) - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -4038,9 +4029,6 @@ importers: packages/dmn-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -4099,9 +4087,6 @@ importers: rimraf: specifier: ^3.0.2 version: 3.0.2 - stream-browserify: - specifier: 3.0.0 - version: 3.0.0 webpack: specifier: ^5.94.0 version: 5.94.0(webpack-cli@4.10.0) @@ -4117,9 +4102,6 @@ importers: packages/editor: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/envelope': specifier: workspace:* version: link:../envelope @@ -5892,9 +5874,6 @@ importers: packages/kie-editors-dev-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -6052,9 +6031,6 @@ importers: '@babel/preset-react': specifier: ^7.16.0 version: 7.16.0(@babel/core@7.16.12) - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -7417,9 +7393,6 @@ importers: packages/pmml-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -10860,9 +10833,6 @@ importers: packages/serverless-workflow-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -12299,9 +12269,6 @@ importers: packages/vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -12430,9 +12397,6 @@ importers: packages/vscode-extension-dashbuilder-editor: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -12702,6 +12666,9 @@ importers: source-map-loader: specifier: ^2.0.2 version: 2.0.2(webpack@5.94.0) + stream-browserify: + specifier: ^3.0.0 + version: 3.0.0 ts-loader: specifier: ^9.4.2 version: 9.4.2(typescript@5.5.3)(webpack@5.94.0) @@ -13284,9 +13251,6 @@ importers: packages/yard-vscode-extension: dependencies: - '@kie-tools-core/backend': - specifier: workspace:* - version: link:../backend '@kie-tools-core/editor': specifier: workspace:* version: link:../editor @@ -30499,7 +30463,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@angular-devkit/architect': 0.1801.3(chokidar@3.6.0) - '@angular-devkit/build-webpack': 0.1801.3(chokidar@3.6.0)(webpack-dev-server@5.0.4(webpack@5.92.1(esbuild@0.21.5)))(webpack@5.92.1(esbuild@0.21.5)) + '@angular-devkit/build-webpack': 0.1801.3(chokidar@3.6.0)(webpack-dev-server@5.0.4(webpack@5.94.0))(webpack@5.92.1(esbuild@0.21.5)) '@angular-devkit/core': 18.1.3(chokidar@3.6.0) '@angular/build': 18.1.3(@angular/compiler-cli@18.1.3(@angular/compiler@18.1.3(@angular/core@18.1.3(rxjs@7.5.2)(zone.js@0.14.8)))(typescript@5.5.3))(@types/node@22.5.2)(chokidar@3.6.0)(less@4.2.0)(postcss@8.4.38)(stylus@0.59.0)(terser@5.29.2)(typescript@5.5.3) '@angular/compiler-cli': 18.1.3(@angular/compiler@18.1.3(@angular/core@18.1.3(rxjs@7.5.2)(zone.js@0.14.8)))(typescript@5.5.3) @@ -30585,7 +30549,7 @@ snapshots: - utf-8-validate - webpack-cli - '@angular-devkit/build-webpack@0.1801.3(chokidar@3.6.0)(webpack-dev-server@5.0.4(webpack@5.92.1(esbuild@0.21.5)))(webpack@5.92.1(esbuild@0.21.5))': + '@angular-devkit/build-webpack@0.1801.3(chokidar@3.6.0)(webpack-dev-server@5.0.4(webpack@5.94.0))(webpack@5.92.1(esbuild@0.21.5))': dependencies: '@angular-devkit/architect': 0.1801.3(chokidar@3.6.0) rxjs: 7.8.1 @@ -56189,11 +56153,11 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.16.12) esbuild: 0.15.13 - ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3): + ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(esbuild@0.18.20)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)) + jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 diff --git a/repo/graph.dot b/repo/graph.dot index 3090bb49c1b..3e22c2ef251 100644 --- a/repo/graph.dot +++ b/repo/graph.dot @@ -39,8 +39,6 @@ digraph G { "@kie-tools-examples/webapp" [ color = "orange", fontcolor = "orange", style = "dashed, rounded" ]; "@kie-tools/kie-editors-standalone" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/serverless-workflow-standalone-editor" [ color = "blue", fontcolor = "blue", style = "rounded" ]; - "@kie-tools-core/backend" [ color = "purple", fontcolor = "purple", style = "rounded" ]; - "@kie-tools-core/notifications" [ color = "purple", fontcolor = "purple", style = "rounded" ]; "@kie-tools/boxed-expression-component" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools-core/operating-system" [ color = "purple", fontcolor = "purple", style = "rounded" ]; "@kie-tools/feel-input-component" [ color = "blue", fontcolor = "blue", style = "rounded" ]; @@ -112,6 +110,7 @@ digraph G { "@kie-tools/extended-services-api" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "dmn-vscode-extension" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools-core/keyboard-shortcuts" [ color = "purple", fontcolor = "purple", style = "rounded" ]; + "@kie-tools-core/notifications" [ color = "purple", fontcolor = "purple", style = "rounded" ]; "@kie-tools-core/envelope-bus" [ color = "purple", fontcolor = "purple", style = "rounded" ]; "@kie-tools/extended-services" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; "@kie-tools/extended-services-java" [ color = "black", fontcolor = "black", style = "dashed, rounded" ]; @@ -244,7 +243,6 @@ digraph G { "@kie-tools-examples/webapp" -> "@kie-tools/dmn-editor-standalone" [ style = "solid", color = "orange" ]; "@kie-tools-examples/webapp" -> "@kie-tools/kie-editors-standalone" [ style = "solid", color = "orange" ]; "@kie-tools-examples/webapp" -> "@kie-tools/serverless-workflow-standalone-editor" [ style = "solid", color = "orange" ]; - "@kie-tools-core/backend" -> "@kie-tools-core/notifications" [ style = "solid", color = "purple" ]; "@kie-tools/boxed-expression-component" -> "@kie-tools-core/operating-system" [ style = "solid", color = "blue" ]; "@kie-tools/boxed-expression-component" -> "@kie-tools/feel-input-component" [ style = "solid", color = "blue" ]; "@kie-tools/boxed-expression-component" -> "@kie-tools/playwright-base" [ style = "dashed", color = "blue" ]; @@ -363,9 +361,9 @@ digraph G { "dmn-vscode-extension" -> "@kie-tools/kie-bc-editors" [ style = "solid", color = "blue" ]; "dmn-vscode-extension" -> "@kie-tools/stunner-editors" [ style = "dashed", color = "blue" ]; "dmn-vscode-extension" -> "@kie-tools/vscode-java-code-completion-extension-plugin" [ style = "dashed", color = "blue" ]; - "@kie-tools-core/editor" -> "@kie-tools-core/backend" [ style = "solid", color = "purple" ]; "@kie-tools-core/editor" -> "@kie-tools-core/envelope" [ style = "solid", color = "purple" ]; "@kie-tools-core/editor" -> "@kie-tools-core/keyboard-shortcuts" [ style = "solid", color = "purple" ]; + "@kie-tools-core/editor" -> "@kie-tools-core/notifications" [ style = "solid", color = "purple" ]; "@kie-tools-core/editor" -> "@kie-tools-core/patternfly-base" [ style = "solid", color = "purple" ]; "@kie-tools-core/envelope" -> "@kie-tools-core/envelope-bus" [ style = "solid", color = "purple" ]; "@kie-tools-core/envelope-bus" -> "@kie-tools/eslint" [ style = "dashed", color = "purple" ]; diff --git a/repo/graph.json b/repo/graph.json index 3ccae914e70..0f3378f7b52 100644 --- a/repo/graph.json +++ b/repo/graph.json @@ -13,9 +13,9 @@ { "id": "@kie-tools/tsconfig" }, { "id": "@kie-tools-examples/base64png-editor" }, { "id": "@kie-tools-core/editor" }, - { "id": "@kie-tools-core/backend" }, { "id": "@kie-tools-core/envelope" }, { "id": "@kie-tools-core/keyboard-shortcuts" }, + { "id": "@kie-tools-core/notifications" }, { "id": "@kie-tools-core/patternfly-base" }, { "id": "@kie-tools-examples/base64png-editor-chrome-extension" }, { "id": "@kie-tools-core/chrome-extension" }, @@ -56,9 +56,6 @@ { "id": "@kie-tools/kie-bc-editors" }, { "id": "@kie-tools/stunner-editors" }, { "id": "@kie-tools/serverless-workflow-combined-editor" }, - { "id": "@kie-tools-core/notifications" }, - { "id": "@kie-tools-core/i18n" }, - { "id": "@kie-tools-core/workspace" }, { "id": "@kie-tools/boxed-expression-component" }, { "id": "@kie-tools-core/operating-system" }, { "id": "@kie-tools/feel-input-component" }, @@ -106,7 +103,9 @@ { "id": "@kie-tools/dashbuilder-viewer-deployment-webapp" }, { "id": "@kie-tools-core/workspaces-git-fs" }, { "id": "@kie-tools-core/react-hooks" }, + { "id": "@kie-tools-core/workspace" }, { "id": "@kie-tools/kie-sandbox-fs" }, + { "id": "@kie-tools-core/i18n" }, { "id": "@kie-tools/dashbuilder-viewer-image" }, { "id": "@kie-tools/dashbuilder-viewer-image-env" }, { "id": "@kie-tools/data-index-webapp" }, @@ -265,11 +264,6 @@ "target": "@kie-tools-core/editor", "weight": 1 }, - { - "source": "@kie-tools-core/editor", - "target": "@kie-tools-core/backend", - "weight": 1 - }, { "source": "@kie-tools-core/editor", "target": "@kie-tools-core/envelope", @@ -282,12 +276,12 @@ }, { "source": "@kie-tools-core/editor", - "target": "@kie-tools-core/patternfly-base", + "target": "@kie-tools-core/notifications", "weight": 1 }, { - "source": "@kie-tools-core/backend", - "target": "@kie-tools-core/notifications", + "source": "@kie-tools-core/editor", + "target": "@kie-tools-core/patternfly-base", "weight": 1 }, { @@ -305,6 +299,16 @@ "target": "@kie-tools-core/operating-system", "weight": 1 }, + { + "source": "@kie-tools-core/notifications", + "target": "@kie-tools-core/i18n", + "weight": 1 + }, + { + "source": "@kie-tools-core/notifications", + "target": "@kie-tools-core/workspace", + "weight": 1 + }, { "source": "@kie-tools-core/patternfly-base", "target": "@kie-tools/root-env", @@ -685,36 +689,6 @@ "target": "@kie-tools/serverless-workflow-text-editor", "weight": 1 }, - { - "source": "@kie-tools-core/notifications", - "target": "@kie-tools-core/i18n", - "weight": 1 - }, - { - "source": "@kie-tools-core/notifications", - "target": "@kie-tools-core/workspace", - "weight": 1 - }, - { - "source": "@kie-tools-core/i18n", - "target": "@kie-tools/eslint", - "weight": 1 - }, - { - "source": "@kie-tools-core/i18n", - "target": "@kie-tools/jest-base", - "weight": 1 - }, - { - "source": "@kie-tools-core/i18n", - "target": "@kie-tools/tsconfig", - "weight": 1 - }, - { - "source": "@kie-tools-core/workspace", - "target": "@kie-tools-core/operating-system", - "weight": 1 - }, { "source": "@kie-tools/boxed-expression-component", "target": "@kie-tools-core/operating-system", @@ -1340,6 +1314,11 @@ "target": "@kie-tools/tsconfig", "weight": 1 }, + { + "source": "@kie-tools-core/workspace", + "target": "@kie-tools-core/operating-system", + "weight": 1 + }, { "source": "@kie-tools/kie-sandbox-fs", "target": "@kie-tools/root-env", @@ -1350,6 +1329,21 @@ "target": "@kie-tools/tsconfig", "weight": 1 }, + { + "source": "@kie-tools-core/i18n", + "target": "@kie-tools/eslint", + "weight": 1 + }, + { + "source": "@kie-tools-core/i18n", + "target": "@kie-tools/jest-base", + "weight": 1 + }, + { + "source": "@kie-tools-core/i18n", + "target": "@kie-tools/tsconfig", + "weight": 1 + }, { "source": "@kie-tools/dashbuilder-viewer-image", "target": "@kie-tools/dashbuilder-viewer-deployment-webapp", @@ -2587,7 +2581,6 @@ ["kie-tools-examples-todo-list-view-vscode-extension", "examples/todo-list-view-vscode-extension"], ["@kie-tools-examples/uniforms-patternfly", "examples/uniforms-patternfly"], ["@kie-tools-examples/webapp", "examples/webapp"], - ["@kie-tools-core/backend", "packages/backend"], ["@kie-tools/boxed-expression-component", "packages/boxed-expression-component"], ["@kie-tools/bpmn-marshaller", "packages/bpmn-marshaller"], ["bpmn-vscode-extension", "packages/bpmn-vscode-extension"], From 7bbb481d5a757dca4cad7a930e49eb19052a50fe Mon Sep 17 00:00:00 2001 From: Tiago Bento <1584568+tiagobento@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:18:07 -0400 Subject: [PATCH 10/13] NO-ISSUE: Upgrade `path-to-regexp@1.8.0` to `1.9.0` (#2717) --- pnpm-lock.yaml | 495 ++++--------------------------------------------- 1 file changed, 40 insertions(+), 455 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4e0942d4870..217fdd48396 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -781,91 +781,6 @@ importers: specifier: ^5.9.0 version: 5.9.0 - packages/backend: - dependencies: - '@kie-tools-core/i18n': - specifier: workspace:* - version: link:../i18n - '@kie-tools-core/notifications': - specifier: workspace:* - version: link:../notifications - '@kie-tools-core/workspace': - specifier: workspace:* - version: link:../workspace - axios: - specifier: ^1.7.4 - version: 1.7.4 - fast-xml-parser: - specifier: ^4.4.1 - version: 4.4.1 - portfinder: - specifier: ^1.0.32 - version: 1.0.32 - semver: - specifier: ^7.5.4 - version: 7.5.4 - sinon: - specifier: ^11.1.1 - version: 11.1.1 - devDependencies: - '@babel/core': - specifier: ^7.16.0 - version: 7.16.12 - '@babel/preset-env': - specifier: ^7.16.0 - version: 7.16.11(@babel/core@7.16.12) - '@babel/preset-react': - specifier: ^7.16.0 - version: 7.16.0(@babel/core@7.16.12) - '@kie-tools/eslint': - specifier: workspace:* - version: link:../eslint - '@kie-tools/jest-base': - specifier: workspace:* - version: link:../jest-base - '@kie-tools/root-env': - specifier: workspace:* - version: link:../root-env - '@kie-tools/tsconfig': - specifier: workspace:* - version: link:../tsconfig - '@types/jest': - specifier: ^29.5.12 - version: 29.5.12 - '@types/jest-when': - specifier: ^3.5.5 - version: 3.5.5 - '@types/semver': - specifier: ^7.5.2 - version: 7.5.2 - '@types/sinon': - specifier: ^10.0.2 - version: 10.0.2 - '@types/vscode': - specifier: 1.67.0 - version: 1.67.0 - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) - jest-junit: - specifier: ^16.0.0 - version: 16.0.0 - jest-when: - specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))) - rimraf: - specifier: ^3.0.2 - version: 3.0.2 - stream: - specifier: ^0.0.2 - version: 0.0.2 - ts-jest: - specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) - typescript: - specifier: ^5.5.3 - version: 5.5.3 - packages/boxed-expression-component: dependencies: '@kie-tools-core/i18n': @@ -3379,7 +3294,7 @@ importers: version: 7.6.13(react@17.0.2) '@storybook/addon-webpack5-compiler-babel': specifier: ^3.0.3 - version: 3.0.3(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) + version: 3.0.3(webpack@5.94.0(webpack-cli@4.10.0)) '@storybook/blocks': specifier: ^7.3.2 version: 7.6.13(@types/react-dom@17.0.8)(@types/react@17.0.21)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) @@ -3394,7 +3309,7 @@ importers: version: 7.6.13(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(typescript@5.5.3) '@storybook/react-webpack5': specifier: ^7.3.2 - version: 7.6.13(@babel/core@7.23.0)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) + version: 7.6.13(@babel/core@7.23.0)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) '@types/d3-drag': specifier: ^3.0.3 version: 3.0.7 @@ -3424,7 +3339,7 @@ importers: version: 8.3.0 copy-webpack-plugin: specifier: ^11.0.0 - version: 11.0.0(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) + version: 11.0.0(webpack@5.94.0(webpack-cli@4.10.0)) copyfiles: specifier: ^2.4.1 version: 2.4.1 @@ -3436,16 +3351,16 @@ importers: version: 1.1.9 file-loader: specifier: ^6.2.0 - version: 6.2.0(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) + version: 6.2.0(webpack@5.94.0(webpack-cli@4.10.0)) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) + version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) jest-junit: specifier: ^16.0.0 version: 16.0.0 jest-when: specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3))) + version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))) lodash: specifier: ^4.17.21 version: 4.17.21 @@ -3463,13 +3378,13 @@ importers: version: 7.6.13(encoding@0.1.13) ts-jest: specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.23.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) + version: 29.1.5(@babel/core@7.23.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.0))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 webpack: specifier: ^5.94.0 - version: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0) + version: 5.94.0(webpack-cli@4.10.0) webpack-cli: specifier: ^4.10.0 version: 4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0) @@ -3635,7 +3550,7 @@ importers: version: 7.6.13(react@17.0.2) '@storybook/addon-webpack5-compiler-babel': specifier: ^3.0.3 - version: 3.0.3(webpack@5.94.0(webpack-cli@4.10.0)) + version: 3.0.3(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) '@storybook/blocks': specifier: ^7.3.2 version: 7.6.13(@types/react-dom@17.0.8)(@types/react@17.0.21)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) @@ -3650,7 +3565,7 @@ importers: version: 7.6.13(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(typescript@5.5.3) '@storybook/react-webpack5': specifier: ^7.3.2 - version: 7.6.13(@babel/core@7.23.9)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) + version: 7.6.13(@babel/core@7.23.9)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) '@types/jest-when': specifier: ^3.5.5 version: 3.5.5 @@ -3683,7 +3598,7 @@ importers: version: 9.5.1 html-webpack-plugin: specifier: ^5.3.2 - version: 5.5.3(webpack@5.94.0(webpack-cli@4.10.0)) + version: 5.5.3(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) junit-report-merger: specifier: ^4.0.0 version: 4.0.0 @@ -3704,7 +3619,7 @@ importers: version: 0.11.10 raw-loader: specifier: ^4.0.2 - version: 4.0.2(webpack@5.94.0(webpack-cli@4.10.0)) + version: 4.0.2(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) react: specifier: ^17.0.2 version: 17.0.2 @@ -3725,7 +3640,7 @@ importers: version: 5.5.3 webpack: specifier: ^5.94.0 - version: 5.94.0(webpack-cli@4.10.0) + version: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0) webpack-bundle-analyzer: specifier: ^4.10.2 version: 4.10.2 @@ -14371,196 +14286,168 @@ packages: '@babel/plugin-proposal-async-generator-functions@7.16.8': resolution: {integrity: sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-async-generator-functions@7.18.10': resolution: {integrity: sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-class-properties@7.16.7': resolution: {integrity: sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-class-properties@7.18.6': resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-class-static-block@7.17.6': resolution: {integrity: sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead. peerDependencies: '@babel/core': ^7.12.0 '@babel/plugin-proposal-class-static-block@7.21.0': resolution: {integrity: sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead. peerDependencies: '@babel/core': ^7.12.0 '@babel/plugin-proposal-dynamic-import@7.16.7': resolution: {integrity: sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-dynamic-import@7.18.6': resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-export-namespace-from@7.16.7': resolution: {integrity: sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-export-namespace-from@7.18.9': resolution: {integrity: sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-json-strings@7.16.7': resolution: {integrity: sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-json-strings@7.18.6': resolution: {integrity: sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-logical-assignment-operators@7.16.7': resolution: {integrity: sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-logical-assignment-operators@7.20.7': resolution: {integrity: sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-nullish-coalescing-operator@7.16.7': resolution: {integrity: sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-nullish-coalescing-operator@7.18.6': resolution: {integrity: sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-numeric-separator@7.16.7': resolution: {integrity: sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-numeric-separator@7.18.6': resolution: {integrity: sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-object-rest-spread@7.17.3': resolution: {integrity: sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-object-rest-spread@7.20.7': resolution: {integrity: sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-optional-catch-binding@7.16.7': resolution: {integrity: sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-optional-catch-binding@7.18.6': resolution: {integrity: sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-optional-chaining@7.16.7': resolution: {integrity: sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-optional-chaining@7.21.0': resolution: {integrity: sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-private-methods@7.16.11': resolution: {integrity: sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-private-methods@7.18.6': resolution: {integrity: sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-private-property-in-object@7.16.7': resolution: {integrity: sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-private-property-in-object@7.21.0': resolution: {integrity: sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==} engines: {node: '>=6.9.0'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead. peerDependencies: '@babel/core': ^7.0.0-0 @@ -14573,14 +14460,12 @@ packages: '@babel/plugin-proposal-unicode-property-regex@7.16.7': resolution: {integrity: sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==} engines: {node: '>=4'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead. peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-proposal-unicode-property-regex@7.18.6': resolution: {integrity: sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==} engines: {node: '>=4'} - deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead. peerDependencies: '@babel/core': ^7.0.0-0 @@ -16827,7 +16712,6 @@ packages: '@humanwhocodes/config-array@0.11.13': resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} @@ -16839,7 +16723,6 @@ packages: '@humanwhocodes/object-schema@2.0.1': resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} - deprecated: Use @eslint/object-schema instead '@inquirer/checkbox@2.4.5': resolution: {integrity: sha512-+YlCyS6JBWeZugIvReh/YL5HJcowlklz5RykQuYKQfgWQeCJh5Us0nWcRddvIVkjmYa0I/8bwWioSLu850J8sA==} @@ -17071,7 +16954,6 @@ packages: '@koa/router@10.1.1': resolution: {integrity: sha512-ORNjq5z4EmQPriKbR0ER3k4Gh7YGNhWDL7JBW+8wXDrHLbWYKYSJaOJ9aN06npF5tbTxe2JBOsurpJDAvjiXKw==} engines: {node: '>= 8.0.0'} - deprecated: '**IMPORTANT 10x+ PERFORMANCE UPGRADE**: Please upgrade to v12.0.1+ as we have fixed an issue with debuglog causing 10x slower router benchmark performance, see https://github.com/koajs/router/pull/173' '@kubernetes-models/apimachinery@1.1.0': resolution: {integrity: sha512-DvCNeou3+M5ESJluVs8daVp7g03/hWnwXHou9Se8qNRZpqH6lQHvRjXy6HWSqBV9fKZOnWcOExmkUPQGbVIa6A==} @@ -17217,7 +17099,6 @@ packages: '@npmcli/fs@1.1.0': resolution: {integrity: sha512-VhP1qZLXcrXRIaPoqb4YA55JQxLNF3jNR4T55IdOJa3+IFJKNYHtPvtXx8slmeMavj37vCzCfrqQM1vWLsYKLA==} engines: {node: ^12.13.0 || ^14.15.0 || >=16} - deprecated: this version had an improper engines field added, update to 1.1.1 '@npmcli/fs@3.1.1': resolution: {integrity: sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==} @@ -17235,7 +17116,6 @@ packages: '@npmcli/move-file@1.1.2': resolution: {integrity: sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==} engines: {node: '>=10'} - deprecated: This functionality has been moved to @npmcli/fs '@npmcli/node-gyp@3.0.0': resolution: {integrity: sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==} @@ -18373,24 +18253,12 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} - '@sinonjs/commons@1.8.3': - resolution: {integrity: sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==} - '@sinonjs/commons@3.0.1': resolution: {integrity: sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==} '@sinonjs/fake-timers@10.3.0': resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} - '@sinonjs/fake-timers@7.1.2': - resolution: {integrity: sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==} - - '@sinonjs/samsam@6.0.2': - resolution: {integrity: sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==} - - '@sinonjs/text-encoding@0.7.1': - resolution: {integrity: sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==} - '@socket.io/base64-arraybuffer@1.0.2': resolution: {integrity: sha512-dOlCBKnDw4iShaIsH/bxujKTM18+2TOAsYz+KSc11Am38H4q5Xw8Bbz97ZYdrVNM+um3p7w86Bvvmcn9q+5+eQ==} engines: {node: '>= 0.6.0'} @@ -19570,9 +19438,6 @@ packages: '@types/simpl-schema@1.12.2': resolution: {integrity: sha512-Uk1uqh0X6xDUoTkGBE4i/xnTPGb0vnrMia2fATSGZditNMXdzvdaGiYuAvOLfHXLuH2l5p3fZKZw1iplRwuINQ==} - '@types/sinon@10.0.2': - resolution: {integrity: sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==} - '@types/sinonjs__fake-timers@8.1.1': resolution: {integrity: sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==} @@ -20025,11 +19890,9 @@ packages: abab@2.0.5: resolution: {integrity: sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==} - deprecated: Use your platform's native atob() and btoa() methods instead abab@2.0.6: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} - deprecated: Use your platform's native atob() and btoa() methods instead abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} @@ -20259,7 +20122,6 @@ packages: apollo-datasource@3.3.2: resolution: {integrity: sha512-L5TiS8E2Hn/Yz7SSnWIVbZw0ZfEIXZCa5VUiVxD9P53JvSrf4aStvsFDlGWPvpIdCR+aly2CfoB79B9/JjKFqg==} engines: {node: '>=12.0'} - deprecated: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. apollo-link-context@1.0.20: resolution: {integrity: sha512-MLLPYvhzNb8AglNsk2NcL9AvhO/Vc9hn2ZZuegbhRHGet3oGr0YH9s30NS9+ieoM0sGT11p7oZ6oAILM/kiRBA==} @@ -20284,7 +20146,6 @@ packages: apollo-reporting-protobuf@3.4.0: resolution: {integrity: sha512-h0u3EbC/9RpihWOmcSsvTW2O6RXVaD/mPEjfrPkxRPTEPWqncsgOoRJw+wih4OqfH3PvTJvoEIf4LwKrUaqWog==} - deprecated: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. apollo-server-core@3.13.0: resolution: {integrity: sha512-v/g6DR6KuHn9DYSdtQijz8dLOkP78I5JSVJzPkARhDbhpH74QNwrQ2PP2URAPPEDJ2EeZNQDX8PvbYkAKqg+kg==} @@ -20295,12 +20156,10 @@ packages: apollo-server-env@4.2.1: resolution: {integrity: sha512-vm/7c7ld+zFMxibzqZ7SSa5tBENc4B0uye9LTfjJwGoQFY5xsUPH5FpO5j0bMUDZ8YYNbrF9SNtzc5Cngcr90g==} engines: {node: '>=12.0'} - deprecated: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. apollo-server-errors@3.3.1: resolution: {integrity: sha512-xnZJ5QWs6FixHICXHxUfm+ZWqqxrNuPlQ+kj5m6RtEgIpekOPssH/SD9gf2B4HuWV0QozorrygwZnux8POvyPA==} engines: {node: '>=12.0'} - deprecated: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. peerDependencies: graphql: ^15.3.0 || ^16.0.0 @@ -20314,14 +20173,12 @@ packages: apollo-server-plugin-base@3.7.2: resolution: {integrity: sha512-wE8dwGDvBOGehSsPTRZ8P/33Jan6/PmL0y0aN/1Z5a5GcbFhDaaJCjK5cav6npbbGL2DPKK0r6MPXi3k3N45aw==} engines: {node: '>=12.0'} - deprecated: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. peerDependencies: graphql: ^15.3.0 || ^16.0.0 apollo-server-types@3.8.0: resolution: {integrity: sha512-ZI/8rTE4ww8BHktsVpb91Sdq7Cb71rdSkXELSwdSR0eXu600/sY+1UXhTWdiJvk+Eq5ljqoHLwLbY2+Clq2b9A==} engines: {node: '>=12.0'} - deprecated: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. peerDependencies: graphql: ^15.3.0 || ^16.0.0 @@ -20353,7 +20210,6 @@ packages: are-we-there-yet@2.0.0: resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} engines: {node: '>=10'} - deprecated: This package is no longer supported. arg@2.0.0: resolution: {integrity: sha512-XxNTUzKnz1ctK3ZIcI2XUPlD96wbHP2nGqkPKpvk/HNRlPveYrXIVSTk9m3LcqOgDPg3B1nMvdV/K8wZd7PG4w==} @@ -21562,7 +21418,6 @@ packages: core-js@3.6.5: resolution: {integrity: sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==} - deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. core-util-is@1.0.2: resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==} @@ -22375,7 +22230,6 @@ packages: domexception@4.0.0: resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} engines: {node: '>=12'} - deprecated: Use your platform's native DOMException instead domhandler@4.3.1: resolution: {integrity: sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==} @@ -22475,9 +22329,6 @@ packages: elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - emitter-component@1.1.1: - resolution: {integrity: sha512-G+mpdiAySMuB7kesVRLuyvYRqDmshB7ReKEVuyBPkzQlmiDiLrt7hHHIy4Aff552bgknVN7B2/d3lzhGO5dvpQ==} - emittery@0.13.1: resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} engines: {node: '>=12'} @@ -22905,7 +22756,6 @@ packages: eslint@8.52.0: resolution: {integrity: sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true espree@9.6.1: @@ -23461,7 +23311,6 @@ packages: gauge@4.0.0: resolution: {integrity: sha512-F8sU45yQpjQjxKkm1UOAhf0U/O0aFt//Fl7hsrNVto+patMHjs7dPI9mFOGUKbhrgKm0S3EjW3scMFuQmWSROw==} engines: {node: ^12.13.0 || ^14.15.0 || >=16} - deprecated: This package is no longer supported. gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} @@ -23583,16 +23432,13 @@ packages: glob@7.2.0: resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - deprecated: Glob versions prior to v9 are no longer supported glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} - deprecated: Glob versions prior to v9 are no longer supported global-dirs@3.0.0: resolution: {integrity: sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA==} @@ -24099,7 +23945,6 @@ packages: inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.3: resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} @@ -24177,12 +24022,10 @@ packages: is-accessor-descriptor@0.1.6: resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} engines: {node: '>=0.10.0'} - deprecated: Please upgrade to v0.1.7 is-accessor-descriptor@1.0.0: resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} engines: {node: '>=0.10.0'} - deprecated: Please upgrade to v1.0.1 is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} @@ -24238,12 +24081,10 @@ packages: is-data-descriptor@0.1.4: resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} engines: {node: '>=0.10.0'} - deprecated: Please upgrade to v0.1.5 is-data-descriptor@1.0.0: resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} engines: {node: '>=0.10.0'} - deprecated: Please upgrade to v1.0.1 is-data-view@1.0.1: resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} @@ -24969,9 +24810,6 @@ packages: just-debounce-it@3.0.1: resolution: {integrity: sha512-6EQWOpRV8fm/ame6XvGBSxvsjoMbqj7JS9TV/4Q9aOXt9DQw22GBfTGP6gTAqcBNN/PbzlwtwH7jtM0k9oe9pg==} - just-extend@4.2.1: - resolution: {integrity: sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==} - just-once@2.0.1: resolution: {integrity: sha512-r/s9ilXHAh+uia0/HaHe/ZxvTX9JbCDjtwEwVe7YhSzIZ4vBiCz4MB4Acij1wegnWoytnhkAfQWYZ2SI9Z1n/g==} @@ -25301,9 +25139,6 @@ packages: lodash.flow@3.5.0: resolution: {integrity: sha512-ff3BX/tSioo+XojX4MOsOMhJw0nZoUEF011LX8g8d3gvjVbxd89cCio4BCXronjxcTUIJUoqKEUA+n4CqvvRPw==} - lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - lodash.includes@4.3.0: resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} @@ -25381,7 +25216,6 @@ packages: loupe@2.3.6: resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} - deprecated: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5 lower-case-first@2.0.2: resolution: {integrity: sha512-EVm/rR94FJTZi3zefZ82fLWab+GX14LJN4HrWBcuo6Evmsl9hEfnqxgcHCKb9q+mNf6EVdsjx/qucYFIIB84pg==} @@ -25952,9 +25786,6 @@ packages: nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - nise@5.1.0: - resolution: {integrity: sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==} - no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} @@ -26169,7 +26000,6 @@ packages: npmlog@6.0.0: resolution: {integrity: sha512-03ppFRGlsyUaQFbGC2C8QWJN/C/K7PsfyD9aQdhVKAQIH4sQBc8WASqFBP7O+Ut4d2oo5LoeoboB3cGdBZSp6Q==} engines: {node: ^12.13.0 || ^14.15.0 || >=16} - deprecated: This package is no longer supported. nth-check@2.0.1: resolution: {integrity: sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==} @@ -26592,8 +26422,8 @@ packages: path-to-regexp@0.1.7: resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} - path-to-regexp@1.8.0: - resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} + path-to-regexp@1.9.0: + resolution: {integrity: sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==} path-to-regexp@2.2.1: resolution: {integrity: sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ==} @@ -26742,7 +26572,6 @@ packages: popper.js@1.16.1: resolution: {integrity: sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==} - deprecated: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 portfinder@1.0.32: resolution: {integrity: sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==} @@ -27177,7 +27006,6 @@ packages: puppeteer@13.1.2: resolution: {integrity: sha512-ozVM8Tdg0patMtm/xAr3Uh7rQ28vBpbTHLP+ECmoAxG/s4PKrVLN764H/poLux7Ln77jHThOd8OBJj5mTuA6Iw==} engines: {node: '>=10.18.1'} - deprecated: < 22.8.2 is no longer supported pure-color@1.3.0: resolution: {integrity: sha512-QFADYnsVoBMw1srW7OVKEYjG+MbIa49s54w1MA1EDY6r2r/sTcKKYqRX1f4GYvnXP7eN/Pe9HFcX+hwzmrXRHA==} @@ -27195,10 +27023,6 @@ packages: q@1.5.1: resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} - deprecated: |- - You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. - - (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) qjobs@1.2.0: resolution: {integrity: sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==} @@ -27278,7 +27102,6 @@ packages: rdk@6.5.0: resolution: {integrity: sha512-Jrv4YFVH07JI03wxwsQhosypdyqOHirzNU0pfmteIfylhSpaIi8VnAp3MbznD3/ZKZyt6YRj0kMtQopTwIxMUw==} - deprecated: 'deprecated: use reablocks instead' peerDependencies: react: '>=16' react-dom: '>=16' @@ -27620,7 +27443,6 @@ packages: react-use-gesture@8.0.1: resolution: {integrity: sha512-CXzUNkulUdgouaAlvAsC5ZVo0fi9KGSBSk81WrE4kOIcJccpANe9zZkAYr5YZZhqpicIFxitsrGVS4wmoMun9A==} - deprecated: This package is no longer maintained. Please use @use-gesture/react instead peerDependencies: react: '>= 16.8.0' @@ -27904,7 +27726,6 @@ packages: resolve-url@0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} - deprecated: https://github.com/lydell/resolve-url#deprecated resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} @@ -27971,26 +27792,21 @@ packages: right-pad@1.0.1: resolution: {integrity: sha512-bYBjgxmkvTAfgIYy328fmkwhp39v8lwVgWhhrzxPV3yHtcSqyYKe9/XOhvW48UFjATg3VuJbpsp5822ACNvkmw==} engines: {node: '>= 0.10'} - deprecated: Please use String.prototype.padEnd() over this package. rimraf@2.5.4: resolution: {integrity: sha512-Lw7SHMjssciQb/rRz7JyPIy9+bbUshEucPoLRvWqy09vC5zQixl8Uet+Zl+SROBB/JMWHJRdCk1qdxNWHNMvlQ==} - deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@2.6.3: resolution: {integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==} - deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@5.0.10: @@ -28087,7 +27903,6 @@ packages: sane@4.1.0: resolution: {integrity: sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==} engines: {node: 6.* || 8.* || >= 10.*} - deprecated: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added hasBin: true sanitize-filename-ts@1.0.2: @@ -28366,10 +28181,6 @@ packages: resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} engines: {node: '>=10'} - sinon@11.1.1: - resolution: {integrity: sha512-ZSSmlkSyhUWbkF01Z9tEbxZLF/5tRC9eojCdFh33gtQaP7ITQVaMWQHGuFM7Cuf/KEfihuh1tTl3/ABju3AQMg==} - deprecated: 16.1.1 - sirv@2.0.4: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} @@ -28495,7 +28306,6 @@ packages: source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} - deprecated: See https://github.com/lydell/source-map-resolve#deprecated source-map-support@0.5.13: resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} @@ -28505,7 +28315,6 @@ packages: source-map-url@0.4.0: resolution: {integrity: sha512-liJwHPI9x9d9w5WSIjM58MqGmmb7XzNqwdUA3kSBQ4lmDngexlKwawGzK3J1mKXi6+sysoMDlpVyZh9sv5vRfw==} - deprecated: See https://github.com/lydell/source-map-url#deprecated source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} @@ -28578,7 +28387,6 @@ packages: stable@0.1.8: resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} - deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' stack-utils@2.0.4: resolution: {integrity: sha512-ERg+H//lSSYlZhBIUu+wJnqg30AbyBbpZlIhcshpn7BNzpoRODZgfyr9J+8ERf3ooC6af3u7Lcl01nleau7MrA==} @@ -28651,9 +28459,6 @@ packages: stream-to-promise@2.2.0: resolution: {integrity: sha512-HAGUASw8NT0k8JvIVutB2Y/9iBk7gpgEyAudXwNJmZERdMITGdajOa4VJfD/kNiA3TppQpTP4J+CtcHwdzKBAw==} - stream@0.0.2: - resolution: {integrity: sha512-gCq3NDI2P35B2n6t76YJuOp7d6cN/C7Rt0577l91wllh0sY9ZBuw9KaSGqH/b0hzn3CWWJbpbW0W0WvQ1H/Q7g==} - streamroller@3.0.2: resolution: {integrity: sha512-ur6y5S5dopOaRXBuRIZ1u6GC5bcEXHRZKgfBjfCglMhmIf+roVCECjvkEYzNQOXIN2/JPnkMPW/8B3CZoKaEPA==} engines: {node: '>=8.0'} @@ -28803,7 +28608,6 @@ packages: superagent@7.1.6: resolution: {integrity: sha512-gZkVCQR1gy/oUXr+kxJMLDjla434KmSOKbx5iGD30Ql+AkJQ/YlPKECJy2nhqOsHLjGHzoDTXNSjhnvWhzKk7g==} engines: {node: '>=6.4.0 <13 || >=14'} - deprecated: Please upgrade to v9.0.0+ as we have fixed a public vulnerability with formidable dependency. Note that v9.0.0+ requires Node.js v14.18.0+. See https://github.com/ladjs/superagent/pull/1800 for insight. This project is supported and maintained by the team at Forward Email @ https://forwardemail.net supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} @@ -29382,7 +29186,6 @@ packages: uid-number@0.0.6: resolution: {integrity: sha512-c461FXIljswCuscZn67xq9PpszkPT6RjheWFQTgCyabJrTUozElanb0YEqv2UGgk247YpcJkFBuSGNvBlpXM9w==} - deprecated: This package is no longer supported. umask@1.1.0: resolution: {integrity: sha512-lE/rxOhmiScJu9L6RTNVgB/zZbF+vGC0/p6D3xnkAePI2o0sMyFG966iR5Ki50OI/0mNi2yaRnxfLsPmEZF/JA==} @@ -29554,7 +29357,6 @@ packages: urix@0.1.0: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} - deprecated: Please see https://github.com/lydell/urix#deprecated url-join@4.0.1: resolution: {integrity: sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==} @@ -39922,10 +39724,6 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} - '@sinonjs/commons@1.8.3': - dependencies: - type-detect: 4.0.8 - '@sinonjs/commons@3.0.1': dependencies: type-detect: 4.0.8 @@ -39934,18 +39732,6 @@ snapshots: dependencies: '@sinonjs/commons': 3.0.1 - '@sinonjs/fake-timers@7.1.2': - dependencies: - '@sinonjs/commons': 1.8.3 - - '@sinonjs/samsam@6.0.2': - dependencies: - '@sinonjs/commons': 1.8.3 - lodash.get: 4.4.2 - type-detect: 4.0.8 - - '@sinonjs/text-encoding@0.7.1': {} - '@socket.io/base64-arraybuffer@1.0.2': {} '@storybook/addon-controls@7.4.6(@types/react-dom@17.0.8)(@types/react@17.0.21)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)': @@ -40413,7 +40199,7 @@ snapshots: - uglify-js - webpack-cli - '@storybook/builder-webpack5@7.6.13(encoding@0.1.13)(esbuild@0.18.20)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))': + '@storybook/builder-webpack5@7.6.13(encoding@0.1.13)(esbuild@0.18.20)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))': dependencies: '@babel/core': 7.24.9 '@storybook/channels': 7.6.13 @@ -40463,56 +40249,6 @@ snapshots: - uglify-js - webpack-cli - '@storybook/builder-webpack5@7.6.13(encoding@0.1.13)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))': - dependencies: - '@babel/core': 7.24.9 - '@storybook/channels': 7.6.13 - '@storybook/client-logger': 7.6.13 - '@storybook/core-common': 7.6.13(encoding@0.1.13) - '@storybook/core-events': 7.6.13 - '@storybook/core-webpack': 7.6.13(encoding@0.1.13) - '@storybook/node-logger': 7.6.13 - '@storybook/preview': 7.6.13 - '@storybook/preview-api': 7.6.13 - '@swc/core': 1.3.92 - '@types/node': 18.17.18 - '@types/semver': 7.5.2 - babel-loader: 9.1.3(@babel/core@7.24.9)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - browser-assert: 1.2.1 - case-sensitive-paths-webpack-plugin: 2.4.0 - cjs-module-lexer: 1.2.3 - constants-browserify: 1.0.0 - css-loader: 6.7.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - es-module-lexer: 1.4.1 - express: 4.21.1 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - fs-extra: 11.1.1 - html-webpack-plugin: 5.5.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - magic-string: 0.30.7 - path-browserify: 1.0.1 - process: 0.11.10 - semver: 7.5.4 - style-loader: 3.3.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - swc-loader: 0.2.3(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - terser-webpack-plugin: 5.3.10(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - ts-dedent: 2.2.0 - url: 0.11.3 - util: 0.12.5 - util-deprecate: 1.0.2 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - webpack-dev-middleware: 6.1.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - webpack-hot-middleware: 2.25.4 - webpack-virtual-modules: 0.5.0 - optionalDependencies: - typescript: 5.5.3 - transitivePeerDependencies: - - '@swc/helpers' - - encoding - - esbuild - - supports-color - - uglify-js - - webpack-cli - '@storybook/builder-webpack5@7.6.13(encoding@0.1.13)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))': dependencies: '@babel/core': 7.24.9 @@ -41347,16 +41083,16 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@storybook/preset-react-webpack@7.6.13(@babel/core@7.23.0)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': + '@storybook/preset-react-webpack@7.6.13(@babel/core@7.23.0)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': dependencies: '@babel/preset-flow': 7.22.15(@babel/core@7.23.0) '@babel/preset-react': 7.22.15(@babel/core@7.23.0) - '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.39)(react-refresh@0.14.0)(type-fest@4.26.1)(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.39)(react-refresh@0.14.0)(type-fest@4.26.1)(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)(webpack@5.94.0(webpack-cli@4.10.0)) '@storybook/core-webpack': 7.6.13(encoding@0.1.13) '@storybook/docs-tools': 7.6.13(encoding@0.1.13) '@storybook/node-logger': 7.6.13 '@storybook/react': 7.6.13(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(typescript@5.5.3) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.5.3)(webpack@5.94.0(webpack-cli@4.10.0)) '@types/node': 18.17.18 '@types/semver': 7.5.2 babel-plugin-add-react-displayname: 0.0.5 @@ -41367,7 +41103,7 @@ snapshots: react-dom: 17.0.2(react@17.0.2) react-refresh: 0.14.0 semver: 7.5.4 - webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0) + webpack: 5.94.0(webpack-cli@4.10.0) optionalDependencies: '@babel/core': 7.23.0 typescript: 5.5.3 @@ -41385,16 +41121,16 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@storybook/preset-react-webpack@7.6.13(@babel/core@7.23.9)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': + '@storybook/preset-react-webpack@7.6.13(@babel/core@7.23.9)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': dependencies: '@babel/preset-flow': 7.22.15(@babel/core@7.23.9) '@babel/preset-react': 7.22.15(@babel/core@7.23.9) - '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.39)(react-refresh@0.14.0)(type-fest@4.26.1)(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)(webpack@5.94.0(webpack-cli@4.10.0)) + '@pmmmwh/react-refresh-webpack-plugin': 0.5.11(@types/webpack@4.41.39)(react-refresh@0.14.0)(type-fest@4.26.1)(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) '@storybook/core-webpack': 7.6.13(encoding@0.1.13) '@storybook/docs-tools': 7.6.13(encoding@0.1.13) '@storybook/node-logger': 7.6.13 '@storybook/react': 7.6.13(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(typescript@5.5.3) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.5.3)(webpack@5.94.0(webpack-cli@4.10.0)) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)) '@types/node': 18.17.18 '@types/semver': 7.5.2 babel-plugin-add-react-displayname: 0.0.5 @@ -41405,7 +41141,7 @@ snapshots: react-dom: 17.0.2(react@17.0.2) react-refresh: 0.14.0 semver: 7.5.4 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0) optionalDependencies: '@babel/core': 7.23.9 typescript: 5.5.3 @@ -41595,10 +41331,10 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@storybook/react-webpack5@7.6.13(@babel/core@7.23.0)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': + '@storybook/react-webpack5@7.6.13(@babel/core@7.23.0)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': dependencies: - '@storybook/builder-webpack5': 7.6.13(encoding@0.1.13)(esbuild@0.18.20)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0)) - '@storybook/preset-react-webpack': 7.6.13(@babel/core@7.23.0)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) + '@storybook/builder-webpack5': 7.6.13(encoding@0.1.13)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0)) + '@storybook/preset-react-webpack': 7.6.13(@babel/core@7.23.0)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) '@storybook/react': 7.6.13(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(typescript@5.5.3) '@types/node': 18.17.18 react: 17.0.2 @@ -41621,10 +41357,10 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - '@storybook/react-webpack5@7.6.13(@babel/core@7.23.9)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': + '@storybook/react-webpack5@7.6.13(@babel/core@7.23.9)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4)': dependencies: - '@storybook/builder-webpack5': 7.6.13(encoding@0.1.13)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - '@storybook/preset-react-webpack': 7.6.13(@babel/core@7.23.9)(@types/webpack@4.41.39)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) + '@storybook/builder-webpack5': 7.6.13(encoding@0.1.13)(esbuild@0.18.20)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) + '@storybook/preset-react-webpack': 7.6.13(@babel/core@7.23.9)(@swc/core@1.3.92)(@types/webpack@4.41.39)(encoding@0.1.13)(esbuild@0.18.20)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(type-fest@4.26.1)(typescript@5.5.3)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0))(webpack-hot-middleware@2.25.4) '@storybook/react': 7.6.13(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)(typescript@5.5.3) '@types/node': 18.17.18 react: 17.0.2 @@ -42699,10 +42435,6 @@ snapshots: dependencies: '@types/meteor': 1.4.70 - '@types/sinon@10.0.2': - dependencies: - '@sinonjs/fake-timers': 7.1.2 - '@types/sinonjs__fake-timers@8.1.1': {} '@types/sizzle@2.3.2': {} @@ -44236,13 +43968,6 @@ snapshots: schema-utils: 4.2.0 webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - babel-loader@9.1.3(@babel/core@7.24.9)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - '@babel/core': 7.24.9 - find-cache-dir: 4.0.0 - schema-utils: 4.2.0 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - babel-loader@9.1.3(@babel/core@7.24.9)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: '@babel/core': 7.24.9 @@ -46119,18 +45844,6 @@ snapshots: semver: 7.6.2 webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - css-loader@6.7.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - icss-utils: 5.1.0(postcss@8.4.38) - postcss: 8.4.38 - postcss-modules-extract-imports: 3.0.0(postcss@8.4.38) - postcss-modules-local-by-default: 4.0.0(postcss@8.4.38) - postcss-modules-scope: 3.0.0(postcss@8.4.38) - postcss-modules-values: 4.0.0(postcss@8.4.38) - postcss-value-parser: 4.2.0 - semver: 7.6.2 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - css-loader@6.7.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: icss-utils: 5.1.0(postcss@8.4.38) @@ -47058,8 +46771,6 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - emitter-component@1.1.1: {} - emittery@0.13.1: {} emoji-regex@10.3.0: {} @@ -48380,23 +48091,6 @@ snapshots: typescript: 5.5.3 webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - fork-ts-checker-webpack-plugin@8.0.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - '@babel/code-frame': 7.23.5 - chalk: 4.1.2 - chokidar: 3.5.3 - cosmiconfig: 7.0.1 - deepmerge: 4.2.2 - fs-extra: 10.1.0 - memfs: 3.5.1 - minimatch: 3.1.2 - node-abort-controller: 3.1.1 - schema-utils: 3.3.0 - semver: 7.5.4 - tapable: 2.2.1 - typescript: 5.5.3 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - fork-ts-checker-webpack-plugin@8.0.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: '@babel/code-frame': 7.23.5 @@ -49079,15 +48773,6 @@ snapshots: tapable: 2.2.1 webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - html-webpack-plugin@5.5.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - '@types/html-minifier-terser': 6.1.0 - html-minifier-terser: 6.1.0 - lodash: 4.17.21 - pretty-error: 4.0.0 - tapable: 2.2.1 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - html-webpack-plugin@5.5.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: '@types/html-minifier-terser': 6.1.0 @@ -50997,8 +50682,6 @@ snapshots: just-debounce-it@3.0.1: {} - just-extend@4.2.1: {} - just-once@2.0.1: {} jwa@1.4.1: @@ -51437,8 +51120,6 @@ snapshots: lodash.flow@3.5.0: {} - lodash.get@4.4.2: {} - lodash.includes@4.3.0: {} lodash.isboolean@3.0.3: {} @@ -52151,14 +51832,6 @@ snapshots: nice-try@1.0.5: {} - nise@5.1.0: - dependencies: - '@sinonjs/commons': 1.8.3 - '@sinonjs/fake-timers': 7.1.2 - '@sinonjs/text-encoding': 0.7.1 - just-extend: 4.2.1 - path-to-regexp: 1.8.0 - no-case@3.0.4: dependencies: lower-case: 2.0.2 @@ -52939,7 +52612,7 @@ snapshots: path-to-regexp@0.1.7: {} - path-to-regexp@1.8.0: + path-to-regexp@1.9.0: dependencies: isarray: 0.0.1 @@ -53629,6 +53302,12 @@ snapshots: iconv-lite: 0.4.24 unpipe: 1.0.0 + raw-loader@4.0.2(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0)): + dependencies: + loader-utils: 2.0.4 + schema-utils: 3.3.0 + webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0) + raw-loader@4.0.2(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0)): dependencies: loader-utils: 2.0.4 @@ -54014,7 +53693,7 @@ snapshots: history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 - path-to-regexp: 1.8.0 + path-to-regexp: 1.9.0 prop-types: 15.8.1 react: 17.0.2 react-is: 16.13.1 @@ -55060,15 +54739,6 @@ snapshots: dependencies: semver: 7.5.4 - sinon@11.1.1: - dependencies: - '@sinonjs/commons': 1.8.3 - '@sinonjs/fake-timers': 7.1.2 - '@sinonjs/samsam': 6.0.2 - diff: 5.1.0 - nise: 5.1.0 - supports-color: 7.2.0 - sirv@2.0.4: dependencies: '@polka/url': 1.0.0-next.25 @@ -55429,10 +55099,6 @@ snapshots: end-of-stream: 1.1.0 stream-to-array: 2.3.0 - stream@0.0.2: - dependencies: - emitter-component: 1.1.1 - streamroller@3.0.2: dependencies: date-format: 4.0.3 @@ -55605,10 +55271,6 @@ snapshots: dependencies: webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - style-loader@3.3.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - style-loader@3.3.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0)) @@ -55718,11 +55380,6 @@ snapshots: '@swc/core': 1.3.92 webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - swc-loader@0.2.3(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - '@swc/core': 1.3.92 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - swc-loader@0.2.3(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: '@swc/core': 1.3.92 @@ -55873,17 +55530,6 @@ snapshots: '@swc/core': 1.3.92 esbuild: 0.18.20 - terser-webpack-plugin@5.3.10(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - '@jridgewell/trace-mapping': 0.3.25 - jest-worker: 27.5.1 - schema-utils: 3.3.0 - serialize-javascript: 6.0.2 - terser: 5.31.6 - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - optionalDependencies: - '@swc/core': 1.3.92 - terser-webpack-plugin@5.3.10(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: '@jridgewell/trace-mapping': 0.3.25 @@ -56172,24 +55818,6 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.16.12) esbuild: 0.18.20 - ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3): - dependencies: - bs-logger: 0.2.6 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.5.4 - typescript: 5.5.3 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.16.12 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.16.12) - ts-jest@29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3): dependencies: bs-logger: 0.2.6 @@ -56244,11 +55872,11 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.18.10) - ts-jest@29.1.5(@babel/core@7.23.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3): + ts-jest@29.1.5(@babel/core@7.23.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.0))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)) + jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -56261,7 +55889,6 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.23.0) - esbuild: 0.18.20 ts-jest@29.1.5(@babel/core@7.23.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.0))(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3): dependencies: @@ -57515,16 +57142,6 @@ snapshots: optionalDependencies: webpack: 5.94.0(@swc/core@1.3.92)(esbuild@0.18.20) - webpack-dev-middleware@6.1.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))): - dependencies: - colorette: 2.0.20 - memfs: 3.5.1 - mime-types: 2.1.35 - range-parser: 1.2.1 - schema-utils: 4.2.0 - optionalDependencies: - webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)) - webpack-dev-middleware@6.1.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))): dependencies: colorette: 2.0.20 @@ -57824,38 +57441,6 @@ snapshots: - esbuild - uglify-js - webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0)): - dependencies: - '@types/estree': 1.0.5 - '@webassemblyjs/ast': 1.12.1 - '@webassemblyjs/wasm-edit': 1.12.1 - '@webassemblyjs/wasm-parser': 1.12.1 - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) - browserslist: 4.23.3 - chrome-trace-event: 1.0.4 - enhanced-resolve: 5.17.1 - es-module-lexer: 1.5.4 - eslint-scope: 5.1.1 - events: 3.3.0 - glob-to-regexp: 0.4.1 - graceful-fs: 4.2.11 - json-parse-even-better-errors: 2.3.1 - loader-runner: 4.3.0 - mime-types: 2.1.35 - neo-async: 2.6.2 - schema-utils: 3.3.0 - tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(@swc/core@1.3.92)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0))) - watchpack: 2.4.2 - webpack-sources: 3.2.3 - optionalDependencies: - webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0) - transitivePeerDependencies: - - '@swc/core' - - esbuild - - uglify-js - webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0)): dependencies: '@types/estree': 1.0.5 From 8e7a2020a8dd0a22af3b13a3812e6913b3c2080f Mon Sep 17 00:00:00 2001 From: Fabrizio Antonangeli Date: Thu, 31 Oct 2024 21:18:25 +0100 Subject: [PATCH 11/13] NO-ISSUE: fix sonataflow management console ocp permission denied (#2719) --- .../modules/sonataflow/management-console/configure-httpd.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/configure-httpd.sh b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/configure-httpd.sh index 7797df0f736..e3cfcfef92c 100644 --- a/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/configure-httpd.sh +++ b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/configure-httpd.sh @@ -44,4 +44,8 @@ cp -v "${SCRIPT_DIR}"/added/* "${MGMT_CONSOLE_HOME}"/launch chmod +x "${MGMT_CONSOLE_HOME}/launch/entrypoint.sh" "${MGMT_CONSOLE_HOME}/image-env-to-json-standalone" chown -R "${USER_ID}" "${MGMT_CONSOLE_HOME}" +# Fixing /var/www permissions +chgrp -R 0 ${HTTPD_LOG_PATH} ${HTTPD_VAR_RUN} ${HTTPD_DATA_PATH}/html +chmod -R g=u ${HTTPD_LOG_PATH} ${HTTPD_VAR_RUN} ${HTTPD_DATA_PATH}/html + if [ -f "${MGMT_CONSOLE_HOME}/app/env.json" ]; then chmod a+w "${MGMT_CONSOLE_HOME}/app/env.json"; fi From 4eef9f277083a9cf8d554ceab12bd0e3a4700711 Mon Sep 17 00:00:00 2001 From: Alex Porcelli Date: Fri, 1 Nov 2024 15:10:48 -0400 Subject: [PATCH 12/13] kie-issues#1600: address additional vulnerabilities (#2721) --- .ci/incubator-kie-tools-ci-build.Dockerfile | 4 +- .github/actions/setup-env/action.yml | 4 +- README.md | 2 +- devbox.json | 2 +- devbox.lock | 432 ++---------------- .../pom.xml | 6 +- packages/kn-plugin-workflow/README.md | 2 +- repo/build-dependencies-versions.json | 2 +- 8 files changed, 51 insertions(+), 403 deletions(-) diff --git a/.ci/incubator-kie-tools-ci-build.Dockerfile b/.ci/incubator-kie-tools-ci-build.Dockerfile index 588fe32eb9b..64c2eb3226b 100644 --- a/.ci/incubator-kie-tools-ci-build.Dockerfile +++ b/.ci/incubator-kie-tools-ci-build.Dockerfile @@ -100,8 +100,8 @@ RUN curl -s "https://get.sdkman.io" | bash && \ sdk flush # Golang setup -RUN wget https://go.dev/dl/go1.21.9.linux-amd64.tar.gz -P /tmp && \ - sudo tar xzf /tmp/go1.21.9.linux-amd64.tar.gz -C /opt && rm /tmp/go1.21.9.linux-amd64.tar.gz && \ +RUN wget https://go.dev/dl/go1.21.13.linux-amd64.tar.gz -P /tmp && \ + sudo tar xzf /tmp/go1.21.13.linux-amd64.tar.gz -C /opt && rm /tmp/go1.21.13.linux-amd64.tar.gz && \ echo 'export GOPATH=${HOME}/go' | sudo tee /etc/profile.d/go.sh && \ echo 'export PATH=${PATH}:/opt/go/bin:${GOPATH}/bin' | sudo tee -a /etc/profile.d/go.sh && \ echo "source /etc/profile.d/go.sh" >> $HOME/.bashrc && \ diff --git a/.github/actions/setup-env/action.yml b/.github/actions/setup-env/action.yml index 8650d034673..3a07a5ec18a 100644 --- a/.github/actions/setup-env/action.yml +++ b/.github/actions/setup-env/action.yml @@ -77,10 +77,10 @@ runs: java-version: 17 distribution: "temurin" - - name: "Set up GOLANG 1.21.9" + - name: "Set up GOLANG 1.21.13" uses: actions/setup-go@v5 with: - go-version: "1.21.9" + go-version: "1.21.13" - name: "Set up Maven" uses: stCarolas/setup-maven@v5 diff --git a/README.md b/README.md index 052e4d56144..9af78d4f2a6 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ To build and test all packages of the Apache KIE Tools project, you're going to - pnpm `9.3.0` _(To install, follow these instructions: https://pnpm.io/installation#using-npm)_ - Maven `3.9.6` - Java `17` -- Go `1.21.9` _(To install, follow these instructions: https://go.dev/doc/install)_ +- Go `1.21.13` _(To install, follow these instructions: https://go.dev/doc/install)_ - Python `3.12` _(To install, follow these instructions: https://www.python.org/downloads/)_ - Helm `3.13.3` _(To install, follow these instructions: https://helm.sh/docs/intro/install/)_ - Make diff --git a/devbox.json b/devbox.json index 0268f10a97a..c86545e5c32 100644 --- a/devbox.json +++ b/devbox.json @@ -6,7 +6,7 @@ "maven": "3.9.6", "kubernetes-helm": "3.13.3", "gnumake": "4.4.1", - "go": "1.21.9", + "go": "1.21.13", "python": "3.12.2", "libxml2": "2.13.3" }, diff --git a/devbox.lock b/devbox.lock index e44362293a1..309462aaba7 100644 --- a/devbox.lock +++ b/devbox.lock @@ -2,142 +2,42 @@ "lockfile_version": "1", "packages": { "gnumake@4.4.1": { - "last_modified": "2024-03-22T11:26:23Z", - "resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#gnumake", + "last_modified": "2024-10-13T23:44:06Z", + "resolved": "github:NixOS/nixpkgs/d4f247e89f6e10120f911e2e2d2254a050d0f732#gnumake", "source": "devbox-search", "version": "4.4.1", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/d9wnf8z9xpl90kghagl5jh3lncqc893q-gnumake-4.4.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/cj2kz1p6fzkxyr6s2a6h2kkz6vy3hs66-gnumake-4.4.1-man", - "default": true - }, - { - "name": "info", - "path": "/nix/store/rkg39gf40dyllcppicbl2jjmx5jgfasz-gnumake-4.4.1-info" - } - ], - "store_path": "/nix/store/d9wnf8z9xpl90kghagl5jh3lncqc893q-gnumake-4.4.1" + "store_path": "/nix/store/xqd18p6bfh63xgy6r27ryj43m05sygfd-gnumake-4.4.1" }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/fff78x6lxmsmhzkcijpia3pac6gy2hfs-gnumake-4.4.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/l4m6k61i066b84f24pfgspy5anm0ic55-gnumake-4.4.1-man", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/xwwa9jvl8wkvzslh9f4f9paqd66jxhdy-gnumake-4.4.1-debug" - }, - { - "name": "info", - "path": "/nix/store/h7g4d56a69cchg4ph7rgaqwy8xvrfk8c-gnumake-4.4.1-info" - } - ], - "store_path": "/nix/store/fff78x6lxmsmhzkcijpia3pac6gy2hfs-gnumake-4.4.1" + "store_path": "/nix/store/7vavvidkcwpkcv7vl2k695w1sj3d0v6d-gnumake-4.4.1" }, "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/224fzspjyx3mwc050v2bi9bikiq3h417-gnumake-4.4.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/fxrnymr71z4q2bs91zsnwqqah976wz10-gnumake-4.4.1-man", - "default": true - }, - { - "name": "info", - "path": "/nix/store/pn0agdr8mqyz1hndxldrzgz073r2javv-gnumake-4.4.1-info" - } - ], - "store_path": "/nix/store/224fzspjyx3mwc050v2bi9bikiq3h417-gnumake-4.4.1" + "store_path": "/nix/store/1f90m5f11kfyyg198qblv1x7blycfvfd-gnumake-4.4.1" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/x1aqq14561lsgck9ii5dfibpf58jy7d9-gnumake-4.4.1", - "default": true - }, - { - "name": "man", - "path": "/nix/store/1y6xvn5ff1b4h5vc0sx4kr0ad5h93viq-gnumake-4.4.1-man", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/r8yg8v3x21rvpzjzjqvgzmrdqvg3hqwy-gnumake-4.4.1-debug" - }, - { - "name": "info", - "path": "/nix/store/2mrrh6f51cncy67i3xxj1s2f4i99djwh-gnumake-4.4.1-info" - } - ], - "store_path": "/nix/store/x1aqq14561lsgck9ii5dfibpf58jy7d9-gnumake-4.4.1" + "store_path": "/nix/store/w44ahngg3y69rpq62f4agzl747y872as-gnumake-4.4.1" } } }, - "go@1.21.9": { - "last_modified": "2024-04-19T17:36:04-04:00", - "resolved": "github:NixOS/nixpkgs/92d295f588631b0db2da509f381b4fb1e74173c5#go_1_21", + "go@1.21.13": { + "last_modified": "2024-09-10T15:01:03Z", + "resolved": "github:NixOS/nixpkgs/5ed627539ac84809c78b2dd6d26a5cebeb5ae269#go_1_21", "source": "devbox-search", - "version": "1.21.9", + "version": "1.21.13", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/hnqasgvlimar5j7k0kpbbbxbkn8zn1sj-go-1.21.9", - "default": true - } - ], - "store_path": "/nix/store/hnqasgvlimar5j7k0kpbbbxbkn8zn1sj-go-1.21.9" + "store_path": "/nix/store/59bymri4pr8mq5zh678smrf381i3fmy2-go-1.21.13" }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/1j8kg9v5zck8j2vnxng7qg9fd7kmmahm-go-1.21.9", - "default": true - } - ], - "store_path": "/nix/store/1j8kg9v5zck8j2vnxng7qg9fd7kmmahm-go-1.21.9" + "store_path": "/nix/store/7dqbqicx8szqnyzag6l41gwbjmh1xdk0-go-1.21.13" }, "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/hy3h296ckqcdrm4bq8gxwrrpgfi84lxm-go-1.21.9", - "default": true - } - ], - "store_path": "/nix/store/hy3h296ckqcdrm4bq8gxwrrpgfi84lxm-go-1.21.9" + "store_path": "/nix/store/ws9bs446vgwmxchqnpjp9503x420iz75-go-1.21.13" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/r9qdln83ffwmhjrl20byxxxav645mb5b-go-1.21.9", - "default": true - } - ], - "store_path": "/nix/store/r9qdln83ffwmhjrl20byxxxav645mb5b-go-1.21.9" + "store_path": "/nix/store/yij3vkkjv7ghn055v0rqhbjzyh0dy4nq-go-1.21.13" } } }, @@ -148,366 +48,110 @@ "version": "3.13.3", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/s15ghsgbb8ziwm5wzd547gh8h0pv54wa-kubernetes-helm-3.13.3", - "default": true - } - ], "store_path": "/nix/store/s15ghsgbb8ziwm5wzd547gh8h0pv54wa-kubernetes-helm-3.13.3" }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/gp97zk09cv9b3kd6x0df5p6i2lijclqy-kubernetes-helm-3.13.3", - "default": true - } - ], "store_path": "/nix/store/gp97zk09cv9b3kd6x0df5p6i2lijclqy-kubernetes-helm-3.13.3" }, "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/iia083d6skha9sg80plvjjfzql2by8rc-kubernetes-helm-3.13.3", - "default": true - } - ], "store_path": "/nix/store/iia083d6skha9sg80plvjjfzql2by8rc-kubernetes-helm-3.13.3" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/jv37f1mm61bspinaw9q2hq67vn9qydyk-kubernetes-helm-3.13.3", - "default": true - } - ], "store_path": "/nix/store/jv37f1mm61bspinaw9q2hq67vn9qydyk-kubernetes-helm-3.13.3" } } }, "libxml2@2.13.3": { - "last_modified": "2024-09-12T11:58:09Z", - "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#libxml2", + "last_modified": "2024-10-08T08:54:18Z", + "resolved": "github:NixOS/nixpkgs/a2eacc0c62c0537bd1a7a60c1f91d1f3a59fd013#libxml2", "source": "devbox-search", "version": "2.13.3", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "bin", - "path": "/nix/store/7gi1kd2mz9jc8ya4lkqhlv9vklc5qr2j-libxml2-2.13.3-bin", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/mnij865rdzrrnxqmhj4s0abmd1xx771v-libxml2-2.13.3-dev" - }, - { - "name": "devdoc", - "path": "/nix/store/80bkizndgvrqiq42ig681irxswsf4kxv-libxml2-2.13.3-devdoc" - }, - { - "name": "out", - "path": "/nix/store/sr8lnkgivqcd06113nsk5p3jz2xcx7rp-libxml2-2.13.3" - } - ], "store_path": "/nix/store/7gi1kd2mz9jc8ya4lkqhlv9vklc5qr2j-libxml2-2.13.3-bin" }, "aarch64-linux": { - "outputs": [ - { - "name": "bin", - "path": "/nix/store/gxpp5r2nbs3s0n5rw0jbnm1k5lhxrx13-libxml2-2.13.3-bin", - "default": true - }, - { - "name": "devdoc", - "path": "/nix/store/0qnymx6l3c7998yscwvr1q64iz447hfc-libxml2-2.13.3-devdoc" - }, - { - "name": "out", - "path": "/nix/store/da857dg9ip02lkci5nicgvkzf419jzc7-libxml2-2.13.3" - }, - { - "name": "py", - "path": "/nix/store/qfpnqradhvhicl1hm70w7891bk95lkad-libxml2-2.13.3-py" - }, - { - "name": "dev", - "path": "/nix/store/dph7mh2dhl8sl4i44wlgnmsrwdlcv0bc-libxml2-2.13.3-dev" - } - ], "store_path": "/nix/store/gxpp5r2nbs3s0n5rw0jbnm1k5lhxrx13-libxml2-2.13.3-bin" }, "x86_64-darwin": { - "outputs": [ - { - "name": "bin", - "path": "/nix/store/gg4x2l8wy3lkd94bxpl0z7gnn9pa365i-libxml2-2.13.3-bin", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/pzakdvnmm99gic3mqyg8375b08dvkqxm-libxml2-2.13.3-dev" - }, - { - "name": "devdoc", - "path": "/nix/store/xa27lhlrc2ya3i67g7nz53g64l3wqvjw-libxml2-2.13.3-devdoc" - }, - { - "name": "out", - "path": "/nix/store/ac73mddfvraxgvd816r9h57df35mm6gd-libxml2-2.13.3" - } - ], "store_path": "/nix/store/gg4x2l8wy3lkd94bxpl0z7gnn9pa365i-libxml2-2.13.3-bin" }, "x86_64-linux": { - "outputs": [ - { - "name": "bin", - "path": "/nix/store/2y4a178s4w60v4m8749xhaawf8ga7cw5-libxml2-2.13.3-bin", - "default": true - }, - { - "name": "dev", - "path": "/nix/store/v40g7q9zix1ycpyara08brd50m00471n-libxml2-2.13.3-dev" - }, - { - "name": "devdoc", - "path": "/nix/store/cs49b70qkgygx0wxcl04dpy1d1g5vb91-libxml2-2.13.3-devdoc" - }, - { - "name": "out", - "path": "/nix/store/nr8mh99sfsb1gw1b1qmrwhzmxbhj84j7-libxml2-2.13.3" - }, - { - "name": "py", - "path": "/nix/store/p17nrcsmvb0q7b9g6347imljapbfcsb1-libxml2-2.13.3-py" - } - ], "store_path": "/nix/store/2y4a178s4w60v4m8749xhaawf8ga7cw5-libxml2-2.13.3-bin" } } }, "maven@3.9.6": { - "last_modified": "2024-03-22T11:26:23Z", - "resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#maven", + "last_modified": "2024-06-12T20:55:33Z", + "resolved": "github:NixOS/nixpkgs/a9858885e197f984d92d7fe64e9fff6b2e488d40#maven", "source": "devbox-search", "version": "3.9.6", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/0nqg520l3i11hzkbb6ws6i6jkpaqdqp7-apache-maven-3.9.6", - "default": true - } - ], - "store_path": "/nix/store/0nqg520l3i11hzkbb6ws6i6jkpaqdqp7-apache-maven-3.9.6" + "store_path": "/nix/store/anjg4vldn49by6biv5xnhqq1mg34pbf2-apache-maven-3.9.6" }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/bjggvjn78xjazk370ynx2gy582rqgdf8-apache-maven-3.9.6", - "default": true - } - ], - "store_path": "/nix/store/bjggvjn78xjazk370ynx2gy582rqgdf8-apache-maven-3.9.6" + "store_path": "/nix/store/x0b2lf5938xbqkmyy0dy3m5scbzhn758-apache-maven-3.9.6" }, "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/1mxga40yfvjvhsxr9z3hychg49f0gn95-apache-maven-3.9.6", - "default": true - } - ], - "store_path": "/nix/store/1mxga40yfvjvhsxr9z3hychg49f0gn95-apache-maven-3.9.6" + "store_path": "/nix/store/w6crqg0hzr9ywg4nfkiqhkfy9rscq5pz-apache-maven-3.9.6" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/ncvq15byzjpgvjq2mf7kxx89khx64ifn-apache-maven-3.9.6", - "default": true - } - ], - "store_path": "/nix/store/ncvq15byzjpgvjq2mf7kxx89khx64ifn-apache-maven-3.9.6" + "store_path": "/nix/store/21kyz6bqsr97gjd3lc8g600zc1cksd1d-apache-maven-3.9.6" } } }, "nodejs@20.12.2": { - "last_modified": "2024-05-22T06:18:38Z", - "plugin_version": "0.0.2", - "resolved": "github:NixOS/nixpkgs/3f316d2a50699a78afe5e77ca486ad553169061e#nodejs_20", + "last_modified": "2024-06-12T20:55:33Z", + "resolved": "github:NixOS/nixpkgs/a9858885e197f984d92d7fe64e9fff6b2e488d40#nodejs_20", "source": "devbox-search", "version": "20.12.2", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/bzzs4kvjyvjjhs3rj08vqpvvzmfggvbv-nodejs-20.12.2", - "default": true - }, - { - "name": "libv8", - "path": "/nix/store/c56874bxzncqwy58kif6wfnzy017v1sl-nodejs-20.12.2-libv8" - } - ], - "store_path": "/nix/store/bzzs4kvjyvjjhs3rj08vqpvvzmfggvbv-nodejs-20.12.2" + "store_path": "/nix/store/ridvrr7dsnxpvh3f1sr41xiwvwk1nnkg-nodejs-20.12.2" }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/y50zafzgnnkrj4hvmk23icv2ggvys8r9-nodejs-20.12.2", - "default": true - }, - { - "name": "libv8", - "path": "/nix/store/vc7y8h3c8pwbh4zbvjcyfqrd3fhdjhw6-nodejs-20.12.2-libv8" - } - ], - "store_path": "/nix/store/y50zafzgnnkrj4hvmk23icv2ggvys8r9-nodejs-20.12.2" + "store_path": "/nix/store/ybhzncvkslqd0b9c3lp91l0wphjzczc8-nodejs-20.12.2" }, "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/l53svh1nfrcb83qbqvrrkangrcl1rr25-nodejs-20.12.2", - "default": true - }, - { - "name": "libv8", - "path": "/nix/store/q71hh22bfqjygd34gq16dv4dwfc33378-nodejs-20.12.2-libv8" - } - ], - "store_path": "/nix/store/l53svh1nfrcb83qbqvrrkangrcl1rr25-nodejs-20.12.2" + "store_path": "/nix/store/gxi71m2y8x1rl83dpr1g0x9yz3klrcb0-nodejs-20.12.2" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/6g9n96qf1yx139xklnmy3v4xhjvjgsji-nodejs-20.12.2", - "default": true - }, - { - "name": "libv8", - "path": "/nix/store/s7b0dqga0311mvq48mirnlm0p3dr4gm3-nodejs-20.12.2-libv8" - } - ], - "store_path": "/nix/store/6g9n96qf1yx139xklnmy3v4xhjvjgsji-nodejs-20.12.2" + "store_path": "/nix/store/74a6mmrgxzcg9axl1gmdz3j2y1bjd13f-nodejs-20.12.2" } } }, "python@3.12.2": { - "last_modified": "2024-03-22T11:26:23Z", - "plugin_version": "0.0.4", - "resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#python312", + "last_modified": "2024-04-02T02:53:36Z", + "resolved": "github:NixOS/nixpkgs/080a4a27f206d07724b88da096e27ef63401a504#python312", "source": "devbox-search", "version": "3.12.2", "systems": { "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/jc5jlynlx561ibqxd6sy12hcqc8p39c9-python3-3.12.2", - "default": true - } - ], - "store_path": "/nix/store/jc5jlynlx561ibqxd6sy12hcqc8p39c9-python3-3.12.2" + "store_path": "/nix/store/simlsc51c938d0vxhyl83dsf68xj8i7v-python3-3.12.2" }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/n5yvl08kxz5llrdiwwxfxyy6wiq2g6lc-python3-3.12.2", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/bihg62nz0vqqski18cpyppwgqz62blrq-python3-3.12.2-debug" - } - ], - "store_path": "/nix/store/n5yvl08kxz5llrdiwwxfxyy6wiq2g6lc-python3-3.12.2" + "store_path": "/nix/store/zhfvydhmllj2k1vbb0lv40fq09awp7qr-python3-3.12.2" }, "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/41yqb3sxsx22drhza74icn4x1gfh3h8m-python3-3.12.2", - "default": true - } - ], - "store_path": "/nix/store/41yqb3sxsx22drhza74icn4x1gfh3h8m-python3-3.12.2" + "store_path": "/nix/store/62ksbv6mp5cz2ggcpwal4j6a5biiy5r1-python3-3.12.2" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/7yh2ax34jd7fgf17mjfd3c6niw1h2hsj-python3-3.12.2", - "default": true - }, - { - "name": "debug", - "path": "/nix/store/mq8jh0sl1lcpk592whzw96n52grhq8wl-python3-3.12.2-debug" - } - ], - "store_path": "/nix/store/7yh2ax34jd7fgf17mjfd3c6niw1h2hsj-python3-3.12.2" + "store_path": "/nix/store/fmwqa8nvva4sh18bqayzrilrzxq9fm0f-python3-3.12.2" } } }, "temurin-bin-17@17.0.9": { - "last_modified": "2024-04-02T02:53:36Z", - "resolved": "github:NixOS/nixpkgs/080a4a27f206d07724b88da096e27ef63401a504#temurin-bin-17", + "last_modified": "2024-06-12T20:55:33Z", + "resolved": "github:NixOS/nixpkgs/a9858885e197f984d92d7fe64e9fff6b2e488d40#temurin-bin-17", "source": "devbox-search", "version": "17.0.9", "systems": { - "aarch64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/236qmlpvwi6yanjck7hskxwmx1xz1srb-temurin-bin-17.0.9", - "default": true - } - ], - "store_path": "/nix/store/236qmlpvwi6yanjck7hskxwmx1xz1srb-temurin-bin-17.0.9" - }, "aarch64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/bbv87h9707fqxz2fhd88jys0yb79kj6y-temurin-bin-17.0.9", - "default": true - } - ], - "store_path": "/nix/store/bbv87h9707fqxz2fhd88jys0yb79kj6y-temurin-bin-17.0.9" - }, - "x86_64-darwin": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/p3ip7x2qpz8v11lp5xb4hxc4919ijz28-temurin-bin-17.0.9", - "default": true - } - ], - "store_path": "/nix/store/p3ip7x2qpz8v11lp5xb4hxc4919ijz28-temurin-bin-17.0.9" + "store_path": "/nix/store/xbkf0hfcaw0jbqf7pm70xwinn655pz50-temurin-bin-17.0.9" }, "x86_64-linux": { - "outputs": [ - { - "name": "out", - "path": "/nix/store/jg44fq69zhms7c4cvnd1hyzcxwhj7cm7-temurin-bin-17.0.9", - "default": true - } - ], - "store_path": "/nix/store/jg44fq69zhms7c4cvnd1hyzcxwhj7cm7-temurin-bin-17.0.9" + "store_path": "/nix/store/55gj16bms465y8giaf5jch2bbs12yrbf-temurin-bin-17.0.9" } } } diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index 0708db7b997..3102095aa91 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -49,7 +49,7 @@ 3.5.0 3.1.3 3.1.2 - 3.12.1 + 3.21.0 3.6.1 3.4.1 3.4.0 @@ -223,6 +223,10 @@ + + maven-clean-plugin + ${version.maven.clean.plugin} + maven-site-plugin ${version.maven.site.plugin} diff --git a/packages/kn-plugin-workflow/README.md b/packages/kn-plugin-workflow/README.md index f24b89800ee..45874ca3ac0 100644 --- a/packages/kn-plugin-workflow/README.md +++ b/packages/kn-plugin-workflow/README.md @@ -29,7 +29,7 @@ All the commands in this section should be performed in the monorepo root. - Node `>= 20.14.0` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_ - pnpm `9.3.0` _(To install, follow these instructions: https://pnpm.io/installation)_ -- Go `1.21.9` _(To install, follow these instructions: https://go.dev/doc/install)_ +- Go `1.21.13` _(To install, follow these instructions: https://go.dev/doc/install)_ #### Prerequisites for running end-to-end tests diff --git a/repo/build-dependencies-versions.json b/repo/build-dependencies-versions.json index c64251c8d05..aa85afb0c96 100644 --- a/repo/build-dependencies-versions.json +++ b/repo/build-dependencies-versions.json @@ -1,5 +1,5 @@ { - "go": "1.21.9", + "go": "1.21.13", "java": "17", "maven": "3.9.6", "node": "20.14.0", From 0dc8cbe618c9d90ed78f631e349771ebb2836fac Mon Sep 17 00:00:00 2001 From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:50:38 -0500 Subject: [PATCH 13/13] [kogito-data-index-image] - Fix #2723: Transfer ownership to kogito user (#2724) Signed-off-by: Ricardo Zanini --- .../incubator-kie-kogito-data-index-ephemeral-image.yaml | 2 +- .../resources/modules/kogito-data-index-ephemeral/configure | 1 + .../incubator-kie-kogito-data-index-postgresql-image.yaml | 4 ++-- .../resources/modules/kogito-data-index-postgresql/configure | 1 + .../resources/modules/kogito-data-index-common/configure | 4 +++- .../resources/modules/kogito-jobs-service-common/configure | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/kogito-data-index-ephemeral-image/resources/incubator-kie-kogito-data-index-ephemeral-image.yaml b/packages/kogito-data-index-ephemeral-image/resources/incubator-kie-kogito-data-index-ephemeral-image.yaml index d4be0f424bc..8e2f84baad2 100644 --- a/packages/kogito-data-index-ephemeral-image/resources/incubator-kie-kogito-data-index-ephemeral-image.yaml +++ b/packages/kogito-data-index-ephemeral-image/resources/incubator-kie-kogito-data-index-ephemeral-image.yaml @@ -52,8 +52,8 @@ modules: - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.dataindex.ephemeral - - name: org.kie.kogito.dataindex.common - name: org.kie.kogito.security.custom.truststores + - name: org.kie.kogito.dataindex.common ports: - value: 8080 diff --git a/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/configure b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/configure index ae5360b775e..bfbb2844408 100644 --- a/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/configure +++ b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/configure @@ -23,4 +23,5 @@ SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" + chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh diff --git a/packages/kogito-data-index-postgresql-image/resources/incubator-kie-kogito-data-index-postgresql-image.yaml b/packages/kogito-data-index-postgresql-image/resources/incubator-kie-kogito-data-index-postgresql-image.yaml index ee05a988133..00ae72ecac4 100644 --- a/packages/kogito-data-index-postgresql-image/resources/incubator-kie-kogito-data-index-postgresql-image.yaml +++ b/packages/kogito-data-index-postgresql-image/resources/incubator-kie-kogito-data-index-postgresql-image.yaml @@ -18,7 +18,7 @@ # schema_version: 1 -name: "docker.io/apache/incubator-kie-kogito-data-index-ephemeral" +name: "docker.io/apache/incubator-kie-kogito-data-index-postgresql" version: "main" from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.20" description: "Runtime image for Kogito Data Index Service for PostgreSQL persistence provider" @@ -54,8 +54,8 @@ modules: - name: org.kie.kogito.dynamic.resources - name: org.kie.kogito.launch.scripts - name: org.kie.kogito.dataindex.postgresql - - name: org.kie.kogito.dataindex.common - name: org.kie.kogito.security.custom.truststores + - name: org.kie.kogito.dataindex.common run: workdir: "/home/kogito" diff --git a/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/configure b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/configure index ae5360b775e..bfbb2844408 100644 --- a/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/configure +++ b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/configure @@ -23,4 +23,5 @@ SCRIPT_DIR=$(dirname "${0}") ADDED_DIR="${SCRIPT_DIR}"/added cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}" + chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh diff --git a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure index fc3e5005588..aa352e6cd5a 100644 --- a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure +++ b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure @@ -26,4 +26,6 @@ mkdir -p "${KOGITO_HOME}"/launch mkdir -p "${KOGITO_HOME}"/data/protobufs/ cp -v "${ADDED_DIR}"/kogito-data-index-common.sh "${KOGITO_HOME}"/launch -chmod +x-w "${KOGITO_HOME}"/launch/kogito-data-index-common.sh \ No newline at end of file + +chown -R ${USER_ID}:0 "${KOGITO_HOME}" +chmod -R ug+rwX "${KOGITO_HOME}" diff --git a/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/configure b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/configure index 34732d31e86..7e4fe1e4914 100644 --- a/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/configure +++ b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/configure @@ -25,5 +25,5 @@ ADDED_DIR="${SCRIPT_DIR}"/added cp -Rv "${ADDED_DIR}"/launch/* "${KOGITO_HOME}"/launch/ -chown -R 1001:0 "${KOGITO_HOME}" +chown -R ${USER_ID}:0 "${KOGITO_HOME}" chmod -R ug+rwX "${KOGITO_HOME}"