bgrun 3.11.0 → 3.12.1
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 -2
- package/dashboard/app/api/events/route.ts +10 -2
- package/dashboard/app/api/guard/route.ts +4 -1
- package/dashboard/app/api/guard-events/route.ts +5 -0
- package/dashboard/app/api/history/route.ts +39 -0
- package/dashboard/app/api/processes/route.ts +11 -3
- package/dashboard/app/api/restart/[name]/route.ts +7 -0
- package/dashboard/app/api/start/route.ts +5 -0
- package/dashboard/app/api/stop/[name]/route.ts +4 -1
- package/dashboard/app/api/templates/route.ts +47 -0
- package/dashboard/app/globals.css +545 -29
- package/dashboard/app/page.client.tsx +717 -61
- package/dashboard/app/page.tsx +130 -0
- package/dist/index.js +663 -184
- package/package.json +4 -3
- package/scripts/bgr-startup.ps1 +118 -0
- package/scripts/bgrun-startup.ps1 +91 -0
- package/src/bgrun.test.ts +109 -0
- package/src/commands/details.ts +17 -3
- package/src/commands/list.ts +37 -4
- package/src/commands/run.ts +21 -3
- package/src/db.ts +115 -0
- package/src/guard.ts +51 -0
- package/src/index.ts +83 -14
- package/src/index_copy.ts +614 -0
- package/src/logger.ts +12 -2
- package/src/platform.ts +87 -50
- package/src/server.ts +87 -3
- package/src/table.ts +3 -3
- package/src/utils.ts +2 -2
package/dashboard/app/page.tsx
CHANGED
|
@@ -39,6 +39,15 @@ export default function DashboardPage() {
|
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
|
+
{/* Guard Activity Feed */}
|
|
43
|
+
<div className="guard-activity" id="guard-activity">
|
|
44
|
+
<div className="guard-activity-header">
|
|
45
|
+
<span className="guard-activity-title">🛡️ Guard Activity</span>
|
|
46
|
+
<span className="guard-activity-empty" id="guard-activity-empty">No recent activity</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="guard-activity-list" id="guard-activity-list"></div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
42
51
|
{/* Toolbar */}
|
|
43
52
|
<div className="toolbar">
|
|
44
53
|
<div className="toolbar-left">
|
|
@@ -53,8 +62,12 @@ export default function DashboardPage() {
|
|
|
53
62
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
54
63
|
</svg>
|
|
55
64
|
<input type="text" className="search-input" id="search-input" placeholder="Filter processes..." />
|
|
65
|
+
<span className="search-count" id="search-count" style={{ display: 'none' }}></span>
|
|
56
66
|
<span className="search-shortcut">/</span>
|
|
57
67
|
</div>
|
|
68
|
+
<select className="group-filter" id="group-filter">
|
|
69
|
+
<option value="">All Groups</option>
|
|
70
|
+
</select>
|
|
58
71
|
</div>
|
|
59
72
|
<div className="toolbar-right">
|
|
60
73
|
<button className="btn btn-ghost btn-icon" id="refresh-btn" title="Refresh">
|
|
@@ -73,6 +86,23 @@ export default function DashboardPage() {
|
|
|
73
86
|
<span className="guard-sentinel-dot" id="guard-sentinel-dot" />
|
|
74
87
|
<span id="guard-sentinel-label">Guard: –</span>
|
|
75
88
|
</span>
|
|
89
|
+
<button className="btn btn-ghost btn-icon" id="shortcuts-btn" title="Keyboard Shortcuts (?)">
|
|
90
|
+
<span style={{ fontSize: '0.85rem', fontWeight: '700' }}>?</span>
|
|
91
|
+
</button>
|
|
92
|
+
<button className="btn btn-secondary" id="templates-btn">
|
|
93
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
94
|
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
95
|
+
<polyline points="14 2 14 8 20 8" />
|
|
96
|
+
</svg>
|
|
97
|
+
Templates
|
|
98
|
+
</button>
|
|
99
|
+
<button className="btn btn-ghost" id="history-btn">
|
|
100
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
101
|
+
<circle cx="12" cy="12" r="10" />
|
|
102
|
+
<polyline points="12 6 12 12 16 14" />
|
|
103
|
+
</svg>
|
|
104
|
+
History
|
|
105
|
+
</button>
|
|
76
106
|
<button className="btn btn-primary" id="new-process-btn">
|
|
77
107
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
78
108
|
<line x1="12" y1="5" x2="12" y2="19" />
|
|
@@ -221,6 +251,106 @@ export default function DashboardPage() {
|
|
|
221
251
|
</div>
|
|
222
252
|
</div>
|
|
223
253
|
</div>
|
|
254
|
+
|
|
255
|
+
{/* History Modal */}
|
|
256
|
+
<div className="modal-overlay" id="history-modal">
|
|
257
|
+
<div className="modal modal-wide">
|
|
258
|
+
<div className="modal-header">
|
|
259
|
+
<h3>📜 Process History</h3>
|
|
260
|
+
<button className="modal-close" id="history-modal-close">✕</button>
|
|
261
|
+
</div>
|
|
262
|
+
<div className="modal-body">
|
|
263
|
+
<div className="history-filters">
|
|
264
|
+
<select id="history-process-filter" className="history-select">
|
|
265
|
+
<option value="">All Processes</option>
|
|
266
|
+
</select>
|
|
267
|
+
<select id="history-event-filter" className="history-select">
|
|
268
|
+
<option value="">All Events</option>
|
|
269
|
+
<option value="start">Start</option>
|
|
270
|
+
<option value="stop">Stop</option>
|
|
271
|
+
<option value="restart">Restart</option>
|
|
272
|
+
<option value="guard_on">Guard On</option>
|
|
273
|
+
<option value="guard_off">Guard Off</option>
|
|
274
|
+
</select>
|
|
275
|
+
</div>
|
|
276
|
+
<div className="history-list" id="history-list">
|
|
277
|
+
<div className="history-empty">No history yet</div>
|
|
278
|
+
</div>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
{/* Templates Modal */}
|
|
284
|
+
<div className="modal-overlay" id="templates-modal">
|
|
285
|
+
<div className="modal modal-wide">
|
|
286
|
+
<div className="modal-header">
|
|
287
|
+
<h3>📋 Process Templates</h3>
|
|
288
|
+
<button className="modal-close" id="templates-modal-close">✕</button>
|
|
289
|
+
</div>
|
|
290
|
+
<div className="modal-body">
|
|
291
|
+
<div className="templates-form">
|
|
292
|
+
<div className="form-row">
|
|
293
|
+
<div className="form-group">
|
|
294
|
+
<label htmlFor="template-name">Template Name</label>
|
|
295
|
+
<input type="text" id="template-name" placeholder="my-template" />
|
|
296
|
+
</div>
|
|
297
|
+
<div className="form-group">
|
|
298
|
+
<label htmlFor="template-command">Command</label>
|
|
299
|
+
<input type="text" id="template-command" placeholder="bun run dev" />
|
|
300
|
+
</div>
|
|
301
|
+
</div>
|
|
302
|
+
<div className="form-row">
|
|
303
|
+
<div className="form-group">
|
|
304
|
+
<label htmlFor="template-directory">Working Directory</label>
|
|
305
|
+
<input type="text" id="template-directory" placeholder="/path/to/project" />
|
|
306
|
+
</div>
|
|
307
|
+
<div className="form-group">
|
|
308
|
+
<label htmlFor="template-group">Group</label>
|
|
309
|
+
<input type="text" id="template-group" placeholder="my-group" />
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
<div className="form-group">
|
|
313
|
+
<label htmlFor="template-env">Environment (KEY=VAL,KEY2=VAL2)</label>
|
|
314
|
+
<input type="text" id="template-env" placeholder="BGR_KEEP_ALIVE=true,PORT=3000" />
|
|
315
|
+
</div>
|
|
316
|
+
<div className="templates-actions">
|
|
317
|
+
<button className="btn btn-primary" id="template-save-btn">Save Template</button>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
<div className="templates-list" id="templates-list">
|
|
321
|
+
<div className="templates-empty">No templates saved yet</div>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
{/* Keyboard Shortcuts Overlay */}
|
|
328
|
+
<div className="shortcuts-overlay" id="shortcuts-overlay">
|
|
329
|
+
<div className="shortcuts-panel">
|
|
330
|
+
<div className="shortcuts-header">
|
|
331
|
+
<h3>⌨️ Keyboard Shortcuts</h3>
|
|
332
|
+
<button className="shortcuts-close" id="shortcuts-close-btn">✕</button>
|
|
333
|
+
</div>
|
|
334
|
+
<div className="shortcuts-grid">
|
|
335
|
+
<div className="shortcut-section">
|
|
336
|
+
<h4>Navigation</h4>
|
|
337
|
+
<div className="shortcut-row"><kbd>↑</kbd><kbd>↓</kbd><span>Navigate processes</span></div>
|
|
338
|
+
<div className="shortcut-row"><kbd>Enter</kbd><span>Open process drawer</span></div>
|
|
339
|
+
<div className="shortcut-row"><kbd>/</kbd><span>Focus search</span></div>
|
|
340
|
+
<div className="shortcut-row"><kbd>Esc</kbd><span>Close panel / blur</span></div>
|
|
341
|
+
</div>
|
|
342
|
+
<div className="shortcut-section">
|
|
343
|
+
<h4>Actions</h4>
|
|
344
|
+
<div className="shortcut-row"><kbd>R</kbd><span>Restart process</span></div>
|
|
345
|
+
<div className="shortcut-row"><kbd>S</kbd><span>Stop process</span></div>
|
|
346
|
+
<div className="shortcut-row"><kbd>G</kbd><span>Toggle guard</span></div>
|
|
347
|
+
<div className="shortcut-row"><kbd>D</kbd><span>Delete process</span></div>
|
|
348
|
+
<div className="shortcut-row"><kbd>N</kbd><span>New process</span></div>
|
|
349
|
+
<div className="shortcut-row"><kbd>?</kbd><span>This help</span></div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
</div>
|
|
224
354
|
</div>
|
|
225
355
|
);
|
|
226
356
|
}
|