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

    Interface PackageSignatureSource

    The read interface every package-signature source implements, so a SigDatabase and a sharded SigDatabaseSet are interchangeable. An omitted version answers for the database's newest, never the version flowR assumed for the project.

    interface PackageSignatureSource {
        classes(pkg: string, version?: string): SigClassInfo[] | undefined;
        classOwner(className: string, version?: string): string | undefined;
        close(): void;
        coreVersions(pkg: string): RVersion[] | undefined;
        dependencies(
            pkg: string,
            version?: string,
        ): ResolvedDependency[] | undefined;
        downloads(pkg: string): number;
        functionByName(
            pkg: string,
            name: string,
            version?: string,
        ): DecodedFunction | undefined;
        functions(pkg: string, version?: string): DecodedFunction[] | undefined;
        has(pkg: string): boolean;
        hasVersion(pkg: string, version: string): boolean;
        isBaseR(pkg: string): boolean;
        isCranVersion(pkg: string, version: string): boolean;
        latestVersion(pkg: string): RVersion | undefined;
        lookup(pkg: string, version?: string): LibraryExports | undefined;
        packageNames(): string[];
        packagesExporting(name: string): readonly string[];
        releaseDate(pkg: string, version?: string): Date | undefined;
        releaseDates(pkg: string): VersionRelease[];
        sourceOf(pkg: string, version: string): string | undefined;
        transitiveCallees(
            pkg: string,
            name: string,
            version?: string,
        ): string[] | undefined;
    }

    Implemented by

    Index
    • The classes a package version declares and the relations between them (superclasses, slot types, virtual, union) -- LibraryExports.s4Classes, a flat name list, has nowhere to hang this; version defaults to the newest.

      Parameters

      • pkg: string
      • Optionalversion: string

      Returns SigClassInfo[] | undefined

    • The package OWNING class className (S3: LibraryExports.s3Classes; S4: LibraryExports.s4Classes; S3 wins ties). With a version, every candidate package is scanned at it instead of using the cached reverse index.

      Parameters

      • className: string
      • Optionalversion: string

      Returns string | undefined

    • for a base package, the R versions it was part of core (ascending); undefined otherwise

      Parameters

      • pkg: string

      Returns RVersion[] | undefined

    • The rich view of a single named function, decoding only it (unlike functions); version defaults to the newest.

      Parameters

      • pkg: string
      • name: string
      • Optionalversion: string

      Returns DecodedFunction | undefined

    • Rich per-function view (signatures and call graphs) of a package version; version defaults to the newest.

      Parameters

      • pkg: string
      • Optionalversion: string

      Returns DecodedFunction[] | undefined

    • whether the source can resolve the package at all

      Parameters

      • pkg: string

      Returns boolean

    • whether the source actually carries the given version of a package (not just the package itself)

      Parameters

      • pkg: string
      • version: string

      Returns boolean

    • whether the package is an R-core / base package (its versions are the R releases it shipped with)

      Parameters

      • pkg: string

      Returns boolean

    • whether a version is a current CRAN release (i.e. not in the package's noncran/removed set)

      Parameters

      • pkg: string
      • version: string

      Returns boolean

    • the newest version of a package by release date (falling back to the recorded latest, then SemVer order)

      Parameters

      • pkg: string

      Returns RVersion | undefined

    • The packages exporting name, ordered by downloads (descending, ties by name); answered without a reverse index, since a name the database never stores is rejected outright and only blobs that may hold it are decoded.

      Parameters

      • name: string

      Returns readonly string[]

    • The release date of a package version, undefined if unknown. Omitted, version defaults to the newest release by recorded date (unlike the queries above, which default to the package's recorded latest).

      Parameters

      • pkg: string
      • Optionalversion: string

      Returns Date | undefined

    • the repository a version came from, undefined in bundles that record none

      Parameters

      • pkg: string
      • version: string

      Returns string | undefined

    • Transitive callees of a function within one package version, expanding the stored local call graphs; version defaults to the newest.

      Parameters

      • pkg: string
      • name: string
      • Optionalversion: string

      Returns string[] | undefined