| 8 | import { AbsolutePath } from './absolutePath'; |
| 9 | |
| 10 | export class AbsolutePathPackage implements IPackage { |
| 11 | constructor( |
| 12 | public id: string, |
| 13 | public description: string, |
| 14 | public url: string, |
| 15 | public platforms: string[], |
| 16 | public architectures: string[], |
| 17 | public installPath: AbsolutePath, |
| 18 | public binaries?: AbsolutePath[], |
| 19 | public installTestPath?: AbsolutePath, |
| 20 | public fallbackUrl?: string, |
| 21 | public platformId?: string, |
| 22 | public integrity?: string, |
| 23 | public isFramework?: boolean |
| 24 | ) {} |
| 25 | |
| 26 | public static getAbsolutePathPackage(pkg: Package, extensionPath: string) { |
| 27 | return new AbsolutePathPackage( |
| 28 | pkg.id, |
| 29 | pkg.description, |
| 30 | pkg.url, |
| 31 | pkg.platforms, |
| 32 | pkg.architectures, |
| 33 | getAbsoluteInstallPath(pkg, extensionPath), |
| 34 | getAbsoluteBinaries(pkg, extensionPath), |
| 35 | getAbsoluteInstallTestPath(pkg, extensionPath), |
| 36 | pkg.fallbackUrl, |
| 37 | pkg.platformId, |
| 38 | pkg.integrity, |
| 39 | pkg.isFramework |
| 40 | ); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | function getAbsoluteInstallTestPath(pkg: Package, extensionPath: string): AbsolutePath | undefined { |
| 45 | if (pkg.installTestPath !== undefined) { |
nothing calls this directly
no outgoing calls
no test coverage detected