UNPKG

1.26 kBTypeScriptView Raw
1import { DistTags } from './dist-tags';
2import { GitRepository } from './git-repository';
3import { RawPackument } from './raw-packument';
4/**
5 * `Packument` represents a packument (package document)
6 * containing all the data about a package.
7 *
8 * @remarks
9 * For some packages, especially legacy ones,
10 * the properties may be mistyped due to incorrect data present on the registry.
11 *
12 * @see {@link RawPackument}
13 */
14export interface Packument extends RawPackument {
15 /**
16 * Unique package name (for example, `foo` or `@bar/baz`;
17 * alias to `_id`)
18 */
19 readonly id: string;
20 /**
21 * Mapping of distribution tags to version numbers
22 * (alias to `dist-tags`)
23 *
24 * @see {@link DistTags}
25 */
26 readonly distTags: DistTags;
27 /**
28 * Mapping of version numbers to publishing timestamps
29 * without the `created` or `modified` properties
30 * present in the `time` property
31 *
32 * @see {@link VersionsToTimestamps}
33 */
34 readonly versionsToTimestamps: Record<string, string>;
35 /** Normalized license */
36 readonly license?: string;
37 /** Normalized git repository */
38 readonly gitRepository?: GitRepository;
39}
40//# sourceMappingURL=packument.d.ts.map
\No newline at end of file