Skip to content
Extraits de code Groupes Projets
Valider a65bc623 rédigé par Christian Paul's avatar Christian Paul
Parcourir les fichiers

Import express types

parent 23bd8372
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -26,6 +26,7 @@ import * as usage from "command-line-usage";
import * as uuid from "uuid/v4";
import { IMatrixEvent } from "./matrixtypes";
import { MetricPeg, PrometheusBridgeMetrics } from "./metrics";
import { Response } from "express";
const log = new Log("DiscordAS");
......@@ -176,8 +177,12 @@ async function run() {
const roomhandler = discordbot.RoomHandler;
const eventProcessor = discordbot.MxEventProcessor;
// tslint:disable-next-line:no-any
appservice.expressAppInstance.get("/health", (_, res: any) => {
// 2020-12-07: If this fails to build in TypeScript with
// "Namespace 'serveStatic' has no exported member 'RequestHandlerConstructor'.",
// remove @types/express-serve-static-core and @types/serve-static from yarn.lock
// and run yarn.
// See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/49595
appservice.expressAppInstance.get("/health", (_, res: Response) => {
res.status(201).send("");
});
......
......@@ -278,9 +278,9 @@
"@types/node" "*"
"@types/express-serve-static-core@*":
version "4.17.13"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz#d9af025e925fc8b089be37423b8d1eac781be084"
integrity sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==
version "4.17.14"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.14.tgz#cabf91debeeb3cb04b798e2cff908864e89b6106"
integrity sha512-uFTLwu94TfUFMToXNgRZikwPuZdOtDgs3syBtAIr/OXorL1kJqUJT9qCLnRZ5KBOWfZQikQ2xKgR2tnDj1OgDA==
dependencies:
"@types/node" "*"
"@types/qs" "*"
......@@ -296,6 +296,16 @@
"@types/qs" "*"
"@types/serve-static" "*"
"@types/express@^4.17.9":
version "4.17.9"
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.9.tgz#f5f2df6add703ff28428add52bdec8a1091b0a78"
integrity sha512-SDzEIZInC4sivGIFY4Sz1GG6J9UObPwCInYJjko2jzOf/Imx/dlpume6Xxwj1ORL82tBbmN4cPDIDkLbWHk9hw==
dependencies:
"@types/body-parser" "*"
"@types/express-serve-static-core" "*"
"@types/qs" "*"
"@types/serve-static" "*"
"@types/http-cache-semantics@*":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a"
......@@ -374,9 +384,9 @@
"@types/node" "*"
"@types/serve-static@*":
version "1.13.6"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.6.tgz#866b1b8dec41c36e28c7be40ac725b88be43c5c1"
integrity sha512-nuRJmv7jW7VmCVTn+IgYDkkbbDGyIINOeu/G0d74X3lm6E5KfMeQPJhxIt1ayQeQB3cSxvYs1RA/wipYoFB4EA==
version "1.13.8"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.8.tgz#851129d434433c7082148574ffec263d58309c46"
integrity sha512-MoJhSQreaVoL+/hurAZzIm8wafFR6ajiTM1m4A0kv6AGeVBl4r4pOV8bGFrjjq1sGxDTnCoF8i22o0/aE5XCyA==
dependencies:
"@types/mime" "*"
"@types/node" "*"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter