@pi-unipi/updater 3.0.0-alpha.21 → 3.0.0-alpha.22
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 +53 -55
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,77 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Updater
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Updater tells you when a new UniPi release is on npm and installs it with one key.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@pi-unipi/updater` · part of [UniPi](../../README.md)
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## What it does
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
- Checks the npm registry for `@pi-unipi/unipi` at session start.
|
|
10
|
+
- Shows an update overlay with the changelog entries between your version and the new version.
|
|
11
|
+
- Runs `pi install npm:@pi-unipi/unipi` when you press `Y`.
|
|
12
|
+
- Remembers a version that you skip. It asks again only for a newer version.
|
|
13
|
+
- Opens package READMEs and the changelog in TUI overlays.
|
|
14
|
+
- Adds an Updater group to the info screen: installed version, latest version, status and last check.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
## Quick start
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|-----|--------|
|
|
19
|
-
| `j/k` or Up/Down | Navigate |
|
|
20
|
-
| `Enter` | Select/open |
|
|
21
|
-
| `q/Esc` | Back/close |
|
|
22
|
-
| `g/G` | Jump to top/bottom |
|
|
23
|
-
| `Space` | Cycle options (settings) |
|
|
24
|
-
| `h/l` or Left/Right | Cycle options (settings) |
|
|
18
|
+
Updater ships in `@pi-unipi/unipi`. It checks the version of `@pi-unipi/unipi`, so it is useful only with the full suite.
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
1. Start a pi session. Updater checks npm in the background.
|
|
21
|
+
2. If a newer version is on npm, the update overlay opens.
|
|
22
|
+
3. Press `Y` to install. Press `n` to skip this version.
|
|
23
|
+
4. Restart pi to load the new version.
|
|
27
24
|
|
|
28
|
-
|
|
25
|
+
## Commands
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
| Command | What it does |
|
|
28
|
+
|---|---|
|
|
29
|
+
| `/unipi:readme [package]` | Opens the README browser. A package name, for example `utility`, opens that README. |
|
|
30
|
+
| `/unipi:changelog` | Opens the changelog browser with a version list and a detail view. |
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## Keys
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
2. Compare latest version with installed version
|
|
36
|
-
3. If newer and not skipped, show update overlay
|
|
37
|
-
4. User views changelog diff, presses `Y` to update or `n` to skip
|
|
38
|
-
5. Update runs `pi install npm:@pi-unipi/unipi`
|
|
39
|
-
6. Skipped version cached — re-prompted only for newer versions
|
|
34
|
+
Update overlay:
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
| Key | What it does |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `Y` or `y` | Installs the new version. |
|
|
39
|
+
| `n`, `q` or `Esc` | Skips this version. |
|
|
40
|
+
| `j` / `k` or arrows | Scrolls the changelog. |
|
|
41
|
+
| `g` / `G` | Goes to the top or the bottom. |
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
README and changelog browsers:
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
| Key | What it does |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `j` / `k` or arrows | Moves in the list, or scrolls the detail view. |
|
|
48
|
+
| `Enter` | Opens the selected item. |
|
|
49
|
+
| `g` / `G` | Goes to the top or the bottom. |
|
|
50
|
+
| `q` or `Esc` | Goes back to the list, or closes the list. |
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|--------|--------|---------|
|
|
54
|
-
| `checkIntervalMs` | 1800000 (30min), 3600000 (1h), 21600000 (6h), 86400000 (1d) | 3600000 (1h) |
|
|
55
|
-
| `autoUpdate` | disabled, notify, auto | notify |
|
|
52
|
+
## Settings
|
|
56
53
|
|
|
57
|
-
|
|
54
|
+
Open `/unipi:settings` → Updater. The namespace is `updater`.
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
| Key | Default | What it does |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `checkIntervalMs` | `3600000` (1 hour) | Minimum time between two npm checks. Options: 30 min, 1 hour, 6 hours, 1 day. |
|
|
59
|
+
| `autoUpdate` | `notify` | `disabled`: no check. `notify`: the overlay asks you. `auto`: the overlay counts down 5 seconds, then installs. Press `n` to cancel and skip this version. |
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
## How it works
|
|
64
62
|
|
|
65
|
-
|
|
63
|
+
1. At session start, Updater reads `~/.unipi/cache/updater/last-check.json`.
|
|
64
|
+
2. If the last check is older than `checkIntervalMs`, Updater gets the `latest` dist-tag from npm. The request stops after 10 seconds.
|
|
65
|
+
3. Updater compares the versions. It never offers a lower version.
|
|
66
|
+
4. If the new version is not skipped, the overlay opens. Updater gets the changelog for the new version from GitHub. If that fails, it uses the local `CHANGELOG.md`.
|
|
67
|
+
5. The install command stops after 60 seconds. If it fails, the overlay shows the error. Press any key to close it.
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
"lastCheck": "2026-05-01T12:00:00.000Z",
|
|
70
|
-
"latestVersion": "0.1.16",
|
|
71
|
-
"skippedVersion": "0.1.16"
|
|
72
|
-
}
|
|
73
|
-
```
|
|
69
|
+
A failed npm check is silent. Updater then uses the cached result.
|
|
74
70
|
|
|
75
|
-
##
|
|
71
|
+
## See also
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
- [Commands reference](../../docs/reference/commands.md)
|
|
74
|
+
- [Settings reference](../../docs/reference/settings.md)
|
|
75
|
+
- [Info Screen](../info-screen/README.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-unipi/updater",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.22",
|
|
4
4
|
"description": "Auto-updater, changelog browser, and readme browser for Unipi — checks npm registry, renders CHANGELOG.md and README.md files in TUI overlays",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.ts",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@pi-unipi/core": "3.0.0-alpha.
|
|
37
|
+
"@pi-unipi/core": "3.0.0-alpha.22"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@earendil-works/pi-coding-agent": "^0.87.1",
|