quickblox 2.17.9-logger → 2.19.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.
Files changed (124) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +1 -2
  3. package/package.json +2 -1
  4. package/quickblox.js +111 -7055
  5. package/quickblox.min.js +1 -1
  6. package/src/modules/chat/qbChat.js +17 -27
  7. package/src/modules/webrtc/qbWebRTCSignalingProcessor.js +1 -2
  8. package/src/modules/webrtc/qbWebRTCSignalingProvider.js +1 -2
  9. package/src/qbConfig.js +2 -2
  10. package/src/qbStrophe.js +49 -59
  11. package/{src/libs/strophe → strophejs-1.4.0/dist}/strophe.common.js +14 -14
  12. package/{src/libs/strophe → strophejs-1.4.0/dist}/strophe.esm.js +14 -14
  13. package/{src/libs/strophe → strophejs-1.4.0/dist}/strophe.umd.js +17 -17
  14. package/strophejs-1.4.0/dist/strophe.umd.min.js +1 -0
  15. package/src/libs/strophe/strophe.umd.min.js +0 -1
  16. package/strophejs-1.4.0/.eslintrc.json +0 -264
  17. package/strophejs-1.4.0/.gitattributes +0 -1
  18. package/strophejs-1.4.0/CHANGELOG.md +0 -250
  19. package/strophejs-1.4.0/LICENSE.txt +0 -19
  20. package/strophejs-1.4.0/Makefile +0 -92
  21. package/strophejs-1.4.0/README.md +0 -45
  22. package/strophejs-1.4.0/RELEASE_CHECKLIST.md +0 -16
  23. package/strophejs-1.4.0/contrib/discojs/README.txt +0 -42
  24. package/strophejs-1.4.0/contrib/discojs/css/disco.css +0 -16
  25. package/strophejs-1.4.0/contrib/discojs/index.html +0 -47
  26. package/strophejs-1.4.0/contrib/discojs/punjab.tac +0 -18
  27. package/strophejs-1.4.0/contrib/discojs/scripts/basic.js +0 -102
  28. package/strophejs-1.4.0/contrib/discojs/scripts/disco.js +0 -60
  29. package/strophejs-1.4.0/docs.css +0 -797
  30. package/strophejs-1.4.0/examples/amd.html +0 -21
  31. package/strophejs-1.4.0/examples/attach/README +0 -37
  32. package/strophejs-1.4.0/examples/attach/__init__.py +0 -0
  33. package/strophejs-1.4.0/examples/attach/attacher/__init__.py +0 -0
  34. package/strophejs-1.4.0/examples/attach/attacher/views.py +0 -18
  35. package/strophejs-1.4.0/examples/attach/boshclient.py +0 -158
  36. package/strophejs-1.4.0/examples/attach/manage.py +0 -11
  37. package/strophejs-1.4.0/examples/attach/settings.py +0 -85
  38. package/strophejs-1.4.0/examples/attach/templates/attacher/index.html +0 -88
  39. package/strophejs-1.4.0/examples/attach/urls.py +0 -19
  40. package/strophejs-1.4.0/examples/basic.html +0 -23
  41. package/strophejs-1.4.0/examples/basic.js +0 -73
  42. package/strophejs-1.4.0/examples/echobot.html +0 -25
  43. package/strophejs-1.4.0/examples/echobot.js +0 -79
  44. package/strophejs-1.4.0/examples/main.js +0 -59
  45. package/strophejs-1.4.0/examples/prebind.html +0 -39
  46. package/strophejs-1.4.0/examples/prebind.js +0 -103
  47. package/strophejs-1.4.0/examples/restore.html +0 -24
  48. package/strophejs-1.4.0/examples/restore.js +0 -71
  49. package/strophejs-1.4.0/package-lock.json +0 -8634
  50. package/strophejs-1.4.0/package.json +0 -84
  51. package/strophejs-1.4.0/rollup.config.js +0 -76
  52. package/strophejs-1.4.0/src/bosh.js +0 -916
  53. package/strophejs-1.4.0/src/core.js +0 -3535
  54. package/strophejs-1.4.0/src/md5.js +0 -204
  55. package/strophejs-1.4.0/src/sha1.js +0 -172
  56. package/strophejs-1.4.0/src/shared-connection-worker.js +0 -114
  57. package/strophejs-1.4.0/src/shims.js +0 -123
  58. package/strophejs-1.4.0/src/strophe.js +0 -14
  59. package/strophejs-1.4.0/src/utils.js +0 -63
  60. package/strophejs-1.4.0/src/websocket.js +0 -561
  61. package/strophejs-1.4.0/src/worker-websocket.js +0 -152
  62. package/strophejs-1.4.0/tests/index.html +0 -21
  63. package/strophejs-1.4.0/tests/main.js +0 -49
  64. package/strophejs-1.4.0/tests/tests.js +0 -929
  65. package/strophejs-1.6.1/.eslintrc.json +0 -264
  66. package/strophejs-1.6.1/.gitattributes +0 -1
  67. package/strophejs-1.6.1/.nvmrc +0 -1
  68. package/strophejs-1.6.1/CHANGELOG.md +0 -288
  69. package/strophejs-1.6.1/LICENSE.txt +0 -19
  70. package/strophejs-1.6.1/Makefile +0 -92
  71. package/strophejs-1.6.1/README.md +0 -46
  72. package/strophejs-1.6.1/RELEASE_CHECKLIST.md +0 -18
  73. package/strophejs-1.6.1/babel.config.json +0 -10
  74. package/strophejs-1.6.1/contrib/discojs/README.txt +0 -42
  75. package/strophejs-1.6.1/contrib/discojs/css/disco.css +0 -16
  76. package/strophejs-1.6.1/contrib/discojs/index.html +0 -47
  77. package/strophejs-1.6.1/contrib/discojs/punjab.tac +0 -18
  78. package/strophejs-1.6.1/contrib/discojs/scripts/basic.js +0 -102
  79. package/strophejs-1.6.1/contrib/discojs/scripts/disco.js +0 -60
  80. package/strophejs-1.6.1/docs.css +0 -797
  81. package/strophejs-1.6.1/examples/amd.html +0 -21
  82. package/strophejs-1.6.1/examples/attach/README +0 -37
  83. package/strophejs-1.6.1/examples/attach/__init__.py +0 -0
  84. package/strophejs-1.6.1/examples/attach/attacher/__init__.py +0 -0
  85. package/strophejs-1.6.1/examples/attach/attacher/views.py +0 -18
  86. package/strophejs-1.6.1/examples/attach/boshclient.py +0 -158
  87. package/strophejs-1.6.1/examples/attach/manage.py +0 -11
  88. package/strophejs-1.6.1/examples/attach/settings.py +0 -85
  89. package/strophejs-1.6.1/examples/attach/templates/attacher/index.html +0 -88
  90. package/strophejs-1.6.1/examples/attach/urls.py +0 -19
  91. package/strophejs-1.6.1/examples/basic.html +0 -23
  92. package/strophejs-1.6.1/examples/basic.js +0 -73
  93. package/strophejs-1.6.1/examples/echobot.html +0 -25
  94. package/strophejs-1.6.1/examples/echobot.js +0 -79
  95. package/strophejs-1.6.1/examples/main.js +0 -59
  96. package/strophejs-1.6.1/examples/prebind.html +0 -39
  97. package/strophejs-1.6.1/examples/prebind.js +0 -103
  98. package/strophejs-1.6.1/examples/restore.html +0 -24
  99. package/strophejs-1.6.1/examples/restore.js +0 -71
  100. package/strophejs-1.6.1/package-lock.json +0 -18461
  101. package/strophejs-1.6.1/package.json +0 -87
  102. package/strophejs-1.6.1/rollup.config.js +0 -70
  103. package/strophejs-1.6.1/src/bosh.js +0 -916
  104. package/strophejs-1.6.1/src/builder.js +0 -239
  105. package/strophejs-1.6.1/src/constants.js +0 -155
  106. package/strophejs-1.6.1/src/core.js +0 -2377
  107. package/strophejs-1.6.1/src/sasl-anon.js +0 -17
  108. package/strophejs-1.6.1/src/sasl-external.js +0 -27
  109. package/strophejs-1.6.1/src/sasl-oauthbearer.js +0 -30
  110. package/strophejs-1.6.1/src/sasl-plain.js +0 -32
  111. package/strophejs-1.6.1/src/sasl-sha1.js +0 -24
  112. package/strophejs-1.6.1/src/sasl-sha256.js +0 -24
  113. package/strophejs-1.6.1/src/sasl-sha384.js +0 -24
  114. package/strophejs-1.6.1/src/sasl-sha512.js +0 -24
  115. package/strophejs-1.6.1/src/sasl-xoauth2.js +0 -27
  116. package/strophejs-1.6.1/src/sasl.js +0 -143
  117. package/strophejs-1.6.1/src/scram.js +0 -182
  118. package/strophejs-1.6.1/src/shared-connection-worker.js +0 -114
  119. package/strophejs-1.6.1/src/shims.js +0 -122
  120. package/strophejs-1.6.1/src/strophe.js +0 -15
  121. package/strophejs-1.6.1/src/utils.js +0 -626
  122. package/strophejs-1.6.1/src/websocket.js +0 -556
  123. package/strophejs-1.6.1/src/worker-websocket.js +0 -149
  124. package/strophejs-1.6.1/tests.js +0 -993
@@ -1,152 +0,0 @@
1
- /*
2
- This program is distributed under the terms of the MIT license.
3
- Please see the LICENSE file for details.
4
-
5
- Copyright 2020, JC Brand
6
- */
7
-
8
- import './websocket.js';
9
- import { $build, Strophe } from './core.js';
10
-
11
- const lmap = {};
12
- lmap['debug'] = Strophe.LogLevel.DEBUG;
13
- lmap['info'] = Strophe.LogLevel.INFO;
14
- lmap['warn'] = Strophe.LogLevel.WARN;
15
- lmap['error'] = Strophe.LogLevel.ERROR;
16
- lmap['fatal'] = Strophe.LogLevel.FATAL;
17
-
18
-
19
- /** Class: Strophe.WorkerWebsocket
20
- * _Private_ helper class that handles a websocket connection inside a shared worker.
21
- */
22
- Strophe.WorkerWebsocket = class WorkerWebsocket extends Strophe.Websocket {
23
-
24
- /** PrivateConstructor: Strophe.WorkerWebsocket
25
- * Create and initialize a Strophe.WorkerWebsocket object.
26
- *
27
- * Parameters:
28
- * (Strophe.Connection) connection - The Strophe.Connection
29
- *
30
- * Returns:
31
- * A new Strophe.WorkerWebsocket object.
32
- */
33
- constructor (connection) {
34
- super(connection);
35
- this._conn = connection;
36
- this.worker = new SharedWorker(this._conn.options.worker, 'Strophe XMPP Connection');
37
- this.worker.onerror = (e) => {
38
- console?.error(e);
39
- Strophe.log(Strophe.LogLevel.ERROR, `Shared Worker Error: ${e}`);
40
- }
41
- }
42
-
43
- get socket () {
44
- return {
45
- 'send': str => this.worker.port.postMessage(['send', str])
46
- }
47
- }
48
-
49
- _connect () {
50
- this._messageHandler = (m) => this._onInitialMessage(m);
51
- this.worker.port.start();
52
- this.worker.port.onmessage = (ev) => this._onWorkerMessage(ev);
53
- this.worker.port.postMessage(['_connect', this._conn.service, this._conn.jid]);
54
- if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
55
- }
56
-
57
- _attach (callback) {
58
- this._messageHandler = (m) => this._onMessage(m);
59
- this._conn.connect_callback = callback;
60
- this.worker.port.start();
61
- this.worker.port.onmessage = (ev) => this._onWorkerMessage(ev);
62
- this.worker.port.postMessage(['_attach', this._conn.service]);
63
- }
64
-
65
- _attachCallback (status, jid) {
66
- if (status === Strophe.Status.ATTACHED) {
67
- this._conn.jid = jid;
68
- this._conn.authenticated = true;
69
- this._conn.connected = true;
70
- this._conn.restored = true;
71
- this._conn._changeConnectStatus(Strophe.Status.ATTACHED);
72
- } else if (status === Strophe.Status.ATTACHFAIL) {
73
- this._conn.authenticated = false;
74
- this._conn.connected = false;
75
- this._conn.restored = false;
76
- this._conn._changeConnectStatus(Strophe.Status.ATTACHFAIL);
77
- }
78
- }
79
-
80
- _disconnect (readyState, pres) {
81
- pres && this._conn.send(pres);
82
- const close = $build("close", { "xmlns": Strophe.NS.FRAMING });
83
- this._conn.xmlOutput(close.tree());
84
- const closeString = Strophe.serialize(close);
85
- this._conn.rawOutput(closeString);
86
- this.worker.port.postMessage(['send', closeString]);
87
- this._conn._doDisconnect();
88
- }
89
-
90
- _onClose (e) {
91
- if (this._conn.connected && !this._conn.disconnecting) {
92
- Strophe.error("Websocket closed unexpectedly");
93
- if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
94
- this._conn._doDisconnect();
95
- } else if (e && e.code === 1006 && !this._conn.connected) {
96
- // in case the onError callback was not called (Safari 10 does not
97
- // call onerror when the initial connection fails) we need to
98
- // dispatch a CONNFAIL status update to be consistent with the
99
- // behavior on other browsers.
100
- Strophe.error("Websocket closed unexcectedly");
101
- if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
102
- this._conn._changeConnectStatus(
103
- Strophe.Status.CONNFAIL,
104
- "The WebSocket connection could not be established or was disconnected."
105
- );
106
- this._conn._doDisconnect();
107
- } else {
108
- Strophe.debug("Websocket closed");
109
- }
110
- }
111
-
112
- _closeSocket () {
113
- this.worker.port.postMessage(['_closeSocket']);
114
- }
115
-
116
- /** PrivateFunction: _replaceMessageHandler
117
- *
118
- * Called by _onInitialMessage in order to replace itself with the general message handler.
119
- * This method is overridden by Strophe.WorkerWebsocket, which manages a
120
- * websocket connection via a service worker and doesn't have direct access
121
- * to the socket.
122
- */
123
- _replaceMessageHandler () {
124
- this._messageHandler = (m) => this._onMessage(m);
125
- }
126
-
127
- /** PrivateFunction: _onWorkerMessage
128
- * _Private_ function that handles messages received from the service worker
129
- */
130
- _onWorkerMessage (ev) {
131
- const { data } = ev;
132
- const method_name = data[0];
133
- if (method_name === '_onMessage') {
134
- this._messageHandler(data[1]);
135
- } else if (method_name in this) {
136
- try {
137
- this[method_name].apply(this, ev.data.slice(1));
138
- } catch (e) {
139
- Strophe.log(Strophe.LogLevel.ERROR, e);
140
- }
141
- } else if (method_name === 'log') {
142
- const level = data[1];
143
- const msg = data[2]
144
- Strophe.log(lmap[level], msg);
145
- } else {
146
- Strophe.log(
147
- Strophe.LogLevel.ERROR,
148
- `Found unhandled service worker message: ${data}`
149
- );
150
- }
151
- }
152
- }
@@ -1,21 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css" type="text/css">
5
- <title>Strophe.js Tests</title>
6
- </head>
7
- <body>
8
- <h1 id="qunit-header">Strophe.js Tests</h1>
9
- <h2 id="qunit-banner"></h2>
10
- <h2 id="qunit-userAgent"></h2>
11
- <div id="qunit"></div>
12
- <div id="qunit-fixture"></div>
13
- <ol id="qunit-tests"></ol>
14
- <div id="main"></div>
15
- <div id="qunit-testresult"></div>
16
- <script src="../node_modules/qunitjs/qunit/qunit.js"></script>
17
- <script>QUnit.config.autostart = false;</script>
18
- <!-- <script src="../main.js"></script> -->
19
- <script src="../node_modules/requirejs/require.js" data-main="main.js"></script>
20
- </body>
21
- </html>
@@ -1,49 +0,0 @@
1
- require.config({
2
- baseUrl: '../',
3
- paths: {
4
- "strophe": "dist/strophe.umd",
5
-
6
- // Examples
7
- "basic": "examples/basic",
8
-
9
- // Tests
10
- "jquery": "node_modules/jquery/dist/jquery",
11
- "sinon": "node_modules/sinon/pkg/sinon",
12
- "sinon-qunit": "node_modules/sinon-qunit/lib/sinon-qunit",
13
- "tests": "tests/tests"
14
- },
15
-
16
- shim: {
17
- 'sinon-qunit': { deps: ['sinon']}
18
- }
19
- });
20
-
21
- require(["tests", "strophe"], function (tests, Strophe) {
22
- window.Strophe = Strophe;
23
-
24
- QUnit.done(function (details) {
25
- console.log("Total: "+details.total+" Failed: "+details.failed+" Passed: "+details.passed+" Runtime: "+details.runtime);
26
- console.log("All tests completed!");
27
- });
28
-
29
- QUnit.testDone(function (details) {
30
- var result = {
31
- "Module name": details.module,
32
- "Test name": details.name,
33
- "Assertions": {
34
- "Total": details.total,
35
- "Passed": details.passed,
36
- "Failed": details.failed
37
- },
38
- "Skipped": details.skipped,
39
- "Todo": details.todo,
40
- "Runtime": details.runtime
41
- };
42
- console.log(JSON.stringify(result, null, 2));
43
- });
44
-
45
- QUnit.start();
46
- QUnit.begin(function (details) {
47
- tests.run();
48
- });
49
- });