jiren 1.0.9 → 1.0.10
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/components/native.ts +5 -5
- package/package.json +1 -1
package/components/native.ts
CHANGED
|
@@ -4,17 +4,17 @@ import { fileURLToPath } from "url";
|
|
|
4
4
|
|
|
5
5
|
// Helper to get library path
|
|
6
6
|
function getLibPath(): string {
|
|
7
|
+
const platform = process.platform;
|
|
8
|
+
const ext =
|
|
9
|
+
platform === "darwin" ? "dylib" : platform === "win32" ? "dll" : "so";
|
|
10
|
+
|
|
7
11
|
if (isBun) {
|
|
8
12
|
// @ts-ignore - Bun-specific
|
|
9
|
-
|
|
10
|
-
return join(import.meta.dir, `../lib/libhttpclient.${suffix}`);
|
|
13
|
+
return join(import.meta.dir, `../lib/libhttpclient.${ext}`);
|
|
11
14
|
} else {
|
|
12
15
|
// Node.js
|
|
13
16
|
const __filename = fileURLToPath(import.meta.url);
|
|
14
17
|
const __dirname = dirname(__filename);
|
|
15
|
-
const platform = process.platform;
|
|
16
|
-
const ext =
|
|
17
|
-
platform === "darwin" ? "dylib" : platform === "win32" ? "dll" : "so";
|
|
18
18
|
return join(__dirname, `../lib/libhttpclient.${ext}`);
|
|
19
19
|
}
|
|
20
20
|
}
|