@folklore/socket 0.4.19 → 0.4.20
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/dist/cjs.js +5 -4
- package/dist/es.js +5 -4
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -336,7 +336,7 @@ class SocketIOSocket extends EventEmitter {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
const debug$1 = createDebug('folklore:socket:pusher');
|
|
339
|
-
class
|
|
339
|
+
class PusherSocket extends EventEmitter {
|
|
340
340
|
constructor(opts) {
|
|
341
341
|
super();
|
|
342
342
|
this.options = {
|
|
@@ -404,7 +404,7 @@ class PusherSocker extends EventEmitter {
|
|
|
404
404
|
loadPusher.then(() => this.createPusher()).then(() => this.onReady());
|
|
405
405
|
}
|
|
406
406
|
loadPusher() {
|
|
407
|
-
debug$1('Load
|
|
407
|
+
debug$1('Load Pusher');
|
|
408
408
|
return import('pusher-js').then(_ref => {
|
|
409
409
|
let {
|
|
410
410
|
default: Pusher
|
|
@@ -416,6 +416,7 @@ class PusherSocker extends EventEmitter {
|
|
|
416
416
|
if (this.destroyed) {
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
|
+
debug$1('Create Pusher appKey: %s', this.options.appKey);
|
|
419
420
|
const {
|
|
420
421
|
Pusher
|
|
421
422
|
} = this;
|
|
@@ -442,7 +443,7 @@ class PusherSocker extends EventEmitter {
|
|
|
442
443
|
debug$1('Skipping start: Already starting.');
|
|
443
444
|
return;
|
|
444
445
|
}
|
|
445
|
-
if (this.
|
|
446
|
+
if (this.pusher === null) {
|
|
446
447
|
debug$1('Socket.io not ready.');
|
|
447
448
|
this.shouldStart = true;
|
|
448
449
|
return;
|
|
@@ -506,7 +507,7 @@ class PusherSocker extends EventEmitter {
|
|
|
506
507
|
var SocketAdapters = {
|
|
507
508
|
PubNub: PubNubSocket,
|
|
508
509
|
SocketIO: SocketIOSocket,
|
|
509
|
-
Pusher:
|
|
510
|
+
Pusher: PusherSocket
|
|
510
511
|
};
|
|
511
512
|
|
|
512
513
|
const normalize = str => str.replace(/[^a-z0-9]+/gi, '').toLowerCase();
|
package/dist/es.js
CHANGED
|
@@ -332,7 +332,7 @@ class SocketIOSocket extends EventEmitter {
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
const debug$1 = createDebug('folklore:socket:pusher');
|
|
335
|
-
class
|
|
335
|
+
class PusherSocket extends EventEmitter {
|
|
336
336
|
constructor(opts) {
|
|
337
337
|
super();
|
|
338
338
|
this.options = {
|
|
@@ -400,7 +400,7 @@ class PusherSocker extends EventEmitter {
|
|
|
400
400
|
loadPusher.then(() => this.createPusher()).then(() => this.onReady());
|
|
401
401
|
}
|
|
402
402
|
loadPusher() {
|
|
403
|
-
debug$1('Load
|
|
403
|
+
debug$1('Load Pusher');
|
|
404
404
|
return import('pusher-js').then(_ref => {
|
|
405
405
|
let {
|
|
406
406
|
default: Pusher
|
|
@@ -412,6 +412,7 @@ class PusherSocker extends EventEmitter {
|
|
|
412
412
|
if (this.destroyed) {
|
|
413
413
|
return;
|
|
414
414
|
}
|
|
415
|
+
debug$1('Create Pusher appKey: %s', this.options.appKey);
|
|
415
416
|
const {
|
|
416
417
|
Pusher
|
|
417
418
|
} = this;
|
|
@@ -438,7 +439,7 @@ class PusherSocker extends EventEmitter {
|
|
|
438
439
|
debug$1('Skipping start: Already starting.');
|
|
439
440
|
return;
|
|
440
441
|
}
|
|
441
|
-
if (this.
|
|
442
|
+
if (this.pusher === null) {
|
|
442
443
|
debug$1('Socket.io not ready.');
|
|
443
444
|
this.shouldStart = true;
|
|
444
445
|
return;
|
|
@@ -502,7 +503,7 @@ class PusherSocker extends EventEmitter {
|
|
|
502
503
|
var SocketAdapters = {
|
|
503
504
|
PubNub: PubNubSocket,
|
|
504
505
|
SocketIO: SocketIOSocket,
|
|
505
|
-
Pusher:
|
|
506
|
+
Pusher: PusherSocket
|
|
506
507
|
};
|
|
507
508
|
|
|
508
509
|
const normalize = str => str.replace(/[^a-z0-9]+/gi, '').toLowerCase();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@folklore/socket",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
4
4
|
"description": "Socket utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
57
57
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "fdba71c923f438864575b8e7e7bac4178e8184f5"
|
|
60
60
|
}
|