@webex/calling 3.12.0-mobius-socket.9 → 3.12.0-mobius-socket.11
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/CallingClient/CallingClient.test.js +2 -2
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +1 -1
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +1 -1
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +1 -1
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/utils/request.js +2 -2
- package/dist/CallingClient/utils/request.js.map +1 -1
- package/dist/mobius-socket/config.js +61 -0
- package/dist/mobius-socket/config.js.map +1 -0
- package/dist/mobius-socket/errors.js +106 -0
- package/dist/mobius-socket/errors.js.map +1 -0
- package/dist/mobius-socket/index.js +101 -0
- package/dist/mobius-socket/index.js.map +1 -0
- package/dist/mobius-socket/mobius-socket-events.test.js +511 -0
- package/dist/mobius-socket/mobius-socket-events.test.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.js +1191 -0
- package/dist/mobius-socket/mobius-socket.js.map +1 -0
- package/dist/mobius-socket/mobius-socket.test.js +2107 -0
- package/dist/mobius-socket/mobius-socket.test.js.map +1 -0
- package/dist/mobius-socket/socket/constants.js +20 -0
- package/dist/mobius-socket/socket/constants.js.map +1 -0
- package/dist/mobius-socket/socket/index.js +15 -0
- package/dist/mobius-socket/socket/index.js.map +1 -0
- package/dist/mobius-socket/socket/socket-base.js +632 -0
- package/dist/mobius-socket/socket/socket-base.js.map +1 -0
- package/dist/mobius-socket/socket/socket.js +19 -0
- package/dist/mobius-socket/socket/socket.js.map +1 -0
- package/dist/mobius-socket/socket/socket.shim.js +36 -0
- package/dist/mobius-socket/socket/socket.shim.js.map +1 -0
- package/dist/mobius-socket/socket.test.js +752 -0
- package/dist/mobius-socket/socket.test.js.map +1 -0
- package/dist/mobius-socket/test/mocha-helpers.js +23 -0
- package/dist/mobius-socket/test/mocha-helpers.js.map +1 -0
- package/dist/mobius-socket/test/promise-tick.js +29 -0
- package/dist/mobius-socket/test/promise-tick.js.map +1 -0
- package/dist/module/CallingClient/utils/request.js +1 -1
- package/dist/module/mobius-socket/config.js +18 -0
- package/dist/module/mobius-socket/errors.js +30 -0
- package/dist/module/mobius-socket/index.js +24 -0
- package/dist/module/mobius-socket/mobius-socket.js +761 -0
- package/dist/module/mobius-socket/socket/constants.js +10 -0
- package/dist/module/mobius-socket/socket/index.js +4 -0
- package/dist/module/mobius-socket/socket/socket-base.js +374 -0
- package/dist/module/mobius-socket/socket/socket.js +9 -0
- package/dist/module/mobius-socket/socket/socket.shim.js +24 -0
- package/dist/types/mobius-socket/config.d.ts +15 -0
- package/dist/types/mobius-socket/config.d.ts.map +1 -0
- package/dist/types/mobius-socket/errors.d.ts +13 -0
- package/dist/types/mobius-socket/errors.d.ts.map +1 -0
- package/dist/types/mobius-socket/index.d.ts +9 -0
- package/dist/types/mobius-socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts +62 -0
- package/dist/types/mobius-socket/mobius-socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/constants.d.ts +11 -0
- package/dist/types/mobius-socket/socket/constants.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/index.d.ts +2 -0
- package/dist/types/mobius-socket/socket/index.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts +38 -0
- package/dist/types/mobius-socket/socket/socket-base.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.d.ts +3 -0
- package/dist/types/mobius-socket/socket/socket.d.ts.map +1 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts +3 -0
- package/dist/types/mobius-socket/socket/socket.shim.d.ts.map +1 -0
- package/package.json +17 -5
- package/src/mobius-socket/socket/socket.js +13 -0
- package/src/mobius-socket/socket/socket.shim.js +31 -0
package/package.json
CHANGED
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"url": "https://github.com/webex/webex-js-sdk.git",
|
|
21
21
|
"directory": "packages/calling"
|
|
22
22
|
},
|
|
23
|
+
"browser": {
|
|
24
|
+
"./dist/module/mobius-socket/socket/socket.js": "./dist/module/mobius-socket/socket/socket.shim.js",
|
|
25
|
+
"./src/mobius-socket/socket/socket.js": "./src/mobius-socket/socket/socket.shim.js"
|
|
26
|
+
},
|
|
23
27
|
"engines": {
|
|
24
28
|
"node": ">=18"
|
|
25
29
|
},
|
|
@@ -40,15 +44,20 @@
|
|
|
40
44
|
},
|
|
41
45
|
"dependencies": {
|
|
42
46
|
"@types/platform": "1.3.4",
|
|
47
|
+
"@webex/common": "3.12.0-mobius-socket.1",
|
|
48
|
+
"@webex/common-timers": "3.12.0-mobius-socket.1",
|
|
43
49
|
"@webex/internal-media-core": "2.23.3",
|
|
44
|
-
"@webex/internal-plugin-
|
|
45
|
-
"@webex/internal-plugin-
|
|
46
|
-
"@webex/
|
|
50
|
+
"@webex/internal-plugin-device": "3.12.0-mobius-socket.2",
|
|
51
|
+
"@webex/internal-plugin-feature": "3.12.0-mobius-socket.2",
|
|
52
|
+
"@webex/internal-plugin-metrics": "3.12.0-mobius-socket.2",
|
|
53
|
+
"@webex/media-helpers": "3.12.0-mobius-socket.1",
|
|
47
54
|
"async-mutex": "0.4.0",
|
|
55
|
+
"backoff": "2.5.0",
|
|
48
56
|
"buffer": "6.0.3",
|
|
49
|
-
"
|
|
57
|
+
"lodash": "^4.17.21",
|
|
50
58
|
"platform": "1.3.6",
|
|
51
59
|
"uuid": "8.3.2",
|
|
60
|
+
"ws": "8.17.1",
|
|
52
61
|
"xstate": "4.30.6"
|
|
53
62
|
},
|
|
54
63
|
"devDependencies": {
|
|
@@ -68,6 +77,8 @@
|
|
|
68
77
|
"@typescript-eslint/eslint-plugin": "5.38.1",
|
|
69
78
|
"@typescript-eslint/parser": "5.38.1",
|
|
70
79
|
"@web/dev-server": "0.4.5",
|
|
80
|
+
"@webex/test-helper-mock-web-socket": "3.12.0-mobius-socket.1",
|
|
81
|
+
"@webex/test-helper-mock-webex": "3.12.0-mobius-socket.1",
|
|
71
82
|
"chai": "4.3.4",
|
|
72
83
|
"cspell": "5.19.2",
|
|
73
84
|
"esbuild": "^0.17.19",
|
|
@@ -80,6 +91,7 @@
|
|
|
80
91
|
"eslint-plugin-prettier": "4.0.0",
|
|
81
92
|
"eslint-plugin-tsdoc": "0.2.14",
|
|
82
93
|
"jest": "29.3.1",
|
|
94
|
+
"jest-html-reporters": "3.0.11",
|
|
83
95
|
"jest-junit": "13.0.0",
|
|
84
96
|
"karma": "6.4.3",
|
|
85
97
|
"karma-chai": "0.1.0",
|
|
@@ -136,5 +148,5 @@
|
|
|
136
148
|
"staticpath": "docs",
|
|
137
149
|
"noprompt": true
|
|
138
150
|
},
|
|
139
|
-
"version": "3.12.0-mobius-socket.
|
|
151
|
+
"version": "3.12.0-mobius-socket.11"
|
|
140
152
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import WS from 'ws';
|
|
6
|
+
|
|
7
|
+
import Socket from './socket-base';
|
|
8
|
+
|
|
9
|
+
Socket.getWebSocketConstructor = function getWebSocketConstructor() {
|
|
10
|
+
return WS;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default Socket;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable no-restricted-globals */
|
|
2
|
+
|
|
3
|
+
/*!
|
|
4
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* eslint-env browser */
|
|
8
|
+
|
|
9
|
+
import Socket from './socket-base';
|
|
10
|
+
|
|
11
|
+
Socket.getWebSocketConstructor = function getWebSocketConstructor() {
|
|
12
|
+
// Grabed from https://github.com/heineiuo/isomorphic-ws/blob/9b977394ac875638c045fd9cf774ed418484b394/browser.js
|
|
13
|
+
let ws;
|
|
14
|
+
|
|
15
|
+
if (typeof WebSocket !== 'undefined') {
|
|
16
|
+
ws = WebSocket;
|
|
17
|
+
} else if (typeof MozWebSocket !== 'undefined') {
|
|
18
|
+
// eslint-disable-next-line no-undef
|
|
19
|
+
ws = MozWebSocket;
|
|
20
|
+
} else if (typeof global !== 'undefined') {
|
|
21
|
+
ws = global.WebSocket || global.MozWebSocket;
|
|
22
|
+
} else if (typeof window !== 'undefined') {
|
|
23
|
+
ws = window.WebSocket || window.MozWebSocket;
|
|
24
|
+
} else if (typeof self !== 'undefined') {
|
|
25
|
+
ws = self.WebSocket || self.MozWebSocket;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return ws;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default Socket;
|