* 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
- 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>
- 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>