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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pusher-js",
3
- "version": "8.0.2",
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": "^3.9.0",
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
  }
@@ -66,7 +66,6 @@ var getDefaultStrategy = function(
66
66
  };
67
67
 
68
68
  var ws_manager = new TransportManager({
69
- lives: 2,
70
69
  minPingDelay: 10000,
71
70
  maxPingDelay: config.activityTimeout
72
71
  });
@@ -67,7 +67,6 @@ var getDefaultStrategy = function(
67
67
  };
68
68
 
69
69
  var ws_manager = new TransportManager({
70
- lives: 2,
71
70
  minPingDelay: 10000,
72
71
  maxPingDelay: config.activityTimeout
73
72
  });
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "module": "es6",
5
5
  "declaration": true,
6
6
  "declarationDir": "types",
7
- "target": "es3",
7
+ "target": "ES6",
8
8
  "removeComments": true,
9
9
  "moduleResolution": "node",
10
10
  "baseUrl": "src",
@@ -7,7 +7,7 @@ export interface ChannelAuthorizationData {
7
7
  channel_data?: string;
8
8
  shared_secret?: string;
9
9
  }
10
- export declare type ChannelAuthorizationCallback = (error: Error | null, authData: ChannelAuthorizationData | null) => void;
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 declare type UserAuthenticationCallback = (error: Error | null, authData: UserAuthenticationData | null) => void;
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 declare type AuthTransportCallback = ChannelAuthorizationCallback | UserAuthenticationCallback;
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 declare type AuthTransport = 'ajax' | 'jsonp';
5
- export declare type Transport = 'ws' | 'wss' | 'xhr_streaming' | 'xhr_polling' | 'sockjs';
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
  };
@@ -4,5 +4,5 @@ interface Scheduler {
4
4
  interface Canceller {
5
5
  (number: any): void;
6
6
  }
7
- declare type Delay = number;
7
+ type Delay = number;
8
8
  export { Scheduler, Canceller, Delay };