Skip to content

Commit

Permalink
feat: deprecated /david
Browse files Browse the repository at this point in the history
  • Loading branch information
amio committed Jun 22, 2023
1 parent 20833b3 commit 6d2ab69
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 70 deletions.
65 changes: 0 additions & 65 deletions api-/david.ts

This file was deleted.

1 change: 0 additions & 1 deletion libs/badge-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const liveBadgeList = [
// 'github',
'gitlab',
// release registries
'david',
'packagephobia',
'crates',
'docker',
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const nextConfig = {
// discontinued
'/apm',
'/lgtm',
'/david',
]

badgeApis.forEach(badge => {
Expand Down
30 changes: 30 additions & 0 deletions pages/api/david.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { createBadgenHandler, PathArgs } from '../../libs/create-badgen-handler-next'

const help = `
## Discontinued
Please refer to [https://github.com/alanshaw/david](https://github.com/alanshaw/david) for more info.
`

export default createBadgenHandler({
title: 'David DM',
examples: {
'/david/dep/zeit/pkg': 'dependencies',
'/david/dev/zeit/pkg': 'dev dependencies',
'/david/peer/epoberezkin/ajv-keywords': 'peer dependencies',
'/david/optional/epoberezkin/ajv-keywords': 'optional dependencies',
'/david/dep/babel/babel/packages/babel-cli': 'dependencies (sub path)',
},
handlers: {
'/david/:topic/:owner/:repo/:path*': handler
},
help
})

async function handler ({ topic, owner, repo, path = '' }: PathArgs) {
return {
subject: 'david badge',
status: 'discontinued',
color: 'grey',
}
}
4 changes: 0 additions & 4 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@
"source": "/ctan/:match*",
"destination": "https://v2022.badgen.net/ctan/:match*"
},
{
"source": "/david/:match*",
"destination": "https://v2022.badgen.net/david/:match*"
},
{
"source": "/deepscan/:match*",
"destination": "https://v2022.badgen.net/deepscan/:match*"
Expand Down

1 comment on commit 6d2ab69

@vercel
Copy link

@vercel vercel bot commented on 6d2ab69 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.