UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

42 lines (41 loc) 3.84 kB
import type { FlowrAnalyzerPlugin } from './flowr-analyzer-plugin'; import { FlowrAnalyzerDescriptionFilePlugin } from './file-plugins/flowr-analyzer-description-file-plugin'; import { FlowrAnalyzerPackageVersionsDescriptionFilePlugin } from './package-version-plugins/flowr-analyzer-package-versions-description-file-plugin'; import { FlowrAnalyzerLoadingOrderDescriptionFilePlugin } from './loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin'; import { FlowrAnalyzerRmdFilePlugin } from './file-plugins/notebooks/flowr-analyzer-rmd-file-plugin'; import { FlowrAnalyzerQmdFilePlugin } from './file-plugins/notebooks/flowr-analyzer-qmd-file-plugin'; import { FlowrAnalyzerJupyterFilePlugin } from './file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin'; import { FlowrAnalyzerNamespaceFilesPlugin } from './file-plugins/flowr-analyzer-namespace-files-plugin'; import { FlowrAnalyzerNewsFilePlugin } from './file-plugins/flowr-analyzer-news-file-plugin'; import { FlowrAnalyzerMetaVignetteFilesPlugin } from './file-plugins/flowr-analyzer-vignette-file-plugin'; import { FlowrAnalyzerMetaTestFilesPlugin } from './file-plugins/flowr-analyzer-test-file-plugin'; import { FlowrAnalyzerLicenseFilePlugin } from './file-plugins/flowr-analyzer-license-file-plugin'; import { FlowrAnalyzerMetaDescriptionFilePlugin } from './package-version-plugins/flowr-analyzer-meta-description-file-plugin'; import { FlowrAnalyzerSweaveFilePlugin } from './file-plugins/notebooks/flowr-analyzer-sweave-file-plugin'; /** * The built-in Flowr Analyzer plugins that are always available. */ export declare const BuiltInPlugins: [["file:description", typeof FlowrAnalyzerDescriptionFilePlugin], ["versions:description", typeof FlowrAnalyzerPackageVersionsDescriptionFilePlugin], ["loading-order:description", typeof FlowrAnalyzerLoadingOrderDescriptionFilePlugin], ["meta:description", typeof FlowrAnalyzerMetaDescriptionFilePlugin], ["files:vignette", typeof FlowrAnalyzerMetaVignetteFilesPlugin], ["files:test", typeof FlowrAnalyzerMetaTestFilesPlugin], ["file:rmd", typeof FlowrAnalyzerRmdFilePlugin], ["file:qmd", typeof FlowrAnalyzerQmdFilePlugin], ["file:rnw", typeof FlowrAnalyzerSweaveFilePlugin], ["file:ipynb", typeof FlowrAnalyzerJupyterFilePlugin], ["file:namespace", typeof FlowrAnalyzerNamespaceFilesPlugin], ["file:news", typeof FlowrAnalyzerNewsFilePlugin], ["file:license", typeof FlowrAnalyzerLicenseFilePlugin]]; export type BuiltInFlowrPluginName = typeof BuiltInPlugins[number][0]; export type BuiltInFlowrPluginArgs<N extends BuiltInFlowrPluginName> = N extends typeof BuiltInPlugins[number][0] ? ConstructorParameters<Extract<typeof BuiltInPlugins[number], [N, PluginProducer]>[1]> : never; type PluginProducer = new (...args: never[]) => FlowrAnalyzerPlugin; /** * Register a new Flowr Analyzer plugin for the registry, * to be used by the {@link FlowrAnalyzerBuilder} and {@link FlowrAnalyzer}. */ export declare function registerPluginMaker(plugin: PluginProducer, name?: Exclude<string, BuiltInFlowrPluginName>): void; export declare function getPlugin(name: BuiltInFlowrPluginName, args: BuiltInFlowrPluginArgs<typeof name>): FlowrAnalyzerPlugin; export declare function getPlugin(name: string, args?: unknown[]): FlowrAnalyzerPlugin | undefined; /** * The type used to register a plugin with the {@link FlowrAnalyzerBuilder}. * @see {@link makePlugin} */ export type PluginToRegister<T extends BuiltInFlowrPluginName | string> = FlowrAnalyzerPlugin | T | string | (T extends BuiltInFlowrPluginName ? [ T, BuiltInFlowrPluginArgs<T> ] : [string, unknown[]]); /** * Create a Flowr Analyzer plugin from a {@link PluginToRegister} specification. */ export declare function makePlugin<T extends BuiltInFlowrPluginName | string>(toRegister: PluginToRegister<T>): FlowrAnalyzerPlugin; export {};