Compare commits
2 Commits
22d1c3900a
...
214e00d291
Author | SHA1 | Date | |
---|---|---|---|
214e00d291 | |||
286165548f |
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,3 +9,5 @@ build
|
||||
files/build
|
||||
files/avatars/*
|
||||
!files/avatars/default.png
|
||||
|
||||
.yarn
|
@ -1,3 +1,5 @@
|
||||
npmScopes:
|
||||
navy.gif:
|
||||
npmRegistryServer: https://registry.corgi.wtf
|
||||
nodeLinker: node-modules
|
||||
|
||||
npmRegistryServer: "https://registry.corgi.wtf"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.5.1.cjs
|
||||
|
@ -5,7 +5,6 @@
|
||||
"main": "index.js",
|
||||
"author": "Navy.gif",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"url": "https://git.corgi.wtf/Navy.gif/webserver-framework",
|
||||
@ -13,8 +12,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordjs/collection": "^1.2.0",
|
||||
"@navy.gif/commandparser": "^1.4.3",
|
||||
"@navy.gif/logger": "^2.3.2",
|
||||
"@navy.gif/commandparser": "^1.4.5",
|
||||
"@navy.gif/logger": "^2.3.3",
|
||||
"@navy.gif/passport-discord": "^0.2.2-b",
|
||||
"@navy.gif/wrappers": "^1.3.9",
|
||||
"@types/cors": "^2.8.13",
|
||||
@ -60,5 +59,6 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@3.5.1"
|
||||
}
|
||||
|
@ -191,9 +191,11 @@ class Controller extends EventEmitter {
|
||||
|
||||
const { command, ...rest } = result;
|
||||
|
||||
if (rest.args.help)
|
||||
// return this.#_logger.info(`COMMAND HELP\n${command.help}`);
|
||||
return this.#_logger.info(`Command help unavailable at this time`);
|
||||
if (rest.args.help) {
|
||||
if (command.help)
|
||||
return command.help;
|
||||
return this.#_logger.info(`Help for ${command.name} unavailable at this time`);
|
||||
}
|
||||
|
||||
let response = null;
|
||||
try {
|
||||
|
@ -245,8 +245,10 @@ class Shard extends EventEmitter {
|
||||
if (this.#_awaitingShutdown)
|
||||
this.#_awaitingShutdown();
|
||||
|
||||
if (code !== 0)
|
||||
if (code !== 0) {
|
||||
this.#_crashes.push(Date.now() - this.spawnedAt);
|
||||
this.emit('warn', `Shard exited with non-zero exit code`);
|
||||
}
|
||||
|
||||
this.#_ready = false;
|
||||
this.#_process = null;
|
||||
|
@ -16,8 +16,7 @@ class RegisterEndpoint extends ApiEndpoint {
|
||||
|
||||
super(server, {
|
||||
name: 'register',
|
||||
path: '/register',
|
||||
auth: true
|
||||
path: '/register'
|
||||
});
|
||||
|
||||
this.methods = [
|
||||
|
@ -15,7 +15,7 @@ class ApiEndpoint extends Endpoint {
|
||||
path: `/api${opts.path}`
|
||||
});
|
||||
|
||||
// this._middleware.push(this.rateLimiter.throttle({ limit: 5, time: 5, path: this.path.replace(opts.path, ''), endpoint: this }));
|
||||
// this._middleware.push(this.rateLimiter.throttle({ limit: 5, time: 1, path: this.path.replace(opts.path, ''), endpoint: this }));
|
||||
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import { LoggerClient } from '@navy.gif/logger';
|
||||
import session from 'express-session';
|
||||
import passport from "passport";
|
||||
import MongoStore from "connect-mongo";
|
||||
import { AuthFunction, Request, Response } from "../../../@types/Server.js";
|
||||
import { MiddlewareFunction, Request, Response } from "../../../@types/Server.js";
|
||||
import { NextFunction } from "express";
|
||||
import { User } from "../structures/index.js";
|
||||
|
||||
@ -38,7 +38,7 @@ type OAuthParams = {
|
||||
*/
|
||||
class Authenticator {
|
||||
|
||||
[key: string]: AuthFunction | unknown
|
||||
[key: string]: MiddlewareFunction | unknown
|
||||
|
||||
#_userdb: UserDatabaseInterface;
|
||||
#_cookieName: string;
|
||||
|
Loading…
Reference in New Issue
Block a user