diff --git a/site/src/components/ProjectsDashboard.jsx b/site/src/components/ProjectsDashboard.jsx index 94217252f..44c60aca3 100644 --- a/site/src/components/ProjectsDashboard.jsx +++ b/site/src/components/ProjectsDashboard.jsx @@ -4,7 +4,9 @@ const projects = { '@web5/common': { url: 'https://github.com/TBD54566975/web5-js/tree/main/packages/common', language: 'js', - ghOwnerRepo: 'TBD54566975/web5-js', + repo: 'web5-js', + group: 'web5', + packageName: 'common', ciStatus: [ { type: 'ghWorkflow', @@ -14,7 +16,7 @@ const projects = { ], license: [ { type: 'ghLicense' }, - { type: 'npmLicense', value: '@web5/common' }, + { type: 'npmLicense' }, ], scan: [ { @@ -22,23 +24,78 @@ const projects = { label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ - { type: 'ghTag' }, - { type: 'npmPkg', value: '@web5/common' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'ghTag', value: '@web5/common@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, + ], + apiDocs: [], + }, + '@web5/credentials': { + url: 'https://github.com/TBD54566975/web5-js/tree/main/packages/credentials', + language: 'js', + repo: 'web5-js', + group: 'web5', + packageName: 'credentials', + ciStatus: [ + { + type: 'ghWorkflow', + label: 'ci', + value: 'tests-ci.yml', + }, + ], + license: [ + { type: 'ghLicense' }, + { type: 'npmLicense' }, + ], + scan: [ + { + type: 'ghWorkflow', + label: 'scan', + value: 'security.yml', + }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, + ], + ossf: [{ type: 'ossf' }], + sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], + release: [ + { type: 'ghTag', value: '@web5/credentials@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, + ], + apiDocs: [ + { + type: 'ghWorkflow', + label: 'docs ci', + value: 'docs-ci.yml', + }, + { + type: 'ghWorkflow', + label: 'docs publish', + value: 'docs-publish.yml', + }, + { + value: 'reference docs', + href: 'https://tbd54566975.github.io/web5-js/modules/_web5_credentials.html', + }, ], - apiDocs: [{ label: 'docs ci' }, { label: 'docs publish' }], }, '@web5/crypto': { url: 'https://github.com/TBD54566975/web5-js/tree/main/packages/crypto', language: 'js', - ghOwnerRepo: 'TBD54566975/web5-js', + repo: 'web5-js', + group: 'web5', + packageName: 'crypto', ciStatus: [ { type: 'ghWorkflow', @@ -48,7 +105,7 @@ const projects = { ], license: [ { type: 'ghLicense' }, - { type: 'npmLicense', value: '@web5/crypto' }, + { type: 'npmLicense' }, ], scan: [ { @@ -56,23 +113,41 @@ const projects = { label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ - { type: 'ghTag' }, - { type: 'npmPkg', value: '@web5/crypto' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'ghTag', value: '@web5/crypto@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, + ], + apiDocs: [ + { + type: 'ghWorkflow', + label: 'docs ci', + value: 'docs-ci.yml', + }, + { + type: 'ghWorkflow', + label: 'docs publish', + value: 'docs-publish.yml', + }, + { + value: 'reference docs', + href: 'https://tbd54566975.github.io/web5-js/modules/_web5_crypto.html', + }, ], - apiDocs: [{ label: 'docs ci' }, { label: 'docs publish' }], }, '@web5/dids': { url: 'https://github.com/TBD54566975/web5-js/tree/main/packages/dids', language: 'js', - ghOwnerRepo: 'TBD54566975/web5-js', + repo: 'web5-js', + group: 'web5', + packageName: 'dids', ciStatus: [ { type: 'ghWorkflow', @@ -82,7 +157,7 @@ const projects = { ], license: [ { type: 'ghLicense' }, - { type: 'npmLicense', value: '@web5/dids' }, + { type: 'npmLicense' }, ], scan: [ { @@ -90,23 +165,41 @@ const projects = { label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ - { type: 'ghTag' }, - { type: 'npmPkg', value: '@web5/dids' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'ghTag', value: '@web5/dids@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, + ], + apiDocs: [ + { + type: 'ghWorkflow', + label: 'docs ci', + value: 'docs-ci.yml', + }, + { + type: 'ghWorkflow', + label: 'docs publish', + value: 'docs-publish.yml', + }, + { + value: 'reference docs', + href: 'https://tbd54566975.github.io/web5-js/modules/_web5_dids.html', + }, ], - apiDocs: [{ label: 'docs ci' }, { label: 'docs publish' }], }, '@tbdex/protocol': { url: 'https://github.com/TBD54566975/tbdex-js/tree/main/packages/protocol', language: 'js', - ghOwnerRepo: 'TBD54566975/tbdex-js', + repo: 'tbdex-js', + group: 'tbdex', + packageName: 'protocol', ciStatus: [ { type: 'ghWorkflow', @@ -116,7 +209,7 @@ const projects = { ], license: [ { type: 'ghLicense' }, - { type: 'npmLicense', value: '@tbdex/protocol' }, + { type: 'npmLicense' }, ], scan: [ { @@ -124,16 +217,17 @@ const projects = { label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ - { type: 'ghTag' }, - { type: 'npmPkg', value: '@tbdex/protocol' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'ghTag', value: '@tbdex/protocol@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, ], apiDocs: [ { @@ -149,14 +243,15 @@ const projects = { { value: 'reference docs', href: 'https://tbd54566975.github.io/tbdex-js/modules/_tbdex_protocol.html', - color: 'purple', }, ], }, '@tbdex/http-client': { url: 'https://github.com/TBD54566975/tbdex-js/tree/main/packages/http-client', language: 'js', - ghOwnerRepo: 'TBD54566975/tbdex-js', + repo: 'tbdex-js', + group: 'tbdex', + packageName: 'http-client', ciStatus: [ { type: 'ghWorkflow', @@ -166,7 +261,7 @@ const projects = { ], license: [ { type: 'ghLicense' }, - { type: 'npmLicense', value: '@tbdex/http-client' }, + { type: 'npmLicense' }, ], scan: [ { @@ -174,16 +269,17 @@ const projects = { label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ - { type: 'ghTag' }, - { type: 'npmPkg', value: '@tbdex/http-client' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'ghTag', value: '@tbdex/http-client@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, ], apiDocs: [ { @@ -199,14 +295,15 @@ const projects = { { value: 'reference docs', href: 'https://tbd54566975.github.io/tbdex-js/modules/_tbdex_http_client.html', - color: 'purple', }, ], }, '@tbdex/http-server': { url: 'https://github.com/TBD54566975/tbdex-js/tree/main/packages/http-server', language: 'js', - ghOwnerRepo: 'TBD54566975/tbdex-js', + repo: 'tbdex-js', + group: 'tbdex', + packageName: 'http-server', ciStatus: [ { type: 'ghWorkflow', @@ -216,7 +313,7 @@ const projects = { ], license: [ { type: 'ghLicense' }, - { type: 'npmLicense', value: '@tbdex/http-server' }, + { type: 'npmLicense' }, ], scan: [ { @@ -224,16 +321,17 @@ const projects = { label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ - { type: 'ghTag' }, - { type: 'npmPkg', value: '@tbdex/http-server' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'ghTag', value: '@tbdex/http-server@*' }, + { type: 'npmPkg' }, + // { label: 'spdx' }, + // { label: 'cydx' }, ], apiDocs: [ { @@ -249,14 +347,13 @@ const projects = { { value: 'reference docs', href: 'https://tbd54566975.github.io/tbdex-js/modules/_tbdex_http_server.html', - color: 'purple', }, ], }, 'tbdex-kt': { url: 'https://github.com/TBD54566975/tbdex-kt', language: 'kt', - ghOwnerRepo: 'TBD54566975/tbdex-kt', + repo: 'tbdex-kt', ciStatus: [ { type: 'ghWorkflow', @@ -264,23 +361,24 @@ const projects = { value: 'ci.yaml', }, ], - license: [{ type: 'ghLicense' }, { type: 'mvnLicense' }], + license: [{ type: 'ghLicense' }], scan: [ { type: 'ghWorkflow', label: 'scan', value: 'security.yaml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yaml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ { type: 'ghTag' }, - { type: 'jitPkg' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'mavenCentral', value: 'tbdex' }, + // { label: 'spdx' }, + // { label: 'cydx' }, ], apiDocs: [ { @@ -296,14 +394,13 @@ const projects = { { value: 'reference docs', href: 'https://tbd54566975.github.io/tbdex-kt/index.html', - color: 'purple', }, ], }, 'web5-kt': { url: 'https://github.com/TBD54566975/web5-kt', language: 'kt', - ghOwnerRepo: 'TBD54566975/web5-kt', + repo: 'web5-kt', ciStatus: [ { type: 'ghWorkflow', @@ -311,23 +408,24 @@ const projects = { value: 'ci.yml', }, ], - license: [{ type: 'ghLicense' }, { type: 'mvnLicense' }], + license: [{ type: 'ghLicense' }], scan: [ { type: 'ghWorkflow', label: 'scan', value: 'security.yml', }, - { type: 'fossa' }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, ], ossf: [{ type: 'ossf' }], sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], - tests: [{ label: 'unit' }, { type: 'codecov' }, { label: 'vectors' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], release: [ { type: 'ghTag' }, - { type: 'jitPkg' }, - { label: 'spdx' }, - { label: 'cydx' }, + { type: 'mavenCentral', value: 'web5' }, + // { label: 'spdx' }, + // { label: 'cydx' }, ], apiDocs: [ { @@ -343,7 +441,81 @@ const projects = { { value: 'reference docs', href: 'https://tbd54566975.github.io/web5-kt/docs/htmlMultiModule/', - color: 'purple', + }, + ], + }, + 'web5-swift': { + url: 'https://github.com/TBD54566975/web5-swift', + language: 'swift', + repo: 'web5-swift', + ciStatus: [ + { + type: 'ghWorkflow', + label: 'ci', + value: 'ci.yml', + }, + ], + license: [{ type: 'ghLicense' }], + scan: [ + { + type: 'ghWorkflow', + label: 'scan', + value: 'security.yml', + }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, + ], + ossf: [{ type: 'ossf' }], + sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], + tests: [{ type: 'codecov' }, { type: 'vectors' }], + release: [ + { type: 'ghTag' }, + // { label: 'spdx' }, + // { label: 'cydx' }, + ], + apiDocs: [ + { + value: 'reference docs', + href: 'https://swiftpackageindex.com/TBD54566975/web5-swift/main/documentation/web5', + }, + ], + }, + 'tbdex-swift': { + url: 'https://github.com/TBD54566975/tbdex-swift', + language: 'swift', + repo: 'tbdex-swift', + ciStatus: [ + { + type: 'ghWorkflow', + label: 'ci', + value: 'ci.yml', + }, + ], + license: [{ type: 'ghLicense' }], + scan: [ + { + type: 'ghWorkflow', + label: 'scan', + value: 'security.yml', + }, + { type: 'fossa-license' }, + { type: 'fossa-security' }, + ], + ossf: [{ type: 'ossf' }], + sast: [{ type: 'ghWorkflow', label: 'CodeQL', value: 'codeql.yml' }], + tests: [ + { type: 'codecov' }, + // { type: 'vectors' } + ], + release: [ + { type: 'ghTag' }, + // { label: 'spdx' }, + // { label: 'cydx' }, + ], + apiDocs: [ + { + value: 'reference docs', + href: 'https://swiftpackageindex.com/TBD54566975/tbdex-swift/main/documentation/tbdex', }, ], }, @@ -436,42 +608,48 @@ function Shield({ type = 'badge', label = '', href, - value = 'todo', - color = 'indigo', - ghOwnerRepo, + value, + group, + packageName, + repo, }) { - let badgeSrc = `https://img.shields.io/${type}/${label}-${value}-${color}?style=flat-square`; + let badgeSrc = `https://img.shields.io/${type}/${label}-${value}-purple?style=flat-square`; if (type === 'ghWorkflow') { - badgeSrc = `https://img.shields.io/github/actions/workflow/status/${ghOwnerRepo}/${value}?style=flat-square&branch=main&logo=github&label=${label}&logoColor=FFFFFF`; - href = `https://github.com/${ghOwnerRepo}/actions/workflows/${value}`; + badgeSrc = `https://img.shields.io/github/actions/workflow/status/TBD54566975/${repo}/${value}?style=flat-square&branch=main&logo=github&label=${label}&logoColor=FFFFFF`; + href = `https://github.com/TBD54566975/${repo}/actions/workflows/${value}`; } else if (type === 'ghLicense') { - badgeSrc = `https://img.shields.io/github/license/${ghOwnerRepo}?style=flat-square&logo=github&color=4c1&label=gh`; - href = `https://github.com/${ghOwnerRepo}/blob/main/LICENSE`; - } else if (type === 'fossa') { - const fossaRepoPath = ghOwnerRepo.replace('/', '%2F'); - badgeSrc = `https://app.fossa.com/api/projects/custom%2B588%2Fgithub.com%2F${fossaRepoPath}.svg?type=small`; - href = `https://app.fossa.com/projects/custom%2B588%2Fgithub.com%2F${fossaRepoPath}?ref=badge_small`; + badgeSrc = `https://img.shields.io/github/license/TBD54566975/${repo}?style=flat-square&logo=github&color=4c1&label=gh`; + href = `https://github.com/TBD54566975/${repo}/blob/main/LICENSE`; + } else if (type === 'fossa-license') { + badgeSrc = `https://app.fossa.com/api/projects/custom%2B588%2Fgithub.com%2FTBD54566975%2F${repo}.svg?type=shield&issueType=license`; + href = `https://app.fossa.com/projects/custom%2B588%2Fgithub.com%2FTBD54566975%2F${repo}?ref=badge_shield&issueType=license`; + } else if (type === 'fossa-security') { + badgeSrc = `https://app.fossa.com/api/projects/custom%2B588%2Fgithub.com%2FTBD54566975%2F${repo}.svg?type=shield&issueType=security`; + href = `https://app.fossa.com/projects/custom%2B588%2Fgithub.com%2FTBD54566975%2F${repo}?ref=badge_shield&issueType=security`; } else if (type === 'ossf') { - badgeSrc = `https://img.shields.io/ossf-scorecard/github.com/${ghOwnerRepo}?label=ossf&style=flat-square`; - href = `https://securityscorecards.dev/viewer/?uri=github.com/${ghOwnerRepo}`; + badgeSrc = `https://img.shields.io/ossf-scorecard/github.com/TBD54566975/${repo}?label=ossf&style=flat-square`; + href = `https://securityscorecards.dev/viewer/?uri=github.com/TBD54566975/${repo}`; } else if (type === 'codecov') { - badgeSrc = `https://img.shields.io/codecov/c/gh/${ghOwnerRepo}/main?label=codecov&style=flat-square&token=YI87CKF1LI`; - href = `https://codecov.io/github/${ghOwnerRepo}`; + badgeSrc = `https://img.shields.io/codecov/c/gh/TBD54566975/${repo}/main?label=codecov&style=flat-square&token=YI87CKF1LI`; + href = `https://codecov.io/github/TBD54566975/${repo}`; } else if (type === 'ghTag') { - badgeSrc = `https://img.shields.io/github/v/release/${ghOwnerRepo}?logo=github&label=tag&style=flat-square&color=4c1`; - href = `https://github.com/${ghOwnerRepo}/releases`; + badgeSrc = `https://img.shields.io/github/v/release/TBD54566975/${repo}?logo=github&label=tag&style=flat-square&color=4c1`; + if(value) { + badgeSrc += `&filter=${value}`; + } + href = `https://github.com/TBD54566975/${repo}/releases`; } else if (type === 'npmLicense') { - badgeSrc = `https://img.shields.io/npm/l/${value}.svg?style=flat-square&logo=npm&logoColor=FFFFFF&&color=4c1&santize=true&label=npm`; - href = `https://www.npmjs.com/package/${value}`; + badgeSrc = `https://img.shields.io/npm/l/@${group}/${packageName}.svg?style=flat-square&logo=npm&logoColor=FFFFFF&&color=4c1&santize=true&label=npm`; + href = `https://www.npmjs.com/package/@${group}/${packageName}`; } else if (type === 'npmPkg') { - badgeSrc = `https://img.shields.io/npm/v/${value}.svg?style=flat-square&logo=npm&logoColor=FFFFFF&color=4c1&santize=true`; - href = `https://www.npmjs.com/package/${value}`; - } else if (type === 'mvnLicense') { - badgeSrc = `https://img.shields.io/badge/mvn-todo-indigo?style=flat-square&logo=apachemaven&logoColor=FFFFFF&santize=true`; - href = `https://www.npmjs.com/package/${value}`; - } else if (type === 'jitPkg') { - badgeSrc = `https://img.shields.io/jitpack/version/com.github.${ghOwnerRepo}?style=flat-square&logo=jitpack&color=4c1`; - href = `https://jitpack.io/#${ghOwnerRepo}`; + badgeSrc = `https://img.shields.io/npm/v/@${group}/${packageName}.svg?style=flat-square&logo=npm&logoColor=FFFFFF&color=4c1&santize=true`; + href = `https://www.npmjs.com/package/@${group}/${packageName}`; + } else if (type === 'mavenCentral') { + badgeSrc = `https://img.shields.io/maven-central/v/xyz.block/${value}?color=green` + href = `https://central.sonatype.com/artifact/xyz.block/${value}`; + } else if (type == 'vectors') { + badgeSrc = `https://tbd54566975.github.io/sdk-report-runner/${repo}.svg` + href = "https://tbd54566975.github.io/sdk-report-runner/" } const img = ;