@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/package.json +1 -1
- package/src/__tests__/account-home-ui.test.ts +34 -0
- package/src/__tests__/api-modules-ops.test.ts +359 -3
- package/src/__tests__/api-modules.test.ts +54 -0
- package/src/__tests__/cloudflare-connector-service.test.ts +441 -0
- package/src/__tests__/expose-cloudflare.test.ts +272 -0
- package/src/__tests__/hub-unit.test.ts +574 -0
- package/src/__tests__/init.test.ts +219 -2
- package/src/__tests__/lifecycle.test.ts +423 -0
- package/src/__tests__/managed-unit.test.ts +575 -0
- package/src/__tests__/module-ops-client.test.ts +556 -0
- package/src/__tests__/port-probe.test.ts +23 -0
- package/src/__tests__/setup-wizard.test.ts +130 -0
- package/src/__tests__/status-supervisor.test.ts +569 -0
- package/src/__tests__/supervisor.test.ts +471 -6
- package/src/account-home-ui.ts +4 -1
- package/src/api-modules-ops.ts +221 -0
- package/src/api-modules.ts +18 -2
- package/src/cli.ts +14 -4
- package/src/cloudflare/connector-service.ts +273 -0
- package/src/cloudflare/state.ts +13 -1
- package/src/commands/expose-cloudflare.ts +143 -10
- package/src/commands/init.ts +225 -12
- package/src/commands/lifecycle.ts +366 -38
- package/src/commands/serve-boot.ts +71 -25
- package/src/commands/status.ts +596 -49
- package/src/hub-server.ts +11 -0
- package/src/hub-unit.ts +735 -0
- package/src/managed-unit.ts +674 -0
- package/src/module-ops-client.ts +457 -0
- package/src/port-probe.ts +50 -0
- package/src/setup-wizard.ts +80 -1
- package/src/supervisor.ts +360 -14
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":
|