@oh-my-pi/pi-utils 15.9.1 → 15.9.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 +6 -0
- package/package.json +2 -2
- package/src/dirs.ts +11 -0
package/dist/types/dirs.d.ts
CHANGED
|
@@ -95,6 +95,12 @@ 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
|
+
/**
|
|
99
|
+
* Get the encrypted auth-broker snapshot cache path (~/.omp/cache/auth-broker-snapshot.enc).
|
|
100
|
+
* Honors the `OMP_AUTH_BROKER_SNAPSHOT_CACHE` env var when set so tests and
|
|
101
|
+
* operators can isolate or relocate the cache file.
|
|
102
|
+
*/
|
|
103
|
+
export declare function getAuthBrokerSnapshotCachePath(): string;
|
|
98
104
|
/** Get the local FastEmbed model cache directory (~/.omp/cache/fastembed). */
|
|
99
105
|
export declare function getFastembedCacheDir(): string;
|
|
100
106
|
/** Get the natives directory (~/.omp/natives). */
|
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.9.
|
|
4
|
+
"version": "15.9.3",
|
|
5
5
|
"description": "Shared utilities for pi packages",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"fmt": "biome format --write ."
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@oh-my-pi/pi-natives": "15.9.
|
|
34
|
+
"@oh-my-pi/pi-natives": "15.9.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
|
@@ -343,6 +343,17 @@ export function getGithubCacheDbPath(): string {
|
|
|
343
343
|
return dirs.rootSubdir(path.join("cache", "github-cache.db"), "cache");
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
/**
|
|
347
|
+
* Get the encrypted auth-broker snapshot cache path (~/.omp/cache/auth-broker-snapshot.enc).
|
|
348
|
+
* Honors the `OMP_AUTH_BROKER_SNAPSHOT_CACHE` env var when set so tests and
|
|
349
|
+
* operators can isolate or relocate the cache file.
|
|
350
|
+
*/
|
|
351
|
+
export function getAuthBrokerSnapshotCachePath(): string {
|
|
352
|
+
const override = process.env.OMP_AUTH_BROKER_SNAPSHOT_CACHE;
|
|
353
|
+
if (override) return override;
|
|
354
|
+
return dirs.rootSubdir(path.join("cache", "auth-broker-snapshot.enc"), "cache");
|
|
355
|
+
}
|
|
356
|
+
|
|
346
357
|
/** Get the local FastEmbed model cache directory (~/.omp/cache/fastembed). */
|
|
347
358
|
export function getFastembedCacheDir(): string {
|
|
348
359
|
return dirs.rootSubdir(path.join("cache", "fastembed"), "cache");
|