kopia lustrzana https://github.com/badgen/badgen.net
feat: migrate /docker
rodzic
a46cedb447
commit
8dfe679114
|
@ -9,7 +9,6 @@ export const liveBadgeList = [
|
|||
// 'github',
|
||||
// 'gitlab',
|
||||
// release registries
|
||||
'docker',
|
||||
'homebrew',
|
||||
'nuget',
|
||||
'packagist',
|
||||
|
@ -58,7 +57,7 @@ export const liveBadgeList = [
|
|||
'liberapay',
|
||||
]
|
||||
|
||||
export async function loadBadgeMeta () {
|
||||
export async function loadBadgeMeta() {
|
||||
const liveBadgeExamples = await Promise.all(liveBadgeList.map(async id => {
|
||||
const mod = await import(rel('../api-', id))
|
||||
const { title, examples, handlers } = mod.default.meta
|
||||
|
|
|
@ -5,6 +5,7 @@ import https from '../pages/api/https'
|
|||
import amo from '../pages/api/amo'
|
||||
import npm from '../pages/api/npm'
|
||||
import crates from '../pages/api/crates'
|
||||
import docker from '../pages/api/docker'
|
||||
import bundlephobia from '../pages/api/bundlephobia'
|
||||
import packagephobia from '../pages/api/packagephobia'
|
||||
import codeclimate from '../pages/api/codeclimate'
|
||||
|
@ -29,6 +30,7 @@ export default {
|
|||
amo: amo.meta,
|
||||
npm: npm.meta,
|
||||
crates: crates.meta,
|
||||
docker: docker.meta,
|
||||
'chrome-web-store': chromeWebStore.meta,
|
||||
'vs-marketplace': vsMarketplace.meta,
|
||||
hackage: hackage.meta,
|
||||
|
|
|
@ -50,6 +50,7 @@ const nextConfig = {
|
|||
'/npm',
|
||||
'/crates',
|
||||
'/winget',
|
||||
'/docker',
|
||||
'/chrome-web-store',
|
||||
'/vs-marketplace',
|
||||
'/hackage',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import millify from 'millify'
|
||||
import got from '../libs/got'
|
||||
import { getDockerAuthToken, getManifestList, getImageManifest, getImageConfig } from '../libs/docker'
|
||||
import { createBadgenHandler, PathArgs } from '../libs/create-badgen-handler'
|
||||
import got from '../../libs/got'
|
||||
import { getDockerAuthToken, getManifestList, getImageManifest, getImageConfig } from '../../libs/docker'
|
||||
import { createBadgenHandler, PathArgs } from '../../libs/create-badgen-handler-next'
|
||||
|
||||
const help = `## Usage
|
||||
|
||||
|
@ -69,6 +69,12 @@ async function starPullHandler ({ topic, scope, name }: PathArgs) {
|
|||
status: millify(pull_count),
|
||||
color: 'blue'
|
||||
}
|
||||
default:
|
||||
return {
|
||||
subject: 'docker',
|
||||
status: 'unknown topic',
|
||||
color: 'grey'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
18
vercel.json
18
vercel.json
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"version": 2,
|
||||
"regions": ["all"],
|
||||
"regions": [
|
||||
"all"
|
||||
],
|
||||
"rewrites": [
|
||||
{
|
||||
"source": "/appveyor/:match*",
|
||||
|
@ -54,10 +56,6 @@
|
|||
"source": "/devrant/:match*",
|
||||
"destination": "https://v2022.badgen.net/devrant/:match*"
|
||||
},
|
||||
{
|
||||
"source": "/docker/:match*",
|
||||
"destination": "https://v2022.badgen.net/docker/:match*"
|
||||
},
|
||||
{
|
||||
"source": "/dub/:match*",
|
||||
"destination": "https://v2022.badgen.net/dub/:match*"
|
||||
|
@ -179,10 +177,12 @@
|
|||
"destination": "https://v2022.badgen.net/wapm/:match*"
|
||||
}
|
||||
],
|
||||
"redirects": [{
|
||||
"source": "/docs/:match*",
|
||||
"destination": "/:match*"
|
||||
}],
|
||||
"redirects": [
|
||||
{
|
||||
"source": "/docs/:match*",
|
||||
"destination": "/:match*"
|
||||
}
|
||||
],
|
||||
"functions": {
|
||||
"pages/api/**/*": {
|
||||
"memory": 128,
|
||||
|
|
Ładowanie…
Reference in New Issue