@k-electron/k-bench 0.0.0 → 0.1.1
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/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/js/scripts/command-lib.js +56 -0
- package/dist/js/scripts/install-lib.js +187 -0
- package/dist/js/scripts/install.js +233 -0
- package/dist/js/scripts/k-bench.js +53 -0
- package/dist/js/scripts/status.js +178 -0
- package/dist/js/scripts/tailscale-serve.js +135 -0
- package/dist/js/scripts/uninstall.js +150 -0
- package/dist/js/src/server/access-guard.js +63 -0
- package/dist/js/src/server/app.js +122 -0
- package/dist/js/src/server/attachments.js +273 -0
- package/dist/js/src/server/config.js +42 -0
- package/dist/js/src/server/directories.js +34 -0
- package/dist/js/src/server/events.js +31 -0
- package/dist/js/src/server/main.js +42 -0
- package/dist/js/src/server/naming.js +9 -0
- package/dist/js/src/server/reconciler.js +41 -0
- package/dist/js/src/server/server.js +86 -0
- package/dist/js/src/server/service.js +217 -0
- package/dist/js/src/server/state-feed.js +115 -0
- package/dist/js/src/server/static.js +46 -0
- package/dist/js/src/server/store.js +127 -0
- package/dist/js/src/server/terminal.js +64 -0
- package/dist/js/src/server/tmux.js +323 -0
- package/dist/js/src/shared/terminal-protocol.js +67 -0
- package/dist/web/assets/index-BeaoLAfY.css +2 -0
- package/dist/web/assets/index-rujAJZxv.js +68 -0
- package/dist/web/index.html +13 -0
- package/package.json +91 -3
- package/scripts/fix-node-pty.mjs +21 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en" class="dark">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content" />
|
|
6
|
+
<title>k-bench</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-rujAJZxv.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BeaoLAfY.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,7 +1,95 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k-electron/k-bench",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Persistent terminal Sessions on your Mac, organised into Workspaces, reachable from any device on your tailnet.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/k-electron/k-bench.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/k-electron/k-bench#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/k-electron/k-bench/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"claude-code",
|
|
16
|
+
"tmux",
|
|
17
|
+
"tailscale",
|
|
18
|
+
"terminal",
|
|
19
|
+
"macos"
|
|
20
|
+
],
|
|
21
|
+
"os": [
|
|
22
|
+
"darwin"
|
|
23
|
+
],
|
|
24
|
+
"type": "module",
|
|
25
|
+
"bin": {
|
|
26
|
+
"k-bench": "dist/js/scripts/k-bench.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/js",
|
|
30
|
+
"dist/web",
|
|
31
|
+
"scripts/fix-node-pty.mjs"
|
|
32
|
+
],
|
|
33
|
+
"packageManager": "pnpm@12.16.1",
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=26"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"postinstall": "node scripts/fix-node-pty.mjs",
|
|
39
|
+
"dev": "node scripts/dev.mjs",
|
|
40
|
+
"dev:serve": "node scripts/dev-serve.ts",
|
|
41
|
+
"build": "pnpm build:web && pnpm build:server",
|
|
42
|
+
"build:web": "vite build",
|
|
43
|
+
"build:server": "rm -rf dist/js && tsc -p tsconfig.build.json",
|
|
44
|
+
"prepack": "pnpm build",
|
|
45
|
+
"start": "node src/server/main.ts",
|
|
46
|
+
"install-app": "node scripts/k-bench.ts install",
|
|
47
|
+
"lint": "biome check --error-on-warnings .",
|
|
48
|
+
"format": "biome check --write .",
|
|
49
|
+
"typecheck": "tsc --noEmit && tsc --noEmit -p web",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:e2e": "playwright test",
|
|
52
|
+
"check": "pnpm lint && pnpm typecheck && pnpm test",
|
|
53
|
+
"smoke": "node scripts/smoke.ts",
|
|
54
|
+
"release": "node scripts/release.ts",
|
|
55
|
+
"screenshots": "playwright test --config playwright.screenshots.config.ts",
|
|
56
|
+
"screenshots:record": "node scripts/record-hero.ts",
|
|
57
|
+
"screenshots:scrub": "node scripts/scrub-recording.ts",
|
|
58
|
+
"prepare": "git rev-parse --git-dir >/dev/null 2>&1 && git config core.hooksPath .githooks || true"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@hono/node-server": "^2.1.5",
|
|
62
|
+
"hono": "^4.13.16",
|
|
63
|
+
"node-pty": "^1.1.0",
|
|
64
|
+
"ws": "^8.22.1"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@biomejs/biome": "^2.6.4",
|
|
68
|
+
"@dnd-kit/core": "^6.3.1",
|
|
69
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
70
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
71
|
+
"@playwright/test": "^1.64.1",
|
|
72
|
+
"@radix-ui/react-alert-dialog": "^1.2.1",
|
|
73
|
+
"@radix-ui/react-dialog": "^1.3.1",
|
|
74
|
+
"@radix-ui/react-dropdown-menu": "^2.2.1",
|
|
75
|
+
"@radix-ui/react-slot": "^1.5.0",
|
|
76
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
77
|
+
"@types/node": "^26.6.6",
|
|
78
|
+
"@types/react": "^19.3.0",
|
|
79
|
+
"@types/react-dom": "^19.3.0",
|
|
80
|
+
"@types/ws": "^8.18.2",
|
|
81
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
82
|
+
"@xterm/addon-fit": "^0.11.0",
|
|
83
|
+
"@xterm/xterm": "^6.0.0",
|
|
84
|
+
"class-variance-authority": "^0.7.1",
|
|
85
|
+
"clsx": "^2.1.1",
|
|
86
|
+
"lucide-react": "^1.66.0",
|
|
87
|
+
"react": "^19.3.1",
|
|
88
|
+
"react-dom": "^19.3.1",
|
|
89
|
+
"tailwind-merge": "^3.7.0",
|
|
90
|
+
"tailwindcss": "^4.3.3",
|
|
91
|
+
"typescript": "^7.0.2",
|
|
92
|
+
"vite": "^8.3.5",
|
|
93
|
+
"vitest": "^5.0.5"
|
|
94
|
+
}
|
|
7
95
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// node-pty ships a prebuilt `spawn-helper` binary that pnpm installs without its execute
|
|
2
|
+
// bit, which makes every pty.spawn fail with "posix_spawnp failed". Restore the bit.
|
|
3
|
+
import { chmodSync, existsSync, readdirSync } from "node:fs";
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
|
|
7
|
+
const require = createRequire(import.meta.url);
|
|
8
|
+
let root;
|
|
9
|
+
try {
|
|
10
|
+
root = dirname(require.resolve("node-pty/package.json"));
|
|
11
|
+
} catch {
|
|
12
|
+
process.exit(0); // node-pty not installed (e.g. a partial install): nothing to fix
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const prebuilds = join(root, "prebuilds");
|
|
16
|
+
if (existsSync(prebuilds)) {
|
|
17
|
+
for (const platform of readdirSync(prebuilds)) {
|
|
18
|
+
const helper = join(prebuilds, platform, "spawn-helper");
|
|
19
|
+
if (existsSync(helper)) chmodSync(helper, 0o755);
|
|
20
|
+
}
|
|
21
|
+
}
|