Skip to content

Commit

Permalink
Ij 337 swap cra to vite (#233)
Browse files Browse the repository at this point in the history
* IJ-337 swat to vite

* IJ-337 disable TEMPORARY few lint rules

* IJ-337 Swap to vitest

* IJ-337 Swap to vitest

* IJ-337 Upgrate tests

* IJ-337 Cleanup

* IJ-337 Change tests file extensions to *.jsx

* IJ-337 Bump required Node.js version to v16.*

* IJ-337 Remove `.only`

* Fix vulnerabilities

* Update the build destination directory to meet CRA scheme

* Change dist directory to build

* Update java security whitelist to allow access to /assets and /icons

* Update sidebard component styling to open/close properly with width adjustment, center calendars, change time registration component styling

---------

Co-authored-by: Maciej Roszkiewicz <[email protected]>
Co-authored-by: Kamil Matuszewski <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2024
1 parent 8c0a2ac commit 84c6d80
Show file tree
Hide file tree
Showing 62 changed files with 11,971 additions and 29,776 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [ 12.x ]
node-version: [ 16.x ]

steps:
- uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class SecurityConfig extends WebSecurityConfigurerAdapter {

private static final String[] PUBLIC_ROUTES = {
"/", "/static/**", "/health/**", "/api/v2/info/**", "/api/v2/slack/**",
"/", "/assets/**", "/icons/**", "/health/**", "/api/v2/info/**", "/api/v2/slack/**",
"/api/v2/proxy/**", "/login_check/**", "/icons/**", "/error", "/index.html"
};
private static final String[] ALLOWED_EXTENSIONS = {
Expand Down
6 changes: 3 additions & 3 deletions view.react/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_OAUTH_CLIENT_ID=
REACT_APP_OAUTH_TENANT_ID=
REACT_APP_AUTH_MODE=AUTH
VITE_OAUTH_CLIENT_ID=
VITE_OAUTH_TENANT_ID=
VITE_AUTH_MODE=AUTH
4 changes: 2 additions & 2 deletions view.react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
There is option to configure no-auth mode. If this is chosen there is no msal components and any form of authentication.
This should be run only with backend with `ad.configuration.enabled = false` properties [check details](../readme.md#application-without-active-directory)

To activate this mode set `REACT_APP_AUTH_MODE` environment variables to `NO-AUTH`.
To activate this mode set `VITE_AUTH_MODE` environment variables to `NO-AUTH`.
Important! This mode required to have in database active user with id = 1 (this is default user, before any is selected)

In this mode permissions are still used -> you can switch users without authentication, but they still have to be active
and have required permissions on db.
and have required permissions on db.
52 changes: 52 additions & 0 deletions view.react/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />

<link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/icons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="/icons/favicon.ico" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>Urlopia</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
Loading

0 comments on commit 84c6d80

Please sign in to comment.