@webex/plugin-meetings 3.12.0-next.91 → 3.12.0-next.93

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 (38) hide show
  1. package/dist/aiEnableRequest/index.js +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/common/errors/webex-errors.js +47 -5
  5. package/dist/common/errors/webex-errors.js.map +1 -1
  6. package/dist/interpretation/index.js +1 -1
  7. package/dist/interpretation/siLanguage.js +1 -1
  8. package/dist/locus-info/index.js +14 -5
  9. package/dist/locus-info/index.js.map +1 -1
  10. package/dist/media/MediaConnectionAwaiter.js +15 -2
  11. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  12. package/dist/media/index.js +5 -1
  13. package/dist/media/index.js.map +1 -1
  14. package/dist/meeting/index.js +458 -365
  15. package/dist/meeting/index.js.map +1 -1
  16. package/dist/reachability/clusterReachability.js.map +1 -1
  17. package/dist/reachability/index.js +111 -70
  18. package/dist/reachability/index.js.map +1 -1
  19. package/dist/types/common/errors/webex-errors.d.ts +31 -2
  20. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  21. package/dist/types/meeting/index.d.ts +18 -3
  22. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  23. package/dist/types/reachability/index.d.ts +9 -2
  24. package/dist/webinar/index.js +1 -1
  25. package/package.json +3 -3
  26. package/src/common/errors/webex-errors.ts +47 -3
  27. package/src/locus-info/index.ts +15 -5
  28. package/src/media/MediaConnectionAwaiter.ts +21 -4
  29. package/src/media/index.ts +7 -1
  30. package/src/meeting/index.ts +100 -27
  31. package/src/reachability/clusterReachability.ts +3 -2
  32. package/src/reachability/index.ts +28 -1
  33. package/test/unit/spec/common/errors/webex-errors.ts +62 -0
  34. package/test/unit/spec/locus-info/index.js +44 -0
  35. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  36. package/test/unit/spec/media/index.ts +61 -0
  37. package/test/unit/spec/meeting/index.js +290 -8
  38. package/test/unit/spec/reachability/index.ts +69 -0
@@ -160,6 +160,75 @@ describe('isAnyPublicClusterReachable', () => {
160
160
  });
161
161
  });
162
162
 
163
+ describe('isAnyClusterReachableViaProtocol', () => {
164
+ let webex;
165
+
166
+ beforeEach(() => {
167
+ webex = new MockWebex();
168
+ sinon.stub(MeetingUtil, 'getIpVersion').returns(IP_VERSION.unknown);
169
+ });
170
+
171
+ afterEach(() => {
172
+ sinon.restore();
173
+ });
174
+
175
+ const checkReachableViaProtocol = async (
176
+ mockStorage: any,
177
+ protocol: 'udp' | 'tcp' | 'xtls',
178
+ expectedValue: boolean
179
+ ) => {
180
+ if (mockStorage) {
181
+ await webex.boundedStorage.put(
182
+ 'Reachability',
183
+ 'reachability.result',
184
+ JSON.stringify(mockStorage)
185
+ );
186
+ }
187
+ const reachability = new Reachability(webex);
188
+
189
+ const result = await reachability.isAnyClusterReachableViaProtocol(protocol);
190
+
191
+ assert.equal(result, expectedValue);
192
+ };
193
+
194
+ ['udp', 'tcp', 'xtls'].forEach((protocol: 'udp' | 'tcp' | 'xtls') => {
195
+ it(`returns true when at least one cluster is reachable via ${protocol}`, async () => {
196
+ await checkReachableViaProtocol(
197
+ {
198
+ clusterA: {[protocol]: {result: 'reachable'}},
199
+ clusterB: {[protocol]: {result: 'unreachable'}},
200
+ },
201
+ protocol,
202
+ true
203
+ );
204
+ });
205
+
206
+ it(`returns false when no cluster is reachable via ${protocol}`, async () => {
207
+ await checkReachableViaProtocol(
208
+ {
209
+ clusterA: {[protocol]: {result: 'unreachable'}},
210
+ clusterB: {[protocol]: {result: 'unreachable'}},
211
+ },
212
+ protocol,
213
+ false
214
+ );
215
+ });
216
+ });
217
+
218
+ it('returns false when storage read throws an error', async () => {
219
+ // don't put anything in storage so .get() rejects
220
+ const reachability = new Reachability(webex);
221
+
222
+ const result = await reachability.isAnyClusterReachableViaProtocol('xtls');
223
+
224
+ assert.equal(result, false);
225
+ });
226
+
227
+ it('returns false when stored data is empty', async () => {
228
+ await checkReachableViaProtocol({}, 'xtls', false);
229
+ });
230
+ });
231
+
163
232
  describe('isWebexMediaBackendUnreachable', () => {
164
233
  let webex;
165
234