claude-session-viewer 0.1.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/bin/cli.js +9 -2
- package/bin/dev.js +2 -1
- package/dist/client/assets/index-BRGpp7Nq.js +40 -0
- package/dist/client/assets/index-bRG2avxz.css +1 -0
- package/{index.html → dist/client/index.html} +2 -1
- package/dist/server/index.js +364 -0
- package/package.json +14 -3
- package/postcss.config.js +0 -6
- package/src/App.tsx +0 -174
- package/src/components/ProjectGroup.tsx +0 -132
- package/src/components/SessionDetail.tsx +0 -140
- package/src/components/SessionList.tsx +0 -45
- package/src/index.css +0 -55
- package/src/main.tsx +0 -10
- package/src/server/index.ts +0 -440
- package/tailwind.config.js +0 -11
- package/tsconfig.json +0 -31
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -32
package/bin/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
3
4
|
import { dirname, resolve } from "node:path";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
5
6
|
|
|
@@ -29,9 +30,15 @@ if (args.includes("--version") || args.includes("-v")) {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
const rootDir = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
32
|
-
const
|
|
33
|
+
const serverEntry = resolve(rootDir, "dist/server/index.js");
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
if (!existsSync(serverEntry)) {
|
|
36
|
+
console.error("Build artifacts not found.");
|
|
37
|
+
console.error("Run `npm install` and `npm run build` in the repository first.");
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const child = spawn(process.execPath, [serverEntry], {
|
|
35
42
|
cwd: rootDir,
|
|
36
43
|
stdio: "inherit",
|
|
37
44
|
});
|
package/bin/dev.js
CHANGED
|
@@ -7,7 +7,8 @@ import getPort from "get-port";
|
|
|
7
7
|
const rootDir = resolve(dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
8
|
const npmCmd = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const DEFAULT_PORT = 9090;
|
|
11
|
+
const port = await getPort({ port: DEFAULT_PORT });
|
|
11
12
|
|
|
12
13
|
const children = new Set();
|
|
13
14
|
|