MCPcopy Create free account
hub / github.com/Snapchat/Valdi / bazelLabelToAbsolutePath

Function bazelLabelToAbsolutePath

npm_modules/cli/src/commands/projectsync.ts:118–125  ·  view source on GitHub ↗
(workspaceInfo: BazelWorkspaceInfo, label: BazelLabel)

Source from the content-addressed store, hash-verified

116}
117
118function bazelLabelToAbsolutePath(workspaceInfo: BazelWorkspaceInfo, label: BazelLabel): string {
119 const targetPath = label.target.slice(2);
120 if (isExternalLabel(workspaceInfo, label)) {
121 return path.join(getSymlinkedBazelExecutionRoot(workspaceInfo), 'external', label.repo!, targetPath);
122 } else {
123 return path.join(workspaceInfo.workspaceRoot, targetPath);
124 }
125}
126
127async function buildProjectSyncs(bazel: BazelClient, workspaceRoot: string, projectSyncTargets: readonly string[]) {
128 await bazel.buildTargets(projectSyncTargets);

Callers 2

syncPathsByLabelFunction · 0.85
collectTsConfigDirsFunction · 0.85

Calls 3

isExternalLabelFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected