@gati-framework/cli
Version:
CLI tool for Gati framework - create, develop, build and deploy cloud-native applications
52 lines • 1.51 kB
TypeScript
/**
* @module cli/analyzer/version-detector
* @description Detects handler changes and creates new versions automatically
*/
import { VersionRegistry } from '@gati-framework/runtime/timescape/registry';
import type { TSV } from '@gati-framework/runtime/timescape/types';
export interface VersionChange {
handlerPath: string;
oldVersion?: TSV;
newVersion: TSV;
breaking: boolean;
changes: string[];
timestamp: number;
}
export declare class VersionDetector {
private registry;
private diffEngine;
private projectRoot;
private registryPath;
private enabled;
constructor(projectRoot: string, enabled?: boolean);
/**
* Detect if a handler has changed and create a new version if needed
*/
detectChange(handlerPath: string, handlerCode: string): Promise<VersionChange | null>;
/**
* Extract schema from handler code
* This is a simplified version - in production, you'd use TypeScript compiler API
*/
private extractSchema;
/**
* Parse interface body to extract fields
*/
private parseInterfaceBody;
/**
* Calculate hash of schema for change detection
*/
private calculateHash;
/**
* Extract handler name from path
*/
private extractHandlerName;
/**
* Get version registry for external access
*/
getRegistry(): VersionRegistry;
/**
* Check if versioning is enabled
*/
isEnabled(): boolean;
}
//# sourceMappingURL=version-detector.d.ts.map