@feathersjs/socketio-client 5.0.0-pre.23 → 5.0.0-pre.26
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 +27 -0
- package/lib/index.d.ts +3 -7
- package/lib/index.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.26](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.25...v5.0.0-pre.26) (2022-06-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @feathersjs/socketio-client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [5.0.0-pre.25](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.24...v5.0.0-pre.25) (2022-06-22)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @feathersjs/socketio-client
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [5.0.0-pre.24](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.23...v5.0.0-pre.24) (2022-06-21)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **cli:** Add typed client to a generated app ([#2669](https://github.com/feathersjs/feathers/issues/2669)) ([5b801b5](https://github.com/feathersjs/feathers/commit/5b801b5017ddc3eaa95622b539f51d605916bc86))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
# [5.0.0-pre.23](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.22...v5.0.0-pre.23) (2022-06-06)
|
|
7
34
|
|
|
8
35
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SocketService } from '@feathersjs/transport-commons/client';
|
|
2
2
|
import { Socket } from 'socket.io-client';
|
|
3
|
-
import {
|
|
3
|
+
import { TransportConnection } from '@feathersjs/feathers';
|
|
4
4
|
export { SocketService };
|
|
5
5
|
declare module '@feathersjs/feathers/lib/declarations' {
|
|
6
6
|
interface FeathersApplication<Services, Settings> {
|
|
@@ -11,8 +11,4 @@ declare module '@feathersjs/feathers/lib/declarations' {
|
|
|
11
11
|
io?: Socket;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
export default function socketioClient(connection: Socket, options?: any):
|
|
15
|
-
(app: Application): void;
|
|
16
|
-
Service: typeof Service;
|
|
17
|
-
service: (this: any, name: string) => any;
|
|
18
|
-
};
|
|
14
|
+
export default function socketioClient<Services = any>(connection: Socket, options?: any): TransportConnection<Services>;
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iEAA6E;AAE7E,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iEAA6E;AAE7E,mDAK6B;AAc7B,SAAwB,cAAc,CAAiB,UAAkB,EAAE,OAAa;IACtF,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAA;KAC7D;IAED,MAAM,cAAc,GAAG,UAAqB,IAAY;QACtD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,0BAAe,CAAC,CAAA;QAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;YAC1C,MAAM;YACN,IAAI;YACJ,UAAU;YACV,MAAM,EAAE,MAAM;SACf,CAAC,CAAA;QAEF,OAAO,IAAI,gBAAO,CAAC,QAAQ,CAAQ,CAAA;IACrC,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,UAAU,GAA0B;QACrD,IAAI,GAAG,CAAC,EAAE,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAA;SACtE;QAED,GAAG,CAAC,EAAE,GAAG,UAAiB,CAAA;QAC1B,GAAG,CAAC,cAAc,GAAG,cAAc,CAAA;QACnC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE;YACjD,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,YAAY,gBAAO,EAAE;gBAC5D,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,gCAAqB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAA;gBAE7F,OAAO,CAAC,OAAO,CAAC,GAAG,aAAa,CAAC,CAAA;aAClC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,UAAU,CAAC,OAAO,GAAG,gBAAO,CAAA;IAC5B,UAAU,CAAC,OAAO,GAAG,cAAc,CAAA;IAEnC,OAAO,UAA2C,CAAA;AACpD,CAAC;AArCD,iCAqCC;AAED,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;CAC/D"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/socketio-client",
|
|
3
3
|
"description": "The client for Socket.io through feathers-socketio",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.26",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"types": "lib/",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@feathersjs/transport-commons": "^5.0.0-pre.
|
|
56
|
+
"@feathersjs/transport-commons": "^5.0.0-pre.26"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
60
|
-
"@feathersjs/feathers": "^5.0.0-pre.
|
|
61
|
-
"@feathersjs/memory": "^5.0.0-pre.
|
|
62
|
-
"@feathersjs/socketio": "^5.0.0-pre.
|
|
63
|
-
"@feathersjs/tests": "^5.0.0-pre.
|
|
59
|
+
"@feathersjs/commons": "^5.0.0-pre.26",
|
|
60
|
+
"@feathersjs/feathers": "^5.0.0-pre.26",
|
|
61
|
+
"@feathersjs/memory": "^5.0.0-pre.26",
|
|
62
|
+
"@feathersjs/socketio": "^5.0.0-pre.26",
|
|
63
|
+
"@feathersjs/tests": "^5.0.0-pre.26",
|
|
64
64
|
"@types/mocha": "^9.1.1",
|
|
65
65
|
"@types/node": "^17.0.40",
|
|
66
66
|
"mocha": "^10.0.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"ts-node": "^10.8.1",
|
|
70
70
|
"typescript": "^4.7.3"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "0e7553ded9b24016d36021aaedcc2cdb19ab0157"
|
|
73
73
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Service, SocketService } from '@feathersjs/transport-commons/client'
|
|
2
2
|
import { Socket } from 'socket.io-client'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
Application,
|
|
5
|
+
TransportConnection,
|
|
6
|
+
defaultEventMap,
|
|
7
|
+
defaultServiceMethods
|
|
8
|
+
} from '@feathersjs/feathers'
|
|
4
9
|
|
|
5
10
|
export { SocketService }
|
|
6
11
|
|
|
@@ -14,7 +19,7 @@ declare module '@feathersjs/feathers/lib/declarations' {
|
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
export default function socketioClient(connection: Socket, options?: any) {
|
|
22
|
+
export default function socketioClient<Services = any>(connection: Socket, options?: any) {
|
|
18
23
|
if (!connection) {
|
|
19
24
|
throw new Error('Socket.io connection needs to be provided')
|
|
20
25
|
}
|
|
@@ -31,7 +36,7 @@ export default function socketioClient(connection: Socket, options?: any) {
|
|
|
31
36
|
return new Service(settings) as any
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
const initialize = function (app: Application) {
|
|
39
|
+
const initialize = function (app: Application<Services>) {
|
|
35
40
|
if (app.io !== undefined) {
|
|
36
41
|
throw new Error('Only one default client provider can be configured')
|
|
37
42
|
}
|
|
@@ -50,7 +55,7 @@ export default function socketioClient(connection: Socket, options?: any) {
|
|
|
50
55
|
initialize.Service = Service
|
|
51
56
|
initialize.service = defaultService
|
|
52
57
|
|
|
53
|
-
return initialize
|
|
58
|
+
return initialize as TransportConnection<Services>
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
if (typeof module !== 'undefined') {
|