Update typing modules

This commit is contained in:
2026-03-25 20:14:26 +01:00
parent 331b0ef114
commit 3ad16d8f32
10 changed files with 414 additions and 464 deletions
+364 -424
View File
File diff suppressed because it is too large Load Diff
+32 -32
View File
@@ -70,40 +70,41 @@
"@ngtools/webpack": "^18.0.0",
"@passport-next/passport-facebook": "^3.1.2",
"@passport-next/passport-google-oauth2": "^1.0.0",
"@types/base64-js": "^1.2.5",
"@types/bluebird": "^3.5.27",
"@types/body-parser": "^1.17.1",
"@types/chai": "^4.2.0",
"@types/chai-as-promised": "^7.1.2",
"@types/cookie-parser": "^1.4.2",
"@types/del": "^4.0.0",
"@types/express": "^4.17.1",
"@types/express-brute": "0.0.37",
"@types/express-session": "^1.15.14",
"@types/file-saver": "^2.0.1",
"@types/fs-extra": "^8.0.0",
"@types/base64-js": "^1.5.0",
"@types/bluebird": "^3.5.42",
"@types/body-parser": "^1.19.6",
"@types/chai": "^5.2.3",
"@types/chai-as-promised": "^8.0.2",
"@types/cookie-parser": "^1.4.10",
"@types/del": "^4.0.3",
"@types/express": "^5.0.6",
"@types/express-brute": "^1.0.6",
"@types/express-session": "^1.18.2",
"@types/file-saver": "^2.0.7",
"@types/fs-extra": "^11.0.4",
"@types/gl-matrix": "^2.4.5",
"@types/glob": "^7.1.1",
"@types/google.analytics": "0.0.40",
"@types/howler": "^2.1.1",
"@types/lodash": "^4.14.138",
"@types/mocha": "^5.2.7",
"@types/glob": "^8.1.0",
"@types/google.analytics": "^0.0.46",
"@types/howler": "^2.2.12",
"@types/lodash": "^4.17.24",
"@types/mocha": "^10.0.10",
"@types/mongodb": "^3.3.1",
"@types/mongoose": "^5.5.15",
"@types/morgan": "^1.7.37",
"@types/node": "^12.7.2",
"@types/passport": "^1.0.1",
"@types/passport-discord": "^0.1.3",
"@types/passport-local": "^1.0.33",
"@types/pug": "^2.0.4",
"@types/request": "^2.48.2",
"@types/request-promise": "^4.1.44",
"@types/serve-favicon": "^2.2.31",
"@types/sinon": "^7.0.13",
"@types/ua-parser-js": "^0.7.33",
"@types/uws": "^0.13.2",
"@types/webgl2": "0.0.5",
"@types/yargs": "^13.0.2",
"@types/morgan": "^1.9.10",
"@types/node": "^25.5.0",
"@types/node-ipc": "^9.2.3",
"@types/passport": "^1.0.17",
"@types/passport-discord": "^0.1.15",
"@types/passport-local": "^1.0.38",
"@types/pug": "^2.0.10",
"@types/request": "^2.48.13",
"@types/request-promise": "^4.1.51",
"@types/serve-favicon": "^2.5.7",
"@types/sinon": "^21.0.0",
"@types/ua-parser-js": "^0.7.39",
"@types/uws": "^0.13.7",
"@types/webgl2": "^0.0.12",
"@types/yargs": "^13.0.12",
"@typescript-eslint/eslint-plugin": "^8.57.1",
"@typescript-eslint/parser": "^8.57.1",
"ag-psd": "^6.2.0",
@@ -167,7 +168,6 @@
"mongoose": "^5.6.11",
"morgan": "^1.9.1",
"ngx-bootstrap": "^18.0.1",
"parallel-webpack": "^2.4.0",
"passport": "^0.4.0",
"passport-deviantart": "0.0.5",
"passport-discord": "^0.1.3",
+4 -2
View File
@@ -12,6 +12,8 @@ if (document.body.getAttribute('data-debug') !== 'true' || localStorage.producti
enableProdMode();
}
if (typeof module !== 'undefined' && module.hot) {
module.hot.accept();
if (typeof module !== 'undefined' && (module as any).hot) {
(module as any).hot.accept();
}
@@ -29,6 +29,7 @@ import { emptyTag, getAvailableTags } from '../../../common/tags';
import { ButtMarkEditorState } from '../../shared/butt-mark-editor/butt-mark-editor';
import { parseColorWithAlpha } from '../../../common/color';
import { loadAndInitSpriteSheets } from '../../../client/loadSprites';
import { saveAs } from 'file-saver';
const frontHoofTitles = ['', 'Fetlocks', 'Paws', 'Claws', ''];
const backHoofTitles = ['', 'Fetlocks', 'Paws', '', ''];
@@ -16,6 +16,7 @@ import { createEyeSprite } from '../../../common/spriteUtils';
import { times, hasFlag } from '../../../common/utils';
import { PonyTownGame } from '../../../client/game';
import { getEntityNames } from '../../services/model';
import { saveAs } from 'file-saver';
function eyeSprite(e: PonyEye | undefined) {
return createEyeSprite(e, 0, sprites.defaultPalette);
@@ -10,6 +10,7 @@ import { cloneDeep } from '../../../common/utils';
import { PonyTownGame } from '../../../client/game';
import { updateRangeIndicator, readFileAsText } from '../../../client/clientUtils';
import { faSlidersH, faCommentSlash, faGamepad, faImage, faDownload, faUpload, faComment } from '../../../client/icons';
import { saveAs } from 'file-saver';
@Component({
selector: 'settings-modal',
+1 -1
View File
@@ -24,7 +24,7 @@ export default function (server: ServerConfig, settings: Settings, world: World
handleJSON(server, req, res, createGetAccountCharacters(findAllCharacters)(req.user as IAccount));
});
app.get('/animation/:id', offline, (req, res) => {
app.get<{ id: string }>('/animation/:id', offline, (req, res) => {
const filePath = path.join(paths.store, req.params.id);
res.sendFile(filePath);
+7 -2
View File
@@ -288,9 +288,14 @@ export function authRoutes(
});
});
app.post('/sign-out', wrap(server, req => {
app.post('/sign-out', wrap(server, async req => {
kickCurrentUser(req);
req.logout();
await new Promise<void>(resolve => req.logout(error => {
if (error) {
logger.error(error);
}
resolve();
}));
return { success: true };
}));
+2 -2
View File
@@ -162,8 +162,8 @@ app.use(bodyParser.urlencoded({ extended: true, limit }));
app.use(require('cookie-parser')());
if (args.login || args.admin) {
passport.serializeUser<IAccount, string>((account, done) => done(null, account._id.toString()));
passport.deserializeUser<IAccount | false, string>((id, done) =>
passport.serializeUser<string>((account, done) => done(null, (account as IAccount)._id.toString()));
passport.deserializeUser<string>((id, done) =>
Account.findById(id, (err, a) => done(err, a && !isBanned(a) ? a : false)));
}
+1 -1
View File
@@ -81,7 +81,7 @@ export function execAsync(command: string, options?: ExecOptions) {
if (error) {
reject(error);
} else {
resolve({ stdout, stderr });
resolve({ stdout: stdout.toString(), stderr: stderr.toString() });
}
});
});