MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / initializeFS

Method initializeFS

services/app-builder/src/git-repository-do.ts:33–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 }
32
33 private async initializeFS(): Promise<void> {
34 if (this.fs) return;
35
36 logger.debug('Initializing SqliteFS', { id: this.ctx.id.toString() });
37
38 try {
39 this.fs = new SqliteFS(this.db);
40 this.fs.init();
41 } catch (error) {
42 this.fs = null;
43 logger.error('Failed to initialize SqliteFS', formatError(error));
44 throw error;
45 }
46
47 // Check if .git directory exists
48 try {
49 await this.fs.stat('.git');
50 this._initialized = true;
51 logger.debug('Repository already initialized');
52 } catch (_err) {
53 // .git doesn't exist, repo not initialized yet
54 this._initialized = false;
55 logger.debug('Repository not yet initialized');
56 }
57 }
58
59 async isInitialized(): Promise<boolean> {
60 return withLogTags(

Callers 7

isInitializedMethod · 0.95
initializeMethod · 0.95
exportGitObjectsMethod · 0.95
importGitObjectsMethod · 0.95
getLatestCommitMethod · 0.95
getStatsMethod · 0.95
pushToRemoteMethod · 0.95

Calls 6

debugMethod · 0.65
toStringMethod · 0.65
errorMethod · 0.65
formatErrorFunction · 0.50
initMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected