Commit graph

63 commits

Author SHA1 Message Date
GitHub Action
0f0a9da609 Add/Update badge 2024-03-10 21:40:09 +00:00
dependabot[bot]
03fd0c10b2
chore(deps): bump rust-build/rust-build.action in /.github/workflows (#190)
Bumps [rust-build/rust-build.action](https://github.com/rust-build/rust-build.action) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/rust-build/rust-build.action/releases)
- [Commits](https://github.com/rust-build/rust-build.action/compare/v1.4.4...v1.4.5)

---
updated-dependencies:
- dependency-name: rust-build/rust-build.action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 16:06:21 +02:00
GitHub Action
4d214ad5fb Add/Update badge 2024-02-25 21:50:57 +00:00
GitHub Action
5d48de178b Add/Update badge 2024-02-10 18:27:29 +00:00
Cain
e86e80522b
feat: Add packet capture functionality and many more CLI improvements (#182) 2024-02-07 22:31:31 +00:00
dependabot[bot]
80129ce012
chore(deps): bump emibcn/badge-action in /.github/workflows (#187)
Bumps [emibcn/badge-action](https://github.com/emibcn/badge-action) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/emibcn/badge-action/releases)
- [Commits](https://github.com/emibcn/badge-action/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: emibcn/badge-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-07 16:22:45 +02:00
dependabot[bot]
ca61c1c0b0
chore(deps): bump dorny/paths-filter from 2 to 3 in /.github/workflows (#185)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 2 to 3.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dorny/paths-filter/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 19:53:27 +02:00
GitHub Action
175dcf6aa6 Add/Update badge 2024-02-06 03:34:59 +00:00
GitHub Action
76604ac3fc Add/Update badge 2024-01-30 03:37:04 +00:00
GitHub Action
144d7ca03d Add/Update badge 2024-01-22 11:36:43 +00:00
GitHub Action
6d0c25d6ea Add/Update badge 2024-01-19 18:43:30 +00:00
Tom
f922270c60
ci: Only update the node badge on the main branch (#183) 2024-01-19 20:43:02 +02:00
Cain
2deb1df4ae impl: cli release workflow (x86_64, win, dar, linux, wasm32-wasi) 2024-01-19 04:30:20 +00:00
GitHub Action
0f9bada4f3 Add/Update badge 2024-01-17 13:54:10 +00:00
GitHub Action
ba92466ae1 Add/Update badge 2024-01-10 23:48:39 +00:00
GitHub Action
12a6c2af58 Add/Update badge 2024-01-07 21:35:12 +00:00
GitHub Action
d9c0a63e8c Add/Update badge 2024-01-07 21:16:08 +00:00
Tom
bd3727d7fe
chore: Tidy up some out of place types (#160)
* tidy: Move TimeoutSettings out of protocol types

* tidy: Move game type to a types file

* tidy: Move generic query functions to own file

* tidy: Move ExtraRequestSettings to game types

* tidy: Move generic query functions into games module

* Revert "tidy: Move ExtraRequestSettings to game types"

This reverts commit aa0d23fc2acc12d68f03265a9caff6f98bf25054.

* Revert "tidy: Move TimeoutSettings out of protocol types"

This reverts commit 7ee10711ed11f17cc06565d4cc9102040d53a319.

* tidy: Re-export types needed for query at the root

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2024-01-02 00:17:43 +02:00
GitHub Action
483d728ac8 Add/Update badge 2023-12-30 15:32:01 +00:00
Tom
87ed02420e
feat: Add best effort test to validate game ID rules (#111)
* [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>
2023-12-19 22:20:19 +01:00
GitHub Action
fb6f22b801 Add/Update badge 2023-12-10 17:39:46 +00:00
Tom
dd037daa04
Revert "Bump actions/labeler from 4 to 5 in /.github/workflows (#165)" (#167)
This reverts commit 04da29f2a6.
2023-12-07 22:51:45 +02:00
dependabot[bot]
04da29f2a6
Bump actions/labeler from 4 to 5 in /.github/workflows (#165)
Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 18:03:27 +02:00
CosminPerRam
45f05aec13
feat: add Squad support (#164)
* feat: add Squad support

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-12-03 20:59:46 +02:00
CosminPerRam
decff82318
feat: add Post Scriptum support (#163)
* feat: add post scriptum support

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-12-03 20:51:43 +02:00
Tom
b3a29b15b1
[CI] Improvement and fixes (#161)
* 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
2023-11-25 00:34:26 +02:00
Tom
0c7dbe76d7
ci: Update node coverage badge to work without games.txt (#156)
* ci: Update node coverage badge to work without games.txt

Fixes #155 using a new node script that should be more robust than the
old shell script.

* ci: Change badge cron time to less common time

By doing at a less common time we should reduce action time usage as
the runners will be under less load.

* Add/Update badge

* ci: Improve node-badge script

Co-Authored-By: CosminPerRam <cosmin.p@live.com>

* ci: Run node badge action if script changes

* ci: Update node badge path for workspaces

* ci: Revert loading games from index in node badge script

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: CosminPerRam <cosmin.p@live.com>
2023-11-23 11:48:24 +02:00
dependabot[bot]
f01cac8fed
Bump actions/checkout from 3 to 4 in /.github/workflows (#151)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 01:15:38 +02:00
Cain
c9c8e700cb
chore: add dependabot config (#150) 2023-11-08 23:56:58 +02:00
Cain
963040fb84 Merge branch 'main' into feat/cli 2023-11-08 20:42:07 +00:00
Tom
529abe9d76
feat: Add the unreal2 protocol (#124)
* WIP: Add unreal2 protocol

* Add/Update badge

* protocols/unreal2: Update doc comments and TODOs

* protocols/unreal2: Don't pre-allocate as many bot players

* protocols/unreal2: Use "encoding-rs" for decoding unreal2 strings

* Add/Update badge

* protocols/unreal2: Add constants for player pre-allocation.

Also improve some doc comments and update PACKET_SIZE.

* protocols/unreal2: Early break when enough players have been parsed

Add a fast-path to avoid waiting for packet timeout when we have parsed
as many players as specified in the server info packet.

* protocols/unreal2: Use HashSet to store mutators

* protocols/unreal2: Handle server sending multiple values for a rule

* protocols/unreal2: Add GatheringSettings to control what to query

GatheringSettings allows skipping querying rules and/or players which
can make the query return much faster. This also required moving each
individual query into its own helper.

* protocols/unreal2: Add more derives to types

* protocols/unreal2: Simplify ServerInfo::parse()

Co-Authored-By: CosminPerRam <cosmin.p@live.com>

* Docs: Add unreal2 protocol documentation

I used a website to generate the markdown RESPONSES table, the save file
from this website is included to make updating the table easier in the
future.

https://www.tablesgenerator.com/markdown_tables

* Add/Update badge

* protocols/unreal2: Use the correct encoding for UCS2 strings

* Docs: Remove unnecessary TGN file

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: CosminPerRam <cosmin.p@live.com>
2023-10-30 13:37:15 +02:00
CosminPerRam
e3dd7cd1c7
Fix some game ids and clarify rules 6 and 7. (#143)
* Fix wrongly named game ids of l4d, l4d2 and q3a

* Specify how edition/protocol names are appended to games, rule 7

* Clarify rule 6 regarding numbers

* Add/Update badge

* Fix rule 7 misswording

* Fix 7 Days to Die

* List id changes in the changelog

* Forgot to fix test

* Apply Douile suggestion regarding rule 6

Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>

* Fix typo on rule 6 and wrap text

* Clarify further rule 7

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Tom <25043847+Douile@users.noreply.github.com>
2023-10-24 22:39:36 +03:00
GitHub Action
6b92e883ef Add/Update badge 2023-10-17 23:31:19 +00:00
Douile
d34d615784
[CI] Update CI to work with workspaces 2023-10-18 00:29:21 +01:00
GitHub Action
6084c56d4f Add/Update badge 2023-10-16 22:21:11 +00:00
GitHub Action
ef29ba8eb4 Add/Update badge 2023-10-12 21:40:31 +00:00
GitHub Action
b7e1eff9b7 Add/Update badge 2023-10-09 01:12:54 +00:00
CosminPerRam
5280ecb3c6
[Game] Apply new id naming (#114)
* Apply new id naming

* Fix failing CI on all features

* Update changelog

* Rename tf2 example to teamfortress2

* Fix typo in steamapp game names

* Rename minecraft legacy versions

* Apply CI node badge fix by Douile

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-10-06 17:20:30 +03:00
Tom
b4c61781fb
Specify the branch name when pushing node badge commits (#116)
* [CI] Specify the branch name when pushing node badge commits

Fixes #115

* testing: remove games to update badge

* Add/Update badge

* Revert "testing: remove games to update badge"

This reverts commit 8256176839e996810568f5104a7c6a19ab482ab0.

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-10-05 11:46:35 +03:00
GitHub Action
3784d25774 Add/Update badge 2023-09-22 21:20:17 +00:00
Tom
14c3f4525b
[CI] Add node comparison badge (#99)
* [CI] Add node comparison badge

* Add/Update badge

---------

Co-authored-by: GitHub Action <action@github.com>
2023-09-21 23:51:10 +03:00
CosminPerRam
6b1e787cd2
[CI] Fix misc stuff with labeler CI. (#103)
* [CI] Fix games tag with the s

* [CI] Add labeler.yml as file for CI tag

* [CI] Also use checkout on triage
2023-09-21 23:37:11 +03:00
Tom
1a60a0496f
[CI] Only run build checks when a rust related file has changed (#102) 2023-09-21 23:03:12 +03:00
CosminPerRam
1c9f2dc0a8
[CI] Fix labeler permission on guest prs (#101)
* [CI] Fix permissions on guest prs

* Revert last commit

* Revert last commit

* Don't specify branch name in pr target

* Properly space on line

* Specify branch

* Add quotes to labeler points

* Remove the quotes on files in labeler.yml
2023-09-21 22:31:48 +03:00
CosminPerRam
2eb1d12b3d
[CI] Add github PR labeler (#97)
* Add labeler

* Run on prs

* Add move labeling
2023-09-17 21:59:19 +03:00
Tom
5e7e010d24
[Crate] Add rich error type (#80)
* Add rich error type with source and backtrace

Adds a rich error type that will take a backtrace and allow capturing
the source of the error. The best way to use this is with the included
helpers that will automatically capture the backtrace and convert the
source error:

```
GDRichError::packet_bad_from_into("Reason packet was bad")
```

* [Crate] Bump MSRV to 1.65.0

This is required for backtraces in rich errors.

* Remove leftover debug logging

* [Errors] Replace variant overloads with single .rich method on kind enum

This overhaul replaces the exhaustive impls of each variant as multiple
methods on the rich error type with a singular .rich() method on the
kind enum. This consumes the variant and converts it to a rich error
with a source (.into() can be used if a source is not needed).

I also took the liberty of replacing all usages with the this new method
as I saw fit (adding various error messages) and converting a few
PacketBad errors to TypeParse errors when they are the result of parse
failing.

* Fix problem with rustdoc

* Remove BadGame's owned string

* Rename GDError to GDErrorKind

* Rename GDRichError to GDError

* Remove error impl from GDErrorKind

* Fix tests not passing

* Use error context everywhere map_err is used

* Improve GDError display formatter

* Add tests for new error type
2023-08-05 12:36:48 +03:00
CosminPerRam
f7b5463073
[Crate] Add issue templates (#81) 2023-08-03 21:36:03 +03:00
Tom
fb447edbc2
[Docs] Add rustdoc checks to CI and tests to pre-commit (#83) 2023-08-02 17:44:42 +03:00
Tom
a8342296d6
[CI] Improve checks (#71)
* [CI] Improve checks

- Adds .actrc so CI actions can be tested locally
- Adds testing for variants of features so changes that break feature
  sets like disabling games can be caught
- Adds more of the CI tests to pre-commit

* [CI] Add more feature sets to test

* [CI] Check github actions before comitting

Requires act: https://github.com/nektos/act

* [CI] Add caching between builds

* [CI] Add caching everywhere

* [CI] Add more feature tests

* [CI] Add YAML schemas

* [CI] Disable audit when running locally

This is needed because the audit action requires a GITHUB_TOKEN which we
don't have when running locally.

* [CI] Move clippy to own job and use action that annotates PRs

Using actions-rs/clippy-check means that PRs will problems will
automatically have the relevant lines annotated

* [CI] Don't unnecessarily cache targets for fmt
2023-07-12 23:40:10 +03:00
Tom
fb9d15f0cc
[Crate] Bump rustfmt version to 1.6.0 (#69) 2023-07-10 18:32:17 +03:00