Skip to content

chore: add .gitmodules to track wiki submodule#2

Merged
SamyRai merged 7 commits intomasterfrom
feature/generic-dns-provider-plugin
Feb 3, 2026
Merged

chore: add .gitmodules to track wiki submodule#2
SamyRai merged 7 commits intomasterfrom
feature/generic-dns-provider-plugin

Conversation

@SamyRai
Copy link
Owner

@SamyRai SamyRai commented Dec 15, 2025

Description

Brief description of changes

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition/update

Related Issues

Closes #(issue number)

Changes Made

  • Change 1
  • Change 2

Testing

  • Tests pass locally
  • Linter passes
  • Manual testing completed

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex code
  • Documentation updated (if needed)
  • No new warnings generated
  • Tests added/updated (if applicable)
  • All tests pass

Screenshots (if applicable)

Add screenshots to help explain your changes.

Additional Notes

Any additional information that reviewers should know.


Note

Rebrands to ZoneKit and introduces a provider-agnostic DNS layer with OpenAPI-based autodiscovery, new service integration plugin/commands, bulk DNS ops and zone export, updated tests/docs, and a wiki submodule.

  • Core/Infra:
    • Rebrand module/binaries, paths, and texts to ZoneKit; change module to module zonekit.
    • Introduce provider-agnostic DNS architecture: pkg/dns/provider/* (registry, REST adapter, HTTP client, auth, mapper, OpenAPI loader, autodiscovery) with specs for cloudflare/, digitalocean/, godaddy/ and Namecheap adapter.
    • Refactor DNS service to use provider.Provider and new pkg/dnsrecord.Record.
  • CLI:
    • New service command group (list/info/setup/verify/remove) for config-based integrations; register via plugin system.
    • Enhance dns commands: implement bulk ops from YAML (dns bulk --confirm) and zone export to file/stdout; add helpers for formatting/parse.
    • Remove legacy migadu command; equivalent via service plugin.
    • Update config/init/validate to ~/.zonekit.yaml and messages; improve validation with a live API call.
  • Autodiscovery:
    • Auto-register REST providers at startup (initProviders with OpenAPI-only approach).
  • Docs/Config:
    • Update README.md, QUICKSTART.md, CONTRIBUTING.md, examples, and config sample to ZoneKit and multi-provider.
    • Add LICENSE owner update.
  • Misc:
    • Add wiki submodule in .gitmodules.
    • Remove renovate.json.
    • Add/expand tests for provider registry, DNS service, config, errors.
    • Update Makefile and scripts (e.g., OpenAPI schema downloader).

Written by Cursor Bugbot for commit 3f50311. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 9

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@@ -0,0 +1,3 @@
[submodule "wiki"]
path = wiki
url = https://github.com/SamyRai/namecheap.wiki.git
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Wiki submodule URL inconsistent with renamed project

The wiki submodule URL references https://github.com/SamyRai/namecheap.wiki.git while all other repository URLs throughout the codebase (CONTRIBUTING.md, README.md) have been updated to reference zonekit. This inconsistency means the submodule will point to the old wiki repository. The URL should be https://github.com/SamyRai/zonekit.wiki.git to match the renamed project.

Fix in Cursor Fix in Web

// Write NS records (placeholder)
sb.WriteString("; Name servers\n")
sb.WriteString("@ IN NS ns1.namecheap.com.\n")
sb.WriteString("@ IN NS ns2.namecheap.com.\n\n")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Zone file export hardcodes Namecheap nameservers for all providers

The formatAsZoneFile function hardcodes ns1.namecheap.com and ns2.namecheap.com as the SOA and NS records in exported zone files. Since the project now supports multiple DNS providers (Cloudflare, GoDaddy, DigitalOcean), exporting zone files from non-Namecheap providers will produce incorrect output with Namecheap-specific nameservers that don't match the actual provider's nameservers.

Fix in Cursor Fix in Web

_ = namecheap.Register(client)

// Get the provider from registry
dnsProvider, _ := provider.Get("namecheap")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Ignored error may cause nil pointer dereference

The NewService function ignores the error returned by provider.Get("namecheap") using the blank identifier. If the provider registration fails for any reason, dnsProvider will be nil, and subsequent method calls like s.provider.GetRecords() will cause a nil pointer panic at runtime.

Fix in Cursor Fix in Web

}
if input.Value == "" {
return nil, fmt.Errorf("operation missing required field: value")
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Delete operations incorrectly require value field

The parseBulkOperationsFile function unconditionally requires the value field for all bulk operations, including delete actions. However, delete operations in BulkUpdate only use HostName and RecordType to identify records to remove, making the value requirement unnecessary for deletes. This prevents users from performing bulk delete operations without specifying a value that won't be used.

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bulk operations YAML format mismatch with documentation

The help text documents the YAML file format with an operations: wrapper key, but parseBulkOperationsFile unmarshals directly into []OperationInput, expecting a bare YAML array at the root level. Users following the documented example format will get a parsing error because the code cannot unmarshal a map into a slice.

cmd/dns.go#L306-L320

namecheap/cmd/dns.go

Lines 306 to 320 in 3f50311

Example file format:
operations:
- action: add
hostname: www
type: A
value: 192.168.1.1
ttl: 300
- action: update
hostname: mail
type: A
value: 192.168.1.2
- action: delete
hostname: old
type: CNAME`,

cmd/dns.go#L581-L585

namecheap/cmd/dns.go

Lines 581 to 585 in 3f50311

var inputs []OperationInput
if err := yaml.Unmarshal(data, &inputs); err != nil {
return nil, fmt.Errorf("failed to parse YAML: %w", err)
}

Fix in Cursor Fix in Web


@SamyRai SamyRai merged commit 075f0fe into master Feb 3, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant