1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { logging } from '@angular-devkit/core';
|
---|
9 | import { JsonSchemaForNpmPackageJsonFiles } from './package-json';
|
---|
10 | export interface NpmRepositoryPackageJson {
|
---|
11 | name: string;
|
---|
12 | requestedName: string;
|
---|
13 | description: string;
|
---|
14 | 'dist-tags': {
|
---|
15 | [name: string]: string;
|
---|
16 | };
|
---|
17 | versions: {
|
---|
18 | [version: string]: JsonSchemaForNpmPackageJsonFiles;
|
---|
19 | };
|
---|
20 | time: {
|
---|
21 | modified: string;
|
---|
22 | created: string;
|
---|
23 | [version: string]: string;
|
---|
24 | };
|
---|
25 | }
|
---|
26 | export declare type NgAddSaveDepedency = 'dependencies' | 'devDependencies' | boolean;
|
---|
27 | export interface PackageIdentifier {
|
---|
28 | type: 'git' | 'tag' | 'version' | 'range' | 'file' | 'directory' | 'remote';
|
---|
29 | name: string;
|
---|
30 | scope: string | null;
|
---|
31 | registry: boolean;
|
---|
32 | raw: string;
|
---|
33 | fetchSpec: string;
|
---|
34 | rawSpec: string;
|
---|
35 | }
|
---|
36 | export interface PackageManifest {
|
---|
37 | name: string;
|
---|
38 | version: string;
|
---|
39 | license?: string;
|
---|
40 | private?: boolean;
|
---|
41 | deprecated?: boolean;
|
---|
42 | dependencies: Record<string, string>;
|
---|
43 | devDependencies: Record<string, string>;
|
---|
44 | peerDependencies: Record<string, string>;
|
---|
45 | optionalDependencies: Record<string, string>;
|
---|
46 | 'ng-add'?: {
|
---|
47 | save?: NgAddSaveDepedency;
|
---|
48 | };
|
---|
49 | 'ng-update'?: {
|
---|
50 | migrations: string;
|
---|
51 | packageGroup: Record<string, string>;
|
---|
52 | };
|
---|
53 | }
|
---|
54 | export interface PackageMetadata {
|
---|
55 | name: string;
|
---|
56 | tags: {
|
---|
57 | [tag: string]: PackageManifest | undefined;
|
---|
58 | };
|
---|
59 | versions: Record<string, PackageManifest>;
|
---|
60 | 'dist-tags'?: unknown;
|
---|
61 | }
|
---|
62 | export declare function fetchPackageMetadata(name: string, logger: logging.LoggerApi, options?: {
|
---|
63 | registry?: string;
|
---|
64 | usingYarn?: boolean;
|
---|
65 | verbose?: boolean;
|
---|
66 | }): Promise<PackageMetadata>;
|
---|
67 | export declare function fetchPackageManifest(name: string, logger: logging.LoggerApi, options?: {
|
---|
68 | registry?: string;
|
---|
69 | usingYarn?: boolean;
|
---|
70 | verbose?: boolean;
|
---|
71 | }): Promise<PackageManifest>;
|
---|
72 | export declare function getNpmPackageJson(packageName: string, logger: logging.LoggerApi, options?: {
|
---|
73 | registry?: string;
|
---|
74 | usingYarn?: boolean;
|
---|
75 | verbose?: boolean;
|
---|
76 | }): Promise<Partial<NpmRepositoryPackageJson>>;
|
---|