Repository navigation
Conversation
cafferata
left a comment
There was a problem hiding this comment.
Two points that don't fit on a line in the diff:
- The title starts with
docs:, but this pull request also changes behavior:REGISTRAR()defaults to"none",REGISTRAR()is rejected inD_EXTEND(),DOMAIN_ELSEWHERE_AUTO()accepts aSERVICE()modifier, andinitandget-zonesgenerate different output. The changelog groups by Conventional Commits type, so after the squash merge these changes end up under Documentation. How do you see this? I'd like to give this refactor a bit more visibility than a documentation entry. - Two pages still use the legacy syntax: CSYNC and the Cloudpress usage example. The latter arrived through a merge from
main.
| i === 1 && m && m._isRegistrar === true; | ||
| processDargs(m, domain.obj); | ||
| var state = domain.obj._registrarState; | ||
| state.inExtension = true; |
There was a problem hiding this comment.
REGISTRAR() inside D_EXTEND() now throws "REGISTRAR cannot be used in D_EXTEND()". In v5.4.0 this was accepted and documented: the conversion guide said "an explicit REGISTRAR in D_EXTEND() must likewise follow the domain name", and the tests used D("example.com"); D_EXTEND("example.com", REGISTRAR("chosen"), SERVICE("dns", 0)). Anyone who tried the v5.4.0 syntax that way gets an error after upgrading. Is this meant as a breaking change for users of v5.4.0?
| credential files still supply the default `none` and `bind` entries. These | ||
| modifiers also work in `DEFAULTS()` and `D_EXTEND()`; an explicit `REGISTRAR` in | ||
| `D_EXTEND()` must likewise follow the domain name. | ||
| Leave creds.json unchanged. |
There was a problem hiding this comment.
A legacy NewDnsProvider("transip", "TRANSIP") with no TYPE in the creds.json entry still works today; refineProviderType() only prints a "For future compatibility" warning. After converting to SERVICE("transip") the type can only come from creds.json, so preview fails with creds.json entry "transip" is missing: "TYPE": "FILL_IN_PROVIDER_TYPE". The previous text of this paragraph covered the TYPE requirement; with "Leave creds.json unchanged" a reader following the guide will not expect this. get-zones in this pull request keeps a legacy fallback for exactly this case.
|
|
||
| No `NewRegistrar()` declaration is needed. | ||
|
|
||
| `REGISTRAR("none")` is the selects the registrar using an entry name from creds.json. |
There was a problem hiding this comment.
This sentence looks broken: "is the selects the registrar" has a double space and missing words, and it repeats the opening sentence. In 1bd325c the paragraph was split into separate lines, and the sentence "The entry's TYPE determines the provider." disappeared at the same spot.
| name from creds.json. Its `TYPE` determines the provider. No `SERVICE()` | ||
| declaration is needed. |
There was a problem hiding this comment.
In REGISTRAR.md this sentence changed from "No REGISTRAR() declaration is needed" to "No NewRegistrar() declaration is needed" in 4de5032. Should this one read "No NewDnsProvider() declaration is needed" as well?
REGISTRAR()andSERVICE()are implemented, but current examples and generated starter files still teach the legacy provider declarations. This updates the broad documentation set and CLI-generated configs to use the new syntax.The draft changes the README, getting-started material, provider and language-reference examples, and generated TypeScript declarations. It adds reference pages for
REGISTRAR,SERVICE, andALL_NS.dnscontrol initnow writes directREGISTRAR()/SERVICE()calls;get-zonesdoes the same when the credential entry has a matchingTYPE, retaining a legacy explicit-type fallback when it does not.DOMAIN_ELSEWHERE_AUTO()accepts aSERVICE()modifier while preserving legacy arguments.Validation:
go test ./...andgit diff --checkpass. A parser audit checked 295 documentation JavaScript snippets; 34 preexisting partial or invalid examples remain outside this syntax conversion (for example,MX("@", "example.com.")in the getting-started examples omits priority).Keep this PR in draft until a release containing Stage 6b (#4976) is available and feedback has been reviewed. The latest release checked while opening this PR was v5.3.1, which predates Stage 6b.