specrails-hub 0.1.2 → 0.1.4

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/cli/dist/srm.js CHANGED
@@ -627,8 +627,8 @@ function isProcessRunning(pid) {
627
627
  }
628
628
  }
629
629
  function hubServerPath() {
630
- // cli/dist/srm.js → base is the package root
631
- const base = path_1.default.resolve(__dirname, '..');
630
+ // cli/dist/srm.js → __dirname is cli/dist/ → go up two levels to package root
631
+ const base = path_1.default.resolve(__dirname, '..', '..');
632
632
  // npm install: compiled server at dist/server/index.js
633
633
  const compiled = path_1.default.join(base, 'dist', 'server', 'index.js');
634
634
  // dev fallback: run TypeScript source directly via tsx
@@ -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/*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specrails-hub",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Local dashboard and CLI for managing multiple specrails projects from a single interface",
5
5
  "keywords": [
6
6
  "specrails",