UNPKG

@gati-framework/cli

Version:

CLI tool for Gati framework - create, develop, build and deploy cloud-native applications

31 lines 893 B
/** * @module cli/analyzer/hook-extractor * @description Extracts hook definitions from handler TypeScript code * * Implements Task 21: Hook Manifest Recording * - Detects lctx.before(), lctx.after(), lctx.catch() calls * - Extracts hook metadata (id, level, async, timeout, retries) * - Captures source location for debugging */ import * as ts from 'typescript'; /** * Extracted hook definition */ export interface ExtractedHook { id: string; type: 'before' | 'after' | 'catch'; level: 'global' | 'handler' | 'request'; isAsync: boolean; timeout?: number; retries?: number; sourceLocation: { file: string; line: number; column: number; }; } /** * Extract all hooks from a TypeScript source file */ export declare function extractHooks(sourceFile: ts.SourceFile): ExtractedHook[]; //# sourceMappingURL=hook-extractor.d.ts.map