@jmfederico/pi-web 1.202605.12 → 1.202605.13
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 +26 -29
- package/dist/cli.js +510 -111
- package/dist/cli.js.map +1 -1
- package/dist/client/assets/{CodeViewer-Bg2WQKWF.js → CodeViewer-ncgSvOQM.js} +1 -1
- package/dist/client/assets/TerminalPanel-DjuVNsp5.js +75 -0
- package/dist/client/assets/index-CDGTKzLD.js +1239 -0
- package/dist/client/index.html +1 -1
- package/dist/server/diagnostics/nodePtySpawnHelper.js +135 -0
- package/dist/server/diagnostics/nodePtySpawnHelper.js.map +1 -0
- package/dist/server/piWebStatus.js +5 -5
- package/dist/server/piWebStatus.js.map +1 -1
- package/dist/server/sessions/piSessionService.js +22 -7
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/dist/server/terminalProxyRoutes.js +70 -0
- package/dist/server/terminalProxyRoutes.js.map +1 -1
- package/dist/server/terminals/terminalRoutes.js +65 -1
- package/dist/server/terminals/terminalRoutes.js.map +1 -1
- package/dist/server/terminals/terminalService.js +202 -37
- package/dist/server/terminals/terminalService.js.map +1 -1
- package/docs/plugins.md +4 -3
- package/extensions/pi-web.ts +10 -3
- package/package.json +1 -1
- package/dist/client/assets/TerminalPanel-CeT2Rp-S.js +0 -47
- package/dist/client/assets/index-BH4t_Up6.js +0 -1222
package/README.md
CHANGED
|
@@ -123,32 +123,24 @@ See the full [Plugin API](docs/plugins.md) for contribution types, package metad
|
|
|
123
123
|
|
|
124
124
|
## Install
|
|
125
125
|
|
|
126
|
-
Recommended install uses npm plus
|
|
126
|
+
Recommended install uses npm plus native per-user services.
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
129
|
npm install -g @jmfederico/pi-web
|
|
130
|
-
|
|
131
|
-
# Recommended on servers: keep user services running after logout/reboot.
|
|
132
|
-
sudo loginctl enable-linger "$USER"
|
|
133
|
-
|
|
134
130
|
pi-web install
|
|
135
131
|
```
|
|
136
132
|
|
|
137
|
-
`loginctl enable-linger` is optional
|
|
138
|
-
|
|
139
|
-
This writes and starts:
|
|
140
|
-
|
|
141
|
-
- `~/.config/systemd/user/pi-web-sessiond.service`
|
|
142
|
-
- `~/.config/systemd/user/pi-web.service`
|
|
143
|
-
|
|
144
|
-
The generated services run through `bash -lc` so they see a shell environment similar to running `pi` from your terminal.
|
|
145
|
-
|
|
146
|
-
To check whether lingering is enabled:
|
|
133
|
+
On Linux servers, `loginctl enable-linger` is optional but recommended so the user systemd manager starts at boot and continues running after logout:
|
|
147
134
|
|
|
148
135
|
```bash
|
|
136
|
+
sudo loginctl enable-linger "$USER"
|
|
149
137
|
loginctl show-user "$USER" -p Linger
|
|
150
138
|
```
|
|
151
139
|
|
|
140
|
+
This writes and starts PI WEB's session daemon and web/API user services. The native user-service backend is selected automatically.
|
|
141
|
+
|
|
142
|
+
The generated services run through your detected login shell (`bash`, `zsh`, or `fish` with `-lc`) so they see a shell environment similar to running `pi` from your terminal.
|
|
143
|
+
|
|
152
144
|
Open <http://127.0.0.1:8504>.
|
|
153
145
|
|
|
154
146
|
Useful commands:
|
|
@@ -183,7 +175,7 @@ Then in Pi:
|
|
|
183
175
|
/pi-web doctor
|
|
184
176
|
```
|
|
185
177
|
|
|
186
|
-
The Pi command is a convenience wrapper around the same service installer. When installed this way, the service installer can use PI WEB's package-local server entrypoints, so `pi-web-server` and `pi-web-sessiond` do not need to be on your shell `PATH`. `/pi-web logs` shows the last 100
|
|
178
|
+
The Pi command is a convenience wrapper around the same service installer. When installed this way, the service installer can use PI WEB's package-local server entrypoints, so `pi-web-server` and `pi-web-sessiond` do not need to be on your shell `PATH`. `/pi-web logs` shows the last 100 service log lines; use `pi-web logs` in a shell when you want to follow logs continuously.
|
|
187
179
|
|
|
188
180
|
Advanced users may run the binaries however they prefer:
|
|
189
181
|
|
|
@@ -211,6 +203,14 @@ npm run dev:web
|
|
|
211
203
|
npm run dev:client
|
|
212
204
|
```
|
|
213
205
|
|
|
206
|
+
Or install the split development setup as native per-user services from the checkout:
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
pi-web install --dev
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
`pi-web install --dev` writes the session daemon plus a UI development service using the native user-service backend. `pi-web uninstall` removes both production and development service files; no uninstall flags are needed.
|
|
213
|
+
|
|
214
214
|
`dev:web` also watches bundled plugin TypeScript and rebuilds the browser-loaded plugin JavaScript under `dist/pi-web-plugins/`. You can restart `dev:web` or `dev:client` without stopping active Pi sessions.
|
|
215
215
|
|
|
216
216
|
## Production-style run from a checkout
|
|
@@ -255,14 +255,14 @@ Environment variables:
|
|
|
255
255
|
- `PI_WEB_SESSIOND_URL` — daemon URL used by the web process when connecting over TCP, for example `http://127.0.0.1:3001`. If you set `PI_WEB_SESSIOND_PORT`, set this for the web process too.
|
|
256
256
|
- `PI_WEB_PROJECTS_FILE` — optional override for the projects storage JSON file. Defaults to `$PI_WEB_DATA_DIR/projects.json`.
|
|
257
257
|
|
|
258
|
-
##
|
|
258
|
+
## Development services
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
`pi-web install --dev` creates a practical local setup with two native per-user services:
|
|
261
261
|
|
|
262
|
-
- `pi-web-sessiond
|
|
263
|
-
- `pi-web-ui-dev
|
|
262
|
+
- `pi-web-sessiond` runs `npm run start:sessiond` from the checkout without autoreload.
|
|
263
|
+
- `pi-web-ui-dev` runs `npm run dev:web` and `npm run dev:client` for API reloads, bundled plugin rebuilds, and Vite HMR.
|
|
264
264
|
|
|
265
|
-
|
|
265
|
+
Under the hood, the native backends are systemd user services and LaunchAgents. For reference, an equivalent systemd setup looks like:
|
|
266
266
|
|
|
267
267
|
```ini
|
|
268
268
|
# ~/.config/systemd/user/pi-web-sessiond.service
|
|
@@ -296,32 +296,29 @@ Restart=no
|
|
|
296
296
|
WantedBy=default.target
|
|
297
297
|
```
|
|
298
298
|
|
|
299
|
-
On servers, enable persistent user services so the user systemd manager starts at boot and remains running after logout:
|
|
299
|
+
On Linux servers, enable persistent user services so the user systemd manager starts at boot and remains running after logout:
|
|
300
300
|
|
|
301
301
|
```bash
|
|
302
302
|
sudo loginctl enable-linger "$USER"
|
|
303
303
|
loginctl show-user "$USER" -p Linger
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
Install or refresh the development services with:
|
|
307
307
|
|
|
308
308
|
```bash
|
|
309
|
-
|
|
310
|
-
systemctl --user enable --now pi-web-sessiond.service
|
|
311
|
-
systemctl --user enable --now pi-web-ui-dev.service
|
|
309
|
+
pi-web install --dev
|
|
312
310
|
```
|
|
313
311
|
|
|
314
312
|
Useful logs:
|
|
315
313
|
|
|
316
314
|
```bash
|
|
317
|
-
|
|
318
|
-
journalctl --user -u pi-web-ui-dev.service -f
|
|
315
|
+
pi-web logs
|
|
319
316
|
```
|
|
320
317
|
|
|
321
318
|
If code affecting the session daemon changes, restart it manually:
|
|
322
319
|
|
|
323
320
|
```bash
|
|
324
|
-
|
|
321
|
+
pi-web restart
|
|
325
322
|
```
|
|
326
323
|
|
|
327
324
|
## Current limitations
|