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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AccountRecord, SecretsFile } from './secrets.js';
|
|
2
|
+
export declare function accountIdProblem(id: string): string | null;
|
|
3
|
+
/** 32 bytes of randomness: the whole point of a generated secret is that nothing needs to stretch it. */
|
|
4
|
+
export declare function generateAccountSecret(): string;
|
|
5
|
+
/** scrypt when a person chose the secret, sha256 when the panel generated it; `algo` records which. */
|
|
6
|
+
export declare function credentialFields(secret: string, generated: boolean): Pick<AccountRecord, 'algo' | 'hash' | 'salt' | 'keylen' | 'cost' | 'short'>;
|
|
7
|
+
/**
|
|
8
|
+
* The accounts, read tolerantly. A record with no scopes means `read`, an absent `enabled` means
|
|
9
|
+
* enabled (a pre-0.15 account could not be disabled), and a duplicate id keeps the first.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readAccounts(value: unknown): AccountRecord[];
|
|
12
|
+
/**
|
|
13
|
+
* The accounts a pre-0.15 file implies, so an upgrade removes no access: `default` carries the password,
|
|
14
|
+
* and every other token becomes an account with the same id and scopes.
|
|
15
|
+
*/
|
|
16
|
+
export declare function migrateLegacyAccounts(contents: SecretsFile): AccountRecord[];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { JobConfig } from '../shared/contracts.js';
|
|
2
|
+
/**
|
|
3
|
+
* A workspace's jobs, read from `jobs.config.json`. Each job is checked on its own: a broken one
|
|
4
|
+
* becomes a row with a `problem` and the rest still run. The parsed file is cached and re-read only
|
|
5
|
+
* when `refresh()` sees it change, so the 1 Hz tick and the state frame cost no syscall.
|
|
6
|
+
*/
|
|
7
|
+
export type JobEntry = {
|
|
8
|
+
ok: true;
|
|
9
|
+
job: JobConfig;
|
|
10
|
+
} | {
|
|
11
|
+
ok: false;
|
|
12
|
+
id: string;
|
|
13
|
+
problem: string;
|
|
14
|
+
raw: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export interface JobsSnapshot {
|
|
17
|
+
/** Every entry in file order, broken ones included. */
|
|
18
|
+
entries: JobEntry[];
|
|
19
|
+
/** Why the file as a whole cannot be read; `entries` is then empty. */
|
|
20
|
+
fileError: string | null;
|
|
21
|
+
}
|
|
22
|
+
export declare class JobStore {
|
|
23
|
+
private readonly file;
|
|
24
|
+
private snapshot;
|
|
25
|
+
/** The raw entries the snapshot came from, so a write keeps a broken entry as the person left it. */
|
|
26
|
+
private raw;
|
|
27
|
+
private stamp;
|
|
28
|
+
constructor(file: string);
|
|
29
|
+
/** The exact file a backup captures. */
|
|
30
|
+
get path(): string;
|
|
31
|
+
read(): JobsSnapshot;
|
|
32
|
+
/** The runnable jobs, in file order. */
|
|
33
|
+
list(): JobConfig[];
|
|
34
|
+
get(id: string): JobConfig | null;
|
|
35
|
+
/** Re-reads the file when it changed on disk; `true` when it did. */
|
|
36
|
+
refresh(): boolean;
|
|
37
|
+
/** Refuses a duplicate id: it names the job's log file and run history. */
|
|
38
|
+
add(input: JobConfig): JobConfig;
|
|
39
|
+
/** `null` when no job has the id. `null` clears `label` or `description`. */
|
|
40
|
+
update(id: string, patch: Record<string, unknown>): JobConfig | null;
|
|
41
|
+
/** Removes one, broken or not. `true` when it was there. */
|
|
42
|
+
remove(id: string): boolean;
|
|
43
|
+
private load;
|
|
44
|
+
/** The entries a write builds on, after a fresh look; refuses a file it cannot parse (someone's unfinished edit). */
|
|
45
|
+
private writableEntries;
|
|
46
|
+
private write;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* One job entry in this release's field names: `timeoutMs` (before 0.20) becomes `timeoutSeconds`,
|
|
50
|
+
* rounded up so a lift never shortens a timeout. `lifted` says whether anything changed.
|
|
51
|
+
*/
|
|
52
|
+
export declare function liftJob(entry: Record<string, unknown>): {
|
|
53
|
+
job: Record<string, unknown>;
|
|
54
|
+
lifted: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** A jobs document lifted by `liftJob`, for `migrate`; `lifted` names the jobs it changed. */
|
|
57
|
+
export declare function liftJobsDocument(document: Record<string, unknown>): {
|
|
58
|
+
document: Record<string, unknown>;
|
|
59
|
+
lifted: string[];
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* What is wrong with one job; empty when runnable. Covers what a schema cannot express without a
|
|
63
|
+
* `narrow` (which breaks `toJsonSchema`), notably whether the cron expression means anything.
|
|
64
|
+
*/
|
|
65
|
+
export declare function jobProblems(job: {
|
|
66
|
+
schedule?: string;
|
|
67
|
+
secretEnv?: string[];
|
|
68
|
+
}): string[];
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Refuses a state directory
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Through 0.7.x this relocated a pre-workspace `$HHOSTED_HOME` automatically. 0.8.0
|
|
6
|
-
* dropped the mover, so an instance that never crossed `.hh` is stopped instead of
|
|
7
|
-
* being read as an empty one — its `servers.config.json` would otherwise sit unread
|
|
8
|
-
* beside a panel supervising nothing, with no error anywhere. The migration itself is
|
|
9
|
-
* unchanged and still shipped: the 0.7 line performs it on its first run.
|
|
2
|
+
* Refuses a pre-workspace state directory (no `.hh`) before any path resolves into it, rather than
|
|
3
|
+
* reading it as empty. The 0.7 line performs that migration.
|
|
10
4
|
*/
|
|
11
5
|
export declare function ensureLayout(): void;
|
|
@@ -1,35 +1,18 @@
|
|
|
1
1
|
export declare const CONFIG_SCHEMA = 2;
|
|
2
|
-
/**
|
|
3
|
-
* The schema of a file that carries no `meta` stamp at all.
|
|
4
|
-
*
|
|
5
|
-
* A literal, **not** `CONFIG_SCHEMA`: an unstamped file predates the stamp, so it is the *oldest* shape,
|
|
6
|
-
* and reading it as the current one would skip every migration the moment `CONFIG_SCHEMA` is bumped —
|
|
7
|
-
* the file would then be stamped as the new schema without ever being lifted to it.
|
|
8
|
-
*
|
|
9
|
-
* **Schema 1 is the oldest stamped shape**, but an unstamped file is not necessarily that one: the
|
|
10
|
-
* seeds this release writes carry no `meta` at all, and they are written in the *current* shape. So
|
|
11
|
-
* an unstamped file cannot be told apart from a pre-stamp one, and both are read as the shape that
|
|
12
|
-
* predates the stamp — schema 1. That is what makes the distinction safe in the direction that
|
|
13
|
-
* matters: a released file is lifted, and a seed is written in a shape schema 1 can describe,
|
|
14
|
-
* because every field added since is optional with a default.
|
|
15
|
-
*
|
|
16
|
-
* (This was `1` with the note "a hypothetical `to: 2` step" — and then 2 arrived, which is how the
|
|
17
|
-
* seeds started refusing to load. They now carry a stamp of their own; see `config/seed.ts`.)
|
|
18
|
-
*/
|
|
2
|
+
/** A literal, not `CONFIG_SCHEMA`: an unstamped file predates the stamp and must run every migration. */
|
|
19
3
|
export declare const UNSTAMPED_SCHEMA = 1;
|
|
20
|
-
/** A settings or servers file, as read: whatever keys it carries. */
|
|
21
4
|
export type RawConfig = Record<string, unknown>;
|
|
5
|
+
export type ConfigKind = 'global-settings' | 'workspace-settings' | 'servers';
|
|
22
6
|
export interface ConfigMigration {
|
|
23
7
|
/** The schema this step produces; steps run in ascending order. */
|
|
24
8
|
to: number;
|
|
9
|
+
/** The files it changes; a file of another kind is lifted by a restamp alone. Omitted: every kind. */
|
|
10
|
+
kinds?: readonly ConfigKind[];
|
|
25
11
|
/** One line, printed by `migrate` before anything is written. */
|
|
26
12
|
describe: string;
|
|
27
13
|
apply: (config: RawConfig) => RawConfig;
|
|
28
14
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Every published migration, oldest first. Keep this list small and permanent:
|
|
31
|
-
* a config may arrive from any earlier release, so a step is never removed.
|
|
32
|
-
*/
|
|
15
|
+
/** Every published migration, oldest first. A step is never removed. */
|
|
33
16
|
export declare const configMigrations: ConfigMigration[];
|
|
34
17
|
export interface MigrationPlan {
|
|
35
18
|
from: number;
|
|
@@ -37,32 +20,17 @@ export interface MigrationPlan {
|
|
|
37
20
|
steps: ConfigMigration[];
|
|
38
21
|
/** The file was written by a release newer than this one. */
|
|
39
22
|
tooNew: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* The schema the steps actually reach, which is `to` only when the chain is unbroken.
|
|
42
|
-
*
|
|
43
|
-
* A **gap** in `configMigrations` — a step lifting 1→2 published without one lifting 2→3 — leaves the
|
|
44
|
-
* file part-way while `migrate` stamps it as the current schema anyway: it writes
|
|
45
|
-
* `schema: CONFIG_SCHEMA` unconditionally. The file then claims a shape it does not have, which is the
|
|
46
|
-
* same silent corruption the unstamped default caused. This makes the gap detectable.
|
|
47
|
-
*/
|
|
23
|
+
/** The schema the steps actually reach; differs from `to` when the chain has a gap. */
|
|
48
24
|
reached: number;
|
|
49
25
|
}
|
|
50
26
|
export interface MigrationOptions {
|
|
51
|
-
/** Defaults to every migration this release ships. */
|
|
52
27
|
migrations?: ConfigMigration[];
|
|
53
|
-
/** The schema to reach; defaults to what this release understands. */
|
|
54
28
|
to?: number;
|
|
29
|
+
/** The file being planned for; only steps that change that kind are pending. Omitted: every step. */
|
|
30
|
+
kind?: ConfigKind;
|
|
55
31
|
}
|
|
56
|
-
/** What would have to run to bring `from` up to `to`. */
|
|
57
32
|
export declare function planConfigMigrations(from: number, options?: MigrationOptions): MigrationPlan;
|
|
58
|
-
/**
|
|
59
|
-
* Applies the plan in order; the caller owns writing the result.
|
|
60
|
-
*
|
|
61
|
-
* The result carries `meta.schema` set to the schema the steps reached, so it is readable by this
|
|
62
|
-
* release's own parser — which refuses a file whose stamp still says an older schema. Without that,
|
|
63
|
-
* `migrate` validated its own output as "needs 1 migration" and refused every config it exists to
|
|
64
|
-
* lift.
|
|
65
|
-
*/
|
|
33
|
+
/** Applies the plan in order and stamps `meta.schema` with what it reached; the caller writes the result. */
|
|
66
34
|
export declare function applyConfigMigrations(config: RawConfig, from: number, options?: MigrationOptions): {
|
|
67
35
|
config: RawConfig;
|
|
68
36
|
applied: ConfigMigration[];
|
|
@@ -4,7 +4,6 @@ import type { ServerConfig } from '../shared/contracts.js';
|
|
|
4
4
|
export interface ConfigParse<T> {
|
|
5
5
|
/** Null when something made the file unusable; `errors` says why. */
|
|
6
6
|
config: T | null;
|
|
7
|
-
/** Blocking problems: what the panel must not start on. */
|
|
8
7
|
errors: string[];
|
|
9
8
|
/** Keys a newer release wrote that this one does not know, by path. */
|
|
10
9
|
unknownKeys: string[];
|
|
@@ -12,23 +11,22 @@ export interface ConfigParse<T> {
|
|
|
12
11
|
warnings: string[];
|
|
13
12
|
/** The shape the file declares; an unstamped file reads as the current one. */
|
|
14
13
|
schemaVersion: number;
|
|
15
|
-
/** What wrote it, when the file says. */
|
|
16
14
|
writtenBy: string | null;
|
|
17
15
|
}
|
|
18
16
|
type Validator = (input: unknown) => unknown;
|
|
19
17
|
/**
|
|
20
|
-
* Validates
|
|
21
|
-
*
|
|
22
|
-
* the *whole group* to schema defaults would silently reset the listener port,
|
|
23
|
-
* the bind and the auth policy over a single unrecognized key.
|
|
24
|
-
*
|
|
25
|
-
* Only unrecognized keys are dropped, and each one is reported. Anything else is
|
|
26
|
-
* a real problem, returned for the caller to refuse on.
|
|
18
|
+
* Validates against one schema, dropping and reporting only unrecognized keys, so a newer release's
|
|
19
|
+
* config still loads instead of losing a whole group to defaults.
|
|
27
20
|
*/
|
|
28
21
|
export declare function parseTolerant(value: unknown, schema: Validator, prefix: string, unknownKeys: string[]): {
|
|
29
22
|
value: unknown;
|
|
30
23
|
error: string | null;
|
|
31
24
|
};
|
|
25
|
+
/** The one reading of a file's `meta` stamp; an unstamped file is `UNSTAMPED_SCHEMA`. */
|
|
26
|
+
export declare function readConfigStamp(raw: unknown): {
|
|
27
|
+
schemaVersion: number;
|
|
28
|
+
writtenBy: string | null;
|
|
29
|
+
};
|
|
32
30
|
/** `$HHOSTED_HOME/.hh/settings.json`. */
|
|
33
31
|
export declare function parseGlobalSettings(raw: unknown, options?: MigrationOptions): ConfigParse<ResolvedGlobalConfig>;
|
|
34
32
|
/** `$HHOSTED_HOME/.hh/<id>/settings.json`. */
|
|
@@ -41,10 +39,7 @@ export interface ServersParse {
|
|
|
41
39
|
schemaVersion: number;
|
|
42
40
|
writtenBy: string | null;
|
|
43
41
|
}
|
|
44
|
-
/**
|
|
45
|
-
* `$HHOSTED_HOME/.hh/<id>/servers.config.json`: just the entries, each resolved
|
|
46
|
-
* against the workspace's defaults.
|
|
47
|
-
*/
|
|
42
|
+
/** `$HHOSTED_HOME/.hh/<id>/servers.config.json`, each entry resolved against the workspace defaults. */
|
|
48
43
|
export declare function parseServersFile(raw: unknown, defaults: Record<string, unknown>, options?: MigrationOptions): ServersParse;
|
|
49
44
|
/** Adds the stamp every write carries, so the next release can tell what wrote the file. */
|
|
50
45
|
export declare function stampConfig<T extends {
|
|
@@ -11,10 +11,5 @@ export declare const PROXY_MERGE_KEYS: Set<string>;
|
|
|
11
11
|
export declare const BACKUP_MERGE_KEYS: Set<string>;
|
|
12
12
|
export declare const EMPTY_MERGE_KEYS: Set<string>;
|
|
13
13
|
export declare function applyPatch(target: Record<string, unknown>, patch: Record<string, unknown>, mergeKeys: Set<string>): void;
|
|
14
|
-
/**
|
|
15
|
-
* Merges one nested group recursively — `health.http` is a group of its own, and
|
|
16
|
-
* replacing it wholesale would silently reset the siblings a partial patch never
|
|
17
|
-
* mentioned. An explicit `null` removes a key, which is how a schema-optional
|
|
18
|
-
* field is cleared.
|
|
19
|
-
*/
|
|
14
|
+
/** Merges one nested group recursively (`health.http` is its own group); `null` removes a key. */
|
|
20
15
|
export declare function mergeGroup(target: Record<string, unknown>, patch: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import type { ServerConfig } from '../shared/contracts.js';
|
|
2
2
|
import { backupsSchema, controlSchema, ddnsConfigSchema, defaultsSchema, hostSchema, logsSchema, notificationsSchema, proxyConfigSchema, serverSchema } from '../shared/contracts.js';
|
|
3
3
|
export { backupsSchema, controlSchema, ddnsConfigSchema, defaultsSchema, hostSchema, logsSchema, notificationsSchema, proxyConfigSchema, serverSchema };
|
|
4
|
-
/**
|
|
5
|
-
* Which release wrote the file, and the config shape it wrote. Optional so a
|
|
6
|
-
* config from before the stamp still reads, and so an archive made by an older
|
|
7
|
-
* release still restores.
|
|
8
|
-
*/
|
|
4
|
+
/** Which release wrote the file and its schema; optional so pre-stamp configs and archives still read. */
|
|
9
5
|
export declare const metaSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
10
6
|
writtenBy: import("arktype/internal/attributes.ts").Default<string, "">;
|
|
11
7
|
schema: import("arktype/internal/attributes.ts").Default<number, 1>;
|
|
12
8
|
}, {}>;
|
|
13
|
-
/**
|
|
14
|
-
* `$HHOSTED_HOME/.hh/settings.json`: the settings that belong to the panel
|
|
15
|
-
* itself — its listener, authentication, TLS policy, host vitals, backups and
|
|
16
|
-
* the reverse proxy. Nothing here is per workspace.
|
|
17
|
-
*/
|
|
9
|
+
/** `$HHOSTED_HOME/.hh/settings.json`: the panel's own settings, nothing per workspace. */
|
|
18
10
|
export declare const globalSettingsSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
19
11
|
control: import("arktype/internal/attributes.ts").Default<{
|
|
20
12
|
label: import("arktype/internal/attributes.ts").Default<string, "home-hosted">;
|
|
@@ -86,6 +78,7 @@ export declare const globalSettingsSchema: import("arktype/internal/variants/obj
|
|
|
86
78
|
path: import("arktype/internal/attributes.ts").Default<string, "">;
|
|
87
79
|
tls: import("arktype/internal/attributes.ts").Default<"auto" | "off" | "manual", "auto">;
|
|
88
80
|
dnsAccount: import("arktype/internal/attributes.ts").Default<string, "">;
|
|
81
|
+
upstreamSkipVerify?: boolean | undefined;
|
|
89
82
|
}[], never[]>;
|
|
90
83
|
}, {}>;
|
|
91
84
|
$schema?: string | undefined;
|
|
@@ -111,7 +104,7 @@ export declare const workspaceSettingsSchema: import("arktype/internal/variants/
|
|
|
111
104
|
}, {}>;
|
|
112
105
|
health: import("arktype/internal/attributes.ts").Default<{
|
|
113
106
|
enabled: import("arktype/internal/attributes.ts").Default<boolean, true>;
|
|
114
|
-
mode: import("arktype/internal/attributes.ts").Default<"
|
|
107
|
+
mode: import("arktype/internal/attributes.ts").Default<"port" | "http", "port">;
|
|
115
108
|
http: import("arktype/internal/attributes.ts").Default<{
|
|
116
109
|
scheme: import("arktype/internal/attributes.ts").Default<"http" | "https", "http">;
|
|
117
110
|
allowInvalidCert: import("arktype/internal/attributes.ts").Default<boolean, false>;
|
|
@@ -238,7 +231,7 @@ export declare const serversFileSchema: import("arktype/internal/variants/object
|
|
|
238
231
|
}, {}>;
|
|
239
232
|
health: import("arktype/internal/attributes.ts").Default<{
|
|
240
233
|
enabled: import("arktype/internal/attributes.ts").Default<boolean, true>;
|
|
241
|
-
mode: import("arktype/internal/attributes.ts").Default<"
|
|
234
|
+
mode: import("arktype/internal/attributes.ts").Default<"port" | "http", "port">;
|
|
242
235
|
http: import("arktype/internal/attributes.ts").Default<{
|
|
243
236
|
scheme: import("arktype/internal/attributes.ts").Default<"http" | "https", "http">;
|
|
244
237
|
allowInvalidCert: import("arktype/internal/attributes.ts").Default<boolean, false>;
|
|
@@ -268,6 +261,7 @@ export declare const serversFileSchema: import("arktype/internal/variants/object
|
|
|
268
261
|
}, {}>;
|
|
269
262
|
backupPaths: import("arktype/internal/attributes.ts").Default<string[], never[]>;
|
|
270
263
|
backupIgnoreGenerated: import("arktype/internal/attributes.ts").Default<boolean, true>;
|
|
264
|
+
secretEnv: import("arktype/internal/attributes.ts").Default<string[], never[]>;
|
|
271
265
|
label?: string | null | undefined;
|
|
272
266
|
bootstrap?: {
|
|
273
267
|
command: string;
|
|
@@ -276,6 +270,15 @@ export declare const serversFileSchema: import("arktype/internal/variants/object
|
|
|
276
270
|
timeoutMs: import("arktype/internal/attributes.ts").Default<number, 120000>;
|
|
277
271
|
runOnce: import("arktype/internal/attributes.ts").Default<boolean, true>;
|
|
278
272
|
} | null | undefined;
|
|
273
|
+
deploy?: {
|
|
274
|
+
steps: {
|
|
275
|
+
command: string;
|
|
276
|
+
args: import("arktype/internal/attributes.ts").Default<string[], never[]>;
|
|
277
|
+
timeoutMs: import("arktype/internal/attributes.ts").Default<number, 300000>;
|
|
278
|
+
cwd?: string | undefined;
|
|
279
|
+
}[];
|
|
280
|
+
restart: import("arktype/internal/attributes.ts").Default<boolean, true>;
|
|
281
|
+
} | null | undefined;
|
|
279
282
|
dump?: {
|
|
280
283
|
command: string;
|
|
281
284
|
args: import("arktype/internal/attributes.ts").Default<string[], never[]>;
|
|
@@ -309,10 +312,5 @@ export type ResolvedWorkspaceConfig = ResolvedWorkspaceSettings & {
|
|
|
309
312
|
export declare const GLOBAL_SETTINGS_KEYS: readonly ["$schema", "meta", "control", "host", "backups", "proxy"];
|
|
310
313
|
export declare const WORKSPACE_SETTINGS_KEYS: readonly ["$schema", "meta", "defaults", "logs", "notifications", "ddns"];
|
|
311
314
|
export declare const SERVERS_FILE_KEYS: readonly ["$schema", "meta", "servers"];
|
|
312
|
-
/**
|
|
313
|
-
* Resolves one entry against the workspace's server defaults. A group (`restart`,
|
|
314
|
-
* `health`, `health.http`, `stop`) merges key by key, so an entry that decides one
|
|
315
|
-
* member does not silently fall back to the *schema* default for the others — which
|
|
316
|
-
* is the whole point of the workspace having defaults at all.
|
|
317
|
-
*/
|
|
315
|
+
/** Resolves one entry against the workspace defaults; groups merge key by key, not back to schema defaults. */
|
|
318
316
|
export declare function mergeDefaults(defaults: Record<string, unknown>, entry: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -9,40 +9,19 @@ export interface SecretPart {
|
|
|
9
9
|
/** Every secret this release knows about, set or not — the view lists the slots so a person sees one. */
|
|
10
10
|
export declare const KNOWN_SECRET_KEYS: Record<SecretScope, string[]>;
|
|
11
11
|
/**
|
|
12
|
-
* The parts of one scope
|
|
13
|
-
*
|
|
14
|
-
* key present in `present`, sorted, as its own part with `fields: [key]`.
|
|
15
|
-
*
|
|
16
|
-
* An unknown key is taken as belonging to the scope being asked about, because the file
|
|
17
|
-
* it was read from is the only evidence of where it lives: this release does not know the
|
|
18
|
-
* key, so classifying it by name would drop a future *global* secret on the floor.
|
|
12
|
+
* The parts of one scope: known parts first in a fixed order, then any other key present, sorted.
|
|
13
|
+
* An unknown key belongs to the scope asked about, since its file is the only evidence of where it lives.
|
|
19
14
|
*/
|
|
20
15
|
export declare function secretParts(scope: SecretScope, present: string[]): SecretPart[];
|
|
21
|
-
/** The top-level keys of a raw secrets document that hold a non-null value. */
|
|
22
16
|
export declare function presentSecretKeys(source: Record<string, unknown>): string[];
|
|
23
|
-
/**
|
|
24
|
-
* A JSON string carrying only `fields`, taken from `source`. Returns null when `source`
|
|
25
|
-
* carries none of them. Always includes a field whose value is `null` ONLY if it is
|
|
26
|
-
* present as a key and non-null; a null/absent field is omitted.
|
|
27
|
-
*/
|
|
17
|
+
/** A JSON string carrying only the non-null `fields` of `source`, or null when it carries none. */
|
|
28
18
|
export declare function pickSecrets(source: Record<string, unknown>, fields: string[]): string | null;
|
|
29
|
-
/**
|
|
30
|
-
* The same removal, applied to a whole secrets **document** rather than one field's value.
|
|
31
|
-
*
|
|
32
|
-
* `pickSecrets` already drops the field, but a backup that selects every secret copies the file
|
|
33
|
-
* whole and so bypassed it. This is that whole-file path: the document keeps every other key —
|
|
34
|
-
* including `null` slots and keys this release does not know — and differs only in that
|
|
35
|
-
* `password.initial` is gone. Returns `null` when the text is not a JSON object, so the caller can
|
|
36
|
-
* fall back to its ordinary copy.
|
|
37
|
-
*/
|
|
19
|
+
/** The same removal over a whole secrets document; `null` when the text is not a JSON object. */
|
|
38
20
|
export declare function withoutInitialPassword(text: string): string | null;
|
|
39
21
|
/** Parses a secrets document, tolerating anything: not-an-object, or broken JSON returns {}. */
|
|
40
22
|
export declare function parseSecrets(text: string): Record<string, unknown>;
|
|
41
23
|
/**
|
|
42
|
-
* Merges `piece` into `current`, changing
|
|
43
|
-
*
|
|
44
|
-
* the DDNS credentials). A field that is absent from `piece` is also DELETED from the
|
|
45
|
-
* result, so restoring an older archive that predates a secret clears it rather than
|
|
46
|
-
* leaving a stale value. Returns a new object; does not mutate its arguments.
|
|
24
|
+
* Merges `piece` into `current`, changing only `fields`; a field absent from `piece` is deleted, so an
|
|
25
|
+
* older archive clears a secret it predates. Does not mutate its arguments.
|
|
47
26
|
*/
|
|
48
27
|
export declare function mergeSecrets(current: Record<string, unknown>, piece: Record<string, unknown>, fields: string[]): Record<string, unknown>;
|