@webex/internal-plugin-mercury 3.12.0-llmrefactor.1 → 3.12.0-llmrefactor.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/dist/mercury-plugin.js +1 -1
- package/dist/mercury-plugin.js.map +1 -1
- package/dist/mercury.js +1 -1
- package/package.json +6 -6
- package/src/mercury-plugin.ts +1 -1
package/dist/mercury-plugin.js
CHANGED
|
@@ -26,7 +26,7 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
|
|
|
26
26
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable require-jsdoc */ /*!
|
|
27
27
|
* Copyright (c) 2015-2024 Cisco Systems, Inc. See LICENSE file.
|
|
28
28
|
*/ // @ts-ignore
|
|
29
|
-
//
|
|
29
|
+
// since mercury-plugin.ts is a .ts file, the TS language server tries to parse mercury.js and chokes on the @deprecated decorator.
|
|
30
30
|
// using a require() call instead of import to avoid TS parsing the file:
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_config","_interopRequireDefault","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","Mercury","MercuryPlugin","exports","_ref","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","_mercury","parent","webex","on","eventName","_ref2","_len2","rest","_key2","trigger","_inherits2","_createClass2","key","get","_this$_mercury$connec","_this$_mercury","connected","_this$_mercury2","socket","_this$_mercury3","localClusterServiceUrls","value","getLastError","_this$_mercury4","_this$_mercury$hasEve","_this$_mercury5","hasEverConnected","connect","webSocketUrl","disconnect","options","logout","normalReconnectReasons","reason","config","beforeLogoutOptionsCloseReason","includes","code","undefined","processRegistrationStatusEvent","message","WebexPlugin","_default"],"sources":["mercury-plugin.ts"],"sourcesContent":["/* eslint-disable require-jsdoc */\n/*!\n * Copyright (c) 2015-2024 Cisco Systems, Inc. See LICENSE file.\n */\n\n// @ts-ignore\nimport {WebexPlugin} from '@webex/webex-core';\n\nimport config from './config';\n\n//
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_config","_interopRequireDefault","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","Mercury","MercuryPlugin","exports","_ref","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","_mercury","parent","webex","on","eventName","_ref2","_len2","rest","_key2","trigger","_inherits2","_createClass2","key","get","_this$_mercury$connec","_this$_mercury","connected","_this$_mercury2","socket","_this$_mercury3","localClusterServiceUrls","value","getLastError","_this$_mercury4","_this$_mercury$hasEve","_this$_mercury5","hasEverConnected","connect","webSocketUrl","disconnect","options","logout","normalReconnectReasons","reason","config","beforeLogoutOptionsCloseReason","includes","code","undefined","processRegistrationStatusEvent","message","WebexPlugin","_default"],"sources":["mercury-plugin.ts"],"sourcesContent":["/* eslint-disable require-jsdoc */\n/*!\n * Copyright (c) 2015-2024 Cisco Systems, Inc. See LICENSE file.\n */\n\n// @ts-ignore\nimport {WebexPlugin} from '@webex/webex-core';\n\nimport config from './config';\n\n// since mercury-plugin.ts is a .ts file, the TS language server tries to parse mercury.js and chokes on the @deprecated decorator.\n// using a require() call instead of import to avoid TS parsing the file:\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst Mercury = require('./mercury').default;\n\nexport class MercuryPlugin extends (WebexPlugin as any) {\n namespace = 'Mercury';\n\n private _mercury: any;\n\n constructor(...args: any[]) {\n super(...args);\n this._mercury = new (Mercury as any)({parent: (this as any).webex});\n\n // Re-emit every event from Mercury on this plugin so listeners attached to\n // `this.webex.internal.mercury` continue to work.\n this._mercury.on('all', (eventName: string, ...rest: any[]) => {\n (this as any).trigger(eventName, ...rest);\n });\n }\n\n /** True when the primary Mercury socket is connected. */\n get connected(): boolean {\n return this._mercury?.connected ?? false;\n }\n\n /** The primary socket, if connected. */\n get socket(): any {\n return this._mercury?.socket;\n }\n\n /** Cluster service URLs received from registration status event. */\n get localClusterServiceUrls(): any {\n return this._mercury?.localClusterServiceUrls;\n }\n\n getLastError(): any {\n return this._mercury?.getLastError();\n }\n\n get hasEverConnected(): boolean {\n return this._mercury?.hasEverConnected ?? false;\n }\n\n connect(webSocketUrl?: string): Promise<void> {\n return this._mercury.connect(webSocketUrl);\n }\n\n disconnect(options?: any): Promise<void> {\n return this._mercury.disconnect(options);\n }\n\n logout(): Promise<void> {\n const normalReconnectReasons = ['idle', 'done (forced)', 'pong not received', 'pong mismatch'];\n const reason = this.config.beforeLogoutOptionsCloseReason;\n const options =\n reason && !normalReconnectReasons.includes(reason) ? {code: 3050, reason} : undefined;\n\n return this._mercury.disconnect(options);\n }\n\n processRegistrationStatusEvent(message: any): void {\n return this._mercury.processRegistrationStatusEvent(message);\n }\n}\n\nexport {config};\nexport default MercuryPlugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8B,SAAAG,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAI,0BAAA,cAAAN,CAAA,IAAAU,OAA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cAAAF,qBAAA,cAAAA,qBAAA,GAAI,KAAK;IACjD;EAAC;IAAAZ,GAAA;IAAAS,KAAA,EAED,SAAAM,OAAOA,CAACC,YAAqB,EAAiB;MAC5C,OAAO,IAAI,CAAC5B,QAAQ,CAAC2B,OAAO,CAACC,YAAY,CAAC;IAC5C;EAAC;IAAAhB,GAAA;IAAAS,KAAA,EAED,SAAAQ,UAAUA,CAACC,OAAa,EAAiB;MACvC,OAAO,IAAI,CAAC9B,QAAQ,CAAC6B,UAAU,CAACC,OAAO,CAAC;IAC1C;EAAC;IAAAlB,GAAA;IAAAS,KAAA,EAED,SAAAU,MAAMA,CAAA,EAAkB;MACtB,IAAMC,sBAAsB,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,eAAe,CAAC;MAC9F,IAAMC,MAAM,GAAG,IAAI,CAACC,MAAM,CAACC,8BAA8B;MACzD,IAAML,OAAO,GACXG,MAAM,IAAI,CAACD,sBAAsB,CAACI,QAAQ,CAACH,MAAM,CAAC,GAAG;QAACI,IAAI,EAAE,IAAI;QAAEJ,MAAM,EAANA;MAAM,CAAC,GAAGK,SAAS;MAEvF,OAAO,IAAI,CAACtC,QAAQ,CAAC6B,UAAU,CAACC,OAAO,CAAC;IAC1C;EAAC;IAAAlB,GAAA;IAAAS,KAAA,EAED,SAAAkB,8BAA8BA,CAACC,OAAY,EAAQ;MACjD,OAAO,IAAI,CAACxC,QAAQ,CAACuC,8BAA8B,CAACC,OAAO,CAAC;IAC9D;EAAC;AAAA,EA1DiCC,sBAAW;AAAA,IAAAC,QAAA,GAAAtD,OAAA,CAAAZ,OAAA,GA8DhCW,aAAa","ignoreList":[]}
|
package/dist/mercury.js
CHANGED
|
@@ -756,7 +756,7 @@ var Mercury = _webexCore.WebexPlugin.extend((_dec = (0, _common.deprecated)('Mer
|
|
|
756
756
|
this.logger.info("".concat(this.namespace, ": reconnecting"));
|
|
757
757
|
return this.connect(webSocketUrl);
|
|
758
758
|
},
|
|
759
|
-
version: "3.12.0-llmrefactor.
|
|
759
|
+
version: "3.12.0-llmrefactor.2"
|
|
760
760
|
}, (0, _applyDecoratedDescriptor2.default)(_obj, "listen", [_dec], (0, _getOwnPropertyDescriptor.default)(_obj, "listen"), _obj), (0, _applyDecoratedDescriptor2.default)(_obj, "stopListening", [_dec2], (0, _getOwnPropertyDescriptor.default)(_obj, "stopListening"), _obj), _obj));
|
|
761
761
|
var _default = exports.default = Mercury;
|
|
762
762
|
//# sourceMappingURL=mercury.js.map
|
package/package.json
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@webex/legacy-tools": "0.0.0",
|
|
32
32
|
"@webex/test-helper-chai": "3.12.0-llmrefactor.1",
|
|
33
33
|
"@webex/test-helper-mocha": "3.12.0-llmrefactor.1",
|
|
34
|
-
"@webex/test-helper-mock-webex": "3.12.0-llmrefactor.
|
|
35
|
-
"@webex/test-helper-test-users": "3.12.0-llmrefactor.
|
|
34
|
+
"@webex/test-helper-mock-webex": "3.12.0-llmrefactor.0",
|
|
35
|
+
"@webex/test-helper-test-users": "3.12.0-llmrefactor.0",
|
|
36
36
|
"eslint": "^8.24.0",
|
|
37
37
|
"prettier": "^2.7.1",
|
|
38
38
|
"sinon": "^9.2.4"
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@webex/test-helper-chai": "3.12.0-llmrefactor.1",
|
|
47
47
|
"@webex/test-helper-mocha": "3.12.0-llmrefactor.1",
|
|
48
48
|
"@webex/test-helper-mock-web-socket": "3.12.0-llmrefactor.1",
|
|
49
|
-
"@webex/test-helper-mock-webex": "3.12.0-llmrefactor.
|
|
50
|
-
"@webex/test-helper-refresh-callback": "3.12.0-llmrefactor.
|
|
51
|
-
"@webex/test-helper-test-users": "3.12.0-llmrefactor.
|
|
49
|
+
"@webex/test-helper-mock-webex": "3.12.0-llmrefactor.0",
|
|
50
|
+
"@webex/test-helper-refresh-callback": "3.12.0-llmrefactor.0",
|
|
51
|
+
"@webex/test-helper-test-users": "3.12.0-llmrefactor.0",
|
|
52
52
|
"@webex/webex-core": "3.12.0-llmrefactor.1",
|
|
53
53
|
"backoff": "^2.5.0",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"test:style": "eslint ./src/**/*.*",
|
|
65
65
|
"test:unit": "webex-legacy-tools test --unit --runner mocha"
|
|
66
66
|
},
|
|
67
|
-
"version": "3.12.0-llmrefactor.
|
|
67
|
+
"version": "3.12.0-llmrefactor.2"
|
|
68
68
|
}
|
package/src/mercury-plugin.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {WebexPlugin} from '@webex/webex-core';
|
|
|
8
8
|
|
|
9
9
|
import config from './config';
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// since mercury-plugin.ts is a .ts file, the TS language server tries to parse mercury.js and chokes on the @deprecated decorator.
|
|
12
12
|
// using a require() call instead of import to avoid TS parsing the file:
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|