|
6 | 6 |
|
7 | 7 | /** Contains the results of installing dependencies. */ |
8 | 8 | public class DependencyInstallationResult { |
| 9 | + private Path virtualSourceRoot; |
9 | 10 | private Map<String, Path> packageEntryPoints; |
10 | 11 | private Map<String, Path> packageJsonFiles; |
11 | 12 |
|
12 | 13 | public static final DependencyInstallationResult empty = |
13 | | - new DependencyInstallationResult(Collections.emptyMap(), Collections.emptyMap()); |
| 14 | + new DependencyInstallationResult(null, Collections.emptyMap(), Collections.emptyMap()); |
14 | 15 |
|
15 | 16 | public DependencyInstallationResult( |
| 17 | + Path virtualSourceRoot, |
16 | 18 | Map<String, Path> packageEntryPoints, |
17 | 19 | Map<String, Path> packageJsonFiles) { |
18 | 20 | this.packageEntryPoints = packageEntryPoints; |
19 | 21 | this.packageJsonFiles = packageJsonFiles; |
20 | 22 | } |
21 | 23 |
|
| 24 | + /** |
| 25 | + * Returns the virtual source root or <code>null</code> if no virtual source root exists. |
| 26 | + * |
| 27 | + * The virtual source root is a directory hierarchy that mirrors the real source |
| 28 | + * root, where dependencies are installed. |
| 29 | + */ |
| 30 | + public Path getVirtualSourceRoot() { |
| 31 | + return virtualSourceRoot; |
| 32 | + } |
| 33 | + |
22 | 34 | /** |
23 | 35 | * Returns the mapping from package names to the TypeScript file that should |
24 | 36 | * act as its main entry point. |
|
0 commit comments