import { type DepTypes } from '@pnpm/lockfile.detect-dep-types'; import type { LockfileObject } from '@pnpm/lockfile.types'; import { type LockfileWalkerStep } from '@pnpm/lockfile.walker'; import { StoreIndex } from '@pnpm/store.index'; import type { DependenciesField, ProjectId, RegistriesByScope, SupportedArchitectures } from '@pnpm/types'; export interface LicenseNode { name?: string; version?: string; /** Named-registry alias when the package came from one; see `LicensePackage.registryName`. */ registryName?: string; license: string; licenseContents?: string; dir: string; author?: string; homepage?: string; description?: string; repository?: string; integrity?: string; requires?: Record; dependencies?: Record; dev: boolean; } export type LicenseNodeTree = Omit; export interface LicenseExtractOptions { storeDir: string; storeIndex: StoreIndex; virtualStoreDir: string; virtualStoreDirMaxLength: number; modulesDir?: string; dir: string; registriesByScope: RegistriesByScope; registriesByPrefix?: Record; supportedArchitectures?: SupportedArchitectures; depTypes: DepTypes; } export declare function lockfileToLicenseNode(step: LockfileWalkerStep, options: LicenseExtractOptions): Promise>; /** * Reads the lockfile and converts it in a node tree of information necessary * to generate the licenses summary * @param lockfile the lockfile to process * @param opts parsing instructions * @returns */ export declare function lockfileToLicenseNodeTree(lockfile: LockfileObject, opts: { include?: { [dependenciesField in DependenciesField]: boolean; }; includedImporterIds?: ProjectId[]; } & Omit): Promise;