feat: ship Wave 5-6 multi-surface hygiene, optimization, and bug fixes

This commit is contained in:
Yun Chan 2026-11-14 11:51:41 +09:00
parent 01ef3293cf
commit 66b6b45ba9
399 changed files with 17828 additions and 11330 deletions

View file

@ -1,4 +1,5 @@
import { corsHeaders } from '../_shared/cors.ts'
import { createJsonResponder } from '../_shared/json-response.ts'
import { createServiceRoleClient } from '../_shared/quota.ts'
import {
generateOrderId,
@ -18,12 +19,7 @@ import { latestPaidTierByUser, withPaidTier } from './paid-tier.ts'
type ServiceClient = ReturnType<typeof createServiceRoleClient>
function jsonResponse(body: Record<string, unknown>, status = 200): Response {
return new Response(JSON.stringify(body), {
status,
headers: { ...corsHeaders, 'Content-Type': 'application/json' },
})
}
const jsonResponse = createJsonResponder()
function isAuthorizedCron(req: Request): boolean {
const token = (req.headers.get('authorization') ?? '').replace(/^Bearer\s+/i, '')