From 9901b7af549bb0da56a7fea25d47fb92bc5f050e Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 30 Jul 2025 04:01:02 -0700 Subject: [PATCH] chore: rename config.json.example to config-vanilla.json (#2570) Changing file extensions can be a bit of a chore on stock Windows, so this should simplify matters. Another bonus is that the "vanilla" clarifies the general guideline for how the defaults are configured. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2570 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .prettierignore | 2 +- README.md | 2 +- config.json.example => config-vanilla.json | 0 docker-entrypoint.sh | 2 +- src/index.ts | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) rename config.json.example => config-vanilla.json (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 375beec1a..29b60ea17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: with: node-version: ">=20.6.0" - run: npm ci - - run: cp config.json.example config.json + - run: cp config-vanilla.json config.json - run: npm run verify - run: npm run lint:ci - run: npm run prettier diff --git a/.prettierignore b/.prettierignore index 9ce8be880..e1ab48199 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,4 +2,4 @@ src/routes/api.ts static/webui/libs/ *.html *.md -config.json.example +config-vanilla.json diff --git a/README.md b/README.md index 0985b8469..cd136b9f2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ To get an idea of what functionality you can expect to be missing [have a look t ## config.json -SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [config.json.example](config.json.example), which has most cheats disabled. +SpaceNinjaServer requires a `config.json`. To set it up, you can copy the [config-vanilla.json](config-vanilla.json), which has most cheats disabled. - `logger.level` can be `fatal`, `error`, `warn`, `info`, `http`, `debug`, or `trace`. - `myIrcAddresses` can be used to point to an IRC server. If not provided, defaults to `[ myAddress ]`. diff --git a/config.json.example b/config-vanilla.json similarity index 100% rename from config.json.example rename to config-vanilla.json diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 703b7eafc..27abf98d2 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,7 +2,7 @@ set -e if [ ! -f conf/config.json ]; then - jq --arg value "mongodb://openwfagent:spaceninjaserver@mongodb:27017/" '.mongodbUrl = $value' /app/config.json.example > /app/conf/config.json + jq --arg value "mongodb://openwfagent:spaceninjaserver@mongodb:27017/" '.mongodbUrl = $value' /app/config-vanilla.json > /app/conf/config.json fi exec npm run start -- --configPath conf/config.json diff --git a/src/index.ts b/src/index.ts index 4887db86b..175ce189d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ try { if (fs.existsSync("config.json")) { console.log("Failed to load " + configPath + ": " + (e as Error).message); } else { - console.log("Failed to load " + configPath + ". You can copy config.json.example to create your config file."); + console.log("Failed to load " + configPath + ". You can copy config-vanilla.json to create your config file."); } process.exit(1); }