@feathersjs/transport-commons 5.0.39 → 6.0.0-pre.0

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/LICENSE +1 -2
  3. package/README.md +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.js +1 -1
  6. package/lib/client.d.ts +1 -1
  7. package/lib/client.js +6 -10
  8. package/lib/client.js.map +1 -1
  9. package/lib/index.d.ts +3 -6
  10. package/lib/index.js +3 -45
  11. package/lib/index.js.map +1 -1
  12. package/lib/socket/index.d.ts +1 -1
  13. package/lib/socket/index.js +6 -13
  14. package/lib/socket/index.js.map +1 -1
  15. package/lib/socket/utils.d.ts +2 -2
  16. package/lib/socket/utils.js +17 -26
  17. package/lib/socket/utils.js.map +1 -1
  18. package/package.json +9 -9
  19. package/src/client.ts +1 -2
  20. package/src/index.ts +3 -7
  21. package/src/socket/index.ts +3 -7
  22. package/src/socket/utils.ts +3 -9
  23. package/lib/channels/channel/base.d.ts +0 -12
  24. package/lib/channels/channel/base.js +0 -48
  25. package/lib/channels/channel/base.js.map +0 -1
  26. package/lib/channels/channel/combined.d.ts +0 -15
  27. package/lib/channels/channel/combined.js +0 -45
  28. package/lib/channels/channel/combined.js.map +0 -1
  29. package/lib/channels/index.d.ts +0 -28
  30. package/lib/channels/index.js +0 -86
  31. package/lib/channels/index.js.map +0 -1
  32. package/lib/channels/mixins.d.ts +0 -29
  33. package/lib/channels/mixins.js +0 -72
  34. package/lib/channels/mixins.js.map +0 -1
  35. package/lib/http.d.ts +0 -35
  36. package/lib/http.js +0 -77
  37. package/lib/http.js.map +0 -1
  38. package/lib/routing/index.d.ts +0 -21
  39. package/lib/routing/index.js +0 -49
  40. package/lib/routing/index.js.map +0 -1
  41. package/lib/routing/router.d.ts +0 -31
  42. package/lib/routing/router.js +0 -114
  43. package/lib/routing/router.js.map +0 -1
  44. package/src/channels/channel/base.ts +0 -58
  45. package/src/channels/channel/combined.ts +0 -57
  46. package/src/channels/index.ts +0 -120
  47. package/src/channels/mixins.ts +0 -108
  48. package/src/http.ts +0 -95
  49. package/src/routing/index.ts +0 -62
  50. package/src/routing/router.ts +0 -148
package/CHANGELOG.md CHANGED
@@ -3,6 +3,92 @@
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
+ # 6.0.0-pre.0 (2026-01-31)
7
+
8
+ ### Bug Fixes
9
+
10
+ - Add fallback for legacy socket authenticate event ([#1356](https://github.com/feathersjs/feathers/issues/1356)) ([61b1056](https://github.com/feathersjs/feathers/commit/61b1056c09b9fe86386ade8eb7650a291f5fe5cf))
11
+ - Add getEntityId to JWT strategy and fix legacy Socket authentication ([#1488](https://github.com/feathersjs/feathers/issues/1488)) ([9a3b324](https://github.com/feathersjs/feathers/commit/9a3b32482b94bd1e455d62902eaa5e07ad1542db))
12
+ - Add registerPublisher alias for .publish ([#1302](https://github.com/feathersjs/feathers/issues/1302)) ([98fe8f8](https://github.com/feathersjs/feathers/commit/98fe8f89b1b7789f2e1414359234956ef9c0856f))
13
+ - Clean up hooks code ([#1407](https://github.com/feathersjs/feathers/issues/1407)) ([f25c88b](https://github.com/feathersjs/feathers/commit/f25c88bb86459989112d95f0eb4d3b2028b0bb56))
14
+ - **client:** Add underscored methods to clients ([#3176](https://github.com/feathersjs/feathers/issues/3176)) ([f3c01f7](https://github.com/feathersjs/feathers/commit/f3c01f7b8266bfc642c55b77ba8e5bb333542630))
15
+ - **client:** Replace placeholders in URL with route params ([#3270](https://github.com/feathersjs/feathers/issues/3270)) ([a0624eb](https://github.com/feathersjs/feathers/commit/a0624eb5a7919aa1b179a71beb1c1b9cab574525))
16
+ - **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
17
+ - Compare socket event data using lodash's isEqual instead of indexOf ([#1061](https://github.com/feathersjs/feathers/issues/1061)) ([f706db3](https://github.com/feathersjs/feathers/commit/f706db3cf4cab67391aaa40fff4b6165597d814f))
18
+ - **core:** Improve service option usage and method option typings ([#2902](https://github.com/feathersjs/feathers/issues/2902)) ([164d75c](https://github.com/feathersjs/feathers/commit/164d75c0f11139a316baa91f1762de8f8eb7da2d))
19
+ - **core:** Update to latest feathersjs/hooks ([#3434](https://github.com/feathersjs/feathers/issues/3434)) ([1499ccc](https://github.com/feathersjs/feathers/commit/1499ccc41fb3ebba97b2c84e0cb19bc48ad3c651))
20
+ - **core:** Use Symbol.for to instantiate shared symbols ([#3087](https://github.com/feathersjs/feathers/issues/3087)) ([7f3fc21](https://github.com/feathersjs/feathers/commit/7f3fc2167576f228f8183568eb52b077160e8d65))
21
+ - **dependencies:** Lock monorepo package version numbers ([#2623](https://github.com/feathersjs/feathers/issues/2623)) ([5640c10](https://github.com/feathersjs/feathers/commit/5640c1020cc139994e695d658c08bad3494db507))
22
+ - **dependencies:** Update all dependencies ([#3139](https://github.com/feathersjs/feathers/issues/3139)) ([f24276e](https://github.com/feathersjs/feathers/commit/f24276e9a909e2e58a0730c730258ce1f70f4028))
23
+ - **dependencies:** Update all dependencies ([#3545](https://github.com/feathersjs/feathers/issues/3545)) ([221b92b](https://github.com/feathersjs/feathers/commit/221b92bb0ee5d54fb1036742968797cb02e56da2))
24
+ - **dependencies:** Update all dependencies ([#3625](https://github.com/feathersjs/feathers/issues/3625)) ([2698e4e](https://github.com/feathersjs/feathers/commit/2698e4e2996fbf479d82435938d907bc3d5b583a))
25
+ - **dependencies:** Update dependencies ([#3571](https://github.com/feathersjs/feathers/issues/3571)) ([ad611cb](https://github.com/feathersjs/feathers/commit/ad611cb6ffb1dc31d603ba5817331318c5a23217))
26
+ - **docs:** Review transport API docs and update Express middleware setup ([#2811](https://github.com/feathersjs/feathers/issues/2811)) ([1b97f14](https://github.com/feathersjs/feathers/commit/1b97f14d474f5613482f259eeaa585c24fcfab43))
27
+ - Expire and remove authenticated real-time connections ([#1512](https://github.com/feathersjs/feathers/issues/1512)) ([2707c33](https://github.com/feathersjs/feathers/commit/2707c3331721be6a4a0a943b0fbc118379a1ad2a))
28
+ - Fix regression in transport commons ([#1551](https://github.com/feathersjs/feathers/issues/1551)) ([ed9e934](https://github.com/feathersjs/feathers/commit/ed9e9340c0e3a5cd17fcd4af17ab451de630d70d))
29
+ - Gracefully handle errors in publishers ([#1710](https://github.com/feathersjs/feathers/issues/1710)) ([0616306](https://github.com/feathersjs/feathers/commit/061630696762e9dbf1dc4e738094992ba16989fc))
30
+ - Improve Params typing ([#1474](https://github.com/feathersjs/feathers/issues/1474)) ([54a3aa7](https://github.com/feathersjs/feathers/commit/54a3aa75424fd6a5a958449fc20b4a4b94e2963a))
31
+ - Improve transport-commons types ([#1396](https://github.com/feathersjs/feathers/issues/1396)) ([f9d8536](https://github.com/feathersjs/feathers/commit/f9d8536c400caba355ccc8a2cdf171dcd9cff555))
32
+ - **knex:** Update all dependencies and Knex peer ([#3308](https://github.com/feathersjs/feathers/issues/3308)) ([d2f9860](https://github.com/feathersjs/feathers/commit/d2f986036c4741cce2339d8abbcc6b2eb037a12a))
33
+ - **koa:** Use extended query parser for compatibility ([#2397](https://github.com/feathersjs/feathers/issues/2397)) ([b2944ba](https://github.com/feathersjs/feathers/commit/b2944bac3ec6d5ecc80dc518cd4e58093692db74))
34
+ - Make Mocha a proper devDependency for every repository ([#1053](https://github.com/feathersjs/feathers/issues/1053)) ([9974803](https://github.com/feathersjs/feathers/commit/99748032a6571a792883be31ec955a749629d0da))
35
+ - Make oAuth paths more consistent and improve authentication client ([#1377](https://github.com/feathersjs/feathers/issues/1377)) ([adb2543](https://github.com/feathersjs/feathers/commit/adb254354a5dc2c0813e341fbb3f9b3bb8124a0e))
36
+ - **package:** update debug to version 3.0.0 ([#45](https://github.com/feathersjs/feathers/issues/45)) ([9b9bde5](https://github.com/feathersjs/feathers/commit/9b9bde5888040530d07bd4fc1040124e4e05079f))
37
+ - Reduce usage of lodash ([#3455](https://github.com/feathersjs/feathers/issues/3455)) ([8ce807a](https://github.com/feathersjs/feathers/commit/8ce807a5ca53ff5b8d5107a0656c6329404e6e6c))
38
+ - **socketio-client:** Fix client transport-commons reference ([#2164](https://github.com/feathersjs/feathers/issues/2164)) ([3a42c54](https://github.com/feathersjs/feathers/commit/3a42c544058456b19c7e21827226541bfa6ad621))
39
+ - **socketio-client:** Make Socket.io client event target compatible ([#2686](https://github.com/feathersjs/feathers/issues/2686)) ([716c49a](https://github.com/feathersjs/feathers/commit/716c49a270e4be5e5276192092c292f72ffcfa19))
40
+ - **socketio-client:** Throw an error and show a warning if someone tries to use socket.io-client v3 ([#2135](https://github.com/feathersjs/feathers/issues/2135)) ([cc3521c](https://github.com/feathersjs/feathers/commit/cc3521c935a1cbd690e29b7057998e3898f282db))
41
+ - **socketio:** Handle ackTimeout of socket.io ([#3437](https://github.com/feathersjs/feathers/issues/3437)) ([2642072](https://github.com/feathersjs/feathers/commit/26420721f3eb16f716a9e68ab3ed9f415bab7a9c))
42
+ - Throw NotAuthenticated on token verification errors ([#1357](https://github.com/feathersjs/feathers/issues/1357)) ([e0120df](https://github.com/feathersjs/feathers/commit/e0120df14e992c5b32f4ce3df10aee1d7497de22))
43
+ - **transport-commons:** Allow case insensitive route lookups ([#3353](https://github.com/feathersjs/feathers/issues/3353)) ([a4a5ab6](https://github.com/feathersjs/feathers/commit/a4a5ab6cb59048176292cd71c04a32aa71ac4642))
44
+ - **transport-commons:** Allow to properly chain SocketIo client.off ([#1706](https://github.com/feathersjs/feathers/issues/1706)) ([a4aecbc](https://github.com/feathersjs/feathers/commit/a4aecbcd3578c1cf4ecffb3a58fb6d26e15ee513))
45
+ - **transport-commons:** Do not error when adding an undefined connection to a channel ([#2268](https://github.com/feathersjs/feathers/issues/2268)) ([28114c4](https://github.com/feathersjs/feathers/commit/28114c495d6564868bb3ffbf619bf80b774dce4b))
46
+ - **transport-commons:** Ensure socket queries are always plain objects ([#2597](https://github.com/feathersjs/feathers/issues/2597)) ([97313e1](https://github.com/feathersjs/feathers/commit/97313e121cfee4199f10012e95b8507557aa507e))
47
+ - **transport-commons:** Fix dispatching of arrays ([#3075](https://github.com/feathersjs/feathers/issues/3075)) ([98fdda5](https://github.com/feathersjs/feathers/commit/98fdda53187acee88137b39662c766cc62cd7b55))
48
+ - **transport-commons:** Fix HTTP status precedence ([#3511](https://github.com/feathersjs/feathers/issues/3511)) ([5d999a0](https://github.com/feathersjs/feathers/commit/5d999a0acddc0cb7692058209dfbc62673ab5a69))
49
+ - **transport-commons:** Fix route placeholder registration and improve radix router performance ([#2336](https://github.com/feathersjs/feathers/issues/2336)) ([4d84dfd](https://github.com/feathersjs/feathers/commit/4d84dfd092ce0510312e975d5cd57e04973fb311))
50
+ - **transport-commons:** Handle invalid service paths on socket lookups ([#3241](https://github.com/feathersjs/feathers/issues/3241)) ([c397ab3](https://github.com/feathersjs/feathers/commit/c397ab3a0cd184044ae4f73540549b30a396821c))
51
+ - **transport-commons:** Properly delete route data ([#3433](https://github.com/feathersjs/feathers/issues/3433)) ([af01bdb](https://github.com/feathersjs/feathers/commit/af01bdbe050dd428d6fffefa1874e9a6e4182bad))
52
+ - **typescript:** Improve TypeScript backwards compatibility ([#2310](https://github.com/feathersjs/feathers/issues/2310)) ([f33be73](https://github.com/feathersjs/feathers/commit/f33be73fc46a533efb15df9aab0658e3240d3897))
53
+ - **typescript:** Overall typing improvements ([#2478](https://github.com/feathersjs/feathers/issues/2478)) ([b8eb804](https://github.com/feathersjs/feathers/commit/b8eb804158556d9651a8607e3c3fda15e0bfd110))
54
+ - Update adapter common tests ([#1135](https://github.com/feathersjs/feathers/issues/1135)) ([8166dda](https://github.com/feathersjs/feathers/commit/8166ddad144350f224d0fd9fc66084d28706326c))
55
+ - Update all dependencies ([7d53a00](https://github.com/feathersjs/feathers/commit/7d53a00776f7301d9349e6d652656ee80b1cb556))
56
+ - Update all dependencies ([#3613](https://github.com/feathersjs/feathers/issues/3613)) ([5136bbd](https://github.com/feathersjs/feathers/commit/5136bbd2e2eeb4e6579e07c9e914006629542363))
57
+ - Update all dependencies to latest ([#1206](https://github.com/feathersjs/feathers/issues/1206)) ([e51e0f6](https://github.com/feathersjs/feathers/commit/e51e0f62d0f338fb59bd0d39952d99c2904a0c3f))
58
+ - Update dependencies ([#3584](https://github.com/feathersjs/feathers/issues/3584)) ([119fa4e](https://github.com/feathersjs/feathers/commit/119fa4e1ade8b0078aa235083d566e2538b3a084))
59
+ - Update dependencies and fix tests ([#1373](https://github.com/feathersjs/feathers/issues/1373)) ([d743a7f](https://github.com/feathersjs/feathers/commit/d743a7ff7b0f9f94aa6fa8e29d0c816469c9b8ab))
60
+ - Update Grant usage and other dependencies ([#2264](https://github.com/feathersjs/feathers/issues/2264)) ([7b0f8fa](https://github.com/feathersjs/feathers/commit/7b0f8fad252419ed0ad0bf259cdf3104d322ab60))
61
+ - Use WeakMap to connect socket to connection ([#1509](https://github.com/feathersjs/feathers/issues/1509)) ([64807e3](https://github.com/feathersjs/feathers/commit/64807e36bbf7df1def6c0444da5b4714b2931dba))
62
+
63
+ ### Features
64
+
65
+ - Add global disconnect event ([#1355](https://github.com/feathersjs/feathers/issues/1355)) ([85afcca](https://github.com/feathersjs/feathers/commit/85afcca96e2613ea901f5430f4f4447a6b58c60c))
66
+ - Add TypeScript definitions ([#1275](https://github.com/feathersjs/feathers/issues/1275)) ([9dd6713](https://github.com/feathersjs/feathers/commit/9dd671301ae0463968ade0f6eb0c82356adcc89d))
67
+ - Allow registering a service at the root level ([#1115](https://github.com/feathersjs/feathers/issues/1115)) ([c73d322](https://github.com/feathersjs/feathers/commit/c73d3222a8a1dbd6bb1d9710c7cab80557fb6192))
68
+ - Application service types default to any ([#1566](https://github.com/feathersjs/feathers/issues/1566)) ([d93ba9a](https://github.com/feathersjs/feathers/commit/d93ba9a17edd20d3397bb00f4f6e82e804e42ed6))
69
+ - **client:** Improve client side custom method support ([#2654](https://github.com/feathersjs/feathers/issues/2654)) ([c138acf](https://github.com/feathersjs/feathers/commit/c138acf50affbe6b66177d084d3c7a3e9220f09f))
70
+ - **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))
71
+ - **core:** add `context.http` and move `statusCode` there ([#2496](https://github.com/feathersjs/feathers/issues/2496)) ([b701bf7](https://github.com/feathersjs/feathers/commit/b701bf77fb83048aa1dffa492b3d77dd53f7b72b))
72
+ - **core:** Allow to unregister services at runtime ([#2756](https://github.com/feathersjs/feathers/issues/2756)) ([d16601f](https://github.com/feathersjs/feathers/commit/d16601f2277dca5357866ffdefba2a611f6dc7fa))
73
+ - **core:** Public custom service methods ([#2270](https://github.com/feathersjs/feathers/issues/2270)) ([e65abfb](https://github.com/feathersjs/feathers/commit/e65abfb5388df6c19a11c565cf1076a29f32668d))
74
+ - **core:** use @feathers/hooks and add async type ([#1929](https://github.com/feathersjs/feathers/issues/1929)) ([a5c4756](https://github.com/feathersjs/feathers/commit/a5c47562eae8410c82fe2f6308f26f8e78b6a3e8))
75
+ - **dependencies:** Remove direct debug dependency ([#2296](https://github.com/feathersjs/feathers/issues/2296)) ([501d416](https://github.com/feathersjs/feathers/commit/501d4164d30c6a126906dc640cdfdc82207ba34a))
76
+ - ES module v5 compatibility layer for v6 ([#3607](https://github.com/feathersjs/feathers/issues/3607)) ([1dfff88](https://github.com/feathersjs/feathers/commit/1dfff8832eedca895eeaafd7f3acf0f8a27be23c))
77
+ - **express, koa:** make transports similar ([#2486](https://github.com/feathersjs/feathers/issues/2486)) ([26aa937](https://github.com/feathersjs/feathers/commit/26aa937c114fb8596dfefc599b1f53cead69c159))
78
+ - Feathers v5 core refactoring and features ([#2255](https://github.com/feathersjs/feathers/issues/2255)) ([2dafb7c](https://github.com/feathersjs/feathers/commit/2dafb7ce14ba57406aeec13d10ca45b1e709bee9))
79
+ - **generators:** Move core code generators to shared generators package ([#2982](https://github.com/feathersjs/feathers/issues/2982)) ([0328d22](https://github.com/feathersjs/feathers/commit/0328d2292153870bc43958f73d2c6f288a8cec17))
80
+ - **koa:** KoaJS transport adapter ([#2315](https://github.com/feathersjs/feathers/issues/2315)) ([2554b57](https://github.com/feathersjs/feathers/commit/2554b57cf05731df58feeba9c12faab18e442107))
81
+ - **transport-commons:** Ability to register routes with custom params ([#2482](https://github.com/feathersjs/feathers/issues/2482)) ([497990a](https://github.com/feathersjs/feathers/commit/497990ae4a980e5a52a1f0f932db12cd0e6e254a))
82
+ - **transport-commons:** add `context.http.response` ([#2524](https://github.com/feathersjs/feathers/issues/2524)) ([5bc9d44](https://github.com/feathersjs/feathers/commit/5bc9d447043c2e2b742c73ed28ecf3b3264dd9e5))
83
+ - **transport-commons:** New built-in high performance radix router ([#2177](https://github.com/feathersjs/feathers/issues/2177)) ([6d18065](https://github.com/feathersjs/feathers/commit/6d180651b4eb40289ecea3df3575f207aa6c5d1f))
84
+ - **transport-commons:** Remove legacy message format and unnecessary client timeouts ([#1939](https://github.com/feathersjs/feathers/issues/1939)) ([5538881](https://github.com/feathersjs/feathers/commit/5538881a08bc130de42c5984055729d8336f8615))
85
+ - v5 compatibility layer for v6 ([7415d5a](https://github.com/feathersjs/feathers/commit/7415d5addbb9943cfaf8a7a942ca542c6d99bceb))
86
+
87
+ ### BREAKING CHANGES
88
+
89
+ - All packages are now ES modules only
90
+ - **transport-commons:** Removes the old message format and client service timeout
91
+
6
92
  ## [5.0.39](https://github.com/feathersjs/feathers/compare/v5.0.38...v5.0.39) (2026-01-31)
7
93
 
8
94
  **Note:** Version bump only for package @feathersjs/transport-commons
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2024 Feathers Contributors
3
+ Copyright (c) 2025 Feathers Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
22
-
package/README.md CHANGED
@@ -8,6 +8,6 @@
8
8
 
9
9
  ## License
10
10
 
11
- Copyright (c) 2024 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
11
+ Copyright (c) 2025 [Feathers contributors](https://github.com/feathersjs/feathers/graphs/contributors)
12
12
 
13
13
  Licensed under the [MIT license](LICENSE).
package/client.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './lib/client'
1
+ export * from './lib/client.js'
package/client.js CHANGED
@@ -1 +1 @@
1
- module.exports = require('./lib/client');
1
+ export * from './lib/client.js'
package/lib/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Id, NullableId, Params, ServiceInterface } from '@feathersjs/feathers';
1
+ import type { Id, NullableId, Params, ServiceInterface } from '@feathersjs/feathers';
2
2
  interface ServiceOptions {
3
3
  name: string;
4
4
  connection: any;
package/lib/client.js CHANGED
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Service = void 0;
4
1
  /* eslint-disable @typescript-eslint/ban-ts-comment */
5
- const errors_1 = require("@feathersjs/errors");
6
- const commons_1 = require("@feathersjs/commons");
7
- const debug = (0, commons_1.createDebug)('@feathersjs/transport-commons/client');
2
+ import { convert } from '@feathersjs/errors';
3
+ import { createDebug } from '@feathersjs/commons';
4
+ const debug = createDebug('@feathersjs/transport-commons/client');
8
5
  const namespacedEmitterMethods = [
9
6
  'addListener',
10
7
  'addEventListener',
@@ -42,7 +39,7 @@ const addEmitterMethods = (service) => {
42
39
  };
43
40
  });
44
41
  };
45
- class Service {
42
+ export class Service {
46
43
  constructor(options) {
47
44
  this.events = options.events;
48
45
  this.path = options.name;
@@ -64,12 +61,12 @@ class Service {
64
61
  const socketTimeout = ((_a = this.connection.flags) === null || _a === void 0 ? void 0 : _a.timeout) || ((_b = this.connection._opts) === null || _b === void 0 ? void 0 : _b.ackTimeout);
65
62
  if (socketTimeout !== undefined) {
66
63
  args.push(function (timeoutError, error, data) {
67
- return timeoutError || error ? reject((0, errors_1.convert)(timeoutError || error)) : resolve(data);
64
+ return timeoutError || error ? reject(convert(timeoutError || error)) : resolve(data);
68
65
  });
69
66
  }
70
67
  else {
71
68
  args.push(function (error, data) {
72
- return error ? reject((0, errors_1.convert)(error)) : resolve(data);
69
+ return error ? reject(convert(error)) : resolve(data);
73
70
  });
74
71
  }
75
72
  debug(`Sending socket.${this.method}`, args);
@@ -143,5 +140,4 @@ class Service {
143
140
  return this.removeListener(name, ...args);
144
141
  }
145
142
  }
146
- exports.Service = Service;
147
143
  //# sourceMappingURL=client.js.map
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,+CAA4C;AAC5C,iDAAiD;AAGjD,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,sCAAsC,CAAC,CAAA;AAEjE,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,kBAAkB;IAClB,MAAM;IACN,eAAe;IACf,WAAW;IACX,IAAI;IACJ,MAAM;IACN,iBAAiB;IACjB,qBAAqB;IACrB,oBAAoB;IACpB,qBAAqB;IACrB,gBAAgB;CACjB,CAAA;AACD,MAAM,mBAAmB,GAAG,CAAC,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAA;AAEhF,MAAM,iBAAiB,GAAG,CAAC,OAAY,EAAE,EAAE;IACzC,mBAAmB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACrC,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,GAAG,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C,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;YAEnE,OAAO,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAA;QACnD,CAAC;aAAM,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,aAAa;YACb,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAA;QACtC,CAAC;QAED,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAA;IAC3C,CAAC;CACF"}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- import { socket } from './socket';
2
- import { routing } from './routing';
3
- import { channels, Channel, CombinedChannel } from './channels';
4
- import { RealTimeConnection } from '@feathersjs/feathers';
5
- export * as http from './http';
6
- export { socket, routing, channels, Channel, CombinedChannel, RealTimeConnection };
1
+ export * as http from 'feathers/http';
2
+ export { Channel, CombinedChannel } from '@feathersjs/feathers';
3
+ export * from './socket/index.js';
package/lib/index.js CHANGED
@@ -1,46 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.CombinedChannel = exports.Channel = exports.channels = exports.routing = exports.socket = exports.http = void 0;
37
- const socket_1 = require("./socket");
38
- Object.defineProperty(exports, "socket", { enumerable: true, get: function () { return socket_1.socket; } });
39
- const routing_1 = require("./routing");
40
- Object.defineProperty(exports, "routing", { enumerable: true, get: function () { return routing_1.routing; } });
41
- const channels_1 = require("./channels");
42
- Object.defineProperty(exports, "channels", { enumerable: true, get: function () { return channels_1.channels; } });
43
- Object.defineProperty(exports, "Channel", { enumerable: true, get: function () { return channels_1.Channel; } });
44
- Object.defineProperty(exports, "CombinedChannel", { enumerable: true, get: function () { return channels_1.CombinedChannel; } });
45
- exports.http = __importStar(require("./http"));
1
+ export * as http from 'feathers/http';
2
+ export { Channel, CombinedChannel } from '@feathersjs/feathers';
3
+ export * from './socket/index.js';
46
4
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAiC;AAMxB,uFANA,eAAM,OAMA;AALf,uCAAmC;AAKlB,wFALR,iBAAO,OAKQ;AAJxB,yCAA+D;AAIrC,yFAJjB,mBAAQ,OAIiB;AAAE,wFAJjB,kBAAO,OAIiB;AAAE,gGAJjB,0BAAe,OAIiB;AAD5D,+CAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC/D,cAAc,mBAAmB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Application, RealTimeConnection } from '@feathersjs/feathers';
1
+ import type { Application, RealTimeConnection } from '@feathersjs/feathers';
2
2
  export interface SocketOptions {
3
3
  done: Promise<any>;
4
4
  emit: string;
@@ -1,11 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.socket = socket;
4
- const feathers_1 = require("@feathersjs/feathers");
5
- const channels_1 = require("../channels");
6
- const routing_1 = require("../routing");
7
- const utils_1 = require("./utils");
8
- function socket({ done, emit, socketMap, socketKey, getParams }) {
1
+ import { getServiceOptions } from '@feathersjs/feathers';
2
+ import { getDispatcher, runMethod } from './utils.js';
3
+ export function socket({ done, emit, socketMap, socketKey, getParams }) {
9
4
  return (app) => {
10
5
  const leaveChannels = (connection) => {
11
6
  const { channels } = app;
@@ -13,9 +8,7 @@ function socket({ done, emit, socketMap, socketKey, getParams }) {
13
8
  app.channel(app.channels).leave(connection);
14
9
  }
15
10
  };
16
- app.configure((0, channels_1.channels)());
17
- app.configure((0, routing_1.routing)());
18
- app.on('publish', (0, utils_1.getDispatcher)(emit, socketMap, socketKey));
11
+ app.on('publish', getDispatcher(emit, socketMap, socketKey));
19
12
  app.on('disconnect', leaveChannels);
20
13
  app.on('logout', (_authResult, params) => {
21
14
  const { connection } = params;
@@ -28,12 +21,12 @@ function socket({ done, emit, socketMap, socketKey, getParams }) {
28
21
  // `socket.emit('methodName', 'serviceName', ...args)` handlers
29
22
  done.then((provider) => provider.on('connection', (connection) => {
30
23
  const methodHandlers = Object.keys(app.services).reduce((result, name) => {
31
- const { methods } = (0, feathers_1.getServiceOptions)(app.service(name));
24
+ const { methods } = getServiceOptions(app.service(name));
32
25
  methods.forEach((method) => {
33
26
  if (!result[method]) {
34
27
  result[method] = (...args) => {
35
28
  const [path, ...rest] = args;
36
- (0, utils_1.runMethod)(app, getParams(connection), path, method, rest);
29
+ runMethod(app, getParams(connection), path, method, rest);
37
30
  };
38
31
  }
39
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/socket/index.ts"],"names":[],"mappings":";;AAaA,wBAmDC;AAhED,mDAAiG;AACjG,0CAAsC;AACtC,wCAAoC;AACpC,mCAAkD;AAUlD,SAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAiB;IACnF,OAAO,CAAC,GAAgB,EAAE,EAAE;QAC1B,MAAM,aAAa,GAAG,CAAC,UAA8B,EAAE,EAAE;YACvD,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAA;YAExB,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACpB,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;YAC7C,CAAC;QACH,CAAC,CAAA;QAED,GAAG,CAAC,SAAS,CAAC,IAAA,mBAAQ,GAAE,CAAC,CAAA;QACzB,GAAG,CAAC,SAAS,CAAC,IAAA,iBAAO,GAAE,CAAC,CAAA;QAExB,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,IAAA,qBAAa,EAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;QAC5D,GAAG,CAAC,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;QACnC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAgB,EAAE,MAAc,EAAE,EAAE;YACpD,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAA;YAE7B,IAAI,UAAU,EAAE,CAAC;gBACf,aAAa,CAAC,UAAU,CAAC,CAAA;YAC3B,CAAC;QACH,CAA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EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAC9F,CAAA;QAED,+DAA+D;QAC/D,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CACrB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,UAAe,EAAE,EAAE;YAC5C,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;gBACvE,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;gBAExD,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;oBACzB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;wBACpB,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;4BAClC,MAAM,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAA;4BAE5B,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;wBAC3D,CAAC,CAAA;oBACH,CAAC;gBACH,CAAC,CAAC,CAAA;gBAEF,OAAO,MAAM,CAAA;YACf,CAAC,EAAE,EAAS,CAAC,CAAA;YAEb,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QACvF,CAAC,CAAC,CACH,CAAA;IACH,CAAC,CAAA;AACH,CAAC"}
@@ -1,5 +1,5 @@
1
- import { HookContext, Application, RealTimeConnection } from '@feathersjs/feathers';
2
- import { CombinedChannel } from '../channels/channel/combined';
1
+ import type { HookContext, Application, RealTimeConnection } from '@feathersjs/feathers';
2
+ import { CombinedChannel } from '@feathersjs/feathers';
3
3
  export declare const DEFAULT_PARAMS_POSITION = 1;
4
4
  export declare const paramsPositions: {
5
5
  [key: string]: number;
@@ -1,24 +1,15 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.paramsPositions = exports.DEFAULT_PARAMS_POSITION = void 0;
7
- exports.normalizeError = normalizeError;
8
- exports.getDispatcher = getDispatcher;
9
- exports.runMethod = runMethod;
10
- const feathers_1 = require("@feathersjs/feathers");
11
- const errors_1 = require("@feathersjs/errors");
12
- const commons_1 = require("@feathersjs/commons");
13
- const isEqual_1 = __importDefault(require("lodash/isEqual"));
14
- const debug = (0, commons_1.createDebug)('@feathersjs/transport-commons');
15
- exports.DEFAULT_PARAMS_POSITION = 1;
16
- exports.paramsPositions = {
1
+ import { createContext, getServiceOptions } from '@feathersjs/feathers';
2
+ import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors';
3
+ import { createDebug } from '@feathersjs/commons';
4
+ import { isEqual } from 'lodash-es';
5
+ const debug = createDebug('@feathersjs/transport-commons');
6
+ export const DEFAULT_PARAMS_POSITION = 1;
7
+ export const paramsPositions = {
17
8
  find: 0,
18
9
  update: 2,
19
10
  patch: 2
20
11
  };
21
- function normalizeError(e) {
12
+ export function normalizeError(e) {
22
13
  const hasToJSON = typeof e.toJSON === 'function';
23
14
  const result = hasToJSON ? e.toJSON() : {};
24
15
  if (!hasToJSON) {
@@ -32,7 +23,7 @@ function normalizeError(e) {
32
23
  delete result.hook;
33
24
  return result;
34
25
  }
35
- function getDispatcher(emit, socketMap, socketKey) {
26
+ export function getDispatcher(emit, socketMap, socketKey) {
36
27
  return function (event, channel, context, data) {
37
28
  debug(`Dispatching '${event}' to ${channel.length} connections`);
38
29
  channel.connections.forEach((connection) => {
@@ -44,7 +35,7 @@ function getDispatcher(emit, socketMap, socketKey) {
44
35
  // If we are getting events from an array but try to dispatch individual data
45
36
  // try to get the individual item to dispatch from the correct index.
46
37
  if (!Array.isArray(data) && Array.isArray(context.result) && Array.isArray(result)) {
47
- result = result.find((resultData) => (0, isEqual_1.default)(resultData, data));
38
+ result = result.find((resultData) => isEqual(resultData, data));
48
39
  }
49
40
  debug(`Dispatching '${eventName}' to Socket ${socket.id} with`, result);
50
41
  socket[emit](eventName, result);
@@ -52,7 +43,7 @@ function getDispatcher(emit, socketMap, socketKey) {
52
43
  });
53
44
  };
54
45
  }
55
- async function runMethod(app, connection, _path, _method, args) {
46
+ export async function runMethod(app, connection, _path, _method, args) {
56
47
  const path = typeof _path === 'string' ? _path : null;
57
48
  const method = typeof _method === 'string' ? _method : null;
58
49
  const trace = `method '${method}' on service '${path}'`;
@@ -69,24 +60,24 @@ async function runMethod(app, connection, _path, _method, args) {
69
60
  const lookup = app.lookup(path);
70
61
  // No valid service was found throw a NotFound error
71
62
  if (lookup === null) {
72
- throw new errors_1.NotFound(path === null ? `Invalid service path` : `Service '${path}' not found`);
63
+ throw new NotFound(path === null ? `Invalid service path` : `Service '${path}' not found`);
73
64
  }
74
65
  const { service, params: route = {} } = lookup;
75
- const { methods } = (0, feathers_1.getServiceOptions)(service);
66
+ const { methods } = getServiceOptions(service);
76
67
  // Only service methods are allowed
77
68
  if (!methods.includes(method)) {
78
- throw new errors_1.MethodNotAllowed(`Method '${method}' not allowed on service '${path}'`);
69
+ throw new MethodNotAllowed(`Method '${method}' not allowed on service '${path}'`);
79
70
  }
80
- const position = exports.paramsPositions[method] !== undefined ? exports.paramsPositions[method] : exports.DEFAULT_PARAMS_POSITION;
71
+ const position = paramsPositions[method] !== undefined ? paramsPositions[method] : DEFAULT_PARAMS_POSITION;
81
72
  const query = Object.assign({}, methodArgs[position]);
82
73
  // `params` have to be re-mapped to the query and added with the route
83
74
  const params = Object.assign({ query, route, connection }, connection);
84
75
  // `params` is always the last parameter. Error if we got more arguments.
85
76
  if (methodArgs.length > position + 1) {
86
- throw new errors_1.BadRequest(`Too many arguments for '${method}' method`);
77
+ throw new BadRequest(`Too many arguments for '${method}' method`);
87
78
  }
88
79
  methodArgs[position] = params;
89
- const ctx = (0, feathers_1.createContext)(service, method);
80
+ const ctx = createContext(service, method);
90
81
  const returnedCtx = await service[method](...methodArgs, ctx);
91
82
  const result = returnedCtx.dispatch || returnedCtx.result;
92
83
  debug(`Returned successfully ${trace}`, result);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/socket/utils.ts"],"names":[],"mappings":";;;;;;AAsBA,wCAiBC;AAED,sCAyBC;AAED,8BA2DC;AA/HD,mDAM6B;AAC7B,+CAA2E;AAC3E,iDAAiD;AACjD,6DAAoC;AAGpC,MAAM,KAAK,GAAG,IAAA,qBAAW,EAAC,+BAA+B,CAAC,CAAA;AAE7C,QAAA,uBAAuB,GAAG,CAAC,CAAA;AAE3B,QAAA,eAAe,GAA8B;IACxD,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;CACT,CAAA;AAED,SAAgB,cAAc,CAAC,CAAM;IACnC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,MAAM,KAAK,UAAU,CAAA;IAChD,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAE1C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC5C,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;QACtB,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC1C,OAAO,MAAM,CAAC,KAAK,CAAA;IAC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AAW,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@feathersjs/transport-commons",
3
3
  "description": "Shared functionality for websocket providers",
4
- "version": "5.0.39",
4
+ "version": "6.0.0-pre.0",
5
5
  "homepage": "https://feathersjs.com",
6
- "main": "lib/",
7
- "types": "lib/",
6
+ "main": "lib/index.js",
7
+ "type": "module",
8
8
  "keywords": [
9
9
  "feathers",
10
10
  "feathers-plugin"
@@ -29,7 +29,7 @@
29
29
  "url": "https://github.com/feathersjs/feathers/issues"
30
30
  },
31
31
  "engines": {
32
- "node": ">= 12"
32
+ "node": ">= 20"
33
33
  },
34
34
  "scripts": {
35
35
  "prepublish": "npm run compile",
@@ -54,11 +54,11 @@
54
54
  "*.js"
55
55
  ],
56
56
  "dependencies": {
57
- "@feathersjs/commons": "^5.0.39",
58
- "@feathersjs/errors": "^5.0.39",
59
- "@feathersjs/feathers": "^5.0.39",
57
+ "@feathersjs/commons": "^6.0.0-pre.0",
58
+ "@feathersjs/errors": "^6.0.0-pre.0",
59
+ "@feathersjs/feathers": "^6.0.0-pre.0",
60
60
  "encodeurl": "^2.0.0",
61
- "lodash": "^4.17.23"
61
+ "lodash-es": "^4.17.23"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/encodeurl": "^1.0.3",
@@ -70,5 +70,5 @@
70
70
  "ts-node": "^10.9.2",
71
71
  "typescript": "^5.9.3"
72
72
  },
73
- "gitHead": "e4c0dac68b00615c7bc4724871375a14863a2447"
73
+ "gitHead": "8fad4bb3d393794fb98fa5fe7cfc327661fedbd2"
74
74
  }
package/src/client.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/ban-ts-comment */
2
2
  import { convert } from '@feathersjs/errors'
3
3
  import { createDebug } from '@feathersjs/commons'
4
- import { Id, NullableId, Params, ServiceInterface } from '@feathersjs/feathers'
5
-
4
+ import type { Id, NullableId, Params, ServiceInterface } from '@feathersjs/feathers'
6
5
  const debug = createDebug('@feathersjs/transport-commons/client')
7
6
 
8
7
  const namespacedEmitterMethods = [
package/src/index.ts CHANGED
@@ -1,7 +1,3 @@
1
- import { socket } from './socket'
2
- import { routing } from './routing'
3
- import { channels, Channel, CombinedChannel } from './channels'
4
- import { RealTimeConnection } from '@feathersjs/feathers'
5
-
6
- export * as http from './http'
7
- export { socket, routing, channels, Channel, CombinedChannel, RealTimeConnection }
1
+ export * as http from 'feathers/http'
2
+ export { Channel, CombinedChannel } from '@feathersjs/feathers'
3
+ export * from './socket/index.js'
@@ -1,7 +1,6 @@
1
- import { Application, getServiceOptions, Params, RealTimeConnection } from '@feathersjs/feathers'
2
- import { channels } from '../channels'
3
- import { routing } from '../routing'
4
- import { getDispatcher, runMethod } from './utils'
1
+ import type { Application, Params, RealTimeConnection } from '@feathersjs/feathers'
2
+ import { getServiceOptions } from '@feathersjs/feathers'
3
+ import { getDispatcher, runMethod } from './utils.js'
5
4
 
6
5
  export interface SocketOptions {
7
6
  done: Promise<any>
@@ -21,9 +20,6 @@ export function socket({ done, emit, socketMap, socketKey, getParams }: SocketOp
21
20
  }
22
21
  }
23
22
 
24
- app.configure(channels())
25
- app.configure(routing())
26
-
27
23
  app.on('publish', getDispatcher(emit, socketMap, socketKey))
28
24
  app.on('disconnect', leaveChannels)
29
25
  app.on('logout', (_authResult: any, params: Params) => {
@@ -1,14 +1,8 @@
1
- import {
2
- HookContext,
3
- Application,
4
- RealTimeConnection,
5
- createContext,
6
- getServiceOptions
7
- } from '@feathersjs/feathers'
1
+ import type { HookContext, Application, RealTimeConnection } from '@feathersjs/feathers'
2
+ import { createContext, getServiceOptions, CombinedChannel } from '@feathersjs/feathers'
8
3
  import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors'
9
4
  import { createDebug } from '@feathersjs/commons'
10
- import isEqual from 'lodash/isEqual'
11
- import { CombinedChannel } from '../channels/channel/combined'
5
+ import { isEqual } from 'lodash-es'
12
6
 
13
7
  const debug = createDebug('@feathersjs/transport-commons')
14
8
 
@@ -1,12 +0,0 @@
1
- import { EventEmitter } from 'events';
2
- import { RealTimeConnection } from '@feathersjs/feathers';
3
- export declare class Channel extends EventEmitter {
4
- connections: RealTimeConnection[];
5
- data: any;
6
- constructor(connections?: RealTimeConnection[], data?: any);
7
- get length(): number;
8
- leave(...connections: RealTimeConnection[]): this;
9
- join(...connections: RealTimeConnection[]): this;
10
- filter(fn: (connection: RealTimeConnection) => boolean): Channel;
11
- send(data: any): Channel;
12
- }