@oh-my-pi/pi-utils 15.7.2 → 15.7.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/types/dirs.d.ts +2 -0
- package/package.json +3 -3
- package/src/dirs.ts +5 -5
- package/src/env.ts +11 -1
package/dist/types/dirs.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ export declare function getGpuCachePath(): string;
|
|
|
95
95
|
* cache file without touching the rest of the config root.
|
|
96
96
|
*/
|
|
97
97
|
export declare function getGithubCacheDbPath(): string;
|
|
98
|
+
/** Get the local FastEmbed model cache directory (~/.omp/cache/fastembed). */
|
|
99
|
+
export declare function getFastembedCacheDir(): string;
|
|
98
100
|
/** Get the natives directory (~/.omp/natives). */
|
|
99
101
|
export declare function getNativesDir(): string;
|
|
100
102
|
/** Get the stats database path (~/.omp/stats.db). */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-utils",
|
|
4
|
-
"version": "15.7.
|
|
4
|
+
"version": "15.7.5",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"check": "biome check . && bun run check:types",
|
|
27
27
|
"check:types": "tsgo -p tsconfig.json --noEmit",
|
|
28
28
|
"lint": "biome lint .",
|
|
29
|
-
"test": "bun test",
|
|
29
|
+
"test": "bun test --parallel",
|
|
30
30
|
"fix": "biome check --write --unsafe .",
|
|
31
31
|
"fmt": "biome format --write ."
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oh-my-pi/pi-natives": "15.7.
|
|
34
|
+
"@oh-my-pi/pi-natives": "15.7.5",
|
|
35
35
|
"beautiful-mermaid": "^1.1.3",
|
|
36
36
|
"handlebars": "^4.7.9",
|
|
37
37
|
"winston": "^3.19.0",
|
package/src/dirs.ts
CHANGED
|
@@ -28,11 +28,6 @@ export const VERSION: string = version;
|
|
|
28
28
|
/** Minimum Bun version */
|
|
29
29
|
export const MIN_BUN_VERSION: string = engines.bun.replace(/[^0-9.]/g, "");
|
|
30
30
|
|
|
31
|
-
try {
|
|
32
|
-
delete process.env.MallocStackLogging;
|
|
33
|
-
delete process.env.MallocStackLoggingNoCompact;
|
|
34
|
-
} catch {}
|
|
35
|
-
|
|
36
31
|
// =============================================================================
|
|
37
32
|
// Project directory
|
|
38
33
|
// =============================================================================
|
|
@@ -348,6 +343,11 @@ export function getGithubCacheDbPath(): string {
|
|
|
348
343
|
return dirs.rootSubdir(path.join("cache", "github-cache.db"), "cache");
|
|
349
344
|
}
|
|
350
345
|
|
|
346
|
+
/** Get the local FastEmbed model cache directory (~/.omp/cache/fastembed). */
|
|
347
|
+
export function getFastembedCacheDir(): string {
|
|
348
|
+
return dirs.rootSubdir(path.join("cache", "fastembed"), "cache");
|
|
349
|
+
}
|
|
350
|
+
|
|
351
351
|
/** Get the natives directory (~/.omp/natives). */
|
|
352
352
|
export function getNativesDir(): string {
|
|
353
353
|
return dirs.rootSubdir("natives", "cache");
|
package/src/env.ts
CHANGED
|
@@ -161,7 +161,17 @@ export function isCompiledBinary(): boolean {
|
|
|
161
161
|
return url.includes("$bunfs") || url.includes("~BUN") || url.includes("%7EBUN");
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
const TRUTHY: Dict<boolean> = {
|
|
164
|
+
const TRUTHY: Dict<boolean> = {
|
|
165
|
+
"1": true,
|
|
166
|
+
Y: true,
|
|
167
|
+
y: true,
|
|
168
|
+
TRUE: true,
|
|
169
|
+
true: true,
|
|
170
|
+
YES: true,
|
|
171
|
+
yes: true,
|
|
172
|
+
ON: true,
|
|
173
|
+
on: true,
|
|
174
|
+
};
|
|
165
175
|
export function $flag(name: string, def: boolean = false): boolean {
|
|
166
176
|
const value = $env[name];
|
|
167
177
|
if (!value) return def;
|