MCPcopy Create free account
hub / github.com/codename-co/stack / fetchDockerTagDate

Function fetchDockerTagDate

packages/scripts/maintenance/lib/upstream.ts:535–546  ·  view source on GitHub ↗
(
  image: ImageRef,
  tag: string,
  opts: FetchOptions = {}
)

Source from the content-addressed store, hash-verified

533
534/** Last push date of a Docker Hub tag (the "Docker API" freshness signal). */
535export async function fetchDockerTagDate(
536 image: ImageRef,
537 tag: string,
538 opts: FetchOptions = {}
539): Promise<string> {
540 if (image.registry !== "dockerhub") return "";
541 const r = await fetchJSON<any>(
542 `https://hub.docker.com/v2/repositories/${image.name}/tags/${encodeURIComponent(tag)}`,
543 { ...opts, allow404: true }
544 );
545 return iso(r?.last_updated ?? r?.tag_last_pushed);
546}

Callers 1

syncEntryFunction · 0.90

Calls 1

isoFunction · 0.85

Tested by

no test coverage detected