Commit Graph
17 Commits
Author SHA1 Message Date
wancat f43fa1b5ef fix: limit 2 level to only 5 children 2023-08-21 20:40:05 +08:00
wancat 34d5ace664 feat: use minimist to refactor cli 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 41a12c9aa8 feat: collect 2 level files info when ls
* change cli dir to /usr/local/lib/cli
* refactor cli to multiple files
* add handleCommand and listeners pattern
2023-08-21 20:40:05 +08:00
wancat a151d2d667 feat: add type and color to response 2023-08-09 21:14:57 +08:00
wancat a73aa8b461 fix: prevent execute command twice 2023-08-08 20:38:27 +08:00
wancat 6f368f761e feat: add hints to session, update API 2023-08-08 20:38:27 +08:00
wancat 094332da53 feat: add commandHandler 2023-08-08 20:38:27 +08:00
wancat 0de4b6ac9d feat: design game file and parse it to mongo
* 取消用 README 來寫關卡說明
2023-08-08 20:38:27 +08:00
wancat 6204bd0b17 feat: change to use Zsh
* show message from server response
* send output and error to server
2023-08-08 20:38:27 +08:00
wancat 0153eae673 feat: new cli client to send and receive msg from api 2023-08-08 20:38:27 +08:00
wancat 12a42d117c feat: write story of the game 2023-08-08 20:38:27 +08:00
wancat b9643e7d5c feat: capture output and exit code of commands
+ ignore interactive commands like vim, top or nano
2023-07-27 17:56:32 +08:00
wancat d997a061a9 feat: send command typed in container to API
- Modify the Dockerfile in the `server/quests/helloworld` directory to add a user and change the working directory
- Rename the file `server/quests/helloworld/entrypoint.sh` to `server/quests/helloworld/home/.bashrc`
- Modify the `server/src/config.js` file to add the `isProduction` flag
- Modify the `server/src/utils/docker.js` file to add a `HostConfig` option and bind a directory if not in production mode
- Modify the Dockerfile to add an argument `DOCKER_GID` and create a group and user with the specified `DOCKER_GID`
- Add a new Dockerfile.dev file with the same modifications as the Dockerfile
- Add a new file `inspect.sh`
- Modify the `server/src/client.js` file to use the `API_ENDPOINT` variable instead of a hardcoded URL

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-26 20:54:01 +08:00
wancat 9376e16f72 Success to send command to api
+ require sourcing entrypoint.sh manually
2023-07-26 00:12:10 +08:00
wancat b2173d180d Read all quest data in the folder 2023-07-19 20:01:14 +08:00
wancat 50443b96e0 Connect to mongodb, define schemas 2023-07-19 15:30:36 +08:00