1 | /// <amd-module name="@angular/compiler-cli/ngcc/src/entry_point_finder/program_based_entry_point_finder" />
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | import { AbsoluteFsPath, ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
|
---|
10 | import { Logger } from '../../../src/ngtsc/logging';
|
---|
11 | import { ParsedConfiguration } from '../../../src/perform_compile';
|
---|
12 | import { EntryPointWithDependencies } from '../dependencies/dependency_host';
|
---|
13 | import { DependencyResolver } from '../dependencies/dependency_resolver';
|
---|
14 | import { NgccConfiguration } from '../packages/configuration';
|
---|
15 | import { EntryPointManifest } from '../packages/entry_point_manifest';
|
---|
16 | import { EntryPointCollector } from './entry_point_collector';
|
---|
17 | import { TracingEntryPointFinder } from './tracing_entry_point_finder';
|
---|
18 | /**
|
---|
19 | * An EntryPointFinder that starts from the files in the program defined by the given tsconfig.json
|
---|
20 | * and only returns entry-points that are dependencies of these files.
|
---|
21 | *
|
---|
22 | * This is faster than searching the entire file-system for all the entry-points,
|
---|
23 | * and is used primarily by the CLI integration.
|
---|
24 | */
|
---|
25 | export declare class ProgramBasedEntryPointFinder extends TracingEntryPointFinder {
|
---|
26 | private entryPointCollector;
|
---|
27 | private entryPointManifest;
|
---|
28 | private tsConfig;
|
---|
29 | private entryPointsWithDependencies;
|
---|
30 | constructor(fs: ReadonlyFileSystem, config: NgccConfiguration, logger: Logger, resolver: DependencyResolver, entryPointCollector: EntryPointCollector, entryPointManifest: EntryPointManifest, basePath: AbsoluteFsPath, tsConfig: ParsedConfiguration, projectPath: AbsoluteFsPath);
|
---|
31 | /**
|
---|
32 | * Return an array containing the external import paths that were extracted from the source-files
|
---|
33 | * of the program defined by the tsconfig.json.
|
---|
34 | */
|
---|
35 | protected getInitialEntryPointPaths(): AbsoluteFsPath[];
|
---|
36 | /**
|
---|
37 | * For the given `entryPointPath`, compute, or retrieve, the entry-point information, including
|
---|
38 | * paths to other entry-points that this entry-point depends upon.
|
---|
39 | *
|
---|
40 | * In this entry-point finder, we use the `EntryPointManifest` to avoid computing each
|
---|
41 | * entry-point's dependencies in the case that this had been done previously.
|
---|
42 | *
|
---|
43 | * @param entryPointPath the path to the entry-point whose information and dependencies are to be
|
---|
44 | * retrieved or computed.
|
---|
45 | *
|
---|
46 | * @returns the entry-point and its dependencies or `null` if the entry-point is not compiled by
|
---|
47 | * Angular or cannot be determined.
|
---|
48 | */
|
---|
49 | protected getEntryPointWithDeps(entryPointPath: AbsoluteFsPath): EntryPointWithDependencies | null;
|
---|
50 | /**
|
---|
51 | * Walk the base paths looking for entry-points or load this information from an entry-point
|
---|
52 | * manifest, if available.
|
---|
53 | */
|
---|
54 | private findOrLoadEntryPoints;
|
---|
55 | /**
|
---|
56 | * Search the `basePath` for possible Angular packages and entry-points.
|
---|
57 | *
|
---|
58 | * @param basePath The path at which to start the search.
|
---|
59 | * @returns an array of `EntryPoint`s that were found within `basePath`.
|
---|
60 | */
|
---|
61 | walkBasePathForPackages(basePath: AbsoluteFsPath): EntryPointWithDependencies[];
|
---|
62 | }
|
---|