@feathersjs/transport-commons 5.0.0-pre.30 → 5.0.0-pre.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-pre.31](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.30...v5.0.0-pre.31) (2022-10-12)
7
+
8
+ ### Features
9
+
10
+ - **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))
11
+
6
12
  # [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07)
7
13
 
8
14
  ### Features
@@ -30,20 +30,14 @@ const routing = () => (app) => {
30
30
  if (typeof app.lookup === 'function') {
31
31
  return;
32
32
  }
33
+ const { unuse } = app;
33
34
  app.routes = new router_1.Router();
34
35
  app.lookup = lookup;
35
- // This mixin allows us to unregister a service. It needs to run
36
- // first so that `teardown` hooks still get registered properly
37
- app.mixins.unshift((service) => {
38
- const { teardown } = service;
39
- service.teardown = async function (app, path) {
40
- if (typeof teardown === 'function') {
41
- await teardown.call(this, app, path);
42
- }
43
- app.routes.remove(path);
44
- app.routes.remove(`${path}/:__id`);
45
- };
46
- });
36
+ app.unuse = function (path) {
37
+ app.routes.remove(path);
38
+ app.routes.remove(`${path}/:__id`);
39
+ return unuse.call(this, path);
40
+ };
47
41
  // Add a mixin that registers a service on the router
48
42
  app.mixins.push((service, path, options) => {
49
43
  const { routeParams: params = {} } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/routing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,qCAAiC;AAmBjC,2CAAwB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AAK,EAAE,GAAG,GAAG,CAAA;IAErB,GAAG,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAA;IACzB,GAAG,CAAC,MAAM,GAAG,MAAM,CAAA;IACnB,GAAG,CAAC,KAAK,GAAG,UAAU,IAAY;QAChC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACvB,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,QAAQ,CAAC,CAAA;QAClC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC/B,CAAC,CAAA;IAED,qDAAqD;IACrD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAwB,EAAE,IAAY,EAAE,OAAuB,EAAE,EAAE;QAClF,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,OAAO,CAAA;QAE5C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;QAC5C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,QAAQ,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAA;IACzD,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAtBY,QAAA,OAAO,WAsBnB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@feathersjs/transport-commons",
3
3
  "description": "Shared functionality for websocket providers",
4
- "version": "5.0.0-pre.30",
4
+ "version": "5.0.0-pre.31",
5
5
  "homepage": "https://feathersjs.com",
6
6
  "main": "lib/",
7
7
  "types": "lib/",
@@ -54,9 +54,9 @@
54
54
  "*.js"
55
55
  ],
56
56
  "dependencies": {
57
- "@feathersjs/commons": "^5.0.0-pre.30",
58
- "@feathersjs/errors": "^5.0.0-pre.30",
59
- "@feathersjs/feathers": "^5.0.0-pre.30",
57
+ "@feathersjs/commons": "^5.0.0-pre.31",
58
+ "@feathersjs/errors": "^5.0.0-pre.31",
59
+ "@feathersjs/feathers": "^5.0.0-pre.31",
60
60
  "encodeurl": "^1.0.2",
61
61
  "lodash": "^4.17.21"
62
62
  },
@@ -70,5 +70,5 @@
70
70
  "ts-node": "^10.9.1",
71
71
  "typescript": "^4.8.4"
72
72
  },
73
- "gitHead": "b535c91197f4b997520e0a0e608793eeba791931"
73
+ "gitHead": "4500dbeb8cea566678cf88b3313a88efd93a2ed9"
74
74
  }
@@ -1,4 +1,4 @@
1
- import { Application, FeathersService, Service, ServiceOptions } from '@feathersjs/feathers'
1
+ import { Application, FeathersService, ServiceOptions } from '@feathersjs/feathers'
2
2
  import { Router } from './router'
3
3
 
4
4
  declare module '@feathersjs/feathers/lib/declarations' {
@@ -42,22 +42,15 @@ export const routing = () => (app: Application) => {
42
42
  return
43
43
  }
44
44
 
45
+ const { unuse } = app
46
+
45
47
  app.routes = new Router()
46
48
  app.lookup = lookup
47
-
48
- // This mixin allows us to unregister a service. It needs to run
49
- // first so that `teardown` hooks still get registered properly
50
- app.mixins.unshift((service: Service) => {
51
- const { teardown } = service
52
-
53
- service.teardown = async function (app: Application, path: string) {
54
- if (typeof teardown === 'function') {
55
- await teardown.call(this, app, path)
56
- }
57
- app.routes.remove(path)
58
- app.routes.remove(`${path}/:__id`)
59
- }
60
- })
49
+ app.unuse = function (path: string) {
50
+ app.routes.remove(path)
51
+ app.routes.remove(`${path}/:__id`)
52
+ return unuse.call(this, path)
53
+ }
61
54
 
62
55
  // Add a mixin that registers a service on the router
63
56
  app.mixins.push((service: FeathersService, path: string, options: ServiceOptions) => {