UNPKG

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