(jsonFilePath: string)
| 90 | } |
| 91 | |
| 92 | async function parseProjectSyncJSON(jsonFilePath: string): Promise<ProjectSyncOutput> { |
| 93 | const jsonFilePathContent = await fs.readFile(jsonFilePath); |
| 94 | const json = JSON.parse(jsonFilePathContent.toString('utf8')) as ProjectSyncOutputJSON; |
| 95 | let tsGeneratedDir: string | undefined; |
| 96 | |
| 97 | if (json.ts_generated_dir) { |
| 98 | const dir = path.dirname(jsonFilePath); |
| 99 | |
| 100 | tsGeneratedDir = path.resolve(dir, json.ts_generated_dir); |
| 101 | } |
| 102 | |
| 103 | return { |
| 104 | target: BazelLabel.fromString(json.target), |
| 105 | dependencies: json.dependencies.map(d => BazelLabel.fromString(d)), |
| 106 | tsGeneratedDir, |
| 107 | }; |
| 108 | } |
| 109 | |
| 110 | function isExternalLabel(workspaceInfo: BazelWorkspaceInfo, label: BazelLabel): boolean { |
| 111 | return !!label.repo && label.repo !== workspaceInfo.workspaceName; |
no test coverage detected