@xeplr/monitor 1.0.0 → 1.1.0
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 +8 -5
- package/api/bin/auth.js +4 -0
- package/api/package.json +1 -20
- package/api/production.env.example +2 -1
- package/api/setup.schema.js +41 -6
- package/deploy/bin-of.cjs +19 -0
- package/deploy/deploy.js +28 -8
- package/deploy/install.sh +52 -21
- package/deploy/settings.cjs +4 -2
- package/{api/package-lock.json → npm-shrinkwrap.json} +15 -22
- package/package.json +22 -6
- package/ui/dist/assets/index-BzsqfSIx.js +75 -0
- package/ui/dist/assets/index-CbqbGtaD.css +1 -0
- package/ui/{index.html → dist/index.html} +2 -1
- package/ui/.env +0 -8
- package/ui/package-lock.json +0 -2094
- package/ui/package.json +0 -31
- package/ui/pages.json +0 -33
- package/ui/src/App.jsx +0 -130
- package/ui/src/api/monitor.js +0 -6
- package/ui/src/index.css +0 -414
- package/ui/src/main.jsx +0 -27
- package/ui/src/pages/Connections.jsx +0 -9
- package/ui/src/pages/Home.jsx +0 -8
- package/ui/src/pages/Monitor.jsx +0 -9
- package/ui/vite.config.js +0 -56
- /package/ui/{public → dist}/logo-wide.svg +0 -0
- /package/ui/{public → dist}/logo.svg +0 -0
package/ui/vite.config.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { defineConfig, loadEnv } from 'vite'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
|
|
4
|
-
// EVERY API PREFIX THIS APP CALLS.
|
|
5
|
-
//
|
|
6
|
-
// A path missing from this list does NOT fail loudly — Vite falls through to
|
|
7
|
-
// the SPA and serves index.html, so the fetch succeeds and the JSON parse is
|
|
8
|
-
// what breaks: `Unexpected token '<'`. Adding a route to the backend is only
|
|
9
|
-
// half of shipping an endpoint; it has to be listed here too.
|
|
10
|
-
const API_PATHS = [
|
|
11
|
-
'/health',
|
|
12
|
-
'/whoami',
|
|
13
|
-
// The setup page and its status (@xeplr/setup, served by the API before
|
|
14
|
-
// sign-in): App settings asks /setup/status while the app restarts.
|
|
15
|
-
'/setup',
|
|
16
|
-
// Every data address lives under /api, so a PAGE path and a DATA path can
|
|
17
|
-
// never collide. Without that split, adding '/tasks' here shadowed the UI's
|
|
18
|
-
// own /tasks page — opening it showed raw JSON instead of the app.
|
|
19
|
-
'/api'
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
export default defineConfig(({ mode }) => {
|
|
23
|
-
// Prefix '' so plain names load, not just VITE_-prefixed ones. These are dev
|
|
24
|
-
// server settings, not values shipped to the browser.
|
|
25
|
-
const env = loadEnv(mode, process.cwd(), '')
|
|
26
|
-
|
|
27
|
-
// NO PORT LITERALS. A hardcoded fallback is a second answer to a question
|
|
28
|
-
// .env already answers, and it is the one that wins when the file is missing
|
|
29
|
-
// — exactly when you want to be told rather than quietly served elsewhere.
|
|
30
|
-
const port = Number(env.UI_PORT)
|
|
31
|
-
const authUrl = env.AUTH_URL
|
|
32
|
-
const apiUrl = env.API_URL
|
|
33
|
-
if (!port || !authUrl || !apiUrl) {
|
|
34
|
-
throw new Error('ui/.env must set UI_PORT, AUTH_URL and API_URL')
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const proxy = {
|
|
38
|
-
// Only the real network calls (/auth/api/*), NOT bare /auth — that prefix
|
|
39
|
-
// is also used by client-side routes (/auth/login, /auth/profile), which
|
|
40
|
-
// must fall through to Vite's SPA index.html rather than the auth backend.
|
|
41
|
-
'/auth/api': authUrl
|
|
42
|
-
}
|
|
43
|
-
API_PATHS.forEach((p) => { proxy[p] = apiUrl })
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
plugins: [react()],
|
|
47
|
-
// Force every import to THIS app's copy, so hook-using libraries don't
|
|
48
|
-
// load twice and break the rules of hooks in ways that read as impossible.
|
|
49
|
-
resolve: { dedupe: ['react', 'react-dom', 'react-router-dom', '@xeplr/ui-table', '@xeplr/ui-utils'] },
|
|
50
|
-
// 127.0.0.1, not 'localhost': Node resolves 'localhost' to IPv6 (::1)
|
|
51
|
-
// first, so the dev server listened on ::1 alone and a browser going to
|
|
52
|
-
// 127.0.0.1 was refused.
|
|
53
|
-
server: { host: '127.0.0.1', port, strictPort: true, proxy },
|
|
54
|
-
preview: { port, strictPort: true }
|
|
55
|
-
}
|
|
56
|
-
})
|
|
File without changes
|
|
File without changes
|