@openparachute/hub 0.6.1 → 0.6.3-rc.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/src/hub-server.ts CHANGED
@@ -50,6 +50,8 @@
50
50
  * /api/modules (GET) → curated + installed module catalog (host:auth)
51
51
  * /api/modules/channel (PUT) → operator channel toggle (host:admin)
52
52
  * /api/modules/:short/install (POST) → bun add + spawn (async op)
53
+ * /api/modules/:short/start (POST) → supervisor.start of an installed module (sync)
54
+ * /api/modules/:short/stop (POST) → supervisor.stop (sync)
53
55
  * /api/modules/:short/restart (POST) → supervisor restart (sync)
54
56
  * /api/modules/:short/upgrade (POST) → bun add @<channel> + restart (async op)
55
57
  * /api/modules/:short/uninstall (POST) → stop child + bun remove + drop row (sync)
@@ -141,8 +143,11 @@ import { handleApiModulesConfig, parseModulesConfigPath } from "./api-modules-co
141
143
  import {
142
144
  getDefaultOperationsRegistry,
143
145
  handleInstall,
146
+ handleLogs,
144
147
  handleOperationGet,
145
148
  handleRestart,
149
+ handleStart,
150
+ handleStop,
146
151
  handleUninstall,
147
152
  handleUpgrade,
148
153
  parseModulesPath,
@@ -1865,8 +1870,14 @@ export function hubFetch(
1865
1870
  switch (match.rest) {
1866
1871
  case "install":
1867
1872
  return handleInstall(req, match.short, opsDeps);
1873
+ case "start":
1874
+ return handleStart(req, match.short, opsDeps);
1875
+ case "stop":
1876
+ return handleStop(req, match.short, opsDeps);
1868
1877
  case "restart":
1869
1878
  return handleRestart(req, match.short, opsDeps);
1879
+ case "logs":
1880
+ return handleLogs(req, match.short, opsDeps);
1870
1881
  case "upgrade":
1871
1882
  return handleUpgrade(req, match.short, opsDeps);
1872
1883
  case "uninstall":