@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
67 lines (66 loc) • 3.44 kB
TypeScript
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
import { executeProjectQuery } from './project-query-executor';
import Joi from 'joi';
import type { RAuthorInfo } from '../../../util/r-author';
import type { RLicenseElementInfo } from '../../../util/r-license';
import type { FileRole } from '../../../project/context/flowr-file';
import type { ProjectKind } from '../../../project/context/project-kind';
export interface ProjectQuery extends BaseQueryFormat {
readonly type: 'project';
/** Whether to include Dataflow information in the result. */
readonly withDf?: boolean;
}
/** Statistics on the project's declared dependencies, cross-referenced with the signature database. */
export interface ProjectDependencyStats {
/** Number of packages in the `Imports` field. */
readonly imports: number;
/** Number of packages in the `Depends` field (excluding the `R` version pseudo-package). */
readonly depends: number;
/** Number of packages in the `Suggests` field. */
readonly suggests: number;
/** Number of packages in the `LinkingTo` field. */
readonly linkingTo: number;
/** Number of unique runtime dependencies (`Imports`, `Depends`, and `LinkingTo` combined). */
readonly runtime: number;
/** How many of the runtime dependencies are base or recommended R packages. */
readonly base: number;
/** How many of the non-base runtime dependencies are covered by the loaded signature database(s). */
readonly covered: number;
/** The first few runtime dependencies with the version the signature database resolved them to, if any. */
readonly first: {
name: string;
base: boolean;
dbVersion?: string;
}[];
/** The required R version derived from the `Depends` field, if declared. */
readonly rVersion?: string;
}
export interface ProjectQueryResult extends BaseQueryResult {
/** The name of the project, if available. */
readonly name?: string;
/** The authors of the project. */
readonly authors?: RAuthorInfo[];
/** The files considered part of the project. */
readonly files: (string | '<inline>')[];
/** The counts of files by their role in the project. */
readonly roleCounts?: Record<FileRole, number>;
/** The licenses of the project. */
readonly licenses?: RLicenseElementInfo[];
/** The encoding of the project files. */
readonly encoding?: string;
/** The version of the project, if available. */
readonly version?: string;
/** The R version the project targets, e.g. the `r_version` of an `rproject.toml`. */
readonly rVersion?: string;
/** The classified kind of the project (e.g. package, script, shiny app). */
readonly kind?: ProjectKind;
/** Statistics on the project's declared dependencies, if a `DESCRIPTION` file is available. */
readonly dependencies?: ProjectDependencyStats;
}
export declare const ProjectQueryDefinition: {
readonly title: "Project Query";
readonly executor: typeof executeProjectQuery;
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
readonly schema: Joi.ObjectSchema<any>;
readonly flattenInvolvedNodes: () => never[];
};