ccpanel 0.1.1 → 0.1.2
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/dist/cli.js +12 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
import { homedir, networkInterfaces } from "os";
|
|
11
11
|
import { join as join6 } from "path";
|
|
12
12
|
import { createServer } from "net";
|
|
13
|
-
import { fileURLToPath
|
|
13
|
+
import { fileURLToPath } from "url";
|
|
14
|
+
import { realpathSync } from "fs";
|
|
14
15
|
import { serve } from "@hono/node-server";
|
|
15
16
|
import open from "open";
|
|
16
17
|
|
|
@@ -1047,11 +1048,8 @@ async function main() {
|
|
|
1047
1048
|
console.log(` \u5C40\u57DF\u7F51\u8BBF\u95EE\uFF1A http://${ip}:${port}`);
|
|
1048
1049
|
}
|
|
1049
1050
|
if (!process.argv.includes("--no-open")) {
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
} catch {
|
|
1053
|
-
console.log("\uFF08\u672A\u80FD\u81EA\u52A8\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u8BF7\u624B\u52A8\u8BBF\u95EE\u4E0A\u9762\u7684\u5730\u5740\uFF09");
|
|
1054
|
-
}
|
|
1051
|
+
open(url).then((sub) => sub?.on?.("error", () => {
|
|
1052
|
+
})).catch(() => console.log("\uFF08\u672A\u80FD\u81EA\u52A8\u6253\u5F00\u6D4F\u89C8\u5668\uFF0C\u8BF7\u624B\u52A8\u8BBF\u95EE\u4E0A\u9762\u7684\u5730\u5740\uFF09"));
|
|
1055
1053
|
}
|
|
1056
1054
|
}
|
|
1057
1055
|
function lanAddresses() {
|
|
@@ -1064,7 +1062,14 @@ function lanAddresses() {
|
|
|
1064
1062
|
return out;
|
|
1065
1063
|
}
|
|
1066
1064
|
function isMainModule(argvPath, moduleUrl) {
|
|
1067
|
-
|
|
1065
|
+
if (!argvPath) return false;
|
|
1066
|
+
const modulePath = fileURLToPath(moduleUrl);
|
|
1067
|
+
if (argvPath === modulePath) return true;
|
|
1068
|
+
try {
|
|
1069
|
+
return realpathSync(argvPath) === realpathSync(modulePath);
|
|
1070
|
+
} catch {
|
|
1071
|
+
return false;
|
|
1072
|
+
}
|
|
1068
1073
|
}
|
|
1069
1074
|
if (isMainModule(process.argv[1], import.meta.url)) {
|
|
1070
1075
|
void main();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccpanel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "本地图形化管理 Claude Code 配置:MCP、Skills、子 Agent、Commands、配置文件、Memory、Sessions、Plugins",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": { "type": "git", "url": "git+https://gitee.com/jerry123456789099/ccpanel.git" },
|