@haakco/hostingctl 1.0.817 → 1.0.832
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 +75 -5
- package/dist/main.js +5344 -1230
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/platform/darwin-arm64/hostingctl +0 -0
- package/platform/darwin-x64/hostingctl +0 -0
- package/platform/linux-arm64/hostingctl +0 -0
- package/platform/linux-x64/hostingctl +0 -0
- package/platform/windows-x64/hostingctl.exe +0 -0
package/README.md
CHANGED
|
@@ -7,16 +7,21 @@ generates its own client from `api/openapi.json`, so its request and response ty
|
|
|
7
7
|
|
|
8
8
|
Generation does **not** decide which operations have a command — a generated function nobody calls is a
|
|
9
9
|
feature nobody can use. That accounting lives in `src/commands/operation-map.ts`, which names every published
|
|
10
|
-
operation and either the route that reaches it, a shared read, a protocol consumer, a route that exists only to
|
|
11
|
-
refuse
|
|
10
|
+
operation and either the route that reaches it, a shared read, a protocol consumer, or a route that exists only to
|
|
11
|
+
refuse; `just cli-test` fails when an operation is unaccounted for or a
|
|
12
12
|
mapped route does not exist.
|
|
13
13
|
|
|
14
14
|
Every published operation is accounted for, and the map holds the current totals rather than this page: each one
|
|
15
15
|
is reachable from a command, a file route a command redeems with a single-use grant it minted, a protocol consumer
|
|
16
16
|
the API calls rather than a person, the refusal-only rollback route (the platform refuses every call, and recovery
|
|
17
|
-
is a new reviewed release)
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
is a new reviewed release). Customer and operator operations have commands in both implementations;
|
|
18
|
+
browser authentication ceremonies, provider callbacks and machine consumers retain their protocol owners.
|
|
19
|
+
Coverage is checked against the API document and the commands actually served, not inferred from generation.
|
|
20
|
+
|
|
21
|
+
Secret exports and recovery-code issuance require a new private `--out` file and never print the secret.
|
|
22
|
+
On Windows, use the native client for private-file output: it sets explicit Windows ACLs. The JavaScript
|
|
23
|
+
fallback refuses these operations before requesting a secret because POSIX file modes do not establish
|
|
24
|
+
Windows privacy.
|
|
20
25
|
|
|
21
26
|
## Install
|
|
22
27
|
|
|
@@ -69,6 +74,7 @@ machine older than the floor above is not covered by this statement.
|
|
|
69
74
|
```bash
|
|
70
75
|
npm uninstall -g @haakco/hostingctl
|
|
71
76
|
rm -rf ~/.config/hostingctl # the stored sessions; Windows: %APPDATA%\hostingctl
|
|
77
|
+
rm -rf ~/.cache/hostingctl # the files copy engine; see "Environment files from this computer"
|
|
72
78
|
```
|
|
73
79
|
|
|
74
80
|
If `HOSTINGCTL_CONFIG_HOME` or `XDG_CONFIG_HOME` is set, sessions live in that directory instead: remove
|
|
@@ -234,7 +240,9 @@ own parser (`hostingctl reference`) and compared against it in CI. The groups, i
|
|
|
234
240
|
| `backup-destination` | The company's own bucket that also receives its backups |
|
|
235
241
|
| `backups` | An environment's backup tracks, the newest restore point, and the fresh backup it has asked for: `requests`, `request-show` and the `request` write |
|
|
236
242
|
| `secret-connection` | An environment's connections to a customer's own secret manager |
|
|
243
|
+
| `provider-connections` | A company's saved SFTP, FTPS and FTP logins to the old hosts it moves sites and files from: list, show, add, update, check, check-show, rotate, revoke and remove. Native guided setup or private typed request files (`--file` or `--stdin`). The old-host limits (`--preset` normal, gentle or very-gentle, or `--connections`, `--speed-limit`, `--requests-per-second`, `--host-imports`, `--retry-wait`) override the same JSON fields; `update` with only limit flags changes just those. `check --wait` follows the check, prints each stage as pass or FAIL and exits 1 when it failed. Writes, `check` included, require confirmation |
|
|
237
244
|
| `registry-connections` | A company's container-registry connections: the account, the repository scope, one verified manifest check, credential rotation and revocation. It stores no customer image and starts no workload |
|
|
245
|
+
| `files` | `files import start` copies a folder from a checked provider connection, or once from `--source sftp://user@host/path` with nothing saved, into an application folder on the server (`--dry-run` is the API's preview, `--confirm` starts it); `list`, `status --wait` (exit 0 only when it completed) and `stop` follow it. `--schedule '<cron>'` (repeat for up to five, `--timezone`, default UTC, and `--until <time>`) keeps it in sync; `run-now`, `pause`, `resume` and `schedule` (change times, zone or end date) act on a schedule. `--mirror` (advanced) also deletes, at most `--max-delete` a run |
|
|
238
246
|
| `storage` | Purchased object storage: a capacity's price, the purchase, an increase or a resize at that price, which basis the bucket is billed on, the bucket's connection facts, its keys, objects and bindings, the downloads measured for a month, the ceiling that caps the overage bill, and the optional stored-byte maximum that limits growth without buying capacity |
|
|
239
247
|
| `company` | The company itself, its members and roles, its activity, its logo and favicon, and the invitation journey |
|
|
240
248
|
| `environment` | Create, read, scale, retry; profile coverage, domains and redirects, databases and exports, configuration and secrets, services, site access, tools, tuning, retention, portable export, and the release bundle |
|
|
@@ -264,6 +272,68 @@ Exit status: **0** ok, **1** refused by the API, **2** unusable — bad usage, n
|
|
|
264
272
|
API. A refusal prints the API's message, its actionable `detail` when it sent one, and its `X-Request-Id`,
|
|
265
273
|
which is what joins a failed command to the log line that explains it.
|
|
266
274
|
|
|
275
|
+
## Environment files from this computer
|
|
276
|
+
|
|
277
|
+
`files ls|copy|mkdir|move|rm|pull|push` work on an environment's files over its SFTP login, and
|
|
278
|
+
`files connect` prints that login as a `known_hosts` line, an `ssh_config` Host block and an rclone remote
|
|
279
|
+
for your own `ssh`, `sftp` and `rclone` (it needs `--user`, names `--key-file` when given, otherwise your SSH
|
|
280
|
+
agent, and never prints a password). Every connection is checked against the SSH host key the platform
|
|
281
|
+
serves; a command refuses when it serves none. A key with a passphrase reads it with `--password-stdin` or
|
|
282
|
+
`--password-file` beside `--key-file`. While a transfer runs, each minute prints the files and bytes done
|
|
283
|
+
and, after two minutes and 20 files, the time left as a range ("about 11–16 min left"), fitted from both
|
|
284
|
+
the per-file and the per-byte rate. Ctrl-C during a transfer stops the copy engine cleanly and prints the
|
|
285
|
+
same report with the `interrupted` outcome (exit 1); run the command again to finish.
|
|
286
|
+
|
|
287
|
+
**The copy engine.** The first local `files` command fetches the official rclone 1.75.2 release (about
|
|
288
|
+
32 MB) from `downloads.rclone.org`, checks it against its pinned SHA-256, and keeps only the program, about
|
|
289
|
+
86 MB, in the cache folder. Both CLIs share it, every launch re-checks its checksum, an rclone on `PATH` is
|
|
290
|
+
never used, and `hostingctl update` moves the pin. `files connect` fetches nothing.
|
|
291
|
+
|
|
292
|
+
| System | Cache folder |
|
|
293
|
+
| --- | --- |
|
|
294
|
+
| Linux | `$XDG_CACHE_HOME/hostingctl/rclone/1.75.2/`, else `~/.cache/hostingctl/rclone/1.75.2/` |
|
|
295
|
+
| macOS | `~/Library/Caches/hostingctl/rclone/1.75.2/` (or under `$XDG_CACHE_HOME` when set) |
|
|
296
|
+
| Windows | `%LOCALAPPDATA%\hostingctl\cache\rclone\1.75.2\` (or under `%XDG_CACHE_HOME%` when set) |
|
|
297
|
+
|
|
298
|
+
To remove it, delete the `rclone` folder inside that cache folder; the next local `files` command fetches it
|
|
299
|
+
again. An older version is removed by itself when the pin moves.
|
|
300
|
+
|
|
301
|
+
**Where `files` runs.** The engine is built with Go 1.26, so the local commands need 64-bit Linux (x64 or
|
|
302
|
+
arm64) with kernel 3.2 or newer, macOS 12 or newer (Intel or Apple silicon), or 64-bit Windows 10 /
|
|
303
|
+
Server 2016 or newer. On an older Mac they refuse with that floor before anything is fetched. `files import`
|
|
304
|
+
runs on the server and has no such floor.
|
|
305
|
+
|
|
306
|
+
## Guided old-host connection setup
|
|
307
|
+
|
|
308
|
+
In the native client, run `hostingctl provider-connections add --company <slug> --confirm` in a terminal.
|
|
309
|
+
Choose the destination environment when there is more than one, then enter the address/login and choose
|
|
310
|
+
a password, a generated SSH key or an existing private-key file. Connection details come from the old
|
|
311
|
+
host's FTP/SSH settings or welcome email. Generated-key setup explains where to authorize its public key.
|
|
312
|
+
Private keys are read from a private local file; they are never command-line arguments.
|
|
313
|
+
|
|
314
|
+
The **Old host limits** step follows the login. **Normal** (2 connections at once, no speed or request limit) suits
|
|
315
|
+
most hosts; choose **Gentle** (1 connection, 2 requests a second) or **Very gentle** (1 connection, 1M a second,
|
|
316
|
+
1 request a second) for a host that limits connections or speed. **Advanced** shows the five values; changing one
|
|
317
|
+
makes the preset **Custom**. Limit flags given to `add` fill this step in first.
|
|
318
|
+
|
|
319
|
+
If the login or connection details fail, choose **Edit** to return to the relevant field with your
|
|
320
|
+
other values kept. Use Ctrl+U to replace a hidden password. The saved connection and generated key
|
|
321
|
+
are retained; the screen explains what to correct and where to find it. Session, transport and
|
|
322
|
+
changed-server-identity failures stop with recovery commands rather than silently retrying.
|
|
323
|
+
If the old host refuses another connection, **Switch to Gentle and retry** saves Gentle on the same connection and
|
|
324
|
+
checks it again. Without the guided setup, `check` and `check-show` print the same suggestion:
|
|
325
|
+
`provider-connections update <uuid> --preset gentle --confirm`, then check again.
|
|
326
|
+
|
|
327
|
+
The check reports its ID and stages, then offers detected site folders or a typed folder path.
|
|
328
|
+
The old host's File Manager shows the path if it is unclear; Esc keeps the current folder. A changed
|
|
329
|
+
folder is checked again without replacing the saved login or limits.
|
|
330
|
+
If a chosen folder is missing, **Edit** reopens the folder chooser on the same connection. Stopping after
|
|
331
|
+
a failed folder check reports the failure and recovery IDs.
|
|
332
|
+
Read interrupted checks with `provider-connections check-show <check-uuid>` using the same company/API
|
|
333
|
+
settings. No file copy starts
|
|
334
|
+
during setup. Scripts and the JavaScript fallback use a private JSON request via `--file` or `--stdin`;
|
|
335
|
+
`--no-input` on the native command refuses rather than prompting.
|
|
336
|
+
|
|
267
337
|
## Quick application speed checks
|
|
268
338
|
|
|
269
339
|
```sh
|