Feat/bug fixes jul 26 - #10
Merged
Merged
Conversation
- Add `IsSandbox` function to determine if the `--sandbox` flag is set on the root command. - Modify `runCheck` to bypass ZoneCheck when in sandbox mode, ensuring accurate domain availability checks without querying production DNS. - Enhance tests to verify that sandbox mode correctly routes to the EPP registry and does not call ZoneCheck, improving test coverage for domain availability scenarios.
- Introduce tests for explicit zero priority handling in DNS record creation, ensuring that a priority of 0 is correctly sent in requests. - Add tests for omitted priority in DNS creation, confirming that the field is excluded when not specified. - Implement updates to the `runCreate` and `runUpdate` functions to correctly handle priority flags based on user input, improving API interaction accuracy. - Enhance domain renewal commands to include purchase price handling for premium domains, ensuring accurate pricing is sent in requests. - Refactor the inline registration process to correctly forward purchase type and price from search results, improving registration accuracy. - Update URL update functionality to preserve unset fields from current entries, ensuring existing values are maintained unless explicitly changed. - Add tests for vanity nameserver creation to validate hostname handling, ensuring compliance with API requirements for subdomain formatting.
- Introduce a new `profileView` type to safely serialize profile information without exposing sensitive data. - Implement `redactProfiles` to create a sanitized view of profiles for JSON and YAML outputs. - Update `runListProfiles` and `runShow` to utilize the new profile redaction, ensuring sensitive information is not displayed. - Add `tokenCmdSummary` to summarize token commands, preventing sensitive command details from being printed. - Enhance DNS import functionality to support reading from stdin and file paths, improving user experience. - Implement tests for DNS import and export commands to ensure correct handling of various input scenarios. - Update dry-run functionality across commands to ensure accurate reporting of requests without executing them.
- Introduce explicit preparation of HTTP requests in the API client to ensure authentication headers are applied correctly, preventing unauthenticated requests. - Update pagination handling across various commands to utilize fresh variables for decoding responses, preventing data overwrites and infinite loops during pagination. - Remove redundant idempotency key flags from commands, relying on the root command's key for consistency and clarity. - Enhance error handling in API responses to provide more informative feedback based on status codes, improving user experience during failures.
- Introduce specific error types for usage and authentication errors, improving clarity in error reporting. - Update flag parsing to classify errors as usage errors, ensuring consistent exit codes for invalid flags. - Refactor dry-run implementations to prevent unnecessary prompts and ensure accurate reporting of actions without execution. - Enhance tests for dry-run scenarios to validate that commands behave correctly without performing actual operations. - Improve output formatting for error messages in structured modes, ensuring machine-readable responses for better integration.
- Update the `runList` function to ensure that the `--type` filter correctly triggers auto-pagination, allowing retrieval of records across multiple pages. - Enhance error messages for filtered searches to clearly distinguish between empty zones and zones with no matching records, improving user feedback. - Introduce a new test case to validate the pagination behavior when filtering DNS records, ensuring accurate results are returned for all pages. - Refactor the `Success` method in the output package to provide structured responses for mutating commands, preventing parsing issues in JSON output.
…r management - Modify README examples to reflect changes in JSON output structure for domain listing commands, ensuring accurate usage guidance. - Update `list_get.go` to adjust JSON parsing for domain listing commands, aligning with the new output format. - Enhance `order.go` and `order_test.go` to display order items in the output, allowing users to see item details necessary for refund operations. - Implement logic in `runUpdate` for URL commands to preserve existing values when certain flags are not set, improving user experience during updates.
- Update `runOpen` to use output configuration for hints instead of direct printing, preventing corruption of piped output. - Modify root command usage to include "[command]" for clearer help messages. - Introduce `ValidSortField` function to validate sort fields for domain listing commands, improving error handling for invalid inputs. - Implement quiet mode support in detail commands, ensuring they print only essential identifying values, enhancing scripting capabilities. - Add tests for quiet mode behavior in detail commands and validate sort field checks, ensuring robust command functionality.
- Introduce `applyDomainToggle` function to replace deprecated endpoints for locking, autorenewing, and privacy toggles with a unified `UpdateDomain` API call. - Update `runLock`, `runAutorenew`, and `runPrivacy` functions to utilize the new API, ensuring consistent handling of domain state changes. - Add `TestToggleCommands_UseUpdateDomain` to validate the migration and ensure correct API interactions for toggling domain settings. - Normalize domain arguments in `runCheck` to prevent mismatches with API responses, enhancing reliability in domain availability checks.
…paring YAML data structures. This file included functions for reading files, walking through data structures, and reporting differences. Its removal simplifies the codebase by eliminating unused functionality.
- Upgrade several Go module dependencies to their latest versions, including `golang.org/x/mod`, `golang.org/x/net`, `golang.org/x/sync`, `golang.org/x/term`, `golang.org/x/text`, and `golang.org/x/sys`, ensuring compatibility and security improvements. - Introduce new tests to validate security measures against credential exfiltration and header injection, enhancing the robustness of API interactions. - Implement domain normalization to ensure consistent handling of domain arguments, particularly for internationalized domain names (IDNs), improving reliability in API responses.
- Introduce `warnUnverifiedContacts` function to alert users about unverified registrant contacts during domain operations, emphasizing the risk of domain lock by the registry if verification is not completed. - Update `runContactsGet` and `runContactsSet` functions to include warnings about potential ICANN verification requirements when updating contact information or registering domains. - Add `TestContactsGet_SurfacesVerificationStatus` to ensure that the output correctly highlights unverified contacts and their implications, enhancing user awareness and compliance with ICANN regulations. - Refactor output handling to provide clearer hints regarding verification status and necessary actions for users.
- Introduce `--acknowledge-claim` flag to the domain registration command, requiring explicit user acknowledgment for domains with trademark claims. - Implement `resolveClaims` function to check for trademark claims and handle user acknowledgment, ensuring compliance with TMCH requirements. - Update `runRegister` to include claims information in the domain creation request, preventing registration without acknowledgment. - Add tests to validate the acknowledgment process and ensure correct handling of claimed and unclaimed domains during registration. - Enhance user feedback by rendering claims notices and ensuring proper error messages for unacknowledged claims.
- Introduce `statusServerWith` function to allow customizable HTTP response statuses for transfers, improving test flexibility. - Update `PendingTransfers` in `statusSummary` to be a pointer, allowing differentiation between successful fetches and failures. - Modify `runStatus` to only report transfer counts when the fetch is successful, preventing misleading zero counts on failures. - Add tests to ensure correct behavior when transfers are genuinely absent versus when the lookup fails, enhancing output accuracy in JSON format.
- Remove dependency on golang.org/x/net/idna for punycode encoding, simplifying the domain normalization process. - Update `CanonicalDomain` function to only lowercase and trim domain names, aligning with API behavior that normalizes input server-side. - Introduce `argMatcher` to handle mapping API responses back to user input, ensuring accurate resolution of domain names without ambiguity. - Enhance tests to cover new matching logic and ensure correct handling of various domain name formats, improving reliability in domain availability checks.
- Introduce `buildAPIURL` function to securely construct API URLs, preventing credential leakage through malicious paths. - Update tests to validate that paths do not redirect to unauthorized hosts and maintain HTTPS scheme. - Enhance existing tests for API error handling and path validation, ensuring robust security against credential exfiltration. - Refactor related test cases to improve clarity and coverage of URL construction logic.
- Introduce `--sort-dir` flag to specify sorting direction (asc or desc) for domain properties, improving user control over listing results. - Update `runList` function to validate and apply the sorting direction, ensuring compliance with API specifications. - Refactor tests to cover new sorting functionality, including validation of sort direction and acceptance of server-side fields. - Enhance existing tests to ensure accurate error handling for invalid sort direction inputs, improving robustness of command execution.
- Introduce `TestAPI_PropagatesMethodPathAndBody` to ensure that the API correctly propagates the HTTP method, path, and body from the command line, enhancing the accuracy of API interactions. - Implement `TestAPI_ReadsBodyFromStdin` to validate that the API can read request bodies from standard input, ensuring compliance with command help documentation. - Enhance existing test coverage for API command functionality, improving reliability and debugging capabilities for users interacting with the API.
- Introduce `showCmdFor` function to streamline test setup for `config show`, ensuring both token and token_cmd are present in the default profile. - Update `TestShow_NeverLeaksToken` to validate that sensitive credentials are not exposed in command output across multiple formats. - Refactor `TestShow_HonorsProfileSelection` to improve clarity and coverage of profile selection behavior, ensuring correct endpoint reporting based on user input. - Add assertions to confirm that the output correctly identifies the selected profile and its corresponding endpoint, enhancing test reliability.
- Introduce `renderAuthStatus` function to handle credential summary output, ensuring compatibility with JSON and YAML formats. - Modify `watchTransfer` to direct progress commentary to stderr when in structured output mode, preventing corruption of JSON/YAML documents. - Update `KVTable` method to avoid emitting ASCII tables in structured formats, enhancing output consistency and parseability. - Add tests to verify that progress messages do not interfere with structured output during transfer status monitoring.
- Replace misleading success handling for throttled resend responses with explicit error reporting, ensuring users are informed when a resend is throttled. - Update tests to verify that the command correctly distinguishes between successful and throttled resends, enhancing script compatibility. - Modify the `runUnverified` function to ensure all pages are fetched in quiet mode, preventing silent truncation of output. - Enhance claims resolution in the registration process to ensure accurate handling of trademark claims based on purchase type, improving compliance with TMCH requirements.
- Replace instances of `config.Path()` with `config.ActivePath()` in multiple commands to ensure users receive accurate information about the configuration file being used. - Enhance error handling for malformed `--tld-requirement` flag in the registration command, ensuring users are notified before any prompts are displayed. - Update quiet mode output in the requirements command to return required fields instead of echoing the input, improving scriptability and user experience. - Add tests to verify the correct reporting of the active configuration path and the handling of malformed flags, enhancing overall reliability.
- Introduce `--base-url` flag to allow users to specify an alternative API endpoint, enhancing flexibility for local development and testing. - Implement `validateBaseURL` function to ensure only valid HTTP/HTTPS URLs are accepted, preventing misconfigurations. - Add `baseURLWarning` function to alert users when the specified base URL is not the official API endpoint, safeguarding against accidental credential exposure. - Create tests for base URL override functionality, ensuring correct behavior for valid and invalid URLs, as well as appropriate warning messages. - Update CLI initialization to incorporate base URL handling, improving user experience and command reliability.
- Update `runTokenCmd` to include a `WaitDelay` to manage the blocking behavior of commands that are pipelines, ensuring proper timeout handling. - Modify the test for `TestRunTokenCmd_TimesOut` to reflect the new command structure, allowing for accurate timing and output management in CI environments. - Add comments to clarify the behavior of command execution with respect to child processes and pipeline management, improving code readability and maintainability.
- Integrate `setProcessGroup` function into `runTokenCmd` to manage process groups during command execution, enhancing control over child processes. - This addition improves the handling of command execution in contexts where process management is critical, ensuring better resource management and error handling.
- Modify the `go test` command in the CI workflow to include the `-count=1` flag, ensuring that tests run without using cached results. This change addresses potential issues with the test cache hiding failures in the preprocessor step. - Add comments to clarify the reasoning behind this adjustment, enhancing the maintainability of the CI configuration.
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.
No description provided.