mumei-dashboard 0.4.1 → 0.4.2

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.
@@ -4,11 +4,33 @@
4
4
  // root). The Vite dev server is a separate concern handled by
5
5
  // `npm run dev` from the dashboard repo; the published bin always
6
6
  // runs the prebuilt server bundle (`dist/server/index.js`).
7
- import { existsSync } from 'node:fs'
7
+ import { existsSync, readFileSync } from 'node:fs'
8
8
  import path from 'node:path'
9
9
  import { fileURLToPath, pathToFileURL } from 'node:url'
10
10
 
11
11
  const here = path.dirname(fileURLToPath(import.meta.url))
12
+
13
+ const arg = process.argv[2]
14
+ if (arg === '--version' || arg === '-v' || arg === 'version') {
15
+ const pkg = JSON.parse(readFileSync(path.resolve(here, '../package.json'), 'utf8'))
16
+ process.stdout.write(`${pkg.version}\n`)
17
+ process.exit(0)
18
+ }
19
+ if (arg === '--help' || arg === '-h' || arg === 'help') {
20
+ process.stdout.write(`mumei-dashboard — local web UI for the mumei plugin
21
+
22
+ Usage:
23
+ mumei-dashboard Start the dashboard server (default port 3001)
24
+ mumei-dashboard --version Print version and exit
25
+ mumei-dashboard --help Show this help and exit
26
+
27
+ The server reads .mumei/ from the current working directory and serves
28
+ the dashboard at http://127.0.0.1:<port>. Override the port with the
29
+ MUMEI_DASHBOARD_PORT environment variable.
30
+ `)
31
+ process.exit(0)
32
+ }
33
+
12
34
  const builtEntry = path.resolve(here, '../dist/server/index.js')
13
35
  const sourceEntry = path.resolve(here, '../server/index.ts')
14
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mumei-dashboard",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Local dev dashboard for mumei: realtime visualisation of feature phases, Wave progress, review verdicts, token cost, and hook firing trends. Reads .mumei/ directly, no external service.",
5
5
  "type": "module",
6
6
  "private": false,