1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

Merge branch 'fix/channelPermissionOverwriteSchema' into feat/latestWebClient

This commit is contained in:
Madeline 2022-07-03 20:58:44 +10:00
commit 3fd7f87132
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 2041 additions and 528 deletions

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,16 @@ const Excluded = [
"Response",
"e.Response",
"request.Response",
"supertest.Response"
"supertest.Response",
// TODO: Figure out how to exclude schemas from node_modules?
"SomeJSONSchema",
"UncheckedPartialSchema",
"PartialSchema",
"UncheckedPropertiesSchema",
"PropertiesSchema",
"AsyncSchema",
"AnySchema",
];
function modify(obj) {
@ -39,11 +48,18 @@ function modify(obj) {
}
function main() {
const program = TJS.getProgramFromFiles(walk(path.join(__dirname, "..", "src", "routes")), compilerOptions);
const files = [
...walk(path.join(__dirname, "..", "src", "routes")),
...walk(path.join(__dirname, "..", "..", "util", "src")),
];
const program = TJS.getProgramFromFiles(
files,
compilerOptions
);
const generator = TJS.buildGenerator(program, settings);
if (!generator || !program) return;
const schemas = generator.getUserSymbols().filter((x) => (x.endsWith("Schema") || x.endsWith("Response")) && !Excluded.includes(x));
let schemas = generator.getUserSymbols().filter((x) => (x.endsWith("Schema") || x.endsWith("Response")) && !Excluded.includes(x));
console.log(schemas);
var definitions = {};