This commit is contained in:
2026-02-24 12:29:58 +00:00
commit 3fad287a29
58 changed files with 3999 additions and 0 deletions

34
ts/classes/gitopsapp.ts Normal file
View File

@@ -0,0 +1,34 @@
import { logger } from '../logging.ts';
import { ConnectionManager } from './connectionmanager.ts';
import { OpsServer } from '../opsserver/index.ts';
/**
* Main GitOps application orchestrator
*/
export class GitopsApp {
public connectionManager: ConnectionManager;
public opsServer: OpsServer;
constructor() {
this.connectionManager = new ConnectionManager();
this.opsServer = new OpsServer(this);
}
async start(port = 3000): Promise<void> {
logger.info('Initializing GitOps...');
// Initialize connection manager (loads saved connections)
await this.connectionManager.init();
// Start OpsServer
await this.opsServer.start(port);
logger.success('GitOps initialized successfully');
}
async stop(): Promise<void> {
logger.info('Shutting down GitOps...');
await this.opsServer.stop();
logger.success('GitOps shutdown complete');
}
}