UNPKG

fhir-package-explorer

Version:

Explore and resolve FHIR conformance resources across package contexts

41 lines (40 loc) 1.93 kB
import { PackageIdentifier, FileInPackageIndex, ILogger } from 'fhir-package-installer'; import { FileIndexEntryWithPkg, ExplorerConfig, LookupFilter } from './types'; export declare class FhirPackageExplorer { private fpi; private cachePath; private logger; private indexCache; private contentCache; private fastIndex; private contextPackages; private skipExamples; private prethrow; static create(config: ExplorerConfig): Promise<FhirPackageExplorer>; private constructor(); getCachePath(): string; getLogger(): ILogger; getContextPackages(): PackageIdentifier[]; /** * Get the list of direct package dependencies for a given package. * @param pkg - The package to expand. Can be a string or a PackageIdentifier object. * @returns - A promise that resolves to an array of PackageIdentifier objects. */ getDirectDependencies(pkg: string | PackageIdentifier): Promise<PackageIdentifier[]>; /** * Expands the package into a list of packages including all transitive dependencies. * @param pkg - The package to expand. Can be a string or a PackageIdentifier object. * @returns - A promise that resolves to an array of PackageIdentifier objects representing the expanded packages. */ expandPackageDependencies(pkg: string | PackageIdentifier): Promise<PackageIdentifier[]>; lookup(filter?: LookupFilter): Promise<any[]>; lookupMeta(filter?: LookupFilter): Promise<FileIndexEntryWithPkg[]>; resolve(filter?: LookupFilter): Promise<any>; resolveMeta(filter?: LookupFilter): Promise<FileIndexEntryWithPkg>; getPackageManifest(pkg: string | PackageIdentifier): Promise<any>; private _loadContext; private _collectDependencies; private _getFilePath; private _buildFastIndex; } export type { PackageIdentifier, FileInPackageIndex, ILogger, FileIndexEntryWithPkg, ExplorerConfig, LookupFilter };