@webex/internal-plugin-mercury 3.0.0-beta.9 → 3.0.0-bnr.2
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 +1 -3
- package/dist/config.js +0 -7
- package/dist/config.js.map +1 -1
- package/dist/errors.js +0 -44
- package/dist/errors.js.map +1 -1
- package/dist/index.js +1 -20
- package/dist/index.js.map +1 -1
- package/dist/mercury.js +29 -148
- package/dist/mercury.js.map +1 -1
- package/dist/socket/index.js +0 -4
- package/dist/socket/index.js.map +1 -1
- package/dist/socket/socket-base.js +25 -116
- package/dist/socket/socket-base.js.map +1 -1
- package/dist/socket/socket.js +1 -7
- package/dist/socket/socket.js.map +1 -1
- package/dist/socket/socket.shim.js +2 -7
- package/dist/socket/socket.shim.js.map +1 -1
- package/dist/types/config.d.ts +10 -0
- package/dist/types/errors.d.ts +31 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/mercury.d.ts +2 -0
- package/dist/types/socket/index.d.ts +1 -0
- package/dist/types/socket/socket-base.d.ts +120 -0
- package/dist/types/socket/socket.d.ts +2 -0
- package/dist/types/socket/socket.shim.d.ts +2 -0
- package/package.json +14 -14
- package/src/config.js +2 -2
- package/src/errors.js +7 -5
- package/src/index.js +2 -2
- package/src/mercury.js +74 -59
- package/src/socket/socket-base.js +45 -46
- package/src/socket/socket.shim.js +6 -8
- package/test/integration/spec/mercury.js +49 -39
- package/test/integration/spec/sharable-mercury.js +19 -15
- package/test/integration/spec/webex.js +8 -7
- package/test/unit/spec/mercury-events.js +51 -60
- package/test/unit/spec/mercury.js +179 -150
- package/test/unit/spec/socket.js +246 -202
package/README.md
CHANGED
|
@@ -21,14 +21,12 @@ npm install --save @webex/internal-plugin-mercury
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
|
-
|
|
25
24
|
import '@webex/internal-plugin-mercury';
|
|
26
25
|
|
|
27
26
|
import WebexCore from '@webex/webex-core';
|
|
28
27
|
|
|
29
28
|
const webex = new WebexCore();
|
|
30
|
-
webex.internal.mercury.WHATEVER
|
|
31
|
-
|
|
29
|
+
webex.internal.mercury.WHATEVER;
|
|
32
30
|
```
|
|
33
31
|
|
|
34
32
|
## Using A Proxy Agent To Open A Websocket Connection
|
package/dist/config.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
|
|
9
7
|
exports.default = void 0;
|
|
10
|
-
|
|
11
8
|
/*!
|
|
12
9
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
13
10
|
*/
|
|
@@ -18,25 +15,21 @@ var _default = {
|
|
|
18
15
|
* @type {number}
|
|
19
16
|
*/
|
|
20
17
|
pingInterval: process.env.MERCURY_PING_INTERVAL || 15000,
|
|
21
|
-
|
|
22
18
|
/**
|
|
23
19
|
* Milliseconds to wait for a pong before declaring the connection dead
|
|
24
20
|
* @type {number}
|
|
25
21
|
*/
|
|
26
22
|
pongTimeout: process.env.MERCURY_PONG_TIMEOUT || 14000,
|
|
27
|
-
|
|
28
23
|
/**
|
|
29
24
|
* Maximum milliseconds between connection attempts
|
|
30
25
|
* @type {Number}
|
|
31
26
|
*/
|
|
32
27
|
backoffTimeMax: process.env.MERCURY_BACKOFF_TIME_MAX || 32000,
|
|
33
|
-
|
|
34
28
|
/**
|
|
35
29
|
* Initial milliseconds between connection attempts
|
|
36
30
|
* @type {Number}
|
|
37
31
|
*/
|
|
38
32
|
backoffTimeReset: process.env.MERCURY_BACKOFF_TIME_RESET || 1000,
|
|
39
|
-
|
|
40
33
|
/**
|
|
41
34
|
* Milliseconds to wait for a close frame before declaring the socket dead and
|
|
42
35
|
* discarding it
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mercury","pingInterval","process","env","MERCURY_PING_INTERVAL","pongTimeout","MERCURY_PONG_TIMEOUT","backoffTimeMax","MERCURY_BACKOFF_TIME_MAX","backoffTimeReset","MERCURY_BACKOFF_TIME_RESET","forceCloseDelay","MERCURY_FORCE_CLOSE_DELAY"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nexport default {\n mercury: {\n /**\n * Milliseconds between pings sent up the socket\n * @type {number}\n */\n pingInterval: process.env.MERCURY_PING_INTERVAL || 15000,\n /**\n * Milliseconds to wait for a pong before declaring the connection dead\n * @type {number}\n */\n pongTimeout: process.env.MERCURY_PONG_TIMEOUT || 14000,\n /**\n * Maximum milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeMax: process.env.MERCURY_BACKOFF_TIME_MAX || 32000,\n /**\n * Initial milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeReset: process.env.MERCURY_BACKOFF_TIME_RESET || 1000,\n /**\n * Milliseconds to wait for a close frame before declaring the socket dead and\n * discarding it\n * @type {[type]}\n */\n forceCloseDelay: process.env.MERCURY_FORCE_CLOSE_DELAY || 2000
|
|
1
|
+
{"version":3,"names":["mercury","pingInterval","process","env","MERCURY_PING_INTERVAL","pongTimeout","MERCURY_PONG_TIMEOUT","backoffTimeMax","MERCURY_BACKOFF_TIME_MAX","backoffTimeReset","MERCURY_BACKOFF_TIME_RESET","forceCloseDelay","MERCURY_FORCE_CLOSE_DELAY"],"sources":["config.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nexport default {\n mercury: {\n /**\n * Milliseconds between pings sent up the socket\n * @type {number}\n */\n pingInterval: process.env.MERCURY_PING_INTERVAL || 15000,\n /**\n * Milliseconds to wait for a pong before declaring the connection dead\n * @type {number}\n */\n pongTimeout: process.env.MERCURY_PONG_TIMEOUT || 14000,\n /**\n * Maximum milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeMax: process.env.MERCURY_BACKOFF_TIME_MAX || 32000,\n /**\n * Initial milliseconds between connection attempts\n * @type {Number}\n */\n backoffTimeReset: process.env.MERCURY_BACKOFF_TIME_RESET || 1000,\n /**\n * Milliseconds to wait for a close frame before declaring the socket dead and\n * discarding it\n * @type {[type]}\n */\n forceCloseDelay: process.env.MERCURY_FORCE_CLOSE_DELAY || 2000,\n },\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AAFA,eAIe;EACbA,OAAO,EAAE;IACP;AACJ;AACA;AACA;IACIC,YAAY,EAAEC,OAAO,CAACC,GAAG,CAACC,qBAAqB,IAAI,KAAK;IACxD;AACJ;AACA;AACA;IACIC,WAAW,EAAEH,OAAO,CAACC,GAAG,CAACG,oBAAoB,IAAI,KAAK;IACtD;AACJ;AACA;AACA;IACIC,cAAc,EAAEL,OAAO,CAACC,GAAG,CAACK,wBAAwB,IAAI,KAAK;IAC7D;AACJ;AACA;AACA;IACIC,gBAAgB,EAAEP,OAAO,CAACC,GAAG,CAACO,0BAA0B,IAAI,IAAI;IAChE;AACJ;AACA;AACA;AACA;IACIC,eAAe,EAAET,OAAO,CAACC,GAAG,CAACS,yBAAyB,IAAI;EAC5D;AACF,CAAC;AAAA"}
|
package/dist/errors.js
CHANGED
|
@@ -1,50 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
|
4
|
-
|
|
5
4
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
6
|
-
|
|
7
5
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
8
|
-
|
|
9
6
|
_Object$defineProperty(exports, "__esModule", {
|
|
10
7
|
value: true
|
|
11
8
|
});
|
|
12
|
-
|
|
13
9
|
exports.UnknownResponse = exports.NotAuthorized = exports.Forbidden = exports.ConnectionError = exports.BadRequest = void 0;
|
|
14
|
-
|
|
15
10
|
var _defineProperties = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/define-properties"));
|
|
16
|
-
|
|
17
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
18
|
-
|
|
19
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
20
|
-
|
|
21
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
22
|
-
|
|
23
14
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
24
|
-
|
|
25
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
26
|
-
|
|
27
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
28
|
-
|
|
29
17
|
var _common = require("@webex/common");
|
|
30
|
-
|
|
31
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
32
|
-
|
|
33
19
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
34
|
-
|
|
35
20
|
/**
|
|
36
21
|
* Exception thrown when a websocket gets closed
|
|
37
22
|
*/
|
|
38
23
|
var ConnectionError = /*#__PURE__*/function (_Exception) {
|
|
39
24
|
(0, _inherits2.default)(ConnectionError, _Exception);
|
|
40
|
-
|
|
41
25
|
var _super = _createSuper(ConnectionError);
|
|
42
|
-
|
|
43
26
|
function ConnectionError() {
|
|
44
27
|
(0, _classCallCheck2.default)(this, ConnectionError);
|
|
45
28
|
return _super.apply(this, arguments);
|
|
46
29
|
}
|
|
47
|
-
|
|
48
30
|
(0, _createClass2.default)(ConnectionError, [{
|
|
49
31
|
key: "parse",
|
|
50
32
|
value:
|
|
@@ -70,81 +52,57 @@ var ConnectionError = /*#__PURE__*/function (_Exception) {
|
|
|
70
52
|
/**
|
|
71
53
|
* thrown for CloseCode 4400
|
|
72
54
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
55
|
exports.ConnectionError = ConnectionError;
|
|
76
56
|
(0, _defineProperty2.default)(ConnectionError, "defaultMessage", 'Failed to connect to socket');
|
|
77
|
-
|
|
78
57
|
var UnknownResponse = /*#__PURE__*/function (_ConnectionError) {
|
|
79
58
|
(0, _inherits2.default)(UnknownResponse, _ConnectionError);
|
|
80
|
-
|
|
81
59
|
var _super2 = _createSuper(UnknownResponse);
|
|
82
|
-
|
|
83
60
|
function UnknownResponse() {
|
|
84
61
|
(0, _classCallCheck2.default)(this, UnknownResponse);
|
|
85
62
|
return _super2.apply(this, arguments);
|
|
86
63
|
}
|
|
87
|
-
|
|
88
64
|
return (0, _createClass2.default)(UnknownResponse);
|
|
89
65
|
}(ConnectionError);
|
|
90
66
|
/**
|
|
91
67
|
* thrown for CloseCode 4400
|
|
92
68
|
*/
|
|
93
|
-
|
|
94
|
-
|
|
95
69
|
exports.UnknownResponse = UnknownResponse;
|
|
96
70
|
(0, _defineProperty2.default)(UnknownResponse, "defaultMessage", 'UnknownResponse is produced by IE when we receive a 4XXX. You probably want to treat this like a NotFound');
|
|
97
|
-
|
|
98
71
|
var BadRequest = /*#__PURE__*/function (_ConnectionError2) {
|
|
99
72
|
(0, _inherits2.default)(BadRequest, _ConnectionError2);
|
|
100
|
-
|
|
101
73
|
var _super3 = _createSuper(BadRequest);
|
|
102
|
-
|
|
103
74
|
function BadRequest() {
|
|
104
75
|
(0, _classCallCheck2.default)(this, BadRequest);
|
|
105
76
|
return _super3.apply(this, arguments);
|
|
106
77
|
}
|
|
107
|
-
|
|
108
78
|
return (0, _createClass2.default)(BadRequest);
|
|
109
79
|
}(ConnectionError);
|
|
110
80
|
/**
|
|
111
81
|
* thrown for CloseCode 4401
|
|
112
82
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
83
|
exports.BadRequest = BadRequest;
|
|
116
84
|
(0, _defineProperty2.default)(BadRequest, "defaultMessage", 'BadRequest usually implies an attempt to use service account credentials');
|
|
117
|
-
|
|
118
85
|
var NotAuthorized = /*#__PURE__*/function (_ConnectionError3) {
|
|
119
86
|
(0, _inherits2.default)(NotAuthorized, _ConnectionError3);
|
|
120
|
-
|
|
121
87
|
var _super4 = _createSuper(NotAuthorized);
|
|
122
|
-
|
|
123
88
|
function NotAuthorized() {
|
|
124
89
|
(0, _classCallCheck2.default)(this, NotAuthorized);
|
|
125
90
|
return _super4.apply(this, arguments);
|
|
126
91
|
}
|
|
127
|
-
|
|
128
92
|
return (0, _createClass2.default)(NotAuthorized);
|
|
129
93
|
}(ConnectionError);
|
|
130
94
|
/**
|
|
131
95
|
* thrown for CloseCode 4403
|
|
132
96
|
*/
|
|
133
|
-
|
|
134
|
-
|
|
135
97
|
exports.NotAuthorized = NotAuthorized;
|
|
136
98
|
(0, _defineProperty2.default)(NotAuthorized, "defaultMessage", 'Please refresh your access token');
|
|
137
|
-
|
|
138
99
|
var Forbidden = /*#__PURE__*/function (_ConnectionError4) {
|
|
139
100
|
(0, _inherits2.default)(Forbidden, _ConnectionError4);
|
|
140
|
-
|
|
141
101
|
var _super5 = _createSuper(Forbidden);
|
|
142
|
-
|
|
143
102
|
function Forbidden() {
|
|
144
103
|
(0, _classCallCheck2.default)(this, Forbidden);
|
|
145
104
|
return _super5.apply(this, arguments);
|
|
146
105
|
}
|
|
147
|
-
|
|
148
106
|
return (0, _createClass2.default)(Forbidden);
|
|
149
107
|
}(ConnectionError); // /**
|
|
150
108
|
// * thrown for CloseCode 4404
|
|
@@ -152,8 +110,6 @@ var Forbidden = /*#__PURE__*/function (_ConnectionError4) {
|
|
|
152
110
|
// export class NotFound extends ConnectionError {
|
|
153
111
|
// static defaultMessage = `Please refresh your Mercury registration (typically via a WDM refresh)`;
|
|
154
112
|
// }
|
|
155
|
-
|
|
156
|
-
|
|
157
113
|
exports.Forbidden = Forbidden;
|
|
158
114
|
(0, _defineProperty2.default)(Forbidden, "defaultMessage", 'Forbidden usually implies these credentials are not entitled for Webex');
|
|
159
115
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ConnectionError","event","code","value","reason","Exception","UnknownResponse","BadRequest","NotAuthorized","Forbidden"],"sources":["errors.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Exception} from '@webex/common';\n\n/**\n * Exception thrown when a websocket gets closed\n */\nexport class ConnectionError extends Exception {\n static defaultMessage = 'Failed to connect to socket';\n\n /**\n * @param {CloseEvent} event\n * @returns {string}\n */\n parse(event = {}) {\n Object.defineProperties(this, {\n code: {\n value: event.code
|
|
1
|
+
{"version":3,"names":["ConnectionError","event","code","value","reason","Exception","UnknownResponse","BadRequest","NotAuthorized","Forbidden"],"sources":["errors.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Exception} from '@webex/common';\n\n/**\n * Exception thrown when a websocket gets closed\n */\nexport class ConnectionError extends Exception {\n static defaultMessage = 'Failed to connect to socket';\n\n /**\n * @param {CloseEvent} event\n * @returns {string}\n */\n parse(event = {}) {\n Object.defineProperties(this, {\n code: {\n value: event.code,\n },\n reason: {\n value: event.reason,\n },\n });\n\n return event.reason;\n }\n}\n\n/**\n * thrown for CloseCode 4400\n */\nexport class UnknownResponse extends ConnectionError {\n static defaultMessage =\n 'UnknownResponse is produced by IE when we receive a 4XXX. You probably want to treat this like a NotFound';\n}\n\n/**\n * thrown for CloseCode 4400\n */\nexport class BadRequest extends ConnectionError {\n static defaultMessage =\n 'BadRequest usually implies an attempt to use service account credentials';\n}\n\n/**\n * thrown for CloseCode 4401\n */\nexport class NotAuthorized extends ConnectionError {\n static defaultMessage = 'Please refresh your access token';\n}\n\n/**\n * thrown for CloseCode 4403\n */\nexport class Forbidden extends ConnectionError {\n static defaultMessage = 'Forbidden usually implies these credentials are not entitled for Webex';\n}\n\n// /**\n// * thrown for CloseCode 4404\n// */\n// export class NotFound extends ConnectionError {\n// static defaultMessage = `Please refresh your Mercury registration (typically via a WDM refresh)`;\n// }\n"],"mappings":";;;;;;;;;;;;;;;;AAIA;AAAwC;AAAA;AAExC;AACA;AACA;AAFA,IAGaA,eAAe;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAG1B;AACF;AACA;AACA;IACE,iBAAkB;MAAA,IAAZC,KAAK,uEAAG,CAAC,CAAC;MACd,+BAAwB,IAAI,EAAE;QAC5BC,IAAI,EAAE;UACJC,KAAK,EAAEF,KAAK,CAACC;QACf,CAAC;QACDE,MAAM,EAAE;UACND,KAAK,EAAEF,KAAK,CAACG;QACf;MACF,CAAC,CAAC;MAEF,OAAOH,KAAK,CAACG,MAAM;IACrB;EAAC;EAAA;AAAA,EAlBkCC,iBAAS;AAqB9C;AACA;AACA;AAFA;AAAA,8BArBaL,eAAe,oBACF,6BAA6B;AAAA,IAuB1CM,eAAe;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;AAAA,EAASN,eAAe;AAKpD;AACA;AACA;AAFA;AAAA,8BALaM,eAAe,oBAExB,2GAA2G;AAAA,IAMlGC,UAAU;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;AAAA,EAASP,eAAe;AAK/C;AACA;AACA;AAFA;AAAA,8BALaO,UAAU,oBAEnB,0EAA0E;AAAA,IAMjEC,aAAa;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;AAAA,EAASR,eAAe;AAIlD;AACA;AACA;AAFA;AAAA,8BAJaQ,aAAa,oBACA,kCAAkC;AAAA,IAM/CC,SAAS;EAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;AAAA,EAAST,eAAe,GAI9C;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA,8BATaS,SAAS,oBACI,wEAAwE"}
|
package/dist/index.js
CHANGED
|
@@ -1,95 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
|
|
11
8
|
_Object$defineProperty(exports, "BadRequest", {
|
|
12
9
|
enumerable: true,
|
|
13
10
|
get: function get() {
|
|
14
11
|
return _errors.BadRequest;
|
|
15
12
|
}
|
|
16
13
|
});
|
|
17
|
-
|
|
18
14
|
_Object$defineProperty(exports, "ConnectionError", {
|
|
19
15
|
enumerable: true,
|
|
20
16
|
get: function get() {
|
|
21
17
|
return _errors.ConnectionError;
|
|
22
18
|
}
|
|
23
19
|
});
|
|
24
|
-
|
|
25
20
|
_Object$defineProperty(exports, "Forbidden", {
|
|
26
21
|
enumerable: true,
|
|
27
22
|
get: function get() {
|
|
28
23
|
return _errors.Forbidden;
|
|
29
24
|
}
|
|
30
25
|
});
|
|
31
|
-
|
|
32
26
|
_Object$defineProperty(exports, "Mercury", {
|
|
33
27
|
enumerable: true,
|
|
34
28
|
get: function get() {
|
|
35
29
|
return _mercury.default;
|
|
36
30
|
}
|
|
37
31
|
});
|
|
38
|
-
|
|
39
32
|
_Object$defineProperty(exports, "NotAuthorized", {
|
|
40
33
|
enumerable: true,
|
|
41
34
|
get: function get() {
|
|
42
35
|
return _errors.NotAuthorized;
|
|
43
36
|
}
|
|
44
37
|
});
|
|
45
|
-
|
|
46
38
|
_Object$defineProperty(exports, "Socket", {
|
|
47
39
|
enumerable: true,
|
|
48
40
|
get: function get() {
|
|
49
41
|
return _socket.default;
|
|
50
42
|
}
|
|
51
43
|
});
|
|
52
|
-
|
|
53
44
|
_Object$defineProperty(exports, "UnknownResponse", {
|
|
54
45
|
enumerable: true,
|
|
55
46
|
get: function get() {
|
|
56
47
|
return _errors.UnknownResponse;
|
|
57
48
|
}
|
|
58
49
|
});
|
|
59
|
-
|
|
60
50
|
_Object$defineProperty(exports, "config", {
|
|
61
51
|
enumerable: true,
|
|
62
52
|
get: function get() {
|
|
63
53
|
return _config.default;
|
|
64
54
|
}
|
|
65
55
|
});
|
|
66
|
-
|
|
67
56
|
_Object$defineProperty(exports, "default", {
|
|
68
57
|
enumerable: true,
|
|
69
58
|
get: function get() {
|
|
70
59
|
return _mercury.default;
|
|
71
60
|
}
|
|
72
61
|
});
|
|
73
|
-
|
|
74
62
|
require("@webex/internal-plugin-device");
|
|
75
|
-
|
|
76
63
|
require("@webex/internal-plugin-feature");
|
|
77
|
-
|
|
78
64
|
require("@webex/internal-plugin-metrics");
|
|
79
|
-
|
|
80
65
|
var _webexCore = require("@webex/webex-core");
|
|
81
|
-
|
|
82
66
|
var _mercury = _interopRequireDefault(require("./mercury"));
|
|
83
|
-
|
|
84
67
|
var _config = _interopRequireDefault(require("./config"));
|
|
85
|
-
|
|
86
68
|
var _socket = _interopRequireDefault(require("./socket"));
|
|
87
|
-
|
|
88
69
|
var _errors = require("./errors");
|
|
89
|
-
|
|
90
70
|
/*!
|
|
91
71
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
92
72
|
*/
|
|
73
|
+
|
|
93
74
|
(0, _webexCore.registerInternalPlugin)('mercury', _mercury.default, {
|
|
94
75
|
config: _config.default,
|
|
95
76
|
onBeforeLogout: function onBeforeLogout() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["registerInternalPlugin","Mercury","config","onBeforeLogout","disconnect"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-device';\nimport '@webex/internal-plugin-feature';\nimport '@webex/internal-plugin-metrics';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Mercury from './mercury';\nimport config from './config';\n\nregisterInternalPlugin('mercury', Mercury, {\n config,\n onBeforeLogout() {\n return this.disconnect();\n }
|
|
1
|
+
{"version":3,"names":["registerInternalPlugin","Mercury","config","onBeforeLogout","disconnect"],"sources":["index.js"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport '@webex/internal-plugin-device';\nimport '@webex/internal-plugin-feature';\nimport '@webex/internal-plugin-metrics';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Mercury from './mercury';\nimport config from './config';\n\nregisterInternalPlugin('mercury', Mercury, {\n config,\n onBeforeLogout() {\n return this.disconnect();\n },\n});\n\nexport {default} from './mercury';\nexport {default as Mercury} from './mercury';\nexport {default as Socket} from './socket';\nexport {default as config} from './config';\nexport {\n BadRequest,\n ConnectionError,\n Forbidden,\n NotAuthorized,\n UnknownResponse,\n // NotFound\n} from './errors';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;AACA;AACA;AAEA;AAEA;AACA;AAWA;AAEA;AAxBA;AACA;AACA;;AAWA,IAAAA,iCAAsB,EAAC,SAAS,EAAEC,gBAAO,EAAE;EACzCC,MAAM,EAANA,eAAM;EACNC,cAAc,4BAAG;IACf,OAAO,IAAI,CAACC,UAAU,EAAE;EAC1B;AACF,CAAC,CAAC"}
|