chat-logbook 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/api/dist/index.js +15 -1
- package/package.json +4 -1
package/api/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
+
import fs2 from "fs";
|
|
2
3
|
import os from "os";
|
|
3
4
|
import path2 from "path";
|
|
5
|
+
import { exec } from "child_process";
|
|
4
6
|
import { fileURLToPath } from "url";
|
|
5
7
|
|
|
6
8
|
// ../node_modules/.pnpm/@hono+node-server@1.19.11_hono@4.12.9/node_modules/@hono/node-server/dist/index.mjs
|
|
@@ -574,6 +576,9 @@ var serve = (options, listeningListener) => {
|
|
|
574
576
|
return server2;
|
|
575
577
|
};
|
|
576
578
|
|
|
579
|
+
// src/index.ts
|
|
580
|
+
import updateNotifier from "update-notifier";
|
|
581
|
+
|
|
577
582
|
// ../node_modules/.pnpm/hono@4.12.9/node_modules/hono/dist/compose.js
|
|
578
583
|
var compose = (middleware, onError, onNotFound) => {
|
|
579
584
|
return (context, next) => {
|
|
@@ -2962,12 +2967,21 @@ function createApp({ claudeDir: claudeDir2, webDistDir: webDistDir2 }) {
|
|
|
2962
2967
|
|
|
2963
2968
|
// src/index.ts
|
|
2964
2969
|
var __dirname = path2.dirname(fileURLToPath(import.meta.url));
|
|
2970
|
+
var pkgPath = path2.join(__dirname, "../../package.json");
|
|
2971
|
+
var pkg = JSON.parse(fs2.readFileSync(pkgPath, "utf-8"));
|
|
2972
|
+
updateNotifier({ pkg }).notify();
|
|
2965
2973
|
var claudeDir = path2.join(os.homedir(), ".claude");
|
|
2966
2974
|
var webDistDir = path2.join(__dirname, "../../web/dist");
|
|
2967
2975
|
var app = createApp({ claudeDir, webDistDir });
|
|
2968
2976
|
var port = Number(process.env.PORT) || 3100;
|
|
2977
|
+
function openBrowser(url) {
|
|
2978
|
+
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2979
|
+
exec(`${cmd} ${url}`);
|
|
2980
|
+
}
|
|
2969
2981
|
var server = serve({ fetch: app.fetch, port }, (info) => {
|
|
2970
|
-
|
|
2982
|
+
const url = `http://localhost:${info.port}`;
|
|
2983
|
+
console.log(`chat-logbook is running at \x1B[36m${url}\x1B[0m`);
|
|
2984
|
+
openBrowser(url);
|
|
2971
2985
|
});
|
|
2972
2986
|
server.on("error", (err) => {
|
|
2973
2987
|
if (err.code === "EADDRINUSE") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chat-logbook",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "A local-first conversation manager for Claude Code",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
"msw"
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"update-notifier": "^7.3.1"
|
|
32
|
+
},
|
|
30
33
|
"devDependencies": {
|
|
31
34
|
"husky": "^9.1.7",
|
|
32
35
|
"lint-staged": "^16.4.0",
|