Commit Graph
56 Commits
Author SHA1 Message Date
Justin Lin 6326b84a60 feat: init trpc 2025-04-16 15:27:00 +08:00
Justin Lin 261c6fc029 feat: generate key pair using ssh2 for right public key format 2024-10-14 11:34:53 +08:00
Justin Lin 19897e607f wip: connect container through ssh 2024-10-10 20:54:42 +08:00
wancat 443e810471 feat: add isGuest migration script 2024-06-17 20:12:32 +08:00
wancat b5c601f4a9 feat: install date-fns 2024-06-17 19:23:23 +08:00
wancat 84e65c9ef6 feat: enable swc and ts-node in server dev 2024-04-05 22:42:02 +08:00
wancat 33a1a110e8 feat: use project references to build dependencies efficiently 2024-04-05 22:42:02 +08:00
dependabot[bot] 1179faf176 build(deps): bump express from 4.18.2 to 4.19.2
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-28 13:44:47 +00:00
wancat 9f1008336d refactor: routes and index.js 2024-02-22 20:44:47 +08:00
wancat c0ec382510 enable source map in dev mode, add delay for nodemon starting 2024-02-22 20:09:47 +08:00
wancat 4c421b4cb3 refactor: game 2024-02-19 23:13:37 +08:00
wancat 64215d3ef1 refactor: container 2024-02-19 18:23:52 +08:00
wancat 075e21fb89 change scripts from "watch" to "dev" 2024-02-19 18:05:01 +08:00
wancat 5489de2432 refactor: auth 2024-02-19 18:05:01 +08:00
wancat d6c95cea4a refactor utils 2024-02-19 18:05:00 +08:00
wancat ca2a40341c Merge branch 'main' into fix-issue-51 2024-02-08 17:48:11 +08:00
wancat 5b0d1f92c4 setup docker prod 2024-02-05 13:13:34 +08:00
wancat 19cd66475c add building scripts 2024-02-05 12:33:05 +08:00
wancat 78966d351f change to use esm 2024-01-30 09:06:41 +08:00
wancat ba3b40792b add dotenv to server 2024-01-29 13:21:33 +08:00
wancat 30aefb47f9 feat: setup project reference 2024-01-29 12:42:50 +08:00
Lin, Hung-Shin 557af91d4b feat: change to use commonjs output 2024-01-29 12:42:50 +08:00
Lin, Hung-Shin 3977db87a3 feat: add typescript to file-graph and server 2024-01-29 12:42:50 +08:00
chreamy 42278ad51b csrf token 2024-01-20 00:11:48 -06:00
chreamy 91a9397c58 fix: CSRF issue #51 2024-01-18 03:12:25 -06:00
Chen, Tai-Lin ceb9416fab update: mongoose version 2023-12-13 15:05:46 +08:00
Lin, Hung-Shin 515aefcadc feat: add winston 2023-11-20 14:36:38 +08:00
wancat c438756bde feat: update CI/CD work, compose, and README 2023-11-16 21:13:18 +08:00
wancat 7b1591a6e3 feat: add build qeust images script 2023-11-16 20:49:54 +08:00
Lin, Hung-Shin 14043b3f12 feat: specify trust proxies 2023-11-02 12:11:15 +08:00
wancat c008f82cb0 fix: container removal, no secretKey panic 2023-11-01 23:09:39 +08:00
wancat fc6ac11c60 feat: complete register validation
* add password policy in frontend
2023-11-01 21:02:01 +08:00
Lin, Hung-Shin f18ec35a9f feat: generate secure secret key and prevent default 2023-11-01 14:19:18 +08:00
wancat c10b05c401 feat: add global and session rate limit 2023-10-30 23:46:39 +08:00
wancat 50bf514805 feat: separate db models from server 2023-10-14 15:34:46 +08:00
Lin, Hung-Shin c5ccf03ac5 feat: add username and email check in frontend 2023-10-13 16:38:25 +08:00
Annie Huang ad5344c98b feat: github auth 2023-10-12 16:12:07 +08:00
Lin, Hung-Shin 44b3304046 feat: login to google success 2023-10-04 13:23:16 +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
wancat bcdd04715d feat: add password login 2023-09-11 22:59:41 +08:00
wancat 1582d8c62a fix: change workflow name 2023-08-29 21:10:17 +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 22060070b9 feat: add session expiry deletion script and scheduler 2023-08-23 12:22:15 +08:00
wancat f08ee333a7 feat: push new pwd when 'cd' 2023-08-21 20:40:05 +08:00
wancat 6ace18475b refactor: move client to sperate packages, rename cli to container 2023-08-21 20:40:05 +08:00
wancat ec90c484b4 feat: add parameters and subcommand to client.js
- Added `"commander": "^11.0.0"` as a dependency in the `package.json` file
- Added an `import { program } from 'commander'` statement in the `client.js` file
- Modified the `createdSession` function in the `client.js` file to use `program.opts().host` instead of `API_ENDPOINT`
- Added a `getSessionList` function in the `client.js` file to fetch the list of sessions
- Added a `lastSession` function in the `client.js` file to get the last session from the session list
- Added a `connect` function in the `client.js` file to establish a socket connection
- Modified the `main` function in the `client.js` file to use `program.opts().session` instead of `process.argv[2]` to get the session ID
- Modified the `main` function in the `client.js` file to use `program.opts().host` instead of `API_ENDPOINT` to initialize the socket connection
- Added a `program` object with options and actions in the `client.js` file
- Added `.bash_history` to the `.gitignore` file
- Added `.viminfo` to the `.gitignore` file
- Added `*.swp` to the `.gitignore` file

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-31 15:42:58 +08:00
wancat 3cea54ce71 feat: add new API for recording executed commands
- Add the `jsonwebtoken` dependency to the server's `package.json`
- Add a new file `commandController.js` to the server's API controllers
- Add a new route `/commands` to the server's API routes
- Add a new file `commands.js` to the server's API routes
- Modify the `index.js` file in the server's API routes to import and use the `commands.js` route
- Add a `newCommand` function to the `commandController.js` file
- Add a `Command` model to the `command.js` file in the server's models
- Add the `genSessionJWT` and `verifySessionJWT` functions to the `auth.js` file in the server's utils
- Modify the `attachContainer` function in the `docker.js` file in the server's utils to include a `token` parameter
- Modify the `swagger.yaml` file to include a new route `/commands` for recording executed commands in a session

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-24 16:39:04 +08:00
wancat b2173d180d Read all quest data in the folder 2023-07-19 20:01:14 +08:00
wancat 04edfdd0dc Define routes, controllers of sessions
Work in progress, debugging
2023-07-19 16:42:09 +08:00
wancat 50443b96e0 Connect to mongodb, define schemas 2023-07-19 15:30:36 +08:00