@oh-my-pi/pi-utils 15.7.1 → 15.7.3
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 -0
- 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.3",
|
|
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.3",
|
|
35
35
|
"beautiful-mermaid": "^1.1.3",
|
|
36
36
|
"handlebars": "^4.7.9",
|
|
37
37
|
"winston": "^3.19.0",
|
package/src/dirs.ts
CHANGED
|
@@ -348,6 +348,11 @@ export function getGithubCacheDbPath(): string {
|
|
|
348
348
|
return dirs.rootSubdir(path.join("cache", "github-cache.db"), "cache");
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
/** Get the local FastEmbed model cache directory (~/.omp/cache/fastembed). */
|
|
352
|
+
export function getFastembedCacheDir(): string {
|
|
353
|
+
return dirs.rootSubdir(path.join("cache", "fastembed"), "cache");
|
|
354
|
+
}
|
|
355
|
+
|
|
351
356
|
/** Get the natives directory (~/.omp/natives). */
|
|
352
357
|
export function getNativesDir(): string {
|
|
353
358
|
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;
|