Skip to content

Commit

Permalink
Update dependencies to fix audit issues (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
usenko-timur authored Mar 31, 2022
1 parent 53f3a57 commit de24d66
Show file tree
Hide file tree
Showing 30 changed files with 17,793 additions and 30,050 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Changed

- Use core as a node module instead of a window scope object.

- Update ``frontend-core`` to 8.0.5.
- Update ``frontend-core`` to 8.1.0.

- Update ``graphql`` to 0.1.3.

Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ get_filename_component(WEB_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/webui" ABSOLUTE)

file(GLOB_RECURSE FRONTEND_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/webui/src/*.js"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/src/*.jsx"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/src/*.ts"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/src/*.tsx"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/src/*.svg"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/config/*.prod.js"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/scripts/build.js"
"${CMAKE_CURRENT_SOURCE_DIR}/webui/src/*.css"
)

Expand Down
2 changes: 1 addition & 1 deletion cartridge-scm-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies = {
'errors == 2.2.1-1',
'vshard == 0.1.19-1',
'membership == 2.4.0-1',
'frontend-core == 8.0.5-1',
'frontend-core == 8.1.1-1',
'graphql == 0.1.3-1',
}

Expand Down
1 change: 1 addition & 0 deletions webui/.flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.tsx
.*broken.json.*
.*/node_modules/tiny-invariant/.*
.*/malformed_package_json/package.json

[include]

Expand Down
1 change: 1 addition & 0 deletions webui/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
3 changes: 1 addition & 2 deletions webui/BuildFrontend.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ endif()
set(HASH_FILE "${BASE_DIR}/build/bundle.md5")
file(GLOB_RECURSE FRONTEND_FILES
"${BASE_DIR}/src/*"
"${BASE_DIR}/config/*.prod.js"
"${BASE_DIR}/flow-typed/*"
"${BASE_DIR}/public/*"
)
list(APPEND FRONTEND_FILES
"${BASE_DIR}/.babelrc.js"
"${BASE_DIR}/.browserslistrc"
"${BASE_DIR}/.npmrc"
"${BASE_DIR}/.env"
"${BASE_DIR}/.env.production"
"${BASE_DIR}/.eslintignore"
Expand All @@ -77,7 +77,6 @@ list(APPEND FRONTEND_FILES
"${BASE_DIR}/package-lock.json"
"${BASE_DIR}/package.json"
"${BASE_DIR}/webpack.config.js"
"${BASE_DIR}/webpack.config.prod.js"
"${BASE_DIR}/tsconfig.json"
)
check_hash(${HASH_FILE} "${FRONTEND_FILES}")
Expand Down
93 changes: 0 additions & 93 deletions webui/config/env.js

This file was deleted.

53 changes: 0 additions & 53 deletions webui/config/paths.js

This file was deleted.

3 changes: 0 additions & 3 deletions webui/config/polyfills.js

This file was deleted.

39 changes: 20 additions & 19 deletions webui/config/proxy.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const removeCookieSecure = (header) => header.replace(/; secure/i, '');

const proxyConfig = {
target: process.env.REACT_APP_API_ENTRY,
secure: true,
changeOrigin: true,
onProxyRes: function onProxyRes(proxyRes) {
let header = proxyRes.headers['set-cookie'];
if (header) {
const removeCookieSecure = header => header.replace(/; secure/i, '');

if (Array.isArray(header)) {
header = header.map(removeCookieSecure);
} else {
Expand All @@ -18,25 +18,26 @@ const proxyConfig = {
};

const targets = [
[process.env.REACT_APP_LOGIN_API_ENDPOINT],
[process.env.REACT_APP_LOGOUT_API_ENDPOINT],
[process.env.REACT_APP_GRAPHQL_API_ENDPOINT],
[process.env.REACT_APP_SOAP_API_ENDPOINT],
[process.env.REACT_APP_CONFIG_ENDPOINT],
[process.env.REACT_APP_DOCS_ENDPOINT],
process.env.REACT_APP_LOGIN_API_ENDPOINT,
process.env.REACT_APP_LOGOUT_API_ENDPOINT,
process.env.REACT_APP_GRAPHQL_API_ENDPOINT,
process.env.REACT_APP_SOAP_API_ENDPOINT,
process.env.REACT_APP_CONFIG_ENDPOINT,
process.env.REACT_APP_DOCS_ENDPOINT,
];

const defTargets = targets.reduce((config, target) => (config[target] = proxyConfig, config), {});
const defTargets = targets.filter(Boolean).reduce((config, target) => ((config[target] = proxyConfig), config), {});

defTargets[process.env.REACT_APP_LSP_ENDPOINT] = {
...proxyConfig,
transportMode: 'ws',
proxy: {
'/admin/lsp': {
target: 'http://localhost:8081',
ws: true,
if (process.env.REACT_APP_LSP_ENDPOINT) {
defTargets[process.env.REACT_APP_LSP_ENDPOINT] = {
...proxyConfig,
transportMode: 'ws',
proxy: {
'/admin/lsp': {
target: 'http://localhost:8081',
ws: true,
},
},
},
};
}

module.exports = defTargets
module.exports = defTargets;
Loading

0 comments on commit de24d66

Please sign in to comment.