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

Method resolveLabel

npm_modules/cli/src/utils/BazelClient.ts:133–143  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

131 }
132
133 async resolveLabel(str: string): Promise<BazelLabel> {
134 const unresolvedLabel = BazelLabel.fromString(str);
135
136 const requiresResolve = unresolvedLabel.target.split('/').includes('..');
137 if (!requiresResolve) {
138 return unresolvedLabel;
139 }
140
141 const resolvedTarget = await this.resolveTarget(unresolvedLabel.target);
142 return new BazelLabel(unresolvedLabel.repo, resolvedTarget, unresolvedLabel.name);
143 }
144
145 async getWorkspaceRoot(): Promise<string> {
146 return this.workspaceRootCache.get(process.cwd());

Callers 1

hotreloadTargetFunction · 0.80

Calls 3

resolveTargetMethod · 0.95
splitMethod · 0.80
fromStringMethod · 0.45

Tested by

no test coverage detected