Make it (a tiny bit) easier to run your own collab (#9557)
* Allow creating channels when seeding * Allow configuring a custom `SEED_PATH` * Seed the database when creating/migrating it so you don't need a separate step for this. Release Notes: - N/A
This commit is contained in:
parent
1062c5bd26
commit
ac4c6c60f1
17 changed files with 246 additions and 177 deletions
|
@ -19,16 +19,9 @@ OPTIONS
|
|||
const { spawn, execFileSync } = require("child_process");
|
||||
const assert = require("assert");
|
||||
|
||||
const defaultUsers = require("../crates/collab/.admins.default.json");
|
||||
let users = defaultUsers;
|
||||
try {
|
||||
const customUsers = require("../crates/collab/.admins.json");
|
||||
assert(customUsers.length > 0);
|
||||
assert(customUsers.every((user) => typeof user === "string"));
|
||||
users = customUsers.concat(
|
||||
defaultUsers.filter((user) => !customUsers.includes(user)),
|
||||
);
|
||||
} catch (_) {}
|
||||
const users = require(
|
||||
process.env.SEED_PATH || "../crates/collab/seed.default.json",
|
||||
).admins;
|
||||
|
||||
const RESOLUTION_REGEX = /(\d+) x (\d+)/;
|
||||
const DIGIT_FLAG_REGEX = /^--?(\d+)$/;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue