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