quickblox 2.21.0 → 2.21.1

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/README.md CHANGED
@@ -54,8 +54,12 @@ var QB2 = new QuickBlox();
54
54
  # Browsers support
55
55
 
56
56
  | Edge | Firefox | Chrome | Safari | Opera | Node.js |
57
- | :--: | :-----: | :----: | :----: | :---: | :-----: |
58
- | 14+ | 52+ | 50+ | 11.1+ | 36+ | 6+ |
57
+ | :--: | :-----: | :----: | :----: | :---: |:-------:|
58
+ | 14+ | 52+ | 50+ | 11.1+ | 36+ | 10+ |
59
+
60
+ ## Node.js
61
+ - **Minimum:** v10.0.0
62
+ - **Recommended:** v12.20.0+
59
63
 
60
64
  # Documentation
61
65
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickblox",
3
3
  "description": "QuickBlox JavaScript SDK",
4
- "version": "2.21.0",
4
+ "version": "2.21.1",
5
5
  "homepage": "https://quickblox.com/developers/Javascript",
6
6
  "main": "src/qbMain.js",
7
7
  "types": "quickblox.d.ts",
package/quickblox.js CHANGED
@@ -54571,7 +54571,26 @@ module.exports = WebRTCSignalingConstants;
54571
54571
  * WebRTC Module (WebRTC signaling provider)
54572
54572
  */
54573
54573
 
54574
- require('strophe.js');
54574
+ // require('strophe.js');
54575
+ // Try to load the UMD build that works with Node/CommonJS
54576
+ var __stropheMod;
54577
+ try {
54578
+ __stropheMod = require('strophe.js/dist/strophe.umd.js');
54579
+ } catch (e) {
54580
+ // Fallback: load default entry if the path above is not available
54581
+ __stropheMod = require('strophe.js');
54582
+ }
54583
+
54584
+ // Normalize possible export shapes
54585
+ // Strophe can be exported as { Strophe }, default, or the module itself
54586
+ var Strophe =
54587
+ (__stropheMod && (__stropheMod.Strophe || __stropheMod.default || __stropheMod)) || undefined;
54588
+
54589
+ // Basic guard: make sure the Connection class exists
54590
+ if (!Strophe || !Strophe.Connection) {
54591
+ throw new Error('[QBChat] Strophe import failed: Connection class not found');
54592
+ }
54593
+ // ---------------------------------------------------------------------------
54575
54594
 
54576
54595
  var SignalingConstants = require('./qbWebRTCSignalingConstants');
54577
54596
 
@@ -54721,7 +54740,7 @@ function WebRTCSignalingProcessor(service, delegate) {
54721
54740
 
54722
54741
  module.exports = WebRTCSignalingProcessor;
54723
54742
 
54724
- },{"./qbWebRTCSignalingConstants":251,"strophe.js":211}],253:[function(require,module,exports){
54743
+ },{"./qbWebRTCSignalingConstants":251,"strophe.js":211,"strophe.js/dist/strophe.umd.js":211}],253:[function(require,module,exports){
54725
54744
  'use strict';
54726
54745
 
54727
54746
  /** JSHint inline rules */
@@ -54732,7 +54751,26 @@ module.exports = WebRTCSignalingProcessor;
54732
54751
  * WebRTC Module (WebRTC signaling processor)
54733
54752
  */
54734
54753
 
54735
- require('strophe.js');
54754
+ // require('strophe.js');
54755
+ // Try to load the UMD build that works with Node/CommonJS
54756
+ var __stropheMod;
54757
+ try {
54758
+ __stropheMod = require('strophe.js/dist/strophe.umd.js');
54759
+ } catch (e) {
54760
+ // Fallback: load default entry if the path above is not available
54761
+ __stropheMod = require('strophe.js');
54762
+ }
54763
+
54764
+ // Normalize possible export shapes
54765
+ // Strophe can be exported as { Strophe }, default, or the module itself
54766
+ var Strophe =
54767
+ (__stropheMod && (__stropheMod.Strophe || __stropheMod.default || __stropheMod)) || undefined;
54768
+
54769
+ // Basic guard: make sure the Connection class exists
54770
+ if (!Strophe || !Strophe.Connection) {
54771
+ throw new Error('[QBChat] Strophe import failed: Connection class not found');
54772
+ }
54773
+ // ---------------------------------------------------------------------------
54736
54774
 
54737
54775
  var Helpers = require('./qbWebRTCHelpers');
54738
54776
  var SignalingConstants = require('./qbWebRTCSignalingConstants');
@@ -54828,7 +54866,7 @@ WebRTCSignalingProvider.prototype._JStoXML = function (title, obj, msg) {
54828
54866
 
54829
54867
  module.exports = WebRTCSignalingProvider;
54830
54868
 
54831
- },{"../../qbConfig":255,"../../qbUtils":259,"./qbWebRTCHelpers":249,"./qbWebRTCSignalingConstants":251,"strophe.js":211}],254:[function(require,module,exports){
54869
+ },{"../../qbConfig":255,"../../qbUtils":259,"./qbWebRTCHelpers":249,"./qbWebRTCSignalingConstants":251,"strophe.js":211,"strophe.js/dist/strophe.umd.js":211}],254:[function(require,module,exports){
54832
54870
  'use strict';
54833
54871
 
54834
54872
  /**
@@ -55080,8 +55118,8 @@ module.exports = StreamManagement;
55080
55118
  */
55081
55119
 
55082
55120
  var config = {
55083
- version: '2.21.0',
55084
- buildNumber: '1167',
55121
+ version: '2.21.1-alpha.1',
55122
+ buildNumber: '1168',
55085
55123
  creds: {
55086
55124
  'appId': 0,
55087
55125
  'authKey': '',
@@ -55210,11 +55248,11 @@ module.exports = config;
55210
55248
  */
55211
55249
  var config = require('./qbConfig');
55212
55250
  var Utils = require('./qbUtils');
55213
- const MessageProxy = require("./modules/chat/qbMessage");
55214
- const Chat = require("./modules/chat/qbChat");
55215
- const DialogProxy = require("./modules/chat/qbDialog");
55216
- const WebRTCClient = require("./modules/webrtc/qbWebRTCClient");
55217
- const PushNotifications = require("./modules/qbPushNotifications");
55251
+ // const MessageProxy = require("./modules/chat/qbMessage");
55252
+ // const Chat = require("./modules/chat/qbChat");
55253
+ // const DialogProxy = require("./modules/chat/qbDialog");
55254
+ // const WebRTCClient = require("./modules/webrtc/qbWebRTCClient");
55255
+ // const PushNotifications = require("./modules/qbPushNotifications");
55218
55256
 
55219
55257
  // Actual QuickBlox API starts here
55220
55258
  function QuickBlox() {}
@@ -55970,12 +56008,36 @@ module.exports = ServiceProxy;
55970
56008
  * Strophe Connection Object
55971
56009
  */
55972
56010
 
55973
- require('strophe.js');
56011
+ // require('strophe.js');
56012
+
56013
+ // ---- Strophe import (UMD-first with safe fallback) -------------------------
56014
+ // Try to load the UMD build that works with Node/CommonJS
56015
+ var __stropheMod;
56016
+ try {
56017
+ __stropheMod = require('strophe.js/dist/strophe.umd.js');
56018
+ } catch (e) {
56019
+ // Fallback: load default entry if the path above is not available
56020
+ __stropheMod = require('strophe.js');
56021
+ }
56022
+
56023
+ // Normalize possible export shapes
56024
+ // Strophe can be exported as { Strophe }, default, or the module itself
56025
+ var Strophe =
56026
+ (__stropheMod && (__stropheMod.Strophe || __stropheMod.default || __stropheMod)) || undefined;
56027
+
56028
+ // Basic guard: make sure the Connection class exists
56029
+ if (!Strophe || !Strophe.Connection) {
56030
+ throw new Error('[QBChat] Strophe import failed: Connection class not found');
56031
+ }
56032
+ // ---------------------------------------------------------------------------
55974
56033
 
55975
56034
  var config = require('./qbConfig');
55976
56035
  var chatPRTCL = config.chatProtocol;
55977
56036
  var Utils = require('./qbUtils');
55978
56037
 
56038
+
56039
+
56040
+
55979
56041
  function Connection(onLogListenerCallback) {
55980
56042
  var protocol = chatPRTCL.active === 1 ? chatPRTCL.bosh : chatPRTCL.websocket;
55981
56043
  var conn = new Strophe.Connection(protocol);
@@ -56039,7 +56101,7 @@ function Connection(onLogListenerCallback) {
56039
56101
 
56040
56102
  module.exports = Connection;
56041
56103
 
56042
- },{"./qbConfig":255,"./qbUtils":259,"strophe.js":211}],259:[function(require,module,exports){
56104
+ },{"./qbConfig":255,"./qbUtils":259,"strophe.js":211,"strophe.js/dist/strophe.umd.js":211}],259:[function(require,module,exports){
56043
56105
  (function (global){(function (){
56044
56106
  /* eslint no-console: 2 */
56045
56107
 
@@ -5,7 +5,26 @@
5
5
  * WebRTC Module (WebRTC signaling provider)
6
6
  */
7
7
 
8
- require('strophe.js');
8
+ // require('strophe.js');
9
+ // Try to load the UMD build that works with Node/CommonJS
10
+ var __stropheMod;
11
+ try {
12
+ __stropheMod = require('strophe.js/dist/strophe.umd.js');
13
+ } catch (e) {
14
+ // Fallback: load default entry if the path above is not available
15
+ __stropheMod = require('strophe.js');
16
+ }
17
+
18
+ // Normalize possible export shapes
19
+ // Strophe can be exported as { Strophe }, default, or the module itself
20
+ var Strophe =
21
+ (__stropheMod && (__stropheMod.Strophe || __stropheMod.default || __stropheMod)) || undefined;
22
+
23
+ // Basic guard: make sure the Connection class exists
24
+ if (!Strophe || !Strophe.Connection) {
25
+ throw new Error('[QBChat] Strophe import failed: Connection class not found');
26
+ }
27
+ // ---------------------------------------------------------------------------
9
28
 
10
29
  var SignalingConstants = require('./qbWebRTCSignalingConstants');
11
30
 
@@ -8,7 +8,26 @@
8
8
  * WebRTC Module (WebRTC signaling processor)
9
9
  */
10
10
 
11
- require('strophe.js');
11
+ // require('strophe.js');
12
+ // Try to load the UMD build that works with Node/CommonJS
13
+ var __stropheMod;
14
+ try {
15
+ __stropheMod = require('strophe.js/dist/strophe.umd.js');
16
+ } catch (e) {
17
+ // Fallback: load default entry if the path above is not available
18
+ __stropheMod = require('strophe.js');
19
+ }
20
+
21
+ // Normalize possible export shapes
22
+ // Strophe can be exported as { Strophe }, default, or the module itself
23
+ var Strophe =
24
+ (__stropheMod && (__stropheMod.Strophe || __stropheMod.default || __stropheMod)) || undefined;
25
+
26
+ // Basic guard: make sure the Connection class exists
27
+ if (!Strophe || !Strophe.Connection) {
28
+ throw new Error('[QBChat] Strophe import failed: Connection class not found');
29
+ }
30
+ // ---------------------------------------------------------------------------
12
31
 
13
32
  var Helpers = require('./qbWebRTCHelpers');
14
33
  var SignalingConstants = require('./qbWebRTCSignalingConstants');
package/src/qbConfig.js CHANGED
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  var config = {
15
- version: '2.21.0',
16
- buildNumber: '1167',
15
+ version: '2.21.1-alpha.1',
16
+ buildNumber: '1168',
17
17
  creds: {
18
18
  'appId': 0,
19
19
  'authKey': '',
package/src/qbMain.js CHANGED
@@ -8,11 +8,11 @@
8
8
  */
9
9
  var config = require('./qbConfig');
10
10
  var Utils = require('./qbUtils');
11
- const MessageProxy = require("./modules/chat/qbMessage");
12
- const Chat = require("./modules/chat/qbChat");
13
- const DialogProxy = require("./modules/chat/qbDialog");
14
- const WebRTCClient = require("./modules/webrtc/qbWebRTCClient");
15
- const PushNotifications = require("./modules/qbPushNotifications");
11
+ // const MessageProxy = require("./modules/chat/qbMessage");
12
+ // const Chat = require("./modules/chat/qbChat");
13
+ // const DialogProxy = require("./modules/chat/qbDialog");
14
+ // const WebRTCClient = require("./modules/webrtc/qbWebRTCClient");
15
+ // const PushNotifications = require("./modules/qbPushNotifications");
16
16
 
17
17
  // Actual QuickBlox API starts here
18
18
  function QuickBlox() {}
package/src/qbStrophe.js CHANGED
@@ -7,12 +7,36 @@
7
7
  * Strophe Connection Object
8
8
  */
9
9
 
10
- require('strophe.js');
10
+ // require('strophe.js');
11
+
12
+ // ---- Strophe import (UMD-first with safe fallback) -------------------------
13
+ // Try to load the UMD build that works with Node/CommonJS
14
+ var __stropheMod;
15
+ try {
16
+ __stropheMod = require('strophe.js/dist/strophe.umd.js');
17
+ } catch (e) {
18
+ // Fallback: load default entry if the path above is not available
19
+ __stropheMod = require('strophe.js');
20
+ }
21
+
22
+ // Normalize possible export shapes
23
+ // Strophe can be exported as { Strophe }, default, or the module itself
24
+ var Strophe =
25
+ (__stropheMod && (__stropheMod.Strophe || __stropheMod.default || __stropheMod)) || undefined;
26
+
27
+ // Basic guard: make sure the Connection class exists
28
+ if (!Strophe || !Strophe.Connection) {
29
+ throw new Error('[QBChat] Strophe import failed: Connection class not found');
30
+ }
31
+ // ---------------------------------------------------------------------------
11
32
 
12
33
  var config = require('./qbConfig');
13
34
  var chatPRTCL = config.chatProtocol;
14
35
  var Utils = require('./qbUtils');
15
36
 
37
+
38
+
39
+
16
40
  function Connection(onLogListenerCallback) {
17
41
  var protocol = chatPRTCL.active === 1 ? chatPRTCL.bosh : chatPRTCL.websocket;
18
42
  var conn = new Strophe.Connection(protocol);