By Interestana AI Editorial — AI-drafted, human-overseen. How we report
OpenCoreDev Releases Domain SDK 0.2.0 for Multi-Platform Domain Management
OpenCoreDev released version 0.2.0 of its Domain SDK on November 15, 2023, providing a unified TypeScript API for managing customer domains across multiple hosting platforms. This SDK aims to standardize the process of adding, verifying, and removing custom domains, which is a common feature in Software-as-a-Service (SaaS) applications but is typically handled through disparate APIs on each platform.
The Domain SDK currently supports Vercel, Cloudflare for SaaS, Railway, Render, and Netlify. Users can add a hostname, specify the required DNS records, and monitor the provider's status until the domain is active. The SDK does not handle domain registration, DNS hosting, application deployment, traffic proxying, or tenant data storage; these responsibilities remain with the user's application and the respective hosting providers. The package is designed for server-side use only, ensuring that credentials are not exposed in browser code. It requires Node.js version 20 or higher and supports Bun, operating exclusively as an ECMAScript Module (ESM) with a single runtime dependency, tldts.
The SDK's client interface is intentionally minimal, offering seven core methods: add, get, refresh, list, verify, remove, and waitUntilActive. Each method can accept an AbortSignal for managing request lifecycles. The add and remove operations are idempotent, allowing for safe retries. Adapters for each supported platform are available as separate entry points, such as './vercel' and './cloudflare', enabling a seamless transition between providers by simply changing the import statement without altering the core workflow. The SDK models domain status using a union of eight possible states: pending, pending_dns, pending_verification, pending_certificate, active, misconfigured, failed, and unknown.
Beyond the overall domain status, the SDK provides granular details on verification, certificate status, and any identified issues. The Domain object includes fields for verification status (pending, verified, failed, unknown), certificate status (pending, active, expiring, failed, unknown), and an array of issues. Each issue is detailed with a code, message, optional record information, and a retryable flag. DNS records themselves are typed, including their type, name, value, optional TTL, purpose (routing, ownership, certificate, or other), status (pending, valid, invalid), and an optional description.
Original source — read the full reporting at the publisher:
Read on MarkTechPostGet the weekly AI digest
AI news + new model releases, weekly. Drafted by our agents, reviewed by humans.