Skip to content

Commit

Permalink
chore(dependencies): Update all non-breaking dependencies and fix Typ…
Browse files Browse the repository at this point in the history
…eScript usage (feathersjs#1962)
  • Loading branch information
daffl authored May 18, 2020
1 parent a50afa1 commit e6fca56
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@feathersjs/express": "^4.5.4",
"@feathersjs/feathers": "^4.5.3",
"debug": "^4.1.1",
"express-session": "^1.17.0",
"express-session": "^1.17.1",
"grant": "^4.7.0",
"grant-profile": "^0.0.11",
"lodash": "^4.17.15"
Expand All @@ -57,14 +57,14 @@
"@types/debug": "^4.1.5",
"@types/express": "^4.17.6",
"@types/express-session": "^1.17.0",
"@types/lodash": "^4.14.149",
"@types/lodash": "^4.14.151",
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.1",
"@types/node": "^14.0.1",
"axios": "^0.19.2",
"mocha": "^7.1.1",
"mocha": "^7.1.2",
"shx": "^0.3.2",
"ts-node": "^8.8.2",
"typescript": "^3.8.3"
"ts-node": "^8.10.1",
"typescript": "^3.9.2"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
}
15 changes: 6 additions & 9 deletions test/fixture.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import feathers, { Params } from '@feathersjs/feathers';
import express, { rest, errorHandler } from '@feathersjs/express';
import express from '@feathersjs/express';
import memory from 'feathers-memory';
import { AuthenticationService, JWTStrategy, AuthenticationRequest } from '@feathersjs/authentication';
import { express as oauth, OAuthStrategy } from '../src';

// @ts-ignore
import memory from 'feathers-memory';

export class TestOAuthStrategy extends OAuthStrategy {
async getProfile (data: AuthenticationRequest, _params: Params) {
if (!data.id) {
Expand All @@ -27,14 +25,15 @@ export class TestOAuthStrategy extends OAuthStrategy {
}
}

export const app = express(feathers());

const port = 3000;
const app = express(feathers());
const auth = new AuthenticationService(app);

auth.register('jwt', new JWTStrategy());
auth.register('test', new TestOAuthStrategy());

app.configure(rest());
app.configure(express.rest());
app.set('host', '127.0.0.1');
app.set('port', port);
app.set('authentication', {
Expand Down Expand Up @@ -65,6 +64,4 @@ app.use('/authentication', auth);
app.use('/users', memory());

app.configure(oauth());
app.use(errorHandler({ logger: null }));

export { app };
app.use(express.errorHandler({ logger: null }));

0 comments on commit e6fca56

Please sign in to comment.