Commit Graph
100 Commits
Author SHA1 Message Date
Lin, Hung-Shin 94e8940369 feat: init cypress 2023-09-25 13:28:52 +08:00
Lin, Hung-Shin 2524acecf4 Merge pull request #28 from linux-odyssey/fix-cookie
fix: change cookie setting, prevent form trigger twice
2023-09-18 23:38:00 +08:00
wancat b8e520152b fix: change cookie setting, prevent form trigger twice 2023-09-18 23:37:25 +08:00
Lin, Hung-Shin 248355a2f5 Merge pull request #26 from linux-odyssey/feat-auth
backend:
* add `username` and `email` 2 unique and required field to User
* use PassportJS for authentication framework
* use express-session, connect-mongo as backend
* use passport-local for password authentication
* use passport-jwt for container authentication

frontend:
* combined login / sign up flow
* use http-only cookie
* move login page from `/` to `/login`, automatically redirect

client:
* remove `list` command (not useful)
* add authentication functions
2023-09-18 22:54:28 +08:00
wancat 45231dda11 fix: update client to authenticate by session 2023-09-18 22:51:20 +08:00
wancat 59ced31094 fix: update config field name 2023-09-17 13:05:49 +08:00
wancat d745531a14 feat: update swagger, secure cookie 2023-09-17 12:48:50 +08:00
wancat d939b7eb4d feat: add loggedIn checks for frontend 2023-09-17 12:29:45 +08:00
wancat 34c277c886 feat: update frontend to use cookie session
* use SessionMiddleware in socket.io server
* add back jwtStrategy for commands
2023-09-17 12:14:30 +08:00
wancat be5cd152a9 change to use session for auth
+ replace BearerAuth to cookieAuth in swagger
+ add swagger.yaml to nodemon watch list
2023-09-17 11:27:37 +08:00
Lin, Hung-Shin a6d02f2616 refactor: simplify register flow 2023-09-15 15:50:36 +08:00
Lin, Hung-Shin 5dd56308ce feat: add login by username or email 2023-09-14 18:58:09 +08:00
Lin, Hung-Shin f5c465ab69 feat: add login & signup flow 2023-09-14 18:54:40 +08:00
Lin, Hung-Shin f1510df13e feat: enhance checkUser api
* determine whether it's email or username, and if it exists
2023-09-14 17:43:07 +08:00
Lin, Hung-Shin 3aa27ae597 feat: add username and email validation function 2023-09-14 17:39:26 +08:00
Lin, Hung-Shin 49417c405a feat: add login in frontend
* extract icon library from main.js
* extract router from main.js
* failure with error in passport
* add example to swagger
2023-09-13 14:02:28 +08:00
wancat b55b7aa1ec feat: add register, checkUsername, update swagger 2023-09-12 23:01:49 +08:00
wancat 04a0b21cf6 fix: session response payload 2023-09-12 00:12:22 +08:00
wancat 0f53696f71 feat: apply auth to container and cli client 2023-09-12 00:12:09 +08:00
wancat 030dc95e24 refactor: put passport to auth folder 2023-09-11 23:38:29 +08:00
wancat 41111f5036 feat: add jwt verification 2023-09-11 23:09:00 +08:00
wancat bcdd04715d feat: add password login 2023-09-11 22:59:41 +08:00
Lin, Hung-Shin a5dbcd7db4 Merge pull request #24 from linux-odyssey/app-neil
feat: add Authentication Page
2023-09-10 20:16:05 +08:00
wancat ac8e2bc73a Merge branch 'main' into app-neil 2023-09-10 20:12:43 +08:00
wancat c3b7968a76 feat: use vue router to organize pages 2023-09-10 20:06:23 +08:00
Lin, Hung-Shin 52dabb2f36 Merge pull request #25 from linux-odyssey/fix-deploy-image
fix: add build base image in CI/CD workflow
2023-09-10 19:04:35 +08:00
wancat 4b43ab5050 fix: add build base image in CI/CD workflow 2023-09-10 19:03:31 +08:00
wancat 0ea44e1f71 feat: add initial task on session creation 2023-09-01 17:16:32 +08:00
wancat 97b0fb0f1d refactor: seperate SessionHandler from commandHandler 2023-09-01 15:25:18 +08:00
wancat a8147ecfa1 feat: display tasks 2023-09-01 15:15:12 +08:00
wancat dd7829b3e9 feat: combine task with stage 2023-09-01 14:56:28 +08:00
wancat de8d49aea3 fix: change jwt expiry time to config
* rename dockerfile env
2023-09-01 13:54:51 +08:00
wancat 8b5f7175a7 fix: error handling of container failures 2023-09-01 13:49:00 +08:00
wancat 3fdbca89f3 feat: add waiting time before the responses 2023-08-31 16:45:03 +08:00
wancat 5ec9ae52ce feat: separate base image of quest
* change to use Ubuntu as base image
2023-08-31 16:44:42 +08:00
wancat 99da610d9e feat: exit shell on disconnect 2023-08-30 19:52:40 +08:00
wancat d9836318db feat: add debug mode to client 2023-08-30 19:52:02 +08:00
wancat e16b328892 feat: refactor stage to multiple route design 2023-08-30 18:05:11 +08:00
Lin, Hung-Shin 52c6c6ab93 Merge pull request #17 from lancatlin/app-graph-frontend
* display graph from data
* show the discovery state of each node
* accept graph event from socket
* store graph in sessionManager
* update new graph by file-graph algorithm

file-graph:
* add file discovery state merging

server
* update file structure in docker
2023-08-30 11:11:11 +08:00
wancat 1582d8c62a fix: change workflow name 2023-08-29 21:10:17 +08:00
wancat 65bc838c83 feat: update pwd 2023-08-29 16:33:02 +08:00
wancat 6b94b1ae81 fix: merge discovery state (with test)
* update fileNode.toString to add discovery state
2023-08-29 16:28:29 +08:00
wancat f360d783f8 feat: combine ci/cd workflow and add test step 2023-08-29 16:13:59 +08:00
wancat 2bc94a33e2 fix: remove unmaintained test 2023-08-29 15:56:23 +08:00
wancat 3dae9e8552 feat: store graph in session manager 2023-08-29 14:28:09 +08:00
wancat 1c017c98c7 feat: receive discover event and display 2023-08-29 13:52:24 +08:00
wancat 0bdcce5d21 feat: import file-graph package to app
* update docker images
2023-08-29 13:51:55 +08:00
wancat 638dff4be2 refactor: move test scripts to project root 2023-08-29 13:28:36 +08:00
wancat ee7cd083bd feat: handle discover in server 2023-08-29 13:28:18 +08:00
wancat 264d70fe3f feat: add directly discover tests 2023-08-29 13:27:47 +08:00
wancat cfb23347f8 feat: add load nested fileNode 2023-08-29 13:26:14 +08:00
wancat 728399938a feat: update contains and add test cases 2023-08-29 13:16:36 +08:00
wancat 3b8264e39e refactor: refactor commandHandler to class 2023-08-29 12:08:36 +08:00
wancat c3683ddaea feat: import file-graph package
* Update Dockerfile structure, copy quests, packages to sub folder
2023-08-29 11:58:14 +08:00
wancat 6c70a6eaea feat: add box shadow to pwd node 2023-08-28 19:36:38 +08:00
wancat 54592831ee feat: accept graph sent from server 2023-08-28 19:36:38 +08:00
wancat 45813ebbc0 feat: display tree by data
+ show discovered as highlight
+ BREAKING: cannot hightlight lines
2023-08-28 19:36:38 +08:00
Lin, Hung-Shin 9da4d4edaa Merge pull request #19 from lancatlin/file-graph-algorithm
feat: Add file-graph-algorithm
2023-08-28 19:33:59 +08:00
wancat 1b51346eb9 feat: merge middle part 2023-08-28 14:39:52 +08:00
wancat a66de4dfe1 feat: add merge function
Able to deal with:
1.  merge a subtree
2023-08-28 14:39:52 +08:00
wancat 1778780364 feat: add makeParent options to addChild 2023-08-28 14:39:52 +08:00
wancat 781e01d43a draft: add fileGraph handler draft 2023-08-28 14:39:52 +08:00
wancat 569016077e feat: add error handling for duplicate or not exists 2023-08-28 14:39:52 +08:00
wancat fa496ceae7 feat: create FileNode class, addChild method 2023-08-28 14:39:52 +08:00
Lin, Hung-Shin 10d1a728c6 Merge pull request #21 from lancatlin/fix-zsh-prompt
Fix zsh prompt
2023-08-26 12:42:15 +08:00
wancat b0cc7bb3fb feat: update prompt color 2023-08-26 12:34:36 +08:00
wancat 791a450fdc fix: remove the trailing '%' before prompt
https://github.com/xtermjs/xterm.js/issues/2564
https://unix.stackexchange.com/questions/167582/why-zsh-ends-a-line-with-a-highlighted-percent-symbol
https://zsh.sourceforge.io/Doc/Release/Options.html
2023-08-26 12:14:47 +08:00
Lin, Hung-Shin 0cc2618b8b Merge pull request #20 from lancatlin/fix-mount-at-production
fix: remove mounting at production error
2023-08-26 11:12:58 +08:00
wancat 54e0689d30 fix: remove mounting at production error 2023-08-26 11:11:13 +08:00
Lin, Hung-Shin 98e7f6a9f7 Merge pull request #18 from lancatlin/app-cjk-input
fix: Unicode input in container
2023-08-26 09:31:38 +08:00
wancat 7d594e62db fix: set locale to zh_TW.UTF8 in quest image 2023-08-25 12:07:57 +08:00
Lin, Hung-Shin 5da311d9a4 Merge pull request #14 from lancatlin/server-session-manage
* add `status` and `lastActivityAt` field to session
* automatically delete expiry container, mark session as inactive
* default retrieving only active session on `GET /sessions`
* create container on session creation, start container on socket connection
2023-08-24 11:38:02 +08:00
wancat 4e03be9408 fix: disable restart in dev docker compose 2023-08-24 11:36:36 +08:00
wancat 3f50b99d1a fix: not to use 'force' in container deletion 2023-08-24 11:36:24 +08:00
wancat 27f8525585 fix: add missing "error" field in command 2023-08-24 11:35:43 +08:00
Lin, Hung-Shin e5e6d58a6e Merge pull request #16 from lancatlin/fix-dev-dockerfile
fix: dockerfile node access
2023-08-23 23:06:07 +08:00
Lin, Hung-Shin e417d442e7 Merge pull request #15 from lancatlin/fix-api-url
fix: update dev server api link
2023-08-23 20:37:21 +08:00
wancat 12f73d370e fix: update dev server api link 2023-08-23 20:36:32 +08:00
wancat ad3dd2fb18 fix: default retrieve active session
+ typo 'deactive' -> 'inactive',
2023-08-23 12:27:20 +08:00
wancat 22060070b9 feat: add session expiry deletion script and scheduler 2023-08-23 12:22:15 +08:00
wancat 8e63284211 feat: seperate container creation and get 2023-08-23 11:51:16 +08:00
wancat 2c866d2e83 feat: add status, lastActivityAt column to session 2023-08-23 11:50:49 +08:00
Lin, Hung-Shin bdb979e608 Merge pull request #12 from lancatlin/deployment
Deployment frontend
2023-08-23 10:58:59 +08:00
wancat 268f9fe4b1 feat: add eslint workflow 2023-08-23 10:56:21 +08:00
wancat 280e246430 feat: build backend, frontend, and quest images in workflow 2023-08-23 10:50:31 +08:00
Lin, Hung-Shin abaae9ab6a Merge pull request #13 from lancatlin/app-neil
Add tree chart and drag to scroll function in visualisation section
2023-08-23 07:54:53 +08:00
wancat e644920593 fix: error handling for quest title 2023-08-22 20:51:33 +08:00
wancat 4b3a80608c fix: remove hard coded project path
+ pass host_pwd using docker compose
+ mount it only when provided
2023-08-22 16:05:06 +08:00
wancat cf5b761f3f feat: collect docker scripts into one file 2023-08-22 15:49:21 +08:00
Lin, Hung-Shin eeb30d1f7a fix: Update README.md typo 2023-08-22 12:17:47 +08:00
wancat d8f8605df9 fix: deployment
+ include api-docs in nginx
+ include quests in docker compose
+ update README
2023-08-22 12:11:58 +08:00
wancat 9aa9367f9e refactor: move quests out of server
+ move quests from server/quests to ./quests
+ add frontend image in docker compose development
2023-08-22 11:48:44 +08:00
wancat e54ae32960 feat: add frontend nginx image 2023-08-22 11:16:37 +08:00
wancat 4255eb5910 feat: merge middle part 2023-08-21 22:22:01 +08:00
wancat 7405f786a0 feat: add merge function
Able to deal with:
1.  merge a subtree
2023-08-21 22:22:01 +08:00
wancat fd26be5e64 feat: add makeParent options to addChild 2023-08-21 22:22:01 +08:00
wancat ba610a3fc5 draft: add fileGraph handler draft 2023-08-21 22:22:01 +08:00
wancat 5a1fc6499a feat: add error handling for duplicate or not exists 2023-08-21 22:22:01 +08:00
wancat 9b78f0d41c feat: create FileNode class, addChild method 2023-08-21 22:22:01 +08:00
Lin, Hung-Shin fcaa088a31 Merge pull request #11 from lancatlin/server-socket-graph
New features:
1. collect 2 levels file list when user type 'ls' in container
2. send the file graph event via socket

Breaking changes:
1. change the channel of terminal connection from 'message' to 'terminal'
3. move client.js to standalone package packages/client
4. change frontend api to call the same origin instead, setup vite proxy for developement. (Now it's localhost on default cuz the server updates includes in this PR as well)
2023-08-21 22:14:06 +08:00