import { Command } from 'commander'; import { Scene } from '../../Scene'; import { ArkMethod } from '../../core/model/ArkMethod'; export type CgAlgorithm = 'cha' | 'rta'; export type CgFormat = 'json' | 'text' | 'dot' | 'csv'; export type CgDirection = 'forward' | 'backward'; export type CgEdgeFilter = 'call' | 'virtual' | 'interface' | 'all'; export interface CgCommandOptions { algorithm: CgAlgorithm; output: string; format: CgFormat; entry: string[]; reachableFrom: string[]; direction: CgDirection; edges: CgEdgeFilter; ohosSdkHome?: string; } interface CgEdgeRow { src: string; dst: string; type: Exclude; } export interface CgAnalyzeResult { input: string; algorithm: CgAlgorithm; algorithmUsed: 'cha' | 'rta'; format: CgFormat; direction: CgDirection; edges: CgEdgeFilter; entry: string[]; reachableFrom: string[]; reachable: string[]; nodes: string[]; edgeCount: number; edgesData: CgEdgeRow[]; } export declare function resolveMethodRef(scene: Scene, spec: string): ArkMethod | null; export declare function analyzeCg(input: string, options: CgCommandOptions): CgAnalyzeResult; export declare function runCgCommand(input: string, raw: CgCommandOptions): void; /** * Register call-graph command. * * Usage: * arkanalyzer cg [options] * * Examples: * arkanalyzer cg ./my_project -a rta -f json * arkanalyzer cg ./my_project -e "@dummyMain" -r "Dog.sound" --direction backward -f text * arkanalyzer cg ./my_project -f dot -o ./out/cg.dot --edges all */ export declare function register(program: Command): void; export {}; //# sourceMappingURL=cg.d.ts.map