Skip to content
Domain SDK
Esc
↑↓navigate↵open⌘Jpreview
On this page

Contributing

Set up the workspace, make a focused change, and run the repository checks.

Set up the workspace

bun install
bun run dev

The repository uses Bun 1.3.14 and Turborepo. The docs run at http://localhost:4321 through Blume (bun run --filter @domain-sdk/docs dev).

Work in the right package

  • packages/sdk contains the public client, normalized types, adapters, and tests.
  • apps/docs contains the Blume docs site and landing page.
  • packages/config contains shared TypeScript and lint configuration.

Keep changes focused. Preserve existing provider boundaries and do not add placeholder adapters, speculative options, or network-dependent tests.

Test provider changes

Provider tests belong in packages/sdk/test/providers. Use an injected fetch fixture for every provider request; tests must not require credentials or internet access. Cover request paths, response normalization, idempotent add/remove behavior, malformed responses, and normalized errors.

cd packages/sdk
bun run build
bun test
bun run check-types
bun run lint

Write a DNS adapter

A DnsProvider only lists, creates, and deletes records; createDnsClient() does the diffing, conflict checks, and rollback. Use the record helpers exported from @opencoredev/domain-sdk instead of reimplementing them, so names and values compare the same way the client compares them:

  • normalizeZone(zone) and normalizeRecordName(name, zone) turn input into lowercase FQDNs.
  • relativeRecordName(name, zone) and absoluteRecordName(name, zone) convert between FQDNs and the zone-relative names (@, www) most DNS APIs use.
  • parseCaaValue(value) and formatCaaValue(flag, tag, value) convert CAA presentation values.
  • canonicalRecordValue(type, value) and sameRecord(existing, wanted) compare records the way the client does.

Test documentation changes

Check Blume page types, code snippets, strict link validation, and the production build before opening a pull request.

cd apps/docs
bun run check-types
bun run check:snippets
bun run validate
bun run lint
bun run build

Run the full repository checks

bun run test
bun run typecheck
bun run lint
bun run build

Open a pull request that explains the behavior change, provider API assumptions, and validation you ran. Include screenshots for visible docs or landing-page changes.

Last updated on