1 | import { Packument } from '../types/packument';
|
2 | /**
|
3 | * `getPackument` returns the packument (package document) containing
|
4 | * all the metadata about a package present on the registry.
|
5 | *
|
6 | * @param name - package name
|
7 | * @param registry - URL of the registry (default: npm registry)
|
8 | * @param mirrors - URLs of the registry mirrors (default: npm registry mirrors)
|
9 | * @param cached - accept cached responses (default: `true`)
|
10 | *
|
11 | * @example
|
12 | * Get the packument for package `query-registry` from the npm registry:
|
13 | *
|
14 | * ```typescript
|
15 | * import { getPackument } from 'query-registry';
|
16 | *
|
17 | * (async () => {
|
18 | * const packument = await getPackument({ name: 'query-registry' });
|
19 | *
|
20 | * // Output: 'query-registry'
|
21 | * console.log(packument.name);
|
22 | * })();
|
23 | * ```
|
24 | *
|
25 | * @see {@link Packument}
|
26 | * @see {@link RawPackument}
|
27 | * @see {@link npmRegistry}
|
28 | * @see {@link npmRegistryMirrors}
|
29 | */
|
30 | export declare function getPackument({ name, registry, mirrors, cached, }: {
|
31 | name: string;
|
32 | registry?: string;
|
33 | mirrors?: string[];
|
34 | cached?: boolean;
|
35 | }): Promise<Packument>;
|
36 | //# sourceMappingURL=get-packument.d.ts.map |
\ | No newline at end of file |