Repository navigation
feat(config): add gddy config with punycode and currency preferences - #336
Open
jpage-godaddy wants to merge 4 commits into
Open
jpage-godaddy wants to merge 4 commits into
jpage-godaddy wants to merge 4 commits into
Conversation
jpage-godaddy
requested review from
apetrovic-godaddy,
axburgess-godaddy,
jhenderson1-godaddy,
jpearlman-godaddy,
mguerrero3-godaddy,
qcai-godaddy,
rts1-godaddy and
sswaminathan-godaddy
as code owners
October 20, 2026 21:05
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Preference validation can report failure after a purchase, nameserver update, or domain attachment has already been submitted.
3 open issues
What changed in this PR
Adds persistent CLI preferences, extending internationalized domain support with saved display settings and shopping currency defaults.
Changes:
- Registers
gddy configwith validated, typed preferences. - Adds flag → environment → saved-setting precedence.
- Updates guides, tests, and dependencies.
| File | Description |
|---|---|
| rust/src/shopping/mod.rs | Registers currency support. |
| rust/src/shopping/guides/shopping.md | Documents currency preferences. |
| rust/src/shopping/currency.rs | Resolves currency precedence and tests it. |
| rust/src/shopping/checkout/create.rs | Applies preferred currency. |
| rust/src/shopping/catalog/search.rs | Applies preferred currency. |
| rust/src/shopping/catalog/lookup.rs | Applies preferred currency. |
| rust/src/shopping/catalog/get.rs | Applies preferred currency. |
| rust/src/prefs.rs | Defines and validates preferences. |
| rust/src/main.rs | Registers the configuration schema. |
| rust/src/idn.rs | Resolves domain-display preferences and tests precedence. |
| rust/src/hosting/domain/list.rs | Applies domain-display preferences. |
| rust/src/hosting/domain/get.rs | Applies domain-display preferences. |
| rust/src/hosting/domain/attach.rs | Applies domain-display preferences. |
| rust/src/environments/test_support.rs | Extends environment-variable test helpers. |
| rust/src/domain/suggest.rs | Applies domain-display preferences. |
| rust/src/domain/quote.rs | Applies domain-display preferences. |
| rust/src/domain/purchase.rs | Applies domain-display preferences. |
| rust/src/domain/operation.rs | Applies domain-display preferences. |
| rust/src/domain/nameservers.rs | Applies domain-display preferences. |
| rust/src/domain/list.rs | Applies domain-display preferences. |
| rust/src/domain/guides/domain-purchase.md | Documents saved display settings. |
| rust/src/domain/get.rs | Applies domain-display preferences. |
| rust/src/domain/available.rs | Applies domain-display preferences. |
| rust/src/dns/set/mod.rs | Resolves domain-display preferences. |
| rust/src/dns/list.rs | Applies domain-display preferences. |
| rust/src/dns/guides/dns.md | Documents preference precedence. |
| rust/src/dns/delete.rs | Resolves domain-display preferences. |
| rust/src/dns/add.rs | Resolves domain-display preferences. |
| rust/Cargo.toml | Enables configuration and environment support. |
| rust/Cargo.lock | Updates dependency versions. |
Review effort: Balanced
jpage-godaddy
added this pull request to stack #338
October 20, 2026 22:26
jpage-godaddy
force-pushed
the
engine-config-cmds
branch
from
October 20, 2026 22:46
e75a276 to
50861cb
Compare
Add `gddy config get|set|unset|list|path` for viewing and changing saved preferences instead of passing a flag on every command or editing a file by hand. `config list` shows every setting with its description and default, and `config set` rejects unknown settings and invalid values with a fix. Two preferences are available: - `punycode` shows domain names in their ASCII form instead of Unicode. - `currency` sets the currency shopping prices are shown in (for example GBP). It applies to `shopping catalog search|get|lookup` and `shopping checkout create`. `shopping checkout update` still changes a checkout's currency only when `--currency` is passed, so a saved setting never re-prices an existing checkout. A saved preference is only a default. The flag and the matching GDDY_* environment variable (GDDY_PUNYCODE, GDDY_CURRENCY) override it, in that order, and `--punycode=false` turns the encoded form back off for one command. A config file that is malformed or holds an invalid value is reported with a fix rather than silently read as defaults. The domain and shopping guides describe both settings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…meserver and attach changes `domain purchase`, `domain quote`, `domain nameservers set` and `hosting domain attach` looked up the domain display preference after their request had already gone through. A malformed config file or an invalid saved value could then show a configuration error even though the domain had been registered, the quote saved, the nameservers changed or the domain attached, hiding the operation ID or details the user needs. These commands now check the preference first and fail before doing anything, so the error is reported while nothing has changed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…est environment An invalid GDDY_PUNYCODE makes every domain command fail to parse, so setting it in the test process could break any other test that parses a domain command at the same moment. The invalid-value case now runs in a child test process and leaves the shared environment alone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jpage-godaddy
force-pushed
the
engine-config-cmds
branch
from
October 22, 2026 23:29
04ec0da to
e77d742
Compare
… name form `domain auto-renew set` and `domain transfer-lock set` now take `--punycode` and follow the saved `punycode` preference like the other domain commands. The domain in their result, and in the suggested next step, appears in Unicode by default or in its ASCII form when requested. The preference is checked before the change is sent, so a bad saved value is reported up front. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds
gddy configso people can view and change their preferences instead of passing a flag on every command or editing a file by hand (DEVEX-1295).gddy config get|set|unset|list|path.config listshows every setting with its description and default;config setrejects unknown settings and invalid values with a fix.punycode: show domain names in their ASCII form instead of Unicode (gddy config set punycode true).currency: the currency shopping prices are shown in, as an ISO 4217 code (gddy config set currency GBP). It applies toshopping catalog search|get|lookupandshopping checkout create.shopping checkout updatestill changes a checkout's currency only when--currencyis passed, so a saved setting never re-prices an existing checkout.A saved preference is only a default. The flag and the matching environment variable (
GDDY_PUNYCODE,GDDY_CURRENCY) override it, in that order, and--punycode=falseturns the encoded form back off for one command. A config file that is malformed or holds an invalid value is reported with a fix rather than silently read as defaults.The preference is checked before
domain purchase,domain quote,domain nameservers set,domain auto-renew set,domain transfer-lock setandhosting domain attachsend their request, so a bad saved value fails up front instead of hiding the result (operation ID, quote token, attachment details) of a change that already went through.domain auto-renew setanddomain transfer-lock setnow take--punycodeand follow the savedpunycodepreference like the other domain commands, so the domain in their result and in the suggested next step appears in Unicode by default or in its ASCII form when requested.The domain, DNS and shopping guides describe the settings.
Upgrades
cli-engineto 0.10.3, which provides theconfigcommands and typed settings.Testing
currencythrough the realconfig setpath.GDDY_PUNYCODEcase runs in a child test process, so it cannot affect other tests that parse domain commands.domain purchase,domain quote,domain nameservers set,domain auto-renew set,domain transfer-lock setandhosting domain attachfail with the config error, before any auth or network step, whenconfig.tomlis broken.cargo check,clippy -D warnings,cargo test --workspace,cargo fmt --checkand the module-size check all pass.🤖 Generated with Claude Code