Compare commits
31
Commits
1ecc1374d2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca8acb0c0c | ||
|
|
18bda1653c | ||
|
|
53fbcd96dc | ||
|
|
40f2577a8a | ||
|
|
f0cfd197a2 | ||
|
|
be78ce3bc3 | ||
|
|
a7bef6de2a | ||
|
|
c5bbe1361a | ||
|
|
971695c6c2 | ||
|
|
cec584c177 | ||
|
|
89975d96cb | ||
|
|
cd78596d2a | ||
|
|
ded38b731b | ||
|
|
5af4e6c2ad | ||
|
|
673a1ca024 | ||
|
|
25f966250c | ||
|
|
b4aa34a109 | ||
|
|
865cbff0a6 | ||
|
|
03332b05f1 | ||
|
|
2ca489b8bb | ||
|
|
65d1a4fd18 | ||
|
|
97b135c352 | ||
|
|
109939f6db | ||
|
|
e7414c75dd | ||
|
|
3663d91aa6 | ||
|
|
5131e22c69 | ||
|
|
ee62ac8f54 | ||
|
|
a34fd3aa20 | ||
|
|
355ae63651 | ||
|
|
f95770dec6 | ||
|
|
6d2413a25f |
@@ -43,3 +43,5 @@ next-env.d.ts
|
|||||||
.backups
|
.backups
|
||||||
/secrets
|
/secrets
|
||||||
.tmp
|
.tmp
|
||||||
|
|
||||||
|
/test
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
`turboci-admin` is a Next.js (Pages Router) admin panel for TurboCI, a CI/CD deployment system. It manages deployments, services, and servers across cloud providers.
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
### Development
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun run project:init # Full first-time setup: install deps, init twui submodule, generate DB schema
|
||||||
|
bun run dev # Next.js dev server on port 3772 (web only)
|
||||||
|
bun run pm2:dev # Start all 3 processes (web + cron + websocket) via PM2 in dev/watch mode
|
||||||
|
bun run pm2:start # Start all 3 processes via PM2 in production mode
|
||||||
|
bun run pm2:kill # Kill all PM2 processes
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build & Database
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun run build # Production Next.js build
|
||||||
|
bun run db:schema # Regenerate SQLite types from schema (run after DB changes)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun run docker:start # Rebuild and start all containers
|
||||||
|
bun run docker:logs # Tail Docker logs
|
||||||
|
```
|
||||||
|
|
||||||
|
### Submodule (twui)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bun run twui:update # Pull latest twui component library
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
### Process Model
|
||||||
|
|
||||||
|
The app runs as **three separate processes**, managed by PM2 (dev) or Docker Compose (prod):
|
||||||
|
|
||||||
|
| Process | Entry Point | Description |
|
||||||
|
|---|---|---|
|
||||||
|
| `turboci-web` | Next.js (port 3772) | Pages Router app + API routes |
|
||||||
|
| `turboci-websocket` | `src/websocket/index.ts` | Bun native WebSocket server (port from `WEB_SOCKET_PORT` env) |
|
||||||
|
| `turboci-cron` | `src/cron/index.ts` | Polls every 30s (`AppData.CronInterval`) to check services |
|
||||||
|
|
||||||
|
### Database
|
||||||
|
|
||||||
|
- **ORM**: `@moduletrace/nsqlite` — SQLite with Bun
|
||||||
|
- **Config**: `nsqlite.config.js` — DB name `turboci-admin`, stored in `src/db/`
|
||||||
|
- **Types**: Auto-generated in `src/db/types.ts` via `bun run db:schema`
|
||||||
|
- **Tables**: `users`, `users_ports`
|
||||||
|
|
||||||
|
### Key Directories
|
||||||
|
|
||||||
|
- `src/pages/` — Next.js pages and API routes (`/api/*`)
|
||||||
|
- `src/websocket/` — Bun WebSocket server; events are dispatched via a switch in `socket-message.ts`
|
||||||
|
- `src/cron/` — Background cron job (service health checks)
|
||||||
|
- `src/functions/` — Business logic (auth, deployment users, pages, ttyd)
|
||||||
|
- `src/utils/` — Utilities including SSH execution, config file access, port management
|
||||||
|
- `src/components/` — React components organized by page
|
||||||
|
- `src/types/index.ts` — All shared TypeScript types including `TCIConfig`, `WebSocketEvents`, `PagePropsType`
|
||||||
|
- `src/data/app-data.ts` — Central constants (`AppData`): cookie names, port ranges, timeouts
|
||||||
|
- `src/exports/client-exports.ts` — Re-exports from `@moduletrace/datasquirel` (use `_n` for number coercion, `EJSON` for WebSocket serialization)
|
||||||
|
- `twui/` — Git submodule: internal Tailwind UI component library
|
||||||
|
|
||||||
|
### TurboCI Config Files (Runtime)
|
||||||
|
|
||||||
|
The app reads deployment config from the host at runtime:
|
||||||
|
|
||||||
|
- `/root/.turboci/.config/turboci.json` — Main deployment config (`TCIGlobalConfig` type)
|
||||||
|
- `/root/.turboci/.ssh/turboci` — SSH private key for connecting to deployment servers
|
||||||
|
- `/root/.turboci/deployment_id` — Current deployment identifier
|
||||||
|
|
||||||
|
Use `grabDirNames()` (`src/utils/grab-dir-names.ts`) to get these paths, never hardcode them.
|
||||||
|
|
||||||
|
### WebSocket Event Flow
|
||||||
|
|
||||||
|
Client sends EJSON-serialized `WebSocketDataType` → `socket-message.ts` dispatches by `event` field → handler in `src/websocket/events/`. Connected users tracked in `global.WEBSOCKET_CONNECTED_USERS_DATA`.
|
||||||
|
|
||||||
|
### Auth
|
||||||
|
|
||||||
|
Cookie-based auth using `@moduletrace/datasquirel`. Cookie names are in `AppData` (`AuthCookieName`, `AuthCSRFCookieName`). Use `userAuth` (`src/utils/user-auth.ts`) in API routes and `getServerSideProps`.
|
||||||
|
|
||||||
|
### Environment Variables
|
||||||
|
|
||||||
|
Required in `.env` (see `test.env` for reference keys):
|
||||||
|
- `DSQL_ENCRYPTION_PASSWORD` / `DSQL_ENCRYPTION_SALT` — Used by datasquirel for auth token encryption
|
||||||
|
- `PORT` — Web server port (default 3772)
|
||||||
|
- `WEB_SOCKET_PORT` — WebSocket server port
|
||||||
|
- `HOST` — Full host URL (e.g. `http://localhost:3772`)
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"configVersion": 0,
|
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
"": {
|
"": {
|
||||||
"name": "turboci-admin",
|
"name": "turboci-admin",
|
||||||
@@ -19,6 +18,7 @@
|
|||||||
"next": "14^",
|
"next": "14^",
|
||||||
"next-mdx-remote": "^6.0.0",
|
"next-mdx-remote": "^6.0.0",
|
||||||
"openai": "^6.25.0",
|
"openai": "^6.25.0",
|
||||||
|
"prism-themes": "^1.9.0",
|
||||||
"react": "19.2.3",
|
"react": "19.2.3",
|
||||||
"react-code-blocks": "^0.1.6",
|
"react-code-blocks": "^0.1.6",
|
||||||
"react-dom": "19.2.3",
|
"react-dom": "19.2.3",
|
||||||
@@ -808,6 +808,8 @@
|
|||||||
|
|
||||||
"prebuild-install": ["prebuild-install@7.1.3", "", { "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", "github-from-package": "0.0.0", "minimist": "^1.2.3", "mkdirp-classic": "^0.5.3", "napi-build-utils": "^2.0.0", "node-abi": "^3.3.0", "pump": "^3.0.0", "rc": "^1.2.7", "simple-get": "^4.0.0", "tar-fs": "^2.0.0", "tunnel-agent": "^0.6.0" }, "bin": { "prebuild-install": "bin.js" } }, "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug=="],
|
"prebuild-install": ["prebuild-install@7.1.3", "", { "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", "github-from-package": "0.0.0", "minimist": "^1.2.3", "mkdirp-classic": "^0.5.3", "napi-build-utils": "^2.0.0", "node-abi": "^3.3.0", "pump": "^3.0.0", "rc": "^1.2.7", "simple-get": "^4.0.0", "tar-fs": "^2.0.0", "tunnel-agent": "^0.6.0" }, "bin": { "prebuild-install": "bin.js" } }, "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug=="],
|
||||||
|
|
||||||
|
"prism-themes": ["prism-themes@1.9.0", "", {}, "sha512-tX2AYsehKDw1EORwBps+WhBFKc2kxfoFpQAjxBndbZKr4fRmMkv47XN0BghC/K1qwodB1otbe4oF23vUTFDokw=="],
|
||||||
|
|
||||||
"prismjs": ["prismjs@1.30.0", "", {}, "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw=="],
|
"prismjs": ["prismjs@1.30.0", "", {}, "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw=="],
|
||||||
|
|
||||||
"process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
|
"process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
|
||||||
|
|||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
LKG2ddR8D3SPWi2345mPf
|
||||||
Vendored
+190
@@ -0,0 +1,190 @@
|
|||||||
|
{
|
||||||
|
"polyfillFiles": [
|
||||||
|
"static/chunks/polyfills-42372ed130431b0a.js"
|
||||||
|
],
|
||||||
|
"devFiles": [],
|
||||||
|
"ampDevFiles": [],
|
||||||
|
"lowPriorityFiles": [
|
||||||
|
"static/LKG2ddR8D3SPWi2345mPf/_buildManifest.js",
|
||||||
|
"static/LKG2ddR8D3SPWi2345mPf/_ssgManifest.js"
|
||||||
|
],
|
||||||
|
"rootMainFiles": [],
|
||||||
|
"pages": {
|
||||||
|
"/": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/225-f257bb5bd6014d68.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/pages/index-13e31ea96205b999.js"
|
||||||
|
],
|
||||||
|
"/404": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/pages/404-8292e1046538596b.js"
|
||||||
|
],
|
||||||
|
"/_app": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/css/08e6997802749ec3.css",
|
||||||
|
"static/chunks/pages/_app-12c3cc69366c709d.js"
|
||||||
|
],
|
||||||
|
"/_error": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/pages/_error-10090a8ee211d5fd.js"
|
||||||
|
],
|
||||||
|
"/admin": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/926-c50746382fde484e.js",
|
||||||
|
"static/chunks/pages/admin-914586c03dfda5c1.js"
|
||||||
|
],
|
||||||
|
"/admin/services": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/926-c50746382fde484e.js",
|
||||||
|
"static/chunks/pages/admin/services-16971626ad193c95.js"
|
||||||
|
],
|
||||||
|
"/admin/services/[service_name]": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/926-c50746382fde484e.js",
|
||||||
|
"static/chunks/pages/admin/services/[service_name]-e8b08e5c11b1b12c.js"
|
||||||
|
],
|
||||||
|
"/admin/settings": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/pages/admin/settings-f58d63b2752f72a6.js"
|
||||||
|
],
|
||||||
|
"/admin/shell": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/pages/admin/shell-a1da21d85fd3c30b.js"
|
||||||
|
],
|
||||||
|
"/admin/users": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/pages/admin/users-73e9775838b56d95.js"
|
||||||
|
],
|
||||||
|
"/admin/users/[deployment_user_id]": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/ff39441c-88f593a46cb65964.js",
|
||||||
|
"static/chunks/d848df63-a470d32e7be4bfe3.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/281-dcee0c6401936d5e.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/pages/admin/users/[deployment_user_id]-fb1c3c9148c518cd.js"
|
||||||
|
],
|
||||||
|
"/admin/users/add-user": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/910-7de3855073c34589.js",
|
||||||
|
"static/chunks/pages/admin/users/add-user-1db7c9ee89830b5b.js"
|
||||||
|
],
|
||||||
|
"/auth/login": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/225-f257bb5bd6014d68.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/pages/auth/login-3f936f997e58438c.js"
|
||||||
|
],
|
||||||
|
"/auth/logout": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/pages/auth/logout-c8b207f96be4f684.js"
|
||||||
|
],
|
||||||
|
"/auth/signup": [
|
||||||
|
"static/chunks/webpack-38cee4c0e358b1a3.js",
|
||||||
|
"static/chunks/framework-bfa817c72d812316.js",
|
||||||
|
"static/chunks/main-761b7faf59ba862f.js",
|
||||||
|
"static/chunks/29107295-2819ba6e51dbf961.js",
|
||||||
|
"static/chunks/e5d67320-bf1772fa71739690.js",
|
||||||
|
"static/chunks/664-e347d64e56042a02.js",
|
||||||
|
"static/chunks/433-bb8bdacebff9ab53.js",
|
||||||
|
"static/chunks/7-f0121001f735b8fe.js",
|
||||||
|
"static/chunks/827-7975edcf8481ec69.js",
|
||||||
|
"static/chunks/pages/auth/signup-5c0f6835749e755e.js"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ampFirstPages": []
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"hasExportPathMap":false,"exportTrailingSlash":false,"isNextImageImported":false}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[],"unoptimized":false,"sizes":[640,750,828,1080,1200,1920,2048,3840,16,32,48,64,96,128,256,384]}}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"files":["../../node_modules/styled-jsx/index.js","../../node_modules/styled-jsx/package.json","../../node_modules/styled-jsx/dist/index/index.js","../../node_modules/react/package.json","../../node_modules/react/index.js","../../node_modules/client-only/package.json","../../node_modules/react/cjs/react.production.js","../../node_modules/client-only/index.js","../../node_modules/styled-jsx/style.js","../../node_modules/next/dist/compiled/next-server/server.runtime.prod.js","../../node_modules/next/package.json","../../node_modules/next/dist/server/body-streams.js","../../node_modules/next/dist/lib/constants.js","../../node_modules/next/dist/lib/picocolors.js","../../node_modules/next/dist/shared/lib/constants.js","../../node_modules/next/dist/server/web/utils.js","../../node_modules/next/dist/client/components/app-router-headers.js","../../node_modules/next/dist/server/lib/trace/tracer.js","../../node_modules/next/dist/server/lib/trace/constants.js","../../node_modules/next/dist/shared/lib/modern-browserslist-target.js","../../node_modules/next/dist/shared/lib/runtime-config.external.js","../../node_modules/next/dist/compiled/ws/package.json","../../node_modules/next/dist/compiled/node-html-parser/package.json","../../node_modules/next/dist/compiled/lru-cache/package.json","../../node_modules/@swc/helpers/_/_interop_require_default/package.json","../../node_modules/next/dist/compiled/ws/index.js","../../node_modules/next/dist/compiled/node-html-parser/index.js","../../node_modules/next/dist/compiled/lru-cache/index.js","../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../node_modules/@swc/helpers/package.json","../../node_modules/next/dist/client/components/async-local-storage.js","../../node_modules/next/dist/shared/lib/error-source.js","../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../node_modules/@swc/helpers/cjs/_interop_require_default.cjs","../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../node_modules/next/dist/compiled/debug/package.json","../../node_modules/next/dist/lib/semver-noop.js","../../node_modules/next/dist/compiled/debug/index.js","../../node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/amp-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/app-router-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/entrypoints.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/head-manager-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/hooks-client-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/html-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/image-config-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/loadable-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/loadable.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/router-context.js","../../node_modules/next/dist/server/future/route-modules/app-page/vendored/contexts/server-inserted-html.js","../../node_modules/next/dist/server/future/route-modules/app-page/module.compiled.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/amp-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/app-router-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/entrypoints.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/head-manager-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/hooks-client-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/html-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/image-config-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/loadable-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/loadable.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/router-context.js","../../node_modules/next/dist/server/future/route-modules/pages/vendored/contexts/server-inserted-html.js","../../node_modules/next/dist/server/future/route-modules/pages/module.compiled.js"]}
|
||||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"type": "commonjs"}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":4,"routes":{},"dynamicRoutes":{},"preview":{"previewModeId":"aab7a3f51a50153024a3aa8b3f5b7370","previewModeSigningKey":"d7c1d93239439add3e94818db5a5755b9a9f9f1056a8b7f9d05b0d84ca8c3a7f","previewModeEncryptionKey":"cba25b398203c36b1bc87969a4a47c5f5c368406c5930880371639954389b109"},"notFoundRoutes":[]}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"config":{"env":{},"webpack":null,"eslint":{"ignoreDuringBuilds":false},"typescript":{"ignoreBuildErrors":false,"tsconfigPath":"tsconfig.json"},"distDir":"dist/web","cleanDistDir":true,"assetPrefix":"","cacheMaxMemorySize":52428800,"configOrigin":"next.config.js","useFileSystemPublicRoutes":true,"generateEtags":true,"pageExtensions":["tsx","ts","jsx","js"],"poweredByHeader":true,"compress":true,"analyticsId":"","images":{"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"/_next/image","loader":"default","loaderFile":"","domains":[],"disableStaticImages":false,"minimumCacheTTL":60,"formats":["image/webp"],"dangerouslyAllowSVG":false,"contentSecurityPolicy":"script-src 'none'; frame-src 'none'; sandbox;","contentDispositionType":"inline","remotePatterns":[],"unoptimized":false},"devIndicators":{"buildActivity":true,"buildActivityPosition":"bottom-right"},"onDemandEntries":{"maxInactiveAge":60000,"pagesBufferLength":5},"amp":{"canonicalBase":""},"basePath":"","sassOptions":{},"trailingSlash":false,"i18n":null,"productionBrowserSourceMaps":false,"optimizeFonts":true,"excludeDefaultMomentLocales":true,"serverRuntimeConfig":{},"publicRuntimeConfig":{},"reactProductionProfiling":false,"reactStrictMode":true,"httpAgentOptions":{"keepAlive":true},"outputFileTracing":true,"staticPageGenerationTimeout":60,"swcMinify":true,"modularizeImports":{"@mui/icons-material":{"transform":"@mui/icons-material/{{member}}"},"lodash":{"transform":"lodash/{{member}}"}},"experimental":{"multiZoneDraftMode":false,"prerenderEarlyExit":false,"serverMinification":true,"serverSourceMaps":false,"linkNoTouchStart":false,"caseSensitiveRoutes":false,"clientRouterFilter":true,"clientRouterFilterRedirects":false,"fetchCacheKeyPrefix":"","middlewarePrefetch":"flexible","optimisticClientCache":true,"manualClientBasePath":false,"cpus":15,"memoryBasedWorkersCount":false,"isrFlushToDisk":true,"workerThreads":false,"optimizeCss":false,"nextScriptWorkers":false,"scrollRestoration":false,"externalDir":false,"disableOptimizedLoading":false,"gzipSize":true,"craCompat":false,"esmExternals":true,"fullySpecified":false,"outputFileTracingRoot":"","swcTraceProfiling":false,"forceSwcTransforms":false,"largePageDataBytes":128000,"adjustFontFallbacks":false,"adjustFontFallbacksWithSizeAdjust":false,"typedRoutes":false,"instrumentationHook":false,"bundlePagesExternals":false,"parallelServerCompiles":false,"parallelServerBuildTraces":false,"ppr":false,"missingSuspenseWithCSRBailout":true,"optimizeServerReact":true,"useEarlyImport":false,"staleTimes":{"dynamic":30,"static":300},"optimizePackageImports":["lucide-react","date-fns","lodash-es","ramda","antd","react-bootstrap","ahooks","@ant-design/icons","@headlessui/react","@headlessui-float/react","@heroicons/react/20/solid","@heroicons/react/24/solid","@heroicons/react/24/outline","@visx/visx","@tremor/react","rxjs","@mui/material","@mui/icons-material","recharts","react-use","@material-ui/core","@material-ui/icons","@tabler/icons-react","mui-core","react-icons/ai","react-icons/bi","react-icons/bs","react-icons/cg","react-icons/ci","react-icons/di","react-icons/fa","react-icons/fa6","react-icons/fc","react-icons/fi","react-icons/gi","react-icons/go","react-icons/gr","react-icons/hi","react-icons/hi2","react-icons/im","react-icons/io","react-icons/io5","react-icons/lia","react-icons/lib","react-icons/lu","react-icons/md","react-icons/pi","react-icons/ri","react-icons/rx","react-icons/si","react-icons/sl","react-icons/tb","react-icons/tfi","react-icons/ti","react-icons/vsc","react-icons/wi"],"trustHostHeader":false,"isExperimentalCompile":false},"configFileName":"next.config.js"},"appDir":"/home/archben/Projects/Git/moduletrace/turboci-admin","relativeAppDir":"","files":["dist/web/routes-manifest.json","dist/web/server/pages-manifest.json","dist/web/build-manifest.json","dist/web/prerender-manifest.json","dist/web/server/middleware-manifest.json","dist/web/server/middleware-build-manifest.js","dist/web/server/middleware-react-loadable-manifest.js","dist/web/react-loadable-manifest.json","dist/web/server/font-manifest.json","dist/web/BUILD_ID","dist/web/server/next-font-manifest.js","dist/web/server/next-font-manifest.json"],"ignore":["node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/**/*"]}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"pages404":true,"caseSensitive":false,"basePath":"","redirects":[{"source":"/:path+/","destination":"/:path+","internal":true,"statusCode":308,"regex":"^(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))/$"}],"headers":[],"dynamicRoutes":[{"page":"/admin/services/[service_name]","regex":"^/admin/services/([^/]+?)(?:/)?$","routeKeys":{"nxtPservice_name":"nxtPservice_name"},"namedRegex":"^/admin/services/(?<nxtPservice_name>[^/]+?)(?:/)?$"},{"page":"/admin/users/[deployment_user_id]","regex":"^/admin/users/([^/]+?)(?:/)?$","routeKeys":{"nxtPdeployment_user_id":"nxtPdeployment_user_id"},"namedRegex":"^/admin/users/(?<nxtPdeployment_user_id>[^/]+?)(?:/)?$"}],"staticRoutes":[{"page":"/","regex":"^/(?:/)?$","routeKeys":{},"namedRegex":"^/(?:/)?$"},{"page":"/404","regex":"^/404(?:/)?$","routeKeys":{},"namedRegex":"^/404(?:/)?$"},{"page":"/admin","regex":"^/admin(?:/)?$","routeKeys":{},"namedRegex":"^/admin(?:/)?$"},{"page":"/admin/services","regex":"^/admin/services(?:/)?$","routeKeys":{},"namedRegex":"^/admin/services(?:/)?$"},{"page":"/admin/settings","regex":"^/admin/settings(?:/)?$","routeKeys":{},"namedRegex":"^/admin/settings(?:/)?$"},{"page":"/admin/shell","regex":"^/admin/shell(?:/)?$","routeKeys":{},"namedRegex":"^/admin/shell(?:/)?$"},{"page":"/admin/users","regex":"^/admin/users(?:/)?$","routeKeys":{},"namedRegex":"^/admin/users(?:/)?$"},{"page":"/admin/users/add-user","regex":"^/admin/users/add\\-user(?:/)?$","routeKeys":{},"namedRegex":"^/admin/users/add\\-user(?:/)?$"},{"page":"/auth/login","regex":"^/auth/login(?:/)?$","routeKeys":{},"namedRegex":"^/auth/login(?:/)?$"},{"page":"/auth/logout","regex":"^/auth/logout(?:/)?$","routeKeys":{},"namedRegex":"^/auth/logout(?:/)?$"},{"page":"/auth/signup","regex":"^/auth/signup(?:/)?$","routeKeys":{},"namedRegex":"^/auth/signup(?:/)?$"}],"dataRoutes":[{"page":"/","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/index.json$"},{"page":"/admin","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin.json$"},{"page":"/admin/services","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/services.json$"},{"page":"/admin/services/[service_name]","routeKeys":{"nxtPservice_name":"nxtPservice_name"},"dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/services/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/services/(?<nxtPservice_name>[^/]+?)\\.json$"},{"page":"/admin/settings","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/settings.json$"},{"page":"/admin/shell","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/shell.json$"},{"page":"/admin/users","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/users.json$"},{"page":"/admin/users/add-user","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/users/add-user.json$"},{"page":"/admin/users/[deployment_user_id]","routeKeys":{"nxtPdeployment_user_id":"nxtPdeployment_user_id"},"dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/users/([^/]+?)\\.json$","namedDataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/admin/users/(?<nxtPdeployment_user_id>[^/]+?)\\.json$"},{"page":"/auth/login","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/auth/login.json$"},{"page":"/auth/logout","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/auth/logout.json$"},{"page":"/auth/signup","dataRouteRegex":"^/_next/data/LKG2ddR8D3SPWi2345mPf/auth/signup.json$"}],"rsc":{"header":"RSC","varyHeader":"RSC, Next-Router-State-Tree, Next-Router-Prefetch","prefetchHeader":"Next-Router-Prefetch","didPostponeHeader":"x-nextjs-postponed","contentTypeHeader":"text/x-component","suffix":".rsc","prefetchSuffix":".prefetch.rsc"},"rewrites":[]}
|
||||||
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+6
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"functions":{"/_app":{},"/admin/services/[service_name]":{},"/admin":{},"/admin/settings":{},"/admin/shell":{},"/admin/services":{},"/admin/users/[deployment_user_id]":{},"/admin/users/add-user":{},"/admin/users":{},"/auth/logout":{},"/auth/signup":{},"/":{},"/auth/login":{}}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST="[]";
|
||||||
File diff suppressed because one or more lines are too long
+6
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"middleware": {},
|
||||||
|
"functions": {},
|
||||||
|
"sortedMiddleware": []
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
self.__REACT_LOADABLE_MANIFEST="{}";
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false}';
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
{"/_error":"pages/_error.js","/_document":"pages/_document.js","/404":"pages/404.html","/api/admin/delete-user":"pages/api/admin/delete-user.js","/api/admin/download-private-ssh-key":"pages/api/admin/download-private-ssh-key.js","/api/admin/edit-user":"pages/api/admin/edit-user.js","/api/admin/settings":"pages/api/admin/settings.js","/api/auth/login":"pages/api/auth/login.js","/api/auth/signup":"pages/api/auth/signup.js","/api/hello":"pages/api/hello.js","/_app":"pages/_app.js","/admin":"pages/admin.js","/admin/services":"pages/admin/services.js","/admin/settings":"pages/admin/settings.js","/admin/services/[service_name]":"pages/admin/services/[service_name].js","/admin/shell":"pages/admin/shell.js","/admin/users/add-user":"pages/admin/users/add-user.js","/admin/users":"pages/admin/users.js","/admin/users/[deployment_user_id]":"pages/admin/users/[deployment_user_id].js","/auth/logout":"pages/auth/logout.js","/auth/login":"pages/auth/login.js","/auth/signup":"pages/auth/signup.js","/":"pages/index.js"}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><meta name="next-head-count" content="2"/><link rel="preload" href="/_next/static/css/08e6997802749ec3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/08e6997802749ec3.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-38cee4c0e358b1a3.js" defer=""></script><script src="/_next/static/chunks/framework-bfa817c72d812316.js" defer=""></script><script src="/_next/static/chunks/main-761b7faf59ba862f.js" defer=""></script><script src="/_next/static/chunks/pages/_app-12c3cc69366c709d.js" defer=""></script><script src="/_next/static/chunks/29107295-2819ba6e51dbf961.js" defer=""></script><script src="/_next/static/chunks/664-e347d64e56042a02.js" defer=""></script><script src="/_next/static/chunks/pages/404-8292e1046538596b.js" defer=""></script><script src="/_next/static/LKG2ddR8D3SPWi2345mPf/_buildManifest.js" defer=""></script><script src="/_next/static/LKG2ddR8D3SPWi2345mPf/_ssgManifest.js" defer=""></script></head><body class="antialiased"><div id="__next"><main class="flex flex-col items-center twui-main w-screen h-screen overflow-hidden"><section class="flex flex-col items-center px-4 sm:px-10 py-10 twui-section w-full h-full"><div class="flex w-full max-w-container gap-4 justify-between flex-wrap flex-col xl:flex-row items-start xl:items-center twui-container grid-frame grid-cols-1 h-full"><div class="flex flex-col items-start gap-4 twui-stack w-full justify-between h-full grid-cell"><div class="flex flex-col items-start twui-stack gap-0"><div class="flex flex-row gap-2 flex-wrap items-center twui-row"><div class="flex flex-row gap-2 flex-wrap items-center twui-row p-6"><a aria-label="TurboCI home" class="inline-flex items-center gap-3" href="/"><svg viewBox="0 0 48 48" aria-hidden="true" class="h-10 w-10 shrink-0"><defs><linearGradient id="_R_1am_" x1="9" y1="9" x2="31" y2="34" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="#9cf0c0"></stop><stop offset="100%" stop-color="#42d392"></stop></linearGradient><linearGradient id="_R_1amH1_" x1="22" y1="22" x2="36" y2="40" gradientUnits="userSpaceOnUse"><stop offset="0%" stop-color="#2bc67e"></stop><stop offset="100%" stop-color="#1f8458"></stop></linearGradient></defs><path d="M35 6H23.6c-2 0-3.8 1-4.8 2.7L7.5 28.3c-1.4 2.5.4 5.7 3.2 5.7h9.1c2 0 3.8-1 4.8-2.7l11.2-19.6C39.6 9.2 37.8 6 35 6Z" fill="url(#_R_1am_)"></path><path d="M23.9 24h13.4c2.8 0 4.6 3.1 3.2 5.6l-4.1 7.1c-1 1.7-2.8 2.7-4.8 2.7H18.2c-2.8 0-4.6-3.1-3.2-5.6l4.1-7.1c1-1.7 2.8-2.7 4.8-2.7Z" fill="url(#_R_1amH1_)"></path></svg><span class="font-display text-[1.02rem] font-semibold tracking-tight text-foreground">TurboCI</span></a></div><div class="border-slate-200 dark:border-white/10 border-0 border-l h-full min-h-5 twui-divider twui-divider-vertical border-solid"></div></div><div class="border-slate-200 dark:border-white/10 border-0 border-t w-full twui-divider twui-divider-horizontal border-solid"></div></div><div class="flex flex-col items-center justify-center gap-4 w-full h-full twui-center p-10"><h2 class="text-2xl md:text-3xl mb-4 twui-headings twui-heading twui-h2">Page Not Found!</h2></div><div class="flex flex-col items-start gap-4 twui-stack"><div class="border-slate-200 dark:border-white/10 border-0 border-t w-full twui-divider twui-divider-horizontal border-solid"></div><div class="twui-spacer h-20 w-full"></div></div></div></div></section></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{}},"page":"/404","query":{},"buildId":"LKG2ddR8D3SPWi2345mPf","nextExport":true,"autoExport":true,"isFallback":false,"scriptLoader":[]}</script></body></html>
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"files":["../webpack-runtime.js","../chunks/859.js","../chunks/330.js","../../../../package.json"]}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><link rel="preload" href="/_next/static/css/08e6997802749ec3.css" as="style"/><link rel="stylesheet" href="/_next/static/css/08e6997802749ec3.css" data-n-g=""/><noscript data-n-css=""></noscript><script defer="" noModule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-38cee4c0e358b1a3.js" defer=""></script><script src="/_next/static/chunks/framework-bfa817c72d812316.js" defer=""></script><script src="/_next/static/chunks/main-761b7faf59ba862f.js" defer=""></script><script src="/_next/static/chunks/pages/_app-12c3cc69366c709d.js" defer=""></script><script src="/_next/static/chunks/pages/_error-10090a8ee211d5fd.js" defer=""></script><script src="/_next/static/LKG2ddR8D3SPWi2345mPf/_buildManifest.js" defer=""></script><script src="/_next/static/LKG2ddR8D3SPWi2345mPf/_ssgManifest.js" defer=""></script></head><body class="antialiased"><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"LKG2ddR8D3SPWi2345mPf","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
||||||
Vendored
+1
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"files":["../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../../../package.json","../../../../src/pages/_app.tsx","../../package.json","../chunks/150.js","../chunks/248.js","../chunks/330.js","../chunks/752.js","../chunks/824.js","../chunks/859.js","../chunks/font-manifest.json","../webpack-runtime.js"]}
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=660,e.ids=[660],e.modules={1070:(e,r,s)=>{s.r(r),s.d(r,{default:()=>a});var t=s(997),i=s(6859);function a(){return(0,t.jsxs)(i.Html,{lang:"en",children:[t.jsx(i.Head,{}),(0,t.jsxs)("body",{className:"antialiased",children:[t.jsx(i.Main,{}),t.jsx(i.NextScript,{})]})]})}},2785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},6689:e=>{e.exports=require("react")},997:e=>{e.exports=require("react/jsx-runtime")},5315:e=>{e.exports=require("path")}};var r=require("../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[859],()=>s(1070));module.exports=t})();
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"files":["../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/compiled/node-html-parser/index.js","../../../../node_modules/next/dist/compiled/node-html-parser/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../package.json","../../../../src/pages/_document.tsx","../../package.json","../chunks/150.js","../chunks/248.js","../chunks/330.js","../chunks/752.js","../chunks/824.js","../chunks/859.js","../chunks/font-manifest.json","../webpack-runtime.js"]}
|
||||||
Vendored
+1
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"files":["../../../../node_modules/client-only/index.js","../../../../node_modules/client-only/package.json","../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../node_modules/next/dist/compiled/next-server/pages.runtime.prod.js","../../../../node_modules/next/dist/compiled/node-html-parser/index.js","../../../../node_modules/next/dist/compiled/node-html-parser/package.json","../../../../node_modules/next/dist/lib/semver-noop.js","../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/next/package.json","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.development.js","../../../../node_modules/react-dom/cjs/react-dom-server.browser.production.js","../../../../node_modules/react-dom/cjs/react-dom.development.js","../../../../node_modules/react-dom/cjs/react-dom.production.js","../../../../node_modules/react-dom/index.js","../../../../node_modules/react-dom/package.json","../../../../node_modules/react-dom/server.browser.js","../../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../../node_modules/react/cjs/react.development.js","../../../../node_modules/react/cjs/react.production.js","../../../../node_modules/react/index.js","../../../../node_modules/react/jsx-runtime.js","../../../../node_modules/react/package.json","../../../../node_modules/styled-jsx/dist/index/index.js","../../../../node_modules/styled-jsx/index.js","../../../../node_modules/styled-jsx/package.json","../../../../node_modules/tailwind-merge/dist/bundle-cjs.js","../../../../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/tailwind-merge/package.json","../../package.json","../chunks/150.js","../chunks/248.js","../chunks/330.js","../chunks/752.js","../chunks/824.js","../chunks/859.js","../chunks/font-manifest.json","../webpack-runtime.js"]}
|
||||||
Vendored
+1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=329,e.ids=[329],e.modules={2578:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>g,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>h,routeModule:()=>P,unstable_getServerProps:()=>S,unstable_getServerSideProps:()=>q,unstable_getStaticParams:()=>f,unstable_getStaticPaths:()=>j,unstable_getStaticProps:()=>v});var a=r(7093),i=r(5244),l=r(1323),n=r(1070),c=r(3893),d=r(4300),o=e([c,d]);[c,d]=o.then?(await o)():o;let u=(0,l.l)(d,"default"),p=(0,l.l)(d,"getStaticProps"),x=(0,l.l)(d,"getStaticPaths"),m=(0,l.l)(d,"getServerSideProps"),g=(0,l.l)(d,"config"),h=(0,l.l)(d,"reportWebVitals"),v=(0,l.l)(d,"unstable_getStaticProps"),j=(0,l.l)(d,"unstable_getStaticPaths"),f=(0,l.l)(d,"unstable_getStaticParams"),S=(0,l.l)(d,"unstable_getServerProps"),q=(0,l.l)(d,"unstable_getServerSideProps"),P=new a.PagesRouteModule({definition:{kind:i.x.PAGES,page:"/admin/services/[service_name]",pathname:"/admin/services/[service_name]",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:d});s()}catch(e){s(e)}})},5272:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>u});var a=r(997),i=r(3216),l=r(6689),n=r(3893),c=r(9705),d=r(9986),o=e([i,n,c,d]);function u({service:e}){let{pageProps:t}=(0,l.useContext)(n.AppContext),r=e.servers,[s,o]=(0,l.useState)(r?.[0]),u=!!r?.length&&!!(r.length%2);return a.jsx(i.Z,{className:"w-full grid-cell col-span-1 gap-0",children:(0,a.jsxs)(c.Z,{className:"nested-grid-frame xl:grid-cols-2",children:[r?.map((t,r)=>a.jsx(d.Z,{server:t,service:e,wrapperProps:{className:"grid-cell"}},r)),u?a.jsx("div",{className:"grid-cell"}):null]})})}[i,n,c,d]=o.then?(await o)():o,s()}catch(e){s(e)}})},5094:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>x});var a=r(997),i=r(3216),l=r(6689),n=r(3893),c=r(5272),d=r(9705),o=r(5031),u=r(1309),p=e([i,n,c,d,o,u]);function x(){let{pageProps:e,ws:t}=(0,l.useContext)(n.AppContext),{service:r,deployment:s,children_services:p}=e,x=[r,...p||[]],[m,g]=(0,l.useState)(r||void 0),h=x.findIndex(e=>e?.service_name==m?.service_name)+1;return m?.servers,a.jsx(i.Z,{className:"w-full nested-grid-frame grid-cols-1",children:(0,a.jsxs)(i.Z,{className:"grid-cell gap-0",children:[a.jsx(d.Z,{className:"grid-cell-content flex-nowrap",children:(0,a.jsxs)(d.Z,{className:"w-full justify-between",children:[a.jsx(d.Z,{children:(0,a.jsxs)(u.Z,{children:["Cluster #",h]})}),a.jsx(d.Z,{children:a.jsx(o.Z,{options:x.map((e,t)=>({value:e?.service_name,title:`Cluster #${t+1}`})),wrapperWrapperProps:{className:"max-w-[250px]"},changeHandler:e=>{g(void 0),t.sendData({event:"client:kill-all-ports"}),setTimeout(()=>{g(x.find(t=>t?.service_name==e)||void 0)},200)}})})]})}),a.jsx("hr",{}),m?a.jsx(c.Z,{service:m}):void 0]})})}[i,n,c,d,o,u]=p.then?(await p)():p,s()}catch(e){s(e)}})},7680:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{Z:()=>p});var a=r(997),i=r(6689),l=r(3893),n=r(6425),c=r(2984),d=r(2394),o=r(5094),u=e([l,c,d,o]);function p(){let{pageProps:e}=(0,i.useContext)(l.AppContext),{service:t,deployment:r}=e,s=r?.deployment_name,u=t?.service_name;return(0,a.jsxs)(i.Fragment,{children:[a.jsx(d.Z,{title:`${(0,n.Z)(u)} Service`,description:(0,a.jsxs)(a.Fragment,{children:["Deployment ",a.jsx("code",{children:s})," > ",a.jsx("code",{children:u})]})}),a.jsx(c.Z,{}),a.jsx(o.Z,{})]})}[l,c,d,o]=u.then?(await u)():u,s()}catch(e){s(e)}})},4300:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{default:()=>d,getServerSideProps:()=>o});var a=r(997),i=r(7680),l=r(8688),n=r(3060),c=e([i,n]);function d(){return a.jsx(n.Z,{children:a.jsx(i.Z,{})})}[i,n]=c.then?(await c)():c;let o=async e=>await (0,l.Z)({ctx:e});s()}catch(e){s(e)}})},5191:e=>{e.exports=require("@moduletrace/datasquirel/dist/client")},4882:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt")},4605:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson")},1521:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy")},6255:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify")},1635:e=>{e.exports=require("dayjs")},6517:e=>{e.exports=require("lodash")},2423:e=>{e.exports=require("lucide-react")},2785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},968:e=>{e.exports=require("next/head")},6689:e=>{e.exports=require("react")},6405:e=>{e.exports=require("react-dom")},997:e=>{e.exports=require("react/jsx-runtime")},2048:e=>{e.exports=require("fs")},5315:e=>{e.exports=require("path")},8097:e=>{e.exports=import("tailwind-merge")}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[859,330,752,248,150,824],()=>r(2578));module.exports=s})();
|
||||||
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=204,e.ids=[204],e.modules={8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},7541:(e,t,r)=>{r.r(t),r.d(t,{config:()=>g,default:()=>h,routeModule:()=>_});var s={};r.r(s),r.d(s,{default:()=>p});var n=r(1802),i=r(7153),u=r(6249),o=r(2632),a=r(2253),d=r(2481),c=r(8804),l=r.n(c),f=r(1282);async function m({user_id:e}){let t=(await l().select({table:"users",targetId:(0,a._n)(e)})).singleRes;if(!t?.id||!t.username||t.is_super_admin)return;let{username:r}=t;console.log("username",r);let{force_command_file:s,sshd_config_file:n}=(0,d.Z)({user:t}),i=`/bin/bash << 'TURBOCIHEREDOC'
|
||||||
|
`;i+=`deluser --remove-all-files ${r} || echo "User Deleted!"
|
||||||
|
rm -f ${s}
|
||||||
|
rm -f ${n}
|
||||||
|
TURBOCIHEREDOC
|
||||||
|
`,(0,f.execSync)(i),l().delete({table:"users",targetId:t.id})}async function p(e,t){try{if("POST"!==e.method)return t.json({success:!1,msg:"Wrong Method"});let{singleRes:r}=await (0,o.Z)({req:e});if(!r?.id||!r.super_admin)return t.json({success:!1,msg:"Unauthorized"});let{user_id:s}=e.body;if((0,a._n)(s)==r.id)throw Error("Can't delete root user!");return await m({user_id:(0,a._n)(s)}),t.json({success:!0})}catch(e){return t.json({success:!1,msg:e.message})}}let h=(0,u.l)(s,"default"),g=(0,u.l)(s,"config"),_=new n.PagesAPIRouteModule({definition:{kind:i.x.PAGES_API,page:"/api/admin/delete-user",pathname:"/api/admin/delete-user",bundlePath:"",filename:""},userland:s})},2253:(e,t,r)=>{r.d(t,{dF:()=>u(),_n:()=>c,lV:()=>a()});let s=require("@moduletrace/datasquirel/dist/client");var n=r.n(s);let i=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson");var u=r.n(i);let o=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify");var a=r.n(o);let d=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy"),c=r.n(d)();n().utils.serializeQuery,n().utils.deserializeQuery},6941:(e,t,r)=>{function s(e,t){let r=[];for(let e=0;e<t.length;e++){let{name:s,options:n,value:i}=t[e],u=[`${encodeURIComponent(s)}=${encodeURIComponent(i)}`];n.expires&&u.push(`Expires=${n.expires.toDate().toUTCString()}`),void 0!==n.maxAge&&u.push(`Max-Age=${n.maxAge}`),n.path&&u.push(`Path=${n.path}`),n.domain&&u.push(`Domain=${n.domain}`),n.secure&&u.push("Secure"),n.httpOnly&&u.push("HttpOnly"),r.push(u)}let s=r.map(e=>e.join("; "));e.setHeader("Set-Cookie",s)}function n(e,t){return e.split(";").reduce((e,t)=>{let[r,s]=t.trim().split("=").map(decodeURIComponent);return e[r]=s,e},{})[t]||null}r.d(t,{d8:()=>s,ej:()=>n}),r(1635)},9786:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(2048);let n=require("path");var i=r.n(n);function u(){let{TURBOCI_DEPLOYMENT_ID_FILE:e}=function(){let e=i().resolve(__dirname,"../../"),t="/root/.turboci",r=i().join(t,".config"),s=i().join(r,"turboci.json"),n=i().join(t,"deployment_id"),u=i().join(t,".ssh"),o=i().join(u,"turboci");return{APP_DIR:e,TURBOCI_CONFIG_DIR:r,TURBOCI_CONFIG_JSON_FILE:s,TURBOCI_DIR:t,TURBOCI_SSH_DIR:u,TURBOCI_SSH_KEY_FILE:o,TURBOCI_DEPLOYMENT_ID_FILE:n}}();if(!(0,s.existsSync)(e))throw Error(`\`${e}\` does not exist.`);let t=(0,s.readFileSync)(e,"utf-8").split("-").shift();if(!t)throw Error("Invalid deployment_id");return{auth_key_cookie_name:`turboci-admin-${t}-auth-key`,csrf_cookie_name:`turboci-admin-${t}-csrf`}}},2481:(e,t,r)=>{r.d(t,{Z:()=>s});function s({user:e}){let{username:t}=e,r=`/home/${t}`,s=`${r}/.ssh`,n=`${s}/${t}`;return{user_dir:r,ssh_dir:s,ssh_key_file:n,sshd_config_file:`/etc/ssh/sshd_config.d/${t}.conf`,force_command_file:`/usr/local/bin/turboci-deployment-user-${t}`}}},2632:(e,t,r)=>{r.d(t,{Z:()=>a});var s=r(6941);let n=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt");var i=r.n(n),u=r(2253),o=r(9786);async function a({req:e,bun_req:t}){try{let{auth_key_cookie_name:r,csrf_cookie_name:n}=(0,o.Z)(),a=e?.headers.cookie||t?.headers.get("cookie");if(!a)return{success:!1,msg:"Couldn't grab cookie string"};let d=(0,s.ej)(a,r);if(!d)return{success:!1,msg:`No ${r} found in request object.`};let c=i()({encryptedString:d}),l=u.dF.parse(c);if(!l?.id)return{success:!1,msg:"Invalid Auth Key"};let f=(0,s.ej)(a,n);if(!f)return{success:!1,msg:`No ${n} found in request object.`};if(f!==l.csrf_k)return{success:!1,msg:"CSRF mismatch"};return{success:!0,singleRes:l}}catch(e){return{success:!1}}}},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=7541);module.exports=r})();
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=482,e.ids=[482],e.modules={8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},2048:e=>{e.exports=require("fs")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},4441:(e,t,r)=>{r.r(t),r.d(t,{config:()=>m,default:()=>p,routeModule:()=>f});var i={};r.r(i),r.d(i,{default:()=>c});var s=r(1802),n=r(7153),u=r(6249),a=r(2632),o=r(8804),d=r.n(o),l=r(2048);async function c(e,t){try{let{singleRes:r}=await (0,a.Z)({req:e});if(!r?.id||!r.super_admin)return t.json({success:!1,msg:"Unauthorized"});let{user_id:i}=e.query,s=(await d().select({table:"users",targetId:i})).singleRes;if(!s?.username)throw Error("Couldn't grab user");let n=`/home/${s.username}/.ssh/${s.username}`;if(!(0,l.existsSync)(n))throw Error("No Private SSH key file found");(0,l.createReadStream)(n).pipe(t)}catch(e){return t.json({success:!1,msg:e.message})}}let p=(0,u.l)(i,"default"),m=(0,u.l)(i,"config"),f=new s.PagesAPIRouteModule({definition:{kind:n.x.PAGES_API,page:"/api/admin/download-private-ssh-key",pathname:"/api/admin/download-private-ssh-key",bundlePath:"",filename:""},userland:i})},2253:(e,t,r)=>{r.d(t,{dF:()=>u(),_n:()=>l,lV:()=>o()});let i=require("@moduletrace/datasquirel/dist/client");var s=r.n(i);let n=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson");var u=r.n(n);let a=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify");var o=r.n(a);let d=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy"),l=r.n(d)();s().utils.serializeQuery,s().utils.deserializeQuery},6941:(e,t,r)=>{function i(e,t){let r=[];for(let e=0;e<t.length;e++){let{name:i,options:s,value:n}=t[e],u=[`${encodeURIComponent(i)}=${encodeURIComponent(n)}`];s.expires&&u.push(`Expires=${s.expires.toDate().toUTCString()}`),void 0!==s.maxAge&&u.push(`Max-Age=${s.maxAge}`),s.path&&u.push(`Path=${s.path}`),s.domain&&u.push(`Domain=${s.domain}`),s.secure&&u.push("Secure"),s.httpOnly&&u.push("HttpOnly"),r.push(u)}let i=r.map(e=>e.join("; "));e.setHeader("Set-Cookie",i)}function s(e,t){return e.split(";").reduce((e,t)=>{let[r,i]=t.trim().split("=").map(decodeURIComponent);return e[r]=i,e},{})[t]||null}r.d(t,{d8:()=>i,ej:()=>s}),r(1635)},9786:(e,t,r)=>{r.d(t,{Z:()=>u});var i=r(2048);let s=require("path");var n=r.n(s);function u(){let{TURBOCI_DEPLOYMENT_ID_FILE:e}=function(){let e=n().resolve(__dirname,"../../"),t="/root/.turboci",r=n().join(t,".config"),i=n().join(r,"turboci.json"),s=n().join(t,"deployment_id"),u=n().join(t,".ssh"),a=n().join(u,"turboci");return{APP_DIR:e,TURBOCI_CONFIG_DIR:r,TURBOCI_CONFIG_JSON_FILE:i,TURBOCI_DIR:t,TURBOCI_SSH_DIR:u,TURBOCI_SSH_KEY_FILE:a,TURBOCI_DEPLOYMENT_ID_FILE:s}}();if(!(0,i.existsSync)(e))throw Error(`\`${e}\` does not exist.`);let t=(0,i.readFileSync)(e,"utf-8").split("-").shift();if(!t)throw Error("Invalid deployment_id");return{auth_key_cookie_name:`turboci-admin-${t}-auth-key`,csrf_cookie_name:`turboci-admin-${t}-csrf`}}},2632:(e,t,r)=>{r.d(t,{Z:()=>o});var i=r(6941);let s=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt");var n=r.n(s),u=r(2253),a=r(9786);async function o({req:e,bun_req:t}){try{let{auth_key_cookie_name:r,csrf_cookie_name:s}=(0,a.Z)(),o=e?.headers.cookie||t?.headers.get("cookie");if(!o)return{success:!1,msg:"Couldn't grab cookie string"};let d=(0,i.ej)(o,r);if(!d)return{success:!1,msg:`No ${r} found in request object.`};let l=n()({encryptedString:d}),c=u.dF.parse(l);if(!c?.id)return{success:!1,msg:"Invalid Auth Key"};let p=(0,i.ej)(o,s);if(!p)return{success:!1,msg:`No ${s} found in request object.`};if(p!==c.csrf_k)return{success:!1,msg:"CSRF mismatch"};return{success:!0,singleRes:c}}catch(e){return{success:!1}}}},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=4441);module.exports=r})();
|
||||||
File diff suppressed because one or more lines are too long
+39
@@ -0,0 +1,39 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=837,e.ids=[837],e.modules={8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},8635:(e,t,r)=>{r.r(t),r.d(t,{config:()=>p,default:()=>h,routeModule:()=>f});var s={};r.r(s),r.d(s,{default:()=>m});var n=r(1802),i=r(7153),o=r(6249),u=r(2632),a=r(8804),c=r.n(a),d=r(2253),l=r(246);async function m(e,t){try{if("POST"!==e.method)return t.json({success:!1,msg:"Wrong Method"});let{singleRes:r}=await (0,u.Z)({req:e});if(!r?.id||!r.super_admin)return t.json({success:!1,msg:"Unauthorized"});let{new_user:s,user_id:n}=e.body;if(!s)throw Error("No User Form Sent.");let{first_name:i,last_name:o,email:a,image:m,username:h}=s;if(!i?.match(/./))return t.json({success:!1,msg:"First name is required"});return await c().update({table:"users",targetId:(0,d._n)(n),data:{first_name:i,last_name:o,email:a,image:m,username:h}}),await (0,l.Z)({user_id:(0,d._n)(n)}),t.json({success:!0})}catch(e){return t.json({success:!1,msg:e.message})}}let h=(0,o.l)(s,"default"),p=(0,o.l)(s,"config"),f=new n.PagesAPIRouteModule({definition:{kind:i.x.PAGES_API,page:"/api/admin/edit-user",pathname:"/api/admin/edit-user",bundlePath:"",filename:""},userland:s})},2253:(e,t,r)=>{r.d(t,{dF:()=>o(),_n:()=>d,lV:()=>a()});let s=require("@moduletrace/datasquirel/dist/client");var n=r.n(s);let i=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson");var o=r.n(i);let u=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify");var a=r.n(u);let c=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy"),d=r.n(c)();n().utils.serializeQuery,n().utils.deserializeQuery},246:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(2253),n=r(2481),i=r(8804),o=r.n(i),u=r(1282),a=r(2048);async function c({user_id:e}){let t=(await o().select({table:"users",targetId:(0,s._n)(e)})).singleRes;if(!t?.id||!t.username||t.is_super_admin)return;let{username:r}=t,{force_command_file:i,ssh_dir:c,ssh_key_file:d,sshd_config_file:l,user_dir:m}=(0,n.Z)({user:t}),h=`/bin/bash << 'TURBOCIHEREDOC'
|
||||||
|
`;(0,a.existsSync)(m)||(h+=`useradd --create-home --shell /bin/bash --comment "TurboCI Deployment user ${r}" ${r}
|
||||||
|
passwd --lock "${r}"
|
||||||
|
mkdir -p "${c}"
|
||||||
|
ssh-keygen -t ed25519 -f "${d}" -N "" -C "${r}@$(hostname)"
|
||||||
|
cp "${d}.pub" "${c}/authorized_keys"
|
||||||
|
chown -R "${r}:${r}" "${c}"
|
||||||
|
chmod 700 "${c}"
|
||||||
|
chmod 600 "${d}"
|
||||||
|
chmod 644 "${d}.pub"
|
||||||
|
chmod 600 "${c}/authorized_keys"
|
||||||
|
`),h+=`cat << 'EOF' > ${i}
|
||||||
|
#!/bin/bash
|
||||||
|
case "$SSH_ORIGINAL_COMMAND" in
|
||||||
|
"shell")
|
||||||
|
exec /bin/bash
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Access denied."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x ${i}
|
||||||
|
|
||||||
|
cat << 'EOF' > ${l}
|
||||||
|
Match User ${r}
|
||||||
|
PasswordAuthentication no
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
AuthenticationMethods publickey
|
||||||
|
AllowTcpForwarding yes
|
||||||
|
X11Forwarding no
|
||||||
|
ForceCommand ${i}
|
||||||
|
PermitOpen localhost:80
|
||||||
|
PermitTTY no
|
||||||
|
EOF
|
||||||
|
TURBOCIHEREDOC
|
||||||
|
`,(0,u.execSync)(h)}},6941:(e,t,r)=>{function s(e,t){let r=[];for(let e=0;e<t.length;e++){let{name:s,options:n,value:i}=t[e],o=[`${encodeURIComponent(s)}=${encodeURIComponent(i)}`];n.expires&&o.push(`Expires=${n.expires.toDate().toUTCString()}`),void 0!==n.maxAge&&o.push(`Max-Age=${n.maxAge}`),n.path&&o.push(`Path=${n.path}`),n.domain&&o.push(`Domain=${n.domain}`),n.secure&&o.push("Secure"),n.httpOnly&&o.push("HttpOnly"),r.push(o)}let s=r.map(e=>e.join("; "));e.setHeader("Set-Cookie",s)}function n(e,t){return e.split(";").reduce((e,t)=>{let[r,s]=t.trim().split("=").map(decodeURIComponent);return e[r]=s,e},{})[t]||null}r.d(t,{d8:()=>s,ej:()=>n}),r(1635)},9786:(e,t,r)=>{r.d(t,{Z:()=>o});var s=r(2048);let n=require("path");var i=r.n(n);function o(){let{TURBOCI_DEPLOYMENT_ID_FILE:e}=function(){let e=i().resolve(__dirname,"../../"),t="/root/.turboci",r=i().join(t,".config"),s=i().join(r,"turboci.json"),n=i().join(t,"deployment_id"),o=i().join(t,".ssh"),u=i().join(o,"turboci");return{APP_DIR:e,TURBOCI_CONFIG_DIR:r,TURBOCI_CONFIG_JSON_FILE:s,TURBOCI_DIR:t,TURBOCI_SSH_DIR:o,TURBOCI_SSH_KEY_FILE:u,TURBOCI_DEPLOYMENT_ID_FILE:n}}();if(!(0,s.existsSync)(e))throw Error(`\`${e}\` does not exist.`);let t=(0,s.readFileSync)(e,"utf-8").split("-").shift();if(!t)throw Error("Invalid deployment_id");return{auth_key_cookie_name:`turboci-admin-${t}-auth-key`,csrf_cookie_name:`turboci-admin-${t}-csrf`}}},2481:(e,t,r)=>{r.d(t,{Z:()=>s});function s({user:e}){let{username:t}=e,r=`/home/${t}`,s=`${r}/.ssh`,n=`${s}/${t}`;return{user_dir:r,ssh_dir:s,ssh_key_file:n,sshd_config_file:`/etc/ssh/sshd_config.d/${t}.conf`,force_command_file:`/usr/local/bin/turboci-deployment-user-${t}`}}},2632:(e,t,r)=>{r.d(t,{Z:()=>a});var s=r(6941);let n=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt");var i=r.n(n),o=r(2253),u=r(9786);async function a({req:e,bun_req:t}){try{let{auth_key_cookie_name:r,csrf_cookie_name:n}=(0,u.Z)(),a=e?.headers.cookie||t?.headers.get("cookie");if(!a)return{success:!1,msg:"Couldn't grab cookie string"};let c=(0,s.ej)(a,r);if(!c)return{success:!1,msg:`No ${r} found in request object.`};let d=i()({encryptedString:c}),l=o.dF.parse(d);if(!l?.id)return{success:!1,msg:"Invalid Auth Key"};let m=(0,s.ej)(a,n);if(!m)return{success:!1,msg:`No ${n} found in request object.`};if(m!==l.csrf_k)return{success:!1,msg:"CSRF mismatch"};return{success:!0,singleRes:l}}catch(e){return{success:!1}}}},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=8635);module.exports=r})();
|
||||||
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=908,e.ids=[908],e.modules={5529:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/hashPassword")},8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},2048:e=>{e.exports=require("fs")},6249:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},6644:(e,t,r)=>{r.r(t),r.d(t,{config:()=>l,default:()=>d,routeModule:()=>c});var i={};r.r(i),r.d(i,{default:()=>u});var a=r(1802),n=r(7153),s=r(6249),o=r(4751);async function u(e,t){try{if("POST"!==e.method)return t.json({success:!1,msg:"Wrong Method"});let{email:r,username:i,password:a}=e.body;if("string"!=typeof a||!a?.match(/./))throw Error("Password is required!");let n=await (0,o.Z)({res:t,email_or_username:r||i,password:a,req:e});return t.json(n)}catch(e){return t.json({success:!1,msg:e.message})}}let d=(0,s.l)(i,"default"),l=(0,s.l)(i,"config"),c=new a.PagesAPIRouteModule({definition:{kind:n.x.PAGES_API,page:"/api/auth/login",pathname:"/api/auth/login",bundlePath:"",filename:""},userland:i})},2253:(e,t,r)=>{r.d(t,{dF:()=>s(),_n:()=>l,lV:()=>u()});let i=require("@moduletrace/datasquirel/dist/client");var a=r.n(i);let n=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson");var s=r.n(n);let o=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify");var u=r.n(o);let d=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy"),l=r.n(d)();a().utils.serializeQuery,a().utils.deserializeQuery},4751:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(8804),a=r.n(i),n=r(6941),s=r(2253);let o=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/encrypt");var u=r.n(o),d=r(5529),l=r.n(d),c=r(1635),m=r.n(c),p=r(9786);async function f({req:e,res:t,user_id:r,password:i,email_or_username:o}){let d;if(r){let e=await a().select({table:"users",targetId:r});if(!e.singleRes?.id)throw Error("Couldn't Find user for login");d=e.singleRes}if(o){let e=await a().select({table:"users",query:{query:{email:{value:o},username:{value:o}},searchOperator:"OR"}});if(!e.singleRes?.id)throw Error("Couldn't Find user for login");d=e.singleRes}if(!d)return{success:!1,msg:"User Not Found!"};if(i&&l()({password:i})!==d.password)return{success:!1,msg:"Invalid Password."};let c=Date.now(),f=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),h={first_name:d.first_name,last_name:d.last_name,date:c,email:d.email,csrf_k:f,id:d.id,logged_in_status:!0,image:d.image,image_thumbnail:d.image,super_admin:!!d.is_super_admin},g=s.dF.stringify(h),_=u()({data:g||""}),y=m()(Date.now()).add(7,"days");y.add(7,"days");let{auth_key_cookie_name:P,csrf_cookie_name:q}=(0,p.Z)(),v=e.headers.host;return(0,n.d8)(t,[{name:P,value:_||"",options:{secure:"localhost"!==v,path:"/",expires:y,domain:v}},{name:q,value:f,options:{path:"/",expires:y,domain:v}}]),{success:!0,singleRes:h}}},6941:(e,t,r)=>{function i(e,t){let r=[];for(let e=0;e<t.length;e++){let{name:i,options:a,value:n}=t[e],s=[`${encodeURIComponent(i)}=${encodeURIComponent(n)}`];a.expires&&s.push(`Expires=${a.expires.toDate().toUTCString()}`),void 0!==a.maxAge&&s.push(`Max-Age=${a.maxAge}`),a.path&&s.push(`Path=${a.path}`),a.domain&&s.push(`Domain=${a.domain}`),a.secure&&s.push("Secure"),a.httpOnly&&s.push("HttpOnly"),r.push(s)}let i=r.map(e=>e.join("; "));e.setHeader("Set-Cookie",i)}function a(e,t){return e.split(";").reduce((e,t)=>{let[r,i]=t.trim().split("=").map(decodeURIComponent);return e[r]=i,e},{})[t]||null}r.d(t,{d8:()=>i,ej:()=>a}),r(1635)},9786:(e,t,r)=>{r.d(t,{Z:()=>s});var i=r(2048);let a=require("path");var n=r.n(a);function s(){let{TURBOCI_DEPLOYMENT_ID_FILE:e}=function(){let e=n().resolve(__dirname,"../../"),t="/root/.turboci",r=n().join(t,".config"),i=n().join(r,"turboci.json"),a=n().join(t,"deployment_id"),s=n().join(t,".ssh"),o=n().join(s,"turboci");return{APP_DIR:e,TURBOCI_CONFIG_DIR:r,TURBOCI_CONFIG_JSON_FILE:i,TURBOCI_DIR:t,TURBOCI_SSH_DIR:s,TURBOCI_SSH_KEY_FILE:o,TURBOCI_DEPLOYMENT_ID_FILE:a}}();if(!(0,i.existsSync)(e))throw Error(`\`${e}\` does not exist.`);let t=(0,i.readFileSync)(e,"utf-8").split("-").shift();if(!t)throw Error("Invalid deployment_id");return{auth_key_cookie_name:`turboci-admin-${t}-auth-key`,csrf_cookie_name:`turboci-admin-${t}-csrf`}}},7153:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,t,r)=>{e.exports=r(145)}};var t=require("../../../webpack-api-runtime.js");t.C(e);var r=t(t.s=6644);module.exports=r})();
|
||||||
File diff suppressed because one or more lines are too long
+39
@@ -0,0 +1,39 @@
|
|||||||
|
"use strict";(()=>{var e={};e.id=11,e.ids=[11],e.modules={5529:e=>{e.exports=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/hashPassword")},8804:e=>{e.exports=require("@moduletrace/nsqlite")},1635:e=>{e.exports=require("dayjs")},145:e=>{e.exports=require("next/dist/compiled/next-server/pages-api.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},6249:(e,s)=>{Object.defineProperty(s,"l",{enumerable:!0,get:function(){return function e(s,r){return r in s?s[r]:"then"in s&&"function"==typeof s.then?s.then(s=>e(s,r)):"function"==typeof s&&"default"===r?s:void 0}}})},9055:(e,s,r)=>{r.r(s),r.d(s,{config:()=>y,default:()=>g,routeModule:()=>_});var t={};r.r(t),r.d(t,{default:()=>f});var i=r(1802),n=r(7153),a=r(6249),o=r(4751),u=r(5529),d=r.n(u),l=r(8804),c=r.n(l),m=r(2632),h=r(2253),p=r(246);async function f(e,s){try{let{singleRes:r}=await (0,m.Z)({req:e});if("POST"!==e.method)return s.json({success:!1,msg:"Wrong Method"});let{new_user:t}=e.body;if(r?.id&&!t?.username?.match(/^[a-z0-9\-]{3,}$/))throw Error("Please pass a valid username");if(!t)throw Error("No new User Object Passed!");if(!t.password)throw Error("New User Password is required.");let i=await c().select({table:"users"});if(i.payload?.[0]?.id&&!r?.id)return s.json({success:!1,msg:"Super Admin User already exists. Other Users can be created by this user."});if(r?.id&&!r.super_admin)return s.json({success:!1,msg:"Operation not allowed!"});let{first_name:n,email:a,last_name:u,password:l,username:f}=t,g=d()({password:l}),y=await c().insert({data:[{first_name:n,last_name:u,email:a,password:g,is_super_admin:r?.id?0:1,username:f?(0,h.lV)(f):void 0}],table:"users"}),_=y.postInsertReturn?.insertId;if(!_)throw Error("Couldn't create New User.");let b=await c().select({table:"users",targetId:_}),w=b.singleRes;if(!w?.id)throw console.log("newly_inserted_user_res",b),Error("Couldn't Find Newly inserted user.");if(r?.id&&!w.username)throw await c().delete({table:"users",targetId:w?.id}),Error("Couldn't set Newly inserted user username.");if(r?.id)return console.log("newly_inserted_user",w),await (0,p.Z)({user_id:w.id}),s.json({success:!0,singleRes:w});{let r=await (0,o.Z)({res:s,user_id:w.id,req:e});return s.json(r)}}catch(e){return s.json({success:!1,msg:e.message})}}let g=(0,a.l)(t,"default"),y=(0,a.l)(t,"config"),_=new i.PagesAPIRouteModule({definition:{kind:n.x.PAGES_API,page:"/api/auth/signup",pathname:"/api/auth/signup",bundlePath:"",filename:""},userland:t})},2253:(e,s,r)=>{r.d(s,{dF:()=>a(),_n:()=>l,lV:()=>u()});let t=require("@moduletrace/datasquirel/dist/client");var i=r.n(t);let n=require("@moduletrace/datasquirel/dist/package-shared/utils/ejson");var a=r.n(n);let o=require("@moduletrace/datasquirel/dist/package-shared/utils/slugify");var u=r.n(o);let d=require("@moduletrace/datasquirel/dist/package-shared/utils/numberfy"),l=r.n(d)();i().utils.serializeQuery,i().utils.deserializeQuery},4751:(e,s,r)=>{r.d(s,{Z:()=>p});var t=r(8804),i=r.n(t),n=r(6941),a=r(2253);let o=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/encrypt");var u=r.n(o),d=r(5529),l=r.n(d),c=r(1635),m=r.n(c),h=r(9786);async function p({req:e,res:s,user_id:r,password:t,email_or_username:o}){let d;if(r){let e=await i().select({table:"users",targetId:r});if(!e.singleRes?.id)throw Error("Couldn't Find user for login");d=e.singleRes}if(o){let e=await i().select({table:"users",query:{query:{email:{value:o},username:{value:o}},searchOperator:"OR"}});if(!e.singleRes?.id)throw Error("Couldn't Find user for login");d=e.singleRes}if(!d)return{success:!1,msg:"User Not Found!"};if(t&&l()({password:t})!==d.password)return{success:!1,msg:"Invalid Password."};let c=Date.now(),p=Math.random().toString(36).substring(2)+"-"+Math.random().toString(36).substring(2),f={first_name:d.first_name,last_name:d.last_name,date:c,email:d.email,csrf_k:p,id:d.id,logged_in_status:!0,image:d.image,image_thumbnail:d.image,super_admin:!!d.is_super_admin},g=a.dF.stringify(f),y=u()({data:g||""}),_=m()(Date.now()).add(7,"days");_.add(7,"days");let{auth_key_cookie_name:b,csrf_cookie_name:w}=(0,h.Z)(),$=e.headers.host;return(0,n.d8)(s,[{name:b,value:y||"",options:{secure:"localhost"!==$,path:"/",expires:_,domain:$}},{name:w,value:p,options:{path:"/",expires:_,domain:$}}]),{success:!0,singleRes:f}}},246:(e,s,r)=>{r.d(s,{Z:()=>d});var t=r(2253),i=r(2481),n=r(8804),a=r.n(n),o=r(1282),u=r(2048);async function d({user_id:e}){let s=(await a().select({table:"users",targetId:(0,t._n)(e)})).singleRes;if(!s?.id||!s.username||s.is_super_admin)return;let{username:r}=s,{force_command_file:n,ssh_dir:d,ssh_key_file:l,sshd_config_file:c,user_dir:m}=(0,i.Z)({user:s}),h=`/bin/bash << 'TURBOCIHEREDOC'
|
||||||
|
`;(0,u.existsSync)(m)||(h+=`useradd --create-home --shell /bin/bash --comment "TurboCI Deployment user ${r}" ${r}
|
||||||
|
passwd --lock "${r}"
|
||||||
|
mkdir -p "${d}"
|
||||||
|
ssh-keygen -t ed25519 -f "${l}" -N "" -C "${r}@$(hostname)"
|
||||||
|
cp "${l}.pub" "${d}/authorized_keys"
|
||||||
|
chown -R "${r}:${r}" "${d}"
|
||||||
|
chmod 700 "${d}"
|
||||||
|
chmod 600 "${l}"
|
||||||
|
chmod 644 "${l}.pub"
|
||||||
|
chmod 600 "${d}/authorized_keys"
|
||||||
|
`),h+=`cat << 'EOF' > ${n}
|
||||||
|
#!/bin/bash
|
||||||
|
case "$SSH_ORIGINAL_COMMAND" in
|
||||||
|
"shell")
|
||||||
|
exec /bin/bash
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Access denied."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
EOF
|
||||||
|
|
||||||
|
chmod +x ${n}
|
||||||
|
|
||||||
|
cat << 'EOF' > ${c}
|
||||||
|
Match User ${r}
|
||||||
|
PasswordAuthentication no
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
AuthenticationMethods publickey
|
||||||
|
AllowTcpForwarding yes
|
||||||
|
X11Forwarding no
|
||||||
|
ForceCommand ${n}
|
||||||
|
PermitOpen localhost:80
|
||||||
|
PermitTTY no
|
||||||
|
EOF
|
||||||
|
TURBOCIHEREDOC
|
||||||
|
`,(0,o.execSync)(h)}},6941:(e,s,r)=>{function t(e,s){let r=[];for(let e=0;e<s.length;e++){let{name:t,options:i,value:n}=s[e],a=[`${encodeURIComponent(t)}=${encodeURIComponent(n)}`];i.expires&&a.push(`Expires=${i.expires.toDate().toUTCString()}`),void 0!==i.maxAge&&a.push(`Max-Age=${i.maxAge}`),i.path&&a.push(`Path=${i.path}`),i.domain&&a.push(`Domain=${i.domain}`),i.secure&&a.push("Secure"),i.httpOnly&&a.push("HttpOnly"),r.push(a)}let t=r.map(e=>e.join("; "));e.setHeader("Set-Cookie",t)}function i(e,s){return e.split(";").reduce((e,s)=>{let[r,t]=s.trim().split("=").map(decodeURIComponent);return e[r]=t,e},{})[s]||null}r.d(s,{d8:()=>t,ej:()=>i}),r(1635)},9786:(e,s,r)=>{r.d(s,{Z:()=>a});var t=r(2048);let i=require("path");var n=r.n(i);function a(){let{TURBOCI_DEPLOYMENT_ID_FILE:e}=function(){let e=n().resolve(__dirname,"../../"),s="/root/.turboci",r=n().join(s,".config"),t=n().join(r,"turboci.json"),i=n().join(s,"deployment_id"),a=n().join(s,".ssh"),o=n().join(a,"turboci");return{APP_DIR:e,TURBOCI_CONFIG_DIR:r,TURBOCI_CONFIG_JSON_FILE:t,TURBOCI_DIR:s,TURBOCI_SSH_DIR:a,TURBOCI_SSH_KEY_FILE:o,TURBOCI_DEPLOYMENT_ID_FILE:i}}();if(!(0,t.existsSync)(e))throw Error(`\`${e}\` does not exist.`);let s=(0,t.readFileSync)(e,"utf-8").split("-").shift();if(!s)throw Error("Invalid deployment_id");return{auth_key_cookie_name:`turboci-admin-${s}-auth-key`,csrf_cookie_name:`turboci-admin-${s}-csrf`}}},2481:(e,s,r)=>{r.d(s,{Z:()=>t});function t({user:e}){let{username:s}=e,r=`/home/${s}`,t=`${r}/.ssh`,i=`${t}/${s}`;return{user_dir:r,ssh_dir:t,ssh_key_file:i,sshd_config_file:`/etc/ssh/sshd_config.d/${s}.conf`,force_command_file:`/usr/local/bin/turboci-deployment-user-${s}`}}},2632:(e,s,r)=>{r.d(s,{Z:()=>u});var t=r(6941);let i=require("@moduletrace/datasquirel/dist/package-shared/functions/dsql/decrypt");var n=r.n(i),a=r(2253),o=r(9786);async function u({req:e,bun_req:s}){try{let{auth_key_cookie_name:r,csrf_cookie_name:i}=(0,o.Z)(),u=e?.headers.cookie||s?.headers.get("cookie");if(!u)return{success:!1,msg:"Couldn't grab cookie string"};let d=(0,t.ej)(u,r);if(!d)return{success:!1,msg:`No ${r} found in request object.`};let l=n()({encryptedString:d}),c=a.dF.parse(l);if(!c?.id)return{success:!1,msg:"Invalid Auth Key"};let m=(0,t.ej)(u,i);if(!m)return{success:!1,msg:`No ${i} found in request object.`};if(m!==c.csrf_k)return{success:!1,msg:"CSRF mismatch"};return{success:!0,singleRes:c}}catch(e){return{success:!1}}}},7153:(e,s)=>{var r;Object.defineProperty(s,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},1802:(e,s,r)=>{e.exports=r(145)}};var s=require("../../../webpack-api-runtime.js");s.C(e);var r=s(s.s=9055);module.exports=r})();
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user