Implements testConnection and listResources against the Cloudflare API, reporting the configured zone's real status (active/pending/etc) as a resource. Fixed a bug where non-2xx responses with non-JSON bodies (e.g. invalid zone ID) threw inside the JSON parse instead of failing cleanly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbJV5nm8KPVH1oNJYKpnoF
22 lines
658 B
TypeScript
22 lines
658 B
TypeScript
import type { IntegrationAdapter, IntegrationType } from './types.js'
|
|
import { uptimeKuma } from './uptimeKuma.js'
|
|
import { docker } from './docker.js'
|
|
import { proxmox } from './proxmox.js'
|
|
import { netbird } from './netbird.js'
|
|
import { cloudflare } from './cloudflare.js'
|
|
|
|
const notImplemented: IntegrationAdapter = {
|
|
async testConnection() {
|
|
return { ok: false, message: 'Test connection not yet implemented for this integration type' }
|
|
},
|
|
}
|
|
|
|
export const adapterRegistry: Record<IntegrationType, IntegrationAdapter> = {
|
|
uptime_kuma: uptimeKuma,
|
|
docker,
|
|
proxmox,
|
|
netbird,
|
|
cloudflare,
|
|
aws: notImplemented,
|
|
weather: notImplemented,
|
|
}
|