-
Notifications
You must be signed in to change notification settings - Fork 42
/
index.ts
executable file
·83 lines (80 loc) · 2.28 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { AppContext } from '../config'
import {
QueryParams,
OutputSchema as AlgoOutput,
} from '../lexicon/types/app/bsky/feed/getFeedSkeleton'
import * as forScience from './for-science'
import * as ausPol from './auspol'
import * as dads from './dads'
import * as dadsMedia from './dads-media'
import * as EighteenPlusND from './18-plus-nd'
import * as ND from './nd'
import * as discourse from './discourse'
import * as cats from './cats'
import * as elusive from './elusive'
import * as keyboards from './keyboards'
import * as overheard from './overheard'
import * as paxaus from './paxaus'
import * as external from './externalList'
import * as twelveWords from './twelve-words'
type AlgoHandler = (ctx: AppContext, params: QueryParams) => Promise<AlgoOutput>
const algos = {
[forScience.shortname]: {
handler: <AlgoHandler>forScience.handler,
manager: forScience.manager,
},
[ausPol.shortname]: {
handler: <AlgoHandler>ausPol.handler,
manager: ausPol.manager,
},
[dads.shortname]: {
handler: <AlgoHandler>dads.handler,
manager: dads.manager,
},
[dadsMedia.shortname]: {
handler: <AlgoHandler>dadsMedia.handler,
manager: dadsMedia.manager,
},
[EighteenPlusND.shortname]: {
handler: <AlgoHandler>EighteenPlusND.handler,
manager: EighteenPlusND.manager,
},
[ND.shortname]: {
handler: <AlgoHandler>ND.handler,
manager: ND.manager,
},
[discourse.shortname]: {
handler: <AlgoHandler>discourse.handler,
manager: discourse.manager,
},
[elusive.shortname]: {
handler: <AlgoHandler>elusive.handler,
manager: elusive.manager,
},
[cats.shortname]: {
handler: <AlgoHandler>cats.handler,
manager: cats.manager,
},
[keyboards.shortname]: {
handler: <AlgoHandler>keyboards.handler,
manager: keyboards.manager,
},
[overheard.shortname]: {
handler: <AlgoHandler>overheard.handler,
manager: overheard.manager,
},
[paxaus.shortname]: {
handler: <AlgoHandler>paxaus.handler,
manager: paxaus.manager,
},
[external.shortname]: {
handler: <AlgoHandler>external.handler,
manager: external.manager,
},
['aaaolsp7e26zo']: {
// originally a skyfeed feed, so re-using the key
handler: <AlgoHandler>twelveWords.handler,
manager: twelveWords.manager,
},
}
export default algos