@restregular/dsh-powerup 0.2.2 → 0.3.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 +38 -13
- package/client.js +688 -140
- package/index.js +161 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -41,20 +41,31 @@ Open the built-in **Plugins** page. Every third-party card under **Installed
|
|
|
41
41
|
plugins** gains a small update icon in its action area. Clicking it opens the
|
|
42
42
|
update dialog:
|
|
43
43
|
|
|
44
|
-
1. The dialog reads the package's published versions from the
|
|
45
|
-
**Add plugin** dialog
|
|
46
|
-
|
|
47
|
-
from the
|
|
48
|
-
|
|
44
|
+
1. The dialog reads the package's published versions from the Host's configured
|
|
45
|
+
registries — the same list the **Add plugin** dialog offers, including the
|
|
46
|
+
npmmirror fallback. Star any registry to make it Power-Up's default for
|
|
47
|
+
later updates; otherwise the list starts from the Add dialog's remembered
|
|
48
|
+
choice.
|
|
49
|
+
2. Type a version or pick one from the floating version list. The current
|
|
50
|
+
installed version is tagged **Current**; the newest is tagged **latest**, and
|
|
51
|
+
a version that is both uses one **Current · latest** tag.
|
|
52
|
+
3. Confirming removes the installed copy, checks the new spec the way **Add
|
|
49
53
|
plugin** does, and installs the selected version without enabling it.
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
4. The dialog then asks whether to enable the new version.
|
|
55
|
+
5. After enabling, it asks whether to restart DSH. On the desktop app the
|
|
52
56
|
`lib/restart-helper.cjs` helper relaunches the exact executable after the old
|
|
53
57
|
Host exits; under `dsh web` the dialog explains that the terminal owns the
|
|
54
58
|
process.
|
|
59
|
+
6. A management call that reports `restart-required` keeps a **Restart needed**
|
|
60
|
+
tag on the card and adds the plugin to the count beside the **Installed
|
|
61
|
+
plugins** heading, where a **Restart DSH** button confirms and performs the
|
|
62
|
+
same restart.
|
|
55
63
|
|
|
56
|
-
Power-Up
|
|
57
|
-
|
|
64
|
+
Power-Up updates itself through the same dialog. Because removing the plugin
|
|
65
|
+
unloads this panel, the Host answers first and then hands `removeBundle` →
|
|
66
|
+
`inspect` → `installBundle(enabled: true)` to the built-in manager service,
|
|
67
|
+
which keeps running after the Power-Up Host fiber is unloaded. The panel closes;
|
|
68
|
+
refresh the page when the install finishes.
|
|
58
69
|
|
|
59
70
|
## Design notes
|
|
60
71
|
|
|
@@ -78,16 +89,30 @@ unload the dialog mid-flow. Use **Add plugin** with the new package version.
|
|
|
78
89
|
no per-card slot, so the overlay injects one button into every
|
|
79
90
|
`[data-plugin-group="bundles"] [data-plugin-package]` card and re-asserts it
|
|
80
91
|
after React renders. Version listing is a plain registry `GET`; removal and
|
|
81
|
-
installation use the same `remote.pluginManager` calls as **Add plugin**.
|
|
82
|
-
|
|
83
|
-
`/dsh-powerup/api/
|
|
92
|
+
installation use the same `remote.pluginManager` calls as **Add plugin**. The
|
|
93
|
+
Host adds two loopback-only routes: `/dsh-powerup/api/restart` for the
|
|
94
|
+
process restart, and `/dsh-powerup/api/self-update` for the self-update
|
|
95
|
+
handoff.
|
|
96
|
+
- **Self-update outlives its own unload.** The Host route sends its answer, then
|
|
97
|
+
a timer starts `removeBundle` → `inspect` → `installBundle(enabled: true)`
|
|
98
|
+
through the built-in manager service. Removing the bundle unloads Power-Up's
|
|
99
|
+
own Host fiber, but the manager service and the pending promise stay in the
|
|
100
|
+
Host process, so the reinstall finishes; failures are appended to
|
|
101
|
+
`~/.dsh/powerup/self-update.log`.
|
|
102
|
+
- **Restart status lives in this browser session.** A management result that
|
|
103
|
+
says `restart-required` is written to `sessionStorage`; the card gets a
|
|
104
|
+
**Restart needed** tag and the group heading gets a count plus a restart
|
|
105
|
+
button. A real app restart clears the session, while a page refresh keeps the
|
|
106
|
+
markers.
|
|
84
107
|
- **The dialog mirrors the host modal.** The backdrop is
|
|
85
108
|
`--dsw-alias-bg-mask-1` with the shared mask blur, the surface is
|
|
86
109
|
`--dsw-alias-bg-layer-2` with `--dsw-radius-panel` and
|
|
87
110
|
`--dsw-elevation-prominent`, and the primary button uses
|
|
88
111
|
`--dsw-alias-button-primary-fill` / `-hover`, so the dialog follows both
|
|
89
112
|
themes instead of inventing its own palette. The registry picker and version
|
|
90
|
-
list are custom controls built from `--dsw-alias-*` tokens
|
|
113
|
+
list are custom controls built from `--dsw-alias-*` tokens; both open as
|
|
114
|
+
fixed-position popovers anchored to their triggers, so they never grow the
|
|
115
|
+
dialog or get clipped by its scroll area.
|
|
91
116
|
|
|
92
117
|
## Development
|
|
93
118
|
|