7export const checkimghealth = async () => { 8 const tagArg = cliArg('--tag') || 'dfc54dee821b' 10 const verifyBlobs = cliFlag('--verify-blobs') 14 console.log('Checking blob:', blob) 16 console.log(' health:', JSON.stringify(health, null, 2)) 20 // --tag accepts a bare tag (localrepo/localrepo) or a full repo_name_tag (host/repo[:sub]:tag | @digest) 21 const {repoPath, tag} = tagArg.includes('/') ? parseRepoNameTag(tagArg) : {repoPath: 'localrepo/localrepo', tag: tagArg} 24 console.log('Checking image health:') 25 console.log(' tag:', tagArg) 26 console.log(' manifest_url:', manifest_url) 27 console.log(' verifyBlobs:', verifyBlobs) 30 console.log(' health:', JSON.stringify(health, null, 2)) 33checkimghealth.cliSchema = { 34 tag: { type: 'string' as const, desc: 'docker image tag' }, 35 blob: { type: 'string' as const, desc: 'blob digest to check' }, 36 'verify-blobs': { flag: true as const, desc: 'verify blob health' }, 38checkimghealth.cliDescript = 'Check docker image health (--tag=<tag> --verify-blobs --blob=<digest>)' 39checkimghealth.cliAdvanced = true