memvid-cli 2.0.135 → 2.0.137
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/bin/memvid +19 -1
- package/package.json +5 -5
- package/scripts/postinstall.js +16 -19
package/bin/memvid
CHANGED
|
@@ -53,9 +53,27 @@ function getBinaryPath() {
|
|
|
53
53
|
const binaryPath = getBinaryPath();
|
|
54
54
|
const args = process.argv.slice(2);
|
|
55
55
|
|
|
56
|
+
// Get the directory containing the binary (where all libraries are)
|
|
57
|
+
const binaryDir = path.dirname(binaryPath);
|
|
58
|
+
|
|
59
|
+
// Set up environment with library search path
|
|
60
|
+
const env = { ...process.env };
|
|
61
|
+
const platform = os.platform();
|
|
62
|
+
|
|
63
|
+
if (platform === 'linux') {
|
|
64
|
+
// Add binary directory to LD_LIBRARY_PATH for Linux
|
|
65
|
+
const existingPath = env.LD_LIBRARY_PATH || '';
|
|
66
|
+
env.LD_LIBRARY_PATH = existingPath ? `${binaryDir}:${existingPath}` : binaryDir;
|
|
67
|
+
} else if (platform === 'darwin') {
|
|
68
|
+
// Add binary directory to DYLD_LIBRARY_PATH for macOS
|
|
69
|
+
// Note: Usually not needed if @loader_path is set correctly, but helps as fallback
|
|
70
|
+
const existingPath = env.DYLD_LIBRARY_PATH || '';
|
|
71
|
+
env.DYLD_LIBRARY_PATH = existingPath ? `${binaryDir}:${existingPath}` : binaryDir;
|
|
72
|
+
}
|
|
73
|
+
|
|
56
74
|
const child = spawn(binaryPath, args, {
|
|
57
75
|
stdio: 'inherit',
|
|
58
|
-
env:
|
|
76
|
+
env: env,
|
|
59
77
|
});
|
|
60
78
|
|
|
61
79
|
child.on('error', (err) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memvid-cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.137",
|
|
4
4
|
"description": "AI memory CLI - crash-safe, single-file storage with semantic search",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"postinstall": "node scripts/postinstall.js"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"@memvid/cli-darwin-arm64": "2.0.
|
|
36
|
-
"@memvid/cli-darwin-x64": "2.0.
|
|
37
|
-
"@memvid/cli-linux-x64": "2.0.
|
|
38
|
-
"@memvid/cli-win32-x64": "2.0.
|
|
35
|
+
"@memvid/cli-darwin-arm64": "2.0.134",
|
|
36
|
+
"@memvid/cli-darwin-x64": "2.0.134",
|
|
37
|
+
"@memvid/cli-linux-x64": "2.0.134",
|
|
38
|
+
"@memvid/cli-win32-x64": "2.0.134"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=14"
|
package/scripts/postinstall.js
CHANGED
|
@@ -46,7 +46,7 @@ if (!pkgPath) {
|
|
|
46
46
|
process.exit(0);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// Make binaries executable on Unix systems
|
|
49
|
+
// Make binaries and libraries executable on Unix systems
|
|
50
50
|
if (platform !== 'win32') {
|
|
51
51
|
const binName = 'memvid';
|
|
52
52
|
const binPath = path.join(pkgPath, binName);
|
|
@@ -59,25 +59,22 @@ if (platform !== 'win32') {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (fs.existsSync(tikaPathSo)) {
|
|
76
|
-
try {
|
|
77
|
-
fs.chmodSync(tikaPathSo, 0o755);
|
|
78
|
-
} catch (err) {
|
|
79
|
-
// Ignore chmod errors
|
|
62
|
+
// Make all bundled libraries executable (.dylib for macOS, .so for Linux)
|
|
63
|
+
// This includes libtika_native plus all AWT companion libraries
|
|
64
|
+
try {
|
|
65
|
+
const files = fs.readdirSync(pkgPath);
|
|
66
|
+
for (const file of files) {
|
|
67
|
+
if (file.endsWith('.dylib') || file.endsWith('.so')) {
|
|
68
|
+
const libPath = path.join(pkgPath, file);
|
|
69
|
+
try {
|
|
70
|
+
fs.chmodSync(libPath, 0o755);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
// Ignore chmod errors
|
|
73
|
+
}
|
|
74
|
+
}
|
|
80
75
|
}
|
|
76
|
+
} catch (err) {
|
|
77
|
+
// Ignore directory read errors
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
80
|
|