home-hosted 0.10.3 → 0.11.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/docs/DDNS.md CHANGED
@@ -7,7 +7,8 @@ confirmed address per hostname is kept in the workspace's `.hh/<workspace>/.stat
7
7
  **Workspace Settings → Dynamic DNS** is the whole setup: add an account, paste its credentials, add
8
8
  hostnames. The block is saved by the page's own **Save settings**, like every other section on it; the
9
9
  credentials button saves on its own, being a secret. Provider credentials never enter
10
- `servers.config.json`.
10
+ `servers.config.json`. The pending-changes summary counts only the fields you touched, though the
11
+ save writes the block whole.
11
12
 
12
13
  ```json
13
14
  {
@@ -41,7 +42,7 @@ Header fields:
41
42
  | Field | Default | Notes |
42
43
  | --- | --- | --- |
43
44
  | `enabled` | `false` | Nothing runs until this is on. |
44
- | `intervalMs` | `300000` | How often the public address is re-checked. |
45
+ | `intervalMs` | `300000` | How often the public address is re-checked. The settings box edits this in **seconds** (`60` is one minute) and writes milliseconds. |
45
46
  | `ipv4` / `ipv6` | on / off | Which families to detect. A family must be on for its record types. |
46
47
  | `ipv4.url` / `ipv6.url` | `""` | Override the detector with one endpoint. |
47
48
  | `ttl` | `1` | Default record TTL; `1` is automatic where supported. |
@@ -135,7 +135,9 @@ reached a receiver which came back up is the one the outage took.
135
135
 
136
136
  `cooldownMs` (default two minutes) is per **destination, server and reason**, so a flapping process
137
137
  cannot flood any one destination — and one destination inside its window never silences another. It
138
- lives in the general block, or on a destination that has **Own settings** on.
138
+ lives in the general block, or on a destination that has **Own settings** on, and its box edits
139
+ **seconds** (`0` turns the throttle off). Clearing the box keeps the value it held, so retyping it
140
+ cannot switch the throttle off by accident.
139
141
 
140
142
  ## Header limits
141
143
 
@@ -246,9 +246,11 @@ error written by home-hosted 0.8.0 (config schema 1); this release understands s
246
246
  ```
247
247
 
248
248
  A restore that applies **some** of an archive carries on and names every piece it had to leave
249
- behind, marked `!`, so a partial result never reads as a complete one. A mistyped `--include` or
250
- `--exclude` is refused before anything is written, naming the id — the dangerous direction being
251
- `--exclude`, where a typo would exclude nothing and apply the credentials you meant to drop.
249
+ behind, marked `!`, so a partial result never reads as a complete one — including a dump staged for
250
+ an entry with no `load` hook, which only the apply can discover and `--json` lists in `skipped`. A
251
+ mistyped `--include` or `--exclude` is refused before anything is written, naming the id — the
252
+ dangerous direction being `--exclude`, where a typo would exclude nothing and apply the credentials
253
+ you meant to drop.
252
254
 
253
255
  Then the entry starts, and the database is read back:
254
256
 
package/docs/SERVERS.md CHANGED
@@ -61,7 +61,7 @@ platform cannot confirm is exactly what the rest of this file refuses to signal
61
61
  | field | what it does |
62
62
  | --- | --- |
63
63
  | `command`, `args`, `cwd` | what to run. `{placeholders}` resolve in `args` only (`env`, `dataEnvs`, `backupPaths` and `bootstrap.args` too); `command`, `cwd` and `envFile` are used literally, so `cwd: "~/app"` is not a home directory. **`command` is a program, not a command line** — it is spawned with no shell, so `"node server.js"` asks for a program of that name; write `"command": "node", "args": ["server.js"]` |
64
- | `env`, `dataEnvs`, `envFile` | environment; `dataEnvs` also marks data directories for backups, `envFile` keeps secrets out of the config |
64
+ | `env`, `dataEnvs`, `envFile` | environment; `dataEnvs` also marks data directories for backups, `envFile` keeps secrets out of the config. The env file is yours to write — `KEY=value`, one per line — and it is read whatever a Windows editor saved: a byte-order mark or UTF-16 is decoded, not refused |
65
65
  | `enabled` | `true` (default) starts it; `false` keeps the entry in the config but refuses to start it, stops it if it is running, and leaves a disabled `persistent` entry unattached at boot |
66
66
  | `port`, `bind` | enables the readiness wait, health checks and the conflict preflight; `local` keeps it on `127.0.0.1` |
67
67
  | `onPortConflict` | `block` (default), `warn`, `follow`, `reclaim`, or `kill` — see below |
@@ -395,9 +395,13 @@ prints the reading. Nothing reaches the config until the helper answers. The sam
395
395
  | --- | --- |
396
396
  | *(none)* | reports whether a source is set, and lists the options |
397
397
  | `--wsl` | writes the helper and offers the download |
398
- | `--download` / `--no-download` | install without asking / never install |
398
+ | `--wsl --download` / `--wsl --no-download` | install without asking / never install |
399
399
  | `--clear` | stop using it and delete the helper |
400
400
 
401
+ `--download` and `--no-download` modify `--wsl`; either one alone is refused rather than ignored, so a
402
+ script cannot read a successful exit as "installed". `--clear` is refused beside them, because the two
403
+ ask for opposite things.
404
+
401
405
  It installs into `%ProgramData%\home-hosted`, not `%LOCALAPPDATA%`: a boot-started panel runs as SYSTEM
402
406
  in session 0, where the per-user path differs and the library would be invisible. Installing there may
403
407
  ask for elevation.
@@ -55,13 +55,17 @@ installed, and what lets it offer you the next version:
55
55
  | `repo` | `owner/name` the releases come from — the one field `ui-update` needs |
56
56
  | `asset` | the release asset name, when a release carries more than one UI |
57
57
 
58
+ Save it with whatever editor you like: a byte-order mark (Notepad's "UTF-8 with BOM",
59
+ PowerShell's `Set-Content -Encoding UTF8`) or UTF-16 is read the same as plain UTF-8.
60
+
58
61
  **`tag` and `unix` are not yours to write.** They describe the *build*, and the panel's own
59
62
  `build-uis.mjs` stamps them into `dist/ui.json` — a committed value would be a release behind by the
60
63
  time the zip is cut, which is what made `ui-update` reinstall the same UI on every boot. A UI built
61
64
  outside this repo sets neither and loses nothing: `ui-update` then compares against your release list.
62
65
 
63
66
  With those set, `home-hosted ui-update` lists the releases carrying your `asset` and installs the one
64
- you pick; `--old` lists older ones. A version bump in your own repo is enough — nothing about the
67
+ you pick; `--old` lists older ones. `--asset <name>` installs a different asset from that release and
68
+ wins over the one `ui.json` declares. A version bump in your own repo is enough — nothing about the
65
69
  panel is involved.
66
70
 
67
71
  > **Official UIs** (`repo: NamesMT/home-hosted`) follow the panel instead: the panel knows its own
@@ -72,8 +76,9 @@ Nothing is built on the server side: whatever you upload is served as-is, so shi
72
76
  HTML/JS/CSS or the output of your own Vite/Next/Astro build with relative asset paths.
73
77
 
74
78
  **If it breaks:** `home-hosted ui-revert` puts the stock panel back (or *Revert to stock* in
75
- Global settings). The CLI also prints a reminder at startup while a custom UI is active — a broken UI
76
- must never lock you out of your own machine.
79
+ Global settings, which asks first — the delete is not archived, so keep your own copy of the build).
80
+ The CLI also prints a reminder at startup while a custom UI is active — a broken UI must never lock
81
+ you out of your own machine.
77
82
 
78
83
  ## Rules of the road
79
84
 
@@ -159,7 +164,7 @@ naming one that does not exist is a `404 UNKNOWN_WORKSPACE`, never a silent fall
159
164
  | `POST` / `DELETE /api/settings/ui` | install or revert a UI — what Global settings calls |
160
165
  | `POST` / `DELETE /api/settings/tls` | upload or clear a PEM pair |
161
166
  | `GET` / `PATCH /api/proxy`, `POST /api/proxy/{engine,start,stop,apply,revert}`, `PUT` / `DELETE /api/proxy/certificates/:id`, `POST /api/proxy/routes/:id/retry-certificate` | the panel-wide reverse proxy: engine, route table, its uploaded PEM pairs. Its live view also rides in the state frame as an optional `proxy` — read it defensively |
162
- | `GET` / `POST /api/backups`, `/api/backups/restore`, `/api/backups/:name/download` | archives; entries are global (`global:settings`, `global:secrets`, `global:tls`) or per workspace, whose leaves are `workspace:<id>:{settings,servers,secrets,data:<path>}`; a create/restore body selects them with `include` (only these) and may also carry `exclude` (leave these out, applied after `include`). Either list is refused when empty, so read a missing key as "unqualified", never as "nothing" |
167
+ | `GET` / `POST /api/backups`, `/api/backups/restore`, `/api/backups/:name/download` | archives. `GET /api/backups` is the **selection model** — `dir`, `entries`, `files` — and it is *not* in the state frame: building it reads every workspace's secrets file and stats every archive, so fetch it when a capture dialog opens (and refetch after a create or delete) rather than expecting it per frame. The policy (`enabled`, `keep`, `schedule`, `includePaths`) *is* in the frame. Entries are global (`global:settings`, `global:secrets`, `global:tls`) or per workspace, whose leaves are `workspace:<id>:{settings,servers,secrets,data:<path>}`; a create/restore body selects them with `include` (only these) and may also carry `exclude` (leave these out, applied after `include`). Either list is refused when empty, so read a missing key as "unqualified", never as "nothing" |
163
168
  | `POST` / `DELETE /api/auth/password` | set the panel password, or clear it and disable auth. `POST` needs the current one unless none is set; an empty password is refused |
164
169
  | `PUT` / `DELETE /api/notifications/destinations/:id/token`, `POST /api/notifications/destinations/:id/{test,detect-chats}`, `POST /api/notifications/test-webhook` | one destination's bot credential and a test send, per workspace |
165
170
  | `GET` / `PUT /api/ddns`, `PUT` / `DELETE /api/ddns/credentials/:id`, `POST /api/ddns/check` | dynamic DNS, per workspace: the policy plus live per-record state, one account's sealed credentials (write-only — the view exposes ids and whether each is set, never the values), and a pass run now |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "home-hosted",
3
3
  "type": "module",
4
- "version": "0.10.3",
4
+ "version": "0.11.0",
5
5
  "packageManager": "pnpm@12.5.1",
6
6
  "description": "Self-hosted control panel that keeps your home-server processes alive: supervision, restarts, port conflicts, logs — and a UI you can replace.",
7
7
  "author": "NamesMT <dangquoctrung123@gmail.com>",
@@ -52,7 +52,6 @@
52
52
  "hh": "bin/home-hosted.mjs"
53
53
  },
54
54
  "files": [
55
- "AGENTS.md",
56
55
  "LICENSE",
57
56
  "README.md",
58
57
  "bin",