@evandu/super-pi 0.1.264 → 0.1.265
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 +12 -0
- package/bin/completion.js +91 -0
- package/bin/super-pi.js +11 -1
- package/desktop/main.cjs +35 -3
- package/desktop/preload.cjs +1 -0
- package/desktop/update-lifecycle.cjs +8 -0
- package/dist/client/.super-pi-client-sources.json +11 -10
- package/dist/client/assets/{CodeMirrorEditor-D-PnT2mx.js → CodeMirrorEditor-B2cHfrUS.js} +2 -2
- package/dist/client/assets/GitDiffEditor-Bl7XQIDD.js +29 -0
- package/dist/client/assets/dist-3qQVP6l8.js +6 -0
- package/dist/client/assets/{dist-BXAOrsjq.js → dist-BlRuQIg1.js} +1 -1
- package/dist/client/assets/{dist-BRVQKlcp.js → dist-BvjUKkwy.js} +1 -1
- package/dist/client/assets/{dist-QzbOCAU6.js → dist-CQncCwUc.js} +1 -1
- package/dist/client/assets/dist-CZ4PyxQu.js +9 -0
- package/dist/client/assets/dist-CfTFp0AF.js +2 -0
- package/dist/client/assets/dist-CxmJXjJI.js +1 -0
- package/dist/client/assets/{dist-Dvb0SqcK.js → dist-D5u1uPmZ.js} +2 -2
- package/dist/client/assets/dist-D8HpMxmZ.js +1 -0
- package/dist/client/assets/{dist-AW5lyI3I.js → dist-DGBjhKI9.js} +1 -1
- package/dist/client/assets/dist-DRBIy9A1.js +1 -0
- package/dist/client/assets/dist-Dcww9FSw.js +1 -0
- package/dist/client/assets/{dist-moiMRpw_.js → dist-DjI7p99D.js} +1 -1
- package/dist/client/assets/dist-DlPa5gNa.js +7 -0
- package/dist/client/assets/dist-DxPJ1PN-.js +1 -0
- package/dist/client/assets/dist-HXD8sSA4.js +23 -0
- package/dist/client/assets/dist-LbeLCeoq.js +1 -0
- package/dist/client/assets/dist-ONdtnupI.js +1 -0
- package/dist/client/assets/dist-YqmXusLA.js +11 -0
- package/dist/client/assets/dist-ZAR1Tu2c.js +3 -0
- package/dist/client/assets/{dist-Cus6_oaF.js → dist-i79xiXVk.js} +2 -2
- package/dist/client/assets/index-Cl8iehsn.css +1 -0
- package/dist/client/assets/index-DW2nd-Cf.js +350 -0
- package/dist/client/index.html +2 -2
- package/dist/server/application/provider-service.d.ts +1 -0
- package/dist/server/application/provider-service.js +12 -2
- package/dist/server/http-server.js +105 -41
- package/dist/server/managed-http-direct.d.ts +9 -0
- package/dist/server/managed-http-direct.js +100 -0
- package/dist/server/managed-http.js +14 -0
- package/dist/server/managed-servers.d.ts +17 -1
- package/dist/server/managed-servers.js +196 -30
- package/dist/server/pi-session.js +1 -1
- package/dist/server/published-server-update.d.ts +6 -0
- package/dist/server/published-server-update.js +54 -0
- package/dist/server/read-receipts.d.ts +10 -0
- package/dist/server/read-receipts.js +55 -0
- package/dist/server/update-status.d.ts +3 -1
- package/dist/server/update-status.js +5 -3
- package/dist/shared/directory-completion.d.ts +5 -0
- package/dist/shared/directory-completion.js +10 -0
- package/dist/shared/managed-servers.d.ts +15 -0
- package/dist/shared/managed-servers.js +3 -1
- package/dist/shared/read-receipts.d.ts +7 -0
- package/dist/shared/read-receipts.js +3 -0
- package/dist/shared/update-status.d.ts +1 -1
- package/dist/shared/update-status.js +1 -1
- package/package.json +14 -1
- package/scripts/restart-process.mjs +11 -0
- package/scripts/restart-server.mjs +2 -2
- package/dist/client/assets/GitDiffEditor-Bb81nrRq.js +0 -29
- package/dist/client/assets/dist-B3-a6uF0.js +0 -7
- package/dist/client/assets/dist-BGxkyh6e.js +0 -1
- package/dist/client/assets/dist-BJxfd7yb.js +0 -11
- package/dist/client/assets/dist-BV64A9Ji.js +0 -1
- package/dist/client/assets/dist-CKF2Jksy.js +0 -1
- package/dist/client/assets/dist-CX_Hm4GS.js +0 -1
- package/dist/client/assets/dist-Cx00EZKR.js +0 -23
- package/dist/client/assets/dist-D71y2EI1.js +0 -1
- package/dist/client/assets/dist-Dc1MBGAG.js +0 -1
- package/dist/client/assets/dist-Dds-qLxY.js +0 -9
- package/dist/client/assets/dist-DeD9copn.js +0 -1
- package/dist/client/assets/dist-DuvGReu-.js +0 -6
- package/dist/client/assets/dist-J6XWqRpB.js +0 -3
- package/dist/client/assets/dist-scBkrwv-.js +0 -2
- package/dist/client/assets/index-BeRJ1cQe.js +0 -350
- package/dist/client/assets/index-D6ei0DbU.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evandu/super-pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.265",
|
|
4
4
|
"description": "Web control plane and companion for Pi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"skills",
|
|
21
21
|
"bin",
|
|
22
22
|
"scripts/restart-server.mjs",
|
|
23
|
+
"scripts/restart-process.mjs",
|
|
23
24
|
"README.md",
|
|
24
25
|
"assets/knowledge-model",
|
|
25
26
|
"scripts/patch-brace-expansion.mjs",
|
|
@@ -48,6 +49,13 @@
|
|
|
48
49
|
"pack:server": "npm run build && node scripts/pack-server.mjs"
|
|
49
50
|
},
|
|
50
51
|
"check:logic": [
|
|
52
|
+
"scripts/published-server-update.test.mjs",
|
|
53
|
+
"scripts/reader-recovery-scope.test.mjs",
|
|
54
|
+
"scripts/managed-direct.test.mjs",
|
|
55
|
+
"scripts/cli-completion.test.mjs",
|
|
56
|
+
"scripts/update-lifecycle.test.mjs",
|
|
57
|
+
"scripts/read-receipts.test.mjs",
|
|
58
|
+
"scripts/oauth-login-boundary.test.mjs",
|
|
51
59
|
"scripts/existing-service.test.mjs",
|
|
52
60
|
"scripts/ssh-keyboard-interactive.test.mjs",
|
|
53
61
|
"scripts/title-cold-start.test.mjs",
|
|
@@ -306,6 +314,11 @@
|
|
|
306
314
|
"scripts/session-reminder-pmo-rights.test.mjs"
|
|
307
315
|
],
|
|
308
316
|
"check:browser": [
|
|
317
|
+
"scripts/service-port-probe-browser.test.mjs",
|
|
318
|
+
"scripts/update-multi-server-browser.test.mjs",
|
|
319
|
+
"scripts/remote-queue-reconciliation-browser.test.mjs",
|
|
320
|
+
"scripts/workspace-directory-completion-browser.test.mjs",
|
|
321
|
+
"scripts/read-receipts-browser.test.mjs",
|
|
309
322
|
"scripts/ssh-keyboard-browser.test.mjs",
|
|
310
323
|
"scripts/desktop-browser.test.mjs",
|
|
311
324
|
"scripts/managed-remote-install.test.mjs",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { execFile } from "node:child_process";
|
|
3
|
+
import { promisify } from "node:util";
|
|
4
|
+
import { platform } from "node:os";
|
|
5
|
+
|
|
6
|
+
export async function readProcessCommandLine(pid, { system = platform(), read = readFile, exec = promisify(execFile) } = {}) {
|
|
7
|
+
if (!/^\d+$/.test(String(pid))) throw new Error("Invalid process identifier");
|
|
8
|
+
if (system === "win32") return (await exec("powershell", ["-NoProfile", "-Command", `(Get-CimInstance Win32_Process -Filter \"ProcessId=${pid}\").CommandLine`])).stdout.trim();
|
|
9
|
+
try { return (await read(`/proc/${pid}/cmdline`, "utf8")).replaceAll("\0", " ").trim(); }
|
|
10
|
+
catch { return (await exec("ps", ["-p", String(pid), "-o", "command="])).stdout.trim(); }
|
|
11
|
+
}
|
|
@@ -3,6 +3,7 @@ import { openSync, readFileSync } from "node:fs";
|
|
|
3
3
|
import { homedir, platform } from "node:os";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
|
+
import { readProcessCommandLine } from "./restart-process.mjs";
|
|
6
7
|
|
|
7
8
|
const execFileAsync = promisify(execFile);
|
|
8
9
|
|
|
@@ -38,8 +39,7 @@ async function pidsOnPort() {
|
|
|
38
39
|
catch { const { stdout } = await execFileAsync("sh", ["-c", `ss -lptn 'sport = :${port}' 2>/dev/null`]); return [...new Set([...stdout.matchAll(/pid=(\d+)/g)].map((match) => match[1]))]; }
|
|
39
40
|
}
|
|
40
41
|
async function commandLine(pid) {
|
|
41
|
-
|
|
42
|
-
try { return (await import("node:fs/promises")).readFile(`/proc/${pid}/cmdline`, "utf8").then((value) => value.replaceAll("\0", " ").trim()); } catch { const { stdout } = await execFileAsync("ps", ["-p", pid, "-o", "command="]); return stdout.trim(); }
|
|
42
|
+
return readProcessCommandLine(pid);
|
|
43
43
|
}
|
|
44
44
|
async function requestShutdown() {
|
|
45
45
|
const headers = {};
|