UNPKG

1.96 kBPlain TextView Raw
1import { DistInfo } from './dist-info';
2import { NpmOperationalInternal } from './npm-operational-internal';
3import { PackageJSON } from './package-json';
4import { Person } from './person';
5
6/**
7 * `RawPackageManifest` represents the manifest, as returned by the registry,
8 * describing a specific version of a package.
9 *
10 * @remarks
11 * For some packages, especially legacy ones,
12 * the properties may be mistyped due to incorrect data present on the registry.
13 *
14 * @see {@link https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#getpackageversion}
15 * @see {@link https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-version-object}
16 * @see {@link https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#full-metadata-format}
17 * @see {@link https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#version}
18 * @see {@link PackageJSON}
19 */
20export interface RawPackageManifest extends PackageJSON {
21 /** Package version ID (for example, `foo@1.0.0` or `@bar/baz@1.0.0`) */
22 readonly _id: string;
23
24 /** Package name */
25 readonly name: string;
26
27 /** Package version number */
28 readonly version: string;
29
30 /**
31 * Distribution data from the registry
32 *
33 * @see {@link DistInfo}
34 */
35 readonly dist: DistInfo;
36
37 /** Commit hash corresponding to the published version */
38 readonly gitHead?: string;
39
40 /**
41 * User who published this package version
42 *
43 * @see {@link Person}
44 */
45 readonly _npmUser: Person;
46
47 /** Node version used when publishing */
48 readonly _nodeVersion?: string;
49
50 /** npm version used when publishing */
51 readonly _npmVersion?: string;
52
53 /**
54 * Internal npm data
55 *
56 * @see {@link NpmOperationalInternal}
57 */
58 readonly _npmOperationalInternal?: NpmOperationalInternal;
59
60 /** True if the package has a shrinkwrap file */
61 readonly _hasShrinkwrap?: boolean;
62}