UNPKG

739 BPlain TextView Raw
1import { PackageManifest } from 'query-registry';
2import { PackageAPI } from './package-api';
3
4/**
5 * `RegistryPackageInfo` contains the data extracted from a package
6 * hosted on an npm-like registry.
7 *
8 * @see {@link PackageAPI}
9 * @see {@link query-registry#PackageManifest}
10 */
11export interface RegistryPackageInfo {
12 /** Package version ID (for example, `foo@1.0.0` or `@bar/baz@1.0.0`) */
13 readonly id: string;
14
15 /** Package manifest from the registry */
16 readonly manifest: PackageManifest;
17
18 /** Public package API */
19 readonly api?: PackageAPI;
20
21 /** Time at which this data was created */
22 readonly createdAt: string;
23
24 /** Package analysis duration in milliseconds */
25 readonly elapsed: number;
26}