diff --git a/package-lock.json b/package-lock.json index fdd98c5335..eca9f95f96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5008,9 +5008,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -5515,9 +5515,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -6561,9 +6561,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -7236,9 +7236,9 @@ } }, "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { "p-try": "^2.0.0" diff --git a/packages/adapter-commons/package.json b/packages/adapter-commons/package.json index 1c8ee2366f..520dbcb5ed 100644 --- a/packages/adapter-commons/package.json +++ b/packages/adapter-commons/package.json @@ -43,8 +43,8 @@ }, "devDependencies": { "@types/mocha": "^5.2.7", - "@types/mongodb": "^3.2.2", - "@types/node": "^12.7.1", + "@types/mongodb": "^3.2.3", + "@types/node": "^12.7.2", "mocha": "^6.2.0", "mongodb": "^3.3.0", "shx": "^0.3.2", diff --git a/packages/authentication-client/package.json b/packages/authentication-client/package.json index b1c075831c..c5be3a87cd 100644 --- a/packages/authentication-client/package.json +++ b/packages/authentication-client/package.json @@ -55,7 +55,7 @@ "@feathersjs/socketio-client": "^4.3.0-pre.2", "@types/debug": "^4.1.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "axios": "^0.19.0", "mocha": "^6.2.0", "shx": "^0.3.2", diff --git a/packages/authentication-local/package.json b/packages/authentication-local/package.json index 6bce17f485..b2e8d7d8ab 100644 --- a/packages/authentication-local/package.json +++ b/packages/authentication-local/package.json @@ -49,9 +49,9 @@ "@feathersjs/feathers": "^4.3.0-pre.2", "@types/bcryptjs": "^2.4.2", "@types/debug": "^4.1.5", - "@types/lodash": "^4.14.136", + "@types/lodash": "^4.14.137", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "mocha": "^6.2.0", "shx": "^0.3.2", "ts-node": "^8.3.0", diff --git a/packages/authentication-oauth/package.json b/packages/authentication-oauth/package.json index bc4c58144b..aaf83a9b82 100644 --- a/packages/authentication-oauth/package.json +++ b/packages/authentication-oauth/package.json @@ -51,11 +51,11 @@ "devDependencies": { "@feathersjs/feathers": "^4.3.0-pre.2", "@types/debug": "^4.1.5", - "@types/express": "^4.17.0", - "@types/express-session": "^1.15.13", - "@types/lodash": "^4.14.136", + "@types/express": "^4.17.1", + "@types/express-session": "^1.15.14", + "@types/lodash": "^4.14.137", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "axios": "^0.19.0", "mocha": "^6.2.0", "shx": "^0.3.2", diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 9b96157cc2..e7137169ea 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -40,6 +40,7 @@ }, "dependencies": { "@feathersjs/errors": "^4.3.0-pre.2", + "@feathersjs/transport-commons": "^4.3.0-pre.2", "debug": "^4.1.1", "jsonwebtoken": "^8.5.1", "lodash": "^4.17.15", @@ -49,9 +50,9 @@ "@feathersjs/feathers": "^4.3.0-pre.2", "@types/debug": "^4.1.5", "@types/jsonwebtoken": "^8.3.3", - "@types/lodash": "^4.14.136", + "@types/lodash": "^4.14.137", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "@types/uuid": "^3.4.5", "feathers-memory": "^4.0.0", "mocha": "^6.2.0", diff --git a/packages/authentication/src/service.ts b/packages/authentication/src/service.ts index 807e3e76c1..4f5b57a6d1 100644 --- a/packages/authentication/src/service.ts +++ b/packages/authentication/src/service.ts @@ -3,7 +3,8 @@ import { merge, get } from 'lodash'; import { NotAuthenticated } from '@feathersjs/errors'; import { AuthenticationBase, AuthenticationResult, AuthenticationRequest } from './core'; import { connection, event } from './hooks'; -import { Application, Params, ServiceMethods } from '@feathersjs/feathers'; +import '@feathersjs/transport-commons'; +import { Application, Params, ServiceMethods, ServiceAddons } from '@feathersjs/feathers'; const debug = Debug('@feathersjs/authentication/service'); @@ -134,6 +135,7 @@ export class AuthenticationService extends AuthenticationBase implements Partial // The setup method checks for valid settings and registers the // connection and event (login, logout) hooks const { secret, service, entity, entityId } = this.configuration; + const self = this as unknown as ServiceAddons; if (typeof secret !== 'string') { throw new Error(`A 'secret' must be provided in your authentication configuration`); @@ -153,12 +155,15 @@ export class AuthenticationService extends AuthenticationBase implements Partial } } - // @ts-ignore - this.hooks({ + self.hooks({ after: { create: [ connection('login'), event('login') ], remove: [ connection('logout'), event('logout') ] } }); + + if (typeof self.publish !== 'function') { + self.publish(() => null); + } } } diff --git a/packages/commons/package.json b/packages/commons/package.json index b3a1267da1..5305dd7f8e 100644 --- a/packages/commons/package.json +++ b/packages/commons/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@types/chai": "^4.2.0", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "chai": "^4.2.0", "mocha": "^6.2.0", "shx": "^0.3.2", diff --git a/packages/configuration/package.json b/packages/configuration/package.json index 268b669c93..1359a2d136 100644 --- a/packages/configuration/package.json +++ b/packages/configuration/package.json @@ -52,7 +52,7 @@ "@types/config": "^0.0.34", "@types/debug": "^4.1.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "mocha": "^6.2.0", "shx": "^0.3.2", "ts-node": "^8.3.0", diff --git a/packages/express/package.json b/packages/express/package.json index ab30c61381..af655f7ae3 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -38,7 +38,7 @@ "dependencies": { "@feathersjs/commons": "^4.3.0-pre.2", "@feathersjs/errors": "^4.3.0-pre.2", - "@types/express": "^4.17.0", + "@types/express": "^4.17.1", "debug": "^4.1.1", "express": "^4.17.1", "lodash": "^4.17.15", diff --git a/packages/rest-client/package.json b/packages/rest-client/package.json index d1dd4307b2..14f91df5a6 100644 --- a/packages/rest-client/package.json +++ b/packages/rest-client/package.json @@ -38,7 +38,7 @@ "dependencies": { "@feathersjs/commons": "^4.3.0-pre.2", "@feathersjs/errors": "^4.3.0-pre.2", - "qs": "^6.7.0" + "qs": "^6.8.0" }, "devDependencies": { "@angular/common": "^8.2.2", diff --git a/packages/tests/package.json b/packages/tests/package.json index 6d8194a736..c879a2d506 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -45,9 +45,9 @@ "@feathersjs/feathers": "^4.3.0-pre.2", "@types/axios": "^0.14.0", "@types/debug": "^4.1.5", - "@types/lodash": "^4.14.136", + "@types/lodash": "^4.14.137", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "mocha": "^6.2.0", "shx": "^0.3.2", "ts-node": "^8.3.0", diff --git a/packages/transport-commons/package.json b/packages/transport-commons/package.json index b5c2ab328c..3b59f063f3 100644 --- a/packages/transport-commons/package.json +++ b/packages/transport-commons/package.json @@ -49,7 +49,7 @@ "@feathersjs/feathers": "^4.3.0-pre.2", "@types/debug": "^4.1.5", "@types/mocha": "^5.2.7", - "@types/node": "^12.7.1", + "@types/node": "^12.7.2", "mocha": "^6.2.0", "shx": "^0.3.2", "ts-node": "^8.3.0",