@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
36 lines (35 loc) • 1.79 kB
TypeScript
import type { Socket } from './net';
import { type TREE_SITTER_DATAFLOW_PIPELINE, DEFAULT_SLICING_PIPELINE } from '../../../core/steps/pipeline/default-pipelines';
import type { PipelineOutput } from '../../../core/steps/pipeline/pipeline';
import type { DeepPartial } from 'ts-essentials';
import type { KnownParser, ParseStepOutput } from '../../../r-bridge/parser';
import type { FlowrConfig } from '../../../config';
import type { NormalizedAst } from '../../../r-bridge/lang-4.x/ast/model/processing/decorate';
import type { DataflowInformation } from '../../../dataflow/info';
import type { Tree } from 'web-tree-sitter';
/**
* Each connection handles a single client, answering to its requests.
* There is no need to construct this class manually, {@link FlowRServer} will do it for you.
*/
export declare class FlowRServerConnection {
private readonly socket;
private readonly parser;
private readonly name;
private readonly logger;
private readonly allowRSessionAccess;
private readonly config;
private readonly fileMap;
constructor(socket: Socket, name: string, parser: KnownParser, allowRSessionAccess: boolean, config: FlowrConfig);
private currentMessageBuffer;
private handleData;
private handleFileAnalysisRequest;
private sendFileAnalysisResponse;
private createAnalyzerForRequest;
private handleSliceRequest;
private handleRepl;
private handleQueryRequest;
}
/**
* Sanitizes analysis results by removing any potentially sensitive information like id maps.
*/
export declare function sanitizeAnalysisResults(parse: ParseStepOutput<string | Tree>, normalize: NormalizedAst, dataflow: DataflowInformation): DeepPartial<PipelineOutput<typeof DEFAULT_SLICING_PIPELINE | typeof TREE_SITTER_DATAFLOW_PIPELINE>>;