diff --git a/packages/sonataflow-management-console-image-env/README.md b/packages/sonataflow-management-console-image-env/README.md new file mode 100644 index 00000000000..11a5219be65 --- /dev/null +++ b/packages/sonataflow-management-console-image-env/README.md @@ -0,0 +1,48 @@ + + +## @kie-tools/sonataflow-management-console-image-env + +--- + +Apache KIE (incubating) is an effort undergoing incubation at The Apache Software +Foundation (ASF), sponsored by the name of Apache Incubator. Incubation is +required of all newly accepted projects until a further review indicates that +the infrastructure, communications, and decision making process have stabilized +in a manner consistent with other successful ASF projects. While incubation +status is not necessarily a reflection of the completeness or stability of the +code, it does indicate that the project has yet to be fully endorsed by the ASF. + +Some of the incubating project’s releases may not be fully compliant with ASF +policy. For example, releases may have incomplete or un-reviewed licensing +conditions. What follows is a list of known issues the project is currently +aware of (note that this list, by definition, is likely to be incomplete): + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may be missing the ASF Licensing Header +- + +- Hibernate, an LGPL project, is being used. Hibernate is in the process of + relicensing to ASL v2 +- Some files, particularly test files, and those not supporting comments, may + be missing the ASF Licensing Header + +If you are planning to incorporate this work into your product/project, please +be aware that you will need to conduct a thorough licensing review to determine +the overall implications of including this work. For the current status of this +project through the Apache Incubator visit: +https://incubator.apache.org/projects/kie.html diff --git a/packages/sonataflow-management-console-image-env/env/index.js b/packages/sonataflow-management-console-image-env/env/index.js new file mode 100644 index 00000000000..c27ae69d323 --- /dev/null +++ b/packages/sonataflow-management-console-image-env/env/index.js @@ -0,0 +1,58 @@ +/* + * 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"); + +const rootEnv = require("@kie-tools/root-env/env"); + +module.exports = composeEnv([rootEnv], { + vars: varsWithName({ + SONATAFLOW_MANAGEMENT_CONSOLE__registry: { + default: "docker.io", + description: "E.g., `docker.io` or `quay.io`.", + }, + SONATAFLOW_MANAGEMENT_CONSOLE__account: { + default: "apache", + description: "E.g,. `apache` or `kie-tools-bot`", + }, + SONATAFLOW_MANAGEMENT_CONSOLE__name: { + default: "incubator-kie-sonataflow-management-console", + description: "Name of the image itself.", + }, + SONATAFLOW_MANAGEMENT_CONSOLE__buildTag: { + default: rootEnv.env.root.streamName, + description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0", + }, + SONATAFLOW_MANAGEMENT_CONSOLE__port: { + default: 8080, + description: "The internal container port.", + }, + }), + get env() { + return { + sonataflowManagementConsoleImageEnv: { + registry: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__registry), + account: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__account), + name: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__name), + buildTag: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__buildTag), + port: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__port), + }, + }; + }, +}); diff --git a/packages/sonataflow-management-console-image-env/package.json b/packages/sonataflow-management-console-image-env/package.json new file mode 100644 index 00000000000..2cafc6cae67 --- /dev/null +++ b/packages/sonataflow-management-console-image-env/package.json @@ -0,0 +1,18 @@ +{ + "private": true, + "name": "@kie-tools/sonataflow-management-console-image-env", + "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" + }, + "devDependencies": { + "@kie-tools/root-env": "workspace:*" + } +} diff --git a/packages/sonataflow-management-console-image/env/index.js b/packages/sonataflow-management-console-image/env/index.js index c4f30e8c6f9..f6ac7101201 100644 --- a/packages/sonataflow-management-console-image/env/index.js +++ b/packages/sonataflow-management-console-image/env/index.js @@ -21,37 +21,11 @@ const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/b const rootEnv = require("@kie-tools/root-env/env"); -module.exports = composeEnv([rootEnv], { - vars: varsWithName({ - SONATAFLOW_MANAGEMENT_CONSOLE__registry: { - default: "docker.io", - description: "E.g., `docker.io` or `quay.io`.", - }, - SONATAFLOW_MANAGEMENT_CONSOLE__account: { - default: "apache", - description: "E.g,. `apache` or `kie-tools-bot`", - }, - SONATAFLOW_MANAGEMENT_CONSOLE__name: { - default: "incubator-kie-sonataflow-management-console", - description: "Name of the image itself.", - }, - SONATAFLOW_MANAGEMENT_CONSOLE__buildTag: { - default: rootEnv.env.root.streamName, - description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0", - }, - SONATAFLOW_MANAGEMENT_CONSOLE__port: { - default: 8080, - description: "The internal container port.", - }, - }), +module.exports = composeEnv([rootEnv, require("@kie-tools/sonataflow-management-console-image-env/env")], { + vars: varsWithName({}), get env() { return { sonataflowManagementConsoleImage: { - registry: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__registry), - account: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__account), - name: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__name), - buildTag: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__buildTag), - port: getOrDefault(this.vars.SONATAFLOW_MANAGEMENT_CONSOLE__port), version: require("../package.json").version, }, }; diff --git a/packages/sonataflow-management-console-image/package.json b/packages/sonataflow-management-console-image/package.json index 58e081db562..7d2f34500b9 100644 --- a/packages/sonataflow-management-console-image/package.json +++ b/packages/sonataflow-management-console-image/package.json @@ -24,12 +24,13 @@ "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 sonataflowManagementConsoleImage.registry)\" -a \"$(build-env sonataflowManagementConsoleImage.account)\" -n \"$(build-env sonataflowManagementConsoleImage.name)\" -t \"$(build-env sonataflowManagementConsoleImage.buildTag)\" --build-arg SONATAFLOW_MANAGEMENT_CONSOLE_PORT=\"$(build-env sonataflowManagementConsoleImage.port)\"" + "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)\"" }, "devDependencies": { "@kie-tools/image-builder": "workspace:*", "@kie-tools/image-env-to-json": "workspace:*", "@kie-tools/root-env": "workspace:*", + "@kie-tools/sonataflow-management-console-image-env": "workspace:*", "@kie-tools/sonataflow-management-console-webapp": "workspace:*", "rimraf": "^3.0.2", "run-script-os": "^1.1.6", diff --git a/packages/sonataflow-management-console-webapp/webpack.config.ts b/packages/sonataflow-management-console-webapp/webpack.config.ts index d0f297368c6..64b6a69f93c 100644 --- a/packages/sonataflow-management-console-webapp/webpack.config.ts +++ b/packages/sonataflow-management-console-webapp/webpack.config.ts @@ -184,7 +184,7 @@ export default async (env: any, argv: any) => { host: buildEnv.sonataflowManagementConsoleWebapp.host, port: buildEnv.sonataflowManagementConsoleWebapp.port, compress: true, - historyApiFallback: true, + historyApiFallback: false, hot: true, client: { overlay: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c56d632fc56..390964b20a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10737,6 +10737,9 @@ importers: '@kie-tools/root-env': specifier: workspace:* version: link:../root-env + '@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 @@ -10750,6 +10753,12 @@ importers: specifier: ^1.1.2 version: 1.1.2 + packages/sonataflow-management-console-image-env: + devDependencies: + '@kie-tools/root-env': + specifier: workspace:* + version: link:../root-env + packages/sonataflow-management-console-webapp: dependencies: '@kie-tools-core/editor': diff --git a/repo/graph.dot b/repo/graph.dot index de6ebe57aec..4933e4f5aaa 100644 --- a/repo/graph.dot +++ b/repo/graph.dot @@ -182,6 +182,7 @@ digraph G { "@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" ]; "@kie-tools/sonataflow-management-console-webapp" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/stunner-editors-dmn-loader" [ color = "blue", fontcolor = "blue", style = "rounded" ]; "@kie-tools/unitables" [ color = "blue", fontcolor = "blue", style = "rounded" ]; @@ -560,7 +561,9 @@ digraph G { "@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-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" ]; "@kie-tools/sonataflow-management-console-webapp" -> "@kie-tools-core/react-hooks" [ style = "solid", color = "blue" ]; "@kie-tools/sonataflow-management-console-webapp" -> "@kie-tools/runtime-tools-process-webapp-components" [ style = "solid", color = "blue" ]; "@kie-tools/sonataflow-management-console-webapp" -> "@kie-tools/runtime-tools-shared-webapp-components" [ style = "solid", color = "blue" ]; diff --git a/repo/graph.json b/repo/graph.json index c5a31bfefe6..4076cf754cf 100644 --- a/repo/graph.json +++ b/repo/graph.json @@ -189,6 +189,7 @@ { "id": "@kie-tools/serverless-workflow-service-catalog" }, { "id": "swf-vscode-extension" }, { "id": "@kie-tools/sonataflow-management-console-image" }, + { "id": "@kie-tools/sonataflow-management-console-image-env" }, { "id": "@kie-tools/sonataflow-management-console-webapp" }, { "id": "vscode-extension-dashbuilder-editor" }, { "id": "vscode-extension-kie-ba-bundle" }, @@ -2328,11 +2329,21 @@ "target": "@kie-tools/image-env-to-json", "weight": 1 }, + { + "source": "@kie-tools/sonataflow-management-console-image", + "target": "@kie-tools/sonataflow-management-console-image-env", + "weight": 1 + }, { "source": "@kie-tools/sonataflow-management-console-image", "target": "@kie-tools/sonataflow-management-console-webapp", "weight": 1 }, + { + "source": "@kie-tools/sonataflow-management-console-image-env", + "target": "@kie-tools/root-env", + "weight": 1 + }, { "source": "@kie-tools/sonataflow-management-console-webapp", "target": "@kie-tools-core/react-hooks", @@ -2617,6 +2628,7 @@ ["@kie-tools/sonataflow-devmode-image", "packages/sonataflow-devmode-image"], ["@kie-tools/sonataflow-image-common", "packages/sonataflow-image-common"], ["@kie-tools/sonataflow-management-console-image", "packages/sonataflow-management-console-image"], + ["@kie-tools/sonataflow-management-console-image-env", "packages/sonataflow-management-console-image-env"], ["@kie-tools/sonataflow-management-console-webapp", "packages/sonataflow-management-console-webapp"], ["@kie-tools/sonataflow-mock-server", "packages/sonataflow-mock-server"], ["@kie-tools/sonataflow-operator", "packages/sonataflow-operator"],