pusher-js 8.0.2 → 8.2.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.
- package/CHANGELOG.md +9 -0
- package/dist/node/pusher.js +968 -1391
- package/dist/node/pusher.js.map +1 -1
- package/dist/react-native/pusher.js +2 -2
- package/dist/react-native/pusher.js.map +1 -1
- package/dist/web/pusher-with-encryption.js +1003 -1434
- package/dist/web/pusher-with-encryption.js.map +1 -1
- package/dist/web/pusher-with-encryption.min.js +2 -2
- package/dist/web/pusher-with-encryption.min.js.map +1 -1
- package/dist/web/pusher.js +994 -1410
- package/dist/web/pusher.js.map +1 -1
- package/dist/web/pusher.min.js +2 -2
- package/dist/web/pusher.min.js.map +1 -1
- package/dist/worker/pusher-with-encryption.worker.js +968 -1390
- package/dist/worker/pusher-with-encryption.worker.js.map +1 -1
- package/dist/worker/pusher-with-encryption.worker.min.js +2 -2
- package/dist/worker/pusher-with-encryption.worker.min.js.map +1 -1
- package/dist/worker/pusher.worker.js +959 -1366
- package/dist/worker/pusher.worker.js.map +1 -1
- package/dist/worker/pusher.worker.min.js +2 -2
- package/dist/worker/pusher.worker.min.js.map +1 -1
- package/package.json +6 -6
- package/src/runtimes/isomorphic/default_strategy.ts +0 -1
- package/src/runtimes/web/default_strategy.ts +0 -1
- package/tsconfig.json +1 -1
- package/types/src/core/auth/options.d.ts +3 -3
- package/types/src/core/config.d.ts +2 -2
- package/types/src/core/strategies/transport_strategy.d.ts +0 -3
- package/types/src/core/utils/timers/scheduling.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pusher-js",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers",
|
|
5
5
|
"main": "dist/node/pusher.js",
|
|
6
6
|
"browser": "dist/web/pusher.js",
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"prettier": "^1.19.1",
|
|
55
55
|
"source-map-loader": "^1.1.3",
|
|
56
56
|
"ts-loader": "^6.0.4",
|
|
57
|
-
"typescript": "^
|
|
57
|
+
"typescript": "^5.1.3",
|
|
58
58
|
"uglify-js": "^2.6.2",
|
|
59
59
|
"webpack": "^4.46.0",
|
|
60
60
|
"webpack-cli": "^3.3.12",
|
|
61
61
|
"webpack-dev-server": "^4.11.1",
|
|
62
62
|
"webpack-merge": "^5.8.0",
|
|
63
|
-
"xmlhttprequest": "^1.8.0"
|
|
63
|
+
"xmlhttprequest": "^1.8.0",
|
|
64
|
+
"@types/node": "^20.3.0",
|
|
65
|
+
"@types/express-serve-static-core": "4.17.28"
|
|
64
66
|
},
|
|
65
67
|
"dependencies": {
|
|
66
|
-
"tweetnacl": "^1.0.3"
|
|
67
|
-
"@types/node": "^14.14.31",
|
|
68
|
-
"@types/express-serve-static-core": "4.17.28"
|
|
68
|
+
"tweetnacl": "^1.0.3"
|
|
69
69
|
}
|
|
70
70
|
}
|
package/tsconfig.json
CHANGED
|
@@ -7,7 +7,7 @@ export interface ChannelAuthorizationData {
|
|
|
7
7
|
channel_data?: string;
|
|
8
8
|
shared_secret?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type ChannelAuthorizationCallback = (error: Error | null, authData: ChannelAuthorizationData | null) => void;
|
|
11
11
|
export interface ChannelAuthorizationRequestParams {
|
|
12
12
|
socketId: string;
|
|
13
13
|
channelName: string;
|
|
@@ -19,14 +19,14 @@ export interface UserAuthenticationData {
|
|
|
19
19
|
auth: string;
|
|
20
20
|
user_data: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type UserAuthenticationCallback = (error: Error | null, authData: UserAuthenticationData | null) => void;
|
|
23
23
|
export interface UserAuthenticationRequestParams {
|
|
24
24
|
socketId: string;
|
|
25
25
|
}
|
|
26
26
|
export interface UserAuthenticationHandler {
|
|
27
27
|
(params: UserAuthenticationRequestParams, callback: UserAuthenticationCallback): void;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type AuthTransportCallback = ChannelAuthorizationCallback | UserAuthenticationCallback;
|
|
30
30
|
export interface AuthOptionsT<AuthHandler> {
|
|
31
31
|
transport: 'ajax' | 'jsonp';
|
|
32
32
|
endpoint: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Options } from './options';
|
|
2
2
|
import { ChannelAuthorizationHandler, UserAuthenticationHandler } from './auth/options';
|
|
3
3
|
import * as nacl from 'tweetnacl';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type AuthTransport = 'ajax' | 'jsonp';
|
|
5
|
+
export type Transport = 'ws' | 'wss' | 'xhr_streaming' | 'xhr_polling' | 'sockjs';
|
|
6
6
|
export interface Config {
|
|
7
7
|
activityTimeout: number;
|
|
8
8
|
enableStats: boolean;
|
|
@@ -9,9 +9,6 @@ export default class TransportStrategy implements Strategy {
|
|
|
9
9
|
constructor(name: string, priority: number, transport: Transport, options: StrategyOptions);
|
|
10
10
|
isSupported(): boolean;
|
|
11
11
|
connect(minPriority: number, callback: Function): {
|
|
12
|
-
abort: () => void;
|
|
13
|
-
forceMinPriority: () => void;
|
|
14
|
-
} | {
|
|
15
12
|
abort: () => void;
|
|
16
13
|
forceMinPriority: (p: any) => void;
|
|
17
14
|
};
|