Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to vite and remove @vue/cli-service and other related packages #180

Merged
merged 28 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
28edb01
install vite andn try to get running
hobbitronics Mar 11, 2024
5f23368
fix vite build
hobbitronics Mar 12, 2024
988fa19
served from root
hobbitronics Mar 12, 2024
2e1e5ee
remove file
hobbitronics Mar 12, 2024
3c35bc0
move script to body
hobbitronics Mar 12, 2024
83c8220
fix import
hobbitronics Mar 12, 2024
7e0c189
got it partially working
hobbitronics Sep 25, 2024
1cec926
rename env for vite
hobbitronics Sep 27, 2024
5b5f8df
ran make
hobbitronics Sep 27, 2024
263246c
remove babel config
hobbitronics Sep 27, 2024
8badd4a
remove string literal
hobbitronics Sep 27, 2024
20e50b2
remove some more packages
hobbitronics Sep 27, 2024
bea87af
quotes required in env with vite
hobbitronics Sep 27, 2024
1f3015e
follow vuetify2-vite-template config
hobbitronics Sep 27, 2024
847d298
Merge branch 'develop' into feature/use-vite
hobbitronics Sep 27, 2024
7500fcc
make depsupdate
hobbitronics Sep 27, 2024
2350368
remove old todo
hobbitronics Sep 27, 2024
b3ee48a
remove import
hobbitronics Sep 27, 2024
73059f2
remove commented code and reorder
hobbitronics Sep 27, 2024
a6d369b
fix merge conflict packages
hobbitronics Sep 27, 2024
98c544e
fix more merge errors in package and run format
hobbitronics Sep 27, 2024
c76fc77
fix case
hobbitronics Sep 27, 2024
0e579b3
fix version and remove code leftover
hobbitronics Sep 27, 2024
2f84500
update readme [skip ci]
hobbitronics Sep 27, 2024
1cf2d91
port already defined in config
hobbitronics Sep 30, 2024
ec63b4a
unused env [skip ci]
hobbitronics Sep 30, 2024
cd2a16b
remove unused dep, update sass and readme
hobbitronics Sep 30, 2024
60e2804
change 'docker-compose' to docker compose
hobbitronics Oct 1, 2024
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
16 changes: 7 additions & 9 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#
# Required for the ui. (ref: https://cli.vuejs.org/guide/mode-and-env.html)
#
VUE_APP_API_BASE_URL=//profile-api.example.org
VUE_APP_PRIMARY_COLOR=#015d99
VUE_APP_SECONDARY_COLOR=#791f5e
VUE_APP_ANALYTICS_ID='UA-xxxxxxxxx-y'
VUE_APP_RECAPTCHA_ID=''
VUE_APP_SENTRY_DSN=123

VITE_API_BASE_URL=//profile-api.example.org
VITE_PRIMARY_COLOR='#015d99'
VITE_SECONDARY_COLOR='#791f5e'
VITE_ANALYTICS_ID='UA-xxxxxxxxx-y'
VITE_RECAPTCHA_ID=''
VITE_SENTRY_DSN=123
# [authenticator | authy] (Google Authenticator, Authy)
VUE_APP_TOTP_APP_RECOMMENDATION=authenticator
VUE_ALLOWED_HOSTS=profile.example.org
VITE_TOTP_APP_RECOMMENDATION=authenticator
#
# Everything below is needed for local testing only
#
Expand Down
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
start: deps mfaapi
docker-compose pull
docker-compose up -d proxy
docker compose pull
docker compose up -d proxy

deps:
docker-compose run --rm node npm install
docker compose run --rm node npm install

depsupdate:
docker-compose run --rm node npm update
docker-compose run --rm node npm ls --package-lock-only --json > installed-versions.json
docker compose run --rm node npm update
docker compose run --rm node npm ls --package-lock-only --json > installed-versions.json

dist: deps
docker-compose run --rm node npm run build
docker compose run --rm node npm run build

logs:
docker-compose logs
docker-compose exec idp cat /var/log/apache2/error.log
docker compose logs
docker compose exec idp cat /var/log/apache2/error.log

phpmyadmin:
docker-compose up -d brokerPhpmyadmin profilePhpmyadmin
docker compose up -d brokerPhpmyadmin profilePhpmyadmin

mfaapi:
docker-compose up -d mfaapi
docker compose up -d mfaapi

clean:
docker-compose run --rm node npm run clean
docker-compose kill
docker-compose rm -f
docker compose run --rm node npm run clean
docker compose kill
docker compose rm -f

format:
docker-compose run --rm node npm run format
docker compose run --rm node npm run format
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Identity management UI for a given IdP that will help users establish good passw

Install [Docker](https://docs.docker.com/install), [Docker Compose](https://docs.docker.com/compose/install) and [Make](https://www.gnu.org/software/make)

Project is managed with [vue-cli](https://github.com/vuejs/vue-cli).
Project is managed with [vitejs](https://vitejs.dev/).

## Environment

Expand All @@ -30,19 +30,21 @@ i18n support is built-in however the translation files must be generated and dro
An IdP infrastructure will be running locally and is required for authentication into the app's protected pages.

#### Existing user

1. Username: **a**
1. Password: **a**

#### New user (has no password yet)

1. Enter app with a special "invitation" link, e.g., <https://profile.gtis.guru/#/profile/intro?invite=2b2d424e-8cb0-49c7-8c0b-7f6603INVITE>
1. if needed, this user's username is **b**

## Run the UI as a Docker container

See notes in Environment section regarding HTTPS and _traefik_ configuration.
See notes in Environment section regarding HTTPS and _traefik_ configuration.

1. Image (`silintl/idp-profile-ui`) is located on [Docker Hub](https://hub.docker.com/r/silintl/idp-profile-ui)
1. `VUE_APP_API_BASE_URL` must be populated as an environment variable so the UI knows how to communicate to the API.
1. `VITE_API_BASE_URL` must be populated as an environment variable so the UI knows how to communicate to the API.

## Local development

Expand Down Expand Up @@ -71,8 +73,8 @@ Copy `.env.dist` to `env.local` and update the relevant values, e.g., a UI deplo

The following files can/should be replaced before running the build.

* `public/favicon.ico`
* `src/assets/logo.png`
- `./favicon.ico`
- `src/assets/logo.png`

## Step 3 – Build for deployment

Expand Down
21 changes: 0 additions & 21 deletions babel.config.js

This file was deleted.

28 changes: 14 additions & 14 deletions dynamorestart/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
22 changes: 10 additions & 12 deletions public/index.html → index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />

<link rel="preconnect" href="https://www.gstatic.com">
<link rel="preconnect" href="https://www.google.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.gstatic.com" />
<link rel="preconnect" href="https://www.google.com" />
<link rel="preconnect" href="https://www.googletagmanager.com" />
<link rel="preconnect" href="https://www.google-analytics.com" />

<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">

<link rel="icon" href="./favicon.ico" />
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet" />
<title>IdP Profile Management</title>
</head>

<body>
<noscript>
<strong>
We're sorry but IdP Profile Management doesn't work properly without
JavaScript enabled. Please enable it to continue.
We're sorry but IdP Profile Management doesn't work properly without JavaScript enabled. Please enable it to
continue.
</strong>
</noscript>
<div id="app"></div>
<script type="module" src="./src/main.js"></script>
<!-- built files will be auto injected -->
</body>

</html>
57 changes: 11 additions & 46 deletions installed-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
"version": "6.0.0",
"name": "idp-profile-ui",
"dependencies": {
"@babel/polyfill": {
"version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz",
"overridden": false
},
"@sentry/vue": {
"version": "7.119.0",
"resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-7.119.0.tgz",
Expand All @@ -17,14 +12,9 @@
"resolved": "https://registry.npmjs.org/@simplewebauthn/browser/-/browser-9.0.1.tgz",
"overridden": false
},
"@vue/cli-plugin-babel": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/@vue/cli-plugin-babel/-/cli-plugin-babel-5.0.8.tgz",
"overridden": false
},
"@vue/cli-service": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/@vue/cli-service/-/cli-service-5.0.8.tgz",
"@vitejs/plugin-vue2": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue2/-/plugin-vue2-2.3.1.tgz",
"overridden": false
},
"@zxcvbn-ts/core": {
Expand All @@ -47,11 +37,6 @@
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
"overridden": false
},
"babel-plugin-transform-imports": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-imports/-/babel-plugin-transform-imports-2.0.0.tgz",
"overridden": false
},
"date-fns": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
Expand All @@ -67,34 +52,19 @@
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"overridden": false
},
"sass-loader": {
"version": "10.5.2",
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.5.2.tgz",
"overridden": false
},
"sass": {
"version": "1.79.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.79.1.tgz",
"overridden": false
},
"stylus-loader": {
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-4.3.3.tgz",
"version": "1.79.4",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.79.4.tgz",
"overridden": false
},
"stylus": {
"version": "0.58.1",
"resolved": "https://registry.npmjs.org/stylus/-/stylus-0.58.1.tgz",
"unplugin-vue-components": {
"version": "0.27.4",
"resolved": "https://registry.npmjs.org/unplugin-vue-components/-/unplugin-vue-components-0.27.4.tgz",
"overridden": false
},
"vue-cli-plugin-vuetify": {
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/vue-cli-plugin-vuetify/-/vue-cli-plugin-vuetify-2.5.8.tgz",
"overridden": false
},
"vue-demi": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
"vite": {
"version": "5.4.8",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz",
"overridden": false
},
"vue-router": {
Expand All @@ -107,11 +77,6 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz",
"overridden": false
},
"vuetify-loader": {
"version": "1.9.2",
"resolved": "https://registry.npmjs.org/vuetify-loader/-/vuetify-loader-1.9.2.tgz",
"overridden": false
},
"vuetify": {
"version": "2.7.2",
"resolved": "https://registry.npmjs.org/vuetify/-/vuetify-2.7.2.tgz",
Expand Down
Loading