MCPcopy Create free account
hub / github.com/callstack/agent-device / resolveMaterializedArtifactPath

Function resolveMaterializedArtifactPath

src/remote/daemon-artifacts.ts:326–336  ·  view source on GitHub ↗
(artifact: DaemonArtifact, req: DaemonRequest)

Source from the content-addressed store, hash-verified

324}
325
326function resolveMaterializedArtifactPath(artifact: DaemonArtifact, req: DaemonRequest): string {
327 if (artifact.localPath && artifact.localPath.trim().length > 0) {
328 return artifact.localPath;
329 }
330 const requestedPath = req.meta?.clientArtifactPaths?.[artifact.field];
331 if (requestedPath && requestedPath.trim().length > 0) {
332 return requestedPath;
333 }
334 const fallbackName = artifact.fileName?.trim() || `${artifact.field}-${Date.now()}`;
335 return path.resolve(req.meta?.cwd ?? process.cwd(), fallbackName);
336}
337
338type DownloadRemoteArtifactParams = {
339 baseUrl: string;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…