From d6d7c386444ab7affdfad740db149b105a992c51 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Tue, 1 Oct 2024 16:11:51 -0400 Subject: [PATCH] env and more stuff --- .../webpack.config.js | 9 +- .../webpack.config.js | 10 +- .../webpack.config.js | 7 +- .../mvn.bootstrap.js | 4 +- .../mvn.bootstrap.js | 8 +- .../mvn.bootstrap.js | 4 +- .../webpack.config.js | 10 +- .../uniforms-patternfly/webpack.config.js | 7 +- examples/webapp/webpack.config.js | 7 +- .../playwright.config.ts | 4 +- .../bpmn-vscode-extension/webpack.config.js | 12 +- .../install.js | 4 +- .../webpack.config.js | 19 ++- .../e2e-tests/tests/SwfFullScreenTest.ts | 4 +- .../e2e-tests/tests/SwfTest.ts | 4 +- .../install.js | 4 +- .../webpack.config.js | 17 ++- packages/cors-proxy/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../dev-webapp/webpack.config.js | 5 +- .../webpack.config.js | 7 +- .../dev-webapp/webpack.config.js | 4 +- packages/dashbuilder/mvn.bootstrap.js | 4 +- packages/data-index-webapp/webpack.config.js | 7 +- .../mvn.bootstrap.js | 4 +- .../dev-webapp/start.js | 14 +- .../webpack.config.ts | 4 +- .../install.js | 4 +- .../package.json | 3 +- .../mvn.bootstrap.js | 8 +- .../pom.xml | 38 +++-- .../scripts/runTestServers.js | 8 +- .../tests/integrationTest.test.js | 8 +- .../dmn-editor-standalone/webpack.config.js | 7 +- .../webpack.envelope-config.js | 4 +- packages/dmn-editor/playwright.config.ts | 4 +- .../src/index.ts | 4 +- packages/dmn-testing-models/mvn.bootstrap.js | 4 +- .../dmn-vscode-extension/webpack.config.js | 12 +- .../extended-services-java/mvn.bootstrap.js | 8 +- .../webpack.config.js | 10 +- .../showcase/webpack.config.js | 9 +- .../form-generation-tool/webpack.config.js | 4 +- packages/image-env-to-json/webpack.config.js | 4 +- .../showcase/webpack.config.js | 7 +- packages/jbpm-quarkus-devui/mvn.bootstrap.js | 4 +- .../jobs-service-webapp/webpack.config.js | 7 +- .../webpack.config.js | 10 +- .../e2e-tests/webpack.config.js | 7 +- .../webpack.build-resources.config.js | 6 +- .../webpack.package-resources.config.js | 7 +- .../e2e-tests/helper_test.go | 11 +- packages/kn-plugin-workflow/package.json | 1 + packages/kogito-base-builder-image/install.js | 8 +- .../install.js | 11 +- .../install.js | 11 +- packages/kogito-jit-runner-image/install.js | 8 +- .../install.js | 11 +- .../install.js | 11 +- .../install.js | 11 +- packages/maven-base/mvn.bootstrap.js | 8 +- packages/maven-base/package.json | 8 +- packages/maven-base/pom.xml | 132 +++++++++++------- .../online-editor/build/defaultEnvJson.ts | 6 +- packages/online-editor/playwright.config.ts | 4 +- packages/online-editor/webpack.config.ts | 6 +- .../pmml-editor/dev-webapp/webpack.config.js | 7 +- .../pmml-vscode-extension/webpack.config.js | 12 +- .../build/defaultEnvJson.js | 7 +- .../webpack.config.js | 10 +- .../webpack.config.js | 17 ++- .../build/defaultEnvJson.js | 6 +- .../webpack.config.js | 10 +- packages/scesim-editor/playwright.config.ts | 4 +- .../mvn.bootstrap.js | 8 +- .../package.json | 2 +- .../pom.xml | 41 +++--- .../install.js | 4 +- .../build/defaultEnvJson.ts | 1 - .../webpack.config.ts | 7 +- .../dev-webapp/webpack.config.js | 7 +- .../webpack.config.js | 7 +- .../mvn.bootstrap.js | 4 +- .../pom.xml | 38 +++-- .../webpack.build-resources.config.js | 6 +- .../webpack.editor-resources.config.js | 4 +- .../webpack.package-resources.config.js | 7 +- .../dev-webapp/webpack.config.js | 7 +- .../webpack.config.js | 12 +- packages/sonataflow-builder-image/install.js | 8 +- .../webpack.config.js | 7 +- packages/sonataflow-devmode-image/install.js | 8 +- packages/sonataflow-image-common/install.js | 4 +- .../build/defaultEnvJson.ts | 1 - .../webpack.config.ts | 4 +- packages/sonataflow-operator/install.js | 7 +- .../sonataflow-quarkus-devui/mvn.bootstrap.js | 4 +- .../webpack.config.js | 7 +- packages/stunner-editors/mvn.bootstrap.js | 6 +- packages/stunner-editors/pom.xml | 37 +++-- .../webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../webpack.config.js | 12 +- .../webpack.config.js | 4 +- .../webpack.config.js | 4 +- .../mvn.bootstrap.js | 4 +- .../webpack-base/webpack.common.config.d.ts | 2 +- .../webpack-base/webpack.common.config.js | 12 +- .../yard-editor/dev-webapp/webpack.config.js | 7 +- packages/yard-model/mvn.bootstrap.js | 4 +- .../yard-validator-worker/mvn.bootstrap.js | 4 +- .../yard-vscode-extension/webpack.config.js | 12 +- pnpm-lock.yaml | 9 +- 127 files changed, 558 insertions(+), 526 deletions(-) diff --git a/examples/base64png-editor-chrome-extension/webpack.config.js b/examples/base64png-editor-chrome-extension/webpack.config.js index fcf400e6526..03d867152e0 100644 --- a/examples/base64png-editor-chrome-extension/webpack.config.js +++ b/examples/base64png-editor-chrome-extension/webpack.config.js @@ -25,12 +25,11 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { merge } = require("webpack-merge"); const { EnvironmentPlugin } = require("webpack"); const { env } = require("./env"); -const buildEnv = env; -module.exports = (env) => { - const router_targetOrigin = `https://localhost:${buildEnv.exampleChromeExtension.envelope.port}`; +module.exports = (webpackEnv) => { + const router_targetOrigin = `https://localhost:${env.exampleChromeExtension.envelope.port}`; - return merge(common(env), { + return merge(common(webpackEnv), { entry: { contentscript: "./src/contentscript.ts", "envelope/index": "./src/envelope/index.ts", @@ -38,7 +37,7 @@ module.exports = (env) => { devServer: { compress: true, https: true, - port: buildEnv.exampleChromeExtension.envelope.port, + port: env.exampleChromeExtension.envelope.port, }, plugins: [ new CopyPlugin({ diff --git a/examples/base64png-editor-vscode-extension/webpack.config.js b/examples/base64png-editor-vscode-extension/webpack.config.js index a894e79f3d1..40755ee3aaf 100644 --- a/examples/base64png-editor-vscode-extension/webpack.config.js +++ b/examples/base64png-editor-vscode-extension/webpack.config.js @@ -21,8 +21,8 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { merge } = require("webpack-merge"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "VsCodePackSimpleReact", libraryTarget: "umd", @@ -33,15 +33,15 @@ const commonConfig = (env) => }, }); -module.exports = (env) => [ - merge(commonConfig(env), { +module.exports = (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { extension: "./src/extension.ts", }, plugins: [], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "envelope/index": "./src/envelope/index.ts", diff --git a/examples/dmn-editor-standalone-examples/webpack.config.js b/examples/dmn-editor-standalone-examples/webpack.config.js index f6dead2bfa1..88e671c525c 100644 --- a/examples/dmn-editor-standalone-examples/webpack.config.js +++ b/examples/dmn-editor-standalone-examples/webpack.config.js @@ -24,10 +24,9 @@ const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const { ProvidePlugin } = require("webpack"); const { env } = require("./env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { output: { path: path.join(__dirname, "dist"), filename: "[name].js", @@ -68,7 +67,7 @@ module.exports = (env) => static: [{ directory: path.join(__dirname, "./dist") }], compress: true, https: false, - port: buildEnv.dmnEditorStandaloneExamples.port, + port: env.dmnEditorStandaloneExamples.port, client: { overlay: false, }, diff --git a/examples/drools-process-usertasks-quarkus-example/mvn.bootstrap.js b/examples/drools-process-usertasks-quarkus-example/mvn.bootstrap.js index 3042ce1e03d..9047ff62eb3 100644 --- a/examples/drools-process-usertasks-quarkus-example/mvn.bootstrap.js +++ b/examples/drools-process-usertasks-quarkus-example/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.droolsProcessUsertasksQuarkusExample.version} + -Drevision=${env.droolsProcessUsertasksQuarkusExample.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/examples/jbpm-compact-architecture-example/mvn.bootstrap.js b/examples/jbpm-compact-architecture-example/mvn.bootstrap.js index e177a6518b1..fea906ae027 100644 --- a/examples/jbpm-compact-architecture-example/mvn.bootstrap.js +++ b/examples/jbpm-compact-architecture-example/mvn.bootstrap.js @@ -17,20 +17,20 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, setPomProperty, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.jbpmCompactArchitectureExample.version} + -Drevision=${env.jbpmCompactArchitectureExample.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); setPomProperty({ key: "kogito.management-console.image", - value: buildEnv.env.jbpmCompactArchitectureExample.kogitoManagementConsoleImage, + value: env.jbpmCompactArchitectureExample.kogitoManagementConsoleImage, }); setPomProperty({ key: "kogito.task-console.image", - value: buildEnv.env.jbpmCompactArchitectureExample.kogitoTaskConsoleImage, + value: env.jbpmCompactArchitectureExample.kogitoTaskConsoleImage, }); diff --git a/examples/sonataflow-greeting-quarkus-example/mvn.bootstrap.js b/examples/sonataflow-greeting-quarkus-example/mvn.bootstrap.js index fad6b9f1301..74492cbf7ec 100644 --- a/examples/sonataflow-greeting-quarkus-example/mvn.bootstrap.js +++ b/examples/sonataflow-greeting-quarkus-example/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.sonataflowGreetingQuarkus.version} + -Drevision=${env.sonataflowGreetingQuarkus.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/examples/todo-list-view-vscode-extension/webpack.config.js b/examples/todo-list-view-vscode-extension/webpack.config.js index a894e79f3d1..40755ee3aaf 100644 --- a/examples/todo-list-view-vscode-extension/webpack.config.js +++ b/examples/todo-list-view-vscode-extension/webpack.config.js @@ -21,8 +21,8 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { merge } = require("webpack-merge"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "VsCodePackSimpleReact", libraryTarget: "umd", @@ -33,15 +33,15 @@ const commonConfig = (env) => }, }); -module.exports = (env) => [ - merge(commonConfig(env), { +module.exports = (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { extension: "./src/extension.ts", }, plugins: [], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "envelope/index": "./src/envelope/index.ts", diff --git a/examples/uniforms-patternfly/webpack.config.js b/examples/uniforms-patternfly/webpack.config.js index 39c07801bb8..d9b22fcd1aa 100644 --- a/examples/uniforms-patternfly/webpack.config.js +++ b/examples/uniforms-patternfly/webpack.config.js @@ -23,10 +23,9 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { merge } = require("webpack-merge"); const { env } = require("./env"); -const buildEnv = env; -module.exports = (env) => [ - merge(common(env), { +module.exports = (webpackEnv) => [ + merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, @@ -45,7 +44,7 @@ module.exports = (env) => [ historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }, { directory: path.join(__dirname, "./static") }], compress: true, - port: buildEnv.exampleUniformsPatternflyPort.port, + port: env.exampleUniformsPatternflyPort.port, }, ignoreWarnings: [/Failed to parse source map/], }), diff --git a/examples/webapp/webpack.config.js b/examples/webapp/webpack.config.js index 0d146655c2b..0fbcd914a74 100644 --- a/examples/webapp/webpack.config.js +++ b/examples/webapp/webpack.config.js @@ -25,10 +25,9 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { merge } = require("webpack-merge"); const stunnerEditors = require("@kie-tools/stunner-editors"); const { env } = require("./env"); -const buildEnv = env; -module.exports = (env) => [ - merge(common(env), { +module.exports = (webpackEnv) => [ + merge(common(webpackEnv), { entry: { index: "./src/index.tsx", "envelope/base64-editor": "./src/envelope/base64-editor.ts", @@ -72,7 +71,7 @@ module.exports = (env) => [ historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }, { directory: path.join(__dirname, "./static") }], compress: true, - port: buildEnv.exampleWebapp.port, + port: env.exampleWebapp.port, }, ignoreWarnings: [/Failed to parse source map/], }), diff --git a/packages/boxed-expression-component/playwright.config.ts b/packages/boxed-expression-component/playwright.config.ts index 5868527ee5c..ea356d7618d 100644 --- a/packages/boxed-expression-component/playwright.config.ts +++ b/packages/boxed-expression-component/playwright.config.ts @@ -20,9 +20,9 @@ import { defineConfig } from "@playwright/test"; import playwirghtBaseConfig from "@kie-tools/playwright-base/playwright.config"; import merge from "lodash/merge"; -import { env } from "./env"; -const buildEnv: any = env; +import { env } from "./env"; +const buildEnv: any = env; // build-env is not typed const customConfig = defineConfig({ use: { diff --git a/packages/bpmn-vscode-extension/webpack.config.js b/packages/bpmn-vscode-extension/webpack.config.js index cd4e0fc77bd..d9ca1930a78 100644 --- a/packages/bpmn-vscode-extension/webpack.config.js +++ b/packages/bpmn-vscode-extension/webpack.config.js @@ -25,8 +25,8 @@ const { merge } = require("webpack-merge"); const { ProvidePlugin } = require("webpack"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "BpmnEditor", libraryTarget: "umd", @@ -38,14 +38,14 @@ const commonConfig = (env) => }, }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension": "./src/extension/extension.ts", }, }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "webworker", entry: { "extension/extensionWeb": "./src/extension/extension.ts", @@ -57,7 +57,7 @@ module.exports = async (env) => [ }), ], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "webview/BpmnEditorEnvelopeApp": "./src/webview/BpmnEditorEnvelopeApp.ts", diff --git a/packages/chrome-extension-pack-kogito-kie-editors/install.js b/packages/chrome-extension-pack-kogito-kie-editors/install.js index 68e55a1da19..f835ce2a1bb 100644 --- a/packages/chrome-extension-pack-kogito-kie-editors/install.js +++ b/packages/chrome-extension-pack-kogito-kie-editors/install.js @@ -17,7 +17,7 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const path = require("path"); const fs = require("fs"); const prettier = require("prettier"); @@ -32,7 +32,7 @@ async function updateChromeExtensionManifest(version, manifestFilePath) { async function main() { console.info("[chrome-extension-pack-kogito-kie-editors-install] Updating manifest files..."); - const version = buildEnv.env.chromeExtension.version; + const version = env.chromeExtension.version; await updateChromeExtensionManifest(version, path.resolve("manifest.dev.json")); await updateChromeExtensionManifest(version, path.resolve("manifest.prod.json")); console.info("[chrome-extension-pack-kogito-kie-editors-install] Done."); diff --git a/packages/chrome-extension-pack-kogito-kie-editors/webpack.config.js b/packages/chrome-extension-pack-kogito-kie-editors/webpack.config.js index 42551f3d7b1..2d1f6dc382e 100644 --- a/packages/chrome-extension-pack-kogito-kie-editors/webpack.config.js +++ b/packages/chrome-extension-pack-kogito-kie-editors/webpack.config.js @@ -27,11 +27,10 @@ const stunnerEditors = require("@kie-tools/stunner-editors"); const { EnvironmentPlugin, ProvidePlugin } = require("webpack"); const path = require("path"); const { env } = require("./env"); -const buildEnv = env; function getRouterArgs() { - const targetOrigin = buildEnv.chromeExtension.routerTargetOrigin; - const relativePath = buildEnv.chromeExtension.routerRelativePath; + const targetOrigin = env.chromeExtension.routerTargetOrigin; + const relativePath = env.chromeExtension.routerRelativePath; console.info(`Chrome Extension :: Router target origin: ${targetOrigin}`); console.info(`Chrome Extension :: Router relative path: ${relativePath}`); @@ -40,8 +39,8 @@ function getRouterArgs() { } function getOnlineEditorArgs() { - const onlineEditorUrl = buildEnv.chromeExtension.onlineEditorUrl; - const manifestFile = buildEnv.chromeExtension.manifestFile; + const onlineEditorUrl = env.chromeExtension.onlineEditorUrl; + const manifestFile = env.chromeExtension.manifestFile; console.info(`Chrome Extension :: Online Editor URL: ${onlineEditorUrl}`); console.info(`Chrome Extension :: Manifest file: ${manifestFile}`); @@ -49,11 +48,11 @@ function getOnlineEditorArgs() { return [onlineEditorUrl, manifestFile]; } -module.exports = async (env) => { - const [router_targetOrigin, router_relativePath] = getRouterArgs(env); - const [onlineEditor_url, manifestFile] = getOnlineEditorArgs(env); +module.exports = async (webpackEnv) => { + const [router_targetOrigin, router_relativePath] = getRouterArgs(webpackEnv); + const [onlineEditor_url, manifestFile] = getOnlineEditorArgs(webpackEnv); - return merge(common(env), { + return merge(common(webpackEnv), { entry: { "content_scripts/github": "./src/github-content-script.ts", background: "./src/background.ts", @@ -65,7 +64,7 @@ module.exports = async (env) => { static: [{ directory: path.join(__dirname, "./dist") }], compress: true, https: true, - port: buildEnv.chromeExtension.dev.port, + port: env.chromeExtension.dev.port, }, plugins: [ new ProvidePlugin({ diff --git a/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfFullScreenTest.ts b/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfFullScreenTest.ts index 5a2c5837864..00cc94e1cff 100644 --- a/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfFullScreenTest.ts +++ b/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfFullScreenTest.ts @@ -23,15 +23,15 @@ import GitHubEditorPage from "@kie-tools/chrome-extension-test-helper/dist/frame import GitHubRepoPage from "@kie-tools/chrome-extension-test-helper/dist/framework/github-repo/GitHubRepoPage"; import Tools from "@kie-tools/chrome-extension-test-helper/dist/utils/Tools"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { env } from "../../env"; +const buildEnv: any = env; // build-env is not typed const TEST_NAME = "SwfFullScreenTest"; let tools: Tools; -const buildEnv: any = env; - beforeEach(async () => { tools = await Tools.init(TEST_NAME); diff --git a/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfTest.ts b/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfTest.ts index 8ccb6e805fa..e7c63c37268 100644 --- a/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfTest.ts +++ b/packages/chrome-extension-serverless-workflow-editor/e2e-tests/tests/SwfTest.ts @@ -24,15 +24,15 @@ import GitHubEditorPage from "@kie-tools/chrome-extension-test-helper/dist/frame import GitHubRepoPage from "@kie-tools/chrome-extension-test-helper/dist/framework/github-repo/GitHubRepoPage"; import SwfEditor from "@kie-tools/chrome-extension-test-helper/dist/framework/editor/swf/SwfEditor"; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { env } from "../../env"; +const buildEnv: any = env; // build-env is not typed const TEST_NAME = "SwfTest"; let tools: Tools; -const buildEnv: any = env; - beforeEach(async () => { tools = await Tools.init(TEST_NAME); diff --git a/packages/chrome-extension-serverless-workflow-editor/install.js b/packages/chrome-extension-serverless-workflow-editor/install.js index 5251ff2f1cc..a1e1b494c65 100644 --- a/packages/chrome-extension-serverless-workflow-editor/install.js +++ b/packages/chrome-extension-serverless-workflow-editor/install.js @@ -17,7 +17,7 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const path = require("path"); const fs = require("fs"); const prettier = require("prettier"); @@ -32,7 +32,7 @@ async function updateChromeExtensionManifest(version, manifestFilePath) { async function main() { console.info("[chrome-extension-serverless-workflow-editor-install] Updating manifest files..."); - const version = buildEnv.env.swfChromeExtension.version; + const version = env.swfChromeExtension.version; await updateChromeExtensionManifest(version, path.resolve("manifest.dev.json")); await updateChromeExtensionManifest(version, path.resolve("manifest.prod.json")); console.info("[chrome-extension-serverless-workflow-editor-install] Done."); diff --git a/packages/chrome-extension-serverless-workflow-editor/webpack.config.js b/packages/chrome-extension-serverless-workflow-editor/webpack.config.js index 447dc1bbf27..f8588fdd691 100644 --- a/packages/chrome-extension-serverless-workflow-editor/webpack.config.js +++ b/packages/chrome-extension-serverless-workflow-editor/webpack.config.js @@ -28,11 +28,10 @@ const path = require("path"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const swEditorAssets = require("@kie-tools/serverless-workflow-diagram-editor-assets"); const { env } = require("./env"); -const buildEnv = env; function getRouterArgs() { - const targetOrigin = buildEnv.swfChromeExtension.routerTargetOrigin; - const relativePath = buildEnv.swfChromeExtension.routerRelativePath; + const targetOrigin = env.swfChromeExtension.routerTargetOrigin; + const relativePath = env.swfChromeExtension.routerRelativePath; console.info(`SWF Chrome Extension :: Router target origin: ${targetOrigin}`); console.info(`SWF Chrome Extension :: Router relative path: ${relativePath}`); @@ -41,18 +40,18 @@ function getRouterArgs() { } function getManifestFile() { - const manifestFile = buildEnv.swfChromeExtension.manifestFile; + const manifestFile = env.swfChromeExtension.manifestFile; console.info(`SWF Chrome Extension :: Manifest file: ${manifestFile}`); return manifestFile; } -module.exports = async (env) => { - const [router_targetOrigin, router_relativePath] = getRouterArgs(env); - const manifestFile = getManifestFile(env); +module.exports = async (webpackEnv) => { + const [router_targetOrigin, router_relativePath] = getRouterArgs(webpackEnv); + const manifestFile = getManifestFile(webpackEnv); - return merge(common(env), { + return merge(common(webpackEnv), { entry: { "content_scripts/github": "./src/github-content-script.ts", background: "./src/background.ts", @@ -64,7 +63,7 @@ module.exports = async (env) => { static: [{ directory: path.join(__dirname, "./dist") }], compress: true, https: true, - port: buildEnv.swfChromeExtension.dev.port, + port: env.swfChromeExtension.dev.port, client: { overlay: false, }, diff --git a/packages/cors-proxy/webpack.config.js b/packages/cors-proxy/webpack.config.js index 8b54b923d1a..50f4700501a 100644 --- a/packages/cors-proxy/webpack.config.js +++ b/packages/cors-proxy/webpack.config.js @@ -20,8 +20,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -module.exports = (env, argv) => [ - merge(common(env, argv), { +module.exports = (webpackEnv, webpackArgv) => [ + merge(common(webpackEnv, webpackArgv), { entry: { index: "./src/index.ts", }, diff --git a/packages/dashbuilder-component-assembler/webpack.config.js b/packages/dashbuilder-component-assembler/webpack.config.js index dc1a5346a64..5d36c8a29cf 100644 --- a/packages/dashbuilder-component-assembler/webpack.config.js +++ b/packages/dashbuilder-component-assembler/webpack.config.js @@ -22,7 +22,7 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -module.exports = async (env) => { +module.exports = async (webpackEnv) => { const components = ["uniforms", "table", "echarts", "svg-heatmap", "timeseries", "victory-charts", "map"]; const copyResources = []; @@ -33,7 +33,7 @@ module.exports = async (env) => { }); }); - return merge(common(env), { + return merge(common(webpackEnv), { entry: {}, plugins: [ new CopyPlugin({ diff --git a/packages/dashbuilder-component-echarts/dev-webapp/webpack.config.js b/packages/dashbuilder-component-echarts/dev-webapp/webpack.config.js index c9eab447dac..439f4293c98 100644 --- a/packages/dashbuilder-component-echarts/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-echarts/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-echarts/webpack.config.js b/packages/dashbuilder-component-echarts/webpack.config.js index 3b2b5444f30..4df292e506f 100644 --- a/packages/dashbuilder-component-echarts/webpack.config.js +++ b/packages/dashbuilder-component-echarts/webpack.config.js @@ -23,8 +23,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-component-map/dev-webapp/webpack.config.js b/packages/dashbuilder-component-map/dev-webapp/webpack.config.js index a594a80dd11..74ccf723185 100644 --- a/packages/dashbuilder-component-map/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-map/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-map/webpack.config.js b/packages/dashbuilder-component-map/webpack.config.js index 8e8fda5c3ca..bca775f9807 100644 --- a/packages/dashbuilder-component-map/webpack.config.js +++ b/packages/dashbuilder-component-map/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-component-svg-heatmap/dev-webapp/webpack.config.js b/packages/dashbuilder-component-svg-heatmap/dev-webapp/webpack.config.js index aab157735c8..e2fa732a92d 100644 --- a/packages/dashbuilder-component-svg-heatmap/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-svg-heatmap/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-svg-heatmap/webpack.config.js b/packages/dashbuilder-component-svg-heatmap/webpack.config.js index 3b2b5444f30..4df292e506f 100644 --- a/packages/dashbuilder-component-svg-heatmap/webpack.config.js +++ b/packages/dashbuilder-component-svg-heatmap/webpack.config.js @@ -23,8 +23,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-component-table/dev-webapp/webpack.config.js b/packages/dashbuilder-component-table/dev-webapp/webpack.config.js index 6c327943344..5f19de17f8d 100644 --- a/packages/dashbuilder-component-table/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-table/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-table/webpack.config.js b/packages/dashbuilder-component-table/webpack.config.js index 0da36ff1f6c..87a5c270f20 100644 --- a/packages/dashbuilder-component-table/webpack.config.js +++ b/packages/dashbuilder-component-table/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-component-timeseries/dev-webapp/webpack.config.js b/packages/dashbuilder-component-timeseries/dev-webapp/webpack.config.js index ce9b52bdce8..48b9ea7dfac 100644 --- a/packages/dashbuilder-component-timeseries/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-timeseries/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-timeseries/webpack.config.js b/packages/dashbuilder-component-timeseries/webpack.config.js index 3b2b5444f30..4df292e506f 100644 --- a/packages/dashbuilder-component-timeseries/webpack.config.js +++ b/packages/dashbuilder-component-timeseries/webpack.config.js @@ -23,8 +23,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-component-uniforms/dev-webapp/webpack.config.js b/packages/dashbuilder-component-uniforms/dev-webapp/webpack.config.js index 0ef2b80b5d1..1c75455b61c 100644 --- a/packages/dashbuilder-component-uniforms/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-uniforms/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-uniforms/webpack.config.js b/packages/dashbuilder-component-uniforms/webpack.config.js index 3b2b5444f30..4df292e506f 100644 --- a/packages/dashbuilder-component-uniforms/webpack.config.js +++ b/packages/dashbuilder-component-uniforms/webpack.config.js @@ -23,8 +23,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-component-victory-charts/dev-webapp/webpack.config.js b/packages/dashbuilder-component-victory-charts/dev-webapp/webpack.config.js index c9eab447dac..439f4293c98 100644 --- a/packages/dashbuilder-component-victory-charts/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-component-victory-charts/dev-webapp/webpack.config.js @@ -24,8 +24,8 @@ const CopyPlugin = require("copy-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-component-victory-charts/webpack.config.js b/packages/dashbuilder-component-victory-charts/webpack.config.js index f7e358134f0..b46313754e3 100644 --- a/packages/dashbuilder-component-victory-charts/webpack.config.js +++ b/packages/dashbuilder-component-victory-charts/webpack.config.js @@ -24,8 +24,8 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const CopyPlugin = require("copy-webpack-plugin"); -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dashbuilder-editor/dev-webapp/webpack.config.js b/packages/dashbuilder-editor/dev-webapp/webpack.config.js index ef4891c5900..33f51e3a20f 100644 --- a/packages/dashbuilder-editor/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-editor/dev-webapp/webpack.config.js @@ -23,10 +23,9 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); -const webpack = require("webpack"); -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder-viewer-deployment-webapp/webpack.config.js b/packages/dashbuilder-viewer-deployment-webapp/webpack.config.js index 313f22b8418..603ae40a0e0 100644 --- a/packages/dashbuilder-viewer-deployment-webapp/webpack.config.js +++ b/packages/dashbuilder-viewer-deployment-webapp/webpack.config.js @@ -23,11 +23,10 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { env } = require("./env"); -const buildEnv = env; const dashbuilderClient = require("@kie-tools/dashbuilder-client"); -module.exports = async (env) => - merge(common(env), { +module.exports = async (webpackEnv) => + merge(common(webpackEnv), { entry: { index: "./src/index.tsx", "dashbuilder-viewer-envelope-app": "./src/envelope/DashbuilderViewerEnvelopeApp.ts", @@ -63,6 +62,6 @@ module.exports = async (env) => historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }, { directory: path.join(__dirname, "./static") }], compress: true, - port: buildEnv.dashbuilderViewerDeploymentWebApp.dev.port, + port: env.dashbuilderViewerDeploymentWebApp.dev.port, }, }); diff --git a/packages/dashbuilder-viewer/dev-webapp/webpack.config.js b/packages/dashbuilder-viewer/dev-webapp/webpack.config.js index c765d701907..54a13f6b236 100644 --- a/packages/dashbuilder-viewer/dev-webapp/webpack.config.js +++ b/packages/dashbuilder-viewer/dev-webapp/webpack.config.js @@ -23,8 +23,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), diff --git a/packages/dashbuilder/mvn.bootstrap.js b/packages/dashbuilder/mvn.bootstrap.js index f3ba2c8881b..52aa21aa461 100644 --- a/packages/dashbuilder/mvn.bootstrap.js +++ b/packages/dashbuilder/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.dashbuilder.version} + -Drevision=${env.dashbuilder.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/data-index-webapp/webpack.config.js b/packages/data-index-webapp/webpack.config.js index ef01f3ecc63..ede2d67e989 100644 --- a/packages/data-index-webapp/webpack.config.js +++ b/packages/data-index-webapp/webpack.config.js @@ -21,10 +21,9 @@ 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), { +module.exports = async (webpackEnv) => + merge(common(webpackEnv), { entry: {}, plugins: [ new CopyPlugin({ @@ -40,6 +39,6 @@ module.exports = async (env) => static: { directory: "./dist", }, - port: buildEnv.dataIndexWebapp.dev.port, + port: env.dataIndexWebapp.dev.port, }, }); diff --git a/packages/dev-deployment-base-image/mvn.bootstrap.js b/packages/dev-deployment-base-image/mvn.bootstrap.js index 91d9a540caa..4300132e652 100644 --- a/packages/dev-deployment-base-image/mvn.bootstrap.js +++ b/packages/dev-deployment-base-image/mvn.bootstrap.js @@ -17,11 +17,11 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, installMvnw, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.devDeploymentBaseImage.version} + -Drevision=${env.devDeploymentBaseImage.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/dev-deployment-dmn-form-webapp/dev-webapp/start.js b/packages/dev-deployment-dmn-form-webapp/dev-webapp/start.js index ab44038f1fc..e80e0d02afa 100644 --- a/packages/dev-deployment-dmn-form-webapp/dev-webapp/start.js +++ b/packages/dev-deployment-dmn-form-webapp/dev-webapp/start.js @@ -21,8 +21,6 @@ const { spawn } = require("node:child_process"); const path = require("path"); const { env } = require("../env"); -const buildEnv = env; - const mvn = spawn( "mvn", [ @@ -31,10 +29,10 @@ const mvn = spawn( "clean", "quarkus:dev", "-Dmaven.test.skip", - `-Dquarkus.platform.version=${buildEnv.quarkusPlatform.version}`, - `-Dversion.org.kie.kogito=${buildEnv.kogitoRuntime.version}`, - `-Dquarkus.http.port=${buildEnv.devDeploymentDmnFormWebapp.dev.quarkusPort}`, - `-Dkogito.service.url=http://localhost:${buildEnv.devDeploymentDmnFormWebapp.dev.quarkusPort}`, + `-Dquarkus.platform.version=${env.quarkusPlatform.version}`, + `-Dversion.org.kie.kogito=${env.kogitoRuntime.version}`, + `-Dquarkus.http.port=${env.devDeploymentDmnFormWebapp.dev.quarkusPort}`, + `-Dkogito.service.url=http://localhost:${env.devDeploymentDmnFormWebapp.dev.quarkusPort}`, "-Dquarkus.http.root-path=/", ], { shell: true } @@ -74,13 +72,13 @@ const webpack = spawn( "--env", mode, "--port", - buildEnv.devDeploymentDmnFormWebapp.dev.webpackPort, + env.devDeploymentDmnFormWebapp.dev.webpackPort, ], { shell: true, env: { ...process.env, // contains PATH which is needed to find the commands - DEV_DEPLOYMENT_DMN_FORM_WEBAPP__quarkusAppOrigin: `http://localhost:${buildEnv.devDeploymentDmnFormWebapp.dev.quarkusPort}`, + DEV_DEPLOYMENT_DMN_FORM_WEBAPP__quarkusAppOrigin: `http://localhost:${env.devDeploymentDmnFormWebapp.dev.quarkusPort}`, DEV_DEPLOYMENT_DMN_FORM_WEBAPP__quarkusAppPath: "", }, } diff --git a/packages/dev-deployment-dmn-form-webapp/webpack.config.ts b/packages/dev-deployment-dmn-form-webapp/webpack.config.ts index 29ced85de8a..edbcd8d7e36 100644 --- a/packages/dev-deployment-dmn-form-webapp/webpack.config.ts +++ b/packages/dev-deployment-dmn-form-webapp/webpack.config.ts @@ -26,8 +26,8 @@ import { ProvidePlugin } from "webpack"; import NodePolyfillPlugin from "node-polyfill-webpack-plugin"; import { defaultEnvJson } from "./build/defaultEnvJson"; -export default async (env: any, argv: any) => { - return merge(common(env), { +export default async (webpackEnv: any, webpackArgv: any) => { + return merge(common(webpackEnv), { entry: { index: "./src/index.tsx", }, diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/install.js b/packages/dev-deployment-kogito-quarkus-blank-app-image/install.js index ece336cfa77..5cdd9ad6908 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/install.js +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/install.js @@ -17,9 +17,9 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.devDeploymentKogitoQuarkusBlankAppImage.version} + -Drevision=${env.devDeploymentKogitoQuarkusBlankAppImage.version} `); diff --git a/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json b/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json index 37fb3dca1b2..6947f54b8a7 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json +++ b/packages/dev-deployment-kogito-quarkus-blank-app-image/package.json @@ -36,8 +36,7 @@ }, "dependencies": { "@kie-tools/dev-deployment-base-image": "workspace:*", - "@kie-tools/dev-deployment-kogito-quarkus-blank-app": "workspace:*", - "@kie-tools/jbpm-quarkus-devui": "workspace:*" + "@kie-tools/dev-deployment-kogito-quarkus-blank-app": "workspace:*" }, "devDependencies": { "@kie-tools/image-builder": "workspace:*", diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/mvn.bootstrap.js b/packages/dev-deployment-kogito-quarkus-blank-app/mvn.bootstrap.js index a7b4b0fdc3b..aa5623bfe0e 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/mvn.bootstrap.js +++ b/packages/dev-deployment-kogito-quarkus-blank-app/mvn.bootstrap.js @@ -17,16 +17,16 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, installMvnw, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile( ` --batch-mode -Dstyle.color=always - -Drevision=${buildEnv.env.devDeploymentQuarkusApp.version} - -Dquarkus.platform.version=${buildEnv.env.quarkusPlatform.version} - -Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version} + -Drevision=${env.devDeploymentQuarkusApp.version} + -Dquarkus.platform.version=${env.quarkusPlatform.version} + -Dversion.org.kie.kogito=${env.kogitoRuntime.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `, { ignoreDefault: true } // Can't have special configuration that only works inside this repo. diff --git a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml index 69836106859..0452d74d125 100644 --- a/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml +++ b/packages/dev-deployment-kogito-quarkus-blank-app/pom.xml @@ -176,6 +176,31 @@ + + + + + use-maven-repo-local-tail + + + kieTools.do-not-use-this-property.ignoreMavenRepoLocalTail + !true + + + + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + + @@ -186,19 +211,6 @@ - - - org.apache.maven.plugins - maven-install-plugin - ${version.maven.install.plugin} - - - default-install - none - - - - org.apache.maven.plugins maven-site-plugin diff --git a/packages/dev-deployment-upload-service/scripts/runTestServers.js b/packages/dev-deployment-upload-service/scripts/runTestServers.js index 411e2bf0651..d789e879f4d 100644 --- a/packages/dev-deployment-upload-service/scripts/runTestServers.js +++ b/packages/dev-deployment-upload-service/scripts/runTestServers.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const { argv } = require("process"); const version = require("../package.json").version; -const buildEnv = require("../env"); +const { env } = require("../env"); const network = "ddus-network"; const builder = "ddus-builder"; @@ -38,9 +38,9 @@ const imagesNames = { }; const containersPorts = { - fileserver: buildEnv.env.devDeploymentUploadService.dev.fileServerPort, - buildtimeInstall: buildEnv.env.devDeploymentUploadService.dev.buildTimePort, - runTimeInstall: buildEnv.env.devDeploymentUploadService.dev.runtTimePort, + fileserver: env.devDeploymentUploadService.dev.fileServerPort, + buildtimeInstall: env.devDeploymentUploadService.dev.buildTimePort, + runTimeInstall: env.devDeploymentUploadService.dev.runtTimePort, }; function runCommand(command, returnResult = false) { diff --git a/packages/dev-deployment-upload-service/tests/integrationTest.test.js b/packages/dev-deployment-upload-service/tests/integrationTest.test.js index 8c1164b4b9a..cca909dbbdd 100644 --- a/packages/dev-deployment-upload-service/tests/integrationTest.test.js +++ b/packages/dev-deployment-upload-service/tests/integrationTest.test.js @@ -19,15 +19,15 @@ const { execSync, execFileSync } = require("child_process"); const path = require("path"); -const buildEnv = require("../env"); +const { env } = require("../env"); const version = require("../package.json").version; const filePath = path.join(process.cwd(), "tests/test.zip"); const containersPorts = { - fileserver: buildEnv.env.devDeploymentUploadService.dev.fileServerPort, - buildtimeInstall: buildEnv.env.devDeploymentUploadService.dev.buildTimePort, - runTimeInstall: buildEnv.env.devDeploymentUploadService.dev.runtTimePort, + fileserver: env.devDeploymentUploadService.dev.fileServerPort, + buildtimeInstall: env.devDeploymentUploadService.dev.buildTimePort, + runTimeInstall: env.devDeploymentUploadService.dev.runtTimePort, }; const dockerInfo = JSON.parse(execSync(`docker info --format '{{ json . }}'`).toString().trim()); diff --git a/packages/dmn-editor-standalone/webpack.config.js b/packages/dmn-editor-standalone/webpack.config.js index 43e2e93035f..fbe77d9ea13 100644 --- a/packages/dmn-editor-standalone/webpack.config.js +++ b/packages/dmn-editor-standalone/webpack.config.js @@ -23,10 +23,9 @@ const path = require("path"); const { env } = require("./env"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const { ProvidePlugin } = require("webpack"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { output: { path: path.join(__dirname, "dist"), filename: "[name].js", @@ -65,7 +64,7 @@ module.exports = (env) => historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }], compress: true, - port: buildEnv.dmnEditorStandalone.dev.port, + port: env.dmnEditorStandalone.dev.port, }, performance: { hints: false, diff --git a/packages/dmn-editor-standalone/webpack.envelope-config.js b/packages/dmn-editor-standalone/webpack.envelope-config.js index b74a1fcaff1..d41d8e00481 100644 --- a/packages/dmn-editor-standalone/webpack.envelope-config.js +++ b/packages/dmn-editor-standalone/webpack.envelope-config.js @@ -23,8 +23,8 @@ const path = require("path"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const { ProvidePlugin } = require("webpack"); -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { output: { path: path.join(__dirname, "dist"), filename: "[name].js", diff --git a/packages/dmn-editor/playwright.config.ts b/packages/dmn-editor/playwright.config.ts index b5d633ac630..f7b047a8455 100644 --- a/packages/dmn-editor/playwright.config.ts +++ b/packages/dmn-editor/playwright.config.ts @@ -20,9 +20,9 @@ import { defineConfig } from "@playwright/test"; import playwirghtBaseConfig from "@kie-tools/playwright-base/playwright.config"; import merge from "lodash/merge"; -import { env } from "./env"; -const buildEnv: any = env; +import { env } from "./env"; +const buildEnv: any = env; // build-env is not typed const customConfig = defineConfig({ use: { diff --git a/packages/dmn-marshaller-backend-compatibility-tester/src/index.ts b/packages/dmn-marshaller-backend-compatibility-tester/src/index.ts index bc3ccc2f505..49cf803a3c3 100644 --- a/packages/dmn-marshaller-backend-compatibility-tester/src/index.ts +++ b/packages/dmn-marshaller-backend-compatibility-tester/src/index.ts @@ -18,7 +18,7 @@ */ import * as path from "path"; -const buildEnv = require("../env"); +const { env } = require("../env"); const jbang = require("@jbangdev/jbang"); const parentScriptPath = path.join(__dirname, "..", "src", "DmnMarshallerBackendCompatibilityTesterScript.java"); @@ -81,7 +81,7 @@ function executeScript(scriptPath: string, args?: string[]) { const quoteChar = isWindowsPath ? '"' : "'"; const jbangArgs = [] as string[]; - jbangArgs.push("-Dkogito-runtime.version=" + buildEnv.env.kogitoRuntime.version); + jbangArgs.push("-Dkogito-runtime.version=" + env.kogitoRuntime.version); jbangArgs.push(scriptPath); args?.forEach((arg) => jbangArgs.push(quoteChar + arg + quoteChar)); diff --git a/packages/dmn-testing-models/mvn.bootstrap.js b/packages/dmn-testing-models/mvn.bootstrap.js index 3c9476c542f..15bebecbd51 100644 --- a/packages/dmn-testing-models/mvn.bootstrap.js +++ b/packages/dmn-testing-models/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.dmnTestingModels.version} + -Drevision=${env.dmnTestingModels.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/dmn-vscode-extension/webpack.config.js b/packages/dmn-vscode-extension/webpack.config.js index 2d4f0da6919..be947339e93 100644 --- a/packages/dmn-vscode-extension/webpack.config.js +++ b/packages/dmn-vscode-extension/webpack.config.js @@ -25,8 +25,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { ProvidePlugin } = require("webpack"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "DmnEditor", libraryTarget: "umd", @@ -44,14 +44,14 @@ const commonConfig = (env) => }, }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension": "./src/extension/extension.ts", }, }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "webworker", entry: { "extension/extensionWeb": "./src/extension/extension.ts", @@ -63,7 +63,7 @@ module.exports = async (env) => [ }), ], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "webview/DmnEditorEnvelopeApp": "./src/webview/DmnEditorEnvelopeApp.ts", diff --git a/packages/extended-services-java/mvn.bootstrap.js b/packages/extended-services-java/mvn.bootstrap.js index 897183a1419..18e441ce239 100644 --- a/packages/extended-services-java/mvn.bootstrap.js +++ b/packages/extended-services-java/mvn.bootstrap.js @@ -17,12 +17,12 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.extendedServicesJava.version} - -Dquarkus.http.port=${buildEnv.env.extendedServicesJava.port} - -Dquarkus.http.host=${buildEnv.env.extendedServicesJava.host} + -Drevision=${env.extendedServicesJava.version} + -Dquarkus.http.port=${env.extendedServicesJava.port} + -Dquarkus.http.host=${env.extendedServicesJava.host} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/extended-services-vscode-extension/webpack.config.js b/packages/extended-services-vscode-extension/webpack.config.js index 3d9f05537b0..d52f1fb6e7c 100644 --- a/packages/extended-services-vscode-extension/webpack.config.js +++ b/packages/extended-services-vscode-extension/webpack.config.js @@ -20,8 +20,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "ExtendedServices", libraryTarget: "umd", @@ -34,14 +34,14 @@ const commonConfig = (env) => plugins: [], }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension-main": "./src/extension/extension-main.ts", }, }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "extension/extension-browser": "./src/extension/extension-browser.ts", diff --git a/packages/feel-input-component/showcase/webpack.config.js b/packages/feel-input-component/showcase/webpack.config.js index 9b6c56db64c..89561d4f17a 100644 --- a/packages/feel-input-component/showcase/webpack.config.js +++ b/packages/feel-input-component/showcase/webpack.config.js @@ -24,10 +24,9 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const { EnvironmentPlugin } = require("webpack"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), @@ -40,7 +39,7 @@ module.exports = (env) => patterns: [{ from: path.resolve(__dirname, "./static"), to: "./" }], }), new EnvironmentPlugin({ - WEBPACK_REPLACE__FEEL_INPUT_COMPONENT_DEV_WEBAPP__feelServerUrl: buildEnv.feelInputComponent.dev.feelServerUrl, + WEBPACK_REPLACE__FEEL_INPUT_COMPONENT_DEV_WEBAPP__feelServerUrl: env.feelInputComponent.dev.feelServerUrl, }), ], module: { @@ -63,7 +62,7 @@ module.exports = (env) => devServer: { historyApiFallback: true, compress: true, - port: buildEnv.feelInputComponent.dev.port, + port: env.feelInputComponent.dev.port, open: false, hot: true, client: { diff --git a/packages/form-generation-tool/webpack.config.js b/packages/form-generation-tool/webpack.config.js index 6063e28adf9..997c7bac8d9 100644 --- a/packages/form-generation-tool/webpack.config.js +++ b/packages/form-generation-tool/webpack.config.js @@ -21,8 +21,8 @@ const nodeExternals = require("webpack-node-externals"); const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -module.exports = (env, argv) => [ - merge(common(env, argv), { +module.exports = (webpackEnv, webpackArgv) => [ + merge(common(webpackEnv, webpackArgv), { entry: { index: "./src/index.ts", }, diff --git a/packages/image-env-to-json/webpack.config.js b/packages/image-env-to-json/webpack.config.js index 4a6b1b48a69..a8e86a48830 100644 --- a/packages/image-env-to-json/webpack.config.js +++ b/packages/image-env-to-json/webpack.config.js @@ -21,8 +21,8 @@ const nodeExternals = require("webpack-node-externals"); const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -module.exports = (env, argv) => [ - merge(common(env, argv), { +module.exports = (webpackEnv, webpackArgv) => [ + merge(common(webpackEnv, webpackArgv), { entry: { index: "./src/index.ts", }, diff --git a/packages/import-java-classes-component/showcase/webpack.config.js b/packages/import-java-classes-component/showcase/webpack.config.js index c6d339d7ed5..ed4b72ef51d 100644 --- a/packages/import-java-classes-component/showcase/webpack.config.js +++ b/packages/import-java-classes-component/showcase/webpack.config.js @@ -23,10 +23,9 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), @@ -59,7 +58,7 @@ module.exports = (env) => devServer: { historyApiFallback: true, compress: true, - port: buildEnv.importJavaClassesComponent.dev.port, + port: env.importJavaClassesComponent.dev.port, open: false, hot: true, client: { diff --git a/packages/jbpm-quarkus-devui/mvn.bootstrap.js b/packages/jbpm-quarkus-devui/mvn.bootstrap.js index 07a7a4b7f6f..69cd5a3dcd4 100644 --- a/packages/jbpm-quarkus-devui/mvn.bootstrap.js +++ b/packages/jbpm-quarkus-devui/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.jbpmQuarkusDevuiExtension.version} + -Drevision=${env.jbpmQuarkusDevuiExtension.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/jobs-service-webapp/webpack.config.js b/packages/jobs-service-webapp/webpack.config.js index 8bfef9544ce..86e0614b66a 100644 --- a/packages/jobs-service-webapp/webpack.config.js +++ b/packages/jobs-service-webapp/webpack.config.js @@ -21,10 +21,9 @@ 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), { +module.exports = async (webpackEnv) => + merge(common(webpackEnv), { entry: {}, plugins: [ new CopyPlugin({ @@ -40,6 +39,6 @@ module.exports = async (env) => static: { directory: "./dist", }, - port: buildEnv.jobsServiceWebapp.dev.port, + port: env.jobsServiceWebapp.dev.port, }, }); diff --git a/packages/kie-editors-dev-vscode-extension/webpack.config.js b/packages/kie-editors-dev-vscode-extension/webpack.config.js index bc410bfe13d..9406ab23019 100644 --- a/packages/kie-editors-dev-vscode-extension/webpack.config.js +++ b/packages/kie-editors-dev-vscode-extension/webpack.config.js @@ -25,8 +25,8 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const stunnerEditors = require("@kie-tools/stunner-editors"); const vscodeJavaCodeCompletionExtensionPlugin = require("@kie-tools/vscode-java-code-completion-extension-plugin"); -module.exports = async (env) => [ - merge(common(env), { +module.exports = async (webpackEnv) => [ + merge(common(webpackEnv), { output: { library: "AppFormer.VsCodePack", libraryTarget: "umd", @@ -41,7 +41,7 @@ module.exports = async (env) => [ "extension/extension": "./src/extension/extension.ts", }, }), - merge(common(env), { + merge(common(webpackEnv), { output: { library: "AppFormer.VsCodePack", libraryTarget: "umd", @@ -62,7 +62,7 @@ module.exports = async (env) => [ }), ], }), - merge(common(env), { + merge(common(webpackEnv), { output: { library: "AppFormer.VsCodePackWebview", libraryTarget: "umd", @@ -112,7 +112,7 @@ module.exports = async (env) => [ }), ], }), - merge(common(env), { + merge(common(webpackEnv), { output: { library: "AppFormer.VsCodePackWebview", libraryTarget: "umd", diff --git a/packages/kie-editors-standalone/e2e-tests/webpack.config.js b/packages/kie-editors-standalone/e2e-tests/webpack.config.js index 7c9a7967fe5..bee9949535c 100644 --- a/packages/kie-editors-standalone/e2e-tests/webpack.config.js +++ b/packages/kie-editors-standalone/e2e-tests/webpack.config.js @@ -22,10 +22,9 @@ const HtmlWebPackPlugin = require("html-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { merge } = require("webpack-merge"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { app: path.resolve(__dirname, "src", "index.tsx"), @@ -48,6 +47,6 @@ module.exports = (env) => overlay: true, }, open: false, - port: buildEnv.standaloneEditors.dev.port, + port: env.standaloneEditors.dev.port, }, }); diff --git a/packages/kie-editors-standalone/webpack.build-resources.config.js b/packages/kie-editors-standalone/webpack.build-resources.config.js index aa885e4ddd4..355624ae595 100644 --- a/packages/kie-editors-standalone/webpack.build-resources.config.js +++ b/packages/kie-editors-standalone/webpack.build-resources.config.js @@ -23,8 +23,8 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const CopyPlugin = require("copy-webpack-plugin"); const patternflyBase = require("@kie-tools-core/patternfly-base"); -module.exports = (env) => [ - merge(common(env), { +module.exports = (webpackEnv) => [ + merge(common(webpackEnv), { entry: { "preprocessor/preprocessor": "./src/preprocessor/preprocessor.ts", }, @@ -35,7 +35,7 @@ module.exports = (env) => [ __filename: true, //Uses current working dir }, }), - merge(common(env), { + merge(common(webpackEnv), { output: { publicPath: "", }, diff --git a/packages/kie-editors-standalone/webpack.package-resources.config.js b/packages/kie-editors-standalone/webpack.package-resources.config.js index 550deafb3b9..ec50e6a77ec 100644 --- a/packages/kie-editors-standalone/webpack.package-resources.config.js +++ b/packages/kie-editors-standalone/webpack.package-resources.config.js @@ -21,10 +21,9 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const path = require("path"); const { env } = require("./env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { output: { path: path.join(__dirname, "dist"), filename: "[name]/index.js", @@ -51,6 +50,6 @@ module.exports = (env) => historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }], compress: true, - port: buildEnv.standaloneEditors.dev.port, + port: env.standaloneEditors.dev.port, }, }); diff --git a/packages/kn-plugin-workflow/e2e-tests/helper_test.go b/packages/kn-plugin-workflow/e2e-tests/helper_test.go index 36376a3be27..efef043a8be 100644 --- a/packages/kn-plugin-workflow/e2e-tests/helper_test.go +++ b/packages/kn-plugin-workflow/e2e-tests/helper_test.go @@ -183,12 +183,17 @@ func WriteMavenConfigFileWithTailDirs(projectDir string) { } } - absolutePath, err := filepath.Abs("../../../node_modules/@kie-tools/sonataflow-quarkus-devui/dist/1st-party-m2/repository") + jbpmQuarkusDevUiM2, err := filepath.Abs("../../../node_modules/@kie-tools/sonataflow-quarkus-devui/dist/1st-party-m2/repository") + if err != nil { + fmt.Printf("Failed to resolve absolute path for `@kie-tools/sonataflow-quarkus-devui` package. %v", err) + os.Exit(1) + } + mavenBaseM2, err := filepath.Abs("../../../node_modules/@kie-tools/maven-base/dist/1st-party-m2/repository") if err != nil { - fmt.Printf("Failed to resolve absolute path for sonataflow-quarkus-devui package. %v", err) + fmt.Printf("Failed to resolve absolute path for `@kie-tools/maven-base` package. %v", err) os.Exit(1) } - err = os.WriteFile(filepath.Join(projectDir, ".mvn", "maven.config"), []byte("-Dmaven.repo.local.tail=" + absolutePath + "\n"), 0644) + err = os.WriteFile(filepath.Join(projectDir, ".mvn", "maven.config"), []byte("-Dmaven.repo.local.tail="+ mavenBaseM2 + "," + jbpmQuarkusDevUiM2 + "\n"), 0644) if err != nil { fmt.Printf("Failed to create .mvn/maven.config file: %v", err) os.Exit(1) diff --git a/packages/kn-plugin-workflow/package.json b/packages/kn-plugin-workflow/package.json index e3a34cc800f..b13f3cd5804 100644 --- a/packages/kn-plugin-workflow/package.json +++ b/packages/kn-plugin-workflow/package.json @@ -50,6 +50,7 @@ "test-e2e:quarkus:logs": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm go:test-e2e:quarkus:logs\" \"pnpm go:test-e2e:report\"" }, "dependencies": { + "@kie-tools/maven-base": "workspace:*", "@kie-tools/sonataflow-quarkus-devui": "workspace:*" }, "devDependencies": { diff --git a/packages/kogito-base-builder-image/install.js b/packages/kogito-base-builder-image/install.js index fa67779a3bb..0e3b3188d06 100644 --- a/packages/kogito-base-builder-image/install.js +++ b/packages/kogito-base-builder-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoBaseBuilderImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoBaseBuilderImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,14 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoBaseBuilderImage.registry}/${env.kogitoBaseBuilderImage.account}/${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`)); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoBaseBuilderImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/kogito-data-index-ephemeral-image/install.js b/packages/kogito-data-index-ephemeral-image/install.js index c650f3bac2a..5e3e2c01d85 100644 --- a/packages/kogito-data-index-ephemeral-image/install.js +++ b/packages/kogito-data-index-ephemeral-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoDataIndexEphemeralImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoDataIndexEphemeralImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,17 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoDataIndexEphemeralImage.registry}/${env.kogitoDataIndexEphemeralImage.account}/${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`) -); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoDataIndexEphemeralImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/kogito-data-index-postgresql-image/install.js b/packages/kogito-data-index-postgresql-image/install.js index 319a9b8ebd4..9b61611cc10 100644 --- a/packages/kogito-data-index-postgresql-image/install.js +++ b/packages/kogito-data-index-postgresql-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoDataIndexPostgresqlImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoDataIndexPostgresqlImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,17 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoDataIndexPostgresqlImage.registry}/${env.kogitoDataIndexPostgresqlImage.account}/${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`) -); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoDataIndexPostgresqlImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/kogito-jit-runner-image/install.js b/packages/kogito-jit-runner-image/install.js index 2d2789e493b..9be7a1027ef 100644 --- a/packages/kogito-jit-runner-image/install.js +++ b/packages/kogito-jit-runner-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJitRunnerImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoJitRunnerImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,14 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoJitRunnerImage.registry}/${env.kogitoJitRunnerImage.account}/${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`)); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoJitRunnerImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/kogito-jobs-service-allinone-image/install.js b/packages/kogito-jobs-service-allinone-image/install.js index 8ea16c03076..968e4e4e162 100644 --- a/packages/kogito-jobs-service-allinone-image/install.js +++ b/packages/kogito-jobs-service-allinone-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJobsServiceAllInOneImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoJobsServiceAllInOneImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,17 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoJobsServiceAllInOneImage.registry}/${env.kogitoJobsServiceAllInOneImage.account}/${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`) -); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoJobsServiceAllInOneImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/kogito-jobs-service-ephemeral-image/install.js b/packages/kogito-jobs-service-ephemeral-image/install.js index ac33c6ae754..68c5fc634a6 100644 --- a/packages/kogito-jobs-service-ephemeral-image/install.js +++ b/packages/kogito-jobs-service-ephemeral-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJobsServiceEphemeralImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoJobsServiceEphemeralImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,17 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoJobsServiceEphemeralImage.registry}/${env.kogitoJobsServiceEphemeralImage.account}/${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`) -); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoJobsServiceEphemeralImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/kogito-jobs-service-postgresql-image/install.js b/packages/kogito-jobs-service-postgresql-image/install.js index e975ea5c3d7..10ca5359643 100644 --- a/packages/kogito-jobs-service-postgresql-image/install.js +++ b/packages/kogito-jobs-service-postgresql-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.kogitoJobsServicePostgresqlImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.kogitoJobsServicePostgresqlImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,17 +47,14 @@ if (imageYamlFiles.length !== 1) { 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}`; +const imageUrl = `${env.kogitoJobsServicePostgresqlImage.registry}/${env.kogitoJobsServicePostgresqlImage.account}/${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`) -); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.kogitoJobsServicePostgresqlImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/maven-base/mvn.bootstrap.js b/packages/maven-base/mvn.bootstrap.js index 188ad60fa4c..db247ab4ba5 100644 --- a/packages/maven-base/mvn.bootstrap.js +++ b/packages/maven-base/mvn.bootstrap.js @@ -17,22 +17,22 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, setPomProperty, buildTailFromPackageJsonDependencies } = require("."); setupMavenConfigFile( ` - -Drevision=${buildEnv.env.mavenBase.version} + -Drevision=${env.mavenBase.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} ` ); setPomProperty({ key: "version.org.kie.kogito", - value: buildEnv.env.kogitoRuntime.version, + value: env.kogitoRuntime.version, }); setPomProperty({ key: "quarkus.platform.version", - value: buildEnv.env.quarkusPlatform.version, + value: env.quarkusPlatform.version, }); diff --git a/packages/maven-base/package.json b/packages/maven-base/package.json index ee4193645a5..4d4ca7af6e1 100644 --- a/packages/maven-base/package.json +++ b/packages/maven-base/package.json @@ -14,11 +14,11 @@ }, "scripts": { "build:dev": "run-script-os", - "build:dev:darwin:linux": "mvn clean install -DskipTests -P'!kie-tools--maven-profile--1st-party-dependencies'", - "build:dev:win32": "pnpm powershell \"mvn clean install `-DskipTests `-P'!kie-tools--maven-profile--1st-party-dependencies'\"", + "build:dev:darwin:linux": "mvn clean install -DskipTests", + "build:dev:win32": "pnpm powershell \"mvn clean install `-DskipTests\"", "build:prod": "pnpm lint && run-script-os", - "build:prod:darwin:linux": "mvn clean deploy -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) -Dmaven.deploy.skip=$(build-env maven.deploy.skip) -P'!kie-tools--maven-profile--1st-party-dependencies' -Dreproducible", - "build:prod:win32": "pnpm powershell \"mvn clean deploy `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) `-Dmaven.deploy.skip=$(build-env maven.deploy.skip) `-P'!kie-tools--maven-profile--1st-party-dependencies' `-Dreproducible\"", + "build:prod:darwin:linux": "mvn clean deploy -DskipTests=$(build-env tests.run --not) -Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) -Dmaven.deploy.skip=$(build-env maven.deploy.skip) -Dreproducible", + "build:prod:win32": "pnpm powershell \"mvn clean deploy `-DskipTests `-Dmaven.test.failure.ignore=$(build-env tests.ignoreFailures) `-Dmaven.deploy.skip=$(build-env maven.deploy.skip) `-Dreproducible\"", "install": "node mvn.bootstrap.js && pnpm build:dev", "lint": "echo 'Linting'", "powershell": "@powershell -NoProfile -ExecutionPolicy Unrestricted -Command" diff --git a/packages/maven-base/pom.xml b/packages/maven-base/pom.xml index 0a36114f985..d957e1e7af1 100644 --- a/packages/maven-base/pom.xml +++ b/packages/maven-base/pom.xml @@ -189,17 +189,10 @@ >${session.executionRootDirectory}/node_modules/@kie-tools/maven-base/not-reproducible-plugins.properties - - - - org.apache.maven.plugins maven-install-plugin ${version.maven.install.plugin} - - true - org.apache.maven.plugins @@ -250,51 +243,6 @@ - - - - - maven-clean-plugin - - - - ${basedir}/dist/1st-party-m2 - - **/* - - false - - - - - - clean - - clean - - - - - - - - - maven-deploy-plugin - - - deploy-to-local-dist-1st-party-m2 - install - - deploy - - - false - kie-tools--local-dist-1st-party-m2::file://${maven.multiModuleProjectDirectory}/dist/1st-party-m2/repository - - - - @@ -346,7 +294,87 @@ + + + + + use-maven-repo-local-tail + + + + + kieTools.do-not-use-this-property.ignoreMavenRepoLocalTail + !true + + + + + + + + + + + org.apache.maven.plugins + maven-install-plugin + ${version.maven.install.plugin} + + true + + + + + + + + + + maven-clean-plugin + + + + ${basedir}/dist/1st-party-m2 + + **/* + + false + + + + + + clean + + clean + + + + + + + + + maven-deploy-plugin + + + deploy-to-local-dist-1st-party-m2 + install + + deploy + + + kie-tools--local-dist-1st-party-m2::file://${maven.multiModuleProjectDirectory}/dist/1st-party-m2/repository + + + + + + + + + reproducible-build diff --git a/packages/online-editor/build/defaultEnvJson.ts b/packages/online-editor/build/defaultEnvJson.ts index 5c06712afec..55d0a27e9d4 100644 --- a/packages/online-editor/build/defaultEnvJson.ts +++ b/packages/online-editor/build/defaultEnvJson.ts @@ -19,13 +19,13 @@ import { EnvJson } from "../src/env/EnvJson"; import { routes } from "../src/navigation/Routes"; +import { AuthProviderGroup, AuthProviderType } from "../src/authProviders/AuthProvidersApi"; +import { FileTypes } from "@kie-tools-core/workspaces-git-fs/dist/constants/ExtensionHelper"; +import { GLOB_PATTERN } from "../src/envelopeLocator/EditorEnvelopeLocatorFactory"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { env } from "../env"; -import { AuthProviderGroup, AuthProviderType } from "../src/authProviders/AuthProvidersApi"; -import { FileTypes } from "@kie-tools-core/workspaces-git-fs/dist/constants/ExtensionHelper"; -import { GLOB_PATTERN } from "../src/envelopeLocator/EditorEnvelopeLocatorFactory"; const buildEnv: any = env; // build-env is not typed function getDevDeploymentImageUrl(imageEnvVars: any) { diff --git a/packages/online-editor/playwright.config.ts b/packages/online-editor/playwright.config.ts index 911125dffa2..3c1ac8f65ee 100644 --- a/packages/online-editor/playwright.config.ts +++ b/packages/online-editor/playwright.config.ts @@ -20,9 +20,9 @@ import { defineConfig } from "@playwright/test"; import playwirghtBaseConfig from "@kie-tools/playwright-base/playwright.config"; import merge from "lodash/merge"; -import { env } from "./env"; -const buildEnv: any = env; +import { env } from "./env"; +const buildEnv: any = env; // build-env is not typed const customConfig = defineConfig({ expect: { diff --git a/packages/online-editor/webpack.config.ts b/packages/online-editor/webpack.config.ts index 30d4a58ea8f..0ac197a7e27 100644 --- a/packages/online-editor/webpack.config.ts +++ b/packages/online-editor/webpack.config.ts @@ -37,7 +37,7 @@ import HtmlReplaceWebpackPlugin from "html-replace-webpack-plugin"; import { env } from "./env"; const buildEnv: any = env; // build-env is not typed -export default async (env: any, argv: any) => { +export default async (webpackEnv: any, webpackArgv: any) => { const buildInfo = getBuildInfo(); const [ extendedServices_linuxDownloadUrl, @@ -56,7 +56,7 @@ export default async (env: any, argv: any) => { } return [ - merge(common(env), { + merge(common(webpackEnv), { entry: { "workspace/worker/sharedWorker": "./src/workspace/worker/sharedWorker.ts", }, @@ -77,7 +77,7 @@ export default async (env: any, argv: any) => { ], }), { - ...merge(common(env), { + ...merge(common(webpackEnv), { entry: { index: "./src/index.tsx", "bpmn-envelope": "./src/envelope/BpmnEditorEnvelopeApp.ts", diff --git a/packages/pmml-editor/dev-webapp/webpack.config.js b/packages/pmml-editor/dev-webapp/webpack.config.js index c7e17860336..dadf2bdd805 100644 --- a/packages/pmml-editor/dev-webapp/webpack.config.js +++ b/packages/pmml-editor/dev-webapp/webpack.config.js @@ -23,10 +23,9 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), @@ -67,7 +66,7 @@ module.exports = (env) => }, historyApiFallback: true, compress: true, - port: buildEnv.pmmlEditor.dev.port, + port: env.pmmlEditor.dev.port, open: false, hot: true, }, diff --git a/packages/pmml-vscode-extension/webpack.config.js b/packages/pmml-vscode-extension/webpack.config.js index 3c0d90d0e31..b7408cc7d8a 100644 --- a/packages/pmml-vscode-extension/webpack.config.js +++ b/packages/pmml-vscode-extension/webpack.config.js @@ -22,8 +22,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const { ProvidePlugin } = require("webpack"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "PmmlEditor", libraryTarget: "umd", @@ -35,14 +35,14 @@ const commonConfig = (env) => }, }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension": "./src/extension/extension.ts", }, }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "webworker", entry: { "extension/extensionWeb": "./src/extension/extension.ts", @@ -54,7 +54,7 @@ module.exports = async (env) => [ }), ], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "webview/PmmlEditorEnvelopeApp": "./src/webview/PmmlEditorEnvelopeApp.ts", diff --git a/packages/runtime-tools-management-console-webapp/build/defaultEnvJson.js b/packages/runtime-tools-management-console-webapp/build/defaultEnvJson.js index 3f723e0772a..ad06a77878c 100644 --- a/packages/runtime-tools-management-console-webapp/build/defaultEnvJson.js +++ b/packages/runtime-tools-management-console-webapp/build/defaultEnvJson.js @@ -17,17 +17,16 @@ * under the License. */ -const { env: buildEnv } = require("../env"); +const { env } = require("../env"); const version = require("../package.json").version; module.exports = { defaultEnvJson: { - RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE: buildEnv.runtimeToolsManagementConsoleWebapp.kogitoEnvMode, + RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE: env.runtimeToolsManagementConsoleWebapp.kogitoEnvMode, RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_APP_NAME: "Management Console", RUNTIME_TOOLS_MANAGEMENT_CONSOLE_KOGITO_APP_VERSION: version, - RUNTIME_TOOLS_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT: - buildEnv.runtimeToolsManagementConsoleWebapp.kogitoDataIndexUrl, + RUNTIME_TOOLS_MANAGEMENT_CONSOLE_DATA_INDEX_ENDPOINT: env.runtimeToolsManagementConsoleWebapp.kogitoDataIndexUrl, KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK: false, KOGITO_CONSOLES_KEYCLOAK_UPDATE_TOKEN_VALIDITY: 30, KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: diff --git a/packages/runtime-tools-management-console-webapp/webpack.config.js b/packages/runtime-tools-management-console-webapp/webpack.config.js index 6083334a7bd..51d6ed79352 100644 --- a/packages/runtime-tools-management-console-webapp/webpack.config.js +++ b/packages/runtime-tools-management-console-webapp/webpack.config.js @@ -22,13 +22,13 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const CopyPlugin = require("copy-webpack-plugin"); -const { env: buildEnv } = require("./env"); +const { env } = require("./env"); const { defaultEnvJson } = require("./build/defaultEnvJson"); const BG_IMAGES_DIRNAME = "bgimages"; -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: path.resolve(__dirname, "src", "index.tsx"), }, @@ -36,8 +36,8 @@ module.exports = async (env) => { static: { directory: "./dist", }, - host: buildEnv.runtimeToolsManagementConsoleWebapp.host, - port: buildEnv.runtimeToolsManagementConsoleWebapp.port, + host: env.runtimeToolsManagementConsoleWebapp.host, + port: env.runtimeToolsManagementConsoleWebapp.port, compress: true, historyApiFallback: true, hot: true, 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 62e07c79c02..7cf0e739beb 100644 --- a/packages/runtime-tools-process-dev-ui-webapp/webpack.config.js +++ b/packages/runtime-tools-process-dev-ui-webapp/webpack.config.js @@ -28,12 +28,11 @@ 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 } = require("./env"); -const { env: buildEnv } = require("./env"); - -module.exports = async (env) => { - const dataIndexURL = buildEnv.runtimeToolsProcessDevUIWebapp.kogitoDataIndexUrl; - return merge(common(env), { +module.exports = async (webpackEnv) => { + const dataIndexURL = env.runtimeToolsProcessDevUIWebapp.kogitoDataIndexUrl; + return merge(common(webpackEnv), { entry: { standalone: path.resolve(__dirname, "src", "standalone", "standalone.ts"), envelope: path.resolve(__dirname, "src", "standalone", "EnvelopeApp.ts"), @@ -43,7 +42,7 @@ module.exports = async (env) => { static: { directory: "./dist", }, - port: buildEnv.runtimeToolsProcessDevUIWebapp.port, + port: env.runtimeToolsProcessDevUIWebapp.port, compress: true, historyApiFallback: true, hot: true, @@ -69,7 +68,7 @@ module.exports = async (env) => { KOGITO_APP_VERSION: "DEV", KOGITO_APP_NAME: "Runtime tools dev-ui", KOGITO_DATAINDEX_HTTP_URL: dataIndexURL, - KOGITO_REMOTE_KOGITO_APP_URL: buildEnv.runtimeToolsProcessDevUIWebapp.kogitoAppUrl, + KOGITO_REMOTE_KOGITO_APP_URL: env.runtimeToolsProcessDevUIWebapp.kogitoAppUrl, }), new CopyPlugin({ patterns: [ @@ -99,11 +98,11 @@ module.exports = async (env) => { new HtmlReplaceWebpackPlugin([ { pattern: /\${WEBPACK_REPLACEMENT_WEBAPP_HOST}/g, - replacement: () => buildEnv.runtimeToolsProcessDevUIWebapp.host ?? "", + replacement: () => env.runtimeToolsProcessDevUIWebapp.host ?? "", }, { pattern: /\${WEBPACK_REPLACEMENT_WEBAPP_PORT}/g, - replacement: () => buildEnv.runtimeToolsProcessDevUIWebapp.port ?? "", + replacement: () => env.runtimeToolsProcessDevUIWebapp.port ?? "", }, ]), ], diff --git a/packages/runtime-tools-task-console-webapp/build/defaultEnvJson.js b/packages/runtime-tools-task-console-webapp/build/defaultEnvJson.js index 399e6b5c929..1dfbfde3c21 100644 --- a/packages/runtime-tools-task-console-webapp/build/defaultEnvJson.js +++ b/packages/runtime-tools-task-console-webapp/build/defaultEnvJson.js @@ -17,18 +17,18 @@ * under the License. */ -const { env: buildEnv } = require("../env"); +const { env } = require("../env"); const version = require("../package.json").version; module.exports = { defaultEnvJson: { - RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE: buildEnv.runtimeToolsTaskConsoleWebapp.kogitoEnvMode, + RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_ENV_MODE: env.runtimeToolsTaskConsoleWebapp.kogitoEnvMode, RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_NAME: "Task Console", RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_APP_VERSION: version, RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_STATES_LIST: "Ready,Reserved,Completed,Aborted,Skipped", RUNTIME_TOOLS_TASK_CONSOLE_KOGITO_TASK_ACTIVE_STATES_LIST: "Ready,Reserved", - RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT: buildEnv.runtimeToolsTaskConsoleWebapp.kogitoDataIndexUrl, + RUNTIME_TOOLS_TASK_CONSOLE_DATA_INDEX_ENDPOINT: env.runtimeToolsTaskConsoleWebapp.kogitoDataIndexUrl, KOGITO_CONSOLES_KEYCLOAK_DISABLE_HEALTH_CHECK: false, KOGITO_CONSOLES_KEYCLOAK_UPDATE_TOKEN_VALIDITY: 30, KOGITO_CONSOLES_KEYCLOAK_HEALTH_CHECK_URL: diff --git a/packages/runtime-tools-task-console-webapp/webpack.config.js b/packages/runtime-tools-task-console-webapp/webpack.config.js index 3191882517d..4dda3c7e5ee 100644 --- a/packages/runtime-tools-task-console-webapp/webpack.config.js +++ b/packages/runtime-tools-task-console-webapp/webpack.config.js @@ -22,13 +22,13 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const CopyPlugin = require("copy-webpack-plugin"); -const { env: buildEnv } = require("./env"); +const { env } = require("./env"); const { defaultEnvJson } = require("./build/defaultEnvJson"); const BG_IMAGES_DIRNAME = "bgimages"; -module.exports = async (env) => { - return merge(common(env), { +module.exports = async (webpackEnv) => { + return merge(common(webpackEnv), { entry: { index: path.resolve(__dirname, "src", "index.tsx"), "resources/form-displayer": "./src/resources/form-displayer.ts", @@ -37,8 +37,8 @@ module.exports = async (env) => { static: { directory: "./dist", }, - host: buildEnv.runtimeToolsTaskConsoleWebapp.host, - port: buildEnv.runtimeToolsTaskConsoleWebapp.port, + host: env.runtimeToolsTaskConsoleWebapp.host, + port: env.runtimeToolsTaskConsoleWebapp.port, compress: true, historyApiFallback: true, hot: true, diff --git a/packages/scesim-editor/playwright.config.ts b/packages/scesim-editor/playwright.config.ts index b837bceb451..2d881010ce4 100644 --- a/packages/scesim-editor/playwright.config.ts +++ b/packages/scesim-editor/playwright.config.ts @@ -20,9 +20,9 @@ import { defineConfig } from "@playwright/test"; import playwrightBaseConfig from "@kie-tools/playwright-base/playwright.config"; import merge from "lodash/merge"; -import { env } from "./env"; -const buildEnv: any = env; +import { env } from "./env"; +const buildEnv: any = env; // build-env is not typed const customConfig = defineConfig({ use: { diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/mvn.bootstrap.js b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/mvn.bootstrap.js index 04b3fd08569..a6a4c83aba8 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/mvn.bootstrap.js +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/mvn.bootstrap.js @@ -17,16 +17,16 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile( ` --batch-mode -Dstyle.color=always - -Drevision=${buildEnv.env.swfDeploymentQuarkusApp.version} - -Dquarkus.platform.version=${buildEnv.env.quarkusPlatform.version} - -Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version} + -Drevision=${env.swfDeploymentQuarkusApp.version} + -Dquarkus.platform.version=${env.quarkusPlatform.version} + -Dversion.org.kie.kogito=${env.kogitoRuntime.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `, { ignoreDefault: true } // Can't have special configuration that only works inside this repo. diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json index d7584923483..66bb7bde434 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/package.json @@ -27,10 +27,10 @@ "quarkus:dev:win32": "mvn clean package quarkus:dev `-DskipTests" }, "dependencies": { + "@kie-tools/maven-base": "workspace:*", "@kie-tools/sonataflow-quarkus-devui": "workspace:*" }, "devDependencies": { - "@kie-tools/maven-base": "workspace:*", "@kie-tools/root-env": "workspace:*", "run-script-os": "^1.1.6" }, diff --git a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml index 34b1944a549..a372f6c46e1 100644 --- a/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml +++ b/packages/serverless-logic-web-tools-swf-deployment-quarkus-app/pom.xml @@ -165,25 +165,34 @@ + + + + + use-maven-repo-local-tail + + + kieTools.do-not-use-this-property.ignoreMavenRepoLocalTail + !true + + + + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + + - - - - - org.apache.maven.plugins - maven-install-plugin - - - default-install - none - - - - - - io.quarkus 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 9daf09c7005..d73cc3c46df 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 @@ -17,9 +17,9 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.slwtDevModeImage.version} + -Drevision=${env.slwtDevModeImage.version} `); diff --git a/packages/serverless-logic-web-tools/build/defaultEnvJson.ts b/packages/serverless-logic-web-tools/build/defaultEnvJson.ts index 95c73bfb6db..3b37893e395 100644 --- a/packages/serverless-logic-web-tools/build/defaultEnvJson.ts +++ b/packages/serverless-logic-web-tools/build/defaultEnvJson.ts @@ -22,7 +22,6 @@ import { EnvJson } from "../src/env/EnvJson"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { env } from "../env"; - const buildEnv: any = env; // build-env is not typed export const defaultEnvJson: EnvJson = { diff --git a/packages/serverless-logic-web-tools/webpack.config.ts b/packages/serverless-logic-web-tools/webpack.config.ts index 961ee98cb09..5ab93ac0360 100644 --- a/packages/serverless-logic-web-tools/webpack.config.ts +++ b/packages/serverless-logic-web-tools/webpack.config.ts @@ -36,10 +36,9 @@ import HtmlReplaceWebpackPlugin from "html-replace-webpack-plugin"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { env } from "./env"; - const buildEnv: any = env; // build-env is not typed -export default async (env: any, argv: any) => { +export default async (webpackEnv: any, webpackArgv: any) => { const buildInfo = getBuildInfo(); const gtmResource = getGtmResource(); const [swfBuilderImageRegistry, swfBuilderImageAccount, swfBuilderImageName, swfBuilderImageTag] = @@ -56,7 +55,7 @@ export default async (env: any, argv: any) => { ] = getDashbuilderViewerImageArgs(); return [ - merge(common(env), { + merge(common(webpackEnv), { entry: { "workspace/worker/sharedWorker": "./src/workspace/worker/sharedWorker.ts", }, @@ -80,7 +79,7 @@ export default async (env: any, argv: any) => { ], }), { - ...merge(common(env), { + ...merge(common(webpackEnv), { entry: { index: "./src/index.tsx", "yard-editor-envelope": "./src/envelope/YardEditorEnvelopeApp.ts", diff --git a/packages/serverless-workflow-combined-editor/dev-webapp/webpack.config.js b/packages/serverless-workflow-combined-editor/dev-webapp/webpack.config.js index 82d442e7915..867e11d98ad 100644 --- a/packages/serverless-workflow-combined-editor/dev-webapp/webpack.config.js +++ b/packages/serverless-workflow-combined-editor/dev-webapp/webpack.config.js @@ -25,10 +25,9 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const swEditorAssets = require("@kie-tools/serverless-workflow-diagram-editor-assets"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), @@ -100,6 +99,6 @@ module.exports = (env) => historyApiFallback: true, static: [{ directory: path.join(__dirname) }], compress: true, - port: buildEnv.serverlessWorkflowCombinedEditor.dev.port, + port: env.serverlessWorkflowCombinedEditor.dev.port, }, }); diff --git a/packages/serverless-workflow-dev-ui-webapp/webpack.config.js b/packages/serverless-workflow-dev-ui-webapp/webpack.config.js index 8f66faab9e4..a7732717cff 100644 --- a/packages/serverless-workflow-dev-ui-webapp/webpack.config.js +++ b/packages/serverless-workflow-dev-ui-webapp/webpack.config.js @@ -29,10 +29,9 @@ const swEditor = require("@kie-tools/serverless-workflow-diagram-editor-assets") 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), { +module.exports = async (webpackEnv) => + merge(common(webpackEnv), { entry: { standalone: path.resolve(__dirname, "src", "standalone", "standalone.ts"), envelope: path.resolve(__dirname, "src", "standalone", "EnvelopeApp.ts"), @@ -45,7 +44,7 @@ module.exports = async (env) => static: { directory: "./dist", }, - port: buildEnv.runtimeToolsDevUiWebapp.dev.port, + port: env.runtimeToolsDevUiWebapp.dev.port, compress: true, historyApiFallback: true, hot: true, diff --git a/packages/serverless-workflow-diagram-editor/mvn.bootstrap.js b/packages/serverless-workflow-diagram-editor/mvn.bootstrap.js index 8eeef74d1f1..562adaeaeab 100644 --- a/packages/serverless-workflow-diagram-editor/mvn.bootstrap.js +++ b/packages/serverless-workflow-diagram-editor/mvn.bootstrap.js @@ -17,7 +17,7 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies, @@ -28,7 +28,7 @@ setupMavenConfigFile( ` --batch-mode -Dstyle.color=always - -Drevision=${buildEnv.env.swfDiagramEditor.version} + -Drevision=${env.swfDiagramEditor.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()},${DEFAULT_LOCAL_REPO} `, // For some reason, j2cl-maven-plugin needs the DEFAULT_LOCAL_REPO here as the last tail too. { ignoreDefault: true } // Default configuration doesn't work for this module. Since this module is not going to last long, we rely on this workaround for a while. diff --git a/packages/serverless-workflow-diagram-editor/pom.xml b/packages/serverless-workflow-diagram-editor/pom.xml index 175915f4b7e..7d787d1d35e 100644 --- a/packages/serverless-workflow-diagram-editor/pom.xml +++ b/packages/serverless-workflow-diagram-editor/pom.xml @@ -712,18 +712,6 @@ - - - org.apache.maven.plugins - maven-install-plugin - - - default-install - none - - - - org.kie.j2cl.tools j2cl-maven-plugin @@ -2065,5 +2053,31 @@ ${env.ghprbTargetBranch} + + + + + + use-maven-repo-local-tail + + + kieTools.do-not-use-this-property.ignoreMavenRepoLocalTail + !true + + + + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + + diff --git a/packages/serverless-workflow-standalone-editor/webpack.build-resources.config.js b/packages/serverless-workflow-standalone-editor/webpack.build-resources.config.js index 6d5ea48456a..80f18e960db 100644 --- a/packages/serverless-workflow-standalone-editor/webpack.build-resources.config.js +++ b/packages/serverless-workflow-standalone-editor/webpack.build-resources.config.js @@ -22,8 +22,8 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const CopyPlugin = require("copy-webpack-plugin"); const patternflyBase = require("@kie-tools-core/patternfly-base"); -module.exports = (env) => [ - merge(common(env), { +module.exports = (webpackEnv) => [ + merge(common(webpackEnv), { entry: { "preprocessor/preprocessor": "./src/preprocessor/preprocessor.ts", }, @@ -34,7 +34,7 @@ module.exports = (env) => [ __filename: true, //Uses current working dir }, }), - merge(common(env), { + merge(common(webpackEnv), { output: { publicPath: "", }, diff --git a/packages/serverless-workflow-standalone-editor/webpack.editor-resources.config.js b/packages/serverless-workflow-standalone-editor/webpack.editor-resources.config.js index 43133134c3e..24b178fa0d3 100644 --- a/packages/serverless-workflow-standalone-editor/webpack.editor-resources.config.js +++ b/packages/serverless-workflow-standalone-editor/webpack.editor-resources.config.js @@ -23,8 +23,8 @@ const patternflyBase = require("@kie-tools-core/patternfly-base"); const FileManagerPlugin = require("filemanager-webpack-plugin"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); -module.exports = (env) => [ - merge(common(env), { +module.exports = (webpackEnv) => [ + merge(common(webpackEnv), { output: { publicPath: "", }, diff --git a/packages/serverless-workflow-standalone-editor/webpack.package-resources.config.js b/packages/serverless-workflow-standalone-editor/webpack.package-resources.config.js index a182723a81e..e288290f12d 100644 --- a/packages/serverless-workflow-standalone-editor/webpack.package-resources.config.js +++ b/packages/serverless-workflow-standalone-editor/webpack.package-resources.config.js @@ -21,11 +21,10 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const path = require("path"); const { env } = require("./env"); -const buildEnv = env; const patternflyBase = require("@kie-tools-core/patternfly-base"); -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { output: { path: path.join(__dirname, "dist"), filename: "[name]/index.js", @@ -42,7 +41,7 @@ module.exports = (env) => historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }], compress: true, - port: buildEnv.standaloneEditors.dev.port, + port: env.standaloneEditors.dev.port, }, ignoreWarnings: [/Failed to parse source map/], }); diff --git a/packages/serverless-workflow-text-editor/dev-webapp/webpack.config.js b/packages/serverless-workflow-text-editor/dev-webapp/webpack.config.js index 6b579a40fe3..93626a0336b 100644 --- a/packages/serverless-workflow-text-editor/dev-webapp/webpack.config.js +++ b/packages/serverless-workflow-text-editor/dev-webapp/webpack.config.js @@ -24,10 +24,9 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), @@ -72,6 +71,6 @@ module.exports = (env) => historyApiFallback: true, static: [{ directory: path.join(__dirname) }], compress: true, - port: buildEnv.serverlessWorkflowTextEditor.dev.port, + port: env.serverlessWorkflowTextEditor.dev.port, }, }); diff --git a/packages/serverless-workflow-vscode-extension/webpack.config.js b/packages/serverless-workflow-vscode-extension/webpack.config.js index 791145178d5..b8b113dc1ec 100644 --- a/packages/serverless-workflow-vscode-extension/webpack.config.js +++ b/packages/serverless-workflow-vscode-extension/webpack.config.js @@ -24,8 +24,8 @@ const { merge } = require("webpack-merge"); const { ProvidePlugin } = require("webpack"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "ServerlessWorkflowEditor", libraryTarget: "umd", @@ -37,14 +37,14 @@ const commonConfig = (env) => }, }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension": "./src/extension/extension.ts", }, }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "webworker", entry: { "extension/extensionWeb": "./src/extension/extension.ts", @@ -56,7 +56,7 @@ module.exports = async (env) => [ }), ], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "webview/editors/serverless-workflow/serverless-workflow-diagram-editor-envelope": diff --git a/packages/sonataflow-builder-image/install.js b/packages/sonataflow-builder-image/install.js index 00f6c3a3bbf..bd2a2098f1e 100644 --- a/packages/sonataflow-builder-image/install.js +++ b/packages/sonataflow-builder-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowBuilderImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.sonataflowBuilderImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -56,14 +56,14 @@ if (imageYamlFiles.length !== 1) { const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]); let imageYaml = fs.readFileSync(originalYamlPath, "utf8"); -const imageUrl = `${buildEnv.env.sonataflowBuilderImage.registry}/${buildEnv.env.sonataflowBuilderImage.account}/${buildEnv.env.sonataflowBuilderImage.name}`; +const imageUrl = `${env.sonataflowBuilderImage.registry}/${env.sonataflowBuilderImage.account}/${env.sonataflowBuilderImage.name}`; // Replace the whole string between quotes ("") with the image name imageYaml = imageYaml.replace(/(?<=")(.*sonataflow-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.sonataflowBuilderImage.name}-image.yaml`)); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.sonataflowBuilderImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/sonataflow-deployment-webapp/webpack.config.js b/packages/sonataflow-deployment-webapp/webpack.config.js index 04f5504fcd9..5375790ae26 100644 --- a/packages/sonataflow-deployment-webapp/webpack.config.js +++ b/packages/sonataflow-deployment-webapp/webpack.config.js @@ -27,10 +27,9 @@ const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const swEditorAssets = require("@kie-tools/serverless-workflow-diagram-editor-assets"); const { env } = require("./env"); -const buildEnv = env; -module.exports = async (env) => - merge(common(env), { +module.exports = async (webpackEnv) => + merge(common(webpackEnv), { entry: { index: "./src/index.tsx", "serverless-workflow-combined-editor-envelope": "./src/envelope/ServerlessWorkflowCombinedEditorEnvelopeApp.ts", @@ -95,7 +94,7 @@ module.exports = async (env) => historyApiFallback: false, static: [{ directory: path.join(__dirname, "./dist") }, { directory: path.join(__dirname, "./static") }], compress: true, - port: buildEnv.sonataFlowDeploymentWebapp.dev.port, + port: env.sonataFlowDeploymentWebapp.dev.port, client: { overlay: false, }, diff --git a/packages/sonataflow-devmode-image/install.js b/packages/sonataflow-devmode-image/install.js index f701da5c030..baaa6f34bc7 100644 --- a/packages/sonataflow-devmode-image/install.js +++ b/packages/sonataflow-devmode-image/install.js @@ -20,7 +20,7 @@ const { execSync } = require("child_process"); const fs = require("fs"); -const buildEnv = require("./env"); +const { env } = 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")); @@ -33,7 +33,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${buildEnv.env.sonataflowDevModeImage.buildTag} --source-folder ./resources`, + python3 ${sonataflowImageCommonDir}/resources/scripts/versions_manager.py --bump-to ${env.sonataflowDevModeImage.buildTag} --source-folder ./resources`, { stdio: "inherit" } ); @@ -47,14 +47,14 @@ if (imageYamlFiles.length !== 1) { const originalYamlPath = path.join(resourcesPath, imageYamlFiles[0]); let imageYaml = fs.readFileSync(originalYamlPath, "utf8"); -const imageUrl = `${buildEnv.env.sonataflowDevModeImage.registry}/${buildEnv.env.sonataflowDevModeImage.account}/${buildEnv.env.sonataflowDevModeImage.name}`; +const imageUrl = `${env.sonataflowDevModeImage.registry}/${env.sonataflowDevModeImage.account}/${env.sonataflowDevModeImage.name}`; // Replace the whole string between quotes ("") with the image name imageYaml = imageYaml.replace(/(?<=")(.*sonataflow-devmode.*)(?=")/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.sonataflowDevModeImage.name}-image.yaml`)); +fs.renameSync(originalYamlPath, path.join(resourcesPath, `${env.sonataflowDevModeImage.name}-image.yaml`)); // Replace image URL in .feature files replaceInFile.sync({ diff --git a/packages/sonataflow-image-common/install.js b/packages/sonataflow-image-common/install.js index d50e66e5a08..6ba30c8d70d 100644 --- a/packages/sonataflow-image-common/install.js +++ b/packages/sonataflow-image-common/install.js @@ -19,7 +19,7 @@ const { execSync } = require("child_process"); -const buildEnv = require("./env"); +const { env } = require("./env"); const path = require("path"); const pythonVenvDir = path.dirname(require.resolve("@kie-tools/python-venv/package.json")); @@ -30,7 +30,7 @@ const activateCmd = execSync( `${activateCmd} && \ - python3 ./resources/scripts/versions_manager.py --bump-to ${buildEnv.env.root.streamName} --source-folder ./resources`, + python3 ./resources/scripts/versions_manager.py --bump-to ${env.root.streamName} --source-folder ./resources`, { stdio: "inherit" } ); diff --git a/packages/sonataflow-management-console-webapp/build/defaultEnvJson.ts b/packages/sonataflow-management-console-webapp/build/defaultEnvJson.ts index ac51ebae736..f3d602ea355 100644 --- a/packages/sonataflow-management-console-webapp/build/defaultEnvJson.ts +++ b/packages/sonataflow-management-console-webapp/build/defaultEnvJson.ts @@ -22,7 +22,6 @@ import { EnvJson } from "../src/env/EnvJson"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import { env } from "../env"; - const buildEnv: any = env; // build-env is not typed const version = require("../package.json").version; diff --git a/packages/sonataflow-management-console-webapp/webpack.config.ts b/packages/sonataflow-management-console-webapp/webpack.config.ts index 915d98d9708..92fa753a8f8 100644 --- a/packages/sonataflow-management-console-webapp/webpack.config.ts +++ b/packages/sonataflow-management-console-webapp/webpack.config.ts @@ -35,10 +35,10 @@ import { env } from "./env"; const BG_IMAGES_DIRNAME = "bgimages"; const buildEnv: any = env; // build-env is not typed -export default async (env: any, argv: any) => { +export default async (webpackEnv: any, webpackArgv: any) => { return [ { - ...merge(common(env), { + ...merge(common(webpackEnv), { entry: { index: path.resolve(__dirname, "src", "index.tsx"), "serverless-workflow-combined-editor-envelope": diff --git a/packages/sonataflow-operator/install.js b/packages/sonataflow-operator/install.js index 2a1d0bb8733..07419fde7ef 100644 --- a/packages/sonataflow-operator/install.js +++ b/packages/sonataflow-operator/install.js @@ -19,13 +19,14 @@ const fs = require("fs"); const path = require("path"); -const buildEnv = require("./env"); +const { env } = require("./env"); const sonataflowPlatformFiles = fs .readdirSync(path.resolve(__dirname, "test/testdata"), { recursive: true, }) .filter((fileName) => fileName.endsWith("02-sonataflow_platform.yaml")); + sonataflowPlatformFiles.forEach((filePath) => { const fullFilePath = path.resolve(__dirname, path.join("test/testdata"), filePath); fs.writeFileSync( @@ -34,11 +35,11 @@ sonataflowPlatformFiles.forEach((filePath) => { .readFileSync(fullFilePath, "utf-8") .replace( /org\.kie:kie-addons-quarkus-persistence-jdbc:[^,\n]*/, - `org.kie:kie-addons-quarkus-persistence-jdbc:${buildEnv.env.kogitoRuntime.version}` + `org.kie:kie-addons-quarkus-persistence-jdbc:${env.kogitoRuntime.version}` ) .replace( /org\.kie\.kogito:kogito-addons-quarkus-jobs-knative-eventing:[^,\n]*/, - `org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:${buildEnv.env.kogitoRuntime.version}` + `org.kie.kogito:kogito-addons-quarkus-jobs-knative-eventing:${env.kogitoRuntime.version}` ) ); }); diff --git a/packages/sonataflow-quarkus-devui/mvn.bootstrap.js b/packages/sonataflow-quarkus-devui/mvn.bootstrap.js index 9a5abf6af99..92178cbb293 100644 --- a/packages/sonataflow-quarkus-devui/mvn.bootstrap.js +++ b/packages/sonataflow-quarkus-devui/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.sonataflowQuarkusDevuiExtension.version} + -Drevision=${env.sonataflowQuarkusDevuiExtension.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/stunner-editors-dmn-loader/webpack.config.js b/packages/stunner-editors-dmn-loader/webpack.config.js index 007ded04be1..d7c69102038 100644 --- a/packages/stunner-editors-dmn-loader/webpack.config.js +++ b/packages/stunner-editors-dmn-loader/webpack.config.js @@ -22,13 +22,12 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const { env } = require("./env"); -const buildEnv = env; -module.exports = (env) => { - const outputPath = buildEnv.stunnerEditors.dmnLoader.outputPath; +module.exports = (webpackEnv) => { + const outputPath = env.stunnerEditors.dmnLoader.outputPath; console.info(`Stunner Editors :: DMN Loader :: Output path: '${outputPath}'`); - return merge(common(env), { + return merge(common(webpackEnv), { entry: "./src/index.tsx", target: "web", diff --git a/packages/stunner-editors/mvn.bootstrap.js b/packages/stunner-editors/mvn.bootstrap.js index 3229ddf13c5..58312e31843 100644 --- a/packages/stunner-editors/mvn.bootstrap.js +++ b/packages/stunner-editors/mvn.bootstrap.js @@ -17,15 +17,15 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile( ` --batch-mode -Dstyle.color=always - -Drevision=${buildEnv.env.stunnerEditors.version} - -Dversion.org.kie.kogito=${buildEnv.env.kogitoRuntime.version} + -Drevision=${env.stunnerEditors.version} + -Dversion.org.kie.kogito=${env.kogitoRuntime.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `, { ignoreDefault: true } // Default configuration doesn't work for this module. Since this module is not going to last long, we rely on this workaround for a while. diff --git a/packages/stunner-editors/pom.xml b/packages/stunner-editors/pom.xml index 556133e7470..71d959e544b 100644 --- a/packages/stunner-editors/pom.xml +++ b/packages/stunner-editors/pom.xml @@ -837,18 +837,6 @@ - - - org.apache.maven.plugins - maven-install-plugin - - - default-install - none - - - - org.codehaus.mojo build-helper-maven-plugin @@ -2115,5 +2103,30 @@ ${env.ghprbTargetBranch} + + + + + use-maven-repo-local-tail + + + kieTools.do-not-use-this-property.ignoreMavenRepoLocalTail + !true + + + + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + + diff --git a/packages/uniforms-bootstrap4-codegen/webpack.config.js b/packages/uniforms-bootstrap4-codegen/webpack.config.js index 5064b497e5b..0faa9a9c8d8 100644 --- a/packages/uniforms-bootstrap4-codegen/webpack.config.js +++ b/packages/uniforms-bootstrap4-codegen/webpack.config.js @@ -23,8 +23,8 @@ const nodeExternals = require("webpack-node-externals"); const CopyPlugin = require("copy-webpack-plugin"); const path = require("path"); -module.exports = (env, args) => [ - merge(common(env, args), { +module.exports = (webpackEnv, webpackArgv) => [ + merge(common(webpackEnv, webpackArgv), { entry: { index: "./src/index.ts", }, diff --git a/packages/uniforms-patternfly-codegen/webpack.config.js b/packages/uniforms-patternfly-codegen/webpack.config.js index e443c933a6d..2971e12cfb1 100644 --- a/packages/uniforms-patternfly-codegen/webpack.config.js +++ b/packages/uniforms-patternfly-codegen/webpack.config.js @@ -22,8 +22,8 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const nodeExternals = require("webpack-node-externals"); const CopyPlugin = require("copy-webpack-plugin"); -module.exports = (env) => [ - merge(common(env), { +module.exports = (webpackEnv) => [ + merge(common(webpackEnv), { entry: { index: "./src/index.ts", }, diff --git a/packages/vscode-extension-dashbuilder-editor/webpack.config.js b/packages/vscode-extension-dashbuilder-editor/webpack.config.js index 8b23d8cf429..9c4419e03fd 100644 --- a/packages/vscode-extension-dashbuilder-editor/webpack.config.js +++ b/packages/vscode-extension-dashbuilder-editor/webpack.config.js @@ -24,8 +24,8 @@ const dashbuilderClient = require("@kie-tools/dashbuilder-client"); const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "DashbuilderEditor", libraryTarget: "umd", @@ -37,15 +37,15 @@ const commonConfig = (env) => }, }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension": "./src/extension/extension.ts", }, plugins: [], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "webworker", entry: { "browser/extension": "./src/browser/extension.ts", @@ -57,7 +57,7 @@ module.exports = async (env) => [ }), ], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "webview/DashbuilderEditorEnvelopeApp": "./src/webview/DashbuilderEditorEnvelopeApp.ts", diff --git a/packages/vscode-extension-kie-ba-bundle/webpack.config.js b/packages/vscode-extension-kie-ba-bundle/webpack.config.js index cfe2975d743..50a126aeb13 100644 --- a/packages/vscode-extension-kie-ba-bundle/webpack.config.js +++ b/packages/vscode-extension-kie-ba-bundle/webpack.config.js @@ -20,8 +20,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -module.exports = async (env) => [ - merge(common(env), { +module.exports = async (webpackEnv) => [ + merge(common(webpackEnv), { output: { library: "VsCodeExtensionKieBaBundle", libraryTarget: "umd", diff --git a/packages/vscode-extension-kogito-bundle/webpack.config.js b/packages/vscode-extension-kogito-bundle/webpack.config.js index 5d5fe06b019..fa82d0700d2 100644 --- a/packages/vscode-extension-kogito-bundle/webpack.config.js +++ b/packages/vscode-extension-kogito-bundle/webpack.config.js @@ -20,8 +20,8 @@ const { merge } = require("webpack-merge"); const common = require("@kie-tools-core/webpack-base/webpack.common.config"); -module.exports = async (env) => [ - merge(common(env), { +module.exports = async (webpackEnv) => [ + merge(common(webpackEnv), { output: { library: "KogitoBundle", libraryTarget: "umd", diff --git a/packages/vscode-java-code-completion-extension-plugin/mvn.bootstrap.js b/packages/vscode-java-code-completion-extension-plugin/mvn.bootstrap.js index 63c9daa077d..c599d90c1a6 100644 --- a/packages/vscode-java-code-completion-extension-plugin/mvn.bootstrap.js +++ b/packages/vscode-java-code-completion-extension-plugin/mvn.bootstrap.js @@ -17,10 +17,10 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, installMvnw, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); -const version = buildEnv.env.vscodeJavaCodeCompletionExtensionPlugin.version; +const version = env.vscodeJavaCodeCompletionExtensionPlugin.version; setupMavenConfigFile(` -Drevision=${version} diff --git a/packages/webpack-base/webpack.common.config.d.ts b/packages/webpack-base/webpack.common.config.d.ts index c246cd27f3e..2425777a0be 100644 --- a/packages/webpack-base/webpack.common.config.d.ts +++ b/packages/webpack-base/webpack.common.config.d.ts @@ -19,4 +19,4 @@ import * as webpack from "webpack"; -export default function common(env: any): webpack.Configuration; +export default function common(webpackEnv: any): webpack.Configuration; diff --git a/packages/webpack-base/webpack.common.config.js b/packages/webpack-base/webpack.common.config.js index 73d9e5a509d..a10f0c908fe 100644 --- a/packages/webpack-base/webpack.common.config.js +++ b/packages/webpack-base/webpack.common.config.js @@ -20,14 +20,12 @@ const path = require("path"); const webpackBaseEnv = require("./env"); -module.exports = (env) => { - const webpackEnv = env.dev ? webpackBaseEnv.env.webpack.dev : webpackBaseEnv.env.webpack.prod; +module.exports = (webpackEnv) => { + const { transpileOnly, minimize, sourceMaps, mode } = webpackEnv.dev + ? webpackBaseEnv.env.webpack.dev + : webpackBaseEnv.env.webpack.prod; - const transpileOnly = webpackEnv.transpileOnly; - const minimize = webpackEnv.minimize; - const sourceMaps = webpackEnv.sourceMaps; - const mode = webpackEnv.mode; - const live = env.live; + const live = webpackEnv.live; console.info(`Webpack :: ts-loader :: transpileOnly: ${transpileOnly}`); console.info(`Webpack :: minimize: ${minimize}`); diff --git a/packages/yard-editor/dev-webapp/webpack.config.js b/packages/yard-editor/dev-webapp/webpack.config.js index bf2cc9a10ce..46b25cc0a01 100644 --- a/packages/yard-editor/dev-webapp/webpack.config.js +++ b/packages/yard-editor/dev-webapp/webpack.config.js @@ -24,10 +24,9 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const patternflyBase = require("@kie-tools-core/patternfly-base"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const { env } = require("../env"); -const buildEnv = env; -module.exports = (env) => - merge(common(env), { +module.exports = (webpackEnv) => + merge(common(webpackEnv), { mode: "development", entry: { index: path.resolve(__dirname, "./index.tsx"), @@ -74,6 +73,6 @@ module.exports = (env) => historyApiFallback: true, static: [{ directory: path.join(__dirname) }], compress: true, - port: buildEnv.yardEditor.dev.port, + port: env.yardEditor.dev.port, }, }); diff --git a/packages/yard-model/mvn.bootstrap.js b/packages/yard-model/mvn.bootstrap.js index 81f8cf5ee24..33bb69a2439 100644 --- a/packages/yard-model/mvn.bootstrap.js +++ b/packages/yard-model/mvn.bootstrap.js @@ -17,11 +17,11 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, installMvnw, buildTailFromPackageJsonDependencies } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.yardModel.version} + -Drevision=${env.yardModel.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()} `); diff --git a/packages/yard-validator-worker/mvn.bootstrap.js b/packages/yard-validator-worker/mvn.bootstrap.js index f547612945d..5699ac5486b 100644 --- a/packages/yard-validator-worker/mvn.bootstrap.js +++ b/packages/yard-validator-worker/mvn.bootstrap.js @@ -17,7 +17,7 @@ * under the License. */ -const buildEnv = require("./env"); +const { env } = require("./env"); const { setupMavenConfigFile, installMvnw, @@ -26,7 +26,7 @@ const { } = require("@kie-tools/maven-base"); setupMavenConfigFile(` - -Drevision=${buildEnv.env.yardValidator.version} + -Drevision=${env.yardValidator.version} -Dmaven.repo.local.tail=${buildTailFromPackageJsonDependencies()},${DEFAULT_LOCAL_REPO} `); // For some reason, j2cl-maven-plugin needs the DEFAULT_LOCAL_REPO here as the last tail too. diff --git a/packages/yard-vscode-extension/webpack.config.js b/packages/yard-vscode-extension/webpack.config.js index 572356d3c1a..3b0adefe944 100644 --- a/packages/yard-vscode-extension/webpack.config.js +++ b/packages/yard-vscode-extension/webpack.config.js @@ -23,8 +23,8 @@ const common = require("@kie-tools-core/webpack-base/webpack.common.config"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); const { ProvidePlugin } = require("webpack"); -const commonConfig = (env) => - merge(common(env), { +const commonConfig = (webpackEnv) => + merge(common(webpackEnv), { output: { library: "YardEditor", libraryTarget: "umd", @@ -36,14 +36,14 @@ const commonConfig = (env) => }, }); -module.exports = async (env) => [ - merge(commonConfig(env), { +module.exports = async (webpackEnv) => [ + merge(commonConfig(webpackEnv), { target: "node", entry: { "extension/extension": "./src/extension/extension.ts", }, }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "webworker", entry: { "extension/extensionWeb": "./src/extension/extension.ts", @@ -55,7 +55,7 @@ module.exports = async (env) => [ }), ], }), - merge(commonConfig(env), { + merge(commonConfig(webpackEnv), { target: "web", entry: { "webview/YardEditorEnvelopeApp": "./src/webview/YardEditorEnvelopeApp.ts", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 132caa8cc3b..a7dfde9d1df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3201,9 +3201,6 @@ importers: '@kie-tools/dev-deployment-kogito-quarkus-blank-app': specifier: workspace:* version: link:../dev-deployment-kogito-quarkus-blank-app - '@kie-tools/jbpm-quarkus-devui': - specifier: workspace:* - version: link:../jbpm-quarkus-devui devDependencies: '@kie-tools/image-builder': specifier: workspace:* @@ -9635,13 +9632,13 @@ importers: packages/serverless-logic-web-tools-swf-deployment-quarkus-app: dependencies: + '@kie-tools/maven-base': + specifier: workspace:* + version: link:../maven-base '@kie-tools/sonataflow-quarkus-devui': specifier: workspace:* version: link:../sonataflow-quarkus-devui devDependencies: - '@kie-tools/maven-base': - specifier: workspace:* - version: link:../maven-base '@kie-tools/root-env': specifier: workspace:* version: link:../root-env