spindb 0.62.4 → 0.62.5
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/config/version.js
CHANGED
package/dist/core/library-env.js
CHANGED
|
@@ -20,35 +20,63 @@ import { join } from 'path';
|
|
|
20
20
|
* On Linux: LD_LIBRARY_PATH
|
|
21
21
|
* On Windows: returns undefined (not applicable).
|
|
22
22
|
*
|
|
23
|
+
* {binPath}/lib is PREPENDED to any value the caller already has, never
|
|
24
|
+
* substituted for it. Callers spread the result over process.env
|
|
25
|
+
* (`{ ...process.env, ...getLibraryEnv(binPath) }`), so returning a bare
|
|
26
|
+
* value silently dropped a user's own LD_LIBRARY_PATH / DYLD_FALLBACK_LIBRARY_PATH
|
|
27
|
+
* for the spawned engine - which breaks anyone who relies on it to resolve
|
|
28
|
+
* their own libraries. Prepending keeps our bundled copy winning while
|
|
29
|
+
* leaving their search path intact behind it.
|
|
30
|
+
*
|
|
23
31
|
* Usage: spread into spawn env: `{ ...process.env, ...getLibraryEnv(binPath) }`
|
|
24
32
|
*/
|
|
25
33
|
export function getLibraryEnv(binPath) {
|
|
26
34
|
const plat = osPlatform();
|
|
27
35
|
const libDir = join(binPath, 'lib');
|
|
28
36
|
if (plat === 'darwin') {
|
|
29
|
-
return {
|
|
37
|
+
return {
|
|
38
|
+
DYLD_FALLBACK_LIBRARY_PATH: prependPath(libDir, process.env.DYLD_FALLBACK_LIBRARY_PATH, ':'),
|
|
39
|
+
};
|
|
30
40
|
}
|
|
31
41
|
if (plat === 'linux') {
|
|
32
|
-
return {
|
|
42
|
+
return {
|
|
43
|
+
LD_LIBRARY_PATH: prependPath(libDir, process.env.LD_LIBRARY_PATH, ':'),
|
|
44
|
+
};
|
|
33
45
|
}
|
|
34
46
|
return undefined;
|
|
35
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Puts `dir` at the front of an existing search path, preserving whatever was
|
|
50
|
+
* already there. An absent or empty existing value yields just `dir`, so no
|
|
51
|
+
* caller ever gets a stray leading or trailing separator.
|
|
52
|
+
*
|
|
53
|
+
* Exported for tests: it is the whole of the prepend-not-replace behavior, and
|
|
54
|
+
* testing it directly is the only way to cover the Windows separator on a
|
|
55
|
+
* non-Windows CI runner.
|
|
56
|
+
*/
|
|
57
|
+
export function prependPath(dir, existing, separator) {
|
|
58
|
+
return existing ? `${dir}${separator}${existing}` : dir;
|
|
59
|
+
}
|
|
36
60
|
/**
|
|
37
61
|
* Returns env vars that add a directory to the Windows DLL search path.
|
|
38
|
-
*
|
|
62
|
+
* PREPENDS the directory to the existing PATH environment variable.
|
|
39
63
|
* Returns undefined on non-Windows platforms (not needed).
|
|
40
64
|
*
|
|
41
65
|
* Use for engines that bundle DLLs in subdirectories that aren't on the
|
|
42
66
|
* default search path (e.g., InfluxDB's python/ directory containing
|
|
43
67
|
* python313.dll needed at load time).
|
|
44
68
|
*
|
|
69
|
+
* Prepend rather than append: this exists to make OUR bundled DLL resolve,
|
|
70
|
+
* and appending loses to any same-named DLL already reachable on PATH. A
|
|
71
|
+
* stray python313.dll of a different build then wins, which produces a
|
|
72
|
+
* second, harder-to-read failure than the missing-DLL one this fixes.
|
|
73
|
+
*
|
|
45
74
|
* Usage: spread into spawn env: `{ ...process.env, ...getWindowsDllEnv(dllDir) }`
|
|
46
75
|
*/
|
|
47
76
|
export function getWindowsDllEnv(dllDir) {
|
|
48
77
|
if (osPlatform() !== 'win32')
|
|
49
78
|
return undefined;
|
|
50
|
-
|
|
51
|
-
return { PATH: `${currentPath};${dllDir}` };
|
|
79
|
+
return { PATH: prependPath(dllDir, process.env.PATH, ';') };
|
|
52
80
|
}
|
|
53
81
|
/**
|
|
54
82
|
* Scans stderr/log output for dynamic library loading errors and returns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-env.js","sourceRoot":"","sources":["../../core/library-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,QAAQ,IAAI,UA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AAQ,CAAC,gCAAgC,CAAC,EAChD,CAAC;QACD,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;QAE5E,IAAI,YAAY,EAAE,CAAC;YACjB,OAAO,CACL,GAAG,UAAU,gDAAgD;gBAC7D,yDAAyD;gBACzD,uDAAuD;gBACvD,mDAAmD,CACpD,CAAA;QACH,CAAC;QAED,OAAO,CACL,GAAG,UAAU,2DAA2D;YACxE,8EAA8E;YAC9E,mDAAmD,CACpD,CAAA;IACH,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spindb",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.5",
|
|
4
4
|
"author": "Bob Bass <bob@bbass.co>",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"description": "Zero-config Docker-free local database containers. Create, backup, and clone a variety of popular databases.",
|