out-of-your-element/matrix/read-registration.js

13 lines
369 B
JavaScript
Raw Normal View History

2023-05-01 05:05:47 +00:00
// @ts-check
2023-04-30 12:57:30 +00:00
const fs = require("fs")
2023-08-23 12:27:51 +00:00
const assert = require("assert").strict
2023-04-30 12:57:30 +00:00
const yaml = require("js-yaml")
/** @ts-ignore @type {import("../types").AppServiceRegistrationConfig} */
const reg = yaml.load(fs.readFileSync("registration.yaml", "utf8"))
2023-08-23 12:27:51 +00:00
assert(reg.ooye.max_file_size)
assert(reg.ooye.namespace_prefix)
assert(reg.ooye.server_name)
module.exports = reg