Skip to content

Commit

Permalink
feat: migrate /amo
Browse files Browse the repository at this point in the history
  • Loading branch information
amio committed Jul 2, 2023
1 parent 4a0c8e4 commit 8c87249
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion libs/badge-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const liveBadgeList = [
// release registries
'docker',
'homebrew',
'amo',
'nuget',
'packagist',
'rubygems',
Expand Down
2 changes: 2 additions & 0 deletions libs/badge-list2.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import staticBadge from '../pages/api/static'
import github from '../pages/api/github'
import amo from '../pages/api/amo'
import npm from '../pages/api/npm'
import crates from '../pages/api/crates'
import bundlephobia from '../pages/api/bundlephobia'
Expand All @@ -17,6 +18,7 @@ import xo from '../pages/api/xo'
export default {
static: staticBadge.meta,
github: github.meta,
amo: amo.meta,
npm: npm.meta,
crates: crates.meta,
bundlephobia: bundlephobia.meta,
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const nextConfig = {
const badgeApis = [
'/static',
'/github',
'/amo',
'/npm',
'/crates',
'/bundlephobia',
Expand Down
6 changes: 3 additions & 3 deletions api-/amo.ts → pages/api/amo.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import got from '../libs/got'
import { millify, stars, version, versionColor } from '../libs/utils'
import { createBadgenHandler, PathArgs } from '../libs/create-badgen-handler'
import got from '../../libs/got'
import { millify, stars, version, versionColor } from '../../libs/utils'
import { createBadgenHandler, PathArgs } from '../../libs/create-badgen-handler-next'

export default createBadgenHandler({
title: 'Mozilla Add-on',
Expand Down
4 changes: 0 additions & 4 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
"version": 2,
"regions": ["all"],
"rewrites": [
{
"source": "/amo/:match*",
"destination": "https://v2022.badgen.net/amo/:match*"
},
{
"source": "/appveyor/:match*",
"destination": "https://v2022.badgen.net/appveyor/:match*"
Expand Down

1 comment on commit 8c87249

@vercel
Copy link

@vercel vercel bot commented on 8c87249 Jul 2, 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.