diff --git a/packages/runtime-tools-process-dev-ui-webapp/package.json b/packages/runtime-tools-process-dev-ui-webapp/package.json index 88bb5429365..2ea9b30646f 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/package.json +++ b/packages/runtime-tools-process-dev-ui-webapp/package.json @@ -90,6 +90,7 @@ "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 2abfee455ce..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,10 +49,10 @@ { id: "saravana", groups: [] }, { id: "john", groups: [] }, ], - quarkusAppOrigin: "http://localhost:9027", + 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/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/pnpm-lock.yaml b/pnpm-lock.yaml index 97d5df8511a..b28ce996939 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -861,13 +861,13 @@ importers: version: 1.67.0 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) + version: 29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3)) jest-junit: specifier: ^16.0.0 version: 16.0.0 jest-when: specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))) + version: 3.6.0(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3))) rimraf: specifier: ^3.0.2 version: 3.0.2 @@ -876,7 +876,7 @@ importers: version: 0.0.2 ts-jest: specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) + version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -4140,7 +4140,7 @@ importers: version: link:../tsconfig '@testing-library/jest-dom': specifier: ^6.4.6 - version: 6.4.6(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3))) + version: 6.4.6(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))) '@testing-library/react': specifier: ^12.1.5 version: 12.1.5(react-dom@17.0.2(react@17.0.2))(react@17.0.2) @@ -4167,7 +4167,7 @@ importers: version: 2.4.1 jest: 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)(typescript@5.5.3)) + version: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) jest-environment-jsdom: specifier: ^29.7.0 version: 29.7.0 @@ -4176,13 +4176,13 @@ importers: version: 16.0.0 jest-when: specifier: ^3.6.0 - version: 3.6.0(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3))) + version: 3.6.0(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3))) rimraf: specifier: ^3.0.2 version: 3.0.2 ts-jest: specifier: ^29.1.5 - version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@22.5.2)(typescript@5.5.3)))(typescript@5.5.3) + version: 29.1.5(@babel/core@7.16.12)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.16.12))(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))(typescript@5.5.3) typescript: specifier: ^5.5.3 version: 5.5.3 @@ -7551,6 +7551,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)) @@ -7718,7 +7721,7 @@ importers: version: 2.3.0(react@17.0.2) react-json-view: specifier: ^1.21.3 - version: 1.21.3(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) + version: 1.21.3(@types/react@17.0.21)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) react-moment: specifier: 0.9.7 version: 0.9.7(moment@2.29.4)(prop-types@15.8.1)(react@17.0.2) @@ -8033,7 +8036,7 @@ importers: version: 2.3.0(react@17.0.2) react-json-view: specifier: ^1.21.3 - version: 1.21.3(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) + version: 1.21.3(@types/react@17.0.21)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) react-moment: specifier: 0.9.7 version: 0.9.7(moment@2.29.4)(prop-types@15.8.1)(react@17.0.2) @@ -30954,7 +30957,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 @@ -30965,7 +30968,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 @@ -42242,6 +42245,21 @@ snapshots: lz-string: 1.5.0 pretty-format: 27.5.1 + '@testing-library/jest-dom@6.4.6(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)))': + dependencies: + '@adobe/css-tools': 4.4.0 + '@babel/runtime': 7.23.6 + aria-query: 5.1.3 + chalk: 3.0.0 + css.escape: 1.5.1 + dom-accessibility-api: 0.6.3 + lodash: 4.17.21 + redent: 3.0.0 + optionalDependencies: + '@jest/globals': 29.7.0 + '@types/jest': 29.5.12 + jest: 29.7.0(@types/node@20.14.2)(node-notifier@8.0.2)(ts-node@10.9.2(@types/node@20.14.2)(typescript@5.5.3)) + '@testing-library/jest-dom@6.4.6(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@22.5.2)(node-notifier@8.0.2)(ts-node@10.9.2(@swc/core@1.3.92)(@types/node@22.5.2)(typescript@5.5.3)))': dependencies: '@adobe/css-tools': 4.4.0 @@ -43366,9 +43384,9 @@ snapshots: webpack: 5.94.0(webpack-cli@4.10.0) webpack-cli: 4.10.0(webpack-bundle-analyzer@4.10.2)(webpack-dev-server@4.15.1)(webpack@5.94.0) - '@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack@5.94.0(webpack-cli@4.10.0))': + '@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0))': dependencies: - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0) webpack-cli: 4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0) '@webpack-cli/configtest@1.2.0(webpack-cli@4.10.0(webpack@5.94.0))(webpack@5.94.0(webpack-cli@4.10.0))': @@ -48336,6 +48354,12 @@ snapshots: transitivePeerDependencies: - encoding + fbemitter@3.0.0(encoding@0.1.13): + dependencies: + fbjs: 3.0.2(encoding@0.1.13) + transitivePeerDependencies: + - encoding + fbjs-css-vars@1.0.2: {} fbjs@3.0.2: @@ -48581,6 +48605,14 @@ snapshots: flow-parser@0.218.0: {} + flux@4.0.3(encoding@0.1.13)(react@17.0.2): + dependencies: + fbemitter: 3.0.0(encoding@0.1.13) + fbjs: 3.0.2(encoding@0.1.13) + react: 17.0.2 + transitivePeerDependencies: + - encoding + flux@4.0.3(react@17.0.2): dependencies: fbemitter: 3.0.0 @@ -54163,6 +54195,18 @@ snapshots: react-is@18.1.0: {} + react-json-view@1.21.3(@types/react@17.0.21)(encoding@0.1.13)(react-dom@17.0.2(react@17.0.2))(react@17.0.2): + dependencies: + flux: 4.0.3(encoding@0.1.13)(react@17.0.2) + react: 17.0.2 + react-base16-styling: 0.6.0 + react-dom: 17.0.2(react@17.0.2) + react-lifecycles-compat: 3.0.4 + react-textarea-autosize: 8.3.3(@types/react@17.0.21)(react@17.0.2) + transitivePeerDependencies: + - '@types/react' + - encoding + react-json-view@1.21.3(@types/react@17.0.21)(react-dom@17.0.2(react@17.0.2))(react@17.0.2): dependencies: flux: 4.0.3(react@17.0.2) @@ -54272,7 +54316,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: @@ -57668,7 +57712,7 @@ snapshots: webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0): dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack@5.94.0(webpack-cli@4.10.0)) + '@webpack-cli/configtest': 1.2.0(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0)) '@webpack-cli/info': 1.5.0(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0)) '@webpack-cli/serve': 1.7.0(webpack-cli@4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0))(webpack-dev-server@4.15.1(webpack-cli@4.10.0)(webpack@5.94.0)) colorette: 2.0.16 @@ -57678,7 +57722,7 @@ snapshots: import-local: 3.0.2 interpret: 2.2.0 rechoir: 0.7.0 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0) webpack-merge: 5.9.0 optionalDependencies: webpack-dev-server: 4.15.1(webpack-cli@4.10.0)(webpack@5.94.0) @@ -57699,14 +57743,14 @@ snapshots: webpack: 5.94.0(webpack-cli@4.10.0) webpack-merge: 5.9.0 - webpack-dev-middleware@5.3.3(webpack@5.94.0(webpack-cli@4.10.0)): + webpack-dev-middleware@5.3.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0)): dependencies: colorette: 2.0.20 memfs: 3.5.1 mime-types: 2.1.34 range-parser: 1.2.1 schema-utils: 4.2.0 - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0) webpack-dev-middleware@5.3.3(webpack@5.94.0): dependencies: @@ -57798,10 +57842,10 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 5.3.3(webpack@5.94.0(webpack-cli@4.10.0)) + webpack-dev-middleware: 5.3.3(webpack@5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0)) ws: 8.18.0 optionalDependencies: - webpack: 5.94.0(webpack-cli@4.10.0) + webpack: 5.94.0(@swc/core@1.3.92)(webpack-cli@4.10.0) webpack-cli: 4.10.0(webpack-dev-server@4.15.1)(webpack@5.94.0) transitivePeerDependencies: - bufferutil