diff --git a/.gitignore b/.gitignore
index 34965b337f1..c576e0b3e03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -324,8 +324,20 @@ packages/scesim-marshaller/**/ts-gen
!packages/sonataflow-builder-image/test-resources/
!packages/sonataflow-devmode-image/test-resources/
+# kogito-images: excluding test-resources
+!packages/kogito-data-index-ephemeral-image/test-resources/
+!packages/kogito-data-index-postgresql-image/test-resources/
+!packages/kogito-jobs-service-ephemeral-image/test-resources/
+!packages/kogito-jobs-service-postgresql-image/test-resources/
+!packages/kogito-jobs-service-allinone-image/test-resources/
+!packages/kogito-jit-runner-image/test-resources/
+
__pycache__
packages/python-venv/venv
# devbox
.devbox
+
+# turbo
+.turbo
+turbo.json
diff --git a/.syncpackrc.json b/.syncpackrc.json
index 4f613e8ad0c..7abf816f386 100644
--- a/.syncpackrc.json
+++ b/.syncpackrc.json
@@ -7,6 +7,16 @@
"@kie-tools/uniforms-patternfly-codegen",
"@kie-tools/yaml-language-server"
]
+ },
+ {
+ "dependencies": ["react", "react-dom"],
+ "policy": "sameRange"
+ },
+ {
+ "label": "Use workspace protocol when developing local packages",
+ "dependencies": ["$LOCAL"],
+ "dependencyTypes": ["prod", "dev"],
+ "pinVersion": "workspace:*"
}
]
}
diff --git a/KOGITO_UPGRADE_PROCESS.md b/KOGITO_UPGRADE_PROCESS.md
index 4b74a31d4ef..2896b7f32b1 100644
--- a/KOGITO_UPGRADE_PROCESS.md
+++ b/KOGITO_UPGRADE_PROCESS.md
@@ -86,7 +86,7 @@ You can find an example of the Quarkus upgrade in [this PR](https://github.com/a
# Upgrading Kogito
-In the root directory, run `pnpm update-kogito-version-to --maven [version] --images-tag [tag]`.
+In the root directory, run `pnpm update-kogito-version-to --maven [version]`.
Of course, a new Kogito version may lead to incompatibilities in the code and with other dependencies. In such a case, an investigation and evetually a fix is required to complete the process.
diff --git a/README.md b/README.md
index e0ec6ec186d..052e4d56144 100644
--- a/README.md
+++ b/README.md
@@ -53,6 +53,8 @@ To build and test all packages of the Apache KIE Tools project, you're going to
- 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
+- xmllint _(To install, follow these instructions: https://www.baeldung.com/linux/xmllint)_
+- bash `5.x` _(On Linux or Nix you should be fine. On macOS, follow these instructions to use zsh: https://support.apple.com/102360)_
> **ℹ️ NOTE**
>
diff --git a/devbox.json b/devbox.json
index bd6d1bf34f2..0268f10a97a 100644
--- a/devbox.json
+++ b/devbox.json
@@ -7,7 +7,8 @@
"kubernetes-helm": "3.13.3",
"gnumake": "4.4.1",
"go": "1.21.9",
- "python": "3.12.2"
+ "python": "3.12.2",
+ "libxml2": "2.13.3"
},
"env": {
"PLAYWRIGHT_BROWSERS_PATH": "0",
@@ -15,7 +16,8 @@
"DEVBOX_COREPACK_ENABLED": "true",
"GOFLAGS": "-modcacherw",
"GOPATH": "$DEVBOX_PROJECT_ROOT/.devbox/gopkgs",
- "PATH": "$DEVBOX_PROJECT_ROOT/.devbox/gopkgs/bin:$PATH"
+ "PNPM_HOME": "$DEVBOX_PROJECT_ROOT/.devbox/pnpm-store",
+ "PATH": "$DEVBOX_PROJECT_ROOT/.devbox/gopkgs/bin:$DEVBOX_PROJECT_ROOT/.devbox/pnpm-store:$PATH"
},
"shell": {
"init_hook": [
diff --git a/devbox.lock b/devbox.lock
index 810e96da462..e44362293a1 100644
--- a/devbox.lock
+++ b/devbox.lock
@@ -189,6 +189,110 @@
}
}
},
+ "libxml2@2.13.3": {
+ "last_modified": "2024-09-12T11:58:09Z",
+ "resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#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",
@@ -304,7 +408,7 @@
},
"python@3.12.2": {
"last_modified": "2024-03-22T11:26:23Z",
- "plugin_version": "0.0.3",
+ "plugin_version": "0.0.4",
"resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#python312",
"source": "devbox-search",
"version": "3.12.2",
diff --git a/examples/base64png-editor/package.json b/examples/base64png-editor/package.json
index 4c9ee64631e..57aff01bf6b 100644
--- a/examples/base64png-editor/package.json
+++ b/examples/base64png-editor/package.json
@@ -28,9 +28,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/workspace": "workspace:*",
"@patternfly/react-core": "^4.276.6",
- "@patternfly/react-icons": "^4.93.6",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@patternfly/react-icons": "^4.93.6"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
@@ -40,5 +38,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/examples/jbpm-compact-architecture-example/README.md b/examples/jbpm-compact-architecture-example/README.md
index c754d55ceb6..5fcae0599f9 100644
--- a/examples/jbpm-compact-architecture-example/README.md
+++ b/examples/jbpm-compact-architecture-example/README.md
@@ -6,13 +6,13 @@ This example showcases a basic implementation of the **Hiring** process that dri
interviews until he gets hired.
This quickstart project shows a simple example user task orchestration including the use of DMN decisions to
-generate the candidate offer and tºimers to skip User Tasks.
+generate the candidate offer and timers to skip User Tasks.
This example also demonstrates how to configure the whole _Kogito_ environment using the new _Compact Architecture_ that
enable simplifying the communication among _Kogito_ services removing the need of events (Kafka/HTTP) between them. This can
be achieved using the following _Quarkus_ addons:
-- `kogito-addons-quarkus-data-index-persistence-postgresql`: enables the _Kogito Runtime_ persisting directly into the
+- `kogito-addons-quarkus-data-index-postgresql`: enables the _Kogito Runtime_ persisting directly into the
_Data-Index_ database.
- `kogito-addons-quarkus-jobs`: enables collocating the _Jobs Service_ inside the _Kogito Runtime_.
@@ -321,7 +321,8 @@ Candidate Jon Snow don't meet the requirements for the position but we'll keep i
### Using Keycloak as Authentication Server
-In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as _Authentication Server_. It will be started as a part of the project _Infrastructure Services_, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder.
+In this Quickstart we'll be using [Keycloak](https://www.keycloak.org/) as _Authentication Server_ for _Kogito Task Console_. It will be started
+as a part of the project _Infrastructure Services_, you can check the configuration on the project [docker-compose.yml](docker-compose/docker-compose.yml) in [docker-compose](docker-compose) folder.
It will install the _Kogito Realm_ that comes with a predefined set of users:
@@ -333,7 +334,7 @@ It will install the _Kogito Realm_ that comes with a predefined set of users:
Once Keycloak is started, you should be able to access your _Keycloak Server_ at [localhost:8480/auth](http://localhost:8480/auth) with _admin_ user.
-> **_NOTE:_** This example uses keycloak authentication to enable security only in the consoles not in runtime.
+> **_NOTE:_** This example uses keycloak authentication to enable security only in the _Kogito Task Console_ not for the Kogito Runtime.
### Using the Kogito Runtime Consoles to interact with the Hiring Process
@@ -370,10 +371,8 @@ In this guide we'll see how to use the _Kogito Management Console_ to view the s
Which indicates that a new process instance with id **064a6372-b5bb-4eff-a059-d7b24d4ac64a** has been started.
2. Now let's check the process instance state with the _Kogito Management Console_. To do so, in your browser navigate
- to http://localhost:8280 and log in using any of the users specified in the [Using Keycloak as Authentication Server](#using-keycloak-as-authentication-server).
-
- Once you are logged in, you should be redirected to the **Process Instances** page where you should be able to see
- the started process instance in active state.
+ to http://localhost:8280 and you'll be redirected to the **Process Instances** page in the _Kogito Management Console_.
+ There where you should be able to see the started process instance in active state.
@@ -382,7 +381,8 @@ In this guide we'll see how to use the _Kogito Management Console_ to view the s
-3. Click on the instance **id** to navigate into the _Process Details_ page. In there you'll be able to see different panels displaying relevant information about the instance state, such as the _Diagram_, _Timeline_, _Details_, _Variables_, _Jobs_...
+3. Click on the instance **id** to navigate into the _Process Details_ page. In there you'll be able to see different panels
+ displaying relevant information about the instance state, such as the _Diagram_, _Timeline_, _Details_, _Variables_, _Jobs_...
diff --git a/examples/jbpm-compact-architecture-example/docker-compose/README.md b/examples/jbpm-compact-architecture-example/docker-compose/README.md
index 26834f79196..efc66a2e671 100644
--- a/examples/jbpm-compact-architecture-example/docker-compose/README.md
+++ b/examples/jbpm-compact-architecture-example/docker-compose/README.md
@@ -4,7 +4,7 @@ To allow a quick setup of all services required to run this demo, we provide a d
- Postgresql
- PgAdmin
-- Kogito Example Service (Only available if the example has been compiled using the `container` mvn profile eg: `mvn cleanp package -Dcontainer`)
+- 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
@@ -12,8 +12,8 @@ To allow a quick setup of all services required to run this demo, we provide a d
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 cleanp 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 cleanp package -Dcontainer`.
+- **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`.
> 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/).
diff --git a/examples/jbpm-compact-architecture-example/pom.xml b/examples/jbpm-compact-architecture-example/pom.xml
index 56b4cef9276..10fb11ac96b 100644
--- a/examples/jbpm-compact-architecture-example/pom.xml
+++ b/examples/jbpm-compact-architecture-example/pom.xml
@@ -99,12 +99,6 @@
kogito-addons-quarkus-data-index-postgresql
-
-
- org.kie
- kogito-addons-quarkus-data-index-persistence-postgresql
-
-
org.kie
diff --git a/examples/ping-pong-view-react/package.json b/examples/ping-pong-view-react/package.json
index 9c947ed618b..788b9573efd 100644
--- a/examples/ping-pong-view-react/package.json
+++ b/examples/ping-pong-view-react/package.json
@@ -25,9 +25,7 @@
"dependencies": {
"@kie-tools-core/envelope": "workspace:*",
"@kie-tools-core/envelope-bus": "workspace:*",
- "@kie-tools-examples/ping-pong-view": "workspace:*",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@kie-tools-examples/ping-pong-view": "workspace:*"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
@@ -37,5 +35,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/examples/ping-pong-view/package.json b/examples/ping-pong-view/package.json
index 6135eff2325..4c200874954 100644
--- a/examples/ping-pong-view/package.json
+++ b/examples/ping-pong-view/package.json
@@ -21,9 +21,7 @@
},
"dependencies": {
"@kie-tools-core/envelope": "workspace:*",
- "@kie-tools-core/envelope-bus": "workspace:*",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@kie-tools-core/envelope-bus": "workspace:*"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
@@ -32,5 +30,9 @@
"@types/react-dom": "^17.0.5",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/examples/todo-list-view/package.json b/examples/todo-list-view/package.json
index e9e79bfb8f7..40f71db6d94 100644
--- a/examples/todo-list-view/package.json
+++ b/examples/todo-list-view/package.json
@@ -22,9 +22,7 @@
},
"dependencies": {
"@kie-tools-core/envelope": "workspace:*",
- "@kie-tools-core/envelope-bus": "workspace:*",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@kie-tools-core/envelope-bus": "workspace:*"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
@@ -35,5 +33,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/examples/uniforms-patternfly/package.json b/examples/uniforms-patternfly/package.json
index 77f4acef161..afc29cf9288 100644
--- a/examples/uniforms-patternfly/package.json
+++ b/examples/uniforms-patternfly/package.json
@@ -14,7 +14,9 @@
"@kie-tools/uniforms-patternfly": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
- "ajv": "^6.12.6",
+ "ajv": "^8.17.1",
+ "ajv-draft-04": "^1.0.0",
+ "ajv-formats": "^3.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"simpl-schema": "^1.12.0",
diff --git a/examples/uniforms-patternfly/src/schemas/json-schema.ts b/examples/uniforms-patternfly/src/schemas/json-schema.ts
index d2e99e55434..ca8a30c0506 100644
--- a/examples/uniforms-patternfly/src/schemas/json-schema.ts
+++ b/examples/uniforms-patternfly/src/schemas/json-schema.ts
@@ -17,10 +17,12 @@
* under the License.
*/
-import * as Ajv from "ajv";
+import AjvDraft04 from "ajv-draft-04";
+import addFormats from "ajv-formats";
import { JSONSchemaBridge } from "uniforms-bridge-json-schema";
-const ajv = new Ajv({ allErrors: true, useDefaults: true });
+const ajv = new AjvDraft04({ strict: false, allErrors: true, useDefaults: true });
+addFormats(ajv);
function createValidator(schema: any) {
const validator = ajv.compile(schema);
@@ -56,7 +58,7 @@ const schema = {
type: "string",
format: "date-time",
max: "2000-04-04T10:30:00.000Z",
- description: "this is date and time field",
+ description: "this is the date and time field",
},
},
disabled: false,
diff --git a/packages/boxed-expression-component/package.json b/packages/boxed-expression-component/package.json
index 26f04d18e36..a39d3184569 100644
--- a/packages/boxed-expression-component/package.json
+++ b/packages/boxed-expression-component/package.json
@@ -36,8 +36,6 @@
"@patternfly/react-styles": "^4.92.6",
"@patternfly/react-table": "^4.112.39",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-resizable": "^1.11.0",
"react-table": "^7.6.2",
"uuid": "^8.3.2"
@@ -84,5 +82,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/chrome-extension/package.json b/packages/chrome-extension/package.json
index b2953fc9cf1..c631c9c196d 100644
--- a/packages/chrome-extension/package.json
+++ b/packages/chrome-extension/package.json
@@ -31,9 +31,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/workspace": "workspace:*",
"@octokit/rest": "^18.5.3",
- "minimatch": "^3.0.5",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "minimatch": "^3.0.5"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -58,5 +56,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/chrome-extension/src/app/components/common/ChromeResourceContentService.ts b/packages/chrome-extension/src/app/components/common/ChromeResourceContentService.ts
index 064dd27e7fb..1343dd85a2a 100644
--- a/packages/chrome-extension/src/app/components/common/ChromeResourceContentService.ts
+++ b/packages/chrome-extension/src/app/components/common/ChromeResourceContentService.ts
@@ -44,7 +44,7 @@ class ChromeResourceContentService implements ResourceContentService {
normalizedPosixPathRelativeToTheWorkspaceRoot: string,
opts?: ResourceContentOptions
): Promise {
- opts = opts ?? { type: ContentType.TEXT };
+ opts = opts ?? { type: "text" };
return fetchFile(
this.octokit,
this.repoInfo.owner,
diff --git a/packages/chrome-extension/src/app/github/api.ts b/packages/chrome-extension/src/app/github/api.ts
index 0e86f6ed414..c33a673f0e3 100644
--- a/packages/chrome-extension/src/app/github/api.ts
+++ b/packages/chrome-extension/src/app/github/api.ts
@@ -35,7 +35,7 @@ export function fetchFile(
ref: ref,
path: path,
})
- .then((res) => (contentType === ContentType.BINARY ? (res.data as any).content : atob((res.data as any).content)))
+ .then((res) => (contentType === "binary" ? (res.data as any).content : atob((res.data as any).content)))
.catch((e) => {
console.debug(`Error fetching ${path} with Octokit. Fallback is 'raw.githubusercontent.com'.`);
return fetch(`https://raw.githubusercontent.com/${org}/${repo}/${ref}/${path}`).then((res) =>
diff --git a/packages/cors-proxy/package.json b/packages/cors-proxy/package.json
index 3480719d4ee..dc96bbfef5d 100644
--- a/packages/cors-proxy/package.json
+++ b/packages/cors-proxy/package.json
@@ -27,7 +27,7 @@
},
"dependencies": {
"cors": "^2.8.5",
- "express": "^4.19.2",
+ "express": "^4.21.0",
"node-fetch": "^3.3.1"
},
"devDependencies": {
diff --git a/packages/dashbuilder-component-api/package.json b/packages/dashbuilder-component-api/package.json
index f974a2717ad..01edc4a68a5 100644
--- a/packages/dashbuilder-component-api/package.json
+++ b/packages/dashbuilder-component-api/package.json
@@ -25,10 +25,6 @@
"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": {
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
- },
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
@@ -48,5 +44,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-echarts-base/package.json b/packages/dashbuilder-component-echarts-base/package.json
index 85132571624..3fab5f39886 100644
--- a/packages/dashbuilder-component-echarts-base/package.json
+++ b/packages/dashbuilder-component-echarts-base/package.json
@@ -25,9 +25,7 @@
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\""
},
"dependencies": {
- "echarts": "^5.3.2",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "echarts": "^5.3.2"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -41,5 +39,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-echarts/package.json b/packages/dashbuilder-component-echarts/package.json
index 231ec59ecdc..1c34d0e269d 100644
--- a/packages/dashbuilder-component-echarts/package.json
+++ b/packages/dashbuilder-component-echarts/package.json
@@ -22,9 +22,7 @@
},
"dependencies": {
"@kie-tools/dashbuilder-component-api": "workspace:*",
- "@kie-tools/dashbuilder-component-echarts-base": "workspace:*",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@kie-tools/dashbuilder-component-echarts-base": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -46,5 +44,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-map/package.json b/packages/dashbuilder-component-map/package.json
index 100995e97e7..76cd172180d 100644
--- a/packages/dashbuilder-component-map/package.json
+++ b/packages/dashbuilder-component-map/package.json
@@ -24,8 +24,6 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools/dashbuilder-component-api": "workspace:*",
"d3-scale": "^4.0.2",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-simple-maps": "^3.0.0"
},
"devDependencies": {
@@ -50,5 +48,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-svg-heatmap/package.json b/packages/dashbuilder-component-svg-heatmap/package.json
index 41de45902e6..ef85747d77d 100644
--- a/packages/dashbuilder-component-svg-heatmap/package.json
+++ b/packages/dashbuilder-component-svg-heatmap/package.json
@@ -23,9 +23,7 @@
"dependencies": {
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools/dashbuilder-component-api": "workspace:*",
- "heatmap.js": "^2.0.5",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "heatmap.js": "^2.0.5"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -47,5 +45,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-table/package.json b/packages/dashbuilder-component-table/package.json
index cd513ce158d..d85cf0846ea 100644
--- a/packages/dashbuilder-component-table/package.json
+++ b/packages/dashbuilder-component-table/package.json
@@ -25,9 +25,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools/dashbuilder-component-api": "workspace:*",
"@patternfly/react-core": "^4.276.6",
- "@patternfly/react-table": "^4.112.39",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@patternfly/react-table": "^4.112.39"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -49,5 +47,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-timeseries/package.json b/packages/dashbuilder-component-timeseries/package.json
index 4331be319e0..fe483e5ea1e 100644
--- a/packages/dashbuilder-component-timeseries/package.json
+++ b/packages/dashbuilder-component-timeseries/package.json
@@ -22,9 +22,7 @@
},
"dependencies": {
"@kie-tools/dashbuilder-component-api": "workspace:*",
- "@kie-tools/dashbuilder-component-echarts-base": "workspace:*",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@kie-tools/dashbuilder-component-echarts-base": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -46,5 +44,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-uniforms/package.json b/packages/dashbuilder-component-uniforms/package.json
index 8049b275804..14ebad675aa 100644
--- a/packages/dashbuilder-component-uniforms/package.json
+++ b/packages/dashbuilder-component-uniforms/package.json
@@ -26,10 +26,10 @@
"@kie-tools/uniforms-patternfly": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-table": "^4.112.39",
- "ajv": "^6.12.6",
+ "ajv": "^8.17.1",
+ "ajv-draft-04": "^1.0.0",
+ "ajv-formats": "^3.0.1",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"uniforms": "^3.10.2",
"uniforms-bridge-json-schema": "^3.10.2"
},
@@ -52,5 +52,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-component-uniforms/src/Uniforms.tsx b/packages/dashbuilder-component-uniforms/src/Uniforms.tsx
index 311ccfb730f..ad9a2979985 100644
--- a/packages/dashbuilder-component-uniforms/src/Uniforms.tsx
+++ b/packages/dashbuilder-component-uniforms/src/Uniforms.tsx
@@ -16,13 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { JSONSchemaBridge } from "uniforms-bridge-json-schema";
-import { AutoForm } from "@kie-tools/uniforms-patternfly/dist/esm";
-import * as Ajv from "ajv";
import * as React from "react";
import { useCallback } from "react";
+import { AutoForm } from "@kie-tools/uniforms-patternfly/dist/esm";
+import AjvDraft04 from "ajv-draft-04";
+import addFormats from "ajv-formats";
+import { JSONSchemaBridge } from "uniforms-bridge-json-schema";
+
+const ajv = new AjvDraft04({ strict: false, allErrors: true, useDefaults: true });
+addFormats(ajv);
-const ajv = new Ajv({ allErrors: true, useDefaults: true });
const createValidator = (schema: any) => {
const validator = ajv.compile(schema);
return (model: any) => {
diff --git a/packages/dashbuilder-component-victory-charts/package.json b/packages/dashbuilder-component-victory-charts/package.json
index 536b206dd9c..aa6ed8d79be 100644
--- a/packages/dashbuilder-component-victory-charts/package.json
+++ b/packages/dashbuilder-component-victory-charts/package.json
@@ -28,8 +28,6 @@
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-table": "^4.112.39",
"numeral": "^2.0.6",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"victory-zoom-container": "^35.11.4"
},
"devDependencies": {
@@ -53,5 +51,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-editor/package.json b/packages/dashbuilder-editor/package.json
index 3edcc78d059..fbc13072d76 100644
--- a/packages/dashbuilder-editor/package.json
+++ b/packages/dashbuilder-editor/package.json
@@ -42,8 +42,6 @@
"json-schema": "^0.4.0",
"monaco-editor": "^0.39.0",
"monaco-yaml": "^4.0.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"vscode-languageserver-types": "^3.16.0"
},
"devDependencies": {
@@ -69,5 +67,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder-viewer/package.json b/packages/dashbuilder-viewer/package.json
index e87583a0f35..3e75900133a 100644
--- a/packages/dashbuilder-viewer/package.json
+++ b/packages/dashbuilder-viewer/package.json
@@ -33,9 +33,7 @@
"@kie-tools-core/patternfly-base": "workspace:*",
"@kie-tools-core/workspace": "workspace:*",
"@patternfly/react-core": "^4.276.6",
- "@patternfly/react-icons": "^4.93.6",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@patternfly/react-icons": "^4.93.6"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -59,5 +57,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dashbuilder/LICENSE-Apache-2.0.txt b/packages/dashbuilder/LICENSE-Apache-2.0.txt
deleted file mode 100644
index 7a4a3ea2424..00000000000
--- a/packages/dashbuilder/LICENSE-Apache-2.0.txt
+++ /dev/null
@@ -1,202 +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.
\ No newline at end of file
diff --git a/packages/dashbuilder/appformer/pom.xml b/packages/dashbuilder/appformer/pom.xml
index 7de302a7524..aeda6ca062f 100644
--- a/packages/dashbuilder/appformer/pom.xml
+++ b/packages/dashbuilder/appformer/pom.xml
@@ -91,7 +91,7 @@
https://repository.jboss.org/nexus/content/repositories/snapshots/
- 4.3.5.Final
+ 4.6.2.Final
1.3.12
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/debug/Debug.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/debug/Debug.java
index 4b36717044f..0e5df803083 100644
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/debug/Debug.java
+++ b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/debug/Debug.java
@@ -87,8 +87,7 @@ public static String objectId(Object o) {
* the first letter of each component of the package name
* a dot
* the class name. If the class is an inner class, the name is of the form Outer$Inner
- *
- *
+ *
* For classes in the default package, items 1 and 2 are omitted.
* @param c the class whose name to abbreviate. Can be null, but will result in a null return value.
* @return the abbreviated FQCN as described, or null if the input is null.
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java
index da33758f8ed..62335a09f86 100644
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java
+++ b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java
@@ -65,7 +65,7 @@ PlaceRequest addParameter(final String name,
void setUpdateLocationBar(boolean updateLocationBar);
/**
- * Invokes {@link #toString()} but exported to JavaScript so it can be invoked from different scripts.
+ * Invokes toString() but exported to JavaScript so it can be invoked from different scripts.
*/
default String asString() {
return this.toString();
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/CustomPanelDefinition.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/CustomPanelDefinition.java
index 863ea0e391e..20e8d7aa91b 100644
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/CustomPanelDefinition.java
+++ b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/CustomPanelDefinition.java
@@ -25,12 +25,11 @@
import jsinterop.annotations.JsIgnore;
import jsinterop.annotations.JsType;
import org.jboss.errai.common.client.dom.HTMLElement;
-import org.uberfire.mvp.PlaceRequest;
/**
* A custom {@link PanelDefinition} that is associated with a HasWidgets
- * or HTMLElement container. See {@link PlaceManager#goTo(PlaceRequest, HasWidgets)}
- * and {@link PlaceManager#goTo(PlaceRequest, HTMLElement)}
+ * or HTMLElement container. See PlaceManager#goTo(PlaceRequest, HasWidgets)
+ * and PlaceManager#goTo(PlaceRequest, HTMLElement)
*/
@JsType
public interface CustomPanelDefinition extends PanelDefinition {
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java
index b79959bb53d..07bf8d77396 100644
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java
+++ b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PanelDefinition.java
@@ -61,7 +61,6 @@ public interface PanelDefinition {
* Specifies content that should be put in this panel's main display area when it is materialized. The content to
* add is specified by a PartDefinition, at the core of which is a {@link PlaceRequest} that identifies a
* WorkbenchActivity (either a screen or an editor).
- *
* If the given part already belongs to an existing panel, it will be removed from that panel by a call to
* removePart(part).
* @param part The Part to add. Must not be null. The part's place must specify a WorkbenchActivity bean.
@@ -70,9 +69,8 @@ public interface PanelDefinition {
/**
* Specifies content that should be put in this panel's main display area when it is materialized.
- *
* This is a convenience method equivalent to
- * addPart(new PartDefinitionImpl(DefaultPlaceRequest.parse(partSpec))) .
+ * addPart(new PartDefinitionImpl(DefaultPlaceRequest.parse(partSpec)))
.
* @param partSpec An PlaceRequest ID with optional parameters, encoded as specified in
* {@link DefaultPlaceRequest#parse(CharSequence)}. Must not be null. The place ID must specify a
* WorkbenchActivity bean (either a screen or an editor).
@@ -183,7 +181,7 @@ public void appendChild(
/**
* Set the height of this panel in pixels using a primitive int to make this method exportable to JS.
- * @param width The width to set.
+ * @param height The height to set.
*/
default void setHeight(int height) {
setHeight(Integer.valueOf(height));
@@ -315,7 +313,7 @@ default int getMinWidthAsInt() {
void setContextDisplayMode(final ContextDisplayMode contextDisplayMode);
/**
- * Invokes {@link #toString()} but exported to JavaScript so it can be invoked from different scripts.
+ * Invokes toString() but exported to JavaScript so it can be invoked from different scripts.
*/
default String asString() {
return this.toString();
diff --git a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java
index 6231e7d8ebf..edce9ca9cc2 100644
--- a/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java
+++ b/packages/dashbuilder/appformer/uberfire-api/src/main/java/org/uberfire/workbench/model/PartDefinition.java
@@ -49,7 +49,7 @@ public interface PartDefinition {
void setContextDisplayMode(final ContextDisplayMode contextDisplayMode);
/**
- * Invokes {@link #toString()} but exported to JavaScript so it can be invoked from different scripts.
+ * Invokes toString() but exported to JavaScript so it can be invoked from different scripts.
*/
default String asString() {
return this.toString();
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java
index 549715e94c4..06b424f0a10 100644
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java
+++ b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPanel.java
@@ -27,7 +27,7 @@
/**
* Specifies an UberFire workbench panel within a templated perspective.
*
- *
Prerequisites
+ * Prerequisites
* This annotation can only be used within a class annotated with {@link WorkbenchPerspective}, and it must target a
* field that implements the GWT HasWidgets interface. Further, the class this annotation is used in must not have a
* method annotated with {@link Perspective}. See {@link WorkbenchPerspective} for details.
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java
index f5a4efe7229..3b1560f53e0 100644
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java
+++ b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPerspective.java
@@ -35,16 +35,16 @@
* programmatically build a {@link PerspectiveDefinition} object, or declare panel structure and content using Errai UI
* templates. Note that you cannot mix the two approaches.
*
- *
Programmatic Perspective Definition
+ * Programmatic Perspective Definition
* To define the perspective layout programmatically, create a zero-argument method annotated with {@code @Perspective}
* that returns a {@link PerspectiveDefinition}.
*
- *
Templated Perspective Definition
+ * Templated Perspective Definition
* To declare perspective layout using templates, make the class an Errai UI templated component, and then add the
* {@link WorkbenchPanel} annotation to one or more of its {@code @DataField} widgets. This designates them as panel
* containers and allows you to specify which parts should be added to them when the perspective launches.
*
- *
Perspective Lifecycle
+ * Perspective Lifecycle
* WorkbenchPerspectives receive the standard set of lifecycle calls for a Workbench component:
*
* {@code @OnStartup}
diff --git a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java
index 3d755fdde0a..fec272c66f4 100644
--- a/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java
+++ b/packages/dashbuilder/appformer/uberfire-client-api/src/main/java/org/uberfire/client/annotations/WorkbenchPopup.java
@@ -42,11 +42,10 @@
* In this latter case the {@code @WorkbenchPopup} need not extend
* {@code com.google.gwt.user.client.ui.PopupPanel}.
*
- *
* WorkbechPopups can receive the following life-cycle calls:
*
* {@code @OnOpen}
- *
+ *
*/
@Inherited
@Retention(RetentionPolicy.RUNTIME)
diff --git a/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/popups/BaseModal.java b/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/popups/BaseModal.java
index 5511ddce8ee..53e938cf8b8 100644
--- a/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/popups/BaseModal.java
+++ b/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/common/popups/BaseModal.java
@@ -44,7 +44,7 @@
/**
* Base class for modal popup implementations. Setting the following properties by default:
*
- * setBackdrop( {@link BackdropType#STATIC} );
+ * setBackdrop( BackdropType#STATIC );
* setKeyboard( true );
* setAnimation( true );
* setDynamicSafe( true );
diff --git a/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/tables/TitledTextCell.java b/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/tables/TitledTextCell.java
index f5531c6ebba..43e0ca74d4e 100644
--- a/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/tables/TitledTextCell.java
+++ b/packages/dashbuilder/appformer/uberfire-extensions/uberfire-widgets/uberfire-widgets-commons/src/main/java/org/uberfire/ext/widgets/common/client/tables/TitledTextCell.java
@@ -47,7 +47,7 @@ public TitledTextCell() {
/**
* Constructs a TextCell that uses the provided {@link SafeHtmlRenderer} to
* render its text.
- * @param renderer a {@link SafeHtmlRenderer SafeHtmlRenderer} instance
+ * @param renderer a {@link SafeHtmlRenderer} instance
*/
public TitledTextCell(final SafeHtmlRenderer renderer) {
super(renderer);
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/main/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdowns.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/main/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdowns.java
index 821249d09eb..331bcb196cb 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/main/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdowns.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client-views-patternfly/src/main/java/org/uberfire/client/views/pfly/tab/TabPanelWithDropdowns.java
@@ -273,7 +273,7 @@ void resizeTabContent() {
* Adds a new tab to this panel that doesn't have any contents itself, but can contain multiple items that appear in
* a dropdown menu when the tab is clicked. This dropdown menu is initially empty. Items can be added and removed
* using the {@link DropDownTab#addItem(String, Widget)} and
- * {@link DropDownTab#removeItem(String, Widget)} methods.
+ * DropDownTab#removeItem(String, Widget) methods.
* @param label The text that should appear on the dropdown tab.
* @return the container for the items that appear when the tab is clicked.
*/
@@ -298,7 +298,7 @@ public DropDownTab addDropdownTab(String label) {
/**
* Adds a pre-made dropdown tab to this tab panel. This can be used for re-attaching a dropdown tab that was
* previously added with {@link #addDropdownTab(String)} and then removed.
- * @param tab the tab to add back
+ * @param contents contents
*/
public void addDropdownTab(DropDownTab contents) {
AnchorListItem tab = contents.owningTab;
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/AbstractActivity.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/AbstractActivity.java
index fb566779715..52beae30722 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/AbstractActivity.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/AbstractActivity.java
@@ -41,7 +41,7 @@ public abstract class AbstractActivity implements Activity {
}
/**
- * Tracks start/shutdown lifecycle. Subclasses should always call super.onStartup() in methods that
+ * Tracks start/shutdown lifecycle. Subclasses should always call super.onStartup()
in methods that
* override this one.
*/
@Override
@@ -51,7 +51,7 @@ public void onStartup(PlaceRequest place) {
}
/**
- * Tracks open/closed lifecycle. Subclasses should always call super.onOpen() in methods that override this
+ * Tracks open/closed lifecycle. Subclasses should always call super.onOpen()
in methods that override this
* one.
*/
@Override
@@ -67,7 +67,7 @@ public void onOpen() {
}
/**
- * Tracks open/closed lifecycle. Subclasses should always call super.onClose() in methods that override
+ * Tracks open/closed lifecycle. Subclasses should always call super.onClose()
in methods that override
* this one.
*/
@Override
@@ -83,7 +83,7 @@ public void onClose() {
}
/**
- * Tracks start/shutdown lifecycle. Subclasses should always call super.onShutdown() in methods that
+ * Tracks start/shutdown lifecycle. Subclasses should always call super.onShutdown()
in methods that
* override this one.
*/
@Override
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/Activity.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/Activity.java
index 4e202dcaa56..237b7a3d584 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/Activity.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/Activity.java
@@ -31,15 +31,15 @@
* see the subinterfaces for specific activity types that do get implemented.
*
* Also, implementations of this interface and its subinterfaces are typically not written by hand; instead, they are
- * generated from classes annotated with {@link WorkbenchScreen}, {@link WorkbenchEditor}, {@link WorkbenchPopup}, and
+ * generated from classes annotated with {@link WorkbenchScreen}, {@link WorkbenchPopup}, and
* others by an UberFire annotation processor.
- *
+ *
* Developers of UberFire applications will not typically come into direct contact with things that implement Activity
* or its subinterfaces; instead, they will work with a {@link PlaceManager} to manipulate activities at arm's length.
*
* If you do need to get your hands on a particular {@code Activity} instance, do so using an {@link ActivityManager}.
- *
- *
Activity Lifecycle
+ *
+ * Activity Lifecycle
* Activities have the following lifecycle, which is normally driven by an {@link ActivityManager}:
*
* The activity starts off in the uninitialized state.
@@ -56,7 +56,7 @@
*
* An activity will never receive a call to {@link #onStartup(PlaceRequest)} when it is started or open, but it may be
* restarted (perhaps with a different PlaceRequest) after a call to {@link #onShutdown()}.
- *
+ *
* An activity will never receive a call to {@link #onOpen()} when it is uninitialized or open, but it may be reopened after a call
* to {@link #onClose()}.
* @see PlaceManager
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/ActivityManager.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/ActivityManager.java
index c3990b2528a..df5cbd6a58d 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/ActivityManager.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/ActivityManager.java
@@ -53,7 +53,7 @@ public interface ActivityManager {
* certain path, the returned set can contain any number of activities.
* @param placeRequest the PlaceRequest to resolve activities for. Although null is permitted for convenience, it always
* resolves to the empty set.
- * @param secure flag indicating if calls to the {@link AuthorizationManager} service are required in order to
+ * @param secure flag indicating if calls to the AuthorizationManager service are required in order to
* determine which activities are available.
* @return an unmodifiable set of activities that can handle the given PlaceRequest. Never null, but can be empty.
* To prevent memory leaks, pass Activity in the returned set to {@link #destroyActivity(Activity)} when you
@@ -81,7 +81,7 @@ Set getActivities(final PlaceRequest placeRequest,
/**
* Finds an activity that can handle the given PlaceRequest, creating and starting a new one if necessary.
* @param placeRequest the place the resolved activity should handle
- * @param secure flag indicating if calls to the {@link AuthorizationManager} service are required in order to
+ * @param secure flag indicating if calls to the AuthorizationManager service are required in order to
* determine if the resulting activity is available.
* @return an activity that can handle the request, or null if no known activity can handle it. If the return value
* is non-null, it will be an activity in the started or open state.
@@ -102,7 +102,7 @@ T getActivity(final Class clazz,
* to use {@link #getActivities(PlaceRequest, boolean)} and cast its return value explicitly.
* @param clazz the type of activity that you expect to find.
* @param placeRequest the place the resolved activity should handle
- * @param secure flag indicating if calls to the {@link AuthorizationManager} service are required in order to
+ * @param secure flag indicating if calls to the AuthorizationManager service are required in order to
* determine if the resulting activity is available.
* @return an activity that can handle the request, or null if no known activity can handle it. If the return value
* is non-null, it will be an activity in the started or open state.
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PerspectiveManager.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PerspectiveManager.java
index 18bc5f4139a..9e5f0ccb371 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PerspectiveManager.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PerspectiveManager.java
@@ -36,7 +36,6 @@
* perspective, and switching between perspectives. This includes a sequence of asynchronous operations such as fetching
* any stored definition the current user has for the new perspective, and saving the definition when the user has
* modified it (for example, by dragging and dropping components, launching new activities, and so on).
- *
* Structurally, the PerspectiveManager performs actions at the request of the {@link PlaceManager}, and it accomplishes
* these actions by delegating to the {@link PanelManager} and {@link WorkbenchServicesProxy}.
*/
@@ -67,7 +66,6 @@ public interface PerspectiveManager {
/**
* This method should only be invoked by PlaceManager. To launch a perspective within an UberFire app, pass a
* PlaceRequest for that perspective to {@link PlaceManager#goTo(org.uberfire.mvp.PlaceRequest)}.
- *
* Closes all current panels in the PanelManager (they must have already had their parts removed), then builds up
* the new panel arrangement based on the {@link PerspectiveDefinition} associated with the given perspective
* activity. If the given perspective is transient, its default perspective definition will always be used.
@@ -76,7 +74,6 @@ public interface PerspectiveManager {
* @param placeRequest the placeRequest that originated the perspective to switch to. Must not be null.
* @param perspective the perspective to switch to. Must not be null.
* @param doWhenFinished The command to execute once the new perspective's panels have been created. Must not be null.
- *
* When the callback is invoked, the panels will be set up in their correct positions, but no parts will
* have been added.
*/
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManager.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManager.java
index 5f27a666a89..b048983d9b6 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManager.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManager.java
@@ -37,8 +37,8 @@
/**
* A Workbench-centric abstraction over the browser's history mechanism. Allows the application to initiate navigation
* to any displayable thing: a {@link WorkbenchPerspective}, a {@link WorkbenchScreen}, a {@link WorkbenchPopup}, a
- * a {@link WorkbenchPart} within a screen or editor, or the editor associated with a VFS file
- * located at a particular {@link Path}.
+ * a WorkbenchPart within a screen or editor, or the editor associated with a VFS file
+ * located at a particular Path.
*/
@JsType
public interface PlaceManager {
@@ -61,7 +61,7 @@ void goTo(final PlaceRequest place,
/**
* Finds the currently open activity that handles the given PlaceRequest by ID. No attempt is made to match
- * by path, but see {@link ActivityManagerImpl#resolveExistingParts(PlaceRequest)} for a variant that does.
+ * by path, but see ActivityManagerImpl#resolveExistingParts(PlaceRequest) for a variant that does.
*
* @param place the PlaceRequest whose activity to search for
* @return the activity that currently exists in service of the given PlaceRequest's ID. Null if no current activity
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManagerImpl.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManagerImpl.java
index d36815d81b3..57121979850 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManagerImpl.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/mvp/PlaceManagerImpl.java
@@ -283,7 +283,7 @@ private boolean closePlaces(final Collection placeRequests) {
/**
* Resolves the given place request into an Activity instance, if one can be found. If not, this method substitutes
* special "not found" or "too many" place requests when the resolution doesn't work.
- *
+ *
* The behaviour of this method is affected by the boolean-valued
* {@code org.uberfire.client.mvp.PlaceManagerImpl.ignoreUnkownPlaces} property in {@link UberfirePreferences}.
* @param place A non-null place request that could have originated from within application code, from within the
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/AlternativeLayout.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/AlternativeLayout.java
index cc524aa6683..f2171bb6ee4 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/AlternativeLayout.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/AlternativeLayout.java
@@ -32,7 +32,7 @@
/**
* Part of the worbench layout SPI. Used to declare {@link org.uberfire.client.workbench.WorkbenchLayout}
- * implementations, that should be used as an alternative to the default {@link org.uberfire.client.workbench.WorkbenchLayoutImpl}.
+ * implementations, that should be used as an alternative to the default {@link org.uberfire.client.workbench.WorkbenchLayoutImpl}.
* The actual discovery mechenism resides with {@link org.uberfire.client.workbench.LayoutSelection}
*/
@Qualifier
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/BeanFactory.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/BeanFactory.java
index 96bebd1678b..d45a5b449d4 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/BeanFactory.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/BeanFactory.java
@@ -35,11 +35,9 @@ public interface BeanFactory {
/**
* Creates a new part presenter/view pair with the given properties.
- * @param menus The menus to associate with the new part. Null means no menus.
* @param title The title to associate with the new part that the containing panel may display
* @param titleDecoration The title decoration that a panel may choose to display beside the part's title. Null is permitted,
* and means no title decoration.
- *
* NOTE: presently, none of the built-in panel types display a part's title decoration.
* @param definition Defines all other aspects of the part to create. Must not be null.
* @param partType The new part type.
@@ -72,10 +70,10 @@ public WorkbenchPanelPresenter newRootPanel(PerspectiveActivity activity,
public CompassDropController newDropController(final WorkbenchPanelView> view);
/**
- * Destroys the entire graph of beans that were created and returned via a call to any of the newXXX()
+ * Destroys the entire graph of beans that were created and returned via a call to any of the newXXX()
* methods in this class. For example, passing a {@link WorkbenchPartPresenter} instance in will result in the
* destruction of that presenter, its view, and all other dependent beans injected into that graph of objects.
- * @param o a bean which was returned from one of the newXXX() methods in this class and which has not
+ * @param o a bean which was returned from one of the newXXX()
methods in this class and which has not
* been destroyed yet.
*/
public void destroy(final Object o);
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/PanelManager.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/PanelManager.java
index e8d3fc74953..5f47b4084ab 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/PanelManager.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/PanelManager.java
@@ -58,7 +58,6 @@ public interface PanelManager {
* @param part The description of the part to add. Not null.
* @param panel definition of the panel to add the part to (must describe a panel that is already present in the
* layout). Not null.
- * @param menus The menus to display for the given part. Null means no menus.
* @param uiPart The part's title and physical view. Not null.
* @param contextId part of a removed framework feature (TODO: remove this?)
* @param minInitialWidth minimum pixel width of the part's activity, or null if there is no known minimum width. The target
@@ -108,7 +107,7 @@ PanelDefinition addWorkbenchPanel(final PanelDefinition targetPanel,
/**
* Creates an UberFire panel and installs its view in the given widget container.
*
- *
Custom Panel Lifecycle
+ * Custom Panel Lifecycle
*
* Custom panels can be disposed like any other panel: by calling {@link #removeWorkbenchPanel(PanelDefinition)}.
* Additionally, custom panels are monitored for DOM detachment. When a custom panel's view is removed from the DOM
@@ -124,7 +123,7 @@ CustomPanelDefinition addCustomPanel(HasWidgets container,
/**
* Creates an UberFire panel and installs its view in the given html element container.
*
- *
Custom Panel Lifecycle
+ * Custom Panel Lifecycle
*
* Custom panels can be disposed like any other panel: by calling {@link #removeWorkbenchPanel(PanelDefinition)}.
* Additionally, custom panels are monitored for DOM detachment. When a custom panel's view is removed from the DOM
@@ -140,7 +139,7 @@ CustomPanelDefinition addCustomPanel(HTMLElement container,
/**
* Creates an UberFire panel and installs its view in the given html element container.
*
- *
Custom Panel Lifecycle
+ * Custom Panel Lifecycle
*
* Custom panels can be disposed like any other panel: by calling {@link #removeWorkbenchPanel(PanelDefinition)}.
* Additionally, custom panels are monitored for DOM detachment. When a custom panel's view is removed from the DOM
@@ -184,7 +183,7 @@ CustomPanelDefinition addCustomPanel(elemental2.dom.HTMLElement container,
void onPanelFocus(final PanelDefinition panel);
/**
- * Closes the given part. This is a convenience method for placeManager.closePlace(part.getPlace()) .
+ * Closes the given part. This is a convenience method for placeManager.closePlace(part.getPlace())
.
* @param part the part to close (remove from the GUI). Must not be null.
*/
void closePart(final PartDefinition part);
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/WorkbenchLayout.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/WorkbenchLayout.java
index 11abe20fe2c..a72c9776060 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/WorkbenchLayout.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/WorkbenchLayout.java
@@ -49,7 +49,6 @@ public interface WorkbenchLayout {
/**
* Will be invoked by the {@link org.uberfire.client.workbench.Workbench}
* when the discovery of header and footer elements is completed.
- * @see {@link #setFooterContents(java.util.List)}
*/
public void onBootstrap();
@@ -71,7 +70,6 @@ void resizeTo(int width,
/**
* Makes the given widget fill the entire space normally dedicated to the perspective container. Has no effect if
* the given widget is already maximized.
- *
* Important: this feature is used by panels to maximize themselves. You should not pass a WorkbenchPanelView
* to this method yourself; instead, you should use the panel's own API to maximize it. You are free to use this method
* to maximize your own widgets that are not workbench panels.
@@ -82,7 +80,6 @@ void resizeTo(int width,
/**
* Makes the given widget fill the entire space normally dedicated to the perspective container. Has no effect if
* the given widget is already maximized.
- *
* Important: this feature is used by panels to maximize themselves. You should not pass a WorkbenchPanelView
* to this method yourself; instead, you should use the panel's own API to maximize it. You are free to use this method
* to maximize your own widgets that are not workbench panels.
@@ -95,7 +92,6 @@ void maximize(Widget w,
/**
* Restores a previously maximized widget to its original size and position. Has no effect if the given widget is
* not currently in a maximized state set up by {@link #maximize(Widget)}.
- *
* Important: this feature is used by panels to unmaximize themselves. You should not pass a WorkbenchPanelView
* to this method yourself; instead, you should use the panel's own API to unmaximize it. You are free to use this method
* to unmaximize your own widgets that have previously been passed to {@link #maximize(Widget)}.
@@ -106,7 +102,6 @@ void maximize(Widget w,
/**
* Restores a previously maximized widget to its original size and position. Has no effect if the given widget is
* not currently in a maximized state set up by {@link #maximize(Widget)}.
- *
* Important: this feature is used by panels to unmaximize themselves. You should not pass a WorkbenchPanelView
* to this method yourself; instead, you should use the panel's own API to unmaximize it. You are free to use this method
* to unmaximize your own widgets that have previously been passed to {@link #maximize(Widget)}.
@@ -118,7 +113,6 @@ void unmaximize(Widget w,
/**
* Will insert the implementations of Header and Footer in the Workbench
- * @see {@link #setFooterContents(java.util.List)}
*/
void setMarginWidgets(boolean isStandaloneMode,
Set headersToKeep);
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFlowPanel.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFlowPanel.java
index 9ce81c0f476..3ca7207283c 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFlowPanel.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFlowPanel.java
@@ -28,7 +28,7 @@
/**
* A FlowPanel that can exist in a hierarchy of {@link LayoutPanel}s. Behaves exactly like FlowPanel, but also
- * propagates onResize events to the child widgets.
+ * propagates onResize
events to the child widgets.
*/
public class ResizeFlowPanel extends FlowPanel implements RequiresResize,
ProvidesResize {
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFocusPanel.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFocusPanel.java
index d65d27fb968..98c01c94514 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFocusPanel.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/listbar/ResizeFocusPanel.java
@@ -29,7 +29,7 @@
/**
* A FocusPanel that can exist in a hierarchy of {@link LayoutPanel}s. Behaves exactly like FocusPanel, but also
- * propagates onResize events to the child widget.
+ * propagates >onResize
events to the child widget.
*/
public class ResizeFocusPanel extends FocusPanel implements RequiresResize,
ProvidesResize {
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/split/WorkbenchSplitLayoutPanel.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/split/WorkbenchSplitLayoutPanel.java
index b15e83ac56a..880efcfcab0 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/split/WorkbenchSplitLayoutPanel.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/main/java/org/uberfire/client/workbench/widgets/split/WorkbenchSplitLayoutPanel.java
@@ -42,12 +42,10 @@
/**
* A panel that adds user-positioned splitters between each of its child
* widgets.
- *
* This is a fork of the standard SplitLayoutPanel with the following changes:-
*
* http://code.google.com/p/google-web-toolkit/issues/detail?id=7135
*
- *
*
* This panel is used in the same way as {@link DockLayoutPanel}, except that
* its children's sizes are always specified in {@link Unit#PX} units, and each
@@ -58,7 +56,7 @@
* the HTML page in which it is run have an explicit <!DOCTYPE>
* declaration.
*
- * CSS Style Rules
+ * CSS Style Rules
*
* .gwt-SplitLayoutPanel { the panel itself }
* .gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger { horizontal dragger
@@ -67,7 +65,7 @@
*
*
*
- *
Example {@example com.google.gwt.examples.SplitLayoutPanelExample}
+ * Example com.google.gwt.examples.SplitLayoutPanelExample
*
*/
public class WorkbenchSplitLayoutPanel extends DockLayoutPanel {
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/PanelManagerTest.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/PanelManagerTest.java
index 2e84a9e470f..1e074adb330 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/PanelManagerTest.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/PanelManagerTest.java
@@ -112,7 +112,7 @@ public class PanelManagerTest {
private PerspectiveDefinition testPerspectiveDef;
/**
- * This is the Panel Presenter returned by the mock BeanFactory when asked for newWorkbenchPanel( testPerspectiveDef.getRoot() ) ) .
+ * This is the Panel Presenter returned by the mock BeanFactory when asked for newWorkbenchPanel( testPerspectiveDef.getRoot() ) )
.
*/
private WorkbenchPanelPresenter testPerspectiveRootPanelPresenter;
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/panels/impl/PlaceManagerTest.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/panels/impl/PlaceManagerTest.java
index f0de32bdb08..588d92d9c3f 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/panels/impl/PlaceManagerTest.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-client/src/test/java/org/uberfire/client/workbench/panels/impl/PlaceManagerTest.java
@@ -994,7 +994,7 @@ private void verifyPlaceNotClosed(final PlaceRequest place,
/**
* Verifies that all the expected side effects of a screen or editor activity launch have happened.
* @param placeRequest The place request that was passed to some variant of PlaceManager.goTo().
- * @param activity A Mockito mock of the activity that was resolved for placeRequest .
+ * @param activity A Mockito mock of the activity that was resolved for placeRequest
.
*/
private void verifyActivityLaunchSideEffects(PlaceRequest placeRequest,
WorkbenchActivity activity,
@@ -1065,7 +1065,7 @@ private void verifyActivityLaunchSideEffects(PlaceRequest placeRequest,
/**
* Verifies that the "place change" side effects have not happened, and that the given activity is still current.
* @param expectedCurrentPlace The place request that placeManager should still consider "current."
- * @param activity A Mockito mock of the activity tied to expectedCurrentPlace .
+ * @param activity A Mockito mock of the activity tied to expectedCurrentPlace
.
*/
private void verifyNoActivityLaunchSideEffects(PlaceRequest expectedCurrentPlace,
WorkbenchScreenActivity activity) {
diff --git a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-processors/src/main/java/org/uberfire/annotations/processors/GeneratorUtils.java b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-processors/src/main/java/org/uberfire/annotations/processors/GeneratorUtils.java
index b09cf3d58a1..f1c887cf240 100644
--- a/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-processors/src/main/java/org/uberfire/annotations/processors/GeneratorUtils.java
+++ b/packages/dashbuilder/appformer/uberfire-workbench/uberfire-workbench-processors/src/main/java/org/uberfire/annotations/processors/GeneratorUtils.java
@@ -76,7 +76,6 @@ public class GeneratorUtils {
* Finds the {@code @OnStartup} method suitable for workbench classes that are not {@code @WorkbenchEditor}.
* The method must be public, non-static, have a return-type of void and either take zero parameters or one
* parameter of type {@code PlaceRequest}.
- *
* If no such method is found, returns null. If methods annotated with {@code @OnStartup} are found but they do not
* satisfy all the requirements, they are marked with errors explaining the problem.
*/
@@ -171,7 +170,6 @@ public static ExecutableElement getGetPreviewMethodName(TypeElement classElement
* Finds the {@code @OnStartup} method suitable for {@code @WorkbenchEditor} classes.
* The method must be public, non-static, have a return-type of void and either take one parameter
* of type {@code Path} or two parameters of type {@code (Path, PlaceRequest)}.
- *
* If no such method is found, returns null. If methods annotated with {@code @OnStartup} are found but they do not
* satisfy all the requirements, they are marked with errors explaining the problem.
*/
diff --git a/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServices.java b/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServices.java
index 23dd13352b8..76c9a35010c 100644
--- a/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServices.java
+++ b/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServices.java
@@ -79,7 +79,6 @@ void exportDataSetExcel(final DataSetLookup request,
* Creates a brand new data set definition for the provider type specified
*
* @param type The provider type
- * @return A data set definition instance
*/
void newDataSet(DataSetProviderType type,
RemoteCallback callback) throws Exception;
diff --git a/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServicesImpl.java b/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServicesImpl.java
index b2ac0d2938b..c2aa85d9412 100644
--- a/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServicesImpl.java
+++ b/packages/dashbuilder/dashbuilder-client/dashbuilder-dataset-client/src/main/java/org/dashbuilder/dataset/client/DataSetClientServicesImpl.java
@@ -212,7 +212,6 @@ public void exportDataSetExcel(final DataSetLookup request,
* Creates a brand new data set definition for the provider type specified
*
* @param type The provider type
- * @return A data set definition instance
*/
public void newDataSet(DataSetProviderType type,
RemoteCallback callback) throws Exception {
diff --git a/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/AbstractDisplayer.java b/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/AbstractDisplayer.java
index 8c1cf445569..d275005ff28 100644
--- a/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/AbstractDisplayer.java
+++ b/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/AbstractDisplayer.java
@@ -58,7 +58,7 @@
* Base class for implementing custom displayers.
* Any derived class must implement:
*
- * The draw(), redraw() & close() methods.
+ * The draw(), redraw() and close() methods.
* The capture of events coming from the DisplayerListener interface.
*
*/
diff --git a/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/Displayer.java b/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/Displayer.java
index b75f830fdbd..9a808c3546d 100644
--- a/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/Displayer.java
+++ b/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/Displayer.java
@@ -70,7 +70,7 @@ public interface Displayer extends DisplayerListener, IsWidget {
/**
* Same as draw but does not necessary implies to repaint everything again.
- * It's just a matter of update & display the latest data set changes.
+ * It's just a matter of update and display the latest data set changes.
*/
void redraw();
diff --git a/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/RendererLibrary.java b/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/RendererLibrary.java
index 23fd1b121fa..b0f5d923750 100644
--- a/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/RendererLibrary.java
+++ b/packages/dashbuilder/dashbuilder-client/dashbuilder-displayer-client/src/main/java/org/dashbuilder/displayer/client/RendererLibrary.java
@@ -31,7 +31,7 @@
* A renderer library must:
*
* Perform all the required initializations before any displayer can be drawn
- * Declare the displayer types & subtypes supported
+ * Declare the displayer types and subtypes supported
* Take care of the initialization of displayer instances
*
*/
diff --git a/packages/dashbuilder/dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-default/src/main/java/org/dashbuilder/renderer/client/table/TableDisplayerView.java b/packages/dashbuilder/dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-default/src/main/java/org/dashbuilder/renderer/client/table/TableDisplayerView.java
index 91977de216d..ce3f81cec4b 100644
--- a/packages/dashbuilder/dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-default/src/main/java/org/dashbuilder/renderer/client/table/TableDisplayerView.java
+++ b/packages/dashbuilder/dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-default/src/main/java/org/dashbuilder/renderer/client/table/TableDisplayerView.java
@@ -300,7 +300,7 @@ protected List getCurrentPageRows(HasData display) {
}
/**
- * Both filter & sort invoke this method from redraw()
+ * Both filter and sort invoke this method from redraw()
*/
public void gotoFirstPage() {
// Avoid fetching the data set again
diff --git a/packages/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/DisplayerSettingsBuilder.java b/packages/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/DisplayerSettingsBuilder.java
index 18a4a6ceb2c..821e32abe5e 100644
--- a/packages/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/DisplayerSettingsBuilder.java
+++ b/packages/dashbuilder/dashbuilder-shared/dashbuilder-displayer-api/src/main/java/org/dashbuilder/displayer/DisplayerSettingsBuilder.java
@@ -50,7 +50,7 @@ public interface DisplayerSettingsBuilder extends DataSetLookupBuilder {
/**
* Set a direct reference to the source data set that will be used by the Displayer that is being assembled.
- * When using this dataset provided mode the data set lookup operations set (if any): filter, group & sort will not be taking into account).
+ *
When using this dataset provided mode the data set lookup operations set (if any): filter, group and sort will not be taking into account).
*
* @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
* @see org.dashbuilder.dataset.DataSet
@@ -127,7 +127,7 @@ public interface DisplayerSettingsBuilder extends DataSetLookupBuilder {
/**
* Force the displayer to redraw every time interval.
*
- * @param seconds The refresh time frame in seconds. If < 0 then periodic refresh is disabled.
+ * @param seconds The refresh time frame in seconds. if < 0
then periodic refresh is disabled.
* @param onStale Refresh when the data becomes stale.
*
* @return The DisplayerSettingsBuilder instance that is being used to configure a DisplayerSettings.
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataprovider/DataSetProvider.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataprovider/DataSetProvider.java
index 4220399e9a7..f2b82119bd4 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataprovider/DataSetProvider.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataprovider/DataSetProvider.java
@@ -26,7 +26,7 @@
/**
* This service provider interface is designed to provide access to different data set storage implementations with
- * the main goal of providing a unified interface for the data set fetch & lookup operations.
+ * the main goal of providing a unified interface for the data set fetch and lookup operations.
*/
public interface DataSetProvider {
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataColumn.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataColumn.java
index 7b7ab9e6337..6e4e7201d0e 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataColumn.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataColumn.java
@@ -100,7 +100,7 @@ public interface DataColumn {
DataColumn cloneEmpty();
/**
- * Clone the column entirely (definition & values).
+ * Clone the column entirely (definition and values).
*/
DataColumn cloneInstance();
}
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataSetGenerator.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataSetGenerator.java
index cde9c9b3cb8..c05fdf5e677 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataSetGenerator.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/DataSetGenerator.java
@@ -29,7 +29,7 @@ public interface DataSetGenerator {
/**
* Build and get a DataSet instance.
*
- * @params A map of parameters to be passed through the generator.
+ * @param params A map of parameters to be passed through the generator.
*/
DataSet buildDataSet(Map params);
}
\ No newline at end of file
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeAmount.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeAmount.java
index 6750cf93b90..d4d5c231eba 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeAmount.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeAmount.java
@@ -30,7 +30,6 @@
* -1year
* +2quarter
*
- *
*/
public class TimeAmount {
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeFrame.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeFrame.java
index 921f8c2e16e..c9f87654074 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeFrame.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeFrame.java
@@ -21,7 +21,7 @@
/**
* A time frame defines a time period between two time instants where these two instants depends on the current time.
- * Some examples of time frame expressions are:
+ *
Some examples of time frame expressions are:
*
* "now till 10second " => next 10 seconds
* "begin[minute] till 10second " => first 10 seconds of current minute
@@ -34,7 +34,6 @@
* "end[year March] +2quarter till 1quarter " => 3rd quarter of next year
* "begin[year March] -7day till begin[year March] " => Last week of last year
*
- *
*/
public class TimeFrame {
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeInstant.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeInstant.java
index 74f42718106..0df7d747db5 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeInstant.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-api/src/main/java/org/dashbuilder/dataset/date/TimeInstant.java
@@ -25,7 +25,7 @@
/**
* This class is used to represent a given time instant relative to the current time.
- * Some examples of time instants are:
+ *
Some examples of time instants are:
*
* now
* now -10second or just -10second
@@ -34,7 +34,6 @@
* end[year March] +1year => end of next year (year starting on March)
* begin[year March] -7day => last year's last week start
*
- *
*/
public class TimeInstant {
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-core/src/main/java/org/dashbuilder/dataprovider/StaticDataSetProvider.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-core/src/main/java/org/dashbuilder/dataprovider/StaticDataSetProvider.java
index e5aa65b282b..d8989bac03c 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-core/src/main/java/org/dashbuilder/dataprovider/StaticDataSetProvider.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-core/src/main/java/org/dashbuilder/dataprovider/StaticDataSetProvider.java
@@ -30,13 +30,12 @@
/**
* DataSetProvider implementation for static (in-memory) data sets.
- * It's been designed with several goals in mind:
+ *
It's been designed with several goals in mind:
*
* To provide a highly reusable data set cache.
* To index almost every operation performed over a data set.
* Multiple clients requesting the same data set operations will benefit from the indexing/caching services provided.
*
- *
*/
public class StaticDataSetProvider implements DataSetProvider {
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/Chronometer.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/Chronometer.java
index 1eb0a6244b9..eca9ecf26e6 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/Chronometer.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/Chronometer.java
@@ -43,7 +43,7 @@ public interface Chronometer {
/**
* Return the time specified in human readable format.
* @param millis The time to format in milliseconds.
- * @return Examples: 2d 3h 44m 2s or 20 weeks 3h 3s
+ * @return Examples: 2d 3h 44m 2s or 20 weeks 3h 3s
*/
String formatElapsedTime(long millis);
}
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/group/IntervalBuilderFixedDate.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/group/IntervalBuilderFixedDate.java
index 87b889eb3e3..cc3e606f19d 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/group/IntervalBuilderFixedDate.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/group/IntervalBuilderFixedDate.java
@@ -36,7 +36,7 @@
/**
* Interval builder for date columns which generates a fixed number of intervals for a given interval size.
- * The only intervals sizes supported are: QUARTER, MONTH, DAY_OF_WEEK, HOUR, MINUTE & SECOND.
+ * The only intervals sizes supported are: QUARTER, MONTH, DAY_OF_WEEK, HOUR, MINUTE and SECOND.
*/
public class IntervalBuilderFixedDate implements IntervalBuilder {
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/index/spi/DataSetIndexRegistry.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/index/spi/DataSetIndexRegistry.java
index daed608d2c7..be17a298935 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/index/spi/DataSetIndexRegistry.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/index/spi/DataSetIndexRegistry.java
@@ -41,7 +41,7 @@ public interface DataSetIndexRegistry {
/**
* Removes the index for the specified data set.
* @param uuid The data set unique identifier.
- * @return The removed index or null if there was no mapping for uuid .
+ * @return The removed index or null
if there was no mapping for uuid
.
*/
DataSetIndex remove(String uuid);
}
diff --git a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/sort/CollectionsDataSetSort.java b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/sort/CollectionsDataSetSort.java
index 78a7b22a640..58cee41d3d1 100644
--- a/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/sort/CollectionsDataSetSort.java
+++ b/packages/dashbuilder/kie-soup-dataset/kie-soup-dataset-shared/src/main/java/org/dashbuilder/dataset/engine/sort/CollectionsDataSetSort.java
@@ -28,7 +28,7 @@
import org.dashbuilder.dataset.sort.ColumnSort;
/**
- * A basic sort algorithm takes relies on the default Collections.sort() implementation.
+ * A basic sort algorithm takes relies on the default Collections.sort()
implementation.
*/
public class CollectionsDataSetSort implements DataSetSortAlgorithm {
diff --git a/packages/data-index-webapp/env/index.js b/packages/data-index-webapp/env/index.js
new file mode 100644
index 00000000000..45859a2171b
--- /dev/null
+++ b/packages/data-index-webapp/env/index.js
@@ -0,0 +1,33 @@
+/*
+ * 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, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env");
+
+module.exports = composeEnv([require("@kie-tools/root-env/env")], {
+ vars: varsWithName({}),
+ get env() {
+ return {
+ dataIndexWebapp: {
+ dev: {
+ port: 9026,
+ },
+ },
+ };
+ },
+});
diff --git a/packages/data-index-webapp/package.json b/packages/data-index-webapp/package.json
new file mode 100644
index 00000000000..1627e52a3d1
--- /dev/null
+++ b/packages/data-index-webapp/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "@kie-tools/data-index-webapp",
+ "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"
+ },
+ "types": "./dist/index.d.ts",
+ "main": "dist/index.js",
+ "scripts": {
+ "build:dev": "rimraf dist && webpack --env dev",
+ "build:prod": "pnpm lint && pnpm test && rimraf dist && webpack",
+ "lint": "echo 'Linting'",
+ "start": "webpack serve --host 0.0.0.0 --env dev",
+ "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\""
+ },
+ "devDependencies": {
+ "@kie-tools-core/webpack-base": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "copy-webpack-plugin": "^11.0.0",
+ "jest": "^29.7.0",
+ "rimraf": "^3.0.2",
+ "ts-node": "^10.9.2",
+ "webpack": "^5.94.0",
+ "webpack-cli": "^4.10.0",
+ "webpack-dev-server": "^4.15.1",
+ "webpack-merge": "^5.9.0"
+ }
+}
diff --git a/packages/data-index-webapp/src/index.html b/packages/data-index-webapp/src/index.html
new file mode 100644
index 00000000000..1456f070217
--- /dev/null
+++ b/packages/data-index-webapp/src/index.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+ Data Index Webapp
+
+
+
+
+
+
+
+
+
Data Index Service
+
+
+
Your Data Index service is up and working!
+
+
+ Data Index service is a dedicated supporting service that stores the data related to the workflow and process
+ instances and their associated jobs. This service provides a GraphQL endpoint allowing users to query and
+ modify that data.
+
+
+
+
+
+
diff --git a/packages/data-index-webapp/src/styles.css b/packages/data-index-webapp/src/styles.css
new file mode 100644
index 00000000000..618ac178a41
--- /dev/null
+++ b/packages/data-index-webapp/src/styles.css
@@ -0,0 +1,70 @@
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+.maindiv {
+ font-family: "RedHatText", "Overpass", overpass, helvetica, arial, sans-serif;
+ background-color: #fff;
+ color: #fff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+}
+
+.container {
+ text-align: center;
+ background-color: #fff;
+ max-width: 700px;
+}
+
+.logo img {
+ width: 80px;
+ height: auto;
+}
+
+h1 {
+ font-size: 48px;
+ color: #e44c3b;
+ padding-left: 15px;
+}
+
+h4 {
+ font-size: 30px;
+ color: #c94848;
+ margin-top: 10px;
+}
+
+p {
+ font-size: 16px;
+ color: #1f1e1e;
+ margin-top: 5px;
+ margin-bottom: 40px;
+}
+
+.btn {
+ padding: 10px 20px;
+ background-color: #e44c3b;
+ color: #fff;
+ text-decoration: none;
+ border-radius: 5px;
+ font-size: 16px;
+ transition: background-color 0.3s;
+}
+
+.btn:hover {
+ background-color: #c73828;
+}
+
+@media (prefers-color-scheme: dark) {
+ .maindiv,
+ .container {
+ background-color: #232121;
+ }
+
+ h4,
+ p {
+ color: #fefefe;
+ }
+}
diff --git a/packages/data-index-webapp/static/favicon.svg b/packages/data-index-webapp/static/favicon.svg
new file mode 100644
index 00000000000..8806924e382
--- /dev/null
+++ b/packages/data-index-webapp/static/favicon.svg
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ kie_icon_rgb_fullcolor_default
+
+
+
+
+
+
+
+
+
diff --git a/packages/data-index-webapp/webpack.config.js b/packages/data-index-webapp/webpack.config.js
new file mode 100644
index 00000000000..ef01f3ecc63
--- /dev/null
+++ b/packages/data-index-webapp/webpack.config.js
@@ -0,0 +1,45 @@
+/*
+ * 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 CopyPlugin = require("copy-webpack-plugin");
+const { merge } = require("webpack-merge");
+const common = require("@kie-tools-core/webpack-base/webpack.common.config");
+const { env } = require("./env");
+const buildEnv = env;
+
+module.exports = async (env) =>
+ merge(common(env), {
+ entry: {},
+ plugins: [
+ new CopyPlugin({
+ patterns: [
+ { from: "./src/index.html", to: "./index.html" },
+ { from: "./src/styles.css", to: "./styles.css" },
+ { from: "./static/favicon.svg", to: "./favicon.svg" },
+ ],
+ }),
+ ],
+ ignoreWarnings: [/Failed to parse source map/],
+ devServer: {
+ static: {
+ directory: "./dist",
+ },
+ port: buildEnv.dataIndexWebapp.dev.port,
+ },
+ });
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 8120f605343..a96b5f74450 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
@@ -43,7 +43,7 @@
17
UTF-8
UTF-8
- 3.2.5
+ 3.5.0
3.12.1
3.2.0
3.4.1
diff --git a/packages/dev-deployment-dmn-form-webapp/package.json b/packages/dev-deployment-dmn-form-webapp/package.json
index bd1d95219ca..2078fcd0d2e 100644
--- a/packages/dev-deployment-dmn-form-webapp/package.json
+++ b/packages/dev-deployment-dmn-form-webapp/package.json
@@ -35,8 +35,6 @@
"@readme/openapi-parser": "^2.5.0",
"json-refs": "^3.0.15",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4"
},
@@ -76,5 +74,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/env/index.js b/packages/dev-deployment-kogito-quarkus-blank-app-image/env/index.js
index db4e8b45097..7087fb761c4 100644
--- a/packages/dev-deployment-kogito-quarkus-blank-app-image/env/index.js
+++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/env/index.js
@@ -52,7 +52,7 @@ module.exports = composeEnv([rootEnv], {
description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0",
},
DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__mavenM2RepoViaHttpImage: {
- default: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.tag}`,
+ default: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.buildTag}`,
description: "The image tag for the Maven M2 Repo via HTTP. Used during the build only.",
},
}),
diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
index 13be51c1f55..259bc458762 100644
--- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
+++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
@@ -43,7 +43,7 @@
17
UTF-8
UTF-8
- 3.2.5
+ 3.5.0
3.12.1
3.2.0
3.4.1
diff --git a/packages/dmn-editor-envelope/package.json b/packages/dmn-editor-envelope/package.json
index a8b6f310719..c321f00872c 100644
--- a/packages/dmn-editor-envelope/package.json
+++ b/packages/dmn-editor-envelope/package.json
@@ -34,9 +34,7 @@
"@kie-tools/dmn-marshaller": "workspace:*",
"@kie-tools/pmml-editor-marshaller": "workspace:*",
"@kie-tools/xml-parser-ts": "workspace:*",
- "@patternfly/react-core": "^4.276.6",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@patternfly/react-core": "^4.276.6"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -49,5 +47,9 @@
"@types/react-dom": "^17.0.5",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx b/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx
index c6741d3cc3c..d1c5bc75c47 100644
--- a/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx
+++ b/packages/dmn-editor-envelope/src/DmnEditorRoot.tsx
@@ -19,7 +19,7 @@
import * as __path from "path";
import * as React from "react";
-import { useEffect, useMemo, useState } from "react";
+import { useCallback, useEffect, useMemo, useState } from "react";
import * as DmnEditor from "@kie-tools/dmn-editor/dist/DmnEditor";
import { normalize, Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize";
import { DMN_LATEST_VERSION, DmnLatestModel, DmnMarshaller, getMarshaller } from "@kie-tools/dmn-marshaller";
@@ -72,12 +72,12 @@ export type DmnEditorRootState = {
marshaller: DmnMarshaller | undefined;
stack: Normalized[];
pointer: number;
- openFilenormalizedPosixPathRelativeToTheWorkspaceRoot: string | undefined;
+ openFileNormalizedPosixPathRelativeToTheWorkspaceRoot: string | undefined;
externalModelsByNamespace: DmnEditor.ExternalModelsIndex;
isReadOnly: boolean;
externalModelsManagerDoneBootstraping: boolean;
keyboardShortcutsRegisterIds: number[];
- keyboardShortcutsRegistred: boolean;
+ keyboardShortcutsRegistered: boolean;
error: Error | undefined;
};
@@ -95,11 +95,11 @@ export class DmnEditorRoot extends React.Component {
const marshaller = this.getMarshaller(content);
@@ -142,7 +142,7 @@ export class DmnEditorRoot extends React.Component {
// External change to the same file.
if (
- prev.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot ===
- openFilenormalizedPosixPathRelativeToTheWorkspaceRoot
+ prev.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot ===
+ openFileNormalizedPosixPathRelativeToTheWorkspaceRoot
) {
const newStack = savedStackPointer.slice(0, prev.pointer + 1);
return {
marshaller,
- openFilenormalizedPosixPathRelativeToTheWorkspaceRoot,
+ openFileNormalizedPosixPathRelativeToTheWorkspaceRoot,
stack: [...newStack, normalize(marshaller.parser.parse())],
isReadOnly: prev.isReadOnly,
pointer: newStack.length,
@@ -172,7 +172,7 @@ export class DmnEditorRoot extends React.Component
this.props.onNewEdit({
- id: `${this.state.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot}__${generateUuid()}`,
+ id: `${this.state.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot}__${generateUuid()}`,
})
);
};
private onRequestExternalModelsAvailableToInclude: DmnEditor.OnRequestExternalModelsAvailableToInclude = async () => {
- if (!this.state.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot) {
+ if (!this.state.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot) {
return [];
}
@@ -233,9 +233,9 @@ export class DmnEditorRoot extends React.Component
// Do not show this DMN on the list
- p === this.state.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot
+ p === this.state.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot
? []
- : __path.relative(__path.dirname(this.state.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot!), p)
+ : __path.relative(__path.dirname(this.state.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot!), p)
);
};
@@ -244,7 +244,7 @@ export class DmnEditorRoot extends React.Component {
const normalizedPosixPathRelativeToTheWorkspaceRoot = __path
.resolve(
- __path.dirname(this.state.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot!),
+ __path.dirname(this.state.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot!),
normalizedPosixPathRelativeToTheOpenFile
)
.substring(1); // Remove leading slash.
@@ -267,7 +267,7 @@ export class DmnEditorRoot extends React.Component {
- if (!this.state.openFilenormalizedPosixPathRelativeToTheWorkspaceRoot) {
+ if (!this.state.openFileNormalizedPosixPathRelativeToTheWorkspaceRoot) {
return;
}
@@ -304,7 +304,7 @@ export class DmnEditorRoot extends React.Component,
snapshot?: any
): void {
- if (this.props.keyboardShortcutsService === undefined || this.state.keyboardShortcutsRegistred === true) {
+ if (this.props.keyboardShortcutsService === undefined || this.state.keyboardShortcutsRegistered === true) {
return;
}
@@ -428,7 +428,7 @@ export class DmnEditorRoot extends React.Component ({
...prev,
- keyboardShortcutsRegistred: true,
+ keyboardShortcutsRegistered: true,
keyboardShortcutsRegisterIds: [
bigMoveDown,
bigMoveLeft,
@@ -497,7 +497,7 @@ export class DmnEditorRoot extends React.Component;
}) {
const namespaces = useMemo(
- () =>
- (model.definitions.import ?? [])
- .map((i) => getNamespaceOfDmnImport({ dmnImport: i }))
- .join(NAMESPACES_EFFECT_SEPARATOR),
+ () => getIncludedNamespacesFromModel(model.definitions.import),
[model.definitions.import]
);
@@ -563,6 +560,38 @@ function ExternalModelsManager({
};
}, [thisDmnsNormalizedPosixPathRelativeToTheWorkspaceRoot]);
+ const getDmnsByNamespace = useCallback((resources: (ResourceContent | undefined)[]) => {
+ const ret = new Map();
+ for (let i = 0; i < resources.length; i++) {
+ const resource = resources[i];
+ if (!resource) {
+ continue;
+ }
+
+ const content = resource.content ?? "";
+ const ext = __path.extname(resource.normalizedPosixPathRelativeToTheWorkspaceRoot);
+ if (ext === ".dmn") {
+ const namespace = domParser.getDomDocument(content).documentElement.getAttribute("namespace");
+ if (namespace) {
+ // Check for multiplicity of namespaces on DMN models
+ if (ret.has(namespace)) {
+ console.warn(
+ `DMN EDITOR ROOT: Multiple DMN models encountered with the same namespace '${namespace}': '${
+ resource.normalizedPosixPathRelativeToTheWorkspaceRoot
+ }' and '${
+ ret.get(namespace)!.normalizedPosixPathRelativeToTheWorkspaceRoot
+ }'. The latter will be considered.`
+ );
+ }
+
+ ret.set(namespace, resource);
+ }
+ }
+ }
+
+ return ret;
+ }, []);
+
// This effect actually populates `externalModelsByNamespace` through the `onChange` call.
useEffect(() => {
let canceled = false;
@@ -584,7 +613,7 @@ function ExternalModelsManager({
resources.push(
onRequestWorkspaceFileContent({
normalizedPosixPathRelativeToTheWorkspaceRoot,
- opts: { type: ContentType.TEXT },
+ opts: { type: "text" },
})
);
}
@@ -594,6 +623,8 @@ function ExternalModelsManager({
const externalModelsIndex: DmnEditor.ExternalModelsIndex = {};
const namespacesSet = new Set(namespaces.split(NAMESPACES_EFFECT_SEPARATOR));
+ const loadedDmnsByPathRelativeToTheWorkspaceRoot = new Set();
+ const dmnsByNamespace = getDmnsByNamespace(resources);
for (let i = 0; i < resources.length; i++) {
const resource = resources[i];
@@ -601,46 +632,54 @@ function ExternalModelsManager({
continue;
}
- const content = resource.content ?? "";
-
+ const ext = __path.extname(resource.normalizedPosixPathRelativeToTheWorkspaceRoot);
const normalizedPosixPathRelativeToTheOpenFile = __path.relative(
__path.dirname(thisDmnsNormalizedPosixPathRelativeToTheWorkspaceRoot),
resource.normalizedPosixPathRelativeToTheWorkspaceRoot
);
- const ext = __path.extname(resource.normalizedPosixPathRelativeToTheWorkspaceRoot);
- if (ext === ".dmn") {
- const namespace = domParser.getDomDocument(content).documentElement.getAttribute("namespace");
- if (namespace && namespacesSet.has(namespace)) {
- // Check for multiplicity of namespaces on DMN models
- if (externalModelsIndex[namespace]) {
- console.warn(
- `DMN EDITOR ROOT: Multiple DMN models encountered with the same namespace '${namespace}': '${
- resource.normalizedPosixPathRelativeToTheWorkspaceRoot
- }' and '${
- externalModelsIndex[namespace]!.normalizedPosixPathRelativeToTheOpenFile
- }'. The latter will be considered.`
- );
- }
+ const resourceContent = resource.content ?? "";
- externalModelsIndex[namespace] = {
- normalizedPosixPathRelativeToTheOpenFile,
- model: normalize(getMarshaller(content, { upgradeTo: "latest" }).parser.parse()),
- type: "dmn",
- svg: "",
- };
+ // DMN Files
+ if (ext === ".dmn") {
+ const namespaceOfTheResourceFile = domParser
+ .getDomDocument(resourceContent)
+ .documentElement.getAttribute("namespace");
+
+ if (namespaceOfTheResourceFile && namespacesSet.has(namespaceOfTheResourceFile)) {
+ checkIfNamespaceIsAlreadyLoaded({
+ externalModelsIndex,
+ namespaceOfTheResourceFile,
+ normalizedPosixPathRelativeToTheWorkspaceRoot: resource.normalizedPosixPathRelativeToTheWorkspaceRoot,
+ });
+
+ loadModel({
+ includedModelContent: resourceContent,
+ includedModelNamespace: namespaceOfTheResourceFile,
+ externalModelsIndex,
+ thisDmnsNormalizedPosixPathRelativeToTheWorkspaceRoot,
+ loadedDmnsByPathRelativeToTheWorkspaceRoot,
+ normalizedPosixPathRelativeToTheWorkspaceRoot: resource.normalizedPosixPathRelativeToTheWorkspaceRoot,
+ resourcesByNamespace: dmnsByNamespace,
+ });
}
- } else if (ext === ".pmml") {
+ }
+
+ // PMML Files
+ else if (ext === ".pmml") {
const namespace = getPmmlNamespace({ normalizedPosixPathRelativeToTheOpenFile });
if (namespace && namespacesSet.has(namespace)) {
// No need to check for namespaces being equal becuase there can't be two files with the same relativePath.
externalModelsIndex[namespace] = {
normalizedPosixPathRelativeToTheOpenFile,
- model: XML2PMML(content),
+ model: XML2PMML(resourceContent),
type: "pmml",
};
}
- } else {
+ }
+
+ // Unknown files
+ else {
throw new Error(`Unknown extension '${ext}'.`);
}
}
@@ -663,6 +702,7 @@ function ExternalModelsManager({
externalUpdatesCount,
workspaceRootAbsolutePosixPath,
externalModelsManagerDoneBootstraping,
+ getDmnsByNamespace,
]);
return <>>;
@@ -682,3 +722,93 @@ function DmnMarshallerFallbackError({ error }: { error: Error }) {
);
}
+
+function getIncludedNamespacesFromModel(imports: Normalized) {
+ return (imports ?? []).map((i) => getNamespaceOfDmnImport({ dmnImport: i })).join(NAMESPACES_EFFECT_SEPARATOR);
+}
+
+function loadModel(args: {
+ thisDmnsNormalizedPosixPathRelativeToTheWorkspaceRoot: string;
+ resourcesByNamespace: Map;
+ normalizedPosixPathRelativeToTheWorkspaceRoot: string;
+ includedModelNamespace: string;
+ loadedDmnsByPathRelativeToTheWorkspaceRoot: Set;
+ includedModelContent: string;
+ externalModelsIndex: DmnEditor.ExternalModelsIndex;
+}) {
+ const normalizedPosixPathRelativeToTheOpenFile = __path.relative(
+ __path.dirname(args.thisDmnsNormalizedPosixPathRelativeToTheWorkspaceRoot),
+ args.normalizedPosixPathRelativeToTheWorkspaceRoot
+ );
+
+ const includedModel = normalize(getMarshaller(args.includedModelContent, { upgradeTo: "latest" }).parser.parse());
+ args.externalModelsIndex[args.includedModelNamespace] = {
+ normalizedPosixPathRelativeToTheOpenFile,
+ model: includedModel,
+ type: "dmn",
+ svg: "",
+ };
+
+ args.loadedDmnsByPathRelativeToTheWorkspaceRoot.add(args.normalizedPosixPathRelativeToTheWorkspaceRoot);
+
+ loadDependentModels({
+ ...args,
+ model: includedModel,
+ });
+}
+
+// Load all included models from the model and the included models of those models, recursively.
+function loadDependentModels(args: {
+ model: Normalized;
+ externalModelsIndex: DmnEditor.ExternalModelsIndex;
+ resourcesByNamespace: Map;
+ loadedDmnsByPathRelativeToTheWorkspaceRoot: Set;
+ thisDmnsNormalizedPosixPathRelativeToTheWorkspaceRoot: string;
+}) {
+ const includedNamespaces = new Set(
+ getIncludedNamespacesFromModel(args.model.definitions.import).split(NAMESPACES_EFFECT_SEPARATOR)
+ );
+
+ for (const includedNamespace of includedNamespaces) {
+ if (!args.resourcesByNamespace.has(includedNamespace)) {
+ console.warn(
+ `DMN EDITOR ROOT: The included namespace '${includedNamespace}' for the model '${args.model.definitions["@_id"]}' can not be found.`
+ );
+ continue;
+ }
+
+ const resource = args.resourcesByNamespace.get(includedNamespace)!;
+ if (args.loadedDmnsByPathRelativeToTheWorkspaceRoot.has(resource.normalizedPosixPathRelativeToTheWorkspaceRoot)) {
+ continue;
+ }
+
+ checkIfNamespaceIsAlreadyLoaded({
+ externalModelsIndex: args.externalModelsIndex,
+ namespaceOfTheResourceFile: includedNamespace,
+ normalizedPosixPathRelativeToTheWorkspaceRoot: resource.normalizedPosixPathRelativeToTheWorkspaceRoot,
+ });
+
+ loadModel({
+ ...args,
+ includedModelContent: resource.content ?? "",
+ normalizedPosixPathRelativeToTheWorkspaceRoot: resource.normalizedPosixPathRelativeToTheWorkspaceRoot,
+ includedModelNamespace: includedNamespace,
+ });
+ }
+}
+
+function checkIfNamespaceIsAlreadyLoaded(args: {
+ externalModelsIndex: DmnEditor.ExternalModelsIndex;
+ namespaceOfTheResourceFile: string;
+ normalizedPosixPathRelativeToTheWorkspaceRoot: string;
+}) {
+ if (args.externalModelsIndex[args.namespaceOfTheResourceFile]) {
+ console.warn(
+ `DMN EDITOR ROOT: Multiple DMN models encountered with the same namespace '${args.namespaceOfTheResourceFile}': '${
+ args.normalizedPosixPathRelativeToTheWorkspaceRoot
+ }' and '${
+ args.externalModelsIndex[args.namespaceOfTheResourceFile]!.normalizedPosixPathRelativeToTheOpenFile
+ }'. The latter will be considered.`
+ );
+ }
+}
diff --git a/packages/dmn-editor-standalone/src/DmnEditorStandaloneChannelApiImpl.ts b/packages/dmn-editor-standalone/src/DmnEditorStandaloneChannelApiImpl.ts
index ba03446bd49..20ebb38a2b5 100644
--- a/packages/dmn-editor-standalone/src/DmnEditorStandaloneChannelApiImpl.ts
+++ b/packages/dmn-editor-standalone/src/DmnEditorStandaloneChannelApiImpl.ts
@@ -102,9 +102,7 @@ export class DmnEditorStandaloneChannelApiImpl implements KogitoEditorChannelApi
return new ResourceContent(
request.normalizedPosixPathRelativeToTheWorkspaceRoot,
await resource.content,
- // We need to typecast because ContentType is not exported
- // and TS complains when trying to match strings with enums
- resource.contentType as ContentType
+ resource.contentType
);
}
diff --git a/packages/dmn-editor-standalone/stories/DevWebApp.stories.tsx b/packages/dmn-editor-standalone/stories/DevWebApp.stories.tsx
index c2b6ec0e2d5..c21a0dc6cbc 100644
--- a/packages/dmn-editor-standalone/stories/DevWebApp.stories.tsx
+++ b/packages/dmn-editor-standalone/stories/DevWebApp.stories.tsx
@@ -24,11 +24,10 @@ import { useRef, useState, useEffect, useCallback, useMemo } from "react";
import "@patternfly/react-core/dist/styles/base.css";
import { Page, PageSection } from "@patternfly/react-core/dist/js/components/Page";
import * as DmnEditor from "../dist/index";
-import { DmnEditorStandaloneApi } from "../dist/index";
+import { DmnEditorStandaloneApi, DmnEditorStandaloneResource } from "../dist/index";
import { Flex } from "@patternfly/react-core/dist/js/layouts/Flex/Flex";
import { FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex/FlexItem";
import { Text, TextVariants } from "@patternfly/react-core/dist/js/components/Text";
-import { ContentType } from "@kie-tools-core/workspace/dist/api";
const droppingFileStyle = {
position: "absolute",
@@ -53,7 +52,7 @@ export type DevWebAppProps = {
initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot: string;
initialContent: string;
readOnly: boolean;
- resources: Array<[string, { contentType: ContentType; content: string }]>;
+ resources: Array<[string, DmnEditorStandaloneResource]>;
origin: string;
};
diff --git a/packages/dmn-editor-standalone/tests-e2e/__fixtures__/editor.ts b/packages/dmn-editor-standalone/tests-e2e/__fixtures__/editor.ts
index 5ecc57ef09d..c030c6e9858 100644
--- a/packages/dmn-editor-standalone/tests-e2e/__fixtures__/editor.ts
+++ b/packages/dmn-editor-standalone/tests-e2e/__fixtures__/editor.ts
@@ -18,7 +18,6 @@
*/
import { Page, expect } from "@playwright/test";
-import { ContentType } from "@kie-tools-core/workspace/dist/api";
import type { open, DmnEditorStandaloneApi } from "@kie-tools/dmn-editor-standalone/dist";
import * as prettier from "prettier";
@@ -40,7 +39,7 @@ export class Editor {
constructor(public page: Page) {}
public async open(args?: {
- resources?: Array<[string, { contentType: ContentType; content: string }]>;
+ resources?: Array<[string, { contentType: "text" | "binary"; content: string }]>;
initialFileNormalizedPosixPathRelativeToTheWorkspaceRoot?: string;
}) {
await this.page.goto("");
diff --git a/packages/dmn-editor-standalone/tests-e2e/includedModels/includedModels.spec.ts b/packages/dmn-editor-standalone/tests-e2e/includedModels/includedModels.spec.ts
index f3bf3aedecb..fc8f18b8c0d 100644
--- a/packages/dmn-editor-standalone/tests-e2e/includedModels/includedModels.spec.ts
+++ b/packages/dmn-editor-standalone/tests-e2e/includedModels/includedModels.spec.ts
@@ -18,27 +18,20 @@
*/
import { test, expect } from "../__fixtures__/base";
-import { ContentType } from "@kie-tools-core/workspace/dist/api";
import { ExternalFile } from "../__fixtures__/files";
test.describe("DMN Editor - Standalone - Resources", () => {
test.describe("includedModels/resources", () => {
test("should list all resources", async ({ editor, files }) => {
- const resources: Array<[string, { contentType: ContentType; content: string }]> = [
+ const resources: Array<[string, { contentType: "text" | "binary"; content: string }]> = [
[
"loan-pre-qualification.dmn",
- { content: await files.getFile(ExternalFile.LOAN_PRE_QUALIFICATION_DMN), contentType: ContentType.TEXT },
- ],
- ["can-drive.dmn", { content: await files.getFile(ExternalFile.CAN_DRIVE_DMN), contentType: ContentType.TEXT }],
- [
- "find-employees.dmn",
- { content: await files.getFile(ExternalFile.FIND_EMPLOYEES_DMN), contentType: ContentType.TEXT },
- ],
- ["types.dmn", { content: await files.getFile(ExternalFile.TYPES_DMN), contentType: ContentType.TEXT }],
- [
- "scorecard.pmml",
- { content: await files.getFile(ExternalFile.SCORECARD_PMML), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.LOAN_PRE_QUALIFICATION_DMN), contentType: "text" },
],
+ ["can-drive.dmn", { content: await files.getFile(ExternalFile.CAN_DRIVE_DMN), contentType: "text" }],
+ ["find-employees.dmn", { content: await files.getFile(ExternalFile.FIND_EMPLOYEES_DMN), contentType: "text" }],
+ ["types.dmn", { content: await files.getFile(ExternalFile.TYPES_DMN), contentType: "text" }],
+ ["scorecard.pmml", { content: await files.getFile(ExternalFile.SCORECARD_PMML), contentType: "text" }],
];
// Open the editor
@@ -61,23 +54,20 @@ test.describe("DMN Editor - Standalone - Resources", () => {
});
test("should not list any models to be included", async ({ editor, files }) => {
- const resources: Array<[string, { contentType: ContentType; content: string }]> = [
+ const resources: Array<[string, { contentType: "text" | "binary"; content: string }]> = [
[
"loan-pre-qualification.dmn",
- { content: await files.getFile(ExternalFile.LOAN_PRE_QUALIFICATION_DMN), contentType: ContentType.TEXT },
- ],
- [
- "path1/can-drive.dmn",
- { content: await files.getFile(ExternalFile.CAN_DRIVE_DMN), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.LOAN_PRE_QUALIFICATION_DMN), contentType: "text" },
],
+ ["path1/can-drive.dmn", { content: await files.getFile(ExternalFile.CAN_DRIVE_DMN), contentType: "text" }],
[
"path2/find-employees.dmn",
- { content: await files.getFile(ExternalFile.FIND_EMPLOYEES_DMN), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.FIND_EMPLOYEES_DMN), contentType: "text" },
],
- ["path3/types.dmn", { content: await files.getFile(ExternalFile.TYPES_DMN), contentType: ContentType.TEXT }],
+ ["path3/types.dmn", { content: await files.getFile(ExternalFile.TYPES_DMN), contentType: "text" }],
[
"path1/pmml/scorecard.pmml",
- { content: await files.getFile(ExternalFile.SCORECARD_PMML), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.SCORECARD_PMML), contentType: "text" },
],
];
@@ -94,26 +84,20 @@ test.describe("DMN Editor - Standalone - Resources", () => {
});
test("should list all resources on same parent path", async ({ editor, files }) => {
- const resources: Array<[string, { contentType: ContentType; content: string }]> = [
+ const resources: Array<[string, { contentType: "text" | "binary"; content: string }]> = [
[
"loan-pre-qualification.dmn",
- { content: await files.getFile(ExternalFile.LOAN_PRE_QUALIFICATION_DMN), contentType: ContentType.TEXT },
- ],
- [
- "path1/can-drive.dmn",
- { content: await files.getFile(ExternalFile.CAN_DRIVE_DMN), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.LOAN_PRE_QUALIFICATION_DMN), contentType: "text" },
],
+ ["path1/can-drive.dmn", { content: await files.getFile(ExternalFile.CAN_DRIVE_DMN), contentType: "text" }],
[
"path2/find-employees.dmn",
- { content: await files.getFile(ExternalFile.FIND_EMPLOYEES_DMN), contentType: ContentType.TEXT },
- ],
- [
- "path3/types/types.dmn",
- { content: await files.getFile(ExternalFile.TYPES_DMN), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.FIND_EMPLOYEES_DMN), contentType: "text" },
],
+ ["path3/types/types.dmn", { content: await files.getFile(ExternalFile.TYPES_DMN), contentType: "text" }],
[
"path1/pmml/scorecard.pmml",
- { content: await files.getFile(ExternalFile.SCORECARD_PMML), contentType: ContentType.TEXT },
+ { content: await files.getFile(ExternalFile.SCORECARD_PMML), contentType: "text" },
],
];
diff --git a/packages/dmn-editor/jest.config.js b/packages/dmn-editor/jest.config.js
new file mode 100644
index 00000000000..cd848227e0f
--- /dev/null
+++ b/packages/dmn-editor/jest.config.js
@@ -0,0 +1,30 @@
+/*
+ * 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, babelTransform, typescriptTransform } = require("@kie-tools/jest-base/jest.config");
+
+/** @type {import('ts-jest').JestConfigWithTsJest} */
+module.exports = {
+ ...config,
+ testEnvironment: "node",
+ transform: {
+ ...babelTransform,
+ ...typescriptTransform,
+ },
+};
diff --git a/packages/dmn-editor/package.json b/packages/dmn-editor/package.json
index bd9de788abc..a7328dac98e 100644
--- a/packages/dmn-editor/package.json
+++ b/packages/dmn-editor/package.json
@@ -18,13 +18,14 @@
],
"scripts": {
"build:dev": "rimraf dist && pnpm copy:css && tsc -p tsconfig.json",
- "build:prod": "rimraf dist && pnpm copy:css && pnpm lint && tsc -p tsconfig.json && pnpm test-e2e",
+ "build:prod": "rimraf dist && pnpm copy:css && pnpm lint && tsc -p tsconfig.json && pnpm test-e2e && pnpm test",
"build:storybook": "storybook build -o dist-storybook",
"copy:css": "copyfiles -u 1 \"src/**/*.{sass,scss,css}\" dist/",
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"",
"start": "run-script-os",
"start:linux:darwin": "cross-env STORYBOOK_PORT=$(build-env dmnEditor.storybook.port) pnpm kie-tools--storybook --storybookArgs=\"dev --no-open\"",
"start:win32": "pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env dmnEditor.storybook.port) pnpm kie-tools--storybook --storybookArgs='dev --no-open'",
+ "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"",
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"",
"test-e2e:open": "pnpm exec playwright show-report dist-tests-e2e/reports",
"test-e2e:run": "pnpm exec playwright test"
@@ -53,8 +54,6 @@
"fast-deep-equal": "^3.1.3",
"immer": "^10.0.3",
"moment": "^2.29.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-error-boundary": "^4.0.11",
"reactflow": "^11.8.3",
"uuid": "^8.3.2",
@@ -67,6 +66,7 @@
"@babel/preset-typescript": "^7.22.5",
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/eslint": "workspace:*",
+ "@kie-tools/jest-base": "workspace:*",
"@kie-tools/playwright-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/storybook-base": "workspace:*",
@@ -81,6 +81,8 @@
"@storybook/react-webpack5": "^7.3.2",
"@types/d3-drag": "^3.0.3",
"@types/d3-selection": "^3.0.6",
+ "@types/jest": "^29.5.12",
+ "@types/jest-when": "^3.5.5",
"@types/lodash": "^4.14.168",
"@types/node": "^20.14.2",
"@types/react": "^17.0.6",
@@ -91,15 +93,23 @@
"cross-env": "^7.0.3",
"deep-object-diff": "^1.1.9",
"file-loader": "^6.2.0",
+ "jest": "^29.7.0",
+ "jest-junit": "^16.0.0",
+ "jest-when": "^3.6.0",
"lodash": "^4.17.21",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"start-server-and-test": "^2.0.3",
"storybook": "^7.3.2",
+ "ts-jest": "^29.1.5",
"typescript": "^5.5.3",
"webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dmn-editor/src/DmnEditor.tsx b/packages/dmn-editor/src/DmnEditor.tsx
index 7739a0cbf7c..766c08146cb 100644
--- a/packages/dmn-editor/src/DmnEditor.tsx
+++ b/packages/dmn-editor/src/DmnEditor.tsx
@@ -399,7 +399,9 @@ export const DmnEditorInternal = ({
- {navigationTab === DmnEditorTab.INCLUDED_MODELS && }
+
+ {navigationTab === DmnEditorTab.INCLUDED_MODELS && }
+
diff --git a/packages/dmn-editor/src/autolayout/AutolayoutButton.tsx b/packages/dmn-editor/src/autolayout/AutolayoutButton.tsx
index c1a09f169eb..0b1be461482 100644
--- a/packages/dmn-editor/src/autolayout/AutolayoutButton.tsx
+++ b/packages/dmn-editor/src/autolayout/AutolayoutButton.tsx
@@ -57,7 +57,10 @@ export function AutolayoutButton() {
__readonly_parentNodesById,
__readonly_drdIndex: s.computed(s).getDrdIndex(),
__readonly_dmnObjectNamespace: s.dmn.model.definitions["@_namespace"],
- __readonly_externalDmnsIndex: s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace).dmns,
+ __readonly_externalDmnsIndex: s
+ .computed(s)
+ .getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns,
+ __readonly_externalModelsByNamespace: externalModelsByNamespace,
});
});
}, [dmnEditorStoreApi, externalModelsByNamespace]);
diff --git a/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx b/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx
index 18c7be1da75..5e4fb2ab5e9 100644
--- a/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx
+++ b/packages/dmn-editor/src/boxedExpressions/BoxedExpressionScreen.tsx
@@ -89,18 +89,17 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec
const dmnEditorStoreApi = useDmnEditorStoreApi();
const thisDmn = useDmnEditorStore((s) => s.dmn);
- const diagram = useDmnEditorStore((s) => s.diagram);
const activeDrgElementId = useDmnEditorStore((s) => s.boxedExpressionEditor.activeDrgElementId);
const isPropertiesPanelOpen = useDmnEditorStore((s) => s.boxedExpressionEditor.propertiesPanel.isOpen);
const externalDmnsByNamespace = useDmnEditorStore(
- (s) => s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace).dmns
+ (s) => s.computed(s).getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns
);
const dataTypesTree = useDmnEditorStore((s) => s.computed(s).getDataTypes(externalModelsByNamespace).dataTypesTree);
const importsByNamespace = useDmnEditorStore((s) => s.computed(s).importsByNamespace());
const externalPmmlsByNamespace = useDmnEditorStore(
- (s) => s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace).pmmls
+ (s) => s.computed(s).getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).pmmls
);
const isAlternativeInputDataShape = useDmnEditorStore((s) => s.computed(s).isAlternativeInputDataShape());
const drdIndex = useDmnEditorStore((s) => s.computed(s).getDrdIndex());
diff --git a/packages/dmn-editor/src/diagram/Diagram.tsx b/packages/dmn-editor/src/diagram/Diagram.tsx
index 123aba83e25..9dbd0fe75a2 100644
--- a/packages/dmn-editor/src/diagram/Diagram.tsx
+++ b/packages/dmn-editor/src/diagram/Diagram.tsx
@@ -216,7 +216,7 @@ export const Diagram = React.forwardRef {
@@ -990,8 +994,9 @@ export const Diagram = React.forwardRef ({ ...s, __$$element: "dmndi:DMNShape" as const })));
- diagramElements.push(...clipboard.edges.map((s) => ({ ...s, __$$element: "dmndi:DMNEdge" as const })));
+ diagramElements.push(
+ ...clipboard.shapes.map((s) => ({
+ ...s,
+ __$$element: "dmndi:DMNShape" as const,
+ }))
+ );
+ diagramElements.push(
+ ...clipboard.edges.map((s) => ({
+ ...s,
+ __$$element: "dmndi:DMNEdge" as const,
+ }))
+ );
widths.push(...clipboard.widths);
- repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions: state.dmn.model.definitions });
+ repopulateInputDataAndDecisionsOnAllDecisionServices({
+ definitions: state.dmn.model.definitions,
+ externalModelsByNamespace,
+ });
state.diagram._selectedNodes = [...clipboard.drgElements, ...clipboard.artifacts].map((s) =>
buildXmlHref({ id: s["@_id"]! })
@@ -256,7 +271,7 @@ export function DiagramCommands(props: {}) {
});
});
};
- }, [dmnEditorStoreApi, commandsRef]);
+ }, [dmnEditorStoreApi, commandsRef, externalModelsByNamespace]);
// Select/deselect all nodes
useEffect(() => {
@@ -317,12 +332,13 @@ export function DiagramCommands(props: {}) {
padding: CONTAINER_NODES_DESIRABLE_PADDING,
}),
},
+ externalModelsByNamespace,
});
state.dispatch(state).diagram.setNodeStatus(newNodeId, { selected: true });
});
};
- }, [dmnEditorStoreApi, commandsRef, rf]);
+ }, [dmnEditorStoreApi, commandsRef, rf, externalModelsByNamespace]);
// Toggle hierarchy highlights
useEffect(() => {
@@ -369,7 +385,7 @@ export function DiagramCommands(props: {}) {
canRemoveNodeFromDrdOnly({
__readonly_externalDmnsIndex: state
.computed(state)
- .getExternalModelTypesByNamespace(externalModelsByNamespace).dmns,
+ .getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns,
definitions: state.dmn.model.definitions,
__readonly_drdIndex: state.computed(state).getDrdIndex(),
__readonly_dmnObjectNamespace:
@@ -380,7 +396,7 @@ export function DiagramCommands(props: {}) {
canRemoveNodeFromDrdOnly({
__readonly_externalDmnsIndex: state
.computed(state)
- .getExternalModelTypesByNamespace(externalModelsByNamespace).dmns,
+ .getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns,
definitions: state.dmn.model.definitions,
__readonly_drdIndex: state.computed(state).getDrdIndex(),
__readonly_dmnObjectNamespace:
@@ -393,8 +409,12 @@ export function DiagramCommands(props: {}) {
drdIndex: state.computed(state).getDrdIndex(),
edge: { id: edge.id, dmnObject: edge.data!.dmnObject },
mode: EdgeDeletionMode.FROM_CURRENT_DRD_ONLY,
+ externalModelsByNamespace,
+ });
+ state.dispatch(state).diagram.setEdgeStatus(edge.id, {
+ selected: false,
+ draggingWaypoint: false,
});
- state.dispatch(state).diagram.setEdgeStatus(edge.id, { selected: false, draggingWaypoint: false });
}
}
@@ -406,15 +426,16 @@ export function DiagramCommands(props: {}) {
const { deletedDmnShapeOnCurrentDrd: deletedShape } = deleteNode({
definitions: state.dmn.model.definitions,
__readonly_drgEdges: [], // Deleting from DRD only.
- __readonly_externalModelTypesByNamespace: state
+ __readonly_externalDmnsIndex: state
.computed(state)
- .getExternalModelTypesByNamespace(externalModelsByNamespace),
+ .getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns,
__readonly_drdIndex: state.computed(state).getDrdIndex(),
__readonly_dmnObjectNamespace: node.data.dmnObjectNamespace ?? state.dmn.model.definitions["@_namespace"],
__readonly_dmnObjectQName: node.data.dmnObjectQName,
__readonly_dmnObjectId: node.data.dmnObject?.["@_id"],
__readonly_nodeNature: nodeNatures[node.type as NodeType],
- mode: NodeDeletionMode.FROM_CURRENT_DRD_ONLY,
+ __readonly_mode: NodeDeletionMode.FROM_CURRENT_DRD_ONLY,
+ __readonly_externalModelsByNamespace: externalModelsByNamespace,
});
if (deletedShape) {
diff --git a/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx b/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx
index 66b9903f8a4..2391eda1e09 100644
--- a/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx
+++ b/packages/dmn-editor/src/diagram/DrgNodesPanel.tsx
@@ -61,8 +61,7 @@ export function DrgNodesPanel() {
const containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn = useMemo(
() =>
computeContainingDecisionServiceHrefsByDecisionHrefs({
- drgElements: thisDmnsDrgElements,
- drgElementsNamespace: thisDmnsNamespace,
+ drgElementsByNamespace: new Map([[thisDmnsNamespace, thisDmnsDrgElements]]),
thisDmnsNamespace: thisDmnsNamespace,
}),
[thisDmnsDrgElements, thisDmnsNamespace]
diff --git a/packages/dmn-editor/src/diagram/Palette.tsx b/packages/dmn-editor/src/diagram/Palette.tsx
index 64f74263bc9..1bfed0c65d0 100644
--- a/packages/dmn-editor/src/diagram/Palette.tsx
+++ b/packages/dmn-editor/src/diagram/Palette.tsx
@@ -49,6 +49,7 @@ import { useInViewSelect } from "../responsiveness/useInViewSelect";
import { useDmnEditor } from "../DmnEditorContext";
import { getDrdId } from "./drd/drdId";
import { useSettings } from "../settings/DmnEditorSettingsContext";
+import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext";
export const MIME_TYPE_FOR_DMN_EDITOR_NEW_NODE_FROM_PALETTE = "application/kie-dmn-editor--new-node-from-palette";
@@ -65,6 +66,7 @@ export function Palette({ pulse }: { pulse: boolean }) {
const rfStoreApi = RF.useStoreApi();
const isAlternativeInputDataShape = useDmnEditorStore((s) => s.computed(s).isAlternativeInputDataShape());
const drdIndex = useDmnEditorStore((s) => s.computed(s).getDrdIndex());
+ const { externalModelsByNamespace } = useExternalModels();
const settings = useSettings();
const groupNodes = useCallback(() => {
@@ -88,11 +90,12 @@ export function Palette({ pulse }: { pulse: boolean }) {
padding: CONTAINER_NODES_DESIRABLE_PADDING,
}),
},
+ externalModelsByNamespace,
});
state.dispatch(state).diagram.setNodeStatus(newNodeId, { selected: true });
});
- }, [dmnEditorStoreApi, rfStoreApi]);
+ }, [dmnEditorStoreApi, externalModelsByNamespace, rfStoreApi]);
const drd = thisDmn.definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"]?.[drdIndex];
@@ -101,6 +104,10 @@ export function Palette({ pulse }: { pulse: boolean }) {
const { maxHeight } = useInViewSelect(dmnEditorRootElementRef, nodesPalletePopoverRef);
+ const clearCurrentFocusToAllowDraggingNewNode = useCallback(() => {
+ (document.activeElement as any)?.blur?.();
+ }, []);
+
return (
<>
@@ -162,7 +169,11 @@ export function Palette({ pulse }: { pulse: boolean }) {
{!settings.isReadOnly && (
-
+
{diagram.openLhsPanel === DiagramLhsPanel.EXTERNAL_NODES && (
-
+
)}
diff --git a/packages/dmn-editor/src/diagram/connections/isValidConnection.ts b/packages/dmn-editor/src/diagram/connections/isValidConnection.ts
index 3dbfb06a61b..94fcd75f31d 100644
--- a/packages/dmn-editor/src/diagram/connections/isValidConnection.ts
+++ b/packages/dmn-editor/src/diagram/connections/isValidConnection.ts
@@ -39,14 +39,18 @@ export function checkIsValidConnection(
export function _checkIsValidConnection(
sourceNode: { type?: string; data: DmnDiagramNodeData } | undefined,
targetNode: { type?: string; data: DmnDiagramNodeData } | undefined,
- edgeType: string | null | undefined
+ edgeType: string | null | undefined,
+ extraArg?: { allowExternalTarget: boolean }
) {
if (!sourceNode?.type || !targetNode?.type || !edgeType) {
return false;
}
- // External nodes cannot be targeted
- if (targetNode.data.dmnObjectQName.prefix) {
+ // External nodes cannot be targeted by default
+ // However there are exceptions, for example adding a waypoint on the edge
+ const targetsExternalNode = targetNode.data.dmnObjectQName.prefix !== undefined;
+ const allowExternalTarget = extraArg?.allowExternalTarget ?? false;
+ if (targetsExternalNode && !allowExternalTarget) {
return false;
}
diff --git a/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts b/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts
index 1a80d491a4b..d63d5014afd 100644
--- a/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts
+++ b/packages/dmn-editor/src/diagram/edges/usePotentialWaypointControls.ts
@@ -25,6 +25,12 @@ import { snapPoint } from "../SnapGrid";
import { DC__Point } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { DmnDiagramNodeData } from "../nodes/Nodes";
import { DmnDiagramEdgeData } from "./Edges";
+import { useExternalModels } from "../../includedModels/DmnEditorDependenciesContext";
+import { addEdge } from "../../mutations/addEdge";
+import { EdgeType, NodeType } from "../connections/graphStructure";
+import { PositionalNodeHandleId } from "../connections/PositionalNodeHandles";
+import { getHandlePosition } from "../maths/DmnMaths";
+import { xmlHrefToQName } from "../../xml/xmlHrefToQName";
export function usePotentialWaypointControls(
waypoints: DC__Point[],
@@ -38,6 +44,7 @@ export function usePotentialWaypointControls(
const isDraggingWaypoint = useDmnEditorStore((s) => !!s.diagram.draggingWaypoints.find((e) => e === edgeId));
const dmnEditorStoreApi = useDmnEditorStoreApi();
const reactFlowInstance = RF.useReactFlow
();
+ const { externalModelsByNamespace } = useExternalModels();
const [potentialWaypoint, setPotentialWaypoint] = useState | undefined>(
undefined
@@ -74,12 +81,83 @@ export function usePotentialWaypointControls(
}, [snapGrid, potentialWaypoint]);
const onDoubleClick = useCallback(() => {
- if (!potentialWaypoint || !snappedPotentialWaypoint || edgeIndex === undefined) {
+ if (!potentialWaypoint || !snappedPotentialWaypoint) {
return;
}
+ if (edgeIndex === undefined) {
+ /**
+ * This means we are adding a first waypoint to one of following edges:
+ * - an edge in a non default DRD
+ * - an edge targeting an external node
+ */
+ dmnEditorStoreApi.setState((state) => {
+ const nodesById = state.computed(state).getDiagramData(externalModelsByNamespace).nodesById;
+ const edge = state.computed(state).getDiagramData(externalModelsByNamespace).edgesById.get(edgeId);
+ if (edge === undefined || edge.data?.dmnShapeSource === undefined || edge.data?.dmnShapeTarget == undefined) {
+ console.debug(
+ `DMN DIAGRAM: We can not add DMNEdge for '${edgeId}' edge into diagram. There are missing data edge: ${edge}, edge.data: ${edge?.data}`
+ );
+ return;
+ }
+
+ const edgeSourceBounds = edge.data?.dmnShapeSource["dc:Bounds"];
+ const edgeTargetBounds = edge.data?.dmnShapeTarget["dc:Bounds"];
+ if (edgeSourceBounds === undefined || edgeTargetBounds === undefined) {
+ console.debug(
+ `DMN DIAGRAM: We can not add DMNEdge for '${edgeId}' edge into diagram. There are missing data edgeSourceBounds: ${edgeSourceBounds}, edgeTargetBounds: ${edgeTargetBounds}`
+ );
+ return;
+ }
+
+ const sourceNode = nodesById.get(edge.source);
+ const targetNode = nodesById.get(edge.target);
+ if (sourceNode === undefined || targetNode === undefined) {
+ console.debug(
+ `DMN DIAGRAM: We can not add DMNEdge for '${edgeId}' edge into diagram. There are missing data sourceNode: ${sourceNode}, targetNode: ${targetNode}`
+ );
+ return;
+ }
+
+ const targetsExternalNode = targetNode.data.dmnObjectQName.prefix !== undefined;
+ const requirementEdgeQNameRelativeToThisDmn = xmlHrefToQName(edgeId, state.dmn.model.definitions);
+ addEdge({
+ definitions: state.dmn.model.definitions,
+ drdIndex: state.computed(state).getDrdIndex(),
+ edge: {
+ type: edge.type as EdgeType,
+ targetHandle: getHandlePosition({ shapeBounds: edgeTargetBounds, waypoint: snappedPotentialWaypoint })
+ .handlePosition as PositionalNodeHandleId,
+ sourceHandle: getHandlePosition({ shapeBounds: edgeSourceBounds, waypoint: snappedPotentialWaypoint })
+ .handlePosition as PositionalNodeHandleId,
+ autoPositionedEdgeMarker: undefined,
+ },
+ sourceNode: {
+ type: sourceNode.type as NodeType,
+ data: sourceNode.data,
+ href: edge.source,
+ bounds: edgeSourceBounds,
+ shapeId: edge.data?.dmnShapeSource["@_id"],
+ },
+ targetNode: {
+ type: targetNode.type as NodeType,
+ href: edge.target,
+ data: targetNode.data,
+ bounds: edgeTargetBounds,
+ index: nodesById.get(edge.target)?.data.index ?? 0,
+ shapeId: edge.data?.dmnShapeTarget["@_id"],
+ },
+ keepWaypoints: false,
+ externalModelsByNamespace,
+ dmnElementRefOfDmnEdge: targetsExternalNode ? requirementEdgeQNameRelativeToThisDmn : undefined,
+ });
+
+ console.debug(`DMN DIAGRAM: DMNEdge for '${edgeId}' edge was added into diagram.`);
+ });
+ }
+
if (isExistingWaypoint(snappedPotentialWaypoint)) {
- console.debug("Preventing overlapping waypoint creation.");
+ console.debug("DMN DIAGRAM: Preventing overlapping waypoint creation.");
return;
}
@@ -96,18 +174,27 @@ export function usePotentialWaypointControls(
}
dmnEditorStoreApi.setState((state) => {
+ const edgeQName = xmlHrefToQName(edgeId, state.dmn.model.definitions);
+ const dmnEdgeIndex = state.computed(state).indexedDrd().dmnEdgesByDmnElementRef.get(edgeQName)?.index;
+ if (dmnEdgeIndex === undefined) {
+ throw new Error(`DMN DIAGRAM: Diagram computed state does not contain DMNEdge for '${edgeId}' edge.`);
+ }
addEdgeWaypoint({
definitions: state.dmn.model.definitions,
drdIndex,
beforeIndex: i - 1,
- edgeIndex,
+ dmnEdgeIndex,
waypoint: snappedPotentialWaypoint,
});
+
+ console.debug(`DMN DIAGRAM: Waypoint on the DMNEdge for '${edgeId}' edge was added.`);
});
}, [
drdIndex,
dmnEditorStoreApi,
+ edgeId,
edgeIndex,
+ externalModelsByNamespace,
isExistingWaypoint,
potentialWaypoint,
snappedPotentialWaypoint,
diff --git a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx
index 3c0e362f9bd..9da807bfcc8 100644
--- a/packages/dmn-editor/src/diagram/nodes/Nodes.tsx
+++ b/packages/dmn-editor/src/diagram/nodes/Nodes.tsx
@@ -939,7 +939,7 @@ export const DecisionServiceNode = React.memo(
__readonly_dmnObjectNamespace: dmnObjectNamespace,
__readonly_externalDmnsIndex: state
.computed(state)
- .getExternalModelTypesByNamespace(externalModelsByNamespace).dmns,
+ .getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns,
shapeIndex: shape.index,
localYPosition: e.y,
snapGrid: state.diagram.snapGrid,
diff --git a/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx b/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx
index 85423717aba..b21e543428b 100644
--- a/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx
+++ b/packages/dmn-editor/src/externalNodes/DmnObjectListItem.tsx
@@ -31,6 +31,8 @@ import { useDmnEditorStore } from "../store/StoreContext";
import { useExternalModels } from "../includedModels/DmnEditorDependenciesContext";
import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec";
import { Normalized } from "../normalization/normalize";
+import { Tooltip } from "@patternfly/react-core/dist/js/components/Tooltip";
+import { NODE_TYPES } from "../diagram/nodes/NodeTypes";
export function DmnObjectListItem({
dmnObject,
@@ -50,14 +52,70 @@ export function DmnObjectListItem({
);
const isAlternativeInputDataShape = useDmnEditorStore((s) => s.computed(s).isAlternativeInputDataShape());
- const displayName = dmnObject
- ? buildFeelQNameFromNamespace({
- namedElement: dmnObject,
- importsByNamespace,
- namespace,
- relativeToNamespace,
- }).full
- : dmnObjectHref;
+ // The dmnObject represented here can be a node from a 3rd model that is not included in this model.
+ // For example, consider a "Local Decision Service" with an encapsulated "Decision-A" from "Model A",
+ // but that "Decision-A" have an "Input-B" that is from "Model B", which is not included in local model.
+ //
+ // Model Name: Local Model.dmn
+ // Nodes: Local Decision Service
+ // Included Models: Model-A.dmn
+ //
+ // Model Name: Model-A.dmn
+ // Nodes: Decision-A
+ // Included Models: Model-B.dmn
+ //
+ // Model Name: Model-B.dmn
+ // Nodes: Input-B
+ // Included Models: [none]
+ //
+ // So, the "Local Model" only "knows" the nodes from "Model-A" and NOT from "Model-B".
+ // That's why we have different logic to build description for "known dmnObjects" and "unknown dmnObjects".
+ const isNamespaceDirectlyIncluded = useMemo(
+ () => namespace === relativeToNamespace || importsByNamespace.has(namespace),
+ [importsByNamespace, namespace, relativeToNamespace]
+ );
+
+ const transitivelyIncludedNamespaceDescription = useMemo(() => {
+ return `${namespace.substring(0, 11)}...${namespace.substring(namespace.length - 4)}`;
+ }, [namespace]);
+
+ const displayName = useMemo(
+ () =>
+ dmnObject && isNamespaceDirectlyIncluded
+ ? buildFeelQNameFromNamespace({
+ namedElement: dmnObject,
+ importsByNamespace,
+ namespace,
+ relativeToNamespace,
+ }).full
+ : dmnObject?.["@_name"],
+ [dmnObject, importsByNamespace, isNamespaceDirectlyIncluded, namespace, relativeToNamespace]
+ );
+
+ const nodeTypeTooltipDescription = useMemo(() => {
+ if (dmnObject === undefined) {
+ throw new Error("nodeTypeDescription can't be defined without a DMN object");
+ }
+ const nodeType = getNodeTypeFromDmnObject(dmnObject);
+ if (nodeType === undefined) {
+ throw new Error("Can't determine nodeTypeDescription with undefined node type");
+ }
+ if (nodeType === NODE_TYPES.decision) {
+ return "Decision";
+ } else if (nodeType === NODE_TYPES.inputData) {
+ return "Input Data";
+ } else {
+ return "Unknown";
+ }
+ }, [dmnObject]);
+
+ const toolTip = useMemo(() => {
+ return dmnObject && isNamespaceDirectlyIncluded ? (
+ {displayName}
+ ) : (
+ {`This ${nodeTypeTooltipDescription} node is from an external model that is not included in this one. Namespace: ${namespace}`}
+ );
+ }, [displayName, dmnObject, isNamespaceDirectlyIncluded, namespace, nodeTypeTooltipDescription]);
const isValid = useDmnEditorStore((s) =>
DMN15_SPEC.namedElement.isValidName(
@@ -81,32 +139,42 @@ export function DmnObjectListItem({
return !dmnObject ? (
<>{dmnObjectHref}>
) : (
-
-
-
-
- {`${displayName}`}
-
- {dmnObject.__$$element !== "knowledgeSource" ? (
- <>
-
-
- >
- ) : (
- <>>
+
+
+
+
+
+ {!isNamespaceDirectlyIncluded && (
+ {`${transitivelyIncludedNamespaceDescription}.`}
)}
-
-
+ {`${displayName}`}
+
+ {dmnObject.__$$element !== "knowledgeSource" ? (
+ <>
+
+
+ >
+ ) : (
+ <>>
+ )}
+
+
+
);
}
diff --git a/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx b/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx
index f30a5c7b437..2cb1ceb5dbf 100644
--- a/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx
+++ b/packages/dmn-editor/src/externalNodes/ExternalNodesPanel.tsx
@@ -54,7 +54,7 @@ export function ExternalNodesPanel() {
const importsByNamespace = useDmnEditorStore((s) => s.computed(s).importsByNamespace());
const { externalModelsByNamespace } = useExternalModels();
const externalDmnsByNamespace = useDmnEditorStore(
- (s) => s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace).dmns
+ (s) => s.computed(s).getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns
);
const dmnShapesByHref = useDmnEditorStore((s) => s.computed(s).indexedDrd().dmnShapesByHref);
const { onRequestToResolvePath } = useDmnEditor();
@@ -136,7 +136,7 @@ export function ExternalNodesPanel() {
const _import = importsByNamespace.get(namespace);
if (!_import) {
console.debug(
- `DMN EDITOR: Couldn't find import for namespace '${namespace}', although there's an external DMN referncing it.`
+ `DMN EDITOR: Couldn't find import for namespace '${namespace}', although there's an external DMN referencing it.`
);
return [];
}
@@ -159,6 +159,7 @@ export function ExternalNodesPanel() {
externalDrgElementId: drgElement["@_id"]!,
})
}
+ data-testid={`kie-tools--dmn-editor--external-node-${_import["@_name"] === "" ? _import["@_id"] : _import["@_name"]}-${drgElement["@_name"]}`}
>
cancel()}
title={"Include model"}
@@ -466,11 +467,12 @@ function IncludedModelCard({
dmnEditorStoreApi.setState((state) => {
const externalModelTypesByNamespace = state
.computed(state)
- .getExternalModelTypesByNamespace(externalModelsByNamespace);
+ .getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace);
deleteImport({
definitions: state.dmn.model.definitions,
__readonly_index: index,
__readonly_externalModelTypesByNamespace: externalModelTypesByNamespace,
+ __readonly_externalModelsByNamespace: externalModelsByNamespace,
});
});
},
diff --git a/packages/dmn-editor/src/mutations/addConnectedNode.ts b/packages/dmn-editor/src/mutations/addConnectedNode.ts
index 75868d7f355..6bd26ba3173 100644
--- a/packages/dmn-editor/src/mutations/addConnectedNode.ts
+++ b/packages/dmn-editor/src/mutations/addConnectedNode.ts
@@ -38,6 +38,7 @@ import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServic
import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService";
import { buildXmlHref } from "../xml/xmlHrefs";
import { Normalized } from "../normalization/normalize";
+import { ExternalModelsIndex } from "../DmnEditor";
export function addConnectedNode({
definitions,
@@ -45,12 +46,14 @@ export function addConnectedNode({
sourceNode,
newNode,
edgeType,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
drdIndex: number;
sourceNode: { type: NodeType; href: string; bounds: DC__Bounds; shapeId: string | undefined };
newNode: { type: NodeType; bounds: DC__Bounds };
edgeType: EdgeType;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
const newDmnObjectId = generateUuid();
const newDmnObjectHref = buildXmlHref({ id: newDmnObjectId });
@@ -171,7 +174,7 @@ export function addConnectedNode({
"di:waypoint": [getDmnBoundsCenterPoint(sourceNode.bounds), getDmnBoundsCenterPoint(newNode.bounds)],
});
- repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions });
+ repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions, externalModelsByNamespace });
return { id: newDmnObjectId, href: newDmnObjectHref };
}
diff --git a/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts b/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts
index 6bd3055581f..18c45243d80 100644
--- a/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts
+++ b/packages/dmn-editor/src/mutations/addDecisionToDecisionService.ts
@@ -25,25 +25,52 @@ import { SnapGrid } from "../store/Store";
import { MIN_NODE_SIZES } from "../diagram/nodes/DefaultSizes";
import { NODE_TYPES } from "../diagram/nodes/NodeTypes";
import { Normalized } from "../normalization/normalize";
+import { ExternalModelsIndex } from "../DmnEditor";
+import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs";
+import { DmnLatestModel } from "@kie-tools/dmn-marshaller/dist";
+import { xmlHrefToQName } from "../xml/xmlHrefToQName";
export function addDecisionToDecisionService({
definitions,
- decisionId,
+ decisionHref,
decisionServiceId,
drdIndex,
snapGrid,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
- decisionId: string;
+ decisionHref: string;
decisionServiceId: string;
drdIndex: number;
snapGrid: SnapGrid;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
- console.debug(`DMN MUTATION: Adding Decision '${decisionId}' to Decision Service '${decisionServiceId}'`);
+ console.debug(`DMN MUTATION: Adding Decision '${decisionHref}' to Decision Service '${decisionServiceId}'`);
- const decision = definitions.drgElement?.find((s) => s["@_id"] === decisionId);
- if (decision?.__$$element !== "decision") {
- throw new Error(`DMN MUTATION: DRG Element with id '${decisionId}' is either not a Decision or doesn't exist.`);
+ const href = parseXmlHref(decisionHref);
+
+ if (href.namespace) {
+ const externalModel = externalModelsByNamespace?.[href.namespace];
+ if (!externalModel) {
+ throw new Error(`DMN MUTATION: Namespace '${href.namespace}' not found.`);
+ }
+
+ if (externalModel?.type !== "dmn") {
+ throw new Error(`DMN MUTATION: External model with namespace ${href.namespace} is not a DMN.`);
+ }
+
+ const externalDrgs = externalModel.model.definitions.drgElement;
+ const decision = externalDrgs?.find((drgElement) => drgElement["@_id"] === href.id);
+ if (decision?.__$$element !== "decision") {
+ throw new Error(
+ `DMN MUTATION: DRG Element with id '${href.id}' is either not a Decision or doesn't exist in the external model '${href.namespace}'`
+ );
+ }
+ } else {
+ const decision = definitions.drgElement?.find((s) => s["@_id"] === href.id);
+ if (decision?.__$$element !== "decision") {
+ throw new Error(`DMN MUTATION: DRG Element with id '${href.id}' is either not a Decision or doesn't exist.`);
+ }
}
const decisionService = definitions.drgElement?.find((s) => s["@_id"] === decisionServiceId);
@@ -54,8 +81,10 @@ export function addDecisionToDecisionService({
}
const diagram = addOrGetDrd({ definitions, drdIndex });
+ const dmnElementRef = xmlHrefToQName(decisionHref, definitions);
+
const decisionShape = diagram.diagramElements.find(
- (s) => s["@_dmnElementRef"] === decisionId && s.__$$element === "dmndi:DMNShape"
+ (s) => s["@_dmnElementRef"] === dmnElementRef && s.__$$element === "dmndi:DMNShape"
) as Normalized;
const decisionServiceShape = diagram.diagramElements.find(
@@ -65,15 +94,15 @@ export function addDecisionToDecisionService({
const section = getSectionForDecisionInsideDecisionService({ decisionShape, decisionServiceShape, snapGrid });
if (section === "encapsulated") {
decisionService.encapsulatedDecision ??= [];
- decisionService.encapsulatedDecision.push({ "@_href": `#${decisionId}` });
+ decisionService.encapsulatedDecision.push({ "@_href": `${decisionHref}` });
} else if (section === "output") {
decisionService.outputDecision ??= [];
- decisionService.outputDecision.push({ "@_href": `#${decisionId}` });
+ decisionService.outputDecision.push({ "@_href": `${decisionHref}` });
} else {
throw new Error(`DMN MUTATION: Invalid section to add decision to: '${section}' `);
}
- repopulateInputDataAndDecisionsOnDecisionService({ definitions, decisionService });
+ repopulateInputDataAndDecisionsOnDecisionService({ definitions, decisionService, externalModelsByNamespace });
}
export function getSectionForDecisionInsideDecisionService({
diff --git a/packages/dmn-editor/src/mutations/addEdge.ts b/packages/dmn-editor/src/mutations/addEdge.ts
index 14e549433f9..b45591a26a9 100644
--- a/packages/dmn-editor/src/mutations/addEdge.ts
+++ b/packages/dmn-editor/src/mutations/addEdge.ts
@@ -27,7 +27,6 @@ import {
DMN15__tInformationRequirement,
DMN15__tKnowledgeRequirement,
DMNDI15__DMNEdge,
- DMNDI15__DMNShape,
} from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { PositionalNodeHandleId } from "../diagram/connections/PositionalNodeHandles";
import { EdgeType, NodeType } from "../diagram/connections/graphStructure";
@@ -41,6 +40,7 @@ import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopula
import { DmnDiagramNodeData } from "../diagram/nodes/Nodes";
import { AutoPositionedEdgeMarker } from "../diagram/edges/AutoPositionedEdgeMarker";
import { Normalized } from "../normalization/normalize";
+import { ExternalModelsIndex } from "../DmnEditor";
export function addEdge({
definitions,
@@ -49,6 +49,8 @@ export function addEdge({
targetNode,
edge,
keepWaypoints,
+ externalModelsByNamespace,
+ dmnElementRefOfDmnEdge,
}: {
definitions: Normalized;
drdIndex: number;
@@ -74,14 +76,18 @@ export function addEdge({
autoPositionedEdgeMarker: AutoPositionedEdgeMarker | undefined;
};
keepWaypoints: boolean;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
+ // QName format, used as dmnElementRef for DMNEdge targeting an external node
+ dmnElementRefOfDmnEdge?: string;
}) {
- if (!_checkIsValidConnection(sourceNode, targetNode, edge.type)) {
+ const externalTargetAllowed = dmnElementRefOfDmnEdge !== undefined;
+ if (!_checkIsValidConnection(sourceNode, targetNode, edge.type, { allowExternalTarget: externalTargetAllowed })) {
throw new Error(`DMN MUTATION: Invalid structure: (${sourceNode.type}) --${edge.type}--> (${targetNode.type}) `);
}
const newEdgeId = generateUuid();
- let existingEdgeId: string | undefined = undefined;
+ let existingRequirementOrAssociationId: string | undefined = dmnElementRefOfDmnEdge;
// Associations
if (edge.type === EDGE_TYPES.association) {
@@ -99,17 +105,17 @@ export function addEdge({
definitions.artifact,
(a) => a.__$$element === "association" && areAssociationsEquivalent(a, newAssociation)
);
- existingEdgeId = removed?.["@_id"];
+ existingRequirementOrAssociationId = removed?.["@_id"];
// Replace with the new one.
definitions.artifact?.push({
__$$element: "association",
...newAssociation,
- "@_id": tryKeepingEdgeId(existingEdgeId, newEdgeId),
+ "@_id": tryKeepingEdgeId(existingRequirementOrAssociationId, newEdgeId),
});
}
// Requirements
- else {
+ else if (!externalTargetAllowed) {
const requirements = getRequirementsFromEdge(sourceNode, newEdgeId, edge.type);
const drgElement = definitions.drgElement![targetNode.index] as Normalized; // We cast to tDecision here because it has all three types of requirement.
if (requirements?.informationRequirement) {
@@ -117,11 +123,11 @@ export function addEdge({
const removed = removeFirstMatchIfPresent(drgElement.informationRequirement, (ir) =>
doesInformationRequirementsPointTo(ir, sourceNode.href)
);
- existingEdgeId = removed?.["@_id"];
+ existingRequirementOrAssociationId = removed?.["@_id"];
drgElement.informationRequirement?.push(
...requirements.informationRequirement.map((s) => ({
...s,
- "@_id": tryKeepingEdgeId(existingEdgeId, newEdgeId),
+ "@_id": tryKeepingEdgeId(existingRequirementOrAssociationId, newEdgeId),
}))
);
}
@@ -131,11 +137,11 @@ export function addEdge({
const removed = removeFirstMatchIfPresent(drgElement.knowledgeRequirement, (kr) =>
doesKnowledgeRequirementsPointTo(kr, sourceNode.href)
);
- existingEdgeId = removed?.["@_id"];
+ existingRequirementOrAssociationId = removed?.["@_id"];
drgElement.knowledgeRequirement?.push(
...requirements.knowledgeRequirement.map((s) => ({
...s,
- "@_id": tryKeepingEdgeId(existingEdgeId, newEdgeId),
+ "@_id": tryKeepingEdgeId(existingRequirementOrAssociationId, newEdgeId),
}))
);
}
@@ -145,11 +151,11 @@ export function addEdge({
const removed = removeFirstMatchIfPresent(drgElement.authorityRequirement, (ar) =>
doesAuthorityRequirementsPointTo(ar, sourceNode.href)
);
- existingEdgeId = removed?.["@_id"];
+ existingRequirementOrAssociationId = removed?.["@_id"];
drgElement.authorityRequirement?.push(
...requirements.authorityRequirement.map((s) => ({
...s,
- "@_id": tryKeepingEdgeId(existingEdgeId, newEdgeId),
+ "@_id": tryKeepingEdgeId(existingRequirementOrAssociationId, newEdgeId),
}))
);
}
@@ -160,7 +166,7 @@ export function addEdge({
// Remove existing
const removedDmnEdge = removeFirstMatchIfPresent(
diagramElements,
- (e) => e.__$$element === "dmndi:DMNEdge" && e["@_dmnElementRef"] === existingEdgeId
+ (e) => e.__$$element === "dmndi:DMNEdge" && e["@_dmnElementRef"] === existingRequirementOrAssociationId
) as Normalized | undefined;
const newWaypoints = keepWaypoints
@@ -179,7 +185,7 @@ export function addEdge({
"@_id":
withoutDiscreteAutoPosinitioningMarker(removedDmnEdge?.["@_id"] ?? generateUuid()) +
(edge.autoPositionedEdgeMarker ?? ""),
- "@_dmnElementRef": existingEdgeId ?? newEdgeId,
+ "@_dmnElementRef": existingRequirementOrAssociationId ?? newEdgeId,
"@_sourceElement": sourceNode.shapeId,
"@_targetElement": targetNode.shapeId,
"di:waypoint": newWaypoints,
@@ -188,7 +194,10 @@ export function addEdge({
// Replace with the new one.
diagramElements.push(newDmnEdge);
- repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions });
+ repopulateInputDataAndDecisionsOnAllDecisionServices({
+ definitions,
+ externalModelsByNamespace,
+ });
return { newDmnEdge };
}
@@ -229,6 +238,7 @@ function removeFirstMatchIfPresent(arr: T[], predicate: Parameters["
function tryKeepingEdgeId(existingEdgeId: string | undefined, newEdgeId: string) {
return existingEdgeId ?? newEdgeId;
}
+
function withoutDiscreteAutoPosinitioningMarker(edgeId: string) {
const marker = getDiscreteAutoPositioningEdgeIdMarker(edgeId);
return marker ? edgeId.replace(`${marker}`, "") : edgeId;
diff --git a/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts b/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts
index 282865f0c5e..8331ed9ca56 100644
--- a/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts
+++ b/packages/dmn-editor/src/mutations/addEdgeWaypoint.ts
@@ -24,21 +24,21 @@ import { Normalized } from "../normalization/normalize";
export function addEdgeWaypoint({
definitions,
drdIndex,
- edgeIndex,
+ dmnEdgeIndex,
beforeIndex,
waypoint,
}: {
definitions: Normalized;
drdIndex: number;
- edgeIndex: number;
+ dmnEdgeIndex: number;
beforeIndex: number;
waypoint: DC__Point;
}) {
const { diagramElements } = addOrGetDrd({ definitions, drdIndex });
- const diagramElement = diagramElements[edgeIndex];
+ const diagramElement = diagramElements[dmnEdgeIndex];
if (diagramElement.__$$element !== "dmndi:DMNEdge") {
- throw new Error("DMN MUTATION: Can't remove a waypoint from an element that is not a DMNEdge.");
+ throw new Error("DMN MUTATION: Can't add a waypoint for an element that is not a DMNEdge.");
}
if (beforeIndex > (diagramElement["di:waypoint"]?.length ?? 0) - 1) {
diff --git a/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts b/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts
index 84817732264..dd7ab5281a9 100644
--- a/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts
+++ b/packages/dmn-editor/src/mutations/addExistingDecisionServiceToDrd.ts
@@ -30,7 +30,7 @@ import { Normalized } from "../normalization/normalize";
import { Computed, SnapGrid, State } from "../store/Store";
import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts";
import { computeDiagramData } from "../store/computed/computeDiagramData";
-import { computeExternalModelsByType } from "../store/computed/computeExternalModelsByType";
+import { computeDirectlyIncludedExternalModelsByNamespace } from "../store/computed/computeDirectlyIncludedExternalModelsByNamespace";
import { computeIndexedDrd } from "../store/computed/computeIndexes";
import { xmlHrefToQName } from "../xml/xmlHrefToQName";
import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs";
@@ -66,7 +66,7 @@ export function getStrategyToAddExistingDecisionServiceToDrd({
__readonly_definitions: Normalized;
__readonly_decisionServiceNamespace: string;
__readonly_drgElement: Normalized;
- __readonly_externalDmnsIndex: ReturnType["dmns"];
+ __readonly_externalDmnsIndex: ReturnType["dmns"];
__readonly_namespace: string;
__readonly_indexedDrd: ReturnType;
__readonly_drdIndex: number;
@@ -92,11 +92,15 @@ export function getStrategyToAddExistingDecisionServiceToDrd({
id: __readonly_drgElement["@_id"]!,
});
+ const drgElementsByNamespace = new Map([[__readonly_namespace, __readonly_definitions.drgElement]]);
+ __readonly_externalDmnsIndex.forEach((value, key) => {
+ drgElementsByNamespace.set(key, value.model.definitions.drgElement);
+ });
+
const containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn =
computeContainingDecisionServiceHrefsByDecisionHrefs({
thisDmnsNamespace: __readonly_namespace,
- drgElementsNamespace: __readonly_decisionServiceNamespace,
- drgElements: decisionServiceDmnDefinitions.drgElement,
+ drgElementsByNamespace,
});
const doesThisDrdHaveConflictingDecisionService = containedDecisionHrefsRelativeToThisDmn.some((decisionHref) =>
@@ -195,7 +199,7 @@ export async function addAutoGeneratedDecisionServiceToDrd({
}: {
state: State;
__readonly_decisionServiceNamespace: string;
- __readonly_externalDmnsIndex: ReturnType["dmns"];
+ __readonly_externalDmnsIndex: ReturnType["dmns"];
__readonly_drdIndex: number;
__readonly_snapGrid: SnapGrid;
__readonly_decisionServiceHrefRelativeToThisDmn: string;
@@ -265,7 +269,7 @@ export async function addAutoGeneratedDecisionServiceToDrd({
}
// Compute the external model types by namespace after autogenerating the Decision Service
- const externalModelTypesByNamespace = computeExternalModelsByType(
+ const externalModelTypesByNamespace = computeDirectlyIncludedExternalModelsByNamespace(
state.dmn.model.definitions.import,
__readonly_externalModelsByNamespace
);
@@ -308,6 +312,7 @@ export async function addAutoGeneratedDecisionServiceToDrd({
__readonly_drdIndex: dummyDrdIndex,
__readonly_dmnObjectNamespace: __readonly_decisionServiceNamespace,
__readonly_externalDmnsIndex: externalModelTypesByNamespace.dmns,
+ __readonly_externalModelsByNamespace,
});
// Save DS shape before applying the autolayout
@@ -390,7 +395,7 @@ export function addExistingDecisionServiceToDrd({
}: {
definitions: Normalized;
__readonly_decisionServiceNamespace: string;
- __readonly_externalDmnsIndex: ReturnType["dmns"];
+ __readonly_externalDmnsIndex: ReturnType["dmns"];
__readonly_namespace: string;
__readonly_indexedDrd: ReturnType;
__readonly_indexedDrdContainingDecisionServiceDepiction: ReturnType;
diff --git a/packages/dmn-editor/src/mutations/addShape.ts b/packages/dmn-editor/src/mutations/addShape.ts
index fd716e34ae6..f81585b9106 100644
--- a/packages/dmn-editor/src/mutations/addShape.ts
+++ b/packages/dmn-editor/src/mutations/addShape.ts
@@ -20,7 +20,6 @@
import {
DC__Point,
DMN15__tDefinitions,
- DMNDI15__DMNDecisionServiceDividerLine,
DMNDI15__DMNShape,
} from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { NodeType } from "../diagram/connections/graphStructure";
diff --git a/packages/dmn-editor/src/mutations/addStandaloneNode.ts b/packages/dmn-editor/src/mutations/addStandaloneNode.ts
index 2b348f07def..ce78b8b3ac9 100644
--- a/packages/dmn-editor/src/mutations/addStandaloneNode.ts
+++ b/packages/dmn-editor/src/mutations/addStandaloneNode.ts
@@ -18,7 +18,7 @@
*/
import { switchExpression } from "@kie-tools-core/switch-expression-ts";
-import { DmnBuiltInDataType, generateUuid } from "@kie-tools/boxed-expression-component/dist/api";
+import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api";
import { DC__Bounds, DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { NodeType } from "../diagram/connections/graphStructure";
import { NODE_TYPES } from "../diagram/nodes/NodeTypes";
@@ -28,15 +28,18 @@ import { getCentralizedDecisionServiceDividerLine } from "./updateDecisionServic
import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService";
import { buildXmlHref } from "../xml/xmlHrefs";
import { Normalized } from "../normalization/normalize";
+import { ExternalModelsIndex } from "../DmnEditor";
export function addStandaloneNode({
definitions,
drdIndex,
newNode,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
drdIndex: number;
newNode: { type: NodeType; bounds: DC__Bounds };
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
const newNodeId = generateUuid();
const nature = nodeNatures[newNode.type];
@@ -133,7 +136,7 @@ export function addStandaloneNode({
: {}),
});
- repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions });
+ repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions, externalModelsByNamespace });
return { id: newNodeId, href: buildXmlHref({ id: newNodeId }), shapeId };
}
diff --git a/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts b/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts
index 0f3786a1b83..baf78e2994e 100644
--- a/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts
+++ b/packages/dmn-editor/src/mutations/applyAutoLayoutToDrd.ts
@@ -33,7 +33,7 @@ import { updateDecisionServiceDividerLine } from "../mutations/updateDecisionSer
import { Normalized } from "../normalization/normalize";
import { State } from "../store/Store";
import { AutolayoutParentNode, FAKE_MARKER, visitNodeAndNested } from "../autolayout/autoLayoutInfo";
-import { ExternalDmnsIndex } from "../DmnEditor";
+import { ExternalDmnsIndex, ExternalModelsIndex } from "../DmnEditor";
export function applyAutoLayoutToDrd({
state,
@@ -46,6 +46,7 @@ export function applyAutoLayoutToDrd({
__readonly_drdIndex,
__readonly_dmnObjectNamespace,
__readonly_externalDmnsIndex,
+ __readonly_externalModelsByNamespace,
}: {
state: State;
__readonly_autoLayoutedInfo: {
@@ -67,6 +68,7 @@ export function applyAutoLayoutToDrd({
__readonly_drdIndex: number;
__readonly_dmnObjectNamespace: string | undefined;
__readonly_externalDmnsIndex: ExternalDmnsIndex;
+ __readonly_externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
// 7. Update all nodes positions skipping empty groups, which will be positioned manually after all nodes are done being repositioned.
const autolayoutedElkNodesById = new Map();
@@ -220,6 +222,7 @@ export function applyAutoLayoutToDrd({
shapeId: targetNode.data.shape["@_id"],
},
keepWaypoints: false,
+ externalModelsByNamespace: __readonly_externalModelsByNamespace,
});
}
}
diff --git a/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts b/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts
index cb9e1273299..81f09c3c518 100644
--- a/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts
+++ b/packages/dmn-editor/src/mutations/deleteDecisionFromDecisionService.ts
@@ -20,21 +20,45 @@
import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { repopulateInputDataAndDecisionsOnDecisionService } from "./repopulateInputDataAndDecisionsOnDecisionService";
import { Normalized } from "../normalization/normalize";
+import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs";
+import { ExternalModelsIndex } from "../DmnEditor";
export function deleteDecisionFromDecisionService({
definitions,
- decisionId,
+ decisionHref,
decisionServiceId,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
- decisionId: string;
+ decisionHref: string;
decisionServiceId: string;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
- console.debug(`DMN MUTATION: Deleting Decision '${decisionId}' from Decision Service '${decisionServiceId}'`);
+ console.debug(`DMN MUTATION: Deleting Decision '${decisionHref}' from Decision Service '${decisionServiceId}'`);
- const decision = definitions.drgElement?.find((s) => s["@_id"] === decisionId);
- if (decision?.__$$element !== "decision") {
- throw new Error(`DMN MUTATION: DRG Element with id '${decisionId}' is either not a Decision or doesn't exist.`);
+ const href = parseXmlHref(decisionHref);
+ if (href.namespace) {
+ const externalModel = externalModelsByNamespace?.[href.namespace];
+ if (!externalModel) {
+ throw new Error(`DMN MUTATION: Namespace '${href.namespace}' not found.`);
+ }
+
+ if (externalModel?.type !== "dmn") {
+ throw new Error(`DMN MUTATION: External model with namespace ${href.namespace} is not a DMN.`);
+ }
+
+ const externalDrgs = externalModel.model.definitions.drgElement;
+ const decision = externalDrgs?.find((drgElement) => drgElement["@_id"] === href.id);
+ if (decision?.__$$element !== "decision") {
+ throw new Error(
+ `DMN MUTATION: DRG Element with id '${href.id}' is either not a Decision or doesn't exist in the external model '${href.namespace}'`
+ );
+ }
+ } else {
+ const decision = definitions.drgElement?.find((s) => s["@_id"] === href.id);
+ if (decision?.__$$element !== "decision") {
+ throw new Error(`DMN MUTATION: DRG Element with id '${href.id}' is either not a Decision or doesn't exist.`);
+ }
}
const decisionService = definitions.drgElement?.find((s) => s["@_id"] === decisionServiceId);
@@ -44,12 +68,10 @@ export function deleteDecisionFromDecisionService({
);
}
- decisionService.outputDecision = (decisionService.outputDecision ?? []).filter(
- (s) => s["@_href"] !== `#${decisionId}`
- );
+ decisionService.outputDecision = (decisionService.outputDecision ?? []).filter((od) => od["@_href"] !== decisionHref);
decisionService.encapsulatedDecision = (decisionService.encapsulatedDecision ?? []).filter(
- (s) => s["@_href"] !== `#${decisionId}`
+ (ed) => ed["@_href"] !== decisionHref
);
- repopulateInputDataAndDecisionsOnDecisionService({ definitions, decisionService });
+ repopulateInputDataAndDecisionsOnDecisionService({ definitions, decisionService, externalModelsByNamespace });
}
diff --git a/packages/dmn-editor/src/mutations/deleteEdge.ts b/packages/dmn-editor/src/mutations/deleteEdge.ts
index 3cc43c8126c..38846da5c73 100644
--- a/packages/dmn-editor/src/mutations/deleteEdge.ts
+++ b/packages/dmn-editor/src/mutations/deleteEdge.ts
@@ -27,6 +27,8 @@ import { addOrGetDrd } from "./addOrGetDrd";
import { DmnDiagramEdgeData } from "../diagram/edges/Edges";
import { repopulateInputDataAndDecisionsOnAllDecisionServices } from "./repopulateInputDataAndDecisionsOnDecisionService";
import { Normalized } from "../normalization/normalize";
+import { xmlHrefToQName } from "../xml/xmlHrefToQName";
+import { ExternalModelsIndex } from "../DmnEditor";
export enum EdgeDeletionMode {
FROM_DRG_AND_ALL_DRDS,
@@ -38,47 +40,48 @@ export function deleteEdge({
drdIndex,
edge,
mode,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
drdIndex: number;
edge: { id: string; dmnObject: DmnDiagramEdgeData["dmnObject"] };
mode: EdgeDeletionMode;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
- if (edge.dmnObject.namespace !== definitions["@_namespace"]) {
- console.debug("DMN MUTATION: Can't delete an edge that's from an external node.");
- return { dmnEdge: undefined };
- }
-
- const dmnObjects: Normalized["drgElement" | "artifact"] =
- switchExpression(edge?.dmnObject.type, {
- association: definitions.artifact,
- group: definitions.artifact,
- default: definitions.drgElement,
- }) ?? [];
+ if (edge.dmnObject.namespace === definitions["@_namespace"]) {
+ const dmnObjects: Normalized["drgElement" | "artifact"] =
+ switchExpression(edge?.dmnObject.type, {
+ association: definitions.artifact,
+ group: definitions.artifact,
+ default: definitions.drgElement,
+ }) ?? [];
- const dmnObjectIndex = dmnObjects.findIndex((d) => d["@_id"] === edge.dmnObject.id);
- if (dmnObjectIndex < 0) {
- throw new Error(`DMN MUTATION: Can't find DMN element with ID ${edge.dmnObject.id}`);
- }
+ const dmnObjectIndex = dmnObjects.findIndex((d) => d["@_id"] === edge.dmnObject.id);
+ if (dmnObjectIndex < 0) {
+ throw new Error(`DMN MUTATION: Can't find DMN element with ID ${edge.dmnObject.id}`);
+ }
- if (mode === EdgeDeletionMode.FROM_DRG_AND_ALL_DRDS) {
- const requirements =
- switchExpression(edge?.dmnObject.requirementType, {
- // Casting to DMN15__tDecision because if has all types of requirement, but not necessarily that's true.
- informationRequirement: (dmnObjects[dmnObjectIndex] as Normalized).informationRequirement,
- knowledgeRequirement: (dmnObjects[dmnObjectIndex] as Normalized).knowledgeRequirement,
- authorityRequirement: (dmnObjects[dmnObjectIndex] as Normalized).authorityRequirement,
- association: dmnObjects,
- }) ?? [];
+ if (mode === EdgeDeletionMode.FROM_DRG_AND_ALL_DRDS) {
+ const requirements =
+ switchExpression(edge?.dmnObject.requirementType, {
+ // Casting to DMN15__tDecision because if has all types of requirement, but not necessarily that's true.
+ informationRequirement: (dmnObjects[dmnObjectIndex] as Normalized).informationRequirement,
+ knowledgeRequirement: (dmnObjects[dmnObjectIndex] as Normalized).knowledgeRequirement,
+ authorityRequirement: (dmnObjects[dmnObjectIndex] as Normalized).authorityRequirement,
+ association: dmnObjects,
+ }) ?? [];
- // Deleting the requirement
- const requirementIndex = (requirements ?? []).findIndex((d) => d["@_id"] === edge.id);
- if (requirementIndex >= 0) {
- requirements?.splice(requirementIndex, 1);
+ // Deleting the requirement
+ const requirementIndex = (requirements ?? []).findIndex((d) => d["@_id"] === edge.id);
+ if (requirementIndex >= 0) {
+ requirements?.splice(requirementIndex, 1);
+ }
}
}
// Deleting the DMNEdge's
+ // needs to be executed even if edge.dmnObject.namespace !== definitions["@_namespace"]
+ // As they may be DMNEdge depictions for edges targeting external nodes
let deletedDmnEdgeOnCurrentDrd: Normalized | undefined;
const drdCount = (definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] ?? []).length;
@@ -89,7 +92,9 @@ export function deleteEdge({
continue;
}
- const dmnEdgeIndex = (diagramElements ?? []).findIndex((d) => d["@_dmnElementRef"] === edge.id);
+ const dmnEdgeIndex = (diagramElements ?? []).findIndex(
+ (d) => d["@_dmnElementRef"] === xmlHrefToQName(edge.id, definitions)
+ );
if (dmnEdgeIndex >= 0) {
if (i === drdIndex) {
deletedDmnEdgeOnCurrentDrd = diagramElements[dmnEdgeIndex];
@@ -99,7 +104,7 @@ export function deleteEdge({
}
}
- repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions });
+ repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions, externalModelsByNamespace });
return { deletedDmnEdgeOnCurrentDrd };
}
diff --git a/packages/dmn-editor/src/mutations/deleteImport.ts b/packages/dmn-editor/src/mutations/deleteImport.ts
index 34aa40bcc7a..4195c39afa2 100644
--- a/packages/dmn-editor/src/mutations/deleteImport.ts
+++ b/packages/dmn-editor/src/mutations/deleteImport.ts
@@ -28,15 +28,18 @@ import { deleteEdge, EdgeDeletionMode } from "./deleteEdge";
import { computeIndexedDrd } from "../store/computed/computeIndexes";
import { Computed, defaultStaticState } from "../store/Store";
import { TypeOrReturnType } from "../store/ComputedStateCache";
+import { ExternalModelsIndex } from "../DmnEditor";
export function deleteImport({
definitions,
__readonly_index,
__readonly_externalModelTypesByNamespace,
+ __readonly_externalModelsByNamespace,
}: {
definitions: Normalized;
__readonly_index: number;
- __readonly_externalModelTypesByNamespace: TypeOrReturnType;
+ __readonly_externalModelTypesByNamespace: TypeOrReturnType;
+ __readonly_externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
definitions.import ??= [];
const [deletedImport] = definitions.import.splice(__readonly_index, 1);
@@ -67,8 +70,9 @@ export function deleteImport({
__readonly_dmnObjectId: node.data.dmnObject?.["@_id"],
__readonly_dmnObjectQName: node.data.dmnObjectQName,
__readonly_dmnObjectNamespace: node.data.dmnObjectNamespace!,
- __readonly_externalModelTypesByNamespace,
- mode: NodeDeletionMode.FROM_DRG_AND_ALL_DRDS,
+ __readonly_externalDmnsIndex: __readonly_externalModelTypesByNamespace.dmns,
+ __readonly_mode: NodeDeletionMode.FROM_DRG_AND_ALL_DRDS,
+ __readonly_externalModelsByNamespace,
});
});
@@ -78,6 +82,7 @@ export function deleteImport({
drdIndex: 0,
edge: { id: edge.id, dmnObject: edge.data!.dmnObject },
mode: EdgeDeletionMode.FROM_DRG_AND_ALL_DRDS,
+ externalModelsByNamespace: __readonly_externalModelsByNamespace,
});
});
});
diff --git a/packages/dmn-editor/src/mutations/deleteNode.ts b/packages/dmn-editor/src/mutations/deleteNode.ts
index 5f4affe9fa4..5782ec13b86 100644
--- a/packages/dmn-editor/src/mutations/deleteNode.ts
+++ b/packages/dmn-editor/src/mutations/deleteNode.ts
@@ -31,7 +31,7 @@ import { Computed } from "../store/Store";
import { computeContainingDecisionServiceHrefsByDecisionHrefs } from "../store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts";
import { xmlHrefToQName } from "../xml/xmlHrefToQName";
import { Normalized } from "../normalization/normalize";
-import { NodeDmnObjects } from "../diagram/nodes/Nodes";
+import { ExternalDmnsIndex, ExternalModelsIndex } from "../DmnEditor";
export enum NodeDeletionMode {
FROM_DRG_AND_ALL_DRDS,
@@ -46,37 +46,52 @@ export function deleteNode({
__readonly_dmnObjectId,
__readonly_dmnObjectNamespace,
__readonly_dmnObjectQName,
- __readonly_externalModelTypesByNamespace,
- mode,
+ __readonly_externalDmnsIndex,
+ __readonly_mode,
+ __readonly_externalModelsByNamespace,
}: {
definitions: Normalized;
__readonly_drgEdges: DrgEdge[];
__readonly_drdIndex: number;
__readonly_nodeNature: NodeNature;
- __readonly_externalModelTypesByNamespace: ReturnType;
+ __readonly_externalDmnsIndex: ExternalDmnsIndex;
__readonly_dmnObjectId: string | undefined;
__readonly_dmnObjectNamespace: string;
__readonly_dmnObjectQName: XmlQName;
- mode: NodeDeletionMode;
+ __readonly_mode: NodeDeletionMode;
+ __readonly_externalModelsByNamespace: ExternalModelsIndex | undefined;
}): {
deletedDmnObject: Unpacked["drgElement" | "artifact"]> | undefined;
deletedDmnShapeOnCurrentDrd: Normalized | undefined;
} {
if (
- mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY &&
+ __readonly_mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY &&
!canRemoveNodeFromDrdOnly({
definitions,
__readonly_drdIndex,
__readonly_dmnObjectNamespace,
__readonly_dmnObjectId,
- __readonly_externalDmnsIndex: __readonly_externalModelTypesByNamespace.dmns,
+ __readonly_externalDmnsIndex,
})
) {
console.warn("DMN MUTATION: Cannot hide a Decision that's contained by a Decision Service from a DRD.");
return { deletedDmnObject: undefined, deletedDmnShapeOnCurrentDrd: undefined };
}
- if (mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS) {
+ if (
+ !isContainedInAnExternalExpandedDecisionService({
+ definitions,
+ __readonly_drdIndex,
+ __readonly_dmnObjectNamespace,
+ __readonly_dmnObjectId,
+ __readonly_externalDmnsIndex,
+ })
+ ) {
+ console.warn("DMN MUTATION: Cannot delete a Decision that's contained by a expanded external Decision Service.");
+ return { deletedDmnObject: undefined, deletedDmnShapeOnCurrentDrd: undefined };
+ }
+
+ if (__readonly_mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS) {
// Delete Edges
// A DRD doesn't necessarily renders all edges of the DRG, so we need to look for what DRG edges to delete when deleting a node from any DRD.
const nodeId = buildXmlHref({
@@ -96,6 +111,7 @@ export function deleteNode({
id: drgEdge.id,
dmnObject: drgEdge.dmnObject,
},
+ externalModelsByNamespace: __readonly_externalModelsByNamespace,
});
}
}
@@ -119,7 +135,7 @@ export function deleteNode({
if (!__readonly_dmnObjectQName.prefix) {
// Delete the dmnObject itself
if (__readonly_nodeNature === NodeNature.ARTIFACT) {
- if (mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS) {
+ if (__readonly_mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS) {
const nodeIndex = (definitions.artifact ?? []).findIndex((a) => a["@_id"] === __readonly_dmnObjectId);
deletedDmnObject = definitions.artifact?.splice(nodeIndex, 1)?.[0];
} else {
@@ -128,7 +144,7 @@ export function deleteNode({
} else if (__readonly_nodeNature === NodeNature.DRG_ELEMENT) {
const nodeIndex = (definitions.drgElement ?? []).findIndex((d) => d["@_id"] === __readonly_dmnObjectId);
deletedDmnObject =
- mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS
+ __readonly_mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS
? definitions.drgElement?.splice(nodeIndex, 1)?.[0]
: definitions.drgElement?.[nodeIndex];
} else if (__readonly_nodeNature === NodeNature.UNKNOWN) {
@@ -160,7 +176,7 @@ export function deleteNode({
const drdCount = (definitions["dmndi:DMNDI"]?.["dmndi:DMNDiagram"] ?? []).length;
for (let i = 0; i < drdCount; i++) {
- if (mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY && i !== __readonly_drdIndex) {
+ if (__readonly_mode === NodeDeletionMode.FROM_CURRENT_DRD_ONLY && i !== __readonly_drdIndex) {
continue;
}
@@ -180,14 +196,62 @@ export function deleteNode({
);
}
- repopulateInputDataAndDecisionsOnAllDecisionServices({ definitions });
+ repopulateInputDataAndDecisionsOnAllDecisionServices({
+ definitions,
+ externalModelsByNamespace: __readonly_externalModelsByNamespace,
+ });
return {
- deletedDmnObject: mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS ? deletedDmnObject : undefined,
+ deletedDmnObject: __readonly_mode === NodeDeletionMode.FROM_DRG_AND_ALL_DRDS ? deletedDmnObject : undefined,
deletedDmnShapeOnCurrentDrd,
};
}
+export function isContainedInAnExternalExpandedDecisionService({
+ definitions,
+ __readonly_drdIndex,
+ __readonly_dmnObjectNamespace,
+ __readonly_dmnObjectId,
+ __readonly_externalDmnsIndex,
+}: {
+ definitions: Normalized;
+ __readonly_dmnObjectNamespace: string;
+ __readonly_dmnObjectId: string | undefined;
+ __readonly_drdIndex: number;
+ __readonly_externalDmnsIndex: ReturnType["dmns"];
+}) {
+ const { diagramElements } = addOrGetDrd({ definitions, drdIndex: __readonly_drdIndex });
+
+ const dmnObjectHref = buildXmlHref({
+ namespace: __readonly_dmnObjectNamespace === definitions["@_namespace"] ? undefined : __readonly_dmnObjectNamespace,
+ id: __readonly_dmnObjectId!,
+ });
+
+ const drgElementsByNamespace = new Map();
+ __readonly_externalDmnsIndex.forEach((value, key) => {
+ drgElementsByNamespace.set(key, value.model.definitions.drgElement);
+ });
+
+ const containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn =
+ computeContainingDecisionServiceHrefsByDecisionHrefs({
+ thisDmnsNamespace: definitions["@_namespace"],
+ drgElementsByNamespace,
+ });
+
+ const isContainingDecisionServiceInExpandedFormPresentInTheDrd = (
+ containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn.get(dmnObjectHref) ?? []
+ ).some((dsHref) =>
+ diagramElements.some(
+ (e) =>
+ e.__$$element === "dmndi:DMNShape" &&
+ e["@_dmnElementRef"] === xmlHrefToQName(dsHref, definitions) &&
+ !(e["@_isCollapsed"] ?? false)
+ )
+ );
+
+ return !isContainingDecisionServiceInExpandedFormPresentInTheDrd;
+}
+
export function canRemoveNodeFromDrdOnly({
definitions,
__readonly_drdIndex,
@@ -199,7 +263,7 @@ export function canRemoveNodeFromDrdOnly({
__readonly_dmnObjectNamespace: string;
__readonly_dmnObjectId: string | undefined;
__readonly_drdIndex: number;
- __readonly_externalDmnsIndex: ReturnType["dmns"];
+ __readonly_externalDmnsIndex: ReturnType["dmns"];
}) {
const { diagramElements } = addOrGetDrd({ definitions, drdIndex: __readonly_drdIndex });
@@ -208,16 +272,15 @@ export function canRemoveNodeFromDrdOnly({
id: __readonly_dmnObjectId!,
});
- const drgElements =
- definitions["@_namespace"] === __readonly_dmnObjectNamespace
- ? definitions.drgElement ?? []
- : __readonly_externalDmnsIndex.get(__readonly_dmnObjectNamespace)?.model.definitions.drgElement ?? [];
+ const drgElementsByNamespace = new Map([[definitions["@_namespace"], definitions.drgElement]]);
+ __readonly_externalDmnsIndex.forEach((value, key) => {
+ drgElementsByNamespace.set(key, value.model.definitions.drgElement);
+ });
const containingDecisionServiceHrefsByDecisionHrefsRelativeToThisDmn =
computeContainingDecisionServiceHrefsByDecisionHrefs({
thisDmnsNamespace: definitions["@_namespace"],
- drgElementsNamespace: __readonly_dmnObjectNamespace,
- drgElements,
+ drgElementsByNamespace,
});
const containingDecisionServiceHrefs =
diff --git a/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts b/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts
index 3b5bb781e1b..35f4e6c2102 100644
--- a/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts
+++ b/packages/dmn-editor/src/mutations/repopulateInputDataAndDecisionsOnDecisionService.ts
@@ -22,11 +22,15 @@ import {
DMN15__tDefinitions,
} from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { Normalized } from "../normalization/normalize";
+import { ExternalModelsIndex } from "../DmnEditor";
+import { buildXmlHref, parseXmlHref } from "../xml/xmlHrefs";
export function repopulateInputDataAndDecisionsOnAllDecisionServices({
definitions,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
for (let i = 0; i < (definitions.drgElement ?? []).length; i++) {
const drgElement = definitions.drgElement![i];
@@ -34,6 +38,7 @@ export function repopulateInputDataAndDecisionsOnAllDecisionServices({
repopulateInputDataAndDecisionsOnDecisionService({
definitions,
decisionService: drgElement,
+ externalModelsByNamespace,
});
}
}
@@ -42,9 +47,11 @@ export function repopulateInputDataAndDecisionsOnAllDecisionServices({
export function repopulateInputDataAndDecisionsOnDecisionService({
definitions,
decisionService,
+ externalModelsByNamespace,
}: {
definitions: Normalized;
decisionService: Normalized;
+ externalModelsByNamespace: ExternalModelsIndex | undefined;
}) {
// Save previous values to preserve order
const inputDatas = new Set([...(decisionService.inputData ?? [])].map((e) => e["@_href"])); // Using Set for uniqueness
@@ -59,21 +66,75 @@ export function repopulateInputDataAndDecisionsOnDecisionService({
...(decisionService.encapsulatedDecision ?? []).map((s) => s["@_href"]),
]);
- // Map all DS Input Data and Decision requirements to their href
+ /** Map all DS Input Data and Decision requirements to their href */
const requirements = new Map();
- for (let i = 0; i < definitions.drgElement!.length; i++) {
- const drgElement = definitions.drgElement![i];
- if (!hrefsToDecisionsInsideDecisionService.has(`#${drgElement["@_id"]}`) || drgElement.__$$element !== "decision") {
- continue;
+
+ for (const decisionHrefString of hrefsToDecisionsInsideDecisionService) {
+ const decisionHref = parseXmlHref(decisionHrefString);
+
+ // local decision
+ if (!decisionHref.namespace || decisionHref.namespace === definitions["@_namespace"]) {
+ const localDecision = definitions.drgElement?.find((drgElement) => drgElement["@_id"] === decisionHref.id);
+ if (localDecision?.__$$element !== "decision") {
+ throw new Error(`DMN MUTATION: Node inside Decision Service is not a Decision. ID: ${localDecision?.["@_id"]}`);
+ }
+
+ (localDecision.informationRequirement ?? []).forEach((ir) => {
+ if (ir.requiredDecision) {
+ requirements.set(ir.requiredDecision["@_href"], "decisionIr");
+ } else if (ir.requiredInput) {
+ requirements.set(ir.requiredInput["@_href"], "inputDataIr");
+ }
+ });
}
+ // external decision
+ else {
+ const externalModel = externalModelsByNamespace?.[decisionHref.namespace];
+ if (externalModel?.type !== "dmn") {
+ throw new Error(`DMN MUTATION: External model with namespace ${decisionHref.namespace} is not a DMN.`);
+ }
- (drgElement.informationRequirement ?? []).flatMap((ir) => {
- if (ir.requiredDecision) {
- requirements.set(ir.requiredDecision["@_href"], "decisionIr");
- } else if (ir.requiredInput) {
- requirements.set(ir.requiredInput["@_href"], "inputDataIr");
+ const externalDecision = externalModel.model.definitions.drgElement?.find(
+ (drgElement) => drgElement["@_id"] === decisionHref.id
+ );
+ if (externalDecision?.__$$element !== "decision") {
+ throw new Error(
+ `DMN MUTATION: Node inside Decision Service is not a Decision. ID: ${externalDecision?.["@_id"]}`
+ );
}
- });
+
+ (externalDecision.informationRequirement ?? []).forEach((ir) => {
+ if (ir.requiredDecision) {
+ const requirementHref = parseXmlHref(ir.requiredDecision["@_href"]);
+ // If the requiredDecision has namespace, it means that it is pointing to a node in a 3rd model,
+ // not this one (the local model) neither the model in the `href.namespace`.
+ if (requirementHref.namespace) {
+ requirements.set(ir.requiredDecision["@_href"], "decisionIr");
+ } else {
+ requirements.set(
+ buildXmlHref({ namespace: externalModel.model.definitions["@_namespace"], id: requirementHref.id }),
+ "decisionIr"
+ );
+ }
+ } else if (ir.requiredInput) {
+ // If the requiredInput has namespace, it means that it is pointing to a node in a 3rd model,
+ // not this one (the local model) neither the model in the `href.namespace`.
+ const requirementHref = parseXmlHref(ir.requiredInput["@_href"]);
+ if (requirementHref.namespace) {
+ requirements.set(ir.requiredInput["@_href"], "inputDataIr");
+ } else {
+ requirements.set(
+ buildXmlHref({ namespace: externalModel.model.definitions["@_namespace"], id: requirementHref.id }),
+ "inputDataIr"
+ );
+ }
+ } else {
+ throw new Error(
+ `DMN MUTATION: Invalid information requirement referenced by external DecisionService: '${externalDecision["@_id"]}'`
+ );
+ }
+ });
+ }
}
// START - Remove outdated requirements
diff --git a/packages/dmn-editor/src/mutations/updateExpressionWidths.ts b/packages/dmn-editor/src/mutations/updateExpressionWidths.ts
index 7e6fb2d3dce..51574efcec8 100644
--- a/packages/dmn-editor/src/mutations/updateExpressionWidths.ts
+++ b/packages/dmn-editor/src/mutations/updateExpressionWidths.ts
@@ -30,20 +30,9 @@ export function updateExpressionWidths({
drdIndex: number;
widthsById: Map;
}): void {
- const { widthsExtension, widths } = addOrGetDrd({ definitions, drdIndex });
- const componentWidthsMap = widths.reduce(
- (acc, e) =>
- e["@_dmnElementRef"]
- ? acc.set(
- e["@_dmnElementRef"],
- (e["kie:width"] ?? []).map((vv) => vv.__$$text)
- )
- : acc,
- new Map()
- );
+ const { widthsExtension } = addOrGetDrd({ definitions, drdIndex });
- widthsById.forEach((v, k) => componentWidthsMap.set(k, v));
- widthsExtension["kie:ComponentWidths"] = [...componentWidthsMap.entries()].map(([k, v]) => ({
+ widthsExtension["kie:ComponentWidths"] = [...widthsById.entries()].map(([k, v]) => ({
"@_dmnElementRef": k,
"kie:width": v.map((vv) => ({ __$$text: vv })),
}));
diff --git a/packages/dmn-editor/src/normalization/autoGenerateDrd.ts b/packages/dmn-editor/src/normalization/autoGenerateDrd.ts
index 2053b0c7f9f..5b2ef11a65e 100644
--- a/packages/dmn-editor/src/normalization/autoGenerateDrd.ts
+++ b/packages/dmn-editor/src/normalization/autoGenerateDrd.ts
@@ -206,6 +206,7 @@ export async function autoGenerateDrd(args: {
index: targetNode.data.index,
shapeId: targetNode.data.shape["@_id"],
},
+ externalModelsByNamespace: args.externalModelsByNamespace,
});
}
}
diff --git a/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx b/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx
index 21f29fed530..39822a2f402 100644
--- a/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx
+++ b/packages/dmn-editor/src/propertiesPanel/DecisionServiceProperties.tsx
@@ -23,6 +23,7 @@ import {
DMN15__tDecision,
DMN15__tDecisionService,
DMN15__tInputData,
+ DMN15__tDefinitions,
} from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
import { ClipboardCopy } from "@patternfly/react-core/dist/js/components/ClipboardCopy";
import { FormGroup } from "@patternfly/react-core/dist/js/components/Form";
@@ -44,6 +45,8 @@ import { buildFeelQNameFromNamespace } from "../feel/buildFeelQName";
import { Alert, AlertVariant } from "@patternfly/react-core/dist/js/components/Alert/Alert";
import { Normalized } from "../normalization/normalize";
import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api";
+import { ExternalDmn } from "../DmnEditor";
+import { Unpacked } from "../tsExt/tsExt";
import { useSettings } from "../settings/DmnEditorSettingsContext";
export type AllKnownDrgElementsByHref = Map<
@@ -66,14 +69,24 @@ export function DecisionServiceProperties({
const thisDmn = useDmnEditorStore((s) => s.dmn);
const { externalModelsByNamespace } = useExternalModels();
- const externalDmnsByNamespace = useDmnEditorStore(
- (s) => s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace).dmns
- );
+
+ const allExternalDmns = Object.entries(externalModelsByNamespace ?? {}).reduce((acc, [namespace, externalModel]) => {
+ if (!externalModel) {
+ console.warn(`DMN EDITOR: Could not find model with namespace '${namespace}'. Ignoring.`);
+ return acc;
+ }
+
+ if (externalModel.type === "dmn") {
+ acc.push(externalModel);
+ }
+
+ return acc;
+ }, new Array>());
const allDrgElementsByHref = useMemo(() => {
const ret: AllKnownDrgElementsByHref = new Map();
- const allDmns = [{ model: thisDmn.model }, ...externalDmnsByNamespace.values()];
+ const allDmns = [{ model: thisDmn.model }, ...allExternalDmns.values()];
for (let i = 0; i < allDmns.length; i++) {
const anyDmn = allDmns[i]!;
@@ -90,7 +103,7 @@ export function DecisionServiceProperties({
}
return ret;
- }, [externalDmnsByNamespace, thisDmn]);
+ }, [allExternalDmns, thisDmn]);
const thisDmnsNamespace = useDmnEditorStore((s) => s.dmn.model.definitions["@_namespace"]);
const isReadOnly = settings.isReadOnly || (!!namespace && namespace !== thisDmnsNamespace);
@@ -410,14 +423,17 @@ function DecisionServiceEquivalentFunction({
const dmnObject = allDrgElementsByHref.get(potentialExternalHref);
- return dmnObject
+ const isNamespaceDirectlyIncluded =
+ importsByNamespace.has(resolvedNamespace) || resolvedNamespace === thisDmnsNamespace;
+
+ return dmnObject && isNamespaceDirectlyIncluded
? buildFeelQNameFromNamespace({
namedElement: dmnObject,
importsByNamespace,
namespace: resolvedNamespace,
relativeToNamespace: thisDmnsNamespace,
}).full
- : potentialExternalHref;
+ : buildDisplayNameForDmnObject(dmnObject, resolvedNamespace);
},
[allDrgElementsByHref, decisionServiceNamespace, importsByNamespace, thisDmnsNamespace]
);
@@ -449,3 +465,10 @@ function DecisionServiceEquivalentFunction({
);
}
+
+function buildDisplayNameForDmnObject(
+ dmnObject: Unpacked["drgElement"]> | undefined,
+ namespace: string
+) {
+ return `${namespace.substring(0, 11)}...${namespace.substring(namespace.length - 4)}.${dmnObject?.["@_name"]}`;
+}
diff --git a/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx b/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx
index 83dfedb4ab0..32782b41c2e 100644
--- a/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx
+++ b/packages/dmn-editor/src/propertiesPanel/UnknownProperties.tsx
@@ -34,7 +34,7 @@ export function UnknownProperties(props: { shape: Normalized;
const thisDmn = useDmnEditorStore((s) => s.dmn);
const { externalModelsByNamespace } = useExternalModels();
const externalDmnsByNamespace = useDmnEditorStore(
- (s) => s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace).dmns
+ (s) => s.computed(s).getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace).dmns
);
const { onRequestToJumpToPath } = useDmnEditor();
diff --git a/packages/dmn-editor/src/store/Store.ts b/packages/dmn-editor/src/store/Store.ts
index 4b89906cc84..702fb19b3ec 100644
--- a/packages/dmn-editor/src/store/Store.ts
+++ b/packages/dmn-editor/src/store/Store.ts
@@ -30,7 +30,7 @@ import { ComputedStateCache } from "./ComputedStateCache";
import { computeAllFeelVariableUniqueNames } from "./computed/computeAllFeelVariableUniqueNames";
import { computeDataTypes } from "./computed/computeDataTypes";
import { computeDiagramData } from "./computed/computeDiagramData";
-import { computeExternalModelsByType } from "./computed/computeExternalModelsByType";
+import { computeDirectlyIncludedExternalModelsByNamespace } from "./computed/computeDirectlyIncludedExternalModelsByNamespace";
import { computeImportsByNamespace } from "./computed/computeImportsByNamespace";
import { computeIndexedDrd } from "./computed/computeIndexes";
import { computeIsDropTargetNodeValidForSelection } from "./computed/computeIsDropTargetNodeValidForSelection";
@@ -142,9 +142,9 @@ export type Computed = {
isDropTargetNodeValidForSelection(e: ExternalModelsIndex | undefined): boolean;
- getExternalModelTypesByNamespace: (
+ getDirectlyIncludedExternalModelsByNamespace: (
e: ExternalModelsIndex | undefined
- ) => ReturnType;
+ ) => ReturnType;
/**
* Get a valid DRD index.
@@ -401,7 +401,7 @@ export function createDmnEditorStore(model: DmnLatestModel, computedCache: Compu
computedCache.cached("getDataTypes", computeDataTypes, [
s.dmn.model.definitions["@_namespace"],
s.dmn.model.definitions.itemDefinition,
- s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace),
+ s.computed(s).getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace),
s.computed(s).importsByNamespace(),
]),
@@ -411,17 +411,18 @@ export function createDmnEditorStore(model: DmnLatestModel, computedCache: Compu
s.dmn.model.definitions.import,
]),
- getExternalModelTypesByNamespace: (externalModelsByNamespace: ExternalModelsIndex | undefined) =>
- computedCache.cached("getExternalModelTypesByNamespace", computeExternalModelsByType, [
- s.dmn.model.definitions.import,
- externalModelsByNamespace,
- ]),
+ getDirectlyIncludedExternalModelsByNamespace: (externalModelsByNamespace: ExternalModelsIndex | undefined) =>
+ computedCache.cached(
+ "getDirectlyIncludedExternalModelsByNamespace",
+ computeDirectlyIncludedExternalModelsByNamespace,
+ [s.dmn.model.definitions.import, externalModelsByNamespace]
+ ),
getDiagramData: (externalModelsByNamespace: ExternalModelsIndex | undefined) =>
computedCache.cached("getDiagramData", computeDiagramData, [
s.diagram,
s.dmn.model.definitions,
- s.computed(s).getExternalModelTypesByNamespace(externalModelsByNamespace),
+ s.computed(s).getDirectlyIncludedExternalModelsByNamespace(externalModelsByNamespace),
s.computed(s).indexedDrd(),
s.computed(s).isAlternativeInputDataShape(),
]),
diff --git a/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts b/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts
index 6365fa7fb88..3ab2a584842 100644
--- a/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts
+++ b/packages/dmn-editor/src/store/computed/computeContainingDecisionServiceHrefsByDecisionHrefs.ts.ts
@@ -23,45 +23,44 @@ import { State } from "../Store";
export function computeContainingDecisionServiceHrefsByDecisionHrefs({
thisDmnsNamespace,
- drgElementsNamespace,
- drgElements,
+ drgElementsByNamespace,
}: {
thisDmnsNamespace: string;
- drgElementsNamespace: string;
- drgElements: State["dmn"]["model"]["definitions"]["drgElement"];
+ drgElementsByNamespace: Map;
}) {
- drgElements ??= [];
const decisionServiceHrefsByDecisionHrefs = new Map();
- for (const drgElement of drgElements) {
- const drgElementHref = buildXmlHref({
- namespace: drgElementsNamespace === thisDmnsNamespace ? "" : drgElementsNamespace,
- id: drgElement["@_id"]!,
- });
-
- // Decision
- if (drgElement.__$$element === "decision") {
- decisionServiceHrefsByDecisionHrefs.set(
- drgElementHref,
- decisionServiceHrefsByDecisionHrefs.get(drgElementHref) ?? []
- );
- }
- // DS
- else if (drgElement.__$$element === "decisionService") {
- const { containedDecisionHrefsRelativeToThisDmn } = getDecisionServicePropertiesRelativeToThisDmn({
- thisDmnsNamespace,
- decisionServiceNamespace: drgElementsNamespace,
- decisionService: drgElement,
+ for (const [drgElementsNamespace, drgElements] of drgElementsByNamespace) {
+ for (const drgElement of drgElements ?? []) {
+ const drgElementHref = buildXmlHref({
+ namespace: drgElementsNamespace === thisDmnsNamespace ? "" : drgElementsNamespace,
+ id: drgElement["@_id"]!,
});
- for (const containedDecisionHref of containedDecisionHrefsRelativeToThisDmn) {
- decisionServiceHrefsByDecisionHrefs.set(containedDecisionHref, [
- ...(decisionServiceHrefsByDecisionHrefs.get(containedDecisionHref) ?? []),
+ // Decision
+ if (drgElement.__$$element === "decision") {
+ decisionServiceHrefsByDecisionHrefs.set(
drgElementHref,
- ]);
+ decisionServiceHrefsByDecisionHrefs.get(drgElementHref) ?? []
+ );
+ }
+ // DS
+ else if (drgElement.__$$element === "decisionService") {
+ const { containedDecisionHrefsRelativeToThisDmn } = getDecisionServicePropertiesRelativeToThisDmn({
+ thisDmnsNamespace,
+ decisionServiceNamespace: drgElementsNamespace,
+ decisionService: drgElement,
+ });
+
+ for (const containedDecisionHref of containedDecisionHrefsRelativeToThisDmn) {
+ decisionServiceHrefsByDecisionHrefs.set(containedDecisionHref, [
+ ...(decisionServiceHrefsByDecisionHrefs.get(containedDecisionHref) ?? []),
+ drgElementHref,
+ ]);
+ }
+ } else {
+ // Ignore other elements
}
- } else {
- // Ignore other elements
}
}
diff --git a/packages/dmn-editor/src/store/computed/computeDataTypes.ts b/packages/dmn-editor/src/store/computed/computeDataTypes.ts
index baa3c388179..4670400ad60 100644
--- a/packages/dmn-editor/src/store/computed/computeDataTypes.ts
+++ b/packages/dmn-editor/src/store/computed/computeDataTypes.ts
@@ -29,7 +29,7 @@ import { Normalized } from "../../normalization/normalize";
export function computeDataTypes(
namespace: State["dmn"]["model"]["definitions"]["@_namespace"],
itemDefinitions: State["dmn"]["model"]["definitions"]["itemDefinition"],
- externalModelTypesByNamespace: TypeOrReturnType,
+ externalModelTypesByNamespace: TypeOrReturnType,
thisDmnsImportsByNamespace: TypeOrReturnType
) {
const allDataTypesById: DataTypeIndex = new Map();
diff --git a/packages/dmn-editor/src/store/computed/computeDiagramData.ts b/packages/dmn-editor/src/store/computed/computeDiagramData.ts
index 69552fa0412..6205dc4c921 100644
--- a/packages/dmn-editor/src/store/computed/computeDiagramData.ts
+++ b/packages/dmn-editor/src/store/computed/computeDiagramData.ts
@@ -38,6 +38,7 @@ import { Computed, State } from "../Store";
import { getDecisionServicePropertiesRelativeToThisDmn } from "../../mutations/addExistingDecisionServiceToDrd";
import { Normalized } from "../../normalization/normalize";
import { KIE_UNKNOWN_NAMESPACE } from "../../kie/kie";
+import { xmlHrefToQName } from "../../xml/xmlHrefToQName";
export const NODE_LAYERS = {
GROUP_NODE: 0,
@@ -64,7 +65,7 @@ type AckNode = (
export function computeDiagramData(
diagram: State["diagram"],
definitions: State["dmn"]["model"]["definitions"],
- externalModelTypesByNamespace: TypeOrReturnType,
+ externalModelTypesByNamespace: TypeOrReturnType,
indexedDrd: TypeOrReturnType,
isAlternativeInputDataShape: boolean
) {
@@ -99,7 +100,7 @@ export function computeDiagramData(
const ackEdge: AckEdge = ({ id, type, dmnObject, source, target, sourceNamespace }) => {
const data = {
dmnObject,
- dmnEdge: id ? indexedDrd.dmnEdgesByDmnElementRef.get(id) : undefined,
+ dmnEdge: id ? indexedDrd.dmnEdgesByDmnElementRef.get(xmlHrefToQName(id, definitions)) : undefined,
dmnShapeSource: indexedDrd.dmnShapesByHref.get(source),
dmnShapeTarget: indexedDrd.dmnShapesByHref.get(target),
};
@@ -218,17 +219,17 @@ export function computeDiagramData(
};
if (dmnObject?.__$$element === "decisionService") {
- const { containedDecisionHrefsRelativeToThisDmn } = getDecisionServicePropertiesRelativeToThisDmn({
- thisDmnsNamespace: definitions["@_namespace"],
- decisionServiceNamespace: dmnObjectNamespace ?? definitions["@_namespace"],
- decisionService: dmnObject,
- });
-
- for (let i = 0; i < containedDecisionHrefsRelativeToThisDmn.length; i++) {
- parentIdsById.set(containedDecisionHrefsRelativeToThisDmn[i], data);
- }
+ if (!shape["@_isCollapsed"]) {
+ const { containedDecisionHrefsRelativeToThisDmn } = getDecisionServicePropertiesRelativeToThisDmn({
+ thisDmnsNamespace: definitions["@_namespace"],
+ decisionServiceNamespace: dmnObjectNamespace ?? definitions["@_namespace"],
+ decisionService: dmnObject,
+ });
- if (shape["@_isCollapsed"]) {
+ for (let i = 0; i < containedDecisionHrefsRelativeToThisDmn.length; i++) {
+ parentIdsById.set(containedDecisionHrefsRelativeToThisDmn[i], data);
+ }
+ } else {
newNode.style = {
...newNode.style,
...DECISION_SERVICE_COLLAPSED_DIMENSIONS,
@@ -280,11 +281,26 @@ export function computeDiagramData(
namespace,
(externalDmn.model.definitions.drgElement ?? []).reduce(
(acc, e, index) => acc.set(e["@_id"]!, { element: e, index }),
- new Map["drgElement"]> }>()
+ new Map<
+ string,
+ {
+ index: number;
+ element: Unpacked["drgElement"]>;
+ }
+ >()
)
);
},
- new Map["drgElement"]> }>>()
+ new Map<
+ string,
+ Map<
+ string,
+ {
+ index: number;
+ element: Unpacked["drgElement"]>;
+ }
+ >
+ >()
);
const externalNodes = [...indexedDrd.dmnShapesByHref.entries()].flatMap(([href, shape]) => {
@@ -360,7 +376,10 @@ export function computeDiagramData(
const parentNodeData = parentIdsById.get(sortedNodes[i].id);
if (parentNodeData) {
sortedNodes[i].data.parentRfNode = nodesById.get(
- buildXmlHref({ namespace: parentNodeData.dmnObjectNamespace, id: parentNodeData.dmnObjectQName.localPart })
+ buildXmlHref({
+ namespace: parentNodeData.dmnObjectNamespace,
+ id: parentNodeData.dmnObjectQName.localPart,
+ })
);
sortedNodes[i].extent = undefined; // Allows the node to be dragged freely outside of parent's bounds.
sortedNodes[i].zIndex = NODE_LAYERS.NESTED_NODES;
@@ -403,7 +422,11 @@ function ackRequirementEdges(
(dmnObject.informationRequirement ?? []).forEach((ir, index) => {
const irHref = parseXmlHref((ir.requiredDecision ?? ir.requiredInput)!["@_href"]);
ackEdge({
- id: ir["@_id"]!,
+ // HREF format, used as RF.Edge ID
+ id:
+ drgElementsNamespace === thisDmnsNamespace
+ ? ir["@_id"]
+ : buildXmlHref({ namespace: drgElementsNamespace, id: ir["@_id"] }),
dmnObject: {
namespace: drgElementsNamespace,
type: dmnObject.__$$element,
@@ -423,7 +446,11 @@ function ackRequirementEdges(
(dmnObject.knowledgeRequirement ?? []).forEach((kr, index) => {
const krHref = parseXmlHref(kr.requiredKnowledge["@_href"]);
ackEdge({
- id: kr["@_id"]!,
+ // HREF format, used as RF.Edge ID
+ id:
+ drgElementsNamespace === thisDmnsNamespace
+ ? kr["@_id"]
+ : buildXmlHref({ namespace: drgElementsNamespace, id: kr["@_id"] }),
dmnObject: {
namespace: drgElementsNamespace,
type: dmnObject.__$$element,
diff --git a/packages/dmn-editor/src/store/computed/computeExternalModelsByType.ts b/packages/dmn-editor/src/store/computed/computeDirectlyIncludedExternalModelsByNamespace.ts
similarity index 96%
rename from packages/dmn-editor/src/store/computed/computeExternalModelsByType.ts
rename to packages/dmn-editor/src/store/computed/computeDirectlyIncludedExternalModelsByNamespace.ts
index b62fec76e2b..eb38842ab14 100644
--- a/packages/dmn-editor/src/store/computed/computeExternalModelsByType.ts
+++ b/packages/dmn-editor/src/store/computed/computeDirectlyIncludedExternalModelsByNamespace.ts
@@ -21,7 +21,7 @@ import { ExternalDmnsIndex, ExternalModelsIndex, ExternalPmmlsIndex } from "../.
import { getNamespaceOfDmnImport } from "../../includedModels/importNamespaces";
import { State } from "../Store";
-export function computeExternalModelsByType(
+export function computeDirectlyIncludedExternalModelsByNamespace(
imports: State["dmn"]["model"]["definitions"]["import"],
externalModelsByNamespace: ExternalModelsIndex | undefined
) {
diff --git a/packages/dmn-editor/src/store/computed/initial.ts b/packages/dmn-editor/src/store/computed/initial.ts
index 7efe970d57e..63d2ad32cb6 100644
--- a/packages/dmn-editor/src/store/computed/initial.ts
+++ b/packages/dmn-editor/src/store/computed/initial.ts
@@ -45,7 +45,7 @@ export const INITIAL_COMPUTED_CACHE: Cache = {
value: undefined,
dependencies: [],
},
- getExternalModelTypesByNamespace: {
+ getDirectlyIncludedExternalModelsByNamespace: {
value: undefined,
dependencies: [],
},
diff --git a/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx b/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx
index bec763d7f81..56d74dee53c 100644
--- a/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx
+++ b/packages/dmn-editor/stories/dev/DevWebApp.stories.tsx
@@ -18,20 +18,19 @@
*/
import * as React from "react";
-import type { Meta, StoryObj } from "@storybook/react";
import { useCallback, useMemo, useRef, useState } from "react";
+import type { Meta, StoryObj } from "@storybook/react";
import "@patternfly/react-core/dist/styles/base.css";
import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex";
import { Page, PageSection } from "@patternfly/react-core/dist/js/components/Page";
-import { DmnLatestModel, getMarshaller, DmnMarshaller } from "@kie-tools/dmn-marshaller";
-import { Normalized, normalize } from "@kie-tools/dmn-editor/dist/normalization/normalize";
+import { DmnLatestModel, DmnMarshaller, getMarshaller } from "@kie-tools/dmn-marshaller";
+import { normalize, Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize";
import { availableModelsByPath, modelsByNamespace } from "./availableModelsToInclude";
import { generateEmptyDmn15 } from "../misc/empty/Empty.stories";
import { loanPreQualificationDmn } from "../useCases/loanPreQualification/LoanPreQualification.stories";
import { DmnEditorWrapper } from "../dmnEditorStoriesWrapper";
import {
DmnEditorProps,
- DmnEditorRef,
ExternalModelsIndex,
OnDmnModelChange,
OnRequestExternalModelByPath,
diff --git a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.mdx b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.mdx
new file mode 100644
index 00000000000..f7e21c174ae
--- /dev/null
+++ b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.mdx
@@ -0,0 +1,10 @@
+import EmptyWithAvailableExternalModelsStories from "./EmptyWithAvailableExternalModels.stories";
+import { Meta } from "@storybook/blocks";
+
+
+
+## Empty With Available External Models
+
+When user starts with an empty diagram, a wizard for quick content initialization is displayed.
+The wizard enables to create simple diagram with one input and one output or a diagram with one decision table expression.
+This model also have some external models available to be included.
diff --git a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx
new file mode 100644
index 00000000000..388de3a4ff7
--- /dev/null
+++ b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/EmptyWithAvailableExternalModels.stories.tsx
@@ -0,0 +1,134 @@
+/*
+ * 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 React from "react";
+import { useCallback, useMemo, useState } from "react";
+import type { Meta, StoryObj } from "@storybook/react";
+import { DmnLatestModel, DmnMarshaller, getMarshaller } from "@kie-tools/dmn-marshaller";
+import { ns as dmn15ns } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/meta";
+import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api";
+import { DMN15_SPEC } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/Dmn15Spec";
+import {
+ DmnEditor,
+ DmnEditorProps,
+ ExternalModelsIndex,
+ OnRequestExternalModelByPath,
+ OnRequestExternalModelsAvailableToInclude,
+ OnDmnModelChange,
+} from "@kie-tools/dmn-editor/dist/DmnEditor";
+import { normalize, Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize";
+
+import { DmnEditorWrapper, StorybookDmnEditorProps } from "../../dmnEditorStoriesWrapper";
+
+import { availableModelsByPath, modelsByNamespace } from "./availableModelsToInclude";
+
+export const generateEmptyDmn15 = () => `
+
+ `;
+
+const initialModel = generateEmptyDmn15();
+
+function EmptyStoryWithIncludedModels(args: DmnEditorProps) {
+ const [state, setState] = useState<{
+ marshaller: DmnMarshaller;
+ stack: Normalized[];
+ pointer: number;
+ }>(() => {
+ const initialDmnMarshaller = getMarshaller(initialModel, { upgradeTo: "latest" });
+ return {
+ marshaller: initialDmnMarshaller,
+ stack: [normalize(initialDmnMarshaller.parser.parse())],
+ pointer: 0,
+ };
+ });
+
+ const currentModel = state.stack[state.pointer];
+
+ const externalModelsByNamespace = useMemo(() => {
+ return (currentModel.definitions.import ?? []).reduce((acc, i) => {
+ acc[i["@_namespace"]] = modelsByNamespace[i["@_namespace"]];
+ return acc;
+ }, {} as ExternalModelsIndex);
+ }, [currentModel.definitions.import]);
+
+ const onRequestExternalModelByPath = useCallback(async (path) => {
+ return availableModelsByPath[path] ?? null;
+ }, []);
+
+ const onRequestExternalModelsAvailableToInclude = useCallback(async () => {
+ return Object.keys(availableModelsByPath);
+ }, []);
+
+ const onModelChange = useCallback((model) => {
+ setState((prev) => {
+ const newStack = prev.stack.slice(0, prev.pointer + 1);
+ return {
+ ...prev,
+ stack: [...newStack, model],
+ pointer: newStack.length,
+ };
+ });
+ }, []);
+
+ return (
+ <>
+ {DmnEditorWrapper({
+ model: currentModel,
+ originalVersion: args.originalVersion,
+ onModelChange,
+ onRequestExternalModelByPath,
+ onRequestExternalModelsAvailableToInclude,
+ externalModelsByNamespace: externalModelsByNamespace,
+ externalContextName: args.externalContextName,
+ externalContextDescription: args.externalContextDescription,
+ validationMessages: args.validationMessages,
+ evaluationResults: args.evaluationResults,
+ issueTrackerHref: args.issueTrackerHref,
+ })}
+ >
+ );
+}
+
+const meta: Meta = {
+ title: "Misc/EmptyWithAvailableExternalModels",
+ component: DmnEditor,
+ includeStories: /^[A-Z]/,
+};
+
+export default meta;
+type Story = StoryObj;
+
+export const EmptyWithAvailableExternalModels: Story = {
+ render: (args) => EmptyStoryWithIncludedModels(args),
+ args: {
+ model: getMarshaller(initialModel, { upgradeTo: "latest" }).parser.parse(),
+ originalVersion: "1.5",
+ evaluationResults: {},
+ externalContextDescription: "External context description",
+ externalContextName: "Storybook - DMN Editor",
+ externalModelsByNamespace: {},
+ issueTrackerHref: "",
+ validationMessages: {},
+ },
+};
diff --git a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts
new file mode 100644
index 00000000000..46bb7291be0
--- /dev/null
+++ b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/availableModelsToInclude.ts
@@ -0,0 +1,76 @@
+/*
+ * 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 { getMarshaller } from "@kie-tools/dmn-marshaller";
+import { normalize } from "@kie-tools/dmn-editor/dist/normalization/normalize";
+import { XML2PMML } from "@kie-tools/pmml-editor-marshaller";
+import * as DmnEditor from "@kie-tools/dmn-editor/dist/DmnEditor";
+import { getPmmlNamespace } from "@kie-tools/dmn-editor/dist/pmml/pmml";
+import { sumBkm, sumDiffDs, testTreePmml } from "./externalModels";
+
+export const sumBkmModel = normalize(getMarshaller(sumBkm, { upgradeTo: "latest" }).parser.parse());
+export const sumDiffDsModel = normalize(getMarshaller(sumDiffDs, { upgradeTo: "latest" }).parser.parse());
+export const testTreePmmlModel = XML2PMML(testTreePmml);
+
+export const availableModels: DmnEditor.ExternalModel[] = [
+ {
+ type: "dmn",
+ model: sumBkmModel,
+ svg: "",
+ normalizedPosixPathRelativeToTheOpenFile: "dev-webapp/available-models-to-include/sumBkm.dmn",
+ },
+ {
+ type: "dmn",
+ model: sumDiffDsModel,
+ svg: "",
+ normalizedPosixPathRelativeToTheOpenFile: "dev-webapp/available-models-to-include/sumDiffDs.dmn",
+ },
+ {
+ type: "dmn",
+ model: normalize(
+ getMarshaller(` `, {
+ upgradeTo: "latest",
+ }).parser.parse()
+ ),
+ svg: "",
+ normalizedPosixPathRelativeToTheOpenFile: "dev-webapp/available-models-to-include/empty.dmn",
+ },
+ {
+ type: "pmml",
+ model: testTreePmmlModel,
+ normalizedPosixPathRelativeToTheOpenFile: "dev-webapp/available-models-to-include/testTree.pmml",
+ },
+];
+
+export const availableModelsByPath: Record = Object.values(availableModels).reduce(
+ (acc, v) => {
+ acc[v.normalizedPosixPathRelativeToTheOpenFile] = v;
+ return acc;
+ },
+ {} as Record
+);
+
+export const modelsByNamespace = Object.values(availableModels).reduce((acc, v) => {
+ if (v.type === "dmn") {
+ acc[v.model.definitions["@_namespace"]] = v;
+ } else if (v.type === "pmml") {
+ acc[getPmmlNamespace({ normalizedPosixPathRelativeToTheOpenFile: v.normalizedPosixPathRelativeToTheOpenFile })] = v;
+ }
+ return acc;
+}, {} as DmnEditor.ExternalModelsIndex);
diff --git a/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/externalModels.ts b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/externalModels.ts
new file mode 100644
index 00000000000..0c293ed34b9
--- /dev/null
+++ b/packages/dmn-editor/stories/misc/emptyWithAvailableExternalModels/externalModels.ts
@@ -0,0 +1,217 @@
+/*
+ * 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 const sumBkm = `
+
+
+
+
+
+
+ a + b
+
+
+
+
+
+
+
+
+
+
+
+ 190
+
+
+
+
+
+
+`;
+
+export const sumDiffDs = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a + b
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ a - b
+
+
+
+
+ number
+
+
+ number
+
+
+
+
+ number
+
+ 100,500,1000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 190
+
+
+ 190
+
+
+
+
+
+
+`;
+// Copied from kogito-examples/kogito-quarkus-examples/dmn-pmml-quarkus-example/src/main/resources
+export const testTreePmml = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/packages/dmn-editor/tests-e2e/__fixtures__/base.ts b/packages/dmn-editor/tests-e2e/__fixtures__/base.ts
index 1143c264a87..5c81eb6b0b9 100644
--- a/packages/dmn-editor/tests-e2e/__fixtures__/base.ts
+++ b/packages/dmn-editor/tests-e2e/__fixtures__/base.ts
@@ -41,6 +41,8 @@ import { BeePropertiesPanel } from "./propertiesPanel/beePropertiesPanel";
import { BoxedExpressionEditor } from "@kie-tools/boxed-expression-component/tests-e2e/__fixtures__/boxedExpression";
import { Monaco } from "@kie-tools/boxed-expression-component/tests-e2e/__fixtures__/monaco";
import { ProjectName } from "@kie-tools/playwright-base/projectNames";
+import { Stories } from "./stories";
+import { IncludedModels } from "./includedModels";
type DmnEditorFixtures = {
bee: BoxedExpressionEditor;
@@ -65,6 +67,8 @@ type DmnEditorFixtures = {
knowledgeSourcePropertiesPanel: KnowledgeSourcePropertiesPanel;
multipleNodesPropertiesPanel: MultipleNodesPropertiesPanel;
textAnnotationPropertiesPanel: TextAnnotationPropertiesPanel;
+ stories: Stories;
+ includedModels: IncludedModels;
};
export const test = base.extend({
@@ -134,6 +138,12 @@ export const test = base.extend({
textAnnotationPropertiesPanel: async ({ diagram, page }, use) => {
await use(new TextAnnotationPropertiesPanel(diagram, page));
},
+ stories: async ({ baseURL, page }, use) => {
+ await use(new Stories(page, baseURL));
+ },
+ includedModels: async ({ page }, use) => {
+ await use(new IncludedModels(page));
+ },
});
export { expect } from "@playwright/test";
diff --git a/packages/dmn-editor/tests-e2e/__fixtures__/drgNodes.ts b/packages/dmn-editor/tests-e2e/__fixtures__/drgNodes.ts
index 790b3778b1b..27c0e472608 100644
--- a/packages/dmn-editor/tests-e2e/__fixtures__/drgNodes.ts
+++ b/packages/dmn-editor/tests-e2e/__fixtures__/drgNodes.ts
@@ -26,7 +26,7 @@ export class DrgNodes {
public page: Page
) {}
- public async open() {
+ public async toggle() {
await this.page.getByTitle("DRG Nodes").click();
}
diff --git a/packages/dmn-editor/tests-e2e/__fixtures__/includedModels.ts b/packages/dmn-editor/tests-e2e/__fixtures__/includedModels.ts
new file mode 100644
index 00000000000..5301356a574
--- /dev/null
+++ b/packages/dmn-editor/tests-e2e/__fixtures__/includedModels.ts
@@ -0,0 +1,54 @@
+/*
+ * 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 { Page } from "@playwright/test";
+
+export class IncludedModels {
+ constructor(private readonly page: Page) {}
+
+ public get() {
+ return this.page.getByTestId("kie-tools--dmn-editor--included-models-container");
+ }
+
+ private getModal() {
+ return this.page.getByTestId("kie-tools--dmn-editor--included-models-modal");
+ }
+
+ public getIncludeModelButton() {
+ return this.get().getByRole("button", { name: "Include model" });
+ }
+
+ public async fillModelToInclude(args: { modelName: string }) {
+ await this.getModal().getByPlaceholder("Select a model to include...").click();
+ await this.getModal().getByPlaceholder("Select a model to include...").fill(args.modelName);
+ }
+
+ public async selectModel(args: { modelName: string }) {
+ await this.page.getByText(args.modelName).click();
+ }
+
+ public async fillModelName(args: { modelName: string }) {
+ await this.getModal().getByPlaceholder("").click();
+ await this.getModal().getByPlaceholder("").fill(args.modelName);
+ }
+
+ public async includeModel() {
+ return await this.page.getByRole("button", { name: "Include model" }).click();
+ }
+}
diff --git a/packages/dmn-editor/tests-e2e/__fixtures__/nodes.ts b/packages/dmn-editor/tests-e2e/__fixtures__/nodes.ts
index 82c5546c765..bdaa359a059 100644
--- a/packages/dmn-editor/tests-e2e/__fixtures__/nodes.ts
+++ b/packages/dmn-editor/tests-e2e/__fixtures__/nodes.ts
@@ -140,9 +140,19 @@ export class Nodes {
}
public async move(args: { name: string; targetPosition: { x: number; y: number } }) {
- await this.get({ name: args.name }).dragTo(this.diagram.get(), {
- targetPosition: args.targetPosition,
- });
+ if (args.name.includes(DefaultNodeName.DECISION_SERVICE)) {
+ // Decision Services only have some draggable areas near the borders.
+ // If you drag it to the center, you'll drag the divide line.
+ // Also, neither the entire upper area nor the entire downer area is draggable.
+ await this.get({ name: args.name }).dragTo(this.diagram.get(), {
+ targetPosition: args.targetPosition,
+ sourcePosition: { x: 20, y: 20 },
+ });
+ } else {
+ await this.get({ name: args.name }).dragTo(this.diagram.get(), {
+ targetPosition: args.targetPosition,
+ });
+ }
}
public async rename(args: { current: string; new: string }) {
diff --git a/packages/dmn-editor/tests-e2e/__fixtures__/palette.ts b/packages/dmn-editor/tests-e2e/__fixtures__/palette.ts
index 4fdaedf0d6a..5b55375104a 100644
--- a/packages/dmn-editor/tests-e2e/__fixtures__/palette.ts
+++ b/packages/dmn-editor/tests-e2e/__fixtures__/palette.ts
@@ -40,6 +40,21 @@ export class Palette {
}
}
+ public async dragExternalNode(args: {
+ includedModelName: string;
+ nodeName: string;
+ targetPosition: { x: number; y: number };
+ }) {
+ await this.page
+ .getByTestId("kie-tools--dmn-editor--external-nodes-popover")
+ .getByTestId(`kie-tools--dmn-editor--external-node-${args.includedModelName}-${args.nodeName}`)
+ .dragTo(this.diagram.get(), { targetPosition: args.targetPosition });
+ }
+
+ public async toggleExternalNodesPanel() {
+ await this.page.getByRole("button", { name: "External nodes" }).click();
+ }
+
private getNewNodeProperties(type: NodeType) {
switch (type) {
case NodeType.INPUT_DATA:
diff --git a/packages/dmn-editor/tests-e2e/__fixtures__/stories.ts b/packages/dmn-editor/tests-e2e/__fixtures__/stories.ts
new file mode 100644
index 00000000000..301188efe55
--- /dev/null
+++ b/packages/dmn-editor/tests-e2e/__fixtures__/stories.ts
@@ -0,0 +1,38 @@
+/*
+ * 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 { Page } from "@playwright/test";
+
+export class Stories {
+ constructor(
+ private readonly page: Page,
+ private readonly baseURL?: string
+ ) {}
+
+ private getIframeURL(iframeId: string) {
+ return `iframe.html?id=${iframeId}&viewMode=story`;
+ }
+
+ public async openEmptyWithAvailableExternalModels() {
+ await this.page.goto(
+ `${this.baseURL}/${this.getIframeURL(`misc-emptywithavailableexternalmodels--empty-with-available-external-models`)}` ??
+ ""
+ );
+ }
+}
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drdArtifacts/add-2-group-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drdArtifacts/add-2-group-nodes-from-palette.png
new file mode 100644
index 00000000000..2844450f1c0
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drdArtifacts/add-2-group-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drdArtifacts/add-2-text-annotation-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drdArtifacts/add-2-text-annotation-nodes-from-palette.png
new file mode 100644
index 00000000000..a13b4256cd4
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drdArtifacts/add-2-text-annotation-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-ar-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-ar-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..718044ce3e1
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-ar-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-ir-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-ir-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..f4c321d972f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-ir-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-kr-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-kr-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..b2ba9406603
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drds/drds-kr-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-bkm-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-bkm-nodes-from-palette.png
new file mode 100644
index 00000000000..15dc1257003
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-bkm-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-decision-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-decision-nodes-from-palette.png
new file mode 100644
index 00000000000..7bc77f83007
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-decision-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-decision-service-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-decision-service-nodes-from-palette.png
new file mode 100644
index 00000000000..56d97ba1d8f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-decision-service-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-input-data-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-input-data-nodes-from-palette.png
new file mode 100644
index 00000000000..7c60486d4cb
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-input-data-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-knowledge-source-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-knowledge-source-nodes-from-palette.png
new file mode 100644
index 00000000000..8e7c64ac210
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-2-knowledge-source-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-external-node-inside-decision-service.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-external-node-inside-decision-service.png
new file mode 100644
index 00000000000..fbaeb34075e
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/add-external-node-inside-decision-service.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/delete-external-node-inside-decision-service-after-delete.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/delete-external-node-inside-decision-service-after-delete.png
new file mode 100644
index 00000000000..6e352cbf62e
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/delete-external-node-inside-decision-service-after-delete.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/delete-external-node-inside-decision-service-before-delete.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/delete-external-node-inside-decision-service-before-delete.png
new file mode 100644
index 00000000000..ca04d943acf
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/delete-external-node-inside-decision-service-before-delete.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png
new file mode 100644
index 00000000000..e9eddcaace8
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png
new file mode 100644
index 00000000000..5e600c04fce
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png
new file mode 100644
index 00000000000..e54b0c1908f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png
new file mode 100644
index 00000000000..d6029255909
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-out-from-decision-service-after.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-out-from-decision-service-after.png
new file mode 100644
index 00000000000..d986c13f00b
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-out-from-decision-service-after.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-out-from-decision-service-before.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-out-from-decision-service-before.png
new file mode 100644
index 00000000000..d6029255909
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/move-external-decision-out-from-decision-service-before.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/resize-external-node-inside-decision-service-after-resizing.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/resize-external-node-inside-decision-service-after-resizing.png
new file mode 100644
index 00000000000..e3065c65ff8
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/resize-external-node-inside-decision-service-after-resizing.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/resize-external-node-inside-decision-service-before-resizing.png b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/resize-external-node-inside-decision-service-before-resizing.png
new file mode 100644
index 00000000000..ca04d943acf
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/Google-Chrome/drgElements/resize-external-node-inside-decision-service-before-resizing.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drdArtifacts/add-2-group-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drdArtifacts/add-2-group-nodes-from-palette.png
new file mode 100644
index 00000000000..674a54b15d9
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drdArtifacts/add-2-group-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drdArtifacts/add-2-text-annotation-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drdArtifacts/add-2-text-annotation-nodes-from-palette.png
new file mode 100644
index 00000000000..39e5cbdcc6a
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drdArtifacts/add-2-text-annotation-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-ar-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-ar-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..42bb737451f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-ar-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-ir-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-ir-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..960bc05e324
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-ir-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-kr-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-kr-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..b48c794d9da
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drds/drds-kr-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-bkm-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-bkm-nodes-from-palette.png
new file mode 100644
index 00000000000..3ec727001b1
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-bkm-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-decision-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-decision-nodes-from-palette.png
new file mode 100644
index 00000000000..ee01ebed0e2
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-decision-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-decision-service-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-decision-service-nodes-from-palette.png
new file mode 100644
index 00000000000..c12ef629154
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-decision-service-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-input-data-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-input-data-nodes-from-palette.png
new file mode 100644
index 00000000000..c41493698ee
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-input-data-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-knowledge-source-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-knowledge-source-nodes-from-palette.png
new file mode 100644
index 00000000000..02c2674b5ea
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-2-knowledge-source-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-external-node-inside-decision-service.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-external-node-inside-decision-service.png
new file mode 100644
index 00000000000..fbaeb34075e
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/add-external-node-inside-decision-service.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/delete-external-node-inside-decision-service-after-delete.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/delete-external-node-inside-decision-service-after-delete.png
new file mode 100644
index 00000000000..6e352cbf62e
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/delete-external-node-inside-decision-service-after-delete.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/delete-external-node-inside-decision-service-before-delete.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/delete-external-node-inside-decision-service-before-delete.png
new file mode 100644
index 00000000000..ca04d943acf
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/delete-external-node-inside-decision-service-before-delete.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png
new file mode 100644
index 00000000000..e9eddcaace8
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png
new file mode 100644
index 00000000000..5e600c04fce
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png
new file mode 100644
index 00000000000..e54b0c1908f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png
new file mode 100644
index 00000000000..d6029255909
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-out-from-decision-service-after.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-out-from-decision-service-after.png
new file mode 100644
index 00000000000..d986c13f00b
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-out-from-decision-service-after.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-out-from-decision-service-before.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-out-from-decision-service-before.png
new file mode 100644
index 00000000000..d6029255909
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/move-external-decision-out-from-decision-service-before.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/resize-external-node-inside-decision-service-after-resizing.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/resize-external-node-inside-decision-service-after-resizing.png
new file mode 100644
index 00000000000..e3065c65ff8
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/resize-external-node-inside-decision-service-after-resizing.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/resize-external-node-inside-decision-service-before-resizing.png b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/resize-external-node-inside-decision-service-before-resizing.png
new file mode 100644
index 00000000000..ca04d943acf
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/chromium/drgElements/resize-external-node-inside-decision-service-before-resizing.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drdArtifacts/add-2-group-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drdArtifacts/add-2-group-nodes-from-palette.png
new file mode 100644
index 00000000000..def7abbfb6f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drdArtifacts/add-2-group-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drdArtifacts/add-2-text-annotation-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drdArtifacts/add-2-text-annotation-nodes-from-palette.png
new file mode 100644
index 00000000000..7582ea9f1b2
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drdArtifacts/add-2-text-annotation-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-ar-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-ar-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..cf1a32eb72d
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-ar-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-ir-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-ir-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..9cc7af48e13
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-ir-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-kr-edge-depiction-waypoint.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-kr-edge-depiction-waypoint.png
new file mode 100644
index 00000000000..3b1fddcfda2
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drds/drds-kr-edge-depiction-waypoint.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-bkm-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-bkm-nodes-from-palette.png
new file mode 100644
index 00000000000..aa29db077e6
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-bkm-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-decision-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-decision-nodes-from-palette.png
new file mode 100644
index 00000000000..07077d605a0
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-decision-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-decision-service-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-decision-service-nodes-from-palette.png
new file mode 100644
index 00000000000..1546344def3
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-decision-service-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-input-data-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-input-data-nodes-from-palette.png
new file mode 100644
index 00000000000..02a7489f205
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-input-data-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-knowledge-source-nodes-from-palette.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-knowledge-source-nodes-from-palette.png
new file mode 100644
index 00000000000..ca0cca69386
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-2-knowledge-source-nodes-from-palette.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-external-node-inside-decision-service.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-external-node-inside-decision-service.png
new file mode 100644
index 00000000000..792fed153c2
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/add-external-node-inside-decision-service.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/delete-external-node-inside-decision-service-after-delete.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/delete-external-node-inside-decision-service-after-delete.png
new file mode 100644
index 00000000000..cfef54c3c49
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/delete-external-node-inside-decision-service-after-delete.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/delete-external-node-inside-decision-service-before-delete.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/delete-external-node-inside-decision-service-before-delete.png
new file mode 100644
index 00000000000..b7fd36e9d74
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/delete-external-node-inside-decision-service-before-delete.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png
new file mode 100644
index 00000000000..1dbeb169713
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-from-ds-to-another-ds-after-move.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png
new file mode 100644
index 00000000000..dae01161904
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-from-ds-to-another-ds-before-move.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png
new file mode 100644
index 00000000000..2c658212a6f
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-inside-decision-service-after-move-to-out.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png
new file mode 100644
index 00000000000..ff393609e88
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-inside-decision-service-before-move-to-out.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-out-from-decision-service-after.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-out-from-decision-service-after.png
new file mode 100644
index 00000000000..cea16561ae7
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-out-from-decision-service-after.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-out-from-decision-service-before.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-out-from-decision-service-before.png
new file mode 100644
index 00000000000..ff393609e88
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/move-external-decision-out-from-decision-service-before.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/resize-external-node-inside-decision-service-after-resizing.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/resize-external-node-inside-decision-service-after-resizing.png
new file mode 100644
index 00000000000..44dc6063f39
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/resize-external-node-inside-decision-service-after-resizing.png differ
diff --git a/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/resize-external-node-inside-decision-service-before-resizing.png b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/resize-external-node-inside-decision-service-before-resizing.png
new file mode 100644
index 00000000000..b7fd36e9d74
Binary files /dev/null and b/packages/dmn-editor/tests-e2e/__screenshots__/webkit/drgElements/resize-external-node-inside-decision-service-before-resizing.png differ
diff --git a/packages/dmn-editor/tests-e2e/drdArtifacts/addAssociation.spec.ts b/packages/dmn-editor/tests-e2e/drdArtifacts/addAssociation.spec.ts
index 1526752da8b..11e155d82a3 100644
--- a/packages/dmn-editor/tests-e2e/drdArtifacts/addAssociation.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drdArtifacts/addAssociation.spec.ts
@@ -50,7 +50,7 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.BKM, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -70,7 +70,9 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -97,7 +99,7 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.TEXT_ANNOTATION })
).toBeAttached();
expect(
@@ -121,7 +123,9 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -143,7 +147,7 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.TEXT_ANNOTATION })
).toBeAttached();
expect(
@@ -167,7 +171,9 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: DefaultNodeName.GROUP, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.GROUP, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.GROUP, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -198,7 +204,7 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.BKM,
});
- expect(await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.BKM })).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.BKM })).toEqual(
EdgeType.ASSOCIATION
);
@@ -218,7 +224,9 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.DECISION,
});
- expect(await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.DECISION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.DECISION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -240,7 +248,7 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.KNOWLEDGE_SOURCE })
).toBeAttached();
expect(
@@ -264,7 +272,9 @@ test.describe("Add edge - Association", () => {
to: DefaultNodeName.INPUT_DATA,
});
- expect(await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.INPUT_DATA })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.INPUT_DATA })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.INPUT_DATA })).toEqual(
EdgeType.ASSOCIATION
);
@@ -287,7 +297,7 @@ test.describe("Add edge - Association", () => {
position: NodePosition.TOP,
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.DECISION_SERVICE })
).toBeAttached();
expect(
@@ -316,7 +326,9 @@ test.describe("Add edge - Association", () => {
position: NodePosition.TOP,
});
- expect(await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.GROUP })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.GROUP })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.TEXT_ANNOTATION, to: DefaultNodeName.GROUP })).toEqual(
EdgeType.ASSOCIATION
);
diff --git a/packages/dmn-editor/tests-e2e/drdArtifacts/addGroup.spec.ts b/packages/dmn-editor/tests-e2e/drdArtifacts/addGroup.spec.ts
index 89affdae8af..144576f7c56 100644
--- a/packages/dmn-editor/tests-e2e/drdArtifacts/addGroup.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drdArtifacts/addGroup.spec.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+import { TestAnnotations } from "@kie-tools/playwright-base/annotations";
import { test, expect } from "../__fixtures__/base";
import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
@@ -29,8 +30,28 @@ test.describe("Add node - Group", () => {
test("should add Group node from palette", async ({ palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.GROUP, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.GROUP })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.GROUP })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-group-node-from-palette.png");
});
+
+ test("should add multiple Group nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+
+ await palette.dragNewNode({ type: NodeType.GROUP, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.GROUP,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second Group",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.GROUP })).toBeAttached();
+ await expect(nodes.get({ name: "Second Group" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-group-nodes-from-palette.png");
+ });
});
});
diff --git a/packages/dmn-editor/tests-e2e/drdArtifacts/addTextAnnotation.spec.ts b/packages/dmn-editor/tests-e2e/drdArtifacts/addTextAnnotation.spec.ts
index 868ce7b91b2..e57db2e7d53 100644
--- a/packages/dmn-editor/tests-e2e/drdArtifacts/addTextAnnotation.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drdArtifacts/addTextAnnotation.spec.ts
@@ -31,9 +31,29 @@ test.describe("Add node - Text Annotation", () => {
test("should add Text Annotation node from palette", async ({ palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.TEXT_ANNOTATION, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-text-annotation-node-from-palette.png");
});
+
+ test("should add two Text Annotation nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+
+ await palette.dragNewNode({ type: NodeType.TEXT_ANNOTATION, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.TEXT_ANNOTATION,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second Text Annotation",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(nodes.get({ name: "Second Text Annotation" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-text-annotation-nodes-from-palette.png");
+ });
});
test.describe("add from nodes", () => {
@@ -53,7 +73,9 @@ test.describe("Add node - Text Annotation", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -71,7 +93,9 @@ test.describe("Add node - Text Annotation", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -89,7 +113,7 @@ test.describe("Add node - Text Annotation", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.BKM, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
@@ -112,7 +136,7 @@ test.describe("Add node - Text Annotation", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.TEXT_ANNOTATION })
).toBeAttached();
expect(
@@ -142,7 +166,7 @@ test.describe("Add node - Text Annotation", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.TEXT_ANNOTATION })
).toBeAttached();
expect(
@@ -162,7 +186,9 @@ test.describe("Add node - Text Annotation", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(await edges.get({ from: DefaultNodeName.GROUP, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.GROUP, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.GROUP, to: DefaultNodeName.TEXT_ANNOTATION })).toEqual(
EdgeType.ASSOCIATION
);
diff --git a/packages/dmn-editor/tests-e2e/drdArtifacts/deleteAssociation.spec.ts b/packages/dmn-editor/tests-e2e/drdArtifacts/deleteAssociation.spec.ts
index afa7f65e27e..9435015230e 100644
--- a/packages/dmn-editor/tests-e2e/drdArtifacts/deleteAssociation.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drdArtifacts/deleteAssociation.spec.ts
@@ -34,14 +34,16 @@ test.describe("Delete edge - Association", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })
+ ).toBeAttached();
});
test("should delete an Association using the delete key", async ({ diagram, edges, nodes }) => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION });
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })
).not.toBeAttached();
@@ -53,7 +55,7 @@ test.describe("Delete edge - Association", () => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION, isBackspace: true });
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.TEXT_ANNOTATION })
).not.toBeAttached();
diff --git a/packages/dmn-editor/tests-e2e/drds/modelDrd.spec.ts b/packages/dmn-editor/tests-e2e/drds/modelDrd.spec.ts
index 9ab8801f115..1bc943e3a3a 100644
--- a/packages/dmn-editor/tests-e2e/drds/modelDrd.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drds/modelDrd.spec.ts
@@ -136,13 +136,13 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await drds.toggle();
await drds.navigateTo({ name: "Third DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
@@ -166,13 +166,13 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await drds.toggle();
await drds.navigateTo({ name: "Third DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await nodes.delete({ name: DefaultNodeName.DECISION });
@@ -199,13 +199,13 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await drds.toggle();
await drds.navigateTo({ name: "Third DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await nodes.selectLabel({ name: DefaultNodeName.DECISION });
@@ -233,7 +233,7 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await drgNodes.dragNode({ name: DefaultNodeName.INPUT_DATA, targetPosition: { x: 300, y: 500 } });
await nodes.dragNewConnectedEdge({
@@ -272,7 +272,7 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await expect(diagram.get()).toHaveScreenshot("drds-decision-missing-dependency.png");
@@ -301,7 +301,7 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 300, y: 300 } });
await drgNodes.dragNode({ name: DefaultNodeName.INPUT_DATA, targetPosition: { x: 300, y: 500 } });
@@ -327,7 +327,7 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 500, y: 500 } });
await nodes.move({ name: DefaultNodeName.DECISION, targetPosition: { x: 400, y: 400 } });
@@ -357,7 +357,7 @@ test.describe("Model DRD", () => {
await drds.toggle();
await drds.navigateTo({ name: "Second DRD" });
await drds.toggle();
- await drgNodes.open();
+ await drgNodes.toggle();
await drgNodes.dragNode({ name: DefaultNodeName.DECISION, targetPosition: { x: 500, y: 500 } });
await nodes.resize({ nodeName: DefaultNodeName.DECISION, xOffset: 100, yOffset: 100 });
@@ -371,6 +371,164 @@ test.describe("Model DRD", () => {
expect(width).toEqual("160");
expect(height).toEqual("80");
});
+
+ test.describe("Model DRD - Add Content - Edge Depiction Waypoint", async () => {
+ /**
+ * C A: Decision
+ * ^ B: Decision
+ * | C: Decision
+ * B -> A I: InputData
+ * ^
+ * |
+ * I
+ */
+ test("should add waypoint to secondary edge depiction - information requirement", async ({
+ diagram,
+ drds,
+ drgNodes,
+ edges,
+ nodes,
+ palette,
+ }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/886",
+ });
+
+ await drds.toggle();
+ await drds.navigateTo({ name: "First DRD" });
+ await drds.toggle();
+ await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 400, y: 300 }, thenRenameTo: "A" });
+ await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 100, y: 300 }, thenRenameTo: "B" });
+ await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 400, y: 100 }, thenRenameTo: "C" });
+ await palette.dragNewNode({
+ type: NodeType.INPUT_DATA,
+ targetPosition: { x: 400, y: 500 },
+ thenRenameTo: "I",
+ });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.INFORMATION_REQUIREMENT, from: "B", to: "A" });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.INFORMATION_REQUIREMENT, from: "A", to: "C" });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.INFORMATION_REQUIREMENT, from: "I", to: "A" });
+
+ await drds.toggle();
+ await drds.navigateTo({ name: "Second DRD" });
+ await drds.toggle();
+ await drgNodes.toggle();
+ await drgNodes.dragNode({ name: "A", targetPosition: { x: 400, y: 300 } });
+ await drgNodes.dragNode({ name: "B", targetPosition: { x: 100, y: 300 } });
+ await drgNodes.dragNode({ name: "C", targetPosition: { x: 400, y: 100 } });
+ await drgNodes.dragNode({ name: "I", targetPosition: { x: 400, y: 500 } });
+ await drgNodes.toggle();
+
+ await edges.addWaypoint({ from: "B", to: "A" });
+ await edges.addWaypoint({ from: "A", to: "C" });
+ await edges.addWaypoint({ from: "I", to: "A" });
+
+ await nodes.move({ name: "A", targetPosition: { x: 600, y: 400 } });
+
+ await expect(diagram.get()).toHaveScreenshot("drds-ir-edge-depiction-waypoint.png");
+ });
+
+ /**
+ * A: Decision
+ * B -> A <- C B: BusinessKnowledgeModel
+ * C: DecisionService
+ */
+ test("should add waypoint to secondary edge depiction - knowledge requirement", async ({
+ diagram,
+ drds,
+ drgNodes,
+ edges,
+ nodes,
+ palette,
+ }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/886",
+ });
+
+ await drds.toggle();
+ await drds.navigateTo({ name: "First DRD" });
+ await drds.toggle();
+ await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 400, y: 300 }, thenRenameTo: "A" });
+ await palette.dragNewNode({ type: NodeType.BKM, targetPosition: { x: 100, y: 300 }, thenRenameTo: "B" });
+ await palette.dragNewNode({
+ type: NodeType.DECISION_SERVICE,
+ targetPosition: { x: 600, y: 300 },
+ thenRenameTo: "C",
+ });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.KNOWLEDGE_REQUIREMENT, from: "B", to: "A" });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.KNOWLEDGE_REQUIREMENT, from: "C", to: "A" });
+
+ await drds.toggle();
+ await drds.navigateTo({ name: "Second DRD" });
+ await drds.toggle();
+ await drgNodes.toggle();
+ await drgNodes.dragNode({ name: "A", targetPosition: { x: 400, y: 300 } });
+ await drgNodes.dragNode({ name: "B", targetPosition: { x: 100, y: 300 } });
+ await drgNodes.dragNode({ name: "C", targetPosition: { x: 600, y: 300 } });
+ await drgNodes.toggle();
+
+ await edges.addWaypoint({ from: "B", to: "A" });
+ await edges.addWaypoint({ from: "C", to: "A" });
+
+ await nodes.move({ name: "A", targetPosition: { x: 400, y: 200 } });
+
+ await expect(diagram.get()).toHaveScreenshot("drds-kr-edge-depiction-waypoint.png");
+ });
+
+ /**
+ * A: Decision
+ * B -> A -> C B: KnowledgeSource
+ * C: KnowledgeSource
+ */
+ test("should add waypoint to secondary edge depiction - authority requirement", async ({
+ diagram,
+ drds,
+ drgNodes,
+ edges,
+ nodes,
+ palette,
+ }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/886",
+ });
+
+ await drds.toggle();
+ await drds.navigateTo({ name: "First DRD" });
+ await drds.toggle();
+ await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 400, y: 300 }, thenRenameTo: "A" });
+ await palette.dragNewNode({
+ type: NodeType.KNOWLEDGE_SOURCE,
+ targetPosition: { x: 100, y: 300 },
+ thenRenameTo: "B",
+ });
+ await palette.dragNewNode({
+ type: NodeType.KNOWLEDGE_SOURCE,
+ targetPosition: { x: 600, y: 300 },
+ thenRenameTo: "C",
+ });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.AUTHORITY_REQUIREMENT, from: "B", to: "A" });
+ await nodes.dragNewConnectedEdge({ type: EdgeType.AUTHORITY_REQUIREMENT, from: "A", to: "C" });
+
+ await drds.toggle();
+ await drds.navigateTo({ name: "Second DRD" });
+ await drds.toggle();
+ await drgNodes.toggle();
+ await drgNodes.dragNode({ name: "A", targetPosition: { x: 400, y: 300 } });
+ await drgNodes.dragNode({ name: "B", targetPosition: { x: 100, y: 300 } });
+ await drgNodes.dragNode({ name: "C", targetPosition: { x: 600, y: 300 } });
+ await drgNodes.toggle();
+
+ await edges.addWaypoint({ from: "B", to: "A" });
+ await edges.addWaypoint({ from: "A", to: "C" });
+
+ await nodes.move({ name: "A", targetPosition: { x: 400, y: 200 } });
+
+ await expect(diagram.get()).toHaveScreenshot("drds-ar-edge-depiction-waypoint.png");
+ });
+ });
});
});
});
diff --git a/packages/dmn-editor/tests-e2e/drgElements/addBkm.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/addBkm.spec.ts
index 82f855262f0..8dd4e3e644e 100644
--- a/packages/dmn-editor/tests-e2e/drgElements/addBkm.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgElements/addBkm.spec.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+import { TestAnnotations } from "@kie-tools/playwright-base/annotations";
import { test, expect } from "../__fixtures__/base";
import { EdgeType } from "../__fixtures__/edges";
import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
@@ -31,7 +32,7 @@ test.describe("Add node - BKM", () => {
test("should add new BKM node from palette", async ({ jsonModel, palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.BKM, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.BKM })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.BKM })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-bkm-node-from-palette.png");
// JSON model assertions
@@ -52,6 +53,25 @@ test.describe("Add node - BKM", () => {
"@_height": 80,
});
});
+
+ test("should add two new BKM nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+ await palette.dragNewNode({ type: NodeType.BKM, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.BKM,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second BKM",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.BKM })).toBeAttached();
+ await expect(nodes.get({ name: "Second BKM" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-bkm-nodes-from-palette.png");
+ });
});
test.describe("add from nodes", () => {
@@ -67,7 +87,7 @@ test.describe("Add node - BKM", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: "BKM - A", to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(await edges.get({ from: "BKM - A", to: DefaultNodeName.BKM })).toBeAttached();
expect(await edges.getType({ from: "BKM - A", to: DefaultNodeName.BKM })).toEqual(
EdgeType.KNOWLEDGE_REQUIREMENT
);
@@ -85,7 +105,9 @@ test.describe("Add node - BKM", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.BKM })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.BKM })).toEqual(
EdgeType.KNOWLEDGE_REQUIREMENT
);
@@ -103,7 +125,9 @@ test.describe("Add node - BKM", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.BKM })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.BKM })).toEqual(
EdgeType.AUTHORITY_REQUIREMENT
);
diff --git a/packages/dmn-editor/tests-e2e/drgElements/addDecision.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/addDecision.spec.ts
index 9134334c9cc..368fa7de1f0 100644
--- a/packages/dmn-editor/tests-e2e/drgElements/addDecision.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgElements/addDecision.spec.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+import { TestAnnotations } from "@kie-tools/playwright-base/annotations";
import { test, expect } from "../__fixtures__/base";
import { EdgeType } from "../__fixtures__/edges";
import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
@@ -31,7 +32,7 @@ test.describe("Add node - Decision", () => {
test("should add Decision node from palette", async ({ jsonModel, palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-decision-node-from-palette.png");
// JSON model assertions
@@ -52,6 +53,26 @@ test.describe("Add node - Decision", () => {
"@_height": 80,
});
});
+
+ test("should add two Decision nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+
+ await palette.dragNewNode({ type: NodeType.DECISION, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.DECISION,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second Decision",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(nodes.get({ name: "Second Decision" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-decision-nodes-from-palette.png");
+ });
});
test.describe("add from nodes", () => {
@@ -72,7 +93,9 @@ test.describe("Add node - Decision", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toEqual(
EdgeType.INFORMATION_REQUIREMENT
);
@@ -121,7 +144,7 @@ test.describe("Add node - Decision", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: "Decision - A", to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: "Decision - A", to: DefaultNodeName.DECISION })).toBeAttached();
expect(await edges.getType({ from: "Decision - A", to: DefaultNodeName.DECISION })).toEqual(
EdgeType.INFORMATION_REQUIREMENT
);
@@ -139,7 +162,7 @@ test.describe("Add node - Decision", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).toEqual(
EdgeType.KNOWLEDGE_REQUIREMENT
);
@@ -162,7 +185,7 @@ test.describe("Add node - Decision", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.DECISION })
).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.DECISION })).toEqual(
@@ -187,7 +210,7 @@ test.describe("Add node - Decision", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.DECISION })
).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.KNOWLEDGE_SOURCE, to: DefaultNodeName.DECISION })).toEqual(
diff --git a/packages/dmn-editor/tests-e2e/drgElements/addDecisionService.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/addDecisionService.spec.ts
index b89385ce237..efbc781ad5e 100644
--- a/packages/dmn-editor/tests-e2e/drgElements/addDecisionService.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgElements/addDecisionService.spec.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+import { TestAnnotations } from "@kie-tools/playwright-base/annotations";
import { test, expect } from "../__fixtures__/base";
import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
@@ -30,10 +31,9 @@ test.describe("Add node - Decision Service", () => {
test("should add Decision Service node from palette", async ({ jsonModel, palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.DECISION_SERVICE })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.DECISION_SERVICE })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-decision-service-node-from-palette.png");
- // JSON model assertions
// JSON model assertions
const decisionService = await jsonModel.drgElements.getDecisionService({ drgElementIndex: 0, drdIndex: 0 });
expect(decisionService).toEqual({
@@ -54,6 +54,26 @@ test.describe("Add node - Decision Service", () => {
"@_height": 320,
});
});
+
+ test("should add two Decision Service nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+
+ await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.DECISION_SERVICE,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second DS",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.DECISION_SERVICE })).toBeAttached();
+ await expect(nodes.get({ name: "Second DS" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-decision-service-nodes-from-palette.png");
+ });
});
});
});
diff --git a/packages/dmn-editor/tests-e2e/drgElements/addExternalNode.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/addExternalNode.spec.ts
new file mode 100644
index 00000000000..0a4e2a9bab9
--- /dev/null
+++ b/packages/dmn-editor/tests-e2e/drgElements/addExternalNode.spec.ts
@@ -0,0 +1,76 @@
+/*
+ * 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 { expect, test } from "../__fixtures__/base";
+import { TabName } from "../__fixtures__/editor";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+
+test.beforeEach(async ({ stories }) => {
+ await stories.openEmptyWithAvailableExternalModels();
+});
+
+test.describe("Add external node - Decision", () => {
+ test("add to a Decision Service", async ({ editor, palette, diagram, nodes, includedModels }) => {
+ await editor.changeTab({ tab: TabName.INCLUDED_MODELS });
+
+ await includedModels.getIncludeModelButton().click();
+ await includedModels.fillModelToInclude({ modelName: "sumDiffDs.dmn" });
+ await includedModels.selectModel({ modelName: "sumDiffDs.dmn" });
+ await includedModels.fillModelName({ modelName: "MY_MODEL" });
+ await includedModels.includeModel();
+
+ await editor.changeTab({ tab: TabName.EDITOR });
+ await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 400, y: 200 } });
+
+ await palette.toggleExternalNodesPanel();
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Sum",
+ targetPosition: {
+ x: 200,
+ y: 200,
+ },
+ });
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Diff",
+ targetPosition: {
+ x: 300,
+ y: 300,
+ },
+ });
+
+ // We're hiding the panel now.
+ await palette.toggleExternalNodesPanel();
+
+ await diagram.resetFocus();
+ await nodes.move({ name: "Sum", targetPosition: { x: 500, y: 300 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 500, y: 430 } });
+
+ await diagram.resetFocus();
+
+ // We move it to make it sure that the nodes are added inside the Decision Services
+ // and are really attached to it, not only "visually over it".
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 120, y: 120 } });
+
+ await expect(diagram.get()).toHaveScreenshot("add-external-node-inside-decision-service.png");
+ });
+});
diff --git a/packages/dmn-editor/tests-e2e/drgElements/addInputData.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/addInputData.spec.ts
index e6204313cee..070ee925733 100644
--- a/packages/dmn-editor/tests-e2e/drgElements/addInputData.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgElements/addInputData.spec.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+import { TestAnnotations } from "@kie-tools/playwright-base/annotations";
import { test, expect } from "../__fixtures__/base";
import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
@@ -30,7 +31,7 @@ test.describe("Add node - Input Data", () => {
test("should add Input Data node from palette", async ({ jsonModel, palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.INPUT_DATA, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.INPUT_DATA })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.INPUT_DATA })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-input-data-node-from-palette.png");
// JSON model assertions
@@ -51,6 +52,26 @@ test.describe("Add node - Input Data", () => {
"@_height": 80,
});
});
+
+ test("should add two Input Data nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+
+ await palette.dragNewNode({ type: NodeType.INPUT_DATA, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.INPUT_DATA,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second Input Data",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.INPUT_DATA })).toBeAttached();
+ await expect(nodes.get({ name: "Second Input Data" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-input-data-nodes-from-palette.png");
+ });
});
});
});
diff --git a/packages/dmn-editor/tests-e2e/drgElements/addKnowledgeSource.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/addKnowledgeSource.spec.ts
index 28ef3c99185..434c8f3564b 100644
--- a/packages/dmn-editor/tests-e2e/drgElements/addKnowledgeSource.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgElements/addKnowledgeSource.spec.ts
@@ -17,6 +17,7 @@
* under the License.
*/
+import { TestAnnotations } from "@kie-tools/playwright-base/annotations";
import { test, expect } from "../__fixtures__/base";
import { EdgeType } from "../__fixtures__/edges";
import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
@@ -31,7 +32,7 @@ test.describe("Add node - Knowledge Source", () => {
test("should add Knowledge Source node from palette", async ({ jsonModel, palette, nodes, diagram }) => {
await palette.dragNewNode({ type: NodeType.KNOWLEDGE_SOURCE, targetPosition: { x: 100, y: 100 } });
- expect(nodes.get({ name: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
+ await expect(nodes.get({ name: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
await expect(diagram.get()).toHaveScreenshot("add-knowledge-source-node-from-palette.png");
// JSON model assertions
@@ -48,6 +49,26 @@ test.describe("Add node - Knowledge Source", () => {
"@_height": 80,
});
});
+
+ test("should add two Knowledge Source nodes from palette in a row", async ({ palette, nodes, diagram }) => {
+ test.info().annotations.push({
+ type: TestAnnotations.REGRESSION,
+ description: "https://github.com/apache/incubator-kie-issues/issues/980",
+ });
+
+ await palette.dragNewNode({ type: NodeType.KNOWLEDGE_SOURCE, targetPosition: { x: 100, y: 100 } });
+ await palette.dragNewNode({
+ type: NodeType.KNOWLEDGE_SOURCE,
+ targetPosition: { x: 300, y: 300 },
+ thenRenameTo: "Second Knowledge Source",
+ });
+
+ await diagram.resetFocus();
+
+ await expect(nodes.get({ name: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
+ await expect(nodes.get({ name: "Second Knowledge Source" })).toBeAttached();
+ await expect(diagram.get()).toHaveScreenshot("add-2-knowledge-source-nodes-from-palette.png");
+ });
});
test.describe("add from nodes", () => {
@@ -67,7 +88,7 @@ test.describe("Add node - Knowledge Source", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })
).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })).toEqual(
@@ -92,7 +113,7 @@ test.describe("Add node - Knowledge Source", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.KNOWLEDGE_SOURCE })
).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION, to: DefaultNodeName.KNOWLEDGE_SOURCE })).toEqual(
@@ -118,7 +139,9 @@ test.describe("Add node - Knowledge Source", () => {
targetPosition: { x: 500, y: 500 },
});
- expect(await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
+ await expect(
+ await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).toBeAttached();
expect(await edges.getType({ from: "Knowledge Source - A", to: DefaultNodeName.KNOWLEDGE_SOURCE })).toEqual(
EdgeType.AUTHORITY_REQUIREMENT
);
diff --git a/packages/dmn-editor/tests-e2e/drgElements/deleteExternalNode.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/deleteExternalNode.spec.ts
new file mode 100644
index 00000000000..6b7dc780eb2
--- /dev/null
+++ b/packages/dmn-editor/tests-e2e/drgElements/deleteExternalNode.spec.ts
@@ -0,0 +1,80 @@
+/*
+ * 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 { expect, test } from "../__fixtures__/base";
+import { TabName } from "../__fixtures__/editor";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+
+test.beforeEach(async ({ stories }) => {
+ await stories.openEmptyWithAvailableExternalModels();
+});
+
+test.describe("Delete external node - Decision", () => {
+ test("delete an external node from Decision Service", async ({ editor, palette, diagram, nodes, includedModels }) => {
+ await editor.changeTab({ tab: TabName.INCLUDED_MODELS });
+
+ await includedModels.getIncludeModelButton().click();
+ await includedModels.fillModelToInclude({ modelName: "sumDiffDs.dmn" });
+ await includedModels.selectModel({ modelName: "sumDiffDs.dmn" });
+ await includedModels.fillModelName({ modelName: "MY_MODEL" });
+ await includedModels.includeModel();
+
+ await editor.changeTab({ tab: TabName.EDITOR });
+ await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 400, y: 200 } });
+
+ await palette.toggleExternalNodesPanel();
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Sum",
+ targetPosition: {
+ x: 200,
+ y: 200,
+ },
+ });
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Diff",
+ targetPosition: {
+ x: 300,
+ y: 300,
+ },
+ });
+
+ // We're hiding the panel now.
+ await palette.toggleExternalNodesPanel();
+
+ await diagram.resetFocus();
+ await nodes.move({ name: "Sum", targetPosition: { x: 500, y: 300 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 500, y: 430 } });
+
+ await expect(diagram.get()).toHaveScreenshot("delete-external-node-inside-decision-service-before-delete.png");
+
+ await nodes.delete({ name: "Sum" });
+
+ await diagram.resetFocus();
+
+ // We move it to make it sure that the nodes are added inside the Decision Services
+ // and are really attached to it, not only "visually over it".
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 120, y: 120 } });
+
+ await expect(diagram.get()).toHaveScreenshot("delete-external-node-inside-decision-service-after-delete.png");
+ });
+});
diff --git a/packages/dmn-editor/tests-e2e/drgElements/moveExternalNode.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/moveExternalNode.spec.ts
new file mode 100644
index 00000000000..c553643934a
--- /dev/null
+++ b/packages/dmn-editor/tests-e2e/drgElements/moveExternalNode.spec.ts
@@ -0,0 +1,227 @@
+/*
+ * 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 { expect, test } from "../__fixtures__/base";
+import { TabName } from "../__fixtures__/editor";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+
+test.beforeEach(async ({ stories }) => {
+ await stories.openEmptyWithAvailableExternalModels();
+});
+
+test.describe("Move external node - Decision", () => {
+ test("move an external node from Decision Service to out", async ({
+ editor,
+ palette,
+ diagram,
+ nodes,
+ includedModels,
+ }) => {
+ await editor.changeTab({ tab: TabName.INCLUDED_MODELS });
+
+ await includedModels.getIncludeModelButton().click();
+ await includedModels.fillModelToInclude({ modelName: "sumDiffDs.dmn" });
+ await includedModels.selectModel({ modelName: "sumDiffDs.dmn" });
+ await includedModels.fillModelName({ modelName: "MY_MODEL" });
+ await includedModels.includeModel();
+
+ await editor.changeTab({ tab: TabName.EDITOR });
+ await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 400, y: 200 } });
+
+ await palette.toggleExternalNodesPanel();
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Sum",
+ targetPosition: {
+ x: 200,
+ y: 200,
+ },
+ });
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Diff",
+ targetPosition: {
+ x: 300,
+ y: 300,
+ },
+ });
+
+ // We're hiding the panel now.
+ await palette.toggleExternalNodesPanel();
+
+ await diagram.resetFocus();
+ await nodes.move({ name: "Sum", targetPosition: { x: 500, y: 300 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 500, y: 430 } });
+
+ // We move it to make it sure that the nodes are added inside the Decision Services
+ // and are really attached to it, not only "visually over it".
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 100, y: 400 } });
+
+ await expect(diagram.get()).toHaveScreenshot(
+ "move-external-decision-inside-decision-service-before-move-to-out.png"
+ );
+
+ await diagram.resetFocus();
+
+ await nodes.move({ name: "Sum", targetPosition: { x: 400, y: 120 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 400, y: 400 } });
+
+ // Move again to make sure that nodes are not attached anymore to Decision Service.
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 600, y: 100 } });
+
+ await expect(diagram.get()).toHaveScreenshot(
+ "move-external-decision-inside-decision-service-after-move-to-out.png"
+ );
+ });
+
+ test("move an external decision from one Decision Service to another Decision Service", async ({
+ editor,
+ page,
+ palette,
+ diagram,
+ nodes,
+ includedModels,
+ }) => {
+ await editor.changeTab({ tab: TabName.INCLUDED_MODELS });
+
+ await includedModels.getIncludeModelButton().click();
+ await includedModels.fillModelToInclude({ modelName: "sumDiffDs.dmn" });
+ await includedModels.selectModel({ modelName: "sumDiffDs.dmn" });
+ await includedModels.fillModelName({ modelName: "MY_MODEL" });
+ await includedModels.includeModel();
+
+ await editor.changeTab({ tab: TabName.EDITOR });
+ await palette.dragNewNode({
+ type: NodeType.DECISION_SERVICE,
+ targetPosition: { x: 250, y: 50 },
+ thenRenameTo: DefaultNodeName.DECISION_SERVICE + " 1",
+ });
+ await palette.dragNewNode({
+ type: NodeType.DECISION_SERVICE,
+ targetPosition: { x: 650, y: 50 },
+ thenRenameTo: DefaultNodeName.DECISION_SERVICE + " 2",
+ });
+
+ await palette.toggleExternalNodesPanel();
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Sum",
+ targetPosition: {
+ x: 600,
+ y: 400,
+ },
+ });
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Diff",
+ targetPosition: {
+ x: 200,
+ y: 400,
+ },
+ });
+
+ // We're hiding the panel now.
+ await palette.toggleExternalNodesPanel();
+
+ await diagram.resetFocus();
+ await nodes.move({ name: "Sum", targetPosition: { x: 350, y: 150 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 350, y: 250 } });
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE + " 1", targetPosition: { x: 200, y: 300 } });
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE + " 2", targetPosition: { x: 600, y: 300 } });
+
+ await expect(diagram.get()).toHaveScreenshot("move-external-decision-from-ds-to-another-ds-before-move.png");
+
+ await diagram.resetFocus();
+
+ await nodes.move({ name: "Sum", targetPosition: { x: 680, y: 350 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 680, y: 500 } });
+
+ // We move it to make it sure that the nodes are added inside the Decision Services
+ // and are really attached to it, not only "visually over it".
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE + " 1", targetPosition: { x: 100, y: 100 } });
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE + " 2", targetPosition: { x: 400, y: 400 } });
+
+ await expect(diagram.get()).toHaveScreenshot("move-external-decision-from-ds-to-another-ds-after-move.png");
+ });
+
+ test("move an external decision out from Decision Service", async ({
+ editor,
+ page,
+ palette,
+ diagram,
+ nodes,
+ includedModels,
+ }) => {
+ await editor.changeTab({ tab: TabName.INCLUDED_MODELS });
+
+ await includedModels.getIncludeModelButton().click();
+ await includedModels.fillModelToInclude({ modelName: "sumDiffDs.dmn" });
+ await includedModels.selectModel({ modelName: "sumDiffDs.dmn" });
+ await includedModels.fillModelName({ modelName: "MY_MODEL" });
+ await includedModels.includeModel();
+
+ await editor.changeTab({ tab: TabName.EDITOR });
+ await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 400, y: 200 } });
+
+ await palette.toggleExternalNodesPanel();
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Sum",
+ targetPosition: {
+ x: 200,
+ y: 200,
+ },
+ });
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Diff",
+ targetPosition: {
+ x: 300,
+ y: 300,
+ },
+ });
+
+ // We're hiding the panel now.
+ await palette.toggleExternalNodesPanel();
+
+ await diagram.resetFocus();
+ await nodes.move({ name: "Sum", targetPosition: { x: 500, y: 300 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 500, y: 430 } });
+
+ // We move it to make it sure that the nodes are added inside the Decision Services
+ // and are really attached to it, not only "visually over it".
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 100, y: 400 } });
+
+ await expect(diagram.get()).toHaveScreenshot("move-external-decision-out-from-decision-service-before.png");
+
+ await nodes.move({ name: "Sum", targetPosition: { x: 530, y: 100 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 530, y: 200 } });
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 120, y: 200 } });
+
+ await diagram.resetFocus();
+
+ await expect(diagram.get()).toHaveScreenshot("move-external-decision-out-from-decision-service-after.png");
+ });
+});
diff --git a/packages/dmn-editor/tests-e2e/drgElements/resizeExternalNode.spec.ts b/packages/dmn-editor/tests-e2e/drgElements/resizeExternalNode.spec.ts
new file mode 100644
index 00000000000..cfe758c7506
--- /dev/null
+++ b/packages/dmn-editor/tests-e2e/drgElements/resizeExternalNode.spec.ts
@@ -0,0 +1,87 @@
+/*
+ * 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 { expect, test } from "../__fixtures__/base";
+import { TabName } from "../__fixtures__/editor";
+import { DefaultNodeName, NodeType } from "../__fixtures__/nodes";
+
+test.beforeEach(async ({ stories }) => {
+ await stories.openEmptyWithAvailableExternalModels();
+});
+
+test.describe("Resize external node - Decision", () => {
+ test("resize an external node inside Decision Service", async ({
+ editor,
+ palette,
+ diagram,
+ nodes,
+ includedModels,
+ }) => {
+ await editor.changeTab({ tab: TabName.INCLUDED_MODELS });
+
+ await includedModels.getIncludeModelButton().click();
+ await includedModels.fillModelToInclude({ modelName: "sumDiffDs.dmn" });
+ await includedModels.selectModel({ modelName: "sumDiffDs.dmn" });
+ await includedModels.fillModelName({ modelName: "MY_MODEL" });
+ await includedModels.includeModel();
+
+ await editor.changeTab({ tab: TabName.EDITOR });
+ await palette.dragNewNode({ type: NodeType.DECISION_SERVICE, targetPosition: { x: 400, y: 200 } });
+
+ await palette.toggleExternalNodesPanel();
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Sum",
+ targetPosition: {
+ x: 200,
+ y: 200,
+ },
+ });
+
+ await palette.dragExternalNode({
+ includedModelName: "MY_MODEL",
+ nodeName: "Diff",
+ targetPosition: {
+ x: 300,
+ y: 300,
+ },
+ });
+
+ // We're hiding the panel now.
+ await palette.toggleExternalNodesPanel();
+
+ await diagram.resetFocus();
+ await nodes.move({ name: "Sum", targetPosition: { x: 500, y: 300 } });
+ await nodes.move({ name: "Diff", targetPosition: { x: 500, y: 430 } });
+
+ await expect(diagram.get()).toHaveScreenshot("resize-external-node-inside-decision-service-before-resizing.png");
+
+ await nodes.resize({ nodeName: "Sum", xOffset: 50, yOffset: 10 });
+ await nodes.resize({ nodeName: "Diff", xOffset: 100, yOffset: 20 });
+
+ await diagram.resetFocus();
+
+ // We move it to make it sure that the nodes are added inside the Decision Services
+ // and are really attached to it, not only "visually over it".
+ await nodes.move({ name: DefaultNodeName.DECISION_SERVICE, targetPosition: { x: 120, y: 120 } });
+
+ await expect(diagram.get()).toHaveScreenshot("resize-external-node-inside-decision-service-after-resizing.png");
+ });
+});
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/addAuthorityRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/addAuthorityRequirement.spec.ts
index 0ad8c7c0f99..cb70fffde39 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/addAuthorityRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/addAuthorityRequirement.spec.ts
@@ -55,7 +55,7 @@ test.describe("Add edge - Authority Requirement", () => {
to: DefaultNodeName.DECISION,
});
- expect(await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.DECISION })).toBeAttached();
expect(await edges.getType({ from: "Knowledge Source - A", to: DefaultNodeName.DECISION })).toEqual(
EdgeType.AUTHORITY_REQUIREMENT
);
@@ -78,7 +78,7 @@ test.describe("Add edge - Authority Requirement", () => {
to: DefaultNodeName.BKM,
});
- expect(await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.BKM })).toBeAttached();
expect(await edges.getType({ from: "Knowledge Source - A", to: DefaultNodeName.BKM })).toEqual(
EdgeType.AUTHORITY_REQUIREMENT
);
@@ -104,7 +104,9 @@ test.describe("Add edge - Authority Requirement", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
+ await expect(
+ await edges.get({ from: "Knowledge Source - A", to: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).toBeAttached();
expect(await edges.getType({ from: "Knowledge Source - A", to: DefaultNodeName.KNOWLEDGE_SOURCE })).toEqual(
EdgeType.AUTHORITY_REQUIREMENT
);
@@ -140,7 +142,9 @@ test.describe("Add edge - Authority Requirement", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.DECISION, to: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION, to: DefaultNodeName.KNOWLEDGE_SOURCE })).toEqual(
EdgeType.AUTHORITY_REQUIREMENT
);
@@ -166,7 +170,7 @@ test.describe("Add edge - Authority Requirement", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })
).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })).toEqual(
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/addInformationRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/addInformationRequirement.spec.ts
index 412ab8960cc..1e28fd5d1e1 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/addInformationRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/addInformationRequirement.spec.ts
@@ -52,7 +52,7 @@ test.describe("Add edge - Information Requirement", () => {
to: DefaultNodeName.DECISION,
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toEqual(
EdgeType.INFORMATION_REQUIREMENT
);
@@ -88,7 +88,7 @@ test.describe("Add edge - Information Requirement", () => {
to: DefaultNodeName.DECISION,
});
- expect(await edges.get({ from: "Decision - A", to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: "Decision - A", to: DefaultNodeName.DECISION })).toBeAttached();
expect(await edges.getType({ from: "Decision - A", to: DefaultNodeName.DECISION })).toEqual(
EdgeType.INFORMATION_REQUIREMENT
);
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/addKnowledgeRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/addKnowledgeRequirement.spec.ts
index a9058f4d89b..a7e41d5a9a8 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/addKnowledgeRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/addKnowledgeRequirement.spec.ts
@@ -51,7 +51,7 @@ test.describe("Add edge - Knowledge Requirement", () => {
to: DefaultNodeName.DECISION,
});
- expect(await edges.get({ from: "BKM - A", to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: "BKM - A", to: DefaultNodeName.DECISION })).toBeAttached();
expect(await edges.getType({ from: "BKM - A", to: DefaultNodeName.DECISION })).toEqual(
EdgeType.KNOWLEDGE_REQUIREMENT
);
@@ -71,7 +71,7 @@ test.describe("Add edge - Knowledge Requirement", () => {
to: DefaultNodeName.BKM,
});
- expect(await edges.get({ from: "BKM - A", to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(await edges.get({ from: "BKM - A", to: DefaultNodeName.BKM })).toBeAttached();
expect(await edges.getType({ from: "BKM - A", to: DefaultNodeName.BKM })).toEqual(EdgeType.KNOWLEDGE_REQUIREMENT);
await expect(diagram.get()).toHaveScreenshot("add-knowledge-requirement-edge-from-bkm-node-to-bkm-node.png");
});
@@ -100,7 +100,9 @@ test.describe("Add edge - Knowledge Requirement", () => {
to: DefaultNodeName.DECISION,
});
- expect(await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.DECISION })
+ ).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.DECISION })).toEqual(
EdgeType.KNOWLEDGE_REQUIREMENT
);
@@ -122,7 +124,7 @@ test.describe("Add edge - Knowledge Requirement", () => {
to: DefaultNodeName.BKM,
});
- expect(await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.BKM })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.BKM })).toBeAttached();
expect(await edges.getType({ from: DefaultNodeName.DECISION_SERVICE, to: DefaultNodeName.BKM })).toEqual(
EdgeType.KNOWLEDGE_REQUIREMENT
);
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/deleteAuthorityRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/deleteAuthorityRequirement.spec.ts
index 29c68a705ea..30af9d7ff1f 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/deleteAuthorityRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/deleteAuthorityRequirement.spec.ts
@@ -34,14 +34,16 @@ test.describe("Delete edge - Authority Requirement", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })).toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })
+ ).toBeAttached();
});
test("should delete an Authority Requirement using the delete key", async ({ diagram, edges, nodes }) => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE });
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })
).not.toBeAttached();
@@ -53,7 +55,7 @@ test.describe("Delete edge - Authority Requirement", () => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE, isBackspace: true });
- expect(
+ await expect(
await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.KNOWLEDGE_SOURCE })
).not.toBeAttached();
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/deleteInformationRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/deleteInformationRequirement.spec.ts
index f7603a27ced..87773a0b304 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/deleteInformationRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/deleteInformationRequirement.spec.ts
@@ -34,14 +34,16 @@ test.describe("Delete edge - Information Requirement", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).toBeAttached();
});
test("should delete an Information Requirement using the delete key", async ({ diagram, edges, nodes }) => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION });
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).not.toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })
+ ).not.toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.INPUT_DATA })).toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
@@ -51,7 +53,9 @@ test.describe("Delete edge - Information Requirement", () => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION, isBackspace: true });
- expect(await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })).not.toBeAttached();
+ await expect(
+ await edges.get({ from: DefaultNodeName.INPUT_DATA, to: DefaultNodeName.DECISION })
+ ).not.toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.INPUT_DATA })).toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/deleteKnowledgeRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/deleteKnowledgeRequirement.spec.ts
index fc00cd79216..8a92187ac1a 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/deleteKnowledgeRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/deleteKnowledgeRequirement.spec.ts
@@ -34,14 +34,14 @@ test.describe("Delete edge - Knowledge Requirement", () => {
targetPosition: { x: 100, y: 300 },
});
- expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).toBeAttached();
});
test("should delete a Knowledge Requirement using the delete key", async ({ diagram, edges, nodes }) => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION });
- expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).not.toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).not.toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.BKM })).toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
@@ -51,7 +51,7 @@ test.describe("Delete edge - Knowledge Requirement", () => {
await diagram.resetFocus();
await edges.delete({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION, isBackspace: true });
- expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).not.toBeAttached();
+ await expect(await edges.get({ from: DefaultNodeName.BKM, to: DefaultNodeName.DECISION })).not.toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.BKM })).toBeAttached();
await expect(nodes.get({ name: DefaultNodeName.DECISION })).toBeAttached();
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/invalidAuthorityRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/invalidAuthorityRequirement.spec.ts
index 8d4205ab017..b5ba8935a31 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/invalidAuthorityRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/invalidAuthorityRequirement.spec.ts
@@ -51,7 +51,7 @@ test.describe("Invalid edge - Authority Requirement", () => {
to: DefaultNodeName.INPUT_DATA,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
});
test("should dim the target Input Data node", async ({ palette, nodes }) => {
@@ -94,7 +94,7 @@ test.describe("Invalid edge - Authority Requirement", () => {
position: NodePosition.TOP,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.DECISION_SERVICE })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.DECISION_SERVICE })).not.toBeAttached();
});
test("should dim the target Decision Service node", async ({ palette, nodes }) => {
@@ -125,7 +125,7 @@ test.describe("Invalid edge - Authority Requirement", () => {
position: NodePosition.TOP,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
});
test("should dim the target Group node", async ({ palette, nodes }) => {
@@ -155,7 +155,7 @@ test.describe("Invalid edge - Authority Requirement", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
});
test("should dim the target Text Annotation node", async ({ palette, nodes }) => {
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/invalidInformationRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/invalidInformationRequirement.spec.ts
index 147faf2ce32..9d8f3032b8a 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/invalidInformationRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/invalidInformationRequirement.spec.ts
@@ -51,7 +51,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.INPUT_DATA,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
});
test("should dim the target Input Data node", async ({ palette, nodes }) => {
@@ -93,7 +93,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.BKM,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.BKM })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.BKM })).not.toBeAttached();
});
test("should dim the target BKM node", async ({ palette, nodes }) => {
@@ -123,7 +123,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.DECISION_SERVICE,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.DECISION_SERVICE })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.DECISION_SERVICE })).not.toBeAttached();
});
test("should dim the target Decision Service node", async ({ palette, nodes }) => {
@@ -153,7 +153,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.KNOWLEDGE_SOURCE })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.KNOWLEDGE_SOURCE })).not.toBeAttached();
});
test("should dim the target Knowledge Source node", async ({ palette, nodes }) => {
@@ -184,7 +184,7 @@ test.describe("Invalid edge - Information Requirement", () => {
position: NodePosition.TOP,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
});
test("should dim the target Group node", async ({ palette, nodes }) => {
@@ -214,7 +214,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
});
test("should dim the target Text Annotation node", async ({ palette, nodes }) => {
@@ -254,7 +254,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.INPUT_DATA,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
});
test("shouldn't add an Information Requirement edge from Decision node to BKM node", async ({
@@ -273,7 +273,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.BKM,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.BKM })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.BKM })).not.toBeAttached();
});
test("shouldn't add an Information Requirement edge from Decision node to Decision Service node", async ({
@@ -292,7 +292,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.DECISION_SERVICE,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.DECISION_SERVICE })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.DECISION_SERVICE })).not.toBeAttached();
});
test("shouldn't add an Information Requirement edge from Decision node to Knowledge Source node", async ({
@@ -311,7 +311,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.KNOWLEDGE_SOURCE })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.KNOWLEDGE_SOURCE })).not.toBeAttached();
});
test("shouldn't add an Information Requirement edge from Decision node to Group node", async ({
@@ -331,7 +331,7 @@ test.describe("Invalid edge - Information Requirement", () => {
position: NodePosition.TOP,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
});
test("shouldn't add an Information Requirement edge from Decision node to Text Annotation node", async ({
@@ -350,7 +350,7 @@ test.describe("Invalid edge - Information Requirement", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
});
});
});
diff --git a/packages/dmn-editor/tests-e2e/drgRequirements/invalidKnowledgeRequirement.spec.ts b/packages/dmn-editor/tests-e2e/drgRequirements/invalidKnowledgeRequirement.spec.ts
index bb331d11390..171959aa120 100644
--- a/packages/dmn-editor/tests-e2e/drgRequirements/invalidKnowledgeRequirement.spec.ts
+++ b/packages/dmn-editor/tests-e2e/drgRequirements/invalidKnowledgeRequirement.spec.ts
@@ -51,7 +51,7 @@ test.describe("Invalid edge - Knowledge Requirement", () => {
to: DefaultNodeName.INPUT_DATA,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.INPUT_DATA })).not.toBeAttached();
});
test("should dim the target Input Data node", async ({ palette, nodes }) => {
@@ -93,7 +93,7 @@ test.describe("Invalid edge - Knowledge Requirement", () => {
to: DefaultNodeName.KNOWLEDGE_SOURCE,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.KNOWLEDGE_SOURCE })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.KNOWLEDGE_SOURCE })).not.toBeAttached();
});
test("should dim the target Knowledge Source node", async ({ palette, nodes }) => {
@@ -124,7 +124,7 @@ test.describe("Invalid edge - Knowledge Requirement", () => {
position: NodePosition.TOP,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.GROUP })).not.toBeAttached();
});
test("should dim the target Group node", async ({ palette, nodes }) => {
@@ -154,7 +154,7 @@ test.describe("Invalid edge - Knowledge Requirement", () => {
to: DefaultNodeName.TEXT_ANNOTATION,
});
- expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
+ await expect(await edges.get({ from: "Source Node", to: DefaultNodeName.TEXT_ANNOTATION })).not.toBeAttached();
});
test("should dim the target Text Annotation node", async ({ palette, nodes }) => {
diff --git a/packages/dmn-editor/tests-e2e/readOnly/readOnlyDiagram.spec.ts b/packages/dmn-editor/tests-e2e/readOnly/readOnlyDiagram.spec.ts
index c5793cd4e93..53549d4c492 100644
--- a/packages/dmn-editor/tests-e2e/readOnly/readOnlyDiagram.spec.ts
+++ b/packages/dmn-editor/tests-e2e/readOnly/readOnlyDiagram.spec.ts
@@ -31,12 +31,12 @@ test.describe("Read Only mode - Diagram", () => {
});
test("should not be able to rename node", async ({ nodes }) => {
await nodes.selectLabel({ name: "Loan Pre-Qualification" });
- await expect(await nodes.get({ name: "Loan Pre-Qualification" }).getByRole("textbox").nth(0)).toBeDisabled();
+ await expect(nodes.get({ name: "Loan Pre-Qualification" }).getByRole("textbox").nth(0)).toBeDisabled();
});
test("should not be able to change node type", async ({ nodes }) => {
await nodes.hover({ name: "Loan Pre-Qualification" });
await expect(
- await nodes.get({ name: "Loan Pre-Qualification" }).getByPlaceholder("Select a data type...")
+ nodes.get({ name: "Loan Pre-Qualification" }).getByPlaceholder("Select a data type...")
).toBeDisabled();
});
test("should not be able to drag node", async ({ page, nodes }) => {
@@ -45,8 +45,8 @@ test.describe("Read Only mode - Diagram", () => {
});
test("should not be able to edit node", async ({ nodes }) => {
await nodes.get({ name: "Loan Pre-Qualification" }).hover();
- expect(await nodes.get({ name: "Loan Pre-Qualification" }).getByText("Edit")).not.toBeAttached();
- expect(await nodes.get({ name: "Loan Pre-Qualification" }).getByText("View")).toBeAttached();
+ await expect(nodes.get({ name: "Loan Pre-Qualification" }).getByText("Edit")).not.toBeAttached();
+ await expect(nodes.get({ name: "Loan Pre-Qualification" }).getByText("View")).toBeAttached();
});
test("should not be able to add edges", async ({ page, nodes }) => {
await nodes.get({ name: "Loan Pre-Qualification" }).hover();
@@ -54,6 +54,6 @@ test.describe("Read Only mode - Diagram", () => {
});
test("should not be able to delete nodes", async ({ nodes }) => {
await nodes.delete({ name: "Loan Pre-Qualification" });
- await expect(await nodes.get({ name: "Loan Pre-Qualification" })).toBeAttached();
+ await expect(nodes.get({ name: "Loan Pre-Qualification" })).toBeAttached();
});
});
diff --git a/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts b/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts
new file mode 100644
index 00000000000..a7ab7490158
--- /dev/null
+++ b/packages/dmn-editor/tests/mutations/updateExpressionWidth.test.ts
@@ -0,0 +1,242 @@
+/*
+ * 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 { Normalized } from "@kie-tools/dmn-editor/dist/normalization/normalize";
+import { DMN15__tDefinitions } from "@kie-tools/dmn-marshaller/dist/schemas/dmn-1_5/ts-gen/types";
+import { generateUuid } from "@kie-tools/boxed-expression-component/dist/api";
+import { KIE__tComponentsWidthsExtension } from "@kie-tools/dmn-marshaller/dist/schemas/kie-1_0/ts-gen/types";
+import { updateExpressionWidths } from "@kie-tools/dmn-editor/dist/mutations/updateExpressionWidths";
+
+describe("updateExpressionWidth", () => {
+ const drdIndex = 0;
+
+ test("when a definition is deleted from widthsFromId map, it should also be deleted from definitions", () => {
+ const widthEntryForElementA = { dmnElementRef: "a", widths: [10, 150, 110] };
+ const widthEntryForElementB = { dmnElementRef: "b", widths: [20, 250, 210] };
+ const widthEntryForElementC = { dmnElementRef: "c", widths: [30, 350, 310] };
+ const widthEntryForElementD = { dmnElementRef: "d", widths: [40, 450, 410] };
+
+ const definitions = createDefinitionsWithComponentWidths([
+ widthEntryForElementA,
+ widthEntryForElementB,
+ widthEntryForElementC,
+ widthEntryForElementD,
+ ]);
+
+ const widthsById: Map = new Map([
+ [widthEntryForElementA.dmnElementRef, widthEntryForElementA.widths],
+ [widthEntryForElementB.dmnElementRef, widthEntryForElementB.widths],
+ [widthEntryForElementC.dmnElementRef, widthEntryForElementC.widths],
+ ]);
+
+ updateExpressionWidths({ definitions, drdIndex, widthsById });
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: widthEntryForElementA,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: widthEntryForElementB,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: widthEntryForElementC,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: widthEntryForElementD,
+ definitions: definitions,
+ })
+ ).toBeFalsy();
+ });
+
+ test("when a definition is changed in widthsFromId map, it should be changed in definitions", () => {
+ const originalWidthEntryForElementA = { dmnElementRef: "a", widths: [1, 1, 1] };
+ const originalWidthEntryForElementB = { dmnElementRef: "b", widths: [2, 2, 2] };
+ const originalWidthEntryForElementC = { dmnElementRef: "c", widths: [3, 3, 3] };
+
+ const changedWidthEntryForElementA = { dmnElementRef: "a", widths: [11, 11, 11, 11, 11] };
+ const changedWidthEntryForElementB = { dmnElementRef: "b", widths: [20, 20, 20] };
+ const changedWidthEntryForElementC = { dmnElementRef: "c", widths: [3, 3] };
+
+ const definitions = createDefinitionsWithComponentWidths([
+ originalWidthEntryForElementA,
+ originalWidthEntryForElementB,
+ originalWidthEntryForElementC,
+ ]);
+
+ const widthsById: Map = new Map([
+ [changedWidthEntryForElementA.dmnElementRef, changedWidthEntryForElementA.widths],
+ [changedWidthEntryForElementB.dmnElementRef, changedWidthEntryForElementB.widths],
+ [changedWidthEntryForElementC.dmnElementRef, changedWidthEntryForElementC.widths],
+ ]);
+
+ updateExpressionWidths({ definitions, drdIndex, widthsById });
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: originalWidthEntryForElementA,
+ definitions: definitions,
+ })
+ ).toBeFalsy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: originalWidthEntryForElementB,
+ definitions: definitions,
+ })
+ ).toBeFalsy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: originalWidthEntryForElementC,
+ definitions: definitions,
+ })
+ ).toBeFalsy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: changedWidthEntryForElementA,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: changedWidthEntryForElementB,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: changedWidthEntryForElementC,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+ });
+
+ test("when a definition is added in widthsFromId map, it should also be added in definitions", () => {
+ const originalWidthEntryForElementA = { dmnElementRef: "a", widths: [1, 1, 1] };
+ const originalWidthEntryForElementB = { dmnElementRef: "b", widths: [2, 2, 2] };
+
+ const newWidthEntry = { dmnElementRef: "c", widths: [3, 3] };
+
+ const definitions = createDefinitionsWithComponentWidths([
+ originalWidthEntryForElementA,
+ originalWidthEntryForElementB,
+ ]);
+
+ const widthsById: Map = new Map([
+ [originalWidthEntryForElementA.dmnElementRef, originalWidthEntryForElementA.widths],
+ [originalWidthEntryForElementB.dmnElementRef, originalWidthEntryForElementB.widths],
+ [newWidthEntry.dmnElementRef, newWidthEntry.widths],
+ ]);
+
+ updateExpressionWidths({ definitions, drdIndex, widthsById });
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: originalWidthEntryForElementA,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: originalWidthEntryForElementB,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+
+ expect(
+ definitionContainsWidthExtension({
+ widthEntry: newWidthEntry,
+ definitions: definitions,
+ })
+ ).toBeTruthy();
+ });
+});
+
+function definitionContainsWidthExtension(args: {
+ widthEntry: { dmnElementRef: string; widths: number[] };
+ definitions: Normalized;
+}) {
+ const componentsWidthExtension =
+ args.definitions?.["dmndi:DMNDI"]?.["dmndi:DMNDiagram"]?.[0]["di:extension"]?.["kie:ComponentsWidthsExtension"];
+
+ const element = {
+ "@_dmnElementRef": args.widthEntry.dmnElementRef,
+ "kie:width": args.widthEntry.widths.map((w) => {
+ return { __$$text: w };
+ }),
+ };
+
+ return componentsWidthExtension?.["kie:ComponentWidths"]?.find(
+ (e) =>
+ e["@_dmnElementRef"] === element["@_dmnElementRef"] &&
+ e["kie:width"]?.length === element["kie:width"].length &&
+ e["kie:width"]?.every((val, index) => val.__$$text === element["kie:width"]?.[index].__$$text)
+ );
+}
+
+function createDefinitionsWithComponentWidths(widthDefinition: { dmnElementRef: string; widths: number[] }[]) {
+ // Do not inline this variable for type safety. See https://github.com/microsoft/TypeScript/issues/241
+ const definitions: Normalized = {
+ "@_namespace": "https://kie.org/dmn/_982CA10C-B1B9-495C-9CFC-98FAA801BB50",
+ "@_id": generateUuid(),
+ "@_name": "my definitions",
+ "dmndi:DMNDI": {
+ "dmndi:DMNDiagram": [
+ {
+ "@_id": generateUuid(),
+ "di:extension": createComponentWidthExtension(widthDefinition),
+ },
+ ],
+ },
+ };
+ return definitions;
+}
+
+function createComponentWidthExtension(widthDefinition: { dmnElementRef: string; widths: number[] }[]) {
+ // Do not inline this variable for type safety. See https://github.com/microsoft/TypeScript/issues/241
+ const componentsWidthsExtension: KIE__tComponentsWidthsExtension = {
+ ComponentWidths: [
+ ...widthDefinition.map((w) => {
+ return {
+ "@_dmnElementRef": w.dmnElementRef,
+ width: w.widths.map((w) => {
+ return { __$$text: w };
+ }),
+ };
+ }),
+ ],
+ };
+ return componentsWidthsExtension;
+}
diff --git a/packages/dmn-editor/tsconfig.tests.json b/packages/dmn-editor/tsconfig.tests.json
new file mode 100644
index 00000000000..fc8520e7376
--- /dev/null
+++ b/packages/dmn-editor/tsconfig.tests.json
@@ -0,0 +1,3 @@
+{
+ "extends": "./tsconfig.json"
+}
diff --git a/packages/dmn-marshaller-backend-compatibility-tester/package.json b/packages/dmn-marshaller-backend-compatibility-tester/package.json
index 943e66eb8f0..9744e53ab2c 100644
--- a/packages/dmn-marshaller-backend-compatibility-tester/package.json
+++ b/packages/dmn-marshaller-backend-compatibility-tester/package.json
@@ -25,7 +25,7 @@
"prefetch": "node dist/dependenciesFetch.js"
},
"dependencies": {
- "@jbangdev/jbang": "0.2.0"
+ "@jbangdev/jbang": "0.2.3"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
diff --git a/packages/dmn-marshaller-backend-compatibility-tester/src/DmnMarshallerBackendCompatibilityTesterScript.java b/packages/dmn-marshaller-backend-compatibility-tester/src/DmnMarshallerBackendCompatibilityTesterScript.java
index 8737b59b025..e6a42b03242 100644
--- a/packages/dmn-marshaller-backend-compatibility-tester/src/DmnMarshallerBackendCompatibilityTesterScript.java
+++ b/packages/dmn-marshaller-backend-compatibility-tester/src/DmnMarshallerBackendCompatibilityTesterScript.java
@@ -20,6 +20,7 @@
///usr/bin/env jbang "$0" "$@" ; exit $?
//JAVA 17
//REPOS mavencentral,apache=https://repository.apache.org/content/groups/public/
+//DEPS org.kie:drools-build-parent:${kogito-runtime.version}@pom
//DEPS ch.qos.logback:logback-classic:1.2.13
//DEPS info.picocli:picocli:4.7.5
//DEPS org.slf4j:slf4j-simple:2.0.12
diff --git a/packages/dmn-runner/package.json b/packages/dmn-runner/package.json
index 0309fb3c03b..44b7fdc785a 100644
--- a/packages/dmn-runner/package.json
+++ b/packages/dmn-runner/package.json
@@ -29,13 +29,13 @@
"@kie-tools/uniforms-patternfly": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
- "ajv": "^6.12.6",
+ "ajv": "^8.17.1",
+ "ajv-draft-04": "^1.0.0",
+ "ajv-formats": "^3.0.1",
"deep-object-diff": "^1.1.9",
"json-refs": "^3.0.15",
"lodash": "^4.17.21",
"moment": "^2.29.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"uniforms": "^3.10.2",
"uniforms-bridge-json-schema": "^3.10.2"
},
@@ -52,5 +52,9 @@
"@types/react-dom": "^17.0.5",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/dmn-runner/src/ajv.ts b/packages/dmn-runner/src/ajv.ts
index 2ba7cecc2d3..0a192b87e9c 100644
--- a/packages/dmn-runner/src/ajv.ts
+++ b/packages/dmn-runner/src/ajv.ts
@@ -17,9 +17,8 @@
* under the License.
*/
-import Ajv from "ajv";
-import * as metaSchemaDraft04 from "ajv/lib/refs/json-schema-draft-04.json";
-export { ValidateFunction } from "ajv";
+import AjvDraft04, { AnySchemaObject } from "ajv-draft-04";
+import addFormats from "ajv-formats";
import { duration } from "moment";
import {
DATE_AND_TIME_ENUM_REGEXP,
@@ -140,7 +139,7 @@ export class DmnRunnerAjv {
};
private constraintCompiler() {
- return (schema: any, parentSchema: { format?: DmnAjvSchemaFormat }, it: any) => {
+ return (schema: any, parentSchema: AnySchemaObject) => {
if (!parentSchema.format) {
return (data: string) => true;
}
@@ -217,24 +216,25 @@ export class DmnRunnerAjv {
}
constructor() {
- this.ajv = new Ajv({
+ this.ajv = new AjvDraft04({
allErrors: true,
- schemaId: "auto",
useDefaults: true,
removeAdditional: "all",
verbose: true,
});
- this.ajv.addMetaSchema(metaSchemaDraft04);
- this.ajv.addKeyword(X_DMN_TYPE_KEYWORD, {});
- this.ajv.addKeyword(X_DMN_ALLOWED_VALUES_KEYWORD, {
+ addFormats(this.ajv);
+ this.ajv.addKeyword(X_DMN_TYPE_KEYWORD);
+ this.ajv.addKeyword({
+ keyword: X_DMN_ALLOWED_VALUES_KEYWORD,
compile: this.constraintCompiler(),
});
- this.ajv.addKeyword(X_DMN_TYPE_CONSTRAINTS_KEYWORD, {
+ this.ajv.addKeyword({
+ keyword: X_DMN_TYPE_CONSTRAINTS_KEYWORD,
compile: this.constraintCompiler(),
});
- this.ajv.addKeyword(X_DMN_DESCRIPTIONS_KEYWORD, {});
- this.ajv.addKeyword(RECURSION_KEYWORD, {});
- this.ajv.addKeyword(RECURSION_REF_KEYWORD, {});
+ this.ajv.addKeyword(X_DMN_DESCRIPTIONS_KEYWORD);
+ this.ajv.addKeyword(RECURSION_KEYWORD);
+ this.ajv.addKeyword(RECURSION_REF_KEYWORD);
this.ajv.addFormat(DAYS_AND_TIME_DURATION_FORMAT, {
type: "string",
validate: (data: string) => !!data.match(DAYS_AND_TIME_DURATION_REGEXP),
@@ -246,7 +246,7 @@ export class DmnRunnerAjv {
});
}
- public getAjv(): Ajv.Ajv {
+ public getAjv(): AjvDraft04 {
return this.ajv;
}
}
diff --git a/packages/dmn-runner/src/jsonSchema.ts b/packages/dmn-runner/src/jsonSchema.ts
index be94d9f62be..b895edb9f8b 100644
--- a/packages/dmn-runner/src/jsonSchema.ts
+++ b/packages/dmn-runner/src/jsonSchema.ts
@@ -18,7 +18,8 @@
*/
import { JSON_SCHEMA_INPUT_SET_PATH, RECURSION_KEYWORD, RECURSION_REF_KEYWORD } from "./jsonSchemaConstants";
-import { DmnAjvSchemaFormat, ValidateFunction } from "./ajv";
+import { DmnAjvSchemaFormat } from "./ajv";
+import { ValidateFunction } from "ajv-draft-04";
import { ExtendedServicesFormSchema, DmnInputFieldProperties } from "@kie-tools/extended-services-api/dist/formSchema";
import { Holder } from "@kie-tools-core/react-hooks/dist/Holder";
import { resolveRefs, pathFromPtr } from "json-refs";
@@ -87,7 +88,7 @@ export function removeChangedPropertiesAndAdditionalProperties=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/envelope-bus/package.json b/packages/envelope-bus/package.json
index 2ddcc24655a..5e8917f0dc7 100644
--- a/packages/envelope-bus/package.json
+++ b/packages/envelope-bus/package.json
@@ -24,10 +24,7 @@
"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": {
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
- },
+ "dependencies": {},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
@@ -46,5 +43,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/envelope/package.json b/packages/envelope/package.json
index a20cdb546ab..5a2e92b1df8 100644
--- a/packages/envelope/package.json
+++ b/packages/envelope/package.json
@@ -25,9 +25,7 @@
},
"dependencies": {
"@kie-tools-core/envelope-bus": "workspace:*",
- "csstype": "^3.0.11",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "csstype": "^3.0.11"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -40,5 +38,9 @@
"@types/react-dom": "^17.0.5",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/feel-input-component/package.json b/packages/feel-input-component/package.json
index bf742c28eea..be2dfee300d 100644
--- a/packages/feel-input-component/package.json
+++ b/packages/feel-input-component/package.json
@@ -23,9 +23,7 @@
"@kie-tools/dmn-feel-antlr4-parser": "workspace:*",
"@kie-tools/dmn-language-service": "workspace:*",
"@kie-tools/i18n-common-dictionary": "workspace:*",
- "monaco-editor": "^0.39.0",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "monaco-editor": "^0.39.0"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -53,5 +51,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/form-dmn/package.json b/packages/form-dmn/package.json
index 8c2d60b4bcf..db7ed9f2991 100644
--- a/packages/form-dmn/package.json
+++ b/packages/form-dmn/package.json
@@ -36,8 +36,6 @@
"@patternfly/react-icons": "^4.93.6",
"deep-object-diff": "^1.1.9",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"uniforms": "^3.10.2",
"uniforms-bridge-json-schema": "^3.10.2"
},
@@ -66,5 +64,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/form/package.json b/packages/form/package.json
index 30a53e55e01..8ce310fe537 100644
--- a/packages/form/package.json
+++ b/packages/form/package.json
@@ -31,12 +31,12 @@
"@kie-tools/uniforms-patternfly": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
- "ajv": "^6.12.6",
+ "ajv": "^8.17.1",
+ "ajv-draft-04": "^1.0.0",
"ajv-errors": "^1.0.1",
+ "ajv-formats": "^3.0.1",
"deep-object-diff": "^1.1.9",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"uniforms": "^3.10.2",
"uniforms-bridge-json-schema": "^3.10.2"
},
@@ -62,5 +62,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/form/src/Validator.ts b/packages/form/src/Validator.ts
index 752d1100d62..e2520ad7463 100644
--- a/packages/form/src/Validator.ts
+++ b/packages/form/src/Validator.ts
@@ -17,14 +17,18 @@
* under the License.
*/
-import Ajv from "ajv";
+import AjvDraft04 from "ajv-draft-04";
+import addFormats from "ajv-formats";
import { FormJsonSchemaBridge } from "./uniforms/FormJsonSchemaBridge";
import { FormI18n } from "./i18n";
export class Validator {
- constructor(public i18n: FormI18n) {}
+ protected readonly ajv: AjvDraft04;
- protected readonly ajv = new Ajv({ allErrors: true, schemaId: "auto", useDefaults: true });
+ constructor(public i18n: FormI18n) {
+ this.ajv = new AjvDraft04({ allErrors: true, useDefaults: true });
+ addFormats(this.ajv);
+ }
public createValidator(formSchema: object) {
const validator = this.ajv.compile(formSchema);
diff --git a/packages/form/tests/Validator.test.ts b/packages/form/tests/Validator.test.ts
index c65eee0b022..46700da84fd 100644
--- a/packages/form/tests/Validator.test.ts
+++ b/packages/form/tests/Validator.test.ts
@@ -67,7 +67,7 @@ describe("Validator Tests", () => {
const validate = validator.createValidator(schema);
const errors = validate(model);
expect(errors?.details[0].keyword).toEqual("minimum");
- expect(errors?.details[0].message).toEqual("should be >= 1");
+ expect(errors?.details[0].message).toEqual("must be >= 1");
});
it("invalid model - format", () => {
@@ -82,7 +82,7 @@ describe("Validator Tests", () => {
const validate = validator.createValidator(schema);
const errors = validate(model);
expect(errors?.details[0].keyword).toEqual("format");
- expect(errors?.details[0].message).toEqual(`should match format "date-time"`);
+ expect(errors?.details[0].message).toEqual(`must match format "date-time"`);
});
});
diff --git a/packages/i18n/package.json b/packages/i18n/package.json
index dc999685c20..88c7d763368 100644
--- a/packages/i18n/package.json
+++ b/packages/i18n/package.json
@@ -22,10 +22,6 @@
"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": {
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
- },
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
@@ -47,5 +43,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/import-java-classes-component/package.json b/packages/import-java-classes-component/package.json
index 94827bab5dc..718294234af 100644
--- a/packages/import-java-classes-component/package.json
+++ b/packages/import-java-classes-component/package.json
@@ -22,9 +22,7 @@
"@kie-tools/i18n-common-dictionary": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
- "@patternfly/react-table": "^4.112.39",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@patternfly/react-table": "^4.112.39"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -59,5 +57,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/jbpm-quarkus-devui/dev/pom.xml b/packages/jbpm-quarkus-devui/dev/pom.xml
index 3f49837155f..66c31c82286 100644
--- a/packages/jbpm-quarkus-devui/dev/pom.xml
+++ b/packages/jbpm-quarkus-devui/dev/pom.xml
@@ -41,7 +41,7 @@
17
UTF-8
UTF-8
- 3.2.5
+ 3.5.0
3.12.1
3.2.0
3.4.1
diff --git a/packages/jobs-service-webapp/env/index.js b/packages/jobs-service-webapp/env/index.js
new file mode 100644
index 00000000000..2344426cb7a
--- /dev/null
+++ b/packages/jobs-service-webapp/env/index.js
@@ -0,0 +1,33 @@
+/*
+ * 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 {
+ jobsServiceWebapp: {
+ dev: {
+ port: 9028,
+ },
+ },
+ };
+ },
+});
diff --git a/packages/jobs-service-webapp/package.json b/packages/jobs-service-webapp/package.json
new file mode 100644
index 00000000000..1d0ab6eb247
--- /dev/null
+++ b/packages/jobs-service-webapp/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "@kie-tools/jobs-service-webapp",
+ "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"
+ },
+ "types": "./dist/index.d.ts",
+ "main": "dist/index.js",
+ "scripts": {
+ "build:dev": "rimraf dist && webpack --env dev",
+ "build:prod": "pnpm lint && pnpm test && rimraf dist && webpack",
+ "lint": "echo 'Linting'",
+ "start": "webpack serve --host 0.0.0.0 --env dev",
+ "test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\""
+ },
+ "devDependencies": {
+ "@kie-tools-core/webpack-base": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "copy-webpack-plugin": "^11.0.0",
+ "jest": "^29.7.0",
+ "rimraf": "^3.0.2",
+ "ts-node": "^10.9.2",
+ "webpack": "^5.94.0",
+ "webpack-cli": "^4.10.0",
+ "webpack-dev-server": "^4.15.1",
+ "webpack-merge": "^5.9.0"
+ }
+}
diff --git a/packages/jobs-service-webapp/src/index.html b/packages/jobs-service-webapp/src/index.html
new file mode 100644
index 00000000000..98fb32fbccd
--- /dev/null
+++ b/packages/jobs-service-webapp/src/index.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+ Jobs Service Webapp
+
+
+
+
+
+
+
+
+
Jobs Service
+
+
+
Your Jobs service is up and working!
+
+
+ The Job Service facilitates the scheduled execution of tasks in a cloud environment. These tasks are
+ implemented by independent services, and can be started by using any of the Job Service supported interaction
+ modes, based on Http calls or Knative Events delivery.
+
+
+
+
+
+
diff --git a/packages/jobs-service-webapp/src/styles.css b/packages/jobs-service-webapp/src/styles.css
new file mode 100644
index 00000000000..c0d8af289e3
--- /dev/null
+++ b/packages/jobs-service-webapp/src/styles.css
@@ -0,0 +1,75 @@
+body {
+ margin: 0px;
+ padding: 0px;
+}
+
+.maindiv {
+ font-family: "RedHatText", "Overpass", overpass, helvetica, arial, sans-serif;
+ background-color: #fff;
+ color: #fff;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+}
+
+.container {
+ text-align: center;
+ background-color: #fff;
+ max-width: 700px;
+}
+
+.logo img {
+ width: 80px;
+ height: auto;
+}
+
+h1 {
+ font-size: 48px;
+ color: #e44c3b;
+ padding-left: 15px;
+}
+
+h4 {
+ font-size: 30px;
+ color: #c94848;
+ margin-top: 10px;
+}
+
+p {
+ font-size: 16px;
+ color: #1f1e1e;
+ margin-top: 5px;
+ margin-bottom: 40px;
+}
+
+.btn {
+ padding: 10px 20px;
+ background-color: #e44c3b;
+ color: #fff;
+ text-decoration: none;
+ border-radius: 5px;
+ font-size: 16px;
+ transition: background-color 0.3s;
+}
+
+.btn:hover {
+ background-color: #c73828;
+}
+
+.linkbutton {
+ display: flex;
+ justify-content: space-around;
+}
+
+@media (prefers-color-scheme: dark) {
+ .maindiv,
+ .container {
+ background-color: #232121;
+ }
+
+ h4,
+ p {
+ color: #fefefe;
+ }
+}
diff --git a/packages/jobs-service-webapp/static/favicon.svg b/packages/jobs-service-webapp/static/favicon.svg
new file mode 100644
index 00000000000..8806924e382
--- /dev/null
+++ b/packages/jobs-service-webapp/static/favicon.svg
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ kie_icon_rgb_fullcolor_default
+
+
+
+
+
+
+
+
+
diff --git a/packages/jobs-service-webapp/webpack.config.js b/packages/jobs-service-webapp/webpack.config.js
new file mode 100644
index 00000000000..8bfef9544ce
--- /dev/null
+++ b/packages/jobs-service-webapp/webpack.config.js
@@ -0,0 +1,45 @@
+/*
+ * 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 CopyPlugin = require("copy-webpack-plugin");
+const { merge } = require("webpack-merge");
+const common = require("@kie-tools-core/webpack-base/webpack.common.config");
+const { env } = require("./env");
+const buildEnv = env;
+
+module.exports = async (env) =>
+ merge(common(env), {
+ entry: {},
+ plugins: [
+ new CopyPlugin({
+ patterns: [
+ { from: "./src/index.html", to: "./index.html" },
+ { from: "./src/styles.css", to: "./styles.css" },
+ { from: "./static/favicon.svg", to: "./favicon.svg" },
+ ],
+ }),
+ ],
+ ignoreWarnings: [/Failed to parse source map/],
+ devServer: {
+ static: {
+ directory: "./dist",
+ },
+ port: buildEnv.jobsServiceWebapp.dev.port,
+ },
+ });
diff --git a/packages/keyboard-shortcuts/package.json b/packages/keyboard-shortcuts/package.json
index 7b6edc080a6..24e4e8c3fcb 100644
--- a/packages/keyboard-shortcuts/package.json
+++ b/packages/keyboard-shortcuts/package.json
@@ -24,8 +24,7 @@
},
"dependencies": {
"@kie-tools-core/envelope-bus": "workspace:*",
- "@kie-tools-core/operating-system": "workspace:*",
- "react": "^17.0.2"
+ "@kie-tools-core/operating-system": "workspace:*"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -48,5 +47,8 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/kie-bc-editors/package.json b/packages/kie-bc-editors/package.json
index 52c06801891..28773cfd7c1 100644
--- a/packages/kie-bc-editors/package.json
+++ b/packages/kie-bc-editors/package.json
@@ -35,9 +35,7 @@
"@kie-tools-core/workspace": "workspace:*",
"@kie-tools/dmn-language-service": "workspace:*",
"@kie-tools/pmml-editor-marshaller": "workspace:*",
- "@patternfly/react-core": "^4.276.6",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "@patternfly/react-core": "^4.276.6"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -59,5 +57,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/kie-editors-standalone/e2e-tests/src/App.tsx b/packages/kie-editors-standalone/e2e-tests/src/App.tsx
index c5ea5bbbd37..71842913f0b 100644
--- a/packages/kie-editors-standalone/e2e-tests/src/App.tsx
+++ b/packages/kie-editors-standalone/e2e-tests/src/App.tsx
@@ -105,7 +105,7 @@ export function App() {
[
"custom-workitem.wid",
{
- contentType: ContentType.TEXT,
+ contentType: "text",
content: Promise.resolve(customWorkItemWid),
},
],
diff --git a/packages/kie-editors-standalone/e2e-tests/src/components/EditorComponent.tsx b/packages/kie-editors-standalone/e2e-tests/src/components/EditorComponent.tsx
index 4043fa770b1..c989acab620 100644
--- a/packages/kie-editors-standalone/e2e-tests/src/components/EditorComponent.tsx
+++ b/packages/kie-editors-standalone/e2e-tests/src/components/EditorComponent.tsx
@@ -93,7 +93,7 @@ export const EditorComponent = ({
name: modelName,
value: {
normalizedPosixPathRelativeToTheWorkspaceRoot: modelName,
- type: ContentType.TEXT,
+ type: "text",
content,
},
},
diff --git a/packages/kie-editors-standalone/e2e-tests/src/components/FileLoader.tsx b/packages/kie-editors-standalone/e2e-tests/src/components/FileLoader.tsx
index fc039ad12f5..1ca33e984c0 100644
--- a/packages/kie-editors-standalone/e2e-tests/src/components/FileLoader.tsx
+++ b/packages/kie-editors-standalone/e2e-tests/src/components/FileLoader.tsx
@@ -50,7 +50,7 @@ export const FileLoader: React.FC = (props: Props) => {
name: file.name,
value: {
normalizedPosixPathRelativeToTheWorkspaceRoot: file.name,
- type: ContentType.TEXT,
+ type: "text",
content: fileContent,
},
},
diff --git a/packages/kie-editors-standalone/src/bpmn/index.ts b/packages/kie-editors-standalone/src/bpmn/index.ts
index b84c85ee439..412d633f1ed 100644
--- a/packages/kie-editors-standalone/src/bpmn/index.ts
+++ b/packages/kie-editors-standalone/src/bpmn/index.ts
@@ -29,8 +29,7 @@ import {
} from "@kie-tools-core/editor/dist/api";
import { StandaloneEditorsEditorChannelApiImpl } from "../envelope/StandaloneEditorsEditorChannelApiImpl";
import { StateControl } from "@kie-tools-core/editor/dist/channel";
-import { ContentType } from "@kie-tools-core/workspace/dist/api";
-import { createEditor, Editor, StandaloneEditorApi } from "../common/Editor";
+import { createEditor, Editor, EditorStandaloneResource, StandaloneEditorApi } from "../common/Editor";
import { BpmnEditorDiagramApi } from "../jsdiagram/BpmnEditorDiagramApi";
import { BpmnEditorEnvelopeApi } from "@kie-tools/kie-bc-editors/dist/bpmn/api";
@@ -71,7 +70,7 @@ export function open(args: {
readOnly?: boolean;
origin?: string;
onError?: () => any;
- resources?: Map }>;
+ resources?: Map;
}): StandaloneEditorApi & BpmnEditorDiagramApi {
const iframe = document.createElement("iframe");
iframe.srcdoc = bpmnEnvelopeIndex;
diff --git a/packages/kie-editors-standalone/src/common/Editor.ts b/packages/kie-editors-standalone/src/common/Editor.ts
index e97d4cde678..620d0db70f8 100644
--- a/packages/kie-editors-standalone/src/common/Editor.ts
+++ b/packages/kie-editors-standalone/src/common/Editor.ts
@@ -17,7 +17,6 @@
* under the License.
*/
-import { ContentType } from "@kie-tools-core/workspace/dist/api";
import { EditorApi, KogitoEditorEnvelopeApi } from "@kie-tools-core/editor/dist/api";
import { StateControl } from "@kie-tools-core/editor/dist/channel";
import { MessageBusClientApi } from "@kie-tools-core/envelope-bus/dist/api";
@@ -30,13 +29,15 @@ export interface StandaloneEditorApi extends EditorApi {
close: () => void;
}
+export type EditorStandaloneResource = { contentType: "text" | "binary"; content: Promise };
+
export interface Editor {
open: (args: {
container: Element;
initialContent: Promise;
readOnly: boolean;
origin?: string;
- resources?: Map }>;
+ resources?: Map;
}) => StandaloneEditorApi;
}
diff --git a/packages/kie-editors-standalone/src/dmn/index.ts b/packages/kie-editors-standalone/src/dmn/index.ts
index 0c670864f29..1da0066d4f1 100644
--- a/packages/kie-editors-standalone/src/dmn/index.ts
+++ b/packages/kie-editors-standalone/src/dmn/index.ts
@@ -29,8 +29,7 @@ import {
} from "@kie-tools-core/editor/dist/api";
import { StandaloneEditorsEditorChannelApiImpl } from "../envelope/StandaloneEditorsEditorChannelApiImpl";
import { StateControl } from "@kie-tools-core/editor/dist/channel";
-import { ContentType } from "@kie-tools-core/workspace/dist/api";
-import { createEditor, Editor, StandaloneEditorApi } from "../common/Editor";
+import { createEditor, Editor, EditorStandaloneResource, StandaloneEditorApi } from "../common/Editor";
import { DmnEditorDiagramApi } from "../jsdiagram/DmnEditorDiagramApi";
import { DmnEditorEnvelopeApi } from "@kie-tools/kie-bc-editors/dist/dmn/api";
@@ -71,7 +70,7 @@ export function open(args: {
readOnly?: boolean;
origin?: string;
onError?: () => any;
- resources?: Map }>;
+ resources?: Map;
}): StandaloneEditorApi & DmnEditorDiagramApi {
const iframe = document.createElement("iframe");
iframe.srcdoc = dmnEnvelopeIndex;
diff --git a/packages/kie-editors-standalone/src/envelope/StandaloneEditorsEditorChannelApiImpl.ts b/packages/kie-editors-standalone/src/envelope/StandaloneEditorsEditorChannelApiImpl.ts
index 6f870e011fc..c85c703b52d 100644
--- a/packages/kie-editors-standalone/src/envelope/StandaloneEditorsEditorChannelApiImpl.ts
+++ b/packages/kie-editors-standalone/src/envelope/StandaloneEditorsEditorChannelApiImpl.ts
@@ -18,12 +18,12 @@
*/
import {
- ContentType,
WorkspaceEdit,
ResourceContent,
ResourceContentRequest,
ResourceListRequest,
ResourcesList,
+ ContentType,
} from "@kie-tools-core/workspace/dist/api";
import {
EditorContent,
@@ -34,6 +34,7 @@ import {
import { EmbeddedEditorFile, StateControl } from "@kie-tools-core/editor/dist/channel";
import { Minimatch } from "minimatch";
import { Notification } from "@kie-tools-core/notifications/dist/api";
+import { EditorStandaloneResource } from "../common/Editor";
export class StandaloneEditorsEditorChannelApiImpl implements KogitoEditorChannelApi {
constructor(
@@ -43,7 +44,7 @@ export class StandaloneEditorsEditorChannelApiImpl implements KogitoEditorChanne
private readonly overrides: Partial,
private readonly resources?: Map<
string /** normalized posix path relative to the "workspace" root */,
- { contentType: ContentType; content: Promise }
+ EditorStandaloneResource
>
) {}
diff --git a/packages/kie-sandbox-distribution/package.json b/packages/kie-sandbox-distribution/package.json
index a18cd5c3e17..7337835482a 100644
--- a/packages/kie-sandbox-distribution/package.json
+++ b/packages/kie-sandbox-distribution/package.json
@@ -13,8 +13,8 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
- "build:dev": "pnpm docker:build",
- "build:prod": "run-script-if --then \"pnpm docker:build\" \"pnpm test\"",
+ "build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm docker:build\"",
+ "build:prod": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm docker:build\" \"pnpm test\"",
"docker:build": "docker compose build",
"docker:create-env-file": "rimraf .env && pnpm build-env --print-dotenv:self > .env",
"docker:down": "docker compose down",
diff --git a/packages/kn-plugin-workflow/env/index.js b/packages/kn-plugin-workflow/env/index.js
index 81fdf4f1f29..a6ec7558357 100644
--- a/packages/kn-plugin-workflow/env/index.js
+++ b/packages/kn-plugin-workflow/env/index.js
@@ -35,7 +35,7 @@ module.exports = composeEnv([rootEnv, sonataflowDevModeImageEnv], {
description: "Quarkus group to be used when creating the SonataFlow project",
},
KN_PLUGIN_WORKFLOW__devModeImageUrl: {
- default: `${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.registry}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.account}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.name}:${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.tag}`,
+ default: `${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.registry}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.account}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.name}:${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.buildTag}`,
description: "Kogito SWF DevMode image URL.",
},
}),
diff --git a/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting b/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting
index bb3565def75..0efd07e2acf 100644
--- a/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting
+++ b/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-expected.xml_no_auto_formatting
@@ -13,7 +13,7 @@
org.quarkus.fake
0.0.1
true
- 3.2.5
+ 3.5.0
0.0.0
0.0.0
diff --git a/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-input.xml_no_auto_formatting b/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-input.xml_no_auto_formatting
index 8d8eaa5cd3f..b7cdcd010bf 100644
--- a/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-input.xml_no_auto_formatting
+++ b/packages/kn-plugin-workflow/pkg/command/quarkus/testdata/pom1-input.xml_no_auto_formatting
@@ -15,7 +15,7 @@
org.quarkus.fake
0.0.1
true
- 3.2.5
+ 3.5.0
diff --git a/packages/kogito-base-builder-image/env/index.js b/packages/kogito-base-builder-image/env/index.js
new file mode 100644
index 00000000000..c9e804e2c1a
--- /dev/null
+++ b/packages/kogito-base-builder-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_BASE_BUILDER_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_BASE_BUILDER_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_BASE_BUILDER_IMAGE__name: {
+ default: "incubator-kie-kogito-base-builder",
+ description: "The image name.",
+ },
+ KOGITO_BASE_BUILDER_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoBaseBuilderImage: {
+ registry: getOrDefault(this.vars.KOGITO_BASE_BUILDER_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_BASE_BUILDER_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_BASE_BUILDER_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_BASE_BUILDER_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-base-builder-image/install.js b/packages/kogito-base-builder-image/install.js
new file mode 100644
index 00000000000..fa67779a3bb
--- /dev/null
+++ b/packages/kogito-base-builder-image/install.js
@@ -0,0 +1,64 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoBaseBuilderImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoBaseBuilderImage.registry}/${buildEnv.env.kogitoBaseBuilderImage.account}/${buildEnv.env.kogitoBaseBuilderImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-base-builder.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(originalYamlPath, path.join(resourcesPath, `${buildEnv.env.kogitoBaseBuilderImage.name}-image.yaml`));
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-base-builder-image/package.json b/packages/kogito-base-builder-image/package.json
new file mode 100644
index 00000000000..a6542722da4
--- /dev/null
+++ b/packages/kogito-base-builder-image/package.json
@@ -0,0 +1,46 @@
+{
+ "private": true,
+ "name": "@kie/kogito-base-builder-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoBaseBuilderImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoBaseBuilderImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoBaseBuilderImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoBaseBuilderImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
diff --git a/packages/kogito-base-builder-image/resources/incubator-kie-kogito-base-builder-image.yaml b/packages/kogito-base-builder-image/resources/incubator-kie-kogito-base-builder-image.yaml
new file mode 100644
index 00000000000..627f891be91
--- /dev/null
+++ b/packages/kogito-base-builder-image/resources/incubator-kie-kogito-base-builder-image.yaml
@@ -0,0 +1,63 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-base-builder"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17:1.19"
+description: "Image with JDK and Maven, used as a base image. It is used by Web Tools !"
+
+labels:
+ - name: "io.openshift.s2i.scripts-url"
+ value: "image:///usr/local/s2i"
+ - name: "io.openshift.s2i.destination"
+ value: "/tmp"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+ - name: "io.quarkus.platform.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Platform for building Kogito based on JDK and Maven"
+ - name: "io.k8s.display-name"
+ value: "Kogito based on JDK and Maven"
+ - name: "io.openshift.tags"
+ value: "base-builder,kogito"
+
+packages:
+ manager: microdnf
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - name: org.kie.kogito.launch.scripts
+ - name: org.kie.kogito.dynamic.resources
+ - name: org.kie.kogito.maven.common
+ - name: org.kie.kogito.project.versions
+ - name: org.kie.kogito.security.custom.truststores
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
diff --git a/packages/kogito-data-index-ephemeral-image/env/index.js b/packages/kogito-data-index-ephemeral-image/env/index.js
new file mode 100644
index 00000000000..ea84bbde4e6
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_DATA_INDEX_EPHEMERAL_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__name: {
+ default: "incubator-kie-kogito-data-index-ephemeral",
+ description: "The image name.",
+ },
+ KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoDataIndexEphemeralImage: {
+ registry: getOrDefault(this.vars.KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_DATA_INDEX_EPHEMERAL_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-data-index-ephemeral-image/install.js b/packages/kogito-data-index-ephemeral-image/install.js
new file mode 100644
index 00000000000..c650f3bac2a
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/install.js
@@ -0,0 +1,67 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoDataIndexEphemeralImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoDataIndexEphemeralImage.registry}/${buildEnv.env.kogitoDataIndexEphemeralImage.account}/${buildEnv.env.kogitoDataIndexEphemeralImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-data-index-ephemeral.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(
+ originalYamlPath,
+ path.join(resourcesPath, `${buildEnv.env.kogitoDataIndexEphemeralImage.name}-image.yaml`)
+);
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-data-index-ephemeral-image/package.json b/packages/kogito-data-index-ephemeral-image/package.json
new file mode 100644
index 00000000000..7905134b22f
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/package.json
@@ -0,0 +1,48 @@
+{
+ "private": true,
+ "name": "@kie/kogito-data-index-ephemeral-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-test-assets": "run-script-os",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDataIndexEphemeralImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDataIndexEphemeralImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDataIndexEphemeralImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDataIndexEphemeralImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
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
new file mode 100644
index 00000000000..5c414019813
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/resources/incubator-kie-kogito-data-index-ephemeral-image.yaml
@@ -0,0 +1,67 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-data-index-ephemeral"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
+description: "Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider"
+
+labels:
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider"
+ - name: "io.k8s.display-name"
+ value: "Kogito Data Index Service - ephemeral PostgreSQL"
+ - name: "io.openshift.tags"
+ value: "kogito,data-index,data-index-ephemeral"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+envs:
+ - name: "SCRIPT_DEBUG"
+ example: "true"
+ description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."
+ - name: "KOGITO_DATA_INDEX_QUARKUS_PROFILE"
+ value: "http-events-support"
+ description: "Allows to change the event connection type. The possible values are :`kafka-events-support` or `http-events-support`(default)"
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - 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
+
+ports:
+ - value: 8080
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
+ cmd:
+ - "/home/kogito/kogito-app-launch.sh"
diff --git a/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..aa15cda2106
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh
@@ -0,0 +1,50 @@
+#!/usr/bin/env 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.
+#
+
+
+#import
+source "${KOGITO_HOME}"/launch/logging.sh
+
+if [ "${SCRIPT_DEBUG}" = "true" ] ; then
+ set -x
+ SHOW_JVM_SETTINGS="-XshowSettings:properties"
+ log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
+ log_info "JVM settings debug is enabled."
+ printenv
+fi
+
+# Configuration scripts
+# Any configuration script that needs to run on image startup must be added here.
+CONFIGURE_SCRIPTS=(
+ "${KOGITO_HOME}"/launch/kogito-data-index-common.sh
+ "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
+)
+source "${KOGITO_HOME}"/launch/configure.sh
+#############################################
+
+DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
+
+# shellcheck disable=SC2086
+exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \
+ -Djava.library.path="${KOGITO_HOME}"/lib \
+ -Dquarkus.http.host=0.0.0.0 \
+ -Dquarkus.http.port=8080 \
+ -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar
+
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
new file mode 100644
index 00000000000..ae5360b775e
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+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-ephemeral-image/resources/modules/kogito-data-index-ephemeral/module.yaml b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/module.yaml
new file mode 100644
index 00000000000..94e22660e5b
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/module.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.dataindex.ephemeral
+version: "main"
+
+# see build-kogito-apps-components.sh script, responsible for build it.
+# called by the Makefile before builds
+artifacts:
+ - path: /tmp/build/data-index-service-inmemory
+ dest: /home/kogito/bin
+ name: quarkus-app
+
+execute:
+ - script: configure
diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature
new file mode 100644
index 00000000000..d5a359d17dd
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-data-index-ephemeral
+Feature: Kogito-data-index common feature.
+
+ Scenario: Verify if the debug is correctly enabled and test default http port
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080
+
+ Scenario: check if a provided data index quarkus profile is correctly set on data index
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | KOGITO_DATA_INDEX_QUARKUS_PROFILE | http-events-support |
+ Then container log should contain -Dquarkus.profile=http-events-support
\ No newline at end of file
diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature
new file mode 100644
index 00000000000..f7e817c3c16
--- /dev/null
+++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+@docker.io/apache/incubator-kie-kogito-data-index-ephemeral
+Feature: Kogito-data-index ephemeral postgresql feature.
+
+ Scenario: verify if all labels are correctly set on kogito-data-index-ephemeral image
+ Given image is built
+ Then the image should contain label maintainer with value Apache KIE
+ And the image should contain label io.openshift.expose-services with value 8080:http
+ And the image should contain label io.k8s.description with value Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider
+ And the image should contain label io.k8s.display-name with value Kogito Data Index Service - ephemeral PostgreSQL
+ And the image should contain label io.openshift.tags with value kogito,data-index,data-index-ephemeral
+
+ Scenario: verify if of kogito-data-index-ephemeral container is correctly started
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar
+ And container log should contain Embedded Postgres started at port
+ And container log should not contain Application failed to start
+
+ Scenario: check if the default quarkus profile is correctly set on data index
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then available container log should contain -Dquarkus.profile=http-events-support
diff --git a/packages/kogito-data-index-postgresql-image/env/index.js b/packages/kogito-data-index-postgresql-image/env/index.js
new file mode 100644
index 00000000000..2b6e41af30d
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_DATA_INDEX_POSTGRESQL_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__name: {
+ default: "incubator-kie-kogito-data-index-postgresql",
+ description: "The image name.",
+ },
+ KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoDataIndexPostgresqlImage: {
+ registry: getOrDefault(this.vars.KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_DATA_INDEX_POSTGRESQL_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-data-index-postgresql-image/install.js b/packages/kogito-data-index-postgresql-image/install.js
new file mode 100644
index 00000000000..319a9b8ebd4
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/install.js
@@ -0,0 +1,67 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoDataIndexPostgresqlImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoDataIndexPostgresqlImage.registry}/${buildEnv.env.kogitoDataIndexPostgresqlImage.account}/${buildEnv.env.kogitoDataIndexPostgresqlImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-data-index-postgresql.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(
+ originalYamlPath,
+ path.join(resourcesPath, `${buildEnv.env.kogitoDataIndexPostgresqlImage.name}-image.yaml`)
+);
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-data-index-postgresql-image/package.json b/packages/kogito-data-index-postgresql-image/package.json
new file mode 100644
index 00000000000..f672f148df0
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/package.json
@@ -0,0 +1,48 @@
+{
+ "private": true,
+ "name": "@kie/kogito-data-index-postgresql-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-test-assets": "run-script-os",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoDataIndexPostgresqlImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoDataIndexPostgresqlImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoDataIndexPostgresqlImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoDataIndexPostgresqlImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
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
new file mode 100644
index 00000000000..6baa79e3a5b
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/resources/incubator-kie-kogito-data-index-postgresql-image.yaml
@@ -0,0 +1,64 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-data-index-ephemeral"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
+description: "Runtime image for Kogito Data Index Service for PostgreSQL persistence provider"
+
+labels:
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Runtime image for Kogito Data Index Service for PostgreSQL persistence provider"
+ - name: "io.k8s.display-name"
+ value: "Kogito Data Index Service - PostgreSQL"
+ - name: "io.openshift.tags"
+ value: "kogito,data-index,data-index-postgresql"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+envs:
+ - name: "SCRIPT_DEBUG"
+ example: "true"
+ description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."
+
+ports:
+ - value: 8080
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - 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
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
+ cmd:
+ - "/home/kogito/kogito-app-launch.sh"
diff --git a/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..ec77a25695a
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh
@@ -0,0 +1,49 @@
+#!/usr/bin/env 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.
+#
+
+
+#import
+source "${KOGITO_HOME}"/launch/logging.sh
+
+if [ "${SCRIPT_DEBUG}" = "true" ] ; then
+ set -x
+ SHOW_JVM_SETTINGS="-XshowSettings:properties"
+ log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
+ log_info "JVM settings debug is enabled."
+ printenv
+fi
+
+# Configuration scripts
+# Any configuration script that needs to run on image startup must be added here.
+CONFIGURE_SCRIPTS=(
+ "${KOGITO_HOME}"/launch/kogito-data-index-common.sh
+ "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
+)
+source "${KOGITO_HOME}"/launch/configure.sh
+#############################################
+
+DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
+
+# shellcheck disable=SC2086
+exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \
+ -Djava.library.path="${KOGITO_HOME}"/lib \
+ -Dquarkus.http.host=0.0.0.0 \
+ -Dquarkus.http.port=8080 \
+ -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar
\ No newline at end of file
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
new file mode 100644
index 00000000000..ae5360b775e
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+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/modules/kogito-data-index-postgresql/module.yaml b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/module.yaml
new file mode 100644
index 00000000000..43c9fe6d9e9
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/module.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.dataindex.postgresql
+version: "main"
+
+# see build-kogito-apps-components.sh script, responsible for build it.
+# called by the Makefile before builds
+artifacts:
+ - path: /tmp/build/data-index-service-postgresql
+ dest: /home/kogito/bin
+ name: quarkus-app
+
+execute:
+ - script: configure
diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature
new file mode 100644
index 00000000000..a4146f52bb7
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-data-index-postgresql
+Feature: Kogito-data-index postgresql feature.
+
+ Scenario: verify if of container is correctly started with postgresql parameters
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://localhost:5432/quarkus |
+ | QUARKUS_DATASOURCE_USERNAME | kogito |
+ | QUARKUS_DATASOURCE_PASSWORD | s3cr3t |
+ Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar
+ And container log should contain Datasource '': Connection to localhost:5432 refused
\ No newline at end of file
diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature
new file mode 100644
index 00000000000..fae736f08d5
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature
@@ -0,0 +1,34 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-data-index-postgresql
+Feature: Kogito-data-index common feature.
+
+ Scenario: Verify if the debug is correctly enabled and test default http port
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080
+
+ Scenario: check if a provided data index quarkus profile is correctly set on data index
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | KOGITO_DATA_INDEX_QUARKUS_PROFILE | http-events-support |
+ Then container log should contain -Dquarkus.profile=http-events-support
\ No newline at end of file
diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature
new file mode 100644
index 00000000000..ced19dc790a
--- /dev/null
+++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature
@@ -0,0 +1,35 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-data-index-postgresql
+Feature: Kogito-data-index postgresql feature.
+
+ Scenario: verify if all labels are correctly set on kogito-data-index-postgresql image
+ Given image is built
+ Then the image should contain label maintainer with value Apache KIE
+ And the image should contain label io.openshift.expose-services with value 8080:http
+ And the image should contain label io.k8s.description with value Runtime image for Kogito Data Index Service for PostgreSQL persistence provider
+ And the image should contain label io.k8s.display-name with value Kogito Data Index Service - PostgreSQL
+ And the image should contain label io.openshift.tags with value kogito,data-index,data-index-postgresql
+
+ Scenario: check if the default quarkus profile is correctly set on data index
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Dquarkus.profile=kafka-events-support
\ No newline at end of file
diff --git a/packages/kogito-jit-runner-image/env/index.js b/packages/kogito-jit-runner-image/env/index.js
new file mode 100644
index 00000000000..a7772148f10
--- /dev/null
+++ b/packages/kogito-jit-runner-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_JIT_RUNNER_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_JIT_RUNNER_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_JIT_RUNNER_IMAGE__name: {
+ default: "incubator-kie-kogito-jit-runner",
+ description: "The image name.",
+ },
+ KOGITO_JIT_RUNNER_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoJitRunnerImage: {
+ registry: getOrDefault(this.vars.KOGITO_JIT_RUNNER_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_JIT_RUNNER_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_JIT_RUNNER_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_JIT_RUNNER_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-jit-runner-image/install.js b/packages/kogito-jit-runner-image/install.js
new file mode 100644
index 00000000000..2d2789e493b
--- /dev/null
+++ b/packages/kogito-jit-runner-image/install.js
@@ -0,0 +1,64 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJitRunnerImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoJitRunnerImage.registry}/${buildEnv.env.kogitoJitRunnerImage.account}/${buildEnv.env.kogitoJitRunnerImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-jit-runner.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(originalYamlPath, path.join(resourcesPath, `${buildEnv.env.kogitoJitRunnerImage.name}-image.yaml`));
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-jit-runner-image/package.json b/packages/kogito-jit-runner-image/package.json
new file mode 100644
index 00000000000..5762e0ea2eb
--- /dev/null
+++ b/packages/kogito-jit-runner-image/package.json
@@ -0,0 +1,48 @@
+{
+ "private": true,
+ "name": "@kie/kogito-jit-runner-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-test-assets": "run-script-os",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJitRunnerImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJitRunnerImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJitRunnerImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJitRunnerImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
diff --git a/packages/kogito-jit-runner-image/resources/incubator-kie-kogito-jit-runner-image.yaml b/packages/kogito-jit-runner-image/resources/incubator-kie-kogito-jit-runner-image.yaml
new file mode 100644
index 00000000000..e6b453f6112
--- /dev/null
+++ b/packages/kogito-jit-runner-image/resources/incubator-kie-kogito-jit-runner-image.yaml
@@ -0,0 +1,63 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-jit-runner"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
+description: "Runtime image for Kogito JIT Runner"
+
+labels:
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Runtime image for Kogito JIT Runner"
+ - name: "io.k8s.display-name"
+ value: "Kogito JIT Runner"
+ - name: "io.openshift.tags"
+ value: "kogito,jit-runner"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+envs:
+ - name: "SCRIPT_DEBUG"
+ example: "true"
+ description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - name: org.kie.kogito.dynamic.resources
+ - name: org.kie.kogito.launch.scripts
+ - name: org.kie.kogito.jit-runner
+ - name: org.kie.kogito.security.custom.truststores
+
+ports:
+ - value: 8080
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
+ cmd:
+ - "/home/kogito/kogito-app-launch.sh"
diff --git a/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..f519f07d4eb
--- /dev/null
+++ b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env 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.
+#
+
+
+#import
+source "${KOGITO_HOME}"/launch/logging.sh
+
+if [ "${SCRIPT_DEBUG}" = "true" ] ; then
+ set -x
+ SHOW_JVM_SETTINGS="-XshowSettings:properties"
+ log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
+ log_info "JVM settings debug is enabled."
+ printenv
+fi
+
+# Configuration scripts
+# Any configuration script that needs to run on image startup must be added here.
+CONFIGURE_SCRIPTS=(
+ "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
+)
+source "${KOGITO_HOME}"/launch/configure.sh
+#############################################
+
+DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
+
+# shellcheck disable=SC2086
+exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${CUSTOM_TRUSTSTORE_ARGS} \
+ -Djava.library.path="${KOGITO_HOME}"/lib \
+ -Dquarkus.http.host=0.0.0.0 \
+ -Dquarkus.http.port=8080 \
+ -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar
\ No newline at end of file
diff --git a/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/configure b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/configure
new file mode 100644
index 00000000000..e1c6da21e36
--- /dev/null
+++ b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/configure
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+
+chown -R 1001:0 "${KOGITO_HOME}"
+chmod -R ug+rwX "${KOGITO_HOME}"
+
+cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
+chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
+
diff --git a/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/module.yaml b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/module.yaml
new file mode 100644
index 00000000000..db1d8ec4666
--- /dev/null
+++ b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/module.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.jit-runner
+version: "main"
+
+# see build-kogito-apps-components.sh script, responsible for build it.
+# called by the Makefile before builds
+artifacts:
+ - path: /tmp/build/jitexecutor-runner
+ dest: /home/kogito/bin
+ name: quarkus-app
+
+execute:
+ - script: configure
diff --git a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature
new file mode 100644
index 00000000000..4c6e51aed3b
--- /dev/null
+++ b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature
@@ -0,0 +1,49 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jit-runner
+Feature: Kogito-jit-runner feature.
+
+ Scenario: verify if all labels are correctly set on kogito-jit-runner image
+ Given image is built
+ Then the image should contain label maintainer with value Apache KIE
+ And the image should contain label io.openshift.expose-services with value 8080:http
+ And the image should contain label io.k8s.description with value Runtime image for Kogito JIT Runner
+ And the image should contain label io.k8s.display-name with value Kogito JIT Runner
+ And the image should contain label io.openshift.tags with value kogito,jit-runner
+
+ Scenario: Verify if the debug is correctly enabled and test default http port
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar
+
+ Scenario: Verify that jit runner can evaluate a DMN model with a context
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then check that page is served
+ | property | value |
+ | port | 8080 |
+ | path | /jitdmn |
+ | wait | 80 |
+ | expected_phrase | {"sum":3,"m":2,"n":1} |
+ | request_method | POST |
+ | content_type | application/json |
+ | request_body | {"context": {"n" : 1, "m" : 2}, "model": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n n + m \n \n \n \n \n \n \n \n \n \n \n \n 300 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "} |
diff --git a/packages/kogito-jobs-service-allinone-image/env/index.js b/packages/kogito-jobs-service-allinone-image/env/index.js
new file mode 100644
index 00000000000..dd1f166123d
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_JOBS_SERVICE_ALLINONE_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__name: {
+ default: "incubator-kie-kogito-jobs-service-allinone",
+ description: "The image name.",
+ },
+ KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoJobsServiceAllInOneImage: {
+ registry: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_ALLINONE_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-jobs-service-allinone-image/install.js b/packages/kogito-jobs-service-allinone-image/install.js
new file mode 100644
index 00000000000..8ea16c03076
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/install.js
@@ -0,0 +1,67 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJobsServiceAllInOneImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoJobsServiceAllInOneImage.registry}/${buildEnv.env.kogitoJobsServiceAllInOneImage.account}/${buildEnv.env.kogitoJobsServiceAllInOneImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-jobs-service-allinone.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(
+ originalYamlPath,
+ path.join(resourcesPath, `${buildEnv.env.kogitoJobsServiceAllInOneImage.name}-image.yaml`)
+);
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-jobs-service-allinone-image/package.json b/packages/kogito-jobs-service-allinone-image/package.json
new file mode 100644
index 00000000000..465aa51336a
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/package.json
@@ -0,0 +1,48 @@
+{
+ "private": true,
+ "name": "@kie/kogito-jobs-service-allinone-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-test-assets": "run-script-os",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJobsServiceAllInOneImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServiceAllInOneImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServiceAllInOneImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServiceAllInOneImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
diff --git a/packages/kogito-jobs-service-allinone-image/resources/incubator-kie-kogito-jobs-service-allinone-image.yaml b/packages/kogito-jobs-service-allinone-image/resources/incubator-kie-kogito-jobs-service-allinone-image.yaml
new file mode 100644
index 00000000000..eb63de643ee
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/resources/incubator-kie-kogito-jobs-service-allinone-image.yaml
@@ -0,0 +1,70 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
+description: "Runtime image for Kogito Jobs Service with all available jdbc providers"
+
+labels:
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Runtime image for Kogito Jobs Service with all available jdbc providers"
+ - name: "io.k8s.display-name"
+ value: "Kogito Jobs Service All-in-One"
+ - name: "io.openshift.tags"
+ value: "kogito,jobs-service,postgresql,ephemeral"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+envs:
+ - name: "SCRIPT_DEBUG"
+ example: "true"
+ description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."
+ - name: "ENABLE_EVENTS"
+ example: "true"
+ description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on."
+ - name: "JOBS_SERVICE_PERSISTENCE"
+ example: "postgresql"
+ description: "The all in one image contains all the supported jdbc plugins for Jobs Service, ephemeral and postgresql, if empty, defaults to ephemeral"
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - name: org.kie.kogito.dynamic.resources
+ - name: org.kie.kogito.launch.scripts
+ - name: org.kie.kogito.jobs.service.allinone
+ - name: org.kie.kogito.security.custom.truststores
+ - name: org.kie.kogito.jobs.service.common
+
+ports:
+ - value: 8080
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
+ cmd:
+ - "/home/kogito/kogito-app-launch.sh"
diff --git a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..43fc15e1c50
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh
@@ -0,0 +1,58 @@
+#!/usr/bin/env 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.
+#
+
+
+#import
+source "${KOGITO_HOME}"/launch/logging.sh
+
+if [ "${SCRIPT_DEBUG}" = "true" ] ; then
+ set -x
+ SHOW_JVM_SETTINGS="-XshowSettings:properties"
+ log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
+ log_info "JVM settings debug is enabled."
+ printenv
+fi
+
+allowed_jobs_service_flavors=("ephemeral" "postgresql")
+jobs_service_flavor="ephemeral"
+if [[ ! "${allowed_jobs_service_flavors[*]}" =~ ${JOBS_SERVICE_PERSISTENCE,,} ]]; then
+ log_warning "${JOBS_SERVICE_PERSISTENCE,,} is not supported, the allowed flavors are [${allowed_jobs_service_flavors[*]}], defaulting to ${jobs_service_flavor}"
+ unset JOBS_SERVICE_PERSISTENCE
+
+elif [ "x${JOBS_SERVICE_PERSISTENCE}" != "x" ]; then
+ jobs_service_flavor=${JOBS_SERVICE_PERSISTENCE,,}
+fi
+
+# Configuration scripts
+# Any configuration script that needs to run on image startup must be added here.
+CONFIGURE_SCRIPTS=(
+ "${KOGITO_HOME}"/launch/kogito-jobs-service-common.sh
+ "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
+)
+source "${KOGITO_HOME}"/launch/configure.sh
+#############################################
+
+DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
+
+# shellcheck disable=SC2086
+exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \
+ -Dquarkus.http.host=0.0.0.0 \
+ -Dquarkus.http.port=8080 \
+ -jar "${KOGITO_HOME}"/bin/${jobs_service_flavor}/quarkus-app/quarkus-run.jar
diff --git a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/configure b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/configure
new file mode 100644
index 00000000000..0dcce19d402
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/configure
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+
+mkdir "${KOGITO_HOME}"/bin/shared-libs/
+
+mv "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/
+rm -rf "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib
+ln -s "${KOGITO_HOME}"/bin/shared-libs "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/lib
+
+cp -R "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib/* "${KOGITO_HOME}"/bin/shared-libs/
+rm -rf "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib
+ln -s "${KOGITO_HOME}"/bin/shared-libs "${KOGITO_HOME}"/bin/postgresql/quarkus-app/lib
+
+
+cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
+chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
diff --git a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/module.yaml b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/module.yaml
new file mode 100644
index 00000000000..1963808b63d
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/module.yaml
@@ -0,0 +1,32 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.jobs.service.allinone
+version: "main"
+
+artifacts:
+ - path: /tmp/build/jobs-service-inmemory-all-in-one
+ name: jobs-service-inmemory-all-in-one
+ dest: /home/kogito/bin/ephemeral
+ - path: /tmp/build/jobs-service-postgresql-all-in-one
+ name: jobs-service-postgresql-all-in-one
+ dest: /home/kogito/bin/postgresql
+
+execute:
+ - script: configure
diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature
new file mode 100644
index 00000000000..8d897bdf35f
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature
@@ -0,0 +1,67 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jobs-service-allinone
+Feature: Kogito-jobs-service-all-in-one feature.
+
+ Scenario: verify if all labels are correctly set kogito-jobs-service image image
+ Given image is built
+ Then the image should contain label maintainer with value Apache KIE
+ And the image should contain label io.openshift.expose-services with value 8080:http
+ And the image should contain label io.k8s.description with value Runtime image for Kogito Jobs Service with all available jdbc providers
+ And the image should contain label io.k8s.display-name with value Kogito Jobs Service All-in-One
+ And the image should contain label io.openshift.tags with value kogito,jobs-service,postgresql,ephemeral
+
+ Scenario: Verify if all jobs-service flavors are in the image
+ When container is started with command bash
+ Then file /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar should exist
+ And file /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar should exist
+
+ Scenario: Verify if the debug is correctly enabled with the ephemeral jar
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar
+ And container log should contain started in
+ And container log should not contain Application failed to start
+
+ Scenario: verify if the container is started with invalid jobs-service flavor
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | JOBS_SERVICE_PERSISTENCE | something |
+ Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar
+ And container log should contain something is not supported, the allowed flavors are [ephemeral postgresql], defaulting to ephemeral
+
+ Scenario: verify if container starts as expected
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | QUARKUS_LOG_LEVEL | DEBUG |
+ | JOBS_SERVICE_PERSISTENCE | postgresql |
+ | QUARKUS_DATASOURCE_DB_KIND | postgresql |
+ | QUARKUS_DATASOURCE_USERNAME | test |
+ | QUARKUS_DATASOURCE_PASSWORD | 123456 |
+ | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test |
+ Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar
+ And container log should contain QUARKUS_DATASOURCE_DB_KIND=postgresql
+ And container log should contain QUARKUS_DATASOURCE_USERNAME=test
+ And container log should contain QUARKUS_DATASOURCE_PASSWORD=123456
+ And container log should contain QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test
+ And container log should contain Trying to establish a protocol version 3 connection to 10.11.12.13:5432
diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature
new file mode 100644
index 00000000000..81743a49b80
--- /dev/null
+++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jobs-service-allinone
+@docker.io/apache/incubator-kie-kogito-jobs-service-allinone
+@docker.io/apache/incubator-kie-kogito-jobs-service-allinone
+Feature: Kogito-jobs-service common feature.
+
+ Scenario: verify if the events is correctly enabled
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | ENABLE_EVENTS | true |
+ | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 |
+ Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar
diff --git a/packages/kogito-jobs-service-ephemeral-image/env/index.js b/packages/kogito-jobs-service-ephemeral-image/env/index.js
new file mode 100644
index 00000000000..fdd58dfdd07
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_JOBS_SERVICE_EPHEMERAL_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__name: {
+ default: "incubator-kie-kogito-jobs-service-ephemeral",
+ description: "The image name.",
+ },
+ KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoJobsServiceEphemeralImage: {
+ registry: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_EPHEMERAL_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-jobs-service-ephemeral-image/install.js b/packages/kogito-jobs-service-ephemeral-image/install.js
new file mode 100644
index 00000000000..ac33c6ae754
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/install.js
@@ -0,0 +1,67 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJobsServiceEphemeralImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoJobsServiceEphemeralImage.registry}/${buildEnv.env.kogitoJobsServiceEphemeralImage.account}/${buildEnv.env.kogitoJobsServiceEphemeralImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-jobs-service-ephemeral.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(
+ originalYamlPath,
+ path.join(resourcesPath, `${buildEnv.env.kogitoJobsServiceEphemeralImage.name}-image.yaml`)
+);
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-jobs-service-ephemeral-image/package.json b/packages/kogito-jobs-service-ephemeral-image/package.json
new file mode 100644
index 00000000000..32d001b99e6
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/package.json
@@ -0,0 +1,48 @@
+{
+ "private": true,
+ "name": "@kie/kogito-jobs-service-ephemeral-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-test-assets": "run-script-os",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJobsServiceEphemeralImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServiceEphemeralImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServiceEphemeralImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServiceEphemeralImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
diff --git a/packages/kogito-jobs-service-ephemeral-image/resources/incubator-kie-kogito-jobs-service-ephemeral-image.yaml b/packages/kogito-jobs-service-ephemeral-image/resources/incubator-kie-kogito-jobs-service-ephemeral-image.yaml
new file mode 100644
index 00000000000..92536ef40f5
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/resources/incubator-kie-kogito-jobs-service-ephemeral-image.yaml
@@ -0,0 +1,67 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
+description: "Runtime image for Kogito in memory Jobs Service"
+
+labels:
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Runtime image for Kogito in memory Jobs Service"
+ - name: "io.k8s.display-name"
+ value: "Kogito in memory Jobs Service"
+ - name: "io.openshift.tags"
+ value: "kogito,jobs-service-ephemeral"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+envs:
+ - name: "SCRIPT_DEBUG"
+ example: "true"
+ description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."
+ - name: "ENABLE_EVENTS"
+ example: "true"
+ description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on."
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - name: org.kie.kogito.dynamic.resources
+ - name: org.kie.kogito.launch.scripts
+ - name: org.kie.kogito.jobs.service.ephemeral
+ - name: org.kie.kogito.security.custom.truststores
+ - name: org.kie.kogito.jobs.service.common
+
+ports:
+ - value: 8080
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
+ cmd:
+ - "/home/kogito/kogito-app-launch.sh"
diff --git a/packages/kogito-jobs-service-ephemeral-image/resources/modules/added/kogito-app-launch.sh b/packages/kogito-jobs-service-ephemeral-image/resources/modules/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..66b2da357fe
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/resources/modules/added/kogito-app-launch.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env 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.
+#
+
+
+#import
+source "${KOGITO_HOME}"/launch/logging.sh
+
+if [ "${SCRIPT_DEBUG}" = "true" ] ; then
+ set -x
+ SHOW_JVM_SETTINGS="-XshowSettings:properties"
+ log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
+ log_info "JVM settings debug is enabled."
+ printenv
+fi
+
+# Configuration scripts
+# Any configuration script that needs to run on image startup must be added here.
+CONFIGURE_SCRIPTS=(
+ "${KOGITO_HOME}"/launch/kogito-jobs-service-common.sh
+ "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
+)
+source "${KOGITO_HOME}"/launch/configure.sh
+#############################################
+
+DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
+
+# shellcheck disable=SC2086
+exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \
+ -Dquarkus.http.host=0.0.0.0 \
+ -Dquarkus.http.port=8080 \
+ -jar "${KOGITO_HOME}"/bin/ephemeral/quarkus-app/quarkus-run.jar
diff --git a/packages/kogito-jobs-service-ephemeral-image/resources/modules/configure b/packages/kogito-jobs-service-ephemeral-image/resources/modules/configure
new file mode 100644
index 00000000000..10d0d252bfa
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/resources/modules/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+
+cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
+chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
diff --git a/packages/kogito-jobs-service-ephemeral-image/resources/modules/module.yaml b/packages/kogito-jobs-service-ephemeral-image/resources/modules/module.yaml
new file mode 100644
index 00000000000..b320c789219
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/resources/modules/module.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.jobs.service.ephemeral
+version: "main"
+
+# see build-kogito-apps-components.sh script, responsible for build it.
+# called by the Makefile before builds
+artifacts:
+ - path: /tmp/build/jobs-service-inmemory
+ dest: /home/kogito/bin/ephemeral
+ name: quarkus-app
+
+execute:
+ - script: configure
diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature
new file mode 100644
index 00000000000..56a431c9c5f
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral
+@docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral
+@docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral
+Feature: Kogito-jobs-service common feature.
+
+ Scenario: verify if the events is correctly enabled
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | ENABLE_EVENTS | true |
+ | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 |
+ Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar
diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature
new file mode 100644
index 00000000000..bb0102bc084
--- /dev/null
+++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral
+Feature: Kogito-jobs-service-ephemeral feature.
+
+ Scenario: verify if all labels are correctly set kogito-jobs-service image image
+ Given image is built
+ Then the image should contain label maintainer with value Apache KIE
+ And the image should contain label io.openshift.expose-services with value 8080:http
+ And the image should contain label io.k8s.description with value Runtime image for Kogito in memory Jobs Service
+ And the image should contain label io.k8s.display-name with value Kogito in memory Jobs Service
+ And the image should contain label io.openshift.tags with value kogito,jobs-service-ephemeral
+
+ Scenario: Verify if the application jar exists
+ When container is started with command bash
+ Then run sh -c 'ls /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar' in container and immediately check its output for /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar
+
+ Scenario: Verify if the debug is correctly enabled with the ephemeral jar
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar
+ And container log should contain started in
+ And container log should not contain Application failed to start
+
diff --git a/packages/kogito-jobs-service-postgresql-image/env/index.js b/packages/kogito-jobs-service-postgresql-image/env/index.js
new file mode 100644
index 00000000000..538378a7353
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/env/index.js
@@ -0,0 +1,53 @@
+/*
+ * 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_JOBS_SERVICE_POSTGRESQL_IMAGE__registry: {
+ default: "docker.io",
+ description: "The image registry.",
+ },
+ KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__account: {
+ default: "apache",
+ description: "The image registry account.",
+ },
+ KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__name: {
+ default: "incubator-kie-kogito-jobs-service-postgresql",
+ description: "The image name.",
+ },
+ KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__buildTag: {
+ default: rootEnv.env.root.streamName,
+ description: "The image tag.",
+ },
+ }),
+ get env() {
+ return {
+ kogitoJobsServicePostgresqlImage: {
+ registry: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__registry),
+ account: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__account),
+ name: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__name),
+ buildTag: getOrDefault(this.vars.KOGITO_JOBS_SERVICE_POSTGRESQL_IMAGE__buildTag),
+ },
+ };
+ },
+});
diff --git a/packages/kogito-jobs-service-postgresql-image/install.js b/packages/kogito-jobs-service-postgresql-image/install.js
new file mode 100644
index 00000000000..e975ea5c3d7
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/install.js
@@ -0,0 +1,67 @@
+/*
+ * 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 { execSync } = require("child_process");
+const fs = require("fs");
+
+const buildEnv = require("./env");
+const path = require("path");
+const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json"));
+const sonataflowImageCommonDir = path.dirname(require.resolve("@kie-tools/sonataflow-image-common/package.json"));
+const replaceInFile = require("replace-in-file");
+
+const activateCmd =
+ process.platform === "win32"
+ ? `${pythonVenvDir}\\venv\\Scripts\\Activate.bat`
+ : `. ${pythonVenvDir}/venv/bin/activate`;
+
+execSync(
+ `${activateCmd} && \
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJobsServicePostgresqlImage.buildTag} --source-folder ./resources`,
+ { stdio: "inherit" }
+);
+
+// Find and read the -image.yaml file
+const resourcesPath = path.resolve(__dirname, "./resources");
+const files = fs.readdirSync(resourcesPath);
+const imageYamlFiles = files.filter((fileName) => fileName.endsWith("-image.yaml"));
+if (imageYamlFiles.length !== 1) {
+ throw new Error("There should only be one -image.yaml file on ./resources!");
+}
+const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]);
+let imageYaml = fs.readFileSync(originalYamlPath, "utf8");
+
+const imageUrl = `${buildEnv.env.kogitoJobsServicePostgresqlImage.registry}/${buildEnv.env.kogitoJobsServicePostgresqlImage.account}/${buildEnv.env.kogitoJobsServicePostgresqlImage.name}`;
+
+// Replace the whole string between quotes ("") with the image name
+imageYaml = imageYaml.replace(/(?<=")(.*kogito-jobs-service-postgresql.*)(?=")/gm, imageUrl);
+
+// Write file and then rename it to match the image name
+fs.writeFileSync(originalYamlPath, imageYaml);
+fs.renameSync(
+ originalYamlPath,
+ path.join(resourcesPath, `${buildEnv.env.kogitoJobsServicePostgresqlImage.name}-image.yaml`)
+);
+
+// Replace image URL in .feature files
+replaceInFile.sync({
+ files: ["**/*.feature"],
+ from: /@docker.io\/apache\/.*/g,
+ to: `@${imageUrl}`,
+});
diff --git a/packages/kogito-jobs-service-postgresql-image/package.json b/packages/kogito-jobs-service-postgresql-image/package.json
new file mode 100644
index 00000000000..ef5fc8a6346
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/package.json
@@ -0,0 +1,48 @@
+{
+ "private": true,
+ "name": "@kie/kogito-jobs-service-postgresql-image",
+ "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": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
+ "build:prod": "pnpm build:dev && pnpm image:test",
+ "copy-assets": "run-script-os",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-test-assets": "run-script-os",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/. build",
+ "format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
+ "image:build": "run-script-os",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build-kogito-app build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"mkdir -p build/target/test/results && cp -R build/target/test/results dist-tests-e2e/\"",
+ "image:test:darwin:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
+ "install": "node install.js && pnpm format",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env kogitoJobsServicePostgresqlImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env kogitoJobsServicePostgresqlImage.account) KOGITO_IMAGE_NAME=$(build-env kogitoJobsServicePostgresqlImage.name) KOGITO_IMAGE_TAG=$(build-env kogitoJobsServicePostgresqlImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ },
+ "devDependencies": {
+ "@kie-tools/python-venv": "workspace:*",
+ "@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
+ "cross-env": "^7.0.3",
+ "replace-in-file": "^7.1.0",
+ "rimraf": "^3.0.2",
+ "run-script-os": "^1.1.6"
+ },
+ "kieTools": {
+ "requiredPreinstalledCliCommands": [
+ "python3",
+ "make",
+ "s2i"
+ ]
+ }
+}
diff --git a/packages/kogito-jobs-service-postgresql-image/resources/incubator-kie-kogito-jobs-service-postgresql-image.yaml b/packages/kogito-jobs-service-postgresql-image/resources/incubator-kie-kogito-jobs-service-postgresql-image.yaml
new file mode 100644
index 00000000000..8458b48a849
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/resources/incubator-kie-kogito-jobs-service-postgresql-image.yaml
@@ -0,0 +1,67 @@
+#
+# 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.
+#
+schema_version: 1
+
+name: "docker.io/apache/incubator-kie-kogito-jobs-service-postgresql"
+version: "main"
+from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.19"
+description: "Runtime image for Kogito Jobs Service based on Postgresql"
+
+labels:
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "Runtime image for Kogito Jobs Service based on Postgresql"
+ - name: "io.k8s.display-name"
+ value: "Kogito Jobs Service based on Postgresql"
+ - name: "io.openshift.tags"
+ value: "kogito,jobs-service-postgresql"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+envs:
+ - name: "SCRIPT_DEBUG"
+ example: "true"
+ description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."
+ - name: "ENABLE_EVENTS"
+ example: "true"
+ description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on."
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - name: org.kie.kogito.dynamic.resources
+ - name: org.kie.kogito.launch.scripts
+ - name: org.kie.kogito.jobs.service.postgresql
+ - name: org.kie.kogito.security.custom.truststores
+ - name: org.kie.kogito.jobs.service.common
+
+ports:
+ - value: 8080
+
+run:
+ workdir: "/home/kogito"
+ user: 1001
+ cmd:
+ - "/home/kogito/kogito-app-launch.sh"
diff --git a/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh
new file mode 100644
index 00000000000..4ee5b43d62b
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env 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.
+#
+
+
+#import
+source "${KOGITO_HOME}"/launch/logging.sh
+
+if [ "${SCRIPT_DEBUG}" = "true" ] ; then
+ set -x
+ SHOW_JVM_SETTINGS="-XshowSettings:properties"
+ log_info "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed"
+ log_info "JVM settings debug is enabled."
+ printenv
+fi
+
+# Configuration scripts
+# Any configuration script that needs to run on image startup must be added here.
+CONFIGURE_SCRIPTS=(
+ "${KOGITO_HOME}"/launch/kogito-jobs-service-common.sh
+ "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
+)
+source "${KOGITO_HOME}"/launch/configure.sh
+#############################################
+
+DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)"
+
+# shellcheck disable=SC2086
+exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \
+ -Dquarkus.http.host=0.0.0.0 \
+ -Dquarkus.http.port=8080 \
+ -jar "${KOGITO_HOME}"/bin/postgresql/quarkus-app/quarkus-run.jar
diff --git a/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/configure b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/configure
new file mode 100644
index 00000000000..10d0d252bfa
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/configure
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+
+cp "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
+chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh
diff --git a/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/module.yaml b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/module.yaml
new file mode 100644
index 00000000000..6bdc6b692cc
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/module.yaml
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.jobs.service.postgresql
+version: "main"
+
+# see build-kogito-apps-components.sh script, responsible for build it.
+# called by the Makefile before builds
+artifacts:
+ - path: /tmp/build/jobs-service-postgresql
+ dest: /home/kogito/bin/postgresql
+ name: quarkus-app
+
+execute:
+ - script: configure
diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature
new file mode 100644
index 00000000000..6c9ad4a7738
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature
@@ -0,0 +1,31 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jobs-service-postgresql
+@docker.io/apache/incubator-kie-kogito-jobs-service-postgresql
+@docker.io/apache/incubator-kie-kogito-jobs-service-postgresql
+Feature: Kogito-jobs-service common feature.
+
+ Scenario: verify if the events is correctly enabled
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | ENABLE_EVENTS | true |
+ | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 |
+ Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar
diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature
new file mode 100644
index 00000000000..4c601a9d361
--- /dev/null
+++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature
@@ -0,0 +1,49 @@
+#
+# 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.
+#
+
+@docker.io/apache/incubator-kie-kogito-jobs-service-postgresql
+Feature: Kogito-jobs-service-postgresql feature.
+
+ Scenario: verify if all labels are correctly set kogito-jobs-service image image
+ Given image is built
+ Then the image should contain label maintainer with value Apache KIE
+ And the image should contain label io.openshift.expose-services with value 8080:http
+ And the image should contain label io.k8s.description with value Runtime image for Kogito Jobs Service based on Postgresql
+ And the image should contain label io.k8s.display-name with value Kogito Jobs Service based on Postgresql
+ And the image should contain label io.openshift.tags with value kogito,jobs-service-postgresql
+
+ Scenario: Verify if the application jar exists
+ When container is started with command bash
+ Then run sh -c 'ls /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar' in container and immediately check its output for /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar
+
+ Scenario: verify if container starts as expected
+ When container is started with env
+ | variable | value |
+ | SCRIPT_DEBUG | true |
+ | QUARKUS_LOG_LEVEL | DEBUG |
+ | QUARKUS_DATASOURCE_DB_KIND | postgresql |
+ | QUARKUS_DATASOURCE_USERNAME | test |
+ | QUARKUS_DATASOURCE_PASSWORD | 123456 |
+ | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test |
+ Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar
+ And container log should contain QUARKUS_DATASOURCE_DB_KIND=postgresql
+ And container log should contain QUARKUS_DATASOURCE_USERNAME=test
+ And container log should contain QUARKUS_DATASOURCE_PASSWORD=123456
+ And container log should contain QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test
+ And container log should contain Trying to establish a protocol version 3 connection to 10.11.12.13:5432
diff --git a/packages/maven-base/pom.xml b/packages/maven-base/pom.xml
index 6f703a31bf1..9d097bfa4f8 100644
--- a/packages/maven-base/pom.xml
+++ b/packages/maven-base/pom.xml
@@ -108,9 +108,9 @@
3.2.0
1.6.0
4.13.2
- 3.2.5
+ 3.5.0
3.8.6
- 999-20240905-SNAPSHOT
+ 999-20240912-SNAPSHOT
${quarkus.platform.version}
io.quarkus
3.0.0-M7
diff --git a/packages/maven-m2-repo-via-http-image/env/index.js b/packages/maven-m2-repo-via-http-image/env/index.js
index d989c25bd14..b5b8f0393be 100644
--- a/packages/maven-m2-repo-via-http-image/env/index.js
+++ b/packages/maven-m2-repo-via-http-image/env/index.js
@@ -46,7 +46,7 @@ module.exports = composeEnv([rootEnv], {
registry: getOrDefault(this.vars.MAVEN_M2_REPO_VIA_HTTP_IMAGE__registry),
account: getOrDefault(this.vars.MAVEN_M2_REPO_VIA_HTTP_IMAGE__account),
name: getOrDefault(this.vars.MAVEN_M2_REPO_VIA_HTTP_IMAGE__name),
- tag: getOrDefault(this.vars.MAVEN_M2_REPO_VIA_HTTP_IMAGE__buildTag),
+ buildTag: getOrDefault(this.vars.MAVEN_M2_REPO_VIA_HTTP_IMAGE__buildTag),
},
};
},
diff --git a/packages/maven-m2-repo-via-http-image/package.json b/packages/maven-m2-repo-via-http-image/package.json
index 4fc49abc485..342622b2cd4 100644
--- a/packages/maven-m2-repo-via-http-image/package.json
+++ b/packages/maven-m2-repo-via-http-image/package.json
@@ -16,7 +16,7 @@
"build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"",
"build:dev": "pnpm build",
"build:prod": "pnpm build",
- "image:docker:build": "kie-tools--image-builder build -r \"$(build-env mavenM2RepoViaHttpImage.registry)\" -a \"$(build-env mavenM2RepoViaHttpImage.account)\" -n \"$(build-env mavenM2RepoViaHttpImage.name)\" -t \"$(build-env mavenM2RepoViaHttpImage.tag)\""
+ "image:docker:build": "kie-tools--image-builder build -r \"$(build-env mavenM2RepoViaHttpImage.registry)\" -a \"$(build-env mavenM2RepoViaHttpImage.account)\" -n \"$(build-env mavenM2RepoViaHttpImage.name)\" -t \"$(build-env mavenM2RepoViaHttpImage.buildTag)\""
},
"devDependencies": {
"@kie-tools/image-builder": "workspace:*",
diff --git a/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx b/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx
index 664da3e60d2..a7cb1a9858b 100644
--- a/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx
+++ b/packages/online-editor/src/importFromUrl/ImportableUrlHooks.tsx
@@ -334,7 +334,7 @@ export function useImportableUrl(urlString?: string, allowedUrlTypes?: UrlType[]
if (url.host === "raw.githubusercontent.com") {
const gitHubRawFileMatch = matchPath<{ org: string; repo: string; tree: string; path: string }>(url.pathname, {
- path: "/:org/:repo/:tree/:path*",
+ path: "/:org/:repo/refs/heads/:tree/:path*",
exact: true,
strict: true,
sensitive: false,
diff --git a/packages/pmml-editor/package.json b/packages/pmml-editor/package.json
index 9c48ea59917..00216054233 100644
--- a/packages/pmml-editor/package.json
+++ b/packages/pmml-editor/package.json
@@ -49,9 +49,7 @@
"immer": "^10.0.3",
"lodash": "^4.17.21",
"monaco-editor": "^0.39.0",
- "react": "^17.0.2",
"react-cool-onclickoutside": "^1.6.1",
- "react-dom": "^17.0.2",
"react-monaco-editor": "^0.49.0",
"react-redux": "^7.2.4",
"react-router": "^5.3.4",
@@ -109,5 +107,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/python-venv/requirements.txt b/packages/python-venv/requirements.txt
index d0ae8d7b5c2..e9ed53c7bdd 100644
--- a/packages/python-venv/requirements.txt
+++ b/packages/python-venv/requirements.txt
@@ -1,9 +1,9 @@
requests<2.32.0
-cekit==4.11.0
+cekit==4.13.0
behave==1.2.6
lxml==5.2.1
docker==7.0.0
-docker-squash==1.2.0
+docker-squash==1.2.1
elementpath==4.4.0
pyyaml==6.0.1
ruamel.yaml==0.18.6
diff --git a/packages/react-hooks/package.json b/packages/react-hooks/package.json
index 87179879284..f88c3744e0a 100644
--- a/packages/react-hooks/package.json
+++ b/packages/react-hooks/package.json
@@ -21,9 +21,6 @@
"build:prod": "pnpm lint && rimraf dist && tsc -p tsconfig.json",
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\""
},
- "dependencies": {
- "react": "^17.0.2"
- },
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
@@ -34,5 +31,8 @@
"@types/react": "^17.0.6",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/root-env/env/index.js b/packages/root-env/env/index.js
index 52ec77e6783..8f2a58db774 100644
--- a/packages/root-env/env/index.js
+++ b/packages/root-env/env/index.js
@@ -62,7 +62,7 @@ module.exports = composeEnv([], {
},
/* (begin) This part of the file is referenced in `scripts/update-kogito-version` */
KOGITO_RUNTIME_version: {
- default: "999-20240905-SNAPSHOT",
+ default: "999-20240912-SNAPSHOT",
description: "Kogito version to be used on dependency declaration.",
},
/* (end) */
diff --git a/packages/runtime-tools-components/package.json b/packages/runtime-tools-components/package.json
index 1a4919bef6a..76f825ade03 100644
--- a/packages/runtime-tools-components/package.json
+++ b/packages/runtime-tools-components/package.json
@@ -34,16 +34,15 @@
"@patternfly/react-icons": "^4.93.6",
"@patternfly/react-styles": "^4.92.6",
"@patternfly/react-table": "^4.112.39",
- "ajv": "^6.12.6",
+ "ajv": "^8.17.1",
+ "ajv-formats": "^3.0.1",
"axios": "^1.7.4",
"copyfiles": "^2.4.1",
"history": "^4.9.0",
"keycloak-js": "^23.0.5",
"lodash": "^4.17.21",
"monaco-editor": "^0.39.0",
- "react": "^17.0.2",
"react-datetime-picker": "^3.5.0",
- "react-dom": "^17.0.2",
"react-moment": "0.9.7",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
@@ -65,5 +64,9 @@
"@types/uuid": "^8.3.0",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx b/packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx
index d6348be9529..d0b04159057 100644
--- a/packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx
+++ b/packages/runtime-tools-components/src/common/components/KeycloakUnavailablePage/KeycloakUnavailablePage.tsx
@@ -16,52 +16,36 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { Card, CardBody, CardHeader, CardHeaderMain, CardTitle } from "@patternfly/react-core/dist/js/components/Card";
import { Button } from "@patternfly/react-core/dist/js/components/Button";
-import { Brand } from "@patternfly/react-core/dist/js/components/Brand";
import { Bullseye } from "@patternfly/react-core/dist/js/layouts/Bullseye";
import React from "react";
-import kogitoLogo from "../../static/kogito.png";
import { OUIAProps, componentOuiaProps } from "../../ouiaTools";
+import { Text, TextVariants } from "@patternfly/react-core/dist/js/components/Text";
+import { Title, TitleSizes } from "@patternfly/react-core/dist/js/components/Title";
+import { Page, PageSection } from "@patternfly/react-core/dist/js/components/Page";
+import { EmptyState, EmptyStateIcon } from "@patternfly/react-core/dist/js/components/EmptyState";
+import { ClusterIcon } from "@patternfly/react-icons/dist/js/icons/cluster-icon";
export const KeycloakUnavailablePage: React.FC = ({ ouiaId, ouiaSafe }) => {
return (
-
- {" "}
-
-
-
-
-
-
-
- Error:503 - Server unavailable
-
- Sorry.. the keycloak server seems to be down
-
+
+
-
- Please contact administrator or{" "}
- window.location.reload()} isInline>
- click here to retry
+
+
+
+ 503: We couldn't contact the server
+
+
+ We could not reach the server, you can contact the administrator or try to reload the page by clicking on
+ the button below.
+
+ window.location.reload()} isInline>
+ Retry
-
+
-
-
-
+
+
);
};
diff --git a/packages/runtime-tools-components/src/common/static/kogito.png b/packages/runtime-tools-components/src/common/static/kogito.png
deleted file mode 100755
index 2f5fead8a8f..00000000000
Binary files a/packages/runtime-tools-components/src/common/static/kogito.png and /dev/null differ
diff --git a/packages/runtime-tools-components/src/common/utils/FormValidator.ts b/packages/runtime-tools-components/src/common/utils/FormValidator.ts
index 99cc8641a4c..81ac5648dba 100644
--- a/packages/runtime-tools-components/src/common/utils/FormValidator.ts
+++ b/packages/runtime-tools-components/src/common/utils/FormValidator.ts
@@ -19,6 +19,7 @@
import { SCHEMA_VERSION } from "@kie-tools/runtime-tools-shared-gateway-api/dist/types";
import Ajv, { ValidateFunction } from "ajv";
+import addFormats from "ajv-formats";
/**
* Defines a basic Form Validator
@@ -59,11 +60,13 @@ export function lookupValidator(schema: any): FormValidator {
export class Draft7FormValidator implements FormValidator {
readonly schema: any;
readonly validator: ValidateFunction;
+ readonly ajv: Ajv;
constructor(schema: any) {
this.schema = schema;
-
- this.validator = new Ajv({ allErrors: true, useDefaults: true }).compile(schema);
+ this.ajv = new Ajv({ strict: false, allErrors: true, useDefaults: true });
+ addFormats(this.ajv);
+ this.validator = this.ajv.compile(schema);
}
validate(model: any): any | undefined {
diff --git a/packages/runtime-tools-components/src/static/kogito.png b/packages/runtime-tools-components/src/static/kogito.png
deleted file mode 100755
index 2f5fead8a8f..00000000000
Binary files a/packages/runtime-tools-components/src/static/kogito.png and /dev/null differ
diff --git a/packages/runtime-tools-management-console-webapp/package.json b/packages/runtime-tools-management-console-webapp/package.json
index 4817ede1d8f..6a568f18fb8 100644
--- a/packages/runtime-tools-management-console-webapp/package.json
+++ b/packages/runtime-tools-management-console-webapp/package.json
@@ -65,14 +65,14 @@
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"apollo-server-express": "^3.13.0",
- "body-parser": "^1.20.2",
+ "body-parser": "^1.20.3",
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^11.0.0",
"core-js": "3.6.5",
"cors": "^2.8.5",
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^5.0.1",
- "express": "^4.19.2",
+ "express": "^4.21.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.2",
"https-browserify": "^1.0.0",
diff --git a/packages/runtime-tools-process-dev-ui-webapp/package.json b/packages/runtime-tools-process-dev-ui-webapp/package.json
index 711163015ef..2ea9b30646f 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/package.json
+++ b/packages/runtime-tools-process-dev-ui-webapp/package.json
@@ -79,17 +79,18 @@
"@types/react-router-dom": "^5.3.3",
"@types/uuid": "^8.3.0",
"apollo-server-express": "^3.13.0",
- "body-parser": "^1.20.2",
+ "body-parser": "^1.20.3",
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^11.0.0",
"core-js": "3.6.5",
"cors": "^2.8.5",
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^5.0.1",
- "express": "^4.19.2",
+ "express": "^4.21.0",
"file-loader": "^6.2.0",
"filemanager-webpack-plugin": "^7.0.0",
"graphql": "14.3.1",
+ "html-replace-webpack-plugin": "^2.6.0",
"html-webpack-plugin": "^5.3.2",
"https-browserify": "^1.0.0",
"identity-obj-proxy": "^3.0.0",
diff --git a/packages/runtime-tools-process-dev-ui-webapp/resources/index.html b/packages/runtime-tools-process-dev-ui-webapp/resources/index.html
index 3758c0ab286..362db9c6605 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/resources/index.html
+++ b/packages/runtime-tools-process-dev-ui-webapp/resources/index.html
@@ -49,8 +49,10 @@
{ id: "saravana", groups: [] },
{ id: "john", groups: [] },
],
+ quarkusAppOrigin: "http://${WEBPACK_REPLACEMENT_WEBAPP_HOST}:${WEBPACK_REPLACEMENT_WEBAPP_PORT}",
+ quarkusAppRootPath: "",
page: "Processes",
- devUIUrl: "http://localhost:9027",
+ devUIUrl: "http://${WEBPACK_REPLACEMENT_WEBAPP_HOST}:${WEBPACK_REPLACEMENT_WEBAPP_PORT}",
customLabels: {
singularProcessLabel: "Process",
pluralProcessLabel: "Process",
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/controllers.js b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/controllers.js
index f83124f4564..5df1d04cb90 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/controllers.js
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/controllers.js
@@ -29,7 +29,7 @@ const emptyForm = require("./forms/EmptyForm");
const formData = require("../MockData/forms/formData");
const customDashboardData = require("../MockData/customDashboard/data");
const hiringSchema = require("./process-forms-schema/hiring");
-const uuidv4 = require("uuid");
+const { v4: uuid } = require("uuid");
const tasksUnableToTransition = [
"047ec38d-5d57-4330-8c8d-9bd67b53a529",
"841b9dba-3d91-4725-9de3-f9f4853b417e",
@@ -399,8 +399,11 @@ module.exports = controller = {
},
startProcessInstance: (req, res) => {
+ console.log(
+ `......Starting Process Instance:: id: ${req.headers["ce-id"]} type: ${req.headers["ce-type"]} source: ${req.headers["ce-source"]}`
+ );
const businessKey = req.query.businessKey ? req.query.businessKey : null;
- const processId = uuidv4();
+ const processId = uuid();
const processInstance = {
id: processId,
processId: "hiring",
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/examples/hiring.config b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/examples/hiring.config
new file mode 100644
index 00000000000..562befafd9a
--- /dev/null
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/examples/hiring.config
@@ -0,0 +1,7 @@
+{
+ "resources": {
+ "styles": {},
+ "scripts": {}
+ },
+ "schema": "{\"$schema\":\"https://json-schema.org/draft/2019-09/schema\",\"$defs\":{\"CandidateData\":{\"type\":\"object\",\"properties\":{\"email\":{\"type\":\"string\"},\"experience\":{\"type\":\"integer\"},\"lastName\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"skills\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}},\"type\":\"object\",\"properties\":{\"candidateData\":{\"$ref\":\"#/$defs/CandidateData\"}}}"
+}
\ No newline at end of file
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/examples/hiring.tsx b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/examples/hiring.tsx
new file mode 100644
index 00000000000..8d7504ec37a
--- /dev/null
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/examples/hiring.tsx
@@ -0,0 +1,154 @@
+import React, { useCallback, useEffect, useState } from "react";
+import { Card, CardBody, TextInput, FormGroup, Alert } from "@patternfly/react-core";
+const Form__hiring: React.FC = (props: any) => {
+ const [formApi, setFormApi] = useState();
+ const [candidateData__email, set__candidateData__email] = useState("");
+ const [candidateData__experience, set__candidateData__experience] = useState();
+ const [candidateData__lastName, set__candidateData__lastName] = useState("");
+ const [candidateData__name, set__candidateData__name] = useState("");
+ const [candidateData__skills, set__candidateData__skills] = useState();
+
+ const [candidateData__email__validation, setCandidateData__email__validation] = useState("");
+ /* Utility function that fills the form with the data received from the kogito runtime */
+ const setFormData = (data) => {
+ if (!data) {
+ return;
+ }
+ set__candidateData__email(data?.candidateData?.email ?? "");
+ set__candidateData__experience(data?.candidateData?.experience);
+ set__candidateData__lastName(data?.candidateData?.lastName ?? "");
+ set__candidateData__name(data?.candidateData?.name ?? "");
+ set__candidateData__skills(data?.candidateData?.skills);
+ };
+ /* Utility function to generate the expected form output as a json object */
+ const getFormData = useCallback(() => {
+ const formData: any = {};
+ formData.candidateData = {};
+ formData.candidateData.email = candidateData__email;
+ formData.candidateData.experience = candidateData__experience;
+ formData.candidateData.lastName = candidateData__lastName;
+ formData.candidateData.name = candidateData__name;
+ formData.candidateData.skills = candidateData__skills;
+ return formData;
+ }, [
+ candidateData__email,
+ candidateData__experience,
+ candidateData__lastName,
+ candidateData__name,
+ candidateData__skills,
+ ]);
+ /* Utility function to validate the form on the 'beforeSubmit' Lifecycle Hook */
+ const validateForm = useCallback(() => {
+ if (candidateData__email.includes("@") === false) {
+ setCandidateData__email__validation("It's not an email!");
+ throw new Error("It's not an email!");
+ }
+ }, [candidateData__email]);
+ /* Utility function to perform actions on the on the 'afterSubmit' Lifecycle Hook */
+ const afterSubmit = useCallback((result) => {}, []);
+ useEffect(() => {
+ if (formApi) {
+ /*
+ Form Lifecycle Hook that will be executed before the form is submitted.
+ Throwing an error will stop the form submit. Usually should be used to validate the form.
+ */
+ formApi.beforeSubmit = () => validateForm();
+ /*
+ Form Lifecycle Hook that will be executed after the form is submitted.
+ It will receive a response object containing the `type` flag indicating if the submit has been successful and `info` with extra information about the submit result.
+ */
+ formApi.afterSubmit = (result) => afterSubmit(result);
+ /* Generates the expected form output object to be posted */
+ formApi.getFormData = () => getFormData();
+ }
+ }, [getFormData, validateForm, afterSubmit]);
+ useEffect(() => {
+ /*
+ Call to the Kogito console form engine. It will establish the connection with the console embeding the form
+ and return an instance of FormAPI that will allow hook custom code into the form lifecycle.
+ The `window.Form.openForm` call expects an object with the following entries:
+ - onOpen: Callback that will be called after the connection with the console is established. The callback
+ will receive the following arguments:
+ - data: the data to be bound into the form
+ - ctx: info about the context where the form is being displayed. This will contain information such as the form JSON Schema, process/task, user...
+ */
+ const api = window.Form.openForm({
+ onOpen: (data, context) => {
+ setFormData(data);
+ },
+ });
+ setFormApi(api);
+ }, []);
+ return (
+
+
+
+
+ Candidate data
+
+
+
+
+
+ set__candidateData__experience(Number(newValue))}
+ />
+
+
+
+
+
+
+
+
+
+ Cannot find form control for property candidateData.skills
with type Array
:
+
+ Some complex property types, such as Array<object>
aren't yet supported, however, you
+ can still write your own component into the form and use the already existing states{" "}
+ const [ candidateData__skills, set__candidateData__skills ]
.
+
+
+
+
+
+ );
+};
+export default Form__hiring;
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/formData.js b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/formData.js
index 5fd2704b123..7420e713ea3 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/formData.js
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/forms/formData.js
@@ -37,4 +37,9 @@ module.exports = [
type: "TSX",
lastModified: new Date("2021-08-23T13:26:02.13Z"),
},
+ {
+ name: "hiring",
+ type: "TSX",
+ lastModified: new Date("2021-08-23T13:26:02.13Z"),
+ },
];
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/graphql.js b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/graphql.js
index e7464d30bb4..06e3250b86d 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/graphql.js
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/graphql.js
@@ -1731,7 +1731,6 @@ module.exports = {
state: "ACTIVE",
serviceUrl: "http://localhost:4000",
rootProcessInstanceId: null,
- serviceUrl: "http://localhost:4000",
endpoint: "http://localhost:4000/",
addons: ["process-management"],
error: {
@@ -3150,6 +3149,141 @@ module.exports = {
],
},
],
+ ProcessDefinitionData: [
+ {
+ id: "hiring",
+ endpoint: "http://localhost:4000/hiring",
+ serviceUrl: "http://localhost:4000",
+ __typename: "ProcessDefinition",
+ nodes: [
+ {
+ nodeId: "1",
+ name: "End Event 1",
+ definitionId: "EndEvent_1",
+ id: "870bdda0-be04-4e59-bb0b-f9b665eaacc9",
+ enter: "2019-10-22T03:37:38.586Z",
+ exit: "2019-10-22T03:37:38.586Z",
+ type: "EndNode",
+ },
+ {
+ nodeId: "2",
+ name: "Confirm travel",
+ definitionId: "UserTask_2",
+ id: "6b4a4fe9-4aab-4e8c-bb79-27b8b6b88d1f",
+ enter: "2019-10-22T03:37:30.807Z",
+ exit: "2019-10-22T03:37:38.586Z",
+ type: "HumanTaskNode",
+ },
+ {
+ nodeId: "3",
+ name: "Book Hotel",
+ definitionId: "CallActivity_1",
+ id: "dd33de7c-c39c-484a-83a8-3e1b007fce95",
+ enter: "2019-10-22T03:37:30.793Z",
+ exit: "2019-10-22T03:37:30.803Z",
+ type: "SubProcessNode",
+ },
+ {
+ nodeId: "4",
+ name: "Join",
+ definitionId: "_2140F05A-364F-40B3-BB7B-B12927065DF8",
+ id: "08c153e8-2766-4675-81f7-29943efdf411",
+ enter: "2019-10-22T03:37:30.806Z",
+ exit: "2019-10-22T03:37:30.807Z",
+ type: "Join",
+ },
+ {
+ nodeId: "4",
+ name: "Book Flight",
+ definitionId: "CallActivity_2",
+ id: "683cf307-f082-4a8e-9c85-d5a11b13903a",
+ enter: "2019-10-22T03:37:30.803Z",
+ exit: "2019-10-22T03:37:30.806Z",
+ type: "SubProcessNode",
+ },
+ {
+ nodeId: "5",
+ name: "Book",
+ definitionId: "ParallelGateway_1",
+ id: "cf057e58-4113-46c0-be13-6de42ea8377e",
+ enter: "2019-10-22T03:37:30.792Z",
+ exit: "2019-10-22T03:37:30.803Z",
+ type: "Split",
+ },
+ {
+ nodeId: "6",
+ name: "Join",
+ definitionId: "ExclusiveGateway_2",
+ id: "415a52c0-dc1f-4a93-9238-862dc8072262",
+ enter: "2019-10-22T03:37:30.792Z",
+ exit: "2019-10-22T03:37:30.792Z",
+ type: "Join",
+ },
+ {
+ nodeId: "7",
+ name: "is visa required",
+ definitionId: "ExclusiveGateway_1",
+ id: "52d64298-3f28-4aba-a812-dba4077c9665",
+ enter: "2019-10-22T03:37:30.79Z",
+ exit: "2019-10-22T03:37:30.792Z",
+ type: "Split",
+ },
+ {
+ nodeId: "8",
+ name: "Visa check",
+ definitionId: "BusinessRuleTask_1",
+ id: "6fdee287-08f6-49c2-af2d-2d125ba76ab7",
+ enter: "2019-10-22T03:37:30.755Z",
+ exit: "2019-10-22T03:37:30.79Z",
+ type: "RuleSetNode",
+ },
+ {
+ nodeId: "9",
+ name: "StartProcess",
+ definitionId: "StartEvent_1",
+ id: "d98c1762-9d3c-4228-9ffc-bc3f423079c0",
+ enter: "2019-10-22T03:37:30.753Z",
+ exit: "2019-10-22T03:37:30.754Z",
+ type: "StartNode",
+ },
+ ],
+ },
+ {
+ id: "travels",
+ endpoint: "http://localhost:4000/travels",
+ serviceUrl: "http://localhost:4000",
+ __typename: "ProcessDefinition",
+ nodes: [
+ {
+ nodeId: "1",
+ name: "End Event 1",
+ definitionId: "EndEvent_1",
+ id: "ed36cd72-5e52-4a53-9d0d-865c98781282",
+ enter: "2019-10-22T03:40:44.088Z",
+ exit: "2019-10-22T03:40:44.088Z",
+ type: "EndNode",
+ },
+ {
+ nodeId: "2",
+ name: "Book hotel",
+ definitionId: "ServiceTask_1",
+ id: "040cd02a-7f4c-4d41-bda5-4889f82e921f",
+ enter: "2019-10-22T03:40:44.088Z",
+ exit: "2019-10-22T03:40:44.088Z",
+ type: "WorkItemNode",
+ },
+ {
+ nodeId: "3",
+ name: "StartProcess",
+ definitionId: "StartEvent_1",
+ id: "8528c7bf-8ac8-401f-b7e5-6f3e69b9f9f2",
+ enter: "2019-10-22T03:40:44.088Z",
+ exit: "2019-10-22T03:40:44.088Z",
+ type: "StartNode",
+ },
+ ],
+ },
+ ],
JobsData: [
{
id: "6e74a570-31c8-4020-bd70-19be2cb625f3_0",
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/types.js b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/types.js
index fe8ab99df53..164fd8a3eed 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/server/MockData/types.js
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/MockData/types.js
@@ -43,6 +43,7 @@ module.exports = typeDefs = gql`
orderBy: ProcessInstanceOrderBy
pagination: Pagination
): [ProcessInstance]
+ ProcessDefinitions(where: ProcessDefinitionArgument): [ProcessDefinition]
UserTaskInstances(
where: UserTaskInstanceArgument
orderBy: UserTaskInstanceOrderBy
@@ -84,6 +85,34 @@ module.exports = typeDefs = gql`
diagram: String
}
+ type ProcessDefinition {
+ id: String!
+ endpoint: String!
+ serviceUrl: String
+ nodes: [NodeInstance!]
+ }
+
+ input ProcessDefinitionArgument {
+ and: [ProcessDefinitionArgument!]
+ or: [ProcessDefinitionArgument!]
+ id: IdArgument
+ processId: StringArgument
+ processName: StringArgument
+ parentProcessInstanceId: IdArgument
+ rootProcessInstanceId: IdArgument
+ rootProcessId: StringArgument
+ state: ProcessInstanceStateArgument
+ error: ProcessInstanceErrorArgument
+ nodes: NodeInstanceArgument
+ endpoint: StringArgument
+ roles: StringArrayArgument
+ start: DateArgument
+ end: DateArgument
+ addons: StringArrayArgument
+ lastUpdate: DateArgument
+ businessKey: StringArgument
+ }
+
type KogitoMetadata {
lastUpdate: DateTime!
processInstances: [ProcessInstanceMeta]
diff --git a/packages/runtime-tools-process-dev-ui-webapp/server/server.js b/packages/runtime-tools-process-dev-ui-webapp/server/server.js
index e7eb6301723..acdf370be6a 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/server/server.js
+++ b/packages/runtime-tools-process-dev-ui-webapp/server/server.js
@@ -22,7 +22,7 @@ const swaggerUi = require("swagger-ui-express");
const swaggerApiDoc = require("./MockData/openAPI/openapi.json");
var cors = require("cors");
const app = express();
-const { ApolloServer, gql } = require("apollo-server-express");
+const { ApolloServer } = require("apollo-server-express");
var bodyParser = require("body-parser");
// GraphQL - Apollo
const { GraphQLScalarType } = require("graphql");
@@ -406,6 +406,16 @@ const resolvers = {
console.log("result length: " + result.length);
return result;
},
+ ProcessDefinitions: async (parent, args) => {
+ await timeout();
+ return data.ProcessDefinitionData.filter((proccessDefinition) => {
+ if (args["where"] !== undefined) {
+ return proccessDefinition.id === args["where"].id.equal;
+ } else {
+ return proccessDefinition;
+ }
+ });
+ },
Jobs: async (parent, args) => {
if (Object.keys(args).length > 0) {
const result = data.JobsData.filter((jobData) => {
@@ -515,7 +525,7 @@ const resolvers = {
serialize(value) {
return value;
},
- parseLiteral(ast) {
+ parseLiteral() {
return null;
},
}),
diff --git a/packages/runtime-tools-process-dev-ui-webapp/webpack.config.js b/packages/runtime-tools-process-dev-ui-webapp/webpack.config.js
index 63b8e84bf8d..62e07c79c02 100644
--- a/packages/runtime-tools-process-dev-ui-webapp/webpack.config.js
+++ b/packages/runtime-tools-process-dev-ui-webapp/webpack.config.js
@@ -27,6 +27,8 @@ const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
const { merge } = require("webpack-merge");
const common = require("@kie-tools-core/webpack-base/webpack.common.config");
+const HtmlReplaceWebpackPlugin = require("html-replace-webpack-plugin");
+
const { env: buildEnv } = require("./env");
module.exports = async (env) => {
@@ -94,6 +96,16 @@ module.exports = async (env) => {
favicon: "src/favicon.ico",
chunks: ["app"],
}),
+ new HtmlReplaceWebpackPlugin([
+ {
+ pattern: /\${WEBPACK_REPLACEMENT_WEBAPP_HOST}/g,
+ replacement: () => buildEnv.runtimeToolsProcessDevUIWebapp.host ?? "",
+ },
+ {
+ pattern: /\${WEBPACK_REPLACEMENT_WEBAPP_PORT}/g,
+ replacement: () => buildEnv.runtimeToolsProcessDevUIWebapp.port ?? "",
+ },
+ ]),
],
module: {
rules: [
diff --git a/packages/runtime-tools-process-enveloped-components/package.json b/packages/runtime-tools-process-enveloped-components/package.json
index f620bb1b0a9..fe0b96976a6 100644
--- a/packages/runtime-tools-process-enveloped-components/package.json
+++ b/packages/runtime-tools-process-enveloped-components/package.json
@@ -48,9 +48,7 @@
"json-schema": "^0.4.0",
"lodash": "^4.17.21",
"monaco-editor": "^0.39.0",
- "react": "^17.0.2",
"react-datetime-picker": "^3.5.0",
- "react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-inlinesvg": "^2.3.0",
"react-json-view": "^1.21.3",
@@ -79,5 +77,9 @@
"@types/uuid": "^8.3.0",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx b/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx
index c68ce8d3778..cd01d939ad1 100644
--- a/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx
+++ b/packages/runtime-tools-process-gateway-api/src/gatewayApi/apis.tsx
@@ -521,7 +521,7 @@ export const getProcessDefinitions = (client: ApolloClient): Promise {
resolve(
- value.data.ProcessDefinitions.map((item: { id: string; endpoint: string }) => {
+ (value.data.ProcessDefinitions ?? []).map((item: { id: string; endpoint: string }) => {
return {
processName: item.id,
endpoint: item.endpoint,
diff --git a/packages/runtime-tools-process-webapp-components/package.json b/packages/runtime-tools-process-webapp-components/package.json
index e2eb157284f..569164d9165 100644
--- a/packages/runtime-tools-process-webapp-components/package.json
+++ b/packages/runtime-tools-process-webapp-components/package.json
@@ -30,8 +30,7 @@
"@kie-tools/runtime-tools-shared-gateway-api": "workspace:*",
"apollo-client": "2.6.10",
"axios": "^1.7.4",
- "lodash": "^4.17.21",
- "react": "^17.0.2"
+ "lodash": "^4.17.21"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -45,5 +44,8 @@
"@types/react": "^17.0.6",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-shared-enveloped-components/package.json b/packages/runtime-tools-shared-enveloped-components/package.json
index 9d16602d40e..129095bba8a 100644
--- a/packages/runtime-tools-shared-enveloped-components/package.json
+++ b/packages/runtime-tools-shared-enveloped-components/package.json
@@ -45,8 +45,6 @@
"dangerously-set-html-content": "^1.0.13",
"lodash": "^4.17.21",
"monaco-editor": "^0.39.0",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-inlinesvg": "^2.3.0",
"react-json-view": "^1.21.3",
@@ -72,5 +70,9 @@
"@types/uuid": "^8.3.0",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-shared-enveloped-components/src/formDisplayer/utils/utils.tsx b/packages/runtime-tools-shared-enveloped-components/src/formDisplayer/utils/utils.tsx
index 6b4141fe7a6..f3e63b9c148 100644
--- a/packages/runtime-tools-shared-enveloped-components/src/formDisplayer/utils/utils.tsx
+++ b/packages/runtime-tools-shared-enveloped-components/src/formDisplayer/utils/utils.tsx
@@ -37,7 +37,7 @@ export const sourceHandler = (
const patternflyElements = reg.exec(patternflyImport[0])?.[1];
const trimmedSource = source.split(reactReg).join("").trim().split(patternflyReg).join("").trim();
- const formName = trimmedSource.split(":")[0].split("const ")[1];
+ const formName = trimmedSource.split(": React.FC")[0].split("const ")[1];
return { reactElements: reactElements!, patternflyElements: patternflyElements!, formName, trimmedSource };
};
diff --git a/packages/runtime-tools-shared-webapp-components/package.json b/packages/runtime-tools-shared-webapp-components/package.json
index 7e5994a065f..05562dbce5a 100644
--- a/packages/runtime-tools-shared-webapp-components/package.json
+++ b/packages/runtime-tools-shared-webapp-components/package.json
@@ -27,7 +27,6 @@
"@patternfly/react-core": "^4.276.6",
"@patternfly/react-icons": "^4.93.6",
"history": "^4.9.0",
- "react": "^17.0.2",
"react-router": "^5.3.4"
},
"devDependencies": {
@@ -42,5 +41,8 @@
"@types/react-router": "^5.1.20",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-swf-enveloped-components/package.json b/packages/runtime-tools-swf-enveloped-components/package.json
index 30574956755..dae0165c622 100644
--- a/packages/runtime-tools-swf-enveloped-components/package.json
+++ b/packages/runtime-tools-swf-enveloped-components/package.json
@@ -51,9 +51,7 @@
"dangerously-set-html-content": "^1.0.13",
"lodash": "^4.17.21",
"monaco-editor": "^0.39.0",
- "react": "^17.0.2",
"react-datetime-picker": "^3.5.0",
- "react-dom": "^17.0.2",
"react-helmet": "^6.1.0",
"react-json-view": "^1.21.3",
"react-moment": "0.9.7",
@@ -87,5 +85,9 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-swf-webapp-components/package.json b/packages/runtime-tools-swf-webapp-components/package.json
index fb9aaa4d111..f29c6025a93 100644
--- a/packages/runtime-tools-swf-webapp-components/package.json
+++ b/packages/runtime-tools-swf-webapp-components/package.json
@@ -34,7 +34,6 @@
"apollo-client": "2.6.10",
"apollo-link-http": "1.5.17",
"history": "^4.9.0",
- "react": "^17.0.2",
"react-router": "^5.3.4"
},
"devDependencies": {
@@ -49,5 +48,8 @@
"@types/react-router": "^5.1.20",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/runtime-tools-task-console-webapp/package.json b/packages/runtime-tools-task-console-webapp/package.json
index ff1f9b51b8b..6e27fbaa9f9 100644
--- a/packages/runtime-tools-task-console-webapp/package.json
+++ b/packages/runtime-tools-task-console-webapp/package.json
@@ -71,9 +71,10 @@
"apollo-server-express": "^3.13.0",
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^11.0.0",
+ "cors": "^2.8.5",
"css-loader": "^5.2.6",
"css-minimizer-webpack-plugin": "^5.0.1",
- "express": "^4.19.2",
+ "express": "^4.21.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.3.2",
"https-browserify": "^1.0.0",
diff --git a/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js b/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js
index afdfe513458..1978806b118 100644
--- a/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js
+++ b/packages/serverless-logic-web-tools-base-builder-image-env/env/index.js
@@ -42,7 +42,7 @@ module.exports = composeEnv([rootEnv], {
}),
get env() {
return {
- baseBuilderImageEnv: {
+ slwtBaseBuilderImageEnv: {
registry: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry),
account: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount),
name: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName),
diff --git a/packages/serverless-logic-web-tools-base-builder-image/Containerfile b/packages/serverless-logic-web-tools-base-builder-image/Containerfile
index b5c59c044f7..59434a0a31d 100644
--- a/packages/serverless-logic-web-tools-base-builder-image/Containerfile
+++ b/packages/serverless-logic-web-tools-base-builder-image/Containerfile
@@ -15,9 +15,9 @@
# specific language governing permissions and limitations
# under the License.
-ARG KOGITO_IMAGE_TAG
+ARG BASE_IMAGE_TAG
-FROM --platform=linux/amd64 docker.io/apache/incubator-kie-kogito-base-builder:$KOGITO_IMAGE_TAG
+FROM --platform=linux/amd64 $BASE_IMAGE_TAG
ARG KUBECTL_VERSION
diff --git a/packages/serverless-logic-web-tools-base-builder-image/env/index.js b/packages/serverless-logic-web-tools-base-builder-image/env/index.js
index e3eaefd9787..15c0e91d75f 100644
--- a/packages/serverless-logic-web-tools-base-builder-image/env/index.js
+++ b/packages/serverless-logic-web-tools-base-builder-image/env/index.js
@@ -19,26 +19,28 @@
const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env");
+const {
+ env: { kogitoBaseBuilderImage: kogitoBaseBuilderImageEnv },
+} = require("@kie/kogito-base-builder-image/env");
+
module.exports = composeEnv(
[require("@kie-tools/root-env/env"), require("@kie-tools/serverless-logic-web-tools-base-builder-image-env/env")],
{
vars: varsWithName({
- SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKubectlVersion: {
+ SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE__kubectlVersion: {
default: "v1.27.3",
- description: "",
+ description: "kubectl version to install.",
},
- /* (begin) This part of the file is referenced in `scripts/update-kogito-version` */
- SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: {
- default: "main-20240905",
- description: "",
+ SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE__baseImageTag: {
+ default: `${kogitoBaseBuilderImageEnv.registry}/${kogitoBaseBuilderImageEnv.account}/${kogitoBaseBuilderImageEnv.name}:${kogitoBaseBuilderImageEnv.buildTag}`,
+ description: "Base image complete tag.",
},
- /* end */
}),
get env() {
return {
- baseBuilderImage: {
- kubectlVersion: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKubectlVersion),
- kogitoImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag),
+ slwtBaseBuilderImage: {
+ kubectlVersion: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE__kubectlVersion),
+ baseImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_BASE_BUILDER_IMAGE__baseImageTag),
},
};
},
diff --git a/packages/serverless-logic-web-tools-base-builder-image/package.json b/packages/serverless-logic-web-tools-base-builder-image/package.json
index 1a579ec1422..e43d512b064 100644
--- a/packages/serverless-logic-web-tools-base-builder-image/package.json
+++ b/packages/serverless-logic-web-tools-base-builder-image/package.json
@@ -18,11 +18,12 @@
"build:prod:linux:darwin": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:docker:build\"",
"build:prod:win32": "echo \"Build not supported on Windows\"",
"cleanup": "rimraf dist-dev && mkdir dist-dev",
- "image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env baseBuilderImageEnv.buildTag) | xargs printf -- \"-t $(build-env baseBuilderImageEnv.registry)/$(build-env baseBuilderImageEnv.account)/$(build-env baseBuilderImageEnv.name):%s\n\" | xargs echo) --build-arg KOGITO_IMAGE_TAG=$(build-env baseBuilderImage.kogitoImageTag) --build-arg KUBECTL_VERSION=$(build-env baseBuilderImage.kubectlVersion) .\" --else \"echo Docker not found, skipping image build.\""
+ "image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env slwtBaseBuilderImageEnv.buildTag) | xargs printf -- \"-t $(build-env slwtBaseBuilderImageEnv.registry)/$(build-env slwtBaseBuilderImageEnv.account)/$(build-env slwtBaseBuilderImageEnv.name):%s\n\" | xargs echo) --build-arg BASE_IMAGE_TAG=$(build-env slwtBaseBuilderImage.baseImageTag) --build-arg KUBECTL_VERSION=$(build-env slwtBaseBuilderImage.kubectlVersion) .\" --else \"echo Docker not found, skipping image build.\""
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
"@kie-tools/serverless-logic-web-tools-base-builder-image-env": "workspace:*",
+ "@kie/kogito-base-builder-image": "workspace:*",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6"
}
diff --git a/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js b/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js
index 12c1289cada..0f2c264d380 100644
--- a/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js
+++ b/packages/serverless-logic-web-tools-swf-builder-image-env/env/index.js
@@ -42,7 +42,7 @@ module.exports = composeEnv([rootEnv], {
}),
get env() {
return {
- swfBuilderImageEnv: {
+ slwtBuilderImageEnv: {
registry: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry),
account: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount),
name: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName),
diff --git a/packages/serverless-logic-web-tools-swf-builder-image/env/index.js b/packages/serverless-logic-web-tools-swf-builder-image/env/index.js
index 86df3331a33..0efda095d0b 100644
--- a/packages/serverless-logic-web-tools-swf-builder-image/env/index.js
+++ b/packages/serverless-logic-web-tools-swf-builder-image/env/index.js
@@ -26,13 +26,13 @@ const sonataflowBuilderImageEnv = require("@kie-tools/sonataflow-builder-image/e
module.exports = composeEnv([rootEnv, serverlessLogicWebToolsSwfBuilderImageEnv, sonataflowBuilderImageEnv], {
vars: varsWithName({
SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE__baseImageUrl: {
- default: `${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.registry}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.account}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.name}:${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.tag}`,
+ default: `${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.registry}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.account}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.name}:${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.buildTag}`,
description: "The image used in the FROM import.",
},
}),
get env() {
return {
- swfBuilderImage: {
+ slwtBuilderImage: {
baseImageUrl: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_SWF_BUILDER_IMAGE__baseImageUrl),
},
};
diff --git a/packages/serverless-logic-web-tools-swf-builder-image/package.json b/packages/serverless-logic-web-tools-swf-builder-image/package.json
index 7309aa8324e..d86f263f4cd 100644
--- a/packages/serverless-logic-web-tools-swf-builder-image/package.json
+++ b/packages/serverless-logic-web-tools-swf-builder-image/package.json
@@ -21,7 +21,7 @@
"cleanup": "rimraf dist-dev && mkdir dist-dev",
"copy:assets": "pnpm copy:webapp",
"copy:webapp": "cp -r ./node_modules/sonataflow-deployment-webapp/dist dist-dev/webapp",
- "image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env swfBuilderImageEnv.buildTag) | xargs printf -- \"-t $(build-env swfBuilderImageEnv.registry)/$(build-env swfBuilderImageEnv.account)/$(build-env swfBuilderImageEnv.name):%s\n\" | xargs echo) --build-arg BASE_IMAGE_URL=$(build-env swfBuilderImage.baseImageUrl) .\" --else \"echo Docker not found, skipping image build.\""
+ "image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env slwtBuilderImageEnv.buildTag) | xargs printf -- \"-t $(build-env slwtBuilderImageEnv.registry)/$(build-env slwtBuilderImageEnv.account)/$(build-env slwtBuilderImageEnv.name):%s\n\" | xargs echo) --build-arg BASE_IMAGE_URL=$(build-env slwtBuilderImage.baseImageUrl) .\" --else \"echo Docker not found, skipping image build.\""
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
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 bc9514484a1..804d8ff6bd6 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
@@ -42,7 +42,7 @@ module.exports = composeEnv([rootEnv], {
}),
get env() {
return {
- swfDevModeImageEnv: {
+ slwtDevModeImageEnv: {
registry: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageRegistry),
account: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageAccount),
name: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageName),
diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile b/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile
index e4d742a7937..1038ffd3cc4 100644
--- a/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile
+++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/Containerfile
@@ -15,36 +15,35 @@
# specific language governing permissions and limitations
# under the License.
-ARG KOGITO_IMAGE_TAG
+ARG BASE_IMAGE_TAG
-FROM --platform=linux/amd64 docker.io/apache/incubator-kie-kogito-base-builder:$KOGITO_IMAGE_TAG
+FROM --platform=linux/amd64 $BASE_IMAGE_TAG
ENV PATH="${PATH}:/usr/share/maven/bin"
USER root
-RUN chown kogito /home/kogito/.m2
-USER kogito
COPY --chown=kogito:root dist-dev/quarkus-app/ /home/kogito/serverless-logic-web-tools-swf-deployment-quarkus-app/
-COPY --chown=kogito:root dist-dev/quarkus-app-m2/ /home/kogito/.m2/repository
+COPY --chown=kogito:root dist-dev/settings.xml /home/kogito/.m2/settings.xml
+COPY --chown=kogito:root entrypoint.sh /home/kogito/entrypoint.sh
WORKDIR /home/kogito/serverless-logic-web-tools-swf-deployment-quarkus-app/
-RUN rm -rf src/test/ && \
+RUN chown kogito /home/kogito/.m2 && \
+ rm -rf src/test/ && \
mvn clean package \
quarkus:go-offline \
-B \
-ntp \
+ -s /home/kogito/.m2/settings.xml \
-Dmaven.test.skip \
- -Dquarkus-profiles=build,dev
+ -Dmaven.repo.local=/home/kogito/.m2/repository \
+ -Dquarkus-profiles=build,dev && \
+ chmod -R 775 /home/kogito && \
+ mkdir -p -m 777 /tmp/app
-USER root
-RUN chmod -R 775 /home/kogito
USER kogito
-ENTRYPOINT mvn quarkus:dev \
- quarkus:go-offline \
- -nsu \
- -Ddebug=false \
- -Dmaven.repo.local=/home/kogito/.m2/repository \
- -Dquarkus.http.port=8080
+EXPOSE 8080
+
+ENTRYPOINT [ "/home/kogito/entrypoint.sh" ]
diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/entrypoint.sh b/packages/serverless-logic-web-tools-swf-dev-mode-image/entrypoint.sh
new file mode 100644
index 00000000000..97c40b91eca
--- /dev/null
+++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/entrypoint.sh
@@ -0,0 +1,33 @@
+#!/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 assets here is essential for when the container is running with the readOnlyRootFilesystem flag.
+# But, just like any other directory modified during runtime, the /tmp/app must be a mounted volume in the container in this case.
+cp -R /home/kogito/* /tmp/app
+
+cd /tmp/app/serverless-logic-web-tools-swf-deployment-quarkus-app
+
+mvn quarkus:dev \
+ -nsu \
+ -o \
+ -s /home/kogito/.m2/settings.xml \
+ -Ddebug=false \
+ -Dmaven.repo.local=/home/kogito/.m2/repository \
+ -Dquarkus.http.port=8080
\ No newline at end of file
diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js b/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js
index c8534689ed2..1c29373cc23 100644
--- a/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js
+++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js
@@ -21,20 +21,35 @@ const { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/b
const rootEnv = require("@kie-tools/root-env/env");
+const {
+ env: { mavenM2RepoViaHttpImage: mavenM2RepoViaHttpImageEnv },
+} = require("@kie-tools/maven-m2-repo-via-http-image/env");
+
+const {
+ env: { kogitoBaseBuilderImage: kogitoBaseBuilderImageEnv },
+} = require("@kie/kogito-base-builder-image/env");
+
module.exports = composeEnv([rootEnv, require("@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env/env")], {
vars: varsWithName({
- /* (begin) This part of the file is referenced in `scripts/update-kogito-version` */
- SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag: {
- default: "main-20240905",
- description: "",
+ SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__baseImageTag: {
+ default: `${kogitoBaseBuilderImageEnv.registry}/${kogitoBaseBuilderImageEnv.account}/${kogitoBaseBuilderImageEnv.name}:${kogitoBaseBuilderImageEnv.buildTag}`,
+ description: "Base image complete tag.",
+ },
+ SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__mavenM2RepoViaHttpImage: {
+ default: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.buildTag}`,
+ description: "The image tag for the Maven M2 Repo via HTTP. Used during the build only.",
},
- /* end */
}),
get env() {
return {
- swfDevModeImage: {
+ slwtDevModeImage: {
+ baseImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__baseImageTag),
version: require("../package.json").version,
- kogitoImageTag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag),
+ dev: {
+ mavenM2RepoViaHttpImage: getOrDefault(
+ this.vars.SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__mavenM2RepoViaHttpImage
+ ),
+ },
},
};
},
diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/install.js b/packages/serverless-logic-web-tools-swf-dev-mode-image/install.js
index 94df8d4a2e8..6a812f4a2e6 100644
--- a/packages/serverless-logic-web-tools-swf-dev-mode-image/install.js
+++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/install.js
@@ -21,5 +21,5 @@ const buildEnv = require("./env");
const { setup } = require("@kie-tools/maven-config-setup-helper");
setup(`
- -Drevision=${buildEnv.env.swfDevModeImage.version}
+ -Drevision=${buildEnv.env.slwtDevModeImage.version}
`);
diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json b/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json
index 015a6353207..f395d8d6393 100644
--- a/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json
+++ b/packages/serverless-logic-web-tools-swf-dev-mode-image/package.json
@@ -13,23 +13,35 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
- "build:dev": "echo Nothing to do",
- "build:prod": "pnpm cleanup && run-script-os",
- "build:prod:darwin:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy:assets\" \"pnpm image:docker:build\"",
- "build:prod:win32": "echo \"Build not supported on Windows\"",
- "cleanup": "rimraf dist-dev && mkdir dist-dev",
- "copy:assets": "pnpm copy:quarkus-app && pnpm copy:sonataflow-deployment-webapp && pnpm copy:m2-for-sonataflow-quarkus-devui",
- "copy:m2-for-sonataflow-quarkus-devui": "mvn dependency:copy-dependencies -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true -DexcludeTransitive=true -DoutputDirectory=./dist-dev/quarkus-app-m2",
- "copy:quarkus-app": "cp -R ./node_modules/@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app/ ./dist-dev/quarkus-app && mkdir -p ./dist-dev/quarkus-app/src/main/resources/META-INF/resources/ && rm -rf ./dist-dev/quarkus-app/node_modules ./dist-dev/quarkus-app/install.js ./dist-dev/quarkus-app/env ./dist-dev/quarkus-app/package.json",
- "copy:sonataflow-deployment-webapp": "cp -R ./node_modules/sonataflow-deployment-webapp/dist/* ./dist-dev/quarkus-app/src/main/resources/META-INF/resources",
- "image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env swfDevModeImageEnv.buildTag) | xargs printf -- \"-t $(build-env swfDevModeImageEnv.registry)/$(build-env swfDevModeImageEnv.account)/$(build-env swfDevModeImageEnv.name):%s\n\" | xargs echo) --build-arg KOGITO_IMAGE_TAG=$(build-env swfDevModeImage.kogitoImageTag) .\" --else \"echo Docker not found, skipping image build.\"",
- "install": "node install.js"
+ "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm copy:assets\" \"pnpm image:docker:build\" \"pnpm image:docker:squash\" --finally \"pnpm m2-repo-via-http:container:kill\"",
+ "build:dev": "pnpm build",
+ "build:prod": "pnpm build",
+ "copy:assets": "rimraf dist-dev && mkdir -p ./dist-dev && pnpm copy:quarkus-app && pnpm copy:sonataflow-deployment-webapp && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
+ "copy:maven-m2-repo-via-http-image--settings-xml": "run-script-os",
+ "copy:maven-m2-repo-via-http-image--settings-xml:linux:darwin": "M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' m2-repo-via-http) envsubst < ./node_modules/@kie-tools/maven-m2-repo-via-http-image/settings.xml.envsubst > dist-dev/settings.xml",
+ "copy:maven-m2-repo-via-http-image--settings-xml:win32": "pnpm powershell \"(Get-Content ./node_modules/@kie-tools/maven-m2-repo-via-http-image/settings.xml.envsubst) -replace '$M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL', $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' m2-repo-via-http) | Set-Content ./dist-dev/settings.xml\"",
+ "copy:quarkus-app": "run-script-os",
+ "copy:quarkus-app:linux:darwin": "cp -R ./node_modules/@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app/ ./dist-dev/quarkus-app && mkdir -p ./dist-dev/quarkus-app/src/main/resources/META-INF/resources/ && rm -rf ./dist-dev/quarkus-app/node_modules ./dist-dev/quarkus-app/install.js ./dist-dev/quarkus-app/env ./dist-dev/quarkus-app/package.json",
+ "copy:quarkus-app:win32": "pnpm powershell \"New-Item -ItemType Directory -Force -Path ./dist-dev/quarkus-app; Copy-Item -R ./node_modules/@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app/* ./dist-dev/quarkus-app -Exclude @('node_modules', 'install.js', 'package.json'); New-Item -ItemType Directory -Force -Path ./dist-dev/quarkus-app/src/main/resources/META-INF/resources \"",
+ "copy:sonataflow-deployment-webapp": "run-script-os",
+ "copy:sonataflow-deployment-webapp:linux:darwin": "cp -R ./node_modules/sonataflow-deployment-webapp/dist/* ./dist-dev/quarkus-app/src/main/resources/META-INF/resources",
+ "copy:sonataflow-deployment-webapp:win32": "pnpm powershell \"Copy-Item -R ./node_modules/sonataflow-deployment-webapp/dist/* ./dist-dev/quarkus-app/src/main/resources/META-INF/resources\"",
+ "image:docker:build": "kie-tools--image-builder build --allowHostNetworkAccess -r \"$(build-env slwtDevModeImageEnv.registry)\" -a \"$(build-env slwtDevModeImageEnv.account)\" -n \"$(build-env slwtDevModeImageEnv.name)\" -t \"$(build-env slwtDevModeImageEnv.buildTag)\" --build-arg BASE_IMAGE_TAG=\"$(build-env slwtDevModeImage.baseImageTag)\"",
+ "image:docker:squash": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && DOCKER_HOST=$(docker context inspect | jq '.[].Endpoints.docker.Host' | tr -d '\"') docker-squash -t $(build-env slwtDevModeImageEnv.registry)/$(build-env slwtDevModeImageEnv.account)/$(build-env slwtDevModeImageEnv.name):$(build-env slwtDevModeImageEnv.buildTag) $(build-env slwtDevModeImageEnv.registry)/$(build-env slwtDevModeImageEnv.account)/$(build-env slwtDevModeImageEnv.name):$(build-env slwtDevModeImageEnv.buildTag)",
+ "install": "node install.js",
+ "m2-repo-via-http:container:kill": "(docker container kill m2-repo-via-http || true) && (docker container rm m2-repo-via-http || true)",
+ "m2-repo-via-http:container:run": "(pnpm m2-repo-via-http:container:kill || true) && docker run --name m2-repo-via-http -v \"$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout):/var/www/html\" -dit $(build-env slwtDevModeImage.dev.mavenM2RepoViaHttpImage)",
+ "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command"
},
"devDependencies": {
+ "@kie-tools/image-builder": "workspace:*",
"@kie-tools/maven-config-setup-helper": "workspace:*",
+ "@kie-tools/maven-m2-repo-via-http-image": "workspace:*",
+ "@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app": "workspace:*",
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env": "workspace:*",
+ "@kie/kogito-base-builder-image": "workspace:*",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"sonataflow-deployment-webapp": "workspace:*"
diff --git a/packages/serverless-logic-web-tools-swf-dev-mode-image/pom.xml b/packages/serverless-logic-web-tools-swf-dev-mode-image/pom.xml
deleted file mode 100644
index ae9a454ff68..00000000000
--- a/packages/serverless-logic-web-tools-swf-dev-mode-image/pom.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
- 4.0.0
- org.kie.kogito
- serverless-logic-web-tools-swf-deployment-quarkus-app-image
- ${revision}
-
-
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui-deployment
- ${project.version}
-
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui
- ${project.version}
-
-
- org.apache.kie.sonataflow
- sonataflow-quarkus-devui-parent
- ${project.version}
- pom
-
-
- org.kie
- kie-tools-maven-base
- ${project.version}
- pom
-
-
-
diff --git a/packages/serverless-logic-web-tools/env/index.js b/packages/serverless-logic-web-tools/env/index.js
index 41004e01ce5..01c2c8611fb 100644
--- a/packages/serverless-logic-web-tools/env/index.js
+++ b/packages/serverless-logic-web-tools/env/index.js
@@ -86,16 +86,16 @@ module.exports = composeEnv(
cypressUrl: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__cypressUrl),
port: 9020,
},
- swfBuilderImage: {
+ slwtBuilderImageEnv: {
tag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag),
},
- baseBuilderImage: {
+ slwtBaseBuilderImage: {
tag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageTag),
},
dashbuilderViewerImage: {
tag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag),
},
- swfDevModeImage: {
+ slwtDevModeImage: {
tag: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageTag),
},
corsProxyUrl: getOrDefault(this.vars.SERVERLESS_LOGIC_WEB_TOOLS__corsProxyUrl),
diff --git a/packages/serverless-logic-web-tools/src/openshift/pipelines/SpinUpDevModePipeline.ts b/packages/serverless-logic-web-tools/src/openshift/pipelines/SpinUpDevModePipeline.ts
index 995c6305697..c6af69a9842 100644
--- a/packages/serverless-logic-web-tools/src/openshift/pipelines/SpinUpDevModePipeline.ts
+++ b/packages/serverless-logic-web-tools/src/openshift/pipelines/SpinUpDevModePipeline.ts
@@ -197,6 +197,12 @@ export class SpinUpDevModePipeline extends OpenShiftPipeline(url.pathname, {
- path: "/:org/:repo/:tree/:path*",
+ path: "/:org/:repo/refs/heads/:tree/:path*",
exact: true,
strict: true,
sensitive: false,
diff --git a/packages/serverless-logic-web-tools/webpack.config.ts b/packages/serverless-logic-web-tools/webpack.config.ts
index 689a4aa196e..961ee98cb09 100644
--- a/packages/serverless-logic-web-tools/webpack.config.ts
+++ b/packages/serverless-logic-web-tools/webpack.config.ts
@@ -220,10 +220,10 @@ export default async (env: any, argv: any) => {
};
function getSwfBuilderImageArgs() {
- const swfBuilderImageRegistry = buildEnv.swfBuilderImageEnv.registry;
- const swfBuilderImageAccount = buildEnv.swfBuilderImageEnv.account;
- const swfBuilderImageName = buildEnv.swfBuilderImageEnv.name;
- const swfBuilderImageTag = buildEnv.serverlessLogicWebTools.swfBuilderImage.tag;
+ const swfBuilderImageRegistry = buildEnv.slwtBuilderImageEnv.registry;
+ const swfBuilderImageAccount = buildEnv.slwtBuilderImageEnv.account;
+ const swfBuilderImageName = buildEnv.slwtBuilderImageEnv.name;
+ const swfBuilderImageTag = buildEnv.serverlessLogicWebTools.slwtBuilderImageEnv.tag;
console.info("Serverless Logic Web Tools :: SWF Builder Image Registry: " + swfBuilderImageRegistry);
console.info("Serverless Logic Web Tools :: SWF Builder Image Account: " + swfBuilderImageAccount);
@@ -234,10 +234,10 @@ function getSwfBuilderImageArgs() {
}
function getSwfDevModeImageArgs() {
- const swfDevModeImageRegistry = buildEnv.swfDevModeImageEnv.registry;
- const swfDevModeImageAccount = buildEnv.swfDevModeImageEnv.account;
- const swfDevModeImageName = buildEnv.swfDevModeImageEnv.name;
- const swfDevModeImageTag = buildEnv.serverlessLogicWebTools.swfDevModeImage.tag;
+ const swfDevModeImageRegistry = buildEnv.slwtDevModeImageEnv.registry;
+ const swfDevModeImageAccount = buildEnv.slwtDevModeImageEnv.account;
+ const swfDevModeImageName = buildEnv.slwtDevModeImageEnv.name;
+ const swfDevModeImageTag = buildEnv.serverlessLogicWebTools.slwtDevModeImage.tag;
console.info("Serverless Logic Web Tools :: Dev Mode Image Registry: " + swfDevModeImageRegistry);
console.info("Serverless Logic Web Tools :: Dev Mode Image Account: " + swfDevModeImageAccount);
@@ -248,10 +248,10 @@ function getSwfDevModeImageArgs() {
}
function getBaseBuilderImageArgs() {
- const baseBuilderImageRegistry = buildEnv.baseBuilderImageEnv.registry;
- const baseBuilderImageAccount = buildEnv.baseBuilderImageEnv.account;
- const baseBuilderImageName = buildEnv.baseBuilderImageEnv.name;
- const baseBuilderImageTag = buildEnv.serverlessLogicWebTools.baseBuilderImage.tag;
+ const baseBuilderImageRegistry = buildEnv.slwtBaseBuilderImageEnv.registry;
+ const baseBuilderImageAccount = buildEnv.slwtBaseBuilderImageEnv.account;
+ const baseBuilderImageName = buildEnv.slwtBaseBuilderImageEnv.name;
+ const baseBuilderImageTag = buildEnv.serverlessLogicWebTools.slwtBaseBuilderImage.tag;
console.info("Serverless Logic Web Tools :: Base Builder Image Registry: " + baseBuilderImageRegistry);
console.info("Serverless Logic Web Tools :: Base Builder Image Account: " + baseBuilderImageAccount);
diff --git a/packages/serverless-workflow-combined-editor/package.json b/packages/serverless-workflow-combined-editor/package.json
index 0ded0eff41d..fb0227b30dc 100644
--- a/packages/serverless-workflow-combined-editor/package.json
+++ b/packages/serverless-workflow-combined-editor/package.json
@@ -44,8 +44,6 @@
"monaco-editor": "^0.39.0",
"monaco-yaml": "^4.0.4",
"path-browserify": "^1.0.1",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"vscode-languageserver-types": "^3.16.0"
},
"devDependencies": {
@@ -71,5 +69,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/serverless-workflow-text-editor/package.json b/packages/serverless-workflow-text-editor/package.json
index 49a0286b74e..2996e4edc8a 100644
--- a/packages/serverless-workflow-text-editor/package.json
+++ b/packages/serverless-workflow-text-editor/package.json
@@ -38,8 +38,6 @@
"json-schema": "^0.4.0",
"monaco-editor": "^0.39.0",
"monaco-yaml": "^4.0.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"vscode-languageserver-types": "^3.16.0"
},
"devDependencies": {
@@ -63,5 +61,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/sonataflow-builder-image/.gitignore b/packages/sonataflow-builder-image/.gitignore
new file mode 100644
index 00000000000..82ed5072e72
--- /dev/null
+++ b/packages/sonataflow-builder-image/.gitignore
@@ -0,0 +1 @@
+bats-home
\ No newline at end of file
diff --git a/packages/sonataflow-builder-image/README.md b/packages/sonataflow-builder-image/README.md
index d6ec5463641..79e20e3cefc 100644
--- a/packages/sonataflow-builder-image/README.md
+++ b/packages/sonataflow-builder-image/README.md
@@ -24,7 +24,7 @@ image along with the modules and scripts provided in `@kie-tools/sonataflow-imag
- **python3** with the following packages installed:
- `behave` `lxml` `docker` `docker-squash` `elementPath` `pyyaml` `ruamel.yaml` `python-dateutil` `Jinja2` `pykwalify` `colorlog` `click`
-- **cekit 4.11.0**: [docs.cekit.io](https://docs.cekit.io/en/latest/index.html)
+- **cekit 4.12.0**: [docs.cekit.io](https://docs.cekit.io/en/latest/index.html)
- **s2i**: [source-to-image](https://github.com/openshift/source-to-image)
- **make**
- **docker**
diff --git a/packages/sonataflow-builder-image/env/index.js b/packages/sonataflow-builder-image/env/index.js
index 4c6bfb01333..4ff09d9fc35 100644
--- a/packages/sonataflow-builder-image/env/index.js
+++ b/packages/sonataflow-builder-image/env/index.js
@@ -19,6 +19,10 @@
const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env");
+const {
+ env: { mavenM2RepoViaHttpImage: mavenM2RepoViaHttpImageEnv },
+} = require("@kie-tools/maven-m2-repo-via-http-image/env");
+
const rootEnv = require("@kie-tools/root-env/env");
module.exports = composeEnv([rootEnv], {
@@ -46,8 +50,11 @@ module.exports = composeEnv([rootEnv], {
registry: getOrDefault(this.vars.SONATAFLOW_BUILDER_IMAGE__registry),
account: getOrDefault(this.vars.SONATAFLOW_BUILDER_IMAGE__account),
name: getOrDefault(this.vars.SONATAFLOW_BUILDER_IMAGE__name),
- tag: getOrDefault(this.vars.SONATAFLOW_BUILDER_IMAGE__buildTag),
+ buildTag: getOrDefault(this.vars.SONATAFLOW_BUILDER_IMAGE__buildTag),
version: require("../package.json").version,
+ dev: {
+ mavenM2RepoViaHttpImage: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.buildTag}`,
+ },
},
};
},
diff --git a/packages/sonataflow-builder-image/install.js b/packages/sonataflow-builder-image/install.js
index a3090a5364a..00f6c3a3bbf 100644
--- a/packages/sonataflow-builder-image/install.js
+++ b/packages/sonataflow-builder-image/install.js
@@ -33,10 +33,19 @@ const activateCmd =
execSync(
`${activateCmd} && \
- python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowBuilderImage.version} --source-folder ./resources`,
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowBuilderImage.buildTag} --source-folder ./resources`,
{ stdio: "inherit" }
);
+// Creates a symlink to the bats installation dir
+try {
+ fs.symlinkSync(`${sonataflowImageCommonDir}/bats-home`, path.resolve(__dirname, "./bats-home"), "dir");
+} catch (err) {
+ if (err.code !== "EEXIST") {
+ throw err;
+ }
+}
+
// Find and read the -image.yaml file
const resourcesPath = path.resolve(__dirname, "./resources");
const files = fs.readdirSync(resourcesPath);
diff --git a/packages/sonataflow-builder-image/package.json b/packages/sonataflow-builder-image/package.json
index 8819e58502e..d3913462f33 100644
--- a/packages/sonataflow-builder-image/package.json
+++ b/packages/sonataflow-builder-image/package.json
@@ -13,23 +13,37 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
- "build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
- "build:prod": "pnpm build:dev && pnpm image:test",
+ "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm test\" \"pnpm image:build\" --finally \"pnpm m2-repo-via-http:container:kill\"",
+ "build:dev": "pnpm build",
+ "build:prod": "pnpm build && pnpm image:test",
+ "copy:maven-m2-repo-via-http-image--settings-xml": "run-script-os",
+ "copy:maven-m2-repo-via-http-image--settings-xml:linux:darwin": "M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' m2-repo-via-http) envsubst < build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst > build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml && rm build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst",
+ "copy:maven-m2-repo-via-http-image--settings-xml:win32": "echo \"Build skipped on macOS and Windows\"",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build",
+ "copy-assets:linux:darwin": "rimraf build && rsync -av --exclude '*.bats' ./node_modules/@kie-tools/sonataflow-image-common/resources/ build && cp -R resources/* build && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
"copy-test-assets": "run-script-os",
- "copy-test-assets:linux:darwin": "cp -R ./node_modules/@kie-tools/sonataflow-image-common/test-resources/* build && cp -R test-resources/* build",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/* build",
"format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
"image:build": "run-script-os",
- "image:build:darwin:win32": "echo \"Build skipped on macOS and Windows\"",
- "image:build:linux": "pnpm setup:env make -C ./build build",
- "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"cp -r build/target/test/results dist-e2e-tests/\"",
+ "image:build:darwin:linux": "pnpm setup:env make -C ./build build",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"cp -R build/target/test/results dist-tests-e2e/\"",
"image:test:darwin:win32": "echo \"Tests skipped on macOS and Windows\"",
"image:test:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
"install": "node install.js && pnpm format",
- "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env SWF_IMAGE_REGISTRY=$(build-env sonataflowBuilderImage.registry) SWF_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowBuilderImage.account) SWF_IMAGE_NAME=$(build-env sonataflowBuilderImage.name) SWF_IMAGE_TAG=$(build-env sonataflowBuilderImage.tag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)"
+ "m2-repo-via-http:container:kill": "(docker container kill m2-repo-via-http || true) && (docker container rm m2-repo-via-http || true)",
+ "m2-repo-via-http:container:run": "(pnpm m2-repo-via-http:container:kill || true) && docker run --name m2-repo-via-http -v \"$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout):/var/www/html\" -dit $(build-env sonataflowBuilderImage.dev.mavenM2RepoViaHttpImage)",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowBuilderImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowBuilderImage.account) KOGITO_IMAGE_NAME=$(build-env sonataflowBuilderImage.name) KOGITO_IMAGE_TAG=$(build-env sonataflowBuilderImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version)",
+ "test": "run-script-os",
+ "test:cleanup": "mv dist-tests/report.xml dist-tests/junit-report.xml || true",
+ "test:linux:darwin": "run-script-if --bool \"$(build-env tests.run)\" --then \"pnpm test:setup\" \"pnpm test:run\" --finally \"pnpm test:cleanup\"",
+ "test:run": "make -C ./build bats || $(build-env tests.ignoreFailures)",
+ "test:setup": "pnpm copy-assets && pnpm copy-test-assets && mkdir -p dist-tests && rm -rf dist-tests/*",
+ "test:win32": "echo \"Tests are skipped in Windows\""
},
"devDependencies": {
+ "@kie-tools/image-builder": "workspace:*",
+ "@kie-tools/maven-m2-repo-via-http-image": "workspace:*",
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
diff --git a/packages/sonataflow-builder-image/resources/incubator-kie-sonataflow-builder-image.yaml b/packages/sonataflow-builder-image/resources/incubator-kie-sonataflow-builder-image.yaml
index a32e547ac9e..5955cbad3a6 100644
--- a/packages/sonataflow-builder-image/resources/incubator-kie-sonataflow-builder-image.yaml
+++ b/packages/sonataflow-builder-image/resources/incubator-kie-sonataflow-builder-image.yaml
@@ -18,7 +18,7 @@
#
- name: builder
from: "registry.access.redhat.com/ubi8/openjdk-17:1.19"
- version: "0.0.0"
+ version: "main"
modules:
repositories:
- path: modules
@@ -35,7 +35,7 @@
- name: "docker.io/apache/incubator-kie-sonataflow-builder"
from: "registry.access.redhat.com/ubi8/openjdk-17:1.19"
- version: "0.0.0"
+ version: "main"
description: "Kogito Serverless Workflow base builder with Quarkus extensions libraries preinstalled"
labels:
diff --git a/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/build-config/module.yaml b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/build-config/module.yaml
index de38debf479..02f5a3682c7 100644
--- a/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/build-config/module.yaml
+++ b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/build-config/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.builder.build-config
-version: "0.0.0"
+version: "main"
description: "Sonataflow builder image build configuration"
envs:
@@ -26,4 +26,4 @@ envs:
value: "false"
- name: QUARKUS_EXTENSIONS
# Follow up issue to remove KOGITO_VERSION: https://issues.redhat.com/browse/KOGITO-9270
- value: quarkus-kubernetes,smallrye-health,org.apache.kie.sonataflow:sonataflow-quarkus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-knative-eventing:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie:kie-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie:kie-addons-quarkus-events-process:${KOGITO_VERSION},org.kie:kie-addons-quarkus-process-management:${KOGITO_VERSION},org.kie:kie-addons-quarkus-source-files:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-jobs-knative-eventing:${KOGITO_VERSION},org.kie:kie-addons-quarkus-monitoring-prometheus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-monitoring-elastic:${KOGITO_VERSION},org.kie:kie-addons-quarkus-monitoring-sonataflow:${KOGITO_VERSION}
+ value: quarkus-kubernetes,smallrye-health,org.apache.kie.sonataflow:sonataflow-quarkus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-knative-eventing:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-microprofile-config-service-catalog:${KOGITO_VERSION},org.kie:kie-addons-quarkus-kubernetes:${KOGITO_VERSION},org.kie:kie-addons-quarkus-events-process:${KOGITO_VERSION},org.kie:kie-addons-quarkus-process-management:${KOGITO_VERSION},org.kie:kie-addons-quarkus-source-files:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-knative-serving:${KOGITO_VERSION},org.kie:kogito-addons-quarkus-jobs-knative-eventing:${KOGITO_VERSION},org.kie:kie-addons-quarkus-monitoring-prometheus:${KOGITO_VERSION},org.kie:kie-addons-quarkus-monitoring-sonataflow:${KOGITO_VERSION}
diff --git a/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/configure.sh b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/configure.sh
index 8d26bb5940e..66318545159 100644
--- a/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/configure.sh
+++ b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/configure.sh
@@ -31,3 +31,6 @@ tar xf "${SOURCES_DIR}"/kogito-swf-maven-repo.tar -C "${KOGITO_HOME}"/.m2/reposi
chown -R 1001:0 "${KOGITO_HOME}"
chmod -R ug+rwX "${KOGITO_HOME}"
+
+# Cleanup Maven M2 Repo Via HTTP Settings XML
+rm ${MAVEN_CONTAINER_BUILD_SETTINGS_PATH}
diff --git a/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/module.yaml b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/module.yaml
index c15fa0af09f..96f4388f0d5 100644
--- a/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/module.yaml
+++ b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/runtime/community/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.builder.runtime.community
-version: "0.0.0"
+version: "main"
description: "Sonataflow builder runtime module"
artifacts:
diff --git a/packages/sonataflow-builder-image/test-resources/modules/sonataflow/common/scripts/tests/bats/sonataflow-builder-build-app.bats b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/tests/bats/sonataflow-builder-build-app.bats
similarity index 78%
rename from packages/sonataflow-builder-image/test-resources/modules/sonataflow/common/scripts/tests/bats/sonataflow-builder-build-app.bats
rename to packages/sonataflow-builder-image/resources/modules/sonataflow/builder/tests/bats/sonataflow-builder-build-app.bats
index 9a85ce1a47a..c6b5748279c 100644
--- a/packages/sonataflow-builder-image/test-resources/modules/sonataflow/common/scripts/tests/bats/sonataflow-builder-build-app.bats
+++ b/packages/sonataflow-builder-image/resources/modules/sonataflow/builder/tests/bats/sonataflow-builder-build-app.bats
@@ -23,9 +23,9 @@ setup() {
export HOME="${KOGITO_HOME}"
mkdir -p "${KOGITO_HOME}"/launch
mkdir -p "${KOGITO_HOME}"/serverless-workflow-project/src/main/resources/
- cp $BATS_TEST_DIRNAME/../../../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
- cp $BATS_TEST_DIRNAME/../../added/jvm-settings.sh "${KOGITO_HOME}"/launch/
- cp $BATS_TEST_DIRNAME/../../added/build-app.sh "${KOGITO_HOME}"/launch/
+ cp $BATS_TEST_DIRNAME/../../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
+ cp $BATS_TEST_DIRNAME/../../../common/scripts/added/jvm-settings.sh "${KOGITO_HOME}"/launch/
+ cp $BATS_TEST_DIRNAME/../../../common/scripts/added/build-app.sh "${KOGITO_HOME}"/launch/
}
teardown() {
@@ -35,7 +35,7 @@ teardown() {
@test "verify copy resources is working" {
TEMPD=$(mktemp -d)
- cp -r $BATS_TEST_DIRNAME/../../../../../../tests/shell/sonataflow-builder/resources/greet-with-inputschema/* ${TEMPD}
+ cp -R $BATS_TEST_DIRNAME/../../../../../tests/shell/sonataflow-builder/resources/greet-with-inputschema/* ${TEMPD}
# We don't care about the errors to try to execute and build the program, just the copy matters
source ${KOGITO_HOME}/launch/build-app.sh ${TEMPD} || true
diff --git a/packages/sonataflow-dev-app/package.json b/packages/sonataflow-dev-app/package.json
index 6e385562abf..879b4c2a131 100644
--- a/packages/sonataflow-dev-app/package.json
+++ b/packages/sonataflow-dev-app/package.json
@@ -26,9 +26,9 @@
"@kie-tools/root-env": "workspace:*",
"apollo-server-express": "^3.13.0",
"babel-jest": "^25.5.1",
- "body-parser": "^1.20.2",
+ "body-parser": "^1.20.3",
"cors": "^2.8.5",
- "express": "^4.19.2",
+ "express": "^4.21.0",
"express-rate-limit": "^7.4.0",
"graphql": "14.3.1",
"jest": "^29.7.0",
diff --git a/packages/sonataflow-devmode-image/README.md b/packages/sonataflow-devmode-image/README.md
index 61e0381674c..fd140d5a66f 100644
--- a/packages/sonataflow-devmode-image/README.md
+++ b/packages/sonataflow-devmode-image/README.md
@@ -24,7 +24,7 @@ image along with the modules and scripts provided in `@kie-tools/sonataflow-imag
- **python3** with the following packages installed:
- `behave` `lxml` `docker` `docker-squash` `elementPath` `pyyaml` `ruamel.yaml` `python-dateutil` `Jinja2` `pykwalify` `colorlog` `click`
-- **cekit 4.11.0**: [docs.cekit.io](https://docs.cekit.io/en/latest/index.html)
+- **cekit 4.12.0**: [docs.cekit.io](https://docs.cekit.io/en/latest/index.html)
- **s2i**: [source-to-image](https://github.com/openshift/source-to-image)
- **make**
- **docker**
diff --git a/packages/sonataflow-devmode-image/env/index.js b/packages/sonataflow-devmode-image/env/index.js
index 660f9197301..2d22f206f0d 100644
--- a/packages/sonataflow-devmode-image/env/index.js
+++ b/packages/sonataflow-devmode-image/env/index.js
@@ -20,6 +20,10 @@
const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env");
const sonataFlowQuarkusDevUiEnv = require("@kie-tools/sonataflow-quarkus-devui/env");
+const {
+ env: { mavenM2RepoViaHttpImage: mavenM2RepoViaHttpImageEnv },
+} = require("@kie-tools/maven-m2-repo-via-http-image/env");
+
const rootEnv = require("@kie-tools/root-env/env");
module.exports = composeEnv([rootEnv], {
@@ -51,9 +55,11 @@ module.exports = composeEnv([rootEnv], {
registry: getOrDefault(this.vars.SONATAFLOW_DEVMODE_IMAGE__registry),
account: getOrDefault(this.vars.SONATAFLOW_DEVMODE_IMAGE__account),
name: getOrDefault(this.vars.SONATAFLOW_DEVMODE_IMAGE__name),
- tag: getOrDefault(this.vars.SONATAFLOW_DEVMODE_IMAGE__buildTag),
- version: require("../package.json").version,
+ buildTag: getOrDefault(this.vars.SONATAFLOW_DEVMODE_IMAGE__buildTag),
sonataflowQuarkusDevUiVersion: getOrDefault(this.vars.SONATAFLOW_DEVMODE_IMAGE__sonataflowQuarkusDevUiVersion),
+ dev: {
+ mavenM2RepoViaHttpImage: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.buildTag}`,
+ },
},
};
},
diff --git a/packages/sonataflow-devmode-image/install.js b/packages/sonataflow-devmode-image/install.js
index 79fee7113bc..f701da5c030 100644
--- a/packages/sonataflow-devmode-image/install.js
+++ b/packages/sonataflow-devmode-image/install.js
@@ -33,7 +33,7 @@ const activateCmd =
execSync(
`${activateCmd} && \
- python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowDevModeImage.version} --source-folder ./resources`,
+ python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowDevModeImage.buildTag} --source-folder ./resources`,
{ stdio: "inherit" }
);
diff --git a/packages/sonataflow-devmode-image/package.json b/packages/sonataflow-devmode-image/package.json
index d46b4029e61..32c092fa850 100644
--- a/packages/sonataflow-devmode-image/package.json
+++ b/packages/sonataflow-devmode-image/package.json
@@ -13,24 +13,32 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
- "build:dev": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy-assets\" \"pnpm image:build\"",
- "build:prod": "pnpm build:dev && pnpm image:test",
+ "build": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm m2-repo-via-http:container:run\" \"pnpm copy-assets\" \"pnpm image:build\" --finally \"pnpm m2-repo-via-http:container:kill\"",
+ "build:dev": "pnpm build",
+ "build:prod": "pnpm build && pnpm image:test",
+ "copy:maven-m2-repo-via-http-image--settings-xml": "run-script-os",
+ "copy:maven-m2-repo-via-http-image--settings-xml:linux:darwin": "M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' m2-repo-via-http) envsubst < build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst > build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml && rm build/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst",
+ "copy:maven-m2-repo-via-http-image--settings-xml:win32": "echo \"Build skipped on macOS and Windows\"",
"copy-assets": "run-script-os",
- "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build && pnpm copy-devui-repo",
+ "copy-assets:linux:darwin": "rimraf build && cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources build && cp -R resources/* build && pnpm copy-devui-repo && pnpm copy:maven-m2-repo-via-http-image--settings-xml",
"copy-devui-repo": "tar -C ~/.m2/repository/org/apache/kie/ -cvf build/modules/sonataflow/devmode/build-config/sonataflow-quarkus-devui-maven-repo.tar sonataflow && tar -C ~/.m2/repository/org/kie/ -cvf build/modules/sonataflow/devmode/build-config/kie-tools-maven-base-maven-repo.tar kie-tools-maven-base",
"copy-test-assets": "run-script-os",
- "copy-test-assets:linux:darwin": "cp -R ./node_modules/@kie-tools/sonataflow-image-common/test-resources/* build && cp -R test-resources/* build",
+ "copy-test-assets:linux:darwin": "cp -R test-resources/* build",
"format": "prettier --write . --ignore-path=../../.prettierignore --ignore-path=../../.gitignore",
"image:build": "run-script-os",
- "image:build:darwin:win32": "echo \"Build skipped on macOS and Windows\"",
"image:build:linux": "pnpm setup:env make -C ./build build",
- "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"cp -r build/target/test/results dist-e2e-tests/\"",
- "image:test:darwin:win32": "echo \"Tests skipped on macOS and Windows\"",
+ "image:build:win32": "echo \"Build skipped on Windows\"",
+ "image:test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"mkdir -p build/target/test/results\" \"run-script-os\" --finally \"cp -R build/target/test/results dist-tests-e2e/\"",
"image:test:linux": "pnpm copy-test-assets && pnpm setup:env make -C ./build test-image",
+ "image:test:win32": "echo \"Tests skipped on Windows\"",
"install": "node install.js && pnpm format",
- "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env SWF_IMAGE_REGISTRY=$(build-env sonataflowDevModeImage.registry) SWF_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowDevModeImage.account) SWF_IMAGE_NAME=$(build-env sonataflowDevModeImage.name) SWF_IMAGE_TAG=$(build-env sonataflowDevModeImage.tag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version) SONATAFLOW_QUARKUS_DEVUI_VERSION=$(build-env sonataflowDevModeImage.sonataflowQuarkusDevUiVersion)"
+ "m2-repo-via-http:container:kill": "(docker container kill m2-repo-via-http || true) && (docker container rm m2-repo-via-http || true)",
+ "m2-repo-via-http:container:run": "(pnpm m2-repo-via-http:container:kill || true) && docker run --name m2-repo-via-http -v \"$(mvn help:evaluate -Dexpression=settings.localRepository -q -DforceStdout):/var/www/html\" -dit $(build-env sonataflowDevModeImage.dev.mavenM2RepoViaHttpImage)",
+ "setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowDevModeImage.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowDevModeImage.account) KOGITO_IMAGE_NAME=$(build-env sonataflowDevModeImage.name) KOGITO_IMAGE_TAG=$(build-env sonataflowDevModeImage.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version) SONATAFLOW_QUARKUS_DEVUI_VERSION=$(build-env sonataflowDevModeImage.sonataflowQuarkusDevUiVersion)"
},
"devDependencies": {
+ "@kie-tools/image-builder": "workspace:*",
+ "@kie-tools/maven-m2-repo-via-http-image": "workspace:*",
"@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-image-common": "workspace:*",
diff --git a/packages/sonataflow-devmode-image/resources/incubator-kie-sonataflow-devmode-image.yaml b/packages/sonataflow-devmode-image/resources/incubator-kie-sonataflow-devmode-image.yaml
index a4a7f56a14c..8bd15fb6bfd 100644
--- a/packages/sonataflow-devmode-image/resources/incubator-kie-sonataflow-devmode-image.yaml
+++ b/packages/sonataflow-devmode-image/resources/incubator-kie-sonataflow-devmode-image.yaml
@@ -18,7 +18,7 @@
#
- name: builder
from: "registry.access.redhat.com/ubi8/openjdk-17:1.19"
- version: "0.0.0"
+ version: "main"
modules:
repositories:
- path: modules
@@ -38,7 +38,7 @@
- name: "docker.io/apache/incubator-kie-sonataflow-devmode"
from: "registry.access.redhat.com/ubi8/openjdk-17:1.19"
- version: "0.0.0"
+ version: "main"
description: "Kogito Serverless Workflow development mode with Quarkus extensions libraries preinstalled"
labels:
diff --git a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/build-config/module.yaml b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/build-config/module.yaml
index 2150cf0300b..36ea5dcdd06 100644
--- a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/build-config/module.yaml
+++ b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/build-config/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.devmode.build-config
-version: "0.0.0"
+version: "main"
description: "Kogito Serverless Workflow devmode image build configuration"
envs:
diff --git a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/module.yaml b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/module.yaml
index 0cb80d5fd7a..b511ab1e9a5 100644
--- a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/module.yaml
+++ b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.devmode.runtime.common
-version: "0.0.0"
+version: "main"
description: "Kogito Serverless Workflow devmode common module"
execute:
diff --git a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/configure.sh b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/configure.sh
index 7404a5c1e5f..ce0b195d4ec 100644
--- a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/configure.sh
+++ b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/configure.sh
@@ -32,3 +32,6 @@ tar xf "${SOURCES_DIR}"/kogito-swf-maven-repo.tar -C "${KOGITO_HOME}"/.m2/reposi
chown -R 1001:0 "${KOGITO_HOME}"
chmod -R ug+rwX "${KOGITO_HOME}"
+
+# Cleanup Maven M2 Repo Via HTTP Settings XML
+rm ${MAVEN_CONTAINER_BUILD_SETTINGS_PATH}
\ No newline at end of file
diff --git a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/module.yaml b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/module.yaml
index db3ac439371..c8cff54bfb0 100644
--- a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/module.yaml
+++ b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/community/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.devmode.runtime.community
-version: "0.0.0"
+version: "main"
description: "Kogito Serverless Workflow devmode with required extensions"
envs:
diff --git a/packages/sonataflow-image-common/.gitignore b/packages/sonataflow-image-common/.gitignore
new file mode 100644
index 00000000000..4f8d39e1f12
--- /dev/null
+++ b/packages/sonataflow-image-common/.gitignore
@@ -0,0 +1,2 @@
+bin/
+bats-home/
\ No newline at end of file
diff --git a/packages/sonataflow-image-common/README.md b/packages/sonataflow-image-common/README.md
index 71c4aa3c313..d6bf1235a9c 100644
--- a/packages/sonataflow-image-common/README.md
+++ b/packages/sonataflow-image-common/README.md
@@ -30,7 +30,7 @@ The contents of this package are:
- **python3** with the following packages installed:
- `behave` `lxml` `docker` `docker-squash` `elementPath` `pyyaml` `ruamel.yaml` `python-dateutil` `Jinja2` `pykwalify` `colorlog` `click`
-- **cekit 4.11.0**: [docs.cekit.io](https://docs.cekit.io/en/latest/index.html)
+- **cekit 4.12.0**: [docs.cekit.io](https://docs.cekit.io/en/latest/index.html)
- **make**
- **docker**
@@ -38,10 +38,10 @@ The contents of this package are:
To build and tests the images the package provides a convenient `Makefile` that will do the hard work for you. It relies in the following Envs (or arguments):
-- `SWF_IMAGE_NAME`: (required) Specifies the image name to build. It should match the image descriptor.
-- `SWF_IMAGE_REGISTRY`: Image registry to use, defaults to 'docker.io'
-- `SWF_IMAGE_REGISTRY_ACCOUNT`: Image registry account to use, defaults to 'apache'
-- `SWF_IMAGE_TAG`: Custom tag for the image. If not provided it will use the version in the image descriptor.
+- `KOGITO_IMAGE_NAME`: (required) Specifies the image name to build. It should match the image descriptor.
+- `KOGITO_IMAGE_REGISTRY`: Image registry to use, defaults to 'docker.io'
+- `KOGITO_IMAGE_REGISTRY_ACCOUNT`: Image registry account to use, defaults to 'apache'
+- `KOGITO_IMAGE_TAG`: Custom tag for the image. If not provided it will use the version in the image descriptor.
- `QUARKUS_PLATFORM_VERSION`: (required) Quarkus platform version to use inside the image.
- `KOGITO_VERSION`: (required) Kogito platform version to use inside the image.
@@ -50,6 +50,9 @@ To build and tests the images the package provides a convenient `Makefile` that
- `BUILD_ENGINE`: (docker/podman) engine used to build the image, defaults to docker
- `BUILD_ENGINE_OPTIONS`: extra build options to pass to the build engine
+- `KOGITO_APPS_TARGET_BRANCH`: Target branch from where to pull the Kogito Apps code, defaults to `main`
+- `KOGITO_APPS_TARGET_URI`: Target repository URI from where to pull the Kogito Apps code, defaults to 'https://github.com/apache/incubator-kie-kogito-apps.git'
+
## Building images..
- Copy your image descriptor and modules along with the contents of the `resources` into a separate folder (eg: `/tmp/build`)
diff --git a/packages/sonataflow-image-common/env/index.js b/packages/sonataflow-image-common/env/index.js
index fd84bd0e7a2..61bc742bd66 100644
--- a/packages/sonataflow-image-common/env/index.js
+++ b/packages/sonataflow-image-common/env/index.js
@@ -22,10 +22,6 @@ const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env");
module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({}),
get env() {
- return {
- sonataflowImageCommon: {
- version: require("../package.json").version,
- },
- };
+ return {};
},
});
diff --git a/packages/sonataflow-image-common/install.js b/packages/sonataflow-image-common/install.js
index 66430aad443..d50e66e5a08 100644
--- a/packages/sonataflow-image-common/install.js
+++ b/packages/sonataflow-image-common/install.js
@@ -30,6 +30,11 @@ const activateCmd =
execSync(
`${activateCmd} && \
- python3 ./resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowImageCommon.version} --source-folder ./resources`,
+ python3 ./resources/scripts/versions_manager.py --bump-to ${buildEnv.env.root.streamName} --source-folder ./resources`,
{ stdio: "inherit" }
);
+
+// Install bats
+if (process.platform !== "win32") {
+ execSync(`. ./resources/scripts/install_bats.sh`, { stdio: "inherit" });
+}
diff --git a/packages/sonataflow-image-common/package.json b/packages/sonataflow-image-common/package.json
index 48c6e347535..2a307a83e2d 100644
--- a/packages/sonataflow-image-common/package.json
+++ b/packages/sonataflow-image-common/package.json
@@ -13,17 +13,24 @@
"url": "https://github.com/apache/incubator-kie-tools/issues"
},
"scripts": {
- "install": "node install.js"
+ "build:prod": "pnpm test",
+ "install": "node install.js",
+ "test": "run-script-os",
+ "test:linux:darwin": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"mkdir -p dist-tests\" \"rm -rf dist-tests/*\" \"make -C ./resources bats\" --finally \"touch dist-tests/report.xml\" \"mv dist-tests/report.xml dist-tests/junit-report.xml\"",
+ "test:win32": "echo \"Tests are skipped in Windows\""
},
"devDependencies": {
"@kie-tools/python-venv": "workspace:*",
- "@kie-tools/root-env": "workspace:*"
+ "@kie-tools/root-env": "workspace:*",
+ "run-script-os": "^1.1.6"
},
"kieTools": {
"requiredPreinstalledCliCommands": [
"python3",
"pip3",
- "make"
+ "make",
+ "s2i",
+ "xmllint"
]
}
}
diff --git a/packages/sonataflow-image-common/resources/Makefile b/packages/sonataflow-image-common/resources/Makefile
index 79c1803284a..834de6f6efc 100644
--- a/packages/sonataflow-image-common/resources/Makefile
+++ b/packages/sonataflow-image-common/resources/Makefile
@@ -19,33 +19,33 @@
# Image build envs
CEKIT_BUILD_OPTIONS ?=
-CEKIT_CMD := cekit ${CEKIT_BUILD_OPTIONS}
+CEKIT_CMD := cekit
BUILD_ENGINE ?= docker
BUILD_ENGINE_OPTIONS ?=
-# Resolving the current image version from the kogito.project.versions module. Cekit will use it to tag the image.
-CURRENT_IMAGE_VERSION := $(shell python3 scripts/retrieve_version.py)
-
# SWF Image creation envs
-SWF_IMAGE_NAME ?= # Image name
-SWF_IMAGE_REGISTRY ?= 'docker.io'
-SWF_IMAGE_REGISTRY_ACCOUNT ?= 'apache'
-SWF_IMAGE_TAG ?= $(CURRENT_IMAGE_VERSION) # Setting a default value if SWF_IMAGE_TAG env is not present
-SWF_FULL_IMAGE_NAME := $(SWF_IMAGE_REGISTRY)/$(SWF_IMAGE_REGISTRY_ACCOUNT)/$(SWF_IMAGE_NAME)
-SWF_IMAGE_FILENAME := ${SWF_IMAGE_NAME}-image.yaml
+KOGITO_IMAGE_NAME ?= # Image name
+KOGITO_IMAGE_REGISTRY ?= 'docker.io'
+KOGITO_IMAGE_REGISTRY_ACCOUNT ?= 'apache'
+KOGITO_IMAGE_TAG ?= $(shell pnpm build-env root.streamName) # Setting a default value if KOGITO_IMAGE_TAG env is not present
+KOGITO_FULL_IMAGE_NAME := $(KOGITO_IMAGE_REGISTRY)/$(KOGITO_IMAGE_REGISTRY_ACCOUNT)/$(KOGITO_IMAGE_NAME)
+KOGITO_IMAGE_FILENAME := ${KOGITO_IMAGE_NAME}-image.yaml
+
+# Services Applications Image Build
+KOGITO_APPS_TARGET_URI ?= 'https://github.com/apache/incubator-kie-kogito-apps.git'
-_check_swf_image_name:
-ifndef SWF_IMAGE_NAME
- $(error Cannot build image, please provide a valid image name using the SWF_IMAGE_NAME env)
+_check_kogito_image_name:
+ifndef KOGITO_IMAGE_NAME
+ $(error Cannot build image, please provide a valid image name using the KOGITO_IMAGE_NAME env)
endif
# Check if there are Quarkus and Kogito version envs
_check_versions:
ifndef QUARKUS_PLATFORM_VERSION
- $(error Cannot build image, please provide a valid Quarkus version using the QUARKUS_PLATFORM_VERSION env)
+ $(error Cannot build image, please provide a valid Quarkus version using the QUARKUS_PLATFORM_VERSION env)
endif
ifndef KOGITO_VERSION
- $(error Cannot build image, please provide a valid Kogito version using the KOGITO_VERSION env)
+ $(error Cannot build image, please provide a valid Kogito version using the KOGITO_VERSION env)
endif
# Upgrade Quarkus & Kogito versions in the images and modules
@@ -60,28 +60,26 @@ _fix_platform_versions: _check_versions _run_version_manager
# Building the SWF image with Cekit
_cekit_build:
- ${CEKIT_CMD} --descriptor ${SWF_IMAGE_FILENAME} build ${CEKIT_BUILD_OPTIONS} ${BUILD_ENGINE} ${BUILD_ENGINE_OPTIONS} --tag ${SWF_FULL_IMAGE_NAME}:${CURRENT_IMAGE_VERSION} --tag ${SWF_FULL_IMAGE_NAME}:${SWF_IMAGE_TAG} --tag ${SWF_FULL_IMAGE_NAME}:latest
-
-# Tagging the generated image if SWF_IMAGE_TAG doesn't match the CURRENT_IMAGE_VERSION
-# Currently unused, as cekit will tag the image for us
-_tag_image:
-ifneq ($(SWF_IMAGE_TAG), $(CURRENT_IMAGE_VERSION))
- ${BUILD_ENGINE} tag ${SWF_FULL_IMAGE_NAME}:${CURRENT_IMAGE_VERSION} ${SWF_FULL_IMAGE_NAME}:${SWF_IMAGE_TAG}
-endif
+ ${CEKIT_CMD} --descriptor ${KOGITO_IMAGE_FILENAME} build ${CEKIT_BUILD_OPTIONS} ${BUILD_ENGINE} ${BUILD_ENGINE_OPTIONS} --tag ${KOGITO_FULL_IMAGE_NAME}:${KOGITO_IMAGE_TAG}
_create_e2e_dir:
rm -rf ../dist-tests-e2e
mkdir ../dist-tests-e2e
+# Pull kogito-apps repo and build the target kogito-apps depending on the `KOGITO_IMAGE_NAME`s
+# Required for kogito-apps images only
+.PHONY build-kogito-app: _build_kogito_app
+_build_kogito_app:
+ scripts/build-kogito-apps-components.sh ${KOGITO_IMAGE_NAME} ${KOGITO_VERSION} ${KOGITO_APPS_TARGET_URI};
+
# Trigger the image tests
-.PHONY test-image: _create_e2e_dir _check_swf_image_name bats _test_image
+.PHONY test-image: _create_e2e_dir _check_kogito_image_name _test_image
_test_image:
- ${CEKIT_CMD} --descriptor ${SWF_IMAGE_FILENAME} test behave
- tests/shell/run.sh ${SWF_IMAGE_NAME} ${SWF_FULL_IMAGE_NAME}:${SWF_IMAGE_TAG}
+ tests/shell/run.sh ${KOGITO_IMAGE_NAME} ${KOGITO_FULL_IMAGE_NAME}:${KOGITO_IMAGE_TAG}
+ ${CEKIT_CMD} --descriptor ${KOGITO_IMAGE_FILENAME} test behave
-.PHONY build: _check_swf_image_name _fix_platform_versions _cekit_build
+.PHONY build: _check_kogito_image_name _fix_platform_versions _cekit_build
# run bat tests locally
-.PHONY: bats
bats:
- ./scripts/run-bats.sh
\ No newline at end of file
+ @./scripts/run-bats.sh
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/README.md b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/README.md
new file mode 100644
index 00000000000..0e314ba075d
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/README.md
@@ -0,0 +1,71 @@
+
+
+# Kogito Custom TrustStore Module
+
+This module adds the possibility to override the default Java TrustStore in the JVM process for any Kogito Service.
+
+## How to Use
+
+1. Add the self-signed certificates or your in-house certificates to the default JKS `cacerts` (or you can start a new one from scratch).
+ [Keystore Explorer](https://keystore-explorer.org/) is a great tool to manipulate JKS
+
+2. Mount your file anywhere in your system using `docker volume`:
+
+```shell
+$ docker volume inspect truststores
+[
+ {
+ "CreatedAt": "2021-03-23T12:53:18-03:00",
+ "Driver": "local",
+ "Labels": null,
+ "Mountpoint": "/var/lib/docker/volumes/truststores/_data",
+ "Name": "truststores",
+ "Options": null,
+ "Scope": "local"
+ }
+]
+```
+
+Make sure to move the `cacerts` file to `/var/lib/docker/volumes/truststores/_data` directory.
+
+3. Mount this volume when running your Kogito service:
+
+```shell
+$ docker run --rm -it \
+ -e CUSTOM_TRUSTSTORE=cacerts \
+ -e CUSTOM_TRUSTSTORE_PASSWORD=changeit \
+ -p 8080:8080 \
+ --mount source=truststores,target=/home/kogito/certs \
+ custom-truststore
+```
+
+You should see the following message in the console if everything went fine:
+
+```log
+INFO ---> Configuring custom Java Truststore 'cacerts' in the path /home/kogito/certs/custom-truststore
+```
+
+## Key Takeaways
+
+1. Make sure that the path is `/home/kogito/certs/custom-truststore`. The image **WON'T** read the certificate from anywhere else
+
+2. The environment variable `CUSTOM_TRUSTSTORE` will tell the image the name of the desired file to read
+
+3. `CUSTOM_TRUSTSTORE_PASSWORD` is an optional parameter, but it's a good practice to always have it set. The default password for `cacerts` store is `changeit`
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/added/configure-custom-truststore.sh b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/added/configure-custom-truststore.sh
new file mode 100755
index 00000000000..3438a0d4e5d
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/added/configure-custom-truststore.sh
@@ -0,0 +1,54 @@
+#!/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.
+#
+set -e
+
+# imports
+# shellcheck source=/dev/null
+source "${KOGITO_HOME}"/launch/logging.sh
+
+function prepareEnv() {
+ # keep it on alphabetical order
+ unset CUSTOM_TRUSTSTORE
+ unset CUSTOM_TRUSTSTORE_PASSWORD
+}
+
+function configure() {
+ configure_custom_truststore
+}
+
+# Exit codes
+# 1 - General error
+function configure_custom_truststore() {
+ local defaultCustomTruststorePath="${KOGITO_HOME}/certs/custom-truststore"
+
+ if [ ! -z "${CUSTOM_TRUSTSTORE}" ]; then
+ CUSTOM_TRUSTSTORE_PATH="${defaultCustomTruststorePath}/${CUSTOM_TRUSTSTORE}"
+ log_info "---> Configuring custom Java Truststore '${CUSTOM_TRUSTSTORE}' in the path ${defaultCustomTruststorePath}"
+ if [ ! -f "${CUSTOM_TRUSTSTORE_PATH}" ]; then
+ log_error "---> A custom truststore was specified ('${CUSTOM_TRUSTSTORE}'), but wasn't found in the path ${defaultCustomTruststorePath}. \
+Make sure that the path is mounted and accessible in your container"
+ exit 1
+ fi
+ CUSTOM_TRUSTSTORE_ARGS="-Djavax.net.ssl.trustStore=${CUSTOM_TRUSTSTORE_PATH}"
+ if [ ! -z "${CUSTOM_TRUSTSTORE_PASSWORD}" ]; then
+ CUSTOM_TRUSTSTORE_ARGS="${CUSTOM_TRUSTSTORE_ARGS} -Djavax.net.ssl.trustStorePassword=${CUSTOM_TRUSTSTORE_PASSWORD}"
+ fi
+ fi
+}
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/configure b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/configure
new file mode 100644
index 00000000000..ddd815e3ec2
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/configure
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# 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.
+#
+SCRIPT_DIR=$(dirname "${0}")
+
+# custom truststore configuration
+mkdir -p "${KOGITO_HOME}"/launch/
+cp -v "${SCRIPT_DIR}"/added/* "${KOGITO_HOME}"/launch/
+chmod +x-w "${KOGITO_HOME}"/launch/configure-custom-truststore.sh
\ No newline at end of file
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/module.yaml
new file mode 100644
index 00000000000..a608b6bf988
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/module.yaml
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.security.custom.truststores
+version: "main"
+description: "Adds the capability of configuring a custom Java Truststore to replace the original cacerts"
+
+envs:
+ - name: "CUSTOM_TRUSTORE"
+ description: ^ Custom JVM Truststore certificate (JKS format) that will replace the original cacerts file when executing the JVM process within the image.
+ example: "my-own-cacerts.jks"
+ - name: "CUSTOM_TRUSTSTORE_PASSWORD"
+ description: ^ Password to for the custom JKS Truststore certificate. Ideally defined on containers platforms using Secrets.
+ example: "changeit"
+
+execute:
+ - script: configure
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/tests/bats/kogito-custom-truststore.bats b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/tests/bats/kogito-custom-truststore.bats
new file mode 100644
index 00000000000..8ed0c4ac7a2
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-custom-truststore/tests/bats/kogito-custom-truststore.bats
@@ -0,0 +1,75 @@
+#!/usr/bin/env bats
+#
+# 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 KOGITO_HOME=/tmp/kogito
+export HOME="${KOGITO_HOME}"
+mkdir -p "${KOGITO_HOME}"/launch
+cp $BATS_TEST_DIRNAME/../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
+
+load $BATS_TEST_DIRNAME/../../added/configure-custom-truststore.sh
+
+teardown() {
+ rm -rf "${KOGITO_HOME}"
+}
+
+@test "fail case when the custom certificate is not present in the expected path" {
+ prepareEnv
+
+ local expected=1
+ export CUSTOM_TRUSTSTORE=my-cert.jks
+
+ run configure
+
+ echo "Result is [$status] and expected is [${expected}]" >&2
+ [ "$status" = "${expected}" ]
+ echo "Output is: ${lines[@]}"
+ [[ "${lines[1]}" == *"ERROR ---> A custom truststore was specified"* ]]
+}
+
+@test "success case when the custom certificate is present in the expected path" {
+ prepareEnv
+
+ local expected=0
+ local pathExpected="${KOGITO_HOME}/certs/custom-truststore/my-cert.jks"
+
+ mkdir -p ${KOGITO_HOME}/certs/custom-truststore
+ touch ${KOGITO_HOME}/certs/custom-truststore/my-cert.jks
+ CUSTOM_TRUSTSTORE=my-cert.jks
+
+ run configure
+
+ echo "Result is [$status] and expected is [${expected}]" >&2
+ [ "$status" = "${expected}" ]
+ echo "Output is: ${lines[@]}"
+ [ "${lines[0]}" = "INFO ---> Configuring custom Java Truststore 'my-cert.jks' in the path /tmp/kogito/certs/custom-truststore" ]
+}
+
+@test "success case when no custom certificate is given" {
+ local expected=0
+
+ prepareEnv
+ run configure
+
+ echo "Result is [$status] and expected is [${expected}]" >&2
+ [ "$status" = "${expected}" ]
+ echo "Truststore Args should be empty, but was ${CUSTOM_TRUSTSTORE_ARGS}" >&2
+ [ "${CUSTOM_TRUSTSTORE_ARGS}" = "" ]
+}
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/added/kogito-data-index-common.sh b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/added/kogito-data-index-common.sh
new file mode 100644
index 00000000000..273aa713abb
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/added/kogito-data-index-common.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env 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.
+#
+
+
+source "${KOGITO_HOME}"/launch/logging.sh
+
+function prepareEnv() {
+ # keep it on alphabetical order
+ unset KOGITO_DATA_INDEX_QUARKUS_PROFILE
+}
+
+function configure() {
+ configure_data_index_quarkus_profile
+}
+
+function configure_data_index_quarkus_profile() {
+ local quarkusProfile=${KOGITO_DATA_INDEX_QUARKUS_PROFILE}
+ KOGITO_DATA_INDEX_PROPS="${KOGITO_DATA_INDEX_PROPS} -Dquarkus.profile=${quarkusProfile}"
+}
\ No newline at end of file
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
new file mode 100644
index 00000000000..fc3e5005588
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/configure
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+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
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml
new file mode 100644
index 00000000000..c820da3bd1a
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/module.yaml
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.dataindex.common
+version: "main"
+description: "Common modules for data-index persistence provider images, any addition that is common must be added in this module"
+
+envs:
+ - name: "KOGITO_DATA_INDEX_QUARKUS_PROFILE"
+ value: "kafka-events-support"
+ description: "Allows to change the event connection type. The possible values are :`kafka-events-support`(default) or `http-events-support`"
+
+execute:
+ - script: configure
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/tests/bats/kogito-data-index-common.bats b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/tests/bats/kogito-data-index-common.bats
new file mode 100644
index 00000000000..e660056d9df
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-data-index-common/tests/bats/kogito-data-index-common.bats
@@ -0,0 +1,55 @@
+#!/usr/bin/env bats
+#
+# 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 KOGITO_HOME=/tmp/kogito
+export HOME="${KOGITO_HOME}"
+mkdir -p "${KOGITO_HOME}"/launch
+cp $BATS_TEST_DIRNAME/../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
+
+# imports
+load $BATS_TEST_DIRNAME/../../added/kogito-data-index-common.sh
+
+
+teardown() {
+ rm -rf "${KOGITO_HOME}"
+}
+
+@test "check if the default quarkus profile is correctly set on data index" {
+ local expected=" -Dquarkus.profile="
+
+ prepareEnv
+
+ configure_data_index_quarkus_profile
+ echo "Result is [${KOGITO_DATA_INDEX_PROPS}] and expected is [${expected}]"
+ [ "${expected}" = "${KOGITO_DATA_INDEX_PROPS}" ]
+}
+
+@test "check if a provided data index quarkus profile is correctly set on data index" {
+ local expected=" -Dquarkus.profile=http-events-support"
+
+ prepareEnv
+ export KOGITO_DATA_INDEX_QUARKUS_PROFILE="http-events-support"
+
+ configure_data_index_quarkus_profile
+ echo "Result is [${KOGITO_DATA_INDEX_PROPS}] and expected is [${expected}]"
+ [ "${expected}" = "${KOGITO_DATA_INDEX_PROPS}" ]
+}
+
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/module.yaml
index 8761f126a4f..c4d5726d4ec 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.kogito.dynamic.resources
-version: "0.0.0"
+version: "main"
description: -| Module retrieved from https://github.com/jboss-openshift/cct_module/blob/master/jboss/container/java/jvm/bash However it contains a few customizations to fit Kogito needs.
diff --git a/packages/sonataflow-image-common/test-resources/modules/sonataflow/common/scripts/tests/bats/sonataflow-builder-jvm-settings.bats b/packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/tests/bats/sonataflow-builder-jvm-settings.bats
similarity index 88%
rename from packages/sonataflow-image-common/test-resources/modules/sonataflow/common/scripts/tests/bats/sonataflow-builder-jvm-settings.bats
rename to packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/tests/bats/sonataflow-builder-jvm-settings.bats
index a0487e8d477..2ba04247421 100644
--- a/packages/sonataflow-image-common/test-resources/modules/sonataflow/common/scripts/tests/bats/sonataflow-builder-jvm-settings.bats
+++ b/packages/sonataflow-image-common/resources/modules/kogito-dynamic-resources/tests/bats/sonataflow-builder-jvm-settings.bats
@@ -24,10 +24,10 @@ export HOME="${KOGITO_HOME}"
export JBOSS_CONTAINER_JAVA_JVM_MODULE=/tmp/container/java/jvm
mkdir -p "${KOGITO_HOME}"/launch
mkdir -p "${JBOSS_CONTAINER_JAVA_JVM_MODULE}"
-cp $BATS_TEST_DIRNAME/../../../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
-cp -r $BATS_TEST_DIRNAME/../../../../../kogito-dynamic-resources/added/* "${JBOSS_CONTAINER_JAVA_JVM_MODULE}"/
+cp $BATS_TEST_DIRNAME/../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
+cp -R $BATS_TEST_DIRNAME/../../added/* "${JBOSS_CONTAINER_JAVA_JVM_MODULE}"/
chmod -R +x "${JBOSS_CONTAINER_JAVA_JVM_MODULE}"
-cp $BATS_TEST_DIRNAME/../../added/jvm-settings.sh "${KOGITO_HOME}"/launch/
+cp $BATS_TEST_DIRNAME/../../../sonataflow/common/scripts/added/jvm-settings.sh "${KOGITO_HOME}"/launch/
teardown() {
rm -rf "${KOGITO_HOME}"
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/added/launch/kogito-jobs-service-common.sh b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/added/launch/kogito-jobs-service-common.sh
new file mode 100644
index 00000000000..b5c8c61315c
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/added/launch/kogito-jobs-service-common.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env 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.
+#
+
+
+source "${KOGITO_HOME}"/launch/logging.sh
+
+function prepareEnv() {
+ # keep it on alphabetical order
+ unset ENABLE_EVENTS
+}
+
+function configure() {
+ configure_jobs_service_events
+}
+
+function configure_jobs_service_events() {
+ if [ "${ENABLE_EVENTS^^}" == "TRUE" ]; then
+ KOGITO_JOBS_PROPS="${KOGITO_JOBS_PROPS} -Dquarkus.profile=events-support"
+ fi
+}
\ No newline at end of file
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
new file mode 100644
index 00000000000..34732d31e86
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/configure
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# 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.
+#
+set -e
+
+SOURCES_DIR=/tmp/artifacts
+SCRIPT_DIR=$(dirname "${0}")
+ADDED_DIR="${SCRIPT_DIR}"/added
+
+cp -Rv "${ADDED_DIR}"/launch/* "${KOGITO_HOME}"/launch/
+
+chown -R 1001:0 "${KOGITO_HOME}"
+chmod -R ug+rwX "${KOGITO_HOME}"
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/module.yaml
new file mode 100644
index 00000000000..9ea6355e8cd
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/module.yaml
@@ -0,0 +1,25 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.kogito.jobs.service.common
+version: "main"
+description: "This module needs to be run last, if adding it, add in the last position."
+
+execute:
+ - script: configure
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/tests/bats/kogito-jobs-service-common.bats b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/tests/bats/kogito-jobs-service-common.bats
new file mode 100644
index 00000000000..f6ab9514e9a
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-jobs-service-common/tests/bats/kogito-jobs-service-common.bats
@@ -0,0 +1,46 @@
+#!/usr/bin/env bats
+#
+# 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 KOGITO_HOME=/tmp/kogito
+export HOME="${KOGITO_HOME}"
+mkdir -p "${KOGITO_HOME}"/launch
+cp $BATS_TEST_DIRNAME/../../../kogito-logging/added/logging.sh "${KOGITO_HOME}"/launch/
+
+# imports
+load $BATS_TEST_DIRNAME/../../added/launch/kogito-jobs-service-common.sh
+
+
+teardown() {
+ rm -rf "${KOGITO_HOME}"
+}
+
+@test "check if the event is correctly set on jobs service" {
+ export ENABLE_EVENTS="true"
+ configure_jobs_service_events
+
+ result="${KOGITO_JOBS_PROPS}"
+ expected=" -Dquarkus.profile=events-support"
+
+ echo "Result is ${result} and expected is ${expected}"
+ [ "${result}" = "${expected}" ]
+}
+
+
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-launch-scripts/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-launch-scripts/module.yaml
index 801c65cb8f1..e875cf36849 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-launch-scripts/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/kogito-launch-scripts/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.kogito.launch.scripts
-version: "0.0.0"
+version: "main"
execute:
- script: configure
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-logging/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-logging/module.yaml
index 238ed43465f..85c04ff8703 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-logging/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/kogito-logging/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.kogito.logging
-version: "0.0.0"
+version: "main"
execute:
- script: configure
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst
new file mode 100644
index 00000000000..e85c5fc1703
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst
@@ -0,0 +1,107 @@
+
+
+
+ kie-tools--maven-m2-repo-via-http-allowed
+ kie-tools--maven-m2-repo-via-http
+ Mirror to override default blocking mirror that blocks http.
+ http://$M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL
+
+
+
+
+
+
+
+
+
+
+
+ kie-tools--maven-m2-repo-via-http-allowed-profile
+
+ true
+
+
+
+ kie-tools--maven-m2-repo-via-http
+ KIE Tools :: Maven M2 Repo via HTTP
+ http://$M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL/
+ default
+
+ true
+ never
+
+
+ true
+ never
+
+
+
+
+
+
+ kie-tools--maven-m2-repo-via-http
+ KIE Tools :: Maven M2 Repo via HTTP
+ http://$M2_REPO_VIA_HTTP_URL_WITHOUT_PROTOCOL/
+ default
+
+ true
+ never
+
+
+ true
+ never
+
+
+
+
+
+
+ kogito-images
+
+
+ apache-public-repository-group
+ Apache Public Repository Group
+ https://repository.apache.org/content/groups/public/
+ default
+
+ true
+ never
+
+
+ true
+ never
+
+
+
+
+
+
+
+ apache-public-repository-group
+ Apache Public Repository Group
+ https://repository.apache.org/content/groups/public/
+ default
+
+ true
+ never
+
+
+ true
+ never
+
+
+
+
+
+
+
+
+ kogito-images
+ kie-tools--maven-m2-repo-via-http-allowed-profile
+
+
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
index bf616eaa8dc..56f154e3156 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.kogito.maven.common
-version: "0.0.0"
+version: "main"
envs:
- name: "MAVEN_VERSION"
@@ -28,6 +28,9 @@ envs:
- name: "MAVEN_SETTINGS_PATH"
description: "The location of the settings.xml file"
value: "${KOGITO_HOME}/.m2/settings.xml"
+ - name: "MAVEN_CONTAINER_BUILD_SETTINGS_PATH"
+ description: "The location of the settings.xml file during container image build"
+ value: "${KOGITO_HOME}/.m2/maven-m2-repo-via-http-settings.xml"
- name: "HTTP_PROXY"
description: "The location of the http proxy, will be used for both Maven builds and Java runtime."
example: "http://127.0.0.1:8080"
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-maven/tests/bats/maven-settings.bats b/packages/sonataflow-image-common/resources/modules/kogito-maven/tests/bats/maven-settings.bats
index 8a7e85067c7..66fb2363532 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-maven/tests/bats/maven-settings.bats
+++ b/packages/sonataflow-image-common/resources/modules/kogito-maven/tests/bats/maven-settings.bats
@@ -24,14 +24,14 @@ source $BATS_TEST_DIRNAME/../../common/added/configure-maven.sh
setup() {
- export HOME=$BATS_TMPDIR/maven
- mkdir -p ${HOME}/.m2/
- cp $BATS_TEST_DIRNAME/../../common/maven/settings.xml ${HOME}/.m2/
- export MAVEN_SETTINGS_PATH="${HOME}/.m2/settings.xml"
+ export KOGITO_HOME=$BATS_TMPDIR/maven
+ mkdir -p ${KOGITO_HOME}/.m2/
+ cp $BATS_TEST_DIRNAME/../../common/maven/settings.xml ${KOGITO_HOME}/.m2/
+ export MAVEN_SETTINGS_PATH="${KOGITO_HOME}/.m2/settings.xml"
}
teardown() {
- rm -rf ${HOME}
+ rm -rf ${KOGITO_HOME}
}
# override this function, cat /dec/urandon makes the test hangs on GH actions
@@ -45,7 +45,7 @@ function _generate_random_id() {
MAVEN_MIRROR_URL="http://localhost:8081/nexus/custom/repo/public"
run configure_mirrors
expected=" mirror.default http://localhost:8081/nexus/custom/repo/public external:* "
- result=$(xmllint --xpath "//*[local-name()='mirrors']//*[local-name()='mirror']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='mirrors']//*[local-name()='mirror']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "expected=${result}"
[ "${expected}" = "${result}" ]
@@ -56,7 +56,7 @@ function _generate_random_id() {
HTTPS_PROXY="https://10.10.10.10:8443"
run configure_proxy
expected=" genproxy true https https://10.10.10.10 8443 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -67,7 +67,7 @@ function _generate_random_id() {
HTTPS_PROXY="https://10.10.10.10:"
run configure_proxy
expected=" genproxy true https https://10.10.10.10 443 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -80,7 +80,7 @@ function _generate_random_id() {
PROXY_PASSWORD="impossible2guess"
run configure_proxy
expected=" genproxy true https https://10.10.10.10 8443 hello impossible2guess "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -91,7 +91,7 @@ function _generate_random_id() {
HTTP_PROXY="http://10.10.10.20:8003"
run configure_proxy
expected=" genproxy true http http://10.10.10.20 8003 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -104,7 +104,7 @@ function _generate_random_id() {
PROXY_PASSWORD="impossible2guess"
run configure_proxy
expected=" genproxy true http http://10.10.10.20 80 hello impossible2guess "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -115,7 +115,7 @@ function _generate_random_id() {
HTTP_PROXY="http://10.10.10.20:8003"
run configure_proxy
expected=" genproxy true http http://10.10.10.20 8003 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -130,7 +130,7 @@ function _generate_random_id() {
HTTP_PROXY_NONPROXYHOSTS="127.0.0.1|10.1.1.1"
run configure_proxy
expected=" genproxy true http 10.10.10.20 8080 beleza_pura impossible2guess 127.0.0.1|10.1.1.1 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -142,7 +142,7 @@ function _generate_random_id() {
HTTP_PROXY_NONPROXYHOSTS="127.0.0.1|10.1.1.1"
run configure_proxy
expected=" genproxy true http 10.10.10.20 80 127.0.0.1|10.1.1.1 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -157,7 +157,7 @@ function _generate_random_id() {
HTTP_PROXY_NONPROXYHOSTS="127.0.0.1|10.1.1.1"
run configure_proxy
expected=" genproxy true https https://10.10.10.20 8443 beleza_pura impossible2guess 127.0.0.1|10.1.1.1 "
- result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${HOME}/.m2/settings.xml)
+ result=$(xmllint --xpath "//*[local-name()='proxies']//*[local-name()='proxy']" ${KOGITO_HOME}/.m2/settings.xml)
echo "expected=${expected}"
echo "result=${result}"
[ "${expected}" = "${result}" ]
@@ -235,7 +235,7 @@ function _generate_random_id() {
test
"
- repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository'])[last()]" ${HOME}/.m2/settings.xml)
+ repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "repository_expected=${repository_expected}"
echo "repository_result =${repository_result}"
[ "${repository_expected}" = "${repository_result}" ]
@@ -256,7 +256,7 @@ function _generate_random_id() {
test
"
- plugin_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository'])[last()]" ${HOME}/.m2/settings.xml)
+ plugin_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "plugin_repository_expected=${plugin_repository_expected}"
echo "plugin_repository_result =${plugin_repository_result}"
[ "${plugin_repository_expected}" = "${plugin_repository_result}" ]
@@ -269,7 +269,7 @@ function _generate_random_id() {
run add_maven_repo
repository_url_expected="http://my.cool.mvn.repo.severinolabs.com/group/public "
- repository_url_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository']//*[local-name()='url'])[last()]" ${HOME}/.m2/settings.xml)
+ repository_url_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository']//*[local-name()='url'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "repository_url_expected=${repository_url_expected}"
echo "repository_url_result =${repository_url_result}"
[ "${repository_url_expected}" = "${repository_url_result}" ]
@@ -279,7 +279,7 @@ function _generate_random_id() {
always
warn
"
- repository_releases_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository']//*[local-name()='releases'])[last()]" ${HOME}/.m2/settings.xml)
+ repository_releases_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository']//*[local-name()='releases'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "repository_releases_expected=${repository_releases_expected}"
echo "repository_releases_result =${repository_releases_result}"
[ "${repository_releases_expected}" = "${repository_releases_result}" ]
@@ -289,14 +289,14 @@ function _generate_random_id() {
always
warn
"
- repository_snapshots_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository']//*[local-name()='snapshots'])[last()]" ${HOME}/.m2/settings.xml)
+ repository_snapshots_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository']//*[local-name()='snapshots'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "repository_snapshots_expected=${repository_snapshots_expected}"
echo "repository_snapshots_result =${repository_snapshots_result}"
[ "${repository_snapshots_expected}" = "${repository_snapshots_result}" ]
plugin_repository_url_expected="http://my.cool.mvn.repo.severinolabs.com/group/public "
- plugin_repository_url_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository']//*[local-name()='url'])[last()]" ${HOME}/.m2/settings.xml)
+ plugin_repository_url_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository']//*[local-name()='url'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "plugin_repository_url_expected=${plugin_repository_url_expected}"
echo "plugin_repository_url_result =${plugin_repository_url_result}"
[ "${plugin_repository_url_expected}" = "${plugin_repository_url_result}" ]
@@ -306,7 +306,7 @@ function _generate_random_id() {
always
warn
"
- plugin_repository_releases_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository']//*[local-name()='releases'])[last()]" ${HOME}/.m2/settings.xml)
+ plugin_repository_releases_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository']//*[local-name()='releases'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "plugin_repository_releases_expected=${plugin_repository_releases_expected}"
echo "plugin_repository_releases_result =${plugin_repository_releases_result}"
[ "${plugin_repository_releases_expected}" = "${plugin_repository_releases_result}" ]
@@ -316,7 +316,7 @@ function _generate_random_id() {
always
warn
"
- plugin_repository_snapshots_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository']//*[local-name()='snapshots'])[last()]" ${HOME}/.m2/settings.xml)
+ plugin_repository_snapshots_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository']//*[local-name()='snapshots'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "plugin_repository_snapshots_expected=${plugin_repository_snapshots_expected}"
echo "plugin_repository_snapshots_result =${plugin_repository_snapshots_result}"
[ "${plugin_repository_snapshots_expected}" = "${plugin_repository_snapshots_result}" ]
@@ -363,7 +363,7 @@ function _generate_random_id() {
test
"
- central_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository'])[last()-1]" ${HOME}/.m2/settings.xml)
+ central_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository'])[last()-1]" ${KOGITO_HOME}/.m2/settings.xml)
echo "central_repository_expected=${central_repository_expected}"
echo "central_repository_result =${central_repository_result}"
[ "${central_repository_expected}" = "${central_repository_result}" ]
@@ -384,7 +384,7 @@ function _generate_random_id() {
another-test
"
- company_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository'])[last()]" ${HOME}/.m2/settings.xml)
+ company_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='repositories']//*[local-name()='repository'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "company_repository_expected=${company_repository_expected}"
echo "company_repository_result =${company_repository_result}"
[ "${company_repository_expected}" = "${company_repository_result}" ]
@@ -406,7 +406,7 @@ function _generate_random_id() {
test
"
- central_plugin_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository'])[last()-1]" ${HOME}/.m2/settings.xml)
+ central_plugin_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository'])[last()-1]" ${KOGITO_HOME}/.m2/settings.xml)
echo "central_plugin_repository_expected=${central_plugin_repository_expected}"
echo "central_plugin_repository_result =${central_plugin_repository_result}"
[ "${central_plugin_repository_expected}" = "${central_plugin_repository_result}" ]
@@ -427,7 +427,7 @@ function _generate_random_id() {
another-test
"
- company_plugin_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository'])[last()]" ${HOME}/.m2/settings.xml)
+ company_plugin_repository_result=$(xmllint --xpath "(//*[local-name()='profiles']//*[local-name()='profile']//*[local-name()='pluginRepositories']//*[local-name()='pluginRepository'])[last()]" ${KOGITO_HOME}/.m2/settings.xml)
echo "company_plugin_repository_expected=${company_plugin_repository_expected}"
echo "company_plugin_repository_result =${company_plugin_repository_result}"
[ "${company_plugin_repository_expected}" = "${company_plugin_repository_result}" ]
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml
index fb5dc14fc35..b710330fb63 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/kogito-project-versions/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.kogito.project.versions
-version: "0.0.0"
+version: "main"
description: "Kogito Project versions information"
envs:
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-system-user/add-user b/packages/sonataflow-image-common/resources/modules/kogito-system-user/add-user
index cd5c209fc8b..b6a932f1319 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-system-user/add-user
+++ b/packages/sonataflow-image-common/resources/modules/kogito-system-user/add-user
@@ -17,8 +17,20 @@
# specific language governing permissions and limitations
# under the License.
#
-groupadd -r kogito -g 1001 && useradd -u 1001 -r -g root -G "${USER}" -m -d "${KOGITO_HOME}" -s /sbin/nologin -c "Kogito user" ${USER}
+# Check if group 1001 exists, if not, create it
+if ! getent group kogito >/dev/null; then
+ groupadd -r kogito -g ${USER_ID}
+fi
-mkdir "${KOGITO_HOME}"/bin
+# Check if user 1001 exists, if not, reuse it for kogito
+if ! id "${USER_ID}" >/dev/null 2>&1; then
+ useradd -u "${USER_ID}" -r -g kogito -G root -m -d "${KOGITO_HOME}" -s /sbin/nologin -c "Kogito user" ${USER}
+else
+ echo "User with UID ${USER_ID} already exists, reusing it."
+ # Change home directory and group for the existing user
+ usermod -d "${KOGITO_HOME}" -g kogito ${USER}
+fi
+
+mkdir -p "${KOGITO_HOME}"/bin
chmod ug+rwX "${KOGITO_HOME}"
diff --git a/packages/sonataflow-image-common/resources/modules/kogito-system-user/module.yaml b/packages/sonataflow-image-common/resources/modules/kogito-system-user/module.yaml
index 95e925d7cb8..2ddbe3f6948 100644
--- a/packages/sonataflow-image-common/resources/modules/kogito-system-user/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/kogito-system-user/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.kogito.system.user
-version: "0.0.0"
+version: "main"
execute:
- script: add-user
@@ -31,3 +31,5 @@ envs:
value: "/home/kogito"
- name: "USER"
value: "kogito"
+ - name: "USER_ID"
+ value: 1001
diff --git a/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/configure.sh b/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/configure.sh
index 50897c656b1..fb47d792dc7 100644
--- a/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/configure.sh
+++ b/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/configure.sh
@@ -33,11 +33,11 @@ chmod -R ug+rwX "${KOGITO_HOME}"
cd "${KOGITO_HOME}"
-# Create app
-"${LAUNCH_DIR}"/create-app.sh
+# Create app (settings.xml path is replaced only for these commands and automatically restored when they end)
+env MAVEN_SETTINGS_PATH=${MAVEN_CONTAINER_BUILD_SETTINGS_PATH} "${LAUNCH_DIR}"/create-app.sh
-"${BUILD_DIR}"/cleanup_project.sh
-"${BUILD_DIR}"/zip_files.sh
+env MAVEN_SETTINGS_PATH=${MAVEN_CONTAINER_BUILD_SETTINGS_PATH} "${BUILD_DIR}"/cleanup_project.sh
+env MAVEN_SETTINGS_PATH=${MAVEN_CONTAINER_BUILD_SETTINGS_PATH} "${BUILD_DIR}"/zip_files.sh
chown -R 1001:0 "${KOGITO_HOME}"
chmod -R ug+rwX "${KOGITO_HOME}"
\ No newline at end of file
diff --git a/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/module.yaml b/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/module.yaml
index 0325c599ae4..c9be6d46703 100644
--- a/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/sonataflow/common/build/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.common.build
-version: "0.0.0"
+version: "main"
description: "Kogito Serverless Workflow image build process"
execute:
diff --git a/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/module.yaml b/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/module.yaml
index 38c498eac45..0278c6fc05b 100644
--- a/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/module.yaml
+++ b/packages/sonataflow-image-common/resources/modules/sonataflow/common/scripts/module.yaml
@@ -18,7 +18,7 @@
#
schema_version: 1
name: org.kie.sonataflow.common.scripts
-version: "0.0.0"
+version: "main"
description: "Kogito Serverless Workflow image common scripts"
envs:
diff --git a/packages/sonataflow-image-common/resources/scripts/README.md b/packages/sonataflow-image-common/resources/scripts/README.md
index a4989b53d4e..34a4fcd0c85 100644
--- a/packages/sonataflow-image-common/resources/scripts/README.md
+++ b/packages/sonataflow-image-common/resources/scripts/README.md
@@ -62,3 +62,11 @@ Usage:
Args:
- `--quarkus-version`: Sets the Quarkus version
- `--kogito-version`: Sets the Kogito version
+
+## Build Kogito Apps Components
+
+The [build-kogito-apps-components.sh](build-kogito-apps-components.sh) script pulls and build the target Kogito Apps application, e.g., Data Index. Required to build Kogito Services images in any flavour.
+
+## Setup Maven
+
+The [setup-maven.sh](setup-maven.sh) script configures the internal image Maven repository such as adding new repositories, setup other profiles and so on.
diff --git a/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh b/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh
new file mode 100755
index 00000000000..6a96ecb4f8d
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/scripts/build-kogito-apps-components.sh
@@ -0,0 +1,124 @@
+#!/usr/bin/env 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.
+#
+
+# Parameters:
+# 1 - image name - can't be empty.
+# 2 - git target branch - defaults to main
+# 3 - git target uri - defaults to https://github.com/apache/incubator-kie-kogito-apps.git
+
+# fast fail
+set -e
+set -o pipefail
+
+KOGITO_APPS_REPO_NAME="incubator-kie-kogito-apps"
+KOGITO_APPS_FOLDER_NAME="kogito-apps"
+
+# Read entries before sourcing
+imageName="${1}"
+gitBranch="${2}"
+if [ -z "${gitBranch}" ]; then
+ echo "The gitBranch argument is required"
+ exit 1
+fi
+gitBranch=${gitBranch//-[sS][nN][aA][pP][sS][hH][oO][tT]/}
+gitUri="${3:-https://github.com/apache/${KOGITO_APPS_REPO_NAME}.git}"
+contextDir=""
+shift $#
+
+script_dir_path=$(cd `dirname "${BASH_SOURCE[0]}"`; pwd -P)
+
+export NODE_OPTIONS="${NODE_OPTIONS} --max_old_space_size=4096"
+APPS_MAVEN_OPTIONS="-Dquarkus.package.type=fast-jar -Dquarkus.build.image=false"
+# used for all-in-one image
+extended_context=""
+
+# Fix taken from https://github.com/apache/incubator-kie-kogito-apps/pull/1762
+if [ ! -z "${CYPRESS_BINARY_URL}" ]; then
+ export CYPRESS_INSTALL_BINARY="${CYPRESS_BINARY_URL}/cypress-9.7.0.zip"
+ echo "Setting 'CYPRESS_INSTALL_BINARY' variable to ${CYPRESS_INSTALL_BINARY}"
+fi
+
+case ${imageName} in
+ "incubator-kie-kogito-data-index-ephemeral")
+ contextDir="data-index/data-index-service/data-index-service-inmemory"
+ ;;
+ "incubator-kie-kogito-data-index-postgresql")
+ contextDir="data-index/data-index-service/data-index-service-postgresql"
+ ;;
+ "incubator-kie-kogito-jobs-service-ephemeral")
+ contextDir="jobs-service/jobs-service-inmemory"
+ ;;
+ "incubator-kie-kogito-jobs-service-postgresql")
+ contextDir="jobs-service/jobs-service-postgresql"
+ ;;
+ "incubator-kie-kogito-jobs-service-allinone")
+ extended_context="-all-in-one"
+ contextDir="jobs-service/jobs-service-inmemory"
+ contextDir="${contextDir} jobs-service/jobs-service-postgresql"
+ ;;
+ "incubator-kie-kogito-jit-runner")
+ contextDir="jitexecutor/jitexecutor-runner"
+ ;;
+ *)
+ echo "${imageName} is not a supporting service image or can't be built from sources, exiting..."
+ exit 0
+ ;;
+esac
+
+# FIXME: Instead of pulling the repo we might pull from Apache Maven repository instead (either staging on release, or snapshot on daily basis)
+# FIXME: The kogito-apps must publish the Quarkus App we build here in order for this to work.
+
+for ctx in ${contextDir}; do
+ target_tmp_dir="/tmp/build/$(basename ${ctx})${extended_context}"
+ build_target_dir="/tmp/$(basename ${ctx})${extended_context}"
+ mvn_local_repo="/tmp/temp_maven/$(basename ${ctx})${extended_context}"
+
+ rm -rf ${target_tmp_dir} && mkdir -p ${target_tmp_dir}
+ rm -rf ${build_target_dir} && mkdir -p ${build_target_dir}
+ mkdir -p ${mvn_local_repo}
+
+ . ${script_dir_path}/setup-maven.sh "${build_target_dir}"/settings.xml
+ MAVEN_OPTIONS="${MAVEN_OPTIONS} ${APPS_MAVEN_OPTIONS}"
+
+ if stat ${HOME}/.m2/repository/ &> /dev/null; then
+ echo "Copy current maven repo to maven context local repo ${mvn_local_repo}"
+ cp -R ${HOME}/.m2/repository/* "${mvn_local_repo}"
+ fi
+
+ cd ${build_target_dir}
+ echo "Using branch/tag ${gitBranch}, checking out. Temporary build dir is ${build_target_dir} and target dist is ${target_tmp_dir}"
+
+ KOGITO_APPS_DIR=${build_target_dir}/${KOGITO_APPS_FOLDER_NAME}
+ if [ ! -d "${KOGITO_APPS_DIR}" ]; then
+ git_command="git clone --single-branch --branch ${gitBranch} --depth 1 ${gitUri} ${KOGITO_APPS_DIR}"
+ echo "cloning ${KOGITO_APPS_REPO_NAME} with the following git command: ${git_command}"
+ eval ${git_command}
+ fi
+ cd ${KOGITO_APPS_DIR} && echo "working dir `pwd`"
+ echo "Got MAVEN_OPTIONS = ${MAVEN_OPTIONS}"
+ mvn_command="mvn -am -pl ${ctx} package ${MAVEN_OPTIONS} -Dmaven.repo.local=${mvn_local_repo} -Dquarkus.container-image.build=false"
+ echo "Building component(s) ${contextDir} with the following maven command [${mvn_command}]"
+ export YARN_CACHE_FOLDER=/tmp/cache/yarn/${ctx} # Fix for building yarn apps in parallel
+ export CYPRESS_CACHE_FOLDER=/tmp/cache/cypress/${ctx} # https://docs.cypress.io/guides/getting-started/installing-cypress#Advanced
+ eval ${mvn_command}
+ cd ${ctx}/target
+ cp -vr quarkus-app ${target_tmp_dir}/
+ cd -
+done
diff --git a/packages/sonataflow-image-common/resources/scripts/install_bats.sh b/packages/sonataflow-image-common/resources/scripts/install_bats.sh
new file mode 100755
index 00000000000..652a11f757a
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/scripts/install_bats.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env 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.
+#
+
+
+set -e
+
+if [[ $(command -v ./bats-home/bin/bats) ]]; then #skip if bats already installed else will install the bats
+ echo "---> bats already available running tests"
+else
+ git clone https://github.com/bats-core/bats-core.git
+ ./bats-core/install.sh bats-home
+ rm -rf bats-core
+fi
diff --git a/packages/sonataflow-image-common/resources/scripts/run-bats.sh b/packages/sonataflow-image-common/resources/scripts/run-bats.sh
index af64c14d850..c44be7ae477 100755
--- a/packages/sonataflow-image-common/resources/scripts/run-bats.sh
+++ b/packages/sonataflow-image-common/resources/scripts/run-bats.sh
@@ -23,15 +23,7 @@ set -e
script_dir_path="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-if [[ $(command -v ./bats/bin/bats) ]]; then #skip if bats already installed else will install the bats
- echo "---> bats already available running tests"
-else
- git clone https://github.com/bats-core/bats-core.git
- ./bats-core/install.sh bats
- rm -rf bats-core
-fi
-
-tests_output_path="${script_dir_path}/../../dist-tests-e2e"
+tests_output_path="${script_dir_path}/../../dist-tests"
echo "----> running bats"
-./bats/bin/bats modules/sonataflow/common/scripts/tests/bats --formatter junit --report-formatter junit --output "${tests_output_path}"
+./../bats-home/bin/bats -r modules --formatter junit --report-formatter junit --output "${tests_output_path}"
diff --git a/packages/sonataflow-image-common/resources/scripts/setup-maven.sh b/packages/sonataflow-image-common/resources/scripts/setup-maven.sh
new file mode 100755
index 00000000000..78be682dfe7
--- /dev/null
+++ b/packages/sonataflow-image-common/resources/scripts/setup-maven.sh
@@ -0,0 +1,77 @@
+#!/usr/bin/env 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.
+#
+
+# Holds common maven configuration for CI;
+# Usage: . setup-maven.sh
+
+MVN_MODULE="$(dirname "${BASH_SOURCE[0]}")/../modules/kogito-maven/common"
+export MAVEN_OPTIONS="${BUILD_MVN_OPTS} -DskipTests"
+# Do not remove below, this can be updated by the python scripts
+MAVEN_IGNORE_SELF_SIGNED_CERTIFICATE=true
+
+maven_settings_path=$1
+if [ -z "${maven_settings_path}" ]; then
+ maven_settings_path="${HOME}"/.m2/settings.xml
+ echo "Maven settings path argument is empty, using ${maven_settings_path}"
+fi
+
+LOGGING_MODULE="$(dirname "${BASH_SOURCE[0]}")/../modules/kogito-logging/"
+source "${LOGGING_MODULE}"/added/logging.sh
+
+echo "Updating settings file ${maven_settings_path}"
+
+# setup maven env
+# Do not remove below, this can be updated by the python scripts
+export DEFAULT_MAVEN_REPO_URL="https://repository.apache.org/content/groups/public/"
+# export MAVEN_REPO_URL=
+cp "${MVN_MODULE}"/maven/settings.xml "${maven_settings_path}"
+export MAVEN_SETTINGS_PATH="${maven_settings_path}"
+source "${MVN_MODULE}"/added/configure-maven.sh
+configure
+
+export MAVEN_OPTIONS="${MAVEN_OPTIONS} -s ${maven_settings_path}"
+
+# Add NPM registry if needed
+if [ ! -z "${NPM_REGISTRY_URL}" ]; then
+ echo "enabling npm repository: ${NPM_REGISTRY_URL}"
+ npm_profile="\
+\
+internal-npm-registry \
+\
+${NPM_REGISTRY_URL} \
+http://download.devel.redhat.com/rcm-guest/staging/rhba/dist/yarn/ \
+http://download.devel.redhat.com/rcm-guest/staging/rhba/dist/node/ \
+http://download.devel.redhat.com/rcm-guest/staging/rhba/dist/npm/ \
+http://download.devel.redhat.com/rcm-guest/staging/rhba/dist/pnpm/ \
+ \
+ \
+"
+ sed -i.bak -E "s|()|\1\n${npm_profile}|" "${MAVEN_SETTINGS_PATH}"
+ sed -i.bak -E "s|()|\1\ninternal-npm-registry |" "${MAVEN_SETTINGS_PATH}"
+
+ rm -rf "${MAVEN_SETTINGS_PATH}/*.bak"
+fi
+
+cat "${maven_settings_path}"
+
+if [ "${MAVEN_IGNORE_SELF_SIGNED_CERTIFICATE}" = "true" ]; then
+ export MAVEN_OPTIONS="${MAVEN_OPTIONS} -Denforcer.skip"
+fi
+
diff --git a/packages/sonataflow-management-console-image/Containerfile b/packages/sonataflow-management-console-image/Containerfile
deleted file mode 100644
index 1d0e875c37b..00000000000
--- a/packages/sonataflow-management-console-image/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_MANAGEMENT_CONSOLE_PORT=8080
-
-ENV SONATAFLOW_MANAGEMENT_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_MANAGEMENT_CONSOLE_PORT}/g" /etc/httpd/conf/httpd.conf \
- && sed -i "s/#ServerName www.example.com:80/ServerName 127.0.0.1:${KOGITO_MANAGEMENT_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 /management-console \
- && mv -t /management-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 /management-console \
- && chmod -R g=u /var/log/httpd /var/run/httpd /var/www/html /management-console \
- && chmod +x /management-console/entrypoint.sh /management-console/image-env-to-json-standalone
-
-COPY dist-dev/sonataflow-management-console-webapp /management-console/app
-
-RUN if [ -f /management-console/app/env.json ]; then chmod a+w /management-console/app/env.json; fi
-
-EXPOSE ${KOGITO_MANAGEMENT_CONSOLE_PORT}
-
-USER 1000
-
-ENTRYPOINT [ "/management-console/entrypoint.sh" ]
diff --git a/packages/sonataflow-management-console-image/env/index.js b/packages/sonataflow-management-console-image/env/index.js
index f6ac7101201..50f80317fdc 100644
--- a/packages/sonataflow-management-console-image/env/index.js
+++ b/packages/sonataflow-management-console-image/env/index.js
@@ -17,7 +17,7 @@
* under the License.
*/
-const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/build-env");
+const { varsWithName, composeEnv } = require("@kie-tools-scripts/build-env");
const rootEnv = require("@kie-tools/root-env/env");
diff --git a/packages/sonataflow-management-console-image/package.json b/packages/sonataflow-management-console-image/package.json
index 7d2f34500b9..65bbfe88e66 100644
--- a/packages/sonataflow-management-console-image/package.json
+++ b/packages/sonataflow-management-console-image/package.json
@@ -13,8 +13,8 @@
"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\"",
+ "build:dev": "pnpm cleanup && pnpm env-json:schema:generate && pnpm copy:assets && run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:cekit:build\"",
+ "build:prod": "pnpm cleanup && pnpm env-json:schema:generate && pnpm copy:assets && run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm image:cekit: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",
@@ -24,14 +24,20 @@
"copy:webapp-assets:linux:darwin": "cp -R ./node_modules/@kie-tools/sonataflow-management-console-webapp/dist/ ./dist-dev/sonataflow-management-console-webapp",
"copy:webapp-assets:win32": "pnpm powershell \"Copy-Item -R ./node_modules/@kie-tools/sonataflow-management-console-webapp/dist/ ./dist-dev/sonataflow-management-console-webapp\"",
"env-json:schema:generate": "ts-json-schema-generator --tsconfig ./node_modules/@kie-tools/sonataflow-management-console-webapp/tsconfig.json --path ./node_modules/@kie-tools/sonataflow-management-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 sonataflowManagementConsoleImageEnv.registry)\" -a \"$(build-env sonataflowManagementConsoleImageEnv.account)\" -n \"$(build-env sonataflowManagementConsoleImageEnv.name)\" -t \"$(build-env sonataflowManagementConsoleImageEnv.buildTag)\" --build-arg SONATAFLOW_MANAGEMENT_CONSOLE_PORT=\"$(build-env sonataflowManagementConsoleImageEnv.port)\""
+ "image:cekit:build": "run-script-os",
+ "image:cekit:build:linux": "pnpm image:cekit:copy && pnpm image:cekit:setup:env make -C ./dist-dev build",
+ "image:cekit:build:win32:darwin": "echo \"Build skipped on macOS and Windows\"",
+ "image:cekit:copy": "cp -R ./node_modules/@kie-tools/sonataflow-image-common/resources/* ./dist-dev/ && cp -R resources/* ./dist-dev/",
+ "image:cekit:setup:env": ". ./node_modules/@kie-tools/python-venv/venv/bin/activate && cross-env KOGITO_IMAGE_REGISTRY=$(build-env sonataflowManagementConsoleImageEnv.registry) KOGITO_IMAGE_REGISTRY_ACCOUNT=$(build-env sonataflowManagementConsoleImageEnv.account) KOGITO_IMAGE_NAME=$(build-env sonataflowManagementConsoleImageEnv.name) KOGITO_IMAGE_TAG=$(build-env sonataflowManagementConsoleImageEnv.buildTag) QUARKUS_PLATFORM_VERSION=$(build-env quarkusPlatform.version) KOGITO_VERSION=$(build-env kogitoRuntime.version) SONATAFLOW_MANAGEMENT_CONSOLE_PORT=$(build-env sonataflowManagementConsoleImageEnv.port)"
},
"devDependencies": {
- "@kie-tools/image-builder": "workspace:*",
"@kie-tools/image-env-to-json": "workspace:*",
+ "@kie-tools/python-venv": "workspace:*",
"@kie-tools/root-env": "workspace:*",
+ "@kie-tools/sonataflow-image-common": "workspace:*",
"@kie-tools/sonataflow-management-console-image-env": "workspace:*",
"@kie-tools/sonataflow-management-console-webapp": "workspace:*",
+ "cross-env": "^7.0.3",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"ts-json-schema-generator": "^1.1.2"
diff --git a/packages/sonataflow-management-console-image/resources/incubator-kie-sonataflow-management-console-image.yaml b/packages/sonataflow-management-console-image/resources/incubator-kie-sonataflow-management-console-image.yaml
new file mode 100644
index 00000000000..01ebf37e650
--- /dev/null
+++ b/packages/sonataflow-management-console-image/resources/incubator-kie-sonataflow-management-console-image.yaml
@@ -0,0 +1,62 @@
+#
+# 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.
+#
+- name: "docker.io/apache/incubator-kie-sonataflow-devmode"
+ from: "registry.access.redhat.com/ubi9/httpd-24:1-336.1725850633"
+ version: "0.0.0"
+ description: "SonataFlow Management Console Image"
+
+ labels:
+ - name: "io.quarkus.platform.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "org.kie.kogito.version"
+ value: "### SET ME DURING BUILD PROCESS ###"
+ - name: "maintainer"
+ value: "Apache KIE "
+ - name: "io.k8s.description"
+ value: "SonataFlow Management Console Image."
+ - name: "io.k8s.display-name"
+ value: "Sonataflow Management Console"
+ - name: "io.openshift.tags"
+ value: "sonataflow,serverless,workflow"
+ - name: "io.openshift.expose-services"
+ value: "8080:http"
+
+ modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.system.user
+ - name: org.kie.kogito.logging
+ - name: org.kie.kogito.project.versions
+ - name: org.kie.sonataflow.management.console
+
+ ports:
+ - value: 8080
+
+ envs:
+ - name: SONATAFLOW_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE
+ value: PROD
+ - name: SUMMARY
+ value: "SonataFlow Management Console Image"
+
+ run:
+ workdir: "/home/kogito/management-console"
+ user: 1001
+ cmd:
+ - "/home/kogito/management-console/launch/entrypoint.sh"
diff --git a/packages/sonataflow-management-console-image/entrypoint.sh b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/added/entrypoint.sh
similarity index 80%
rename from packages/sonataflow-management-console-image/entrypoint.sh
rename to packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/added/entrypoint.sh
index 1b92377150b..20d57a5c891 100644
--- a/packages/sonataflow-management-console-image/entrypoint.sh
+++ b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/added/entrypoint.sh
@@ -17,11 +17,12 @@
# specific language governing permissions and limitations
# under the License.
#
+set -e
# 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 /management-console/app/* /var/www/html
+cp -R "${KOGITO_HOME}/management-console/app/"* "${HTTPD_DATA_PATH}/html"
-/management-console/image-env-to-json-standalone --directory /var/www/html --json-schema /management-console/EnvJson.schema.json
+"${KOGITO_HOME}/management-console/image-env-to-json-standalone" --directory "${HTTPD_DATA_PATH}/html" --json-schema "${KOGITO_HOME}/management-console/EnvJson.schema.json"
-httpd -D FOREGROUND
+run-httpd
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
new file mode 100644
index 00000000000..7797df0f736
--- /dev/null
+++ b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/configure-httpd.sh
@@ -0,0 +1,47 @@
+#!/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.
+#
+set -e
+
+SOURCES_DIR=/tmp/artifacts
+SCRIPT_DIR=$(dirname "${0}")
+MGMT_CONSOLE_HOME="${KOGITO_HOME}/management-console"
+
+# Configure the default httpd conf
+echo "Mutex posixsem" >> "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+sed -i -e "/#ServerName www.example.com:80/aHeader set Content-Security-Policy \"frame-ancestors 'self';\"" "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+sed -i -e 's/Options Indexes FollowSymLinks/Options -Indexes +FollowSymLinks/' "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+sed -i "s/Listen 80/Listen ${SONATAFLOW_MANAGEMENT_CONSOLE_PORT}/g" "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+sed -i "s/#ServerName www.example.com:80/ServerName 127.0.0.1:${SONATAFLOW_MANAGEMENT_CONSOLE_PORT}/g" "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+sed -i '$ a ServerTokens Prod' "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+sed -i '$ a ServerSignature Off' "${HTTPD_MAIN_CONF_PATH}/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]' "${HTTPD_MAIN_CONF_PATH}/httpd.conf"
+
+
+# Set the required paths
+mkdir -p "${MGMT_CONSOLE_HOME}/launch"
+
+# Copy the entrypoint and other init scripts
+cp -v "${SCRIPT_DIR}"/added/* "${MGMT_CONSOLE_HOME}"/launch
+
+# Fixing permissions
+chmod +x "${MGMT_CONSOLE_HOME}/launch/entrypoint.sh" "${MGMT_CONSOLE_HOME}/image-env-to-json-standalone"
+chown -R "${USER_ID}" "${MGMT_CONSOLE_HOME}"
+
+ if [ -f "${MGMT_CONSOLE_HOME}/app/env.json" ]; then chmod a+w "${MGMT_CONSOLE_HOME}/app/env.json"; fi
diff --git a/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/module.yaml b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/module.yaml
new file mode 100644
index 00000000000..34b627dfc6a
--- /dev/null
+++ b/packages/sonataflow-management-console-image/resources/modules/sonataflow/management-console/module.yaml
@@ -0,0 +1,41 @@
+#
+# 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.
+#
+schema_version: 1
+name: org.kie.sonataflow.management.console
+version: "0.0.0"
+description: "SonataFlow Management Console Launch Scripts and Configurations"
+
+execute:
+ - script: configure-httpd.sh
+
+envs:
+ - name: SONATAFLOW_MANAGEMENT_CONSOLE_PORT
+ value: 8080
+
+artifacts:
+ - name: sonataflow-management-console-webapp
+ path: "../../../../../sonataflow-management-console-webapp/"
+ dest: /home/kogito/management-console/app
+ target: app
+ - name: image-env-to-json-standalone
+ path: "../../../../../image-env-to-json-standalone"
+ dest: /home/kogito/management-console
+ - name: EnvJson.schema.json
+ path: "../../../../../EnvJson.schema.json"
+ dest: /home/kogito/management-console
diff --git a/packages/sonataflow-operator/env/index.js b/packages/sonataflow-operator/env/index.js
index bb7dff616d4..fdb5568d930 100644
--- a/packages/sonataflow-operator/env/index.js
+++ b/packages/sonataflow-operator/env/index.js
@@ -42,11 +42,11 @@ module.exports = composeEnv([rootEnv, sonataflowBuilderImageEnv, sonataflowDevMo
description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0",
},
SONATAFLOW_OPERATOR__sonataflowBuilderImage: {
- default: `${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.registry}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.account}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.name}:${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.tag}`,
+ default: `${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.registry}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.account}/${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.name}:${sonataflowBuilderImageEnv.env.sonataflowBuilderImage.buildTag}`,
description: "Sonataflow Builder image",
},
SONATAFLOW_OPERATOR__sonataflowDevModeImage: {
- default: `${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.registry}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.account}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.name}:${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.tag}`,
+ default: `${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.registry}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.account}/${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.name}:${sonataflowDevModeImageEnv.env.sonataflowDevModeImage.buildTag}`,
description: "Sonataflow DevMode image",
},
}),
@@ -56,7 +56,7 @@ module.exports = composeEnv([rootEnv, sonataflowBuilderImageEnv, sonataflowDevMo
registry: getOrDefault(this.vars.SONATAFLOW_OPERATOR__registry),
account: getOrDefault(this.vars.SONATAFLOW_OPERATOR__account),
name: getOrDefault(this.vars.SONATAFLOW_OPERATOR__name),
- tag: getOrDefault(this.vars.SONATAFLOW_OPERATOR__buildTag),
+ buildTag: getOrDefault(this.vars.SONATAFLOW_OPERATOR__buildTag),
version: require("../package.json").version,
sonataflowBuilderImage: getOrDefault(this.vars.SONATAFLOW_OPERATOR__sonataflowBuilderImage),
sonataflowDevModeImage: getOrDefault(this.vars.SONATAFLOW_OPERATOR__sonataflowDevModeImage),
diff --git a/packages/sonataflow-operator/hack/bump-version.sh b/packages/sonataflow-operator/hack/bump-version.sh
index e2b131e7b35..1db411598a8 100755
--- a/packages/sonataflow-operator/hack/bump-version.sh
+++ b/packages/sonataflow-operator/hack/bump-version.sh
@@ -24,7 +24,7 @@ script_dir_path=$(dirname "${BASH_SOURCE[0]}")
source "${script_dir_path}"/env.sh
imageName=$(pnpm build-env sontaflowOperator.registry)/$(pnpm build-env sontaflowOperator.account)/$(pnpm build-env sontaflowOperator.name)
-imageTag=$(pnpm build-env sontaflowOperator.tag)
+imageTag=$(pnpm build-env sontaflowOperator.buildTag)
version=$(pnpm build-env sontaflowOperator.version)
targetSonataflowBuilderImage=$(pnpm build-env sontaflowOperator.sonataflowBuilderImage)
@@ -60,6 +60,7 @@ node -p "require('replace-in-file').sync({ from: /sonataflow-operator-system\/so
node -p "require('replace-in-file').sync({ from: /\bOperatorVersion = .*/g, to: 'OperatorVersion = \"${version}\"', files: ['version/version.go'] });"
node -p "require('replace-in-file').sync({ from: /\btagVersion = .*/g, to: 'tagVersion = \"${imageTag}\"', files: ['version/version.go'] });"
+node -p "require('replace-in-file').sync({ from: /\bkogitoImagesTagVersion = .*/g, to: 'kogitoImagesTagVersion = \"${imageTag}\"', files: ['version/version.go'] });"
node -p "require('replace-in-file').sync({ from: /\bcontainerImage:.*\b/g, to: 'containerImage: ${targetSonataflowOperatorImage}', files: ['$(getCsvFile)'] });"
make generate-all
diff --git a/packages/sonataflow-operator/images/requirements.txt b/packages/sonataflow-operator/images/requirements.txt
index 87a0ef5117c..c0ed2e16a76 100644
--- a/packages/sonataflow-operator/images/requirements.txt
+++ b/packages/sonataflow-operator/images/requirements.txt
@@ -1,4 +1,4 @@
-# Requirements for cekit 4.11.0 build
+# Requirements for cekit 4.12.0 build
# see: https://pip.pypa.io/en/stable/reference/requirements-file-format/
docker-squash
odcs
diff --git a/packages/sonataflow-operator/package.json b/packages/sonataflow-operator/package.json
index 25cdd5e4a5d..846d641b45a 100644
--- a/packages/sonataflow-operator/package.json
+++ b/packages/sonataflow-operator/package.json
@@ -40,6 +40,10 @@
"@kie-tools/root-env": "workspace:*",
"@kie-tools/sonataflow-builder-image": "workspace:*",
"@kie-tools/sonataflow-devmode-image": "workspace:*",
+ "@kie/kogito-data-index-ephemeral-image": "workspace:*",
+ "@kie/kogito-data-index-postgresql-image": "workspace:*",
+ "@kie/kogito-jobs-service-ephemeral-image": "workspace:*",
+ "@kie/kogito-jobs-service-postgresql-image": "workspace:*",
"replace-in-file": "^7.1.0",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6"
diff --git a/packages/sonataflow-operator/test/testdata/platform/noservices/preview/ephemeral/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/platform/noservices/preview/ephemeral/02-sonataflow_platform.yaml
index a93274ce361..7d7a0c7834d 100644
--- a/packages/sonataflow-operator/test/testdata/platform/noservices/preview/ephemeral/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/platform/noservices/preview/ephemeral/02-sonataflow_platform.yaml
@@ -26,7 +26,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSION
- value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240905-SNAPSHOT
+ value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240912-SNAPSHOT
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/platform/services/dev/ephemeral/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/platform/services/dev/ephemeral/02-sonataflow_platform.yaml
index 75d42d37b3b..b191414226d 100644
--- a/packages/sonataflow-operator/test/testdata/platform/services/dev/ephemeral/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/platform/services/dev/ephemeral/02-sonataflow_platform.yaml
@@ -26,7 +26,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSION
- value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240905-SNAPSHOT
+ value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240912-SNAPSHOT
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/platform/services/dev/postgreSQL/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/platform/services/dev/postgreSQL/02-sonataflow_platform.yaml
index a313f11983d..ef4f112e9e4 100644
--- a/packages/sonataflow-operator/test/testdata/platform/services/dev/postgreSQL/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/platform/services/dev/postgreSQL/02-sonataflow_platform.yaml
@@ -26,7 +26,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSIONS
- value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240905-SNAPSHOT
+ value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240912-SNAPSHOT
services:
dataIndex:
enabled: false
diff --git a/packages/sonataflow-operator/test/testdata/platform/services/preview/cluster-wide-ephemeral/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/platform/services/preview/cluster-wide-ephemeral/02-sonataflow_platform.yaml
index 35da3fe7fec..7e915e2cd76 100644
--- a/packages/sonataflow-operator/test/testdata/platform/services/preview/cluster-wide-ephemeral/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/platform/services/preview/cluster-wide-ephemeral/02-sonataflow_platform.yaml
@@ -26,7 +26,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSION
- value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240905-SNAPSHOT
+ value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240912-SNAPSHOT
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-data-index/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-data-index/02-sonataflow_platform.yaml
index 640fc4baa49..7c1d15d02de 100644
--- a/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-data-index/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-data-index/02-sonataflow_platform.yaml
@@ -26,7 +26,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSION
- value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240905-SNAPSHOT
+ value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240912-SNAPSHOT
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-job-service/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-job-service/02-sonataflow_platform.yaml
index dda7edbcb9c..735b2c4150d 100644
--- a/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-job-service/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/platform/services/preview/ephemeral-job-service/02-sonataflow_platform.yaml
@@ -25,7 +25,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSION
- value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240905-SNAPSHOT
+ value: org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:999-20240912-SNAPSHOT
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/workflow/persistence/by_service/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/workflow/persistence/by_service/02-sonataflow_platform.yaml
index e57290cff67..73f61014068 100644
--- a/packages/sonataflow-operator/test/testdata/workflow/persistence/by_service/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/workflow/persistence/by_service/02-sonataflow_platform.yaml
@@ -26,7 +26,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSIONS
- value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240905-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
+ value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240912-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_overwritten_by_service/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_overwritten_by_service/02-sonataflow_platform.yaml
index e78143b2978..49d9a7ae895 100644
--- a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_overwritten_by_service/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_overwritten_by_service/02-sonataflow_platform.yaml
@@ -36,7 +36,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSIONS
- value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240905-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
+ value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240912-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_di_and_js_services/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_di_and_js_services/02-sonataflow_platform.yaml
index e70039563cd..4003263627c 100644
--- a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_di_and_js_services/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_di_and_js_services/02-sonataflow_platform.yaml
@@ -36,7 +36,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSIONS
- value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240905-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
+ value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240912-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_no_persistence_required/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_no_persistence_required/02-sonataflow_platform.yaml
index 78bbc804ddf..db0fb8d8284 100644
--- a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_no_persistence_required/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_with_no_persistence_required/02-sonataflow_platform.yaml
@@ -36,7 +36,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSIONS
- value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240905-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
+ value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240912-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_without_di_and_js_services/02-sonataflow_platform.yaml b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_without_di_and_js_services/02-sonataflow_platform.yaml
index 78bbc804ddf..db0fb8d8284 100644
--- a/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_without_di_and_js_services/02-sonataflow_platform.yaml
+++ b/packages/sonataflow-operator/test/testdata/workflow/persistence/from_platform_without_di_and_js_services/02-sonataflow_platform.yaml
@@ -36,7 +36,7 @@ spec:
template:
buildArgs:
- name: QUARKUS_EXTENSIONS
- value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240905-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
+ value: org.kie:kie-addons-quarkus-persistence-jdbc:999-20240912-SNAPSHOT,io.quarkus:quarkus-jdbc-postgresql:3.8.6,io.quarkus:quarkus-agroal:3.8.6
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
diff --git a/packages/sonataflow-operator/version/version.go b/packages/sonataflow-operator/version/version.go
index e028d4226d7..5cfd5fae728 100644
--- a/packages/sonataflow-operator/version/version.go
+++ b/packages/sonataflow-operator/version/version.go
@@ -32,7 +32,7 @@ const (
// For example, docker.io/apache/incubator-kie-sonataflow-operator:main -> 10.0
tagVersion = "main"
// Kogito images tag version. Used for data-index and jobs-service images.
- kogitoImagesTagVersion = "main-20240905"
+ kogitoImagesTagVersion = "main"
// OpenJDK image tag version
openJDKImageTagVersion = "1.20"
)
diff --git a/packages/stunner-editors/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java b/packages/stunner-editors/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java
index 2d9bae62c2c..4354953178b 100644
--- a/packages/stunner-editors/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java
+++ b/packages/stunner-editors/uberfire-api/src/main/java/org/uberfire/mvp/PlaceRequest.java
@@ -70,7 +70,7 @@ default Path getPath() {
}
/**
- * Invokes {@link #toString()} but exported to JavaScript so it can be invoked from different scripts.
+ * Invokes toString() but exported to JavaScript so it can be invoked from different scripts.
*/
default String asString() {
return this.toString();
diff --git a/packages/text-editor/package.json b/packages/text-editor/package.json
index 64179e7f4f6..b7f0b778304 100644
--- a/packages/text-editor/package.json
+++ b/packages/text-editor/package.json
@@ -31,9 +31,7 @@
"@kie-tools-core/workspace": "workspace:*",
"@patternfly/react-core": "^4.276.6",
"monaco-editor": "^0.39.0",
- "monaco-yaml": "^4.0.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2"
+ "monaco-yaml": "^4.0.4"
},
"devDependencies": {
"@babel/core": "^7.16.0",
@@ -46,5 +44,9 @@
"rimraf": "^3.0.2",
"start-server-and-test": "^2.0.3",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/uniforms-bootstrap4-codegen/package.json b/packages/uniforms-bootstrap4-codegen/package.json
index dd0779e103c..c01019caf36 100644
--- a/packages/uniforms-bootstrap4-codegen/package.json
+++ b/packages/uniforms-bootstrap4-codegen/package.json
@@ -24,8 +24,6 @@
"dependencies": {
"lodash": "^4.17.21",
"prettier": "^2.8.8",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"underscore": "^1.13.1",
"uniforms": "^3.10.2",
"uniforms-bridge-simple-schema-2": "^3.10.2"
@@ -63,5 +61,9 @@
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0",
"webpack-node-externals": "^3.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/uniforms-patternfly-codegen/package.json b/packages/uniforms-patternfly-codegen/package.json
index 1a09f8d7b74..bf18199749a 100644
--- a/packages/uniforms-patternfly-codegen/package.json
+++ b/packages/uniforms-patternfly-codegen/package.json
@@ -24,8 +24,6 @@
"dependencies": {
"lodash": "^4.17.21",
"prettier": "^2.8.8",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"uniforms": "^3.10.2",
"uniforms-bridge-simple-schema-2": "^3.10.2"
},
@@ -62,5 +60,9 @@
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0",
"webpack-node-externals": "^3.0.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/uniforms-patternfly/package.json b/packages/uniforms-patternfly/package.json
index c31cde109b0..61585f16eb7 100644
--- a/packages/uniforms-patternfly/package.json
+++ b/packages/uniforms-patternfly/package.json
@@ -31,8 +31,6 @@
"@types/invariant": "^2.2.35",
"invariant": "^2.2.4",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"uniforms": "^3.10.2"
},
"devDependencies": {
@@ -65,5 +63,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/uniforms-patternfly/src/DateField.tsx b/packages/uniforms-patternfly/src/DateField.tsx
index 709a6989eb1..7de8ffdabdd 100644
--- a/packages/uniforms-patternfly/src/DateField.tsx
+++ b/packages/uniforms-patternfly/src/DateField.tsx
@@ -70,12 +70,12 @@ const dateParse = (value: string, onChange: DateFieldProps["onChange"]) => {
function DateField({ onChange, ...props }: DateFieldProps) {
const isInvalid = useMemo(() => {
- if (!props.value) {
+ if (props.value === undefined) {
return false;
}
if (props.min) {
- const minDate = new Date(props.min);
+ const minDate = new DateConstructor(props.min);
if (minDate.toString() === "Invalid Date") {
return false;
} else if (props.value < minDate) {
@@ -83,7 +83,7 @@ function DateField({ onChange, ...props }: DateFieldProps) {
}
}
if (props.max) {
- const maxDate = new Date(props.max);
+ const maxDate = new DateConstructor(props.max);
if (maxDate.toString() === "Invalid Date") {
return false;
} else if (props.value > maxDate) {
diff --git a/packages/uniforms-patternfly/tests/DateField.test.tsx b/packages/uniforms-patternfly/tests/DateField.test.tsx
index a3b455b5b04..8743c955cad 100644
--- a/packages/uniforms-patternfly/tests/DateField.test.tsx
+++ b/packages/uniforms-patternfly/tests/DateField.test.tsx
@@ -89,7 +89,6 @@ test(" - renders a input with correct value (model)", () => {
test(" - renders a input which correctly reacts on change", () => {
const onChange = jest.fn();
- const now = "2000-04-04";
render(usingUniformsContext( , { x: { type: Date } }, { onChange }));
const input = screen.getByTestId("date-field") as HTMLInputElement;
@@ -100,9 +99,14 @@ test(" - renders a input which correctly reacts on change", () => {
test(" - renders a input which correctly reacts on change (empty value)", () => {
const onChange = jest.fn();
- const dateValue = new Date("2000-04-04");
- render(usingUniformsContext( , { x: { type: Date } }, { onChange }));
+ render(
+ usingUniformsContext(
+ ,
+ { x: { type: Date } },
+ { onChange }
+ )
+ );
const input = screen.getByTestId("date-field") as HTMLInputElement;
fireEvent.change(input, { target: { value: "" } });
@@ -124,11 +128,10 @@ test(" - renders a input which correctly reacts on change (empty)", (
test(" - renders a input which correctly reacts on change (invalid)", () => {
const onChange = jest.fn();
- const now = "10:00";
render(usingUniformsContext( , { x: { type: Date } }, { onChange }));
const input = screen.getByTestId("date-field") as HTMLInputElement;
- fireEvent.change(input, { target: { value: now } });
+ fireEvent.change(input, { target: { value: "10:00" } });
expect(onChange).not.toHaveBeenCalled();
});
@@ -136,16 +139,18 @@ test(" - renders a input which correctly reacts on change (invalid)",
test(" - renders a input which correctly reacts on change (valid)", () => {
const onChange = jest.fn();
- const date = "2000-04-04";
- const time = "10:30";
-
- const dateValue = new Date(`${date}T00:00:00Z`);
- render(usingUniformsContext( , { x: { type: Date } }, { onChange }));
+ render(
+ usingUniformsContext(
+ ,
+ { x: { type: Date } },
+ { onChange }
+ )
+ );
const input = screen.getByTestId("date-field") as HTMLInputElement;
- fireEvent.change(input, { target: { value: `${date}T${time}` } });
+ fireEvent.change(input, { target: { value: "2000-04-04T10:30" } });
- expect(onChange).toHaveBeenLastCalledWith("x", new Date(`${date}T${time}:00.000Z`));
+ expect(onChange).toHaveBeenLastCalledWith("x", new Date("2000-04-04T10:30:00.000Z"));
});
test(" - renders a input which correctly reacts on change (year bigger than 9999)", () => {
@@ -160,39 +165,53 @@ test(" - renders a input which correctly reacts on change (year bigge
});
test(" - test max property - valid", () => {
- const dateValue = new Date("1998-12-31");
- const maxValue = new Date("1999-01-01T00:00:00Z");
- render(usingUniformsContext( , { x: { type: Date } }));
+ render(
+ usingUniformsContext(
+ ,
+ {
+ x: { type: Date },
+ }
+ )
+ );
expect(screen.queryByTestId("Should be before")).toBeNull();
});
test(" - test max property - invalid", () => {
- const date = "1999-01-02";
- const max = "1999-01-01T00:00:00.000Z";
-
- const dateValue = new Date(date);
- const maxValue = new Date(max);
- render(usingUniformsContext( , { x: { type: Date } }));
+ render(
+ usingUniformsContext(
+ ,
+ {
+ x: { type: Date },
+ }
+ )
+ );
- expect(screen.getByText(`Should be before ${max}`)).toBeInTheDocument();
+ expect(screen.getByText(`Should be before 1999-01-01T00:00:00.000Z`)).toBeInTheDocument();
});
test(" - test min property - valid", () => {
- const dateValue = new Date("1999-01-02");
- const minValue = new Date("1999-01-01T00:00:00Z");
- render(usingUniformsContext( , { x: { type: Date } }));
+ render(
+ usingUniformsContext(
+ ,
+ {
+ x: { type: Date },
+ }
+ )
+ );
expect(screen.queryByTestId("Should be after")).toBeNull();
});
test(" - test min property - invalid", () => {
- const date = "1998-12-31";
- const min = "1999-01-01T00:00:00.000Z";
-
- const dateValue = new Date(date);
- const minValue = new Date(min);
- render(usingUniformsContext( , { x: { type: Date } }));
-
- expect(screen.getByText(`Should be after ${min}`)).toBeInTheDocument();
+ render(
+ usingUniformsContext(
+ ,
+ {
+ x: { type: Date },
+ }
+ )
+ );
+
+ expect(screen.getByText(`Should be after 1999-01-01T00:00:00.000Z`)).toBeInTheDocument();
});
diff --git a/packages/unitables-dmn/package.json b/packages/unitables-dmn/package.json
index b2dca206702..cbfea4364cf 100644
--- a/packages/unitables-dmn/package.json
+++ b/packages/unitables-dmn/package.json
@@ -37,8 +37,6 @@
"@types/lodash": "^4.14.168",
"@types/react-table": "^7.0.25",
"lodash": "^4.17.21",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-id-generator": "^3.0.1",
"react-table": "^7.6.2",
"uniforms": "^3.10.2",
@@ -56,5 +54,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/unitables/package.json b/packages/unitables/package.json
index 20b54fd64b7..28c40e8ae6e 100644
--- a/packages/unitables/package.json
+++ b/packages/unitables/package.json
@@ -37,13 +37,13 @@
"@patternfly/react-icons": "^4.93.6",
"@types/lodash": "^4.14.168",
"@types/react-table": "^7.0.25",
- "ajv": "^6.12.6",
+ "ajv": "^8.17.1",
+ "ajv-draft-04": "^1.0.0",
"ajv-errors": "^1.0.1",
+ "ajv-formats": "^3.0.1",
"deep-object-diff": "^1.1.9",
"lodash": "^4.17.21",
"moment": "^2.29.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-id-generator": "^3.0.1",
"react-table": "^7.6.2",
"uniforms": "^3.10.2",
@@ -61,5 +61,9 @@
"copyfiles": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/unitables/src/UnitablesValidator.ts b/packages/unitables/src/UnitablesValidator.ts
index d36a4e5d259..ecc892d864c 100644
--- a/packages/unitables/src/UnitablesValidator.ts
+++ b/packages/unitables/src/UnitablesValidator.ts
@@ -17,14 +17,18 @@
* under the License.
*/
-import Ajv from "ajv";
+import AjvDraft04 from "ajv-draft-04";
+import addFormats from "ajv-formats";
import { UnitablesJsonSchemaBridge } from "./uniforms";
import { UnitablesI18n } from "./i18n";
export class UnitablesValidator {
- constructor(public i18n: UnitablesI18n) {}
+ protected readonly ajv: AjvDraft04;
- protected readonly ajv = new Ajv({ allErrors: true, schemaId: "auto", useDefaults: true });
+ constructor(public i18n: UnitablesI18n) {
+ this.ajv = new AjvDraft04({ allErrors: true, useDefaults: true });
+ addFormats(this.ajv);
+ }
public createValidator(formSchema: object) {
const validator = this.ajv.compile(formSchema);
diff --git a/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts b/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts
index 825c5e832f2..b1a3112ace7 100644
--- a/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts
+++ b/packages/vscode-extension/src/DefaultVsCodeKieEditorChannelApiImpl.ts
@@ -44,14 +44,14 @@ import { getNormalizedPosixPathRelativeToWorkspaceRoot, getWorkspaceRoot } from
export class DefaultVsCodeKieEditorChannelApiImpl implements KogitoEditorChannelApi, JavaCodeCompletionChannelApi {
constructor(
- private readonly editor: VsCodeKieEditorController,
- private readonly resourceContentService: ResourceContentService,
- private readonly vscodeWorkspace: VsCodeWorkspaceChannelApiImpl,
- private readonly backendProxy: BackendProxy,
- private readonly vscodeNotifications: VsCodeNotificationsChannelApiImpl,
- private readonly javaCodeCompletionApi: JavaCodeCompletionApi,
- private readonly viewType: string,
- private readonly i18n: I18n
+ 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,
+ protected readonly i18n: I18n
) {}
public async kogitoWorkspace_newEdit(workspaceEdit: WorkspaceEdit) {
diff --git a/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForDanglingFiles.ts b/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForDanglingFiles.ts
index 2ac08977e2c..1e21bd24503 100644
--- a/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForDanglingFiles.ts
+++ b/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForDanglingFiles.ts
@@ -85,17 +85,17 @@ export class VsCodeResourceContentServiceForDanglingFiles implements ResourceCon
try {
const content = await vscode.workspace.fs.readFile(vscode.Uri.file(absoluteFsPath));
- if (opts?.type === ContentType.BINARY) {
+ if (opts?.type === "binary") {
return new ResourceContent(
normalizedPosixPathRelativeToTheWorkspaceRoot, // Always return the relative path.
Buffer.from(content).toString("base64"),
- ContentType.BINARY
+ "binary"
);
} else {
return new ResourceContent(
normalizedPosixPathRelativeToTheWorkspaceRoot, // Always return the relative path.
Buffer.from(content).toString(),
- ContentType.TEXT
+ "text"
);
}
} catch (e) {
diff --git a/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts b/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts
index 99dce8df863..e05423b23c6 100644
--- a/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts
+++ b/packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts
@@ -149,17 +149,17 @@ Resolved path: ${__path.resolve(workspaceRootAbsoluteFsPath, normalizedFsPathRel
try {
const content = await vscode.workspace.fs.readFile(vscode.Uri.file(absoluteFsPath));
- if (opts?.type === ContentType.BINARY) {
+ if (opts?.type === "binary") {
return new ResourceContent(
normalizedPosixPathRelativeToTheWorkspaceRoot, // Always return the relative path.
Buffer.from(content).toString("base64"),
- ContentType.BINARY
+ "binary"
);
} else {
return new ResourceContent(
normalizedPosixPathRelativeToTheWorkspaceRoot, // Always return the relative path.
Buffer.from(content).toString(),
- ContentType.TEXT
+ "text"
);
}
} catch (e) {
diff --git a/packages/vscode-extension/tests/VsCodeResourceContentServiceForDanglingFiles.test.ts b/packages/vscode-extension/tests/VsCodeResourceContentServiceForDanglingFiles.test.ts
index 30542095793..b6f90afa2bf 100644
--- a/packages/vscode-extension/tests/VsCodeResourceContentServiceForDanglingFiles.test.ts
+++ b/packages/vscode-extension/tests/VsCodeResourceContentServiceForDanglingFiles.test.ts
@@ -68,7 +68,7 @@ describe("VsCodeResourceContentServiceForDanglingFiles", () => {
expect(resource1Content).not.toBeNull();
expect(resource1Content?.normalizedPosixPathRelativeToTheWorkspaceRoot).toBe(resource1Path);
- expect(resource1Content?.type).toBe(ContentType.TEXT);
+ expect(resource1Content?.type).toBe("text");
expect(resource1Content?.content).toBe("content for resource 1");
const resource2Path = "resource2.txt";
@@ -76,15 +76,15 @@ describe("VsCodeResourceContentServiceForDanglingFiles", () => {
expect(resource2Content).not.toBeNull();
expect(resource2Content?.normalizedPosixPathRelativeToTheWorkspaceRoot).toBe(resource2Path);
- expect(resource2Content?.type).toBe(ContentType.TEXT);
+ expect(resource2Content?.type).toBe("text");
expect(resource2Content?.content).toBe("content for resource 2");
const iconPath = "icon.png";
- const iconContent = await resourceContentService.get(iconPath, { type: ContentType.BINARY });
+ const iconContent = await resourceContentService.get(iconPath, { type: "binary" });
expect(iconContent).not.toBeNull();
expect(iconContent?.normalizedPosixPathRelativeToTheWorkspaceRoot).toBe(iconPath);
- expect(iconContent?.type).toBe(ContentType.BINARY);
+ expect(iconContent?.type).toBe("binary");
expect(iconContent?.content).not.toBeNull();
});
@@ -98,15 +98,15 @@ describe("VsCodeResourceContentServiceForDanglingFiles", () => {
expect(txtResourceContent).not.toBeNull();
expect(txtResourceContent?.normalizedPosixPathRelativeToTheWorkspaceRoot).toBe(txtResourcePath);
- expect(txtResourceContent?.type).toBe(ContentType.TEXT);
+ expect(txtResourceContent?.type).toBe("text");
expect(txtResourceContent?.content).toBe(undefined);
const binaryPath = "icon.png";
- const binaryContent = await resourceContentService.get(binaryPath, { type: ContentType.BINARY });
+ const binaryContent = await resourceContentService.get(binaryPath, { type: "binary" });
expect(binaryContent).not.toBeNull();
expect(binaryContent?.normalizedPosixPathRelativeToTheWorkspaceRoot).toBe(binaryPath);
- expect(binaryContent?.type).toBe(ContentType.BINARY);
+ expect(binaryContent?.type).toBe("binary");
expect(binaryContent?.content).toBe(undefined);
});
});
diff --git a/packages/workspace/src/api/ContentType.ts b/packages/workspace/src/api/ContentType.ts
index 6cbbbb0fd02..dd397391ed0 100644
--- a/packages/workspace/src/api/ContentType.ts
+++ b/packages/workspace/src/api/ContentType.ts
@@ -17,7 +17,4 @@
* under the License.
*/
-export enum ContentType {
- TEXT = "text",
- BINARY = "binary",
-}
+export type ContentType = "text" | "binary";
diff --git a/packages/workspace/src/api/ResourceContent.ts b/packages/workspace/src/api/ResourceContent.ts
index d0716baab8b..86c4d28a9a7 100644
--- a/packages/workspace/src/api/ResourceContent.ts
+++ b/packages/workspace/src/api/ResourceContent.ts
@@ -23,6 +23,6 @@ export class ResourceContent {
constructor(
public readonly normalizedPosixPathRelativeToTheWorkspaceRoot: string,
public readonly content: string | undefined,
- public readonly type: ContentType = ContentType.TEXT
+ public readonly type: ContentType = "text"
) {}
}
diff --git a/packages/workspaces-git-fs/package.json b/packages/workspaces-git-fs/package.json
index 98dc13375fe..b897d46d519 100644
--- a/packages/workspaces-git-fs/package.json
+++ b/packages/workspaces-git-fs/package.json
@@ -32,7 +32,6 @@
"client-zip": "^2.3.1",
"isomorphic-git": "^1.11.1",
"minimatch": "^3.0.5",
- "react": "^17.0.2",
"react-router": "^5.3.4",
"uuid": "^8.3.2"
},
@@ -59,5 +58,8 @@
"rimraf": "^3.0.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0"
}
}
diff --git a/packages/workspaces-git-fs/src/worker/WorkspacesWorkerApiImpl.ts b/packages/workspaces-git-fs/src/worker/WorkspacesWorkerApiImpl.ts
index 8d093eb9dee..04d37442a65 100644
--- a/packages/workspaces-git-fs/src/worker/WorkspacesWorkerApiImpl.ts
+++ b/packages/workspaces-git-fs/src/worker/WorkspacesWorkerApiImpl.ts
@@ -178,12 +178,12 @@ export class WorkspacesWorkerApiImpl implements WorkspacesWorkerApi {
return new ResourceContent(
args.relativePath,
file.content ? Buffer.from(file.content).toString("base64") : "",
- ContentType.BINARY
+ "binary"
);
}
// "text" is the default
- return new ResourceContent(args.relativePath, decoder.decode(file.content), ContentType.TEXT);
+ return new ResourceContent(args.relativePath, decoder.decode(file.content), "text");
} catch (e) {
console.error(e);
throw e;
diff --git a/packages/yard-editor/package.json b/packages/yard-editor/package.json
index 9e089d76877..b5cfe93d213 100644
--- a/packages/yard-editor/package.json
+++ b/packages/yard-editor/package.json
@@ -43,8 +43,6 @@
"json-schema": "^0.4.0",
"monaco-editor": "^0.39.0",
"monaco-yaml": "^4.0.4",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
"react-zoom-pan-pinch": "^3.1.0",
"reaflow": "5.1.2",
"vscode-languageserver-types": "^3.16.0"
@@ -71,5 +69,9 @@
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
+ },
+ "peerDependencies": {
+ "react": ">=17.0.2 <19.0.0",
+ "react-dom": ">=17.0.2 <19.0.0"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3bcdd99b2a4..bdd705df8d9 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -101,10 +101,10 @@ importers:
specifier: ^4.93.6
version: 4.93.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@kie-tools/root-env':
@@ -353,10 +353,10 @@ importers:
specifier: workspace:*
version: link:../../packages/envelope-bus
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@kie-tools/root-env':
@@ -451,10 +451,10 @@ importers:
specifier: workspace:*
version: link:../ping-pong-view
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@kie-tools/root-env':
@@ -507,10 +507,10 @@ importers:
specifier: workspace:*
version: link:../../packages/envelope-bus
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@kie-tools/root-env':
@@ -602,8 +602,14 @@ importers:
specifier: ^4.93.6
version: 4.93.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
ajv:
- specifier: ^6.12.6
- version: 6.12.6
+ specifier: ^8.17.1
+ version: 8.17.1
+ ajv-draft-04:
+ specifier: ^1.0.0
+ version: 1.0.0(ajv@8.17.1)
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1(ajv@8.17.1)
react:
specifier: ^17.0.2
version: 17.0.2
@@ -926,10 +932,10 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-resizable:
specifier: ^1.11.0
@@ -1214,10 +1220,10 @@ importers:
specifier: ^3.0.5
version: 3.0.5
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -1561,8 +1567,8 @@ importers:
specifier: ^2.8.5
version: 2.8.5
express:
- specifier: ^4.19.2
- version: 4.19.2
+ specifier: ^4.21.0
+ version: 4.21.0
node-fetch:
specifier: ^3.3.1
version: 3.3.1
@@ -1722,10 +1728,10 @@ importers:
packages/dashbuilder-component-api:
dependencies:
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -1899,10 +1905,10 @@ importers:
specifier: workspace:*
version: link:../dashbuilder-component-echarts-base
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -1969,10 +1975,10 @@ importers:
specifier: ^5.3.2
version: 5.3.2
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -2021,10 +2027,10 @@ importers:
specifier: ^4.0.2
version: 4.0.2
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-simple-maps:
specifier: ^3.0.0
@@ -2106,10 +2112,10 @@ importers:
specifier: ^2.0.5
version: 2.0.5
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -2185,10 +2191,10 @@ importers:
specifier: ^4.112.39
version: 4.112.39(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -2258,10 +2264,10 @@ importers:
specifier: workspace:*
version: link:../dashbuilder-component-echarts-base
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -2340,16 +2346,22 @@ importers:
specifier: ^4.112.39
version: 4.112.39(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
ajv:
- specifier: ^6.12.6
- version: 6.12.6
+ specifier: ^8.17.1
+ version: 8.17.1
+ ajv-draft-04:
+ specifier: ^1.0.0
+ version: 1.0.0(ajv@8.17.1)
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1(ajv@8.17.1)
lodash:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
uniforms:
specifier: ^3.10.2
@@ -2434,10 +2446,10 @@ importers:
specifier: ^2.0.6
version: 2.0.6
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
victory-zoom-container:
specifier: ^35.11.4
@@ -2549,10 +2561,10 @@ importers:
specifier: ^4.0.4
version: 4.0.4(monaco-editor@0.39.0)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
vscode-languageserver-types:
specifier: ^3.16.0
@@ -2737,10 +2749,10 @@ importers:
specifier: ^4.93.6
version: 4.93.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -2940,6 +2952,39 @@ importers:
specifier: workspace:*
version: link:../root-env
+ packages/data-index-webapp:
+ devDependencies:
+ '@kie-tools-core/webpack-base':
+ specifier: workspace:*
+ version: link:../webpack-base
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ copy-webpack-plugin:
+ specifier: ^11.0.0
+ version: 11.0.0(webpack@5.94.0(@swc/core@1.3.92)(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))
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ ts-node:
+ specifier: ^10.9.2
+ version: 10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)
+ webpack:
+ specifier: ^5.94.0
+ version: 5.94.0(@swc/core@1.3.92)(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.10.0
+
packages/dev-deployment-base-image:
dependencies:
'@kie-tools/maven-base':
@@ -3007,10 +3052,10 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-router:
specifier: ^5.3.4
@@ -3295,10 +3340,10 @@ importers:
specifier: ^2.29.4
version: 2.29.4
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-error-boundary:
specifier: ^4.0.11
@@ -3331,6 +3376,9 @@ importers:
'@kie-tools/eslint':
specifier: workspace:*
version: link:../eslint
+ '@kie-tools/jest-base':
+ specifier: workspace:*
+ version: link:../jest-base
'@kie-tools/playwright-base':
specifier: workspace:*
version: link:../playwright-base
@@ -3373,6 +3421,12 @@ importers:
'@types/d3-selection':
specifier: ^3.0.6
version: 3.0.10
+ '@types/jest':
+ specifier: ^29.5.12
+ version: 29.5.12
+ '@types/jest-when':
+ specifier: ^3.5.5
+ version: 3.5.5
'@types/lodash':
specifier: ^4.14.168
version: 4.14.169
@@ -3403,6 +3457,15 @@ importers:
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))
+ 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))
+ 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)))
lodash:
specifier: ^4.17.21
version: 4.17.21
@@ -3418,6 +3481,9 @@ importers:
storybook:
specifier: ^7.3.2
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)
typescript:
specifier: ^5.5.3
version: 5.5.3
@@ -3476,10 +3542,10 @@ importers:
specifier: ^4.276.6
version: 4.276.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -3855,8 +3921,8 @@ importers:
packages/dmn-marshaller-backend-compatibility-tester:
dependencies:
'@jbangdev/jbang':
- specifier: 0.2.0
- version: 0.2.0
+ specifier: 0.2.3
+ version: 0.2.3
devDependencies:
'@kie-tools/root-env':
specifier: workspace:*
@@ -3889,8 +3955,14 @@ importers:
specifier: ^4.93.6
version: 4.93.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
ajv:
- specifier: ^6.12.6
- version: 6.12.6
+ specifier: ^8.17.1
+ version: 8.17.1
+ ajv-draft-04:
+ specifier: ^1.0.0
+ version: 1.0.0(ajv@8.17.1)
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1(ajv@8.17.1)
deep-object-diff:
specifier: ^1.1.9
version: 1.1.9
@@ -3904,10 +3976,10 @@ importers:
specifier: ^2.29.4
version: 2.29.4
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
uniforms:
specifier: ^3.10.2
@@ -4096,10 +4168,10 @@ importers:
specifier: ^3.0.5
version: 3.0.5
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -4181,10 +4253,10 @@ importers:
specifier: ^3.0.11
version: 3.0.11
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -4221,10 +4293,10 @@ importers:
packages/envelope-bus:
dependencies:
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -4456,10 +4528,10 @@ importers:
specifier: ^0.39.0
version: 0.39.0
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -4562,11 +4634,17 @@ importers:
specifier: ^4.93.6
version: 4.93.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
ajv:
- specifier: ^6.12.6
- version: 6.12.6
+ specifier: ^8.17.1
+ version: 8.17.1
+ ajv-draft-04:
+ specifier: ^1.0.0
+ version: 1.0.0(ajv@8.17.1)
ajv-errors:
specifier: ^1.0.1
- version: 1.0.1(ajv@6.12.6)
+ version: 1.0.1(ajv@8.17.1)
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1(ajv@8.17.1)
deep-object-diff:
specifier: ^1.1.9
version: 1.1.9
@@ -4574,10 +4652,10 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
uniforms:
specifier: ^3.10.2
@@ -4686,10 +4764,10 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
uniforms:
specifier: ^3.10.2
@@ -4877,10 +4955,10 @@ importers:
packages/i18n:
dependencies:
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -5067,10 +5145,10 @@ importers:
specifier: ^4.112.39
version: 4.112.39(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -5198,6 +5276,39 @@ importers:
specifier: ^29.7.0
version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2))
+ packages/jobs-service-webapp:
+ devDependencies:
+ '@kie-tools-core/webpack-base':
+ specifier: workspace:*
+ version: link:../webpack-base
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ copy-webpack-plugin:
+ specifier: ^11.0.0
+ version: 11.0.0(webpack@5.94.0(@swc/core@1.3.92)(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))
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ ts-node:
+ specifier: ^10.9.2
+ version: 10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)
+ webpack:
+ specifier: ^5.94.0
+ version: 5.94.0(@swc/core@1.3.92)(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.10.0
+
packages/json-yaml-language-service:
dependencies:
'@kie-tools/yaml-language-server':
@@ -5326,7 +5437,7 @@ importers:
specifier: workspace:*
version: link:../operating-system
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
devDependencies:
'@babel/core':
@@ -5426,10 +5537,10 @@ importers:
specifier: ^4.276.6
version: 4.276.6(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -6006,6 +6117,174 @@ importers:
specifier: ^1.1.6
version: 1.1.6
+ packages/kogito-base-builder-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
+ packages/kogito-data-index-ephemeral-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
+ packages/kogito-data-index-postgresql-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
+ packages/kogito-jit-runner-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
+ packages/kogito-jobs-service-allinone-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
+ packages/kogito-jobs-service-ephemeral-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
+ packages/kogito-jobs-service-postgresql-image:
+ devDependencies:
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
+ '@kie-tools/root-env':
+ specifier: workspace:*
+ version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
+ replace-in-file:
+ specifier: ^7.1.0
+ version: 7.1.0
+ rimraf:
+ specifier: ^3.0.2
+ version: 3.0.2
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
+
packages/kogito-management-console:
devDependencies:
'@kie-tools/image-builder':
@@ -6618,13 +6897,13 @@ importers:
specifier: ^0.39.0
version: 0.39.0
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-cool-onclickoutside:
specifier: ^1.6.1
version: 1.6.2(react@17.0.2)
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-monaco-editor:
specifier: ^0.49.0
@@ -6927,7 +7206,7 @@ importers:
packages/react-hooks:
dependencies:
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
devDependencies:
'@babel/core':
@@ -6993,8 +7272,11 @@ importers:
specifier: ^4.112.39
version: 4.112.39(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
ajv:
- specifier: ^6.12.6
- version: 6.12.6
+ specifier: ^8.17.1
+ version: 8.17.1
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1(ajv@8.17.1)
axios:
specifier: ^1.7.4
version: 1.7.4
@@ -7014,13 +7296,13 @@ importers:
specifier: ^0.39.0
version: 0.39.0
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-datetime-picker:
specifier: ^3.5.0
version: 3.5.0(@types/react-dom@17.0.8)(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-moment:
specifier: 0.9.7
@@ -7228,10 +7510,10 @@ importers:
version: 5.3.3
apollo-server-express:
specifier: ^3.13.0
- version: 3.13.0(encoding@0.1.13)(express@4.19.2)(graphql@14.3.1)
+ version: 3.13.0(encoding@0.1.13)(express@4.21.0)(graphql@14.3.1)
body-parser:
- specifier: ^1.20.2
- version: 1.20.2
+ specifier: ^1.20.3
+ version: 1.20.3
concurrently:
specifier: ^8.2.2
version: 8.2.2
@@ -7251,8 +7533,8 @@ importers:
specifier: ^5.0.1
version: 5.0.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
express:
- specifier: ^4.19.2
- version: 4.19.2
+ specifier: ^4.21.0
+ version: 4.21.0
file-loader:
specifier: ^6.2.0
version: 6.2.0(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
@@ -7493,10 +7775,10 @@ importers:
version: 8.3.0
apollo-server-express:
specifier: ^3.13.0
- version: 3.13.0(encoding@0.1.13)(express@4.19.2)(graphql@14.3.1)
+ version: 3.13.0(encoding@0.1.13)(express@4.21.0)(graphql@14.3.1)
body-parser:
- specifier: ^1.20.2
- version: 1.20.2
+ specifier: ^1.20.3
+ version: 1.20.3
concurrently:
specifier: ^8.2.2
version: 8.2.2
@@ -7516,8 +7798,8 @@ importers:
specifier: ^5.0.1
version: 5.0.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
express:
- specifier: ^4.19.2
- version: 4.19.2
+ specifier: ^4.21.0
+ version: 4.21.0
file-loader:
specifier: ^6.2.0
version: 6.2.0(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
@@ -7527,6 +7809,9 @@ importers:
graphql:
specifier: 14.3.1
version: 14.3.1
+ html-replace-webpack-plugin:
+ specifier: ^2.6.0
+ version: 2.6.0
html-webpack-plugin:
specifier: ^5.3.2
version: 5.5.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
@@ -7571,7 +7856,7 @@ importers:
version: 8.0.0(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
swagger-ui-express:
specifier: ^5.0.0
- version: 5.0.0(express@4.19.2)
+ version: 5.0.0(express@4.21.0)
ts-loader:
specifier: ^9.4.2
version: 9.4.2(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
@@ -7678,13 +7963,13 @@ importers:
specifier: ^0.39.0
version: 0.39.0
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-datetime-picker:
specifier: ^3.5.0
version: 3.5.0(@types/react-dom@17.0.8)(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-helmet:
specifier: ^6.1.0
@@ -7893,7 +8178,7 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
devDependencies:
'@babel/core':
@@ -7996,10 +8281,10 @@ importers:
specifier: ^0.39.0
version: 0.39.0
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-helmet:
specifier: ^6.1.0
@@ -8114,7 +8399,7 @@ importers:
specifier: ^4.9.0
version: 4.10.1
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-router:
specifier: ^5.3.4
@@ -8232,13 +8517,13 @@ importers:
specifier: ^0.39.0
version: 0.39.0
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-datetime-picker:
specifier: ^3.5.0
version: 3.5.0(@types/react-dom@17.0.8)(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-helmet:
specifier: ^6.1.0
@@ -8486,7 +8771,7 @@ importers:
specifier: ^4.9.0
version: 4.10.1
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-router:
specifier: ^5.3.4
@@ -8663,13 +8948,16 @@ importers:
version: 5.3.3
apollo-server-express:
specifier: ^3.13.0
- version: 3.13.0(encoding@0.1.13)(express@4.19.2)(graphql@14.3.1)
+ version: 3.13.0(encoding@0.1.13)(express@4.21.0)(graphql@14.3.1)
concurrently:
specifier: ^8.2.2
version: 8.2.2
copy-webpack-plugin:
specifier: ^11.0.0
version: 11.0.0(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
+ cors:
+ specifier: ^2.8.5
+ version: 2.8.5
css-loader:
specifier: ^5.2.6
version: 5.2.7(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
@@ -8677,8 +8965,8 @@ importers:
specifier: ^5.0.1
version: 5.0.1(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
express:
- specifier: ^4.19.2
- version: 4.19.2
+ specifier: ^4.21.0
+ version: 4.21.0
file-loader:
specifier: ^6.2.0
version: 6.2.0(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))
@@ -9321,6 +9609,9 @@ importers:
'@kie-tools/serverless-logic-web-tools-base-builder-image-env':
specifier: workspace:*
version: link:../serverless-logic-web-tools-base-builder-image-env
+ '@kie/kogito-base-builder-image':
+ specifier: workspace:*
+ version: link:../kogito-base-builder-image
rimraf:
specifier: ^3.0.2
version: 3.0.2
@@ -9379,9 +9670,18 @@ importers:
packages/serverless-logic-web-tools-swf-dev-mode-image:
devDependencies:
+ '@kie-tools/image-builder':
+ specifier: workspace:*
+ version: link:../image-builder
'@kie-tools/maven-config-setup-helper':
specifier: workspace:*
version: link:../maven-config-setup-helper
+ '@kie-tools/maven-m2-repo-via-http-image':
+ specifier: workspace:*
+ version: link:../maven-m2-repo-via-http-image
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
'@kie-tools/root-env':
specifier: workspace:*
version: link:../root-env
@@ -9391,6 +9691,9 @@ importers:
'@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env':
specifier: workspace:*
version: link:../serverless-logic-web-tools-swf-dev-mode-image-env
+ '@kie/kogito-base-builder-image':
+ specifier: workspace:*
+ version: link:../kogito-base-builder-image
rimraf:
specifier: ^3.0.2
version: 3.0.2
@@ -9467,10 +9770,10 @@ importers:
specifier: ^1.0.1
version: 1.0.1
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
vscode-languageserver-types:
specifier: ^3.16.0
@@ -10323,10 +10626,10 @@ importers:
specifier: ^4.0.4
version: 4.0.4(monaco-editor@0.39.0)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
vscode-languageserver-types:
specifier: ^3.16.0
@@ -10558,6 +10861,12 @@ importers:
packages/sonataflow-builder-image:
devDependencies:
+ '@kie-tools/image-builder':
+ specifier: workspace:*
+ version: link:../image-builder
+ '@kie-tools/maven-m2-repo-via-http-image':
+ specifier: workspace:*
+ version: link:../maven-m2-repo-via-http-image
'@kie-tools/python-venv':
specifier: workspace:*
version: link:../python-venv
@@ -10765,22 +11074,22 @@ importers:
version: link:../root-env
apollo-server-express:
specifier: ^3.13.0
- version: 3.13.0(encoding@0.1.13)(express@4.19.2)(graphql@14.3.1)
+ version: 3.13.0(encoding@0.1.13)(express@4.21.0)(graphql@14.3.1)
babel-jest:
specifier: ^25.5.1
version: 25.5.1(@babel/core@7.24.9)
body-parser:
- specifier: ^1.20.2
- version: 1.20.2
+ specifier: ^1.20.3
+ version: 1.20.3
cors:
specifier: ^2.8.5
version: 2.8.5
express:
- specifier: ^4.19.2
- version: 4.19.2
+ specifier: ^4.21.0
+ version: 4.21.0
express-rate-limit:
specifier: ^7.4.0
- version: 7.4.0(express@4.19.2)
+ version: 7.4.0(express@4.21.0)
graphql:
specifier: 14.3.1
version: 14.3.1
@@ -10795,13 +11104,19 @@ importers:
version: 3.1.4
swagger-ui-express:
specifier: ^5.0.0
- version: 5.0.0(express@4.19.2)
+ version: 5.0.0(express@4.21.0)
uuid:
specifier: ^8.3.2
version: 8.3.2
packages/sonataflow-devmode-image:
devDependencies:
+ '@kie-tools/image-builder':
+ specifier: workspace:*
+ version: link:../image-builder
+ '@kie-tools/maven-m2-repo-via-http-image':
+ specifier: workspace:*
+ version: link:../maven-m2-repo-via-http-image
'@kie-tools/python-venv':
specifier: workspace:*
version: link:../python-venv
@@ -10835,24 +11150,33 @@ importers:
'@kie-tools/root-env':
specifier: workspace:*
version: link:../root-env
+ run-script-os:
+ specifier: ^1.1.6
+ version: 1.1.6
packages/sonataflow-management-console-image:
devDependencies:
- '@kie-tools/image-builder':
- specifier: workspace:*
- version: link:../image-builder
'@kie-tools/image-env-to-json':
specifier: workspace:*
version: link:../image-env-to-json
+ '@kie-tools/python-venv':
+ specifier: workspace:*
+ version: link:../python-venv
'@kie-tools/root-env':
specifier: workspace:*
version: link:../root-env
+ '@kie-tools/sonataflow-image-common':
+ specifier: workspace:*
+ version: link:../sonataflow-image-common
'@kie-tools/sonataflow-management-console-image-env':
specifier: workspace:*
version: link:../sonataflow-management-console-image-env
'@kie-tools/sonataflow-management-console-webapp':
specifier: workspace:*
version: link:../sonataflow-management-console-webapp
+ cross-env:
+ specifier: ^7.0.3
+ version: 7.0.3
rimraf:
specifier: ^3.0.2
version: 3.0.2
@@ -11160,6 +11484,18 @@ importers:
'@kie-tools/sonataflow-devmode-image':
specifier: workspace:*
version: link:../sonataflow-devmode-image
+ '@kie/kogito-data-index-ephemeral-image':
+ specifier: workspace:*
+ version: link:../kogito-data-index-ephemeral-image
+ '@kie/kogito-data-index-postgresql-image':
+ specifier: workspace:*
+ version: link:../kogito-data-index-postgresql-image
+ '@kie/kogito-jobs-service-ephemeral-image':
+ specifier: workspace:*
+ version: link:../kogito-jobs-service-ephemeral-image
+ '@kie/kogito-jobs-service-postgresql-image':
+ specifier: workspace:*
+ version: link:../kogito-jobs-service-postgresql-image
replace-in-file:
specifier: ^7.1.0
version: 7.1.0
@@ -11445,10 +11781,10 @@ importers:
specifier: ^4.0.4
version: 4.0.4(monaco-editor@0.39.0)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
devDependencies:
'@babel/core':
@@ -11493,10 +11829,10 @@ importers:
specifier: ^2.8.8
version: 2.8.8
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
underscore:
specifier: ^1.13.1
@@ -11617,10 +11953,10 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
uniforms:
specifier: ^3.10.2
@@ -11723,10 +12059,10 @@ importers:
specifier: ^2.8.8
version: 2.8.8
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
uniforms:
specifier: ^3.10.2
@@ -11871,11 +12207,17 @@ importers:
specifier: ^7.0.25
version: 7.7.7
ajv:
- specifier: ^6.12.6
- version: 6.12.6
+ specifier: ^8.17.1
+ version: 8.17.1
+ ajv-draft-04:
+ specifier: ^1.0.0
+ version: 1.0.0(ajv@8.17.1)
ajv-errors:
specifier: ^1.0.1
- version: 1.0.1(ajv@6.12.6)
+ version: 1.0.1(ajv@8.17.1)
+ ajv-formats:
+ specifier: ^3.0.1
+ version: 3.0.1(ajv@8.17.1)
deep-object-diff:
specifier: ^1.1.9
version: 1.1.9
@@ -11886,10 +12228,10 @@ importers:
specifier: ^2.29.4
version: 2.29.4
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-id-generator:
specifier: ^3.0.1
@@ -11977,10 +12319,10 @@ importers:
specifier: ^4.17.21
version: 4.17.21
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-id-generator:
specifier: ^3.0.1
@@ -12508,7 +12850,7 @@ importers:
specifier: ^3.0.5
version: 3.0.5
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-router:
specifier: ^5.3.4
@@ -12811,10 +13153,10 @@ importers:
specifier: ^4.0.4
version: 4.0.4(monaco-editor@0.39.0)
react:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2
react-dom:
- specifier: ^17.0.2
+ specifier: '>=17.0.2 <19.0.0'
version: 17.0.2(react@17.0.2)
react-zoom-pan-pinch:
specifier: ^3.1.0
@@ -13218,7 +13560,7 @@ importers:
version: 7.16.11(@babel/core@7.16.12)
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))
+ version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2))
jest-junit:
specifier: ^16.0.0
version: 16.0.0
@@ -16667,8 +17009,8 @@ packages:
resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==}
engines: {node: '>=8'}
- '@jbangdev/jbang@0.2.0':
- resolution: {integrity: sha512-Ixo6/Y5sXKmNjYlf03xws79siAGEvrZPgNAlSCXK9DZ8xH7hkzdZ0AwE5QDSaMmOwy/yUrLhPhjojwg+WhyBMg==}
+ '@jbangdev/jbang@0.2.3':
+ resolution: {integrity: sha512-fGkNarIf9HmxlbWNFLlNLYgahwz5SKwQ8NEstB7tnLEkoZqLCyjt+Z0Hr/WntWSFGSzJeezgQKJJg4so6OA6YA==}
'@jest/console@29.7.0':
resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==}
@@ -19923,15 +20265,12 @@ packages:
ajv@6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
- ajv@8.11.0:
- resolution: {integrity: sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==}
-
- ajv@8.12.0:
- resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==}
-
ajv@8.16.0:
resolution: {integrity: sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==}
+ ajv@8.17.1:
+ resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
+
ansi-align@2.0.0:
resolution: {integrity: sha512-TdlOggdA/zURfMYa7ABC66j+oqfMew58KpJMbUlH3bcZP1b+cBHIHDDn5uH9INsxrHBPjsqM0tDB4jPTF/vgJA==}
@@ -20565,6 +20904,10 @@ packages:
resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
+ body-parser@1.20.3:
+ resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==}
+ engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
+
body-scroll-lock@4.0.0-beta.0:
resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==}
@@ -22257,6 +22600,10 @@ packages:
resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==}
engines: {node: '>= 0.8'}
+ encodeurl@2.0.0:
+ resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==}
+ engines: {node: '>= 0.8'}
+
encoding@0.1.13:
resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==}
@@ -22560,10 +22907,6 @@ packages:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
engines: {node: '>=6'}
- escalade@3.1.2:
- resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==}
- engines: {node: '>=6'}
-
escalade@3.2.0:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
@@ -22784,6 +23127,10 @@ packages:
resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==}
engines: {node: '>= 0.10.0'}
+ express@4.21.0:
+ resolution: {integrity: sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==}
+ engines: {node: '>= 0.10.0'}
+
extend-shallow@2.0.1:
resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==}
engines: {node: '>=0.10.0'}
@@ -22862,6 +23209,9 @@ packages:
fast-text-encoding@1.0.3:
resolution: {integrity: sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig==}
+ fast-uri@3.0.1:
+ resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==}
+
fast-url-parser@1.1.3:
resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==}
@@ -22988,6 +23338,10 @@ packages:
resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==}
engines: {node: '>= 0.8'}
+ finalhandler@1.3.1:
+ resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==}
+ engines: {node: '>= 0.8'}
+
find-cache-dir@2.1.0:
resolution: {integrity: sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==}
engines: {node: '>=6'}
@@ -25288,6 +25642,9 @@ packages:
merge-descriptors@1.0.1:
resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==}
+ merge-descriptors@1.0.3:
+ resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==}
+
merge-refs@1.2.1:
resolution: {integrity: sha512-pRPz39HQz2xzHdXAGvtJ9S8aEpNgpUjzb5yPC3ytozodmsHg+9nqgRs7/YOmn9fM/TLzntAC8AdGTidKxOq9TQ==}
@@ -26304,6 +26661,9 @@ packages:
resolution: {integrity: sha512-92olbatybjsHTGB2CUnAM7s0mU/27gcMfLNA7t09UftndUdxywlQKur3fzXEPpfLrgZD3I2Bt8+UmiL7YDEgXQ==}
engines: {node: '>=8.15'}
+ path-to-regexp@0.1.10:
+ resolution: {integrity: sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==}
+
path-to-regexp@0.1.7:
resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==}
@@ -26922,6 +27282,10 @@ packages:
resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==}
engines: {node: '>=0.6'}
+ qs@6.13.0:
+ resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
+ engines: {node: '>=0.6'}
+
querystring-es3@0.2.1:
resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==}
engines: {node: '>=0.4.x'}
@@ -27936,6 +28300,10 @@ packages:
resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==}
engines: {node: '>= 0.8.0'}
+ send@0.19.0:
+ resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==}
+ engines: {node: '>= 0.8.0'}
+
sentence-case@3.0.4:
resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==}
@@ -27956,6 +28324,10 @@ packages:
resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==}
engines: {node: '>= 0.8.0'}
+ serve-static@1.16.2:
+ resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==}
+ engines: {node: '>= 0.8.0'}
+
serve@12.0.1:
resolution: {integrity: sha512-CQ4ikLpxg/wmNM7yivulpS6fhjRiFG6OjmP8ty3/c1SBnSk23fpKmLAV4HboTA2KrZhkUPlDfjDhnRmAjQ5Phw==}
hasBin: true
@@ -28030,6 +28402,10 @@ packages:
side-channel@1.0.4:
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
+ side-channel@1.0.6:
+ resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
+ engines: {node: '>= 0.4'}
+
signal-exit@3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
@@ -28418,10 +28794,6 @@ packages:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
- strip-ansi@7.0.1:
- resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==}
- engines: {node: '>=12'}
-
strip-ansi@7.1.0:
resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==}
engines: {node: '>=12'}
@@ -30402,8 +30774,8 @@ snapshots:
'@apidevtools/openapi-schemas': 2.1.0
'@apidevtools/swagger-methods': 3.0.2
'@jsdevtools/ono': 7.1.3
- ajv: 8.12.0
- ajv-draft-04: 1.0.0(ajv@8.12.0)
+ ajv: 8.17.1
+ ajv-draft-04: 1.0.0(ajv@8.17.1)
call-me-maybe: 1.0.2
openapi-types: 7.2.3
@@ -30879,7 +31251,7 @@ snapshots:
'@babel/core@7.24.9':
dependencies:
- '@ampproject/remapping': 2.2.0
+ '@ampproject/remapping': 2.3.0
'@babel/code-frame': 7.24.7
'@babel/generator': 7.25.0
'@babel/helper-compilation-targets': 7.25.2
@@ -30890,7 +31262,7 @@ snapshots:
'@babel/traverse': 7.25.3
'@babel/types': 7.25.2
convert-source-map: 2.0.0
- debug: 4.3.5
+ debug: 4.3.6
gensync: 1.0.0-beta.2
json5: 2.2.3
semver: 6.3.1
@@ -31202,7 +31574,7 @@ snapshots:
'@babel/core': 7.16.12
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.5
+ debug: 4.3.6
lodash.debounce: 4.0.8
resolve: 1.22.8
semver: 6.3.1
@@ -31214,7 +31586,7 @@ snapshots:
'@babel/core': 7.18.10
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.5
+ debug: 4.3.6
lodash.debounce: 4.0.8
resolve: 1.22.8
semver: 6.3.1
@@ -31226,7 +31598,7 @@ snapshots:
'@babel/core': 7.24.9
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.5
+ debug: 4.3.6
lodash.debounce: 4.0.8
resolve: 1.22.8
semver: 6.3.1
@@ -31238,7 +31610,7 @@ snapshots:
'@babel/core': 7.23.0
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.5
+ debug: 4.3.6
lodash.debounce: 4.0.8
resolve: 1.22.8
transitivePeerDependencies:
@@ -31249,7 +31621,7 @@ snapshots:
'@babel/core': 7.23.0
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.5
+ debug: 4.3.6
lodash.debounce: 4.0.8
resolve: 1.22.8
transitivePeerDependencies:
@@ -31260,7 +31632,7 @@ snapshots:
'@babel/core': 7.23.9
'@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5
- debug: 4.3.5
+ debug: 4.3.6
lodash.debounce: 4.0.8
resolve: 1.22.8
transitivePeerDependencies:
@@ -36754,7 +37126,7 @@ snapshots:
'@babel/parser': 7.25.3
'@babel/template': 7.25.0
'@babel/types': 7.25.2
- debug: 4.3.5
+ debug: 4.3.6
globals: 11.12.0
transitivePeerDependencies:
- supports-color
@@ -37050,7 +37422,7 @@ snapshots:
'@eslint/eslintrc@2.1.2':
dependencies:
ajv: 6.12.6
- debug: 4.3.5
+ debug: 4.3.6
espree: 9.6.1
globals: 13.20.0
ignore: 5.2.0
@@ -37469,7 +37841,7 @@ snapshots:
'@types/json-stable-stringify': 1.0.34
'@whatwg-node/fetch': 0.8.8
chalk: 4.1.2
- debug: 4.3.5
+ debug: 4.3.6
dotenv: 16.3.1
graphql: 14.3.1
graphql-request: 6.1.0(encoding@0.1.13)(graphql@14.3.1)
@@ -37575,7 +37947,7 @@ snapshots:
'@humanwhocodes/config-array@0.11.13':
dependencies:
'@humanwhocodes/object-schema': 2.0.1
- debug: 4.3.5
+ debug: 4.3.6
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@@ -37694,7 +38066,7 @@ snapshots:
dependencies:
string-width: 5.1.2
string-width-cjs: string-width@4.2.3
- strip-ansi: 7.0.1
+ strip-ansi: 7.1.0
strip-ansi-cjs: strip-ansi@6.0.1
wrap-ansi: 8.1.0
wrap-ansi-cjs: wrap-ansi@7.0.0
@@ -37710,7 +38082,7 @@ snapshots:
'@istanbuljs/schema@0.1.3': {}
- '@jbangdev/jbang@0.2.0':
+ '@jbangdev/jbang@0.2.3':
dependencies:
shelljs: 0.8.5
@@ -37759,7 +38131,7 @@ snapshots:
- ts-node
optional: true
- '@jest/core@29.7.0(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/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3))':
dependencies:
'@jest/console': 29.7.0
'@jest/reporters': 29.7.0(node-notifier@8.0.2)
@@ -37773,7 +38145,7 @@ snapshots:
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3))
+ jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3))
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -37796,7 +38168,7 @@ snapshots:
- supports-color
- ts-node
- '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))':
+ '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3))':
dependencies:
'@jest/console': 29.7.0
'@jest/reporters': 29.7.0(node-notifier@8.0.2)
@@ -37810,7 +38182,7 @@ snapshots:
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
+ jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3))
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -37833,7 +38205,7 @@ snapshots:
- supports-color
- ts-node
- '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2))':
+ '@jest/core@29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))':
dependencies:
'@jest/console': 29.7.0
'@jest/reporters': 29.7.0(node-notifier@8.0.2)
@@ -37847,7 +38219,7 @@ snapshots:
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2))
+ jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -38272,8 +38644,8 @@ snapshots:
'@kubernetes-models/validate@3.0.0':
dependencies:
- ajv: 8.12.0
- ajv-formats: 2.1.1(ajv@8.12.0)
+ ajv: 8.17.1
+ ajv-formats: 2.1.1(ajv@8.17.1)
tslib: 2.6.2
'@leichtgewicht/ip-codec@2.0.4': {}
@@ -39927,12 +40299,12 @@ snapshots:
- '@types/react'
- immer
- '@readme/better-ajv-errors@1.6.0(ajv@8.12.0)':
+ '@readme/better-ajv-errors@1.6.0(ajv@8.17.1)':
dependencies:
'@babel/code-frame': 7.23.5
'@babel/runtime': 7.23.6
'@humanwhocodes/momoa': 2.0.4
- ajv: 8.12.0
+ ajv: 8.17.1
chalk: 4.1.2
json-to-ast: 2.1.0
jsonpointer: 5.0.1
@@ -39950,10 +40322,10 @@ snapshots:
'@apidevtools/openapi-schemas': 2.1.0
'@apidevtools/swagger-methods': 3.0.2
'@jsdevtools/ono': 7.1.3
- '@readme/better-ajv-errors': 1.6.0(ajv@8.12.0)
+ '@readme/better-ajv-errors': 1.6.0(ajv@8.17.1)
'@readme/json-schema-ref-parser': 1.2.0
- ajv: 8.12.0
- ajv-draft-04: 1.0.0(ajv@8.12.0)
+ ajv: 8.17.1
+ ajv-draft-04: 1.0.0(ajv@8.17.1)
call-me-maybe: 1.0.2
openapi-types: 7.2.3
@@ -40085,7 +40457,7 @@ snapshots:
'@severlessworkflow/sdk-typescript@3.0.3':
dependencies:
- ajv: 8.12.0
+ ajv: 8.17.1
js-yaml: 4.1.0
'@sideway/address@4.1.4':
@@ -40456,7 +40828,7 @@ snapshots:
ejs: 3.1.9
esbuild: 0.18.20
esbuild-plugin-alias: 0.2.1
- express: 4.19.2
+ express: 4.21.0
find-cache-dir: 3.3.1
fs-extra: 11.2.0
process: 0.11.10
@@ -40478,7 +40850,7 @@ snapshots:
ejs: 3.1.9
esbuild: 0.18.20
esbuild-plugin-alias: 0.2.1
- express: 4.19.2
+ express: 4.21.0
find-cache-dir: 3.3.1
fs-extra: 11.2.0
process: 0.11.10
@@ -40500,7 +40872,7 @@ snapshots:
ejs: 3.1.9
esbuild: 0.18.20
esbuild-plugin-alias: 0.2.1
- express: 4.19.2
+ express: 4.21.0
find-cache-dir: 3.3.1
fs-extra: 11.2.0
process: 0.11.10
@@ -40537,7 +40909,7 @@ snapshots:
case-sensitive-paths-webpack-plugin: 2.4.0
constants-browserify: 1.0.0
css-loader: 6.7.1(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20))
- express: 4.19.2
+ express: 4.21.0
fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20))
fs-extra: 11.1.1
html-webpack-plugin: 5.5.3(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20))
@@ -40597,7 +40969,7 @@ snapshots:
case-sensitive-paths-webpack-plugin: 2.4.0
constants-browserify: 1.0.0
css-loader: 6.7.1(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0))
- express: 4.19.2
+ express: 4.21.0
fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0))
fs-extra: 11.1.1
html-webpack-plugin: 5.5.3(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0))
@@ -40650,7 +41022,7 @@ snapshots:
constants-browserify: 1.0.0
css-loader: 6.7.1(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0))
es-module-lexer: 1.4.1
- express: 4.19.2
+ express: 4.21.0
fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.5.3)(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0))
fs-extra: 11.1.1
html-webpack-plugin: 5.5.3(webpack@5.94.0(@swc/core@1.3.92)(esbuild@0.18.20)(webpack-cli@4.10.0))
@@ -40700,7 +41072,7 @@ snapshots:
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.19.2
+ express: 4.21.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-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)))
@@ -40750,7 +41122,7 @@ snapshots:
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-dev-server@4.15.1)(webpack@5.94.0)))
es-module-lexer: 1.4.1
- express: 4.19.2
+ express: 4.21.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)))
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-dev-server@4.15.1)(webpack@5.94.0)))
@@ -40820,7 +41192,7 @@ snapshots:
detect-indent: 6.1.0
envinfo: 7.8.1
execa: 5.1.1
- express: 4.19.2
+ express: 4.21.0
find-up: 5.0.0
fs-extra: 11.1.1
get-npm-tarball-url: 2.0.3
@@ -40869,7 +41241,7 @@ snapshots:
detect-indent: 6.1.0
envinfo: 7.8.1
execa: 5.1.1
- express: 4.19.2
+ express: 4.21.0
find-up: 5.0.0
fs-extra: 11.1.1
get-npm-tarball-url: 2.0.3
@@ -40918,7 +41290,7 @@ snapshots:
detect-indent: 6.1.0
envinfo: 7.8.1
execa: 5.1.1
- express: 4.19.2
+ express: 4.21.0
find-up: 5.0.0
fs-extra: 11.1.1
get-npm-tarball-url: 2.0.3
@@ -41161,7 +41533,7 @@ snapshots:
cli-table3: 0.6.1
compression: 1.7.4
detect-port: 1.5.1
- express: 4.19.2
+ express: 4.21.0
fs-extra: 11.2.0
globby: 11.1.0
ip: 2.0.0
@@ -41210,7 +41582,7 @@ snapshots:
cli-table3: 0.6.1
compression: 1.7.4
detect-port: 1.5.1
- express: 4.19.2
+ express: 4.21.0
fs-extra: 11.2.0
globby: 11.1.0
ip: 2.0.0
@@ -41259,7 +41631,7 @@ snapshots:
cli-table3: 0.6.1
compression: 1.7.4
detect-port: 1.5.1
- express: 4.19.2
+ express: 4.21.0
fs-extra: 11.2.0
globby: 11.1.0
ip: 2.0.0
@@ -41679,7 +42051,7 @@ snapshots:
'@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))':
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
endent: 2.1.0
find-cache-dir: 3.3.1
flat-cache: 3.0.4
@@ -41693,7 +42065,7 @@ snapshots:
'@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.5.3)(webpack@5.94.0(esbuild@0.18.20))':
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
endent: 2.1.0
find-cache-dir: 3.3.1
flat-cache: 3.0.4
@@ -41707,7 +42079,7 @@ snapshots:
'@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))':
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
endent: 2.1.0
find-cache-dir: 3.3.1
flat-cache: 3.0.4
@@ -43069,7 +43441,7 @@ snapshots:
dependencies:
'@typescript-eslint/typescript-estree': 5.62.0(typescript@5.5.3)
'@typescript-eslint/utils': 5.62.0(eslint@8.52.0)(typescript@5.5.3)
- debug: 4.3.5
+ debug: 4.3.6
eslint: 8.52.0
tsutils: 3.21.0(typescript@5.5.3)
optionalDependencies:
@@ -43083,7 +43455,7 @@ snapshots:
dependencies:
'@typescript-eslint/types': 5.62.0
'@typescript-eslint/visitor-keys': 5.62.0
- debug: 4.3.5
+ debug: 4.3.6
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
@@ -43697,7 +44069,7 @@ snapshots:
accepts@1.3.8:
dependencies:
- mime-types: 2.1.34
+ mime-types: 2.1.35
negotiator: 0.6.3
acorn-globals@7.0.1:
@@ -43746,13 +44118,13 @@ snapshots:
agent-base@6.0.2:
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
agent-base@7.1.0:
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -43775,38 +44147,33 @@ snapshots:
clean-stack: 2.2.0
indent-string: 4.0.0
- ajv-draft-04@1.0.0(ajv@8.12.0):
+ ajv-draft-04@1.0.0(ajv@8.17.1):
optionalDependencies:
- ajv: 8.12.0
+ ajv: 8.17.1
- ajv-errors@1.0.1(ajv@6.12.6):
+ ajv-errors@1.0.1(ajv@8.17.1):
dependencies:
- ajv: 6.12.6
+ ajv: 8.17.1
- ajv-formats@2.1.1(ajv@8.12.0):
+ ajv-formats@2.1.1(ajv@8.17.1):
optionalDependencies:
- ajv: 8.12.0
+ ajv: 8.17.1
- ajv-formats@2.1.1(ajv@8.16.0):
+ ajv-formats@3.0.1(ajv@8.16.0):
optionalDependencies:
ajv: 8.16.0
- ajv-formats@3.0.1(ajv@8.16.0):
+ ajv-formats@3.0.1(ajv@8.17.1):
optionalDependencies:
- ajv: 8.16.0
+ ajv: 8.17.1
ajv-keywords@3.5.2(ajv@6.12.6):
dependencies:
ajv: 6.12.6
- ajv-keywords@5.1.0(ajv@8.12.0):
- dependencies:
- ajv: 8.12.0
- fast-deep-equal: 3.1.3
-
- ajv-keywords@5.1.0(ajv@8.16.0):
+ ajv-keywords@5.1.0(ajv@8.17.1):
dependencies:
- ajv: 8.16.0
+ ajv: 8.17.1
fast-deep-equal: 3.1.3
ajv@6.12.6:
@@ -43816,26 +44183,19 @@ snapshots:
json-schema-traverse: 0.4.1
uri-js: 4.4.1
- ajv@8.11.0:
- dependencies:
- fast-deep-equal: 3.1.3
- json-schema-traverse: 1.0.0
- require-from-string: 2.0.2
- uri-js: 4.4.1
-
- ajv@8.12.0:
+ ajv@8.16.0:
dependencies:
fast-deep-equal: 3.1.3
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
uri-js: 4.4.1
- ajv@8.16.0:
+ ajv@8.17.1:
dependencies:
fast-deep-equal: 3.1.3
+ fast-uri: 3.0.1
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
- uri-js: 4.4.1
ansi-align@2.0.0:
dependencies:
@@ -44015,7 +44375,7 @@ snapshots:
dependencies:
graphql: 14.3.1
- apollo-server-express@3.13.0(encoding@0.1.13)(express@4.19.2)(graphql@14.3.1):
+ apollo-server-express@3.13.0(encoding@0.1.13)(express@4.21.0)(graphql@14.3.1):
dependencies:
'@types/accepts': 1.3.7
'@types/body-parser': 1.19.2
@@ -44025,9 +44385,9 @@ snapshots:
accepts: 1.3.8
apollo-server-core: 3.13.0(encoding@0.1.13)(graphql@14.3.1)
apollo-server-types: 3.8.0(encoding@0.1.13)(graphql@14.3.1)
- body-parser: 1.20.2
+ body-parser: 1.20.3
cors: 2.8.5
- express: 4.19.2
+ express: 4.21.0
graphql: 14.3.1
parseurl: 1.3.3
transitivePeerDependencies:
@@ -45078,6 +45438,23 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ body-parser@1.20.3:
+ dependencies:
+ bytes: 3.1.2
+ content-type: 1.0.5
+ debug: 2.6.9
+ depd: 2.0.0
+ destroy: 1.2.0
+ http-errors: 2.0.0
+ iconv-lite: 0.4.24
+ on-finished: 2.4.1
+ qs: 6.13.0
+ raw-body: 2.5.2
+ type-is: 1.6.18
+ unpipe: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
+
body-scroll-lock@4.0.0-beta.0: {}
bole@4.0.0:
@@ -46146,13 +46523,13 @@ snapshots:
safe-buffer: 5.2.1
sha.js: 2.4.11
- create-jest@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)):
+ create-jest@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)):
dependencies:
'@jest/types': 29.6.3
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
+ jest-config: 29.7.0(@types/node@20.14.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
prompts: 2.4.2
transitivePeerDependencies:
@@ -46161,13 +46538,13 @@ snapshots:
- supports-color
- ts-node
- create-jest@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)):
+ create-jest@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)):
dependencies:
'@jest/types': 29.6.3
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2))
+ jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
jest-util: 29.7.0
prompts: 2.4.2
transitivePeerDependencies:
@@ -47118,7 +47495,7 @@ snapshots:
detect-port@1.5.1:
dependencies:
address: 1.2.2
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -47326,6 +47703,8 @@ snapshots:
encodeurl@1.0.2: {}
+ encodeurl@2.0.0: {}
+
encoding@0.1.13:
dependencies:
iconv-lite: 0.6.3
@@ -47358,7 +47737,7 @@ snapshots:
base64id: 2.0.0
cookie: 0.4.1
cors: 2.8.5
- debug: 4.3.5
+ debug: 4.3.6
engine.io-parser: 5.0.3
ws: 8.2.3
transitivePeerDependencies:
@@ -47706,7 +48085,7 @@ snapshots:
esbuild-register@3.5.0(esbuild@0.18.20):
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
esbuild: 0.18.20
transitivePeerDependencies:
- supports-color
@@ -47803,8 +48182,6 @@ snapshots:
escalade@3.1.1: {}
- escalade@3.1.2: {}
-
escalade@3.2.0: {}
escape-html@1.0.3: {}
@@ -48102,9 +48479,9 @@ snapshots:
exponential-backoff@3.1.1: {}
- express-rate-limit@7.4.0(express@4.19.2):
+ express-rate-limit@7.4.0(express@4.21.0):
dependencies:
- express: 4.19.2
+ express: 4.21.0
express@4.19.2:
dependencies:
@@ -48142,6 +48519,42 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ express@4.21.0:
+ dependencies:
+ accepts: 1.3.8
+ array-flatten: 1.1.1
+ body-parser: 1.20.3
+ content-disposition: 0.5.4
+ content-type: 1.0.5
+ cookie: 0.6.0
+ cookie-signature: 1.0.6
+ debug: 2.6.9
+ depd: 2.0.0
+ encodeurl: 2.0.0
+ escape-html: 1.0.3
+ etag: 1.8.1
+ finalhandler: 1.3.1
+ fresh: 0.5.2
+ http-errors: 2.0.0
+ merge-descriptors: 1.0.3
+ methods: 1.1.2
+ on-finished: 2.4.1
+ parseurl: 1.3.3
+ path-to-regexp: 0.1.10
+ proxy-addr: 2.0.7
+ qs: 6.13.0
+ range-parser: 1.2.1
+ safe-buffer: 5.2.1
+ send: 0.19.0
+ serve-static: 1.16.2
+ setprototypeof: 1.2.0
+ statuses: 2.0.1
+ type-is: 1.6.18
+ utils-merge: 1.0.1
+ vary: 1.1.2
+ transitivePeerDependencies:
+ - supports-color
+
extend-shallow@2.0.1:
dependencies:
is-extendable: 0.1.1
@@ -48185,7 +48598,7 @@ snapshots:
extract-zip@2.0.1:
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
get-stream: 5.2.0
yauzl: 2.10.0
optionalDependencies:
@@ -48195,7 +48608,7 @@ snapshots:
extract-zip@2.0.1(supports-color@8.1.1):
dependencies:
- debug: 4.3.5(supports-color@8.1.1)
+ debug: 4.3.6(supports-color@8.1.1)
get-stream: 5.2.0
yauzl: 2.10.0
optionalDependencies:
@@ -48245,6 +48658,8 @@ snapshots:
fast-text-encoding@1.0.3: {}
+ fast-uri@3.0.1: {}
+
fast-url-parser@1.1.3:
dependencies:
punycode: 1.4.1
@@ -48440,6 +48855,18 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ finalhandler@1.3.1:
+ dependencies:
+ debug: 2.6.9
+ encodeurl: 2.0.0
+ escape-html: 1.0.3
+ on-finished: 2.4.1
+ parseurl: 1.3.3
+ statuses: 2.0.1
+ unpipe: 1.0.0
+ transitivePeerDependencies:
+ - supports-color
+
find-cache-dir@2.1.0:
dependencies:
commondir: 1.0.1
@@ -48620,7 +49047,7 @@ snapshots:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
- mime-types: 2.1.34
+ mime-types: 2.1.35
form-data@4.0.0:
dependencies:
@@ -49368,7 +49795,7 @@ snapshots:
dependencies:
'@tootallnate/once': 1.1.2
agent-base: 6.0.2
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -49383,7 +49810,7 @@ snapshots:
http-proxy-agent@6.1.1:
dependencies:
agent-base: 7.1.0
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -49461,14 +49888,14 @@ snapshots:
https-proxy-agent@4.0.0:
dependencies:
agent-base: 5.1.1
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
https-proxy-agent@5.0.0:
dependencies:
agent-base: 6.0.2
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -49482,14 +49909,14 @@ snapshots:
https-proxy-agent@6.2.1:
dependencies:
agent-base: 7.1.0
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.0
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -50017,7 +50444,7 @@ snapshots:
istanbul-lib-source-maps@4.0.0:
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
istanbul-lib-coverage: 3.2.0
source-map: 0.6.1
transitivePeerDependencies:
@@ -50091,16 +50518,16 @@ snapshots:
- babel-plugin-macros
- supports-color
- jest-cli@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-cli@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)):
dependencies:
- '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
+ '@jest/core': 29.7.0(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/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
- create-jest: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
+ create-jest: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3))
exit: 0.1.2
import-local: 3.0.2
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
+ jest-config: 29.7.0(@types/node@20.14.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
jest-validate: 29.7.0
yargs: 17.7.2
@@ -50112,16 +50539,16 @@ snapshots:
- supports-color
- ts-node
- jest-cli@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)):
+ jest-cli@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)):
dependencies:
- '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2))
+ '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
- create-jest: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2))
+ create-jest: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
exit: 0.1.2
import-local: 3.0.2
- jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2))
+ jest-config: 29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
jest-util: 29.7.0
jest-validate: 29.7.0
yargs: 17.7.2
@@ -50266,7 +50693,7 @@ snapshots:
- supports-color
optional: true
- jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)):
+ jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)):
dependencies:
'@babel/core': 7.23.9
'@jest/test-sequencer': 29.7.0
@@ -50292,12 +50719,12 @@ snapshots:
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 20.14.2
- ts-node: 10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)
+ ts-node: 10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3)
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
- jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)):
+ jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)):
dependencies:
'@babel/core': 7.23.9
'@jest/test-sequencer': 29.7.0
@@ -50323,12 +50750,12 @@ snapshots:
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 20.14.2
- ts-node: 10.9.2(@types/node@20.14.2)(typescript@5.5.3)
+ ts-node: 10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
- jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)):
+ jest-config@29.7.0(@types/node@20.14.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)):
dependencies:
'@babel/core': 7.23.9
'@jest/test-sequencer': 29.7.0
@@ -50354,7 +50781,7 @@ snapshots:
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 20.14.2
- ts-node: 10.9.2(@types/node@20.14.2)
+ ts-node: 10.9.2(@types/node@20.14.2)(typescript@5.5.3)
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -50817,6 +51244,10 @@ snapshots:
jest-webextension-mock@3.9.0: {}
+ jest-when@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))):
+ dependencies:
+ 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-when@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))):
dependencies:
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))
@@ -50857,12 +51288,12 @@ snapshots:
merge-stream: 2.0.0
supports-color: 8.1.1
- 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@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)):
dependencies:
- '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
+ '@jest/core': 29.7.0(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/types': 29.6.3
import-local: 3.0.2
- jest-cli: 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-cli: 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))
optionalDependencies:
node-notifier: 8.0.2
transitivePeerDependencies:
@@ -50871,12 +51302,12 @@ snapshots:
- supports-color
- ts-node
- jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)):
+ 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)):
dependencies:
- '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2))
+ '@jest/core': 29.7.0(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))
'@jest/types': 29.6.3
import-local: 3.0.2
- jest-cli: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2))
+ jest-cli: 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))
optionalDependencies:
node-notifier: 8.0.2
transitivePeerDependencies:
@@ -51458,7 +51889,7 @@ snapshots:
koa-send@5.0.1:
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
http-errors: 1.8.1
resolve-path: 1.4.0
transitivePeerDependencies:
@@ -51757,7 +52188,7 @@ snapshots:
log4js@6.4.1:
dependencies:
date-format: 4.0.3
- debug: 4.3.5
+ debug: 4.3.6
flatted: 3.2.4
rfdc: 1.3.0
streamroller: 3.0.2
@@ -51970,6 +52401,8 @@ snapshots:
merge-descriptors@1.0.1: {}
+ merge-descriptors@1.0.3: {}
+
merge-refs@1.2.1:
dependencies:
'@types/react': 17.0.21
@@ -53175,6 +53608,8 @@ snapshots:
dependencies:
unique-string: 2.0.0
+ path-to-regexp@0.1.10: {}
+
path-to-regexp@0.1.7: {}
path-to-regexp@1.8.0:
@@ -53755,7 +54190,7 @@ snapshots:
puppeteer-core@2.1.1:
dependencies:
'@types/mime-types': 2.1.2
- debug: 4.3.5
+ debug: 4.3.6
extract-zip: 1.7.0
https-proxy-agent: 4.0.0
mime: 2.6.0
@@ -53815,6 +54250,10 @@ snapshots:
dependencies:
side-channel: 1.0.4
+ qs@6.13.0:
+ dependencies:
+ side-channel: 1.0.6
+
querystring-es3@0.2.1: {}
querystringify@2.2.0: {}
@@ -54257,7 +54696,7 @@ snapshots:
dependencies:
object-assign: 4.1.1
react: 17.0.2
- react-is: 17.0.2
+ react-is: 18.1.0
react-side-effect@2.1.2(react@17.0.2):
dependencies:
@@ -55009,16 +55448,16 @@ snapshots:
schema-utils@4.0.0:
dependencies:
'@types/json-schema': 7.0.15
- ajv: 8.12.0
- ajv-formats: 2.1.1(ajv@8.12.0)
- ajv-keywords: 5.1.0(ajv@8.12.0)
+ ajv: 8.17.1
+ ajv-formats: 2.1.1(ajv@8.17.1)
+ ajv-keywords: 5.1.0(ajv@8.17.1)
schema-utils@4.2.0:
dependencies:
'@types/json-schema': 7.0.15
- ajv: 8.16.0
- ajv-formats: 2.1.1(ajv@8.16.0)
- ajv-keywords: 5.1.0(ajv@8.16.0)
+ ajv: 8.17.1
+ ajv-formats: 2.1.1(ajv@8.17.1)
+ ajv-keywords: 5.1.0(ajv@8.17.1)
scuid@1.1.0: {}
@@ -55092,6 +55531,24 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ send@0.19.0:
+ dependencies:
+ debug: 2.6.9
+ depd: 2.0.0
+ destroy: 1.2.0
+ encodeurl: 1.0.2
+ escape-html: 1.0.3
+ etag: 1.8.1
+ fresh: 0.5.2
+ http-errors: 2.0.0
+ mime: 1.6.0
+ ms: 2.1.3
+ on-finished: 2.4.1
+ range-parser: 1.2.1
+ statuses: 2.0.1
+ transitivePeerDependencies:
+ - supports-color
+
sentence-case@3.0.4:
dependencies:
no-case: 3.0.4
@@ -55138,6 +55595,15 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ serve-static@1.16.2:
+ dependencies:
+ encodeurl: 2.0.0
+ escape-html: 1.0.3
+ parseurl: 1.3.3
+ send: 0.19.0
+ transitivePeerDependencies:
+ - supports-color
+
serve@12.0.1:
dependencies:
'@zeit/schemas': 2.6.0
@@ -55226,6 +55692,13 @@ snapshots:
get-intrinsic: 1.2.4
object-inspect: 1.13.1
+ side-channel@1.0.6:
+ dependencies:
+ call-bind: 1.0.7
+ es-errors: 1.3.0
+ get-intrinsic: 1.2.4
+ object-inspect: 1.13.1
+
signal-exit@3.0.7: {}
signal-exit@4.1.0: {}
@@ -55348,7 +55821,7 @@ snapshots:
dependencies:
'@types/component-emitter': 1.2.11
component-emitter: 1.3.0
- debug: 4.3.5
+ debug: 4.3.6
transitivePeerDependencies:
- supports-color
@@ -55356,7 +55829,7 @@ snapshots:
dependencies:
accepts: 1.3.8
base64id: 2.0.0
- debug: 4.3.5
+ debug: 4.3.6
engine.io: 6.1.2
socket.io-adapter: 2.3.3
socket.io-parser: 4.0.4
@@ -55466,7 +55939,7 @@ snapshots:
spdy-transport@3.0.0:
dependencies:
- debug: 4.3.5
+ debug: 4.3.6
detect-node: 2.1.0
hpack.js: 2.1.6
obuf: 1.1.2
@@ -55637,7 +56110,7 @@ snapshots:
streamroller@3.0.2:
dependencies:
date-format: 4.0.3
- debug: 4.3.5
+ debug: 4.3.6
fs-extra: 10.1.0
transitivePeerDependencies:
- supports-color
@@ -55666,7 +56139,7 @@ snapshots:
dependencies:
eastasianwidth: 0.2.0
emoji-regex: 9.2.2
- strip-ansi: 7.0.1
+ strip-ansi: 7.1.0
string-width@7.2.0:
dependencies:
@@ -55744,10 +56217,6 @@ snapshots:
dependencies:
ansi-regex: 5.0.1
- strip-ansi@7.0.1:
- dependencies:
- ansi-regex: 6.0.1
-
strip-ansi@7.1.0:
dependencies:
ansi-regex: 6.0.1
@@ -55839,7 +56308,7 @@ snapshots:
dependencies:
component-emitter: 1.3.0
cookiejar: 2.1.4
- debug: 4.3.5
+ debug: 4.3.6
fast-safe-stringify: 2.1.1
form-data: 4.0.0
formidable: 2.1.1
@@ -55904,9 +56373,9 @@ snapshots:
swagger-ui-dist@5.11.2: {}
- swagger-ui-express@5.0.0(express@4.19.2):
+ swagger-ui-express@5.0.0(express@4.21.0):
dependencies:
- express: 4.19.2
+ express: 4.21.0
swagger-ui-dist: 5.11.2
swap-case@2.0.2:
@@ -56467,6 +56936,25 @@ 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):
+ 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-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.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
+
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:
bs-logger: 0.2.6
@@ -56650,14 +57138,14 @@ snapshots:
ts-log@2.2.5: {}
- ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3):
+ ts-node@10.9.2(@swc/core@1.3.92)(@types/node@20.14.2)(typescript@5.5.3):
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
- '@types/node': 22.5.2
+ '@types/node': 20.14.2
acorn: 8.10.0
acorn-walk: 8.2.0
arg: 4.1.0
@@ -56669,24 +57157,27 @@ snapshots:
yn: 3.1.1
optionalDependencies:
'@swc/core': 1.3.92
+ optional: true
- ts-node@10.9.2(@types/node@20.14.2):
+ ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3):
dependencies:
'@cspotcode/source-map-support': 0.8.1
'@tsconfig/node10': 1.0.9
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
- '@types/node': 20.14.2
- acorn: 8.12.1
+ '@types/node': 22.5.2
+ acorn: 8.10.0
acorn-walk: 8.2.0
arg: 4.1.0
create-require: 1.1.1
diff: 4.0.1
make-error: 1.3.6
+ typescript: 5.5.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
- optional: true
+ optionalDependencies:
+ '@swc/core': 1.3.92
ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3):
dependencies:
@@ -56785,7 +57276,7 @@ snapshots:
tuf-js@2.2.1:
dependencies:
'@tufjs/models': 2.0.1
- debug: 4.3.5
+ debug: 4.3.6
make-fetch-happen: 13.0.1
transitivePeerDependencies:
- supports-color
@@ -56824,7 +57315,7 @@ snapshots:
type-is@1.6.18:
dependencies:
media-typer: 0.3.0
- mime-types: 2.1.34
+ mime-types: 2.1.35
typed-array-buffer@1.0.0:
dependencies:
@@ -57068,7 +57559,7 @@ snapshots:
update-browserslist-db@1.0.13(browserslist@4.23.0):
dependencies:
browserslist: 4.23.0
- escalade: 3.1.1
+ escalade: 3.2.0
picocolors: 1.0.1
update-browserslist-db@1.1.0(browserslist@4.23.2):
@@ -57834,7 +58325,7 @@ snapshots:
compression: 1.7.4
connect-history-api-fallback: 2.0.0
default-gateway: 6.0.3
- express: 4.19.2
+ express: 4.21.0
graceful-fs: 4.2.11
html-entities: 2.5.2
http-proxy-middleware: 2.0.6(@types/express@4.17.21)
@@ -58288,7 +58779,7 @@ snapshots:
dependencies:
ansi-styles: 6.2.1
string-width: 5.1.2
- strip-ansi: 7.0.1
+ strip-ansi: 7.1.0
wrap-ansi@9.0.0:
dependencies:
@@ -58385,7 +58876,7 @@ snapshots:
yaml-language-server@1.10.0:
dependencies:
- ajv: 8.11.0
+ ajv: 8.17.1
request-light: 0.5.8
vscode-json-languageservice: 4.1.8
vscode-languageserver: 7.0.0
@@ -58468,7 +58959,7 @@ snapshots:
yargs@17.7.2:
dependencies:
cliui: 8.0.1
- escalade: 3.1.2
+ escalade: 3.2.0
get-caller-file: 2.0.5
require-directory: 2.1.1
string-width: 4.2.3
diff --git a/repo/graph.dot b/repo/graph.dot
index f94ed30c82c..9f5337da9e1 100644
--- a/repo/graph.dot
+++ b/repo/graph.dot
@@ -88,6 +88,7 @@ digraph G {
"@kie-tools/i18n-common-dictionary" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"@kie-tools/dashbuilder-viewer-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/dashbuilder-viewer-image-env" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie-tools/data-index-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"@kie-tools/dev-deployment-base-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/dev-deployment-upload-service" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/dev-deployment-dmn-form-webapp" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
@@ -125,6 +126,7 @@ digraph G {
"@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/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" ];
"@kie-tools-core/k8s-yaml-to-apiserver-requests" [ color = "purple", fontcolor = "purple", style = "rounded" ];
"kie-editors-dev-vscode-extension" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
@@ -138,6 +140,14 @@ digraph G {
"@kie-tools/online-editor" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/kn-plugin-workflow" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/sonataflow-operator" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-base-builder-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie-tools/sonataflow-image-common" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-data-index-ephemeral-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-data-index-postgresql-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-jit-runner-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-jobs-service-allinone-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-jobs-service-ephemeral-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
+ "@kie/kogito-jobs-service-postgresql-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/runtime-tools-management-console-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"@kie-tools/runtime-tools-task-console-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"@kie-tools-core/kubernetes-bridge" [ color = "purple", fontcolor = "purple", style = "rounded" ];
@@ -181,7 +191,6 @@ digraph G {
"@kie-tools/serverless-workflow-service-catalog" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"@kie-tools/serverless-workflow-language-service" [ color = "blue", fontcolor = "blue", style = "rounded" ];
"swf-vscode-extension" [ color = "blue", fontcolor = "blue", style = "rounded" ];
- "@kie-tools/sonataflow-image-common" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/sonataflow-devmode-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/sonataflow-management-console-image" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
"@kie-tools/sonataflow-management-console-image-env" [ color = "black", fontcolor = "black", style = "dashed, rounded" ];
@@ -317,6 +326,7 @@ digraph G {
"@kie-tools/dashbuilder-viewer-image" -> "@kie-tools/dashbuilder-viewer-deployment-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/dashbuilder-viewer-image" -> "@kie-tools/dashbuilder-viewer-image-env" [ style = "dashed", color = "black" ];
"@kie-tools/dashbuilder-viewer-image-env" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
+ "@kie-tools/data-index-webapp" -> "@kie-tools-core/webpack-base" [ style = "dashed", color = "blue" ];
"@kie-tools/dev-deployment-base-image" -> "@kie-tools/maven-base" [ style = "solid", color = "black" ];
"@kie-tools/dev-deployment-base-image" -> "@kie-tools/dev-deployment-upload-service" [ style = "dashed", color = "black" ];
"@kie-tools/dev-deployment-base-image" -> "@kie-tools/image-builder" [ style = "dashed", color = "black" ];
@@ -395,6 +405,7 @@ digraph G {
"@kie-tools/jbpm-quarkus-devui" -> "@kie-tools/maven-base" [ style = "solid", color = "black" ];
"@kie-tools/jbpm-quarkus-devui" -> "@kie-tools/runtime-tools-process-dev-ui-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/jest-base" -> "@kie-tools/root-env" [ style = "dashed", color = "blue" ];
+ "@kie-tools/jobs-service-webapp" -> "@kie-tools-core/webpack-base" [ style = "dashed", color = "blue" ];
"@kie-tools/json-yaml-language-service" -> "@kie-tools/yaml-language-server" [ style = "solid", color = "blue" ];
"@kie-tools-core/k8s-yaml-to-apiserver-requests" -> "@kie-tools/eslint" [ style = "dashed", color = "purple" ];
"@kie-tools-core/k8s-yaml-to-apiserver-requests" -> "@kie-tools/root-env" [ style = "dashed", color = "purple" ];
@@ -427,6 +438,13 @@ digraph G {
"@kie-tools/kie-sandbox-webapp-image" -> "@kie-tools/online-editor" [ style = "solid", color = "black" ];
"@kie-tools/kie-sandbox-webapp-image" -> "@kie-tools/image-builder" [ style = "dashed", color = "black" ];
"@kie-tools/kn-plugin-workflow" -> "@kie-tools/sonataflow-operator" [ style = "dashed", color = "black" ];
+ "@kie/kogito-base-builder-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-data-index-ephemeral-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-data-index-postgresql-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-jit-runner-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-jobs-service-allinone-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-jobs-service-ephemeral-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
+ "@kie/kogito-jobs-service-postgresql-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/image-builder" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/image-env-to-json" [ style = "dashed", color = "black" ];
"@kie-tools/kogito-management-console" -> "@kie-tools/runtime-tools-management-console-webapp" [ style = "dashed", color = "black" ];
@@ -520,14 +538,17 @@ digraph G {
"@kie-tools/serverless-logic-web-tools" -> "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools" -> "@kie-tools/sonataflow-dev-app" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-base-builder-image" -> "@kie-tools/serverless-logic-web-tools-base-builder-image-env" [ style = "dashed", color = "black" ];
+ "@kie-tools/serverless-logic-web-tools-base-builder-image" -> "@kie/kogito-base-builder-image" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-base-builder-image-env" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-builder-image" -> "@kie-tools/serverless-logic-web-tools-swf-builder-image-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-builder-image" -> "@kie-tools/sonataflow-builder-image" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-builder-image" -> "sonataflow-deployment-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-builder-image-env" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app" -> "@kie-tools/sonataflow-quarkus-devui" [ style = "solid", color = "black" ];
+ "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "@kie-tools/maven-m2-repo-via-http-image" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env" [ style = "dashed", color = "black" ];
+ "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "@kie/kogito-base-builder-image" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "sonataflow-deployment-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-workflow-combined-editor" -> "@kie-tools/serverless-workflow-diagram-editor-assets" [ style = "solid", color = "blue" ];
@@ -555,6 +576,7 @@ digraph G {
"swf-vscode-extension" -> "@kie-tools-core/webpack-base" [ style = "dashed", color = "blue" ];
"swf-vscode-extension" -> "@kie-tools/serverless-workflow-diagram-editor-assets" [ style = "dashed", color = "blue" ];
"swf-vscode-extension" -> "@kie-tools/vscode-extension-common-test-helpers" [ style = "dashed", color = "blue" ];
+ "@kie-tools/sonataflow-builder-image" -> "@kie-tools/maven-m2-repo-via-http-image" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-builder-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"sonataflow-deployment-webapp" -> "@kie-tools-core/react-hooks" [ style = "solid", color = "blue" ];
"sonataflow-deployment-webapp" -> "@kie-tools/runtime-tools-shared-webapp-components" [ style = "solid", color = "blue" ];
@@ -562,12 +584,13 @@ digraph G {
"sonataflow-deployment-webapp" -> "@kie-tools/sonataflow-dev-app" [ style = "dashed", color = "blue" ];
"@kie-tools/sonataflow-dev-app" -> "@kie-tools/eslint" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-dev-app" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-devmode-image" -> "@kie-tools/maven-m2-repo-via-http-image" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-devmode-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-devmode-image" -> "@kie-tools/sonataflow-quarkus-devui" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-image-common" -> "@kie-tools/python-venv" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-image-common" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
- "@kie-tools/sonataflow-management-console-image" -> "@kie-tools/image-builder" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image" -> "@kie-tools/image-env-to-json" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-management-console-image" -> "@kie-tools/sonataflow-image-common" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image" -> "@kie-tools/sonataflow-management-console-image-env" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image" -> "@kie-tools/sonataflow-management-console-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-management-console-image-env" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
@@ -578,6 +601,10 @@ digraph G {
"@kie-tools/sonataflow-management-console-webapp" -> "@kie-tools/sonataflow-dev-app" [ style = "dashed", color = "blue" ];
"@kie-tools/sonataflow-operator" -> "@kie-tools/sonataflow-builder-image" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-operator" -> "@kie-tools/sonataflow-devmode-image" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-operator" -> "@kie/kogito-data-index-ephemeral-image" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-operator" -> "@kie/kogito-data-index-postgresql-image" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-operator" -> "@kie/kogito-jobs-service-ephemeral-image" [ style = "dashed", color = "black" ];
+ "@kie-tools/sonataflow-operator" -> "@kie/kogito-jobs-service-postgresql-image" [ style = "dashed", color = "black" ];
"@kie-tools/sonataflow-quarkus-devui" -> "@kie-tools/serverless-workflow-dev-ui-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/storybook-base" -> "@kie-tools-core/webpack-base" [ style = "dashed", color = "blue" ];
"@kie-tools/storybook-base" -> "@kie-tools/eslint" [ style = "dashed", color = "blue" ];
diff --git a/repo/graph.json b/repo/graph.json
index 9049d67f179..fef9a5e3db9 100644
--- a/repo/graph.json
+++ b/repo/graph.json
@@ -110,6 +110,7 @@
{ "id": "@kie-tools/kie-sandbox-fs" },
{ "id": "@kie-tools/dashbuilder-viewer-image" },
{ "id": "@kie-tools/dashbuilder-viewer-image-env" },
+ { "id": "@kie-tools/data-index-webapp" },
{ "id": "@kie-tools/dev-deployment-base-image" },
{ "id": "@kie-tools/dev-deployment-upload-service" },
{ "id": "@kie-tools/dev-deployment-dmn-form-webapp" },
@@ -137,6 +138,7 @@
{ "id": "@kie-tools/import-java-classes-component" },
{ "id": "@kie-tools/runtime-tools-process-webapp-components" },
{ "id": "@kie-tools/runtime-tools-shared-webapp-components" },
+ { "id": "@kie-tools/jobs-service-webapp" },
{ "id": "@kie-tools-core/k8s-yaml-to-apiserver-requests" },
{ "id": "kie-editors-dev-vscode-extension" },
{ "id": "@kie-tools/pmml-editor" },
@@ -152,9 +154,17 @@
{ "id": "@kie-tools/sonataflow-operator" },
{ "id": "@kie-tools/sonataflow-builder-image" },
{ "id": "@kie-tools/sonataflow-devmode-image" },
+ { "id": "@kie/kogito-data-index-ephemeral-image" },
+ { "id": "@kie/kogito-data-index-postgresql-image" },
+ { "id": "@kie/kogito-jobs-service-ephemeral-image" },
+ { "id": "@kie/kogito-jobs-service-postgresql-image" },
+ { "id": "@kie/kogito-base-builder-image" },
+ { "id": "@kie-tools/sonataflow-image-common" },
+ { "id": "@kie-tools/python-venv" },
+ { "id": "@kie/kogito-jit-runner-image" },
+ { "id": "@kie/kogito-jobs-service-allinone-image" },
{ "id": "@kie-tools/unitables" },
{ "id": "pmml-vscode-extension" },
- { "id": "@kie-tools/python-venv" },
{ "id": "@kie-tools/runtime-tools-components" },
{ "id": "@kie-tools/runtime-tools-shared-gateway-api" },
{ "id": "@kie-tools/runtime-tools-consoles-helm-chart" },
@@ -178,7 +188,6 @@
{ "id": "@kie-tools/serverless-logic-web-tools-base-builder-image" },
{ "id": "@kie-tools/serverless-logic-web-tools-swf-builder-image" },
{ "id": "sonataflow-deployment-webapp" },
- { "id": "@kie-tools/sonataflow-image-common" },
{
"id": "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app"
},
@@ -1376,6 +1385,11 @@
"target": "@kie-tools/root-env",
"weight": 1
},
+ {
+ "source": "@kie-tools/data-index-webapp",
+ "target": "@kie-tools-core/webpack-base",
+ "weight": 1
+ },
{
"source": "@kie-tools/dev-deployment-base-image",
"target": "@kie-tools/maven-base",
@@ -1696,6 +1710,11 @@
"target": "@kie-tools/runtime-tools-components",
"weight": 1
},
+ {
+ "source": "@kie-tools/jobs-service-webapp",
+ "target": "@kie-tools-core/webpack-base",
+ "weight": 1
+ },
{
"source": "@kie-tools-core/k8s-yaml-to-apiserver-requests",
"target": "@kie-tools/eslint",
@@ -1901,11 +1920,41 @@
"target": "@kie-tools/sonataflow-devmode-image",
"weight": 1
},
+ {
+ "source": "@kie-tools/sonataflow-operator",
+ "target": "@kie/kogito-data-index-ephemeral-image",
+ "weight": 1
+ },
+ {
+ "source": "@kie-tools/sonataflow-operator",
+ "target": "@kie/kogito-data-index-postgresql-image",
+ "weight": 1
+ },
+ {
+ "source": "@kie-tools/sonataflow-operator",
+ "target": "@kie/kogito-jobs-service-ephemeral-image",
+ "weight": 1
+ },
+ {
+ "source": "@kie-tools/sonataflow-operator",
+ "target": "@kie/kogito-jobs-service-postgresql-image",
+ "weight": 1
+ },
+ {
+ "source": "@kie-tools/sonataflow-builder-image",
+ "target": "@kie-tools/maven-m2-repo-via-http-image",
+ "weight": 1
+ },
{
"source": "@kie-tools/sonataflow-builder-image",
"target": "@kie-tools/sonataflow-image-common",
"weight": 1
},
+ {
+ "source": "@kie-tools/sonataflow-devmode-image",
+ "target": "@kie-tools/maven-m2-repo-via-http-image",
+ "weight": 1
+ },
{
"source": "@kie-tools/sonataflow-devmode-image",
"target": "@kie-tools/sonataflow-image-common",
@@ -1916,6 +1965,51 @@
"target": "@kie-tools/sonataflow-quarkus-devui",
"weight": 1
},
+ {
+ "source": "@kie/kogito-data-index-ephemeral-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
+ {
+ "source": "@kie/kogito-data-index-postgresql-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
+ {
+ "source": "@kie/kogito-jobs-service-ephemeral-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
+ {
+ "source": "@kie/kogito-jobs-service-postgresql-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
+ {
+ "source": "@kie/kogito-base-builder-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
+ {
+ "source": "@kie-tools/sonataflow-image-common",
+ "target": "@kie-tools/python-venv",
+ "weight": 1
+ },
+ {
+ "source": "@kie-tools/sonataflow-image-common",
+ "target": "@kie-tools/root-env",
+ "weight": 1
+ },
+ {
+ "source": "@kie/kogito-jit-runner-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
+ {
+ "source": "@kie/kogito-jobs-service-allinone-image",
+ "target": "@kie-tools/sonataflow-image-common",
+ "weight": 1
+ },
{
"source": "@kie-tools/unitables",
"target": "@kie-tools/boxed-expression-component",
@@ -2206,6 +2300,11 @@
"target": "@kie-tools/serverless-logic-web-tools-base-builder-image-env",
"weight": 1
},
+ {
+ "source": "@kie-tools/serverless-logic-web-tools-base-builder-image",
+ "target": "@kie/kogito-base-builder-image",
+ "weight": 1
+ },
{
"source": "@kie-tools/serverless-logic-web-tools-swf-builder-image",
"target": "@kie-tools/serverless-logic-web-tools-swf-builder-image-env",
@@ -2242,28 +2341,28 @@
"weight": 1
},
{
- "source": "@kie-tools/sonataflow-image-common",
- "target": "@kie-tools/python-venv",
+ "source": "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app",
+ "target": "@kie-tools/sonataflow-quarkus-devui",
"weight": 1
},
{
- "source": "@kie-tools/sonataflow-image-common",
- "target": "@kie-tools/root-env",
+ "source": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image",
+ "target": "@kie-tools/maven-m2-repo-via-http-image",
"weight": 1
},
{
- "source": "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app",
- "target": "@kie-tools/sonataflow-quarkus-devui",
+ "source": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image",
+ "target": "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app",
"weight": 1
},
{
"source": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image",
- "target": "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app",
+ "target": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env",
"weight": 1
},
{
"source": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image",
- "target": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env",
+ "target": "@kie/kogito-base-builder-image",
"weight": 1
},
{
@@ -2338,12 +2437,12 @@
},
{
"source": "@kie-tools/sonataflow-management-console-image",
- "target": "@kie-tools/image-builder",
+ "target": "@kie-tools/image-env-to-json",
"weight": 1
},
{
"source": "@kie-tools/sonataflow-management-console-image",
- "target": "@kie-tools/image-env-to-json",
+ "target": "@kie-tools/sonataflow-image-common",
"weight": 1
},
{
@@ -2514,6 +2613,7 @@
["@kie-tools/dashbuilder-viewer-deployment-webapp", "packages/dashbuilder-viewer-deployment-webapp"],
["@kie-tools/dashbuilder-viewer-image", "packages/dashbuilder-viewer-image"],
["@kie-tools/dashbuilder-viewer-image-env", "packages/dashbuilder-viewer-image-env"],
+ ["@kie-tools/data-index-webapp", "packages/data-index-webapp"],
["@kie-tools/dev-deployment-base-image", "packages/dev-deployment-base-image"],
["@kie-tools/dev-deployment-dmn-form-webapp", "packages/dev-deployment-dmn-form-webapp"],
["@kie-tools/dev-deployment-dmn-form-webapp-image", "packages/dev-deployment-dmn-form-webapp-image"],
@@ -2552,6 +2652,7 @@
["@kie-tools/import-java-classes-component", "packages/import-java-classes-component"],
["@kie-tools/jbpm-quarkus-devui", "packages/jbpm-quarkus-devui"],
["@kie-tools/jest-base", "packages/jest-base"],
+ ["@kie-tools/jobs-service-webapp", "packages/jobs-service-webapp"],
["@kie-tools/json-yaml-language-service", "packages/json-yaml-language-service"],
["@kie-tools-core/k8s-yaml-to-apiserver-requests", "packages/k8s-yaml-to-apiserver-requests"],
["@kie-tools-core/keyboard-shortcuts", "packages/keyboard-shortcuts"],
@@ -2564,6 +2665,13 @@
["@kie-tools/kie-sandbox-helm-chart", "packages/kie-sandbox-helm-chart"],
["@kie-tools/kie-sandbox-webapp-image", "packages/kie-sandbox-webapp-image"],
["@kie-tools/kn-plugin-workflow", "packages/kn-plugin-workflow"],
+ ["@kie/kogito-base-builder-image", "packages/kogito-base-builder-image"],
+ ["@kie/kogito-data-index-ephemeral-image", "packages/kogito-data-index-ephemeral-image"],
+ ["@kie/kogito-data-index-postgresql-image", "packages/kogito-data-index-postgresql-image"],
+ ["@kie/kogito-jit-runner-image", "packages/kogito-jit-runner-image"],
+ ["@kie/kogito-jobs-service-allinone-image", "packages/kogito-jobs-service-allinone-image"],
+ ["@kie/kogito-jobs-service-ephemeral-image", "packages/kogito-jobs-service-ephemeral-image"],
+ ["@kie/kogito-jobs-service-postgresql-image", "packages/kogito-jobs-service-postgresql-image"],
["@kie-tools/kogito-management-console", "packages/kogito-management-console"],
["@kie-tools/kogito-task-console", "packages/kogito-task-console"],
["@kie-tools-core/kubernetes-bridge", "packages/kubernetes-bridge"],
diff --git a/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs b/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
index 02f725435a8..6930f85d62f 100755
--- a/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
+++ b/scripts/bootstrap/check_required_preinstalled_cli_commands.mjs
@@ -34,6 +34,7 @@ const argsByCommand = new Map([
["python3", ["--version"]],
["pip3", ["--version"]],
["s2i", ["version"]],
+ ["xmllint", ["-version"]],
]);
async function main() {
diff --git a/scripts/check-junit-report-results/tests/index.test.js b/scripts/check-junit-report-results/tests/index.test.js
index 5838520b957..8052a80fd46 100644
--- a/scripts/check-junit-report-results/tests/index.test.js
+++ b/scripts/check-junit-report-results/tests/index.test.js
@@ -2,6 +2,16 @@ const parseFile = require("../src/parseFile");
const path = require("path");
describe("Parsing", () => {
+ test("empty", () => {
+ const failed = [];
+ const passed = [];
+
+ parseFile(path.join(__dirname, "./reports/empty.xml"), failed, passed);
+
+ expect(failed.length).toStrictEqual(0);
+ expect(passed.length).toStrictEqual(0);
+ });
+
test("cypress", () => {
const failed = [];
const passed = [];
diff --git a/scripts/check-junit-report-results/tests/reports/empty.xml b/scripts/check-junit-report-results/tests/reports/empty.xml
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/scripts/update-kogito-version/update_kogito_version.js b/scripts/update-kogito-version/update_kogito_version.js
index eff803cf607..df2396eb796 100755
--- a/scripts/update-kogito-version/update_kogito_version.js
+++ b/scripts/update-kogito-version/update_kogito_version.js
@@ -22,16 +22,15 @@ const path = require("path");
const execSync = require("child_process").execSync;
const newMavenVersion = process.argv[3];
-const newImagesTag = process.argv[5];
if (!newMavenVersion) {
- console.error("Usage 'node update_kogito_version.js --maven [version] --images-tag [tag]'");
+ console.error("Usage 'node update_kogito_version.js --maven [version]");
return 1;
}
-if (process.argv[2] !== "--maven" || process.argv[4] !== "--images-tag") {
+if (process.argv[2] !== "--maven") {
console.error("Arguments need to be passed in the correct order.");
console.error(`Argv: ${process.argv.join(", ")}`);
- console.error("Usage 'node update_kogito_version.js --maven [version] --images-tag [tag]'");
+ console.error("Usage 'node update_kogito_version.js --maven [version]");
process.exit(1);
}
@@ -50,56 +49,13 @@ try {
)
);
- console.info("[update-kogito-version] Updating 'serverless-logic-web-tools-base-builder-image/env/index.js'...");
- const serverlessLogicWebToolsBaseBuilderImageEnvPath = path.resolve(
- __dirname,
- "../../packages/serverless-logic-web-tools-base-builder-image/env/index.js"
- );
- fs.writeFileSync(
- serverlessLogicWebToolsBaseBuilderImageEnvPath,
- fs
- .readFileSync(serverlessLogicWebToolsBaseBuilderImageEnvPath, "utf-8")
- .replace(
- /SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag:[\s\n]*{[\s\n]*default:[\s\n]*".*"/,
- `SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderKogitoImageTag: {\n default: "${newImagesTag}"`
- )
- );
-
- console.info(
- "[update-kogito-version] Updating 'packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js'..."
- );
- const serverlessLogicWebToolsSwfDevModeImageEnvPath = path.resolve(
- __dirname,
- "../../packages/serverless-logic-web-tools-swf-dev-mode-image/env/index.js"
- );
- fs.writeFileSync(
- serverlessLogicWebToolsSwfDevModeImageEnvPath,
- fs
- .readFileSync(serverlessLogicWebToolsSwfDevModeImageEnvPath, "utf-8")
- .replace(
- /SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag:[\s\n]*{[\s\n]*default:[\s\n]*".*"/,
- `SERVERLESS_LOGIC_WEB_TOOLS_DEVMODE_IMAGE__kogitoBaseBuilderImageTag: {\n default: "${newImagesTag}"`
- )
- );
-
- console.info("[update-kogito-version] Updating 'packages/sonataflow-operator/version/version.go'...");
- const sonataflowOperatorVersionsGo = path.resolve(__dirname, "../../packages/sonataflow-operator/version/version.go");
- fs.writeFileSync(
- sonataflowOperatorVersionsGo,
- fs
- .readFileSync(sonataflowOperatorVersionsGo, "utf-8")
- .replace(/kogitoImagesTagVersion = ".*"/, `kogitoImagesTagVersion = "${newImagesTag}"`)
- );
-
console.info(`[update-kogito-version] Bootstrapping with updated Kogito version...`);
execSync(`pnpm bootstrap`, execOpts);
console.info(`[update-kogito-version] Formatting files...`);
execSync(`pnpm pretty-quick`, execOpts);
- console.info(
- `[update-kogito-version] Updated Kogito to '${newMavenVersion}' (Maven) and '${newImagesTag}' (Images tag).`
- );
+ console.info(`[update-kogito-version] Updated Kogito to '${newMavenVersion}' (Maven)`);
console.info(`[update-kogito-version] Done.`);
} catch (error) {
console.error(error);