feat(storage): add StorageManager and cache subsystem; integrate storage into ConnectionManager and GitopsApp, migrate legacy connections, and add tests
This commit is contained in:
19
ts/paths.ts
Normal file
19
ts/paths.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import * as path from '@std/path';
|
||||
|
||||
export interface IGitopsPaths {
|
||||
gitopsHomeDir: string;
|
||||
defaultStoragePath: string;
|
||||
defaultTsmDbPath: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve gitops paths. Accepts optional baseDir for test isolation.
|
||||
*/
|
||||
export function resolvePaths(baseDir?: string): IGitopsPaths {
|
||||
const home = baseDir ?? path.join(Deno.env.get('HOME') ?? '/tmp', '.serve.zone', 'gitops');
|
||||
return {
|
||||
gitopsHomeDir: home,
|
||||
defaultStoragePath: path.join(home, 'storage'),
|
||||
defaultTsmDbPath: path.join(home, 'tsmdb'),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user