specrails-hub 0.1.2 → 0.1.3
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/dist/server/index.js +4 -0
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -102,6 +102,10 @@ server.on('upgrade', (request, socket, head) => {
|
|
|
102
102
|
if (isHubMode) {
|
|
103
103
|
const registry = new project_registry_1.ProjectRegistry(broadcast);
|
|
104
104
|
registry.loadAll();
|
|
105
|
+
// Compatibility endpoint: CLI uses /api/state to detect if server is running
|
|
106
|
+
app.get('/api/state', (_req, res) => {
|
|
107
|
+
res.json({ mode: 'hub', version: PKG_VERSION });
|
|
108
|
+
});
|
|
105
109
|
// Hub-level routes
|
|
106
110
|
app.use('/api/hub', (0, hub_router_1.createHubRouter)(registry, broadcast));
|
|
107
111
|
// Per-project routes under /api/projects/:projectId/*
|