@linghun/cli 0.1.2 → 0.1.4
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/package.json +5 -5
- package/scripts/postinstall.cjs +55 -55
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linghun/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"@linghun/native-runner-win32-x64": "0.1.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@linghun/config": "0.1.0",
|
|
26
|
-
"@linghun/shared": "0.1.2",
|
|
27
|
-
"@linghun/providers": "0.1.1",
|
|
28
25
|
"@linghun/core": "0.1.0",
|
|
29
|
-
"@linghun/
|
|
26
|
+
"@linghun/config": "0.1.0",
|
|
27
|
+
"@linghun/tui": "0.1.3",
|
|
28
|
+
"@linghun/shared": "0.1.4",
|
|
29
|
+
"@linghun/providers": "0.1.1"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup src/main.ts --format esm --clean",
|
package/scripts/postinstall.cjs
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
const { chmodSync, existsSync } = require("node:fs");
|
|
2
|
-
const { join } = require("node:path");
|
|
3
|
-
const { createRequire } = require("node:module");
|
|
4
|
-
|
|
5
|
-
const root = join(__dirname, "..");
|
|
6
|
-
const requireFromCli = createRequire(__filename);
|
|
7
|
-
const executables = [
|
|
8
|
-
["bundled", "codebase-memory", "linux-x64", "codebase-memory-mcp"],
|
|
9
|
-
["bundled", "codebase-memory", "darwin-arm64", "codebase-memory-mcp"],
|
|
10
|
-
["bundled", "codebase-memory", "darwin-x64", "codebase-memory-mcp"],
|
|
11
|
-
["bundled", "native-runner", "linux-x64", "linghun-native-runner"],
|
|
12
|
-
["bundled", "native-runner", "darwin-arm64", "linghun-native-runner"],
|
|
13
|
-
["bundled", "native-runner", "darwin-x64", "linghun-native-runner"],
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
for (const parts of executables) {
|
|
17
|
-
const file = join(root, ...parts);
|
|
18
|
-
if (existsSync(file)) {
|
|
19
|
-
chmodSync(file, 0o755);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
for (const packageName of [
|
|
24
|
-
"@linghun/codebase-memory-linux-x64",
|
|
25
|
-
"@linghun/codebase-memory-darwin-arm64",
|
|
26
|
-
"@linghun/codebase-memory-darwin-x64",
|
|
27
|
-
"@linghun/native-runner-linux-x64",
|
|
28
|
-
"@linghun/native-runner-darwin-arm64",
|
|
29
|
-
"@linghun/native-runner-darwin-x64",
|
|
30
|
-
]) {
|
|
31
|
-
try {
|
|
32
|
-
const packageRoot = join(requireFromCli.resolve(`${packageName}/package.json`), "..");
|
|
33
|
-
const executable =
|
|
34
|
-
packageName.includes("codebase-memory")
|
|
35
|
-
? join(
|
|
36
|
-
packageRoot,
|
|
37
|
-
"bundled",
|
|
38
|
-
"codebase-memory",
|
|
39
|
-
packageName.replace("@linghun/codebase-memory-", ""),
|
|
40
|
-
"codebase-memory-mcp",
|
|
41
|
-
)
|
|
42
|
-
: join(
|
|
43
|
-
packageRoot,
|
|
44
|
-
"bundled",
|
|
45
|
-
"native-runner",
|
|
46
|
-
packageName.replace("@linghun/native-runner-", ""),
|
|
47
|
-
"linghun-native-runner",
|
|
48
|
-
);
|
|
49
|
-
if (existsSync(executable)) {
|
|
50
|
-
chmodSync(executable, 0o755);
|
|
51
|
-
}
|
|
52
|
-
} catch {
|
|
53
|
-
// Optional platform packages are intentionally absent on other platforms.
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
const { chmodSync, existsSync } = require("node:fs");
|
|
2
|
+
const { join } = require("node:path");
|
|
3
|
+
const { createRequire } = require("node:module");
|
|
4
|
+
|
|
5
|
+
const root = join(__dirname, "..");
|
|
6
|
+
const requireFromCli = createRequire(__filename);
|
|
7
|
+
const executables = [
|
|
8
|
+
["bundled", "codebase-memory", "linux-x64", "codebase-memory-mcp"],
|
|
9
|
+
["bundled", "codebase-memory", "darwin-arm64", "codebase-memory-mcp"],
|
|
10
|
+
["bundled", "codebase-memory", "darwin-x64", "codebase-memory-mcp"],
|
|
11
|
+
["bundled", "native-runner", "linux-x64", "linghun-native-runner"],
|
|
12
|
+
["bundled", "native-runner", "darwin-arm64", "linghun-native-runner"],
|
|
13
|
+
["bundled", "native-runner", "darwin-x64", "linghun-native-runner"],
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
for (const parts of executables) {
|
|
17
|
+
const file = join(root, ...parts);
|
|
18
|
+
if (existsSync(file)) {
|
|
19
|
+
chmodSync(file, 0o755);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
for (const packageName of [
|
|
24
|
+
"@linghun/codebase-memory-linux-x64",
|
|
25
|
+
"@linghun/codebase-memory-darwin-arm64",
|
|
26
|
+
"@linghun/codebase-memory-darwin-x64",
|
|
27
|
+
"@linghun/native-runner-linux-x64",
|
|
28
|
+
"@linghun/native-runner-darwin-arm64",
|
|
29
|
+
"@linghun/native-runner-darwin-x64",
|
|
30
|
+
]) {
|
|
31
|
+
try {
|
|
32
|
+
const packageRoot = join(requireFromCli.resolve(`${packageName}/package.json`), "..");
|
|
33
|
+
const executable =
|
|
34
|
+
packageName.includes("codebase-memory")
|
|
35
|
+
? join(
|
|
36
|
+
packageRoot,
|
|
37
|
+
"bundled",
|
|
38
|
+
"codebase-memory",
|
|
39
|
+
packageName.replace("@linghun/codebase-memory-", ""),
|
|
40
|
+
"codebase-memory-mcp",
|
|
41
|
+
)
|
|
42
|
+
: join(
|
|
43
|
+
packageRoot,
|
|
44
|
+
"bundled",
|
|
45
|
+
"native-runner",
|
|
46
|
+
packageName.replace("@linghun/native-runner-", ""),
|
|
47
|
+
"linghun-native-runner",
|
|
48
|
+
);
|
|
49
|
+
if (existsSync(executable)) {
|
|
50
|
+
chmodSync(executable, 0o755);
|
|
51
|
+
}
|
|
52
|
+
} catch {
|
|
53
|
+
// Optional platform packages are intentionally absent on other platforms.
|
|
54
|
+
}
|
|
55
|
+
}
|