|
|
@ -3,6 +3,7 @@ import { UserConfiguration, UserConfigTypeChecker, PostgresConfiguration } from
|
|
|
|
import fs from 'fs-extra';
|
|
|
|
import fs from 'fs-extra';
|
|
|
|
import { path } from '@tycrek/joint';
|
|
|
|
import { path } from '@tycrek/joint';
|
|
|
|
import { log } from './log.js';
|
|
|
|
import { log } from './log.js';
|
|
|
|
|
|
|
|
import { validate } from 'william.js';
|
|
|
|
|
|
|
|
|
|
|
|
const FILEPATH = path.join('.ass-data/userconfig.json');
|
|
|
|
const FILEPATH = path.join('.ass-data/userconfig.json');
|
|
|
|
|
|
|
|
|
|
|
@ -40,10 +41,7 @@ const Checkers: UserConfigTypeChecker = {
|
|
|
|
idSize: numChecker,
|
|
|
|
idSize: numChecker,
|
|
|
|
gfySize: numChecker,
|
|
|
|
gfySize: numChecker,
|
|
|
|
maximumFileSize: numChecker,
|
|
|
|
maximumFileSize: numChecker,
|
|
|
|
discordWebhook: (val) => {
|
|
|
|
discordWebhook: (val) => validate.discord.webhook(val),
|
|
|
|
const regex = /^https:\/\/discord\.com\/api\/webhooks\/\d+\/\S+$/;
|
|
|
|
|
|
|
|
return regex.test(val);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
s3: {
|
|
|
|
s3: {
|
|
|
|
endpoint: basicStringChecker,
|
|
|
|
endpoint: basicStringChecker,
|
|
|
|