@qodalis/cli-server-plugin-admin 1.0.0-beta.5 → 1.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -2
- package/dashboard/assets/index-BAmUWZCS.js +242 -0
- package/dashboard/assets/index-BF7ofZj2.css +32 -0
- package/dashboard/assets/wasm/qodalis_cli_wasm_bg.wasm +0 -0
- package/dashboard/index.html +3 -2
- package/dist/auth/auth-controller.d.ts +2 -1
- package/dist/auth/auth-controller.d.ts.map +1 -1
- package/dist/auth/auth-controller.js +35 -5
- package/dist/auth/auth-controller.js.map +1 -1
- package/dist/auth/auth-middleware.d.ts +2 -1
- package/dist/auth/auth-middleware.d.ts.map +1 -1
- package/dist/auth/auth-middleware.js +35 -1
- package/dist/auth/auth-middleware.js.map +1 -1
- package/dist/auth/auth-provider.d.ts +33 -0
- package/dist/auth/auth-provider.d.ts.map +1 -0
- package/dist/auth/auth-provider.js +16 -0
- package/dist/auth/auth-provider.js.map +1 -0
- package/dist/cli-admin-builder.d.ts +11 -7
- package/dist/cli-admin-builder.d.ts.map +1 -1
- package/dist/cli-admin-builder.js +37 -47
- package/dist/cli-admin-builder.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/services/admin-config.d.ts +2 -0
- package/dist/services/admin-config.d.ts.map +1 -1
- package/dist/services/admin-config.js +4 -3
- package/dist/services/admin-config.js.map +1 -1
- package/dist/services/dashboard-dir.d.ts +10 -0
- package/dist/services/dashboard-dir.d.ts.map +1 -0
- package/dist/services/dashboard-dir.js +51 -0
- package/dist/services/dashboard-dir.js.map +1 -0
- package/dist/services/log-ring-buffer.d.ts +2 -0
- package/dist/services/log-ring-buffer.d.ts.map +1 -1
- package/dist/services/log-ring-buffer.js +12 -0
- package/dist/services/log-ring-buffer.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -3
- package/dashboard/assets/index-CKzcPzP-.js +0 -199
- package/dashboard/assets/index-LZx7c-rD.css +0 -32
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ app.use(adminPlugin.dashboardPrefix, adminPlugin.dashboardRouter);
|
|
|
35
35
|
|
|
36
36
|
## Configuration
|
|
37
37
|
|
|
38
|
+
When the users plugin is installed, pass `setAuthProvider(usersPlugin.serverAuth)`: the dashboard then logs in with users credentials, its token is a users session token, and every admin route requires `admin:access`. The static credentials below are only used when the users plugin is absent.
|
|
39
|
+
|
|
38
40
|
Credentials and JWT secret can be set via the builder or environment variables:
|
|
39
41
|
|
|
40
42
|
| Environment Variable | Default | Description |
|
|
@@ -47,7 +49,8 @@ Credentials and JWT secret can be set via the builder or environment variables:
|
|
|
47
49
|
|
|
48
50
|
| Method | Description |
|
|
49
51
|
|---|---|
|
|
50
|
-
| `setCredentials(username, password)` | Set admin login credentials |
|
|
52
|
+
| `setCredentials(username, password)` | Set admin login credentials (only used without the users plugin) |
|
|
53
|
+
| `setAuthProvider(usersPlugin.serverAuth)` | Log in through the users plugin; requires the `admin:access` permission (`admin` has it via `*`) |
|
|
51
54
|
| `setJwtSecret(secret)` | Set JWT signing secret |
|
|
52
55
|
| `setRegisteredJobs(count)` | Report job count in the status endpoint |
|
|
53
56
|
| `setEnabledFeatures(features)` | Add custom feature flags to the status endpoint |
|
|
@@ -79,6 +82,8 @@ All endpoints are mounted at the plugin's built-in prefix (`/api/v1/qcli`). Rout
|
|
|
79
82
|
|
|
80
83
|
### Configuration
|
|
81
84
|
|
|
85
|
+
When the users plugin is installed, pass `setAuthProvider(usersPlugin.serverAuth)`: the dashboard then logs in with users credentials, its token is a users session token, and every admin route requires `admin:access`. The static credentials below are only used when the users plugin is absent.
|
|
86
|
+
|
|
82
87
|
| Method | Endpoint | Description |
|
|
83
88
|
|---|---|---|
|
|
84
89
|
| GET | `/config` | Return structured config sections (server, auth, custom) |
|
|
@@ -90,6 +95,8 @@ All endpoints are mounted at the plugin's built-in prefix (`/api/v1/qcli`). Rout
|
|
|
90
95
|
|---|---|---|
|
|
91
96
|
| GET | `/logs` | Query log entries with optional `level`, `search`, `limit`, `offset` params |
|
|
92
97
|
|
|
98
|
+
The log buffer captures `console.log`/`warn`/`error` output. As a safety net, a value written after a `password`, `passwd`, `secret` or `token` label (`password: x`, `token=x`, `password for user "root": x`) is replaced with `[REDACTED]` before the entry is stored or broadcast.
|
|
99
|
+
|
|
93
100
|
### WebSocket Clients
|
|
94
101
|
|
|
95
102
|
| Method | Endpoint | Description |
|
|
@@ -98,7 +105,7 @@ All endpoints are mounted at the plugin's built-in prefix (`/api/v1/qcli`). Rout
|
|
|
98
105
|
|
|
99
106
|
## Dashboard
|
|
100
107
|
|
|
101
|
-
The plugin includes a bundled SPA dashboard served at the built-in prefix (`/qcli/admin`). The dashboard
|
|
108
|
+
The plugin includes a bundled SPA dashboard served at the built-in prefix (`/qcli/admin`). The dashboard is found in this order: the directory given to `setDashboardDir()`, a sibling `cli-server-dashboard/dist` build (development), the package's bundled `dashboard/` directory, and the `@qodalis/cli-server-dashboard` package if installed separately. The same order applies whether the plugin runs compiled or from source (`tsx`).
|
|
102
109
|
|
|
103
110
|
## License
|
|
104
111
|
|