* fix: ID tests not in correct directory
* refactor: Move game-id test logic into its own crate
* id-tests: Add CLI that reads JSON input
* id-tests: Update crate docs
* Remove node ID test
* id-tests: Don't try to parse unneeded info
* id-tests: Enable cli feature by default
* [Test] Add best effort test to validate game ID rules
An attempt to implement the rules specified in #108 as a programmatic
test.
* [Test] Refactor ID rules to check if a mod exists after - in game name
This allows fivem to pass the check following rule 8, but could also
cause a false pass in some cases.
* [Test] Add unit tests for ID rule checker
Adds unit tests based on the examples in CONTRIBUTING.md to confirm in
those cases we would allow ID to pass. However these tests don't check
any error cases.
* test/id: Correctly extract protocol names
* games/defs: Fix unreal tournament IDs
* tests: Require game definitions to run ID tests
* tests: Improve comments on ID tests
* tests/id: Combine - seperated numbers
* games/defs: Fix darkest hour ID
* Add/Update badge
---------
Co-authored-by: GitHub Action <action@github.com>
* cli: Do DNS lookup if host is not an IP address
* cli: Add option to output as JSON
* cli: Pass hostname to ExtraRequestSettings if it isn't an IP
* cli: Add help docs to all arguments
* cli: Add options for all extra request settings
* cli: Use a CLI only error for DNS
* cli: Add option to set timeout settings
* docs: Update CHANGELOG
* cli: Add default values to TimeoutSettings
* cli: Refactor finding game definition into its own function
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* cli: Refactor IP resolution into its own set of functions
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* cli: Refactor output formatting into its own functions
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* cli: Improve doc comments for CLI args and derive Debug
Co-Authored-By: Cain <75994858+cainthebest@users.noreply.github.com>
* protocols: Derive Serialize for versioned generic responses
This allows for serializing the output of as_original(). We cannot also
derive Deserialize here because the enums use references to the inner
types, which is unavoidable in the current implementation because
as_original() takes a reference to self.
* cli: Add the output mode options
This allows selected whether to use CommonResponse or the original
response struct when outputting.
* cli: Fix ExtraRequestSettings docs showing up in help output
* cli: Add help headings for timeouts and extra request settings
---------
Co-authored-by: Cain <75994858+cainthebest@users.noreply.github.com>
* protocols: Fix building without the "games" feature
* crate/lib: Add required features for examples
This prevents cargo from running the examples if the required features
aren't enabled.
* ci: Run if ANY Cargo.toml files are changed
* ci: Make sure to run unit tests
* ci: Separate checks for library and CLI
* ci: Add slightly better comments
* ci: Only run deeper tests for CLI or LIB when their files were changed
* ci: Improve act arguments for testing actions locally
* ci: Fix pre-commit not running tests
* ci: Only update shared cache after the initial build
* ci: Make sure that rustup downloads get cached
* tidy: Clean up file formatting
* ci: Fix issue with audit