-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.config.ts
44 lines (36 loc) · 977 Bytes
/
app.config.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
import { z } from 'zod'
const envSchema = z.object({
MX_SPACE_TOKEN: z.string(),
TG_BOT_TOKEN: z.string(),
GH_WEBHOOK_SECRET: z.string(),
MX_SPACE_API_ENDPOINT: z.string().url(),
MX_SPACE_GATEWAY_ENDPOINT: z.string().url(),
MX_SPACE_WEBHOOK_SECRET: z.string(),
})
console.log('env validating...')
const env = envSchema.parse(process.env)
export const appConfig = {
mxSpace: {
apiEndpoint: env.MX_SPACE_API_ENDPOINT,
gateway: env.MX_SPACE_GATEWAY_ENDPOINT,
// gateway: 'http://127.0.0.1:2333/system',
token: env.MX_SPACE_TOKEN,
webhookSecret: env.MX_SPACE_WEBHOOK_SECRET,
watchGroupIds: [-1001570490524, -1001918532532],
watchChannelId: -1001918532532,
},
ownerId: 548935420,
bot: {
token: env.TG_BOT_TOKEN,
},
githubHook: {
secret: env.GH_WEBHOOK_SECRET,
watchGroupIds: [-1001918532532],
},
bilibili: {
live: {
id: 1434499,
},
watchGroupIds: [-1001570490524, -1001918532532],
},
}