diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-05-23 00:25:48 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-23 00:25:48 -0300 |
commit | 458c7ed4c5035e125a497c192e71737f946ff302 (patch) | |
tree | 2e66b26b7be2da3dbb61613a46545d38d1c4baa2 /scripts/generatePluginList.ts | |
parent | d888a0a291e6915a770fb8fffeb8fd44c2865122 (diff) | |
download | Vencord-458c7ed4c5035e125a497c192e71737f946ff302.tar.gz Vencord-458c7ed4c5035e125a497c192e71737f946ff302.tar.bz2 Vencord-458c7ed4c5035e125a497c192e71737f946ff302.zip |
Make Fake Nitro transformations support the new markdown (#911)
Diffstat (limited to 'scripts/generatePluginList.ts')
-rw-r--r-- | scripts/generatePluginList.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/generatePluginList.ts b/scripts/generatePluginList.ts index 7c273de..87c32ab 100644 --- a/scripts/generatePluginList.ts +++ b/scripts/generatePluginList.ts @@ -19,8 +19,7 @@ import { Dirent, readdirSync, readFileSync, writeFileSync } from "fs"; import { access, readFile } from "fs/promises"; import { join } from "path"; -import { isSatisfiesExpression } from "typescript"; -import { BigIntLiteral, createSourceFile, Identifier, isArrayLiteralExpression, isCallExpression, isExportAssignment, isIdentifier, isObjectLiteralExpression, isPropertyAccessExpression, isPropertyAssignment, isStringLiteral, isVariableStatement, NamedDeclaration, NodeArray, ObjectLiteralExpression, ScriptTarget, StringLiteral, SyntaxKind } from "typescript"; +import { BigIntLiteral, createSourceFile, Identifier, isArrayLiteralExpression, isCallExpression, isExportAssignment, isIdentifier, isObjectLiteralExpression, isPropertyAccessExpression, isPropertyAssignment, isSatisfiesExpression, isStringLiteral, isVariableStatement, NamedDeclaration, NodeArray, ObjectLiteralExpression, ScriptTarget, StringLiteral, SyntaxKind } from "typescript"; interface Dev { name: string; @@ -131,7 +130,9 @@ async function parseFile(fileName: string) { if (!isArrayLiteralExpression(value)) throw fail("authors is not an array literal"); data.authors = value.elements.map(e => { if (!isPropertyAccessExpression(e)) throw fail("authors array contains non-property access expressions"); - return devs[getName(e)!]; + const d = devs[getName(e)!]; + if (!d) throw fail(`couldn't look up author ${getName(e)}`); + return d; }); break; case "tags": |