@feathersjs/transport-commons
Advanced tools
Comparing version 5.0.0-pre.30 to 5.0.0-pre.31
@@ -6,2 +6,8 @@ # Change Log | ||
# [5.0.0-pre.31](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.30...v5.0.0-pre.31) (2022-10-12) | ||
### Features | ||
- **cli:** Generate full client test suite and improve typed client ([#2788](https://github.com/feathersjs/feathers/issues/2788)) ([57119b6](https://github.com/feathersjs/feathers/commit/57119b6bb2797f7297cf054268a248c093ecd538)) | ||
# [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07) | ||
@@ -8,0 +14,0 @@ |
@@ -33,16 +33,10 @@ "use strict"; | ||
} | ||
const { unuse } = app; | ||
app.routes = new router_1.Router(); | ||
app.lookup = lookup; | ||
// This mixin allows us to unregister a service. It needs to run | ||
// first so that `teardown` hooks still get registered properly | ||
app.mixins.unshift((service) => { | ||
const { teardown } = service; | ||
service.teardown = async function (app, path) { | ||
if (typeof teardown === 'function') { | ||
await teardown.call(this, app, path); | ||
} | ||
app.routes.remove(path); | ||
app.routes.remove(`${path}/:__id`); | ||
}; | ||
}); | ||
app.unuse = function (path) { | ||
app.routes.remove(path); | ||
app.routes.remove(`${path}/:__id`); | ||
return unuse.call(this, path); | ||
}; | ||
// Add a mixin that registers a service on the router | ||
@@ -49,0 +43,0 @@ app.mixins.push((service, path, options) => { |
{ | ||
"name": "@feathersjs/transport-commons", | ||
"description": "Shared functionality for websocket providers", | ||
"version": "5.0.0-pre.30", | ||
"version": "5.0.0-pre.31", | ||
"homepage": "https://feathersjs.com", | ||
@@ -57,5 +57,5 @@ "main": "lib/", | ||
"dependencies": { | ||
"@feathersjs/commons": "^5.0.0-pre.30", | ||
"@feathersjs/errors": "^5.0.0-pre.30", | ||
"@feathersjs/feathers": "^5.0.0-pre.30", | ||
"@feathersjs/commons": "^5.0.0-pre.31", | ||
"@feathersjs/errors": "^5.0.0-pre.31", | ||
"@feathersjs/feathers": "^5.0.0-pre.31", | ||
"encodeurl": "^1.0.2", | ||
@@ -74,3 +74,3 @@ "lodash": "^4.17.21" | ||
}, | ||
"gitHead": "b535c91197f4b997520e0a0e608793eeba791931" | ||
"gitHead": "4500dbeb8cea566678cf88b3313a88efd93a2ed9" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Application, FeathersService, Service, ServiceOptions } from '@feathersjs/feathers' | ||
import { Application, FeathersService, ServiceOptions } from '@feathersjs/feathers' | ||
import { Router } from './router' | ||
@@ -45,19 +45,12 @@ | ||
const { unuse } = app | ||
app.routes = new Router() | ||
app.lookup = lookup | ||
app.unuse = function (path: string) { | ||
app.routes.remove(path) | ||
app.routes.remove(`${path}/:__id`) | ||
return unuse.call(this, path) | ||
} | ||
// This mixin allows us to unregister a service. It needs to run | ||
// first so that `teardown` hooks still get registered properly | ||
app.mixins.unshift((service: Service) => { | ||
const { teardown } = service | ||
service.teardown = async function (app: Application, path: string) { | ||
if (typeof teardown === 'function') { | ||
await teardown.call(this, app, path) | ||
} | ||
app.routes.remove(path) | ||
app.routes.remove(`${path}/:__id`) | ||
} | ||
}) | ||
// Add a mixin that registers a service on the router | ||
@@ -64,0 +57,0 @@ app.mixins.push((service: FeathersService, path: string, options: ServiceOptions) => { |
Sorry, the diff of this file is not supported yet
135973
1743