From d11ce89df0e05e65932dc3150b72591af2c0c098 Mon Sep 17 00:00:00 2001 From: Vladimir Jimenez Date: Fri, 10 Mar 2023 16:37:27 -0800 Subject: [PATCH] Pull from latest master of bzflag.org repo for BZDB --- scripts/fetch-bzdb-definitions.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/fetch-bzdb-definitions.ts b/scripts/fetch-bzdb-definitions.ts index b46c79d..f813435 100644 --- a/scripts/fetch-bzdb-definitions.ts +++ b/scripts/fetch-bzdb-definitions.ts @@ -4,17 +4,13 @@ import { load } from 'js-yaml'; import fetch from 'node-fetch'; import { resolve } from 'path'; -// @TODO Update this URL to use the `master` branch when this PR is merged -// https://github.com/BZFlag-Dev/bzflag.org/pull/42 -const BZDB_DOCS_URL = - 'https://raw.githubusercontent.com/BZFlag-Dev/bzflag.org/docs/bzdb/_data/bzdb_settings.yaml'; +// prettier-ignore +const BZDB_DOCS_URL = 'https://raw.githubusercontent.com/BZFlag-Dev/bzflag.org/master/_data/bzdb_settings.yaml'; (async function () { const rawBody = await (await fetch(BZDB_DOCS_URL)).text(); - const json = load(rawBody); - const bzdbTypes: string[] = (json as any)['variables'].map( - (def: any) => def.name, - ); + const json: any = load(rawBody); + const bzdbTypes: string[] = json['variables'].map((def: any) => def.name); writeFileSync( resolve(__dirname, '..', 'src', 'data', 'bzdb-documention.json'),