@eagleoutice/flowr - v2.15.9
    Preparing search index...

    Builder for the FlowrAnalyzer, use it to configure all analysis aspects before creating the analyzer instance with .build() or .buildSync().

    You can add new files and folders to analyze using the .addRequest() method on the resulting analyzer.

    const analyzer = new FlowrAnalyzerBuilder()
    .setParser(new TreeSitterExecutor())
    .buildSync()
    .addRequest('file:///path/to/script.R')

    If you now want to get the dataflow information for the file, you can do this:

    const dfInfo = await analyzer.dataflow();
    console.log(dfInfo);
    Index
    • Apply an amendment to the configuration the builder currently holds. This is mostly intended for more complex logic to transform the config. Please consider using FlowrAnalyzerBuilder.configure to set/amend individual values Per default, the value returned by FlowrConfig.default is used.

      Parameters

      • func: (
            config: {
                abstractInterpretation: {
                    dataFrame: {
                        maxColNames: number;
                        readLoadedData: { maxReadLines: ...; readExternalFiles: ... };
                    };
                    followCalls: boolean;
                    wideningThreshold: number;
                };
                defaultEngine?: "r-shell"
                | "tree-sitter";
                defaultPlugins: ConfigPlugin<string>[];
                engines: (
                    | {
                        lax?: ...;
                        treeSitterWasmPath?: ...;
                        type: ...;
                        wasmPath?: ...;
                        [key: ...]: ...;
                    }
                    | { pipeBind?: ...; rPath?: ...; type: ...; [key: ...]: ... }
                )[];
                gas: {
                    countedCheckEvery?: number;
                    features: { [key: string]: (...) | (...) };
                    heapProvider?: () => ...;
                    thresholds: {
                        memory: {
                            critical?: ...;
                            default?: ...;
                            problematic?: ...;
                            [key: ...]: ...;
                        };
                        steps?: (...)
                        | (...);
                        timeMs: {
                            critical?: ...;
                            default?: ...;
                            problematic?: ...;
                            [key: ...]: ...;
                        };
                        vertices?: (...)
                        | (...);
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                ignoreLoadCalls: boolean;
                ignoreSourceCalls: boolean;
                incremental: {
                    alwaysIncremental: boolean;
                    parsing: {
                        activated: boolean;
                        heuristics: {
                            activated: ...;
                            alwaysWithEdits: ...;
                            bytesFrom: ...;
                            linesFrom: ...;
                            minFiles: ...;
                            mtime: ...;
                        };
                    };
                };
                inputSources?: {
                    cmdline?: (...)
                    | (...);
                    const?: (...) | (...);
                    dconst?: (...) | (...);
                    ffi?: (...) | (...);
                    file?: (...) | (...);
                    glob?: (...) | (...);
                    lang?: (...) | (...);
                    linkedEntryPoints?: (...) | (...);
                    linkedObjects?: (...) | (...);
                    narrowing?: (...) | (...);
                    net?: (...) | (...);
                    options?: (...) | (...);
                    param?: (...) | (...);
                    pure?: (...) | (...);
                    rand?: (...) | (...);
                    scope?: (...) | (...);
                    system?: (...) | (...);
                    tempfile?: (...) | (...);
                    unknown?: (...) | (...);
                    user?: (...) | (...);
                };
                linter: { disabledRules: string[] };
                logLevel?:
                    | "debug"
                    | "silly"
                    | "trace"
                    | "info"
                    | "warn"
                    | "error"
                    | "fatal";
                project: {
                    assumeImplicitEcho?: boolean;
                    basePackages?: (...)[];
                    classification?: {
                        notebookExtensions?: ...;
                        shinyDescriptionTypes?: ...;
                        shinyEntryFiles?: ...;
                        shinyUsagePattern?: ...;
                    };
                    discovery?: { full?: ...; ignore?: ...; perKind?: ... };
                    failOnInaccessiblePath?: boolean;
                    implicitSources?: (...)[];
                    resolveUnknownPathsOnDisk: boolean;
                    useProjectType?: ProjectKind;
                };
                repl: {
                    autoUseFileProtocol?: boolean;
                    dfProcessorHeat: boolean;
                    hints: boolean;
                    plugins: ConfigPlugin<(...)>[];
                    queryStats?: boolean;
                    quickStats: boolean;
                    showPlugins?: boolean;
                };
                semantics: {
                    environment: {
                        overwriteBuiltIns: { definitions: ...; loadDefaults?: ... };
                    };
                };
                solver: {
                    assumeAttachedPackages?: (...)[];
                    evalStrings: boolean;
                    instrument: { dataflowExtractors?: (...) | (...) };
                    maxOverlayDepth?: number;
                    resolveSource?: {
                        applyReplacements?: ...;
                        assumeFilesExist?: ...;
                        dropPaths: ...;
                        ignoreCapitalization: ...;
                        inferWorkingDirectory: ...;
                        repeatedSourceLimit?: ...;
                        searchPath: ...;
                        [key: ...]: ...;
                    };
                    sigdb: {
                        additionalPaths?: (...)
                        | (...);
                        assumedRVersion?: (...) | (...);
                        autoSync?: (...) | (...) | (...);
                        blobCacheBudgetMb?: (...) | (...);
                        downloadRepo?: (...) | (...);
                        eagerlyLoad: boolean;
                        eagerlyLoadExports: boolean;
                        enabled: boolean;
                        installedLibrary?: (...) | (...);
                        linkBaseR: boolean;
                        linkBaseRCalls?: (...) | (...) | (...);
                        linkDescriptionDependencies: boolean;
                        linkPackageCalls?: (...) | (...) | (...);
                        loadProjectDependencies: boolean;
                        versionOverrides?: (...) | (...);
                        versionSelection?: (...) | (...);
                        warmInBackground?: (...) | (...) | (...);
                    };
                    slicer?: { autoExtend?: ...; threshold?: ... };
                    trackEnvironments: boolean;
                    transitiveSideEffectRounds?: number;
                    variables: VariableResolve;
                    versionManagement?: { linkedVersionGroups?: ... };
                };
                specializeConfig?: {
                    notebook?: (...)
                    | (...);
                    package?: (...) | (...);
                    project?: (...) | (...);
                    script?: (...) | (...);
                    "shiny-app"?: (...) | (...);
                    unknown?: (...) | (...);
                };
            },
        ) => void
        | FlowrConfig

        Receives the current configuration of the builder and allows for amendment.

      Returns this

    • Overwrite the configuration used by the resulting analyzer. This also unloads all default plugins and reloads them as set in the new config if the withDefaultPlugins flag was set in the constructor

      Parameters

      Returns this

    • Set the engine and hence the parser that will be used by the analyzer. This is an alternative to FlowrAnalyzerBuilder#setParser if you do not have a parser instance at hand.

      Parameters

      • engine: "r-shell" | "tree-sitter"

        The engine to analyze with; its own options are set with configure (engine.tree-sitter.lax, ...).

      Returns this