feat: migrate /apm badges (#601)

pull/603/head
Amio Jin 2023-06-10 15:27:32 +08:00 zatwierdzone przez GitHub
rodzic d7adf406b8
commit 705157b91c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
4 zmienionych plików z 11 dodań i 8 usunięć

Wyświetl plik

@ -19,7 +19,6 @@ export const liveBadgeList = [
'nuget',
'packagist',
'rubygems',
'apm',
'vs-marketplace',
'melpa',
'maven',

Wyświetl plik

@ -50,6 +50,8 @@ const nextConfig = {
'/runkit',
'/winget',
'/xo',
// discontinued
'/apm',
]
badgeApis.forEach(badge => {

Wyświetl plik

@ -1,4 +1,4 @@
import { createBadgenHandler } from '../libs/create-badgen-handler'
import { createBadgenHandler } from '../../libs/create-badgen-handler-next'
const help = `
## Discontinued
@ -8,10 +8,16 @@ Read all about GitHub [Sunsetting Atom](https://github.blog/2022-06-08-sunsettin
export default createBadgenHandler({
title: 'Atom Package',
examples: {},
examples: {
'/apm/v/linter': 'version',
'/apm/stars/linter': 'stars',
'/apm/license/linter': 'license',
'/apm/downloads/linter': 'downloads',
},
handlers: {
'/apm/:topic/:pkg': handler
}
},
help: help
})
async function handler () {

Wyświetl plik

@ -6,10 +6,6 @@
"source": "/amo/:match*",
"destination": "https://v2022.badgen.net/amo/:match*"
},
{
"source": "/apm/:match*",
"destination": "https://v2022.badgen.net/apm/:match*"
},
{
"source": "/appveyor/:match*",
"destination": "https://v2022.badgen.net/appveyor/:match*"