From 6fb703727e79ce9fb3f09e925347849157d8858c Mon Sep 17 00:00:00 2001 From: David Sutherland Date: Thu, 27 Aug 2026 15:12:34 +0100 Subject: [PATCH 1/5] Adding validation to GameDetails objects --- docs/game/create.md | 14 +- docs/game/details.md | 26 +++- docs/game/ship.md | 3 + src/commands/game/create.ts | 38 ++++- src/commands/game/details.tsx | 20 ++- src/commands/game/ship.tsx | 11 ++ src/constants/godot.ts | 5 + src/constants/index.ts | 9 +- src/utils/index.ts | 1 + src/utils/validation.ts | 249 +++++++++++++++++++++++++++++++ test/utils/validation.test.ts | 266 ++++++++++++++++++++++++++++++++++ 11 files changed, 624 insertions(+), 18 deletions(-) create mode 100644 src/constants/godot.ts create mode 100644 src/utils/validation.ts create mode 100644 test/utils/validation.test.ts diff --git a/docs/game/create.md b/docs/game/create.md index cafb95b1..6b4bd839 100644 --- a/docs/game/create.md +++ b/docs/game/create.md @@ -17,8 +17,11 @@ directory then you will need to use the `--force` flag to create a new game and overwrite this file with the config for the new game. ShipThis will detect the version of Godot you are using from your **project.godot** -file. This can be changed with the [`shipthis game details`](/docs/reference/game/details) -command. +file. To set a different version, pass the `--gameEngineVersion` flag, or change it later +with the [`shipthis game details`](/docs/reference/game/details) command. + +The CLI checks the values you pass. The rules are the same as the ones the +[`shipthis game details`](/docs/reference/game/details) command applies. ## Example @@ -28,8 +31,8 @@ command. ```help USAGE - $ shipthis game create [-f] [-q] [-a ] [-b ] [-e ] [-v ] [--gcpProjectId ] - [-c ] [-i ] [-l ] [-n ] [-s ] [-d true|false] + $ shipthis game create [-f] [-q] [-a ] [-b ] [-e godot] [-v ] [--gcpProjectId ] [-c + ] [-i ] [-l ] [-n ] [-s ] [-d true|false] FLAGS -a, --androidPackageName= Set the Android package name @@ -37,7 +40,8 @@ FLAGS -c, --gcpServiceAccountId= Set the GCP service account ID -d, --useDemoCredentials=