Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhamad Muchlis committed Aug 23, 2024
1 parent b8a12a7 commit 0b0d73f
Show file tree
Hide file tree
Showing 7 changed files with 13,094 additions and 6,321 deletions.
16 changes: 8 additions & 8 deletions ui-packages/packages/consoles-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
},
"dependencies": {
"@kogito-apps/components-common": "workspace:*",
"@patternfly/react-core": "^4.276.8",
"@patternfly/react-icons": "^4.93.6",
"@patternfly/react-styles": "^4.92.6",
"@patternfly/react-core": "^4.278.1",
"@patternfly/react-icons": "^4.93.7",
"@patternfly/react-styles": "^4.92.8",
"axios": "0.21.2",
"gql-query-builder": "3.1.3",
"graphql-tag": "2.0.0",
"history": "^4.10.1",
"keycloak-js": "^13.0.1",
"keycloak-js": "^25.0.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router": "^5.3.4",
Expand All @@ -46,19 +46,19 @@
"devDependencies": {
"@apollo/react-common": "3.1.4",
"@apollo/react-hooks": "^3.1.5",
"@babel/core": "^7.22.8",
"@babel/core": "^7.25.2",
"@graphql-codegen/add": "^3.2.3",
"@graphql-codegen/cli": "^2.16.5",
"@graphql-codegen/introspection": "^2.2.3",
"@graphql-codegen/typescript": "^2.8.8",
"@graphql-codegen/typescript-operations": "^2.5.13",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@kogito-apps/ouia-tools": "workspace:*",
"@testing-library/react": "^11.2.6",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^11.2.7",
"@types/jest": "^26.0.24",
"@types/react": "17.0.5",
"@types/react-dom": "^17.0.20",
"@types/react-dom": "^17.0.25",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"babel-jest": "^25.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const checkAuthServerHealth = () => {
};

export const getKeycloakClient = (): Keycloak.KeycloakInstance => {
return Keycloak({
return new Keycloak({
realm: window['KOGITO_CONSOLES_KEYCLOAK_REALM'],
url: window['KOGITO_CONSOLES_KEYCLOAK_URL'],
clientId: window['KOGITO_CONSOLES_KEYCLOAK_CLIENT_ID']
Expand Down
32 changes: 20 additions & 12 deletions ui-packages/packages/management-console-webapp/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const HOST = process.env.HOST || 'localhost';
const PORT = process.env.PORT || '9000';

module.exports = function (env) {
const dataIndexURL = env?.KOGITO_DATAINDEX_HTTP_URL ?? 'http://localhost:4000/graphql';
const dataIndexURL =
env?.KOGITO_DATAINDEX_HTTP_URL ?? 'http://localhost:4000/graphql';
return merge(common, {
mode: 'development',
devtool: 'source-map',
Expand All @@ -33,20 +34,24 @@ module.exports = function (env) {
target: 'http://localhost:4000',
secure: false,
changeOrigin: true
},
}
}
},
plugins: [new webpack.EnvironmentPlugin({
KOGITO_ENV_MODE: 'DEV',
KOGITO_DATAINDEX_HTTP_URL: dataIndexURL
})],
plugins: [
new webpack.EnvironmentPlugin({
KOGITO_ENV_MODE: 'DEV',
KOGITO_DATAINDEX_HTTP_URL: dataIndexURL
})
],
module: {
rules: [
{
test: /\.(css|sass|scss)$/,
use: [ require.resolve('style-loader'),
require.resolve('css-loader'),
require.resolve('sass-loader')]
use: [
require.resolve('style-loader'),
require.resolve('css-loader'),
require.resolve('sass-loader')
]
}
]
},
Expand All @@ -56,7 +61,10 @@ module.exports = function (env) {
path.resolve('../../node_modules'),
path.resolve('./node_modules'),
path.resolve('./src')
]
],
fallback: {
crypto: false
}
}
})
}
});
};
15 changes: 11 additions & 4 deletions ui-packages/packages/management-console-webapp/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');

module.exports = merge(common, {
mode: 'production',
Expand All @@ -24,10 +24,17 @@ module.exports = merge(common, {
rules: [
{
test: /\.(css|sass|scss)$/,
use: [ require.resolve('style-loader'),
require.resolve('css-loader'),
require.resolve('sass-loader')]
use: [
require.resolve('style-loader'),
require.resolve('css-loader'),
require.resolve('sass-loader')
]
}
]
},
resolve: {
fallback: {
crypto: false // Disable polyfilling the 'crypto' module
}
}
});
27 changes: 15 additions & 12 deletions ui-packages/packages/task-console-webapp/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const HOST = process.env.HOST || 'localhost';
const PORT = process.env.PORT || '9000';

module.exports = function (env) {
const dataIndexURL = env?.KOGITO_DATAINDEX_HTTP_URL ?? 'http://localhost:4000/graphql';
const dataIndexURL =
env?.KOGITO_DATAINDEX_HTTP_URL ?? 'http://localhost:4000/graphql';
return merge(common, {
mode: 'development',
devtool: 'source-map',
Expand All @@ -43,12 +44,14 @@ module.exports = function (env) {
errors: true
},
progress: true
},
}
},
plugins: [new webpack.EnvironmentPlugin({
KOGITO_ENV_MODE: 'DEV',
KOGITO_DATAINDEX_HTTP_URL: dataIndexURL
})],
plugins: [
new webpack.EnvironmentPlugin({
KOGITO_ENV_MODE: 'DEV',
KOGITO_DATAINDEX_HTTP_URL: dataIndexURL
})
],
module: {
rules: [
{
Expand All @@ -59,10 +62,10 @@ module.exports = function (env) {
},
resolve: {
extensions: ['.tsx', '.ts', '.js', '.jsx'],
modules: [
path.resolve('node_modules'),
path.resolve(__dirname, 'src')
]
modules: [path.resolve('node_modules'), path.resolve(__dirname, 'src')],
fallback: {
crypto: false
}
}
})
}
});
};
9 changes: 7 additions & 2 deletions ui-packages/packages/task-console-webapp/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');

module.exports = merge(common, {
Expand All @@ -36,7 +36,7 @@ module.exports = merge(common, {
new webpack.EnvironmentPlugin({
KOGITO_ENV_MODE: 'PROD'
}),
new CopyPlugin({ patterns: [{ from: "./resources", to: "./resources" }]}),
new CopyPlugin({ patterns: [{ from: './resources', to: './resources' }] })
],
module: {
rules: [
Expand All @@ -45,5 +45,10 @@ module.exports = merge(common, {
use: [require.resolve('style-loader'), require.resolve('css-loader')]
}
]
},
resolve: {
fallback: {
crypto: false // Disable polyfilling the 'crypto' module
}
}
});
Loading

0 comments on commit 0b0d73f

Please sign in to comment.