From 270aa3a41ac74213cd41c8f1ff0d6f3cf108f2d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:05:14 -0500 Subject: [PATCH 1/9] build(deps): bump jinja2 from 3.1.4 to 3.1.5 in /packages/python-venv (#2836) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- packages/python-venv/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python-venv/requirements.txt b/packages/python-venv/requirements.txt index e9ed53c7bdd..b34ba2caf08 100644 --- a/packages/python-venv/requirements.txt +++ b/packages/python-venv/requirements.txt @@ -8,7 +8,7 @@ elementpath==4.4.0 pyyaml==6.0.1 ruamel.yaml==0.18.6 python-dateutil==2.9.0.post0 -Jinja2==3.1.4 +Jinja2==3.1.5 pykwalify==1.8.0 colorlog==6.8.2 click==8.1.7 \ No newline at end of file From 8707a3c281a69391169de3e35a9807bb8194546b Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Tue, 14 Jan 2025 20:34:17 +0100 Subject: [PATCH 2/9] NO-ISSUE: Add LICENSE and DISCLAIMER-WIP in non-source file list (#2855) --- .../ci/patterns/non-source-files-patterns.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/supporting-files/ci/patterns/non-source-files-patterns.txt b/.github/supporting-files/ci/patterns/non-source-files-patterns.txt index ba56a69874c..dca945dcb3b 100644 --- a/.github/supporting-files/ci/patterns/non-source-files-patterns.txt +++ b/.github/supporting-files/ci/patterns/non-source-files-patterns.txt @@ -9,8 +9,10 @@ docs gifs repo devbox.* +DISCLAIMER-WIP +NOTICE .vscode .idea .ci ./_intellij-project -.github/CODEOWNERS +.github/CODEOWNERS \ No newline at end of file From 012359ce020174013ac74d3cecf7cdef86548a30 Mon Sep 17 00:00:00 2001 From: Kusuma04-dev Date: Wed, 15 Jan 2025 16:23:34 +0530 Subject: [PATCH 3/9] kie-issues#1636: DMN Editor throw an error opening Included Models tab (#2846) Co-authored-by: chinnamatli kusumalatha --- packages/dmn-editor/src/includedModels/IncludedModels.css | 6 ++++++ packages/dmn-editor/src/includedModels/IncludedModels.tsx | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/dmn-editor/src/includedModels/IncludedModels.css b/packages/dmn-editor/src/includedModels/IncludedModels.css index f9375c8bba8..d5185676026 100644 --- a/packages/dmn-editor/src/includedModels/IncludedModels.css +++ b/packages/dmn-editor/src/includedModels/IncludedModels.css @@ -20,3 +20,9 @@ .kie-dmn-editor--selected-model-to-include-error { color: var(--pf-global--danger-color--100); } +.kie-dmn-editor--model-card-kebabtoggle-wrapper { + color: grey; +} +.kie-dmn-editor--model-card-kebabtoggle-wrapper:hover { + color: black; +} diff --git a/packages/dmn-editor/src/includedModels/IncludedModels.tsx b/packages/dmn-editor/src/includedModels/IncludedModels.tsx index efb1034f059..6ee69aea20b 100644 --- a/packages/dmn-editor/src/includedModels/IncludedModels.tsx +++ b/packages/dmn-editor/src/includedModels/IncludedModels.tsx @@ -611,15 +611,15 @@ function IncludedModelCard({ position={PopoverPosition.bottom} shouldOpen={() => setRemovePopoverOpen(true)} > - + )} From d68145144819bb01939df2fe1d18462eeac4d2ee Mon Sep 17 00:00:00 2001 From: Fabrizio Antonangeli Date: Wed, 15 Jan 2025 15:18:49 +0100 Subject: [PATCH 4/9] kie-tools-issues#2582: [serverless-logic-web-tools] CORS on Dev Mode deployment on OpenShift (#2856) --- .../src/main/resources/application.properties | 1 + .../src/main/resources/application.properties | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties index 0f6898b1b35..0660b72f6ac 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/application.properties @@ -20,6 +20,7 @@ quarkus.swagger-ui.always-include=true quarkus.http.cors=true quarkus.http.cors.origins=* +quarkus.dev-ui.cors.enabled=false quarkus.http.host=0.0.0.0 quarkus.http.enable-compression=true quarkus.http.port=8080 diff --git a/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui/src/main/resources/application.properties b/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui/src/main/resources/application.properties index fe95886d5c1..2a501c1c0ae 100644 --- a/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui/src/main/resources/application.properties +++ b/packages/sonataflow-quarkus-devui/sonataflow-quarkus-devui/src/main/resources/application.properties @@ -16,3 +16,7 @@ # specific language governing permissions and limitations # under the License. # + +quarkus.http.cors=true +quarkus.http.cors.origins=* +quarkus.dev-ui.cors.enabled=false From c717c744ea907ec1b691e6bbec7512b58063a413 Mon Sep 17 00:00:00 2001 From: Fabrizio Antonangeli Date: Wed, 15 Jan 2025 19:10:37 +0100 Subject: [PATCH 5/9] NO-ISSUE: [serverless-logic-web-tools] Use env vars instead hardcoded repository URL for samples (#2858) --- packages/serverless-logic-web-tools/env/index.js | 10 ++++++++++ .../src/samples/SampleConstants.ts | 4 ++-- packages/serverless-logic-web-tools/webpack.config.ts | 2 ++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/serverless-logic-web-tools/env/index.js b/packages/serverless-logic-web-tools/env/index.js index 01c2c8611fb..ec421925a6b 100644 --- a/packages/serverless-logic-web-tools/env/index.js +++ b/packages/serverless-logic-web-tools/env/index.js @@ -41,6 +41,14 @@ module.exports = composeEnv( default: version, description: "Version of the application", }, + SERVERLESS_LOGIC_WEB_TOOLS__samplesRepositoryOrg: { + default: "kiegroup", + description: "Org owner for `kiegroup/kie-samples` repository", + }, + SERVERLESS_LOGIC_WEB_TOOLS__samplesRepositoryName: { + default: "kie-samples", + description: "Repository name for `kiegroup/kie-samples` repository", + }, SERVERLESS_LOGIC_WEB_TOOLS__samplesRepositoryRef: { default: "main", description: "Tag/branch to fetch samples from `kiegroup/kie-samples` repository", @@ -99,6 +107,8 @@ module.exports = composeEnv( tag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageTag), }, corsProxyUrl: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__corsProxyUrl), + samplesRepositoryOrg: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__samplesRepositoryOrg), + samplesRepositoryName: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__samplesRepositoryName), samplesRepositoryRef: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__samplesRepositoryRef), }, }; diff --git a/packages/serverless-logic-web-tools/src/samples/SampleConstants.ts b/packages/serverless-logic-web-tools/src/samples/SampleConstants.ts index 0f0b3ac2773..eaf3dd74581 100644 --- a/packages/serverless-logic-web-tools/src/samples/SampleConstants.ts +++ b/packages/serverless-logic-web-tools/src/samples/SampleConstants.ts @@ -33,8 +33,8 @@ export const resolveSampleFsMountPoint = (appVersion: string) => { }; export const KIE_SAMPLES_REPOSITORY_INFO: SamplesRepositoryInfo = { - org: "kiegroup", - name: "kie-samples", + org: process.env["WEBPACK_REPLACE__samplesRepositoryOrg"]!, + name: process.env["WEBPACK_REPLACE__samplesRepositoryName"]!, ref: process.env["WEBPACK_REPLACE__samplesRepositoryRef"]!, paths: { samplesFolder: "samples", diff --git a/packages/serverless-logic-web-tools/webpack.config.ts b/packages/serverless-logic-web-tools/webpack.config.ts index 5ab93ac0360..4a53f972963 100644 --- a/packages/serverless-logic-web-tools/webpack.config.ts +++ b/packages/serverless-logic-web-tools/webpack.config.ts @@ -110,6 +110,8 @@ export default async (webpackEnv: any, webpackArgv: any) => { WEBPACK_REPLACE__devModeImageFullUrl: `${swfDevModeImageRegistry}/${swfDevModeImageAccount}/${swfDevModeImageName}:${swfDevModeImageTag}`, WEBPACK_REPLACE__dashbuilderViewerImageFullUrl: `${dashbuilderViewerImageRegistry}/${dashbuilderViewerImageAccount}/${dashbuilderViewerImageName}:${dashbuilderViewerImageTag}`, WEBPACK_REPLACE__corsProxyUrl: buildEnv.serverlessLogicWebTools.corsProxyUrl, + WEBPACK_REPLACE__samplesRepositoryOrg: buildEnv.serverlessLogicWebTools.samplesRepositoryOrg, + WEBPACK_REPLACE__samplesRepositoryName: buildEnv.serverlessLogicWebTools.samplesRepositoryName, WEBPACK_REPLACE__samplesRepositoryRef: buildEnv.serverlessLogicWebTools.samplesRepositoryRef, }), new CopyPlugin({ From b152b1fec18ec411a2338a9b2b4f918e3bdf3610 Mon Sep 17 00:00:00 2001 From: Tiago Bento <1584568+tiagobento@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:10:52 -0300 Subject: [PATCH 6/9] NO-ISSUE: Remove leftover directories from examples due to merge conflicts (#2857) --- .../Makefile | 46 ------------- .../src/main/resources/application.properties | 65 ------------------- 2 files changed, 111 deletions(-) delete mode 100644 examples/commit-message-validation-service/Makefile delete mode 100644 examples/jbpm-compact-architecture-example/src/main/resources/application.properties diff --git a/examples/commit-message-validation-service/Makefile b/examples/commit-message-validation-service/Makefile deleted file mode 100644 index e6fe988036d..00000000000 --- a/examples/commit-message-validation-service/Makefile +++ /dev/null @@ -1,46 +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. - -METADATA_PATH := github.com/apache/incubator-kie-tools/examples/commit-message-validation-service/pkg/metadata -SET_COMMIT_MESSAGE_VALIDATION_SERVICE_PORT := $(METADATA_PATH).Port=$(shell build-env commitMessageValidationService.port) -SET_COMMIT_MESSAGE_VALIDATION_SERVICE_ENABLED_VALIDATORS := $(METADATA_PATH).Validators=$(shell build-env commitMessageValidationService.validators) -LDFLAGS := "-X $(SET_COMMIT_MESSAGE_VALIDATION_SERVICE_PORT) -X $(SET_COMMIT_MESSAGE_VALIDATION_SERVICE_ENABLED_VALIDATORS)" - -ARCH := $(shell uname -m) -ifeq ($(ARCH),x86_64) - GOARCH = amd64 -else - GOARCH = arm64 -endif - -darwin: - GOOS=darwin GOARCH=$(GOARCH) CGO_ENABLED=1 go build -ldflags $(LDFLAGS) -o dist/darwin/commit-message-validation-service main.go - -darwin-amd64: - GOOS=darwin GOARCH=amd64 go build -ldflags $(LDFLAGS) -o dist/darwin/commit-message-validation-service main.go - -darwin-arm64: - GOOS=darwin GOARCH=arm64 go build -ldflags $(LDFLAGS) -o dist/darwin/commit-message-validation-service main.go - -linux: - GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) -o dist/linux/commit-message-validation-service main.go - -win32: - GOOS=windows GOARCH=amd64 go build -ldflags $(LDFLAGS) -o dist/win32/commit-message-validation-service.exe main.go - -start: - go run -ldflags $(LDFLAGS) main.go \ No newline at end of file diff --git a/examples/jbpm-compact-architecture-example/src/main/resources/application.properties b/examples/jbpm-compact-architecture-example/src/main/resources/application.properties deleted file mode 100644 index b4603cefaf0..00000000000 --- a/examples/jbpm-compact-architecture-example/src/main/resources/application.properties +++ /dev/null @@ -1,65 +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. -# - -# Packaging -#quarkus.package.type=fast-jar - -#https://quarkus.io/guides/openapi-swaggerui -quarkus.http.cors=true -quarkus.http.cors.origins=* -quarkus.dev-ui.cors.enabled=false -quarkus.smallrye-openapi.path=/docs/openapi.json -quarkus.swagger-ui.always-include=true -quarkus.kogito.data-index.graphql.ui.always-include=true -quarkus.http.test-port=0 - -# Kogito-service -kogito.service.url=http://0.0.0.0:8080 - -#Job-service -kogito.jobs-service.url=http://0.0.0.0:8080 -kogito.data-index.url=http://0.0.0.0:8080 - -# run create tables scripts -kie.flyway.enabled=true - -kogito.persistence.type=jdbc -# Default application datasource properties -quarkus.datasource.db-kind=postgresql -quarkus.datasource.username=kogito-user -quarkus.datasource.password=kogito-pass -quarkus.datasource.jdbc.url=${QUARKUS_DATASOURCE_JDBC_URL:jdbc:postgresql://0.0.0.0:5432/kogito} -quarkus.datasource.reactive.url=${QUARKUS_DATASOURCE_REACTIVE_URL:postgresql://0.0.0.0:5432/kogito} -# Development application datasource properties -%dev.quarkus.datasource.db-kind=h2 -%dev.quarkus.datasource.username=kogito -%dev.quarkus.datasource.jdbc.url=jdbc:h2:mem:default;NON_KEYWORDS=VALUE,KEY - -# profile to pack this example into a container, to use it execute activate the maven container profile, -Pcontainer -%container.quarkus.container-image.build=true -%container.quarkus.container-image.push=false -%container.quarkus.container-image.group=${USER} -%container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=${project.version} -%container.quarkus.container-image.name=jbpm-compact-architecture-example-service - -%dev.jbpm.devui.users.jdoe.groups=admin,HR,IT - -# Disabling OIDC -quarkus.oidc.enabled=false \ No newline at end of file From 2156fc9c8a9a25bd04b909830ca684a66704ec45 Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Thu, 16 Jan 2025 09:27:08 +0100 Subject: [PATCH 7/9] NO-ISSUE: Bump vsce to `3.2.1` version (#2859) --- .../package.json | 2 +- .../package.json | 2 +- packages/bpmn-vscode-extension/package.json | 2 +- packages/dmn-vscode-extension/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/pmml-vscode-extension/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- packages/yard-vscode-extension/package.json | 2 +- pnpm-lock.yaml | 178 +++--------------- 13 files changed, 38 insertions(+), 164 deletions(-) diff --git a/examples/micro-frontends-multiplying-architecture-base64png-editor-vscode-extension/package.json b/examples/micro-frontends-multiplying-architecture-base64png-editor-vscode-extension/package.json index f88b8e652a0..2b26c68f2f1 100644 --- a/examples/micro-frontends-multiplying-architecture-base64png-editor-vscode-extension/package.json +++ b/examples/micro-frontends-multiplying-architecture-base64png-editor-vscode-extension/package.json @@ -31,7 +31,7 @@ "@kie-tools/root-env": "workspace:*", "@kie-tools/tsconfig": "workspace:*", "@types/vscode": "1.67.0", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "rimraf": "^3.0.2", "typescript": "^5.5.3", "webpack": "^5.94.0", diff --git a/examples/micro-frontends-multiplying-architecture-todo-list-view-vscode-extension/package.json b/examples/micro-frontends-multiplying-architecture-todo-list-view-vscode-extension/package.json index 94fe4dc60e7..f4e4f13e849 100644 --- a/examples/micro-frontends-multiplying-architecture-todo-list-view-vscode-extension/package.json +++ b/examples/micro-frontends-multiplying-architecture-todo-list-view-vscode-extension/package.json @@ -30,7 +30,7 @@ "@kie-tools/root-env": "workspace:*", "@kie-tools/tsconfig": "workspace:*", "@types/vscode": "1.67.0", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "rimraf": "^3.0.2", "typescript": "^5.5.3", "webpack": "^5.94.0", diff --git a/packages/bpmn-vscode-extension/package.json b/packages/bpmn-vscode-extension/package.json index 2a09b5ed3cb..73e9a5bf27b 100644 --- a/packages/bpmn-vscode-extension/package.json +++ b/packages/bpmn-vscode-extension/package.json @@ -41,7 +41,7 @@ "@kie-tools/vscode-java-code-completion-extension-plugin": "workspace:*", "@types/vscode": "1.67.0", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "copy-webpack-plugin": "^11.0.0", "process": "^0.11.10", "rimraf": "^3.0.2", diff --git a/packages/dmn-vscode-extension/package.json b/packages/dmn-vscode-extension/package.json index 0a44f0b4ea7..02f57606231 100644 --- a/packages/dmn-vscode-extension/package.json +++ b/packages/dmn-vscode-extension/package.json @@ -41,7 +41,7 @@ "@kie-tools/vscode-java-code-completion-extension-plugin": "workspace:*", "@types/vscode": "1.67.0", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "buffer": "^6.0.3", "copy-webpack-plugin": "^11.0.0", "process": "^0.11.10", diff --git a/packages/extended-services-vscode-extension/package.json b/packages/extended-services-vscode-extension/package.json index 78bda18b814..aa30fd2348b 100644 --- a/packages/extended-services-vscode-extension/package.json +++ b/packages/extended-services-vscode-extension/package.json @@ -41,7 +41,7 @@ "@kie-tools/tsconfig": "workspace:*", "@types/vscode": "1.67.0", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "copy-webpack-plugin": "^11.0.0", "node-fetch": "^3.3.1", "rimraf": "^3.0.2", diff --git a/packages/kie-editors-dev-vscode-extension/package.json b/packages/kie-editors-dev-vscode-extension/package.json index 71ebc043704..1dade6ad74a 100644 --- a/packages/kie-editors-dev-vscode-extension/package.json +++ b/packages/kie-editors-dev-vscode-extension/package.json @@ -62,7 +62,7 @@ "@types/vscode": "1.67.0", "@vscode/test-electron": "^2.3.6", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "chai": "^4.3.10", "copy-webpack-plugin": "^11.0.0", "cpr": "^3.0.1", diff --git a/packages/pmml-vscode-extension/package.json b/packages/pmml-vscode-extension/package.json index 80d800ba83b..b57d03ab469 100644 --- a/packages/pmml-vscode-extension/package.json +++ b/packages/pmml-vscode-extension/package.json @@ -40,7 +40,7 @@ "@kie-tools/tsconfig": "workspace:*", "@types/vscode": "1.67.0", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "file-loader": "^6.2.0", "process": "^0.11.10", "rimraf": "^3.0.2", diff --git a/packages/serverless-workflow-vscode-extension/package.json b/packages/serverless-workflow-vscode-extension/package.json index 043b2e6ef61..02415347834 100644 --- a/packages/serverless-workflow-vscode-extension/package.json +++ b/packages/serverless-workflow-vscode-extension/package.json @@ -65,7 +65,7 @@ "@types/vscode": "1.67.0", "@vscode/test-electron": "^2.3.6", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "chai": "^4.3.10", "copy-webpack-plugin": "^11.0.0", "cpr": "^3.0.1", diff --git a/packages/vscode-extension-dashbuilder-editor/package.json b/packages/vscode-extension-dashbuilder-editor/package.json index 74513533b47..1c7cbe38683 100644 --- a/packages/vscode-extension-dashbuilder-editor/package.json +++ b/packages/vscode-extension-dashbuilder-editor/package.json @@ -55,7 +55,7 @@ "@types/selenium-webdriver": "^4.1.27", "@types/vscode": "1.67.0", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "chai": "^4.3.10", "copy-webpack-plugin": "^11.0.0", "cpr": "^3.0.1", diff --git a/packages/vscode-extension-kie-ba-bundle/package.json b/packages/vscode-extension-kie-ba-bundle/package.json index b5d64462c5a..a962fa7c8d7 100644 --- a/packages/vscode-extension-kie-ba-bundle/package.json +++ b/packages/vscode-extension-kie-ba-bundle/package.json @@ -28,7 +28,7 @@ "@kie-tools/root-env": "workspace:*", "@kie-tools/tsconfig": "workspace:*", "@types/vscode": "1.67.0", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "rimraf": "^3.0.2", "webpack": "^5.94.0", "webpack-cli": "^4.10.0", diff --git a/packages/vscode-extension-kogito-bundle/package.json b/packages/vscode-extension-kogito-bundle/package.json index 0ada9f40a70..6ad38196e20 100644 --- a/packages/vscode-extension-kogito-bundle/package.json +++ b/packages/vscode-extension-kogito-bundle/package.json @@ -28,7 +28,7 @@ "@kie-tools/root-env": "workspace:*", "@kie-tools/tsconfig": "workspace:*", "@types/vscode": "1.67.0", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "rimraf": "^3.0.2", "webpack": "^5.94.0", "webpack-cli": "^4.10.0", diff --git a/packages/yard-vscode-extension/package.json b/packages/yard-vscode-extension/package.json index dd26a3a9e36..0be9fb42ecf 100644 --- a/packages/yard-vscode-extension/package.json +++ b/packages/yard-vscode-extension/package.json @@ -58,7 +58,7 @@ "@types/vscode": "1.67.0", "@vscode/test-electron": "^2.3.6", "@vscode/test-web": "^0.0.30", - "@vscode/vsce": "^2.22.0", + "@vscode/vsce": "^3.2.1", "chai": "^4.3.10", "cpr": "^3.0.1", "mocha": "^10.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4ad259e4e41..254651552de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -181,58 +181,6 @@ importers: specifier: ^4.0.1 version: 4.0.1(webpack-sources@3.2.3)(webpack@5.94.0(webpack-cli@4.10.0)) - examples/base64png-editor-vscode-extension: - dependencies: - '@kie-tools-core/editor': - specifier: workspace:* - version: link:../../packages/editor - '@kie-tools-core/i18n': - specifier: workspace:* - version: link:../../packages/i18n - '@kie-tools-core/patternfly-base': - specifier: workspace:* - version: link:../../packages/patternfly-base - '@kie-tools-core/vscode-extension': - specifier: workspace:* - version: link:../../packages/vscode-extension - '@kie-tools-examples/base64png-editor': - specifier: workspace:* - version: link:../base64png-editor - devDependencies: - '@kie-tools-core/webpack-base': - specifier: workspace:* - version: link:../../packages/webpack-base - '@kie-tools/root-env': - specifier: workspace:* - version: link:../../packages/root-env - '@kie-tools/tsconfig': - specifier: workspace:* - version: link:../../packages/tsconfig - '@types/vscode': - specifier: 1.67.0 - version: 1.67.0 - '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 - typescript: - specifier: ^5.5.3 - version: 5.5.3 - webpack: - specifier: ^5.94.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) - webpack-dev-server: - specifier: ^4.15.1 - version: 4.15.1(webpack-cli@4.10.0)(webpack@5.94.0) - webpack-merge: - specifier: ^5.9.0 - version: 5.9.0 - examples/bpmn-editor-classic-on-webapp: devDependencies: '@kie-tools-core/editor': @@ -799,8 +747,8 @@ importers: specifier: 1.67.0 version: 1.67.0 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -1169,8 +1117,8 @@ importers: specifier: 1.67.0 version: 1.67.0 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -1507,55 +1455,6 @@ importers: specifier: ^5.5.3 version: 5.5.3 - examples/todo-list-view-vscode-extension: - dependencies: - '@kie-tools-core/envelope-bus': - specifier: workspace:* - version: link:../../packages/envelope-bus - '@kie-tools-core/vscode-extension': - specifier: workspace:* - version: link:../../packages/vscode-extension - '@kie-tools-examples/todo-list-view': - specifier: workspace:* - version: link:../todo-list-view - devDependencies: - '@kie-tools-core/patternfly-base': - specifier: workspace:* - version: link:../../packages/patternfly-base - '@kie-tools-core/webpack-base': - specifier: workspace:* - version: link:../../packages/webpack-base - '@kie-tools/root-env': - specifier: workspace:* - version: link:../../packages/root-env - '@kie-tools/tsconfig': - specifier: workspace:* - version: link:../../packages/tsconfig - '@types/vscode': - specifier: 1.67.0 - version: 1.67.0 - '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 - rimraf: - specifier: ^3.0.2 - version: 3.0.2 - typescript: - specifier: ^5.5.3 - version: 5.5.3 - webpack: - specifier: ^5.94.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) - webpack-dev-server: - specifier: ^4.15.1 - version: 4.15.1(webpack-cli@4.10.0)(webpack@5.94.0) - webpack-merge: - specifier: ^5.9.0 - version: 5.9.0 - examples/uniforms-patternfly: dependencies: '@kie-tools-core/patternfly-base': @@ -2059,8 +1958,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 copy-webpack-plugin: specifier: ^11.0.0 version: 11.0.0(webpack@5.94.0(webpack-cli@4.10.0)) @@ -4975,8 +4874,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 buffer: specifier: ^6.0.3 version: 6.0.3 @@ -5350,8 +5249,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 copy-webpack-plugin: specifier: ^11.0.0 version: 11.0.0(webpack@5.94.0(webpack-cli@4.10.0)) @@ -6868,8 +6767,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 chai: specifier: ^4.3.10 version: 4.3.10 @@ -8379,8 +8278,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 file-loader: specifier: ^6.2.0 version: 6.2.0(webpack@5.94.0(webpack-cli@4.10.0)) @@ -11879,8 +11778,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 chai: specifier: ^4.3.10 version: 4.3.10 @@ -13419,8 +13318,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 chai: specifier: ^4.3.10 version: 4.3.10 @@ -13491,8 +13390,8 @@ importers: specifier: 1.67.0 version: 1.67.0 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -13527,8 +13426,8 @@ importers: specifier: 1.67.0 version: 1.67.0 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -14279,8 +14178,8 @@ importers: specifier: ^0.0.30 version: 0.0.30 '@vscode/vsce': - specifier: ^2.22.0 - version: 2.22.0 + specifier: ^3.2.1 + version: 3.2.1 chai: specifier: ^4.3.10 version: 4.3.10 @@ -43996,31 +43895,6 @@ snapshots: '@vscode/vsce-sign-win32-arm64': 2.0.2 '@vscode/vsce-sign-win32-x64': 2.0.2 - '@vscode/vsce@2.22.0': - dependencies: - azure-devops-node-api: 11.0.1 - chalk: 2.4.2 - cheerio: 1.0.0-rc.10 - commander: 6.2.1 - glob: 7.2.3 - hosted-git-info: 4.1.0 - jsonc-parser: 3.2.0 - leven: 3.1.0 - markdown-it: 12.3.2 - mime: 1.6.0 - minimatch: 3.1.2 - parse-semver: 1.1.1 - read: 1.0.7 - semver: 7.5.4 - tmp: 0.2.1 - typed-rest-client: 1.8.4 - url-join: 4.0.1 - xml2js: 0.5.0 - yauzl: 2.10.0 - yazl: 2.5.1 - optionalDependencies: - keytar: 7.9.0 - '@vscode/vsce@3.2.1': dependencies: '@azure/identity': 4.3.0 @@ -49474,7 +49348,7 @@ snapshots: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 - mime-types: 2.1.34 + mime-types: 2.1.35 formdata-polyfill@4.0.10: dependencies: @@ -57732,7 +57606,7 @@ snapshots: typed-rest-client@1.8.4: dependencies: - qs: 6.11.2 + qs: 6.13.0 tunnel: 0.0.6 underscore: 1.13.1 From 52040d702548670c18c72db89a02057da7aa5622 Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Thu, 16 Jan 2025 11:25:10 +0100 Subject: [PATCH 8/9] kie-issues#1694: Apache KIE Extended Services extension issues (#2802) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Luiz João Motta Co-authored-by: Jozef Marko --- packages/cors-proxy/package.json | 2 +- .../env/index.js | 4 +- .../package.json | 11 +- .../src/Connection.ts | 5 +- .../src/LocalExtendedServices.ts | 1 + .../src/Validator.ts | 14 ++- .../src/configurations/Configuration.ts | 86 +++++-------- .../configurations/ConfigurationWatcher.ts | 6 +- .../src/extension/extension-browser.ts | 102 +++++++++------ .../src/extension/extension-main.ts | 118 ++++++++++++------ .../src/requests/PingRequest.ts | 5 +- .../src/requests/ValidationRequests.ts | 39 +++--- .../webpack.config.js | 62 ++++++--- .../kie-sandbox-distribution/package.json | 2 +- pnpm-lock.yaml | 18 +-- 15 files changed, 275 insertions(+), 200 deletions(-) diff --git a/packages/cors-proxy/package.json b/packages/cors-proxy/package.json index 2ac6327c043..dd2be835947 100644 --- a/packages/cors-proxy/package.json +++ b/packages/cors-proxy/package.json @@ -28,7 +28,7 @@ "dependencies": { "cors": "^2.8.5", "express": "^4.21.1", - "node-fetch": "^3.3.1" + "node-fetch": "^3.3.2" }, "devDependencies": { "@babel/core": "^7.16.0", diff --git a/packages/extended-services-vscode-extension/env/index.js b/packages/extended-services-vscode-extension/env/index.js index 61bc742bd66..bbd362e8067 100644 --- a/packages/extended-services-vscode-extension/env/index.js +++ b/packages/extended-services-vscode-extension/env/index.js @@ -17,9 +17,9 @@ * under the License. */ -const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env"); +const { composeEnv, varsWithName } = require("@kie-tools-scripts/build-env"); -module.exports = composeEnv([require("@kie-tools/root-env/env")], { +module.exports = composeEnv([require("@kie-tools/root-env/env"), require("@kie-tools/extended-services-java/env")], { vars: varsWithName({}), get env() { return {}; diff --git a/packages/extended-services-vscode-extension/package.json b/packages/extended-services-vscode-extension/package.json index aa30fd2348b..12844201161 100644 --- a/packages/extended-services-vscode-extension/package.json +++ b/packages/extended-services-vscode-extension/package.json @@ -43,7 +43,7 @@ "@vscode/test-web": "^0.0.30", "@vscode/vsce": "^3.2.1", "copy-webpack-plugin": "^11.0.0", - "node-fetch": "^3.3.1", + "node-fetch": "^3.3.2", "rimraf": "^3.0.2", "webpack": "^5.94.0", "webpack-cli": "^4.10.0", @@ -73,22 +73,23 @@ ], "configuration": { "properties": { - "extendedServices.connectionHeartbeatIntervalinSecs": { - "default": 1, + "extendedServices.connectionHeartbeatIntervalInSecs": { + "default": 10, "description": "Specifies the interval (in seconds) between each connection check.", "format": "time", + "minimum": 10, "order": 2, "type": "integer" }, "extendedServices.enableAutorun": { "default": true, - "description": "Automatically run a local instance of the service.", + "description": "Automatically runs a local instance of the Extended Service.", "order": 0, "type": "boolean" }, "extendedServices.extendedServicesURL": { "default": "http://localhost:21345", - "description": "Specifies the Exnteded Services URL.", + "description": "Specifies the Extended Services URL.", "format": "uri", "order": 1, "type": "string" diff --git a/packages/extended-services-vscode-extension/src/Connection.ts b/packages/extended-services-vscode-extension/src/Connection.ts index 0984a04f05c..185ffdfa696 100644 --- a/packages/extended-services-vscode-extension/src/Connection.ts +++ b/packages/extended-services-vscode-extension/src/Connection.ts @@ -28,13 +28,14 @@ export class Connection { private timeout: NodeJS.Timeout | null = null; private connected: boolean = false; - public async start(extendedServicesURL: URL, connectionHeartbeatIntervalinSecs: number): Promise { + public async start(extendedServicesURL: URL, connectionHeartbeatIntervalInSecs: number): Promise { this.timeout = setInterval(async () => { this.performHeartbeatCheck(extendedServicesURL); - }, connectionHeartbeatIntervalinSecs * 1000); + }, connectionHeartbeatIntervalInSecs * 1000); } public stop(): void { + console.debug("[Extended Services Extension] Disconnecting from Extended Service"); if (this.timeout) { this.fireDisconnectedEvent(); clearInterval(this.timeout); diff --git a/packages/extended-services-vscode-extension/src/LocalExtendedServices.ts b/packages/extended-services-vscode-extension/src/LocalExtendedServices.ts index 090e3404ef4..e804db505c2 100644 --- a/packages/extended-services-vscode-extension/src/LocalExtendedServices.ts +++ b/packages/extended-services-vscode-extension/src/LocalExtendedServices.ts @@ -80,6 +80,7 @@ export class LocalExtendedServices { } public stop(): void { + console.debug("[Extended Services Extension] Stopping local instance of Extended Service"); if (!this.serviceProcess) { return; } diff --git a/packages/extended-services-vscode-extension/src/Validator.ts b/packages/extended-services-vscode-extension/src/Validator.ts index 40f8cf1e055..c69c185e0e2 100644 --- a/packages/extended-services-vscode-extension/src/Validator.ts +++ b/packages/extended-services-vscode-extension/src/Validator.ts @@ -49,26 +49,28 @@ function createDMNDiagnostics(validationResponses: validationResponse.DMNValidat }); } -export async function validateBPMN(serviceURL: URL, kieFile: kieFile.KieFile): Promise { +export async function validateBPMN(serviceURL: URL, bpmnFile: kieFile.KieFile): Promise { try { const validationResponses: validationResponse.BPMNValidationResponse[] = await validationRequests.validateBPMN( serviceURL, - kieFile + bpmnFile ); return createBPMNDiagnostics(validationResponses); } catch (error) { - throw new Error("VALIDATE BPMN ERROR - " + error.message); + console.error(`An error occured while trying to validate BPMN file: ${bpmnFile} with error: ${error.message}`); + throw new Error(`An error occured while trying to validate BPMN file: ${bpmnFile} with error: ${error.message}`); } } -export async function validateDMN(serviceURL: URL, kieFile: kieFile.KieFile): Promise { +export async function validateDMN(serviceURL: URL, dmnFile: kieFile.KieFile): Promise { try { const validationResponses: validationResponse.DMNValidationResponse[] = await validationRequests.validateDMN( serviceURL, - kieFile + dmnFile ); return createDMNDiagnostics(validationResponses); } catch (error) { - throw new Error("VALIDATE DMN ERROR - " + error.message); + console.error(`An error occured while trying to validate DMN file: ${dmnFile} with error: ${error.message}`); + throw new Error(`An error occured while trying to validate DMN file: ${dmnFile} with error: ${error.message}`); } } diff --git a/packages/extended-services-vscode-extension/src/configurations/Configuration.ts b/packages/extended-services-vscode-extension/src/configurations/Configuration.ts index 2b322895afa..39a21ffa7c9 100644 --- a/packages/extended-services-vscode-extension/src/configurations/Configuration.ts +++ b/packages/extended-services-vscode-extension/src/configurations/Configuration.ts @@ -19,81 +19,53 @@ import * as vscode from "vscode"; -export const enableAutoRunID: string = "extendedServices.enableAutorun"; -export const connectionHeartbeatIntervalinSecsID: string = "extendedServices.connectionHeartbeatIntervalinSecs"; -export const extendedServicesURLID: string = "extendedServices.extendedServicesURL"; +export const enableAutoRunID = "extendedServices.enableAutorun"; +export const connectionHeartbeatIntervalInSecsID = "extendedServices.connectionHeartbeatIntervalInSecs"; +export const extendedServicesURLID = "extendedServices.extendedServicesURL"; + +type ConfigurationProperty = string | number | boolean; export class Configuration { readonly enableAutoRun: boolean; - readonly connectionHeartbeatIntervalinSecs: number; + readonly connectionHeartbeatIntervalInSecs: number; readonly extendedServicesURL: URL; - constructor(enableAutoRun: boolean, connectionHeartbeatIntervalinSecs: number, extendedServicesURL: URL) { + constructor(enableAutoRun: boolean, connectionHeartbeatIntervalInSecs: number, extendedServicesURL: URL) { this.enableAutoRun = enableAutoRun; - this.connectionHeartbeatIntervalinSecs = connectionHeartbeatIntervalinSecs; + this.connectionHeartbeatIntervalInSecs = connectionHeartbeatIntervalInSecs; this.extendedServicesURL = extendedServicesURL; } } -function fetchEnableAutoRun(): boolean { - const enableAutoRun = vscode.workspace.getConfiguration().get(enableAutoRunID); - if (!enableAutoRun) { - throw new Error("Enable Auto Run configuration not found"); - } - return enableAutoRun; -} - -function fetchConnectionHeartbeatIntervalinSecs(): number { - const connectionHeartbeatIntervalinSecs = vscode.workspace - .getConfiguration() - .get(connectionHeartbeatIntervalinSecsID); - if (!connectionHeartbeatIntervalinSecs) { - throw new Error("Connection Heartbeat Interval configuration not found"); - } - - return connectionHeartbeatIntervalinSecs; -} - function fetchExtendedServicesURL(): URL { - const extendedServicesURL = vscode.workspace.getConfiguration().get(extendedServicesURLID); - if (!extendedServicesURL) { - throw new Error("URL configuration not found"); - } - + const defaultExtendedServicesURL = `http://${process.env.WEBPACK_REPLACE__extendedServicesUrlHost}:${process.env.WEBPACK_REPLACE__extendedServicesUrlPort}`; + const extendedServicesURL = getConfigurationPropertyValue(extendedServicesURLID, defaultExtendedServicesURL); try { return new URL(extendedServicesURL); } catch (error) { - throw new Error("Invalid service URL:" + error.message); + throw new Error(`URL configuration ${extendedServicesURL} is invalid: ${error.message}`); } } -export function fetchConfiguration(): Configuration { - let errorMessages: string[] = []; - let enableAutoRun: any; - let connectionHeartbeatIntervalinSecs: any; - let extendedServicesURL: any; - - try { - enableAutoRun = fetchEnableAutoRun(); - } catch (error) { - errorMessages.push(error.message); - } - - try { - connectionHeartbeatIntervalinSecs = fetchConnectionHeartbeatIntervalinSecs(); - } catch (error) { - errorMessages.push(error.message); +const getConfigurationPropertyValue = ( + property: string, + defaultValue: T +): T => { + let value = vscode.workspace.getConfiguration().get(property) as T; + if (value === null) { + console.warn(`Property: ${property} is missing, using the default: ${defaultValue}`); + value = defaultValue; } + return value; +}; - try { - extendedServicesURL = fetchExtendedServicesURL(); - } catch (error) { - errorMessages.push(error.message); - } +export function fetchConfiguration(): Configuration { + const enableAutoRun = getConfigurationPropertyValue(enableAutoRunID, true); + const connectionHeartbeatIntervalInSecs = getConfigurationPropertyValue( + connectionHeartbeatIntervalInSecsID, + 10 + ); + const extendedServicesURL = fetchExtendedServicesURL(); - if (errorMessages.length < 0) { - throw new Error("CONFIGURATION ERROR - " + errorMessages.join(", ")); - } else { - return new Configuration(enableAutoRun, connectionHeartbeatIntervalinSecs, extendedServicesURL); - } + return new Configuration(enableAutoRun, connectionHeartbeatIntervalInSecs, extendedServicesURL); } diff --git a/packages/extended-services-vscode-extension/src/configurations/ConfigurationWatcher.ts b/packages/extended-services-vscode-extension/src/configurations/ConfigurationWatcher.ts index 62d6e7b4bfb..9e8a8f903bb 100644 --- a/packages/extended-services-vscode-extension/src/configurations/ConfigurationWatcher.ts +++ b/packages/extended-services-vscode-extension/src/configurations/ConfigurationWatcher.ts @@ -30,12 +30,12 @@ export class ConfigurationWatcher { private handleConfigurationChange(configurationChange: vscode.ConfigurationChangeEvent) { const enableAutoRunChanged = configurationChange.affectsConfiguration(configuration.enableAutoRunID); - const connectionHeartbeatIntervalinSecsChanged = configurationChange.affectsConfiguration( - configuration.connectionHeartbeatIntervalinSecsID + const connectionHeartbeatIntervalInSecsChanged = configurationChange.affectsConfiguration( + configuration.connectionHeartbeatIntervalInSecsID ); const extendedServicesURLChanged = configurationChange.affectsConfiguration(configuration.extendedServicesURLID); - if (enableAutoRunChanged || connectionHeartbeatIntervalinSecsChanged || extendedServicesURLChanged) { + if (enableAutoRunChanged || connectionHeartbeatIntervalInSecsChanged || extendedServicesURLChanged) { this.fireConfigurationChangedEvent(); } } diff --git a/packages/extended-services-vscode-extension/src/extension/extension-browser.ts b/packages/extended-services-vscode-extension/src/extension/extension-browser.ts index 955d7967426..b38202b6238 100644 --- a/packages/extended-services-vscode-extension/src/extension/extension-browser.ts +++ b/packages/extended-services-vscode-extension/src/extension/extension-browser.ts @@ -40,16 +40,19 @@ let kieFilesWatcher: KieFilesWatcher; let configurationWatcher: ConfigurationWatcher; let connection: Connection; -let userDisconnected: boolean = false; +/* Determines if the extension is connected with the Extended Services Backend */ +let isConnected = false; +/* Determines the user explicitely disconnected the Extension from the Extended Services Backend */ +let disconnectedByUser: boolean = false; let configuration: Configuration | null = null; function initializeCommands(context: vscode.ExtensionContext) { connectExtendedServicesCommand = vscode.commands.registerCommand(startExtendedServicesCommandUID, () => { - userDisconnected = false; + disconnectedByUser = false; startExtendedServices(); }); disconnectExtendedServicesCommand = vscode.commands.registerCommand(stopExtendedServicesCommandUID, () => { - userDisconnected = true; + disconnectedByUser = true; stopExtendedServices(); }); } @@ -67,29 +70,40 @@ function initializeVSCodeElements() { } function startExtendedServices(): void { + console.debug("[Extended Services Extension] Starting Extended Service"); try { - statusBarItem.show(); configuration = fetchConfiguration(); } catch (error) { - stopExtendedServices(); - vscode.window.showErrorMessage("An error happened while trying to start the Extended Services: " + error.message); + console.error(`[Extended Services Extension] Extension configuration is wrong: ${error.message}`); + vscode.window.showErrorMessage( + `Extension configuration is wrong: ${error.message}. Please fix your local extension's setting` + ); return; } try { - connection.start(configuration.extendedServicesURL, configuration.connectionHeartbeatIntervalinSecs); + console.debug( + `[Extended Services Extension] Connecting with the Extended Services located: ${configuration.extendedServicesURL}` + ); + connection.start(configuration.extendedServicesURL, configuration.connectionHeartbeatIntervalInSecs); } catch (error) { stopExtendedServices(); - vscode.window.showErrorMessage("An error happened while trying to connect to the service:" + error.message); + console.error( + `[Extended Services Extension] An error happened while trying to start the local service: ${error.message}` + ); + vscode.window.showErrorMessage(`An error happened while trying to start the local service: ${error.message}`); } } function stopExtendedServices() { + console.debug("[Extended Services Extension] Stopping Extended Service"); + /* Invalidating immediatly the current connection, so any request coming when shutting down is not served */ + isConnected = false; configuration = null; connection.stop(); } -async function validate(configuration: Configuration) { +async function validate(extendedServicesURL: URL) { diagnosticCollection.clear(); const bpmnFiles: KieFile[] = await kiefilesfetcher.findActiveKieFiles([kiefilesfetcher.bpmnDocumentFilter]); @@ -97,30 +111,30 @@ async function validate(configuration: Configuration) { for (const bpmnFile of bpmnFiles) { try { - const bpmnDiagnostics: vscode.Diagnostic[] = await validator.validateBPMN( - configuration.extendedServicesURL, - bpmnFile - ); + console.debug(`[Extended Services Extension] Validating BPMN file: ${bpmnFile.uri.path}`); + const bpmnDiagnostics: vscode.Diagnostic[] = await validator.validateBPMN(extendedServicesURL, bpmnFile); diagnosticCollection.set(bpmnFile.uri, bpmnDiagnostics); } catch (error) { - stopExtendedServices(); + console.error( + `[Extended Services Extension] An error happened while trying to validate ${bpmnFile.uri.path}: ${error.message}` + ); vscode.window.showErrorMessage( - "An error happened while trying to validate " + bpmnFile.uri.path + ": " + error.message + `An error happened while trying to validate ${bpmnFile.uri.path}: ${error.message}` ); } } for (const dmnFile of dmnFiles) { try { - const bpmnDiagnostics: vscode.Diagnostic[] = await validator.validateDMN( - configuration.extendedServicesURL, - dmnFile - ); - diagnosticCollection.set(dmnFile.uri, bpmnDiagnostics); + console.debug(`[Extended Services Extension] Validating DMN file: ${dmnFile.uri.path}`); + const dmnDiagnostics: vscode.Diagnostic[] = await validator.validateDMN(extendedServicesURL, dmnFile); + diagnosticCollection.set(dmnFile.uri, dmnDiagnostics); } catch (error) { - stopExtendedServices(); + console.error( + `[Extended Services Extension] An error happened while trying to validate ${dmnFile.uri.path}: ${error.message}` + ); vscode.window.showErrorMessage( - "An error happened while trying to validate " + dmnFile.uri.path + ": " + error.message + `An error happened while trying to validate ${dmnFile.uri.path}: ${error.message}` ); } } @@ -133,43 +147,48 @@ export function activate(context: vscode.ExtensionContext) { configurationWatcher.subscribeSettingsChanged(() => { stopExtendedServices(); - if (!userDisconnected && kieFilesWatcher.watchedKieFiles.length > 0) { + if (!disconnectedByUser && kieFilesWatcher.watchedKieFiles.length > 0) { startExtendedServices(); } }); kieFilesWatcher.subscribeKieFilesOpened(() => { - statusBarItem.show(); - if (userDisconnected) { - return; + console.debug( + `[Extended Services Extension] A KIE file has been opened. Current opened KIE files: ${ + kieFilesWatcher.watchedKieFiles.length + }` + ); + if (!disconnectedByUser && isConnected && configuration) { + validate(configuration.extendedServicesURL); } - - if (configuration) { - validate(configuration); - } else { + if (!disconnectedByUser && !isConnected) { startExtendedServices(); } }); kieFilesWatcher.subscribeKieFileChanged(() => { - if (configuration) { - validate(configuration); + console.debug("[Extended Services Extension] A KIE file has been changed"); + if (!disconnectedByUser && isConnected && configuration) { + validate(configuration.extendedServicesURL); } }); kieFilesWatcher.subscribeKieFilesClosed(() => { - if (kieFilesWatcher.watchedKieFiles.length === 0) { - stopExtendedServices(); - statusBarItem.hide(); - } else if (configuration) { - validate(configuration); + console.debug( + `[Extended Services Extension] A KIE file has been closed. Current opened KIE files: ${kieFilesWatcher.watchedKieFiles.length}` + ); + if (!disconnectedByUser && isConnected && configuration) { + validate(configuration.extendedServicesURL); } }); connection.subscribeConnected(() => { + console.debug("[Extended Services Extension] Connected with Extended Services"); + isConnected = true; vscode.commands.executeCommand("setContext", connectedEnablementUID, true); + statusBarItem.show(); if (configuration) { - validate(configuration); + validate(configuration.extendedServicesURL); statusBarItem.text = "$(extended-services-connected)"; statusBarItem.tooltip = "Apache KIE™ Extended Services is connected. Click to disconnect."; statusBarItem.command = stopExtendedServicesCommandUID; @@ -177,11 +196,16 @@ export function activate(context: vscode.ExtensionContext) { }); connection.subscribeConnectionLost((errorMessage: string) => { - vscode.window.showErrorMessage("Connection error: " + errorMessage); + statusBarItem.hide(); stopExtendedServices(); + isConnected = false; + console.error("[Extended Services Extension] Connection lost with Extended Services"); + vscode.window.showErrorMessage(`Connection error: ${errorMessage}`); }); connection.subscribeDisconnected(() => { + console.debug("[Extended Services Extension] Disconnected with Extended Services"); + isConnected = false; vscode.commands.executeCommand("setContext", connectedEnablementUID, false); statusBarItem.text = "$(extended-services-disconnected)"; statusBarItem.tooltip = "Apache KIE™ Extended Services is not connected. Click to connect."; diff --git a/packages/extended-services-vscode-extension/src/extension/extension-main.ts b/packages/extended-services-vscode-extension/src/extension/extension-main.ts index 560feb974e9..d48fe9a819c 100644 --- a/packages/extended-services-vscode-extension/src/extension/extension-main.ts +++ b/packages/extended-services-vscode-extension/src/extension/extension-main.ts @@ -43,16 +43,19 @@ let configurationWatcher: ConfigurationWatcher; let connection: Connection; let localService: LocalExtendedServices; -let userDisconnected: boolean = false; +/* Determines if the extension is connected with the Extended Services Backend */ +let isConnected: boolean = false; +/* Determines the user explicitely disconnected the Extension from the Extended Services Backend */ +let disconnectedByUser: boolean = false; let configuration: Configuration | null; function initializeCommands(context: vscode.ExtensionContext) { connectExtendedServicesCommand = vscode.commands.registerCommand(startExtendedServicesCommandUID, () => { - userDisconnected = false; + disconnectedByUser = false; startExtendedServices(context); }); disconnectExtendedServicesCommand = vscode.commands.registerCommand(stopExtendedServicesCommandUID, () => { - userDisconnected = true; + disconnectedByUser = true; if (configuration) { stopExtendedServices(configuration); } @@ -71,14 +74,16 @@ function initializeVSCodeElements() { } function startExtendedServices(context: vscode.ExtensionContext): void { - let config: Configuration; + console.debug("[Extended Services Extension] Starting Extended Service"); + statusBarItem.command = undefined; try { - statusBarItem.command = undefined; - statusBarItem.show(); configuration = fetchConfiguration(); } catch (error) { - stopExtendedServices(null); - vscode.window.showErrorMessage("An error happened while trying to start the Extended Services: " + error.message); + console.error(`[Extended Services Extension] Extension configuration is wrong: ${error.message}`); + vscode.window.showErrorMessage( + `Extension configuration is wrong: ${error.message}. Please fix your local extension's setting.` + ); + statusBarItem.hide(); return; } @@ -90,6 +95,9 @@ function startExtendedServices(context: vscode.ExtensionContext): void { } function stopExtendedServices(configuration: Configuration | null) { + console.debug("[Extended Services Extension] Stopping Extended Service"); + /* Invalidating immediatly the current connection, so any request coming when shutting down is not served */ + isConnected = false; statusBarItem.command = undefined; if (configuration?.enableAutoRun) { localService.stop(); @@ -99,24 +107,38 @@ function stopExtendedServices(configuration: Configuration | null) { } function startLocalExtendedServices(configuration: Configuration, context: vscode.ExtensionContext): void { + console.debug("[Extended Services Extension] Starting a Local Extended Services process"); try { localService.start(configuration.extendedServicesURL, context.extensionPath); } catch (error) { stopExtendedServices(configuration); - vscode.window.showErrorMessage("An error happened while trying to start the local service:" + error.message); + console.error( + `[Extended Services Extension] An error happened while trying to start the Local Extended Services process: ${error.message}` + ); + vscode.window.showErrorMessage( + `An error happened while trying to start the Local Extended Services process: ${error.message}` + ); } } function startConnection(configuration: Configuration) { + console.debug( + `[Extended Services Extension] Connecting with the Extended Services located: ${configuration.extendedServicesURL}` + ); try { - connection.start(configuration.extendedServicesURL, configuration.connectionHeartbeatIntervalinSecs); + connection.start(configuration.extendedServicesURL, configuration.connectionHeartbeatIntervalInSecs); } catch (error) { stopExtendedServices(configuration); - vscode.window.showErrorMessage("An error happened while trying to connect to the service:" + error.message); + console.error( + `[Extended Services Extension] An error happened while trying to connect to the service: ${error.message}` + ); + vscode.window.showErrorMessage(`An error happened while trying to connect to the service: ${error.message}`); } } -async function validate(configuration: Configuration) { +async function validate(extendedServicesURL: URL) { + console.debug("[Extended Services Extension] Validating the opened KIE files"); + diagnosticCollection.clear(); const bpmnFiles: KieFile[] = await kiefilesfetcher.findActiveKieFiles([kiefilesfetcher.bpmnDocumentFilter]); @@ -124,29 +146,30 @@ async function validate(configuration: Configuration) { for (const bpmnFile of bpmnFiles) { try { - const bpmnDiagnostics: vscode.Diagnostic[] = await validator.validateBPMN( - configuration.extendedServicesURL, - bpmnFile - ); + console.debug(`[Extended Services Extension] Validating BPMN file: ${bpmnFile.uri.path}`); + const bpmnDiagnostics: vscode.Diagnostic[] = await validator.validateBPMN(extendedServicesURL, bpmnFile); diagnosticCollection.set(bpmnFile.uri, bpmnDiagnostics); } catch (error) { + console.error( + `[Extended Services Extension] An error happened while trying to validate ${bpmnFile.uri.path}: ${error.message}` + ); vscode.window.showErrorMessage( - "An error happened while trying to validate " + bpmnFile.uri.path + ": " + error.message + `An error happened while trying to validate ${bpmnFile.uri.path}: ${error.message}` ); } } for (const dmnFile of dmnFiles) { try { - const bpmnDiagnostics: vscode.Diagnostic[] = await validator.validateDMN( - configuration.extendedServicesURL, - dmnFile - ); - diagnosticCollection.set(dmnFile.uri, bpmnDiagnostics); + console.debug(`[Extended Services Extension] Validating DMN file: ${dmnFile.uri.path}`); + const dmnDiagnostics: vscode.Diagnostic[] = await validator.validateDMN(extendedServicesURL, dmnFile); + diagnosticCollection.set(dmnFile.uri, dmnDiagnostics); } catch (error) { - stopExtendedServices(configuration); + console.error( + `[Extended Services Extension] An error happened while trying to validate ${dmnFile.uri.path}: ${error.message}` + ); vscode.window.showErrorMessage( - "An error happened while trying to validate " + dmnFile.uri.path + ": " + error.message + `An error happened while trying to validate ${dmnFile.uri.path}: ${error.message}` ); } } @@ -160,40 +183,43 @@ export function activate(context: vscode.ExtensionContext) { configurationWatcher.subscribeSettingsChanged(() => { stopExtendedServices(configuration); - if (!userDisconnected && kieFilesWatcher.watchedKieFiles.length > 0) { + if (!disconnectedByUser && kieFilesWatcher.watchedKieFiles.length > 0) { startExtendedServices(context); } }); kieFilesWatcher.subscribeKieFilesOpened(() => { - statusBarItem.show(); - if (userDisconnected) { - return; + console.debug( + `[Extended Services Extension] A KIE file has been opened. Current opened KIE files: ${ + kieFilesWatcher.watchedKieFiles.length + }` + ); + if (!disconnectedByUser && isConnected && configuration) { + validate(configuration.extendedServicesURL); } - - if (configuration) { - validate(configuration); - } else { + if (!disconnectedByUser && !isConnected) { startExtendedServices(context); } }); kieFilesWatcher.subscribeKieFileChanged(() => { - if (configuration) { - validate(configuration); + console.debug("[Extended Services Extension] A KIE file has been changed"); + if (!disconnectedByUser && isConnected && configuration) { + validate(configuration.extendedServicesURL); } }); kieFilesWatcher.subscribeKieFilesClosed(() => { - if (kieFilesWatcher.watchedKieFiles.length === 0) { - stopExtendedServices(configuration); - statusBarItem.hide(); - } else if (configuration) { - validate(configuration); + console.debug( + `[Extended Services Extension] A KIE file has been closed. Current opened KIE files: ${kieFilesWatcher.watchedKieFiles.length}` + ); + if (!disconnectedByUser && isConnected && configuration) { + validate(configuration.extendedServicesURL); } }); localService.subscribeLocalExtendedServicesStarted(() => { + console.debug("[Extended Services Extension] Local instance of Extended Services started"); if (configuration) { startConnection(configuration); } @@ -209,13 +235,17 @@ export function activate(context: vscode.ExtensionContext) { }); localService.subscribeLocalExtendedServicesStopped(() => { + console.debug("[Extended Services Extension] Local instance of Extended Services stopped"); connection.stop(); }); connection.subscribeConnected(() => { + console.debug("[Extended Services Extension] Connected with Extended Services"); + isConnected = true; vscode.commands.executeCommand("setContext", connectedEnablementUID, true); + statusBarItem.show(); if (configuration) { - validate(configuration); + validate(configuration.extendedServicesURL); statusBarItem.text = "$(extended-services-connected)"; statusBarItem.tooltip = "Apache KIE™ Extended Services are connected. Click to disconnect."; statusBarItem.command = stopExtendedServicesCommandUID; @@ -223,11 +253,17 @@ export function activate(context: vscode.ExtensionContext) { }); connection.subscribeConnectionLost((errorMessage: string) => { + statusBarItem.hide(); stopExtendedServices(configuration); - vscode.window.showErrorMessage("Connection error: " + errorMessage); + isConnected = false; + diagnosticCollection.clear(); + console.error("[Extended Services Extension] Connection lost with Extended Services"); + vscode.window.showErrorMessage(`Connection error: ${errorMessage}`); }); connection.subscribeDisconnected(() => { + console.debug("[Extended Services Extension] Disconnected with Extended Services"); + isConnected = false; vscode.commands.executeCommand("setContext", connectedEnablementUID, false); statusBarItem.text = "$(extended-services-disconnected)"; statusBarItem.tooltip = "Apache KIE™ Extended Services are not connected. Click to connect."; diff --git a/packages/extended-services-vscode-extension/src/requests/PingRequest.ts b/packages/extended-services-vscode-extension/src/requests/PingRequest.ts index 0e26fd641ca..b5ba0206531 100644 --- a/packages/extended-services-vscode-extension/src/requests/PingRequest.ts +++ b/packages/extended-services-vscode-extension/src/requests/PingRequest.ts @@ -20,10 +20,11 @@ import * as pingresponse from "./PingResponse"; export async function ping(extendedServicesURL: URL): Promise { - const url = new URL("/ping", extendedServicesURL); + const extendedServicesPingURL = new URL("/ping", extendedServicesURL); try { - const response = await fetch(url.toString()); + console.debug("[Extended Services Extension] Pinging: " + extendedServicesPingURL.toString()); + const response = await fetch(extendedServicesPingURL.toString()); if (response.ok) { const responseData = (await response.json()) as pingresponse.PingResponse; return responseData; diff --git a/packages/extended-services-vscode-extension/src/requests/ValidationRequests.ts b/packages/extended-services-vscode-extension/src/requests/ValidationRequests.ts index 53436866b3c..92bbb3cb76f 100644 --- a/packages/extended-services-vscode-extension/src/requests/ValidationRequests.ts +++ b/packages/extended-services-vscode-extension/src/requests/ValidationRequests.ts @@ -21,25 +21,23 @@ import * as vscode from "vscode"; import * as validationresponse from "./ValidationResponse"; import * as kiefile from "../kieFiles/KieFile"; -interface ValidationBody { +interface MultipleResourcesPayload { mainURI: string; - resources: ValidationResource[]; + resources: ResourceWithURI[]; } -interface ValidationResource { +interface ResourceWithURI { URI: string; content: string; } -function buildRequestBody(document: vscode.TextDocument): string { - const body: ValidationBody = { - mainURI: "VS Code KIE files", - resources: [ - { - URI: document.fileName, - content: document.getText(), - }, - ], +function buildMultipleResourcesPayload(mainURI: string, documents: vscode.TextDocument[]): string { + const body: MultipleResourcesPayload = { + mainURI: mainURI, + resources: documents.map((document) => ({ + URI: document.fileName, + content: document.getText(), + })), }; return JSON.stringify(body); @@ -56,12 +54,13 @@ async function validate( textDocument = await vscode.workspace.openTextDocument(kieFile.uri); } const url = new URL(endpoint, serviceURL); + console.debug(`[Extended Services Extension] Fetching ${url.toString()}`); const response = await fetch(url.toString(), { method: "POST", headers: { "Content-Type": "application/json", }, - body: buildRequestBody(textDocument), + body: buildMultipleResourcesPayload(textDocument.fileName, [textDocument]), }); const responseData: any = await response.json(); @@ -70,22 +69,28 @@ async function validate( export async function validateBPMN( serviceURL: URL, - kieFile: kiefile.KieFile + bpmnFile: kiefile.KieFile ): Promise { try { - return validate(serviceURL, kieFile, "/jitbpmn/validate", validationresponse.parseBPMNValidationResponse); + return validate(serviceURL, bpmnFile, "/jitbpmn/validate", validationresponse.parseBPMNValidationResponse); } catch (error) { + console.error( + `[Extended Services Extension] An error happened while trying to validate ${bpmnFile} from serviceUrl ${serviceURL}: ${error.message}` + ); throw new Error("VALIDATE BPMN REQUEST ERROR: \n", error.message); } } export async function validateDMN( serviceURL: URL, - kieFile: kiefile.KieFile + dmnFile: kiefile.KieFile ): Promise { try { - return validate(serviceURL, kieFile, "/jitdmn/validate", validationresponse.parseDMNValidationResponse); + return validate(serviceURL, dmnFile, "/jitdmn/validate", validationresponse.parseDMNValidationResponse); } catch (error) { + console.error( + `[Extended Services Extension] An error happened while trying to validate ${dmnFile} from serviceUrl ${serviceURL}: ${error.message}` + ); throw new Error("VALIDATE DMN REQUEST ERROR: \n", error.message); } } diff --git a/packages/extended-services-vscode-extension/webpack.config.js b/packages/extended-services-vscode-extension/webpack.config.js index d52f1fb6e7c..50be69a003d 100644 --- a/packages/extended-services-vscode-extension/webpack.config.js +++ b/packages/extended-services-vscode-extension/webpack.config.js @@ -18,6 +18,8 @@ */ const { merge } = require("webpack-merge"); +const { EnvironmentPlugin } = require("webpack"); +const { env } = require("./env"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const commonConfig = (webpackEnv) => @@ -30,21 +32,51 @@ const commonConfig = (webpackEnv) => }, externals: { vscode: "commonjs vscode", + plugins: [], }, - plugins: [], }); -module.exports = async (webpackEnv) => [ - merge(commonConfig(webpackEnv), { - target: "node", - entry: { - "extension/extension-main": "./src/extension/extension-main.ts", - }, - }), - merge(commonConfig(webpackEnv), { - target: "web", - entry: { - "extension/extension-browser": "./src/extension/extension-browser.ts", - }, - }), -]; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +const buildEnv = env; // build-env is not typed + +module.exports = async (webpackEnv) => { + const [extendedServices_urlHost, extendedServices_urlPort] = getExtendedServicesArgs(); + + return [ + merge(commonConfig(webpackEnv), { + target: "node", + entry: { + "extension/extension-main": "./src/extension/extension-main.ts", + }, + plugins: [ + new EnvironmentPlugin({ + WEBPACK_REPLACE__extendedServicesUrlHost: extendedServices_urlHost, + WEBPACK_REPLACE__extendedServicesUrlPort: extendedServices_urlPort, + }), + ], + }), + merge(commonConfig(webpackEnv), { + target: "web", + entry: { + "extension/extension-browser": "./src/extension/extension-browser.ts", + }, + plugins: [ + new EnvironmentPlugin({ + WEBPACK_REPLACE__extendedServicesUrlHost: extendedServices_urlHost, + WEBPACK_REPLACE__extendedServicesUrlPort: extendedServices_urlPort, + }), + ], + }), + ]; +}; + +function getExtendedServicesArgs() { + const extendedServicesJavaHost = buildEnv.extendedServicesJava.host; + const extendedServicesJavaPort = buildEnv.extendedServicesJava.port; + + console.info("Extended Services :: URL HOST " + extendedServicesJavaHost); + console.info("Extended Services :: URL PORT: " + extendedServicesJavaPort); + + return [extendedServicesJavaHost, extendedServicesJavaPort]; +} diff --git a/packages/kie-sandbox-distribution/package.json b/packages/kie-sandbox-distribution/package.json index 7337835482a..f5fc7882bec 100644 --- a/packages/kie-sandbox-distribution/package.json +++ b/packages/kie-sandbox-distribution/package.json @@ -37,7 +37,7 @@ "@types/jest": "^29.5.12", "jest": "^29.7.0", "jest-junit": "^16.0.0", - "node-fetch": "^3.3.1", + "node-fetch": "^3.3.2", "rimraf": "^3.0.2", "run-script-os": "^1.1.6", "ts-jest": "^29.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 254651552de..e7567068343 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2353,8 +2353,8 @@ importers: specifier: ^4.21.1 version: 4.21.1 node-fetch: - specifier: ^3.3.1 - version: 3.3.1 + specifier: ^3.3.2 + version: 3.3.2 devDependencies: '@babel/core': specifier: ^7.16.0 @@ -5255,8 +5255,8 @@ importers: specifier: ^11.0.0 version: 11.0.0(webpack@5.94.0(webpack-cli@4.10.0)) node-fetch: - specifier: ^3.3.1 - version: 3.3.1 + specifier: ^3.3.2 + version: 3.3.2 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -7036,8 +7036,8 @@ importers: specifier: ^16.0.0 version: 16.0.0 node-fetch: - specifier: ^3.3.1 - version: 3.3.1 + specifier: ^3.3.2 + version: 3.3.2 rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -26792,8 +26792,8 @@ packages: resolution: {integrity: sha512-RdbZCEynH2tH46+tj0ua9caUHVWrd/RHnRfvly2EVdqGmI3ndS1Vn/xjm5KuGejDt2RNDQsVRLPNd2QPwcewVg==} engines: {node: ^10.17 || >=12.3} - node-fetch@3.3.1: - resolution: {integrity: sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==} + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} node-forge@1.3.1: @@ -53150,7 +53150,7 @@ snapshots: transitivePeerDependencies: - domexception - node-fetch@3.3.1: + node-fetch@3.3.2: dependencies: data-uri-to-buffer: 4.0.1 fetch-blob: 3.2.0 From f7beeed43e5062e6713254b44ff226d3645c0750 Mon Sep 17 00:00:00 2001 From: Yeser Amer Date: Thu, 16 Jan 2025 14:47:06 +0100 Subject: [PATCH 9/9] NO-ISSUE: Upgrade Maven plugins to newer versions and Apache parent from `32` to `33` (#2819) --- packages/dashbuilder/pom.xml | 19 +++++------- .../dev-webapp/quarkus-app/pom.xml | 18 ++++------- .../pom.xml | 16 ++++------ packages/extended-services/pom.xml | 2 +- packages/maven-base/pom.xml | 30 +++++++++---------- .../pom.xml | 4 +-- .../pom.xml | 24 +++++++-------- packages/stunner-editors/pom.xml | 24 +++++++-------- 8 files changed, 60 insertions(+), 77 deletions(-) diff --git a/packages/dashbuilder/pom.xml b/packages/dashbuilder/pom.xml index 1d3c6b30f03..3c377fcabf7 100644 --- a/packages/dashbuilder/pom.xml +++ b/packages/dashbuilder/pom.xml @@ -100,22 +100,17 @@ 3.1.2 - 3.3.0 - 2.22.2 + 3.5.0 ${version.surefire.plugin} 3.0.0 - 3.2.5 - 3.0.0-M3 - 3.1.0 - 3.12.1 - 3.2.0 - 3.2.3 - 3.1.1 - 2.5.2 - 3.8.2 + 3.5.0 + 3.4.0 + 3.13.0 + 3.3.1 + 3.4.0 + 3.4.0 1.8 3.0.0 - 3.1.2 true diff --git a/packages/dev-deployment-dmn-form-webapp/dev-webapp/quarkus-app/pom.xml b/packages/dev-deployment-dmn-form-webapp/dev-webapp/quarkus-app/pom.xml index 454b179cea0..5710f5c17e4 100644 --- a/packages/dev-deployment-dmn-form-webapp/dev-webapp/quarkus-app/pom.xml +++ b/packages/dev-deployment-dmn-form-webapp/dev-webapp/quarkus-app/pom.xml @@ -28,7 +28,7 @@ org.apache apache - 32 + 33 4.0.0 @@ -42,19 +42,13 @@ UTF-8 UTF-8 - - 3.4.1 + + 1.6.0 3.13.0 - 3.2.0 - 3.0.0-M7 - 3.5.0 - 3.1.2 - 3.12.1 - 3.6.1 - 3.4.1 + 3.4.2 3.2.0 - 3.4.0 - 1.6.0 + 3.21.0 + 3.5.0 true diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index 07fa2b09361..cde260e9131 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -41,19 +41,15 @@ UTF-8 UTF-8 - - 3.4.1 + + 1.6.0 + 3.4.0 3.13.0 + ${version.maven.surefire.plugin} + 3.4.2 3.3.1 - 3.0.0-M7 - 3.5.0 - 3.1.3 - 3.1.2 3.21.0 - 3.6.1 - 3.4.1 - 3.4.0 - 1.6.0 + 3.5.0 1.4.21 diff --git a/packages/extended-services/pom.xml b/packages/extended-services/pom.xml index 9db5063a8c1..41604bdf340 100644 --- a/packages/extended-services/pom.xml +++ b/packages/extended-services/pom.xml @@ -30,7 +30,7 @@ org.apache apache - 32 + 33 4.0.0 diff --git a/packages/maven-base/pom.xml b/packages/maven-base/pom.xml index 057fc3f2f68..5b47f83731e 100644 --- a/packages/maven-base/pom.xml +++ b/packages/maven-base/pom.xml @@ -25,7 +25,7 @@ org.apache apache - 32 + 33 org.kie @@ -105,22 +105,20 @@ 2024-01-12T00:00:00Z true - - 3.4.1 + + 1.6.0 + 3.5.3 + 3.4.0 3.13.0 - 3.2.0 - 3.0.0-M7 - 3.5.0 - 3.1.3 - 3.2.0 + 3.7.1 3.1.2 - 3.12.1 - 3.3.1 - 3.6.1 - 3.4.1 + ${version.maven.surefire.plugin} + 3.4.1 + 3.1.3 + 3.4.2 3.2.0 - 3.4.0 - 1.6.0 + 3.3.1 + 3.5.0 999-20250105-SNAPSHOT @@ -295,8 +293,8 @@ org.apache.maven.plugins - maven-helper-plugin - ${version.maven.helper.plugin} + maven-help-plugin + ${version.maven.help.plugin} org.apache.maven.plugins diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml index a02511ff4b5..2ca0049c359 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml @@ -28,7 +28,7 @@ org.apache apache - 32 + 33 4.0.0 @@ -47,7 +47,7 @@ 2.1.20 1.26.0 1.14.2 - 3.2.5 + 3.5.0 diff --git a/packages/serverless-workflow-diagram-editor/pom.xml b/packages/serverless-workflow-diagram-editor/pom.xml index 3280035b982..7d14a26c473 100644 --- a/packages/serverless-workflow-diagram-editor/pom.xml +++ b/packages/serverless-workflow-diagram-editor/pom.xml @@ -160,28 +160,28 @@ 1.8 3.0.0 3.3.0 - 3.2.0 - 3.1.0 - 3.12.1 - 3.3.0 - 2.8.2 - 3.1.0 + 3.4.0 + 3.4.0 + 3.13.0 + 3.7.1 + 3.1.2 + 3.5.0 ${version.surefire.plugin} - 2.5.2 + 3.1.3 0.8.11 3.1.0 1.5 3.0.1 1.3 1.5.2 - 3.2.0 - 3.2.1 - 3.7.1 + 3.3.1 + 3.6.0 + 3.21.0 3.1.8 3.9.1.2184 3.3.1 - 3.2.5 - 3.2.2 + 3.5.0 + 3.4.0 2.3.0 diff --git a/packages/stunner-editors/pom.xml b/packages/stunner-editors/pom.xml index 92ad6a927b0..13777aed344 100644 --- a/packages/stunner-editors/pom.xml +++ b/packages/stunner-editors/pom.xml @@ -187,14 +187,14 @@ 1.8 3.0.0 3.3.0 - 3.2.0 - 3.1.0 - 3.12.1 - 3.3.0 - 2.8.2 - 3.1.0 + 3.4.0 + 3.4.0 + 3.13.0 + 3.7.1 + 3.1.2 + 3.5.0 ${version.surefire.plugin} - 2.5.2 + 3.1.3 0.8.11 3.1.0 1.5 @@ -202,14 +202,14 @@ 1.3 1.3.0 1.5.2 - 3.2.0 - 3.2.1 - 3.7.1 + 3.3.1 + 3.6.0 + 3.21.0 3.1.8 3.9.1.2184 3.3.1 - 3.2.5 - 3.2.2 + 3.5.0 + 3.4.0 2.3.0