mirror of
https://github.com/hanzoai/bot-hub.git
synced 2026-10-30 18:46:42 +00:00
Migration from Convex/Vercel to self-hosted infrastructure: API Backend (api/): - Hono server with PostgreSQL (Drizzle ORM) + pgvector - Skills CRUD, search (hybrid vector + lexical), auth (hanzo.id OAuth) - Upload (MinIO S3), stars, comments, API tokens - Rate limiting middleware, session management Frontend Adapter (src/lib/): - api.ts: REST API client replacing Convex SDK - hooks.ts: React hooks replacing convex/react useQuery/useMutation - AuthContext.tsx: Auth provider replacing ConvexAuthProvider Deployment: - Dockerfile (multi-stage: API build + web build + production) - K8s manifests for hub.hanzo.bot on hanzo-k8s - GitHub Actions CI/CD (build → GHCR → deploy) Rebrand: - clawhub/clawdhub/ClawHub → bothub/Bot Hub - Domain: clawhub.ai → hub.hanzo.bot - CLI: clawhub → bothub - Package: @hanzo/bot-hub-api
24 lines
871 B
TypeScript
24 lines
871 B
TypeScript
/* @vitest-environment node */
|
|
|
|
import { describe, expect, it } from 'vitest'
|
|
import * as schema from '.'
|
|
import { isTextContentType, TEXT_FILE_EXTENSION_SET } from './textFiles'
|
|
|
|
describe('packages/bothub schema textFiles', () => {
|
|
it('exports text-file extension set', () => {
|
|
expect(TEXT_FILE_EXTENSION_SET.has('md')).toBe(true)
|
|
expect(TEXT_FILE_EXTENSION_SET.has('exe')).toBe(false)
|
|
})
|
|
|
|
it('detects text content types with parameters', () => {
|
|
expect(isTextContentType('text/plain; charset=utf-8')).toBe(true)
|
|
expect(isTextContentType('application/json; charset=utf-8')).toBe(true)
|
|
expect(isTextContentType('application/octet-stream')).toBe(false)
|
|
})
|
|
|
|
it('re-exports helpers from index', () => {
|
|
expect(typeof schema.isTextContentType).toBe('function')
|
|
expect(schema.isTextContentType('application/markdown')).toBe(true)
|
|
})
|
|
})
|