feat:移除了弹窗,服务器添加sls
This commit is contained in:
11
apps/telemetry-dashboard/server/utils/bindings.ts
Normal file
11
apps/telemetry-dashboard/server/utils/bindings.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export interface DashboardBindings {
|
||||
DB?: D1Database
|
||||
ERROR_CONTEXTS?: R2Bucket
|
||||
CLOUDFLARE_ACCOUNT_ID?: string
|
||||
CLOUDFLARE_ANALYTICS_TOKEN?: string
|
||||
}
|
||||
|
||||
export function dashboardBindings(event: { context: Record<string, unknown> }): DashboardBindings {
|
||||
const cloudflare = event.context.cloudflare as { env?: DashboardBindings } | undefined
|
||||
return cloudflare?.env ?? (event.context.env as DashboardBindings | undefined) ?? {}
|
||||
}
|
||||
Reference in New Issue
Block a user