home-hosted 0.13.0 → 0.20.0
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 +117 -322
- package/bin/home-hosted.mjs +41 -0
- package/dist/chunks/account-DiLrSyww.js +359 -0
- package/dist/chunks/account-DiLrSyww.js.map +1 -0
- package/dist/chunks/add-DEIYVkNK.js +183 -0
- package/dist/chunks/add-DEIYVkNK.js.map +1 -0
- package/dist/chunks/{archive-DP-XQR8X.js → archive-DFi3qK1c.js} +25 -73
- package/dist/chunks/archive-DFi3qK1c.js.map +1 -0
- package/dist/chunks/{atomic-C1PfJpE7.js → atomic-SZUwDtGD.js} +3 -6
- package/dist/chunks/atomic-SZUwDtGD.js.map +1 -0
- package/dist/chunks/{backup-CZcVca2a.js → backup-DnyxIzw0.js} +110 -190
- package/dist/chunks/backup-DnyxIzw0.js.map +1 -0
- package/dist/chunks/backups-BrrN6cwW.js +2203 -0
- package/dist/chunks/backups-BrrN6cwW.js.map +1 -0
- package/dist/chunks/bind-DIxrnUst.js +43 -0
- package/dist/chunks/bind-DIxrnUst.js.map +1 -0
- package/dist/chunks/config-text-DxMOQQnk.js +34 -0
- package/dist/chunks/config-text-DxMOQQnk.js.map +1 -0
- package/dist/chunks/{contracts-CMBD1TF9.js → contracts-CxZ7u1L3.js} +1239 -1454
- package/dist/chunks/contracts-CxZ7u1L3.js.map +1 -0
- package/dist/chunks/daemon-BAAYUYQC.js +211 -0
- package/dist/chunks/daemon-BAAYUYQC.js.map +1 -0
- package/dist/chunks/daemon-log-Ccu-69vB.js +179 -0
- package/dist/chunks/daemon-log-Ccu-69vB.js.map +1 -0
- package/dist/chunks/deploy-CggSOEkq.js +144 -0
- package/dist/chunks/deploy-CggSOEkq.js.map +1 -0
- package/dist/chunks/{docker-Cy9Lyvda.js → docker--Un0uLfF.js} +32 -68
- package/dist/chunks/docker--Un0uLfF.js.map +1 -0
- package/dist/chunks/{down-pKbGCW9d.js → down-CpIN7LEQ.js} +34 -94
- package/dist/chunks/down-CpIN7LEQ.js.map +1 -0
- package/dist/chunks/exposure-CDJNvOCK.js +229 -0
- package/dist/chunks/exposure-CDJNvOCK.js.map +1 -0
- package/dist/chunks/import-Bd4VZH0f.js +205 -0
- package/dist/chunks/import-Bd4VZH0f.js.map +1 -0
- package/dist/chunks/import-plan--fDS_l5r.js +147 -0
- package/dist/chunks/import-plan--fDS_l5r.js.map +1 -0
- package/dist/chunks/import-write-BTfbeV26.js +42 -0
- package/dist/chunks/import-write-BTfbeV26.js.map +1 -0
- package/dist/chunks/{init-BZ7hK9Vf.js → init-Bv3oH65x.js} +14 -50
- package/dist/chunks/init-Bv3oH65x.js.map +1 -0
- package/dist/chunks/job-CYOdN6Ub.js +341 -0
- package/dist/chunks/job-CYOdN6Ub.js.map +1 -0
- package/dist/chunks/jobs-BX4ahcfh.js +489 -0
- package/dist/chunks/jobs-BX4ahcfh.js.map +1 -0
- package/dist/chunks/last-stop-DD3lHwo_.js +42 -0
- package/dist/chunks/last-stop-DD3lHwo_.js.map +1 -0
- package/dist/chunks/layout-D0ysDNav.js +18 -0
- package/dist/chunks/layout-D0ysDNav.js.map +1 -0
- package/dist/chunks/lazy-kfcBNeqj.js +48 -0
- package/dist/chunks/lazy-kfcBNeqj.js.map +1 -0
- package/dist/chunks/log-buffer-B7jmn7ts.js +110 -0
- package/dist/chunks/log-buffer-B7jmn7ts.js.map +1 -0
- package/dist/chunks/log-files-CZL2UhuE.js +488 -0
- package/dist/chunks/log-files-CZL2UhuE.js.map +1 -0
- package/dist/chunks/{logger-B5U4GD3j.js → logger-BnrKTBHQ.js} +2 -6
- package/dist/chunks/logger-BnrKTBHQ.js.map +1 -0
- package/dist/chunks/{logs---TI_bxM.js → logs-DxKI6OW2.js} +23 -73
- package/dist/chunks/logs-DxKI6OW2.js.map +1 -0
- package/dist/chunks/ls-BseUHy_m.js +128 -0
- package/dist/chunks/ls-BseUHy_m.js.map +1 -0
- package/dist/chunks/migrate-D4w_dXDm.js +268 -0
- package/dist/chunks/migrate-D4w_dXDm.js.map +1 -0
- package/dist/chunks/{nanny-B-Eu0sFW.js → nanny-BWh7nuvv.js} +21 -14
- package/dist/chunks/nanny-BWh7nuvv.js.map +1 -0
- package/dist/chunks/{nanny-ChMtq1Zl.js → nanny-BjF2-1pv.js} +3 -3
- package/dist/chunks/{nanny-ChMtq1Zl.js.map → nanny-BjF2-1pv.js.map} +1 -1
- package/dist/chunks/nanny-DGTXVq5d.js +806 -0
- package/dist/chunks/nanny-DGTXVq5d.js.map +1 -0
- package/dist/chunks/{nanny-sweep-DErnlPY1.js → nanny-sweep-hjmZ_p7S.js} +14 -24
- package/dist/chunks/nanny-sweep-hjmZ_p7S.js.map +1 -0
- package/dist/chunks/{nearest-6KgQEDUe.js → nearest-DOx4jySJ.js} +2 -10
- package/dist/chunks/nearest-DOx4jySJ.js.map +1 -0
- package/dist/chunks/{parse-DhmG26fI.js → parse-DVMPLUDe.js} +47 -72
- package/dist/chunks/parse-DVMPLUDe.js.map +1 -0
- package/dist/chunks/password-policy-Clq6PGE-.js +9 -0
- package/dist/chunks/password-policy-Clq6PGE-.js.map +1 -0
- package/dist/chunks/{paths-CGlGDrOU.js → paths-C34-TJLh.js} +32 -56
- package/dist/chunks/paths-C34-TJLh.js.map +1 -0
- package/dist/chunks/{port-B8WBTRMk.js → port-CnsrxKNR.js} +27 -71
- package/dist/chunks/port-CnsrxKNR.js.map +1 -0
- package/dist/chunks/process-CboOFPU_.js +192 -0
- package/dist/chunks/process-CboOFPU_.js.map +1 -0
- package/dist/chunks/{restart-Des4DrAN.js → restart-C0J8dZ2L.js} +11 -29
- package/dist/chunks/restart-C0J8dZ2L.js.map +1 -0
- package/dist/chunks/run-deploy-DoNDvwT4.js +91 -0
- package/dist/chunks/run-deploy-DoNDvwT4.js.map +1 -0
- package/dist/chunks/{schema-B240VXcV.js → schema-CZ6f-PHD.js} +7 -20
- package/dist/chunks/schema-CZ6f-PHD.js.map +1 -0
- package/dist/chunks/secret-MY397r90.js +219 -0
- package/dist/chunks/secret-MY397r90.js.map +1 -0
- package/dist/chunks/secrets-CG5N4lwY.js +1061 -0
- package/dist/chunks/secrets-CG5N4lwY.js.map +1 -0
- package/dist/chunks/server-Dm_dXfTW.js +255 -0
- package/dist/chunks/server-Dm_dXfTW.js.map +1 -0
- package/dist/chunks/server-attention-UQwYXqKe.js +10 -0
- package/dist/chunks/server-attention-UQwYXqKe.js.map +1 -0
- package/dist/chunks/server-create-D7nvhgBd.js +96 -0
- package/dist/chunks/server-create-D7nvhgBd.js.map +1 -0
- package/dist/chunks/server-ids-BEQD2rFz.js +23 -0
- package/dist/chunks/server-ids-BEQD2rFz.js.map +1 -0
- package/dist/chunks/server-vars-DMYmHutL.js +27 -0
- package/dist/chunks/server-vars-DMYmHutL.js.map +1 -0
- package/dist/chunks/service-C8l-ewNA.js +585 -0
- package/dist/chunks/service-C8l-ewNA.js.map +1 -0
- package/dist/chunks/{settings-xu-XTfWg.js → settings-CtYDs5PX.js} +62 -78
- package/dist/chunks/settings-CtYDs5PX.js.map +1 -0
- package/dist/chunks/{setup-temp-CAN4_bA-.js → setup-temp-TAtDmMMU.js} +43 -37
- package/dist/chunks/setup-temp-TAtDmMMU.js.map +1 -0
- package/dist/chunks/shape-CDGeYl_J.js +9 -0
- package/dist/chunks/shape-CDGeYl_J.js.map +1 -0
- package/dist/chunks/{src-BtWMFmzZ.js → src-BnzkVy_M.js} +12548 -10576
- package/dist/chunks/src-BnzkVy_M.js.map +1 -0
- package/dist/chunks/{status-DT1EsA-B.js → status-efbbfYZQ.js} +53 -26
- package/dist/chunks/status-efbbfYZQ.js.map +1 -0
- package/dist/chunks/store-Bs_Lljjm.js +2082 -0
- package/dist/chunks/store-Bs_Lljjm.js.map +1 -0
- package/dist/chunks/template-xan58bJh.js +28 -0
- package/dist/chunks/template-xan58bJh.js.map +1 -0
- package/dist/chunks/token-DDeWfZA4.js +142 -0
- package/dist/chunks/token-DDeWfZA4.js.map +1 -0
- package/dist/chunks/{ui-D562aqw5.js → ui-BcIAtyxE.js} +68 -79
- package/dist/chunks/ui-BcIAtyxE.js.map +1 -0
- package/dist/chunks/{ui-dir-CsU3uLNV.js → ui-dir-ClCzVRc3.js} +3 -7
- package/dist/chunks/ui-dir-ClCzVRc3.js.map +1 -0
- package/dist/chunks/ui-format-CDvvqOoi.js +53 -0
- package/dist/chunks/ui-format-CDvvqOoi.js.map +1 -0
- package/dist/chunks/{ui-release-DKzVvlLd.js → ui-release-XbJ85pYI.js} +36 -38
- package/dist/chunks/ui-release-XbJ85pYI.js.map +1 -0
- package/dist/chunks/{ui-revert-EkBBwRTt.js → ui-revert-Dgawq7ze.js} +4 -4
- package/dist/chunks/ui-revert-Dgawq7ze.js.map +1 -0
- package/dist/chunks/{ui-switch-BnZTdMDd.js → ui-switch-CfQMbZ0g.js} +31 -38
- package/dist/chunks/ui-switch-CfQMbZ0g.js.map +1 -0
- package/dist/chunks/{ui-update-_xryLYxw.js → ui-update-B3PPivUm.js} +30 -48
- package/dist/chunks/ui-update-B3PPivUm.js.map +1 -0
- package/dist/chunks/ui-update-CAiH2tFb.js +109 -0
- package/dist/chunks/ui-update-CAiH2tFb.js.map +1 -0
- package/dist/chunks/{up-Pdz-l6IH.js → up-BQSnYxYd.js} +47 -53
- package/dist/chunks/up-BQSnYxYd.js.map +1 -0
- package/dist/chunks/{usage-DFrCVXpT.js → usage-KG8TeOio.js} +7 -20
- package/dist/chunks/usage-KG8TeOio.js.map +1 -0
- package/dist/chunks/{workspaces-DYcfvKV_.js → workspaces-D9akpzU8.js} +80 -68
- package/dist/chunks/workspaces-D9akpzU8.js.map +1 -0
- package/dist/chunks/{wsl-temperature-BiCI4iK6.js → wsl-temperature-D-_d4Yk1.js} +47 -42
- package/dist/chunks/wsl-temperature-D-_d4Yk1.js.map +1 -0
- package/dist/cli.js +306 -238
- package/dist/cli.js.map +1 -1
- package/dist/client.js +76 -29
- package/dist/client.js.map +1 -1
- package/dist/types/api/acme.d.ts +3 -7
- package/dist/types/api/auth/$.routes.d.ts +107 -16
- package/dist/types/api/backups.d.ts +5 -5
- package/dist/types/api/control.d.ts +747 -38
- package/dist/types/api/ddns.d.ts +13 -18
- package/dist/types/api/events.d.ts +9 -3
- package/dist/types/api/health.d.ts +2 -4
- package/dist/types/api/jobs.d.ts +438 -0
- package/dist/types/api/logs.d.ts +20 -0
- package/dist/types/api/metrics.d.ts +2 -5
- package/dist/types/api/notifications.d.ts +3 -6
- package/dist/types/api/proxy.d.ts +63 -23
- package/dist/types/api/server-ops.d.ts +17 -0
- package/dist/types/api/servers/$.routes.d.ts +418 -186
- package/dist/types/api/session-required.d.ts +16 -0
- package/dist/types/api/settings.d.ts +7 -7
- package/dist/types/api/state.d.ts +100 -10
- package/dist/types/api/static.d.ts +2 -2
- package/dist/types/api/tls.d.ts +2 -5
- package/dist/types/api/workspaces/$.routes.d.ts +186 -12
- package/dist/types/api/wsl-temperature.d.ts +4 -10
- package/dist/types/app.d.ts +4511 -2778
- package/dist/types/cli/account.d.ts +23 -0
- package/dist/types/cli/add.d.ts +96 -0
- package/dist/types/cli/args.d.ts +24 -35
- package/dist/types/cli/backup-offline.d.ts +2 -8
- package/dist/types/cli/backup.d.ts +12 -21
- package/dist/types/cli/down.d.ts +15 -41
- package/dist/types/cli/import-plan.d.ts +55 -0
- package/dist/types/cli/import-write.d.ts +5 -0
- package/dist/types/cli/import.d.ts +86 -0
- package/dist/types/cli/io.d.ts +26 -35
- package/dist/types/cli/job.d.ts +99 -0
- package/dist/types/cli/logs.d.ts +1 -10
- package/dist/types/cli/ls.d.ts +57 -0
- package/dist/types/cli/migrate.d.ts +31 -8
- package/dist/types/cli/nearest.d.ts +1 -9
- package/dist/types/cli/run-deploy.d.ts +36 -0
- package/dist/types/cli/secret.d.ts +90 -0
- package/dist/types/cli/server.d.ts +6 -15
- package/dist/types/cli/service.d.ts +135 -0
- package/dist/types/cli/setup-temp.d.ts +17 -13
- package/dist/types/cli/status.d.ts +7 -1
- package/dist/types/cli/token.d.ts +6 -0
- package/dist/types/cli/ui-switch.d.ts +3 -14
- package/dist/types/cli/ui-update.d.ts +3 -16
- package/dist/types/cli/up.d.ts +9 -22
- package/dist/types/cli/usage.d.ts +2 -6
- package/dist/types/cli.d.ts +1 -10
- package/dist/types/client.d.ts +4099 -1142
- package/dist/types/config/accounts.d.ts +16 -0
- package/dist/types/config/jobs.d.ts +68 -0
- package/dist/types/config/layout.d.ts +2 -8
- package/dist/types/config/migrations.d.ts +9 -41
- package/dist/types/config/parse.d.ts +8 -13
- package/dist/types/config/patch.d.ts +1 -6
- package/dist/types/config/schema.d.ts +16 -18
- package/dist/types/config/secret-parts.d.ts +6 -27
- package/dist/types/config/secrets.d.ts +167 -88
- package/dist/types/config/seed.d.ts +1 -6
- package/dist/types/config/server-ids.d.ts +2 -11
- package/dist/types/config/settings.d.ts +13 -49
- package/dist/types/config/store.d.ts +17 -54
- package/dist/types/config/workspaces.d.ts +24 -56
- package/dist/types/helpers/action-result.d.ts +18 -32
- package/dist/types/helpers/atomic.d.ts +1 -4
- package/dist/types/helpers/backoff.d.ts +0 -1
- package/dist/types/helpers/bind.d.ts +3 -11
- package/dist/types/helpers/config-text.d.ts +4 -19
- package/dist/types/helpers/cookies.d.ts +2 -7
- package/dist/types/helpers/copy-tree.d.ts +4 -12
- package/dist/types/helpers/daemon-log.d.ts +8 -33
- package/dist/types/helpers/daemon.d.ts +20 -70
- package/dist/types/helpers/deferred.d.ts +2 -4
- package/dist/types/helpers/env-file.d.ts +2 -7
- package/dist/types/helpers/error.d.ts +3 -14
- package/dist/types/helpers/event-stream.d.ts +18 -10
- package/dist/types/helpers/factory.d.ts +2 -3
- package/dist/types/helpers/last-stop.d.ts +5 -12
- package/dist/types/helpers/logger.d.ts +1 -5
- package/dist/types/helpers/open.d.ts +0 -1
- package/dist/types/helpers/openapi.d.ts +19 -5
- package/dist/types/helpers/paths.d.ts +18 -53
- package/dist/types/helpers/restore-lock.d.ts +2 -17
- package/dist/types/helpers/runtime.d.ts +3 -13
- package/dist/types/helpers/secret-compare.d.ts +2 -10
- package/dist/types/helpers/server-create.d.ts +15 -0
- package/dist/types/helpers/shell.d.ts +2 -16
- package/dist/types/helpers/sse.d.ts +8 -6
- package/dist/types/helpers/ui-dir.d.ts +1 -5
- package/dist/types/helpers/utf8-chunks.d.ts +2 -8
- package/dist/types/helpers/validate.d.ts +2 -4
- package/dist/types/helpers/validator.d.ts +8 -4
- package/dist/types/helpers/version.d.ts +1 -6
- package/dist/types/helpers/workspace.d.ts +24 -16
- package/dist/types/index.d.ts +2 -3
- package/dist/types/middleware/auth.d.ts +8 -27
- package/dist/types/middleware/body-limit.d.ts +10 -0
- package/dist/types/middleware/host.d.ts +4 -23
- package/dist/types/middleware/loopback.d.ts +1 -8
- package/dist/types/middleware/token-scope.d.ts +34 -0
- package/dist/types/node-compat.d.ts +43 -0
- package/dist/types/openapi-reference.d.ts +4 -19
- package/dist/types/openapi.d.ts +5 -8
- package/dist/types/providers/archive.d.ts +8 -25
- package/dist/types/providers/backup-hook.d.ts +4 -19
- package/dist/types/providers/ddns/dyndns2.d.ts +0 -3
- package/dist/types/providers/ddns/index.d.ts +2 -3
- package/dist/types/providers/ddns/ip.d.ts +2 -12
- package/dist/types/providers/ddns/namecheap-api.d.ts +3 -2
- package/dist/types/providers/ddns/types.d.ts +6 -32
- package/dist/types/providers/ddns/zone.d.ts +1 -4
- package/dist/types/providers/docker.d.ts +18 -45
- package/dist/types/providers/entry-state.d.ts +4 -9
- package/dist/types/providers/health-check.d.ts +1 -5
- package/dist/types/providers/host.d.ts +33 -108
- package/dist/types/providers/identity.d.ts +9 -34
- package/dist/types/providers/log-tail.d.ts +14 -24
- package/dist/types/providers/nanny-sweep.d.ts +8 -25
- package/dist/types/providers/nanny.d.ts +16 -58
- package/dist/types/providers/port.d.ts +28 -83
- package/dist/types/providers/proc.d.ts +22 -80
- package/dist/types/providers/process.d.ts +12 -36
- package/dist/types/providers/proxy/admin.d.ts +11 -0
- package/dist/types/providers/proxy/types.d.ts +4 -16
- package/dist/types/providers/telegram.d.ts +1 -17
- package/dist/types/providers/ui-release.d.ts +15 -25
- package/dist/types/providers/webhook.d.ts +8 -29
- package/dist/types/providers/wsl-temperature.d.ts +13 -22
- package/dist/types/services/acme-challenge.d.ts +2 -16
- package/dist/types/services/auth.d.ts +65 -80
- package/dist/types/services/backups/archive-safety.d.ts +30 -0
- package/dist/types/services/backups/paths.d.ts +31 -0
- package/dist/types/services/backups.d.ts +61 -271
- package/dist/types/services/config-watch.d.ts +3 -15
- package/dist/types/services/control-server.d.ts +6 -10
- package/dist/types/services/ddns.d.ts +12 -13
- package/dist/types/services/dependencies.d.ts +3 -14
- package/dist/types/services/deploy.d.ts +34 -0
- package/dist/types/services/events.d.ts +15 -9
- package/dist/types/services/exposure.d.ts +13 -63
- package/dist/types/services/history.d.ts +5 -14
- package/dist/types/services/host-monitor.d.ts +6 -11
- package/dist/types/services/init.d.ts +5 -35
- package/dist/types/services/job-ledger.d.ts +27 -0
- package/dist/types/services/jobs.d.ts +113 -0
- package/dist/types/services/log-buffer.d.ts +7 -8
- package/dist/types/services/log-files.d.ts +12 -42
- package/dist/types/services/log-relay.d.ts +3 -13
- package/dist/types/services/nanny.d.ts +3 -10
- package/dist/types/services/notifications.d.ts +31 -61
- package/dist/types/services/panel.d.ts +32 -78
- package/dist/types/services/proxy-certificates/certificates.d.ts +31 -69
- package/dist/types/services/proxy-config.d.ts +15 -36
- package/dist/types/services/proxy-dns01.d.ts +14 -0
- package/dist/types/services/proxy.d.ts +73 -254
- package/dist/types/services/scheduler.d.ts +46 -0
- package/dist/types/services/state.d.ts +17 -8
- package/dist/types/services/supervisor/compose.d.ts +2 -6
- package/dist/types/services/supervisor/entry.d.ts +29 -32
- package/dist/types/services/supervisor/health.d.ts +8 -31
- package/dist/types/services/supervisor/job-run.d.ts +36 -0
- package/dist/types/services/supervisor/output.d.ts +13 -77
- package/dist/types/services/supervisor/persistent.d.ts +5 -11
- package/dist/types/services/supervisor/port-preflight.d.ts +4 -10
- package/dist/types/services/supervisor/records.d.ts +27 -60
- package/dist/types/services/supervisor/restart-required.d.ts +13 -0
- package/dist/types/services/supervisor/spawn.d.ts +3 -5
- package/dist/types/services/supervisor/view.d.ts +3 -1
- package/dist/types/services/supervisor.d.ts +31 -43
- package/dist/types/services/tls.d.ts +6 -17
- package/dist/types/services/ui-update.d.ts +19 -17
- package/dist/types/services/ui.d.ts +10 -19
- package/dist/types/shared/action-outcome.d.ts +2 -7
- package/dist/types/shared/api-client.d.ts +133 -177
- package/dist/types/shared/api-scopes.d.ts +17 -0
- package/dist/types/shared/backup-scope.d.ts +16 -90
- package/dist/types/shared/clone.d.ts +2 -11
- package/dist/types/shared/contracts/accounts.d.ts +99 -0
- package/dist/types/shared/contracts/backups.d.ts +219 -0
- package/dist/types/shared/contracts/ddns.d.ts +208 -0
- package/dist/types/shared/contracts/frames.d.ts +1395 -0
- package/dist/types/shared/contracts/index.d.ts +3 -0
- package/dist/types/shared/contracts/logs.d.ts +107 -0
- package/dist/types/shared/contracts/proxy.d.ts +303 -0
- package/dist/types/shared/contracts.d.ts +852 -1982
- package/dist/types/shared/cpu-scale.d.ts +3 -19
- package/dist/types/shared/crash-cause.d.ts +8 -0
- package/dist/types/shared/cron.d.ts +70 -0
- package/dist/types/shared/ddns-form.d.ts +9 -43
- package/dist/types/shared/endpoint.d.ts +1 -7
- package/dist/types/shared/error-codes.d.ts +438 -0
- package/dist/types/shared/error-message.d.ts +1 -7
- package/dist/types/shared/fields.d.ts +7 -17
- package/dist/types/shared/form-repair.d.ts +1 -5
- package/dist/types/shared/generated.d.ts +3 -19
- package/dist/types/shared/host-readings.d.ts +25 -128
- package/dist/types/shared/lazy.d.ts +1 -1
- package/dist/types/shared/live-frames.d.ts +2 -8
- package/dist/types/shared/live-series.d.ts +2 -8
- package/dist/types/shared/live-store.d.ts +4 -8
- package/dist/types/shared/log-download.d.ts +6 -0
- package/dist/types/shared/meta.d.ts +6 -0
- package/dist/types/shared/password-policy.d.ts +10 -0
- package/dist/types/shared/patch-diff.d.ts +13 -72
- package/dist/types/shared/port-reading.d.ts +18 -0
- package/dist/types/shared/probe-latency.d.ts +3 -21
- package/dist/types/shared/proxy-form.d.ts +33 -74
- package/dist/types/shared/proxy-validate.d.ts +11 -0
- package/dist/types/shared/query-params.d.ts +8 -0
- package/dist/types/shared/server-attention.d.ts +2 -27
- package/dist/types/shared/server-form.d.ts +15 -54
- package/dist/types/shared/server-key.d.ts +1 -12
- package/dist/types/shared/server-readings.d.ts +7 -32
- package/dist/types/shared/server-url.d.ts +9 -31
- package/dist/types/shared/shape.d.ts +1 -16
- package/dist/types/shared/stream-access.d.ts +2 -8
- package/dist/types/shared/ui-format.d.ts +25 -65
- package/docs/API.md +315 -107
- package/docs/BACKUPS.md +61 -56
- package/docs/CLI.md +255 -49
- package/docs/DDNS.md +35 -49
- package/docs/JOBS.md +129 -0
- package/docs/NOTIFICATIONS.md +58 -90
- package/docs/REVERSE_PROXY.md +116 -188
- package/docs/SECURITY.md +126 -44
- package/docs/SERVERS.md +282 -409
- package/docs/UI_CREATION.md +90 -47
- package/docs/demo/blank-host-restore.sh +31 -7
- package/package.json +15 -6
- package/scripts/prepare.mjs +47 -0
- package/uis/stock/dist/assets/CopyButton-8mliL0xi.js +1 -0
- package/uis/stock/dist/assets/GlobalSettingsView-BINXY77E.js +1 -0
- package/uis/stock/dist/assets/LogViewer-kiSnTwdY.js +1 -0
- package/uis/stock/dist/assets/LogsView-DDXf_ONs.js +1 -0
- package/uis/stock/dist/assets/Modal-lrUuViF2.js +39 -0
- package/uis/stock/dist/assets/ProxyView-uXMaJdSQ.js +1 -0
- package/uis/stock/dist/assets/ServerDetailView-CW0Vb_c0.js +4 -0
- package/uis/stock/dist/assets/SettingsShell-B135xWjJ.js +1 -0
- package/uis/stock/dist/assets/SettingsView-BLtWxVkl.js +2 -0
- package/uis/stock/dist/assets/de-BIoTrHBQ.js +1 -0
- package/uis/stock/dist/assets/es-x4-ih8lH.js +1 -0
- package/uis/stock/dist/assets/fr-DatqBBkO.js +1 -0
- package/uis/stock/dist/assets/index-CnojaKcA.css +2 -0
- package/uis/stock/dist/assets/index-D-CiZReu.js +16 -0
- package/uis/stock/dist/assets/ja-CW1703Gw.js +1 -0
- package/uis/stock/dist/assets/ko-wFbT4XtK.js +1 -0
- package/uis/stock/dist/assets/ru-C1p5C4VN.js +1 -0
- package/uis/stock/dist/assets/useUnsavedGuard-BcsXsfCC.js +9 -0
- package/uis/stock/dist/assets/vi-CDqr0uie.js +1 -0
- package/uis/stock/dist/assets/zh-CN-BJ7iit-X.js +1 -0
- package/uis/stock/dist/index.html +4 -3
- package/uis/stock/dist/ui.json +3 -3
- package/dist/chunks/archive-DP-XQR8X.js.map +0 -1
- package/dist/chunks/atomic-C1PfJpE7.js.map +0 -1
- package/dist/chunks/backup-CZcVca2a.js.map +0 -1
- package/dist/chunks/backups-CFRaWe_m.js +0 -4691
- package/dist/chunks/backups-CFRaWe_m.js.map +0 -1
- package/dist/chunks/config-text-DifCHhnz.js +0 -50
- package/dist/chunks/config-text-DifCHhnz.js.map +0 -1
- package/dist/chunks/contracts-CMBD1TF9.js.map +0 -1
- package/dist/chunks/daemon-log-BVj8cDEo.js +0 -241
- package/dist/chunks/daemon-log-BVj8cDEo.js.map +0 -1
- package/dist/chunks/daemon-qKVECISl.js +0 -247
- package/dist/chunks/daemon-qKVECISl.js.map +0 -1
- package/dist/chunks/docker-Cy9Lyvda.js.map +0 -1
- package/dist/chunks/down-pKbGCW9d.js.map +0 -1
- package/dist/chunks/init-BZ7hK9Vf.js.map +0 -1
- package/dist/chunks/last-stop-C-BXz_XI.js +0 -53
- package/dist/chunks/last-stop-C-BXz_XI.js.map +0 -1
- package/dist/chunks/layout-DwTtmund.js +0 -24
- package/dist/chunks/layout-DwTtmund.js.map +0 -1
- package/dist/chunks/lazy-Ce5zEAq1.js +0 -66
- package/dist/chunks/lazy-Ce5zEAq1.js.map +0 -1
- package/dist/chunks/log-buffer-Dy9HHDMD.js +0 -414
- package/dist/chunks/log-buffer-Dy9HHDMD.js.map +0 -1
- package/dist/chunks/logger-B5U4GD3j.js.map +0 -1
- package/dist/chunks/logs---TI_bxM.js.map +0 -1
- package/dist/chunks/migrate-Cfoq-Vgh.js +0 -155
- package/dist/chunks/migrate-Cfoq-Vgh.js.map +0 -1
- package/dist/chunks/nanny-B-Eu0sFW.js.map +0 -1
- package/dist/chunks/nanny-BtWfy0QH.js +0 -1167
- package/dist/chunks/nanny-BtWfy0QH.js.map +0 -1
- package/dist/chunks/nanny-sweep-DErnlPY1.js.map +0 -1
- package/dist/chunks/nearest-6KgQEDUe.js.map +0 -1
- package/dist/chunks/parse-DhmG26fI.js.map +0 -1
- package/dist/chunks/paths-CGlGDrOU.js.map +0 -1
- package/dist/chunks/port-B8WBTRMk.js.map +0 -1
- package/dist/chunks/restart-Des4DrAN.js.map +0 -1
- package/dist/chunks/schema-B240VXcV.js.map +0 -1
- package/dist/chunks/secrets-BieELnZh.js +0 -562
- package/dist/chunks/secrets-BieELnZh.js.map +0 -1
- package/dist/chunks/server-Bge2r2qQ.js +0 -169
- package/dist/chunks/server-Bge2r2qQ.js.map +0 -1
- package/dist/chunks/server-ids-DRuNLVCV.js +0 -32
- package/dist/chunks/server-ids-DRuNLVCV.js.map +0 -1
- package/dist/chunks/set-password-D5vZqqSX.js +0 -43
- package/dist/chunks/set-password-D5vZqqSX.js.map +0 -1
- package/dist/chunks/set-token-obPiEJYk.js +0 -78
- package/dist/chunks/set-token-obPiEJYk.js.map +0 -1
- package/dist/chunks/settings-xu-XTfWg.js.map +0 -1
- package/dist/chunks/setup-temp-CAN4_bA-.js.map +0 -1
- package/dist/chunks/shape-DnTKzjQ2.js +0 -24
- package/dist/chunks/shape-DnTKzjQ2.js.map +0 -1
- package/dist/chunks/src-BtWMFmzZ.js.map +0 -1
- package/dist/chunks/status-DT1EsA-B.js.map +0 -1
- package/dist/chunks/ui-D562aqw5.js.map +0 -1
- package/dist/chunks/ui-dir-CsU3uLNV.js.map +0 -1
- package/dist/chunks/ui-release-DKzVvlLd.js.map +0 -1
- package/dist/chunks/ui-revert-EkBBwRTt.js.map +0 -1
- package/dist/chunks/ui-switch-BnZTdMDd.js.map +0 -1
- package/dist/chunks/ui-update-_xryLYxw.js.map +0 -1
- package/dist/chunks/up-Pdz-l6IH.js.map +0 -1
- package/dist/chunks/usage-DFrCVXpT.js.map +0 -1
- package/dist/chunks/workspaces-DYcfvKV_.js.map +0 -1
- package/dist/chunks/wsl-temperature-BiCI4iK6.js.map +0 -1
- package/dist/types/cli/set-password.d.ts +0 -14
- package/dist/types/cli/set-token.d.ts +0 -21
- package/uis/stock/dist/assets/CopyButton-BUBKRJyY.js +0 -1
- package/uis/stock/dist/assets/GlobalSettingsView-yYMcRWvt.js +0 -1
- package/uis/stock/dist/assets/LogViewer-DIliXy62.js +0 -1
- package/uis/stock/dist/assets/LogsView-B7Z-7RNg.js +0 -1
- package/uis/stock/dist/assets/Modal-DmKa5Qpp.js +0 -39
- package/uis/stock/dist/assets/ProxyView-DvZiNkwb.js +0 -1
- package/uis/stock/dist/assets/ServerDetailView-6idGT_EX.js +0 -2
- package/uis/stock/dist/assets/SettingsShell-CeGtleYI.js +0 -1
- package/uis/stock/dist/assets/SettingsView-BrhJIrmk.js +0 -2
- package/uis/stock/dist/assets/de-BRITeb0H.js +0 -1
- package/uis/stock/dist/assets/es-B2zIEssV.js +0 -1
- package/uis/stock/dist/assets/fr-s0ZOBEqh.js +0 -1
- package/uis/stock/dist/assets/index-C1MehbKy.css +0 -2
- package/uis/stock/dist/assets/index-CnBN54wF.js +0 -15
- package/uis/stock/dist/assets/ja-CU7MR85V.js +0 -1
- package/uis/stock/dist/assets/ko-tL5Me6d-.js +0 -1
- package/uis/stock/dist/assets/ru-92yrvkNJ.js +0 -1
- package/uis/stock/dist/assets/vi-CzvY16k2.js +0 -1
- package/uis/stock/dist/assets/zh-CN-DDwFW_uW.js +0 -1
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { C as errorMessage, _ as prompt, d as dim, f as fail, m as green, t as appVersion } from "../cli.js";
|
|
2
|
-
import { A as workspaceServersPath, j as workspaceSettingsPath, o as globalSettingsPath } from "./paths-CGlGDrOU.js";
|
|
3
|
-
import { t as writeFileAtomic } from "./atomic-C1PfJpE7.js";
|
|
4
|
-
import { n as readStateFile } from "./config-text-DifCHhnz.js";
|
|
5
|
-
import { t as isRecord } from "./shape-DnTKzjQ2.js";
|
|
6
|
-
import { c as planConfigMigrations, i as parseWorkspaceSettings, n as parseServersFile, o as stampConfig, s as applyConfigMigrations, t as parseGlobalSettings } from "./parse-DhmG26fI.js";
|
|
7
|
-
import { n as WorkspaceRegistry } from "./workspaces-DYcfvKV_.js";
|
|
8
|
-
import process from "node:process";
|
|
9
|
-
import { defineCommand } from "citty";
|
|
10
|
-
import path from "node:path";
|
|
11
|
-
import fs from "node:fs";
|
|
12
|
-
//#region src/cli/migrate.ts
|
|
13
|
-
/**
|
|
14
|
-
* `migrate` lifts a state directory to the config schema this release understands:
|
|
15
|
-
* it stamps the global settings, each workspace's settings and each workspace's
|
|
16
|
-
* servers config, and applies any pending schema migration to them.
|
|
17
|
-
*
|
|
18
|
-
* Deliberately loud: it prints every step first, backs a file up before writing
|
|
19
|
-
* it, refuses to write one it cannot read, and never runs on its own — a detached
|
|
20
|
-
* daemon cannot prompt, so consent comes from `--yes`, from
|
|
21
|
-
* `HHOSTED_MIGRATE=allow`, or from a person at a terminal.
|
|
22
|
-
*/
|
|
23
|
-
var migrateArgs = {
|
|
24
|
-
dryRun: {
|
|
25
|
-
type: "boolean",
|
|
26
|
-
description: "print what would change, write nothing"
|
|
27
|
-
},
|
|
28
|
-
yes: {
|
|
29
|
-
type: "boolean",
|
|
30
|
-
alias: "y",
|
|
31
|
-
description: "apply without asking (or set HHOSTED_MIGRATE=allow)"
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
/** Every file a migration may have to stamp, and how this release reads it. */
|
|
35
|
-
function targets() {
|
|
36
|
-
const list = [{
|
|
37
|
-
file: globalSettingsPath,
|
|
38
|
-
label: "global settings",
|
|
39
|
-
validate: (raw) => parseGlobalSettings(raw).errors[0] ?? null
|
|
40
|
-
}];
|
|
41
|
-
const registry = new WorkspaceRegistry();
|
|
42
|
-
registry.load();
|
|
43
|
-
if (registry.configError !== null) fail(`cannot read ${registry.path}: ${registry.configError}`);
|
|
44
|
-
for (const workspace of registry.all()) {
|
|
45
|
-
list.push({
|
|
46
|
-
file: workspaceSettingsPath(workspace.id),
|
|
47
|
-
label: `workspace ${workspace.id} settings`,
|
|
48
|
-
validate: (raw) => parseWorkspaceSettings(raw).errors[0] ?? null
|
|
49
|
-
});
|
|
50
|
-
list.push({
|
|
51
|
-
file: workspaceServersPath(workspace.id),
|
|
52
|
-
label: `workspace ${workspace.id} servers`,
|
|
53
|
-
validate: (raw) => {
|
|
54
|
-
let defaults = {};
|
|
55
|
-
try {
|
|
56
|
-
const settingsRaw = JSON.parse(readStateFile(workspaceSettingsPath(workspace.id)));
|
|
57
|
-
const meta = typeof settingsRaw.meta === "object" && settingsRaw.meta !== null ? settingsRaw.meta : {};
|
|
58
|
-
const from = typeof meta.schema === "number" ? meta.schema : 1;
|
|
59
|
-
defaults = (planConfigMigrations(from).steps.length > 0 ? applyConfigMigrations(settingsRaw, from).config : settingsRaw)?.defaults ?? {};
|
|
60
|
-
} catch {}
|
|
61
|
-
return parseServersFile(raw, defaults).errors[0] ?? null;
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return list;
|
|
66
|
-
}
|
|
67
|
-
async function runMigrate(dryRun, yes) {
|
|
68
|
-
const existing = targets().filter((target) => fs.existsSync(target.file));
|
|
69
|
-
if (existing.length === 0) fail(`no home-hosted state to migrate — nothing at ${globalSettingsPath} or any workspace`);
|
|
70
|
-
const consented = yes || (process.env.HHOSTED_MIGRATE ?? "").toLowerCase() === "allow";
|
|
71
|
-
let stampOnly = 0;
|
|
72
|
-
let lifted = 0;
|
|
73
|
-
/** Files whose schema has steps, counted for `--dry-run` — which writes none of them. */
|
|
74
|
-
let needsLift = 0;
|
|
75
|
-
for (const target of existing) {
|
|
76
|
-
let raw;
|
|
77
|
-
try {
|
|
78
|
-
raw = JSON.parse(readStateFile(target.file));
|
|
79
|
-
} catch (error) {
|
|
80
|
-
fail(`cannot read ${target.file}: ${errorMessage(error)}`);
|
|
81
|
-
}
|
|
82
|
-
const meta = typeof raw.meta === "object" && raw.meta !== null ? raw.meta : {};
|
|
83
|
-
const from = typeof meta.schema === "number" ? meta.schema : 1;
|
|
84
|
-
const plan = planConfigMigrations(from);
|
|
85
|
-
if (plan.tooNew) fail(`${target.file} was written by home-hosted ${meta.writtenBy ?? "a newer release"} (config schema ${from});\n this release understands schema ${plan.to}. Install that version, or edit the file yourself.`);
|
|
86
|
-
/**
|
|
87
|
-
* Validate what this release will actually read: the file as-is when it needs no migration,
|
|
88
|
-
* otherwise the result the steps produce.
|
|
89
|
-
*
|
|
90
|
-
* The parsed check cannot be run on the raw file when a migration is pending — the reader
|
|
91
|
-
* refuses an older schema by design (`readStamp`), which would make `migrate` refuse every
|
|
92
|
-
* config it exists to lift. `checkShape` below catches a file that is not even JSON-shaped
|
|
93
|
-
* before the steps touch it.
|
|
94
|
-
*/
|
|
95
|
-
const migrated = plan.steps.length === 0 ? raw : applyConfigMigrations(raw, from).config;
|
|
96
|
-
if (plan.steps.length > 0 && !isRecord(migrated)) fail(`${target.file} did not produce an object when migrated — refusing to write it`);
|
|
97
|
-
const problem = target.validate(migrated);
|
|
98
|
-
if (problem !== null) fail(`${target.file} is not a config this release can read: ${problem}`);
|
|
99
|
-
if (plan.reached !== plan.to) fail(`${target.file} is schema ${from} and this release can only lift it to schema ${plan.reached} — the migration chain in configMigrations has a gap to schema ${plan.to}.
|
|
100
|
-
That is a bug in this release: report it rather than editing the file.`);
|
|
101
|
-
if (plan.steps.length === 0) {
|
|
102
|
-
const stamped = stampConfig(raw);
|
|
103
|
-
const changes = JSON.stringify(stamped) !== JSON.stringify(raw);
|
|
104
|
-
if (changes) stampOnly += 1;
|
|
105
|
-
if (changes && dryRun) process.stdout.write(`stamping ${target.label}: meta.writtenBy → home-hosted ${appVersion()} (schema ${plan.to}, no steps)\n`);
|
|
106
|
-
if (changes && !dryRun) {
|
|
107
|
-
fs.copyFileSync(target.file, `${target.file}.bak`);
|
|
108
|
-
writeFileAtomic(target.file, `${JSON.stringify(stamped, null, 2)}\n`);
|
|
109
|
-
}
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
needsLift += 1;
|
|
113
|
-
process.stdout.write(`migrating ${target.label}: config schema ${from} → ${plan.to}\n`);
|
|
114
|
-
for (const [index, step] of plan.steps.entries()) process.stdout.write(` ${index + 1}. ${step.describe}\n`);
|
|
115
|
-
if (dryRun) continue;
|
|
116
|
-
if (!consented) {
|
|
117
|
-
if (process.stdin.isTTY !== true) fail(`${target.file} needs ${plan.steps.length} migration(s) and this session cannot ask.\n re-run with --yes, or set HHOSTED_MIGRATE=allow for unattended runs`);
|
|
118
|
-
const answer = await prompt(`Apply ${plan.steps.length} migration(s) to ${path.basename(target.file)}? [y/N] `);
|
|
119
|
-
if (!/^yes$|^y$/i.test(answer.trim())) {
|
|
120
|
-
process.stdout.write("cancelled — nothing was written\n");
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
const migratedProblem = target.validate(migrated);
|
|
125
|
-
if (migratedProblem !== null) fail(`the migration produced a config this release cannot read:\n ${migratedProblem}`);
|
|
126
|
-
fs.copyFileSync(target.file, `${target.file}.bak`);
|
|
127
|
-
writeFileAtomic(target.file, `${JSON.stringify(stampConfig(migrated), null, 2)}\n`);
|
|
128
|
-
lifted += 1;
|
|
129
|
-
process.stdout.write(`${green(`migrated ${target.label} to schema ${plan.to}`)} in ${target.file}\n`);
|
|
130
|
-
process.stdout.write(` ${dim(`previous file kept at ${target.file}.bak`)}\n`);
|
|
131
|
-
}
|
|
132
|
-
const done = [];
|
|
133
|
-
if (dryRun) {
|
|
134
|
-
if (needsLift > 0) done.push(green(`${needsLift} file(s) would be migrated`));
|
|
135
|
-
if (stampOnly > 0) done.push(green(`${stampOnly} file(s) would be stamped`));
|
|
136
|
-
process.stdout.write(done.length === 0 ? `every file is already what home-hosted ${appVersion()} understands — nothing to migrate\n` : `${done.join(", ")} to what home-hosted ${appVersion()} understands\n`);
|
|
137
|
-
process.stdout.write(`${dim("nothing was written (--dry-run)")}\n`);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
if (lifted > 0) done.push(green(`${lifted} file(s) migrated`));
|
|
141
|
-
if (stampOnly > 0) done.push(green(`${stampOnly} file(s) stamped`));
|
|
142
|
-
if (done.length === 0) process.stdout.write(`every file is already what home-hosted ${appVersion()} understands — nothing to migrate\n`);
|
|
143
|
-
else process.stdout.write(`${done.join(", ")} to what home-hosted ${appVersion()} understands\n`);
|
|
144
|
-
}
|
|
145
|
-
var migrateCommand = defineCommand({
|
|
146
|
-
meta: { name: "migrate" },
|
|
147
|
-
args: migrateArgs,
|
|
148
|
-
run: async ({ args }) => {
|
|
149
|
-
await runMigrate(args.dryRun === true, args.yes === true);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
//#endregion
|
|
153
|
-
export { migrateCommand };
|
|
154
|
-
|
|
155
|
-
//# sourceMappingURL=migrate-Cfoq-Vgh.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-Cfoq-Vgh.js","names":[],"sources":["../../src/cli/migrate.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport process from 'node:process'\nimport { defineCommand } from 'citty'\nimport { dim, fail, green, prompt } from '#src/cli/io'\nimport { applyConfigMigrations, planConfigMigrations, UNSTAMPED_SCHEMA } from '#src/config/migrations'\nimport { parseGlobalSettings, parseServersFile, parseWorkspaceSettings, stampConfig } from '#src/config/parse'\nimport { WorkspaceRegistry } from '#src/config/workspaces'\nimport { writeFileAtomic } from '#src/helpers/atomic'\nimport { readStateFile } from '#src/helpers/config-text'\nimport { globalSettingsPath, workspaceServersPath, workspaceSettingsPath } from '#src/helpers/paths'\nimport { appVersion } from '#src/helpers/version'\nimport { errorMessage } from '#src/shared/error-message'\nimport { isRecord } from '#src/shared/shape'\n\n/**\n * `migrate` lifts a state directory to the config schema this release understands:\n * it stamps the global settings, each workspace's settings and each workspace's\n * servers config, and applies any pending schema migration to them.\n *\n * Deliberately loud: it prints every step first, backs a file up before writing\n * it, refuses to write one it cannot read, and never runs on its own — a detached\n * daemon cannot prompt, so consent comes from `--yes`, from\n * `HHOSTED_MIGRATE=allow`, or from a person at a terminal.\n */\n\nexport const migrateArgs = {\n dryRun: { type: 'boolean', description: 'print what would change, write nothing' },\n yes: { type: 'boolean', alias: 'y', description: 'apply without asking (or set HHOSTED_MIGRATE=allow)' },\n} as const\n\ninterface Target {\n file: string\n label: string\n validate: (raw: unknown) => string | null\n}\n\n/** Every file a migration may have to stamp, and how this release reads it. */\nfunction targets(): Target[] {\n const list: Target[] = [\n {\n file: globalSettingsPath,\n label: 'global settings',\n validate: raw => parseGlobalSettings(raw).errors[0] ?? null,\n },\n ]\n\n const registry = new WorkspaceRegistry()\n registry.load()\n if (registry.configError !== null)\n fail(`cannot read ${registry.path}: ${registry.configError}`)\n\n for (const workspace of registry.all()) {\n list.push({\n file: workspaceSettingsPath(workspace.id),\n label: `workspace ${workspace.id} settings`,\n validate: raw => parseWorkspaceSettings(raw).errors[0] ?? null,\n })\n list.push({\n file: workspaceServersPath(workspace.id),\n label: `workspace ${workspace.id} servers`,\n validate: (raw) => {\n // The defaults live in the workspace settings; an absent one reads as schema defaults.\n // Read through the *parser* only when that file is already this release's schema; a\n // pending migration means the reader would refuse it, and the defaults would be lost.\n let defaults: Record<string, unknown> = {}\n try {\n const settingsRaw = JSON.parse(readStateFile(workspaceSettingsPath(workspace.id))) as Record<string, unknown>\n const meta = typeof settingsRaw.meta === 'object' && settingsRaw.meta !== null ? settingsRaw.meta as { schema?: number } : {}\n const from = typeof meta.schema === 'number' ? meta.schema : UNSTAMPED_SCHEMA\n const lifted = planConfigMigrations(from).steps.length > 0 ? applyConfigMigrations(settingsRaw, from).config : settingsRaw\n defaults = (lifted?.defaults ?? {}) as Record<string, unknown>\n }\n catch {\n // No settings file yet: the servers still have to be readable.\n }\n return parseServersFile(raw, defaults).errors[0] ?? null\n },\n })\n }\n return list\n}\n\nexport async function runMigrate(dryRun: boolean, yes: boolean): Promise<void> {\n const files = targets()\n const existing = files.filter(target => fs.existsSync(target.file))\n if (existing.length === 0)\n fail(`no home-hosted state to migrate — nothing at ${globalSettingsPath} or any workspace`)\n\n const consented = yes || (process.env.HHOSTED_MIGRATE ?? '').toLowerCase() === 'allow'\n let stampOnly = 0\n let lifted = 0\n /** Files whose schema has steps, counted for `--dry-run` — which writes none of them. */\n let needsLift = 0\n\n for (const target of existing) {\n let raw: Record<string, unknown>\n try {\n raw = JSON.parse(readStateFile(target.file)) as Record<string, unknown>\n }\n catch (error) {\n fail(`cannot read ${target.file}: ${errorMessage(error)}`)\n }\n\n const meta = typeof raw.meta === 'object' && raw.meta !== null ? raw.meta as { schema?: number, writtenBy?: string } : {}\n const from = typeof meta.schema === 'number' ? meta.schema : UNSTAMPED_SCHEMA\n const plan = planConfigMigrations(from)\n\n if (plan.tooNew) {\n fail(`${target.file} was written by home-hosted ${meta.writtenBy ?? 'a newer release'} (config schema ${from});\\n this release understands schema ${plan.to}. Install that version, or edit the file yourself.`)\n }\n\n /**\n * Validate what this release will actually read: the file as-is when it needs no migration,\n * otherwise the result the steps produce.\n *\n * The parsed check cannot be run on the raw file when a migration is pending — the reader\n * refuses an older schema by design (`readStamp`), which would make `migrate` refuse every\n * config it exists to lift. `checkShape` below catches a file that is not even JSON-shaped\n * before the steps touch it.\n */\n const migrated = plan.steps.length === 0 ? raw : applyConfigMigrations(raw, from).config\n if (plan.steps.length > 0 && (!isRecord(migrated))) {\n fail(`${target.file} did not produce an object when migrated — refusing to write it`)\n }\n const problem = target.validate(migrated)\n if (problem !== null)\n fail(`${target.file} is not a config this release can read: ${problem}`)\n\n // A chain with a gap would lift the file part-way and then stamp it as the current schema, so the\n // file would claim a shape it does not have. Refused rather than written.\n if (plan.reached !== plan.to) {\n fail(`${target.file} is schema ${from} and this release can only lift it to schema ${plan.reached} — the migration chain in configMigrations has a gap to schema ${plan.to}.\n That is a bug in this release: report it rather than editing the file.`)\n }\n\n if (plan.steps.length === 0) {\n const stamped = stampConfig(raw)\n const changes = JSON.stringify(stamped) !== JSON.stringify(raw)\n if (changes)\n stampOnly += 1\n // A dry run has to *say* what it would stamp. It used to stay silent and then close with\n // \"nothing was written (--dry-run)\", so an upgrader rehearsing the one command they were told\n // to rehearse saw an empty report while the real run rewrote three files and printed\n // \"3 file(s) stamped\" — the plan a person reads to decide did not describe the run it plans.\n if (changes && dryRun)\n process.stdout.write(`stamping ${target.label}: meta.writtenBy → home-hosted ${appVersion()} (schema ${plan.to}, no steps)\\n`)\n // `docs/` and `README.md` promise a `.bak` beside **each** file this command rewrites, and this\n // branch rewrites one too — it only restamps it. Keeping no backup here made the promise\n // conditional on which path the file took, and a hand-formatted `servers.config.json` came back\n // reindented with no copy of what the person wrote. No consent is asked for a restamp: it\n // changes `meta.writtenBy` and nothing else, so there is no decision to make — unlike a schema\n // step, which is why the two branches differ on that and not on the backup.\n if (changes && !dryRun) {\n fs.copyFileSync(target.file, `${target.file}.bak`)\n writeFileAtomic(target.file, `${JSON.stringify(stamped, null, 2)}\\n`)\n }\n continue\n }\n\n needsLift += 1\n\n process.stdout.write(`migrating ${target.label}: config schema ${from} → ${plan.to}\\n`)\n for (const [index, step] of plan.steps.entries())\n process.stdout.write(` ${index + 1}. ${step.describe}\\n`)\n\n if (dryRun)\n continue\n\n if (!consented) {\n if (process.stdin.isTTY !== true) {\n fail(`${target.file} needs ${plan.steps.length} migration(s) and this session cannot ask.\\n re-run with --yes, or set HHOSTED_MIGRATE=allow for unattended runs`)\n }\n const answer = await prompt(`Apply ${plan.steps.length} migration(s) to ${path.basename(target.file)}? [y/N] `)\n if (!/^yes$|^y$/i.test(answer.trim())) {\n process.stdout.write('cancelled — nothing was written\\n')\n return\n }\n }\n\n const migratedProblem = target.validate(migrated)\n if (migratedProblem !== null)\n fail(`the migration produced a config this release cannot read:\\n ${migratedProblem}`)\n\n fs.copyFileSync(target.file, `${target.file}.bak`)\n writeFileAtomic(target.file, `${JSON.stringify(stampConfig(migrated), null, 2)}\\n`)\n lifted += 1\n process.stdout.write(`${green(`migrated ${target.label} to schema ${plan.to}`)} in ${target.file}\\n`)\n process.stdout.write(` ${dim(`previous file kept at ${target.file}.bak`)}\\n`)\n }\n\n // \"nothing to migrate\" has to mean nothing happened: a run that lifted three files printed it\n // anyway, because only the stamp-only path counted. The line a person reads to decide whether to\n // re-run has to agree with the lines above it.\n //\n // A dry run answers the same question in the same words, in the tense of a plan: it is the run a\n // person rehearses *before* letting a migration touch state they cannot easily restore, so its\n // closing line may not contradict the work it just described.\n const done: string[] = []\n if (dryRun) {\n if (needsLift > 0)\n done.push(green(`${needsLift} file(s) would be migrated`))\n if (stampOnly > 0)\n done.push(green(`${stampOnly} file(s) would be stamped`))\n process.stdout.write(\n done.length === 0\n ? `every file is already what home-hosted ${appVersion()} understands — nothing to migrate\\n`\n : `${done.join(', ')} to what home-hosted ${appVersion()} understands\\n`,\n )\n process.stdout.write(`${dim('nothing was written (--dry-run)')}\\n`)\n return\n }\n\n if (lifted > 0)\n done.push(green(`${lifted} file(s) migrated`))\n if (stampOnly > 0)\n done.push(green(`${stampOnly} file(s) stamped`))\n if (done.length === 0)\n process.stdout.write(`every file is already what home-hosted ${appVersion()} understands — nothing to migrate\\n`)\n else\n process.stdout.write(`${done.join(', ')} to what home-hosted ${appVersion()} understands\\n`)\n}\n\nexport const migrateCommand = defineCommand({\n meta: { name: 'migrate' },\n args: migrateArgs,\n run: async ({ args }) => {\n await runMigrate(args.dryRun === true, args.yes === true)\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O,KAAK,GAAG;EACpG,QAAQ,OAAO,MAAM,KAAK,IAAI,yBAAyB,OAAO,KAAK,KAAK,EAAE,GAAG;CAC/E;CASA,MAAM,OAAiB,CAAC;CACxB,IAAI,QAAQ;EACV,IAAI,YAAY,GACd,KAAK,KAAK,MAAM,GAAG,UAAU,2BAA2B,CAAC;EAC3D,IAAI,YAAY,GACd,KAAK,KAAK,MAAM,GAAG,UAAU,0BAA0B,CAAC;EAC1D,QAAQ,OAAO,MACb,KAAK,WAAW,IACZ,0CAA0C,WAAW,EAAE,uCACvD,GAAG,KAAK,KAAK,IAAI,EAAE,uBAAuB,WAAW,EAAE,eAC7D;EACA,QAAQ,OAAO,MAAM,GAAG,IAAI,iCAAiC,EAAE,GAAG;EAClE;CACF;CAEA,IAAI,SAAS,GACX,KAAK,KAAK,MAAM,GAAG,OAAO,kBAAkB,CAAC;CAC/C,IAAI,YAAY,GACd,KAAK,KAAK,MAAM,GAAG,UAAU,iBAAiB,CAAC;CACjD,IAAI,KAAK,WAAW,GAClB,QAAQ,OAAO,MAAM,0CAA0C,WAAW,EAAE,oCAAoC;MAEhH,QAAQ,OAAO,MAAM,GAAG,KAAK,KAAK,IAAI,EAAE,uBAAuB,WAAW,EAAE,eAAe;AAC/F;AAEA,IAAa,iBAAiB,cAAc;CAC1C,MAAM,EAAE,MAAM,UAAU;CACxB,MAAM;CACN,KAAK,OAAO,EAAE,WAAW;EACvB,MAAM,WAAW,KAAK,WAAW,MAAM,KAAK,QAAQ,IAAI;CAC1D;AACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nanny-B-Eu0sFW.js","names":[],"sources":["../../src/services/nanny.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process'\nimport type { LogStream, NannyExit, NannySpec, NannyState } from '#src/shared/contracts'\nimport process from 'node:process'\nimport { describeNannyExit, describeSpawnError, NANNY_HEARTBEAT_MS, NANNY_TRAPPED_SIGNALS, nannyLogFile, writeNannyState } from '#src/providers/nanny'\nimport { spawnManaged, terminate } from '#src/providers/process'\nimport { LineSplitter } from '#src/services/log-buffer'\nimport { LogFiles } from '#src/services/log-files'\n\n/** Signals this nanny's own process group; false where there is none to signal (Windows, not a leader). */\nfunction signalOwnGroup(signal: NodeJS.Signals): boolean {\n if (process.platform === 'win32')\n return false\n try {\n process.kill(-process.pid, signal)\n return true\n }\n catch {\n return false\n }\n}\n\n/**\n * The nanny of one persistent entry: it spawns the child, owns its pipes, writes its\n * output to the entry's JSONL log and mirrors the child's exit.\n *\n * This is the whole reason a persistent entry survives the panel. The pipes belong to\n * a process that is not the panel, so a panel stop, restart or SIGKILL cannot break\n * them; the log keeps being written; and the exit code the panel would have collected\n * as a parent is left in the state file for whoever comes back.\n *\n * It deliberately does *not* restart anything: retries, backoff and health stay the\n * panel's business, so there is only ever one supervisor making that decision.\n */\nexport async function runNanny(spec: NannySpec, statePath: string): Promise<void> {\n const id = spec.serverId\n const startedAt = Date.now()\n const logFile = nannyLogFile(spec.logDir, id)\n // The file is this entry's log *transport*, not its retention policy: the panel\n // still decides whether that history is served. So it is always written.\n const logFiles = new LogFiles(spec.logDir, () => ({ ...spec.logs, persist: true }))\n\n let childPid: number | null = null\n let lastExit: NannyExit | null = null\n let exitCode = 0\n\n const persistState = (): void => {\n const state: NannyState = {\n serverId: id,\n nannyPid: process.pid,\n childPid,\n startedAt,\n logFile,\n heartbeatAt: Date.now(),\n }\n if (lastExit !== null)\n state.lastExit = lastExit\n writeNannyState(statePath, state)\n }\n\n const emit = (stream: LogStream, text: string): void => {\n logFiles.append(id, { ts: Date.now(), stream, text })\n }\n\n // The traps go up before the child exists, and before anything about this nanny is on\n // disk: a stop that lands in between would otherwise kill a nanny that had not taken\n // over its child yet, orphaning that child with no record of it anywhere.\n let stopping = false\n let pending: NodeJS.Signals | null = null\n let spawned: ChildProcess | null = null\n\n const stopChild = (child: ChildProcess, signal: NodeJS.Signals): void => {\n emit('system', `${signal} — stopping this entry (grace ${spec.stop.graceMs}ms)`)\n // The panel signals this pid alone (`nannyStopOptions`), so `killGroup` is honoured here: one\n // signal to this group reaches the child and what it spawned exactly once, and the copy this\n // nanny receives is ignored. The escalation stays on the child's pid — the group holds us too.\n if (spec.stop.killGroup && NANNY_TRAPPED_SIGNALS.has(spec.stop.signal) && signalOwnGroup(spec.stop.signal)) {\n const escalate = setTimeout(() => {\n try {\n child.kill('SIGKILL')\n }\n catch {\n // already gone\n }\n }, spec.stop.graceMs)\n escalate.unref()\n child.once('exit', () => clearTimeout(escalate))\n return\n }\n void terminate(child, { signal: spec.stop.signal, killGroup: false, graceMs: spec.stop.graceMs })\n }\n\n const onSignal = (signal: NodeJS.Signals): void => {\n if (stopping)\n return\n stopping = true\n // Nothing to stop yet: the spawn is right behind this, and it reads `pending`.\n if (spawned === null)\n pending = signal\n else\n stopChild(spawned, signal)\n }\n\n // The same set `stopPersistentEntries` reads: a signal outside it ends this process without\n // forwarding anything, so the sweep has to signal the child itself.\n for (const signal of NANNY_TRAPPED_SIGNALS)\n process.on(signal, () => onSignal(signal))\n\n // Not detached: the child shares this nanny's process group, which is the group the\n // panel signals — one `kill(-pid)` still reaches the whole tree.\n const child = spawnManaged(\n { command: spec.command, args: spec.args, cwd: spec.cwd, env: spec.env },\n { detached: false },\n )\n spawned = child\n childPid = child.pid ?? null\n persistState()\n emit('system', `persistent: nanny pid ${process.pid} runs this entry`)\n // A stop that arrived before the spawn still has to reach the child it just made.\n if (pending !== null)\n stopChild(child, pending)\n\n const stdout = new LineSplitter((stream, text) => emit(stream, text))\n const stderr = new LineSplitter((stream, text) => emit(stream, text))\n child.stdout?.on('data', chunk => stdout.push('stdout', chunk))\n child.stderr?.on('data', chunk => stderr.push('stderr', chunk))\n\n const heartbeat = setInterval(persistState, NANNY_HEARTBEAT_MS)\n heartbeat.unref()\n\n await new Promise<void>((resolve) => {\n let settled = false\n const finish = (code: number | null, signal: NodeJS.Signals | null, runtimeMs: number, note?: string): void => {\n if (settled)\n return\n settled = true\n clearInterval(heartbeat)\n stdout.flush('stdout')\n stderr.flush('stderr')\n lastExit = { code, signal, at: Date.now(), runtimeMs }\n // The same formatter the panel uses, so the reason an entry died reads identically in the\n // nanny's mirror and in the panel's own log. Hand-rolling it here meant this line lost the\n // exit-code hint that the panel's line gained.\n emit('system', note ?? `persistent: exited with ${describeNannyExit(lastExit)}`)\n persistState()\n logFiles.dispose()\n // The panel reads the real cause from the state file; this is only the mirror.\n exitCode = code ?? (signal === null ? 0 : 1)\n resolve()\n }\n\n child.once('exit', (code, signal) => finish(code, signal, Date.now() - startedAt))\n child.once('error', (error: Error) => {\n // A command that cannot even be spawned: the panel reports it as \"did not start\".\n // Through the same formatter the panel uses, so a missing working directory is named\n // here too — this nanny is the only spawner a persistent entry has.\n finish(null, null, 0, `persistent: could not start the entry: ${describeSpawnError(error as NodeJS.ErrnoException, spec.command, spec.cwd)}`)\n })\n })\n\n // This nanny lives exactly as long as the child it owns, and says so by exiting.\n // Lingering is what an inherited pipe would do to us — a successor that kept our\n // stdout open refs the event loop — and a nanny that outlives its child is worse\n // than useless: the panel would report a healthy entry while the real server is a\n // detached process it can neither stop nor read. Exiting hands the entry back to\n // the panel, which is where `reclaim` can put it under a fresh nanny.\n process.exit(exitCode)\n}\n"],"mappings":";;;;;AASA,SAAS,eAAe,QAAiC;CACvD,IAAI,QAAQ,aAAa,SACvB,OAAO;CACT,IAAI;EACF,QAAQ,KAAK,CAAC,QAAQ,KAAK,MAAM;EACjC,OAAO;CACT,QACM;EACJ,OAAO;CACT;AACF;;;;;;;;;;;;;AAcA,eAAsB,SAAS,MAAiB,WAAkC;CAChF,MAAM,KAAK,KAAK;CAChB,MAAM,YAAY,KAAK,IAAI;CAC3B,MAAM,UAAU,aAAa,KAAK,QAAQ,EAAE;CAG5C,MAAM,WAAW,IAAI,SAAS,KAAK,eAAe;EAAE,GAAG,KAAK;EAAM,SAAS;CAAK,EAAE;CAElF,IAAI,WAA0B;CAC9B,IAAI,WAA6B;CACjC,IAAI,WAAW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