Fixes from express-service-static-core cleanup (#35704)

CI missed some dependencies.

Also update opossum's project url.
This commit is contained in:
Nathan Shively-Sanders 2019-05-24 08:28:54 -07:00 committed by GitHub
parent cdc4f7e325
commit 01f1505046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 10 deletions

View File

@ -45,7 +45,7 @@ interface Exphbs {
}
interface ExpressHandlebars {
(options?: ExphbsOptions): Function;
(options?: ExphbsOptions): (...args: any[]) => any;
create (options?: ExphbsOptions): Exphbs;
}

View File

@ -105,10 +105,8 @@ const greeting = i18n.__('Hello');
* https://github.com/mashpie/i18n-node#example-usage-in-expressjs
*/
// Configuration
app.configure(() => {
// default: using 'accept-language' header to guess language settings
app.use(i18n.init);
});
// default: using 'accept-language' header to guess language settings
app.use(i18n.init);
app.get('/de', (_req: Express.Request, res: Express.Response) => {
const greeting = res.__('Hello');

View File

@ -1,5 +1,5 @@
// Type definitions for opossum 1.10
// Project: https://github.com/nodeshift/opossum
// Project: https://github.com/nodeshift/opossum, https://nodeshift.dev/opossum
// Definitions by: Quinn Langille <https://github.com/quinnlangille>
// Willy Zhang <https://github.com/merufm>
// Lance Ball <https://github.com/lance>

View File

@ -67,10 +67,8 @@ passport.use(new TestStrategy())
.framework(newFramework);
const app = express();
app.configure(() => {
app.use(passport.initialize());
app.use(passport.session());
});
app.use(passport.initialize());
app.use(passport.session());
app.post('/login',
passport.authenticate('local', { failureRedirect: '/login', failureFlash: true }),