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,15 +1,7 @@
|
|
|
1
1
|
import type { ProxyCertificateView, ProxyConfig, ProxyPatch, ProxyRoute, ProxyRoutePatch } from './contracts.js';
|
|
2
2
|
/**
|
|
3
|
-
* The reverse-proxy form, shared by both UIs
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* These declarations were identical copies in `uis/stock` and `uis/noc-console`
|
|
7
|
-
* (`parseUpstream` differs only in a doc comment, so it takes the fuller one). Eight commits had
|
|
8
|
-
* touched both files, one literally "carry the fix into the other UI" — a measured cost.
|
|
9
|
-
*
|
|
10
|
-
* Nothing here may import Vue: the UIs bundle it as a devDependency while the published package
|
|
11
|
-
* does not ship it, so a Vue import would break the server if it ever read this file. That is also
|
|
12
|
-
* why the detach is `clonePlain` (`./clone.ts`), never `structuredClone(toRaw(...))`.
|
|
3
|
+
* The reverse-proxy form, shared by both UIs. No Vue imports (the server may read this file), which
|
|
4
|
+
* is also why the detach is `clonePlain`, never `structuredClone(toRaw(...))`.
|
|
13
5
|
*/
|
|
14
6
|
export interface CertificateErrors {
|
|
15
7
|
label?: string;
|
|
@@ -17,10 +9,7 @@ export interface CertificateErrors {
|
|
|
17
9
|
certificate?: string;
|
|
18
10
|
privateKey?: string;
|
|
19
11
|
}
|
|
20
|
-
export declare const HOST_PATTERN: RegExp;
|
|
21
|
-
export declare const LOCAL_LISTENER: RegExp;
|
|
22
12
|
export declare const LOCAL_TLDS: string[];
|
|
23
|
-
/** The panel-wide block a save writes besides the route table. */
|
|
24
13
|
export interface ListenerDraft {
|
|
25
14
|
enabled: boolean;
|
|
26
15
|
httpPort: number;
|
|
@@ -32,7 +21,7 @@ export interface ListenerDraft {
|
|
|
32
21
|
/** Nameservers the engine checks the record against, as typed: one per line or comma. */
|
|
33
22
|
resolvers: string;
|
|
34
23
|
}
|
|
35
|
-
/**
|
|
24
|
+
/** A fresh object, so editing it never touches live state. */
|
|
36
25
|
export declare function cloneListenerDraft(config: ProxyConfig): ListenerDraft;
|
|
37
26
|
export interface ProxyWorkspace {
|
|
38
27
|
id: string;
|
|
@@ -55,14 +44,7 @@ export interface RouteErrors {
|
|
|
55
44
|
path?: string;
|
|
56
45
|
form?: string;
|
|
57
46
|
}
|
|
58
|
-
/**
|
|
59
|
-
* The sentences `validateRouteDraft` puts in {@link RouteErrors}, as a seam for translation.
|
|
60
|
-
*
|
|
61
|
-
* The rules belong here — both UIs must refuse the same input for the same reason — but the
|
|
62
|
-
* wording does not: a UI shipping more than one language has to render these in the reader's
|
|
63
|
-
* language, and `src/shared/` may not import Vue or the UI's i18n. So the caller passes messages
|
|
64
|
-
* and the defaults keep every existing caller's output byte-identical.
|
|
65
|
-
*/
|
|
47
|
+
/** The sentences `validateRouteDraft` returns, as a translation seam; the rules stay shared. */
|
|
66
48
|
export interface RouteErrorMessages {
|
|
67
49
|
hostRequired: () => string;
|
|
68
50
|
hostInvalid: () => string;
|
|
@@ -75,7 +57,7 @@ export interface RouteErrorMessages {
|
|
|
75
57
|
serverRequired: () => string;
|
|
76
58
|
urlInvalid: () => string;
|
|
77
59
|
}
|
|
78
|
-
/** The
|
|
60
|
+
/** The route list's words for a target or a retry delay, as a translation seam. */
|
|
79
61
|
export interface RouteSummaryLabels {
|
|
80
62
|
controlPanel: () => string;
|
|
81
63
|
noUpstream: () => string;
|
|
@@ -86,9 +68,7 @@ export interface RouteSummaryLabels {
|
|
|
86
68
|
}
|
|
87
69
|
export declare const UNPRIVILEGED_HTTPS_PORT = 4443;
|
|
88
70
|
export declare const UNPRIVILEGED_HTTP_PORT = 4480;
|
|
89
|
-
/** One uploaded pair, as the list shows it; the files themselves are on disk. */
|
|
90
71
|
export declare function certificateTitle(certificate: Pick<ProxyCertificateView, 'label' | 'id'>): string;
|
|
91
|
-
/** The first public name that would need the e-mail, for the hint to name it. */
|
|
92
72
|
export declare function firstPublicHost(routes: readonly RouteDraft[]): string | null;
|
|
93
73
|
export declare function formatBytes(bytes: number | null): string;
|
|
94
74
|
export declare function isPrivilegedPort(port: number): boolean;
|
|
@@ -97,88 +77,67 @@ export declare function isPublicHost(host: string): boolean;
|
|
|
97
77
|
export declare function listenerPatch(current: ProxyConfig, draft: ListenerDraft): Partial<ProxyPatch>;
|
|
98
78
|
export declare function newRouteDraft(): RouteDraft;
|
|
99
79
|
export declare function newRouteKey(): string;
|
|
100
|
-
/**
|
|
101
|
-
* A detached, plain copy of the route list, so an edit cannot reach live state.
|
|
102
|
-
*
|
|
103
|
-
* `clonePlain`, not `structuredClone(toRaw(...))`: a list the page rebuilt holds Vue proxies
|
|
104
|
-
* inside the raw array, and the clone then throws `DataCloneError`.
|
|
105
|
-
*/
|
|
80
|
+
/** A detached copy: `structuredClone(toRaw(...))` throws on Vue proxies inside a rebuilt list. */
|
|
106
81
|
export declare function cloneRoutes(routes: readonly ProxyRoute[]): RouteDraft[];
|
|
107
82
|
/**
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* `edited` is matched by route **id**, never by the row's `key`: a state frame arriving while the
|
|
111
|
-
* dialog is open re-clones the list and mints a fresh key per row, so the row the dialog was opened
|
|
112
|
-
* from no longer matches by key — and the edit was then dropped with the dialog closing as if it
|
|
113
|
-
* had saved. An id survives the re-clone. `null` means the dialog is adding, which is why the add
|
|
114
|
-
* case is not "no match found".
|
|
83
|
+
* Matched by route **id**, not row `key`: a state frame re-clones the list with fresh keys while the
|
|
84
|
+
* dialog is open. `edited: null` means the dialog is adding.
|
|
115
85
|
*/
|
|
116
86
|
export declare function applyRouteDraft(routes: readonly RouteDraft[], edited: RouteDraft | null, next: RouteDraft): RouteDraft[];
|
|
117
87
|
/** Nameservers as typed: split on commas or newlines, trimmed, empties dropped. */
|
|
118
88
|
export declare function parseResolvers(value: string): string[];
|
|
119
89
|
/** The whole patch a save sends, or `null` when nothing changed. */
|
|
120
90
|
export declare function proxyPatch(current: ProxyConfig, listener: ListenerDraft, drafts: readonly RouteDraft[], filledRoutes?: readonly ProxyRoute[]): ProxyPatch | null;
|
|
121
|
-
/**
|
|
122
|
-
* The e-mail rule the panel enforces: a public name served over TLS needs an
|
|
123
|
-
* ACME account address. A local-only name gets the engine's own CA, so a
|
|
124
|
-
* LAN-only setup never needs one.
|
|
125
|
-
*/
|
|
91
|
+
/** A public name served over TLS needs an ACME account address; a local name uses the engine's own CA. */
|
|
126
92
|
export declare function requiresEmail(listener: Pick<ListenerDraft, 'email' | 'staging'>, routes: readonly RouteDraft[]): boolean;
|
|
127
93
|
export declare function retryInLabel(minutes: number | null, labels?: RouteSummaryLabels): string;
|
|
128
|
-
/**
|
|
129
|
-
* Where a route answers, for the list's link. A route with TLS off is served on the
|
|
130
|
-
* plain port, and a standard port stays out of the URL.
|
|
131
|
-
*/
|
|
94
|
+
/** Where a route answers: TLS off means the plain port, and a standard port stays out of the URL. */
|
|
132
95
|
export declare function routeUrl(route: Pick<ProxyRoute, 'host' | 'path' | 'tls'>, httpPort: number, httpsPort: number): string | null;
|
|
133
96
|
export declare function routesEqual(current: readonly ProxyRoute[], drafts: readonly RouteDraft[]): boolean;
|
|
134
97
|
/**
|
|
135
|
-
* The route table to send, or `null` when unchanged.
|
|
136
|
-
*
|
|
137
|
-
* `filled` is the table this form was filled with. With it the patch is a three-way merge, so a
|
|
138
|
-
* route another client added while the page was open survives a save from this one; without it the
|
|
139
|
-
* draft's whole view is sent, which is only safe when the caller knows it holds the current table.
|
|
98
|
+
* The route table to send, or `null` when unchanged. With `filled` (the table the form was filled
|
|
99
|
+
* with) it is a three-way merge, so a route another client added meanwhile survives.
|
|
140
100
|
*/
|
|
141
101
|
export declare function routesPatch(current: readonly ProxyRoute[], drafts: readonly RouteDraft[], filled?: readonly ProxyRoute[]): ProxyRoutePatch[] | null;
|
|
142
|
-
/**
|
|
143
|
-
* The routes both this form and another client changed, so the save can refuse instead of choosing.
|
|
144
|
-
*
|
|
145
|
-
* Same rule as `destinationConflicts`: a three-way merge keeps a concurrent addition but cannot keep
|
|
146
|
-
* a concurrent edit to one route, because both sides moved it off the same baseline.
|
|
147
|
-
*/
|
|
102
|
+
/** Routes both this form and another client changed: a merge cannot keep both edits, so the save refuses. */
|
|
148
103
|
export declare function routeConflicts(current: readonly ProxyRoute[], drafts: readonly RouteDraft[], filled?: readonly ProxyRoute[]): string[];
|
|
149
|
-
export declare function sameWire(a: ProxyRoute, b: ProxyRoute): boolean;
|
|
150
|
-
/** A certificate is named by its label; the id names the files on disk. */
|
|
151
104
|
export declare function slugifyCertificateId(label: string): string;
|
|
152
105
|
export declare function slugifyId(value: string, fallback: string): string;
|
|
153
106
|
export declare function slugifyRouteId(host: string): string;
|
|
154
|
-
/** What the target column reads: who a route forwards to. */
|
|
155
107
|
export declare function targetSummary(route: ProxyRoute, workspaces: readonly ProxyWorkspace[], labels?: RouteSummaryLabels): string;
|
|
156
108
|
export declare function toProxyRoutes(drafts: readonly RouteDraft[]): ProxyRoutePatch[];
|
|
157
|
-
/**
|
|
158
|
-
* The wire shape of a route: a row key is a UI detail, and the schema rejects
|
|
159
|
-
* undeclared keys.
|
|
160
|
-
*/
|
|
161
|
-
export declare function toRouteWire(route: ProxyRoute): ProxyRoutePatch;
|
|
162
109
|
export declare function uniqueCertificateId(base: string, taken: readonly string[]): string;
|
|
163
110
|
export declare function uniqueId(base: string, taken: readonly string[]): string;
|
|
164
111
|
export declare function uniqueRouteId(base: string, taken: readonly string[]): string;
|
|
165
|
-
/** True while the ports are the unprivileged pair this page offers as a switch. */
|
|
166
112
|
export declare function usesFallbackPorts(config: Pick<ProxyConfig, 'httpPort' | 'httpsPort'>): boolean;
|
|
167
113
|
export declare function validateRouteDraft(draft: RouteDraft, options: {
|
|
168
114
|
others: readonly RouteDraft[];
|
|
169
115
|
workspaces: readonly ProxyWorkspace[];
|
|
170
116
|
messages?: Partial<RouteErrorMessages>;
|
|
171
117
|
}): RouteErrors;
|
|
118
|
+
/** An upstream the engine can dial: what the server renders, the exposure rule judges and the form accepts. */
|
|
119
|
+
export interface UpstreamTarget {
|
|
120
|
+
/** The hostname as `new URL` normalizes it: lower-case, IPv6 in brackets, `127.1` spelled out. */
|
|
121
|
+
host: string;
|
|
122
|
+
port: number;
|
|
123
|
+
/** `host:port`, the engine's dial address. */
|
|
124
|
+
dial: string;
|
|
125
|
+
/** The upstream speaks TLS. */
|
|
126
|
+
tls: boolean;
|
|
127
|
+
}
|
|
172
128
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* A typed default port is dropped on the way to the panel: `new URL` normalizes
|
|
177
|
-
* `:80` on `http:` away, so `http://10.0.0.5:80` and `http://10.0.0.5` are one
|
|
178
|
-
* upstream, and a route table that keeps both forms would read as unchanged after
|
|
179
|
-
* a save that the panel had actually rewritten.
|
|
129
|
+
* `host:port`, `http://host[:port]` or `https://host[:port]`. Anything the engine cannot honour — a
|
|
130
|
+
* path, query, fragment, credentials, another scheme — is refused rather than truncated.
|
|
180
131
|
*/
|
|
132
|
+
export declare function upstreamTarget(value: string): UpstreamTarget | null;
|
|
133
|
+
/** Host and port with the scheme's default filled in: `http://10.0.0.5:80` and `http://10.0.0.5` are one. */
|
|
181
134
|
export declare function parseUpstream(value: string): {
|
|
182
135
|
host: string;
|
|
183
136
|
port: string;
|
|
184
137
|
} | null;
|
|
138
|
+
/** A route's hostname as the engine matches it: case-insensitive, no trailing dot. */
|
|
139
|
+
export declare function routeHostKey(host: string): string;
|
|
140
|
+
/** `''` for the whole host, otherwise a leading slash and no trailing one. */
|
|
141
|
+
export declare function canonicalRoutePath(path: string): string;
|
|
142
|
+
/** Caddy's host and path matchers are case-insensitive, so `/App` shadows `/app`. */
|
|
143
|
+
export declare function routeKey(route: Pick<ProxyRoute, 'host' | 'path'>): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ProxyConfig } from './contracts.js';
|
|
2
|
+
/** What a route's `dnsAccount` resolves to, for the save-time check. */
|
|
3
|
+
export interface DnsAccountCheck {
|
|
4
|
+
provider: string;
|
|
5
|
+
/** The provider can write a TXT record, which is the only thing a challenge needs. */
|
|
6
|
+
writesTxt: boolean;
|
|
7
|
+
/** Credentials are stored for the account. */
|
|
8
|
+
hasCredentials: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Cross-field problems ArkType cannot see, reported by the API before a save. */
|
|
11
|
+
export declare function validateProxyConfig(config: ProxyConfig, dnsAccount?: (ref: string, workspaceId: string) => DnsAccountCheck | null): string[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query values parsed at the boundary: anything outside the accepted spellings or bounds is a
|
|
3
|
+
* `400 INVALID_INPUT`, never a silent default. `yes`/`no`/`on`/`off` are refused deliberately.
|
|
4
|
+
*/
|
|
5
|
+
/** A flag: `0`, `1`, `true` or `false`, parsed to a boolean. */
|
|
6
|
+
export declare const booleanParam: import("arktype/internal/variants/object.ts").ObjectType<(In: "0" | "1" | "false" | "true") => import("arktype").Out<boolean>, {}>;
|
|
7
|
+
/** A whole decimal integer within `min`–`max`, parsed to a number; out of bounds is refused, not clamped. */
|
|
8
|
+
export declare function integerParam(min: number, max: number): import("arktype/internal/variants/object.ts").ObjectType<(In: string) => import("arktype/internal/attributes.ts").To<number>, {}>;
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
import type { HealthState, ServerStatus } from './contracts.js';
|
|
2
2
|
/**
|
|
3
|
-
* Whether one entry is a problem someone has to look at
|
|
4
|
-
*
|
|
5
|
-
* Every surface that answers "is anything wrong" asks this question — the panel's own `/healthz`,
|
|
6
|
-
* which an external monitor polls, and the three "needs attention" counts and filters the UIs draw
|
|
7
|
-
* — and it was written out at **seven** call sites as a hand-picked disjunction. They had already
|
|
8
|
-
* disagreed, in both directions, and each disagreement was invisible from the surface that got it
|
|
9
|
-
* right:
|
|
10
|
-
*
|
|
11
|
-
* - **`/healthz` said `ok` with a `conflict` entry.** Its filter named `crashed`, `stoppedByPanel`
|
|
12
|
-
* and a running-unhealthy entry, but not `conflict` — the status that means "this entry cannot
|
|
13
|
-
* start because its port is held". Measured on a panel whose only entry was blocked:
|
|
14
|
-
* `GET /healthz` → `200 {"status":"ok"}` while `GET /_hh/usage` and the card both read
|
|
15
|
-
* `web conflict`. A monitor watching that endpoint reported a healthy home with a server down.
|
|
16
|
-
*
|
|
17
|
-
* - **The UIs said nothing about an entry the panel itself gave up on.** They read `health` and
|
|
18
|
-
* `status` but never `stoppedByPanel`, so an entry stopped after its health budget was spent
|
|
19
|
-
* counted as "stopped", which is the status the same predicate deliberately treats as fine. The
|
|
20
|
-
* card kept its reason on `lastError` and `/healthz` answered 503, so the one page a person opens
|
|
21
|
-
* to find out what broke was the one place it was not counted.
|
|
22
|
-
*
|
|
23
|
-
* Both are the same defect: a question with several right answers, decided once per call site. The
|
|
24
|
-
* list is read from the **status enum**, not from whichever statuses a given surface happened to
|
|
25
|
-
* think of, and `stoppedByPanel` is part of it because `stopped` cannot say which stop it was.
|
|
26
|
-
*
|
|
27
|
-
* A deliberate stop is not here, and that is the distinction the statuses exist to make: stopping
|
|
28
|
-
* sets `stopped`, never `crashed` or `conflict`. `stoppedByPanel` is the exception, because the
|
|
29
|
-
* panel stopping an entry that cannot serve is a broken service, not an operator's decision.
|
|
3
|
+
* Whether one entry is a problem someone has to look at — the one answer for `/healthz` and every
|
|
4
|
+
* UI count. A deliberate stop is fine; `stoppedByPanel` is not, since the panel gave up on it.
|
|
30
5
|
*/
|
|
31
6
|
export interface AttentionSource {
|
|
32
7
|
status: ServerStatus;
|
|
@@ -1,36 +1,21 @@
|
|
|
1
1
|
import type { HealthConfig, HttpCheckConfig, OnPortConflict, RestartConfig, ServerConfig, StopConfig } from './contracts.js';
|
|
2
2
|
import type { Patch } from './patch-diff.js';
|
|
3
3
|
/**
|
|
4
|
-
* Editing one
|
|
5
|
-
*
|
|
6
|
-
* `uis/stock`'s `ServerConfigEditor` and `uis/noc-console`'s `ServerConfigView` each carried this
|
|
7
|
-
* whole round trip, and they had drifted: the console read every box with `Number(...)`, so a
|
|
8
|
-
* cleared `grace (ms)` saved `0` — an instant SIGKILL on the next stop — while the stock editor
|
|
9
|
-
* repaired some boxes by hand and clamped others; only one of them could edit `dump`/`load`; both
|
|
10
|
-
* showed the hook timeouts in ms although their floor is a second. The UIs keep their own markup
|
|
11
|
-
* and their own form objects; what a value *means* is decided here, once.
|
|
12
|
-
*
|
|
13
|
-
* Every numeric box is a `NumericInput` — a native `<input>` reports a string, a number field a
|
|
14
|
-
* number, `NaN` or `null` — and a box that decided nothing (blank or unreadable) falls back to the
|
|
15
|
-
* value the form was **filled** from, never to `0`.
|
|
4
|
+
* Editing one server entry, shared by both UIs: config → form → payload → patch. A numeric box that
|
|
5
|
+
* decided nothing (blank or unreadable) falls back to the value the form was **filled** from, never `0`.
|
|
16
6
|
*/
|
|
17
|
-
/** What a numeric box can hold, across both UIs' controls. */
|
|
18
7
|
export type NumericInput = number | string | null | undefined;
|
|
19
|
-
/** Default hook timeouts, as `contracts.ts` declares them. */
|
|
20
8
|
export declare const BOOTSTRAP_TIMEOUT_MS = 120000;
|
|
21
9
|
export declare const BACKUP_HOOK_TIMEOUT_MS = 600000;
|
|
22
|
-
/** Whether a box was left empty, as opposed to holding something unreadable. */
|
|
23
10
|
export declare function isBlankInput(raw: NumericInput): boolean;
|
|
24
11
|
/** A numeric box as a number; `NaN` when it decided nothing (blank or unreadable). */
|
|
25
12
|
export declare function readFormNumber(raw: NumericInput): number;
|
|
26
|
-
/** Every number member of `T` loosened to what a box reports. */
|
|
27
13
|
type Loose<T, N> = {
|
|
28
14
|
[K in keyof T]-?: T[K] extends number ? N : T[K];
|
|
29
15
|
};
|
|
30
16
|
export interface HookForm<N extends NumericInput = NumericInput> {
|
|
31
17
|
enabled: boolean;
|
|
32
18
|
command: string;
|
|
33
|
-
/** One per line. */
|
|
34
19
|
args: string;
|
|
35
20
|
/** `KEY=value` per line. */
|
|
36
21
|
env: string;
|
|
@@ -40,15 +25,11 @@ export interface HookForm<N extends NumericInput = NumericInput> {
|
|
|
40
25
|
export interface BootstrapForm<N extends NumericInput = NumericInput> extends HookForm<N> {
|
|
41
26
|
runOnce: boolean;
|
|
42
27
|
}
|
|
43
|
-
/**
|
|
44
|
-
* The form, with `N` the type its numeric boxes hold: a number field's `number | null`, or the
|
|
45
|
-
* string a native `<input>` reports.
|
|
46
|
-
*/
|
|
28
|
+
/** `N` is what the numeric boxes hold: a number field's `number | null`, or an `<input>`'s string. */
|
|
47
29
|
export interface ServerEditForm<N extends NumericInput = NumericInput> {
|
|
48
30
|
label: string;
|
|
49
31
|
command: string;
|
|
50
32
|
cwd: string;
|
|
51
|
-
/** One per line. */
|
|
52
33
|
args: string;
|
|
53
34
|
env: string;
|
|
54
35
|
dataEnvs: string;
|
|
@@ -57,9 +38,13 @@ export interface ServerEditForm<N extends NumericInput = NumericInput> {
|
|
|
57
38
|
/** Comma separated. */
|
|
58
39
|
dependsOn: string;
|
|
59
40
|
envFile: string;
|
|
41
|
+
/** Secret variable **names**, one per line — never a value; values use their own write-only route. */
|
|
42
|
+
secretEnv: string;
|
|
43
|
+
/** One deploy step per line: `command arg arg`. */
|
|
44
|
+
deploySteps: string;
|
|
45
|
+
deployRestart: boolean;
|
|
60
46
|
/** MiB; blank is "no guard". */
|
|
61
47
|
maxRssMb: N;
|
|
62
|
-
/** Blank is "no port". */
|
|
63
48
|
port: N;
|
|
64
49
|
bind: string;
|
|
65
50
|
onPortConflict: OnPortConflict;
|
|
@@ -78,44 +63,20 @@ export interface ServerEditForm<N extends NumericInput = NumericInput> {
|
|
|
78
63
|
dump: HookForm<N>;
|
|
79
64
|
load: HookForm<N>;
|
|
80
65
|
}
|
|
81
|
-
/**
|
|
66
|
+
/** Detached: nothing in it aliases `config`. */
|
|
82
67
|
export declare function serverEditForm(config: ServerConfig): ServerEditForm<number | null>;
|
|
83
|
-
/**
|
|
84
|
-
* Seconds back to the stored ms, keeping the filled value when the box still shows it.
|
|
85
|
-
*
|
|
86
|
-
* A stored `1500` reads `2` s; writing `2000` back for a box nobody touched would be a phantom
|
|
87
|
-
* change on every open, so an unchanged reading keeps the exact stored milliseconds.
|
|
88
|
-
*/
|
|
68
|
+
/** Keeps the stored ms when the box still shows its rounded value, so an untouched box is no change. */
|
|
89
69
|
export declare function hookTimeoutMs(raw: NumericInput, filledMs: number | undefined, defaultMs: number): number;
|
|
90
|
-
/**
|
|
91
|
-
* The whole entry as the form now describes it.
|
|
92
|
-
*
|
|
93
|
-
* `filled` is the config the form was filled from: a box that decided nothing falls back to its
|
|
94
|
-
* value. That is also what `serverEditPatch` diffs against, so an untouched field never travels.
|
|
95
|
-
*/
|
|
70
|
+
/** The whole entry as the form now describes it; a box that decided nothing falls back to `filled`. */
|
|
96
71
|
export declare function serverEditPayload(form: ServerEditForm, filled: ServerConfig): Patch;
|
|
97
|
-
/**
|
|
98
|
-
* Exactly what Save writes: the payload minus everything equal to the **filled** snapshot.
|
|
99
|
-
*
|
|
100
|
-
* Diffing against live state instead would treat another client's change as this form's own and
|
|
101
|
-
* write the old value back over it.
|
|
102
|
-
*/
|
|
72
|
+
/** The payload minus everything equal to the **filled** snapshot, not live state. */
|
|
103
73
|
export declare function serverEditPatch(form: ServerEditForm, filled: ServerConfig): Patch;
|
|
104
|
-
/**
|
|
105
|
-
* Whether a live config object is a genuine change from the one a form was filled from.
|
|
106
|
-
*
|
|
107
|
-
* By value, because the control plane re-creates every config object on each state frame: an
|
|
108
|
-
* identity check would call every frame a change. `snapshot` must be an independent copy.
|
|
109
|
-
*/
|
|
74
|
+
/** By value: the control plane re-creates every config object on each frame. */
|
|
110
75
|
export declare function isLiveConfigChange(next: unknown, snapshot: unknown): boolean;
|
|
111
76
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* `keep` — nothing changed. `refill` — the config moved and the form holds no edits, so it shows the
|
|
115
|
-
* new values. `notice` — it moved while the form holds edits: they are kept (Save sends only them),
|
|
116
|
-
* and the person is told, rather than having what they typed wiped by someone else's save.
|
|
77
|
+
* `refill` when the config moved and the form holds no edits; `notice` when it holds edits, which
|
|
78
|
+
* are kept and the person told.
|
|
117
79
|
*/
|
|
118
80
|
export declare function liveConfigUpdate(next: ServerConfig | null | undefined, filled: ServerConfig, dirty: boolean): 'keep' | 'refill' | 'notice';
|
|
119
|
-
/** A detached snapshot of the config a form is filled from. */
|
|
120
81
|
export declare function fillSnapshot(config: ServerConfig): ServerConfig;
|
|
121
82
|
export {};
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The SSE bucket key: one server inside one workspace.
|
|
3
|
-
*
|
|
4
|
-
* A server id is only unique within its workspace, so anything keyed by id alone mixes frames between
|
|
5
|
-
* same-named servers — and this key was **three separate definitions**: `services/events.ts` (which
|
|
6
|
-
* dispatches) and both UIs' composables (which subscribe). Byte-identical today, but a change to the
|
|
7
|
-
* format on either side would route messages to the wrong bucket or to none, silently — the panel
|
|
8
|
-
* would simply stop updating, with nothing to error on.
|
|
9
|
-
*
|
|
10
|
-
* It lives in `src/shared` rather than a UI because this module imports no Vue and is reachable from
|
|
11
|
-
* the server and both UIs alike.
|
|
12
|
-
*/
|
|
1
|
+
/** The SSE bucket key, shared by the dispatcher and both UIs: a server id is only unique within its workspace. */
|
|
13
2
|
export declare function serverKey(workspaceId: string, serverId: string): string;
|
|
@@ -1,32 +1,17 @@
|
|
|
1
1
|
import type { ServerStatus } from './contracts.js';
|
|
2
2
|
/**
|
|
3
|
-
* The measurements that
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
* last CPU/RSS sample of that process tree. A viewer is told to read them as *now*, so an entry
|
|
7
|
-
* that is not running has no reading — not a stale one.
|
|
8
|
-
*
|
|
9
|
-
* The panel clears them when a process ends, but a **newer UI is served against an older panel**
|
|
10
|
-
* (the documented upgrade rule), and a panel before this release kept them across a stop of an
|
|
11
|
-
* adopted successor. The verdict is on the wire beside the number, so the UI gates on that rather
|
|
12
|
-
* than trusting the fields' presence — the same rule the unhealthy duration follows.
|
|
13
|
-
*
|
|
14
|
-
* The input is **structural** rather than `ServerView`: `noc-console` builds its rows from a
|
|
15
|
-
* locally-decoded frame whose `config` is looser than the contract's, and demanding the full type
|
|
16
|
-
* would push a cast into every call site.
|
|
17
|
-
*
|
|
18
|
-
* `portState` is deliberately not here: whether the *port* is occupied outlives the process that
|
|
19
|
-
* used it (a stop leaves the occupancy probe meaningful), which is why the panel keeps taking it
|
|
20
|
-
* while stopped.
|
|
3
|
+
* The measurements of one run, read as *now*: an entry that is not running has none, not stale ones.
|
|
4
|
+
* Gated on `status` rather than the fields' presence, because an older panel may still send them.
|
|
5
|
+
* `portState` is not here: port occupancy outlives the process.
|
|
21
6
|
*/
|
|
22
7
|
export interface LiveReadings {
|
|
23
|
-
/**
|
|
8
|
+
/** Milliseconds. */
|
|
24
9
|
responseMs: number | null;
|
|
25
10
|
cpuPercent: number | null;
|
|
26
11
|
rssBytes: number | null;
|
|
27
12
|
processes: number | null;
|
|
28
13
|
}
|
|
29
|
-
/**
|
|
14
|
+
/** Structural rather than `ServerView`, so `noc-console`'s looser decoded rows fit without a cast. */
|
|
30
15
|
export interface ReadingSource {
|
|
31
16
|
status: ServerStatus;
|
|
32
17
|
responseMs?: number | null;
|
|
@@ -39,17 +24,7 @@ export interface ReadingSource {
|
|
|
39
24
|
/** The live readings of one entry, absent rather than stale once its process is gone. */
|
|
40
25
|
export declare function liveReadings(server: ReadingSource): LiveReadings;
|
|
41
26
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* An aggregate is a reading of the *set*, so it inherits the set's absence: if one entry has no
|
|
45
|
-
* sample the total is `null`, never the other entries' sum. `OverviewView` summed a workspace's CPU
|
|
46
|
-
* with `?? 0` and printed `0.0% cpu now`, so a workspace whose only server had just started — the
|
|
47
|
-
* first sampling window has no window to measure yet — claimed a measured `0.0%`. That is the
|
|
48
|
-
* fabricated idle process the predicate above exists to prevent, in the one number that summarises
|
|
49
|
-
* every entry at once, and it was the same shape for process memory.
|
|
50
|
-
*
|
|
51
|
-
* An empty list is a genuine `0`: nothing is running, and the surface beside it says so. A member
|
|
52
|
-
* that honestly measured `0` also survives, because `0` is a number and only a missing one is
|
|
53
|
-
* absent.
|
|
27
|
+
* A reading summed across entries. One member without a sample makes the total `null`, never the
|
|
28
|
+
* others' sum; an empty list is a genuine `0`.
|
|
54
29
|
*/
|
|
55
30
|
export declare function sumReadings(servers: ReadingSource[], field: keyof LiveReadings): number | null;
|
|
@@ -1,43 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The address a *browser* should open for a server entry.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* machine's LAN address (`displayHost` → `lanAddress`). Someone who reached the panel over a public
|
|
6
|
-
* hostname or a tunnel — `http://box.example:4999` — has no route to `192.168.1.20:4991`, so every
|
|
7
|
-
* "open server" link was dead for exactly the users the bind was opened for. Only the browser knows
|
|
8
|
-
* the name that reached the panel, so the swap happens here, in the one module both UIs read.
|
|
9
|
-
*
|
|
10
|
-
* The entry's own address is kept unless the swap is *provably* right:
|
|
11
|
-
*
|
|
12
|
-
* - a `lan` bind (`0.0.0.0`) listens on every interface, so whatever name reached the panel also
|
|
13
|
-
* reaches the entry, on the entry's own port;
|
|
14
|
-
* - any other bind is reachable at that address and nowhere else. A specific IP must be kept, and
|
|
15
|
-
* rewriting a loopback entry would turn "not reachable from here" into a link to the panel;
|
|
16
|
-
* - and if the page itself is loopback the viewer is on this machine, where the LAN address is
|
|
17
|
-
* already the right answer.
|
|
18
|
-
*
|
|
19
|
-
* The scheme and the entry's port are never touched: a server port is plain HTTP whatever the panel
|
|
20
|
-
* is served over, and the port belongs to the entry.
|
|
2
|
+
* The address a *browser* should open for a server entry. `ServerView.url` names this machine's LAN
|
|
3
|
+
* address, which a viewer on a public hostname cannot reach; only a `0.0.0.0` bind is rewritten to
|
|
4
|
+
* the name the page was reached at (it listens on every interface). Scheme and port are never touched.
|
|
21
5
|
*/
|
|
22
6
|
/** The fields this reads off a `ServerView`; narrowed so a test needs no whole view. */
|
|
23
7
|
export interface ServerLinkSource {
|
|
24
|
-
/**
|
|
8
|
+
/** `null` when the entry has no port. */
|
|
25
9
|
url: string | null;
|
|
26
10
|
/** The address the entry actually binds: `127.0.0.1` for `local`, `0.0.0.0` for `lan`, else the IP. */
|
|
27
11
|
bindHost: string;
|
|
28
12
|
}
|
|
29
|
-
/** True for a name a browser resolves to this machine: `localhost`, `127.0.0.0/8`, `::1`. */
|
|
30
|
-
export declare function isLoopbackHost(host: string): boolean;
|
|
31
13
|
/**
|
|
32
|
-
* `
|
|
33
|
-
*
|
|
34
|
-
* it must not rewrite comes back unchanged, and so does a `url` it cannot parse: a reachable address
|
|
35
|
-
* is better than a link pointing at nothing.
|
|
14
|
+
* True for `localhost`, `127.0.0.0/8`, `::1` and the IPv4-mapped IPv6 loopback spellings `URL`
|
|
15
|
+
* normalises to (`[::ffff:7f00:1]`). Unlike `exposure.ts`'s `isLoopbackAddress`, `0.0.0.0`/`::` are not local.
|
|
36
16
|
*/
|
|
17
|
+
export declare function isLoopbackHost(host: string): boolean;
|
|
18
|
+
/** `url` with the host swapped for `pageHost` when provably right; anything else comes back unchanged. */
|
|
37
19
|
export declare function browserServerUrl(server: ServerLinkSource, pageHost: string): string | null;
|
|
38
|
-
/**
|
|
39
|
-
* The hostname this page was reached at, or `''` where there is no location (a test, or a render that
|
|
40
|
-
* never reaches a browser). Read through a narrowed `globalThis` so this module keeps the server
|
|
41
|
-
* package's non-DOM type surface — it is compiled by both `tsconfig`s.
|
|
42
|
-
*/
|
|
20
|
+
/** The page's hostname, or `''` with no location. Narrowed `globalThis` keeps the non-DOM type surface. */
|
|
43
21
|
export declare function pageHostname(): string;
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A plain object, and nothing else: not `null`, and not an array.
|
|
3
|
-
*
|
|
4
|
-
* Every untyped boundary here narrows to this shape, and it lived as **nine** definitions across
|
|
5
|
-
* `src/` and the UIs: seven strict (one an inline ternary rather than a named function, which is why
|
|
6
|
-
* a search for the name found only some of them) and two — both UIs' `lib/api.ts` — that accepted an
|
|
7
|
-
* array.
|
|
8
|
-
*
|
|
9
|
-
* The `!Array.isArray` half is the one that matters: `typeof [] === 'object'` is true, so without
|
|
10
|
-
* it an array narrows to a record and reading a property off it silently yields `undefined`
|
|
11
|
-
* instead of failing — and iterating it with `Object.entries` yields the *indices*.
|
|
12
|
-
*
|
|
13
|
-
* The two loose copies happened to behave the same on the payloads they see, but only by accident
|
|
14
|
-
* of which properties they read. They use this one now, so the next reader does not have to work
|
|
15
|
-
* that out.
|
|
16
|
-
*/
|
|
1
|
+
/** A plain object, and nothing else: not `null`, and not an array. */
|
|
17
2
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import type { SessionView } from './contracts.js';
|
|
2
2
|
/**
|
|
3
|
-
* What a UI does once the browser has given up on an event stream
|
|
4
|
-
*
|
|
5
|
-
* `EventSource` reports only "it failed", never the status. The panel ends a stream whose credential
|
|
6
|
-
* stopped being valid (a sign-out, a password change), and the browser's retry then meets a 401 and
|
|
7
|
-
* gives up — so the UI has to find out why. A signed-out session goes to the login view. A 401 that
|
|
8
|
-
* signing in cannot fix (`LocalOnlyError`: no password in force and this caller is not the panel's
|
|
9
|
-
* machine) ends the retries with the panel's message instead of reconnecting forever. Anything else
|
|
10
|
-
* — the panel restarting, a dropped network — reconnects.
|
|
3
|
+
* What a UI does once the browser has given up on an event stream (`EventSource` never reports the
|
|
4
|
+
* status): signed out goes to login, a 401 signing in cannot fix (`LocalOnlyError`) stops, else retry.
|
|
11
5
|
*/
|
|
12
6
|
export type StreamRecovery = {
|
|
13
7
|
action: 'retry';
|