@meowlynxsea/koi 0.2.8 → 0.2.9
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 +4 -2
- package/scripts/postinstall.ts +3 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meowlynxsea/koi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "A coding agent built on Pi SDK with TUI + Bun runtime",
|
|
5
5
|
"module": "src/main.tsx",
|
|
6
6
|
"type": "module",
|
|
@@ -76,8 +76,10 @@
|
|
|
76
76
|
},
|
|
77
77
|
"trustedDependencies": [
|
|
78
78
|
"@google/genai",
|
|
79
|
+
"bun",
|
|
79
80
|
"koffi",
|
|
80
81
|
"onnxruntime-node",
|
|
81
|
-
"protobufjs"
|
|
82
|
+
"protobufjs",
|
|
83
|
+
"sharp"
|
|
82
84
|
]
|
|
83
85
|
}
|
package/scripts/postinstall.ts
CHANGED
|
@@ -25,31 +25,9 @@ const platformModules = [
|
|
|
25
25
|
"@opentui/core-win32-x64",
|
|
26
26
|
];
|
|
27
27
|
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
const coreVersion = (() => {
|
|
32
|
-
const pkgPath = join(rootDir, "node_modules", "@opentui", "core", "package.json");
|
|
33
|
-
if (!existsSync(pkgPath)) return null;
|
|
34
|
-
try {
|
|
35
|
-
return JSON.parse(readFileSync(pkgPath, "utf-8")).version;
|
|
36
|
-
} catch {
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
})();
|
|
40
|
-
|
|
41
|
-
if (coreVersion) {
|
|
42
|
-
for (const pkg of platformModules) {
|
|
43
|
-
const pkgPath = join(rootDir, "node_modules", pkg);
|
|
44
|
-
if (existsSync(pkgPath)) continue;
|
|
45
|
-
console.log(`Installing ${pkg}...`);
|
|
46
|
-
try {
|
|
47
|
-
execSync(`bun add ${pkg}@${coreVersion}`, { cwd: rootDir, stdio: "pipe" });
|
|
48
|
-
} catch (e) {
|
|
49
|
-
console.warn(`Warning: Failed to install ${pkg}`);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
28
|
+
// Platform modules installation is now handled by the installer scripts
|
|
29
|
+
// to avoid infinite recursion when using bun add in postinstall
|
|
30
|
+
// This script only creates the shim files for existing platform modules
|
|
53
31
|
|
|
54
32
|
const indexJsContent = `const module = await import("./libopentui.dylib", { with: { type: "file" } });
|
|
55
33
|
export default module.default;
|