@jxa13/pm2ui 1.17.0 → 1.18.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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Node WebUI React</title>
7
- <script type="module" crossorigin src="./assets/index-aVk9yHhV.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-B4aD3qEe.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-BhYqcf4u.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,11 +1,28 @@
1
1
  {
2
2
  "name": "@jxa13/pm2ui",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "description": "Local PM2 dashboard web UI for managing Node.js services",
5
5
  "main": "server.js",
6
6
  "bin": {
7
7
  "pm2ui": "bin/pm2ui.js"
8
8
  },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/0xJxa/Node-WebUI.git"
12
+ },
13
+ "homepage": "https://github.com/0xJxa/Node-WebUI#readme",
14
+ "bugs": {
15
+ "url": "https://github.com/0xJxa/Node-WebUI/issues"
16
+ },
17
+ "author": "0xJxa",
18
+ "keywords": [
19
+ "pm2",
20
+ "dashboard",
21
+ "process-manager",
22
+ "node-webui",
23
+ "monitoring",
24
+ "macos"
25
+ ],
9
26
  "files": [
10
27
  "bin",
11
28
  "server.js",
@@ -21,6 +38,9 @@
21
38
  "node": ">=18"
22
39
  },
23
40
  "license": "MIT",
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
24
44
  "scripts": {
25
45
  "start": "npm run react:build && node server.js",
26
46
  "dev": "node server.js",
@@ -31,13 +51,15 @@
31
51
  "react:smoke": "node scripts/react-smoke-test.mjs"
32
52
  },
33
53
  "dependencies": {
34
- "@vitejs/plugin-react": "^4.3.4",
35
54
  "express": "^5.1.0",
36
- "lucide-react": "^0.468.0",
37
55
  "pm2": "^6.0.14",
56
+ "systeminformation": "^5.27.11"
57
+ },
58
+ "devDependencies": {
59
+ "@vitejs/plugin-react": "^4.3.4",
60
+ "lucide-react": "^0.468.0",
38
61
  "react": "^18.3.1",
39
62
  "react-dom": "^18.3.1",
40
- "systeminformation": "^5.27.11",
41
63
  "vite": "^5.4.21"
42
64
  }
43
65
  }
package/roadmap.md CHANGED
@@ -12,49 +12,54 @@ Node WebUI now uses the React operations console as the default and only fronten
12
12
  - Dashboard CPU and RAM cards now show aggregate PM2 process usage instead of host system usage.
13
13
  - PM2 RAM is displayed as bytes so it does not get confused with macOS memory pressure or cache usage.
14
14
 
15
- 2. Argument-safe PM2 commands.
16
- - PM2 log, save, create, delete, flush, and open-folder actions use argument arrays through `execFile` or `spawn`.
17
- - Log line counts are normalized before calling PM2.
15
+ 2. Reduced PM2 subprocess usage.
16
+ - PM2 save, create, delete, flush, process actions, and live log streaming now use PM2's Node API instead of shelling out to the PM2 CLI.
17
+ - Recent log history is read from PM2's stdout and stderr log files with normalized line counts.
18
+ - The macOS Finder reveal action remains an `open -R` subprocess because it is the platform integration behind the Open Folder button.
18
19
 
19
20
  3. Protected process enforcement.
20
21
  - Protected process names are enforced on server-side stop, restart, and delete routes.
21
22
  - Frontend controls still show protected state for operator clarity.
22
23
 
23
- 4. Case-sensitive import portability.
24
+ 4. Local API request hardening.
25
+ - Unsafe local API methods require a same-origin session token generated by the server.
26
+ - Dashboard reads and Server-Sent Events remain available without the token.
27
+
28
+ 5. Case-sensitive import portability.
24
29
  - Backend imports now match the `Services` directory name.
25
30
 
26
- 5. Full process details.
31
+ 6. Full process details.
27
32
  - The dashboard returns and displays PM2 metadata for interpreter, exec mode, app args, node args, environment name, log paths, watch mode, namespace, and related runtime fields.
28
33
 
29
- 6. PM2 runtime and persistence status.
30
- - The dashboard shows PM2 version, daemon PID/uptime, managed app count, saved state, and macOS startup persistence detection.
34
+ 7. PM2 runtime and persistence status.
35
+ - The dashboard shows PM2 version, daemon PID, managed app count, saved state, and macOS startup persistence detection.
31
36
 
32
- 7. Process creation options.
37
+ 8. Process creation options.
33
38
  - Create-app support includes quoted argument parsing plus interpreter, Node args, `NODE_ENV`, instances, watch mode, max-memory restart, and output/error log paths.
34
39
 
35
- 8. Live dashboard updates.
40
+ 9. Live dashboard updates.
36
41
  - The dashboard uses Server-Sent Events for process status and metric updates, with polling retained as a fallback.
37
42
 
38
- 9. Live log streaming.
39
- - The logs modal streams PM2 logs live, preserves scroll position when reading older output, and falls back to polling.
43
+ 10. Live log streaming.
44
+ - The logs workspace streams PM2 logs live through PM2's event bus, preserves scroll position when reading older output, and falls back to polling.
40
45
 
41
- 10. Historical PM2 charts.
46
+ 11. Historical PM2 charts.
42
47
  - The dashboard tracks PM2 CPU, PM2 RAM, restarts, and status counts in local browser history with a configurable 15/30/60 minute window.
43
48
 
44
- 11. Built-in themes.
49
+ 12. Built-in themes.
45
50
  - The app now uses curated built-in theme families with light, dark, and system modes instead of arbitrary custom theme editing.
46
51
 
47
- 12. Operations-console polish.
52
+ 13. Operations-console polish.
48
53
  - The dashboard is denser and more operational, with compact summary cards, icon buttons, stronger empty states, sticky table headers, and clearer status/busy styling.
49
54
 
50
55
  ## React Migration Plan
51
56
 
52
- 13. Create a Vite React frontend. **Completed**
57
+ 14. Create a Vite React frontend. **Completed**
53
58
  - Keep the Express API unchanged.
54
59
  - Build React pages against the current `/api/dashboard`, process action, logs, PM2 status, and settings behavior.
55
60
  - The former vanilla UI has been removed after React reached feature parity.
56
61
 
57
- 14. Use a component structure that matches the app workflows. **Completed**
62
+ 15. Use a component structure that matches the app workflows. **Completed**
58
63
  - Dashboard shell
59
64
  - Summary metric cards
60
65
  - Metric history charts
@@ -64,107 +69,108 @@ Node WebUI now uses the React operations console as the default and only fronten
64
69
  - Create-process form
65
70
  - Settings with theme and protected-process sections
66
71
 
67
- 15. Add React UI libraries conservatively. **Completed**
72
+ 16. Add React UI libraries conservatively. **Completed**
68
73
  - Use `lucide-react` for icons.
69
74
  - Keep charts canvas-based at first unless a chart library clearly pays for itself.
70
75
  - Avoid a large component framework unless the app needs it.
71
76
 
72
- 16. Switch Express static serving after React feature parity. **Completed**
77
+ 17. Switch Express static serving after React feature parity. **Completed**
73
78
  - React is now served from Express at `/`.
74
79
  - The old vanilla `public` UI has been removed.
75
80
  - `/react` remains a compatibility path to the same React build.
76
81
 
77
82
  ## React Operations Console Batch
78
83
 
79
- 17. Make React the Express default UI. **Completed**
84
+ 18. Make React the Express default UI. **Completed**
80
85
  - Built React assets are served at `/`.
81
86
  - `npm start` builds the React frontend before starting Express.
82
87
  - The vanilla UI is no longer shipped.
83
88
 
84
- 18. Unify dashboard and logs state. **Completed**
89
+ 19. Unify dashboard and logs state. **Completed**
85
90
  - The Logs sidebar page and process inspector share selected process, line count, search, wrapping, auto-refresh, log entries, and stream lifecycle.
86
91
  - Row log actions now move the app to the Logs workspace and activate the inspector Logs tab.
87
92
 
88
- 19. Improve PM2 runtime data reliability. **Completed**
93
+ 20. Improve PM2 runtime data reliability. **Completed**
89
94
  - Sidebar runtime values now fall back to loaded dashboard summary data where PM2 runtime metadata is unavailable.
90
95
  - Missing runtime fields show explicit `--` values instead of misleading connected states.
91
96
 
92
- 20. Add safer action confirmations. **Completed**
97
+ 21. Add safer action confirmations. **Completed**
93
98
  - Stop, restart, delete, bulk stop/restart, and clear-logs flows use a structured confirmation dialog.
94
99
  - Confirmations show process names, PM2 IDs, statuses, scripts, and excluded protected-process context.
95
100
 
96
- 21. Add per-row and action busy states. **Completed**
101
+ 22. Add per-row and action busy states. **Completed**
97
102
  - Existing row busy states are preserved and now pair with the structured confirmation flow.
98
103
  - Bulk action state continues to lock relevant controls while actions are running.
99
104
 
100
- 22. Persist selected process, active tab, nav, and density. **Completed**
105
+ 23. Persist selected process, active tab, nav, and density. **Completed**
101
106
  - React now restores selected PM2 ID, active navigation item, inspector tab, table density, and log target from `localStorage`.
102
107
 
103
- 23. Make charts theme-aware. **Completed**
108
+ 24. Make charts theme-aware. **Completed**
104
109
  - PM2 CPU, PM2 RAM, restart, and status chart strokes now resolve from CSS variables so theme changes apply to charts.
105
110
 
106
- 24. Add table density controls. **Completed**
111
+ 25. Add table density controls. **Completed**
107
112
  - Operators can switch between Compact and Comfortable table density.
108
113
  - Density choice persists locally.
109
114
 
110
- 25. Add keyboard workflows. **Completed**
115
+ 26. Add keyboard workflows. **Completed**
111
116
  - `/` focuses process search.
112
117
  - `r` refreshes the dashboard.
113
118
  - `l` opens logs for the selected process.
114
119
  - Arrow keys move process selection.
115
120
  - `Esc` clears row selection.
116
121
 
117
- 26. Add React smoke tests. **Completed**
122
+ 27. Add React smoke tests. **Completed**
118
123
  - `npm run react:smoke` checks core React migration contracts, routing hooks, confirmation usage, density styles, theme-aware charts, and absence of `window.confirm`.
119
124
 
120
125
  ## Remaining Product Upgrades
121
126
 
122
- 27. Continue refining persisted UI preferences.
127
+ 28. Continue refining persisted UI preferences.
123
128
  - Process search, status filter, table density, log line count, log wrap, and log auto-refresh preferences are now saved in `localStorage`.
124
129
  - Future refinement can add import/export for operator preference profiles.
125
130
 
126
- 28. Continue refining the filtered result counter.
131
+ 29. Continue refining the filtered result counter.
127
132
  - The process toolbar now shows total process count and filtered counts such as `Showing 2 of 8 processes`.
128
133
  - Future refinement can include grouped counts once process grouping exists.
129
134
 
130
- 29. Continue refining pause/resume refresh controls.
135
+ 30. Continue refining pause/resume refresh controls.
131
136
  - The dashboard now has a Pause Live/Resume Live control that stops live stream/polling updates while keeping manual refresh available.
132
137
  - Future refinement can add more detailed connection/backoff visibility.
133
138
 
134
- 30. Add process grouping and tags.
139
+ 31. Add process grouping and tags.
135
140
  - Group by status, namespace, folder, or custom labels.
136
141
  - Useful when managing many PM2 apps.
137
142
 
138
- 31. Add README screenshots.
143
+ 32. Add README screenshots.
139
144
  - Capture the main dashboard, logs modal, settings modal, process details modal, and create-app modal.
140
145
 
141
- 32. Improve modal layouts.
146
+ 33. Improve modal layouts.
142
147
  - Make process details feel more like an inspector.
143
148
  - Give the logs modal a cleaner terminal-like surface.
144
149
  - Split settings into clearer sections or tabs.
145
150
 
146
- 33. Improve feedback states.
151
+ 34. Improve feedback states.
147
152
  - Add skeleton loading rows.
148
153
  - Add clearer inline busy states for process actions.
149
154
  - Improve success and error toast styling.
150
155
 
151
156
  ## Quality and Maintainability
152
157
 
153
- 34. Add automated tests.
158
+ 35. Add automated tests.
154
159
  - Cover dashboard mapping, process action routes, create validation, log parsing, protected process enforcement, and PM2 metric calculations.
155
160
 
156
- 35. Split backend routes and frontend modules.
161
+ 36. Split backend routes and frontend modules.
157
162
  - Move PM2 action routes, log routes, and dashboard mapping into smaller modules.
158
163
  - Keep frontend state, rendering, actions, and modals easier to maintain during the React migration.
159
164
 
160
- 36. Add structured error messages.
165
+ 37. Add structured error messages.
161
166
  - Return user-facing API errors with stable error codes.
162
167
  - Show more specific UI toasts instead of generic failure messages.
163
168
 
164
- 37. Add accessibility refinements.
169
+ 38. Add accessibility refinements.
165
170
  - Improve keyboard focus management in modals.
166
171
  - Keep accessible names and visible tooltips for icon-only controls.
167
172
 
168
- 38. Add optional authentication for non-local use.
173
+ 39. Add optional authentication for non-local use.
169
174
  - Keep localhost-only as the default.
175
+ - The local API session token is not a substitute for authentication.
170
176
  - If LAN access is enabled, require authentication and document reverse proxy guidance.