UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

54 lines 2.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlowrAnalyzerPackageVersionsPlugin = void 0; const flowr_analyzer_plugin_1 = require("../flowr-analyzer-plugin"); const semver_1 = require("semver"); /** * This is the base class for all plugins that identify package and dependency versions used in the project. * These plugins interplay with the {@link FlowrAnalyzerDependenciesContext} to gather information about the packages used in the project. * See {@link DefaultFlowrAnalyzerPackageVersionsPlugin} for the no-op default implementation. */ class FlowrAnalyzerPackageVersionsPlugin extends flowr_analyzer_plugin_1.FlowrAnalyzerPlugin { type = flowr_analyzer_plugin_1.PluginType.DependencyIdentification; static defaultPlugin() { return new DefaultFlowrAnalyzerPackageVersionsPlugin(); } /** metadata of the databases this plugin currently has loaded (empty for plugins without any) */ loadedDatabases() { return []; } /** Packages known to this plugin that export `name` (empty for plugins without a database). */ packagesExporting(_name) { return []; } /** The signature sources this plugin currently has loaded (empty for plugins without any). `config` lets a query resolve config-driven sources before any analysis has set the plugin's context. */ signatureSources(_config) { return []; } /** Mount an extra signature source by path (a `.sigs.ndjson`, `.br`, or `*.manifest.json(.br)`); no-op by default. */ addDatabaseSource(_source) { return Promise.resolve(); } /** Eagerly parse and mount this plugin's databases up front (no-op for plugins without any). */ preloadDatabasesSync() { } /** * Whether this plugin can resolve the always-available base-R packages (so their exports can be attached * eagerly for bare base calls). `false` for plugins without a versioned base-R signature source. */ providesBaseRPackages() { return false; } } exports.FlowrAnalyzerPackageVersionsPlugin = FlowrAnalyzerPackageVersionsPlugin; /** * This is the default no-op implementation of the {@link FlowrAnalyzerPackageVersionsPlugin}. */ class DefaultFlowrAnalyzerPackageVersionsPlugin extends FlowrAnalyzerPackageVersionsPlugin { name = 'default-package-versions-plugin'; description = 'Does nothing, the default package versions plugin.'; version = new semver_1.SemVer('0.0.0'); process() { /* we do not need package versions for the analysis to do things! */ } } //# sourceMappingURL=flowr-analyzer-package-versions-plugin.js.map