kopia lustrzana https://github.com/badgen/badgen.net
				
				
				
			feat: migrate /crates
							rodzic
							
								
									4b969c14c9
								
							
						
					
					
						commit
						a4dbc2da3d
					
				| 
						 | 
				
			
			@ -9,7 +9,6 @@ export const liveBadgeList = [
 | 
			
		|||
  // 'github',
 | 
			
		||||
  'gitlab',
 | 
			
		||||
  // release registries
 | 
			
		||||
  'crates',
 | 
			
		||||
  'docker',
 | 
			
		||||
  'homebrew',
 | 
			
		||||
  'amo',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
import staticBadge from '../pages/api/static'
 | 
			
		||||
import github from '../pages/api/github'
 | 
			
		||||
import npm from '../pages/api/npm'
 | 
			
		||||
import crates from '../pages/api/crates'
 | 
			
		||||
import bundlephobia from '../pages/api/bundlephobia'
 | 
			
		||||
import packagephobia from '../pages/api/packagephobia'
 | 
			
		||||
import codeclimate from '../pages/api/codeclimate'
 | 
			
		||||
| 
						 | 
				
			
			@ -16,6 +17,7 @@ export default {
 | 
			
		|||
  static: staticBadge.meta,
 | 
			
		||||
  github: github.meta,
 | 
			
		||||
  npm: npm.meta,
 | 
			
		||||
  crates: crates.meta,
 | 
			
		||||
  bundlephobia: bundlephobia.meta,
 | 
			
		||||
  packagephobia: packagephobia.meta,
 | 
			
		||||
  codeclimate: codeclimate.meta,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -44,6 +44,7 @@ const nextConfig = {
 | 
			
		|||
      '/static',
 | 
			
		||||
      '/github',
 | 
			
		||||
      '/npm',
 | 
			
		||||
      '/crates',
 | 
			
		||||
      '/bundlephobia',
 | 
			
		||||
      '/packagephobia',
 | 
			
		||||
      '/codeclimate',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
import got from '../libs/got'
 | 
			
		||||
import { millify, version, versionColor } from '../libs/utils'
 | 
			
		||||
import { createBadgenHandler, PathArgs } from '../libs/create-badgen-handler'
 | 
			
		||||
import got from '../../libs/got'
 | 
			
		||||
import { millify, version, versionColor } from '../../libs/utils'
 | 
			
		||||
import { createBadgenHandler, PathArgs } from '../../libs/create-badgen-handler-next'
 | 
			
		||||
 | 
			
		||||
export default createBadgenHandler({
 | 
			
		||||
  title: 'Rust Crates',
 | 
			
		||||
| 
						 | 
				
			
			@ -37,5 +37,11 @@ async function handler ({topic, pkg}: PathArgs) {
 | 
			
		|||
        status: millify(crate.recent_downloads) + ' latest version',
 | 
			
		||||
        color: 'green'
 | 
			
		||||
      }
 | 
			
		||||
    default:
 | 
			
		||||
      return {
 | 
			
		||||
        subject: 'crates.io',
 | 
			
		||||
        status: 'unknown topic',
 | 
			
		||||
        color: 'grey'
 | 
			
		||||
      }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -42,10 +42,6 @@
 | 
			
		|||
      "source": "/cran/:match*",
 | 
			
		||||
      "destination": "https://v2022.badgen.net/cran/:match*"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "source": "/crates/:match*",
 | 
			
		||||
      "destination": "https://v2022.badgen.net/crates/:match*"
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      "source": "/ctan/:match*",
 | 
			
		||||
      "destination": "https://v2022.badgen.net/ctan/:match*"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue