Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 100 additions & 133 deletions component-starter-server/src/main/frontend/package-lock.json

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions component-starter-server/src/main/frontend/package-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"lint": "talend-scripts lint"
},
"dependencies": {
"@babel/runtime": "7.26.10",
"@talend/bootstrap-theme": "9.2.2",
"@talend/design-system": "11.0.7",
"@talend/icons": "7.10.3",
Expand All @@ -17,8 +16,6 @@
"ace-builds": "^1.35.2",
"body-parser": "1.20.3",
"classnames": "^2.5.1",
"form-data": ">=4.0.4",
"http-proxy-middleware": "2.0.9",
"i18next": "^23.11.5",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand All @@ -33,24 +30,29 @@
"@talend/scripts-core": "^16.5.1",
"atob": "^2.1.2",
"body-parser": "^1.18.3",
"form-data": ">=4.0.4",
"webpack-dev-server": "5.2.4"
"webpack-dev-server": "^5.2.5"
},
"proxy": "http://localhost:8080/",
"overrides": {
"@babel/plugin-transform-modules-systemjs": "^7.29.4",
"@babel/core": "^7.29.6",
"@babel/plugin-transform-modules-systemjs": "^7.29.6",
"@babel/runtime": "^7.29.6",
"@tootallnate/once": "^3.0.1",
"ajv@6": "^6.14.0",
"ajv@8": "^8.18.0",
"brace-expansion": "^2.0.3",
"fast-uri": "^3.1.2",
"flatted": "^3.4.2",
"follow-redirects": "^1.16.0",
"form-data": "^4.0.6",
"handlebars": "^4.7.9",
"http-proxy-middleware": "^3.0.6",
"immutable@3": "^3.8.3",
Comment thread
undx marked this conversation as resolved.
"immutable@5": "^5.1.5",
"js-cookie": "^3.0.7",
"js-yaml": "^4.2.0",
"jsonpath": "^1.3.0",
"launch-editor": "^2.14.1",
"lodash": "^4.18.1",
"lodash-es": "^4.18.1",
"minimatch": "^9.0.9",
Expand All @@ -62,6 +64,7 @@
"postcss": "^8.5.10",
"qs": "^6.15.2",
"serialize-javascript": "^7.0.5",
"shell-quote": "^1.8.4",
"sockjs": "^0.3.24",
"tmp": "^0.2.6",
"underscore": "^1.13.8",
Expand Down
15 changes: 9 additions & 6 deletions component-starter-server/src/main/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"lint": "talend-scripts lint"
},
"dependencies": {
"@babel/runtime": "7.26.10",
"@talend/bootstrap-theme": "9.2.2",
"@talend/design-system": "11.0.7",
"@talend/icons": "7.10.3",
Expand All @@ -17,8 +16,6 @@
"ace-builds": "^1.35.2",
"body-parser": "1.20.3",
"classnames": "^2.5.1",
"form-data": ">=4.0.4",
"http-proxy-middleware": "2.0.9",
"i18next": "^23.11.5",
"prop-types": "^15.8.1",
"react": "^18.3.1",
Expand All @@ -33,24 +30,29 @@
"@talend/scripts-core": "^16.5.1",
"atob": "^2.1.2",
"body-parser": "^1.18.3",
"form-data": ">=4.0.4",
"webpack-dev-server": "5.2.4"
"webpack-dev-server": "^5.2.5"
},
"proxy": "http://localhost:8080/",
"overrides": {
"@babel/plugin-transform-modules-systemjs": "^7.29.4",
"@babel/core": "^7.29.6",
"@babel/plugin-transform-modules-systemjs": "^7.29.6",
"@babel/runtime": "^7.29.6",
"@tootallnate/once": "^3.0.1",
"ajv@6": "^6.14.0",
"ajv@8": "^8.18.0",
"brace-expansion": "^2.0.3",
"fast-uri": "^3.1.2",
"flatted": "^3.4.2",
"follow-redirects": "^1.16.0",
"form-data": "^4.0.6",
"handlebars": "^4.7.9",
"http-proxy-middleware": "^3.0.6",
"immutable@3": "^3.8.3",
Comment thread
undx marked this conversation as resolved.
"immutable@5": "^5.1.5",
"js-cookie": "^3.0.7",
"js-yaml": "^4.2.0",
"jsonpath": "^1.3.0",
"launch-editor": "^2.14.1",
"lodash": "^4.18.1",
"lodash-es": "^4.18.1",
"minimatch": "^9.0.9",
Expand All @@ -62,6 +64,7 @@
"postcss": "^8.5.10",
"qs": "^6.15.2",
"serialize-javascript": "^7.0.5",
"shell-quote": "^1.8.4",
"sockjs": "^0.3.24",
"tmp": "^0.2.6",
"underscore": "^1.13.8",
Expand Down
25 changes: 13 additions & 12 deletions component-tools-webapp/src/main/frontend/backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const fs = require("fs");
const application = require("./application.json");
const bodyParser = require("body-parser");
const atob = require("atob");
const { createProxyMiddleware } = require("http-proxy-middleware");

function getApplication(req, res) {
res.json(application);
Expand Down Expand Up @@ -46,19 +47,19 @@ function setup(middlewares, devServer) {

devServer.app.use(bodyParser.urlencoded({ extended: true }));
devServer.app.use(bodyParser.json());
// Use the `unshift` method if you want to run a middleware before all other middlewares
// or when you are migrating from the `onBeforeSetupMiddleware` option
middlewares.unshift({
name: "project-configuration",
path: "/api/v1/application/index",
middleware: getApplication,
});

middlewares.unshift({
name: "project-configuration",
path: "/api/v1/application/detail/:detailId",
middleware: getApplicationDetail,
});
devServer.app.get("/api/v1/application/index", getApplication);
devServer.app.get("/api/v1/application/detail/:detailId", getApplicationDetail);

devServer.app.use(
createProxyMiddleware({
pathFilter: "/api",
target: process.env.API_URL || "http://localhost:10101",
changeOrigin: true,
secure: false,
})
Comment on lines 48 to +60
);

return middlewares;
}

Expand Down
Loading
Loading